emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] new-website a50a613: Merge branch 'master' into new-website


From: Nicolas Petton
Subject: [elpa] new-website a50a613: Merge branch 'master' into new-website
Date: Tue, 16 Feb 2016 15:03:51 +0000

branch: new-website
commit a50a61302d26a0a84e8ba08c2beae3eceeb4add2
Merge: d6e6476 04f3473
Author: Nicolas Petton <address@hidden>
Commit: Nicolas Petton <address@hidden>

    Merge branch 'master' into new-website
---
 .gitignore                                         |    9 +
 GNUmakefile                                        |   74 +-
 README                                             |   63 +-
 admin/archive-contents.el                          |  128 +-
 admin/ert-support.el                               |   54 +
 externals-list                                     |   10 +-
 packages/ada-mode/NEWS                             |   49 +
 packages/ada-mode/README                           |    4 +-
 packages/ada-mode/ada-build.el                     |   13 +-
 packages/ada-mode/ada-fix-error.el                 |   56 +-
 packages/ada-mode/ada-gnat-compile.el              |   39 +-
 packages/ada-mode/ada-gnat-xref.el                 |   21 +-
 packages/ada-mode/ada-grammar-wy.el                | 2276 +++++++-------
 packages/ada-mode/ada-indent-user-options.el       |   42 +-
 packages/ada-mode/ada-mode-compat-24.2.el          |   16 +-
 packages/ada-mode/ada-mode.el                      |  313 ++-
 packages/ada-mode/ada-mode.info                    |  130 +-
 packages/ada-mode/ada-mode.texi                    |   60 +-
 packages/ada-mode/ada-ref-man.el                   |    4 +-
 packages/ada-mode/ada-wisi-opentoken.el            |    4 +-
 packages/ada-mode/ada-wisi.el                      |  144 +-
 packages/ada-mode/ada-xref.el                      |    1 +
 packages/ada-mode/gnat-core.el                     |   30 +-
 packages/ada-mode/gnat-inspect.el                  |  571 ----
 packages/ada-mode/gpr-grammar-wy.el                |  303 ++-
 packages/ada-mode/gpr-mode.el                      |   53 +-
 packages/ada-mode/gpr-mode.info                    |    2 +-
 packages/ada-mode/gpr-query.el                     |  126 +-
 packages/ada-mode/gpr-skel.el                      |    7 +-
 packages/ada-mode/gpr-wisi.el                      |    7 +-
 packages/aggressive-indent/README.md               |    6 +-
 packages/aggressive-indent/aggressive-indent.el    |   49 +-
 packages/ahungry-theme/ahungry-theme.el            |   15 +-
 packages/ampc/ampc.el                              | 3123 ++++++++++++++++++++
 packages/ampc/ampc_tagger.cpp                      |  218 ++
 packages/async/README.md                           |  145 +
 packages/async/async-bytecomp.el                   |  177 ++
 packages/async/async-test.el                       |  140 +
 packages/async/async.el                            |  303 ++
 packages/async/dired-async.el                      |  290 ++
 packages/async/smtpmail-async.el                   |   73 +
 packages/avy/avy.el                                | 1047 +++++---
 packages/avy/doc/Changelog.org                     |  118 +-
 packages/beacon/beacon.el                          |   89 +-
 packages/bug-hunter/README.org                     |    1 +
 packages/bug-hunter/bug-hunter.el                  |   20 +-
 packages/company-statistics/company-statistics.el  |    8 +-
 packages/context-coloring/.travis.yml              |   19 +-
 packages/context-coloring/LICENSE                  |  674 +++++
 packages/context-coloring/context-coloring.el      |   90 +-
 .../context-coloring/test/context-coloring-test.el |   32 +
 .../test/fixtures/empty-varlist.el                 |    6 +
 packages/context-coloring/test/fixtures/let.el     |    2 +
 .../test/fixtures/macroexp-let2.el                 |    6 +
 .../test/fixtures/varlist-spacing.el               |    8 +
 packages/debbugs/Debbugs.wsdl                      |    2 +-
 packages/debbugs/README                            |    3 +
 packages/debbugs/debbugs-browse.el                 |    3 +-
 packages/debbugs/debbugs-gnu.el                    |  652 +++--
 packages/debbugs/debbugs-org.el                    |  144 +-
 packages/debbugs/debbugs-ug.info                   |  406 ++--
 packages/debbugs/debbugs-ug.texi                   |  131 +-
 packages/debbugs/debbugs.el                        |  470 ++--
 packages/debbugs/debbugs.info                      |  234 +-
 packages/debbugs/debbugs.texi                      |   14 +-
 packages/diff-hl/README.md                         |   10 +-
 packages/diff-hl/diff-hl-dired.el                  |   13 +-
 packages/diff-hl/diff-hl-flydiff.el                |   40 +-
 packages/diff-hl/diff-hl.el                        |   51 +-
 packages/dts-mode/dts-mode.el                      |    4 +-
 packages/el-search/el-search.el                    |  683 ++++-
 .../f90-interface-browser/f90-interface-browser.el |   32 +-
 packages/ggtags/README.rst                         |   23 +-
 packages/ggtags/ggtags.el                          |   83 +-
 packages/gnome-c-style/.gitignore                  |    2 +
 packages/gnome-c-style/Makefile                    |   16 +
 packages/gnome-c-style/README                      |    1 +
 packages/gnome-c-style/README.md                   |   88 +
 packages/gnome-c-style/gnome-c-align.el            |  547 ++++
 packages/gnome-c-style/gnome-c-snippet.el          |  703 +++++
 packages/gnome-c-style/gnome-c-style.el            |   74 +
 packages/gnome-c-style/gnome-c-tests.el            |  284 ++
 packages/gnorb/gnorb-bbdb.el                       |   46 +-
 packages/gnorb/gnorb-org.el                        |   21 +-
 packages/gnorb/gnorb-registry.el                   |    4 +-
 packages/gnorb/gnorb-utils.el                      |   39 +-
 packages/gnorb/gnorb.el                            |    2 +-
 packages/gnorb/nngnorb.el                          |    2 +-
 packages/html5-schema/.htaccess                    |   10 +
 packages/html5-schema/LICENSE                      |   23 +
 packages/html5-schema/applications.rnc             |  405 +++
 packages/html5-schema/aria.rnc                     | 1251 ++++++++
 packages/html5-schema/assertions.sch               | 1235 ++++++++
 packages/html5-schema/block.rnc                    |  250 ++
 packages/html5-schema/common.rnc                   |  526 ++++
 packages/html5-schema/core-scripting.rnc           |  386 +++
 packages/html5-schema/data.rnc                     |   94 +
 packages/html5-schema/embed.rnc                    |  586 ++++
 packages/html5-schema/form-datatypes.rnc           |   63 +
 packages/html5-schema/html5-schema.el              |   67 +
 packages/html5-schema/html5.rnc                    |   56 +
 packages/html5-schema/html5exclusions.rnc          |   63 +
 packages/html5-schema/locating-rules.xml           |    9 +
 packages/html5-schema/media.rnc                    |  210 ++
 packages/html5-schema/meta.rnc                     |  424 +++
 packages/html5-schema/microdata.rnc                |  101 +
 packages/html5-schema/phrase.rnc                   |  400 +++
 packages/html5-schema/rdfa.rnc                     |  285 ++
 packages/html5-schema/revision.rnc                 |   54 +
 packages/html5-schema/ruby.rnc                     |   81 +
 packages/html5-schema/sectional.rnc                |  172 ++
 packages/html5-schema/structural.rnc               |  135 +
 packages/html5-schema/tables.rnc                   |  244 ++
 packages/html5-schema/web-components.rnc           |   43 +
 packages/html5-schema/web-forms-scripting.rnc      |   27 +
 packages/html5-schema/web-forms.rnc                |  607 ++++
 packages/html5-schema/web-forms2-scripting.rnc     |    9 +
 packages/html5-schema/web-forms2.rnc               |  789 +++++
 packages/html5-schema/xhtml5.rnc                   |   40 +
 packages/hydra/hydra-ox.el                         |    2 +
 packages/hydra/hydra-test.el                       |    2 +-
 packages/hydra/hydra.el                            |   16 +-
 packages/ioccur/ioccur.el                          |    4 +-
 packages/iterators/iterators.el                    |   41 +
 packages/js2-mode/js2-mode.el                      |   11 +-
 packages/let-alist/let-alist.el                    |  142 -
 packages/lex/lex.el                                |   10 +-
 packages/loccur/README.md                          |   50 +
 packages/loccur/loccur.el                          |  323 ++
 packages/multishell/.gitignore                     |    2 +
 packages/multishell/LICENSE                        |  674 +++++
 packages/multishell/README.md                      |   57 +
 packages/multishell/getting-to-a-shell.md          |   41 +
 packages/multishell/multishell-list.el             |  312 ++
 packages/multishell/multishell.el                  |  812 +++++
 packages/names/names-dev.el                        |    3 -
 packages/names/names.el                            |   10 +-
 packages/on-screen/.gitignore                      |    1 +
 packages/on-screen/on-screen.el                    |  665 +++++
 packages/other-frame-window/other-frame-window.el  |   32 +-
 packages/package-fixes/package-fixes.el            |  148 +
 packages/rich-minority/rich-minority.el            |    4 +-
 packages/rnc-mode/rnc-mode.el                      |  153 +
 packages/sm-c-mode/GNUmakefile                     |   28 +
 packages/sm-c-mode/sm-c-mode-test.c                |   97 +
 packages/sm-c-mode/sm-c-mode.el                    |  917 ++++++
 packages/spinner/spinner.el                        |   34 +-
 packages/stream/stream.el                          |   88 +-
 packages/stream/tests/stream-tests.el              |   74 +-
 packages/svg-clock/svg-clock.el                    |    4 +-
 packages/swiper/README.md                          |   19 +-
 packages/swiper/colir.el                           |    5 +-
 packages/swiper/counsel.el                         |  297 ++-
 packages/swiper/doc/Changelog.org                  |  322 ++-
 packages/swiper/doc/ivy.org                        |  476 +++
 packages/swiper/doc/ivy.texi                       |  591 ++++
 packages/swiper/doc/style.css                      |  107 +
 packages/swiper/ivy-hydra.el                       |   22 +-
 packages/swiper/ivy-test.el                        |   32 +-
 packages/swiper/ivy.el                             | 1447 +++++++---
 packages/swiper/swiper.el                          |  451 ++-
 packages/tiny/Makefile                             |   15 +-
 packages/tiny/tiny-test.el                         |    2 +
 packages/tiny/tiny.el                              |   33 +-
 packages/transcribe/transcribe.el                  |  268 ++
 packages/wcheck-mode/README.md                     |   15 +-
 packages/wcheck-mode/wcheck-mode.el                |   51 +-
 packages/websocket/websocket.el                    |    5 +-
 packages/wisi/NEWS                                 |   13 +
 packages/wisi/README                               |    2 +-
 packages/wisi/wisi-compile.el                      |  214 +-
 packages/wisi/wisi-parse.el                        |   43 +-
 packages/wisi/wisi.el                              |  135 +-
 packages/yasnippet/CONTRIBUTING.md                 |    2 +
 packages/yasnippet/README.mdown                    |   51 +-
 packages/yasnippet/doc/{ => }/doc/.nosearch        |    0
 packages/yasnippet/doc/{ => }/doc/faq.org          |    0
 packages/yasnippet/doc/{ => }/doc/index.org        |    0
 .../yasnippet/doc/{ => }/doc/nav-menu.html.inc     |    0
 packages/yasnippet/doc/{ => }/doc/org-setup.inc    |    0
 .../doc/{ => }/doc/snippet-development.org         |    0
 .../yasnippet/doc/{ => }/doc/snippet-expansion.org |   18 +-
 packages/yasnippet/doc/{ => }/doc/snippet-menu.org |    5 +-
 .../doc/{ => }/doc/snippet-organization.org        |   18 +-
 .../yasnippet/doc/{ => }/doc/snippet-reference.org |    0
 .../doc/{ => }/doc/stylesheets/manual.css          |    0
 packages/yasnippet/doc/yas-doc-helper.el           |    2 +-
 packages/yasnippet/yasnippet-debug.el              |    9 +-
 packages/yasnippet/yasnippet-tests.el              |  114 +-
 packages/yasnippet/yasnippet.el                    |  388 ++--
 packages/ztree/README.md                           |   21 +-
 packages/ztree/ztree-diff-model.el                 |  412 ++--
 packages/ztree/ztree-diff.el                       |  272 ++-
 packages/ztree/ztree-dir.el                        |   68 +-
 packages/ztree/ztree-util.el                       |   70 +-
 packages/ztree/ztree-view.el                       |  213 +-
 packages/ztree/ztree.el                            |    9 +-
 197 files changed, 30070 insertions(+), 5664 deletions(-)

diff --git a/.gitignore b/.gitignore
index 790390e..43c9d2b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 *.elc
 *.orig
+.dir-locals?.el
 *~
 \#*\#
 ChangeLog
@@ -15,8 +16,16 @@ packages/dash/
 packages/dismal
 packages/ergoemacs-mode
 packages/exwm
+packages/ntlm
 packages/omn-mode/
 packages/pabbrev
+packages/python
 packages/rudel
+packages/soap-client
 packages/w3
 packages/xelb
+
+# Testing file
+/archive
+*.log
+*.buildlog
\ No newline at end of file
diff --git a/GNUmakefile b/GNUmakefile
index cc5be30..d23d523 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,4 +1,5 @@
 # Makefile for GNU Emacs Lisp Package Archive.
+#
 
 EMACS=emacs --batch
 
@@ -13,20 +14,20 @@ CR_EXCEPTIONS=copyright_exceptions
 .PHONY: check_copyrights
 check_copyrights:
        @echo "Compute exceptions >$(CR_EXCEPTIONS)~"
-       @export LC_ALL=C;                                               \
-       (cd packages;                                                   \
-       find . -name '.git' -prune -o                                   \
-              -name 'test' -prune -o                                   \
-              -name '*.el' -print0 |                                   \
-           xargs -0 grep -L 'Free Software Foundation, Inc' |          \
-           grep -v '\(\.dir-locals\|.-\(pkg\|autoloads\)\)\.el$$';     \
-       find . -name '.git' -prune -o -name '*.el' -print |             \
-           while read f; do                                            \
-               fquoted="$$(echo $$f|tr '|' '_')";                      \
-               sed -n -e '/[Cc]opyright.*, *[1-9][-0-9]*,\?$$/N'       \
-                   -e '/Free Software Foundation/d'                    \
-                   -e "s|^\\(.*[Cc]opyright\\)|$$fquoted:\\1|p"        \
-                  "$$f";                                               \
+       @export LC_ALL=C;                                           \
+       (cd packages &&                                             \
+       find . -name '.git' -prune -o                               \
+              -name 'test' -prune -o                               \
+              -name '*.el' -print0 |                               \
+           xargs -0 grep -L 'Free Software Foundation, Inc' |      \
+           grep -v '\(\.dir-locals\|.-\(pkg\|autoloads\)\)\.el$$'; \
+       find . -name '.git' -prune -o -name '*.el' -type f -print | \
+           while read f; do                                        \
+               fquoted="$$(echo $$f|tr '|' '_')";                  \
+               sed -n -e '/[Cc]opyright.*, *[1-9][-0-9]*,\?$$/N'   \
+                   -e '/Free Software Foundation/d'                \
+                   -e "s|^\\(.*[Cc]opyright\\)|$$fquoted:\\1|p"    \
+                  "$$f";                                           \
            done) | sort >$(CR_EXCEPTIONS)~
        diff -u "$(CR_EXCEPTIONS)" "$(CR_EXCEPTIONS)~"
 
@@ -40,14 +41,21 @@ archive-tmp: packages
        mkdir -p $(ARCHIVE_TMP)
        cp -a packages/. $(ARCHIVE_TMP)/packages
 
+# Use && after the cd commands, not ;, to ensure the build fails
+# immediately if the directory $(ARCHIVE_TMP)/packages does not exist.
+# For process-archive this is crucial; otherwise batch-make-archive in
+# archive-contents.el will interpret directories in the current
+# directory as unreleased packages, and recursively delete them,
+# including .git.  Prior to using &&, running "make process-archive"
+# could silently delete all local git history!
 process-archive:
        # FIXME, we could probably speed this up significantly with
        # rules like "%.tar: ../%/ChangeLog" so we only rebuild the packages
        # that have indeed changed.
-       cd $(ARCHIVE_TMP)/packages;                             \
+       cd $(ARCHIVE_TMP)/packages &&                           \
          $(EMACS) -l $(CURDIR)/admin/archive-contents.el       \
                   -f batch-make-archive
-       @cd $(ARCHIVE_TMP)/packages;                            \
+       @cd $(ARCHIVE_TMP)/packages &&                          \
          for pt in *; do                                       \
              if [ -f "$${pt}/.elpaignore" ]; then              \
                  ignore="$${pt}/.elpaignore";                  \
@@ -56,7 +64,7 @@ process-archive:
              fi;                                               \
              if [ -d $$pt ]; then                              \
                  echo "Creating tarball $${pt}.tar" &&         \
-                 tar -cf $${pt}.tar $$pt --exclude-vcs -X "$$ignore";  \
+                 tar -chf $${pt}.tar $$pt --exclude-vcs -X "$$ignore"; \
                  rm -rf $${pt};                                \
              fi;                                               \
          done
@@ -76,7 +84,7 @@ archive-full: archive-tmp org-fetch
 # FIXME: Turn it into an `external', which will require adding the notion of
 # "snapshot" packages.
 org-fetch: archive-tmp
-       cd $(ARCHIVE_TMP)/packages; \
+       cd $(ARCHIVE_TMP)/packages && \
        pkgname=`curl -s http://orgmode.org/elpa/|perl -ne 'push @f, $$1 if 
m/(org-\d{8})\.tar/; END { @f = sort @f; print "$$f[-1]\n"}'`; \
        wget -q http://orgmode.org/elpa/$${pkgname}.tar -O $${pkgname}.tar; \
        if [ -f $${pkgname}.tar ]; then \
@@ -123,7 +131,7 @@ autoloads := $(foreach pkg, $(pkgs), $(pkg)/$(notdir 
$(pkg))-autoloads.el)
 $(foreach al, $(autoloads), $(eval $(call RULE-srcdeps, $(al))))
 %-autoloads.el:
        @echo 'Generating autoloads for $@'
-       @cd $(dir $@); \
+       @cd $(dir $@) && \
          $(EMACS) -l $(CURDIR)/admin/archive-contents.el \
              --eval "(archive--refresh-pkg-file)" \
              --eval "(require 'package)" \
@@ -183,3 +191,31 @@ all-in-place: $(extra_elcs) $(autoloads) $(pkg_descs)
 externals:
        $(EMACS) -l admin/archive-contents.el \
            -f archive-add/remove/update-externals
+
+
+
+
+################### Testing ###############
+
+PACKAGE_DIRS = $(shell find packages -maxdepth 1 -type d)
+PACKAGES=$(subst /,,$(subst packages,,$(PACKAGE_DIRS)))
+
+TOP =$(shell pwd)
+
+define test_template
+$(1)-test:
+       cd packages/$(1);\
+       $(EMACS) -l $(TOP)/admin/ert-support.el \
+               --eval "(ert-support-test-package \"$(TOP)\" '$(1))" \
+
+$(1)-test-log:
+       $(MAKE) $(1)-test > packages/$(1)/$(1).log 2>&1 || { stat=ERROR; }
+endef
+
+$(foreach package,$(PACKAGES),$(eval $(call test_template,$(package))))
+
+PACKAGES_TESTS=$(addsuffix -test-log,$(PACKAGES))
+PACKAGES_LOG=$(foreach package,$(PACKAGES),packages/$(package)/$(package).log)
+
+check: $(PACKAGES_TESTS)
+       $(EMACS) -l ert -f ert-summarize-tests-batch-and-exit $(PACKAGES_LOG)
diff --git a/README b/README
index fe5a4f1..7c5cd36 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-Copyright (C) 2010-2011, 2014 Free Software Foundation, Inc.
+Copyright (C) 2010-2011, 2014, 2015 Free Software Foundation, Inc.
 See the end of the file for license conditions.
 
 
@@ -34,7 +34,48 @@ safely work on the next version here without worrying about 
the unstable
 code making it to GNU ELPA, and simply update the "version" when you want to
 release the new code.
 
-** To add a package:
+** To add a package: (submission, submit)
+
+Adding a basic package is very simple. There are thorough
+instructional, but the gist is that you:
+
+1. Notify address@hidden
+2. Place all files inside `packages/<pkg-name>/'.
+3. `git add', `git commit' and `git push'.
+
+If you don't have push access to the repository, someone will do steps
+2 and 3 for you.
+
+*** Notify address@hidden
+
+There is no approval process for GNU Elpa packages.  Still,
+you must send an email to emacs-devel for several reasons:
+
+- Notifying other developers;
+- Making sure the package doesn't break FSF rules;
+- Checking if the package is not reinventing the wheel;
+- Ensuring that first-time developers are doing it right.
+
+Before doing anything, please ensure your package follows the
+conventions described in the `** Format' section.  Then, send an email
+to the list with the subject:
+    [ELPA] New package: <pkg-name>
+
+Start your message with an explanation about the package.  A
+copy-paste of the package's Summary and Commentary is perfectly fine
+here, but you can write more or less than that if you'd like.
+
+At the bottom of the message contents include the changes you're going
+to make (the patch).  For a single-file package this can be the
+package file itself instead of the patch.  If you prefer (and if you
+have push access), you can push your changes to a branch called
+`scratch/<pkg-name>', and mention the branch in your message.
+
+After 48h, or once any issues have been addressed, someone will push
+your changes for you.  You should probably also subscribe to
address@hidden, since that's where we discuss about GNU Elpa, and
+to address@hidden, since that's where people will report bugs
+about your package.
 
 *** Add a simple (1-file) package as packages/<pkg-name>/<pkg-name>.el.
 
@@ -88,12 +129,15 @@ and the web-pages from this source code:
 
 ** External branches
 
-The easiest way to maintain and develop GNU Elpa packages is to just
-edit them right here (in elpa.git).  However, some maintainers may
-prefer to use a dedicated repository or branch for the package.  There
-are two ways to do that: subtrees and externals.
+The above instructions are enough to add regular packages, those that
+are maintained primarily here in the repository.  The instructions
+below are for those maintainers who prefer to use a dedicated
+repository or branch for the package.
+
+There are two ways to do that: subtrees and externals.
 
-Such packages should be listed in the `externals-list' file.
+Either way, such packages should always be listed in the
+`externals-list' file.
 
 In both cases, a copy of the code is kept in the `elpa' repository
 (not necessarily in the master branch) and should be sync'd with the
@@ -101,7 +145,7 @@ upstream every once in a while.  This copy may include 
local changes,
 although these should be kept to a minimum.
 
 If know you don't want a local package, but don't know which of these
-two options you prefere, then use a subtree.
+two options you prefer, then use a subtree.
 
 *** Subtrees
 
@@ -125,7 +169,7 @@ them here, simply do:
 On older git versions "git subtree" might not be available.  You can
 try "git merge -s subtree", or just update git.
 
-- <remote-repo> is the remote's url.  If you've previously used "git
+- <remote-repo> is the remote's URL.  If you've previously used "git
   remote add", then this can be the remote's name.
 - <remote-branch> is the branch you want to pull (probably "master").
 
@@ -193,6 +237,7 @@ packages/ directory.  You can then add that directory, e.g. 
with:
 ** To deploy the package repository as a remotely-accessible archive:
 
    git clone .../elpa
+   (cd elpa; git clone .../emacs)    #If you want to generate :core packages.
    mkdir build
    cd build
    (cd ../elpa; git log --format=%H | tail -n 1) >.changelog-witness
diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index 8862acb..f3b4db8 100755
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -179,7 +179,6 @@ PKG is the name of the package and DIR is the directory 
where it is."
             (error "Can't parse first line of %s" mainfile)
           ;; Grab the other fields, which are not mandatory.
           (let* ((description (match-string 1))
-                 (pv )
                  (version
                   (or (lm-header "package-version")
                       (lm-header "version")
@@ -207,8 +206,9 @@ PKG is the name of the package and DIR is the directory 
where it is."
   "Deploy the contents of DIR into the archive as a simple package.
 Rename DIR/PKG.el to PKG-VERS.el, delete DIR, and return the descriptor."
   ;; Write DIR/foo.el to foo-VERS.el and delete DIR
-  (rename-file (expand-file-name (concat pkg ".el") dir)
-              (concat pkg "-" vers ".el"))
+  (let ((src (expand-file-name (concat pkg ".el") dir)))
+    (funcall (if (file-symlink-p src) #'copy-file #'rename-file)
+            src (concat pkg "-" vers ".el")))
   ;; Add the content of the ChangeLog.
   (let ((cl (expand-file-name "ChangeLog" dir)))
     (with-current-buffer (find-file-noselect (concat pkg "-" vers ".el"))
@@ -436,7 +436,7 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
   (replace-regexp-in-string "<" "&lt;"
                             (replace-regexp-in-string "&" "&amp;" txt)))
 
-(defun archive--insert-repolinks (name srcdir mainsrcfile url)
+(defun archive--insert-repolinks (name srcdir _mainsrcfile url)
   (when url
     (insert (format "<p>Home page: <a href=%S>%s</a></p>\n"
                     url (archive--quote url)))
@@ -591,41 +591,45 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
 (defconst archive--emacs-git-url "git://git.sv.gnu.org/emacs.git")
 
 (defun archive--sync-emacs-repo ()
-  "Clone and sync Emacs repository."
-  (let ((reference (expand-file-name
-                    (or (getenv "EMACS_CLONE_REFERENCE") "../emacs/master")))
-        (emacs-repo-root (expand-file-name "emacs")))
-    (when (and (file-exists-p emacs-repo-root)
-               (not (file-exists-p
-                     (expand-file-name "README" emacs-repo-root))))
-      (message "Cleaning stalled Emacs clone: %s" emacs-repo-root)
-      (delete-directory emacs-repo-root t))
-    (cond ((file-exists-p emacs-repo-root)
-           (let ((default-directory emacs-repo-root))
-             (message "Running git pull in %S" default-directory)
-             (call-process "git" nil t nil "pull")))
-          ((file-exists-p reference)
-           (message "Emacs repository reference found: %s" reference)
-           (call-process
-            "git" nil t nil
-            "clone" archive--emacs-git-url
-            "--reference" reference
-            emacs-repo-root))
-          (t
-           (error
-            (concat "Emacs repository not found at: %s\n"
-                    "Point EMACS_CLONE_REFERENCE environment variable to an "
-                    "existing checkout.") reference)))))
-
-(defun archive--cleanup-packages (externals-list)
+  "Sync Emacs repository, if applicable.
+Return non-nil if there's an \"emacs\" repository present."
+  ;; Support for :core packages is important for elpa.gnu.org, but for other
+  ;; cases such as "in-place installation", it's rather secondary since
+  ;; those users can just as well use a development version of Emacs to get
+  ;; those packages.
+  ;; So make the handling of :core packages depend on whether or not the user
+  ;; has setup a clone of Emacs under the "emacs" subdirectory.
+  (let ((emacs-repo-root (expand-file-name "emacs")))
+    (if (not (file-directory-p emacs-repo-root))
+        (progn (message "No \"emacs\" subdir: will skip :core packages")
+               nil)
+      (let ((default-directory emacs-repo-root))
+        (message "Running git pull in %S" default-directory)
+        (call-process "git" nil t nil "pull")
+        t))))
+
+(defun archive--find-non-trivial-file (dir)
+  (catch 'found-important-file
+    (dolist (file (directory-files-recursively dir ".*"))
+      (unless (or (member file '("." ".."))
+                  (string-match "\\.elc\\'" file)
+                  (string-match "-autoloads.el\\'" file)
+                  (string-match "-pkg.el\\'" file)
+                  (file-symlink-p file))
+        (throw 'found-important-file file)))
+    nil))
+
+(defun archive--cleanup-packages (externals-list with-core)
   "Remove subdirectories of `packages/' that do not correspond to known 
packages.
 This is any subdirectory inside `packages/' that's not under
-version control nor listed in EXTERNALS-LIST."
+version control nor listed in EXTERNALS-LIST.
+If WITH-CORE is non-nil, it means we manage :core packages as well."
   (let ((default-directory (expand-file-name "packages/")))
     (dolist (dir (directory-files "."))
       (cond
        ((or (not (file-directory-p dir)) (file-symlink-p dir))
-        ;; We only add/remove plain directories in elpa/packages (not 
symlinks).
+        ;; We only add/remove plain directories in elpa/packages (not
+        ;; symlinks).
         nil)
        ((member dir '("." "..")) nil)
        ((assoc dir externals-list) nil)
@@ -641,10 +645,19 @@ version control nor listed in EXTERNALS-LIST."
                      (message "Deleted all of %s" dir))
             (message "Keeping leftover unclean %s:\n%s" dir status))))
        ;; Check if `dir' is under version control.
-       ((not (zerop (call-process "git" nil nil nil
-                                  "ls-files" "--error-unmatch" dir)))
-        (message "Deleted untracked package %s" dir)
-        (delete-directory dir 'recursive t))))))
+       ((and with-core
+             (not (zerop (call-process "git" nil nil nil
+                                       "ls-files" "--error-unmatch" dir))))
+        ;; Not under version control.  Check if it only contains
+        ;; symlinks and generated files, in which case it is probably
+        ;; a leftover :core package that can safely be deleted.
+        ;; (let ((file (archive--find-non-trivial-file dir)))
+        ;;   (if file
+        ;;       (message "Keeping %s for non-trivial file \"%s\"" dir file)
+        ;;     (progn
+        ;;       (message "Deleted untracked package %s" dir)
+        ;;       (delete-directory dir 'recursive t))))
+        )))))
 
 (defun archive--external-package-sync (name)
   "Sync external package named NAME."
@@ -674,9 +687,9 @@ version control nor listed in EXTERNALS-LIST."
   "Return non-nil if DEST is an empty variant."
   (member dest (list "" "." nil)))
 
-(defun archive--core-package-copy-file
+(defun archive--core-package-link-file
     (source dest emacs-repo-root package-root exclude-regexp)
-  "Copy file from SOURCE to DEST ensuring subdirectories."
+  "Link file from SOURCE to DEST ensuring subdirectories."
   (unless (string-match-p exclude-regexp source)
     (let* ((absolute-package-file-name
             (expand-file-name dest package-root))
@@ -685,14 +698,18 @@ version control nor listed in EXTERNALS-LIST."
            (directory (file-name-directory absolute-package-file-name)))
       (unless (file-directory-p directory)
         (make-directory directory t))
-      (copy-file absolute-core-file-name absolute-package-file-name))
+      (condition-case nil
+         (make-symbolic-link absolute-core-file-name
+                             absolute-package-file-name t)
+       (file-error
+        (copy-file absolute-core-file-name absolute-package-file-name))))
     (message "  %s -> %s" source (if (archive--core-package-empty-dest-p dest)
                                      (file-name-nondirectory source)
                                    dest))))
 
-(defun archive--core-package-copy-directory
+(defun archive--core-package-link-directory
     (source dest emacs-repo-root package-root exclude-regexp)
-  "Copy directory files from SOURCE to DEST ensuring subdirectories."
+  "Link directory files from SOURCE to DEST ensuring subdirectories."
   (let ((stack (list source))
         (base source)
         (absolute-source))
@@ -707,12 +724,12 @@ version control nor listed in EXTERNALS-LIST."
                (source-sans-base (substring source (length base)))
                (package-file-name
                 (if (archive--core-package-empty-dest-p dest)
-                    ;; Copy to root with it's original filename.
+                    ;; Link to root with its original filename.
                     source-sans-base
                   (concat
                    ;; Prepend the destination, allowing for directory rename.
                    (file-name-as-directory dest) source-sans-base))))
-          (archive--core-package-copy-file
+          (archive--core-package-link-file
            source package-file-name
            emacs-repo-root package-root exclude-regexp))))))
 
@@ -740,16 +757,16 @@ version control nor listed in EXTERNALS-LIST."
              ;; Files may be just a string, normalize.
              (list file-patterns)
            file-patterns))))
-    (message "Copying files for package: %s" name)
+    (message "Linking files for package: %s" name)
     (when (file-directory-p package-root)
       (delete-directory package-root t))
     (make-directory package-root t)
     (dolist (file-pattern file-patterns)
       (pcase-let* ((`(,file . ,dest) file-pattern))
         (if (file-directory-p (expand-file-name file emacs-repo-root))
-            (archive--core-package-copy-directory
+            (archive--core-package-link-directory
              file dest emacs-repo-root package-root exclude-regexp)
-          (archive--core-package-copy-file
+          (archive--core-package-link-file
            file dest emacs-repo-root package-root exclude-regexp))))))
 
 (defun archive-add/remove/update-externals ()
@@ -757,14 +774,15 @@ version control nor listed in EXTERNALS-LIST."
   (let ((externals-list
          (with-current-buffer (find-file-noselect "externals-list")
            (read (buffer-string)))))
-    (archive--cleanup-packages externals-list)
-    (archive--sync-emacs-repo)
-    (pcase-dolist ((and definition `(,name ,kind ,_url)) externals-list)
-      (pcase kind
-        (`:subtree nil)               ;Nothing to do.
-        (`:external (archive--external-package-sync name))
-        (`:core (archive--core-package-sync definition))
-        (_ (message "Unknown external package kind `%S' for %s" kind name))))))
+    (let ((with-core (archive--sync-emacs-repo)))
+      (archive--cleanup-packages externals-list with-core)
+      (pcase-dolist ((and definition `(,name ,kind ,_url)) externals-list)
+        (pcase kind
+          (`:subtree nil)               ;Nothing to do.
+          (`:external (archive--external-package-sync name))
+          (`:core (when with-core (archive--core-package-sync definition)))
+          (_ (message "Unknown external package kind `%S' for %s"
+                      kind name)))))))
 
 (provide 'archive-contents)
 ;;; archive-contents.el ends here
diff --git a/admin/ert-support.el b/admin/ert-support.el
new file mode 100644
index 0000000..93d1af8
--- /dev/null
+++ b/admin/ert-support.el
@@ -0,0 +1,54 @@
+;; The contents of this file are subject to the GPL License, Version 3.0.
+
+;; Copyright (C) 2016, Free Software Foundation, Inc.
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+(defun ert-support-package-install (top-directory package)
+  ;; blitz default value and set up from elpa.
+  (setq package-archives
+        `(("local-elpa" . ,(concat top-directory "/archive/packages"))))
+  (setq package-user-dir
+        (make-temp-file "elpa-test" t))
+  (package-initialize)
+  (package-refresh-contents)
+  (package-install package))
+
+(defun ert-support-test-find-tests (package-directory package)
+  (or
+   (directory-files package-directory nil ".*-test.el$")
+   (directory-files package-directory nil ".*-tests.el$")
+   (let ((dir-test
+          (concat package-directory "/test")))
+     (when (file-exists-p dir-test)
+       (directory-files dir-test)))
+   (let ((dir-tests
+          (concat package-directory "/tests")))
+     (when (file-exists-p dir-tests)
+       (directory-files dir-tests)))))
+
+(defun ert-support-load-tests (package-directory package)
+  (mapc
+   (lambda(file)
+     (message "Loading test file... %s" (concat package-directory file))
+     (load-file (concat package-directory file)))
+   (ert-support-test-find-tests package-directory package)))
+
+(defun ert-support-test-package (top-directory package)
+  (ert-support-package-install top-directory package)
+  (ert-support-load-tests
+   (concat top-directory "/packages/" (symbol-name package) "/")
+   package)
+
+  (ert-run-tests-batch-and-exit t))
diff --git a/externals-list b/externals-list
index ea0a69c..acf8dbb 100644
--- a/externals-list
+++ b/externals-list
@@ -21,7 +21,7 @@
 ;; All file-names must be relative to the Emacs repository root and the package
 ;; directory.  When a file-name points to a directory all its files are copied
 ;; recursively into the package root or specified destination.  A special
-;; :excludes key can be provided to especify files to exclude when copying
+;; :excludes key can be provided to specify files to exclude when copying
 ;; directories, wildcards are supported, "*.elc" and "*~" are always excluded.
 ;; Exclude matches must be against the full file-name, substring matches don't
 ;; work unless wildcards are used (e.g. use "etc/*" instead of "etc/").
@@ -53,18 +53,24 @@
  ("exwm"               :external "https://github.com/ch11ng/exwm.git";)
  ("f90-interface-browser" :subtree "https://github.com/wence-/f90-iface";)
  ("ggtags"             :subtree "https://github.com/leoliu/ggtags";)
+ ("gnome-c-style"      :subtree "https://github.com/ueno/gnome-c-style.git";)
  ("gnorb"               :subtree "https://github.com/girzel/gnorb";)
  ("ioccur"             :subtree 
"https://github.com/thierryvolpiatto/ioccur.git";)
  ("js2-mode"           :subtree "https://github.com/mooz/js2-mode.git";)
+ ("let-alist" :core "lisp/emacs-lisp/let-alist.el")
  ("math-symbol-lists"  :subtree 
"https://github.com/vspinu/math-symbol-lists.git";)
  ("nameless" :subtree "https://github.com/Malabarba/Nameless";)
- ("names" :subtree "http://github.com/Bruce-Connor/names";)
+ ("names" :subtree "http://github.com/Malabarba/names";)
  ("omn-mode"            :external nil)
+ ("ntlm"               :core "lisp/net/ntlm.el")
+ ("on-screen"           :subtree 
"https://github.com/michael-heerdegen/on-screen.el.git";)
  ("pabbrev"             :external "https://github.com/phillord/pabbrev.git";)
  ("pinentry"           :subtree "https://github.com/ueno/pinentry-el.git";)
+ ("python"             :core "lisp/progmodes/python.el")
  ;;FIXME:("org"                :external ??) ;; Need to introduce snapshots!!
  ("rich-minority" :subtree "https://github.com/Malabarba/rich-minority";)
  ("rudel"              :external nil) ;; Was 
bzr::bzr://rudel.bzr.sourceforge.net/bzrroot/rudel/trunk
+ ("soap-client"                :core ("lisp/net/soap-client.el" 
"lisp/net/soap-inspect.el"))
  ("sotlisp" :subtree "https://github.com/Malabarba/speed-of-thought-lisp";)
  ("spinner" :subtree "https://github.com/Malabarba/spinner.el";)
  ("temp-buffer-browse"  :subtree 
"https://github.com/leoliu/temp-buffer-browse";)
diff --git a/packages/ada-mode/NEWS b/packages/ada-mode/NEWS
old mode 100755
new mode 100644
index 1765b96..960584e
--- a/packages/ada-mode/NEWS
+++ b/packages/ada-mode/NEWS
@@ -7,6 +7,55 @@ Please send Emacs Ada mode bug reports to address@hidden, with
 'ada-mode' in the subject. If possible, use M-x report-emacs-bug.
 
 
+* Ada mode 5.1.9
+20 Jan 2016
+
+** New option ada-indent-comment-gnat matches the GNAT style check for
+   comments in all cases (previously, there were some cases where the
+   comment indent algorithm did not match the GNAT check).
+
+** New menu command "Show source file search path"; displays
+   compilation-search-path in a buffer.
+
+** Adding missing grammar statements to allow removing parens around
+   conditional and quantified expressions.
+
+** Key binding for ada-case-create-partial-exception in ada-mode
+   changed to C-c C-M-y; this is easier to type, and matches the key
+   binding in gpr-mode.
+
+** ada-case-keyword changed to accept the symbols 'lower-case,
+   'upper-case instead of the functions downcase-word, upcase-word.
+
+** ada-case-identifier changed to accept the symbols 'mixed-case,
+   'lower-case, 'upper-case instead of the functions 'ada-mixed-case,
+   'ada-lower-case, 'ada-upper-case.
+
+** ada-fix-add-context-clause now sorts "limited with" and "private
+   with" clauses after other clauses.
+
+** ada-align now aligns '=>' in case expressions.
+
+** ada-align-paramlist now handles access function parameters:
+
+   procedure Choose
+     (X, Y, Z    :        Integer;
+      Preference : access function (A, B : Integer) return Boolean);
+
+** ada-next-statement-keyword now moves to matching close paren if on
+   open paren, ada-prev-statement-keyword moves from close paren to
+   open paren.
+
+** New hook ada-prj-parse-hook, run from ada-parse-prj-file.
+
+** GPR mode now does case adjust similar to Ada mode.
+
+** gpr parser handles nested case statements without blowing up.
+
+** gpr parser handles package renames
+
+** fix other bugs
+
 * Ada mode 5.1.8
 10 Apr 2015
 
diff --git a/packages/ada-mode/README b/packages/ada-mode/README
index fdc20c0..df7a48c 100644
--- a/packages/ada-mode/README
+++ b/packages/ada-mode/README
@@ -1,4 +1,4 @@
-Emacs Ada mode version 5.1.8
+Emacs Ada mode version 5.1.9
 
 Ada mode requires Emacs 24.2 or greater
 
@@ -22,7 +22,7 @@ Unzip to a convenient place (we will use ~/ada-mode in the 
following).
 
 In a shell:
 $ cd ~/ada-mode/build/wisi
-$ byte-compile
+$ make byte-compile
 
 Edit your ~/.emacs, add:
 
diff --git a/packages/ada-mode/ada-build.el b/packages/ada-mode/ada-build.el
index c54cae2..0553454 100644
--- a/packages/ada-mode/ada-build.el
+++ b/packages/ada-mode/ada-build.el
@@ -1,4 +1,4 @@
-;;; ada-build.el --- Extensions to ada-mode for compiling and running  -*- 
lexical-binding:t -*-
+;; ada-build.el --- Extensions to ada-mode for compiling and running  -*- 
lexical-binding:t -*-
 ;; Ada projects without 'make' or similar tool
 ;;
 ;; Copyright (C) 1994, 1995, 1997 - 2015  Free Software Foundation, Inc.
@@ -34,9 +34,7 @@
 ;; compiling and running capabilities in Ada mode 4.01, done in 2013 by
 ;; Stephen Leake <address@hidden>.
 
-(when (and (= emacs-major-version 24)
-          (= emacs-minor-version 2))
-  (require 'ada-mode-compat-24.2))
+(require 'ada-mode-compat-24.2)
 
 (require 'ada-mode)
 
@@ -72,6 +70,9 @@ Overridden by project variable 'check_cmd'."
 Overridden by project variable 'make_cmd'."
   :type 'string)
 
+;; FIXME: make this more intelligent to work on Windows cmd shell?
+;; either detect Windows and drop "./", or expand to full path at
+;; runtime.
 (defcustom ada-build-run-cmd "./${main}"
   "Default command to run the application, in a spawned shell.
 Overridden by project variable 'run_cmd'."
@@ -90,8 +91,8 @@ a list, the prefix is prepended to each list element. For
 example, if src_dir contains 'dir_1 dir_2', '-I${src_dir}'
 expands to '-Idir_1 -Idir_2'.
 
-As a special case, ${full_current} is replaced by the name
-including the directory and extension."
+As a special case, ${full_current} is replaced by the current
+buffer file name including the directory and extension."
 
   (while (string-match "\\(-[^-$ ]+\\)?\\${\\([^}]+\\)}" cmd-string)
     (let ((prefix (match-string 1 cmd-string))
diff --git a/packages/ada-mode/ada-fix-error.el 
b/packages/ada-mode/ada-fix-error.el
index 8008104..6ec0fd7 100644
--- a/packages/ada-mode/ada-fix-error.el
+++ b/packages/ada-mode/ada-fix-error.el
@@ -63,6 +63,57 @@ compilation unit.")
     (ada-case-adjust-identifier)
     (delete-char 1)))
 
+(defun ada-fix-sort-context-pred (a b)
+  "Predicate for `sort-subr'; sorts \"limited with\", \"private with\" last.
+Returns non-nil if a should preceed b in buffer."
+  ;; a, b are buffer ranges in the current buffer
+  (cl-flet
+      ((starts-with
+       (pat reg)
+       (string= pat (buffer-substring-no-properties (car reg)
+                                                    (min (point-max)
+                                                         (+(car reg) (length 
pat)))))))
+    (cond
+     ((and
+       (starts-with "limited with" a)
+       (starts-with "private with" b))
+      t)
+
+     ((and
+       (starts-with "limited with" a)
+       (not (starts-with "limited with" b)))
+      nil)
+
+     ((and
+       (not (starts-with "limited with" a))
+       (starts-with "limited with" b))
+      t)
+
+     ((and
+       (starts-with "private with" a)
+       (not (starts-with "private with" b)))
+      nil)
+
+     ((and
+       (not (starts-with "private with" a))
+       (starts-with "private with" b))
+      t)
+
+     (t
+      (> 0 (compare-buffer-substrings
+           nil (car a) (cdr a)
+           nil (car b) (cdr b))) )
+     )))
+
+(defun ada-fix-sort-context-clause (beg end)
+  "Sort context clauses in range BEG END."
+  (save-excursion
+    (save-restriction
+      (narrow-to-region beg end)
+      (goto-char (point-min))
+      (sort-subr nil 'forward-line 'end-of-line nil nil 
'ada-fix-sort-context-pred)
+      )))
+
 (defun ada-fix-add-with-clause (package-name)
   "Add a with_clause for PACKAGE_NAME.
 If ada-fix-sort-context-clause, sort the context clauses using
@@ -78,8 +129,7 @@ sort-lines."
 
     (when (and (< (car context-clause) (cdr context-clause))
               ada-fix-sort-context-clause)
-      ;; FIXME (later): this puts "limited with", "private with" at top of 
list; prefer at bottom
-      (sort-lines nil (car context-clause) (point)))
+      (ada-fix-sort-context-clause (car context-clause) (point)))
     ))
 
 (defun ada-fix-extend-with-clause (child-name)
@@ -157,7 +207,7 @@ point and return nil.")
       (when (not (ada-get-compilation-message))
        (beep)
        (message "FIXME: ada-fix-compiler-error")
-       ;; not clear why this can happens, but it does
+       ;; not clear why this can happen, but it has
        (compilation-next-error 1))
       (let ((comp-buf-pt (point))
            (success
diff --git a/packages/ada-mode/ada-gnat-compile.el 
b/packages/ada-mode/ada-gnat-compile.el
index a09c482..ee4b12a 100644
--- a/packages/ada-mode/ada-gnat-compile.el
+++ b/packages/ada-mode/ada-gnat-compile.el
@@ -347,24 +347,23 @@ Prompt user if more than one."
               t)))
 
          ((looking-at (concat "expected \\(private \\)?type " 
ada-gnat-quoted-name-regexp))
-          (progn
-            (forward-line 1)
-            (move-to-column message-column)
-            (cond
-             ((looking-at "found type access")
-              (pop-to-buffer source-buffer)
-              (if (looking-at "'Access")
-                  (kill-word 1)
-                (forward-word 1)
-                (insert ".all"))
-              t)
-            ((looking-at "found type .*_Access_Type")
-              ;; assume just need '.all'
-              (pop-to-buffer source-buffer)
+          (forward-line 1)
+          (move-to-column message-column)
+          (cond
+           ((looking-at "found type access")
+            (pop-to-buffer source-buffer)
+            (if (looking-at "'Access")
+                (kill-word 1)
               (forward-word 1)
-              (insert ".all")
-              t)
-            )))
+              (insert ".all"))
+            t)
+           ((looking-at "found type .*_Access_Type")
+            ;; assume just need '.all'
+            (pop-to-buffer source-buffer)
+            (forward-word 1)
+            (insert ".all")
+            t)
+           ))
 
          ((looking-at "extra \".\" ignored")
           (set-buffer source-buffer)
@@ -381,7 +380,9 @@ Prompt user if more than one."
           ;; also 'possible missing "with Ada.Text_IO; use Ada.Text_IO"' - 
ignoring the 'use'
           (let ((package-name (match-string-no-properties 1)))
             (pop-to-buffer source-buffer)
-            ;; FIXME (later): should check if prefix is already with'd, extend 
it
+            ;; Could check if prefix is already with'd, extend
+            ;; it. But no one has reported that case yet; this
+            ;; message only occurs for predefined Ada packages.
             (ada-fix-add-with-clause package-name))
           t)
 
@@ -579,7 +580,7 @@ Prompt user if more than one."
 
 (defun ada-gnat-compile-select-prj ()
   (setq ada-fix-error-hook 'ada-gnat-fix-error-hook)
-  (setq ada-prj-show-path 'gnat-prj-show-path)
+  (setq ada-prj-show-prj-path 'gnat-prj-show-prj-path)
   (add-to-list 'completion-ignored-extensions ".ali") ;; gnat library files
   (add-hook 'ada-syntax-propertize-hook 'ada-gnat-syntax-propertize)
   (add-hook 'ada-syntax-propertize-hook 'gnatprep-syntax-propertize)
diff --git a/packages/ada-mode/ada-gnat-xref.el 
b/packages/ada-mode/ada-gnat-xref.el
index 05961a0..53553b3 100644
--- a/packages/ada-mode/ada-gnat-xref.el
+++ b/packages/ada-mode/ada-gnat-xref.el
@@ -1,4 +1,4 @@
-;;; ada-gnat-xref.el --- Ada mode cross-reference functionality provided by 
the 'gnat xref' tool  -*- lexical-binding:t -*-
+;;; ada-gnat-xref.el --- Ada mode cross-reference functionality provided by 
'gnat xref'  -*- lexical-binding:t -*-
 ;;
 ;; These tools are all Ada-specific; see gpr-query for multi-language
 ;; GNAT cross-reference tools.
@@ -119,15 +119,14 @@
            ;; error in *.gpr; ignore here.
            (forward-line 1)
          ;; else process line
-         (progn
-           (skip-syntax-forward "^ ")
-           (skip-syntax-forward " ")
-           (if (looking-at (concat "derived from .* (" 
ada-gnat-file-line-col-regexp ")"))
-               ;; found other item
-               (setq result (list (match-string 1)
-                                  (string-to-number (match-string 2))
-                                  (1- (string-to-number (match-string 3)))))
-             (forward-line 1)))
+         (skip-syntax-forward "^ ")
+         (skip-syntax-forward " ")
+         (if (looking-at (concat "derived from .* (" 
ada-gnat-file-line-col-regexp ")"))
+             ;; found other item
+             (setq result (list (match-string 1)
+                                (string-to-number (match-string 2))
+                                (1- (string-to-number (match-string 3)))))
+           (forward-line 1))
          )
        (when (eobp)
          (error "gnat find did not return parent types"))
@@ -159,7 +158,7 @@
 
        (compilation-start cmd
                           'compilation-mode
-                          (lambda (mode) (concat mode "-gnatfind")))
+                          (lambda (name) (concat name "-gnatfind")))
     ))))
 
 ;;;;; setup
diff --git a/packages/ada-mode/ada-grammar-wy.el 
b/packages/ada-mode/ada-grammar-wy.el
index 3266513..10cd525 100644
--- a/packages/ada-mode/ada-grammar-wy.el
+++ b/packages/ada-mode/ada-grammar-wy.el
@@ -1,6 +1,6 @@
 ;;; ada-grammar-wy.el --- Generated parser support file  -*- lexical-binding:t 
-*-
 
-;; Copyright (C) 2013, 2015  Free Software Foundation, Inc.
+;; Copyright (C) 2013 - 2015 Free Software Foundation, Inc.
 
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
@@ -202,6 +202,10 @@
        ((LEFT_PAREN association_list RIGHT_PAREN )
         (progn
         (wisi-statement-action [1 open-paren 3 close-paren])
+        (wisi-containing-action 1 2)))
+       ((LEFT_PAREN conditional_quantified_expression RIGHT_PAREN )
+        (progn
+        (wisi-statement-action [1 open-paren 3 close-paren])
         (wisi-containing-action 1 2))))
       (actual_parameter_part_opt
        (())
@@ -217,11 +221,7 @@
         (wisi-containing-action 1 2)
         (wisi-containing-action 1 3)
         (wisi-containing-action 3 4)))
-       ((LEFT_PAREN case_expression RIGHT_PAREN )
-        (progn
-        (wisi-statement-action [1 open-paren 3 close-paren])
-        (wisi-containing-action 1 2)))
-       ((LEFT_PAREN if_expression RIGHT_PAREN )
+       ((LEFT_PAREN conditional_quantified_expression RIGHT_PAREN )
         (progn
         (wisi-statement-action [1 open-paren 3 close-paren])
         (wisi-containing-action 1 2)))
@@ -340,6 +340,7 @@
        ((WHEN discrete_choice_list EQUAL_GREATER expression )
         (progn
         (wisi-statement-action [1 block-middle 3 statement-other])
+        (wisi-containing-action 1 3)
         (wisi-containing-action 3 4))))
       (case_expression_alternative_list
        ((case_expression_alternative ))
@@ -359,6 +360,7 @@
         (progn
         (wisi-statement-action [1 block-middle 3 statement-other])
         (wisi-containing-action 1 2)
+        (wisi-containing-action 1 3)
         (wisi-containing-action 3 4))))
       (case_statement_alternative_list
        ((case_statement_alternative ))
@@ -449,6 +451,10 @@
         (wisi-statement-action [1 block-start 3 block-middle 5 block-end 7 
statement-end])
         (wisi-containing-action 1 2)
         (wisi-containing-action 3 4))))
+      (conditional_quantified_expression
+       ((if_expression ))
+       ((case_expression ))
+       ((quantified_expression )))
       (constant_opt
        (())
        ((CONSTANT )))
@@ -617,7 +623,8 @@
        ((FOR name USE aggregate SEMICOLON )
         (progn
         (wisi-statement-action [1 statement-start 3 statement-other 5 
statement-end])
-        (wisi-containing-action 3 4))))
+        (wisi-containing-action 3 4)
+        (wisi-face-action [2 font-lock-type-face]))))
       (enumeration_type_definition
        ((LEFT_PAREN enumeration_literal_list RIGHT_PAREN )
         (progn
@@ -637,11 +644,13 @@
         (progn
         (wisi-statement-action [1 block-middle 5 statement-other])
         (wisi-containing-action 1 4)
+        (wisi-containing-action 1 5)
         (wisi-containing-action 5 6)))
        ((WHEN exception_choice_list EQUAL_GREATER sequence_of_statements_opt )
         (progn
         (wisi-statement-action [1 block-middle 3 statement-other])
         (wisi-containing-action 1 2)
+        (wisi-containing-action 1 3)
         (wisi-containing-action 3 4))))
       (exception_handler_list
        ((exception_handler ))
@@ -669,11 +678,14 @@
       (expression_function_declaration
        ((overriding_indicator_opt function_specification IS paren_expression 
aspect_specification_opt SEMICOLON )
         (progn
-        (wisi-statement-action [1 statement-start 2 statement-other 6 
statement-end])
-        (wisi-containing-action 2 4)
+        (wisi-statement-action [1 statement-start 2 block-middle 3 
statement-other 6 statement-end])
+        (wisi-containing-action 3 4)
         (wisi-containing-action 2 5))))
       (extended_return_object_declaration
-       ((IDENTIFIER COLON aliased_opt constant_opt return_subtype_indication 
COLON_EQUAL expression ))
+       ((IDENTIFIER COLON aliased_opt constant_opt return_subtype_indication 
COLON_EQUAL expression )
+        (progn
+        (wisi-statement-action [1 statement-start 6 statement-other])
+        (wisi-containing-action 6 7)))
        ((IDENTIFIER COLON aliased_opt constant_opt return_subtype_indication 
)))
       (extended_return_object_declaration_opt
        (())
@@ -1071,8 +1083,7 @@
         (wisi-statement-action [1 name-paren 2 open-paren 4 close-paren])
         (wisi-containing-action 1 2)
         (wisi-containing-action 2 3)))
-       ((selected_component )
-        (wisi-extend-action 1))
+       ((selected_component ))
        ((attribute_reference ))
        ((name actual_parameter_part )
         (progn
@@ -1169,6 +1180,7 @@
         (wisi-containing-action 3 4)
         (wisi-containing-action 5 6)
         (wisi-containing-action 7 8)
+        (wisi-containing-action 9 10)
         (wisi-motion-action [1 5 7 [8 block-middle EXCEPTION block-middle 
WHEN] 9])
         (wisi-face-action [3 font-lock-function-name-face 10 
font-lock-function-name-face])))
        ((PACKAGE BODY name aspect_specification_opt IS declarative_part_opt 
END name_opt SEMICOLON )
@@ -1177,6 +1189,7 @@
         (wisi-containing-action 1 3)
         (wisi-containing-action 3 4)
         (wisi-containing-action 5 6)
+        (wisi-containing-action 7 8)
         (wisi-motion-action [1 5 7])
         (wisi-face-action [3 font-lock-function-name-face 8 
font-lock-function-name-face]))))
       (package_body_stub
@@ -1206,7 +1219,7 @@
         (wisi-containing-action 6 7)
         (wisi-motion-action [1 4 6 8])
         (wisi-face-action [2 font-lock-function-name-face 9 
font-lock-function-name-face])))
-       ((PACKAGE name aspect_specification_opt IS declarative_part_opt END 
name )
+       ((PACKAGE name aspect_specification_opt IS declarative_part_opt END 
name_opt )
         (progn
         (wisi-statement-action [1 statement-start 2 name 4 block-start 6 
block-end])
         (wisi-containing-action 1 2)
@@ -1253,11 +1266,7 @@
         (progn
         (wisi-statement-action [1 open-paren 3 close-paren])
         (wisi-containing-action 1 2)))
-       ((LEFT_PAREN case_expression RIGHT_PAREN )
-        (progn
-        (wisi-statement-action [1 open-paren 3 close-paren])
-        (wisi-containing-action 1 2)))
-       ((LEFT_PAREN if_expression RIGHT_PAREN )
+       ((LEFT_PAREN conditional_quantified_expression RIGHT_PAREN )
         (progn
         (wisi-statement-action [1 open-paren 3 close-paren])
         (wisi-containing-action 1 2))))
@@ -1274,6 +1283,7 @@
       (pragma_argument_association
        ((IDENTIFIER EQUAL_GREATER expression ))
        ((expression ))
+       ((conditional_quantified_expression ))
        ((IDENTIFIER TICK IDENTIFIER EQUAL_GREATER expression )))
       (pragma_argument_association_list
        ((pragma_argument_association ))
@@ -1285,33 +1295,22 @@
        ((aggregate ))
        ((name ))
        ((NEW name )
-        (wisi-face-action [2 font-lock-type-face] t))
-       ((LEFT_PAREN if_expression RIGHT_PAREN )
-        (progn
-        (wisi-statement-action [1 open-paren 3 close-paren])
-        (wisi-containing-action 1 2)))
-       ((LEFT_PAREN case_expression RIGHT_PAREN )
-        (progn
-        (wisi-statement-action [1 open-paren 3 close-paren])
-        (wisi-containing-action 1 2)))
-       ((LEFT_PAREN quantified_expression RIGHT_PAREN )
-        (progn
-        (wisi-statement-action [1 open-paren 3 close-paren])
-        (wisi-containing-action 1 2))))
+        (wisi-face-action [2 font-lock-type-face] t)))
       (private_extension_declaration
        ((TYPE IDENTIFIER discriminant_part_opt IS 
abstract_limited_synchronized_opt NEW subtype_indication and_interface_list_opt 
WITH PRIVATE aspect_specification_opt SEMICOLON )
         (progn
-        (wisi-statement-action [1 statement-start 2 name 6 statement-other 12 
statement-end])
+        (wisi-statement-action [1 statement-start 2 name 4 statement-other 6 
statement-other 12 statement-end])
         (wisi-containing-action 1 3)
         (wisi-containing-action 6 7)
         (wisi-containing-action 6 8)
-        (wisi-containing-action 2 11)
+        (wisi-containing-action 4 11)
         (wisi-face-action [2 font-lock-type-face]))))
       (private_type_declaration
        ((TYPE IDENTIFIER discriminant_part_opt IS abstract_tagged_limited_opt 
PRIVATE aspect_specification_opt SEMICOLON )
         (progn
-        (wisi-statement-action [1 statement-start 2 name 8 statement-end])
-        (wisi-containing-action 1 7)
+        (wisi-statement-action [1 statement-start 2 name 4 statement-other 8 
statement-end])
+        (wisi-containing-action 1 3)
+        (wisi-containing-action 4 7)
         (wisi-face-action [2 font-lock-type-face]))))
       (procedure_call_statement
        ((name SEMICOLON )
@@ -1373,15 +1372,15 @@
       (protected_type_declaration
        ((PROTECTED TYPE IDENTIFIER discriminant_part_opt 
aspect_specification_opt IS NEW interface_list WITH protected_definition 
SEMICOLON )
         (progn
-        (wisi-statement-action [1 statement-start 3 name 6 block-start 9 
statement-other 11 statement-end])
-        (wisi-containing-action 1 3)
+        (wisi-statement-action [1 statement-start 3 name 6 block-middle 9 
block-middle 11 statement-end])
+        (wisi-containing-action 1 4)
         (wisi-containing-action 3 5)
         (wisi-containing-action 6 10)
         (wisi-face-action [3 font-lock-type-face])))
        ((PROTECTED TYPE IDENTIFIER discriminant_part_opt 
aspect_specification_opt IS protected_definition SEMICOLON )
         (progn
-        (wisi-statement-action [1 statement-start 3 name 6 block-start 8 
statement-end])
-        (wisi-containing-action 1 3)
+        (wisi-statement-action [1 statement-start 3 name 6 block-middle 8 
statement-end])
+        (wisi-containing-action 1 4)
         (wisi-containing-action 3 5)
         (wisi-containing-action 6 7)
         (wisi-face-action [3 font-lock-type-face]))))
@@ -1437,7 +1436,8 @@
        ((FOR name USE record_rep SEMICOLON )
         (progn
         (wisi-statement-action [1 statement-start 3 statement-other 5 
statement-end])
-        (wisi-containing-action 3 4))))
+        (wisi-containing-action 3 4)
+        (wisi-face-action [2 font-lock-type-face]))))
       (record_rep
        ((RECORD mod_clause_opt component_clause_list END RECORD )
         (progn
@@ -1491,7 +1491,8 @@
        ((subtype_indication ))
        ((access_definition )))
       (selected_component
-       ((name DOT IDENTIFIER ))
+       ((name DOT IDENTIFIER )
+        (wisi-extend-action 1 3))
        ((name DOT CHARACTER_LITERAL ))
        ((name DOT STRING_LITERAL ))
        ((name DOT ALL )))
@@ -1512,6 +1513,7 @@
         (progn
         (wisi-statement-action [1 block-start 3 statement-other])
         (wisi-containing-action 1 2)
+        (wisi-containing-action 1 3)
         (wisi-containing-action 3 4)
         (wisi-containing-action 3 5)))
        ((accept_statement sequence_of_statements_opt ))
@@ -1519,12 +1521,14 @@
         (progn
         (wisi-statement-action [1 block-start 3 statement-other])
         (wisi-containing-action 1 2)
+        (wisi-containing-action 1 3)
         (wisi-containing-action 3 4)))
        ((delay_alternative ))
        ((WHEN expression EQUAL_GREATER TERMINATE SEMICOLON )
         (progn
         (wisi-statement-action [1 block-start 3 statement-other 4 
statement-start 5 statement-end])
-        (wisi-containing-action 1 2)))
+        (wisi-containing-action 1 2)
+        (wisi-containing-action 1 3)))
        ((TERMINATE SEMICOLON )
         (wisi-statement-action [1 statement-start 2 statement-end])))
       (select_alternative_list
@@ -1575,14 +1579,15 @@
       (single_protected_declaration
        ((PROTECTED IDENTIFIER aspect_specification_opt IS NEW interface_list 
WITH protected_definition SEMICOLON )
         (progn
-        (wisi-statement-action [1 block-start 2 name 7 block-middle 9 
statement-end])
+        (wisi-statement-action [1 statement-start 2 name 4 block-middle 7 
block-middle 9 statement-end])
         (wisi-containing-action 1 2)
         (wisi-containing-action 2 3)
+        (wisi-containing-action 4 6)
         (wisi-containing-action 7 8)
         (wisi-face-action [2 font-lock-type-face])))
        ((PROTECTED IDENTIFIER aspect_specification_opt IS protected_definition 
SEMICOLON )
         (progn
-        (wisi-statement-action [1 block-start 2 name 4 block-middle 6 
statement-end])
+        (wisi-statement-action [1 statement-start 2 name 4 block-middle 6 
statement-end])
         (wisi-containing-action 1 2)
         (wisi-containing-action 2 3)
         (wisi-containing-action 4 5)
@@ -1590,14 +1595,15 @@
       (single_task_declaration
        ((TASK IDENTIFIER aspect_specification_opt IS NEW interface_list WITH 
task_definition SEMICOLON )
         (progn
-        (wisi-statement-action [1 block-start 2 name 7 block-middle 9 
statement-end])
+        (wisi-statement-action [1 statement-start 2 name 4 block-middle 7 
block-middle 9 statement-end])
         (wisi-containing-action 1 2)
         (wisi-containing-action 2 3)
+        (wisi-containing-action 4 6)
         (wisi-containing-action 7 8)
         (wisi-face-action [2 font-lock-type-face])))
        ((TASK IDENTIFIER aspect_specification_opt IS task_definition SEMICOLON 
)
         (progn
-        (wisi-statement-action [1 block-start 2 name 4 block-middle 6 
statement-end])
+        (wisi-statement-action [1 statement-start 2 name 4 block-middle 6 
statement-end])
         (wisi-containing-action 1 2)
         (wisi-containing-action 2 3)
         (wisi-containing-action 4 5)
@@ -1702,19 +1708,22 @@
       (task_type_declaration
        ((TASK TYPE IDENTIFIER discriminant_part_opt aspect_specification_opt 
IS NEW interface_list WITH task_definition SEMICOLON )
         (progn
-        (wisi-statement-action [1 statement-start 3 name 10 statement-other 11 
statement-end])
+        (wisi-statement-action [1 statement-start 3 name 6 block-middle 9 
block-middle 11 statement-end])
+        (wisi-containing-action 1 4)
         (wisi-containing-action 3 5)
-        (wisi-containing-action 9 10)
-        (wisi-face-action [2 font-lock-type-face])))
+        (wisi-containing-action 6 10)
+        (wisi-face-action [3 font-lock-type-face])))
        ((TASK TYPE IDENTIFIER discriminant_part_opt aspect_specification_opt 
IS task_definition SEMICOLON )
         (progn
-        (wisi-statement-action [1 statement-start 3 name 6 block-start 8 
statement-end])
+        (wisi-statement-action [1 statement-start 3 name 6 block-middle 8 
statement-end])
+        (wisi-containing-action 1 4)
         (wisi-containing-action 3 5)
         (wisi-containing-action 6 7)
         (wisi-face-action [3 font-lock-type-face])))
        ((TASK TYPE IDENTIFIER discriminant_part_opt aspect_specification_opt 
SEMICOLON )
         (progn
         (wisi-statement-action [1 statement-start 3 name 6 statement-end])
+        (wisi-containing-action 1 4)
         (wisi-containing-action 3 5)
         (wisi-face-action [3 font-lock-type-face]))))
       (term
@@ -1763,6 +1772,7 @@
         (progn
         (wisi-statement-action [1 block-middle 3 statement-other])
         (wisi-containing-action 1 2)
+        (wisi-containing-action 1 3)
         (wisi-containing-action 3 4))))
       (unary_adding_operator
        ((PLUS ))
@@ -1852,14 +1862,14 @@
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
       ((default . error) ($EOI . accept) (CHARACTER_LITERAL . accept) 
(STRING_LITERAL . accept) (IDENTIFIER . accept) (NUMERIC_LITERAL . accept) 
(TICK . accept) (STAR_STAR . accept) (STAR . accept) (SLASH_EQUAL . accept) 
(SLASH . accept) (SEMICOLON . accept) (PLUS . accept) (MINUS . accept) 
(LESS_LESS . accept) (LESS_EQUAL . accept) (LESS . accept) (GREATER_GREATER . 
accept) (GREATER_EQUAL . accept) (GREATER . accept) (EQUAL_GREATER . accept) 
(EQUAL . accept) (DOT_DOT . accept) (DOT . ac [...]
       ((default . error) (WITH . (compilation_unit_list . 1)) (USE . 
(compilation_unit_list . 1)) (SEPARATE . (compilation_unit_list . 1)) 
(PROCEDURE . (compilation_unit_list . 1)) (PRIVATE . (compilation_unit_list . 
1)) (PRAGMA . (compilation_unit_list . 1)) (PACKAGE . (compilation_unit_list . 
1)) (OVERRIDING . (compilation_unit_list . 1)) (NOT . (compilation_unit_list . 
1)) (LIMITED . (compilation_unit_list . 1)) (GENERIC . (compilation_unit_list . 
1)) (FUNCTION . (compilation_unit_lis [...]
-      ((default . error) (USE . (name . 0)) (DO . (name . 0)) (ELSIF . (name . 
0)) (RENAMES . (name . 0)) (ELSE . (name . 0)) (ACCEPT . (name . 0)) (ABORT . 
(name . 0)) (BEGIN . (name . 0)) (CASE . (name . 0)) (DECLARE . (name . 0)) 
(DELAY . (name . 0)) (EXIT . (name . 0)) (FOR . (name . 0)) (GOTO . (name . 0)) 
(IF . (name . 0)) (LOOP . (name . 0)) (NULL . (name . 0)) (PRAGMA . (name . 0)) 
(RAISE . (name . 0)) (REQUEUE . (name . 0)) (RETURN . (name . 0)) (SELECT . 
(name . 0)) (WHILE . (n [...]
-      ((default . error) (USE . (name . 7)) (DO . (name . 7)) (ELSIF . (name . 
7)) (RENAMES . (name . 7)) (ELSE . (name . 7)) (ACCEPT . (name . 7)) (ABORT . 
(name . 7)) (BEGIN . (name . 7)) (CASE . (name . 7)) (DECLARE . (name . 7)) 
(DELAY . (name . 7)) (EXIT . (name . 7)) (FOR . (name . 7)) (GOTO . (name . 7)) 
(IF . (name . 7)) (LOOP . (name . 7)) (NULL . (name . 7)) (PRAGMA . (name . 7)) 
(RAISE . (name . 7)) (REQUEUE . (name . 7)) (RETURN . (name . 7)) (SELECT . 
(name . 7)) (WHILE . (n [...]
-      ((default . error) (DO . (name . 1)) (USE . (name . 1)) (ELSIF . (name . 
1)) (COMMA . (name . 1)) (RENAMES . (name . 1)) (ELSE . (name . 1)) (ACCEPT . 
(name . 1)) (ABORT . (name . 1)) (BEGIN . (name . 1)) (CASE . (name . 1)) 
(DECLARE . (name . 1)) (DELAY . (name . 1)) (EXIT . (name . 1)) (FOR . (name . 
1)) (GOTO . (name . 1)) (IF . (name . 1)) (LOOP . (name . 1)) (NULL . (name . 
1)) (PRAGMA . (name . 1)) (RAISE . (name . 1)) (REQUEUE . (name . 1)) (RETURN . 
(name . 1)) (SELECT . (n [...]
-      ((default . error) (USE . (name . 4)) (DO . (name . 4)) (ELSIF . (name . 
4)) (RENAMES . (name . 4)) (ELSE . (name . 4)) (ACCEPT . (name . 4)) (ABORT . 
(name . 4)) (BEGIN . (name . 4)) (CASE . (name . 4)) (DECLARE . (name . 4)) 
(DELAY . (name . 4)) (EXIT . (name . 4)) (FOR . (name . 4)) (GOTO . (name . 4)) 
(IF . (name . 4)) (LOOP . (name . 4)) (NULL . (name . 4)) (PRAGMA . (name . 4)) 
(RAISE . (name . 4)) (REQUEUE . (name . 4)) (RETURN . (name . 4)) (SELECT . 
(name . 4)) (WHILE . (n [...]
+      ((default . error) (USE . (name . 0)) (DO . (name . 0)) (ELSIF . (name . 
0)) (RENAMES . (name . 0)) (OF . (name . 0)) (ELSE . (name . 0)) (ACCEPT . 
(name . 0)) (ABORT . (name . 0)) (BEGIN . (name . 0)) (CASE . (name . 0)) 
(DECLARE . (name . 0)) (DELAY . (name . 0)) (EXIT . (name . 0)) (FOR . (name . 
0)) (GOTO . (name . 0)) (IF . (name . 0)) (LOOP . (name . 0)) (NULL . (name . 
0)) (PRAGMA . (name . 0)) (RAISE . (name . 0)) (REQUEUE . (name . 0)) (RETURN . 
(name . 0)) (SELECT . (name [...]
+      ((default . error) (USE . (name . 7)) (DO . (name . 7)) (ELSIF . (name . 
7)) (RENAMES . (name . 7)) (OF . (name . 7)) (ELSE . (name . 7)) (ACCEPT . 
(name . 7)) (ABORT . (name . 7)) (BEGIN . (name . 7)) (CASE . (name . 7)) 
(DECLARE . (name . 7)) (DELAY . (name . 7)) (EXIT . (name . 7)) (FOR . (name . 
7)) (GOTO . (name . 7)) (IF . (name . 7)) (LOOP . (name . 7)) (NULL . (name . 
7)) (PRAGMA . (name . 7)) (RAISE . (name . 7)) (REQUEUE . (name . 7)) (RETURN . 
(name . 7)) (SELECT . (name [...]
+      ((default . error) (DO . (name . 1)) (USE . (name . 1)) (ELSIF . (name . 
1)) (COMMA . (name . 1)) (RENAMES . (name . 1)) (OF . (name . 1)) (ELSE . (name 
. 1)) (ACCEPT . (name . 1)) (ABORT . (name . 1)) (BEGIN . (name . 1)) (CASE . 
(name . 1)) (DECLARE . (name . 1)) (DELAY . (name . 1)) (EXIT . (name . 1)) 
(FOR . (name . 1)) (GOTO . (name . 1)) (IF . (name . 1)) (LOOP . (name . 1)) 
(NULL . (name . 1)) (PRAGMA . (name . 1)) (RAISE . (name . 1)) (REQUEUE . (name 
. 1)) (RETURN . (name  [...]
+      ((default . error) (USE . (name . 4)) (DO . (name . 4)) (ELSIF . (name . 
4)) (RENAMES . (name . 4)) (OF . (name . 4)) (ELSE . (name . 4)) (ACCEPT . 
(name . 4)) (ABORT . (name . 4)) (BEGIN . (name . 4)) (CASE . (name . 4)) 
(DECLARE . (name . 4)) (DELAY . (name . 4)) (EXIT . (name . 4)) (FOR . (name . 
4)) (GOTO . (name . 4)) (IF . (name . 4)) (LOOP . (name . 4)) (NULL . (name . 
4)) (PRAGMA . (name . 4)) (RAISE . (name . 4)) (REQUEUE . (name . 4)) (RETURN . 
(name . 4)) (SELECT . (name [...]
       ((default . error) (COMMA .  120) (SEMICOLON .  124))
       ((default . error) (DOT .  90) (SEMICOLON . (name_list . 0)) (COMMA . 
(name_list . 0)) (TICK .  91) (LEFT_PAREN .  107))
-      ((default . error) (DO . (name . 6)) (USE . (name . 6)) (ELSIF . (name . 
6)) (RENAMES . (name . 6)) (ELSE . (name . 6)) (ACCEPT . (name . 6)) (ABORT . 
(name . 6)) (BEGIN . (name . 6)) (CASE . (name . 6)) (DECLARE . (name . 6)) 
(DELAY . (name . 6)) (EXIT . (name . 6)) (FOR . (name . 6)) (GOTO . (name . 6)) 
(IF . (name . 6)) (LOOP . (name . 6)) (NULL . (name . 6)) (PRAGMA . (name . 6)) 
(RAISE . (name . 6)) (REQUEUE . (name . 6)) (RETURN . (name . 6)) (SELECT . 
(name . 6)) (WHILE . (n [...]
-      ((default . error) (DO . (name . 3)) (USE . (name . 3)) (ELSIF . (name . 
3)) (RENAMES . (name . 3)) (ELSE . (name . 3)) (ACCEPT . (name . 3)) (ABORT . 
(name . 3)) (BEGIN . (name . 3)) (CASE . (name . 3)) (DECLARE . (name . 3)) 
(DELAY . (name . 3)) (EXIT . (name . 3)) (FOR . (name . 3)) (GOTO . (name . 3)) 
(IF . (name . 3)) (LOOP . (name . 3)) (NULL . (name . 3)) (PRAGMA . (name . 3)) 
(RAISE . (name . 3)) (REQUEUE . (name . 3)) (RETURN . (name . 3)) (SELECT . 
(name . 3)) (WHILE . (n [...]
+      ((default . error) (DO . (name . 6)) (USE . (name . 6)) (ELSIF . (name . 
6)) (RENAMES . (name . 6)) (OF . (name . 6)) (ELSE . (name . 6)) (ACCEPT . 
(name . 6)) (ABORT . (name . 6)) (BEGIN . (name . 6)) (CASE . (name . 6)) 
(DECLARE . (name . 6)) (DELAY . (name . 6)) (EXIT . (name . 6)) (FOR . (name . 
6)) (GOTO . (name . 6)) (IF . (name . 6)) (LOOP . (name . 6)) (NULL . (name . 
6)) (PRAGMA . (name . 6)) (RAISE . (name . 6)) (REQUEUE . (name . 6)) (RETURN . 
(name . 6)) (SELECT . (name [...]
+      ((default . error) (DO . (name . 3)) (USE . (name . 3)) (ELSIF . (name . 
3)) (RENAMES . (name . 3)) (OF . (name . 3)) (ELSE . (name . 3)) (ACCEPT . 
(name . 3)) (ABORT . (name . 3)) (BEGIN . (name . 3)) (CASE . (name . 3)) 
(DECLARE . (name . 3)) (DELAY . (name . 3)) (EXIT . (name . 3)) (FOR . (name . 
3)) (GOTO . (name . 3)) (IF . (name . 3)) (LOOP . (name . 3)) (NULL . (name . 
3)) (PRAGMA . (name . 3)) (RAISE . (name . 3)) (REQUEUE . (name . 3)) (RETURN . 
(name . 3)) (SELECT . (name [...]
       ((default . error) (TYPE .  123))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
       ((default . error) (COMMA .  120) (SEMICOLON .  121))
@@ -1892,31 +1902,31 @@
       ((default . error) (PACKAGE . (generic_formal_parameter_declaration . 
4)) (PROCEDURE . (generic_formal_parameter_declaration . 4)) (FUNCTION . 
(generic_formal_parameter_declaration . 4)) (IDENTIFIER . 
(generic_formal_parameter_declaration . 4)) (WITH . 
(generic_formal_parameter_declaration . 4)) (USE . 
(generic_formal_parameter_declaration . 4)) (TYPE . 
(generic_formal_parameter_declaration . 4)) (PRAGMA . 
(generic_formal_parameter_declaration . 4)))
       ((default . error) (PACKAGE . (generic_formal_parameter_declaration . 
5)) (PROCEDURE . (generic_formal_parameter_declaration . 5)) (FUNCTION . 
(generic_formal_parameter_declaration . 5)) (IDENTIFIER . 
(generic_formal_parameter_declaration . 5)) (WITH . 
(generic_formal_parameter_declaration . 5)) (USE . 
(generic_formal_parameter_declaration . 5)) (TYPE . 
(generic_formal_parameter_declaration . 5)) (PRAGMA . 
(generic_formal_parameter_declaration . 5)))
       ((default . error) (DOT .  90) (TICK .  91) (RETURN .  89) (LEFT_PAREN . 
 88))
-      ((default . error) (RIGHT_PAREN . ((expression_opt . 0) (association_opt 
. 0))) (COMMA . ((expression_opt . 0) (association_opt . 0))) (EQUAL_GREATER . 
(discrete_choice_list . 0)) (BAR . (discrete_choice_list . 0)) 
(CHARACTER_LITERAL .  176) (STRING_LITERAL .  49) (IDENTIFIER .  228) (PLUS .  
151) (MINUS .  150) (OTHERS .  175) (ABS .  144) (NOT .  174) (RAISE .  149) 
(NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
-      ((default . error) (IDENTIFIER . (null_exclusion_opt . 0)) 
(STRING_LITERAL . (null_exclusion_opt . 0)) (CHARACTER_LITERAL . 
(null_exclusion_opt . 0)) (DO . (null_exclusion_opt . 0)) (COLON_EQUAL . 
(null_exclusion_opt . 0)) (RIGHT_PAREN . (null_exclusion_opt . 0)) (RENAMES . 
(null_exclusion_opt . 0)) (IS . (null_exclusion_opt . 0)) (SEMICOLON . 
(null_exclusion_opt . 0)) (WITH . (null_exclusion_opt . 0)) (ACCESS . 
(null_exclusion_opt . 0)) (NOT .  225))
-      ((default . error) (IDENTIFIER .  222) (CHARACTER_LITERAL .  224) 
(STRING_LITERAL .  223) (ALL .  221))
-      ((default . error) (LEFT_PAREN .  216) (ACCESS .  213) (DELTA .  214) 
(DIGITS .  215) (MOD .  217) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
+      ((default . error) (FOR .  146) (CASE .  145) (IF .  147) (RIGHT_PAREN . 
((expression_opt . 0) (association_opt . 0))) (COMMA . ((expression_opt . 0) 
(association_opt . 0))) (EQUAL_GREATER . (discrete_choice_list . 0)) (BAR . 
(discrete_choice_list . 0)) (CHARACTER_LITERAL .  183) (STRING_LITERAL .  49) 
(IDENTIFIER .  235) (PLUS .  154) (MINUS .  153) (OTHERS .  182) (ABS .  144) 
(NOT .  181) (RAISE .  152) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(LEFT_PAREN .  148))
+      ((default . error) (IDENTIFIER . (null_exclusion_opt . 0)) 
(STRING_LITERAL . (null_exclusion_opt . 0)) (CHARACTER_LITERAL . 
(null_exclusion_opt . 0)) (DO . (null_exclusion_opt . 0)) (COLON_EQUAL . 
(null_exclusion_opt . 0)) (RIGHT_PAREN . (null_exclusion_opt . 0)) (RENAMES . 
(null_exclusion_opt . 0)) (IS . (null_exclusion_opt . 0)) (SEMICOLON . 
(null_exclusion_opt . 0)) (WITH . (null_exclusion_opt . 0)) (ACCESS . 
(null_exclusion_opt . 0)) (NOT .  232))
+      ((default . error) (IDENTIFIER .  229) (CHARACTER_LITERAL .  231) 
(STRING_LITERAL .  230) (ALL .  228))
+      ((default . error) (LEFT_PAREN .  148) (ACCESS .  221) (DELTA .  222) 
(DIGITS .  223) (MOD .  224) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
       ((default . error) (DO . (name . 5)) (OF . (name . 5)) 
(CHARACTER_LITERAL . (name . 5)) (STRING_LITERAL . (name . 5)) (IDENTIFIER . 
(name . 5)) (LESS_LESS . (name . 5)) (WHILE . (name . 5)) (SELECT . (name . 5)) 
(REQUEUE . (name . 5)) (RAISE . (name . 5)) (PRAGMA . (name . 5)) (NULL . (name 
. 5)) (LOOP . (name . 5)) (IF . (name . 5)) (GOTO . (name . 5)) (FOR . (name . 
5)) (EXIT . (name . 5)) (DELAY . (name . 5)) (DECLARE . (name . 5)) (CASE . 
(name . 5)) (BEGIN . (name . 5)) (ABORT [...]
-      ((default . error) (RETURN .  212))
+      ((default . error) (RETURN .  220))
       ((default . error) (RENAMES . (function_specification . 0)) (IS . 
(function_specification . 0)) (SEMICOLON . (function_specification . 0)) (WITH 
. (function_specification . 0)))
-      ((default . error) (ACCESS . (mode_opt . 0)) (NOT . (mode_opt . 0)) 
(IDENTIFIER . (mode_opt . 0)) (STRING_LITERAL . (mode_opt . 0)) 
(CHARACTER_LITERAL . (mode_opt . 0)) (IN .  209) (OUT .  210))
-      ((default . error) (IDENTIFIER .  208))
+      ((default . error) (ACCESS . (mode_opt . 0)) (NOT . (mode_opt . 0)) 
(IDENTIFIER . (mode_opt . 0)) (STRING_LITERAL . (mode_opt . 0)) 
(CHARACTER_LITERAL . (mode_opt . 0)) (IN .  217) (OUT .  218))
+      ((default . error) (IDENTIFIER .  216))
       ((default . error) (IDENTIFIER . (generic_formal_parameter_declarations 
. 1)) (WITH . (generic_formal_parameter_declarations . 1)) (USE . 
(generic_formal_parameter_declarations . 1)) (TYPE . 
(generic_formal_parameter_declarations . 1)) (PRAGMA . 
(generic_formal_parameter_declarations . 1)) (FUNCTION . 
(generic_formal_parameter_declarations . 1)) (PROCEDURE . 
(generic_formal_parameter_declarations . 1)) (PACKAGE . 
(generic_formal_parameter_declarations . 1)))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (IS .  205) (SEMICOLON . (aspect_specification_opt . 
0)) (WITH .  109))
-      ((default . error) (WITH . (discriminant_part_opt . 0)) (SEMICOLON . 
(discriminant_part_opt . 0)) (IS . (discriminant_part_opt . 0)) (LEFT_PAREN .  
203))
-      ((default . error) (DOT .  90) (TICK .  91) (RENAMES .  202) (LEFT_PAREN 
.  107))
-      ((default . error) (DOT .  90) (TICK .  91) (RENAMES .  201) (LEFT_PAREN 
.  107))
-      ((default . error) (DOT .  90) (TICK .  91) (RENAMES .  200) (LEFT_PAREN 
.  107))
-      ((default . error) (COMMA .  120) (SEMICOLON .  199))
+      ((default . error) (IS .  213) (SEMICOLON . (aspect_specification_opt . 
0)) (WITH .  109))
+      ((default . error) (WITH . (discriminant_part_opt . 0)) (SEMICOLON . 
(discriminant_part_opt . 0)) (IS . (discriminant_part_opt . 0)) (LEFT_PAREN .  
211))
+      ((default . error) (DOT .  90) (TICK .  91) (RENAMES .  210) (LEFT_PAREN 
.  107))
+      ((default . error) (DOT .  90) (TICK .  91) (RENAMES .  209) (LEFT_PAREN 
.  107))
+      ((default . error) (DOT .  90) (TICK .  91) (RENAMES .  208) (LEFT_PAREN 
.  107))
+      ((default . error) (COMMA .  120) (SEMICOLON .  207))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (NEW .  197))
-      ((default . error) (RIGHT_PAREN . ((expression_opt . 0) (association_opt 
. 0))) (COMMA . ((expression_opt . 0) (association_opt . 0))) (EQUAL_GREATER . 
(discrete_choice_list . 0)) (BAR . (discrete_choice_list . 0)) (IDENTIFIER .  
48) (CHARACTER_LITERAL .  176) (STRING_LITERAL .  49) (PLUS .  151) (MINUS .  
150) (OTHERS .  175) (ABS .  144) (NOT .  174) (RAISE .  149) (NUMERIC_LITERAL 
.  152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
+      ((default . error) (NEW .  205))
+      ((default . error) (FOR .  146) (CASE .  145) (IF .  147) (RIGHT_PAREN . 
((expression_opt . 0) (association_opt . 0))) (COMMA . ((expression_opt . 0) 
(association_opt . 0))) (EQUAL_GREATER . (discrete_choice_list . 0)) (BAR . 
(discrete_choice_list . 0)) (IDENTIFIER .  48) (CHARACTER_LITERAL .  183) 
(STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) (OTHERS .  182) (ABS .  
144) (NOT .  181) (RAISE .  152) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  
149) (LEFT_PAREN .  148))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (SEMICOLON . ((expression_opt . 0) (association_opt . 
0))) (IS . ((expression_opt . 0) (association_opt . 0))) (COMMA . 
((expression_opt . 0) (association_opt . 0))) (EQUAL_GREATER . 
(discrete_choice_list . 0)) (BAR . (discrete_choice_list . 0)) (OTHERS .  175) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  176) (STRING_LITERAL .  49) (RAISE .  
149) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  174) (NUMERIC_LITERAL .  
152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
-      ((default . error) (IS .  173))
+      ((default . error) (SEMICOLON . ((expression_opt . 0) (association_opt . 
0))) (IS . ((expression_opt . 0) (association_opt . 0))) (COMMA . 
((expression_opt . 0) (association_opt . 0))) (EQUAL_GREATER . 
(discrete_choice_list . 0)) (BAR . (discrete_choice_list . 0)) (OTHERS .  182) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  183) (STRING_LITERAL .  49) (RAISE .  
152) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  181) (NUMERIC_LITERAL .  
155) (NULL .  151) (NEW .  149) (LEFT_PAREN .  148))
+      ((default . error) (IS .  180))
       ((default . error) (DOT .  90) (TICK .  91) (IS . 
(aspect_specification_opt . 0)) (WITH .  109) (LEFT_PAREN .  107))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  153) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) 
(LEFT_PAREN .  145))
+      ((default . error) (FOR .  146) (CASE .  145) (IF .  147) (RAISE .  152) 
(PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) 
(NULL .  151) (NEW .  149) (IDENTIFIER .  156) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (LEFT_PAREN .  148))
       ((default . error) (OR . (pragma . 1)) (THEN . (pragma . 1)) (WHEN . 
(pragma . 1)) (EXCEPTION . (pragma . 1)) (ACCEPT . (pragma . 1)) (ABORT . 
(pragma . 1)) (CASE . (pragma . 1)) (DECLARE . (pragma . 1)) (DELAY . (pragma . 
1)) (EXIT . (pragma . 1)) (GOTO . (pragma . 1)) (IF . (pragma . 1)) (LOOP . 
(pragma . 1)) (NULL . (pragma . 1)) (RAISE . (pragma . 1)) (REQUEUE . (pragma . 
1)) (RETURN . (pragma . 1)) (SELECT . (pragma . 1)) (WHILE . (pragma . 1)) 
(LESS_LESS . (pragma . 1)) (STRI [...]
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
       ((default . error) (COMMA .  120) (SEMICOLON .  142))
@@ -1936,69 +1946,77 @@
       ((default . error) (SEMICOLON .  135) (IS .  134))
       ((default . error) (DOT .  90) (TICK .  91) (IS . ( 133 
(parameter_profile_opt . 0))) (SEMICOLON . (parameter_profile_opt . 0)) (WITH . 
(parameter_profile_opt . 0)) (RENAMES . (parameter_profile_opt . 0)) 
(LEFT_PAREN .  88))
       ((default . error) (DOT .  90) (TICK .  91) (IS .  132) (RETURN .  89) 
(LEFT_PAREN .  88))
-      ((default . error) (NEW .  393))
-      ((default . error) (NEW .  392))
-      ((default . error) (BEGIN . (declarative_part_opt . 0)) (USE .  11) 
(SUBTYPE .  301) (PRAGMA .  7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(ENTRY . (overriding_indicator_opt . 2)) (FOR .  298) (IDENTIFIER .  304) (TYPE 
.  303) (GENERIC .  2) (PROTECTED .  300) (TASK .  302) (PACKAGE .  299))
+      ((default . error) (NEW .  399))
+      ((default . error) (NEW .  398))
+      ((default . error) (BEGIN . (declarative_part_opt . 0)) (USE .  11) 
(SUBTYPE .  302) (PRAGMA .  7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(ENTRY . (overriding_indicator_opt . 2)) (FOR .  299) (IDENTIFIER .  305) (TYPE 
.  304) (GENERIC .  2) (PROTECTED .  301) (TASK .  303) (PACKAGE .  300))
       ((default . error) (IDENTIFIER . (subprogram_declaration . 0)) (TYPE . 
(subprogram_declaration . 0)) (TASK . (subprogram_declaration . 0)) (SUBTYPE . 
(subprogram_declaration . 0)) (PROTECTED . (subprogram_declaration . 0)) (FOR . 
(subprogram_declaration . 0)) (ENTRY . (subprogram_declaration . 0)) (BEGIN . 
(subprogram_declaration . 0)) (END . (subprogram_declaration . 0)) (WITH . 
(subprogram_declaration . 0)) (USE . (subprogram_declaration . 0)) (SEPARATE . 
(subprogram_declaration  [...]
       ((default . error) (DOT .  90) (TICK .  91) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109) (LEFT_PAREN .  107))
       ((default . error) (BEGIN . (generic_subprogram_declaration . 0)) (ENTRY 
. (generic_subprogram_declaration . 0)) (FOR . (generic_subprogram_declaration 
. 0)) (FUNCTION . (generic_subprogram_declaration . 0)) (GENERIC . 
(generic_subprogram_declaration . 0)) (NOT . (generic_subprogram_declaration . 
0)) (OVERRIDING . (generic_subprogram_declaration . 0)) (PACKAGE . 
(generic_subprogram_declaration . 0)) (PRAGMA . (generic_subprogram_declaration 
. 0)) (PROCEDURE . (generic_subprogram_de [...]
-      ((default . error) (COMMA .  120) (SEMICOLON .  389))
+      ((default . error) (COMMA .  120) (SEMICOLON .  395))
       ((default . error) (IDENTIFIER . (use_clause . 2)) (USE . (use_clause . 
2)) (TYPE . (use_clause . 2)) (TASK . (use_clause . 2)) (SUBTYPE . (use_clause 
. 2)) (PROTECTED . (use_clause . 2)) (PROCEDURE . (use_clause . 2)) (PRAGMA . 
(use_clause . 2)) (PACKAGE . (use_clause . 2)) (OVERRIDING . (use_clause . 2)) 
(NOT . (use_clause . 2)) (GENERIC . (use_clause . 2)) (FUNCTION . (use_clause . 
2)) (FOR . (use_clause . 2)) (ENTRY . (use_clause . 2)) (BEGIN . (use_clause . 
2)) (END . (use_cla [...]
       ((default . error) (DOT .  90) (TICK .  91) (SEMICOLON . (name_list . 
1)) (COMMA . (name_list . 1)) (LEFT_PAREN .  107))
-      ((default . error) (PROTECTED .  385) (TASK .  386) (PACKAGE .  384) 
(NOT .  4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) 
(PROCEDURE . (overriding_indicator_opt . 2)))
+      ((default . error) (PROTECTED .  391) (TASK .  392) (PACKAGE .  390) 
(NOT .  4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) 
(PROCEDURE . (overriding_indicator_opt . 2)))
       ((default . error) ($EOI . (with_clause . 2)) (FUNCTION . (with_clause . 
2)) (GENERIC . (with_clause . 2)) (LIMITED . (with_clause . 2)) (NOT . 
(with_clause . 2)) (OVERRIDING . (with_clause . 2)) (PACKAGE . (with_clause . 
2)) (PRAGMA . (with_clause . 2)) (PRIVATE . (with_clause . 2)) (PROCEDURE . 
(with_clause . 2)) (SEPARATE . (with_clause . 2)) (USE . (with_clause . 2)) 
(WITH . (with_clause . 2)))
       ((default . error) (SEMICOLON .  135))
-      ((default . error) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (CASE .  239) (IF .  240) (FOR .  379) (RIGHT_PAREN . 
((expression_opt . 0) (association_opt . 0))) (COMMA . ((expression_opt . 0) 
(association_opt . 0))) (EQUAL_GREATER . (discrete_choice_list . 0)) (BAR . 
(discrete_choice_list . 0)) (RAISE .  149) (PLUS .  151) (MINUS .  150) (OTHERS 
.  175) (ABS .  144) (NOT .  174) (IDENTIFIER .  48) (CHARACTER_LITERAL .  176) 
(STRING_LITERAL .  49) (NUMERIC_LITERAL .  152) (NULL .  241) (NEW .  146) 
(LEFT_PAREN .  145))
+      ((default . error) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (ALL .  385) (SOME .  386))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (FOR .  146) (CASE .  145) (IF .  147) (RIGHT_PAREN . 
((expression_opt . 0) (association_opt . 0))) (COMMA . ((expression_opt . 0) 
(association_opt . 0))) (EQUAL_GREATER . (discrete_choice_list . 0)) (BAR . 
(discrete_choice_list . 0)) (RAISE .  152) (PLUS .  154) (MINUS .  153) (OTHERS 
.  182) (ABS .  144) (NOT .  181) (IDENTIFIER .  48) (CHARACTER_LITERAL .  183) 
(STRING_LITERAL .  49) (NUMERIC_LITERAL .  155) (NULL .  380) (NEW .  149) 
(LEFT_PAREN .  148))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
+      ((default . error) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
       ((default . error) (OF . (primary . 1)) (COLON_EQUAL . (primary . 1)) 
(DO . (primary . 1)) (LOOP . (primary . 1)) (ELSIF . (primary . 1)) (ELSE . 
(primary . 1)) (DIGITS . (primary . 1)) (RIGHT_PAREN . (primary . 1)) (COMMA . 
(primary . 1)) (RANGE . (primary . 1)) (THEN . (primary . 1)) (WITH . (primary 
. 1)) (BAR . (primary . 1)) (EQUAL_GREATER . (primary . 1)) (IS . (primary . 
1)) (IN . (primary . 1)) (NOT . (primary . 1)) (EQUAL . (primary . 1)) (GREATER 
. (primary . 1)) (GREATER [...]
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
       ((default . error) (ABS . (unary_adding_operator . 1)) (LEFT_PAREN . 
(unary_adding_operator . 1)) (NEW . (unary_adding_operator . 1)) (NOT . 
(unary_adding_operator . 1)) (NULL . (unary_adding_operator . 1)) 
(NUMERIC_LITERAL . (unary_adding_operator . 1)) (IDENTIFIER . 
(unary_adding_operator . 1)) (STRING_LITERAL . (unary_adding_operator . 1)) 
(CHARACTER_LITERAL . (unary_adding_operator . 1)))
       ((default . error) (ABS . (unary_adding_operator . 0)) (LEFT_PAREN . 
(unary_adding_operator . 0)) (NEW . (unary_adding_operator . 0)) (NOT . 
(unary_adding_operator . 0)) (NULL . (unary_adding_operator . 0)) 
(NUMERIC_LITERAL . (unary_adding_operator . 0)) (IDENTIFIER . 
(unary_adding_operator . 0)) (STRING_LITERAL . (unary_adding_operator . 0)) 
(CHARACTER_LITERAL . (unary_adding_operator . 0)))
       ((default . error) (OF . (primary . 0)) (COLON_EQUAL . (primary . 0)) 
(DO . (primary . 0)) (LOOP . (primary . 0)) (ELSIF . (primary . 0)) (ELSE . 
(primary . 0)) (DIGITS . (primary . 0)) (RIGHT_PAREN . (primary . 0)) (COMMA . 
(primary . 0)) (RANGE . (primary . 0)) (THEN . (primary . 0)) (WITH . (primary 
. 0)) (BAR . (primary . 0)) (EQUAL_GREATER . (primary . 0)) (IS . (primary . 
0)) (IN . (primary . 0)) (NOT . (primary . 0)) (EQUAL . (primary . 0)) (GREATER 
. (primary . 0)) (GREATER [...]
-      ((default . error) (EQUAL_GREATER .  375) (RIGHT_PAREN . (name . 0)) 
(COMMA . (name . 0)) (STAR_STAR . (name . 0)) (STAR . (name . 0)) (SLASH . 
(name . 0)) (REM . (name . 0)) (MOD . (name . 0)) (SLASH_EQUAL . (name . 0)) 
(LESS_EQUAL . (name . 0)) (LESS . (name . 0)) (GREATER_EQUAL . (name . 0)) 
(GREATER . (name . 0)) (EQUAL . (name . 0)) (NOT . (name . 0)) (IN . (name . 
0)) (AMPERSAND . (name . 0)) (MINUS . (name . 0)) (PLUS . (name . 0)) 
(LEFT_PAREN . (name . 0)) (AND . (name . 0) [...]
+      ((default . error) (EQUAL_GREATER .  376) (RIGHT_PAREN . (name . 0)) 
(COMMA . (name . 0)) (STAR_STAR . (name . 0)) (STAR . (name . 0)) (SLASH . 
(name . 0)) (REM . (name . 0)) (MOD . (name . 0)) (SLASH_EQUAL . (name . 0)) 
(LESS_EQUAL . (name . 0)) (LESS . (name . 0)) (GREATER_EQUAL . (name . 0)) 
(GREATER . (name . 0)) (EQUAL . (name . 0)) (NOT . (name . 0)) (IN . (name . 
0)) (AMPERSAND . (name . 0)) (MINUS . (name . 0)) (PLUS . (name . 0)) 
(LEFT_PAREN . (name . 0)) (AND . (name . 0) [...]
       ((default . error) (OF . (primary . 2)) (COLON_EQUAL . (primary . 2)) 
(DO . (primary . 2)) (LOOP . (primary . 2)) (ELSIF . (primary . 2)) (ELSE . 
(primary . 2)) (DIGITS . (primary . 2)) (RIGHT_PAREN . (primary . 2)) (COMMA . 
(primary . 2)) (RANGE . (primary . 2)) (THEN . (primary . 2)) (WITH . (primary 
. 2)) (BAR . (primary . 2)) (EQUAL_GREATER . (primary . 2)) (IS . (primary . 
2)) (IN . (primary . 2)) (NOT . (primary . 2)) (EQUAL . (primary . 2)) (GREATER 
. (primary . 2)) (GREATER [...]
+      ((default . error) (COMMA . (conditional_quantified_expression . 1)) 
(RIGHT_PAREN . (conditional_quantified_expression . 1)))
+      ((default . error) (COMMA . (pragma_argument_association . 2)) 
(RIGHT_PAREN . (pragma_argument_association . 2)))
       ((default . error) (COMMA . (pragma_argument_association . 1)) 
(RIGHT_PAREN . (pragma_argument_association . 1)))
       ((default . error) (OF . (term . 0)) (COLON_EQUAL . (term . 0)) (DO . 
(term . 0)) (LOOP . (term . 0)) (ELSIF . (term . 0)) (ELSE . (term . 0)) 
(DIGITS . (term . 0)) (RIGHT_PAREN . (term . 0)) (COMMA . (term . 0)) (RANGE . 
(term . 0)) (THEN . (term . 0)) (WITH . (term . 0)) (BAR . (term . 0)) 
(EQUAL_GREATER . (term . 0)) (IS . (term . 0)) (IN . (term . 0)) (NOT . (term . 
0)) (EQUAL . (term . 0)) (GREATER . (term . 0)) (GREATER_EQUAL . (term . 0)) 
(LESS . (term . 0)) (LESS_EQUAL . (t [...]
+      ((default . error) (COMMA . (conditional_quantified_expression . 0)) 
(RIGHT_PAREN . (conditional_quantified_expression . 0)))
       ((default . error) (DOT .  90) (OF . (primary . 3)) (COLON_EQUAL . 
(primary . 3)) (DO . (primary . 3)) (LOOP . (primary . 3)) (BAR . (primary . 
3)) (COMMA . (primary . 3)) (ELSIF . (primary . 3)) (ELSE . (primary . 3)) 
(EQUAL_GREATER . (primary . 3)) (RIGHT_PAREN . (primary . 3)) (DIGITS . 
(primary . 3)) (RANGE . (primary . 3)) (THEN . (primary . 3)) (DOT_DOT . 
(primary . 3)) (WITH . (primary . 3)) (IS . (primary . 3)) (IN . (primary . 3)) 
(NOT . (primary . 3)) (EQUAL . (primary .  [...]
       ((default . error) (RIGHT_PAREN . (pragma_argument_association_list . 
0)) (COMMA . (pragma_argument_association_list . 0)))
-      ((default . error) (COMMA .  374) (RIGHT_PAREN .  373))
-      ((default . error) (OF . (factor . 1)) (COLON_EQUAL . (factor . 1)) (DO 
. (factor . 1)) (LOOP . (factor . 1)) (ELSIF . (factor . 1)) (ELSE . (factor . 
1)) (DIGITS . (factor . 1)) (COMMA . (factor . 1)) (RIGHT_PAREN . (factor . 1)) 
(RANGE . (factor . 1)) (THEN . (factor . 1)) (WITH . (factor . 1)) (BAR . 
(factor . 1)) (EQUAL_GREATER . (factor . 1)) (IS . (factor . 1)) (SLASH_EQUAL . 
(factor . 1)) (LESS_EQUAL . (factor . 1)) (LESS . (factor . 1)) (GREATER_EQUAL 
. (factor . 1)) (GREAT [...]
+      ((default . error) (COMMA .  375) (RIGHT_PAREN .  374))
+      ((default . error) (OF . (factor . 1)) (COLON_EQUAL . (factor . 1)) (DO 
. (factor . 1)) (LOOP . (factor . 1)) (ELSIF . (factor . 1)) (ELSE . (factor . 
1)) (DIGITS . (factor . 1)) (COMMA . (factor . 1)) (RIGHT_PAREN . (factor . 1)) 
(RANGE . (factor . 1)) (THEN . (factor . 1)) (WITH . (factor . 1)) (BAR . 
(factor . 1)) (EQUAL_GREATER . (factor . 1)) (IS . (factor . 1)) (SLASH_EQUAL . 
(factor . 1)) (LESS_EQUAL . (factor . 1)) (LESS . (factor . 1)) (GREATER_EQUAL 
. (factor . 1)) (GREAT [...]
+      ((default . error) (COMMA . (conditional_quantified_expression . 2)) 
(RIGHT_PAREN . (conditional_quantified_expression . 2)))
       ((default . error) (DO . (relation . 4)) (LOOP . (relation . 4)) (ELSIF 
. (relation . 4)) (ELSE . (relation . 4)) (EQUAL_GREATER . (relation . 4)) 
(DIGITS . (relation . 4)) (RIGHT_PAREN . (relation . 4)) (COMMA . (relation . 
4)) (RANGE . (relation . 4)) (THEN . (relation . 4)) (SEMICOLON . (relation . 
4)) (WITH . (relation . 4)) (IS . (relation . 4)) (AND . (relation . 4)) (OR . 
(relation . 4)) (XOR . (relation . 4)))
-      ((default . error) (DO . (expression . 1)) (LOOP . (expression . 1)) 
(XOR . (expression . 1)) (OR . (expression . 1)) (AND . ( 371 (expression . 
1))) (ELSIF . (expression . 1)) (ELSE . (expression . 1)) (EQUAL_GREATER . 
(expression . 1)) (DIGITS . (expression . 1)) (COMMA . (expression . 1)) 
(RIGHT_PAREN . (expression . 1)) (RANGE . (expression . 1)) (THEN . (expression 
. 1)) (WITH . (expression . 1)) (SEMICOLON . (expression . 1)) (IS . 
(expression . 1)))
-      ((default . error) (DO . (expression . 2)) (LOOP . (expression . 2)) 
(XOR . (expression . 2)) (OR . (expression . 2)) (AND . ( 370 (expression . 
2))) (ELSIF . (expression . 2)) (ELSE . (expression . 2)) (EQUAL_GREATER . 
(expression . 2)) (DIGITS . (expression . 2)) (COMMA . (expression . 2)) 
(RIGHT_PAREN . (expression . 2)) (RANGE . (expression . 2)) (THEN . (expression 
. 2)) (WITH . (expression . 2)) (SEMICOLON . (expression . 2)) (IS . 
(expression . 2)))
-      ((default . error) (DO . (expression . 3)) (LOOP . (expression . 3)) 
(XOR . (expression . 3)) (OR . ( 369 (expression . 3))) (AND . (expression . 
3)) (ELSIF . (expression . 3)) (ELSE . (expression . 3)) (EQUAL_GREATER . 
(expression . 3)) (DIGITS . (expression . 3)) (COMMA . (expression . 3)) 
(RIGHT_PAREN . (expression . 3)) (RANGE . (expression . 3)) (THEN . (expression 
. 3)) (WITH . (expression . 3)) (SEMICOLON . (expression . 3)) (IS . 
(expression . 3)))
-      ((default . error) (DO . (expression . 4)) (LOOP . (expression . 4)) 
(XOR . (expression . 4)) (OR . ( 368 (expression . 4))) (AND . (expression . 
4)) (ELSIF . (expression . 4)) (ELSE . (expression . 4)) (EQUAL_GREATER . 
(expression . 4)) (DIGITS . (expression . 4)) (COMMA . (expression . 4)) 
(RIGHT_PAREN . (expression . 4)) (RANGE . (expression . 4)) (THEN . (expression 
. 4)) (WITH . (expression . 4)) (SEMICOLON . (expression . 4)) (IS . 
(expression . 4)))
-      ((default . error) (DO . (expression . 5)) (LOOP . (expression . 5)) 
(XOR . ( 367 (expression . 5))) (OR . (expression . 5)) (AND . (expression . 
5)) (ELSIF . (expression . 5)) (ELSE . (expression . 5)) (EQUAL_GREATER . 
(expression . 5)) (DIGITS . (expression . 5)) (COMMA . (expression . 5)) 
(RIGHT_PAREN . (expression . 5)) (RANGE . (expression . 5)) (THEN . (expression 
. 5)) (WITH . (expression . 5)) (SEMICOLON . (expression . 5)) (IS . 
(expression . 5)))
-      ((default . error) (DO . (expression . 0)) (LOOP . (expression . 0)) 
(XOR . ( 366 (expression . 0))) (OR . ( 365 (expression . 0))) (AND . ( 364 
(expression . 0))) (ELSIF . (expression . 0)) (ELSE . (expression . 0)) 
(EQUAL_GREATER . (expression . 0)) (DIGITS . (expression . 0)) (COMMA . 
(expression . 0)) (RIGHT_PAREN . (expression . 0)) (RANGE . (expression . 0)) 
(THEN . (expression . 0)) (WITH . (expression . 0)) (SEMICOLON . (expression . 
0)) (IS . (expression . 0)))
-      ((default . error) (IN .  274) (NOT .  275) (DO . (relation . 0)) (LOOP 
. (relation . 0)) (COMMA . (relation . 0)) (ELSIF . (relation . 0)) (ELSE . 
(relation . 0)) (EQUAL_GREATER . (relation . 0)) (RIGHT_PAREN . (relation . 0)) 
(DIGITS . (relation . 0)) (RANGE . (relation . 0)) (THEN . (relation . 0)) 
(SEMICOLON . (relation . 0)) (WITH . (relation . 0)) (IS . (relation . 0)) (AND 
. (relation . 0)) (OR . (relation . 0)) (XOR . (relation . 0)) (EQUAL .  277) 
(SLASH_EQUAL .  282) (LES [...]
-      ((default . error) (OF . (term_list . 0)) (COLON_EQUAL . (term_list . 
0)) (DO . (term_list . 0)) (LOOP . (term_list . 0)) (ELSIF . (term_list . 0)) 
(ELSE . (term_list . 0)) (DIGITS . (term_list . 0)) (COMMA . (term_list . 0)) 
(RIGHT_PAREN . (term_list . 0)) (RANGE . (term_list . 0)) (THEN . (term_list . 
0)) (WITH . (term_list . 0)) (BAR . (term_list . 0)) (EQUAL_GREATER . 
(term_list . 0)) (IS . (term_list . 0)) (SLASH_EQUAL . (term_list . 0)) 
(LESS_EQUAL . (term_list . 0)) (LESS .  [...]
-      ((default . error) (OF . (simple_expression . 1)) (COLON_EQUAL . 
(simple_expression . 1)) (DO . (simple_expression . 1)) (LOOP . 
(simple_expression . 1)) (ELSIF . (simple_expression . 1)) (ELSE . 
(simple_expression . 1)) (DIGITS . (simple_expression . 1)) (RIGHT_PAREN . 
(simple_expression . 1)) (COMMA . (simple_expression . 1)) (RANGE . 
(simple_expression . 1)) (THEN . (simple_expression . 1)) (WITH . 
(simple_expression . 1)) (BAR . (simple_expression . 1)) (EQUAL_GREATER . 
(simple [...]
-      ((default . error) (ABS .  144) (NOT .  147) (NUMERIC_LITERAL .  152) 
(NULL .  148) (NEW .  146) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (LEFT_PAREN .  145))
-      ((default . error) (IS .  352))
-      ((default . error) (END . (declarative_part_opt . 0)) (PRIVATE . 
(declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  301) (PRAGMA .  7) (NOT .  
4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) (PROCEDURE . 
(overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt . 2)) (FOR . 
 298) (IDENTIFIER .  304) (TYPE .  303) (GENERIC .  2) (PROTECTED .  300) (TASK 
.  302) (PACKAGE .  299))
-      ((default . error) (NUMERIC_LITERAL .  152) (NULL .  296) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
+      ((default . error) (DO . (expression . 1)) (LOOP . (expression . 1)) 
(XOR . (expression . 1)) (OR . (expression . 1)) (AND . ( 372 (expression . 
1))) (ELSIF . (expression . 1)) (ELSE . (expression . 1)) (EQUAL_GREATER . 
(expression . 1)) (DIGITS . (expression . 1)) (COMMA . (expression . 1)) 
(RIGHT_PAREN . (expression . 1)) (RANGE . (expression . 1)) (THEN . (expression 
. 1)) (WITH . (expression . 1)) (SEMICOLON . (expression . 1)) (IS . 
(expression . 1)))
+      ((default . error) (DO . (expression . 2)) (LOOP . (expression . 2)) 
(XOR . (expression . 2)) (OR . (expression . 2)) (AND . ( 371 (expression . 
2))) (ELSIF . (expression . 2)) (ELSE . (expression . 2)) (EQUAL_GREATER . 
(expression . 2)) (DIGITS . (expression . 2)) (COMMA . (expression . 2)) 
(RIGHT_PAREN . (expression . 2)) (RANGE . (expression . 2)) (THEN . (expression 
. 2)) (WITH . (expression . 2)) (SEMICOLON . (expression . 2)) (IS . 
(expression . 2)))
+      ((default . error) (DO . (expression . 3)) (LOOP . (expression . 3)) 
(XOR . (expression . 3)) (OR . ( 370 (expression . 3))) (AND . (expression . 
3)) (ELSIF . (expression . 3)) (ELSE . (expression . 3)) (EQUAL_GREATER . 
(expression . 3)) (DIGITS . (expression . 3)) (COMMA . (expression . 3)) 
(RIGHT_PAREN . (expression . 3)) (RANGE . (expression . 3)) (THEN . (expression 
. 3)) (WITH . (expression . 3)) (SEMICOLON . (expression . 3)) (IS . 
(expression . 3)))
+      ((default . error) (DO . (expression . 4)) (LOOP . (expression . 4)) 
(XOR . (expression . 4)) (OR . ( 369 (expression . 4))) (AND . (expression . 
4)) (ELSIF . (expression . 4)) (ELSE . (expression . 4)) (EQUAL_GREATER . 
(expression . 4)) (DIGITS . (expression . 4)) (COMMA . (expression . 4)) 
(RIGHT_PAREN . (expression . 4)) (RANGE . (expression . 4)) (THEN . (expression 
. 4)) (WITH . (expression . 4)) (SEMICOLON . (expression . 4)) (IS . 
(expression . 4)))
+      ((default . error) (DO . (expression . 5)) (LOOP . (expression . 5)) 
(XOR . ( 368 (expression . 5))) (OR . (expression . 5)) (AND . (expression . 
5)) (ELSIF . (expression . 5)) (ELSE . (expression . 5)) (EQUAL_GREATER . 
(expression . 5)) (DIGITS . (expression . 5)) (COMMA . (expression . 5)) 
(RIGHT_PAREN . (expression . 5)) (RANGE . (expression . 5)) (THEN . (expression 
. 5)) (WITH . (expression . 5)) (SEMICOLON . (expression . 5)) (IS . 
(expression . 5)))
+      ((default . error) (DO . (expression . 0)) (LOOP . (expression . 0)) 
(XOR . ( 367 (expression . 0))) (OR . ( 366 (expression . 0))) (AND . ( 365 
(expression . 0))) (ELSIF . (expression . 0)) (ELSE . (expression . 0)) 
(EQUAL_GREATER . (expression . 0)) (DIGITS . (expression . 0)) (COMMA . 
(expression . 0)) (RIGHT_PAREN . (expression . 0)) (RANGE . (expression . 0)) 
(THEN . (expression . 0)) (WITH . (expression . 0)) (SEMICOLON . (expression . 
0)) (IS . (expression . 0)))
+      ((default . error) (IN .  275) (NOT .  276) (DO . (relation . 0)) (LOOP 
. (relation . 0)) (COMMA . (relation . 0)) (ELSIF . (relation . 0)) (ELSE . 
(relation . 0)) (EQUAL_GREATER . (relation . 0)) (RIGHT_PAREN . (relation . 0)) 
(DIGITS . (relation . 0)) (RANGE . (relation . 0)) (THEN . (relation . 0)) 
(SEMICOLON . (relation . 0)) (WITH . (relation . 0)) (IS . (relation . 0)) (AND 
. (relation . 0)) (OR . (relation . 0)) (XOR . (relation . 0)) (EQUAL .  278) 
(SLASH_EQUAL .  283) (LES [...]
+      ((default . error) (OF . (term_list . 0)) (COLON_EQUAL . (term_list . 
0)) (DO . (term_list . 0)) (LOOP . (term_list . 0)) (ELSIF . (term_list . 0)) 
(ELSE . (term_list . 0)) (DIGITS . (term_list . 0)) (COMMA . (term_list . 0)) 
(RIGHT_PAREN . (term_list . 0)) (RANGE . (term_list . 0)) (THEN . (term_list . 
0)) (WITH . (term_list . 0)) (BAR . (term_list . 0)) (EQUAL_GREATER . 
(term_list . 0)) (IS . (term_list . 0)) (SLASH_EQUAL . (term_list . 0)) 
(LESS_EQUAL . (term_list . 0)) (LESS .  [...]
+      ((default . error) (OF . (simple_expression . 1)) (COLON_EQUAL . 
(simple_expression . 1)) (DO . (simple_expression . 1)) (LOOP . 
(simple_expression . 1)) (ELSIF . (simple_expression . 1)) (ELSE . 
(simple_expression . 1)) (DIGITS . (simple_expression . 1)) (RIGHT_PAREN . 
(simple_expression . 1)) (COMMA . (simple_expression . 1)) (RANGE . 
(simple_expression . 1)) (THEN . (simple_expression . 1)) (WITH . 
(simple_expression . 1)) (BAR . (simple_expression . 1)) (EQUAL_GREATER . 
(simple [...]
+      ((default . error) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) 
(NULL .  151) (NEW .  149) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (LEFT_PAREN .  148))
+      ((default . error) (IS .  353))
+      ((default . error) (END . (declarative_part_opt . 0)) (PRIVATE . 
(declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  302) (PRAGMA .  7) (NOT .  
4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) (PROCEDURE . 
(overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt . 2)) (FOR . 
 299) (IDENTIFIER .  305) (TYPE .  304) (GENERIC .  2) (PROTECTED .  301) (TASK 
.  303) (PACKAGE .  300))
+      ((default . error) (NUMERIC_LITERAL .  155) (NULL .  297) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
       ((default . error) (BAR . (discrete_choice . 3)) (EQUAL_GREATER . 
(discrete_choice . 3)))
-      ((default . error) (SEMICOLON . (name . 1)) (IS . (name . 1)) (WITH . 
(name . 1)) (RANGE . (name . 1)) (TICK . (name . 1)) (LEFT_PAREN . (name . 1)) 
(DOT . (name . 1)) (PLUS . (name . 1)) (MINUS . (name . 1)) (AMPERSAND . (name 
. 1)) (DOT_DOT . (name . 1)) (IN . (name . 1)) (NOT . (name . 1)) (EQUAL . 
(name . 1)) (GREATER . (name . 1)) (GREATER_EQUAL . (name . 1)) (LESS . (name . 
1)) (LESS_EQUAL . (name . 1)) (SLASH_EQUAL . (name . 1)) (RIGHT_PAREN . (name . 
1)) (COMMA . (name . 1) [...]
+      ((default . error) (SEMICOLON . (name . 1)) (IS . (name . 1)) (WITH . 
(name . 1)) (RANGE . (name . 1)) (TICK . (name . 1)) (LEFT_PAREN . (name . 1)) 
(DOT . (name . 1)) (PLUS . (name . 1)) (MINUS . (name . 1)) (AMPERSAND . (name 
. 1)) (DOT_DOT . (name . 1)) (IN . (name . 1)) (NOT . (name . 1)) (EQUAL . 
(name . 1)) (GREATER . (name . 1)) (GREATER_EQUAL . (name . 1)) (LESS . (name . 
1)) (LESS_EQUAL . (name . 1)) (SLASH_EQUAL . (name . 1)) (RIGHT_PAREN . (name . 
1)) (COMMA . (name . 1) [...]
       ((default . error) (SEMICOLON . (association_list . 0)) (IS . 
(association_list . 0)) (RIGHT_PAREN . (association_list . 0)) (COMMA . 
(association_list . 0)))
-      ((default . error) (COMMA .  272) (SEMICOLON . (aspect_specification_opt 
. 1)) (IS . (aspect_specification_opt . 1)))
+      ((default . error) (COMMA .  273) (SEMICOLON . (aspect_specification_opt 
. 1)) (IS . (aspect_specification_opt . 1)))
       ((default . error) (BAR . (discrete_choice . 0)) (EQUAL_GREATER . 
(discrete_choice . 0)))
-      ((default . error) (AND .  294) (EQUAL_GREATER . (choice_expression . 
1)) (BAR . (choice_expression . 1)))
-      ((default . error) (OR .  293) (EQUAL_GREATER . (choice_expression . 2)) 
(BAR . (choice_expression . 2)))
-      ((default . error) (XOR .  292) (EQUAL_GREATER . (choice_expression . 
3)) (BAR . (choice_expression . 3)))
-      ((default . error) (AND .  291) (EQUAL_GREATER . (choice_expression . 
4)) (BAR . (choice_expression . 4)))
-      ((default . error) (OR .  290) (EQUAL_GREATER . (choice_expression . 5)) 
(BAR . (choice_expression . 5)))
-      ((default . error) (XOR .  289) (OR .  288) (AND .  287) (EQUAL_GREATER 
. (choice_expression . 0)) (BAR . (choice_expression . 0)))
+      ((default . error) (AND .  295) (EQUAL_GREATER . (choice_expression . 
1)) (BAR . (choice_expression . 1)))
+      ((default . error) (OR .  294) (EQUAL_GREATER . (choice_expression . 2)) 
(BAR . (choice_expression . 2)))
+      ((default . error) (XOR .  293) (EQUAL_GREATER . (choice_expression . 
3)) (BAR . (choice_expression . 3)))
+      ((default . error) (AND .  292) (EQUAL_GREATER . (choice_expression . 
4)) (BAR . (choice_expression . 4)))
+      ((default . error) (OR .  291) (EQUAL_GREATER . (choice_expression . 5)) 
(BAR . (choice_expression . 5)))
+      ((default . error) (XOR .  290) (OR .  289) (AND .  288) (EQUAL_GREATER 
. (choice_expression . 0)) (BAR . (choice_expression . 0)))
       ((default . error) (EQUAL_GREATER . (discrete_choice_list . 1)) (BAR . 
(discrete_choice_list . 1)))
-      ((default . error) (BAR .  285) (EQUAL_GREATER .  286))
+      ((default . error) (BAR .  286) (EQUAL_GREATER .  287))
       ((default . error) (LOOP . (expression_opt . 1)) (RIGHT_PAREN . 
(expression_opt . 1)) (COMMA . (expression_opt . 1)) (SEMICOLON . 
(expression_opt . 1)) (THEN . (expression_opt . 1)) (IS . (expression_opt . 1)))
       ((default . error) (SEMICOLON . (association_opt . 5)) (IS . 
(association_opt . 5)) (COMMA . (association_opt . 5)) (RIGHT_PAREN . 
(association_opt . 5)))
-      ((default . error) (DOT .  90) (DO . (primary . 3)) (LOOP . (primary . 
3)) (ELSIF . (primary . 3)) (ELSE . (primary . 3)) (DIGITS . (primary . 3)) 
(RANGE . (primary . 3)) (THEN . (primary . 3)) (SEMICOLON . (primary . 3)) (IS 
. (primary . 3)) (WITH . (primary . 3)) (IN . (primary . 3)) (NOT . (primary . 
3)) (RIGHT_PAREN . (primary . 3)) (COMMA . (primary . 3)) (PLUS . (primary . 
3)) (MINUS . (primary . 3)) (AMPERSAND . (primary . 3)) (DOT_DOT . (primary . 
3)) (MOD . (primary . 3))  [...]
+      ((default . error) (DOT .  90) (DO . (primary . 3)) (LOOP . (primary . 
3)) (ELSIF . (primary . 3)) (ELSE . (primary . 3)) (DIGITS . (primary . 3)) 
(RANGE . (primary . 3)) (THEN . (primary . 3)) (SEMICOLON . (primary . 3)) (IS 
. (primary . 3)) (WITH . (primary . 3)) (IN . (primary . 3)) (NOT . (primary . 
3)) (RIGHT_PAREN . (primary . 3)) (COMMA . (primary . 3)) (PLUS . (primary . 
3)) (MINUS . (primary . 3)) (AMPERSAND . (primary . 3)) (DOT_DOT . (primary . 
3)) (MOD . (primary . 3))  [...]
       ((default . error) (BAR . (discrete_choice . 2)) (EQUAL_GREATER . 
(discrete_choice . 2)))
-      ((default . error) (IN .  274) (NOT .  275) (SEMICOLON . (relation . 0)) 
(IS . (relation . 0)) (WITH . (relation . 0)) (RIGHT_PAREN . (relation . 0)) 
(COMMA . (relation . 0)) (DOT_DOT .  276) (BAR . (choice_relation . 1)) 
(EQUAL_GREATER . (choice_relation . 1)) (AND . ((choice_relation . 1) (relation 
. 0))) (OR . ((choice_relation . 1) (relation . 0))) (XOR . ((choice_relation . 
1) (relation . 0))) (EQUAL .  277) (SLASH_EQUAL .  282) (LESS .  280) 
(LESS_EQUAL .  281) (GREATER .  27 [...]
+      ((default . error) (IN .  275) (NOT .  276) (SEMICOLON . (relation . 0)) 
(IS . (relation . 0)) (WITH . (relation . 0)) (RIGHT_PAREN . (relation . 0)) 
(COMMA . (relation . 0)) (DOT_DOT .  277) (BAR . (choice_relation . 1)) 
(EQUAL_GREATER . (choice_relation . 1)) (AND . ((choice_relation . 1) (relation 
. 0))) (OR . ((choice_relation . 1) (relation . 0))) (XOR . ((choice_relation . 
1) (relation . 0))) (EQUAL .  278) (SLASH_EQUAL .  283) (LESS .  281) 
(LESS_EQUAL .  282) (GREATER .  27 [...]
       ((default . error) (DOT .  90) (TICK .  91) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109) (LEFT_PAREN .  107))
-      ((default . error) (COMMA .  272) (RIGHT_PAREN .  271))
+      ((default . error) (COMMA .  273) (RIGHT_PAREN .  272))
+      ((default . error) (RIGHT_PAREN .  271))
       ((default . error) (BAR . (discrete_choice . 2)) (EQUAL_GREATER . 
(discrete_choice . 2)) (RIGHT_PAREN . (range_list . 0)) (COMMA . (range_list . 
0)))
       ((default . error) (COMMA .  270) (RIGHT_PAREN .  269))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
@@ -2015,12 +2033,11 @@
       ((default . error) (COLON . (identifier_list . 1)) (COMMA . 
(identifier_list . 1)))
       ((default . error) (OUT .  250) (ACCESS . (mode_opt . 1)) (NOT . 
(mode_opt . 1)) (IDENTIFIER . (mode_opt . 1)) (STRING_LITERAL . (mode_opt . 1)) 
(CHARACTER_LITERAL . (mode_opt . 1)))
       ((default . error) (ACCESS . (mode_opt . 3)) (NOT . (mode_opt . 3)) 
(IDENTIFIER . (mode_opt . 3)) (STRING_LITERAL . (mode_opt . 3)) 
(CHARACTER_LITERAL . (mode_opt . 3)))
-      ((default . error) (IDENTIFIER . (null_exclusion_opt . 0)) 
(STRING_LITERAL . (null_exclusion_opt . 0)) (CHARACTER_LITERAL . 
(null_exclusion_opt . 0)) (ACCESS . (null_exclusion_opt . 0)) (NOT .  225))
-      ((default . error) (IDENTIFIER . (null_exclusion_opt . 0)) 
(STRING_LITERAL . (null_exclusion_opt . 0)) (CHARACTER_LITERAL . 
(null_exclusion_opt . 0)) (DO . (null_exclusion_opt . 0)) (RIGHT_PAREN . 
(null_exclusion_opt . 0)) (COLON_EQUAL . (null_exclusion_opt . 0)) (RENAMES . 
(null_exclusion_opt . 0)) (WITH . (null_exclusion_opt . 0)) (SEMICOLON . 
(null_exclusion_opt . 0)) (IS . (null_exclusion_opt . 0)) (ACCESS . 
(null_exclusion_opt . 0)) (NOT .  225))
+      ((default . error) (IDENTIFIER . (null_exclusion_opt . 0)) 
(STRING_LITERAL . (null_exclusion_opt . 0)) (CHARACTER_LITERAL . 
(null_exclusion_opt . 0)) (ACCESS . (null_exclusion_opt . 0)) (NOT .  232))
+      ((default . error) (IDENTIFIER . (null_exclusion_opt . 0)) 
(STRING_LITERAL . (null_exclusion_opt . 0)) (CHARACTER_LITERAL . 
(null_exclusion_opt . 0)) (DO . (null_exclusion_opt . 0)) (RIGHT_PAREN . 
(null_exclusion_opt . 0)) (COLON_EQUAL . (null_exclusion_opt . 0)) (RENAMES . 
(null_exclusion_opt . 0)) (WITH . (null_exclusion_opt . 0)) (SEMICOLON . 
(null_exclusion_opt . 0)) (IS . (null_exclusion_opt . 0)) (ACCESS . 
(null_exclusion_opt . 0)) (NOT .  232))
       ((default . error) (DO . (attribute_designator . 1)) (ELSIF . 
(attribute_designator . 1)) (ELSE . (attribute_designator . 1)) (DIGITS . 
(attribute_designator . 1)) (RANGE . (attribute_designator . 1)) (THEN . 
(attribute_designator . 1)) (USE . (attribute_designator . 1)) (COLON_EQUAL . 
(attribute_designator . 1)) (CHARACTER_LITERAL . (attribute_designator . 1)) 
(STRING_LITERAL . (attribute_designator . 1)) (IDENTIFIER . 
(attribute_designator . 1)) (LESS_LESS . (attribute_designator [...]
       ((default . error) (DO . (attribute_designator . 2)) (ELSIF . 
(attribute_designator . 2)) (ELSE . (attribute_designator . 2)) (DIGITS . 
(attribute_designator . 2)) (RANGE . (attribute_designator . 2)) (THEN . 
(attribute_designator . 2)) (USE . (attribute_designator . 2)) (COLON_EQUAL . 
(attribute_designator . 2)) (CHARACTER_LITERAL . (attribute_designator . 2)) 
(STRING_LITERAL . (attribute_designator . 2)) (IDENTIFIER . 
(attribute_designator . 2)) (LESS_LESS . (attribute_designator [...]
       ((default . error) (DO . (attribute_designator . 3)) (ELSIF . 
(attribute_designator . 3)) (ELSE . (attribute_designator . 3)) (DIGITS . 
(attribute_designator . 3)) (RANGE . (attribute_designator . 3)) (THEN . 
(attribute_designator . 3)) (USE . (attribute_designator . 3)) (COLON_EQUAL . 
(attribute_designator . 3)) (CHARACTER_LITERAL . (attribute_designator . 3)) 
(STRING_LITERAL . (attribute_designator . 3)) (IDENTIFIER . 
(attribute_designator . 3)) (LESS_LESS . (attribute_designator [...]
-      ((default . error) (CASE .  239) (IF .  240) (RIGHT_PAREN . 
((expression_opt . 0) (association_opt . 0))) (COMMA . ((expression_opt . 0) 
(association_opt . 0))) (EQUAL_GREATER . (discrete_choice_list . 0)) (BAR . 
(discrete_choice_list . 0)) (RAISE .  149) (PLUS .  151) (MINUS .  150) (OTHERS 
.  175) (ABS .  144) (NOT .  174) (IDENTIFIER .  48) (CHARACTER_LITERAL .  176) 
(STRING_LITERAL .  49) (NUMERIC_LITERAL .  152) (NULL .  241) (NEW .  146) 
(LEFT_PAREN .  145))
       ((default . error) (DO . (attribute_designator . 4)) (ELSIF . 
(attribute_designator . 4)) (ELSE . (attribute_designator . 4)) (DIGITS . 
(attribute_designator . 4)) (RANGE . (attribute_designator . 4)) (THEN . 
(attribute_designator . 4)) (USE . (attribute_designator . 4)) (COLON_EQUAL . 
(attribute_designator . 4)) (CHARACTER_LITERAL . (attribute_designator . 4)) 
(STRING_LITERAL . (attribute_designator . 4)) (IDENTIFIER . 
(attribute_designator . 4)) (LESS_LESS . (attribute_designator [...]
       ((default . error) (DO . (qualified_expression . 0)) (ELSIF . 
(qualified_expression . 0)) (ELSE . (qualified_expression . 0)) (DIGITS . 
(qualified_expression . 0)) (RANGE . (qualified_expression . 0)) (THEN . 
(qualified_expression . 0)) (USE . (qualified_expression . 0)) (COLON_EQUAL . 
(qualified_expression . 0)) (CHARACTER_LITERAL . (qualified_expression . 0)) 
(STRING_LITERAL . (qualified_expression . 0)) (IDENTIFIER . 
(qualified_expression . 0)) (LESS_LESS . (qualified_expression [...]
       ((default . error) (DO . (attribute_reference . 0)) (ELSIF . 
(attribute_reference . 0)) (ELSE . (attribute_reference . 0)) (DIGITS . 
(attribute_reference . 0)) (RANGE . (attribute_reference . 0)) (THEN . 
(attribute_reference . 0)) (USE . (attribute_reference . 0)) (COLON_EQUAL . 
(attribute_reference . 0)) (CHARACTER_LITERAL . (attribute_reference . 0)) 
(STRING_LITERAL . (attribute_reference . 0)) (IDENTIFIER . (attribute_reference 
. 0)) (LESS_LESS . (attribute_reference . 0)) (WHIL [...]
@@ -2029,94 +2046,88 @@
       ((default . error) (DO . (selected_component . 0)) (RIGHT_PAREN . 
(selected_component . 0)) (BAR . (selected_component . 0)) (ELSIF . 
(selected_component . 0)) (ELSE . (selected_component . 0)) (EQUAL_GREATER . 
(selected_component . 0)) (DIGITS . (selected_component . 0)) (RANGE . 
(selected_component . 0)) (THEN . (selected_component . 0)) (DOT_DOT . 
(selected_component . 0)) (IN . (selected_component . 0)) (NOT . 
(selected_component . 0)) (EQUAL . (selected_component . 0)) (GREATE [...]
       ((default . error) (DO . (selected_component . 2)) (RIGHT_PAREN . 
(selected_component . 2)) (BAR . (selected_component . 2)) (ELSIF . 
(selected_component . 2)) (ELSE . (selected_component . 2)) (EQUAL_GREATER . 
(selected_component . 2)) (DIGITS . (selected_component . 2)) (RANGE . 
(selected_component . 2)) (THEN . (selected_component . 2)) (DOT_DOT . 
(selected_component . 2)) (IN . (selected_component . 2)) (NOT . 
(selected_component . 2)) (EQUAL . (selected_component . 2)) (GREATE [...]
       ((default . error) (DO . (selected_component . 1)) (RIGHT_PAREN . 
(selected_component . 1)) (BAR . (selected_component . 1)) (ELSIF . 
(selected_component . 1)) (ELSE . (selected_component . 1)) (EQUAL_GREATER . 
(selected_component . 1)) (DIGITS . (selected_component . 1)) (RANGE . 
(selected_component . 1)) (THEN . (selected_component . 1)) (DOT_DOT . 
(selected_component . 1)) (IN . (selected_component . 1)) (NOT . 
(selected_component . 1)) (EQUAL . (selected_component . 1)) (GREATE [...]
-      ((default . error) (NULL .  238))
+      ((default . error) (NULL .  245))
       ((default . error) (DO . (parameter_and_result_profile . 3)) 
(RIGHT_PAREN . (parameter_and_result_profile . 3)) (COLON_EQUAL . 
(parameter_and_result_profile . 3)) (RENAMES . (parameter_and_result_profile . 
3)) (WITH . (parameter_and_result_profile . 3)) (SEMICOLON . 
(parameter_and_result_profile . 3)) (IS . (parameter_and_result_profile . 3)))
-      ((default . error) (ACCESS .  235) (IS . (name_opt . 0)) (SEMICOLON . 
(name_opt . 0)) (WITH . (name_opt . 0)) (RENAMES . (name_opt . 0)) (COLON_EQUAL 
. (name_opt . 0)) (RIGHT_PAREN . (name_opt . 0)) (DO . (name_opt . 0)) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
+      ((default . error) (ACCESS .  242) (IS . (name_opt . 0)) (SEMICOLON . 
(name_opt . 0)) (WITH . (name_opt . 0)) (RENAMES . (name_opt . 0)) (COLON_EQUAL 
. (name_opt . 0)) (RIGHT_PAREN . (name_opt . 0)) (DO . (name_opt . 0)) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
       ((default . error) (IN . (name . 0)) (NOT . (name . 0)) (EQUAL . (name . 
0)) (GREATER . (name . 0)) (GREATER_EQUAL . (name . 0)) (LESS . (name . 0)) 
(LESS_EQUAL . (name . 0)) (SLASH_EQUAL . (name . 0)) (BAR . (name . 0)) 
(EQUAL_GREATER . (name . 0)) (AND . (name . 0)) (OR . (name . 0)) (XOR . (name 
. 0)) (RIGHT_PAREN . (name . 0)) (LEFT_PAREN . (name . 0)) (RANGE . (name . 0)) 
(TICK . (name . 0)) (DOT . (name . 0)) (PLUS . (name . 0)) (MINUS . (name . 0)) 
(AMPERSAND . (name . 0)) ( [...]
-      ((default . error) (COLON .  234) (COMMA .  96))
+      ((default . error) (COLON .  241) (COMMA .  96))
       ((default . error) (RIGHT_PAREN . (parameter_specification_list . 0)) 
(SEMICOLON . (parameter_specification_list . 0)))
-      ((default . error) (SEMICOLON .  233) (RIGHT_PAREN .  232))
+      ((default . error) (SEMICOLON .  240) (RIGHT_PAREN .  239))
       ((default . error) (COLON_EQUAL . (formal_part . 0)) (RIGHT_PAREN . 
(formal_part . 0)) (DO . (formal_part . 0)) (WHEN . (formal_part . 0)) (RENAMES 
. (formal_part . 0)) (IS . (formal_part . 0)) (SEMICOLON . (formal_part . 0)) 
(WITH . (formal_part . 0)) (RETURN . (formal_part . 0)))
       ((default . error) (IDENTIFIER .  77))
-      ((default . error) (ACCESS . (aliased_opt . 0)) (NOT . (aliased_opt . 
0)) (IN . (aliased_opt . 0)) (OUT . (aliased_opt . 0)) (IDENTIFIER . 
(aliased_opt . 0)) (STRING_LITERAL . (aliased_opt . 0)) (CHARACTER_LITERAL . 
(aliased_opt . 0)) (ALIASED .  530))
-      ((default . error) (FUNCTION . (protected_opt . 0)) (PROCEDURE . 
(protected_opt . 0)) (PROTECTED .  527) (IDENTIFIER . 
(general_access_modifier_opt . 0)) (STRING_LITERAL . 
(general_access_modifier_opt . 0)) (CHARACTER_LITERAL . 
(general_access_modifier_opt . 0)) (ALL .  525) (CONSTANT .  526))
+      ((default . error) (ACCESS . (aliased_opt . 0)) (NOT . (aliased_opt . 
0)) (IN . (aliased_opt . 0)) (OUT . (aliased_opt . 0)) (IDENTIFIER . 
(aliased_opt . 0)) (STRING_LITERAL . (aliased_opt . 0)) (CHARACTER_LITERAL . 
(aliased_opt . 0)) (ALIASED .  531))
+      ((default . error) (FUNCTION . (protected_opt . 0)) (PROCEDURE . 
(protected_opt . 0)) (PROTECTED .  528) (IDENTIFIER . 
(general_access_modifier_opt . 0)) (STRING_LITERAL . 
(general_access_modifier_opt . 0)) (CHARACTER_LITERAL . 
(general_access_modifier_opt . 0)) (ALL .  526) (CONSTANT .  527))
       ((default . error) (DOT .  90) (DO . (name_opt . 1)) (COLON_EQUAL . 
(name_opt . 1)) (RIGHT_PAREN . (name_opt . 1)) (RENAMES . (name_opt . 1)) (IS . 
(name_opt . 1)) (WITH . (name_opt . 1)) (SEMICOLON . (name_opt . 1)) (TICK .  
91) (LEFT_PAREN .  107))
       ((default . error) (DO . (parameter_and_result_profile . 1)) 
(COLON_EQUAL . (parameter_and_result_profile . 1)) (RIGHT_PAREN . 
(parameter_and_result_profile . 1)) (RENAMES . (parameter_and_result_profile . 
1)) (IS . (parameter_and_result_profile . 1)) (SEMICOLON . 
(parameter_and_result_profile . 1)) (WITH . (parameter_and_result_profile . 1)))
       ((default . error) (DO . (null_exclusion_opt . 1)) (COLON_EQUAL . 
(null_exclusion_opt . 1)) (RIGHT_PAREN . (null_exclusion_opt . 1)) (RENAMES . 
(null_exclusion_opt . 1)) (ACCESS . (null_exclusion_opt . 1)) 
(CHARACTER_LITERAL . (null_exclusion_opt . 1)) (STRING_LITERAL . 
(null_exclusion_opt . 1)) (IDENTIFIER . (null_exclusion_opt . 1)) (IS . 
(null_exclusion_opt . 1)) (SEMICOLON . (null_exclusion_opt . 1)) (WITH . 
(null_exclusion_opt . 1)))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (DOT_DOT . (primary . 1)) (RIGHT_PAREN . (primary . 
1)) (COMMA . (primary . 1)) (BAR . (primary . 1)) (EQUAL_GREATER . (primary . 
1)) (PLUS . (primary . 1)) (MINUS . (primary . 1)) (AMPERSAND . (primary . 1)) 
(IN . (primary . 1)) (NOT . (primary . 1)) (EQUAL . (primary . 1)) (GREATER . 
(primary . 1)) (GREATER_EQUAL . (primary . 1)) (LESS . (primary . 1)) 
(LESS_EQUAL . (primary . 1)) (SLASH_EQUAL . (primary . 1)) (WITH . (primary . 
1)) (MOD . (primary . 1)) (REM . [...]
-      ((default . error) (COMMA .  272) (RIGHT_PAREN .  521))
-      ((default . error) (RIGHT_PAREN .  520))
-      ((default . error) (RIGHT_PAREN . (expression_opt . 1)) (COMMA . 
(expression_opt . 1)) (WITH .  519))
-      ((default . error) (RIGHT_PAREN .  518))
       ((default . error) (DO . (parameter_and_result_profile . 2)) 
(COLON_EQUAL . (parameter_and_result_profile . 2)) (RIGHT_PAREN . 
(parameter_and_result_profile . 2)) (RENAMES . (parameter_and_result_profile . 
2)) (IS . (parameter_and_result_profile . 2)) (SEMICOLON . 
(parameter_and_result_profile . 2)) (WITH . (parameter_and_result_profile . 2)))
-      ((default . error) (ACCESS .  235) (WITH . (name_opt . 0)) (SEMICOLON . 
(name_opt . 0)) (IS . (name_opt . 0)) (RENAMES . (name_opt . 0)) (RIGHT_PAREN . 
(name_opt . 0)) (COLON_EQUAL . (name_opt . 0)) (DO . (name_opt . 0)) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
-      ((default . error) (COLON_EQUAL .  515) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109))
-      ((default . error) (ACCESS .  235) (IDENTIFIER .  48) (CHARACTER_LITERAL 
.  50) (STRING_LITERAL .  49))
+      ((default . error) (ACCESS .  242) (WITH . (name_opt . 0)) (SEMICOLON . 
(name_opt . 0)) (IS . (name_opt . 0)) (RENAMES . (name_opt . 0)) (RIGHT_PAREN . 
(name_opt . 0)) (COLON_EQUAL . (name_opt . 0)) (DO . (name_opt . 0)) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
+      ((default . error) (COLON_EQUAL .  523) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109))
+      ((default . error) (ACCESS .  242) (IDENTIFIER .  48) (CHARACTER_LITERAL 
.  50) (STRING_LITERAL .  49))
       ((default . error) (CHARACTER_LITERAL . (mode_opt . 2)) (STRING_LITERAL 
. (mode_opt . 2)) (IDENTIFIER . (mode_opt . 2)) (NOT . (mode_opt . 2)) (ACCESS 
. (mode_opt . 2)))
-      ((default . error) (NEW .  513))
+      ((default . error) (NEW .  521))
       ((default . error) (IDENTIFIER . (formal_subprogram_declaration . 1)) 
(WITH . (formal_subprogram_declaration . 1)) (USE . 
(formal_subprogram_declaration . 1)) (TYPE . (formal_subprogram_declaration . 
1)) (PRAGMA . (formal_subprogram_declaration . 1)) (FUNCTION . 
(formal_subprogram_declaration . 1)) (PROCEDURE . 
(formal_subprogram_declaration . 1)) (PACKAGE . (formal_subprogram_declaration 
. 1)))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109) (BOX .  255) (NULL .  254) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
       ((default . error) (WITH . (subprogram_default . 2)) (SEMICOLON . 
(subprogram_default . 2)))
       ((default . error) (WITH . (subprogram_default . 1)) (SEMICOLON . 
(subprogram_default . 1)))
       ((default . error) (WITH . (subprogram_default . 0)) (SEMICOLON . 
(subprogram_default . 0)) (DOT .  90) (TICK .  91) (LEFT_PAREN .  107))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
-      ((default . error) (LEFT_PAREN .  494) (RANGE .  498) (MOD .  496) 
(DIGITS .  492) (DELTA .  491) (TASK .  501) (PROTECTED .  497) (INTERFACE .  
493) (ARRAY .  490) (PRIVATE . (abstract_tagged_limited_opt . 0)) (TAGGED .  
500) (NEW . (abstract_limited_synchronized_opt . 0)) (ABSTRACT .  489) (LIMITED 
.  495) (SYNCHRONIZED .  499) (ACCESS . (null_exclusion_opt . 0)) (NOT .  225))
-      ((default . error) (SEMICOLON .  488))
-      ((default . error) (RIGHT_PAREN .  487))
+      ((default . error) (LEFT_PAREN .  502) (RANGE .  506) (MOD .  504) 
(DIGITS .  500) (DELTA .  499) (TASK .  509) (PROTECTED .  505) (INTERFACE .  
501) (ARRAY .  498) (PRIVATE . (abstract_tagged_limited_opt . 0)) (TAGGED .  
508) (NEW . (abstract_limited_synchronized_opt . 0)) (ABSTRACT .  497) (LIMITED 
.  503) (SYNCHRONIZED .  507) (ACCESS . (null_exclusion_opt . 0)) (NOT .  232))
+      ((default . error) (SEMICOLON .  496))
+      ((default . error) (RIGHT_PAREN .  495))
       ((default . error) (RIGHT_PAREN . (discriminant_specification_list . 0)) 
(SEMICOLON . (discriminant_specification_list . 0)))
-      ((default . error) (SEMICOLON .  486) (RIGHT_PAREN .  485))
-      ((default . error) (COMMA .  96) (COLON .  484))
+      ((default . error) (SEMICOLON .  494) (RIGHT_PAREN .  493))
+      ((default . error) (COMMA .  96) (COLON .  492))
       ((default . error) (DOT .  90) (TICK .  91) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109) (LEFT_PAREN .  107))
       ((default . error) (DOT .  90) (TICK .  91) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109) (LEFT_PAREN .  107))
       ((default . error) (DOT .  90) (TICK .  91) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109) (LEFT_PAREN .  107))
       ((default . error) (WITH . (with_clause . 0)) (USE . (with_clause . 0)) 
(SEPARATE . (with_clause . 0)) (PROCEDURE . (with_clause . 0)) (PRIVATE . 
(with_clause . 0)) (PRAGMA . (with_clause . 0)) (PACKAGE . (with_clause . 0)) 
(OVERRIDING . (with_clause . 0)) (NOT . (with_clause . 0)) (LIMITED . 
(with_clause . 0)) (GENERIC . (with_clause . 0)) (FUNCTION . (with_clause . 0)) 
($EOI . (with_clause . 0)))
       ((default . error) (DOT .  90) (TICK .  91) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109) (LEFT_PAREN .  107))
-      ((default . error) (DO . (name . 2)) (STAR_STAR . (name . 2)) (STAR . 
(name . 2)) (SLASH . (name . 2)) (REM . (name . 2)) (MOD . (name . 2)) (DOT_DOT 
. (name . 2)) (AMPERSAND . (name . 2)) (MINUS . (name . 2)) (PLUS . (name . 2)) 
(RIGHT_PAREN . (name . 2)) (RANGE . (name . 2)) (COLON_EQUAL . (name . 2)) (AND 
. (name . 2)) (OF . (name . 2)) (CHARACTER_LITERAL . (name . 2)) 
(STRING_LITERAL . (name . 2)) (IDENTIFIER . (name . 2)) (LESS_LESS . (name . 
2)) (WHILE . (name . 2)) (SELECT . [...]
-      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  147) 
(NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
-      ((default . error) (STAR_STAR . (actual_parameter_part . 0)) (STAR . 
(actual_parameter_part . 0)) (SLASH . (actual_parameter_part . 0)) (REM . 
(actual_parameter_part . 0)) (MOD . (actual_parameter_part . 0)) (DOT_DOT . 
(actual_parameter_part . 0)) (AMPERSAND . (actual_parameter_part . 0)) (MINUS . 
(actual_parameter_part . 0)) (PLUS . (actual_parameter_part . 0)) (RIGHT_PAREN 
. (actual_parameter_part . 0)) (RANGE . (actual_parameter_part . 0)) 
(COLON_EQUAL . (actual_parameter_part . [...]
-      ((default . error) (RIGHT_PAREN . ((expression_opt . 0) (association_opt 
. 0))) (COMMA . ((expression_opt . 0) (association_opt . 0))) (IS . 
((expression_opt . 0) (association_opt . 0))) (SEMICOLON . ((expression_opt . 
0) (association_opt . 0))) (EQUAL_GREATER . (discrete_choice_list . 0)) (BAR . 
(discrete_choice_list . 0)) (OTHERS .  175) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  176) (STRING_LITERAL .  49) (RAISE .  149) (PLUS .  151) 
(MINUS .  150) (ABS .  144) (NOT .  174) (NUME [...]
-      ((default . error) (SEMICOLON .  476))
-      ((default . error) (PLUS .  151) (MINUS .  150) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (ABS .  144) (NOT .  147) 
(NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
-      ((default . error) (IN .  471))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
+      ((default . error) (DO . (name . 2)) (STAR_STAR . (name . 2)) (STAR . 
(name . 2)) (SLASH . (name . 2)) (REM . (name . 2)) (MOD . (name . 2)) (DOT_DOT 
. (name . 2)) (AMPERSAND . (name . 2)) (MINUS . (name . 2)) (PLUS . (name . 2)) 
(RIGHT_PAREN . (name . 2)) (XOR . (name . 2)) (OR . (name . 2)) (EQUAL_GREATER 
. (name . 2)) (BAR . (name . 2)) (SLASH_EQUAL . (name . 2)) (LESS_EQUAL . (name 
. 2)) (LESS . (name . 2)) (GREATER_EQUAL . (name . 2)) (GREATER . (name . 2)) 
(EQUAL . (name . 2) [...]
+      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  150) 
(NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (LEFT_PAREN .  148))
+      ((default . error) (STAR_STAR . (actual_parameter_part . 1)) (STAR . 
(actual_parameter_part . 1)) (SLASH . (actual_parameter_part . 1)) (REM . 
(actual_parameter_part . 1)) (MOD . (actual_parameter_part . 1)) (DOT_DOT . 
(actual_parameter_part . 1)) (AMPERSAND . (actual_parameter_part . 1)) (MINUS . 
(actual_parameter_part . 1)) (PLUS . (actual_parameter_part . 1)) (RIGHT_PAREN 
. (actual_parameter_part . 1)) (XOR . (actual_parameter_part . 1)) (OR . 
(actual_parameter_part . 1)) (EQUAL [...]
+      ((default . error) (STAR_STAR . (actual_parameter_part . 0)) (STAR . 
(actual_parameter_part . 0)) (SLASH . (actual_parameter_part . 0)) (REM . 
(actual_parameter_part . 0)) (MOD . (actual_parameter_part . 0)) (DOT_DOT . 
(actual_parameter_part . 0)) (AMPERSAND . (actual_parameter_part . 0)) (MINUS . 
(actual_parameter_part . 0)) (PLUS . (actual_parameter_part . 0)) (RIGHT_PAREN 
. (actual_parameter_part . 0)) (XOR . (actual_parameter_part . 0)) (OR . 
(actual_parameter_part . 0)) (EQUAL [...]
+      ((default . error) (RIGHT_PAREN . ((expression_opt . 0) (association_opt 
. 0))) (COMMA . ((expression_opt . 0) (association_opt . 0))) (IS . 
((expression_opt . 0) (association_opt . 0))) (SEMICOLON . ((expression_opt . 
0) (association_opt . 0))) (EQUAL_GREATER . (discrete_choice_list . 0)) (BAR . 
(discrete_choice_list . 0)) (OTHERS .  182) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  183) (STRING_LITERAL .  49) (RAISE .  152) (PLUS .  154) 
(MINUS .  153) (ABS .  144) (NOT .  181) (NUME [...]
+      ((default . error) (SEMICOLON .  484))
+      ((default . error) (PLUS .  154) (MINUS .  153) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (ABS .  144) (NOT .  150) 
(NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (LEFT_PAREN .  148))
+      ((default . error) (IN .  479))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
       ((default . error) (ABS . (relational_operator . 0)) (LEFT_PAREN . 
(relational_operator . 0)) (NEW . (relational_operator . 0)) (NOT . 
(relational_operator . 0)) (NULL . (relational_operator . 0)) (MINUS . 
(relational_operator . 0)) (PLUS . (relational_operator . 0)) (NUMERIC_LITERAL 
. (relational_operator . 0)) (IDENTIFIER . (relational_operator . 0)) 
(STRING_LITERAL . (relational_operator . 0)) (CHARACTER_LITERAL . 
(relational_operator . 0)))
       ((default . error) (ABS . (relational_operator . 4)) (LEFT_PAREN . 
(relational_operator . 4)) (NEW . (relational_operator . 4)) (NOT . 
(relational_operator . 4)) (NULL . (relational_operator . 4)) (MINUS . 
(relational_operator . 4)) (PLUS . (relational_operator . 4)) (NUMERIC_LITERAL 
. (relational_operator . 4)) (IDENTIFIER . (relational_operator . 4)) 
(STRING_LITERAL . (relational_operator . 4)) (CHARACTER_LITERAL . 
(relational_operator . 4)))
       ((default . error) (ABS . (relational_operator . 5)) (LEFT_PAREN . 
(relational_operator . 5)) (NEW . (relational_operator . 5)) (NOT . 
(relational_operator . 5)) (NULL . (relational_operator . 5)) (MINUS . 
(relational_operator . 5)) (PLUS . (relational_operator . 5)) (NUMERIC_LITERAL 
. (relational_operator . 5)) (IDENTIFIER . (relational_operator . 5)) 
(STRING_LITERAL . (relational_operator . 5)) (CHARACTER_LITERAL . 
(relational_operator . 5)))
       ((default . error) (ABS . (relational_operator . 2)) (LEFT_PAREN . 
(relational_operator . 2)) (NEW . (relational_operator . 2)) (NOT . 
(relational_operator . 2)) (NULL . (relational_operator . 2)) (MINUS . 
(relational_operator . 2)) (PLUS . (relational_operator . 2)) (NUMERIC_LITERAL 
. (relational_operator . 2)) (IDENTIFIER . (relational_operator . 2)) 
(STRING_LITERAL . (relational_operator . 2)) (CHARACTER_LITERAL . 
(relational_operator . 2)))
       ((default . error) (ABS . (relational_operator . 3)) (LEFT_PAREN . 
(relational_operator . 3)) (NEW . (relational_operator . 3)) (NOT . 
(relational_operator . 3)) (NULL . (relational_operator . 3)) (MINUS . 
(relational_operator . 3)) (PLUS . (relational_operator . 3)) (NUMERIC_LITERAL 
. (relational_operator . 3)) (IDENTIFIER . (relational_operator . 3)) 
(STRING_LITERAL . (relational_operator . 3)) (CHARACTER_LITERAL . 
(relational_operator . 3)))
       ((default . error) (ABS . (relational_operator . 1)) (LEFT_PAREN . 
(relational_operator . 1)) (NEW . (relational_operator . 1)) (NOT . 
(relational_operator . 1)) (NULL . (relational_operator . 1)) (MINUS . 
(relational_operator . 1)) (PLUS . (relational_operator . 1)) (NUMERIC_LITERAL 
. (relational_operator . 1)) (IDENTIFIER . (relational_operator . 1)) 
(STRING_LITERAL . (relational_operator . 1)) (CHARACTER_LITERAL . 
(relational_operator . 1)))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
-      ((default . error) (RANGE .  468) (LEFT_PAREN .  216) (ACCESS .  213) 
(DELTA .  214) (DIGITS .  215) (MOD .  217) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
-      ((default . error) (OTHERS .  175) (IDENTIFIER .  48) (CHARACTER_LITERAL 
.  50) (STRING_LITERAL .  49) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
174) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
-      ((default . error) (BOX .  464) (RAISE .  149) (PLUS .  151) (MINUS .  
150) (ABS .  144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  
146) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) 
(LEFT_PAREN .  145))
-      ((default . error) (THEN .  462) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (ELSE .  460) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
-      ((default . error) (ELSE .  458))
-      ((default . error) (THEN .  457))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
-      ((default . error) (BOX .  451) (RAISE .  149) (PLUS .  151) (MINUS .  
150) (ABS .  144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  
146) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) 
(LEFT_PAREN .  145))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
+      ((default . error) (RANGE .  476) (LEFT_PAREN .  148) (ACCESS .  221) 
(DELTA .  222) (DIGITS .  223) (MOD .  224) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
+      ((default . error) (OTHERS .  182) (IDENTIFIER .  48) (CHARACTER_LITERAL 
.  50) (STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
181) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (LEFT_PAREN .  148))
+      ((default . error) (BOX .  472) (RAISE .  152) (PLUS .  154) (MINUS .  
153) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  
149) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) 
(LEFT_PAREN .  148))
+      ((default . error) (THEN .  470) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (ELSE .  468) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
+      ((default . error) (ELSE .  466))
+      ((default . error) (THEN .  465))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
+      ((default . error) (BOX .  459) (RAISE .  152) (PLUS .  154) (MINUS .  
153) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  
149) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) 
(LEFT_PAREN .  148))
       ((default . error) (XOR . (primary . 1)) (OR . (primary . 1)) (AND . 
(primary . 1)) (SLASH_EQUAL . (primary . 1)) (LESS_EQUAL . (primary . 1)) (LESS 
. (primary . 1)) (GREATER_EQUAL . (primary . 1)) (GREATER . (primary . 1)) 
(EQUAL . (primary . 1)) (EQUAL_GREATER . (primary . 1)) (BAR . (primary . 1)) 
(PLUS . (primary . 1)) (MINUS . (primary . 1)) (AMPERSAND . (primary . 1)) 
(DOT_DOT . (primary . 1)) (MOD . (primary . 1)) (REM . (primary . 1)) (SLASH . 
(primary . 1)) (STAR . (primar [...]
-      ((default . error) (COLON_EQUAL . (factor . 3)) (OF . (factor . 3)) 
(LOOP . (factor . 3)) (DO . (factor . 3)) (PLUS . (factor . 3)) (MINUS . 
(factor . 3)) (AMPERSAND . (factor . 3)) (SEMICOLON . (factor . 3)) (MOD . 
(factor . 3)) (REM . (factor . 3)) (SLASH . (factor . 3)) (STAR . (factor . 3)) 
(XOR . (factor . 3)) (OR . (factor . 3)) (AND . (factor . 3)) (IN . (factor . 
3)) (NOT . (factor . 3)) (EQUAL . (factor . 3)) (GREATER . (factor . 3)) 
(GREATER_EQUAL . (factor . 3)) (LESS .  [...]
-      ((default . error) (IDENTIFIER .  445) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  446))
-      ((default . error) (BODY .  444) (IDENTIFIER .  48) (CHARACTER_LITERAL . 
 50) (STRING_LITERAL .  49))
-      ((default . error) (IDENTIFIER .  443) (TYPE .  442) (BODY .  441))
-      ((default . error) (IDENTIFIER .  440))
-      ((default . error) (TYPE .  438) (BODY .  437) (IDENTIFIER .  439))
-      ((default . error) (IDENTIFIER .  436))
-      ((default . error) (COLON . ( 435 (identifier_list . 0))) (COMMA . 
(identifier_list . 0)))
+      ((default . error) (COLON_EQUAL . (factor . 3)) (OF . (factor . 3)) 
(LOOP . (factor . 3)) (DO . (factor . 3)) (PLUS . (factor . 3)) (MINUS . 
(factor . 3)) (AMPERSAND . (factor . 3)) (SEMICOLON . (factor . 3)) (MOD . 
(factor . 3)) (REM . (factor . 3)) (SLASH . (factor . 3)) (STAR . (factor . 3)) 
(XOR . (factor . 3)) (OR . (factor . 3)) (AND . (factor . 3)) (IN . (factor . 
3)) (NOT . (factor . 3)) (EQUAL . (factor . 3)) (GREATER . (factor . 3)) 
(GREATER_EQUAL . (factor . 3)) (LESS .  [...]
+      ((default . error) (IDENTIFIER .  453) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  454))
+      ((default . error) (BODY .  452) (IDENTIFIER .  48) (CHARACTER_LITERAL . 
 50) (STRING_LITERAL .  49))
+      ((default . error) (IDENTIFIER .  451) (TYPE .  450) (BODY .  449))
+      ((default . error) (IDENTIFIER .  448))
+      ((default . error) (TYPE .  446) (BODY .  445) (IDENTIFIER .  447))
+      ((default . error) (IDENTIFIER .  444))
+      ((default . error) (COLON . ( 443 (identifier_list . 0))) (COMMA . 
(identifier_list . 0)))
       ((default . error) (END . (declaration . 0)) (PRIVATE . (declaration . 
0)) (IDENTIFIER . (declaration . 0)) (USE . (declaration . 0)) (TYPE . 
(declaration . 0)) (TASK . (declaration . 0)) (SUBTYPE . (declaration . 0)) 
(PROTECTED . (declaration . 0)) (PROCEDURE . (declaration . 0)) (PRAGMA . 
(declaration . 0)) (PACKAGE . (declaration . 0)) (OVERRIDING . (declaration . 
0)) (NOT . (declaration . 0)) (GENERIC . (declaration . 0)) (FUNCTION . 
(declaration . 0)) (FOR . (declaration . 0)) [...]
       ((default . error) (END . (declaration . 1)) (PRIVATE . (declaration . 
1)) (IDENTIFIER . (declaration . 1)) (USE . (declaration . 1)) (TYPE . 
(declaration . 1)) (TASK . (declaration . 1)) (SUBTYPE . (declaration . 1)) 
(PROTECTED . (declaration . 1)) (PROCEDURE . (declaration . 1)) (PRAGMA . 
(declaration . 1)) (PACKAGE . (declaration . 1)) (OVERRIDING . (declaration . 
1)) (NOT . (declaration . 1)) (GENERIC . (declaration . 1)) (FUNCTION . 
(declaration . 1)) (FOR . (declaration . 1)) [...]
       ((default . error) (WHEN . (aspect_clause . 3)) (PRIVATE . 
(aspect_clause . 3)) (END . (aspect_clause . 3)) (CASE . (aspect_clause . 3)) 
(BEGIN . (aspect_clause . 3)) (ENTRY . (aspect_clause . 3)) (FOR . 
(aspect_clause . 3)) (FUNCTION . (aspect_clause . 3)) (GENERIC . (aspect_clause 
. 3)) (NOT . (aspect_clause . 3)) (OVERRIDING . (aspect_clause . 3)) (PACKAGE . 
(aspect_clause . 3)) (PRAGMA . (aspect_clause . 3)) (PROCEDURE . (aspect_clause 
. 3)) (PROTECTED . (aspect_clause . 3)) (S [...]
       ((default . error) (END . (declaration . 2)) (PRIVATE . (declaration . 
2)) (IDENTIFIER . (declaration . 2)) (USE . (declaration . 2)) (TYPE . 
(declaration . 2)) (TASK . (declaration . 2)) (SUBTYPE . (declaration . 2)) 
(PROTECTED . (declaration . 2)) (PROCEDURE . (declaration . 2)) (PRAGMA . 
(declaration . 2)) (PACKAGE . (declaration . 2)) (OVERRIDING . (declaration . 
2)) (NOT . (declaration . 2)) (GENERIC . (declaration . 2)) (FUNCTION . 
(declaration . 2)) (FOR . (declaration . 2)) [...]
       ((default . error) (PRIVATE . (body . 1)) (END . (body . 1)) (BEGIN . 
(body . 1)) (ENTRY . (body . 1)) (FOR . (body . 1)) (FUNCTION . (body . 1)) 
(GENERIC . (body . 1)) (NOT . (body . 1)) (OVERRIDING . (body . 1)) (PACKAGE . 
(body . 1)) (PRAGMA . (body . 1)) (PROCEDURE . (body . 1)) (PROTECTED . (body . 
1)) (SUBTYPE . (body . 1)) (TASK . (body . 1)) (TYPE . (body . 1)) (USE . (body 
. 1)) (IDENTIFIER . (body . 1)))
       ((default . error) (PRIVATE . (declarations . 0)) (END . (declarations . 
0)) (BEGIN . (declarations . 0)) (ENTRY . (declarations . 0)) (FOR . 
(declarations . 0)) (FUNCTION . (declarations . 0)) (GENERIC . (declarations . 
0)) (NOT . (declarations . 0)) (OVERRIDING . (declarations . 0)) (PACKAGE . 
(declarations . 0)) (PRAGMA . (declarations . 0)) (PROCEDURE . (declarations . 
0)) (PROTECTED . (declarations . 0)) (SUBTYPE . (declarations . 0)) (TASK . 
(declarations . 0)) (TYPE . (decla [...]
-      ((default . error) (END . (declarative_part_opt . 1)) (PRIVATE . 
(declarative_part_opt . 1)) (BEGIN . (declarative_part_opt . 1)) (USE .  11) 
(SUBTYPE .  301) (PRAGMA .  7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(ENTRY . (overriding_indicator_opt . 2)) (FOR .  298) (IDENTIFIER .  304) (TYPE 
.  303) (GENERIC .  2) (PROTECTED .  300) (TASK .  302) (PACKAGE .  299))
-      ((default . error) (END .  432) (PRIVATE .  433))
+      ((default . error) (END . (declarative_part_opt . 1)) (PRIVATE . 
(declarative_part_opt . 1)) (BEGIN . (declarative_part_opt . 1)) (USE .  11) 
(SUBTYPE .  302) (PRAGMA .  7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(ENTRY . (overriding_indicator_opt . 2)) (FOR .  299) (IDENTIFIER .  305) (TYPE 
.  304) (GENERIC .  2) (PROTECTED .  301) (TASK .  303) (PACKAGE .  300))
+      ((default . error) (END .  440) (PRIVATE .  441))
       ((default . error) (END . (declaration . 3)) (PRIVATE . (declaration . 
3)) (IDENTIFIER . (declaration . 3)) (USE . (declaration . 3)) (TYPE . 
(declaration . 3)) (TASK . (declaration . 3)) (SUBTYPE . (declaration . 3)) 
(PROTECTED . (declaration . 3)) (PROCEDURE . (declaration . 3)) (PRAGMA . 
(declaration . 3)) (PACKAGE . (declaration . 3)) (OVERRIDING . (declaration . 
3)) (NOT . (declaration . 3)) (GENERIC . (declaration . 3)) (FUNCTION . 
(declaration . 3)) (FOR . (declaration . 3)) [...]
       ((default . error) (WHEN . (aspect_clause . 1)) (PRIVATE . 
(aspect_clause . 1)) (END . (aspect_clause . 1)) (CASE . (aspect_clause . 1)) 
(BEGIN . (aspect_clause . 1)) (ENTRY . (aspect_clause . 1)) (FOR . 
(aspect_clause . 1)) (FUNCTION . (aspect_clause . 1)) (GENERIC . (aspect_clause 
. 1)) (NOT . (aspect_clause . 1)) (OVERRIDING . (aspect_clause . 1)) (PACKAGE . 
(aspect_clause . 1)) (PRAGMA . (aspect_clause . 1)) (PROCEDURE . (aspect_clause 
. 1)) (PROTECTED . (aspect_clause . 1)) (S [...]
       ((default . error) (END . (declaration . 4)) (PRIVATE . (declaration . 
4)) (IDENTIFIER . (declaration . 4)) (USE . (declaration . 4)) (TYPE . 
(declaration . 4)) (TASK . (declaration . 4)) (SUBTYPE . (declaration . 4)) 
(PROTECTED . (declaration . 4)) (PROCEDURE . (declaration . 4)) (PRAGMA . 
(declaration . 4)) (PACKAGE . (declaration . 4)) (OVERRIDING . (declaration . 
4)) (NOT . (declaration . 4)) (GENERIC . (declaration . 4)) (FUNCTION . 
(declaration . 4)) (FOR . (declaration . 4)) [...]
@@ -2125,12 +2136,12 @@
       ((default . error) (END . (declaration . 6)) (PRIVATE . (declaration . 
6)) (IDENTIFIER . (declaration . 6)) (USE . (declaration . 6)) (TYPE . 
(declaration . 6)) (TASK . (declaration . 6)) (SUBTYPE . (declaration . 6)) 
(PROTECTED . (declaration . 6)) (PROCEDURE . (declaration . 6)) (PRAGMA . 
(declaration . 6)) (PACKAGE . (declaration . 6)) (OVERRIDING . (declaration . 
6)) (NOT . (declaration . 6)) (GENERIC . (declaration . 6)) (FUNCTION . 
(declaration . 6)) (FOR . (declaration . 6)) [...]
       ((default . error) (END . (declaration . 7)) (PRIVATE . (declaration . 
7)) (IDENTIFIER . (declaration . 7)) (USE . (declaration . 7)) (TYPE . 
(declaration . 7)) (TASK . (declaration . 7)) (SUBTYPE . (declaration . 7)) 
(PROTECTED . (declaration . 7)) (PROCEDURE . (declaration . 7)) (PRAGMA . 
(declaration . 7)) (PACKAGE . (declaration . 7)) (OVERRIDING . (declaration . 
7)) (NOT . (declaration . 7)) (GENERIC . (declaration . 7)) (FUNCTION . 
(declaration . 7)) (FOR . (declaration . 7)) [...]
       ((default . error) (PRIVATE . (renaming_declaration . 3)) (END . 
(renaming_declaration . 3)) (BEGIN . (renaming_declaration . 3)) (ENTRY . 
(renaming_declaration . 3)) (FOR . (renaming_declaration . 3)) (FUNCTION . 
(renaming_declaration . 3)) (GENERIC . (renaming_declaration . 3)) (NOT . 
(renaming_declaration . 3)) (OVERRIDING . (renaming_declaration . 3)) (PACKAGE 
. (renaming_declaration . 3)) (PRAGMA . (renaming_declaration . 3)) (PROCEDURE 
. (renaming_declaration . 3)) (PROTECTED [...]
-      ((default . error) (COMMA .  96) (COLON .  431))
+      ((default . error) (COMMA .  96) (COLON .  439))
       ((default . error) (PRIVATE . (type_declaration . 1)) (END . 
(type_declaration . 1)) (BEGIN . (type_declaration . 1)) (ENTRY . 
(type_declaration . 1)) (FOR . (type_declaration . 1)) (FUNCTION . 
(type_declaration . 1)) (GENERIC . (type_declaration . 1)) (NOT . 
(type_declaration . 1)) (OVERRIDING . (type_declaration . 1)) (PACKAGE . 
(type_declaration . 1)) (PRAGMA . (type_declaration . 1)) (PROCEDURE . 
(type_declaration . 1)) (PROTECTED . (type_declaration . 1)) (SUBTYPE . 
(type_decl [...]
       ((default . error) (END . (declaration . 8)) (PRIVATE . (declaration . 
8)) (IDENTIFIER . (declaration . 8)) (USE . (declaration . 8)) (TYPE . 
(declaration . 8)) (TASK . (declaration . 8)) (SUBTYPE . (declaration . 8)) 
(PROTECTED . (declaration . 8)) (PROCEDURE . (declaration . 8)) (PRAGMA . 
(declaration . 8)) (PACKAGE . (declaration . 8)) (OVERRIDING . (declaration . 
8)) (NOT . (declaration . 8)) (GENERIC . (declaration . 8)) (FUNCTION . 
(declaration . 8)) (FOR . (declaration . 8)) [...]
       ((default . error) (END . (declaration . 10)) (PRIVATE . (declaration . 
10)) (IDENTIFIER . (declaration . 10)) (USE . (declaration . 10)) (TYPE . 
(declaration . 10)) (TASK . (declaration . 10)) (SUBTYPE . (declaration . 10)) 
(PROTECTED . (declaration . 10)) (PROCEDURE . (declaration . 10)) (PRAGMA . 
(declaration . 10)) (PACKAGE . (declaration . 10)) (OVERRIDING . (declaration . 
10)) (NOT . (declaration . 10)) (GENERIC . (declaration . 10)) (FUNCTION . 
(declaration . 10)) (FOR . (de [...]
       ((default . error) (PRIVATE . (renaming_declaration . 0)) (END . 
(renaming_declaration . 0)) (BEGIN . (renaming_declaration . 0)) (ENTRY . 
(renaming_declaration . 0)) (FOR . (renaming_declaration . 0)) (FUNCTION . 
(renaming_declaration . 0)) (GENERIC . (renaming_declaration . 0)) (NOT . 
(renaming_declaration . 0)) (OVERRIDING . (renaming_declaration . 0)) (PACKAGE 
. (renaming_declaration . 0)) (PRAGMA . (renaming_declaration . 0)) (PROCEDURE 
. (renaming_declaration . 0)) (PROTECTED [...]
-      ((default . error) (ENTRY .  427) (FUNCTION .  40) (PROCEDURE .  41))
+      ((default . error) (ENTRY .  435) (FUNCTION .  40) (PROCEDURE .  41))
       ((default . error) ($EOI . (proper_body . 1)) (LIMITED . (proper_body . 
1)) (SEPARATE . (proper_body . 1)) (WITH . (proper_body . 1)) (END . 
(proper_body . 1)) (PRIVATE . (proper_body . 1)) (IDENTIFIER . (proper_body . 
1)) (USE . (proper_body . 1)) (TYPE . (proper_body . 1)) (TASK . (proper_body . 
1)) (SUBTYPE . (proper_body . 1)) (PROTECTED . (proper_body . 1)) (PROCEDURE . 
(proper_body . 1)) (PRAGMA . (proper_body . 1)) (PACKAGE . (proper_body . 1)) 
(OVERRIDING . (proper_body . 1 [...]
       ((default . error) (END . (body_stub . 1)) (PRIVATE . (body_stub . 1)) 
(IDENTIFIER . (body_stub . 1)) (USE . (body_stub . 1)) (TYPE . (body_stub . 1)) 
(TASK . (body_stub . 1)) (SUBTYPE . (body_stub . 1)) (PROTECTED . (body_stub . 
1)) (PROCEDURE . (body_stub . 1)) (PRAGMA . (body_stub . 1)) (PACKAGE . 
(body_stub . 1)) (OVERRIDING . (body_stub . 1)) (NOT . (body_stub . 1)) 
(GENERIC . (body_stub . 1)) (FUNCTION . (body_stub . 1)) (FOR . (body_stub . 
1)) (ENTRY . (body_stub . 1)) (BEGI [...]
       ((default . error) (END . (declaration . 11)) (PRIVATE . (declaration . 
11)) (IDENTIFIER . (declaration . 11)) (USE . (declaration . 11)) (TYPE . 
(declaration . 11)) (TASK . (declaration . 11)) (SUBTYPE . (declaration . 11)) 
(PROTECTED . (declaration . 11)) (PROCEDURE . (declaration . 11)) (PRAGMA . 
(declaration . 11)) (PACKAGE . (declaration . 11)) (OVERRIDING . (declaration . 
11)) (NOT . (declaration . 11)) (GENERIC . (declaration . 11)) (FUNCTION . 
(declaration . 11)) (FOR . (de [...]
@@ -2156,298 +2167,302 @@
       ((default . error) (END . (full_type_declaration . 1)) (PRIVATE . 
(full_type_declaration . 1)) (IDENTIFIER . (full_type_declaration . 1)) (USE . 
(full_type_declaration . 1)) (TYPE . (full_type_declaration . 1)) (TASK . 
(full_type_declaration . 1)) (SUBTYPE . (full_type_declaration . 1)) (PROTECTED 
. (full_type_declaration . 1)) (PROCEDURE . (full_type_declaration . 1)) 
(PRAGMA . (full_type_declaration . 1)) (PACKAGE . (full_type_declaration . 1)) 
(OVERRIDING . (full_type_declaratio [...]
       ((default . error) (END . (declaration . 16)) (PRIVATE . (declaration . 
16)) (IDENTIFIER . (declaration . 16)) (USE . (declaration . 16)) (TYPE . 
(declaration . 16)) (TASK . (declaration . 16)) (SUBTYPE . (declaration . 16)) 
(PROTECTED . (declaration . 16)) (PROCEDURE . (declaration . 16)) (PRAGMA . 
(declaration . 16)) (PACKAGE . (declaration . 16)) (OVERRIDING . (declaration . 
16)) (NOT . (declaration . 16)) (GENERIC . (declaration . 16)) (FUNCTION . 
(declaration . 16)) (FOR . (de [...]
       ((default . error) (END . (declaration . 17)) (PRIVATE . (declaration . 
17)) (IDENTIFIER . (declaration . 17)) (USE . (declaration . 17)) (TYPE . 
(declaration . 17)) (TASK . (declaration . 17)) (SUBTYPE . (declaration . 17)) 
(PROTECTED . (declaration . 17)) (PROCEDURE . (declaration . 17)) (PRAGMA . 
(declaration . 17)) (PACKAGE . (declaration . 17)) (OVERRIDING . (declaration . 
17)) (NOT . (declaration . 17)) (GENERIC . (declaration . 17)) (FUNCTION . 
(declaration . 17)) (FOR . (de [...]
-      ((default . error) (BEGIN . (declarative_part_opt . 0)) (END . 
(declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  301) (PRAGMA .  7) (NOT .  
4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) (PROCEDURE . 
(overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt . 2)) (FOR . 
 298) (IDENTIFIER .  304) (TYPE .  303) (GENERIC .  2) (PROTECTED .  300) (TASK 
.  302) (PACKAGE .  299))
-      ((default . error) (COLON_EQUAL . (simple_expression . 0)) (OF . 
(simple_expression . 0)) (LOOP . (simple_expression . 0)) (DO . 
(simple_expression . 0)) (DOT_DOT . (simple_expression . 0)) (SEMICOLON . 
(simple_expression . 0)) (XOR . (simple_expression . 0)) (OR . 
(simple_expression . 0)) (AND . (simple_expression . 0)) (SLASH_EQUAL . 
(simple_expression . 0)) (LESS_EQUAL . (simple_expression . 0)) (LESS . 
(simple_expression . 0)) (GREATER_EQUAL . (simple_expression . 0)) (GREATER  
[...]
+      ((default . error) (BEGIN . (declarative_part_opt . 0)) (END . 
(declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  302) (PRAGMA .  7) (NOT .  
4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) (PROCEDURE . 
(overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt . 2)) (FOR . 
 299) (IDENTIFIER .  305) (TYPE .  304) (GENERIC .  2) (PROTECTED .  301) (TASK 
.  303) (PACKAGE .  300))
+      ((default . error) (COLON_EQUAL . (simple_expression . 0)) (OF . 
(simple_expression . 0)) (LOOP . (simple_expression . 0)) (DO . 
(simple_expression . 0)) (DOT_DOT . (simple_expression . 0)) (SEMICOLON . 
(simple_expression . 0)) (XOR . (simple_expression . 0)) (OR . 
(simple_expression . 0)) (AND . (simple_expression . 0)) (SLASH_EQUAL . 
(simple_expression . 0)) (LESS_EQUAL . (simple_expression . 0)) (LESS . 
(simple_expression . 0)) (GREATER_EQUAL . (simple_expression . 0)) (GREATER  
[...]
       ((default . error) (ABS . (binary_adding_operator . 2)) (LEFT_PAREN . 
(binary_adding_operator . 2)) (NEW . (binary_adding_operator . 2)) (NOT . 
(binary_adding_operator . 2)) (NULL . (binary_adding_operator . 2)) 
(NUMERIC_LITERAL . (binary_adding_operator . 2)) (IDENTIFIER . 
(binary_adding_operator . 2)) (STRING_LITERAL . (binary_adding_operator . 2)) 
(CHARACTER_LITERAL . (binary_adding_operator . 2)))
       ((default . error) (ABS . (binary_adding_operator . 1)) (LEFT_PAREN . 
(binary_adding_operator . 1)) (NEW . (binary_adding_operator . 1)) (NOT . 
(binary_adding_operator . 1)) (NULL . (binary_adding_operator . 1)) 
(NUMERIC_LITERAL . (binary_adding_operator . 1)) (IDENTIFIER . 
(binary_adding_operator . 1)) (STRING_LITERAL . (binary_adding_operator . 1)) 
(CHARACTER_LITERAL . (binary_adding_operator . 1)))
       ((default . error) (ABS . (binary_adding_operator . 0)) (LEFT_PAREN . 
(binary_adding_operator . 0)) (NEW . (binary_adding_operator . 0)) (NOT . 
(binary_adding_operator . 0)) (NULL . (binary_adding_operator . 0)) 
(NUMERIC_LITERAL . (binary_adding_operator . 0)) (IDENTIFIER . 
(binary_adding_operator . 0)) (STRING_LITERAL . (binary_adding_operator . 0)) 
(CHARACTER_LITERAL . (binary_adding_operator . 0)))
-      ((default . error) (ABS .  144) (NOT .  147) (NUMERIC_LITERAL .  152) 
(NULL .  148) (NEW .  146) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (LEFT_PAREN .  145))
+      ((default . error) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) 
(NULL .  151) (NEW .  149) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (LEFT_PAREN .  148))
       ((default . error) (ABS . (multiplying_operator . 2)) (LEFT_PAREN . 
(multiplying_operator . 2)) (NEW . (multiplying_operator . 2)) (NOT . 
(multiplying_operator . 2)) (NULL . (multiplying_operator . 2)) 
(NUMERIC_LITERAL . (multiplying_operator . 2)) (IDENTIFIER . 
(multiplying_operator . 2)) (STRING_LITERAL . (multiplying_operator . 2)) 
(CHARACTER_LITERAL . (multiplying_operator . 2)))
       ((default . error) (ABS . (multiplying_operator . 3)) (LEFT_PAREN . 
(multiplying_operator . 3)) (NEW . (multiplying_operator . 3)) (NOT . 
(multiplying_operator . 3)) (NULL . (multiplying_operator . 3)) 
(NUMERIC_LITERAL . (multiplying_operator . 3)) (IDENTIFIER . 
(multiplying_operator . 3)) (STRING_LITERAL . (multiplying_operator . 3)) 
(CHARACTER_LITERAL . (multiplying_operator . 3)))
       ((default . error) (ABS . (multiplying_operator . 1)) (LEFT_PAREN . 
(multiplying_operator . 1)) (NEW . (multiplying_operator . 1)) (NOT . 
(multiplying_operator . 1)) (NULL . (multiplying_operator . 1)) 
(NUMERIC_LITERAL . (multiplying_operator . 1)) (IDENTIFIER . 
(multiplying_operator . 1)) (STRING_LITERAL . (multiplying_operator . 1)) 
(CHARACTER_LITERAL . (multiplying_operator . 1)))
       ((default . error) (ABS . (multiplying_operator . 0)) (LEFT_PAREN . 
(multiplying_operator . 0)) (NEW . (multiplying_operator . 0)) (NOT . 
(multiplying_operator . 0)) (NULL . (multiplying_operator . 0)) 
(NUMERIC_LITERAL . (multiplying_operator . 0)) (IDENTIFIER . 
(multiplying_operator . 0)) (STRING_LITERAL . (multiplying_operator . 0)) 
(CHARACTER_LITERAL . (multiplying_operator . 0)))
-      ((default . error) (ABS .  144) (NOT .  147) (NUMERIC_LITERAL .  152) 
(NULL .  148) (NEW .  146) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (LEFT_PAREN .  145))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
-      ((default . error) (THEN .  421) (RAISE .  149) (PLUS .  151) (MINUS .  
150) (ABS .  144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  
146) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) 
(LEFT_PAREN .  145))
-      ((default . error) (ELSE .  419) (RAISE .  149) (PLUS .  151) (MINUS .  
150) (ABS .  144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  
146) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) 
(LEFT_PAREN .  145))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (ELSE .  416))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (THEN .  414))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (SEMICOLON .  411))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  153) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) 
(LEFT_PAREN .  145))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (IDENTIFIER .  408))
-      ((default . error) (LOOP . (raise_expression . 0)) (DO . 
(raise_expression . 0)) (XOR . (raise_expression . 0)) (OR . (raise_expression 
. 0)) (AND . (raise_expression . 0)) (IS . (raise_expression . 0)) (SEMICOLON . 
(raise_expression . 0)) (THEN . (raise_expression . 0)) (RANGE . 
(raise_expression . 0)) (RIGHT_PAREN . (raise_expression . 0)) (COMMA . 
(raise_expression . 0)) (DIGITS . (raise_expression . 0)) (EQUAL_GREATER . 
(raise_expression . 0)) (ELSE . (raise_expression . 0)) (E [...]
+      ((default . error) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) 
(NULL .  151) (NEW .  149) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (LEFT_PAREN .  148))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
+      ((default . error) (THEN .  429) (RAISE .  152) (PLUS .  154) (MINUS .  
153) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  
149) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) 
(LEFT_PAREN .  148))
+      ((default . error) (ELSE .  427) (RAISE .  152) (PLUS .  154) (MINUS .  
153) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  
149) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) 
(LEFT_PAREN .  148))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (ELSE .  424))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (THEN .  422))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (SEMICOLON .  419))
+      ((default . error) (FOR .  146) (CASE .  145) (IF .  147) (RAISE .  152) 
(PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) 
(NULL .  151) (NEW .  149) (IDENTIFIER .  156) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (LEFT_PAREN .  148))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (IDENTIFIER .  416))
+      ((default . error) (LOOP . (raise_expression . 0)) (DO . 
(raise_expression . 0)) (XOR . (raise_expression . 0)) (OR . (raise_expression 
. 0)) (AND . (raise_expression . 0)) (IS . (raise_expression . 0)) (SEMICOLON . 
(raise_expression . 0)) (THEN . (raise_expression . 0)) (RANGE . 
(raise_expression . 0)) (RIGHT_PAREN . (raise_expression . 0)) (COMMA . 
(raise_expression . 0)) (DIGITS . (raise_expression . 0)) (EQUAL_GREATER . 
(raise_expression . 0)) (ELSE . (raise_expression . 0)) (E [...]
       ((default . error) (DOT .  90) (TICK .  91) (COLON_EQUAL . (primary . 
4)) (OF . (primary . 4)) (LOOP . (primary . 4)) (DO . (primary . 4)) (STAR_STAR 
. (primary . 4)) (STAR . (primary . 4)) (SLASH . (primary . 4)) (REM . (primary 
. 4)) (MOD . (primary . 4)) (DOT_DOT . (primary . 4)) (AMPERSAND . (primary . 
4)) (MINUS . (primary . 4)) (PLUS . (primary . 4)) (SEMICOLON . (primary . 4)) 
(XOR . (primary . 4)) (OR . (primary . 4)) (AND . (primary . 4)) (SLASH_EQUAL . 
(primary . 4)) (LES [...]
-      ((default . error) (ALL .  404) (SOME .  405))
-      ((default . error) (RIGHT_PAREN .  403))
-      ((default . error) (RIGHT_PAREN .  402))
-      ((default . error) (RIGHT_PAREN .  401))
+      ((default . error) (DOT_DOT . (primary . 1)) (RIGHT_PAREN . (primary . 
1)) (COMMA . (primary . 1)) (BAR . (primary . 1)) (EQUAL_GREATER . (primary . 
1)) (PLUS . (primary . 1)) (MINUS . (primary . 1)) (AMPERSAND . (primary . 1)) 
(IN . (primary . 1)) (NOT . (primary . 1)) (EQUAL . (primary . 1)) (GREATER . 
(primary . 1)) (GREATER_EQUAL . (primary . 1)) (LESS . (primary . 1)) 
(LESS_EQUAL . (primary . 1)) (SLASH_EQUAL . (primary . 1)) (WITH . (primary . 
1)) (MOD . (primary . 1)) (REM . [...]
+      ((default . error) (COMMA .  273) (RIGHT_PAREN .  413))
+      ((default . error) (RIGHT_PAREN .  412))
+      ((default . error) (RIGHT_PAREN . (expression_opt . 1)) (COMMA . 
(expression_opt . 1)) (WITH .  411))
+      ((default . error) (THEN .  410))
+      ((default . error) (IDENTIFIER . (quantifier . 0)))
+      ((default . error) (IDENTIFIER . (quantifier . 1)))
+      ((default . error) (IDENTIFIER .  408))
+      ((default . error) (IS .  407))
       ((default . error) (COLON_EQUAL . (factor . 2)) (OF . (factor . 2)) 
(LOOP . (factor . 2)) (DO . (factor . 2)) (PLUS . (factor . 2)) (MINUS . 
(factor . 2)) (AMPERSAND . (factor . 2)) (DOT_DOT . (factor . 2)) (MOD . 
(factor . 2)) (REM . (factor . 2)) (SLASH . (factor . 2)) (STAR . (factor . 2)) 
(SEMICOLON . (factor . 2)) (XOR . (factor . 2)) (OR . (factor . 2)) (AND . 
(factor . 2)) (IN . (factor . 2)) (NOT . (factor . 2)) (EQUAL . (factor . 2)) 
(GREATER . (factor . 2)) (GREATER_EQUAL [...]
       ((default . error) (BODY .  67))
-      ((default . error) (BODY .  400))
-      ((default . error) (BODY .  399))
+      ((default . error) (BODY .  406))
+      ((default . error) (BODY .  405))
       ((default . error) (FUNCTION .  1) (PROCEDURE .  9))
       ((default . error) ($EOI . (subunit . 0)) (FUNCTION . (subunit . 0)) 
(GENERIC . (subunit . 0)) (LIMITED . (subunit . 0)) (NOT . (subunit . 0)) 
(OVERRIDING . (subunit . 0)) (PACKAGE . (subunit . 0)) (PRAGMA . (subunit . 0)) 
(PRIVATE . (subunit . 0)) (PROCEDURE . (subunit . 0)) (SEPARATE . (subunit . 
0)) (USE . (subunit . 0)) (WITH . (subunit . 0)))
       ((default . error) (SEPARATE . (use_clause . 1)) (LIMITED . (use_clause 
. 1)) ($EOI . (use_clause . 1)) (WITH . (use_clause . 1)) (PRIVATE . 
(use_clause . 1)) (END . (use_clause . 1)) (BEGIN . (use_clause . 1)) (ENTRY . 
(use_clause . 1)) (FOR . (use_clause . 1)) (FUNCTION . (use_clause . 1)) 
(GENERIC . (use_clause . 1)) (NOT . (use_clause . 1)) (OVERRIDING . (use_clause 
. 1)) (PACKAGE . (use_clause . 1)) (PRAGMA . (use_clause . 1)) (PROCEDURE . 
(use_clause . 1)) (PROTECTED . (use_c [...]
-      ((default . error) (SEMICOLON .  397))
-      ((default . error) (BEGIN .  396))
+      ((default . error) (SEMICOLON .  403))
+      ((default . error) (BEGIN .  402))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
       ((default . error) (DOT .  90) (TICK .  91) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109) (LEFT_PAREN .  107))
       ((default . error) (DOT .  90) (TICK .  91) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109) (LEFT_PAREN .  107))
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (EXCEPTION . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt  [...]
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (EXCEPTION . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt  [...]
       ((default . error) (BEGIN . (subprogram_renaming_declaration . 0)) 
(ENTRY . (subprogram_renaming_declaration . 0)) (FOR . 
(subprogram_renaming_declaration . 0)) (PROTECTED . 
(subprogram_renaming_declaration . 0)) (SUBTYPE . 
(subprogram_renaming_declaration . 0)) (TASK . (subprogram_renaming_declaration 
. 0)) (TYPE . (subprogram_renaming_declaration . 0)) (IDENTIFIER . 
(subprogram_renaming_declaration . 0)) (END . (subprogram_renaming_declaration 
. 0)) (WITH . (subprogram_renaming_d [...]
       ((default . error) (IS . (aspect_specification_opt . 0)) (WITH .  109))
-      ((default . error) (IDENTIFIER .  623))
-      ((default . error) (IDENTIFIER .  622))
-      ((default . error) (OF . (primary . 7)) (COLON_EQUAL . (primary . 7)) 
(DO . (primary . 7)) (LOOP . (primary . 7)) (ELSIF . (primary . 7)) (ELSE . 
(primary . 7)) (DIGITS . (primary . 7)) (RIGHT_PAREN . (primary . 7)) (COMMA . 
(primary . 7)) (RANGE . (primary . 7)) (THEN . (primary . 7)) (WITH . (primary 
. 7)) (BAR . (primary . 7)) (EQUAL_GREATER . (primary . 7)) (IS . (primary . 
7)) (IN . (primary . 7)) (NOT . (primary . 7)) (EQUAL . (primary . 7)) (GREATER 
. (primary . 7)) (GREATER [...]
-      ((default . error) (OF . ((aggregate . 3) (primary . 5))) (COLON_EQUAL . 
((aggregate . 3) (primary . 5))) (DO . ((aggregate . 3) (primary . 5))) (LOOP . 
((aggregate . 3) (primary . 5))) (ELSIF . ((aggregate . 3) (primary . 5))) 
(ELSE . ((aggregate . 3) (primary . 5))) (DIGITS . ((aggregate . 3) (primary . 
5))) (COMMA . ((aggregate . 3) (primary . 5))) (RIGHT_PAREN . ((aggregate . 3) 
(primary . 5))) (RANGE . ((aggregate . 3) (primary . 5))) (THEN . ((aggregate . 
3) (primary . 5))) ( [...]
-      ((default . error) (OF . ((aggregate . 2) (primary . 6))) (COLON_EQUAL . 
((aggregate . 2) (primary . 6))) (DO . ((aggregate . 2) (primary . 6))) (LOOP . 
((aggregate . 2) (primary . 6))) (ELSIF . ((aggregate . 2) (primary . 6))) 
(ELSE . ((aggregate . 2) (primary . 6))) (DIGITS . ((aggregate . 2) (primary . 
6))) (COMMA . ((aggregate . 2) (primary . 6))) (RIGHT_PAREN . ((aggregate . 2) 
(primary . 6))) (RANGE . ((aggregate . 2) (primary . 6))) (THEN . ((aggregate . 
2) (primary . 6))) ( [...]
-      ((default . error) (IDENTIFIER . (quantifier . 0)))
-      ((default . error) (IDENTIFIER . (quantifier . 1)))
-      ((default . error) (IDENTIFIER .  620))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (EQUAL_GREATER .  618))
+      ((default . error) (IDENTIFIER .  628))
+      ((default . error) (IDENTIFIER .  627))
+      ((default . error) (WHEN .  624))
+      ((default . error) (OF .  622) (COLON .  623) (IN .  621))
+      ((default . error) (EQUAL_GREATER .  620))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (RIGHT_PAREN . ((expression_opt . 0) (association_opt 
. 0))) (COMMA . ((expression_opt . 0) (association_opt . 0))) (EQUAL_GREATER . 
(discrete_choice_list . 0)) (BAR . (discrete_choice_list . 0)) (OTHERS .  182) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  183) (STRING_LITERAL .  49) (RAISE .  
152) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  181) (NUMERIC_LITERAL .  
155) (NULL .  617) (NEW .  149) (LEFT_PAREN .  148))
+      ((default . error) (USE . (aggregate . 2)) (COLON_EQUAL . (aggregate . 
2)) (CHARACTER_LITERAL . (aggregate . 2)) (STRING_LITERAL . (aggregate . 2)) 
(IDENTIFIER . (aggregate . 2)) (LESS_LESS . (aggregate . 2)) (WHILE . 
(aggregate . 2)) (SELECT . (aggregate . 2)) (REQUEUE . (aggregate . 2)) (RAISE 
. (aggregate . 2)) (PRAGMA . (aggregate . 2)) (NULL . (aggregate . 2)) (IF . 
(aggregate . 2)) (GOTO . (aggregate . 2)) (FOR . (aggregate . 2)) (EXIT . 
(aggregate . 2)) (DELAY . (aggregate . [...]
+      ((default . error) (USE . (aggregate . 0)) (COLON_EQUAL . (aggregate . 
0)) (CHARACTER_LITERAL . (aggregate . 0)) (STRING_LITERAL . (aggregate . 0)) 
(IDENTIFIER . (aggregate . 0)) (LESS_LESS . (aggregate . 0)) (WHILE . 
(aggregate . 0)) (SELECT . (aggregate . 0)) (REQUEUE . (aggregate . 0)) (RAISE 
. (aggregate . 0)) (PRAGMA . (aggregate . 0)) (NULL . (aggregate . 0)) (IF . 
(aggregate . 0)) (GOTO . (aggregate . 0)) (FOR . (aggregate . 0)) (EXIT . 
(aggregate . 0)) (DELAY . (aggregate . [...]
+      ((default . error) (RIGHT_PAREN .  616))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (EQUAL_GREATER .  614))
       ((default . error) (COMMA . (pragma_argument_association . 0)) 
(RIGHT_PAREN . (pragma_argument_association . 0)))
       ((default . error) (RIGHT_PAREN . (pragma_argument_association_list . 
1)) (COMMA . (pragma_argument_association_list . 1)))
       ((default . error) (WHEN . (pragma . 0)) (THEN . (pragma . 0)) (OR . 
(pragma . 0)) (ELSIF . (pragma . 0)) (ELSE . (pragma . 0)) (CHARACTER_LITERAL . 
(pragma . 0)) (STRING_LITERAL . (pragma . 0)) (LESS_LESS . (pragma . 0)) (WHILE 
. (pragma . 0)) (SELECT . (pragma . 0)) (RETURN . (pragma . 0)) (REQUEUE . 
(pragma . 0)) (RAISE . (pragma . 0)) (NULL . (pragma . 0)) (LOOP . (pragma . 
0)) (IF . (pragma . 0)) (GOTO . (pragma . 0)) (EXIT . (pragma . 0)) (DELAY . 
(pragma . 0)) (DECLARE . (pr [...]
       ((default . error) (OF . (factor . 0)) (COLON_EQUAL . (factor . 0)) (DO 
. (factor . 0)) (LOOP . (factor . 0)) (ELSIF . (factor . 0)) (ELSE . (factor . 
0)) (DIGITS . (factor . 0)) (COMMA . (factor . 0)) (RIGHT_PAREN . (factor . 0)) 
(RANGE . (factor . 0)) (THEN . (factor . 0)) (WITH . (factor . 0)) (BAR . 
(factor . 0)) (EQUAL_GREATER . (factor . 0)) (IS . (factor . 0)) (SLASH_EQUAL . 
(factor . 0)) (LESS_EQUAL . (factor . 0)) (LESS . (factor . 0)) (GREATER_EQUAL 
. (factor . 0)) (GREAT [...]
       ((default . error) (DO . (relation_and_list . 1)) (LOOP . 
(relation_and_list . 1)) (XOR . (relation_and_list . 1)) (OR . 
(relation_and_list . 1)) (ELSIF . (relation_and_list . 1)) (ELSE . 
(relation_and_list . 1)) (EQUAL_GREATER . (relation_and_list . 1)) (DIGITS . 
(relation_and_list . 1)) (RIGHT_PAREN . (relation_and_list . 1)) (COMMA . 
(relation_and_list . 1)) (RANGE . (relation_and_list . 1)) (THEN . 
(relation_and_list . 1)) (SEMICOLON . (relation_and_list . 1)) (WITH . 
(relation [...]
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
       ((default . error) (DO . (relation_or_list . 1)) (LOOP . 
(relation_or_list . 1)) (XOR . (relation_or_list . 1)) (AND . (relation_or_list 
. 1)) (ELSIF . (relation_or_list . 1)) (ELSE . (relation_or_list . 1)) 
(EQUAL_GREATER . (relation_or_list . 1)) (DIGITS . (relation_or_list . 1)) 
(RIGHT_PAREN . (relation_or_list . 1)) (COMMA . (relation_or_list . 1)) (RANGE 
. (relation_or_list . 1)) (THEN . (relation_or_list . 1)) (SEMICOLON . 
(relation_or_list . 1)) (WITH . (relation_or_list . 1 [...]
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
       ((default . error) (DO . (relation_xor_list . 1)) (LOOP . 
(relation_xor_list . 1)) (OR . (relation_xor_list . 1)) (AND . 
(relation_xor_list . 1)) (ELSIF . (relation_xor_list . 1)) (ELSE . 
(relation_xor_list . 1)) (EQUAL_GREATER . (relation_xor_list . 1)) (DIGITS . 
(relation_xor_list . 1)) (RIGHT_PAREN . (relation_xor_list . 1)) (COMMA . 
(relation_xor_list . 1)) (RANGE . (relation_xor_list . 1)) (THEN . 
(relation_xor_list . 1)) (SEMICOLON . (relation_xor_list . 1)) (WITH . 
(relation [...]
       ((default . error) (DO . (relation_xor_list . 0)) (LOOP . 
(relation_xor_list . 0)) (OR . (relation_xor_list . 0)) (AND . 
(relation_xor_list . 0)) (ELSIF . (relation_xor_list . 0)) (ELSE . 
(relation_xor_list . 0)) (EQUAL_GREATER . (relation_xor_list . 0)) (DIGITS . 
(relation_xor_list . 0)) (RIGHT_PAREN . (relation_xor_list . 0)) (COMMA . 
(relation_xor_list . 0)) (RANGE . (relation_xor_list . 0)) (THEN . 
(relation_xor_list . 0)) (SEMICOLON . (relation_xor_list . 0)) (WITH . 
(relation [...]
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
       ((default . error) (DO . (relation_or_list . 0)) (LOOP . 
(relation_or_list . 0)) (XOR . (relation_or_list . 0)) (AND . (relation_or_list 
. 0)) (ELSIF . (relation_or_list . 0)) (ELSE . (relation_or_list . 0)) 
(EQUAL_GREATER . (relation_or_list . 0)) (DIGITS . (relation_or_list . 0)) 
(RIGHT_PAREN . (relation_or_list . 0)) (COMMA . (relation_or_list . 0)) (RANGE 
. (relation_or_list . 0)) (THEN . (relation_or_list . 0)) (SEMICOLON . 
(relation_or_list . 0)) (WITH . (relation_or_list . 0 [...]
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
       ((default . error) (DO . (relation_and_list . 0)) (LOOP . 
(relation_and_list . 0)) (XOR . (relation_and_list . 0)) (OR . 
(relation_and_list . 0)) (ELSIF . (relation_and_list . 0)) (ELSE . 
(relation_and_list . 0)) (EQUAL_GREATER . (relation_and_list . 0)) (DIGITS . 
(relation_and_list . 0)) (RIGHT_PAREN . (relation_and_list . 0)) (COMMA . 
(relation_and_list . 0)) (RANGE . (relation_and_list . 0)) (THEN . 
(relation_and_list . 0)) (SEMICOLON . (relation_and_list . 0)) (WITH . 
(relation [...]
       ((default . error) (DO . (relation . 1)) (LOOP . (relation . 1)) (COMMA 
. (relation . 1)) (ELSIF . (relation . 1)) (ELSE . (relation . 1)) 
(EQUAL_GREATER . (relation . 1)) (RIGHT_PAREN . (relation . 1)) (DIGITS . 
(relation . 1)) (RANGE . (relation . 1)) (THEN . (relation . 1)) (SEMICOLON . 
(relation . 1)) (WITH . (relation . 1)) (IS . (relation . 1)) (AND . (relation 
. 1)) (OR . (relation . 1)) (XOR . (relation . 1)))
       ((default . error) (OF . (term . 1)) (COLON_EQUAL . (term . 1)) (DO . 
(term . 1)) (LOOP . (term . 1)) (ELSIF . (term . 1)) (ELSE . (term . 1)) 
(DIGITS . (term . 1)) (RIGHT_PAREN . (term . 1)) (COMMA . (term . 1)) (RANGE . 
(term . 1)) (THEN . (term . 1)) (WITH . (term . 1)) (BAR . (term . 1)) 
(EQUAL_GREATER . (term . 1)) (IS . (term . 1)) (IN . (term . 1)) (NOT . (term . 
1)) (EQUAL . (term . 1)) (GREATER . (term . 1)) (GREATER_EQUAL . (term . 1)) 
(LESS . (term . 1)) (LESS_EQUAL . (t [...]
-      ((default . error) (OF . (term_list . 1)) (COLON_EQUAL . (term_list . 
1)) (DO . (term_list . 1)) (LOOP . (term_list . 1)) (ELSIF . (term_list . 1)) 
(ELSE . (term_list . 1)) (DIGITS . (term_list . 1)) (COMMA . (term_list . 1)) 
(RIGHT_PAREN . (term_list . 1)) (RANGE . (term_list . 1)) (THEN . (term_list . 
1)) (WITH . (term_list . 1)) (BAR . (term_list . 1)) (EQUAL_GREATER . 
(term_list . 1)) (IS . (term_list . 1)) (SLASH_EQUAL . (term_list . 1)) 
(LESS_EQUAL . (term_list . 1)) (LESS .  [...]
-      ((default . error) (BEGIN .  612) (END .  613))
-      ((default . error) (IDENTIFIER .  611))
-      ((default . error) (RENAMES . (subprogram_specification . 1)) (IS . ( 
610 (subprogram_specification . 1))) (WITH . (subprogram_specification . 1)) 
(SEMICOLON . (subprogram_specification . 1)))
-      ((default . error) (RENAMES . (subprogram_specification . 0)) (IS . ( 
609 (subprogram_specification . 0))) (WITH . (subprogram_specification . 0)) 
(SEMICOLON . (subprogram_specification . 0)))
-      ((default . error) (RENAMES .  128) (SEMICOLON . 
(aspect_specification_opt . 0)) (IS . ( 608 (aspect_specification_opt . 0))) 
(WITH .  109))
-      ((default . error) (EXCEPTION .  606) (CONSTANT . ( 605 (aliased_opt . 
0))) (ARRAY . (aliased_opt . 0)) (ACCESS . (aliased_opt . 0)) (NOT . 
(aliased_opt . 0)) (IDENTIFIER . (aliased_opt . 0)) (STRING_LITERAL . 
(aliased_opt . 0)) (CHARACTER_LITERAL . (aliased_opt . 0)) (ALIASED .  530))
-      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (END . (declarative_part_opt . 0)) (USE .  11) 
(SUBTYPE .  301) (PRAGMA .  7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(ENTRY . (overriding_indicator_opt . 2)) (FOR .  298) (IDENTIFIER .  304) (TYPE 
.  303) (GENERIC .  2) (PROTECTED .  300) (TASK .  302) (PACKAGE .  299))
+      ((default . error) (OF . (term_list . 1)) (COLON_EQUAL . (term_list . 
1)) (DO . (term_list . 1)) (LOOP . (term_list . 1)) (ELSIF . (term_list . 1)) 
(ELSE . (term_list . 1)) (DIGITS . (term_list . 1)) (COMMA . (term_list . 1)) 
(RIGHT_PAREN . (term_list . 1)) (RANGE . (term_list . 1)) (THEN . (term_list . 
1)) (WITH . (term_list . 1)) (BAR . (term_list . 1)) (EQUAL_GREATER . 
(term_list . 1)) (IS . (term_list . 1)) (SLASH_EQUAL . (term_list . 1)) 
(LESS_EQUAL . (term_list . 1)) (LESS .  [...]
+      ((default . error) (BEGIN .  608) (END .  609))
+      ((default . error) (IDENTIFIER .  607))
+      ((default . error) (RENAMES . (subprogram_specification . 1)) (IS . ( 
606 (subprogram_specification . 1))) (WITH . (subprogram_specification . 1)) 
(SEMICOLON . (subprogram_specification . 1)))
+      ((default . error) (RENAMES . (subprogram_specification . 0)) (IS . ( 
605 (subprogram_specification . 0))) (WITH . (subprogram_specification . 0)) 
(SEMICOLON . (subprogram_specification . 0)))
+      ((default . error) (RENAMES .  128) (SEMICOLON . 
(aspect_specification_opt . 0)) (IS . ( 604 (aspect_specification_opt . 0))) 
(WITH .  109))
+      ((default . error) (EXCEPTION .  602) (CONSTANT . ( 601 (aliased_opt . 
0))) (ARRAY . (aliased_opt . 0)) (ACCESS . (aliased_opt . 0)) (NOT . 
(aliased_opt . 0)) (IDENTIFIER . (aliased_opt . 0)) (STRING_LITERAL . 
(aliased_opt . 0)) (CHARACTER_LITERAL . (aliased_opt . 0)) (ALIASED .  531))
+      ((default . error) (SEMICOLON . (name_opt . 0)) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
+      ((default . error) (END . (declarative_part_opt . 0)) (USE .  11) 
(SUBTYPE .  302) (PRAGMA .  7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(ENTRY . (overriding_indicator_opt . 2)) (FOR .  299) (IDENTIFIER .  305) (TYPE 
.  304) (GENERIC .  2) (PROTECTED .  301) (TASK .  303) (PACKAGE .  300))
       ((default . error) (IDENTIFIER . (declarations . 1)) (USE . 
(declarations . 1)) (TYPE . (declarations . 1)) (TASK . (declarations . 1)) 
(SUBTYPE . (declarations . 1)) (PROTECTED . (declarations . 1)) (PROCEDURE . 
(declarations . 1)) (PRAGMA . (declarations . 1)) (PACKAGE . (declarations . 
1)) (OVERRIDING . (declarations . 1)) (NOT . (declarations . 1)) (GENERIC . 
(declarations . 1)) (FUNCTION . (declarations . 1)) (FOR . (declarations . 1)) 
(ENTRY . (declarations . 1)) (BEGIN . (de [...]
-      ((default . error) (EXCEPTION .  600) (IDENTIFIER . (null_exclusion_opt 
. 0)) (STRING_LITERAL . (null_exclusion_opt . 0)) (CHARACTER_LITERAL . 
(null_exclusion_opt . 0)) (ACCESS . (null_exclusion_opt . 0)) (NOT .  225))
-      ((default . error) (IS . (discriminant_part_opt . 0)) (SEMICOLON . 
(discriminant_part_opt . 0)) (LEFT_PAREN .  203))
-      ((default . error) (IDENTIFIER .  598))
-      ((default . error) (IDENTIFIER .  597))
-      ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (IS . 
(aspect_specification_opt . 0)) (WITH .  109))
-      ((default . error) (IS .  595))
+      ((default . error) (EXCEPTION .  596) (IDENTIFIER . (null_exclusion_opt 
. 0)) (STRING_LITERAL . (null_exclusion_opt . 0)) (CHARACTER_LITERAL . 
(null_exclusion_opt . 0)) (ACCESS . (null_exclusion_opt . 0)) (NOT .  232))
+      ((default . error) (IS . (discriminant_part_opt . 0)) (SEMICOLON . 
(discriminant_part_opt . 0)) (LEFT_PAREN .  211))
       ((default . error) (IDENTIFIER .  594))
       ((default . error) (IDENTIFIER .  593))
+      ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (IS . 
(aspect_specification_opt . 0)) (WITH .  109))
+      ((default . error) (IS .  591))
+      ((default . error) (IDENTIFIER .  590))
+      ((default . error) (IDENTIFIER .  589))
       ((default . error) (IS . (aspect_specification_opt . 0)) (WITH .  109))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
       ((default . error) (USE . ((name . 0) (direct_name . 0))) (LEFT_PAREN . 
(name . 0)) (DOT . (name . 0)) (TICK . (name . 0)))
       ((default . error) (USE . ((name . 7) (direct_name . 1))) (LEFT_PAREN . 
(name . 7)) (DOT . (name . 7)) (TICK . (name . 7)))
-      ((default . error) (USE . ( 590 (name . 4))) (LEFT_PAREN . (name . 4)) 
(DOT . (name . 4)) (TICK . (name . 4)))
-      ((default . error) (USE .  589))
-      ((default . error) (DOT .  90) (TICK .  91) (USE .  588) (LEFT_PAREN .  
107))
+      ((default . error) (USE . ( 586 (name . 4))) (LEFT_PAREN . (name . 4)) 
(DOT . (name . 4)) (TICK . (name . 4)))
+      ((default . error) (USE .  585))
+      ((default . error) (DOT .  90) (TICK .  91) (USE .  584) (LEFT_PAREN .  
107))
       ((default . error) (DOT .  90) (TICK .  91) (BAR . (discrete_choice . 
1)) (EQUAL_GREATER . (discrete_choice . 1)) (LEFT_PAREN .  107))
       ((default . error) (SEMICOLON . (association_opt . 2)) (IS . 
(association_opt . 2)) (COMMA . (association_opt . 2)) (RIGHT_PAREN . 
(association_opt . 2)))
       ((default . error) (SEMICOLON . (association_opt . 1)) (IS . 
(association_opt . 1)) (COMMA . (association_opt . 1)) (RIGHT_PAREN . 
(association_opt . 1)))
       ((default . error) (BAR . (choice_relation_and_list . 1)) (EQUAL_GREATER 
. (choice_relation_and_list . 1)) (AND . (choice_relation_and_list . 1)))
-      ((default . error) (XOR . (choice_relation . 1)) (OR . (choice_relation 
. 1)) (BAR . (choice_relation . 1)) (EQUAL_GREATER . (choice_relation . 1)) 
(AND . (choice_relation . 1)) (EQUAL .  277) (SLASH_EQUAL .  282) (LESS .  280) 
(LESS_EQUAL .  281) (GREATER .  278) (GREATER_EQUAL .  279))
+      ((default . error) (XOR . (choice_relation . 1)) (OR . (choice_relation 
. 1)) (BAR . (choice_relation . 1)) (EQUAL_GREATER . (choice_relation . 1)) 
(AND . (choice_relation . 1)) (EQUAL .  278) (SLASH_EQUAL .  283) (LESS .  281) 
(LESS_EQUAL .  282) (GREATER .  279) (GREATER_EQUAL .  280))
       ((default . error) (BAR . (choice_relation_or_list . 1)) (EQUAL_GREATER 
. (choice_relation_or_list . 1)) (OR . (choice_relation_or_list . 1)))
       ((default . error) (BAR . (choice_relation_xor_list . 1)) (EQUAL_GREATER 
. (choice_relation_xor_list . 1)) (XOR . (choice_relation_xor_list . 1)))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
       ((default . error) (BAR . (choice_relation_xor_list . 0)) (EQUAL_GREATER 
. (choice_relation_xor_list . 0)) (XOR . (choice_relation_xor_list . 0)))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
       ((default . error) (BAR . (choice_relation_or_list . 0)) (EQUAL_GREATER 
. (choice_relation_or_list . 0)) (OR . (choice_relation_or_list . 0)))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
       ((default . error) (BAR . (choice_relation_and_list . 0)) (EQUAL_GREATER 
. (choice_relation_and_list . 0)) (AND . (choice_relation_and_list . 0)))
       ((default . error) (SEMICOLON . (association_opt . 4)) (IS . 
(association_opt . 4)) (COMMA . (association_opt . 4)) (RIGHT_PAREN . 
(association_opt . 4)))
       ((default . error) (SEMICOLON . (association_opt . 3)) (IS . 
(association_opt . 3)) (COMMA . (association_opt . 3)) (RIGHT_PAREN . 
(association_opt . 3)))
       ((default . error) (EQUAL_GREATER . (discrete_choice_list . 2)) (BAR . 
(discrete_choice_list . 2)))
-      ((default . error) (DOT_DOT .  276) (BAR . (choice_relation . 1)) 
(EQUAL_GREATER . (choice_relation . 1)) (AND . (choice_relation . 1)) (OR . 
(choice_relation . 1)) (XOR . (choice_relation . 1)) (EQUAL .  277) 
(SLASH_EQUAL .  282) (LESS .  280) (LESS_EQUAL .  281) (GREATER .  278) 
(GREATER_EQUAL .  279))
-      ((default . error) (LOOP . (range . 1)) (DO . (range . 1)) (OF . (range 
. 1)) (COLON_EQUAL . (range . 1)) (ELSIF . (range . 1)) (ELSE . (range . 1)) 
(DIGITS . (range . 1)) (RANGE . (range . 1)) (THEN . (range . 1)) (SEMICOLON . 
(range . 1)) (WITH . (range . 1)) (IS . (range . 1)) (AND . (range . 1)) (OR . 
(range . 1)) (XOR . (range . 1)) (COMMA . (range . 1)) (RIGHT_PAREN . (range . 
1)) (EQUAL_GREATER . (range . 1)) (BAR . (range . 1)) (LEFT_PAREN .  582))
+      ((default . error) (DOT_DOT .  277) (BAR . (choice_relation . 1)) 
(EQUAL_GREATER . (choice_relation . 1)) (AND . (choice_relation . 1)) (OR . 
(choice_relation . 1)) (XOR . (choice_relation . 1)) (EQUAL .  278) 
(SLASH_EQUAL .  283) (LESS .  281) (LESS_EQUAL .  282) (GREATER .  279) 
(GREATER_EQUAL .  280))
+      ((default . error) (LOOP . (range . 1)) (DO . (range . 1)) (OF . (range 
. 1)) (COLON_EQUAL . (range . 1)) (ELSIF . (range . 1)) (ELSE . (range . 1)) 
(DIGITS . (range . 1)) (RANGE . (range . 1)) (THEN . (range . 1)) (SEMICOLON . 
(range . 1)) (WITH . (range . 1)) (IS . (range . 1)) (AND . (range . 1)) (OR . 
(range . 1)) (XOR . (range . 1)) (COMMA . (range . 1)) (RIGHT_PAREN . (range . 
1)) (EQUAL_GREATER . (range . 1)) (BAR . (range . 1)) (LEFT_PAREN .  578))
       ((default . error) (SEMICOLON . (relation . 1)) (IS . (relation . 1)) 
(WITH . (relation . 1)) (RIGHT_PAREN . (relation . 1)) (COMMA . (relation . 1)) 
(BAR . (choice_relation . 0)) (EQUAL_GREATER . (choice_relation . 0)) (AND . 
((choice_relation . 0) (relation . 1))) (OR . ((choice_relation . 0) (relation 
. 1))) (XOR . ((choice_relation . 0) (relation . 1))))
       ((default . error) (DO . (range . 2)) (LOOP . (range . 2)) (OF . (range 
. 2)) (COLON_EQUAL . (range . 2)) (ELSIF . (range . 2)) (ELSE . (range . 2)) 
(DIGITS . (range . 2)) (RANGE . (range . 2)) (THEN . (range . 2)) (SEMICOLON . 
(range . 2)) (WITH . (range . 2)) (IS . (range . 2)) (AND . (range . 2)) (OR . 
(range . 2)) (XOR . (range . 2)) (COMMA . (range . 2)) (RIGHT_PAREN . (range . 
2)) (EQUAL_GREATER . (range . 2)) (BAR . (range . 2)))
-      ((default . error) (PLUS .  151) (MINUS .  150) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (ABS .  144) (NOT .  147) 
(NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
-      ((default . error) (BAR .  580) (DO . (relation . 3)) (LOOP . (relation 
. 3)) (COMMA . (relation . 3)) (ELSIF . (relation . 3)) (ELSE . (relation . 3)) 
(EQUAL_GREATER . (relation . 3)) (RIGHT_PAREN . (relation . 3)) (DIGITS . 
(relation . 3)) (RANGE . (relation . 3)) (THEN . (relation . 3)) (SEMICOLON . 
(relation . 3)) (WITH . (relation . 3)) (IS . (relation . 3)) (AND . (relation 
. 3)) (OR . (relation . 3)) (XOR . (relation . 3)))
+      ((default . error) (PLUS .  154) (MINUS .  153) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (ABS .  144) (NOT .  150) 
(NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (LEFT_PAREN .  148))
+      ((default . error) (BAR .  576) (DO . (relation . 3)) (LOOP . (relation 
. 3)) (COMMA . (relation . 3)) (ELSIF . (relation . 3)) (ELSE . (relation . 3)) 
(EQUAL_GREATER . (relation . 3)) (RIGHT_PAREN . (relation . 3)) (DIGITS . 
(relation . 3)) (RANGE . (relation . 3)) (THEN . (relation . 3)) (SEMICOLON . 
(relation . 3)) (WITH . (relation . 3)) (IS . (relation . 3)) (AND . (relation 
. 3)) (OR . (relation . 3)) (XOR . (relation . 3)))
       ((default . error) (DO . (membership_choice_list . 0)) (LOOP . 
(membership_choice_list . 0)) (COMMA . (membership_choice_list . 0)) (ELSIF . 
(membership_choice_list . 0)) (ELSE . (membership_choice_list . 0)) 
(EQUAL_GREATER . (membership_choice_list . 0)) (RIGHT_PAREN . 
(membership_choice_list . 0)) (DIGITS . (membership_choice_list . 0)) (RANGE . 
(membership_choice_list . 0)) (THEN . (membership_choice_list . 0)) (SEMICOLON 
. (membership_choice_list . 0)) (WITH . (membership_choic [...]
       ((default . error) (DO . (membership_choice . 1)) (LOOP . 
(membership_choice . 1)) (COMMA . (membership_choice . 1)) (ELSIF . 
(membership_choice . 1)) (ELSE . (membership_choice . 1)) (EQUAL_GREATER . 
(membership_choice . 1)) (RIGHT_PAREN . (membership_choice . 1)) (DIGITS . 
(membership_choice . 1)) (RANGE . (membership_choice . 1)) (THEN . 
(membership_choice . 1)) (SEMICOLON . (membership_choice . 1)) (WITH . 
(membership_choice . 1)) (IS . (membership_choice . 1)) (AND . (membersh [...]
-      ((default . error) (DOT_DOT .  276) (DO . (membership_choice . 0)) (LOOP 
. (membership_choice . 0)) (COMMA . (membership_choice . 0)) (ELSIF . 
(membership_choice . 0)) (ELSE . (membership_choice . 0)) (EQUAL_GREATER . 
(membership_choice . 0)) (RIGHT_PAREN . (membership_choice . 0)) (DIGITS . 
(membership_choice . 0)) (RANGE . (membership_choice . 0)) (THEN . 
(membership_choice . 0)) (SEMICOLON . (membership_choice . 0)) (WITH . 
(membership_choice . 0)) (IS . (membership_choice . 0)) [...]
+      ((default . error) (DOT_DOT .  277) (DO . (membership_choice . 0)) (LOOP 
. (membership_choice . 0)) (COMMA . (membership_choice . 0)) (ELSIF . 
(membership_choice . 0)) (ELSE . (membership_choice . 0)) (EQUAL_GREATER . 
(membership_choice . 0)) (RIGHT_PAREN . (membership_choice . 0)) (DIGITS . 
(membership_choice . 0)) (RANGE . (membership_choice . 0)) (THEN . 
(membership_choice . 0)) (SEMICOLON . (membership_choice . 0)) (WITH . 
(membership_choice . 0)) (IS . (membership_choice . 0)) [...]
       ((default . error) (BEGIN . (package_renaming_declaration . 0)) (ENTRY . 
(package_renaming_declaration . 0)) (FOR . (package_renaming_declaration . 0)) 
(PROTECTED . (package_renaming_declaration . 0)) (SUBTYPE . 
(package_renaming_declaration . 0)) (TASK . (package_renaming_declaration . 0)) 
(TYPE . (package_renaming_declaration . 0)) (IDENTIFIER . 
(package_renaming_declaration . 0)) (END . (package_renaming_declaration . 0)) 
(WITH . (package_renaming_declaration . 0)) (USE . (packa [...]
       ((default . error) (SEMICOLON . (association_list . 1)) (IS . 
(association_list . 1)) (COMMA . (association_list . 1)) (RIGHT_PAREN . 
(association_list . 1)))
       ((default . error) (RIGHT_PAREN . (range_list . 1)) (COMMA . (range_list 
. 1)))
-      ((default . error) (DOT_DOT .  276))
-      ((default . error) (SEMICOLON .  579))
-      ((default . error) (SEMICOLON .  578))
-      ((default . error) (SEMICOLON .  577))
-      ((default . error) (SEMICOLON .  576))
-      ((default . error) (ACCESS . (null_exclusion_opt . 0)) (NOT .  570) 
(IDENTIFIER .  571) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
+      ((default . error) (DOT_DOT .  277))
+      ((default . error) (SEMICOLON .  575))
+      ((default . error) (SEMICOLON .  574))
+      ((default . error) (SEMICOLON .  573))
+      ((default . error) (SEMICOLON .  572))
+      ((default . error) (ACCESS . (null_exclusion_opt . 0)) (NOT .  566) 
(IDENTIFIER .  567) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
       ((default . error) (IS . (discriminant_part_opt . 2)) (WITH . 
(discriminant_part_opt . 2)) (SEMICOLON . (discriminant_part_opt . 2)))
       ((default . error) (RIGHT_PAREN . (discriminant_specification_opt . 0)) 
(SEMICOLON . (discriminant_specification_opt . 0)) (IDENTIFIER .  77))
       ((default . error) (IS . (discriminant_part_opt . 1)) (WITH . 
(discriminant_part_opt . 1)) (SEMICOLON . (discriminant_part_opt . 1)))
       ((default . error) (PACKAGE . (formal_type_declaration . 2)) (PROCEDURE 
. (formal_type_declaration . 2)) (FUNCTION . (formal_type_declaration . 2)) 
(PRAGMA . (formal_type_declaration . 2)) (TYPE . (formal_type_declaration . 2)) 
(USE . (formal_type_declaration . 2)) (WITH . (formal_type_declaration . 2)) 
(IDENTIFIER . (formal_type_declaration . 2)))
-      ((default . error) (TAGGED .  568) (NEW . 
(abstract_limited_synchronized_opt . 3)) (SYNCHRONIZED .  567) (LIMITED .  566))
-      ((default . error) (LEFT_PAREN .  565))
-      ((default . error) (BOX .  564))
-      ((default . error) (BOX .  563))
-      ((default . error) (SEMICOLON . (interface_type_definition . 8)) (WITH . 
(interface_type_definition . 8)))
-      ((default . error) (BOX .  562))
-      ((default . error) (INTERFACE .  561) (PRIVATE . 
(abstract_tagged_limited_opt . 5)) (NEW . (abstract_limited_synchronized_opt . 
4)))
+      ((default . error) (TAGGED .  564) (NEW . 
(abstract_limited_synchronized_opt . 3)) (SYNCHRONIZED .  563) (LIMITED .  562))
+      ((default . error) (LEFT_PAREN .  561))
       ((default . error) (BOX .  560))
-      ((default . error) (INTERFACE .  559))
+      ((default . error) (BOX .  559))
+      ((default . error) (SEMICOLON . (interface_type_definition . 8)) (WITH . 
(interface_type_definition . 8)))
       ((default . error) (BOX .  558))
-      ((default . error) (INTERFACE .  557) (NEW . 
(abstract_limited_synchronized_opt . 5)))
-      ((default . error) (PRIVATE . (abstract_tagged_limited_opt . 4)) 
(LIMITED .  555) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  109))
-      ((default . error) (INTERFACE .  554))
-      ((default . error) (NEW .  553))
-      ((default . error) (PRIVATE .  552))
+      ((default . error) (INTERFACE .  557) (PRIVATE . 
(abstract_tagged_limited_opt . 5)) (NEW . (abstract_limited_synchronized_opt . 
4)))
+      ((default . error) (BOX .  556))
+      ((default . error) (INTERFACE .  555))
+      ((default . error) (BOX .  554))
+      ((default . error) (INTERFACE .  553) (NEW . 
(abstract_limited_synchronized_opt . 5)))
+      ((default . error) (PRIVATE . (abstract_tagged_limited_opt . 4)) 
(LIMITED .  551) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  109))
+      ((default . error) (INTERFACE .  550))
+      ((default . error) (NEW .  549))
+      ((default . error) (PRIVATE .  548))
       ((default . error) (WITH . (formal_type_definition . 9)) (SEMICOLON . 
(formal_type_definition . 9)))
       ((default . error) (WITH . (formal_type_definition . 8)) (SEMICOLON . 
(formal_type_definition . 8)))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
       ((default . error) (WITH . (formal_type_definition . 1)) (SEMICOLON . 
(formal_type_definition . 1)))
       ((default . error) (WITH . (formal_type_definition . 10)) (SEMICOLON . 
(formal_type_definition . 10)))
-      ((default . error) (ACCESS .  235))
-      ((default . error) (SEMICOLON .  550))
-      ((default . error) (SEMICOLON .  549))
+      ((default . error) (ACCESS .  242))
+      ((default . error) (SEMICOLON .  546))
+      ((default . error) (SEMICOLON .  545))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (DOT .  90) (TICK .  91) (COLON_EQUAL .  545) 
(LEFT_PAREN .  107) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  109))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (SEMICOLON .  543))
+      ((default . error) (DOT .  90) (TICK .  91) (COLON_EQUAL .  541) 
(LEFT_PAREN .  107) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  109))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (SEMICOLON .  539))
       ((default . error) (DO . (parameter_and_result_profile . 0)) 
(RIGHT_PAREN . (parameter_and_result_profile . 0)) (COLON_EQUAL . 
(parameter_and_result_profile . 0)) (RENAMES . (parameter_and_result_profile . 
0)) (WITH . (parameter_and_result_profile . 0)) (SEMICOLON . 
(parameter_and_result_profile . 0)) (IS . (parameter_and_result_profile . 0)))
-      ((default . error) (DO . (aggregate . 3)) (ELSIF . (aggregate . 3)) 
(ELSE . (aggregate . 3)) (DIGITS . (aggregate . 3)) (RANGE . (aggregate . 3)) 
(THEN . (aggregate . 3)) (USE . (aggregate . 3)) (COLON_EQUAL . (aggregate . 
3)) (CHARACTER_LITERAL . (aggregate . 3)) (STRING_LITERAL . (aggregate . 3)) 
(IDENTIFIER . (aggregate . 3)) (LESS_LESS . (aggregate . 3)) (WHILE . 
(aggregate . 3)) (SELECT . (aggregate . 3)) (REQUEUE . (aggregate . 3)) (RAISE 
. (aggregate . 3)) (PRAGMA . (aggrega [...]
-      ((default . error) (RIGHT_PAREN . ((expression_opt . 0) (association_opt 
. 0))) (COMMA . ((expression_opt . 0) (association_opt . 0))) (EQUAL_GREATER . 
(discrete_choice_list . 0)) (BAR . (discrete_choice_list . 0)) (OTHERS .  175) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  176) (STRING_LITERAL .  49) (RAISE .  
149) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  174) (NUMERIC_LITERAL .  
152) (NULL .  541) (NEW .  146) (LEFT_PAREN .  145))
-      ((default . error) (DO . (aggregate . 2)) (ELSIF . (aggregate . 2)) 
(ELSE . (aggregate . 2)) (DIGITS . (aggregate . 2)) (RANGE . (aggregate . 2)) 
(THEN . (aggregate . 2)) (USE . (aggregate . 2)) (COLON_EQUAL . (aggregate . 
2)) (CHARACTER_LITERAL . (aggregate . 2)) (STRING_LITERAL . (aggregate . 2)) 
(IDENTIFIER . (aggregate . 2)) (LESS_LESS . (aggregate . 2)) (WHILE . 
(aggregate . 2)) (SELECT . (aggregate . 2)) (REQUEUE . (aggregate . 2)) (RAISE 
. (aggregate . 2)) (PRAGMA . (aggrega [...]
-      ((default . error) (DO . (aggregate . 0)) (LOOP . (aggregate . 0)) (USE 
. (aggregate . 0)) (COLON_EQUAL . (aggregate . 0)) (CHARACTER_LITERAL . 
(aggregate . 0)) (STRING_LITERAL . (aggregate . 0)) (IDENTIFIER . (aggregate . 
0)) (LESS_LESS . (aggregate . 0)) (WHILE . (aggregate . 0)) (SELECT . 
(aggregate . 0)) (REQUEUE . (aggregate . 0)) (RAISE . (aggregate . 0)) (PRAGMA 
. (aggregate . 0)) (NULL . (aggregate . 0)) (IF . (aggregate . 0)) (GOTO . 
(aggregate . 0)) (FOR . (aggregate . 0) [...]
-      ((default . error) (RIGHT_PAREN .  540))
-      ((default . error) (THEN .  539))
-      ((default . error) (IS .  538))
       ((default . error) (IDENTIFIER . (general_access_modifier_opt . 1)) 
(STRING_LITERAL . (general_access_modifier_opt . 1)) (CHARACTER_LITERAL . 
(general_access_modifier_opt . 1)))
       ((default . error) (IDENTIFIER . (general_access_modifier_opt . 2)) 
(STRING_LITERAL . (general_access_modifier_opt . 2)) (CHARACTER_LITERAL . 
(general_access_modifier_opt . 2)))
       ((default . error) (FUNCTION . (protected_opt . 1)) (PROCEDURE . 
(protected_opt . 1)))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (FUNCTION .  535) (PROCEDURE .  536))
+      ((default . error) (FUNCTION .  536) (PROCEDURE .  537))
       ((default . error) (IN . (aliased_opt . 1)) (OUT . (aliased_opt . 1)) 
(ARRAY . (aliased_opt . 1)) (CONSTANT . (aliased_opt . 1)) (ACCESS . 
(aliased_opt . 1)) (NOT . (aliased_opt . 1)) (IDENTIFIER . (aliased_opt . 1)) 
(STRING_LITERAL . (aliased_opt . 1)) (CHARACTER_LITERAL . (aliased_opt . 1)))
-      ((default . error) (IDENTIFIER . (mode_opt . 0)) (STRING_LITERAL . 
(mode_opt . 0)) (CHARACTER_LITERAL . (mode_opt . 0)) (IN .  209) (OUT .  210) 
(ACCESS . (null_exclusion_opt . 0)) (NOT . ( 225 (mode_opt . 0))))
+      ((default . error) (IDENTIFIER . (mode_opt . 0)) (STRING_LITERAL . 
(mode_opt . 0)) (CHARACTER_LITERAL . (mode_opt . 0)) (IN .  217) (OUT .  218) 
(ACCESS . (null_exclusion_opt . 0)) (NOT . ( 232 (mode_opt . 0))))
       ((default . error) (RIGHT_PAREN . (parameter_specification_list . 1)) 
(SEMICOLON . (parameter_specification_list . 1)))
-      ((default . error) (COLON_EQUAL .  802) (RIGHT_PAREN . 
(parameter_specification . 3)) (SEMICOLON . (parameter_specification . 3)))
-      ((default . error) (IDENTIFIER . (null_exclusion_opt . 0)) 
(STRING_LITERAL . (null_exclusion_opt . 0)) (CHARACTER_LITERAL . 
(null_exclusion_opt . 0)) (NOT .  225))
-      ((default . error) (RETURN .  89) (LEFT_PAREN .  798))
-      ((default . error) (WITH . (parameter_profile_opt . 0)) (SEMICOLON . 
(parameter_profile_opt . 0)) (IS . (parameter_profile_opt . 0)) (COLON_EQUAL . 
(parameter_profile_opt . 0)) (RIGHT_PAREN . (parameter_profile_opt . 0)) 
(RENAMES . (parameter_profile_opt . 0)) (DO . (parameter_profile_opt . 0)) 
(LEFT_PAREN .  798))
+      ((default . error) (COLON_EQUAL .  812) (RIGHT_PAREN . 
(parameter_specification . 3)) (SEMICOLON . (parameter_specification . 3)))
+      ((default . error) (IDENTIFIER . (null_exclusion_opt . 0)) 
(STRING_LITERAL . (null_exclusion_opt . 0)) (CHARACTER_LITERAL . 
(null_exclusion_opt . 0)) (NOT .  232))
+      ((default . error) (RETURN .  89) (LEFT_PAREN .  808))
+      ((default . error) (WITH . (parameter_profile_opt . 0)) (SEMICOLON . 
(parameter_profile_opt . 0)) (IS . (parameter_profile_opt . 0)) (COLON_EQUAL . 
(parameter_profile_opt . 0)) (RIGHT_PAREN . (parameter_profile_opt . 0)) 
(RENAMES . (parameter_profile_opt . 0)) (DO . (parameter_profile_opt . 0)) 
(LEFT_PAREN .  808))
       ((default . error) (DOT .  90) (TICK .  91) (DO . (access_definition . 
0)) (RENAMES . (access_definition . 0)) (RIGHT_PAREN . (access_definition . 0)) 
(COLON_EQUAL . (access_definition . 0)) (IS . (access_definition . 0)) 
(SEMICOLON . (access_definition . 0)) (WITH . (access_definition . 0)) 
(LEFT_PAREN .  107))
-      ((default . error) (WHEN .  795))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (OF . (aggregate . 5)) (ACCEPT . (aggregate . 5)) 
(ABORT . (aggregate . 5)) (BEGIN . (aggregate . 5)) (CASE . (aggregate . 5)) 
(DECLARE . (aggregate . 5)) (DELAY . (aggregate . 5)) (EXIT . (aggregate . 5)) 
(FOR . (aggregate . 5)) (GOTO . (aggregate . 5)) (IF . (aggregate . 5)) (NULL . 
(aggregate . 5)) (PRAGMA . (aggregate . 5)) (RAISE . (aggregate . 5)) (REQUEUE 
. (aggregate . 5)) (SELECT . (aggregate . 5)) (WHILE . (aggregate . 5)) 
(LESS_LESS . (aggregate . 5))  [...]
-      ((default . error) (PLUS . (primary . 1)) (MINUS . (primary . 1)) 
(AMPERSAND . (primary . 1)) (DOT_DOT . (primary . 1)) (IN . (primary . 1)) (NOT 
. (primary . 1)) (EQUAL . (primary . 1)) (GREATER . (primary . 1)) 
(GREATER_EQUAL . (primary . 1)) (LESS . (primary . 1)) (LESS_EQUAL . (primary . 
1)) (SLASH_EQUAL . (primary . 1)) (RIGHT_PAREN . (primary . 1)) (COMMA . 
(primary . 1)) (MOD . (primary . 1)) (REM . (primary . 1)) (SLASH . (primary . 
1)) (STAR . (primary . 1)) (STAR_STAR . ( [...]
-      ((default . error) (COMMA .  272) (RIGHT_PAREN .  792))
       ((default . error) (IDENTIFIER . (formal_object_declaration . 3)) (WITH 
. (formal_object_declaration . 3)) (USE . (formal_object_declaration . 3)) 
(TYPE . (formal_object_declaration . 3)) (PRAGMA . (formal_object_declaration . 
3)) (FUNCTION . (formal_object_declaration . 3)) (PROCEDURE . 
(formal_object_declaration . 3)) (PACKAGE . (formal_object_declaration . 3)))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (SEMICOLON .  789))
-      ((default . error) (DOT .  90) (TICK .  91) (WITH . 
(formal_package_actual_part . 1)) (SEMICOLON . (formal_package_actual_part . 
1)) (LEFT_PAREN .  787))
-      ((default . error) (SEMICOLON .  786))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (SEMICOLON .  805))
+      ((default . error) (DOT .  90) (TICK .  91) (WITH . 
(formal_package_actual_part . 1)) (SEMICOLON . (formal_package_actual_part . 
1)) (LEFT_PAREN .  803))
+      ((default . error) (SEMICOLON .  802))
       ((default . error) (IDENTIFIER . (formal_subprogram_declaration . 3)) 
(WITH . (formal_subprogram_declaration . 3)) (USE . 
(formal_subprogram_declaration . 3)) (TYPE . (formal_subprogram_declaration . 
3)) (PRAGMA . (formal_subprogram_declaration . 3)) (FUNCTION . 
(formal_subprogram_declaration . 3)) (PROCEDURE . 
(formal_subprogram_declaration . 3)) (PACKAGE . (formal_subprogram_declaration 
. 3)))
       ((default . error) (IDENTIFIER . (formal_subprogram_declaration . 0)) 
(WITH . (formal_subprogram_declaration . 0)) (USE . 
(formal_subprogram_declaration . 0)) (TYPE . (formal_subprogram_declaration . 
0)) (PRAGMA . (formal_subprogram_declaration . 0)) (FUNCTION . 
(formal_subprogram_declaration . 0)) (PROCEDURE . 
(formal_subprogram_declaration . 0)) (PACKAGE . (formal_subprogram_declaration 
. 0)))
-      ((default . error) (SEMICOLON .  785))
+      ((default . error) (SEMICOLON .  801))
       ((default . error) (SEMICOLON . (formal_type_definition . 0)) (WITH . 
(formal_type_definition . 0)))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (AND .  783) (WITH . (interface_type_definition . 5)) 
(SEMICOLON . (interface_type_definition . 5)))
+      ((default . error) (AND .  799) (WITH . (interface_type_definition . 5)) 
(SEMICOLON . (interface_type_definition . 5)))
       ((default . error) (RECORD . (abstract_tagged_limited_opt . 3)) (NULL . 
(abstract_tagged_limited_opt . 3)) (PRIVATE . (abstract_tagged_limited_opt . 
3)))
-      ((default . error) (SEMICOLON .  782))
-      ((default . error) (AND .  781) (WITH . (interface_type_definition . 7)) 
(SEMICOLON . (interface_type_definition . 7)))
+      ((default . error) (SEMICOLON .  798))
+      ((default . error) (AND .  797) (WITH . (interface_type_definition . 7)) 
(SEMICOLON . (interface_type_definition . 7)))
       ((default . error) (SEMICOLON . (formal_type_definition . 3)) (WITH . 
(formal_type_definition . 3)))
-      ((default . error) (AND .  780) (WITH . (interface_type_definition . 6)) 
(SEMICOLON . (interface_type_definition . 6)))
+      ((default . error) (AND .  796) (WITH . (interface_type_definition . 6)) 
(SEMICOLON . (interface_type_definition . 6)))
       ((default . error) (SEMICOLON . (formal_type_definition . 4)) (WITH . 
(formal_type_definition . 4)))
-      ((default . error) (AND .  779) (WITH . (interface_type_definition . 4)) 
(SEMICOLON . (interface_type_definition . 4)))
-      ((default . error) (RIGHT_PAREN .  778))
+      ((default . error) (AND .  795) (WITH . (interface_type_definition . 4)) 
(SEMICOLON . (interface_type_definition . 4)))
+      ((default . error) (RIGHT_PAREN .  794))
       ((default . error) (SEMICOLON . (formal_type_definition . 5)) (WITH . 
(formal_type_definition . 5)))
-      ((default . error) (SEMICOLON . (formal_type_definition . 6)) (WITH . 
(formal_type_definition . 6)) (DIGITS .  777))
-      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  769) 
(NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
+      ((default . error) (SEMICOLON . (formal_type_definition . 6)) (WITH . 
(formal_type_definition . 6)) (DIGITS .  793))
+      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  734) 
(NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (LEFT_PAREN .  148))
       ((default . error) (NEW . (abstract_limited_synchronized_opt . 1)))
       ((default . error) (NEW . (abstract_limited_synchronized_opt . 2)))
-      ((default . error) (LIMITED .  768) (RECORD . 
(abstract_tagged_limited_opt . 2)) (NULL . (abstract_tagged_limited_opt . 2)) 
(PRIVATE . (abstract_tagged_limited_opt . 2)))
+      ((default . error) (LIMITED .  787) (RECORD . 
(abstract_tagged_limited_opt . 2)) (NULL . (abstract_tagged_limited_opt . 2)) 
(PRIVATE . (abstract_tagged_limited_opt . 2)))
       ((default . error) (RIGHT_PAREN . (discriminant_specification_list . 1)) 
(SEMICOLON . (discriminant_specification_list . 1)))
-      ((default . error) (NULL .  767))
+      ((default . error) (NULL .  786))
       ((default . error) (SEMICOLON . (null_exclusion_opt_name_type . 0)) 
(RIGHT_PAREN . (null_exclusion_opt_name_type . 0)) (COLON_EQUAL . 
(null_exclusion_opt_name_type . 0)) (DOT . (name . 0)) (LEFT_PAREN . (name . 
0)) (TICK . (name . 0)))
-      ((default . error) (SEMICOLON . (discriminant_specification_opt . 4)) 
(RIGHT_PAREN . (discriminant_specification_opt . 4)) (COLON_EQUAL .  766))
+      ((default . error) (SEMICOLON . (discriminant_specification_opt . 4)) 
(RIGHT_PAREN . (discriminant_specification_opt . 4)) (COLON_EQUAL .  785))
       ((default . error) (DOT .  90) (TICK .  91) (LEFT_PAREN .  107))
-      ((default . error) (SEMICOLON . (discriminant_specification_opt . 2)) 
(RIGHT_PAREN . (discriminant_specification_opt . 2)) (COLON_EQUAL .  765))
+      ((default . error) (SEMICOLON . (discriminant_specification_opt . 2)) 
(RIGHT_PAREN . (discriminant_specification_opt . 2)) (COLON_EQUAL .  784))
       ((default . error) (SEMICOLON . (null_exclusion_opt_name_type . 1)) 
(RIGHT_PAREN . (null_exclusion_opt_name_type . 1)) (COLON_EQUAL . 
(null_exclusion_opt_name_type . 1)) (DOT . (name . 3)) (LEFT_PAREN . (name . 
3)) (TICK . (name . 3)))
       ((default . error) ($EOI . (generic_renaming_declaration . 1)) (LIMITED 
. (generic_renaming_declaration . 1)) (SEPARATE . (generic_renaming_declaration 
. 1)) (WITH . (generic_renaming_declaration . 1)) (END . 
(generic_renaming_declaration . 1)) (PRIVATE . (generic_renaming_declaration . 
1)) (IDENTIFIER . (generic_renaming_declaration . 1)) (USE . 
(generic_renaming_declaration . 1)) (TYPE . (generic_renaming_declaration . 1)) 
(TASK . (generic_renaming_declaration . 1)) (SUBTYPE . (g [...]
       ((default . error) ($EOI . (generic_renaming_declaration . 0)) (LIMITED 
. (generic_renaming_declaration . 0)) (SEPARATE . (generic_renaming_declaration 
. 0)) (WITH . (generic_renaming_declaration . 0)) (END . 
(generic_renaming_declaration . 0)) (PRIVATE . (generic_renaming_declaration . 
0)) (IDENTIFIER . (generic_renaming_declaration . 0)) (USE . 
(generic_renaming_declaration . 0)) (TYPE . (generic_renaming_declaration . 0)) 
(TASK . (generic_renaming_declaration . 0)) (SUBTYPE . (g [...]
       ((default . error) ($EOI . (generic_renaming_declaration . 2)) (LIMITED 
. (generic_renaming_declaration . 2)) (SEPARATE . (generic_renaming_declaration 
. 2)) (WITH . (generic_renaming_declaration . 2)) (END . 
(generic_renaming_declaration . 2)) (PRIVATE . (generic_renaming_declaration . 
2)) (IDENTIFIER . (generic_renaming_declaration . 2)) (USE . 
(generic_renaming_declaration . 2)) (TYPE . (generic_renaming_declaration . 2)) 
(TASK . (generic_renaming_declaration . 2)) (SUBTYPE . (g [...]
       ((default . error) (END . (generic_instantiation . 0)) (BEGIN . 
(generic_instantiation . 0)) (ENTRY . (generic_instantiation . 0)) (FOR . 
(generic_instantiation . 0)) (PROTECTED . (generic_instantiation . 0)) (SUBTYPE 
. (generic_instantiation . 0)) (TASK . (generic_instantiation . 0)) (TYPE . 
(generic_instantiation . 0)) (IDENTIFIER . (generic_instantiation . 0)) ($EOI . 
(generic_instantiation . 0)) (FUNCTION . (generic_instantiation . 0)) (GENERIC 
. (generic_instantiation . 0)) (L [...]
-      ((default . error) (PLUS .  151) (MINUS .  150) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (ABS .  144) (NOT .  147) 
(NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
-      ((default . error) (BAR .  580) (LOOP . (relation . 2)) (DO . (relation 
. 2)) (XOR . (relation . 2)) (OR . (relation . 2)) (AND . (relation . 2)) (IS . 
(relation . 2)) (WITH . (relation . 2)) (SEMICOLON . (relation . 2)) (THEN . 
(relation . 2)) (RANGE . (relation . 2)) (DIGITS . (relation . 2)) (RIGHT_PAREN 
. (relation . 2)) (EQUAL_GREATER . (relation . 2)) (ELSE . (relation . 2)) 
(ELSIF . (relation . 2)) (COMMA . (relation . 2)))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
+      ((default . error) (PLUS .  154) (MINUS .  153) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (ABS .  144) (NOT .  150) 
(NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (LEFT_PAREN .  148))
+      ((default . error) (BAR .  576) (LOOP . (relation . 2)) (DO . (relation 
. 2)) (XOR . (relation . 2)) (OR . (relation . 2)) (AND . (relation . 2)) (IS . 
(relation . 2)) (WITH . (relation . 2)) (SEMICOLON . (relation . 2)) (THEN . 
(relation . 2)) (RANGE . (relation . 2)) (DIGITS . (relation . 2)) (RIGHT_PAREN 
. (relation . 2)) (EQUAL_GREATER . (relation . 2)) (ELSE . (relation . 2)) 
(ELSIF . (relation . 2)) (COMMA . (relation . 2)))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
       ((default . error) (AND . (choice_relation_and_then_list . 0)) 
(EQUAL_GREATER . (choice_relation_and_then_list . 0)) (BAR . 
(choice_relation_and_then_list . 0)))
       ((default . error) (OR . (choice_relation_or_else_list . 0)) 
(EQUAL_GREATER . (choice_relation_or_else_list . 0)) (BAR . 
(choice_relation_or_else_list . 0)))
       ((default . error) (OR . (choice_relation_or_else_list . 1)) 
(EQUAL_GREATER . (choice_relation_or_else_list . 1)) (BAR . 
(choice_relation_or_else_list . 1)))
       ((default . error) (AND . (choice_relation_and_then_list . 1)) 
(EQUAL_GREATER . (choice_relation_and_then_list . 1)) (BAR . 
(choice_relation_and_then_list . 1)))
-      ((default . error) (LEFT_PAREN .  216) (RECORD .  759))
-      ((default . error) (AT .  758))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (DOT .  90) (TICK .  91) (IS . ( 756 
(aspect_specification_opt . 0))) (WITH .  109) (LEFT_PAREN .  107))
-      ((default . error) (IS .  755))
-      ((default . error) (WITH . (discriminant_part_opt . 0)) (IS . 
(discriminant_part_opt . 0)) (LEFT_PAREN .  203))
-      ((default . error) (IS . ( 753 (aspect_specification_opt . 0))) (WITH .  
109))
-      ((default . error) (NOT .  750) (IDENTIFIER .  48) (CHARACTER_LITERAL .  
50) (STRING_LITERAL .  49))
-      ((default . error) (SEMICOLON .  749) (IS .  748))
-      ((default . error) (WITH . (discriminant_part_opt . 0)) (IS . 
(discriminant_part_opt . 0)) (SEMICOLON . (discriminant_part_opt . 0)) 
(LEFT_PAREN .  203))
-      ((default . error) (IS . ( 746 (aspect_specification_opt . 0))) (WITH .  
109))
-      ((default . error) (SEMICOLON .  745) (IS .  744))
-      ((default . error) (RENAMES .  743))
-      ((default . error) (RENAMES .  742))
-      ((default . error) (ACCESS .  235) (IDENTIFIER .  48) (CHARACTER_LITERAL 
.  50) (STRING_LITERAL .  49))
-      ((default . error) (END .  740))
-      ((default . error) (DOT .  90) (TICK .  91) (SEMICOLON . 
(package_specification . 1)) (LEFT_PAREN .  107))
-      ((default . error) (COLON_EQUAL .  739))
-      ((default . error) (SEMICOLON .  738))
-      ((default . error) (NOT . (constant_opt . 0)) (IDENTIFIER . 
(constant_opt . 0)) (STRING_LITERAL . (constant_opt . 0)) (CHARACTER_LITERAL . 
(constant_opt . 0)) (ACCESS . (constant_opt . 0)) (ARRAY . (constant_opt . 0)) 
(CONSTANT .  736))
-      ((default . error) (SEPARATE .  735) (ABSTRACT .  734))
-      ((default . error) (NULL .  733))
-      ((default . error) (LEFT_PAREN .  731))
-      ((default . error) (WITH . (parameter_profile_opt . 0)) (SEMICOLON . 
(parameter_profile_opt . 0)) (LEFT_PAREN .  729))
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (EXCEPTION . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt  [...]
+      ((default . error) (LEFT_PAREN .  148) (RECORD .  778))
+      ((default . error) (AT .  777))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (DOT .  90) (TICK .  91) (IS . ( 775 
(aspect_specification_opt . 0))) (WITH .  109) (LEFT_PAREN .  107))
+      ((default . error) (IS .  774))
+      ((default . error) (WITH . (discriminant_part_opt . 0)) (IS . 
(discriminant_part_opt . 0)) (LEFT_PAREN .  211))
+      ((default . error) (IS . ( 772 (aspect_specification_opt . 0))) (WITH .  
109))
+      ((default . error) (NOT .  729) (IDENTIFIER .  48) (CHARACTER_LITERAL .  
50) (STRING_LITERAL .  49))
+      ((default . error) (SEMICOLON .  770) (IS .  769))
+      ((default . error) (WITH . (discriminant_part_opt . 0)) (IS . 
(discriminant_part_opt . 0)) (SEMICOLON . (discriminant_part_opt . 0)) 
(LEFT_PAREN .  211))
+      ((default . error) (IS . ( 767 (aspect_specification_opt . 0))) (WITH .  
109))
+      ((default . error) (SEMICOLON .  766) (IS .  765))
+      ((default . error) (RENAMES .  764))
+      ((default . error) (RENAMES .  763))
+      ((default . error) (ACCESS .  242) (IDENTIFIER .  48) (CHARACTER_LITERAL 
.  50) (STRING_LITERAL .  49))
+      ((default . error) (END .  761))
+      ((default . error) (SEMICOLON . (package_specification . 1)))
+      ((default . error) (COLON_EQUAL .  760))
+      ((default . error) (SEMICOLON .  759))
+      ((default . error) (NOT . (constant_opt . 0)) (IDENTIFIER . 
(constant_opt . 0)) (STRING_LITERAL . (constant_opt . 0)) (CHARACTER_LITERAL . 
(constant_opt . 0)) (ACCESS . (constant_opt . 0)) (ARRAY . (constant_opt . 0)) 
(CONSTANT .  757))
+      ((default . error) (SEPARATE .  756) (ABSTRACT .  755))
+      ((default . error) (NULL .  754))
+      ((default . error) (LEFT_PAREN .  752))
+      ((default . error) (WITH . (parameter_profile_opt . 0)) (SEMICOLON . 
(parameter_profile_opt . 0)) (LEFT_PAREN .  750))
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (EXCEPTION . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt  [...]
       ((default . error) (SEMICOLON . (name_opt . 0)) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
       ((default . error) (OR . (relation_and_then_list . 0)) (XOR . 
(relation_and_then_list . 0)) (LOOP . (relation_and_then_list . 0)) (DO . 
(relation_and_then_list . 0)) (AND . (relation_and_then_list . 0)) (IS . 
(relation_and_then_list . 0)) (WITH . (relation_and_then_list . 0)) (SEMICOLON 
. (relation_and_then_list . 0)) (THEN . (relation_and_then_list . 0)) (RANGE . 
(relation_and_then_list . 0)) (COMMA . (relation_and_then_list . 0)) 
(RIGHT_PAREN . (relation_and_then_list . 0)) (DIGI [...]
       ((default . error) (AND . (relation_or_else_list . 0)) (XOR . 
(relation_or_else_list . 0)) (LOOP . (relation_or_else_list . 0)) (DO . 
(relation_or_else_list . 0)) (OR . (relation_or_else_list . 0)) (IS . 
(relation_or_else_list . 0)) (WITH . (relation_or_else_list . 0)) (SEMICOLON . 
(relation_or_else_list . 0)) (THEN . (relation_or_else_list . 0)) (RANGE . 
(relation_or_else_list . 0)) (COMMA . (relation_or_else_list . 0)) (RIGHT_PAREN 
. (relation_or_else_list . 0)) (DIGITS . (relati [...]
       ((default . error) (AND . (relation_or_else_list . 1)) (XOR . 
(relation_or_else_list . 1)) (LOOP . (relation_or_else_list . 1)) (DO . 
(relation_or_else_list . 1)) (OR . (relation_or_else_list . 1)) (IS . 
(relation_or_else_list . 1)) (WITH . (relation_or_else_list . 1)) (SEMICOLON . 
(relation_or_else_list . 1)) (THEN . (relation_or_else_list . 1)) (RANGE . 
(relation_or_else_list . 1)) (COMMA . (relation_or_else_list . 1)) (RIGHT_PAREN 
. (relation_or_else_list . 1)) (DIGITS . (relati [...]
       ((default . error) (OR . (relation_and_then_list . 1)) (XOR . 
(relation_and_then_list . 1)) (LOOP . (relation_and_then_list . 1)) (DO . 
(relation_and_then_list . 1)) (AND . (relation_and_then_list . 1)) (IS . 
(relation_and_then_list . 1)) (WITH . (relation_and_then_list . 1)) (SEMICOLON 
. (relation_and_then_list . 1)) (THEN . (relation_and_then_list . 1)) (RANGE . 
(relation_and_then_list . 1)) (COMMA . (relation_and_then_list . 1)) 
(RIGHT_PAREN . (relation_and_then_list . 1)) (DIGI [...]
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
       ((default . error) (LOOP . (raise_expression . 1)) (DO . 
(raise_expression . 1)) (XOR . (raise_expression . 1)) (OR . (raise_expression 
. 1)) (AND . (raise_expression . 1)) (IS . (raise_expression . 1)) (SEMICOLON . 
(raise_expression . 1)) (WITH . (raise_expression . 1)) (THEN . 
(raise_expression . 1)) (RANGE . (raise_expression . 1)) (RIGHT_PAREN . 
(raise_expression . 1)) (COMMA . (raise_expression . 1)) (DIGITS . 
(raise_expression . 1)) (EQUAL_GREATER . (raise_expression . 1)) (E [...]
-      ((default . error) (OF .  724) (COLON .  725) (IN .  723))
-      ((default . error) (EQUAL_GREATER .  722))
+      ((default . error) (LOOP . (aggregate . 4)) (DO . (aggregate . 4)) (OF . 
(aggregate . 4)) (ACCEPT . (aggregate . 4)) (ABORT . (aggregate . 4)) (BEGIN . 
(aggregate . 4)) (CASE . (aggregate . 4)) (DECLARE . (aggregate . 4)) (DELAY . 
(aggregate . 4)) (EXIT . (aggregate . 4)) (FOR . (aggregate . 4)) (GOTO . 
(aggregate . 4)) (IF . (aggregate . 4)) (NULL . (aggregate . 4)) (PRAGMA . 
(aggregate . 4)) (RAISE . (aggregate . 4)) (REQUEUE . (aggregate . 4)) (SELECT 
. (aggregate . 4)) (WHILE . [...]
+      ((default . error) (PLUS . (primary . 1)) (MINUS . (primary . 1)) 
(AMPERSAND . (primary . 1)) (DOT_DOT . (primary . 1)) (IN . (primary . 1)) (NOT 
. (primary . 1)) (EQUAL . (primary . 1)) (GREATER . (primary . 1)) 
(GREATER_EQUAL . (primary . 1)) (LESS . (primary . 1)) (LESS_EQUAL . (primary . 
1)) (SLASH_EQUAL . (primary . 1)) (RIGHT_PAREN . (primary . 1)) (COMMA . 
(primary . 1)) (MOD . (primary . 1)) (REM . (primary . 1)) (SLASH . (primary . 
1)) (STAR . (primary . 1)) (STAR_STAR . ( [...]
+      ((default . error) (COMMA .  273) (RIGHT_PAREN .  745))
+      ((default . error) (ELSE .  741) (RIGHT_PAREN . (if_expression . 3)) 
(COMMA . (if_expression . 3)) (ELSIF .  742))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (REVERSE .  735) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) 
(ABS .  144) (NOT .  734) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(LEFT_PAREN .  148))
+      ((default . error) (REVERSE .  732) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
+      ((default . error) (NOT .  729) (IDENTIFIER .  48) (CHARACTER_LITERAL .  
50) (STRING_LITERAL .  49))
+      ((default . error) (EQUAL_GREATER . (discrete_choice_list . 0)) (BAR . 
(discrete_choice_list . 0)) (OTHERS .  182) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) 
(ABS .  144) (NOT .  181) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(LEFT_PAREN .  148))
+      ((default . error) (RIGHT_PAREN . (case_expression_alternative_list . 
0)) (COMMA . (case_expression_alternative_list . 0)))
+      ((default . error) (RIGHT_PAREN . (case_expression . 0)) (COMMA . ( 727 
(case_expression . 0))))
       ((default . error) (IS . (aspect_specification_opt . 0)) (WITH .  109))
       ((default . error) (IS . (aspect_specification_opt . 0)) (WITH .  109))
       ((default . error) (IS .  134))
-      ((default . error) (IDENTIFIER .  719))
+      ((default . error) (IDENTIFIER .  724))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (EXCEPTION . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt  [...]
-      ((default . error) (IS . (expression_opt . 0)) (RAISE .  149) (PLUS .  
151) (MINUS .  150) (ABS .  144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  
148) (NEW .  146) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL 
.  49) (LEFT_PAREN .  145))
-      ((default . error) (BEGIN . (declarative_part_opt . 0)) (USE .  11) 
(SUBTYPE .  301) (PRAGMA .  7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(ENTRY . (overriding_indicator_opt . 2)) (FOR .  298) (IDENTIFIER .  304) (TYPE 
.  303) (GENERIC .  2) (PROTECTED .  300) (TASK .  302) (PACKAGE .  299))
-      ((default . error) (UNTIL .  713) (RAISE .  149) (PLUS .  151) (MINUS .  
150) (ABS .  144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  
146) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) 
(LEFT_PAREN .  145))
-      ((default . error) (WHEN . (identifier_opt . 0)) (SEMICOLON . 
(identifier_opt . 0)) (IDENTIFIER .  711))
-      ((default . error) (LOOP . (iterator_specification_opt . 0)) (IDENTIFIER 
.  620))
-      ((default . error) (IDENTIFIER .  708))
-      ((default . error) (THEN . (expression_opt . 0)) (RAISE .  149) (PLUS .  
151) (MINUS .  150) (ABS .  144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  
148) (NEW .  146) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL 
.  49) (LEFT_PAREN .  145))
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (ACCEPT . 
(label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . 
(label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) (LOOP . 
(label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . 
(label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . 
(label_opt . 0)) (GOTO . (label_opt . 0)) (NULL . (label_opt . 0)) (PRAGMA . 
(label_opt . 0)) (RAISE . (labe [...]
-      ((default . error) (SEMICOLON .  705))
-      ((default . error) (SEMICOLON .  703) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (EXCEPTION . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt  [...]
+      ((default . error) (IS . (expression_opt . 0)) (RAISE .  152) (PLUS .  
154) (MINUS .  153) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  
151) (NEW .  149) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL 
.  49) (LEFT_PAREN .  148))
+      ((default . error) (BEGIN . (declarative_part_opt . 0)) (USE .  11) 
(SUBTYPE .  302) (PRAGMA .  7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(ENTRY . (overriding_indicator_opt . 2)) (FOR .  299) (IDENTIFIER .  305) (TYPE 
.  304) (GENERIC .  2) (PROTECTED .  301) (TASK .  303) (PACKAGE .  300))
+      ((default . error) (UNTIL .  718) (RAISE .  152) (PLUS .  154) (MINUS .  
153) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  
149) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) 
(LEFT_PAREN .  148))
+      ((default . error) (WHEN . (identifier_opt . 0)) (SEMICOLON . 
(identifier_opt . 0)) (IDENTIFIER .  716))
+      ((default . error) (LOOP . (iterator_specification_opt . 0)) (IDENTIFIER 
.  408))
+      ((default . error) (IDENTIFIER .  713))
+      ((default . error) (THEN . (expression_opt . 0)) (RAISE .  152) (PLUS .  
154) (MINUS .  153) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  
151) (NEW .  149) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL 
.  49) (LEFT_PAREN .  148))
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (ACCEPT . 
(label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . 
(label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) (LOOP . 
(label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . 
(label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . 
(label_opt . 0)) (GOTO . (label_opt . 0)) (NULL . (label_opt . 0)) (PRAGMA . 
(label_opt . 0)) (RAISE . (labe [...]
+      ((default . error) (SEMICOLON .  710))
+      ((default . error) (SEMICOLON .  708) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (SEMICOLON .  697) (DO . 
(extended_return_object_declaration_opt . 0)) (RAISE .  149) (PLUS .  151) 
(MINUS .  150) (ABS .  144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) 
(NEW .  146) (IDENTIFIER .  698) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  
49) (LEFT_PAREN .  145))
-      ((default . error) (ELSE . (select_alternative_list_opt . 0)) (END . 
(select_alternative_list_opt . 0)) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (DELAY .  630) (WHEN .  686) (TERMINATE .  685) (ACCEPT 
.  625))
-      ((default . error) (LOOP . (expression_opt . 0)) (RAISE .  149) (PLUS .  
151) (MINUS .  150) (ABS .  144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  
148) (NEW .  146) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL 
.  49) (LEFT_PAREN .  145))
-      ((default . error) (IDENTIFIER .  683))
-      ((default . error) (COLON .  682))
+      ((default . error) (SEMICOLON .  702) (DO . 
(extended_return_object_declaration_opt . 0)) (RAISE .  152) (PLUS .  154) 
(MINUS .  153) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) 
(NEW .  149) (IDENTIFIER .  703) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  
49) (LEFT_PAREN .  148))
+      ((default . error) (ELSE . (select_alternative_list_opt . 0)) (END . 
(select_alternative_list_opt . 0)) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (DELAY .  635) (WHEN .  691) (TERMINATE .  690) (ACCEPT 
.  630))
+      ((default . error) (LOOP . (expression_opt . 0)) (RAISE .  152) (PLUS .  
154) (MINUS .  153) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  
151) (NEW .  149) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL 
.  49) (LEFT_PAREN .  148))
+      ((default . error) (IDENTIFIER .  688))
+      ((default . error) (COLON .  687))
       ((default . error) (OR . (compound_statement . 5)) (THEN . 
(compound_statement . 5)) (WHEN . (compound_statement . 5)) (EXCEPTION . 
(compound_statement . 5)) (END . (compound_statement . 5)) (ACCEPT . 
(compound_statement . 5)) (ABORT . (compound_statement . 5)) (BEGIN . 
(compound_statement . 5)) (CASE . (compound_statement . 5)) (DECLARE . 
(compound_statement . 5)) (DELAY . (compound_statement . 5)) (EXIT . 
(compound_statement . 5)) (FOR . (compound_statement . 5)) (GOTO . (compoun 
[...]
       ((default . error) (OR . (simple_statement . 1)) (THEN . 
(simple_statement . 1)) (WHEN . (simple_statement . 1)) (EXCEPTION . 
(simple_statement . 1)) (END . (simple_statement . 1)) (ACCEPT . 
(simple_statement . 1)) (ABORT . (simple_statement . 1)) (BEGIN . 
(simple_statement . 1)) (CASE . (simple_statement . 1)) (DECLARE . 
(simple_statement . 1)) (DELAY . (simple_statement . 1)) (EXIT . 
(simple_statement . 1)) (FOR . (simple_statement . 1)) (GOTO . 
(simple_statement . 1)) (IF . (sim [...]
       ((default . error) (OR . (select_statement . 3)) (THEN . 
(select_statement . 3)) (WHEN . (select_statement . 3)) (EXCEPTION . 
(select_statement . 3)) (END . (select_statement . 3)) (ACCEPT . 
(select_statement . 3)) (ABORT . (select_statement . 3)) (BEGIN . 
(select_statement . 3)) (CASE . (select_statement . 3)) (DECLARE . 
(select_statement . 3)) (DELAY . (select_statement . 3)) (EXIT . 
(select_statement . 3)) (FOR . (select_statement . 3)) (GOTO . 
(select_statement . 3)) (IF . (sel [...]
@@ -2457,186 +2472,183 @@
       ((default . error) (OR . (simple_statement . 7)) (THEN . 
(simple_statement . 7)) (WHEN . (simple_statement . 7)) (EXCEPTION . 
(simple_statement . 7)) (END . (simple_statement . 7)) (ACCEPT . 
(simple_statement . 7)) (ABORT . (simple_statement . 7)) (BEGIN . 
(simple_statement . 7)) (CASE . (simple_statement . 7)) (DECLARE . 
(simple_statement . 7)) (DELAY . (simple_statement . 7)) (EXIT . 
(simple_statement . 7)) (FOR . (simple_statement . 7)) (GOTO . 
(simple_statement . 7)) (IF . (sim [...]
       ((default . error) (OR . (simple_statement . 2)) (THEN . 
(simple_statement . 2)) (WHEN . (simple_statement . 2)) (EXCEPTION . 
(simple_statement . 2)) (END . (simple_statement . 2)) (ACCEPT . 
(simple_statement . 2)) (ABORT . (simple_statement . 2)) (BEGIN . 
(simple_statement . 2)) (CASE . (simple_statement . 2)) (DECLARE . 
(simple_statement . 2)) (DELAY . (simple_statement . 2)) (EXIT . 
(simple_statement . 2)) (FOR . (simple_statement . 2)) (GOTO . 
(simple_statement . 2)) (IF . (sim [...]
       ((default . error) (OR . (compound_statement . 4)) (THEN . 
(compound_statement . 4)) (WHEN . (compound_statement . 4)) (EXCEPTION . 
(compound_statement . 4)) (END . (compound_statement . 4)) (ACCEPT . 
(compound_statement . 4)) (ABORT . (compound_statement . 4)) (BEGIN . 
(compound_statement . 4)) (CASE . (compound_statement . 4)) (DECLARE . 
(compound_statement . 4)) (DELAY . (compound_statement . 4)) (EXIT . 
(compound_statement . 4)) (FOR . (compound_statement . 4)) (GOTO . (compoun 
[...]
-      ((default . error) (END .  681))
+      ((default . error) (END .  686))
       ((default . error) (OR . (compound_statement . 0)) (THEN . 
(compound_statement . 0)) (WHEN . (compound_statement . 0)) (EXCEPTION . 
(compound_statement . 0)) (END . (compound_statement . 0)) (ACCEPT . 
(compound_statement . 0)) (ABORT . (compound_statement . 0)) (BEGIN . 
(compound_statement . 0)) (CASE . (compound_statement . 0)) (DECLARE . 
(compound_statement . 0)) (DELAY . (compound_statement . 0)) (EXIT . 
(compound_statement . 0)) (FOR . (compound_statement . 0)) (GOTO . (compoun 
[...]
-      ((default . error) (LOOP .  680))
-      ((default . error) (NULL .  636) (GOTO .  633) (ABORT .  626) (ACCEPT .  
625) (DECLARE .  629) (BEGIN .  627) (LOOP .  635) (CASE .  628) (IF .  634) 
(PRAGMA .  7) (RAISE .  637) (DELAY .  630) (REQUEUE .  638) (RETURN .  639) 
(EXIT .  631) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  
49) (WHILE .  641) (FOR .  632) (SELECT .  640))
+      ((default . error) (LOOP .  685))
+      ((default . error) (NULL .  641) (GOTO .  638) (ABORT .  631) (ACCEPT .  
630) (DECLARE .  634) (BEGIN .  632) (LOOP .  640) (CASE .  633) (IF .  639) 
(PRAGMA .  7) (RAISE .  642) (DELAY .  635) (REQUEUE .  643) (RETURN .  644) 
(EXIT .  636) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  
49) (WHILE .  646) (FOR .  637) (SELECT .  645))
       ((default . error) (OR . (compound_statement . 2)) (THEN . 
(compound_statement . 2)) (WHEN . (compound_statement . 2)) (EXCEPTION . 
(compound_statement . 2)) (END . (compound_statement . 2)) (ACCEPT . 
(compound_statement . 2)) (ABORT . (compound_statement . 2)) (BEGIN . 
(compound_statement . 2)) (CASE . (compound_statement . 2)) (DECLARE . 
(compound_statement . 2)) (DELAY . (compound_statement . 2)) (EXIT . 
(compound_statement . 2)) (FOR . (compound_statement . 2)) (GOTO . (compoun 
[...]
-      ((default . error) (DOT .  90) (SEMICOLON .  677) (TICK .  91) 
(COLON_EQUAL .  676) (LEFT_PAREN .  107))
+      ((default . error) (DOT .  90) (SEMICOLON .  682) (TICK .  91) 
(COLON_EQUAL .  681) (LEFT_PAREN .  107))
       ((default . error) (OR . (simple_statement . 10)) (THEN . 
(simple_statement . 10)) (WHEN . (simple_statement . 10)) (EXCEPTION . 
(simple_statement . 10)) (END . (simple_statement . 10)) (ACCEPT . 
(simple_statement . 10)) (ABORT . (simple_statement . 10)) (BEGIN . 
(simple_statement . 10)) (CASE . (simple_statement . 10)) (DECLARE . 
(simple_statement . 10)) (DELAY . (simple_statement . 10)) (EXIT . 
(simple_statement . 10)) (FOR . (simple_statement . 10)) (GOTO . 
(simple_statement . 1 [...]
       ((default . error) (OR . (simple_statement . 4)) (THEN . 
(simple_statement . 4)) (WHEN . (simple_statement . 4)) (EXCEPTION . 
(simple_statement . 4)) (END . (simple_statement . 4)) (ACCEPT . 
(simple_statement . 4)) (ABORT . (simple_statement . 4)) (BEGIN . 
(simple_statement . 4)) (CASE . (simple_statement . 4)) (DECLARE . 
(simple_statement . 4)) (DELAY . (simple_statement . 4)) (EXIT . 
(simple_statement . 4)) (FOR . (simple_statement . 4)) (GOTO . 
(simple_statement . 4)) (IF . (sim [...]
       ((default . error) (OR . (simple_statement . 9)) (THEN . 
(simple_statement . 9)) (WHEN . (simple_statement . 9)) (EXCEPTION . 
(simple_statement . 9)) (END . (simple_statement . 9)) (ACCEPT . 
(simple_statement . 9)) (ABORT . (simple_statement . 9)) (BEGIN . 
(simple_statement . 9)) (CASE . (simple_statement . 9)) (DECLARE . 
(simple_statement . 9)) (DELAY . (simple_statement . 9)) (EXIT . 
(simple_statement . 9)) (FOR . (simple_statement . 9)) (GOTO . 
(simple_statement . 9)) (IF . (sim [...]
       ((default . error) (OR . (simple_statement . 6)) (THEN . 
(simple_statement . 6)) (WHEN . (simple_statement . 6)) (EXCEPTION . 
(simple_statement . 6)) (END . (simple_statement . 6)) (ACCEPT . 
(simple_statement . 6)) (ABORT . (simple_statement . 6)) (BEGIN . 
(simple_statement . 6)) (CASE . (simple_statement . 6)) (DECLARE . 
(simple_statement . 6)) (DELAY . (simple_statement . 6)) (EXIT . 
(simple_statement . 6)) (FOR . (simple_statement . 6)) (GOTO . 
(simple_statement . 6)) (IF . (sim [...]
       ((default . error) (OR . (select_statement . 0)) (THEN . 
(select_statement . 0)) (WHEN . (select_statement . 0)) (EXCEPTION . 
(select_statement . 0)) (END . (select_statement . 0)) (ACCEPT . 
(select_statement . 0)) (ABORT . (select_statement . 0)) (BEGIN . 
(select_statement . 0)) (CASE . (select_statement . 0)) (DECLARE . 
(select_statement . 0)) (DELAY . (select_statement . 0)) (EXIT . 
(select_statement . 0)) (FOR . (select_statement . 0)) (GOTO . 
(select_statement . 0)) (IF . (sel [...]
       ((default . error) (OR . (compound_statement . 6)) (THEN . 
(compound_statement . 6)) (WHEN . (compound_statement . 6)) (EXCEPTION . 
(compound_statement . 6)) (END . (compound_statement . 6)) (ACCEPT . 
(compound_statement . 6)) (ABORT . (compound_statement . 6)) (BEGIN . 
(compound_statement . 6)) (CASE . (compound_statement . 6)) (DECLARE . 
(compound_statement . 6)) (DELAY . (compound_statement . 6)) (EXIT . 
(compound_statement . 6)) (FOR . (compound_statement . 6)) (GOTO . (compoun 
[...]
-      ((default . error) (WHEN . (sequence_of_statements_opt . 1)) (THEN . 
(sequence_of_statements_opt . 1)) (OR . (sequence_of_statements_opt . 1)) 
(ELSIF . (sequence_of_statements_opt . 1)) (ELSE . (sequence_of_statements_opt 
. 1)) (END . (sequence_of_statements_opt . 1)) (EXCEPTION . 
(sequence_of_statements_opt . 1)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_op [...]
-      ((default . error) (END . (handled_sequence_of_statements . 1)) 
(EXCEPTION .  674))
+      ((default . error) (WHEN . (sequence_of_statements_opt . 1)) (THEN . 
(sequence_of_statements_opt . 1)) (OR . (sequence_of_statements_opt . 1)) 
(ELSIF . (sequence_of_statements_opt . 1)) (ELSE . (sequence_of_statements_opt 
. 1)) (END . (sequence_of_statements_opt . 1)) (EXCEPTION . 
(sequence_of_statements_opt . 1)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_op [...]
+      ((default . error) (END . (handled_sequence_of_statements . 1)) 
(EXCEPTION .  679))
       ((default . error) (OR . (simple_statement . 5)) (THEN . 
(simple_statement . 5)) (WHEN . (simple_statement . 5)) (EXCEPTION . 
(simple_statement . 5)) (END . (simple_statement . 5)) (ACCEPT . 
(simple_statement . 5)) (ABORT . (simple_statement . 5)) (BEGIN . 
(simple_statement . 5)) (CASE . (simple_statement . 5)) (DECLARE . 
(simple_statement . 5)) (DELAY . (simple_statement . 5)) (EXIT . 
(simple_statement . 5)) (FOR . (simple_statement . 5)) (GOTO . 
(simple_statement . 5)) (IF . (sim [...]
       ((default . error) (WHEN . (sequence_of_statements . 0)) (THEN . 
(sequence_of_statements . 0)) (OR . (sequence_of_statements . 0)) (ELSIF . 
(sequence_of_statements . 0)) (ELSE . (sequence_of_statements . 0)) (EXCEPTION 
. (sequence_of_statements . 0)) (END . (sequence_of_statements . 0)) (ACCEPT . 
(sequence_of_statements . 0)) (ABORT . (sequence_of_statements . 0)) (BEGIN . 
(sequence_of_statements . 0)) (CASE . (sequence_of_statements . 0)) (DECLARE . 
(sequence_of_statements . 0)) ( [...]
       ((default . error) (OR . (select_statement . 1)) (THEN . 
(select_statement . 1)) (WHEN . (select_statement . 1)) (EXCEPTION . 
(select_statement . 1)) (END . (select_statement . 1)) (ACCEPT . 
(select_statement . 1)) (ABORT . (select_statement . 1)) (BEGIN . 
(select_statement . 1)) (CASE . (select_statement . 1)) (DECLARE . 
(select_statement . 1)) (DELAY . (select_statement . 1)) (EXIT . 
(select_statement . 1)) (FOR . (select_statement . 1)) (GOTO . 
(select_statement . 1)) (IF . (sel [...]
-      ((default . error) (SEMICOLON .  673))
-      ((default . error) (SEMICOLON .  672))
+      ((default . error) (SEMICOLON .  678))
+      ((default . error) (SEMICOLON .  677))
       ((default . error) (IDENTIFIER . (generic_instantiation . 2)) (TYPE . 
(generic_instantiation . 2)) (TASK . (generic_instantiation . 2)) (SUBTYPE . 
(generic_instantiation . 2)) (PROTECTED . (generic_instantiation . 2)) (FOR . 
(generic_instantiation . 2)) (ENTRY . (generic_instantiation . 2)) (BEGIN . 
(generic_instantiation . 2)) (END . (generic_instantiation . 2)) (WITH . 
(generic_instantiation . 2)) (USE . (generic_instantiation . 2)) (SEPARATE . 
(generic_instantiation . 2)) (PROCE [...]
       ((default . error) (IDENTIFIER . (generic_instantiation . 1)) (TYPE . 
(generic_instantiation . 1)) (TASK . (generic_instantiation . 1)) (SUBTYPE . 
(generic_instantiation . 1)) (PROTECTED . (generic_instantiation . 1)) (FOR . 
(generic_instantiation . 1)) (ENTRY . (generic_instantiation . 1)) (BEGIN . 
(generic_instantiation . 1)) (END . (generic_instantiation . 1)) (WITH . 
(generic_instantiation . 1)) (USE . (generic_instantiation . 1)) (SEPARATE . 
(generic_instantiation . 1)) (PROCE [...]
-      ((default . error) (END . (exception_handler_list_opt . 0)) (WHEN .  
945))
+      ((default . error) (END . (exception_handler_list_opt . 0)) (WHEN .  
950))
       ((default . error) (OR . (sequence_of_statements . 1)) (THEN . 
(sequence_of_statements . 1)) (WHEN . (sequence_of_statements . 1)) 
(CHARACTER_LITERAL . (sequence_of_statements . 1)) (STRING_LITERAL . 
(sequence_of_statements . 1)) (IDENTIFIER . (sequence_of_statements . 1)) 
(LESS_LESS . (sequence_of_statements . 1)) (WHILE . (sequence_of_statements . 
1)) (SELECT . (sequence_of_statements . 1)) (RETURN . (sequence_of_statements . 
1)) (REQUEUE . (sequence_of_statements . 1)) (RAISE .  [...]
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
       ((default . error) (WHEN . (procedure_call_statement . 0)) (OR . 
(procedure_call_statement . 0)) (THEN . (procedure_call_statement . 0)) (ELSIF 
. (procedure_call_statement . 0)) (ELSE . (procedure_call_statement . 0)) 
(CHARACTER_LITERAL . (procedure_call_statement . 0)) (STRING_LITERAL . 
(procedure_call_statement . 0)) (IDENTIFIER . (procedure_call_statement . 0)) 
(LESS_LESS . (procedure_call_statement . 0)) (WHILE . (procedure_call_statement 
. 0)) (SELECT . (procedure_call_stateme [...]
       ((default . error) (OR . (statement . 1)) (THEN . (statement . 1)) (WHEN 
. (statement . 1)) (EXCEPTION . (statement . 1)) (END . (statement . 1)) 
(ACCEPT . (statement . 1)) (ABORT . (statement . 1)) (BEGIN . (statement . 1)) 
(CASE . (statement . 1)) (DECLARE . (statement . 1)) (DELAY . (statement . 1)) 
(EXIT . (statement . 1)) (FOR . (statement . 1)) (GOTO . (statement . 1)) (IF . 
(statement . 1)) (LOOP . (statement . 1)) (NULL . (statement . 1)) (PRAGMA . 
(statement . 1)) (RAISE . [...]
       ((default . error) (OR . (statement . 0)) (THEN . (statement . 0)) (WHEN 
. (statement . 0)) (EXCEPTION . (statement . 0)) (END . (statement . 0)) 
(ACCEPT . (statement . 0)) (ABORT . (statement . 0)) (BEGIN . (statement . 0)) 
(CASE . (statement . 0)) (DECLARE . (statement . 0)) (DELAY . (statement . 0)) 
(EXIT . (statement . 0)) (FOR . (statement . 0)) (GOTO . (statement . 0)) (IF . 
(statement . 0)) (LOOP . (statement . 0)) (NULL . (statement . 0)) (PRAGMA . 
(statement . 0)) (RAISE . [...]
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (ACCEPT . 
(label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . 
(label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) (LOOP . 
(label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . 
(label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . 
(label_opt . 0)) (GOTO . (label_opt . 0)) (NULL . (label_opt . 0)) (PRAGMA . 
(label_opt . 0)) (RAISE . (labe [...]
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (ACCEPT . 
(label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . 
(label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) (LOOP . 
(label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . 
(label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . 
(label_opt . 0)) (GOTO . (label_opt . 0)) (NULL . (label_opt . 0)) (PRAGMA . 
(label_opt . 0)) (RAISE . (labe [...]
       ((default . error) (SEMICOLON . (name_opt . 0)) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
       ((default . error) (CHARACTER_LITERAL . (label_opt . 2)) (STRING_LITERAL 
. (label_opt . 2)) (IDENTIFIER . (label_opt . 2)) (REQUEUE . (label_opt . 2)) 
(RAISE . (label_opt . 2)) (PRAGMA . (label_opt . 2)) (NULL . (label_opt . 2)) 
(GOTO . (label_opt . 2)) (EXIT . (label_opt . 2)) (DELAY . (label_opt . 2)) 
(ABORT . (label_opt . 2)) (WHILE . (label_opt . 2)) (SELECT . (label_opt . 2)) 
(RETURN . (label_opt . 2)) (LOOP . (label_opt . 2)) (IF . (label_opt . 2)) (FOR 
. (label_opt . 2)) (DE [...]
-      ((default . error) (GREATER_GREATER .  941))
+      ((default . error) (GREATER_GREATER .  946))
       ((default . error) (LOOP . (iteration_scheme . 0)))
-      ((default . error) (SEMICOLON .  940))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (OR . 
(sequence_of_statements_opt . 0)) (ELSE . (sequence_of_statements_opt . 0)) 
(ACCEPT . (label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) 
(DECLARE . (label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) 
(LOOP . (label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) 
(WHILE . (label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) 
(EXIT . (label_opt . 0)) (GOTO . ( [...]
+      ((default . error) (SEMICOLON .  945))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (OR . 
(sequence_of_statements_opt . 0)) (ELSE . (sequence_of_statements_opt . 0)) 
(ACCEPT . (label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) 
(DECLARE . (label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) 
(LOOP . (label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) 
(WHILE . (label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) 
(EXIT . (label_opt . 0)) (GOTO . ( [...]
       ((default . error) (ELSE . (select_alternative . 3)) (OR . 
(select_alternative . 3)) (END . (select_alternative . 3)))
-      ((default . error) (OR . (sequence_of_statements_opt . 0)) (END . 
(sequence_of_statements_opt . 0)) (ELSE . (sequence_of_statements_opt . 0)) 
(THEN . (sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_op [...]
-      ((default . error) (ELSE .  935) (OR .  936))
-      ((default . error) (DOT .  90) (SEMICOLON .  677) (TICK .  91) (OR . 
(sequence_of_statements_opt . 0)) (ELSE . (sequence_of_statements_opt . 0)) 
(THEN . (sequence_of_statements_opt . 0)) (LEFT_PAREN .  107) (ACCEPT . 
(label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . 
(label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) (LOOP . 
(label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . 
(label_opt . 0)) (ABORT . (label_opt . [...]
-      ((default . error) (OR . (sequence_of_statements_opt . 0)) (ELSE . 
(sequence_of_statements_opt . 0)) (THEN . (sequence_of_statements_opt . 0)) 
(ACCEPT . (label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) 
(DECLARE . (label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) 
(LOOP . (label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) 
(WHILE . (label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) 
(EXIT . (label_opt . 0)) (GOTO .  [...]
+      ((default . error) (OR . (sequence_of_statements_opt . 0)) (END . 
(sequence_of_statements_opt . 0)) (ELSE . (sequence_of_statements_opt . 0)) 
(THEN . (sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_op [...]
+      ((default . error) (ELSE .  940) (OR .  941))
+      ((default . error) (DOT .  90) (SEMICOLON .  682) (TICK .  91) (OR . 
(sequence_of_statements_opt . 0)) (ELSE . (sequence_of_statements_opt . 0)) 
(THEN . (sequence_of_statements_opt . 0)) (LEFT_PAREN .  107) (ACCEPT . 
(label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . 
(label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) (LOOP . 
(label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . 
(label_opt . 0)) (ABORT . (label_opt . [...]
+      ((default . error) (OR . (sequence_of_statements_opt . 0)) (ELSE . 
(sequence_of_statements_opt . 0)) (THEN . (sequence_of_statements_opt . 0)) 
(ACCEPT . (label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) 
(DECLARE . (label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) 
(LOOP . (label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) 
(WHILE . (label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) 
(EXIT . (label_opt . 0)) (GOTO .  [...]
       ((default . error) (ELSE . (select_alternative_list . 0)) (END . 
(select_alternative_list . 0)) (OR . (select_alternative_list . 0)))
-      ((default . error) (ELSE . (select_alternative_list_opt . 1)) (END . 
(select_alternative_list_opt . 1)) (OR .  932))
-      ((default . error) (ELSE .  930) (END .  931))
-      ((default . error) (THEN .  929))
+      ((default . error) (ELSE . (select_alternative_list_opt . 1)) (END . 
(select_alternative_list_opt . 1)) (OR .  937))
+      ((default . error) (ELSE .  935) (END .  936))
+      ((default . error) (THEN .  934))
       ((default . error) (WHEN . (simple_return_statement . 0)) (THEN . 
(simple_return_statement . 0)) (OR . (simple_return_statement . 0)) (ELSIF . 
(simple_return_statement . 0)) (ELSE . (simple_return_statement . 0)) 
(CHARACTER_LITERAL . (simple_return_statement . 0)) (STRING_LITERAL . 
(simple_return_statement . 0)) (IDENTIFIER . (simple_return_statement . 0)) 
(LESS_LESS . (simple_return_statement . 0)) (WHILE . (simple_return_statement . 
0)) (SELECT . (simple_return_statement . 0)) (R [...]
-      ((default . error) (COLON .  928) (STAR_STAR . (name . 0)) (STAR . (name 
. 0)) (SLASH . (name . 0)) (REM . (name . 0)) (MOD . (name . 0)) (SEMICOLON . 
(name . 0)) (SLASH_EQUAL . (name . 0)) (LESS_EQUAL . (name . 0)) (LESS . (name 
. 0)) (GREATER_EQUAL . (name . 0)) (GREATER . (name . 0)) (EQUAL . (name . 0)) 
(NOT . (name . 0)) (IN . (name . 0)) (AMPERSAND . (name . 0)) (MINUS . (name . 
0)) (PLUS . (name . 0)) (LEFT_PAREN . (name . 0)) (AND . (name . 0)) (OR . 
(name . 0)) (XOR . (nam [...]
-      ((default . error) (SEMICOLON .  927))
-      ((default . error) (DO . (extended_return_object_declaration_opt . 1)) 
(SEMICOLON .  926))
-      ((default . error) (DO .  925))
-      ((default . error) (WITH .  923) (DOT .  90) (TICK .  91) (SEMICOLON .  
924) (LEFT_PAREN .  107))
+      ((default . error) (COLON .  933) (STAR_STAR . (name . 0)) (STAR . (name 
. 0)) (SLASH . (name . 0)) (REM . (name . 0)) (MOD . (name . 0)) (SEMICOLON . 
(name . 0)) (SLASH_EQUAL . (name . 0)) (LESS_EQUAL . (name . 0)) (LESS . (name 
. 0)) (GREATER_EQUAL . (name . 0)) (GREATER . (name . 0)) (EQUAL . (name . 0)) 
(NOT . (name . 0)) (IN . (name . 0)) (AMPERSAND . (name . 0)) (MINUS . (name . 
0)) (PLUS . (name . 0)) (LEFT_PAREN . (name . 0)) (AND . (name . 0)) (OR . 
(name . 0)) (XOR . (nam [...]
+      ((default . error) (SEMICOLON .  932))
+      ((default . error) (DO . (extended_return_object_declaration_opt . 1)) 
(SEMICOLON .  931))
+      ((default . error) (DO .  930))
+      ((default . error) (WITH .  928) (DOT .  90) (TICK .  91) (SEMICOLON .  
929) (LEFT_PAREN .  107))
       ((default . error) (WHEN . (raise_statement . 0)) (THEN . 
(raise_statement . 0)) (OR . (raise_statement . 0)) (ELSIF . (raise_statement . 
0)) (ELSE . (raise_statement . 0)) (CHARACTER_LITERAL . (raise_statement . 0)) 
(STRING_LITERAL . (raise_statement . 0)) (IDENTIFIER . (raise_statement . 0)) 
(LESS_LESS . (raise_statement . 0)) (WHILE . (raise_statement . 0)) (SELECT . 
(raise_statement . 0)) (RETURN . (raise_statement . 0)) (REQUEUE . 
(raise_statement . 0)) (RAISE . (raise_stateme [...]
-      ((default . error) (WITH .  921) (DOT .  90) (TICK .  91) (SEMICOLON .  
922) (LEFT_PAREN .  107))
+      ((default . error) (WITH .  926) (DOT .  90) (TICK .  91) (SEMICOLON .  
927) (LEFT_PAREN .  107))
       ((default . error) (WHEN . (simple_statement . 0)) (THEN . 
(simple_statement . 0)) (OR . (simple_statement . 0)) (ELSIF . 
(simple_statement . 0)) (ELSE . (simple_statement . 0)) (CHARACTER_LITERAL . 
(simple_statement . 0)) (STRING_LITERAL . (simple_statement . 0)) (IDENTIFIER . 
(simple_statement . 0)) (LESS_LESS . (simple_statement . 0)) (WHILE . 
(simple_statement . 0)) (SELECT . (simple_statement . 0)) (RETURN . 
(simple_statement . 0)) (REQUEUE . (simple_statement . 0)) (RAISE . ( [...]
-      ((default . error) (END .  920))
-      ((default . error) (THEN .  919))
-      ((default . error) (SEMICOLON .  918))
+      ((default . error) (END .  925))
+      ((default . error) (THEN .  924))
+      ((default . error) (SEMICOLON .  923))
       ((default . error) (LOOP . (iterator_specification_opt . 1)))
       ((default . error) (LOOP . (iteration_scheme . 1)))
       ((default . error) (WHEN . (identifier_opt . 1)) (SEMICOLON . 
(identifier_opt . 1)))
-      ((default . error) (WHEN .  916) (SEMICOLON .  917))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (SEMICOLON .  914))
-      ((default . error) (BEGIN .  913))
-      ((default . error) (IS .  912))
-      ((default . error) (END .  911))
-      ((default . error) (DOT .  90) (TICK .  91) (SEMICOLON .  910) 
(LEFT_PAREN .  107))
-      ((default . error) (SEMICOLON . (actual_parameter_part_opt . 0)) (DO . 
(actual_parameter_part_opt . 0)) (LEFT_PAREN . ( 907 (actual_parameter_part_opt 
. 0))))
-      ((default . error) (IS .  906))
-      ((default . error) (IS .  905))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (REVERSE .  902) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (PLUS .  151) (MINUS .  150) 
(ABS .  144) (NOT .  769) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(LEFT_PAREN .  145))
-      ((default . error) (REVERSE .  900) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
-      ((default . error) (NOT .  750) (IDENTIFIER .  48) (CHARACTER_LITERAL .  
50) (STRING_LITERAL .  49))
-      ((default . error) (COMMA . (pragma_argument_association . 2)) 
(RIGHT_PAREN . (pragma_argument_association . 2)))
-      ((default . error) (SEMICOLON .  898))
-      ((default . error) (END .  897))
-      ((default . error) (IDENTIFIER .  228) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  769) 
(NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
+      ((default . error) (WHEN .  921) (SEMICOLON .  922))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (SEMICOLON .  919))
+      ((default . error) (BEGIN .  918))
+      ((default . error) (IS .  917))
+      ((default . error) (END .  916))
+      ((default . error) (DOT .  90) (TICK .  91) (SEMICOLON .  915) 
(LEFT_PAREN .  107))
+      ((default . error) (SEMICOLON . (actual_parameter_part_opt . 0)) (DO . 
(actual_parameter_part_opt . 0)) (LEFT_PAREN . ( 912 (actual_parameter_part_opt 
. 0))))
+      ((default . error) (IS .  911))
+      ((default . error) (IS .  910))
+      ((default . error) (WHEN .  624))
+      ((default . error) (BAR .  286) (EQUAL_GREATER .  908))
+      ((default . error) (NULL .  907))
+      ((default . error) (DO . (subtype_indication . 3)) (OF . 
(subtype_indication . 3)) (AND . (subtype_indication . 3)) (SEMICOLON . 
(subtype_indication . 3)) (WITH . (subtype_indication . 3)) (COLON_EQUAL . 
(subtype_indication . 3)) (DOT .  90) (TICK .  91) (RANGE .  902) (LEFT_PAREN . 
 827))
+      ((default . error) (OF .  906))
+      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
+      ((default . error) (DOT .  90) (TICK .  91) (LOOP . 
(iterator_specification . 5)) (EQUAL_GREATER . (iterator_specification . 5)) 
(LEFT_PAREN .  107))
+      ((default . error) (NUMERIC_LITERAL .  155) (NULL .  904) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  734) 
(NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (LEFT_PAREN .  148))
+      ((default . error) (LOOP . (iterator_specification . 1)) (EQUAL_GREATER 
. (iterator_specification . 1)))
+      ((default . error) (LOOP . (subtype_indication . 3)) (DOT .  90) (IN . 
(primary . 3)) (NOT . (primary . 3)) (EQUAL . (primary . 3)) (GREATER . 
(primary . 3)) (GREATER_EQUAL . (primary . 3)) (LESS . (primary . 3)) 
(LESS_EQUAL . (primary . 3)) (SLASH_EQUAL . (primary . 3)) (RIGHT_PAREN . 
((primary . 3) (subtype_indication . 3))) (COMMA . ((primary . 3) 
(subtype_indication . 3))) (BAR . (primary . 3)) (EQUAL_GREATER . ((primary . 
3) (subtype_indication . 3))) (AND . (primary . 3)) (OR [...]
+      ((default . error) (LOOP . (discrete_subtype_definition . 1)) 
(EQUAL_GREATER . (discrete_subtype_definition . 1)) (COMMA . 
(discrete_subtype_definition . 1)) (RIGHT_PAREN . (discrete_subtype_definition 
. 1)))
+      ((default . error) (LOOP . (discrete_subtype_definition . 0)) 
(EQUAL_GREATER . (discrete_subtype_definition . 0)) (COMMA . 
(discrete_subtype_definition . 0)) (RIGHT_PAREN . (discrete_subtype_definition 
. 0)))
+      ((default . error) (COMMA . (quantified_expression . 0)) (RIGHT_PAREN . 
(quantified_expression . 0)))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (COMMA . (elsif_expression_list . 0)) (RIGHT_PAREN . 
(elsif_expression_list . 0)) (ELSE . (elsif_expression_list . 0)) (ELSIF . 
(elsif_expression_list . 0)))
+      ((default . error) (COMMA . (if_expression . 1)) (RIGHT_PAREN . 
(if_expression . 1)) (ELSE .  898) (ELSIF .  742))
+      ((default . error) (USE . (aggregate . 1)) (COLON_EQUAL . (aggregate . 
1)) (CHARACTER_LITERAL . (aggregate . 1)) (STRING_LITERAL . (aggregate . 1)) 
(IDENTIFIER . (aggregate . 1)) (LESS_LESS . (aggregate . 1)) (WHILE . 
(aggregate . 1)) (SELECT . (aggregate . 1)) (REQUEUE . (aggregate . 1)) (RAISE 
. (aggregate . 1)) (PRAGMA . (aggregate . 1)) (NULL . (aggregate . 1)) (IF . 
(aggregate . 1)) (GOTO . (aggregate . 1)) (FOR . (aggregate . 1)) (EXIT . 
(aggregate . 1)) (DELAY . (aggregate . [...]
+      ((default . error) (RIGHT_PAREN .  897))
+      ((default . error) (COMMA . (pragma_argument_association . 3)) 
(RIGHT_PAREN . (pragma_argument_association . 3)))
+      ((default . error) (SEMICOLON .  896))
+      ((default . error) (END .  895))
+      ((default . error) (IDENTIFIER .  235) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  734) 
(NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (LEFT_PAREN .  148))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
-      ((default . error) (CASE .  239) (IF .  240) (RAISE .  149) (PLUS .  
151) (MINUS .  150) (ABS .  144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  
148) (NEW .  146) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL 
.  49) (LEFT_PAREN .  145))
+      ((default . error) (FOR .  146) (CASE .  145) (IF .  147) (RAISE .  152) 
(PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) 
(NULL .  151) (NEW .  149) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (LEFT_PAREN .  148))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
       ((default . error) (ARRAY . (constant_opt . 1)) (ACCESS . (constant_opt 
. 1)) (NOT . (constant_opt . 1)) (IDENTIFIER . (constant_opt . 1)) 
(STRING_LITERAL . (constant_opt . 1)) (CHARACTER_LITERAL . (constant_opt . 1)))
-      ((default . error) (ARRAY .  490) (IDENTIFIER .  48) (CHARACTER_LITERAL 
.  50) (STRING_LITERAL .  49) (ACCESS . (null_exclusion_opt . 0)) (NOT .  883))
+      ((default . error) (ARRAY .  498) (IDENTIFIER .  48) (CHARACTER_LITERAL 
.  50) (STRING_LITERAL .  49) (ACCESS . (null_exclusion_opt . 0)) (NOT .  883))
       ((default . error) (IDENTIFIER . (exception_declaration . 0)) (USE . 
(exception_declaration . 0)) (TYPE . (exception_declaration . 0)) (TASK . 
(exception_declaration . 0)) (SUBTYPE . (exception_declaration . 0)) (PROTECTED 
. (exception_declaration . 0)) (PROCEDURE . (exception_declaration . 0)) 
(PRAGMA . (exception_declaration . 0)) (PACKAGE . (exception_declaration . 0)) 
(OVERRIDING . (exception_declaration . 0)) (NOT . (exception_declaration . 0)) 
(GENERIC . (exception_declaratio [...]
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
       ((default . error) (SEMICOLON . (name_opt . 0)) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
       ((default . error) (DOT .  90) (TICK .  91) (RENAMES .  880) (LEFT_PAREN 
.  107))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (PRIVATE . (abstract_tagged_limited_opt . 0)) (NULL . 
(abstract_tagged_limited_opt . 0)) (RECORD . (abstract_tagged_limited_opt . 0)) 
(TAGGED .  867) (RANGE .  865) (MOD .  863) (DIGITS .  860) (DELTA .  859) 
(TASK .  501) (PROTECTED .  497) (SYNCHRONIZED .  499) (INTERFACE .  493) 
(ARRAY .  490) (LEFT_PAREN .  861) (ACCESS . (null_exclusion_opt . 0)) (NOT .  
225) (NEW . ((abstract_limited_opt . 0) (abstract_limited_synchronized_opt . 
0))) (LIMITED .  862) (ABSTR [...]
+      ((default . error) (PRIVATE . (abstract_tagged_limited_opt . 0)) (NULL . 
(abstract_tagged_limited_opt . 0)) (RECORD . (abstract_tagged_limited_opt . 0)) 
(TAGGED .  867) (RANGE .  865) (MOD .  863) (DIGITS .  860) (DELTA .  859) 
(TASK .  509) (PROTECTED .  505) (SYNCHRONIZED .  507) (INTERFACE .  501) 
(ARRAY .  498) (LEFT_PAREN .  861) (ACCESS . (null_exclusion_opt . 0)) (NOT .  
232) (NEW . ((abstract_limited_opt . 0) (abstract_limited_synchronized_opt . 
0))) (LIMITED .  862) (ABSTR [...]
       ((default . error) (BEGIN . (incomplete_type_declaration . 1)) (ENTRY . 
(incomplete_type_declaration . 1)) (FOR . (incomplete_type_declaration . 1)) 
(FUNCTION . (incomplete_type_declaration . 1)) (GENERIC . 
(incomplete_type_declaration . 1)) (NOT . (incomplete_type_declaration . 1)) 
(OVERRIDING . (incomplete_type_declaration . 1)) (PACKAGE . 
(incomplete_type_declaration . 1)) (PRAGMA . (incomplete_type_declaration . 1)) 
(PROCEDURE . (incomplete_type_declaration . 1)) (PROTECTED . ( [...]
       ((default . error) (SEPARATE .  857))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (IS . 
(aspect_specification_opt . 0)) (WITH .  109))
-      ((default . error) (NEW .  853) (END . (declarative_part_opt . 0)) 
(PRIVATE . (declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  301) (PRAGMA .  
7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) 
(PROCEDURE . (overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt 
. 2)) (FOR .  298) (IDENTIFIER .  304) (TYPE .  303) (GENERIC .  2) (PROTECTED 
.  300) (TASK .  302) (PACKAGE .  299))
+      ((default . error) (NEW .  853) (END . (declarative_part_opt . 0)) 
(PRIVATE . (declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  302) (PRAGMA .  
7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) 
(PROCEDURE . (overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt 
. 2)) (FOR .  299) (IDENTIFIER .  305) (TYPE .  304) (GENERIC .  2) (PROTECTED 
.  301) (TASK .  303) (PACKAGE .  300))
       ((default . error) (BEGIN . (single_task_declaration . 2)) (ENTRY . 
(single_task_declaration . 2)) (FOR . (single_task_declaration . 2)) (FUNCTION 
. (single_task_declaration . 2)) (GENERIC . (single_task_declaration . 2)) (NOT 
. (single_task_declaration . 2)) (OVERRIDING . (single_task_declaration . 2)) 
(PACKAGE . (single_task_declaration . 2)) (PRAGMA . (single_task_declaration . 
2)) (PROCEDURE . (single_task_declaration . 2)) (PROTECTED . 
(single_task_declaration . 2)) (SUBTYPE . [...]
-      ((default . error) (NULL .  852))
-      ((default . error) (DO . (subtype_indication . 3)) (OF . 
(subtype_indication . 3)) (AND . (subtype_indication . 3)) (SEMICOLON . 
(subtype_indication . 3)) (WITH . (subtype_indication . 3)) (COLON_EQUAL . 
(subtype_indication . 3)) (DOT .  90) (TICK .  91) (RANGE .  851) (LEFT_PAREN . 
 824))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
-      ((default . error) (SEPARATE .  849))
+      ((default . error) (SEPARATE .  851))
       ((default . error) (IS . (aspect_specification_opt . 0)) (WITH .  109))
-      ((default . error) (NEW .  845) (END . (declarative_part_opt . 0)) 
(PRIVATE . (declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  301) (PRAGMA .  
7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) 
(PROCEDURE . (overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt 
. 2)) (FOR .  298) (IDENTIFIER .  304) (TYPE .  303) (GENERIC .  2) (PROTECTED 
.  300) (TASK .  302) (PACKAGE .  299))
-      ((default . error) (SEPARATE .  844))
-      ((default . error) (SEMICOLON .  843))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (IDENTIFIER . (mod_clause_opt . 0)) (AT .  840))
-      ((default . error) (SEMICOLON .  839))
-      ((default . error) (SEMICOLON .  838))
+      ((default . error) (NEW .  847) (END . (declarative_part_opt . 0)) 
(PRIVATE . (declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  302) (PRAGMA .  
7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) 
(PROCEDURE . (overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt 
. 2)) (FOR .  299) (IDENTIFIER .  305) (TYPE .  304) (GENERIC .  2) (PROTECTED 
.  301) (TASK .  303) (PACKAGE .  300))
+      ((default . error) (SEPARATE .  846))
+      ((default . error) (SEMICOLON .  845))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (IDENTIFIER . (mod_clause_opt . 0)) (AT .  842))
+      ((default . error) (SEMICOLON .  841))
+      ((default . error) (SEMICOLON .  840))
       ((default . error) (XOR . (choice_relation . 0)) (OR . (choice_relation 
. 0)) (BAR . (choice_relation . 0)) (EQUAL_GREATER . (choice_relation . 0)) 
(AND . (choice_relation . 0)))
-      ((default . error) (RIGHT_PAREN .  837))
+      ((default . error) (RIGHT_PAREN .  839))
       ((default . error) (DO . (membership_choice_list . 1)) (LOOP . 
(membership_choice_list . 1)) (COMMA . (membership_choice_list . 1)) (ELSIF . 
(membership_choice_list . 1)) (ELSE . (membership_choice_list . 1)) 
(EQUAL_GREATER . (membership_choice_list . 1)) (RIGHT_PAREN . 
(membership_choice_list . 1)) (DIGITS . (membership_choice_list . 1)) (RANGE . 
(membership_choice_list . 1)) (THEN . (membership_choice_list . 1)) (SEMICOLON 
. (membership_choice_list . 1)) (WITH . (membership_choic [...]
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (ACCESS . (null_exclusion_opt . 1)) (IDENTIFIER .  
833) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (ACCESS . (null_exclusion_opt . 1)) (IDENTIFIER .  
835) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
       ((default . error) (NULL . (abstract_tagged_limited_opt . 1)) (RECORD . 
(abstract_tagged_limited_opt . 1)) (PRIVATE . (abstract_tagged_limited_opt . 
1)))
-      ((default . error) (NUMERIC_LITERAL .  152) (NULL .  832) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
       ((default . error) (RIGHT_PAREN . (discrete_subtype_definition_list . 
0)) (COMMA . (discrete_subtype_definition_list . 0)))
-      ((default . error) (COMMA .  831) (RIGHT_PAREN .  830))
+      ((default . error) (COMMA .  834) (RIGHT_PAREN .  833))
       ((default . error) (RIGHT_PAREN . (index_subtype_definition_list . 0)) 
(COMMA . (index_subtype_definition_list . 0)))
-      ((default . error) (COMMA .  829) (RIGHT_PAREN .  828))
-      ((default . error) (RIGHT_PAREN . (subtype_indication . 3)) (COMMA . 
(subtype_indication . 3)) (PLUS . (primary . 3)) (MINUS . (primary . 3)) 
(AMPERSAND . (primary . 3)) (DOT_DOT . (primary . 3)) (MOD . (primary . 3)) 
(REM . (primary . 3)) (SLASH . (primary . 3)) (STAR . (primary . 3)) (STAR_STAR 
. (primary . 3)) (DOT .  90) (TICK .  284) (RANGE .  825) (LEFT_PAREN .  824))
-      ((default . error) (LOOP . (discrete_subtype_definition . 1)) 
(EQUAL_GREATER . (discrete_subtype_definition . 1)) (COMMA . 
(discrete_subtype_definition . 1)) (RIGHT_PAREN . (discrete_subtype_definition 
. 1)))
-      ((default . error) (LOOP . (discrete_subtype_definition . 0)) 
(EQUAL_GREATER . (discrete_subtype_definition . 0)) (COMMA . 
(discrete_subtype_definition . 0)) (RIGHT_PAREN . (discrete_subtype_definition 
. 0)))
-      ((default . error) (BOX .  823))
+      ((default . error) (COMMA .  832) (RIGHT_PAREN .  831))
+      ((default . error) (RIGHT_PAREN . (subtype_indication . 3)) (COMMA . 
(subtype_indication . 3)) (PLUS . (primary . 3)) (MINUS . (primary . 3)) 
(AMPERSAND . (primary . 3)) (DOT_DOT . (primary . 3)) (MOD . (primary . 3)) 
(REM . (primary . 3)) (SLASH . (primary . 3)) (STAR . (primary . 3)) (STAR_STAR 
. (primary . 3)) (DOT .  90) (TICK .  285) (RANGE .  828) (LEFT_PAREN .  827))
+      ((default . error) (BOX .  826))
       ((default . error) (WITH . (formal_type_definition . 2)) (SEMICOLON . 
(formal_type_definition . 2)))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
       ((default . error) (PACKAGE . (formal_type_declaration . 1)) (PROCEDURE 
. (formal_type_declaration . 1)) (FUNCTION . (formal_type_declaration . 1)) 
(PRAGMA . (formal_type_declaration . 1)) (TYPE . (formal_type_declaration . 1)) 
(USE . (formal_type_declaration . 1)) (WITH . (formal_type_declaration . 1)) 
(IDENTIFIER . (formal_type_declaration . 1)))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (DOT .  90) (TICK .  91) (WITH . 
(and_interface_list_opt . 0)) (SEMICOLON . (and_interface_list_opt . 0)) (AND . 
 816) (LEFT_PAREN .  107))
+      ((default . error) (DOT .  90) (TICK .  91) (WITH . 
(and_interface_list_opt . 0)) (SEMICOLON . (and_interface_list_opt . 0)) (AND . 
 819) (LEFT_PAREN .  107))
       ((default . error) (PACKAGE . (formal_type_declaration . 0)) (PROCEDURE 
. (formal_type_declaration . 0)) (FUNCTION . (formal_type_declaration . 0)) 
(PRAGMA . (formal_type_declaration . 0)) (TYPE . (formal_type_declaration . 0)) 
(USE . (formal_type_declaration . 0)) (WITH . (formal_type_declaration . 0)) 
(IDENTIFIER . (formal_type_declaration . 0)))
       ((default . error) (PACKAGE . (formal_subprogram_declaration . 2)) 
(PROCEDURE . (formal_subprogram_declaration . 2)) (FUNCTION . 
(formal_subprogram_declaration . 2)) (PRAGMA . (formal_subprogram_declaration . 
2)) (TYPE . (formal_subprogram_declaration . 2)) (USE . 
(formal_subprogram_declaration . 2)) (WITH . (formal_subprogram_declaration . 
2)) (IDENTIFIER . (formal_subprogram_declaration . 2)))
-      ((default . error) (BOX .  815) (RIGHT_PAREN . ((expression_opt . 0) 
(association_opt . 0))) (COMMA . ((expression_opt . 0) (association_opt . 0))) 
(EQUAL_GREATER . (discrete_choice_list . 0)) (BAR . (discrete_choice_list . 0)) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  176) (STRING_LITERAL .  49) (PLUS .  
151) (MINUS .  150) (OTHERS .  175) (ABS .  144) (NOT .  174) (RAISE .  149) 
(NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
+      ((default . error) (BOX .  818) (FOR .  146) (CASE .  145) (IF .  147) 
(RIGHT_PAREN . ((expression_opt . 0) (association_opt . 0))) (COMMA . 
((expression_opt . 0) (association_opt . 0))) (EQUAL_GREATER . 
(discrete_choice_list . 0)) (BAR . (discrete_choice_list . 0)) (IDENTIFIER .  
48) (CHARACTER_LITERAL .  183) (STRING_LITERAL .  49) (PLUS .  154) (MINUS .  
153) (OTHERS .  182) (ABS .  144) (NOT .  181) (RAISE .  152) (NUMERIC_LITERAL 
.  155) (NULL .  151) (NEW .  149) (LEFT_PAREN  [...]
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
       ((default . error) (PACKAGE . (formal_object_declaration . 1)) 
(PROCEDURE . (formal_object_declaration . 1)) (FUNCTION . 
(formal_object_declaration . 1)) (PRAGMA . (formal_object_declaration . 1)) 
(TYPE . (formal_object_declaration . 1)) (USE . (formal_object_declaration . 
1)) (WITH . (formal_object_declaration . 1)) (IDENTIFIER . 
(formal_object_declaration . 1)))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
-      ((default . error) (SEMICOLON .  812))
-      ((default . error) (DO . (aggregate . 1)) (LOOP . (aggregate . 1)) (USE 
. (aggregate . 1)) (COLON_EQUAL . (aggregate . 1)) (CHARACTER_LITERAL . 
(aggregate . 1)) (STRING_LITERAL . (aggregate . 1)) (IDENTIFIER . (aggregate . 
1)) (LESS_LESS . (aggregate . 1)) (WHILE . (aggregate . 1)) (SELECT . 
(aggregate . 1)) (REQUEUE . (aggregate . 1)) (RAISE . (aggregate . 1)) (PRAGMA 
. (aggregate . 1)) (NULL . (aggregate . 1)) (IF . (aggregate . 1)) (GOTO . 
(aggregate . 1)) (FOR . (aggregate . 1) [...]
-      ((default . error) (RIGHT_PAREN .  811))
-      ((default . error) (ELSE .  807) (RIGHT_PAREN . (if_expression . 3)) 
(ELSIF .  808))
-      ((default . error) (EQUAL_GREATER . (discrete_choice_list . 0)) (BAR . 
(discrete_choice_list . 0)) (OTHERS .  175) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (PLUS .  151) (MINUS .  150) 
(ABS .  144) (NOT .  174) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(LEFT_PAREN .  145))
-      ((default . error) (RIGHT_PAREN . (case_expression_alternative_list . 
0)) (COMMA . (case_expression_alternative_list . 0)))
-      ((default . error) (COMMA .  805) (RIGHT_PAREN . (case_expression . 0)))
+      ((default . error) (SEMICOLON .  815))
       ((default . error) (IDENTIFIER .  77))
       ((default . error) (DO . (access_definition . 1)) (COLON_EQUAL . 
(access_definition . 1)) (RIGHT_PAREN . (access_definition . 1)) (RENAMES . 
(access_definition . 1)) (WITH . (access_definition . 1)) (SEMICOLON . 
(access_definition . 1)) (IS . (access_definition . 1)))
       ((default . error) (DO . (access_definition . 2)) (COLON_EQUAL . 
(access_definition . 2)) (RIGHT_PAREN . (access_definition . 2)) (RENAMES . 
(access_definition . 2)) (WITH . (access_definition . 2)) (SEMICOLON . 
(access_definition . 2)) (IS . (access_definition . 2)))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
       ((default . error) (RIGHT_PAREN . (parameter_specification . 2)) 
(SEMICOLON . (parameter_specification . 2)))
       ((default . error) (COLON_EQUAL .  1084) (DOT .  90) (TICK .  91) 
(RIGHT_PAREN . (parameter_specification . 1)) (SEMICOLON . 
(parameter_specification . 1)) (LEFT_PAREN .  107))
-      ((default . error) (WHEN .  795))
-      ((default . error) (BAR .  285) (EQUAL_GREATER .  1082))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (RIGHT_PAREN . (elsif_expression_list . 0)) (ELSE . 
(elsif_expression_list . 0)) (ELSIF . (elsif_expression_list . 0)))
-      ((default . error) (RIGHT_PAREN . (if_expression . 1)) (ELSE .  1078) 
(ELSIF .  808))
-      ((default . error) (OF . (aggregate . 4)) (ACCEPT . (aggregate . 4)) 
(ABORT . (aggregate . 4)) (BEGIN . (aggregate . 4)) (CASE . (aggregate . 4)) 
(DECLARE . (aggregate . 4)) (DELAY . (aggregate . 4)) (EXIT . (aggregate . 4)) 
(FOR . (aggregate . 4)) (GOTO . (aggregate . 4)) (IF . (aggregate . 4)) (NULL . 
(aggregate . 4)) (PRAGMA . (aggregate . 4)) (RAISE . (aggregate . 4)) (REQUEUE 
. (aggregate . 4)) (SELECT . (aggregate . 4)) (WHILE . (aggregate . 4)) 
(LESS_LESS . (aggregate . 4))  [...]
       ((default . error) (IDENTIFIER . (formal_object_declaration . 2)) (WITH 
. (formal_object_declaration . 2)) (USE . (formal_object_declaration . 2)) 
(TYPE . (formal_object_declaration . 2)) (PRAGMA . (formal_object_declaration . 
2)) (FUNCTION . (formal_object_declaration . 2)) (PROCEDURE . 
(formal_object_declaration . 2)) (PACKAGE . (formal_object_declaration . 2)))
-      ((default . error) (SEMICOLON .  1077))
-      ((default . error) (SEMICOLON .  1076))
-      ((default . error) (RIGHT_PAREN .  1075))
+      ((default . error) (SEMICOLON .  1083))
+      ((default . error) (SEMICOLON .  1082))
+      ((default . error) (RIGHT_PAREN .  1081))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (WITH . ( 1073 (formal_derived_type_definition . 1))) 
(SEMICOLON . (formal_derived_type_definition . 1)))
-      ((default . error) (AND .  1072) (WITH . (interface_type_definition . 
1)) (SEMICOLON . (interface_type_definition . 1)))
+      ((default . error) (WITH . ( 1079 (formal_derived_type_definition . 1))) 
(SEMICOLON . (formal_derived_type_definition . 1)))
+      ((default . error) (AND .  1078) (WITH . (interface_type_definition . 
1)) (SEMICOLON . (interface_type_definition . 1)))
       ((default . error) (DOT .  90) (SEMICOLON . (interface_list . 0)) (WITH 
. (interface_list . 0)) (AND . (interface_list . 0)) (TICK .  91) (LEFT_PAREN . 
 107))
-      ((default . error) (AND .  1072) (WITH . (interface_type_definition . 
3)) (SEMICOLON . (interface_type_definition . 3)))
-      ((default . error) (AND .  1072) (WITH . (interface_type_definition . 
2)) (SEMICOLON . (interface_type_definition . 2)))
-      ((default . error) (AND .  1072) (WITH . (interface_type_definition . 
0)) (SEMICOLON . (interface_type_definition . 0)))
+      ((default . error) (AND .  1078) (WITH . (interface_type_definition . 
3)) (SEMICOLON . (interface_type_definition . 3)))
+      ((default . error) (AND .  1078) (WITH . (interface_type_definition . 
2)) (SEMICOLON . (interface_type_definition . 2)))
+      ((default . error) (AND .  1078) (WITH . (interface_type_definition . 
0)) (SEMICOLON . (interface_type_definition . 0)))
       ((default . error) (SEMICOLON . (formal_type_definition . 7)) (WITH . 
(formal_type_definition . 7)))
-      ((default . error) (RIGHT_PAREN . ((expression_opt . 0) (association_opt 
. 0))) (COMMA . ((expression_opt . 0) (association_opt . 0))) (EQUAL_GREATER . 
(discrete_choice_list . 0)) (BAR . (discrete_choice_list . 0)) (IDENTIFIER .  
48) (CHARACTER_LITERAL .  176) (STRING_LITERAL .  49) (PLUS .  151) (MINUS .  
150) (OTHERS .  175) (ABS .  144) (NOT .  1069) (RAISE .  149) (NUMERIC_LITERAL 
.  152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
-      ((default . error) (BOX .  1068) (IDENTIFIER .  48) (CHARACTER_LITERAL . 
 50) (STRING_LITERAL .  49) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
-      ((default . error) (LOOP . (subtype_indication . 2)) (DO . 
(subtype_indication . 2)) (EQUAL_GREATER . (subtype_indication . 2)) (COMMA . 
(subtype_indication . 2)) (RIGHT_PAREN . (subtype_indication . 2)) (COLON_EQUAL 
. (subtype_indication . 2)) (WITH . (subtype_indication . 2)) (SEMICOLON . 
(subtype_indication . 2)) (AND . (subtype_indication . 2)) (OF . 
(subtype_indication . 2)))
-      ((default . error) (LOOP . (constraint . 1)) (DO . (constraint . 1)) 
(EQUAL_GREATER . (constraint . 1)) (COMMA . (constraint . 1)) (RIGHT_PAREN . 
(constraint . 1)) (COLON_EQUAL . (constraint . 1)) (WITH . (constraint . 1)) 
(SEMICOLON . (constraint . 1)) (AND . (constraint . 1)) (OF . (constraint . 1)))
-      ((default . error) (OF .  1067))
+      ((default . error) (FOR .  146) (CASE .  145) (IF .  147) (RIGHT_PAREN . 
((expression_opt . 0) (association_opt . 0))) (COMMA . ((expression_opt . 0) 
(association_opt . 0))) (EQUAL_GREATER . (discrete_choice_list . 0)) (BAR . 
(discrete_choice_list . 0)) (IDENTIFIER .  48) (CHARACTER_LITERAL .  183) 
(STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) (OTHERS .  182) (ABS .  
144) (NOT .  1075) (RAISE .  152) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW . 
 149) (LEFT_PAREN .  148))
+      ((default . error) (BOX .  1074) (IDENTIFIER .  48) (CHARACTER_LITERAL . 
 50) (STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (LEFT_PAREN .  148))
+      ((default . error) (LOOP . (subtype_indication . 2)) (DO . 
(subtype_indication . 2)) (RIGHT_PAREN . (subtype_indication . 2)) (COMMA . 
(subtype_indication . 2)) (EQUAL_GREATER . (subtype_indication . 2)) 
(COLON_EQUAL . (subtype_indication . 2)) (WITH . (subtype_indication . 2)) 
(SEMICOLON . (subtype_indication . 2)) (AND . (subtype_indication . 2)) (OF . 
(subtype_indication . 2)))
+      ((default . error) (LOOP . (constraint . 1)) (DO . (constraint . 1)) 
(RIGHT_PAREN . (constraint . 1)) (COMMA . (constraint . 1)) (EQUAL_GREATER . 
(constraint . 1)) (COLON_EQUAL . (constraint . 1)) (WITH . (constraint . 1)) 
(SEMICOLON . (constraint . 1)) (AND . (constraint . 1)) (OF . (constraint . 1)))
+      ((default . error) (OF .  1073))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (OF .  1064))
-      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  769) 
(NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
-      ((default . error) (PLUS . (primary . 1)) (MINUS . (primary . 1)) 
(AMPERSAND . (primary . 1)) (DOT_DOT . (primary . 1)) (MOD . (primary . 1)) 
(REM . (primary . 1)) (SLASH . (primary . 1)) (STAR . (primary . 1)) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
+      ((default . error) (OF .  1070))
+      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  734) 
(NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (LEFT_PAREN .  148))
       ((default . error) (DOT . (name . 0)) (LEFT_PAREN . (name . 0)) (TICK . 
(name . 0)) (SEMICOLON . (null_exclusion_opt_name_type . 2)) (RIGHT_PAREN . 
(null_exclusion_opt_name_type . 2)) (COLON_EQUAL . 
(null_exclusion_opt_name_type . 2)))
       ((default . error) (DOT . (name . 3)) (LEFT_PAREN . (name . 3)) (TICK . 
(name . 3)) (SEMICOLON . (null_exclusion_opt_name_type . 3)) (RIGHT_PAREN . 
(null_exclusion_opt_name_type . 3)) (COLON_EQUAL . 
(null_exclusion_opt_name_type . 3)))
       ((default . error) (SEMICOLON . (discriminant_specification_opt . 3)) 
(RIGHT_PAREN . (discriminant_specification_opt . 3)))
@@ -2644,37 +2656,35 @@
       ((default . error) (DO . (range . 0)) (LOOP . (range . 0)) (XOR . (range 
. 0)) (OR . (range . 0)) (AND . (range . 0)) (IS . (range . 0)) (WITH . (range 
. 0)) (SEMICOLON . (range . 0)) (THEN . (range . 0)) (RANGE . (range . 0)) 
(DIGITS . (range . 0)) (ELSE . (range . 0)) (ELSIF . (range . 0)) (COLON_EQUAL 
. (range . 0)) (OF . (range . 0)) (BAR . (range . 0)) (EQUAL_GREATER . (range . 
0)) (RIGHT_PAREN . (range . 0)) (COMMA . (range . 0)))
       ((default . error) (WHEN . (record_representation_clause . 0)) (END . 
(record_representation_clause . 0)) (PRIVATE . (record_representation_clause . 
0)) (CASE . (record_representation_clause . 0)) (IDENTIFIER . 
(record_representation_clause . 0)) (USE . (record_representation_clause . 0)) 
(TYPE . (record_representation_clause . 0)) (TASK . 
(record_representation_clause . 0)) (SUBTYPE . (record_representation_clause . 
0)) (PROTECTED . (record_representation_clause . 0)) (PROCEDURE . [...]
       ((default . error) (WHEN . (enumeration_representation_clause . 0)) (END 
. (enumeration_representation_clause . 0)) (PRIVATE . 
(enumeration_representation_clause . 0)) (CASE . 
(enumeration_representation_clause . 0)) (IDENTIFIER . 
(enumeration_representation_clause . 0)) (USE . 
(enumeration_representation_clause . 0)) (TYPE . 
(enumeration_representation_clause . 0)) (TASK . 
(enumeration_representation_clause . 0)) (SUBTYPE . 
(enumeration_representation_clause . 0)) (PROTECTED . (en [...]
-      ((default . error) (MOD .  1062))
-      ((default . error) (IDENTIFIER .  1059))
-      ((default . error) (SEMICOLON .  1058))
+      ((default . error) (MOD .  1068))
+      ((default . error) (IDENTIFIER .  1065))
+      ((default . error) (SEMICOLON .  1064))
       ((default . error) (WHEN . (aspect_clause . 0)) (PRIVATE . 
(aspect_clause . 0)) (END . (aspect_clause . 0)) (CASE . (aspect_clause . 0)) 
(BEGIN . (aspect_clause . 0)) (ENTRY . (aspect_clause . 0)) (FOR . 
(aspect_clause . 0)) (FUNCTION . (aspect_clause . 0)) (GENERIC . (aspect_clause 
. 0)) (NOT . (aspect_clause . 0)) (OVERRIDING . (aspect_clause . 0)) (PACKAGE . 
(aspect_clause . 0)) (PRAGMA . (aspect_clause . 0)) (PROCEDURE . (aspect_clause 
. 0)) (PROTECTED . (aspect_clause . 0)) (S [...]
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (END .  1054) (PRIVATE .  1055))
-      ((default . error) (SEMICOLON .  1053))
-      ((default . error) (IS .  1052))
+      ((default . error) (END .  1060) (PRIVATE .  1061))
+      ((default . error) (SEMICOLON .  1059))
+      ((default . error) (IS .  1058))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
-      ((default . error) (SEMICOLON .  1050))
-      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  147) 
(NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
+      ((default . error) (SEMICOLON .  1056))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (END .  1045) (PRIVATE .  1046))
-      ((default . error) (SEMICOLON .  1044))
-      ((default . error) (SEMICOLON .  1043) (IS .  1042))
+      ((default . error) (END .  1053) (PRIVATE .  1054))
+      ((default . error) (SEMICOLON .  1052))
+      ((default . error) (SEMICOLON .  1051) (IS .  1050))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
-      ((default . error) (SYNCHRONIZED .  567) (TAGGED .  568) (NEW . 
((abstract_limited_opt . 3) (abstract_limited_synchronized_opt . 3))) (LIMITED 
.  1040))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (IDENTIFIER .  1034) (CHARACTER_LITERAL .  1035))
-      ((default . error) (INTERFACE .  561) (PRIVATE . 
(abstract_tagged_limited_opt . 5)) (NULL . (abstract_tagged_limited_opt . 5)) 
(RECORD . (abstract_tagged_limited_opt . 5)) (NEW . ((abstract_limited_opt . 2) 
(abstract_limited_synchronized_opt . 4))))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (RECORD .  1032))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
-      ((default . error) (END . (component_list_opt . 0)) (NULL .  1023) (CASE 
.  1022) (IDENTIFIER .  77) (FOR .  298))
-      ((default . error) (SEMICOLON .  1021) (PRIVATE . 
(abstract_tagged_limited_opt . 4)) (NULL . (abstract_tagged_limited_opt . 4)) 
(RECORD . (abstract_tagged_limited_opt . 4)) (LIMITED .  555))
-      ((default . error) (NEW .  1020))
-      ((default . error) (NEW .  1019))
-      ((default . error) (PRIVATE .  1017) (RECORD .  866) (NULL .  864))
+      ((default . error) (SYNCHRONIZED .  563) (TAGGED .  564) (NEW . 
((abstract_limited_opt . 3) (abstract_limited_synchronized_opt . 3))) (LIMITED 
.  1048))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (IDENTIFIER .  1042) (CHARACTER_LITERAL .  1043))
+      ((default . error) (INTERFACE .  557) (PRIVATE . 
(abstract_tagged_limited_opt . 5)) (NULL . (abstract_tagged_limited_opt . 5)) 
(RECORD . (abstract_tagged_limited_opt . 5)) (NEW . ((abstract_limited_opt . 2) 
(abstract_limited_synchronized_opt . 4))))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (RECORD .  1040))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
+      ((default . error) (END . (component_list_opt . 0)) (NULL .  1031) (CASE 
.  1030) (IDENTIFIER .  77) (FOR .  299))
+      ((default . error) (SEMICOLON .  1029) (PRIVATE . 
(abstract_tagged_limited_opt . 4)) (NULL . (abstract_tagged_limited_opt . 4)) 
(RECORD . (abstract_tagged_limited_opt . 4)) (LIMITED .  551))
+      ((default . error) (NEW .  1028))
+      ((default . error) (NEW .  1027))
+      ((default . error) (PRIVATE .  1025) (RECORD .  866) (NULL .  864))
       ((default . error) (WITH . (type_definition . 8)) (SEMICOLON . 
(type_definition . 8)))
       ((default . error) (WITH . (type_definition . 6)) (SEMICOLON . 
(type_definition . 6)))
       ((default . error) (WITH . (type_definition . 9)) (SEMICOLON . 
(type_definition . 9)))
@@ -2686,264 +2696,260 @@
       ((default . error) (DOT .  90) (TICK .  91) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109) (LEFT_PAREN .  107))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
       ((default . error) (SEMICOLON . (package_specification . 0)))
+      ((default . error) (SEMICOLON .  1020))
+      ((default . error) (NULL .  1019))
+      ((default . error) (COLON_EQUAL .  1017) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109))
+      ((default . error) (COLON_EQUAL .  1015) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109))
+      ((default . error) (COLON_EQUAL .  1013) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109))
       ((default . error) (SEMICOLON .  1012))
-      ((default . error) (NULL .  1011))
-      ((default . error) (COLON_EQUAL .  1009) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109))
-      ((default . error) (COLON_EQUAL .  1007) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109))
-      ((default . error) (COLON_EQUAL .  1005) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109))
-      ((default . error) (SEMICOLON .  1004))
-      ((default . error) (SEMICOLON .  1003))
-      ((default . error) (SEMICOLON .  1002))
-      ((default . error) (SEMICOLON .  1001))
-      ((default . error) (RIGHT_PAREN .  1000))
-      ((default . error) (RIGHT_PAREN .  999))
-      ((default . error) (RIGHT_PAREN .  998))
-      ((default . error) (SEMICOLON .  997))
-      ((default . error) (RIGHT_PAREN .  996))
-      ((default . error) (LOOP . (subtype_indication . 3)) (DOT .  90) (IN . 
(primary . 3)) (NOT . (primary . 3)) (EQUAL . (primary . 3)) (GREATER . 
(primary . 3)) (GREATER_EQUAL . (primary . 3)) (LESS . (primary . 3)) 
(LESS_EQUAL . (primary . 3)) (SLASH_EQUAL . (primary . 3)) (RIGHT_PAREN . 
((primary . 3) (subtype_indication . 3))) (COMMA . ((primary . 3) 
(subtype_indication . 3))) (BAR . (primary . 3)) (EQUAL_GREATER . ((primary . 
3) (subtype_indication . 3))) (AND . (primary . 3)) (OR [...]
+      ((default . error) (SEMICOLON .  1011))
+      ((default . error) (SEMICOLON .  1010))
+      ((default . error) (SEMICOLON .  1009))
+      ((default . error) (RIGHT_PAREN .  1008))
+      ((default . error) (RIGHT_PAREN .  1007))
+      ((default . error) (SEMICOLON .  1006))
+      ((default . error) (RIGHT_PAREN .  1005))
       ((default . error) (SEMICOLON . (name_opt . 0)) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
       ((default . error) (END . (package_body . 1)) (BEGIN . (package_body . 
1)) (ENTRY . (package_body . 1)) (FOR . (package_body . 1)) (PROTECTED . 
(package_body . 1)) (SUBTYPE . (package_body . 1)) (TASK . (package_body . 1)) 
(TYPE . (package_body . 1)) (IDENTIFIER . (package_body . 1)) (WITH . 
(package_body . 1)) (USE . (package_body . 1)) (SEPARATE . (package_body . 1)) 
(PROCEDURE . (package_body . 1)) (PRIVATE . (package_body . 1)) (PRAGMA . 
(package_body . 1)) (PACKAGE . (package_ [...]
-      ((default . error) (OF .  994))
+      ((default . error) (LOOP . (aggregate . 3)) (DO . (aggregate . 3)) (OF . 
(aggregate . 3)) (ACCEPT . (aggregate . 3)) (ABORT . (aggregate . 3)) (BEGIN . 
(aggregate . 3)) (CASE . (aggregate . 3)) (DECLARE . (aggregate . 3)) (DELAY . 
(aggregate . 3)) (EXIT . (aggregate . 3)) (FOR . (aggregate . 3)) (GOTO . 
(aggregate . 3)) (IF . (aggregate . 3)) (NULL . (aggregate . 3)) (PRAGMA . 
(aggregate . 3)) (RAISE . (aggregate . 3)) (REQUEUE . (aggregate . 3)) (SELECT 
. (aggregate . 3)) (WHILE . [...]
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (ELSIF . (elsif_expression_list . 1)) (ELSE . 
(elsif_expression_list . 1)) (RIGHT_PAREN . (elsif_expression_list . 1)) (COMMA 
. (elsif_expression_list . 1)))
+      ((default . error) (THEN .  1002))
+      ((default . error) (RIGHT_PAREN . (if_expression . 2)) (COMMA . 
(if_expression . 2)))
+      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  150) 
(NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (LEFT_PAREN .  148))
+      ((default . error) (LOOP . (iterator_specification . 0)) (EQUAL_GREATER 
. (iterator_specification . 0)))
+      ((default . error) (PLUS . (primary . 1)) (MINUS . (primary . 1)) 
(AMPERSAND . (primary . 1)) (DOT_DOT . (primary . 1)) (MOD . (primary . 1)) 
(REM . (primary . 1)) (SLASH . (primary . 1)) (STAR . (primary . 1)) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
+      ((default . error) (DOT .  90) (TICK .  91) (LOOP . 
(iterator_specification . 4)) (EQUAL_GREATER . (iterator_specification . 4)) 
(LEFT_PAREN .  107))
+      ((default . error) (REVERSE .  999) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (DOT .  90) (TICK .  91) (LOOP . 
(iterator_specification . 5)) (EQUAL_GREATER . (iterator_specification . 5)) 
(LEFT_PAREN .  107))
-      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  769) 
(NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
-      ((default . error) (LOOP . (iterator_specification . 1)) (EQUAL_GREATER 
. (iterator_specification . 1)))
-      ((default . error) (RIGHT_PAREN . (quantified_expression . 0)))
-      ((default . error) (END . (protected_operation_item_list_opt . 0)) 
(ENTRY .  981) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(FOR .  298))
-      ((default . error) (BEGIN . (declarative_part_opt . 0)) (USE .  11) 
(SUBTYPE .  301) (PRAGMA .  7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(ENTRY . (overriding_indicator_opt . 2)) (FOR .  298) (IDENTIFIER .  304) (TYPE 
.  303) (GENERIC .  2) (PROTECTED .  300) (TASK .  302) (PACKAGE .  299))
-      ((default . error) (RIGHT_PAREN . ((expression_opt . 0) (association_opt 
. 0))) (COMMA . ((expression_opt . 0) (association_opt . 0))) (EQUAL_GREATER . 
(discrete_choice_list . 0)) (BAR . (discrete_choice_list . 0)) (OTHERS .  175) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  176) (STRING_LITERAL .  49) (RAISE .  
149) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  174) (NUMERIC_LITERAL .  
152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (RIGHT_PAREN . (case_expression_alternative_list . 
1)) (COMMA . (case_expression_alternative_list . 1)))
+      ((default . error) (END . (protected_operation_item_list_opt . 0)) 
(ENTRY .  986) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(FOR .  299))
+      ((default . error) (BEGIN . (declarative_part_opt . 0)) (USE .  11) 
(SUBTYPE .  302) (PRAGMA .  7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(ENTRY . (overriding_indicator_opt . 2)) (FOR .  299) (IDENTIFIER .  305) (TYPE 
.  304) (GENERIC .  2) (PROTECTED .  301) (TASK .  303) (PACKAGE .  300))
+      ((default . error) (FOR .  146) (CASE .  145) (IF .  147) (RIGHT_PAREN . 
((expression_opt . 0) (association_opt . 0))) (COMMA . ((expression_opt . 0) 
(association_opt . 0))) (EQUAL_GREATER . (discrete_choice_list . 0)) (BAR . 
(discrete_choice_list . 0)) (OTHERS .  182) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  183) (STRING_LITERAL .  49) (RAISE .  152) (PLUS .  154) 
(MINUS .  153) (ABS .  144) (NOT .  181) (NUMERIC_LITERAL .  155) (NULL .  151) 
(NEW .  149) (LEFT_PAREN .  148))
       ((default . error) (SEMICOLON . (actual_parameter_part_opt . 1)) 
(LEFT_PAREN . (actual_parameter_part_opt . 1)) (DO . (actual_parameter_part_opt 
. 1)))
-      ((default . error) (DO . (parameter_profile_opt . 0)) (SEMICOLON . 
(parameter_profile_opt . 0)) (LEFT_PAREN .  798))
+      ((default . error) (DO . (parameter_profile_opt . 0)) (SEMICOLON . 
(parameter_profile_opt . 0)) (LEFT_PAREN .  808))
       ((default . error) (OR . (simple_statement . 8)) (THEN . 
(simple_statement . 8)) (WHEN . (simple_statement . 8)) (EXCEPTION . 
(simple_statement . 8)) (END . (simple_statement . 8)) (ACCEPT . 
(simple_statement . 8)) (ABORT . (simple_statement . 8)) (BEGIN . 
(simple_statement . 8)) (CASE . (simple_statement . 8)) (DECLARE . 
(simple_statement . 8)) (DELAY . (simple_statement . 8)) (EXIT . 
(simple_statement . 8)) (FOR . (simple_statement . 8)) (GOTO . 
(simple_statement . 8)) (IF . (sim [...]
-      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
711))
-      ((default . error) (WHEN .  975))
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (EXCEPTION . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt  [...]
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
716))
+      ((default . error) (WHEN .  980))
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (EXCEPTION . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt  [...]
       ((default . error) (WHEN . (delay_statement . 1)) (EXCEPTION . 
(delay_statement . 1)) (ELSIF . (delay_statement . 1)) (THEN . (delay_statement 
. 1)) (ELSE . (delay_statement . 1)) (OR . (delay_statement . 1)) (END . 
(delay_statement . 1)) (ACCEPT . (delay_statement . 1)) (ABORT . 
(delay_statement . 1)) (BEGIN . (delay_statement . 1)) (CASE . (delay_statement 
. 1)) (DECLARE . (delay_statement . 1)) (DELAY . (delay_statement . 1)) (EXIT . 
(delay_statement . 1)) (FOR . (delay_statemen [...]
-      ((default . error) (SEMICOLON .  973))
-      ((default . error) (SEMICOLON . (expression_opt . 0)) (RAISE .  149) 
(PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  147) (NUMERIC_LITERAL .  152) 
(NULL .  148) (NEW .  146) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (LEFT_PAREN .  145))
+      ((default . error) (SEMICOLON .  978))
+      ((default . error) (SEMICOLON . (expression_opt . 0)) (RAISE .  152) 
(PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) 
(NULL .  151) (NEW .  149) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (LEFT_PAREN .  148))
       ((default . error) (OR . (exit_statement . 1)) (THEN . (exit_statement . 
1)) (WHEN . (exit_statement . 1)) (EXCEPTION . (exit_statement . 1)) (END . 
(exit_statement . 1)) (ACCEPT . (exit_statement . 1)) (ABORT . (exit_statement 
. 1)) (BEGIN . (exit_statement . 1)) (CASE . (exit_statement . 1)) (DECLARE . 
(exit_statement . 1)) (DELAY . (exit_statement . 1)) (EXIT . (exit_statement . 
1)) (FOR . (exit_statement . 1)) (GOTO . (exit_statement . 1)) (IF . 
(exit_statement . 1)) (LOOP . (e [...]
       ((default . error) (OR . (simple_statement . 3)) (THEN . 
(simple_statement . 3)) (WHEN . (simple_statement . 3)) (EXCEPTION . 
(simple_statement . 3)) (END . (simple_statement . 3)) (ACCEPT . 
(simple_statement . 3)) (ABORT . (simple_statement . 3)) (BEGIN . 
(simple_statement . 3)) (CASE . (simple_statement . 3)) (DECLARE . 
(simple_statement . 3)) (DELAY . (simple_statement . 3)) (EXIT . 
(simple_statement . 3)) (FOR . (simple_statement . 3)) (GOTO . 
(simple_statement . 3)) (IF . (sim [...]
-      ((default . error) (ELSIF . (sequence_of_statements_opt . 0)) (ELSE . 
(sequence_of_statements_opt . 0)) (END . (sequence_of_statements_opt . 0)) 
(ACCEPT . (label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) 
(DECLARE . (label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) 
(LOOP . (label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) 
(WHILE . (label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) 
(EXIT . (label_opt . 0)) (GOTO  [...]
-      ((default . error) (LOOP .  970))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
+      ((default . error) (ELSIF . (sequence_of_statements_opt . 0)) (ELSE . 
(sequence_of_statements_opt . 0)) (END . (sequence_of_statements_opt . 0)) 
(ACCEPT . (label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) 
(DECLARE . (label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) 
(LOOP . (label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) 
(WHILE . (label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) 
(EXIT . (label_opt . 0)) (GOTO  [...]
+      ((default . error) (LOOP .  975))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
       ((default . error) (OR . (raise_statement . 2)) (THEN . (raise_statement 
. 2)) (WHEN . (raise_statement . 2)) (EXCEPTION . (raise_statement . 2)) (END . 
(raise_statement . 2)) (ACCEPT . (raise_statement . 2)) (ABORT . 
(raise_statement . 2)) (BEGIN . (raise_statement . 2)) (CASE . (raise_statement 
. 2)) (DECLARE . (raise_statement . 2)) (DELAY . (raise_statement . 2)) (EXIT . 
(raise_statement . 2)) (FOR . (raise_statement . 2)) (GOTO . (raise_statement . 
2)) (IF . (raise_statement . [...]
-      ((default . error) (ABORT .  968))
+      ((default . error) (ABORT .  973))
       ((default . error) (OR . (requeue_statement . 1)) (THEN . 
(requeue_statement . 1)) (WHEN . (requeue_statement . 1)) (EXCEPTION . 
(requeue_statement . 1)) (END . (requeue_statement . 1)) (ACCEPT . 
(requeue_statement . 1)) (ABORT . (requeue_statement . 1)) (BEGIN . 
(requeue_statement . 1)) (CASE . (requeue_statement . 1)) (DECLARE . 
(requeue_statement . 1)) (DELAY . (requeue_statement . 1)) (EXIT . 
(requeue_statement . 1)) (FOR . (requeue_statement . 1)) (GOTO . 
(requeue_statement .  [...]
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (EXCEPTION . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt  [...]
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (EXCEPTION . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt  [...]
       ((default . error) (OR . (extended_return_statement . 1)) (THEN . 
(extended_return_statement . 1)) (WHEN . (extended_return_statement . 1)) 
(EXCEPTION . (extended_return_statement . 1)) (END . (extended_return_statement 
. 1)) (ACCEPT . (extended_return_statement . 1)) (ABORT . 
(extended_return_statement . 1)) (BEGIN . (extended_return_statement . 1)) 
(CASE . (extended_return_statement . 1)) (DECLARE . (extended_return_statement 
. 1)) (DELAY . (extended_return_statement . 1)) (EXIT  [...]
       ((default . error) (OR . (simple_return_statement . 1)) (THEN . 
(simple_return_statement . 1)) (WHEN . (simple_return_statement . 1)) 
(EXCEPTION . (simple_return_statement . 1)) (END . (simple_return_statement . 
1)) (ACCEPT . (simple_return_statement . 1)) (ABORT . (simple_return_statement 
. 1)) (BEGIN . (simple_return_statement . 1)) (CASE . (simple_return_statement 
. 1)) (DECLARE . (simple_return_statement . 1)) (DELAY . 
(simple_return_statement . 1)) (EXIT . (simple_return_state [...]
-      ((default . error) (CONSTANT . (aliased_opt . 0)) (ACCESS . (aliased_opt 
. 0)) (NOT . (aliased_opt . 0)) (IDENTIFIER . (aliased_opt . 0)) 
(STRING_LITERAL . (aliased_opt . 0)) (CHARACTER_LITERAL . (aliased_opt . 0)) 
(ALIASED .  530))
-      ((default . error) (ABORT .  965))
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (ACCEPT . 
(label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . 
(label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) (LOOP . 
(label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . 
(label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . 
(label_opt . 0)) (GOTO . (label_opt . 0)) (NULL . (label_opt . 0)) (PRAGMA . 
(label_opt . 0)) (RAISE . (labe [...]
-      ((default . error) (SELECT .  963))
-      ((default . error) (WHEN .  686) (TERMINATE .  685) (ACCEPT .  625) 
(DELAY .  630))
+      ((default . error) (CONSTANT . (aliased_opt . 0)) (ACCESS . (aliased_opt 
. 0)) (NOT . (aliased_opt . 0)) (IDENTIFIER . (aliased_opt . 0)) 
(STRING_LITERAL . (aliased_opt . 0)) (CHARACTER_LITERAL . (aliased_opt . 0)) 
(ALIASED .  531))
+      ((default . error) (ABORT .  970))
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (ACCEPT . 
(label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . 
(label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) (LOOP . 
(label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . 
(label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . 
(label_opt . 0)) (GOTO . (label_opt . 0)) (NULL . (label_opt . 0)) (PRAGMA . 
(label_opt . 0)) (RAISE . (labe [...]
+      ((default . error) (SELECT .  968))
+      ((default . error) (WHEN .  691) (TERMINATE .  690) (ACCEPT .  630) 
(DELAY .  635))
       ((default . error) (OR . (entry_call_alternative . 0)) (ELSE . 
(entry_call_alternative . 0)) (THEN . (triggering_alternative . 0)))
       ((default . error) (OR . (entry_call_alternative . 1)) (ELSE . 
(entry_call_alternative . 1)) (THEN . (triggering_alternative . 1)))
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (ACCEPT . 
(label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . 
(label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) (LOOP . 
(label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . 
(label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . 
(label_opt . 0)) (GOTO . (label_opt . 0)) (NULL . (label_opt . 0)) (PRAGMA . 
(label_opt . 0)) (RAISE . (labe [...]
-      ((default . error) (DELAY .  630))
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (ACCEPT . 
(label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . 
(label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) (LOOP . 
(label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . 
(label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . 
(label_opt . 0)) (GOTO . (label_opt . 0)) (NULL . (label_opt . 0)) (PRAGMA . 
(label_opt . 0)) (RAISE . (labe [...]
+      ((default . error) (DELAY .  635))
       ((default . error) (OR . (delay_alternative . 0)) (END . 
(delay_alternative . 0)) (ELSE . (delay_alternative . 0)) (THEN . 
(triggering_alternative . 2)))
       ((default . error) (END . (select_alternative . 1)) (OR . 
(select_alternative . 1)) (ELSE . (select_alternative . 1)))
-      ((default . error) (EQUAL_GREATER .  958))
+      ((default . error) (EQUAL_GREATER .  963))
       ((default . error) (END . (select_alternative . 5)) (OR . 
(select_alternative . 5)) (ELSE . (select_alternative . 5)))
       ((default . error) (ACCEPT . (label_opt . 1)) (BEGIN . (label_opt . 1)) 
(CASE . (label_opt . 1)) (DECLARE . (label_opt . 1)) (FOR . (label_opt . 1)) 
(IF . (label_opt . 1)) (LOOP . (label_opt . 1)) (RETURN . (label_opt . 1)) 
(SELECT . (label_opt . 1)) (WHILE . (label_opt . 1)) (ABORT . (label_opt . 1)) 
(DELAY . (label_opt . 1)) (EXIT . (label_opt . 1)) (GOTO . (label_opt . 1)) 
(NULL . (label_opt . 1)) (PRAGMA . (label_opt . 1)) (RAISE . (label_opt . 1)) 
(REQUEUE . (label_opt . 1)) ( [...]
-      ((default . error) (SEMICOLON .  957))
-      ((default . error) (END .  956))
-      ((default . error) (SEMICOLON .  955))
-      ((default . error) (OTHERS .  950) (IDENTIFIER .  951) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
+      ((default . error) (SEMICOLON .  962))
+      ((default . error) (END .  961))
+      ((default . error) (SEMICOLON .  960))
+      ((default . error) (OTHERS .  955) (IDENTIFIER .  956) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
       ((default . error) (END . (exception_handler_list . 0)) (WHEN . 
(exception_handler_list . 0)))
-      ((default . error) (END . (exception_handler_list_opt . 1)) (WHEN .  
945))
+      ((default . error) (END . (exception_handler_list_opt . 1)) (WHEN .  
950))
       ((default . error) (END . (handled_sequence_of_statements . 0)))
       ((default . error) (WHEN . (exception_handler_list . 1)) (END . 
(exception_handler_list . 1)))
       ((default . error) (BAR . (exception_choice . 1)) (EQUAL_GREATER . 
(exception_choice . 1)))
-      ((default . error) (COLON .  1185) (EQUAL_GREATER . (name . 0)) (BAR . 
(name . 0)) (LEFT_PAREN . (name . 0)) (DOT . (name . 0)) (TICK . (name . 0)))
+      ((default . error) (COLON .  1182) (EQUAL_GREATER . (name . 0)) (BAR . 
(name . 0)) (LEFT_PAREN . (name . 0)) (DOT . (name . 0)) (TICK . (name . 0)))
       ((default . error) (EQUAL_GREATER . (exception_choice_list . 0)) (BAR . 
(exception_choice_list . 0)))
-      ((default . error) (BAR .  1183) (EQUAL_GREATER .  1184))
+      ((default . error) (BAR .  1180) (EQUAL_GREATER .  1181))
       ((default . error) (DOT .  90) (BAR . (exception_choice . 0)) 
(EQUAL_GREATER . (exception_choice . 0)) (TICK .  91) (LEFT_PAREN .  107))
       ((default . error) (WHEN . (assignment_statement . 0)) (THEN . 
(assignment_statement . 0)) (OR . (assignment_statement . 0)) (ELSIF . 
(assignment_statement . 0)) (ELSE . (assignment_statement . 0)) 
(CHARACTER_LITERAL . (assignment_statement . 0)) (STRING_LITERAL . 
(assignment_statement . 0)) (IDENTIFIER . (assignment_statement . 0)) 
(LESS_LESS . (assignment_statement . 0)) (WHILE . (assignment_statement . 0)) 
(SELECT . (assignment_statement . 0)) (RETURN . (assignment_statement . 0 [...]
-      ((default . error) (LOOP .  1182))
+      ((default . error) (LOOP .  1179))
       ((default . error) (IDENTIFIER . (subprogram_body . 0)) (TYPE . 
(subprogram_body . 0)) (TASK . (subprogram_body . 0)) (SUBTYPE . 
(subprogram_body . 0)) (PROTECTED . (subprogram_body . 0)) (FOR . 
(subprogram_body . 0)) (ENTRY . (subprogram_body . 0)) (BEGIN . 
(subprogram_body . 0)) (END . (subprogram_body . 0)) ($EOI . (subprogram_body . 
0)) (FUNCTION . (subprogram_body . 0)) (GENERIC . (subprogram_body . 0)) 
(LIMITED . (subprogram_body . 0)) (NOT . (subprogram_body . 0)) (OVERRIDIN [...]
-      ((default . error) (TERMINATE .  1179) (ACCEPT .  625) (DELAY .  630))
-      ((default . error) (END .  1178))
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (OR . 
(sequence_of_statements_opt . 0)) (ELSE . (sequence_of_statements_opt . 0)) 
(ACCEPT . (label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) 
(DECLARE . (label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) 
(LOOP . (label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) 
(WHILE . (label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) 
(EXIT . (label_opt . 0)) (GOTO . ( [...]
-      ((default . error) (END .  1176))
+      ((default . error) (TERMINATE .  1176) (ACCEPT .  630) (DELAY .  635))
+      ((default . error) (END .  1175))
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (OR . 
(sequence_of_statements_opt . 0)) (ELSE . (sequence_of_statements_opt . 0)) 
(ACCEPT . (label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) 
(DECLARE . (label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) 
(LOOP . (label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) 
(WHILE . (label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) 
(EXIT . (label_opt . 0)) (GOTO . ( [...]
+      ((default . error) (END .  1173))
       ((default . error) (ELSE . (select_alternative_list . 1)) (END . 
(select_alternative_list . 1)) (OR . (select_alternative_list . 1)))
-      ((default . error) (SEMICOLON .  1175))
-      ((default . error) (END .  1174))
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (ACCEPT . 
(label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . 
(label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) (LOOP . 
(label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . 
(label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . 
(label_opt . 0)) (GOTO . (label_opt . 0)) (NULL . (label_opt . 0)) (PRAGMA . 
(label_opt . 0)) (RAISE . (labe [...]
-      ((default . error) (ACCESS . (constant_opt . 0)) (NOT . (constant_opt . 
0)) (IDENTIFIER . (constant_opt . 0)) (STRING_LITERAL . (constant_opt . 0)) 
(CHARACTER_LITERAL . (constant_opt . 0)) (CONSTANT .  736))
+      ((default . error) (SEMICOLON .  1172))
       ((default . error) (END .  1171))
-      ((default . error) (SEMICOLON .  1170))
-      ((default . error) (SEMICOLON .  1169))
-      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
711))
-      ((default . error) (ELSE .  1163) (END .  1165) (ELSIF .  1164))
-      ((default . error) (SEMICOLON .  1162))
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (ACCEPT . 
(label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . 
(label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) (LOOP . 
(label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . 
(label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . 
(label_opt . 0)) (GOTO . (label_opt . 0)) (NULL . (label_opt . 0)) (PRAGMA . 
(label_opt . 0)) (RAISE . (labe [...]
+      ((default . error) (ACCESS . (constant_opt . 0)) (NOT . (constant_opt . 
0)) (IDENTIFIER . (constant_opt . 0)) (STRING_LITERAL . (constant_opt . 0)) 
(CHARACTER_LITERAL . (constant_opt . 0)) (CONSTANT .  757))
+      ((default . error) (END .  1168))
+      ((default . error) (SEMICOLON .  1167))
+      ((default . error) (SEMICOLON .  1166))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
716))
+      ((default . error) (ELSE .  1160) (END .  1162) (ELSIF .  1161))
+      ((default . error) (SEMICOLON .  1159))
       ((default . error) (WHEN . (delay_statement . 0)) (ELSIF . 
(delay_statement . 0)) (EXCEPTION . (delay_statement . 0)) (CHARACTER_LITERAL . 
(delay_statement . 0)) (STRING_LITERAL . (delay_statement . 0)) (IDENTIFIER . 
(delay_statement . 0)) (LESS_LESS . (delay_statement . 0)) (WHILE . 
(delay_statement . 0)) (SELECT . (delay_statement . 0)) (RETURN . 
(delay_statement . 0)) (REQUEUE . (delay_statement . 0)) (RAISE . 
(delay_statement . 0)) (PRAGMA . (delay_statement . 0)) (NULL . (dela [...]
-      ((default . error) (END .  1161))
-      ((default . error) (EQUAL_GREATER . (discrete_choice_list . 0)) (BAR . 
(discrete_choice_list . 0)) (OTHERS .  175) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (PLUS .  151) (MINUS .  150) 
(ABS .  144) (NOT .  174) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(LEFT_PAREN .  145))
+      ((default . error) (END .  1158))
+      ((default . error) (EQUAL_GREATER . (discrete_choice_list . 0)) (BAR . 
(discrete_choice_list . 0)) (OTHERS .  182) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) 
(ABS .  144) (NOT .  181) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(LEFT_PAREN .  148))
       ((default . error) (END . (case_statement_alternative_list . 0)) (WHEN . 
(case_statement_alternative_list . 0)))
-      ((default . error) (END .  1158) (WHEN .  975))
-      ((default . error) (SEMICOLON .  1157))
-      ((default . error) (DO .  1155) (SEMICOLON .  1156))
-      ((default . error) (BEGIN .  1154))
-      ((default . error) (IDENTIFIER .  1153))
+      ((default . error) (END .  1155) (WHEN .  980))
+      ((default . error) (SEMICOLON .  1154))
+      ((default . error) (DO .  1152) (SEMICOLON .  1153))
+      ((default . error) (BEGIN .  1151))
+      ((default . error) (IDENTIFIER .  1150))
       ((default . error) (PROCEDURE . (protected_operation_item . 5)) 
(OVERRIDING . (protected_operation_item . 5)) (NOT . (protected_operation_item 
. 5)) (FUNCTION . (protected_operation_item . 5)) (FOR . 
(protected_operation_item . 5)) (ENTRY . (protected_operation_item . 5)) (END . 
(protected_operation_item . 5)))
       ((default . error) (PROCEDURE . (protected_operation_item . 2)) 
(OVERRIDING . (protected_operation_item . 2)) (NOT . (protected_operation_item 
. 2)) (FUNCTION . (protected_operation_item . 2)) (FOR . 
(protected_operation_item . 2)) (ENTRY . (protected_operation_item . 2)) (END . 
(protected_operation_item . 2)))
       ((default . error) (PROCEDURE . (protected_operation_item . 3)) 
(OVERRIDING . (protected_operation_item . 3)) (NOT . (protected_operation_item 
. 3)) (FUNCTION . (protected_operation_item . 3)) (FOR . 
(protected_operation_item . 3)) (ENTRY . (protected_operation_item . 3)) (END . 
(protected_operation_item . 3)))
       ((default . error) (PROCEDURE . (protected_operation_item . 4)) 
(OVERRIDING . (protected_operation_item . 4)) (NOT . (protected_operation_item 
. 4)) (FUNCTION . (protected_operation_item . 4)) (FOR . 
(protected_operation_item . 4)) (ENTRY . (protected_operation_item . 4)) (END . 
(protected_operation_item . 4)))
       ((default . error) (FUNCTION .  1) (PROCEDURE .  9))
       ((default . error) (END . (protected_operation_item_list . 0)) (ENTRY . 
(protected_operation_item_list . 0)) (FOR . (protected_operation_item_list . 
0)) (FUNCTION . (protected_operation_item_list . 0)) (NOT . 
(protected_operation_item_list . 0)) (OVERRIDING . 
(protected_operation_item_list . 0)) (PROCEDURE . 
(protected_operation_item_list . 0)))
-      ((default . error) (END . (protected_operation_item_list_opt . 1)) 
(ENTRY .  981) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(FOR .  298))
-      ((default . error) (END .  1150))
+      ((default . error) (END . (protected_operation_item_list_opt . 1)) 
(ENTRY .  986) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(FOR .  299))
+      ((default . error) (END .  1147))
       ((default . error) (PROCEDURE . (protected_operation_item . 1)) 
(OVERRIDING . (protected_operation_item . 1)) (NOT . (protected_operation_item 
. 1)) (FUNCTION . (protected_operation_item . 1)) (FOR . 
(protected_operation_item . 1)) (ENTRY . (protected_operation_item . 1)) (END . 
(protected_operation_item . 1)))
       ((default . error) (PROCEDURE . (protected_operation_item . 0)) 
(OVERRIDING . (protected_operation_item . 0)) (NOT . (protected_operation_item 
. 0)) (FUNCTION . (protected_operation_item . 0)) (FOR . 
(protected_operation_item . 0)) (ENTRY . (protected_operation_item . 0)) (END . 
(protected_operation_item . 0)))
-      ((default . error) (LOOP . (iterator_specification . 0)) (EQUAL_GREATER 
. (iterator_specification . 0)))
-      ((default . error) (DOT .  90) (TICK .  91) (LOOP . 
(iterator_specification . 4)) (EQUAL_GREATER . (iterator_specification . 4)) 
(LEFT_PAREN .  107))
-      ((default . error) (REVERSE .  1148) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
-      ((default . error) (SEMICOLON .  1147))
-      ((default . error) (WITH . (parameter_profile_opt . 0)) (SEMICOLON . 
(parameter_profile_opt . 0)) (LEFT_PAREN .  798))
+      ((default . error) (COMMA . (case_expression_alternative . 0)) 
(RIGHT_PAREN . (case_expression_alternative . 0)))
+      ((default . error) (DO . (subtype_indication . 1)) (LOOP . 
(subtype_indication . 1)) (COLON_EQUAL . (subtype_indication . 1)) (SEMICOLON . 
(subtype_indication . 1)) (OF . (subtype_indication . 1)) (AND . 
(subtype_indication . 1)) (WITH . (subtype_indication . 1)) (EQUAL_GREATER . 
(subtype_indication . 1)) (COMMA . (subtype_indication . 1)) (RIGHT_PAREN . 
(subtype_indication . 1)) (DOT .  90) (TICK .  91) (RANGE .  902) (LEFT_PAREN . 
 827))
+      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
+      ((default . error) (DOT .  90) (TICK .  91) (LOOP . 
(iterator_specification . 3)) (EQUAL_GREATER . (iterator_specification . 3)) 
(LEFT_PAREN .  107))
+      ((default . error) (DO . (constraint . 0)) (LOOP . (constraint . 0)) (OF 
. (constraint . 0)) (AND . (constraint . 0)) (SEMICOLON . (constraint . 0)) 
(WITH . (constraint . 0)) (COLON_EQUAL . (constraint . 0)) (EQUAL_GREATER . 
(constraint . 0)) (RIGHT_PAREN . (constraint . 0)) (COMMA . (constraint . 0)))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (COMMA . (if_expression . 0)) (RIGHT_PAREN . 
(if_expression . 0)))
+      ((default . error) (SEMICOLON .  1143))
+      ((default . error) (WITH . (parameter_profile_opt . 0)) (SEMICOLON . 
(parameter_profile_opt . 0)) (LEFT_PAREN .  808))
       ((default . error) (IDENTIFIER . (entry_declaration . 1)) (USE . 
(entry_declaration . 1)) (TYPE . (entry_declaration . 1)) (TASK . 
(entry_declaration . 1)) (SUBTYPE . (entry_declaration . 1)) (PROTECTED . 
(entry_declaration . 1)) (PROCEDURE . (entry_declaration . 1)) (PRAGMA . 
(entry_declaration . 1)) (PACKAGE . (entry_declaration . 1)) (OVERRIDING . 
(entry_declaration . 1)) (NOT . (entry_declaration . 1)) (GENERIC . 
(entry_declaration . 1)) (FUNCTION . (entry_declaration . 1)) (FO [...]
-      ((default . error) (WITH . (paren_expression . 2)) (SEMICOLON . 
(paren_expression . 2)))
       ((default . error) (WITH . (paren_expression . 0)) (SEMICOLON . 
(paren_expression . 0)))
       ((default . error) (WITH . (paren_expression . 1)) (SEMICOLON . 
(paren_expression . 1)))
       ((default . error) (IDENTIFIER . (expression_function_declaration . 0)) 
(USE . (expression_function_declaration . 0)) (TYPE . 
(expression_function_declaration . 0)) (TASK . (expression_function_declaration 
. 0)) (SUBTYPE . (expression_function_declaration . 0)) (PROTECTED . 
(expression_function_declaration . 0)) (PROCEDURE . 
(expression_function_declaration . 0)) (PRAGMA . 
(expression_function_declaration . 0)) (PACKAGE . 
(expression_function_declaration . 0)) (OVERRIDING . (expres [...]
       ((default . error) (IDENTIFIER . (null_procedure_declaration . 0)) (USE 
. (null_procedure_declaration . 0)) (TYPE . (null_procedure_declaration . 0)) 
(TASK . (null_procedure_declaration . 0)) (SUBTYPE . 
(null_procedure_declaration . 0)) (PROTECTED . (null_procedure_declaration . 
0)) (PROCEDURE . (null_procedure_declaration . 0)) (PRAGMA . 
(null_procedure_declaration . 0)) (PACKAGE . (null_procedure_declaration . 0)) 
(OVERRIDING . (null_procedure_declaration . 0)) (NOT . (null_proce [...]
       ((default . error) (IDENTIFIER . (abstract_subprogram_declaration . 0)) 
(USE . (abstract_subprogram_declaration . 0)) (TYPE . 
(abstract_subprogram_declaration . 0)) (TASK . (abstract_subprogram_declaration 
. 0)) (SUBTYPE . (abstract_subprogram_declaration . 0)) (PROTECTED . 
(abstract_subprogram_declaration . 0)) (PROCEDURE . 
(abstract_subprogram_declaration . 0)) (PRAGMA . 
(abstract_subprogram_declaration . 0)) (PACKAGE . 
(abstract_subprogram_declaration . 0)) (OVERRIDING . (abstra [...]
       ((default . error) (IDENTIFIER . (subprogram_body_stub . 0)) (USE . 
(subprogram_body_stub . 0)) (TYPE . (subprogram_body_stub . 0)) (TASK . 
(subprogram_body_stub . 0)) (SUBTYPE . (subprogram_body_stub . 0)) (PROTECTED . 
(subprogram_body_stub . 0)) (PROCEDURE . (subprogram_body_stub . 0)) (PRAGMA . 
(subprogram_body_stub . 0)) (PACKAGE . (subprogram_body_stub . 0)) (OVERRIDING 
. (subprogram_body_stub . 0)) (NOT . (subprogram_body_stub . 0)) (GENERIC . 
(subprogram_body_stub . 0)) (FUN [...]
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (SEMICOLON .  1144))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (SEMICOLON .  1142))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
       ((default . error) (SEMICOLON .  1140))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (SEMICOLON .  1138))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (SEMICOLON .  1136))
       ((default . error) (ACCESS . (null_exclusion_opt . 1)) (IDENTIFIER .  
48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
       ((default . error) (BEGIN . (declaration . 9)) (ENTRY . (declaration . 
9)) (FOR . (declaration . 9)) (FUNCTION . (declaration . 9)) (GENERIC . 
(declaration . 9)) (NOT . (declaration . 9)) (OVERRIDING . (declaration . 9)) 
(PACKAGE . (declaration . 9)) (PRAGMA . (declaration . 9)) (PROCEDURE . 
(declaration . 9)) (PROTECTED . (declaration . 9)) (SUBTYPE . (declaration . 
9)) (TASK . (declaration . 9)) (TYPE . (declaration . 9)) (USE . (declaration . 
9)) (IDENTIFIER . (declaration . 9)) [...]
       ((default . error) (DOT .  90) (TICK .  91) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109) (LEFT_PAREN .  107))
-      ((default . error) (SEMICOLON .  1138))
-      ((default . error) (SEMICOLON .  1137))
-      ((default . error) (SEMICOLON .  1136))
+      ((default . error) (SEMICOLON .  1134))
+      ((default . error) (SEMICOLON .  1133))
+      ((default . error) (SEMICOLON .  1132))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
       ((default . error) (WITH . (record_type_definition . 0)) (SEMICOLON . 
(record_type_definition . 0)))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (NOT .  750) (IDENTIFIER .  48) (CHARACTER_LITERAL .  
50) (STRING_LITERAL .  49))
+      ((default . error) (NOT .  729) (IDENTIFIER .  48) (CHARACTER_LITERAL .  
50) (STRING_LITERAL .  49))
       ((default . error) (BEGIN . (incomplete_type_declaration . 0)) (ENTRY . 
(incomplete_type_declaration . 0)) (FOR . (incomplete_type_declaration . 0)) 
(FUNCTION . (incomplete_type_declaration . 0)) (GENERIC . 
(incomplete_type_declaration . 0)) (NOT . (incomplete_type_declaration . 0)) 
(OVERRIDING . (incomplete_type_declaration . 0)) (PACKAGE . 
(incomplete_type_declaration . 0)) (PRAGMA . (incomplete_type_declaration . 0)) 
(PROCEDURE . (incomplete_type_declaration . 0)) (PROTECTED . ( [...]
-      ((default . error) (IS . (direct_name_opt . 0)) (IDENTIFIER .  1129) 
(STRING_LITERAL .  1130))
-      ((default . error) (SEMICOLON .  1128))
+      ((default . error) (IS . (direct_name_opt . 0)) (IDENTIFIER .  1125) 
(STRING_LITERAL .  1126))
+      ((default . error) (SEMICOLON .  1124))
       ((default . error) (WHEN . (component_item . 1)) (END . (component_item 
. 1)) (IDENTIFIER . (component_item . 1)) (FOR . (component_item . 1)) (CASE . 
(component_item . 1)))
       ((default . error) (WHEN . (component_item . 0)) (END . (component_item 
. 0)) (IDENTIFIER . (component_item . 0)) (FOR . (component_item . 0)) (CASE . 
(component_item . 0)))
       ((default . error) (WHEN . (component_list . 0)) (END . (component_list 
. 0)) (CASE . (component_list . 0)) (FOR . (component_list . 0)) (IDENTIFIER . 
(component_list . 0)))
-      ((default . error) (WHEN . (component_list_opt . 1)) (END . 
(component_list_opt . 1)) (CASE .  1022) (IDENTIFIER .  77) (FOR .  298))
-      ((default . error) (END .  1125))
-      ((default . error) (COMMA .  96) (COLON .  1124))
+      ((default . error) (WHEN . (component_list_opt . 1)) (END . 
(component_list_opt . 1)) (CASE .  1030) (IDENTIFIER .  77) (FOR .  299))
+      ((default . error) (END .  1121))
+      ((default . error) (COMMA .  96) (COLON .  1120))
       ((default . error) (WHEN . (component_list . 3)) (END . (component_list 
. 3)) (CASE . (component_list . 3)) (FOR . (component_list . 3)) (IDENTIFIER . 
(component_list . 3)))
-      ((default . error) (DOT_DOT .  1123))
+      ((default . error) (DOT_DOT .  1119))
       ((default . error) (SEMICOLON . (record_definition . 1)) (WITH . 
(record_definition . 1)))
       ((default . error) (SEMICOLON . (type_definition . 2)) (WITH . 
(type_definition . 2)))
       ((default . error) (COMMA . (enumeration_literal . 0)) (RIGHT_PAREN . 
(enumeration_literal . 0)))
       ((default . error) (COMMA . (enumeration_literal . 1)) (RIGHT_PAREN . 
(enumeration_literal . 1)))
       ((default . error) (RIGHT_PAREN . (enumeration_literal_list . 0)) (COMMA 
. (enumeration_literal_list . 0)))
-      ((default . error) (COMMA .  1122) (RIGHT_PAREN .  1121))
-      ((default . error) (WITH . (real_range_specification_opt . 0)) 
(SEMICOLON . (real_range_specification_opt . 0)) (RANGE .  1118))
-      ((default . error) (DIGITS .  1117) (WITH . 
(real_range_specification_opt . 0)) (SEMICOLON . (real_range_specification_opt 
. 0)) (RANGE .  1118))
+      ((default . error) (COMMA .  1118) (RIGHT_PAREN .  1117))
+      ((default . error) (WITH . (real_range_specification_opt . 0)) 
(SEMICOLON . (real_range_specification_opt . 0)) (RANGE .  1114))
+      ((default . error) (DIGITS .  1113) (WITH . 
(real_range_specification_opt . 0)) (SEMICOLON . (real_range_specification_opt 
. 0)) (RANGE .  1114))
       ((default . error) (NEW . ((abstract_limited_synchronized_opt . 1) 
(abstract_limited_opt . 1))))
-      ((default . error) (SEMICOLON .  1116))
-      ((default . error) (NEW .  1114) (END . (declarative_part_opt . 0)) 
(PRIVATE . (declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  301) (PRAGMA .  
7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) 
(PROCEDURE . (overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt 
. 2)) (FOR .  298) (IDENTIFIER .  304) (TYPE .  303) (GENERIC .  2) (PROTECTED 
.  300) (TASK .  302) (PACKAGE .  299))
+      ((default . error) (SEMICOLON .  1112))
+      ((default . error) (NEW .  1110) (END . (declarative_part_opt . 0)) 
(PRIVATE . (declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  302) (PRAGMA .  
7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) 
(PROCEDURE . (overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt 
. 2)) (FOR .  299) (IDENTIFIER .  305) (TYPE .  304) (GENERIC .  2) (PROTECTED 
.  301) (TASK .  303) (PACKAGE .  300))
       ((default . error) (IDENTIFIER . (task_type_declaration . 2)) (USE . 
(task_type_declaration . 2)) (TYPE . (task_type_declaration . 2)) (TASK . 
(task_type_declaration . 2)) (SUBTYPE . (task_type_declaration . 2)) (PROTECTED 
. (task_type_declaration . 2)) (PROCEDURE . (task_type_declaration . 2)) 
(PRAGMA . (task_type_declaration . 2)) (PACKAGE . (task_type_declaration . 2)) 
(OVERRIDING . (task_type_declaration . 2)) (NOT . (task_type_declaration . 2)) 
(GENERIC . (task_type_declaratio [...]
       ((default . error) (BEGIN . (single_task_declaration . 1)) (ENTRY . 
(single_task_declaration . 1)) (FOR . (single_task_declaration . 1)) (FUNCTION 
. (single_task_declaration . 1)) (GENERIC . (single_task_declaration . 1)) (NOT 
. (single_task_declaration . 1)) (OVERRIDING . (single_task_declaration . 1)) 
(PACKAGE . (single_task_declaration . 1)) (PRAGMA . (single_task_declaration . 
1)) (PROCEDURE . (single_task_declaration . 1)) (PROTECTED . 
(single_task_declaration . 1)) (SUBTYPE . [...]
-      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
711))
-      ((default . error) (END . (declarative_part_opt . 0)) (USE .  11) 
(SUBTYPE .  301) (PRAGMA .  7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(ENTRY . (overriding_indicator_opt . 2)) (FOR .  298) (IDENTIFIER .  304) (TYPE 
.  303) (GENERIC .  2) (PROTECTED .  300) (TASK .  302) (PACKAGE .  299))
-      ((default . error) (AND .  1072) (WITH .  1111))
-      ((default . error) (DO . (subtype_indication . 1)) (LOOP . 
(subtype_indication . 1)) (COLON_EQUAL . (subtype_indication . 1)) (SEMICOLON . 
(subtype_indication . 1)) (OF . (subtype_indication . 1)) (AND . 
(subtype_indication . 1)) (WITH . (subtype_indication . 1)) (EQUAL_GREATER . 
(subtype_indication . 1)) (COMMA . (subtype_indication . 1)) (RIGHT_PAREN . 
(subtype_indication . 1)) (DOT .  90) (TICK .  91) (RANGE .  851) (LEFT_PAREN . 
 824))
-      ((default . error) (LOOP . (constraint . 0)) (EQUAL_GREATER . 
(constraint . 0)) (DO . (constraint . 0)) (OF . (constraint . 0)) (AND . 
(constraint . 0)) (SEMICOLON . (constraint . 0)) (WITH . (constraint . 0)) 
(COLON_EQUAL . (constraint . 0)) (RIGHT_PAREN . (constraint . 0)) (COMMA . 
(constraint . 0)))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
716))
+      ((default . error) (END . (declarative_part_opt . 0)) (USE .  11) 
(SUBTYPE .  302) (PRAGMA .  7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(ENTRY . (overriding_indicator_opt . 2)) (FOR .  299) (IDENTIFIER .  305) (TYPE 
.  304) (GENERIC .  2) (PROTECTED .  301) (TASK .  303) (PACKAGE .  300))
+      ((default . error) (AND .  1078) (WITH .  1107))
       ((default . error) (IDENTIFIER . (subtype_declaration . 0)) (USE . 
(subtype_declaration . 0)) (TYPE . (subtype_declaration . 0)) (TASK . 
(subtype_declaration . 0)) (SUBTYPE . (subtype_declaration . 0)) (PROTECTED . 
(subtype_declaration . 0)) (PROCEDURE . (subtype_declaration . 0)) (PRAGMA . 
(subtype_declaration . 0)) (PACKAGE . (subtype_declaration . 0)) (OVERRIDING . 
(subtype_declaration . 0)) (NOT . (subtype_declaration . 0)) (GENERIC . 
(subtype_declaration . 0)) (FUNCTION . (sub [...]
-      ((default . error) (SEMICOLON .  1109))
-      ((default . error) (NEW .  1107) (END . (declarative_part_opt . 0)) 
(PRIVATE . (declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  301) (PRAGMA .  
7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) 
(PROCEDURE . (overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt 
. 2)) (FOR .  298) (IDENTIFIER .  304) (TYPE .  303) (GENERIC .  2) (PROTECTED 
.  300) (TASK .  302) (PACKAGE .  299))
+      ((default . error) (SEMICOLON .  1106))
+      ((default . error) (NEW .  1104) (END . (declarative_part_opt . 0)) 
(PRIVATE . (declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  302) (PRAGMA .  
7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) 
(PROCEDURE . (overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt 
. 2)) (FOR .  299) (IDENTIFIER .  305) (TYPE .  304) (GENERIC .  2) (PROTECTED 
.  301) (TASK .  303) (PACKAGE .  300))
       ((default . error) (BEGIN . (single_protected_declaration . 1)) (ENTRY . 
(single_protected_declaration . 1)) (FOR . (single_protected_declaration . 1)) 
(FUNCTION . (single_protected_declaration . 1)) (GENERIC . 
(single_protected_declaration . 1)) (NOT . (single_protected_declaration . 1)) 
(OVERRIDING . (single_protected_declaration . 1)) (PACKAGE . 
(single_protected_declaration . 1)) (PRAGMA . (single_protected_declaration . 
1)) (PROCEDURE . (single_protected_declaration . 1)) (PRO [...]
-      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
711))
-      ((default . error) (END . (declarative_part_opt . 0)) (USE .  11) 
(SUBTYPE .  301) (PRAGMA .  7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(ENTRY . (overriding_indicator_opt . 2)) (FOR .  298) (IDENTIFIER .  304) (TYPE 
.  303) (GENERIC .  2) (PROTECTED .  300) (TASK .  302) (PACKAGE .  299))
-      ((default . error) (AND .  1072) (WITH .  1104))
-      ((default . error) (SEMICOLON .  1103))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
716))
+      ((default . error) (END . (declarative_part_opt . 0)) (USE .  11) 
(SUBTYPE .  302) (PRAGMA .  7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(ENTRY . (overriding_indicator_opt . 2)) (FOR .  299) (IDENTIFIER .  305) (TYPE 
.  304) (GENERIC .  2) (PROTECTED .  301) (TASK .  303) (PACKAGE .  300))
+      ((default . error) (AND .  1078) (WITH .  1101))
+      ((default . error) (SEMICOLON .  1100))
       ((default . error) (WHEN . (at_clause . 0)) (BEGIN . (at_clause . 0)) 
(ENTRY . (at_clause . 0)) (FOR . (at_clause . 0)) (FUNCTION . (at_clause . 0)) 
(GENERIC . (at_clause . 0)) (NOT . (at_clause . 0)) (OVERRIDING . (at_clause . 
0)) (PACKAGE . (at_clause . 0)) (PRAGMA . (at_clause . 0)) (PROCEDURE . 
(at_clause . 0)) (PROTECTED . (at_clause . 0)) (SUBTYPE . (at_clause . 0)) 
(TASK . (at_clause . 0)) (TYPE . (at_clause . 0)) (USE . (at_clause . 0)) 
(IDENTIFIER . (at_clause . 0)) (CASE  [...]
-      ((default . error) (AT .  1102))
+      ((default . error) (AT .  1099))
       ((default . error) (END . (component_clause_list . 0)) (IDENTIFIER . 
(component_clause_list . 0)))
-      ((default . error) (END .  1100) (IDENTIFIER .  1059))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
+      ((default . error) (END .  1097) (IDENTIFIER .  1065))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
       ((default . error) (RIGHT_PAREN . (discrete_subtype_definition_list . 
1)) (COMMA . (discrete_subtype_definition_list . 1)))
-      ((default . error) (ALIASED .  1093) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (ACCESS . (null_exclusion_opt 
. 0)) (NOT .  883))
+      ((default . error) (ALIASED .  1090) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (ACCESS . (null_exclusion_opt 
. 0)) (NOT .  883))
       ((default . error) (RIGHT_PAREN . (index_subtype_definition_list . 1)) 
(COMMA . (index_subtype_definition_list . 1)))
-      ((default . error) (DOT .  90) (RANGE .  1097) (TICK .  91) (LEFT_PAREN 
.  107))
-      ((default . error) (ALIASED .  1093) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (ACCESS . (null_exclusion_opt 
. 0)) (NOT .  883))
+      ((default . error) (DOT .  90) (RANGE .  1094) (TICK .  91) (LEFT_PAREN 
.  107))
+      ((default . error) (ALIASED .  1090) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (ACCESS . (null_exclusion_opt 
. 0)) (NOT .  883))
       ((default . error) (COMMA . (index_subtype_definition . 0)) (RIGHT_PAREN 
. (index_subtype_definition . 0)))
-      ((default . error) (NUMERIC_LITERAL .  152) (NULL .  1092) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (COMMA .  831) (RIGHT_PAREN .  1091))
+      ((default . error) (NUMERIC_LITERAL .  155) (NULL .  1089) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (COMMA .  834) (RIGHT_PAREN .  1088))
       ((default . error) (BAR . (discrete_choice . 2)) (EQUAL_GREATER . 
(discrete_choice . 2)) (RIGHT_PAREN . ((range_list . 0) 
(discrete_subtype_definition . 1))) (COMMA . ((range_list . 0) 
(discrete_subtype_definition . 1))))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (PRIVATE .  1089))
-      ((default . error) (AND .  1072) (WITH . (and_interface_list_opt . 1)) 
(SEMICOLON . (and_interface_list_opt . 1)))
+      ((default . error) (PRIVATE .  1086))
+      ((default . error) (AND .  1078) (WITH . (and_interface_list_opt . 1)) 
(SEMICOLON . (and_interface_list_opt . 1)))
       ((default . error) (WITH . (formal_package_actual_part . 0)) (SEMICOLON 
. (formal_package_actual_part . 0)))
       ((default . error) (PACKAGE . (formal_package_declaration . 0)) 
(PROCEDURE . (formal_package_declaration . 0)) (FUNCTION . 
(formal_package_declaration . 0)) (PRAGMA . (formal_package_declaration . 0)) 
(TYPE . (formal_package_declaration . 0)) (USE . (formal_package_declaration . 
0)) (WITH . (formal_package_declaration . 0)) (IDENTIFIER . 
(formal_package_declaration . 0)))
       ((default . error) (PACKAGE . (formal_object_declaration . 0)) 
(PROCEDURE . (formal_object_declaration . 0)) (FUNCTION . 
(formal_object_declaration . 0)) (PRAGMA . (formal_object_declaration . 0)) 
(TYPE . (formal_object_declaration . 0)) (USE . (formal_object_declaration . 
0)) (WITH . (formal_object_declaration . 0)) (IDENTIFIER . 
(formal_object_declaration . 0)))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (ELSIF . (elsif_expression_list . 1)) (ELSE . 
(elsif_expression_list . 1)) (RIGHT_PAREN . (elsif_expression_list . 1)))
-      ((default . error) (THEN .  1087))
-      ((default . error) (RIGHT_PAREN . (if_expression . 2)))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (RIGHT_PAREN . (case_expression_alternative_list . 
1)) (COMMA . (case_expression_alternative_list . 1)))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
       ((default . error) (RIGHT_PAREN . (parameter_specification . 0)) 
(SEMICOLON . (parameter_specification . 0)))
-      ((default . error) (COMMA . (case_expression_alternative . 0)) 
(RIGHT_PAREN . (case_expression_alternative . 0)))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (RIGHT_PAREN . (if_expression . 0)))
       ((default . error) (WITH . (formal_derived_type_definition . 0)) 
(SEMICOLON . (formal_derived_type_definition . 0)))
       ((default . error) (DOT .  90) (TICK .  91) (WITH . (interface_list . 
1)) (SEMICOLON . (interface_list . 1)) (AND . (interface_list . 1)) (LEFT_PAREN 
.  107))
-      ((default . error) (LOOP . (index_constraint . 0)) (DO . 
(index_constraint . 0)) (EQUAL_GREATER . (index_constraint . 0)) (COMMA . 
(index_constraint . 0)) (RIGHT_PAREN . (index_constraint . 0)) (COLON_EQUAL . 
(index_constraint . 0)) (WITH . (index_constraint . 0)) (SEMICOLON . 
(index_constraint . 0)) (AND . (index_constraint . 0)) (OF . (index_constraint 
. 0)))
+      ((default . error) (LOOP . (index_constraint . 0)) (DO . 
(index_constraint . 0)) (RIGHT_PAREN . (index_constraint . 0)) (COMMA . 
(index_constraint . 0)) (EQUAL_GREATER . (index_constraint . 0)) (COLON_EQUAL . 
(index_constraint . 0)) (WITH . (index_constraint . 0)) (SEMICOLON . 
(index_constraint . 0)) (AND . (index_constraint . 0)) (OF . (index_constraint 
. 0)))
       ((default . error) (PLUS . (primary . 1)) (MINUS . (primary . 1)) 
(AMPERSAND . (primary . 1)) (DOT_DOT . (primary . 1)) (MOD . (primary . 1)) 
(REM . (primary . 1)) (SLASH . (primary . 1)) (STAR . (primary . 1)) (XOR . 
(primary . 1)) (OR . (primary . 1)) (AND . (primary . 1)) (EQUAL_GREATER . 
(primary . 1)) (BAR . (primary . 1)) (IN . (primary . 1)) (NOT . (primary . 1)) 
(EQUAL . (primary . 1)) (GREATER . (primary . 1)) (GREATER_EQUAL . (primary . 
1)) (LESS . (primary . 1)) (LESS_EQ [...]
       ((default . error) (ACCESS . (null_exclusion_opt . 0)) (NOT .  883) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
       ((default . error) (WITH . (component_definition . 3)) (SEMICOLON . 
(component_definition . 3)) (COLON_EQUAL . (component_definition . 3)))
       ((default . error) (WITH . (array_type_definition . 0)) (SEMICOLON . 
(array_type_definition . 0)) (COLON_EQUAL . (array_type_definition . 0)))
       ((default . error) (WITH . (component_definition . 1)) (SEMICOLON . 
(component_definition . 1)) (COLON_EQUAL . (component_definition . 1)))
-      ((default . error) (BOX .  1068))
+      ((default . error) (BOX .  1074))
       ((default . error) (WITH . (array_type_definition . 1)) (SEMICOLON . 
(array_type_definition . 1)) (COLON_EQUAL . (array_type_definition . 1)))
-      ((default . error) (SEMICOLON .  1244))
-      ((default . error) (RECORD .  1243))
+      ((default . error) (SEMICOLON .  1240))
+      ((default . error) (RECORD .  1239))
       ((default . error) (IDENTIFIER . (component_clause_list . 1)) (END . 
(component_clause_list . 1)))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
       ((default . error) (PRIVATE . (package_body_stub . 0)) (END . 
(package_body_stub . 0)) (BEGIN . (package_body_stub . 0)) (ENTRY . 
(package_body_stub . 0)) (FOR . (package_body_stub . 0)) (FUNCTION . 
(package_body_stub . 0)) (GENERIC . (package_body_stub . 0)) (NOT . 
(package_body_stub . 0)) (OVERRIDING . (package_body_stub . 0)) (PACKAGE . 
(package_body_stub . 0)) (PRAGMA . (package_body_stub . 0)) (PROCEDURE . 
(package_body_stub . 0)) (PROTECTED . (package_body_stub . 0)) (SUBTYPE [...]
-      ((default . error) (END . (declarative_part_opt . 0)) (PRIVATE . 
(declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  301) (PRAGMA .  7) (NOT .  
4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) (PROCEDURE . 
(overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt . 2)) (FOR . 
 298) (IDENTIFIER .  304) (TYPE .  303) (GENERIC .  2) (PROTECTED .  300) (TASK 
.  302) (PACKAGE .  299))
-      ((default . error) (END .  1240))
+      ((default . error) (END . (declarative_part_opt . 0)) (PRIVATE . 
(declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  302) (PRAGMA .  7) (NOT .  
4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) (PROCEDURE . 
(overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt . 2)) (FOR . 
 299) (IDENTIFIER .  305) (TYPE .  304) (GENERIC .  2) (PROTECTED .  301) (TASK 
.  303) (PACKAGE .  300))
+      ((default . error) (END .  1236))
       ((default . error) (SEMICOLON . (protected_definition . 1)))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (SEMICOLON .  1238))
+      ((default . error) (SEMICOLON .  1234))
       ((default . error) (PRIVATE . (protected_body_stub . 0)) (END . 
(protected_body_stub . 0)) (BEGIN . (protected_body_stub . 0)) (ENTRY . 
(protected_body_stub . 0)) (FOR . (protected_body_stub . 0)) (FUNCTION . 
(protected_body_stub . 0)) (GENERIC . (protected_body_stub . 0)) (NOT . 
(protected_body_stub . 0)) (OVERRIDING . (protected_body_stub . 0)) (PACKAGE . 
(protected_body_stub . 0)) (PRAGMA . (protected_body_stub . 0)) (PROCEDURE . 
(protected_body_stub . 0)) (PROTECTED . (protecte [...]
-      ((default . error) (LOOP . (subtype_indication . 0)) (DO . 
(subtype_indication . 0)) (RIGHT_PAREN . (subtype_indication . 0)) (COMMA . 
(subtype_indication . 0)) (EQUAL_GREATER . (subtype_indication . 0)) (WITH . 
(subtype_indication . 0)) (AND . (subtype_indication . 0)) (OF . 
(subtype_indication . 0)) (SEMICOLON . (subtype_indication . 0)) (COLON_EQUAL . 
(subtype_indication . 0)))
-      ((default . error) (END . (declarative_part_opt . 0)) (PRIVATE . 
(declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  301) (PRAGMA .  7) (NOT .  
4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) (PROCEDURE . 
(overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt . 2)) (FOR . 
 298) (IDENTIFIER .  304) (TYPE .  303) (GENERIC .  2) (PROTECTED .  300) (TASK 
.  302) (PACKAGE .  299))
-      ((default . error) (END .  1236))
+      ((default . error) (END . (declarative_part_opt . 0)) (PRIVATE . 
(declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  302) (PRAGMA .  7) (NOT .  
4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) (PROCEDURE . 
(overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt . 2)) (FOR . 
 299) (IDENTIFIER .  305) (TYPE .  304) (GENERIC .  2) (PROTECTED .  301) (TASK 
.  303) (PACKAGE .  300))
+      ((default . error) (END .  1232))
       ((default . error) (SEMICOLON . (task_definition . 1)))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (SEMICOLON .  1234))
+      ((default . error) (SEMICOLON .  1230))
       ((default . error) (PRIVATE . (task_body_stub . 0)) (END . 
(task_body_stub . 0)) (BEGIN . (task_body_stub . 0)) (ENTRY . (task_body_stub . 
0)) (FOR . (task_body_stub . 0)) (FUNCTION . (task_body_stub . 0)) (GENERIC . 
(task_body_stub . 0)) (NOT . (task_body_stub . 0)) (OVERRIDING . 
(task_body_stub . 0)) (PACKAGE . (task_body_stub . 0)) (PRAGMA . 
(task_body_stub . 0)) (PROCEDURE . (task_body_stub . 0)) (PROTECTED . 
(task_body_stub . 0)) (SUBTYPE . (task_body_stub . 0)) (TASK . (task_ [...]
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
       ((default . error) (WITH . (type_definition . 4)) (SEMICOLON . 
(type_definition . 4)))
       ((default . error) (WITH . (type_definition . 3)) (SEMICOLON . 
(type_definition . 3)))
       ((default . error) (SEMICOLON . (enumeration_type_definition . 0)) (WITH 
. (enumeration_type_definition . 0)))
-      ((default . error) (IDENTIFIER .  1034) (CHARACTER_LITERAL .  1035))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
-      ((default . error) (ALIASED .  1093) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (ACCESS . (null_exclusion_opt 
. 0)) (NOT .  883))
-      ((default . error) (RECORD .  1228))
+      ((default . error) (IDENTIFIER .  1042) (CHARACTER_LITERAL .  1043))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
+      ((default . error) (ALIASED .  1090) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (ACCESS . (null_exclusion_opt 
. 0)) (NOT .  883))
+      ((default . error) (RECORD .  1224))
       ((default . error) (WHEN . (component_list . 1)) (IDENTIFIER . 
(component_list . 1)) (FOR . (component_list . 1)) (CASE . (component_list . 
1)) (END . (component_list . 1)))
       ((default . error) (WHEN . (component_list . 2)) (IDENTIFIER . 
(component_list . 2)) (FOR . (component_list . 2)) (CASE . (component_list . 
2)) (END . (component_list . 2)))
       ((default . error) (WHEN . (component_list . 4)) (IDENTIFIER . 
(component_list . 4)) (FOR . (component_list . 4)) (CASE . (component_list . 
4)) (END . (component_list . 4)))
       ((default . error) (IS . (direct_name . 0)))
       ((default . error) (IS . (direct_name . 1)))
       ((default . error) (IS . (direct_name_opt . 1)))
-      ((default . error) (IS .  1227))
-      ((default . error) (WITH . (and_interface_list_opt . 0)) (AND .  816))
-      ((default . error) (DOT .  90) (TICK .  91) (AND .  816) (WITH . 
((constraint_opt . 0) (and_interface_list_opt . 0))) (SEMICOLON . 
(constraint_opt . 0)) (RANGE .  851) (LEFT_PAREN .  824))
-      ((default . error) (SEMICOLON .  1222))
+      ((default . error) (IS .  1223))
+      ((default . error) (WITH . (and_interface_list_opt . 0)) (AND .  819))
+      ((default . error) (DOT .  90) (TICK .  91) (AND .  819) (WITH . 
((constraint_opt . 0) (and_interface_list_opt . 0))) (SEMICOLON . 
(constraint_opt . 0)) (RANGE .  902) (LEFT_PAREN .  827))
+      ((default . error) (SEMICOLON .  1218))
       ((default . error) (END . (full_type_declaration . 0)) (PRIVATE . 
(full_type_declaration . 0)) (IDENTIFIER . (full_type_declaration . 0)) (USE . 
(full_type_declaration . 0)) (TYPE . (full_type_declaration . 0)) (TASK . 
(full_type_declaration . 0)) (SUBTYPE . (full_type_declaration . 0)) (PROTECTED 
. (full_type_declaration . 0)) (PROCEDURE . (full_type_declaration . 0)) 
(PRAGMA . (full_type_declaration . 0)) (PACKAGE . (full_type_declaration . 0)) 
(OVERRIDING . (full_type_declaratio [...]
       ((default . error) (END . (object_renaming_declaration . 2)) (PRIVATE . 
(object_renaming_declaration . 2)) (IDENTIFIER . (object_renaming_declaration . 
2)) (USE . (object_renaming_declaration . 2)) (TYPE . 
(object_renaming_declaration . 2)) (TASK . (object_renaming_declaration . 2)) 
(SUBTYPE . (object_renaming_declaration . 2)) (PROTECTED . 
(object_renaming_declaration . 2)) (PROCEDURE . (object_renaming_declaration . 
2)) (PRAGMA . (object_renaming_declaration . 2)) (PACKAGE . (obj [...]
       ((default . error) (END . (object_renaming_declaration . 1)) (PRIVATE . 
(object_renaming_declaration . 1)) (IDENTIFIER . (object_renaming_declaration . 
1)) (USE . (object_renaming_declaration . 1)) (TYPE . 
(object_renaming_declaration . 1)) (TASK . (object_renaming_declaration . 1)) 
(SUBTYPE . (object_renaming_declaration . 1)) (PROTECTED . 
(object_renaming_declaration . 1)) (PROCEDURE . (object_renaming_declaration . 
1)) (PRAGMA . (object_renaming_declaration . 1)) (PACKAGE . (obj [...]
-      ((default . error) (SEMICOLON .  1221))
+      ((default . error) (SEMICOLON .  1217))
       ((default . error) (PRIVATE . (object_declaration . 3)) (END . 
(object_declaration . 3)) (BEGIN . (object_declaration . 3)) (ENTRY . 
(object_declaration . 3)) (FOR . (object_declaration . 3)) (FUNCTION . 
(object_declaration . 3)) (GENERIC . (object_declaration . 3)) (NOT . 
(object_declaration . 3)) (OVERRIDING . (object_declaration . 3)) (PACKAGE . 
(object_declaration . 3)) (PRAGMA . (object_declaration . 3)) (PROCEDURE . 
(object_declaration . 3)) (PROTECTED . (object_declaration . [...]
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
       ((default . error) (PRIVATE . (object_declaration . 5)) (END . 
(object_declaration . 5)) (BEGIN . (object_declaration . 5)) (ENTRY . 
(object_declaration . 5)) (FOR . (object_declaration . 5)) (FUNCTION . 
(object_declaration . 5)) (GENERIC . (object_declaration . 5)) (NOT . 
(object_declaration . 5)) (OVERRIDING . (object_declaration . 5)) (PACKAGE . 
(object_declaration . 5)) (PRAGMA . (object_declaration . 5)) (PROCEDURE . 
(object_declaration . 5)) (PROTECTED . (object_declaration . [...]
@@ -2952,198 +2958,197 @@
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
       ((default . error) (END . (package_body . 0)) (BEGIN . (package_body . 
0)) (ENTRY . (package_body . 0)) (FOR . (package_body . 0)) (PROTECTED . 
(package_body . 0)) (SUBTYPE . (package_body . 0)) (TASK . (package_body . 0)) 
(TYPE . (package_body . 0)) (IDENTIFIER . (package_body . 0)) (WITH . 
(package_body . 0)) (USE . (package_body . 0)) (SEPARATE . (package_body . 0)) 
(PROCEDURE . (package_body . 0)) (PRIVATE . (package_body . 0)) (PRAGMA . 
(package_body . 0)) (PACKAGE . (package_ [...]
-      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (DOT .  90) (TICK .  91) (LOOP . 
(iterator_specification . 3)) (EQUAL_GREATER . (iterator_specification . 3)) 
(LEFT_PAREN .  107))
-      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
711))
+      ((default . error) (ELSE . (elsif_expression_item . 0)) (ELSIF . 
(elsif_expression_item . 0)) (RIGHT_PAREN . (elsif_expression_item . 0)) (COMMA 
. (elsif_expression_item . 0)))
+      ((default . error) (DOT .  90) (TICK .  91) (LOOP . 
(iterator_specification . 2)) (EQUAL_GREATER . (iterator_specification . 2)) 
(LEFT_PAREN .  107))
+      ((default . error) (DO . (subtype_indication . 0)) (COLON_EQUAL . 
(subtype_indication . 0)) (LOOP . (subtype_indication . 0)) (RIGHT_PAREN . 
(subtype_indication . 0)) (COMMA . (subtype_indication . 0)) (EQUAL_GREATER . 
(subtype_indication . 0)) (WITH . (subtype_indication . 0)) (AND . 
(subtype_indication . 0)) (OF . (subtype_indication . 0)) (SEMICOLON . 
(subtype_indication . 0)))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
716))
       ((default . error) (PROCEDURE . (protected_operation_item_list . 1)) 
(OVERRIDING . (protected_operation_item_list . 1)) (NOT . 
(protected_operation_item_list . 1)) (FUNCTION . (protected_operation_item_list 
. 1)) (FOR . (protected_operation_item_list . 1)) (ENTRY . 
(protected_operation_item_list . 1)) (END . (protected_operation_item_list . 
1)))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (IS . 
(aspect_specification_opt . 0)) (WITH .  109))
-      ((default . error) (WHEN . (parameter_profile_opt . 0)) (LEFT_PAREN .  
1212))
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (EXCEPTION . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt  [...]
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (EXCEPTION . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt  [...]
+      ((default . error) (WHEN . (parameter_profile_opt . 0)) (LEFT_PAREN .  
1209))
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (EXCEPTION . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt  [...]
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (EXCEPTION . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt  [...]
       ((default . error) (THEN . (accept_statement . 1)) (WHEN . 
(accept_statement . 1)) (EXCEPTION . (accept_statement . 1)) (ELSIF . 
(accept_statement . 1)) (ELSE . (accept_statement . 1)) (OR . (accept_statement 
. 1)) (END . (accept_statement . 1)) (ACCEPT . (accept_statement . 1)) (ABORT . 
(accept_statement . 1)) (BEGIN . (accept_statement . 1)) (CASE . 
(accept_statement . 1)) (DECLARE . (accept_statement . 1)) (DELAY . 
(accept_statement . 1)) (EXIT . (accept_statement . 1)) (FOR . ( [...]
       ((default . error) (OR . (block_statement . 1)) (THEN . (block_statement 
. 1)) (WHEN . (block_statement . 1)) (EXCEPTION . (block_statement . 1)) (END . 
(block_statement . 1)) (ACCEPT . (block_statement . 1)) (ABORT . 
(block_statement . 1)) (BEGIN . (block_statement . 1)) (CASE . (block_statement 
. 1)) (DECLARE . (block_statement . 1)) (DELAY . (block_statement . 1)) (EXIT . 
(block_statement . 1)) (FOR . (block_statement . 1)) (GOTO . (block_statement . 
1)) (IF . (block_statement . [...]
-      ((default . error) (CASE .  1209))
+      ((default . error) (CASE .  1206))
       ((default . error) (WHEN . (case_statement_alternative_list . 1)) (END . 
(case_statement_alternative_list . 1)))
-      ((default . error) (BAR .  285) (EQUAL_GREATER .  1208))
-      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
711))
+      ((default . error) (BAR .  286) (EQUAL_GREATER .  1205))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
716))
       ((default . error) (OR . (exit_statement . 0)) (THEN . (exit_statement . 
0)) (WHEN . (exit_statement . 0)) (EXCEPTION . (exit_statement . 0)) (END . 
(exit_statement . 0)) (ACCEPT . (exit_statement . 0)) (ABORT . (exit_statement 
. 0)) (BEGIN . (exit_statement . 0)) (CASE . (exit_statement . 0)) (DECLARE . 
(exit_statement . 0)) (DELAY . (exit_statement . 0)) (EXIT . (exit_statement . 
0)) (FOR . (exit_statement . 0)) (GOTO . (exit_statement . 0)) (IF . 
(exit_statement . 0)) (LOOP . (e [...]
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (ACCEPT . 
(label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . 
(label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) (LOOP . 
(label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . 
(label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . 
(label_opt . 0)) (GOTO . (label_opt . 0)) (NULL . (label_opt . 0)) (PRAGMA . 
(label_opt . 0)) (RAISE . (labe [...]
-      ((default . error) (THEN . (expression_opt . 0)) (RAISE .  149) (PLUS .  
151) (MINUS .  150) (ABS .  144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  
148) (NEW .  146) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL 
.  49) (LEFT_PAREN .  145))
-      ((default . error) (IF .  1204))
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (ACCEPT . 
(label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . 
(label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) (LOOP . 
(label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . 
(label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . 
(label_opt . 0)) (GOTO . (label_opt . 0)) (NULL . (label_opt . 0)) (PRAGMA . 
(label_opt . 0)) (RAISE . (labe [...]
+      ((default . error) (THEN . (expression_opt . 0)) (RAISE .  152) (PLUS .  
154) (MINUS .  153) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  
151) (NEW .  149) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL 
.  49) (LEFT_PAREN .  148))
+      ((default . error) (IF .  1201))
       ((default . error) (END . (elsif_statement_list . 0)) (ELSE . 
(elsif_statement_list . 0)) (ELSIF . (elsif_statement_list . 0)))
-      ((default . error) (END .  1202) (ELSE .  1201) (ELSIF .  1164))
-      ((default . error) (SEMICOLON .  1200))
+      ((default . error) (END .  1199) (ELSE .  1198) (ELSIF .  1161))
+      ((default . error) (SEMICOLON .  1197))
       ((default . error) (OR . (raise_statement . 1)) (THEN . (raise_statement 
. 1)) (WHEN . (raise_statement . 1)) (EXCEPTION . (raise_statement . 1)) (END . 
(raise_statement . 1)) (ACCEPT . (raise_statement . 1)) (ABORT . 
(raise_statement . 1)) (BEGIN . (raise_statement . 1)) (CASE . (raise_statement 
. 1)) (DECLARE . (raise_statement . 1)) (DELAY . (raise_statement . 1)) (EXIT . 
(raise_statement . 1)) (FOR . (raise_statement . 1)) (GOTO . (raise_statement . 
1)) (IF . (raise_statement . [...]
       ((default . error) (OR . (requeue_statement . 0)) (THEN . 
(requeue_statement . 0)) (WHEN . (requeue_statement . 0)) (EXCEPTION . 
(requeue_statement . 0)) (END . (requeue_statement . 0)) (ACCEPT . 
(requeue_statement . 0)) (ABORT . (requeue_statement . 0)) (BEGIN . 
(requeue_statement . 0)) (CASE . (requeue_statement . 0)) (DECLARE . 
(requeue_statement . 0)) (DELAY . (requeue_statement . 0)) (EXIT . 
(requeue_statement . 0)) (FOR . (requeue_statement . 0)) (GOTO . 
(requeue_statement .  [...]
-      ((default . error) (RETURN .  1199))
+      ((default . error) (RETURN .  1196))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (ACCESS . (null_exclusion_opt . 0)) (NOT .  883))
-      ((default . error) (END .  1195))
-      ((default . error) (SELECT .  1194))
+      ((default . error) (END .  1192))
+      ((default . error) (SELECT .  1191))
       ((default . error) (OR . (selective_accept . 1)) (THEN . 
(selective_accept . 1)) (WHEN . (selective_accept . 1)) (EXCEPTION . 
(selective_accept . 1)) (END . (selective_accept . 1)) (ACCEPT . 
(selective_accept . 1)) (ABORT . (selective_accept . 1)) (BEGIN . 
(selective_accept . 1)) (CASE . (selective_accept . 1)) (DECLARE . 
(selective_accept . 1)) (DELAY . (selective_accept . 1)) (EXIT . 
(selective_accept . 1)) (FOR . (selective_accept . 1)) (GOTO . 
(selective_accept . 1)) (IF . (sel [...]
-      ((default . error) (SELECT .  1193))
+      ((default . error) (SELECT .  1190))
       ((default . error) (END . (delay_alternative . 0)) (OR . 
(delay_alternative . 0)) (ELSE . (delay_alternative . 0)))
-      ((default . error) (SELECT .  1192))
-      ((default . error) (SEMICOLON .  1191))
-      ((default . error) (ELSE . (sequence_of_statements_opt . 0)) (OR . 
(sequence_of_statements_opt . 0)) (END . (sequence_of_statements_opt . 0)) 
(ACCEPT . (label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) 
(DECLARE . (label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) 
(LOOP . (label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) 
(WHILE . (label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) 
(EXIT . (label_opt . 0)) (GOTO . ( [...]
+      ((default . error) (SELECT .  1189))
+      ((default . error) (SEMICOLON .  1188))
+      ((default . error) (ELSE . (sequence_of_statements_opt . 0)) (OR . 
(sequence_of_statements_opt . 0)) (END . (sequence_of_statements_opt . 0)) 
(ACCEPT . (label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) 
(DECLARE . (label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) 
(LOOP . (label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) 
(WHILE . (label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) 
(EXIT . (label_opt . 0)) (GOTO . ( [...]
       ((default . error) (END . (select_alternative . 2)) (OR . 
(select_alternative . 2)) (ELSE . (select_alternative . 2)))
-      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
711))
-      ((default . error) (OTHERS .  950) (IDENTIFIER .  48) (CHARACTER_LITERAL 
.  50) (STRING_LITERAL .  49))
-      ((default . error) (WHEN . (sequence_of_statements_opt . 0)) (END . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt . 0)) [...]
-      ((default . error) (OTHERS .  950) (IDENTIFIER .  48) (CHARACTER_LITERAL 
.  50) (STRING_LITERAL .  49))
-      ((default . error) (BAR .  1183) (EQUAL_GREATER .  1289))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
716))
+      ((default . error) (OTHERS .  955) (IDENTIFIER .  48) (CHARACTER_LITERAL 
.  50) (STRING_LITERAL .  49))
+      ((default . error) (WHEN . (sequence_of_statements_opt . 0)) (END . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt . 0)) [...]
+      ((default . error) (OTHERS .  955) (IDENTIFIER .  48) (CHARACTER_LITERAL 
.  50) (STRING_LITERAL .  49))
+      ((default . error) (BAR .  1180) (EQUAL_GREATER .  1284))
       ((default . error) (WHEN . (exception_handler . 1)) (END . 
(exception_handler . 1)))
       ((default . error) (EQUAL_GREATER . (exception_choice_list . 1)) (BAR . 
(exception_choice_list . 1)))
-      ((default . error) (SEMICOLON .  1288))
+      ((default . error) (SEMICOLON .  1283))
       ((default . error) (ELSE . (select_alternative . 0)) (OR . 
(select_alternative . 0)) (END . (select_alternative . 0)))
       ((default . error) (ELSE . (select_alternative . 4)) (OR . 
(select_alternative . 4)) (END . (select_alternative . 4)))
-      ((default . error) (SEMICOLON .  1287))
-      ((default . error) (SEMICOLON .  1286))
-      ((default . error) (SEMICOLON .  1285))
-      ((default . error) (SELECT .  1284))
+      ((default . error) (SEMICOLON .  1282))
+      ((default . error) (SEMICOLON .  1281))
+      ((default . error) (SEMICOLON .  1280))
+      ((default . error) (SELECT .  1279))
       ((default . error) (DO . (return_subtype_indication . 1)) (SEMICOLON . 
(return_subtype_indication . 1)) (COLON_EQUAL . (return_subtype_indication . 
1)))
-      ((default . error) (DO . (extended_return_object_declaration . 1)) 
(SEMICOLON . (extended_return_object_declaration . 1)) (COLON_EQUAL .  1283))
+      ((default . error) (DO . (extended_return_object_declaration . 1)) 
(SEMICOLON . (extended_return_object_declaration . 1)) (COLON_EQUAL .  1278))
       ((default . error) (DO . (return_subtype_indication . 0)) (SEMICOLON . 
(return_subtype_indication . 0)) (COLON_EQUAL . (return_subtype_indication . 
0)))
-      ((default . error) (SEMICOLON .  1282))
+      ((default . error) (SEMICOLON .  1277))
       ((default . error) (WHEN . (loop_statement . 1)) (THEN . (loop_statement 
. 1)) (OR . (loop_statement . 1)) (ELSIF . (loop_statement . 1)) (ELSE . 
(loop_statement . 1)) (CHARACTER_LITERAL . (loop_statement . 1)) 
(STRING_LITERAL . (loop_statement . 1)) (IDENTIFIER . (loop_statement . 1)) 
(LESS_LESS . (loop_statement . 1)) (WHILE . (loop_statement . 1)) (SELECT . 
(loop_statement . 1)) (RETURN . (loop_statement . 1)) (REQUEUE . 
(loop_statement . 1)) (RAISE . (loop_statement . 1)) (PRAG [...]
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (ACCEPT . 
(label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . 
(label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) (LOOP . 
(label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . 
(label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . 
(label_opt . 0)) (GOTO . (label_opt . 0)) (NULL . (label_opt . 0)) (PRAGMA . 
(label_opt . 0)) (RAISE . (labe [...]
-      ((default . error) (IF .  1280))
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (ACCEPT . 
(label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . 
(label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) (LOOP . 
(label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . 
(label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . 
(label_opt . 0)) (GOTO . (label_opt . 0)) (NULL . (label_opt . 0)) (PRAGMA . 
(label_opt . 0)) (RAISE . (labe [...]
+      ((default . error) (IF .  1275))
       ((default . error) (ELSIF . (elsif_statement_list . 1)) (ELSE . 
(elsif_statement_list . 1)) (END . (elsif_statement_list . 1)))
-      ((default . error) (SEMICOLON .  1279))
-      ((default . error) (THEN .  1278))
-      ((default . error) (END .  1277))
-      ((default . error) (SEMICOLON .  1276))
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (WHEN . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt . 0)) [...]
       ((default . error) (SEMICOLON .  1274))
-      ((default . error) (END .  1273))
+      ((default . error) (THEN .  1273))
       ((default . error) (END .  1272))
-      ((default . error) (FOR .  1271) (IDENTIFIER .  77))
-      ((default . error) (WHEN .  1270))
-      ((default . error) (WHEN . (entry_body_formal_part . 1)))
+      ((default . error) (SEMICOLON .  1271))
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (WHEN . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt . 0)) [...]
       ((default . error) (SEMICOLON .  1269))
-      ((default . error) (DOT .  90) (TICK .  91) (LOOP . 
(iterator_specification . 2)) (EQUAL_GREATER . (iterator_specification . 2)) 
(LEFT_PAREN .  107))
-      ((default . error) (SEMICOLON .  1268))
-      ((default . error) (SEMICOLON .  1267))
-      ((default . error) (SEMICOLON .  1266))
-      ((default . error) (SEMICOLON .  1265))
+      ((default . error) (END .  1268))
+      ((default . error) (END .  1267))
+      ((default . error) (FOR .  1266) (IDENTIFIER .  77))
+      ((default . error) (WHEN .  1265))
+      ((default . error) (WHEN . (entry_body_formal_part . 1)))
+      ((default . error) (SEMICOLON .  1264))
+      ((default . error) (SEMICOLON .  1263))
+      ((default . error) (SEMICOLON .  1262))
+      ((default . error) (SEMICOLON .  1261))
+      ((default . error) (SEMICOLON .  1260))
       ((default . error) (BEGIN . (object_renaming_declaration . 0)) (ENTRY . 
(object_renaming_declaration . 0)) (FOR . (object_renaming_declaration . 0)) 
(FUNCTION . (object_renaming_declaration . 0)) (GENERIC . 
(object_renaming_declaration . 0)) (NOT . (object_renaming_declaration . 0)) 
(OVERRIDING . (object_renaming_declaration . 0)) (PACKAGE . 
(object_renaming_declaration . 0)) (PRAGMA . (object_renaming_declaration . 0)) 
(PROCEDURE . (object_renaming_declaration . 0)) (PROTECTED . ( [...]
       ((default . error) (BEGIN . (private_type_declaration . 0)) (ENTRY . 
(private_type_declaration . 0)) (FOR . (private_type_declaration . 0)) 
(FUNCTION . (private_type_declaration . 0)) (GENERIC . 
(private_type_declaration . 0)) (NOT . (private_type_declaration . 0)) 
(OVERRIDING . (private_type_declaration . 0)) (PACKAGE . 
(private_type_declaration . 0)) (PRAGMA . (private_type_declaration . 0)) 
(PROCEDURE . (private_type_declaration . 0)) (PROTECTED . 
(private_type_declaration . 0)) [...]
-      ((default . error) (WITH .  1264))
+      ((default . error) (WITH .  1259))
       ((default . error) (WITH . (constraint_opt . 1)) (SEMICOLON . 
(constraint_opt . 1)))
       ((default . error) (WITH . (derived_type_definition . 1)) (SEMICOLON . 
(derived_type_definition . 1)))
-      ((default . error) (WITH .  1263))
-      ((default . error) (WHEN .  1260))
+      ((default . error) (WITH .  1258))
+      ((default . error) (WHEN .  1255))
       ((default . error) (SEMICOLON . (record_definition . 0)) (WITH . 
(record_definition . 0)))
-      ((default . error) (COLON_EQUAL .  1258) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109))
+      ((default . error) (COLON_EQUAL .  1253) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109))
       ((default . error) (SEMICOLON . (type_definition . 1)) (WITH . 
(type_definition . 1)))
       ((default . error) (RIGHT_PAREN . (enumeration_literal_list . 1)) (COMMA 
. (enumeration_literal_list . 1)))
-      ((default . error) (DOT_DOT .  1257))
-      ((default . error) (WITH . (real_range_specification_opt . 0)) 
(SEMICOLON . (real_range_specification_opt . 0)) (RANGE .  1118))
+      ((default . error) (DOT_DOT .  1252))
+      ((default . error) (WITH . (real_range_specification_opt . 0)) 
(SEMICOLON . (real_range_specification_opt . 0)) (RANGE .  1114))
       ((default . error) (IDENTIFIER . (task_type_declaration . 1)) (USE . 
(task_type_declaration . 1)) (TYPE . (task_type_declaration . 1)) (TASK . 
(task_type_declaration . 1)) (SUBTYPE . (task_type_declaration . 1)) (PROTECTED 
. (task_type_declaration . 1)) (PROCEDURE . (task_type_declaration . 1)) 
(PRAGMA . (task_type_declaration . 1)) (PACKAGE . (task_type_declaration . 1)) 
(OVERRIDING . (task_type_declaration . 1)) (NOT . (task_type_declaration . 1)) 
(GENERIC . (task_type_declaratio [...]
-      ((default . error) (AND .  1072) (WITH .  1255))
-      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
711))
-      ((default . error) (SEMICOLON .  1253))
+      ((default . error) (AND .  1078) (WITH .  1250))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
716))
+      ((default . error) (SEMICOLON .  1248))
       ((default . error) (IDENTIFIER . (protected_type_declaration . 1)) (USE 
. (protected_type_declaration . 1)) (TYPE . (protected_type_declaration . 1)) 
(TASK . (protected_type_declaration . 1)) (SUBTYPE . 
(protected_type_declaration . 1)) (PROTECTED . (protected_type_declaration . 
1)) (PROCEDURE . (protected_type_declaration . 1)) (PRAGMA . 
(protected_type_declaration . 1)) (PACKAGE . (protected_type_declaration . 1)) 
(OVERRIDING . (protected_type_declaration . 1)) (NOT . (protected_ [...]
-      ((default . error) (AND .  1072) (WITH .  1252))
-      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
711))
-      ((default . error) (SEMICOLON .  1250))
-      ((default . error) (RANGE .  1249))
+      ((default . error) (AND .  1078) (WITH .  1247))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
716))
+      ((default . error) (SEMICOLON .  1245))
+      ((default . error) (RANGE .  1244))
       ((default . error) (SEMICOLON . (record_rep . 0)))
       ((default . error) (IDENTIFIER . (mod_clause_opt . 1)))
       ((default . error) (COLON_EQUAL . (component_definition . 2)) (SEMICOLON 
. (component_definition . 2)) (WITH . (component_definition . 2)))
       ((default . error) (COLON_EQUAL . (component_definition . 0)) (SEMICOLON 
. (component_definition . 0)) (WITH . (component_definition . 0)))
-      ((default . error) (RIGHT_PAREN . (subtype_indication . 1)) (COMMA . 
(subtype_indication . 1)) (DOT .  90) (TICK .  91) (BAR . (discrete_choice . 
1)) (EQUAL_GREATER . (discrete_choice . 1)) (RANGE .  851) (LEFT_PAREN .  824))
-      ((default . error) (ELSE . (elsif_expression_item . 0)) (ELSIF . 
(elsif_expression_item . 0)) (RIGHT_PAREN . (elsif_expression_item . 0)))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
+      ((default . error) (RIGHT_PAREN . (subtype_indication . 1)) (COMMA . 
(subtype_indication . 1)) (DOT .  90) (TICK .  91) (BAR . (discrete_choice . 
1)) (EQUAL_GREATER . (discrete_choice . 1)) (RANGE .  902) (LEFT_PAREN .  827))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
       ((default . error) (END . (single_protected_declaration . 0)) (PRIVATE . 
(single_protected_declaration . 0)) (IDENTIFIER . (single_protected_declaration 
. 0)) (USE . (single_protected_declaration . 0)) (TYPE . 
(single_protected_declaration . 0)) (TASK . (single_protected_declaration . 0)) 
(SUBTYPE . (single_protected_declaration . 0)) (PROTECTED . 
(single_protected_declaration . 0)) (PROCEDURE . (single_protected_declaration 
. 0)) (PRAGMA . (single_protected_declaration . 0)) (PACK [...]
       ((default . error) (SEMICOLON . (protected_definition . 0)))
-      ((default . error) (END . (declarative_part_opt . 0)) (PRIVATE . 
(declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  301) (PRAGMA .  7) (NOT .  
4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) (PROCEDURE . 
(overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt . 2)) (FOR . 
 298) (IDENTIFIER .  304) (TYPE .  303) (GENERIC .  2) (PROTECTED .  300) (TASK 
.  302) (PACKAGE .  299))
+      ((default . error) (END . (declarative_part_opt . 0)) (PRIVATE . 
(declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  302) (PRAGMA .  7) (NOT .  
4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) (PROCEDURE . 
(overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt . 2)) (FOR . 
 299) (IDENTIFIER .  305) (TYPE .  304) (GENERIC .  2) (PROTECTED .  301) (TASK 
.  303) (PACKAGE .  300))
       ((default . error) (END . (single_task_declaration . 0)) (PRIVATE . 
(single_task_declaration . 0)) (IDENTIFIER . (single_task_declaration . 0)) 
(USE . (single_task_declaration . 0)) (TYPE . (single_task_declaration . 0)) 
(TASK . (single_task_declaration . 0)) (SUBTYPE . (single_task_declaration . 
0)) (PROTECTED . (single_task_declaration . 0)) (PROCEDURE . 
(single_task_declaration . 0)) (PRAGMA . (single_task_declaration . 0)) 
(PACKAGE . (single_task_declaration . 0)) (OVERRIDING . [...]
       ((default . error) (SEMICOLON . (task_definition . 0)))
-      ((default . error) (END . (declarative_part_opt . 0)) (PRIVATE . 
(declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  301) (PRAGMA .  7) (NOT .  
4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) (PROCEDURE . 
(overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt . 2)) (FOR . 
 298) (IDENTIFIER .  304) (TYPE .  303) (GENERIC .  2) (PROTECTED .  300) (TASK 
.  302) (PACKAGE .  299))
+      ((default . error) (END . (declarative_part_opt . 0)) (PRIVATE . 
(declarative_part_opt . 0)) (USE .  11) (SUBTYPE .  302) (PRAGMA .  7) (NOT .  
4) (OVERRIDING .  5) (FUNCTION . (overriding_indicator_opt . 2)) (PROCEDURE . 
(overriding_indicator_opt . 2)) (ENTRY . (overriding_indicator_opt . 2)) (FOR . 
 299) (IDENTIFIER .  305) (TYPE .  304) (GENERIC .  2) (PROTECTED .  301) (TASK 
.  303) (PACKAGE .  300))
       ((default . error) (WITH . (type_definition . 5)) (SEMICOLON . 
(type_definition . 5)))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (SEMICOLON .  1306))
-      ((default . error) (EQUAL_GREATER . (discrete_choice_list . 0)) (BAR . 
(discrete_choice_list . 0)) (OTHERS .  175) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (PLUS .  151) (MINUS .  150) 
(ABS .  144) (NOT .  174) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(LEFT_PAREN .  145))
-      ((default . error) (END .  1303) (WHEN .  1260))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (SEMICOLON .  1301))
+      ((default . error) (EQUAL_GREATER . (discrete_choice_list . 0)) (BAR . 
(discrete_choice_list . 0)) (OTHERS .  182) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) 
(ABS .  144) (NOT .  181) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(LEFT_PAREN .  148))
+      ((default . error) (END .  1298) (WHEN .  1255))
       ((default . error) (END . (variant_list . 0)) (WHEN . (variant_list . 
0)))
-      ((default . error) (PRIVATE .  1302))
+      ((default . error) (PRIVATE .  1297))
       ((default . error) (RECORD .  866) (NULL .  864))
       ((default . error) (PRIVATE . (object_declaration . 2)) (END . 
(object_declaration . 2)) (BEGIN . (object_declaration . 2)) (ENTRY . 
(object_declaration . 2)) (FOR . (object_declaration . 2)) (FUNCTION . 
(object_declaration . 2)) (GENERIC . (object_declaration . 2)) (NOT . 
(object_declaration . 2)) (OVERRIDING . (object_declaration . 2)) (PACKAGE . 
(object_declaration . 2)) (PRAGMA . (object_declaration . 2)) (PROCEDURE . 
(object_declaration . 2)) (PROTECTED . (object_declaration . [...]
       ((default . error) (PRIVATE . (object_declaration . 4)) (END . 
(object_declaration . 4)) (BEGIN . (object_declaration . 4)) (ENTRY . 
(object_declaration . 4)) (FOR . (object_declaration . 4)) (FUNCTION . 
(object_declaration . 4)) (GENERIC . (object_declaration . 4)) (NOT . 
(object_declaration . 4)) (OVERRIDING . (object_declaration . 4)) (PACKAGE . 
(object_declaration . 4)) (PRAGMA . (object_declaration . 4)) (PROCEDURE . 
(object_declaration . 4)) (PROTECTED . (object_declaration . [...]
       ((default . error) (PRIVATE . (object_declaration . 0)) (END . 
(object_declaration . 0)) (BEGIN . (object_declaration . 0)) (ENTRY . 
(object_declaration . 0)) (FOR . (object_declaration . 0)) (FUNCTION . 
(object_declaration . 0)) (GENERIC . (object_declaration . 0)) (NOT . 
(object_declaration . 0)) (OVERRIDING . (object_declaration . 0)) (PACKAGE . 
(object_declaration . 0)) (PRAGMA . (object_declaration . 0)) (PROCEDURE . 
(object_declaration . 0)) (PROTECTED . (object_declaration . [...]
       ((default . error) (PRIVATE . (entry_declaration . 0)) (END . 
(entry_declaration . 0)) (BEGIN . (entry_declaration . 0)) (ENTRY . 
(entry_declaration . 0)) (FOR . (entry_declaration . 0)) (FUNCTION . 
(entry_declaration . 0)) (GENERIC . (entry_declaration . 0)) (NOT . 
(entry_declaration . 0)) (OVERRIDING . (entry_declaration . 0)) (PACKAGE . 
(entry_declaration . 0)) (PRAGMA . (entry_declaration . 0)) (PROCEDURE . 
(entry_declaration . 0)) (PROTECTED . (entry_declaration . 0)) (SUBTYPE [...]
       ((default . error) (PRIVATE . (protected_body . 0)) (END . 
(protected_body . 0)) (BEGIN . (protected_body . 0)) (ENTRY . (protected_body . 
0)) (FOR . (protected_body . 0)) (FUNCTION . (protected_body . 0)) (GENERIC . 
(protected_body . 0)) (NOT . (protected_body . 0)) (OVERRIDING . 
(protected_body . 0)) (PACKAGE . (protected_body . 0)) (PRAGMA . 
(protected_body . 0)) (PROCEDURE . (protected_body . 0)) (PROTECTED . 
(protected_body . 0)) (SUBTYPE . (protected_body . 0)) (TASK . (prote [...]
-      ((default . error) (IS . (expression_opt . 0)) (RAISE .  149) (PLUS .  
151) (MINUS .  150) (ABS .  144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  
148) (NEW .  146) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL 
.  49) (LEFT_PAREN .  145))
-      ((default . error) (IDENTIFIER .  1299))
-      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
711))
-      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
711))
+      ((default . error) (IS . (expression_opt . 0)) (RAISE .  152) (PLUS .  
154) (MINUS .  153) (ABS .  144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  
151) (NEW .  149) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL 
.  49) (LEFT_PAREN .  148))
+      ((default . error) (IDENTIFIER .  1294))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
716))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
716))
       ((default . error) (OR . (case_statement . 0)) (THEN . (case_statement . 
0)) (WHEN . (case_statement . 0)) (EXCEPTION . (case_statement . 0)) (END . 
(case_statement . 0)) (ACCEPT . (case_statement . 0)) (ABORT . (case_statement 
. 0)) (BEGIN . (case_statement . 0)) (CASE . (case_statement . 0)) (DECLARE . 
(case_statement . 0)) (DELAY . (case_statement . 0)) (EXIT . (case_statement . 
0)) (FOR . (case_statement . 0)) (GOTO . (case_statement . 0)) (IF . 
(case_statement . 0)) (LOOP . (c [...]
       ((default . error) (END . (case_statement_alternative . 0)) (WHEN . 
(case_statement_alternative . 0)))
       ((default . error) (OR . (block_statement . 0)) (THEN . (block_statement 
. 0)) (WHEN . (block_statement . 0)) (EXCEPTION . (block_statement . 0)) (END . 
(block_statement . 0)) (ACCEPT . (block_statement . 0)) (ABORT . 
(block_statement . 0)) (BEGIN . (block_statement . 0)) (CASE . (block_statement 
. 0)) (DECLARE . (block_statement . 0)) (DELAY . (block_statement . 0)) (EXIT . 
(block_statement . 0)) (FOR . (block_statement . 0)) (GOTO . (block_statement . 
0)) (IF . (block_statement . [...]
-      ((default . error) (IF .  1296))
-      ((default . error) (ELSE . (sequence_of_statements_opt . 0)) (ELSIF . 
(sequence_of_statements_opt . 0)) (END . (sequence_of_statements_opt . 0)) 
(ACCEPT . (label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) 
(DECLARE . (label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) 
(LOOP . (label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) 
(WHILE . (label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) 
(EXIT . (label_opt . 0)) (GOTO  [...]
+      ((default . error) (IF .  1291))
+      ((default . error) (ELSE . (sequence_of_statements_opt . 0)) (ELSIF . 
(sequence_of_statements_opt . 0)) (END . (sequence_of_statements_opt . 0)) 
(ACCEPT . (label_opt . 0)) (BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) 
(DECLARE . (label_opt . 0)) (FOR . (label_opt . 0)) (IF . (label_opt . 0)) 
(LOOP . (label_opt . 0)) (RETURN . (label_opt . 0)) (SELECT . (label_opt . 0)) 
(WHILE . (label_opt . 0)) (ABORT . (label_opt . 0)) (DELAY . (label_opt . 0)) 
(EXIT . (label_opt . 0)) (GOTO  [...]
       ((default . error) (OR . (if_statement . 3)) (THEN . (if_statement . 3)) 
(WHEN . (if_statement . 3)) (EXCEPTION . (if_statement . 3)) (END . 
(if_statement . 3)) (ACCEPT . (if_statement . 3)) (ABORT . (if_statement . 3)) 
(BEGIN . (if_statement . 3)) (CASE . (if_statement . 3)) (DECLARE . 
(if_statement . 3)) (DELAY . (if_statement . 3)) (EXIT . (if_statement . 3)) 
(FOR . (if_statement . 3)) (GOTO . (if_statement . 3)) (IF . (if_statement . 
3)) (LOOP . (if_statement . 3)) (NULL . (if_ [...]
-      ((default . error) (SEMICOLON .  1294))
-      ((default . error) (END .  1293))
+      ((default . error) (SEMICOLON .  1289))
+      ((default . error) (END .  1288))
       ((default . error) (OR . (extended_return_statement . 0)) (THEN . 
(extended_return_statement . 0)) (WHEN . (extended_return_statement . 0)) 
(EXCEPTION . (extended_return_statement . 0)) (END . (extended_return_statement 
. 0)) (ACCEPT . (extended_return_statement . 0)) (ABORT . 
(extended_return_statement . 0)) (BEGIN . (extended_return_statement . 0)) 
(CASE . (extended_return_statement . 0)) (DECLARE . (extended_return_statement 
. 0)) (DELAY . (extended_return_statement . 0)) (EXIT  [...]
-      ((default . error) (RAISE .  149) (PLUS .  151) (MINUS .  150) (ABS .  
144) (NOT .  147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  145))
-      ((default . error) (SEMICOLON .  1291))
+      ((default . error) (RAISE .  152) (PLUS .  154) (MINUS .  153) (ABS .  
144) (NOT .  150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (SEMICOLON .  1286))
       ((default . error) (OR . (selective_accept . 0)) (THEN . 
(selective_accept . 0)) (WHEN . (selective_accept . 0)) (EXCEPTION . 
(selective_accept . 0)) (END . (selective_accept . 0)) (ACCEPT . 
(selective_accept . 0)) (ABORT . (selective_accept . 0)) (BEGIN . 
(selective_accept . 0)) (CASE . (selective_accept . 0)) (DECLARE . 
(selective_accept . 0)) (DELAY . (selective_accept . 0)) (EXIT . 
(selective_accept . 0)) (FOR . (selective_accept . 0)) (GOTO . 
(selective_accept . 0)) (IF . (sel [...]
       ((default . error) (OR . (conditional_entry_call . 0)) (THEN . 
(conditional_entry_call . 0)) (WHEN . (conditional_entry_call . 0)) (EXCEPTION 
. (conditional_entry_call . 0)) (END . (conditional_entry_call . 0)) (ACCEPT . 
(conditional_entry_call . 0)) (ABORT . (conditional_entry_call . 0)) (BEGIN . 
(conditional_entry_call . 0)) (CASE . (conditional_entry_call . 0)) (DECLARE . 
(conditional_entry_call . 0)) (DELAY . (conditional_entry_call . 0)) (EXIT . 
(conditional_entry_call . 0)) ( [...]
       ((default . error) (OR . (timed_entry_call . 0)) (THEN . 
(timed_entry_call . 0)) (WHEN . (timed_entry_call . 0)) (EXCEPTION . 
(timed_entry_call . 0)) (END . (timed_entry_call . 0)) (ACCEPT . 
(timed_entry_call . 0)) (ABORT . (timed_entry_call . 0)) (BEGIN . 
(timed_entry_call . 0)) (CASE . (timed_entry_call . 0)) (DECLARE . 
(timed_entry_call . 0)) (DELAY . (timed_entry_call . 0)) (EXIT . 
(timed_entry_call . 0)) (FOR . (timed_entry_call . 0)) (GOTO . 
(timed_entry_call . 0)) (IF . (tim [...]
       ((default . error) (OR . (loop_statement . 0)) (THEN . (loop_statement . 
0)) (WHEN . (loop_statement . 0)) (EXCEPTION . (loop_statement . 0)) (END . 
(loop_statement . 0)) (ACCEPT . (loop_statement . 0)) (ABORT . (loop_statement 
. 0)) (BEGIN . (loop_statement . 0)) (CASE . (loop_statement . 0)) (DECLARE . 
(loop_statement . 0)) (DELAY . (loop_statement . 0)) (EXIT . (loop_statement . 
0)) (FOR . (loop_statement . 0)) (GOTO . (loop_statement . 0)) (IF . 
(loop_statement . 0)) (LOOP . (l [...]
-      ((default . error) (WHEN . (sequence_of_statements_opt . 0)) (END . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt . 0)) [...]
+      ((default . error) (WHEN . (sequence_of_statements_opt . 0)) (END . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt . 0)) [...]
       ((default . error) (WHEN . (exception_handler . 0)) (END . 
(exception_handler . 0)))
       ((default . error) (WHEN . (asynchronous_select . 0)) (THEN . 
(asynchronous_select . 0)) (OR . (asynchronous_select . 0)) (ELSIF . 
(asynchronous_select . 0)) (ELSE . (asynchronous_select . 0)) 
(CHARACTER_LITERAL . (asynchronous_select . 0)) (STRING_LITERAL . 
(asynchronous_select . 0)) (IDENTIFIER . (asynchronous_select . 0)) (LESS_LESS 
. (asynchronous_select . 0)) (WHILE . (asynchronous_select . 0)) (SELECT . 
(asynchronous_select . 0)) (RETURN . (asynchronous_select . 0)) (REQUEUE  [...]
       ((default . error) (DO . (extended_return_object_declaration . 0)) 
(SEMICOLON . (extended_return_object_declaration . 0)))
-      ((default . error) (IF .  1324))
+      ((default . error) (IF .  1319))
       ((default . error) (WHEN . (if_statement . 1)) (THEN . (if_statement . 
1)) (OR . (if_statement . 1)) (ELSIF . (if_statement . 1)) (ELSE . 
(if_statement . 1)) (CHARACTER_LITERAL . (if_statement . 1)) (STRING_LITERAL . 
(if_statement . 1)) (IDENTIFIER . (if_statement . 1)) (LESS_LESS . 
(if_statement . 1)) (WHILE . (if_statement . 1)) (SELECT . (if_statement . 1)) 
(RETURN . (if_statement . 1)) (REQUEUE . (if_statement . 1)) (RAISE . 
(if_statement . 1)) (PRAGMA . (if_statement . 1)) (NU [...]
       ((default . error) (ELSE . (elsif_statement_item . 0)) (ELSIF . 
(elsif_statement_item . 0)) (END . (elsif_statement_item . 0)))
-      ((default . error) (SEMICOLON .  1323))
-      ((default . error) (SEMICOLON .  1322))
-      ((default . error) (SEMICOLON .  1321))
-      ((default . error) (IN .  1320))
-      ((default . error) (IS .  1319))
+      ((default . error) (SEMICOLON .  1318))
+      ((default . error) (SEMICOLON .  1317))
+      ((default . error) (SEMICOLON .  1316))
+      ((default . error) (IN .  1315))
+      ((default . error) (IS .  1314))
       ((default . error) (WITH . (derived_type_definition . 0)) (SEMICOLON . 
(derived_type_definition . 0)))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
-      ((default . error) (CASE .  1317))
+      ((default . error) (CASE .  1312))
       ((default . error) (WHEN . (variant_list . 1)) (END . (variant_list . 
1)))
-      ((default . error) (BAR .  285) (EQUAL_GREATER .  1316))
+      ((default . error) (BAR .  286) (EQUAL_GREATER .  1311))
       ((default . error) (WHEN . (component_declaration . 1)) (END . 
(component_declaration . 1)) (CASE . (component_declaration . 1)) (FOR . 
(component_declaration . 1)) (IDENTIFIER . (component_declaration . 1)))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
       ((default . error) (SEMICOLON . (real_range_specification_opt . 1)) 
(WITH . (real_range_specification_opt . 1)))
-      ((default . error) (SEMICOLON .  1314))
-      ((default . error) (SEMICOLON .  1313))
-      ((default . error) (DOT_DOT .  1312))
-      ((default . error) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  
147) (NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  145))
+      ((default . error) (SEMICOLON .  1309))
+      ((default . error) (SEMICOLON .  1308))
+      ((default . error) (DOT_DOT .  1307))
+      ((default . error) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  
150) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN .  148))
       ((default . error) (PRIVATE . (protected_type_declaration . 0)) (END . 
(protected_type_declaration . 0)) (BEGIN . (protected_type_declaration . 0)) 
(ENTRY . (protected_type_declaration . 0)) (FOR . (protected_type_declaration . 
0)) (FUNCTION . (protected_type_declaration . 0)) (GENERIC . 
(protected_type_declaration . 0)) (NOT . (protected_type_declaration . 0)) 
(OVERRIDING . (protected_type_declaration . 0)) (PACKAGE . 
(protected_type_declaration . 0)) (PRAGMA . (protected_type_dec [...]
       ((default . error) (PRIVATE . (task_type_declaration . 0)) (END . 
(task_type_declaration . 0)) (BEGIN . (task_type_declaration . 0)) (ENTRY . 
(task_type_declaration . 0)) (FOR . (task_type_declaration . 0)) (FUNCTION . 
(task_type_declaration . 0)) (GENERIC . (task_type_declaration . 0)) (NOT . 
(task_type_declaration . 0)) (OVERRIDING . (task_type_declaration . 0)) 
(PACKAGE . (task_type_declaration . 0)) (PRAGMA . (task_type_declaration . 0)) 
(PROCEDURE . (task_type_declaration . 0) [...]
-      ((default . error) (SEMICOLON .  1331))
-      ((default . error) (END . (component_list_opt . 0)) (WHEN . 
(component_list_opt . 0)) (NULL .  1023) (CASE .  1022) (IDENTIFIER .  77) (FOR 
.  298))
-      ((default . error) (SEMICOLON .  1329))
-      ((default . error) (SEMICOLON .  1328))
-      ((default . error) (BEGIN . (declarative_part_opt . 0)) (USE .  11) 
(SUBTYPE .  301) (PRAGMA .  7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(ENTRY . (overriding_indicator_opt . 2)) (FOR .  298) (IDENTIFIER .  304) (TYPE 
.  303) (GENERIC .  2) (PROTECTED .  300) (TASK .  302) (PACKAGE .  299))
-      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  151) (MINUS .  150) (ABS .  144) (NOT .  769) 
(NUMERIC_LITERAL .  152) (NULL .  148) (NEW .  146) (LEFT_PAREN .  145))
+      ((default . error) (SEMICOLON .  1326))
+      ((default . error) (END . (component_list_opt . 0)) (WHEN . 
(component_list_opt . 0)) (NULL .  1031) (CASE .  1030) (IDENTIFIER .  77) (FOR 
.  299))
+      ((default . error) (SEMICOLON .  1324))
+      ((default . error) (SEMICOLON .  1323))
+      ((default . error) (BEGIN . (declarative_part_opt . 0)) (USE .  11) 
(SUBTYPE .  302) (PRAGMA .  7) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(ENTRY . (overriding_indicator_opt . 2)) (FOR .  299) (IDENTIFIER .  305) (TYPE 
.  304) (GENERIC .  2) (PROTECTED .  301) (TASK .  303) (PACKAGE .  300))
+      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  734) 
(NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (LEFT_PAREN .  148))
       ((default . error) (PRIVATE . (task_body . 0)) (END . (task_body . 0)) 
(BEGIN . (task_body . 0)) (ENTRY . (task_body . 0)) (FOR . (task_body . 0)) 
(FUNCTION . (task_body . 0)) (GENERIC . (task_body . 0)) (NOT . (task_body . 
0)) (OVERRIDING . (task_body . 0)) (PACKAGE . (task_body . 0)) (PRAGMA . 
(task_body . 0)) (PROCEDURE . (task_body . 0)) (PROTECTED . (task_body . 0)) 
(SUBTYPE . (task_body . 0)) (TASK . (task_body . 0)) (TYPE . (task_body . 0)) 
(USE . (task_body . 0)) (IDENTIFIE [...]
       ((default . error) (THEN . (accept_statement . 0)) (WHEN . 
(accept_statement . 0)) (EXCEPTION . (accept_statement . 0)) (ELSIF . 
(accept_statement . 0)) (ELSE . (accept_statement . 0)) (OR . (accept_statement 
. 0)) (END . (accept_statement . 0)) (ACCEPT . (accept_statement . 0)) (ABORT . 
(accept_statement . 0)) (BEGIN . (accept_statement . 0)) (CASE . 
(accept_statement . 0)) (DECLARE . (accept_statement . 0)) (DELAY . 
(accept_statement . 0)) (EXIT . (accept_statement . 0)) (FOR . ( [...]
       ((default . error) (OR . (if_statement . 2)) (THEN . (if_statement . 2)) 
(WHEN . (if_statement . 2)) (EXCEPTION . (if_statement . 2)) (END . 
(if_statement . 2)) (ACCEPT . (if_statement . 2)) (ABORT . (if_statement . 2)) 
(BEGIN . (if_statement . 2)) (CASE . (if_statement . 2)) (DECLARE . 
(if_statement . 2)) (DELAY . (if_statement . 2)) (EXIT . (if_statement . 2)) 
(FOR . (if_statement . 2)) (GOTO . (if_statement . 2)) (IF . (if_statement . 
2)) (LOOP . (if_statement . 2)) (NULL . (if_ [...]
-      ((default . error) (SEMICOLON .  1325))
+      ((default . error) (SEMICOLON .  1320))
       ((default . error) (WHEN . (if_statement . 0)) (THEN . (if_statement . 
0)) (OR . (if_statement . 0)) (ELSIF . (if_statement . 0)) (ELSE . 
(if_statement . 0)) (CHARACTER_LITERAL . (if_statement . 0)) (STRING_LITERAL . 
(if_statement . 0)) (IDENTIFIER . (if_statement . 0)) (LESS_LESS . 
(if_statement . 0)) (WHILE . (if_statement . 0)) (SELECT . (if_statement . 0)) 
(RETURN . (if_statement . 0)) (REQUEUE . (if_statement . 0)) (RAISE . 
(if_statement . 0)) (PRAGMA . (if_statement . 0)) (NU [...]
-      ((default . error) (RIGHT_PAREN .  1335))
-      ((default . error) (BEGIN .  1334))
+      ((default . error) (RIGHT_PAREN .  1330))
+      ((default . error) (BEGIN .  1329))
       ((default . error) (BEGIN . (private_extension_declaration . 0)) (ENTRY 
. (private_extension_declaration . 0)) (FOR . (private_extension_declaration . 
0)) (FUNCTION . (private_extension_declaration . 0)) (GENERIC . 
(private_extension_declaration . 0)) (NOT . (private_extension_declaration . 
0)) (OVERRIDING . (private_extension_declaration . 0)) (PACKAGE . 
(private_extension_declaration . 0)) (PRAGMA . (private_extension_declaration . 
0)) (PROCEDURE . (private_extension_declaration  [...]
       ((default . error) (WHEN . (variant_part . 0)) (END . (variant_part . 
0)) (CASE . (variant_part . 0)) (FOR . (variant_part . 0)) (IDENTIFIER . 
(variant_part . 0)))
       ((default . error) (END . (variant . 0)) (WHEN . (variant . 0)))
       ((default . error) (WHEN . (component_declaration . 0)) (END . 
(component_declaration . 0)) (CASE . (component_declaration . 0)) (FOR . 
(component_declaration . 0)) (IDENTIFIER . (component_declaration . 0)))
-      ((default . error) (SEMICOLON .  1333))
+      ((default . error) (SEMICOLON .  1328))
       ((default . error) (END . (component_clause . 0)) (IDENTIFIER . 
(component_clause . 0)))
-      ((default . error) (END . (sequence_of_statements_opt . 0)) (EXCEPTION . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt  [...]
-      ((default . error) (WHEN . (parameter_profile_opt . 0)) (LEFT_PAREN .  
798))
+      ((default . error) (END . (sequence_of_statements_opt . 0)) (EXCEPTION . 
(sequence_of_statements_opt . 0)) (ACCEPT . (label_opt . 0)) (BEGIN . 
(label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) (FOR . 
(label_opt . 0)) (IF . (label_opt . 0)) (LOOP . (label_opt . 0)) (RETURN . 
(label_opt . 0)) (SELECT . (label_opt . 0)) (WHILE . (label_opt . 0)) (ABORT . 
(label_opt . 0)) (DELAY . (label_opt . 0)) (EXIT . (label_opt . 0)) (GOTO . 
(label_opt . 0)) (NULL . (label_opt  [...]
+      ((default . error) (WHEN . (parameter_profile_opt . 0)) (LEFT_PAREN .  
808))
       ((default . error) (WHEN . (entry_body_formal_part . 0)))
-      ((default . error) (END .  1338))
-      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
711))
-      ((default . error) (SEMICOLON .  1340))
+      ((default . error) (END .  1333))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
716))
+      ((default . error) (SEMICOLON .  1335))
       ((default . error) (PROCEDURE . (entry_body . 0)) (OVERRIDING . 
(entry_body . 0)) (NOT . (entry_body . 0)) (FUNCTION . (entry_body . 0)) (FOR . 
(entry_body . 0)) (ENTRY . (entry_body . 0)) (END . (entry_body . 0)))]
      [((compilation_unit . 13)(compilation_unit_list . 14)(context_item . 
15)(function_specification . 16)(generic_declaration . 17)(generic_formal_part 
. 18)(generic_instantiation . 19)(generic_package_declaration . 
20)(generic_renaming_declaration . 21)(generic_subprogram_declaration . 
22)(library_item . 23)(library_unit_declaration . 
24)(library_unit_renaming_declaration . 25)(overriding_indicator_opt . 
26)(package_body . 27)(package_declaration . 28)(package_renaming_declaration . 
29 [...]
       ((attribute_reference . 51)(name . 87)(qualified_expression . 
54)(selected_component . 55))
@@ -3233,31 +3238,31 @@
       nil
       nil
       ((actual_parameter_part . 92)(formal_part . 
93)(parameter_and_result_profile . 94))
-      ((aggregate . 154)(association_opt . 177)(association_list . 
194)(attribute_reference . 51)(choice_expression . 
179)(choice_relation_and_list . 180)(choice_relation_or_list . 
181)(choice_relation_xor_list . 182)(choice_relation_and_then_list . 
183)(choice_relation_or_else_list . 184)(choice_relation . 185)(discrete_choice 
. 186)(discrete_choice_list . 187)(expression . 188)(expression_opt . 
189)(factor . 156)(identifier_list . 229)(name . 190)(parameter_specification . 
230)(paramet [...]
-      ((access_definition . 226)(null_exclusion_opt . 227))
+      ((aggregate . 157)(association_opt . 184)(association_list . 
201)(attribute_reference . 51)(case_expression . 158)(choice_expression . 
186)(choice_relation_and_list . 187)(choice_relation_or_list . 
188)(choice_relation_xor_list . 189)(choice_relation_and_then_list . 
190)(choice_relation_or_else_list . 191)(choice_relation . 
192)(conditional_quantified_expression . 202)(discrete_choice . 
193)(discrete_choice_list . 194)(expression . 195)(expression_opt . 196)(factor 
. 161)(identifie [...]
+      ((access_definition . 233)(null_exclusion_opt . 234))
       nil
-      ((aggregate . 218)(attribute_reference . 51)(attribute_designator . 
219)(name . 220)(qualified_expression . 54)(selected_component . 55))
+      ((aggregate . 225)(attribute_reference . 51)(attribute_designator . 
226)(name . 227)(qualified_expression . 54)(selected_component . 55))
       nil
       nil
       nil
-      ((mode_opt . 211))
+      ((mode_opt . 219))
       nil
       nil
-      ((attribute_reference . 51)(name . 207)(qualified_expression . 
54)(selected_component . 55))
-      ((aspect_specification_opt . 206))
-      ((discriminant_part_opt . 204))
+      ((attribute_reference . 51)(name . 215)(qualified_expression . 
54)(selected_component . 55))
+      ((aspect_specification_opt . 214))
+      ((discriminant_part_opt . 212))
       ((actual_parameter_part . 92))
       ((actual_parameter_part . 92))
       ((actual_parameter_part . 92))
       nil
-      ((attribute_reference . 51)(name_list . 198)(name . 
53)(qualified_expression . 54)(selected_component . 55))
+      ((attribute_reference . 51)(name_list . 206)(name . 
53)(qualified_expression . 54)(selected_component . 55))
       nil
-      ((aggregate . 154)(association_opt . 177)(association_list . 
194)(attribute_reference . 51)(choice_expression . 
179)(choice_relation_and_list . 180)(choice_relation_or_list . 
181)(choice_relation_xor_list . 182)(choice_relation_and_then_list . 
183)(choice_relation_or_else_list . 184)(choice_relation . 185)(discrete_choice 
. 186)(discrete_choice_list . 187)(expression . 188)(expression_opt . 
189)(factor . 156)(name . 190)(primary . 160)(qualified_expression . 
54)(raise_expression .  [...]
-      ((attribute_reference . 51)(name . 193)(qualified_expression . 
54)(selected_component . 55))
-      ((aggregate . 154)(association_opt . 177)(association_list . 
178)(attribute_reference . 51)(choice_expression . 
179)(choice_relation_and_list . 180)(choice_relation_or_list . 
181)(choice_relation_xor_list . 182)(choice_relation_and_then_list . 
183)(choice_relation_or_else_list . 184)(choice_relation . 185)(discrete_choice 
. 186)(discrete_choice_list . 187)(expression . 188)(expression_opt . 
189)(factor . 156)(name . 190)(primary . 160)(qualified_expression . 
54)(raise_expression .  [...]
+      ((aggregate . 157)(association_opt . 184)(association_list . 
201)(attribute_reference . 51)(case_expression . 158)(choice_expression . 
186)(choice_relation_and_list . 187)(choice_relation_or_list . 
188)(choice_relation_xor_list . 189)(choice_relation_and_then_list . 
190)(choice_relation_or_else_list . 191)(choice_relation . 
192)(conditional_quantified_expression . 202)(discrete_choice . 
193)(discrete_choice_list . 194)(expression . 195)(expression_opt . 196)(factor 
. 161)(if_expres [...]
+      ((attribute_reference . 51)(name . 200)(qualified_expression . 
54)(selected_component . 55))
+      ((aggregate . 157)(association_opt . 184)(association_list . 
185)(attribute_reference . 51)(choice_expression . 
186)(choice_relation_and_list . 187)(choice_relation_or_list . 
188)(choice_relation_xor_list . 189)(choice_relation_and_then_list . 
190)(choice_relation_or_else_list . 191)(choice_relation . 192)(discrete_choice 
. 193)(discrete_choice_list . 194)(expression . 195)(expression_opt . 
196)(factor . 161)(name . 197)(primary . 166)(qualified_expression . 
54)(raise_expression .  [...]
       nil
-      ((actual_parameter_part . 92)(aspect_specification_opt . 172))
-      ((aggregate . 154)(attribute_reference . 51)(expression . 155)(factor . 
156)(name . 157)(pragma_argument_association . 
158)(pragma_argument_association_list . 159)(primary . 
160)(qualified_expression . 54)(raise_expression . 161)(relation_and_list . 
162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((actual_parameter_part . 92)(aspect_specification_opt . 179))
+      ((aggregate . 157)(attribute_reference . 51)(case_expression . 
158)(conditional_quantified_expression . 159)(expression . 160)(factor . 
161)(if_expression . 162)(name . 163)(pragma_argument_association . 
164)(pragma_argument_association_list . 165)(primary . 
166)(qualified_expression . 54)(quantified_expression . 167)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation  [...]
       nil
       ((aspect_specification_opt . 143))
       nil
@@ -3279,22 +3284,28 @@
       ((actual_parameter_part . 92)(formal_part . 
93)(parameter_and_result_profile . 94))
       nil
       nil
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 310)(declarations . 
311)(declarative_part_opt . 391)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(gen [...]
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 397)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(gen [...]
       nil
-      ((actual_parameter_part . 92)(aspect_specification_opt . 390))
+      ((actual_parameter_part . 92)(aspect_specification_opt . 396))
       nil
       nil
       nil
       ((actual_parameter_part . 92))
-      ((function_specification . 16)(overriding_indicator_opt . 
387)(package_body . 327)(procedure_specification . 32)(proper_body . 
388)(protected_body . 335)(subprogram_body . 342)(task_body . 347))
+      ((function_specification . 16)(overriding_indicator_opt . 
393)(package_body . 328)(procedure_specification . 32)(proper_body . 
394)(protected_body . 336)(subprogram_body . 343)(task_body . 348))
+      nil
       nil
+      ((aggregate . 157)(attribute_reference . 51)(name . 163)(primary . 
389)(qualified_expression . 54)(selected_component . 55))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 388)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((quantifier . 387))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 384)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aggregate . 157)(association_opt . 184)(association_list . 
381)(attribute_reference . 51)(case_expression . 158)(choice_expression . 
186)(choice_relation_and_list . 187)(choice_relation_or_list . 
188)(choice_relation_xor_list . 189)(choice_relation_and_then_list . 
190)(choice_relation_or_else_list . 191)(choice_relation . 
192)(conditional_quantified_expression . 382)(discrete_choice . 
193)(discrete_choice_list . 194)(expression . 383)(expression_opt . 196)(factor 
. 161)(if_expres [...]
+      ((attribute_reference . 51)(name . 379)(qualified_expression . 
54)(selected_component . 55))
+      ((aggregate . 157)(attribute_reference . 51)(name . 163)(primary . 
298)(qualified_expression . 54)(selected_component . 55))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(name . 157)(primary . 
383)(qualified_expression . 54)(selected_component . 55))
-      ((aggregate . 154)(association_opt . 177)(association_list . 
242)(attribute_reference . 51)(case_expression . 380)(choice_expression . 
179)(choice_relation_and_list . 180)(choice_relation_or_list . 
181)(choice_relation_xor_list . 182)(choice_relation_and_then_list . 
183)(choice_relation_or_else_list . 184)(choice_relation . 185)(discrete_choice 
. 186)(discrete_choice_list . 187)(expression . 244)(expression_opt . 
189)(factor . 156)(if_expression . 381)(name . 190)(primary . 160)(qu [...]
       ((attribute_reference . 51)(name . 378)(qualified_expression . 
54)(selected_component . 55))
-      ((aggregate . 154)(attribute_reference . 51)(name . 157)(primary . 
297)(qualified_expression . 54)(selected_component . 55))
       nil
-      ((attribute_reference . 51)(name . 377)(qualified_expression . 
54)(selected_component . 55))
+      nil
+      nil
       nil
       nil
       nil
@@ -3313,13 +3324,14 @@
       nil
       nil
       nil
-      ((relational_operator . 363))
-      ((multiplying_operator . 362))
-      ((binary_adding_operator . 357))
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(selected_component . 55)(term . 
169)(term_list . 353))
       nil
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 310)(declarations . 
311)(declarative_part_opt . 312)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(gen [...]
-      ((aggregate . 154)(attribute_reference . 51)(name . 157)(primary . 
297)(qualified_expression . 54)(selected_component . 55))
+      ((relational_operator . 364))
+      ((multiplying_operator . 363))
+      ((binary_adding_operator . 358))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 55)(term . 
176)(term_list . 354))
+      nil
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 313)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(gen [...]
+      ((aggregate . 157)(attribute_reference . 51)(name . 163)(primary . 
298)(qualified_expression . 54)(selected_component . 55))
       nil
       nil
       nil
@@ -3337,8 +3349,9 @@
       nil
       ((actual_parameter_part . 92))
       nil
-      ((relational_operator . 283))
-      ((actual_parameter_part . 92)(aspect_specification_opt . 273))
+      ((relational_operator . 284))
+      ((actual_parameter_part . 92)(aspect_specification_opt . 274))
+      nil
       nil
       nil
       nil
@@ -3361,7 +3374,6 @@
       nil
       nil
       nil
-      ((aggregate . 154)(association_opt . 177)(association_list . 
242)(attribute_reference . 51)(case_expression . 243)(choice_expression . 
179)(choice_relation_and_list . 180)(choice_relation_or_list . 
181)(choice_relation_xor_list . 182)(choice_relation_and_then_list . 
183)(choice_relation_or_else_list . 184)(choice_relation . 185)(discrete_choice 
. 186)(discrete_choice_list . 187)(expression . 244)(expression_opt . 
189)(factor . 156)(if_expression . 245)(name . 190)(primary . 160)(qu [...]
       nil
       nil
       nil
@@ -3372,79 +3384,77 @@
       nil
       nil
       nil
-      ((attribute_reference . 51)(name . 236)(name_opt . 
237)(qualified_expression . 54)(selected_component . 55))
+      ((attribute_reference . 51)(name . 243)(name_opt . 
244)(qualified_expression . 54)(selected_component . 55))
       nil
       nil
       nil
       nil
       nil
-      ((identifier_list . 229)(parameter_specification . 532))
-      ((aliased_opt . 531))
-      ((general_access_modifier_opt . 528)(protected_opt . 529))
+      ((identifier_list . 236)(parameter_specification . 533))
+      ((aliased_opt . 532))
+      ((general_access_modifier_opt . 529)(protected_opt . 530))
       ((actual_parameter_part . 92))
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 524)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(expression . 523)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
       nil
+      ((attribute_reference . 51)(name . 243)(name_opt . 
525)(qualified_expression . 54)(selected_component . 55))
+      ((aspect_specification_opt . 524))
+      ((attribute_reference . 51)(name . 522)(qualified_expression . 
54)(selected_component . 55))
       nil
       nil
       nil
+      ((aspect_specification_opt . 519)(attribute_reference . 51)(name . 
256)(qualified_expression . 54)(selected_component . 55)(subprogram_default . 
520))
       nil
       nil
-      ((attribute_reference . 51)(name . 236)(name_opt . 
517)(qualified_expression . 54)(selected_component . 55))
-      ((aspect_specification_opt . 516))
-      ((attribute_reference . 51)(name . 514)(qualified_expression . 
54)(selected_component . 55))
+      ((actual_parameter_part . 92))
+      ((aspect_specification_opt . 518))
+      ((abstract_limited_synchronized_opt . 510)(abstract_tagged_limited_opt . 
511)(access_definition . 512)(array_type_definition . 
513)(formal_type_definition . 514)(formal_derived_type_definition . 
515)(interface_type_definition . 516)(null_exclusion_opt . 517))
       nil
       nil
       nil
-      ((aspect_specification_opt . 511)(attribute_reference . 51)(name . 
256)(qualified_expression . 54)(selected_component . 55)(subprogram_default . 
512))
       nil
       nil
-      ((actual_parameter_part . 92))
-      ((aspect_specification_opt . 510))
-      ((abstract_limited_synchronized_opt . 502)(abstract_tagged_limited_opt . 
503)(access_definition . 504)(array_type_definition . 
505)(formal_type_definition . 506)(formal_derived_type_definition . 
507)(interface_type_definition . 508)(null_exclusion_opt . 509))
+      ((actual_parameter_part . 92)(aspect_specification_opt . 491))
+      ((actual_parameter_part . 92)(aspect_specification_opt . 490))
+      ((actual_parameter_part . 92)(aspect_specification_opt . 489))
       nil
+      ((actual_parameter_part . 92)(aspect_specification_opt . 488))
       nil
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
197)(primary . 166)(qualified_expression . 54)(range . 486)(selected_component 
. 55)(simple_expression . 487)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
+      ((aggregate . 157)(association_opt . 485)(attribute_reference . 
51)(choice_expression . 186)(choice_relation_and_list . 
187)(choice_relation_or_list . 188)(choice_relation_xor_list . 
189)(choice_relation_and_then_list . 190)(choice_relation_or_else_list . 
191)(choice_relation . 192)(discrete_choice . 193)(discrete_choice_list . 
194)(expression . 195)(expression_opt . 196)(factor . 161)(name . 197)(primary 
. 166)(qualified_expression . 54)(raise_expression . 168)(range . 198)(relati 
[...]
       nil
-      ((actual_parameter_part . 92)(aspect_specification_opt . 483))
-      ((actual_parameter_part . 92)(aspect_specification_opt . 482))
-      ((actual_parameter_part . 92)(aspect_specification_opt . 481))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 
161)(membership_choice_list . 480)(membership_choice . 481)(name . 197)(primary 
. 166)(qualified_expression . 54)(range . 482)(selected_component . 
55)(simple_expression . 483)(term . 176)(term_list . 177)(unary_adding_operator 
. 178))
       nil
-      ((actual_parameter_part . 92)(aspect_specification_opt . 480))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 478)(term . 176)(term_list . 177)(unary_adding_operator 
. 178))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
190)(primary . 160)(qualified_expression . 54)(range . 478)(selected_component 
. 55)(simple_expression . 479)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
       nil
-      ((aggregate . 154)(association_opt . 477)(attribute_reference . 
51)(choice_expression . 179)(choice_relation_and_list . 
180)(choice_relation_or_list . 181)(choice_relation_xor_list . 
182)(choice_relation_and_then_list . 183)(choice_relation_or_else_list . 
184)(choice_relation . 185)(discrete_choice . 186)(discrete_choice_list . 
187)(expression . 188)(expression_opt . 189)(factor . 156)(name . 190)(primary 
. 160)(qualified_expression . 54)(raise_expression . 161)(range . 191)(relati 
[...]
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 
156)(membership_choice_list . 472)(membership_choice . 473)(name . 190)(primary 
. 160)(qualified_expression . 54)(range . 474)(selected_component . 
55)(simple_expression . 475)(term . 169)(term_list . 170)(unary_adding_operator 
. 171))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 470)(term . 169)(term_list . 170)(unary_adding_operator 
. 171))
       nil
       nil
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 477)(term . 176)(term_list . 177)(unary_adding_operator 
. 178))
+      ((aggregate . 225)(attribute_reference . 51)(attribute_designator . 
226)(name . 227)(qualified_expression . 54)(selected_component . 55))
+      ((aggregate . 157)(attribute_reference . 51)(choice_expression . 
186)(choice_relation_and_list . 187)(choice_relation_or_list . 
188)(choice_relation_xor_list . 189)(choice_relation_and_then_list . 
190)(choice_relation_or_else_list . 191)(choice_relation . 192)(discrete_choice 
. 474)(factor . 161)(name . 197)(primary . 166)(qualified_expression . 
54)(range . 198)(selected_component . 55)(simple_expression . 475)(term . 
176)(term_list . 177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 473)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(choice_relation . 
471)(factor . 161)(name . 163)(primary . 166)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 462)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(choice_relation . 
469)(factor . 161)(name . 163)(primary . 166)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 462)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(choice_relation . 
467)(factor . 161)(name . 163)(primary . 166)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 462)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
+      ((aggregate . 157)(attribute_reference . 51)(choice_relation . 
464)(factor . 161)(name . 163)(primary . 166)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 462)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(choice_relation . 
463)(factor . 161)(name . 163)(primary . 166)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 462)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(choice_relation . 
461)(factor . 161)(name . 163)(primary . 166)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 462)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 460)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((attribute_reference . 51)(name . 458)(qualified_expression . 
54)(selected_component . 55))
       nil
+      ((attribute_reference . 455)(direct_name . 456)(name . 
457)(qualified_expression . 54)(selected_component . 55))
+      ((attribute_reference . 51)(name . 68)(qualified_expression . 
54)(selected_component . 55))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 469)(term . 169)(term_list . 170)(unary_adding_operator 
. 171))
-      ((aggregate . 218)(attribute_reference . 51)(attribute_designator . 
219)(name . 220)(qualified_expression . 54)(selected_component . 55))
-      ((aggregate . 154)(attribute_reference . 51)(choice_expression . 
179)(choice_relation_and_list . 180)(choice_relation_or_list . 
181)(choice_relation_xor_list . 182)(choice_relation_and_then_list . 
183)(choice_relation_or_else_list . 184)(choice_relation . 185)(discrete_choice 
. 466)(factor . 156)(name . 190)(primary . 160)(qualified_expression . 
54)(range . 191)(selected_component . 55)(simple_expression . 467)(term . 
169)(term_list . 170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(expression . 465)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(choice_relation . 
463)(factor . 156)(name . 157)(primary . 160)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 454)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(choice_relation . 
461)(factor . 156)(name . 157)(primary . 160)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 454)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(choice_relation . 
459)(factor . 156)(name . 157)(primary . 160)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 454)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(choice_relation . 
456)(factor . 156)(name . 157)(primary . 160)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 454)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(choice_relation . 
455)(factor . 156)(name . 157)(primary . 160)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 454)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(choice_relation . 
453)(factor . 156)(name . 157)(primary . 160)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 454)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(expression . 452)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((attribute_reference . 51)(name . 450)(qualified_expression . 
54)(selected_component . 55))
       nil
-      ((attribute_reference . 447)(direct_name . 448)(name . 
449)(qualified_expression . 54)(selected_component . 55))
-      ((attribute_reference . 51)(name . 68)(qualified_expression . 
54)(selected_component . 55))
       nil
       nil
       nil
@@ -3452,11 +3462,11 @@
       nil
       nil
       nil
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 442)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(generic_renaming_declaration . 
321)(generic_subprog [...]
       nil
       nil
       nil
       nil
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 434)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(generic_renaming_declaration . 
320)(generic_subprog [...]
       nil
       nil
       nil
@@ -3467,11 +3477,11 @@
       nil
       nil
       nil
+      ((function_specification . 436)(procedure_specification . 
437)(subprogram_specification . 438))
       nil
       nil
       nil
       nil
-      ((function_specification . 428)(procedure_specification . 
429)(subprogram_specification . 430))
       nil
       nil
       nil
@@ -3493,103 +3503,106 @@
       nil
       nil
       nil
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 434)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(gen [...]
+      ((binary_adding_operator . 358))
       nil
       nil
       nil
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 55)(term . 
433))
       nil
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 310)(declarations . 
311)(declarative_part_opt . 426)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(gen [...]
-      ((binary_adding_operator . 357))
       nil
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(selected_component . 55)(term . 
425))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 432)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 55))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 431)(term . 176)(term_list . 177)(unary_adding_operator 
. 178))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(raise_expression . 168)(relation 
. 430)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list 
. 177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(raise_expression . 168)(relation 
. 428)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list 
. 177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(raise_expression . 168)(relation 
. 426)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list 
. 177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(raise_expression . 168)(relation 
. 425)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list 
. 177)(unary_adding_operator . 178))
       nil
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(raise_expression . 168)(relation 
. 423)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list 
. 177)(unary_adding_operator . 178))
       nil
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(raise_expression . 168)(relation 
. 421)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list 
. 177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(name . 163)(primary . 
420)(qualified_expression . 54)(selected_component . 55))
       nil
+      ((aggregate . 157)(attribute_reference . 51)(case_expression . 
158)(conditional_quantified_expression . 159)(expression . 160)(factor . 
161)(if_expression . 162)(name . 163)(pragma_argument_association . 
418)(primary . 166)(qualified_expression . 54)(quantified_expression . 
167)(raise_expression . 168)(relation_and_list . 169)(relation_and_then_list . 
170)(relation_or_list . 171)(relation_or_else_list . 172)(relation_xor_list . 
173)(relation . 174)(selected_component . 55)(simple_e [...]
+      ((aggregate . 157)(attribute_reference . 51)(expression . 417)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      nil
+      ((actual_parameter_part . 92))
+      ((actual_parameter_part . 92))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 424)(name . 
157)(primary . 160)(qualified_expression . 54)(selected_component . 55))
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 423)(term . 169)(term_list . 170)(unary_adding_operator 
. 171))
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(raise_expression . 161)(relation 
. 422)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list 
. 170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(raise_expression . 161)(relation 
. 420)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list 
. 170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(raise_expression . 161)(relation 
. 418)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list 
. 170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(raise_expression . 161)(relation 
. 417)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list 
. 170)(unary_adding_operator . 171))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(raise_expression . 161)(relation 
. 415)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list 
. 170)(unary_adding_operator . 171))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(raise_expression . 161)(relation 
. 413)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list 
. 170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(name . 157)(primary . 
412)(qualified_expression . 54)(selected_component . 55))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 155)(factor . 
156)(name . 157)(pragma_argument_association . 410)(primary . 
160)(qualified_expression . 54)(raise_expression . 161)(relation_and_list . 
162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(expression . 409)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
       nil
-      ((actual_parameter_part . 92))
-      ((actual_parameter_part . 92))
-      ((quantifier . 406))
       nil
       nil
+      ((iterator_specification . 409))
       nil
       nil
       nil
       nil
       nil
-      ((function_specification . 16)(procedure_specification . 
32)(subprogram_specification . 398))
+      ((function_specification . 16)(procedure_specification . 
32)(subprogram_specification . 404))
       nil
       nil
       nil
       nil
-      ((attribute_reference . 51)(name . 395)(qualified_expression . 
54)(selected_component . 55))
-      ((attribute_reference . 51)(name . 394)(qualified_expression . 
54)(selected_component . 55))
-      ((actual_parameter_part . 92)(aspect_specification_opt . 671))
-      ((actual_parameter_part . 92)(aspect_specification_opt . 670))
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 
652)(handled_sequence_of_statements . 653)(if_statement . 654)(iteration_scheme 
. 655)(label_opt . 656)(loop_statement . 657)(name . 658)(pragma . 
659)(procedure_call_statement . 660)(qualified_expression . 54)(raise_statement 
. 66 [...]
+      ((attribute_reference . 51)(name . 401)(qualified_expression . 
54)(selected_component . 55))
+      ((attribute_reference . 51)(name . 400)(qualified_expression . 
54)(selected_component . 55))
+      ((actual_parameter_part . 92)(aspect_specification_opt . 676))
+      ((actual_parameter_part . 92)(aspect_specification_opt . 675))
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 
657)(handled_sequence_of_statements . 658)(if_statement . 659)(iteration_scheme 
. 660)(label_opt . 661)(loop_statement . 662)(name . 663)(pragma . 
664)(procedure_call_statement . 665)(qualified_expression . 54)(raise_statement 
. 66 [...]
       nil
-      ((aspect_specification_opt . 624))
+      ((aspect_specification_opt . 629))
       nil
       nil
+      ((case_expression_alternative . 625)(case_expression_alternative_list . 
626))
       nil
       nil
+      ((aggregate . 157)(attribute_reference . 51)(expression . 619)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aggregate . 157)(association_opt . 184)(association_list . 
618)(attribute_reference . 51)(choice_expression . 
186)(choice_relation_and_list . 187)(choice_relation_or_list . 
188)(choice_relation_xor_list . 189)(choice_relation_and_then_list . 
190)(choice_relation_or_else_list . 191)(choice_relation . 192)(discrete_choice 
. 193)(discrete_choice_list . 194)(expression . 195)(expression_opt . 
196)(factor . 161)(name . 197)(primary . 166)(qualified_expression . 
54)(raise_expression .  [...]
       nil
       nil
       nil
-      ((iterator_specification . 621))
-      ((aggregate . 154)(attribute_reference . 51)(expression . 619)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 615)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
       nil
       nil
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(raise_expression . 161)(relation 
. 617)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list 
. 170)(unary_adding_operator . 171))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(raise_expression . 168)(relation 
. 613)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list 
. 177)(unary_adding_operator . 178))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(raise_expression . 161)(relation 
. 616)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list 
. 170)(unary_adding_operator . 171))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(raise_expression . 168)(relation 
. 612)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list 
. 177)(unary_adding_operator . 178))
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(raise_expression . 161)(relation 
. 615)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list 
. 170)(unary_adding_operator . 171))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(raise_expression . 168)(relation 
. 611)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list 
. 177)(unary_adding_operator . 178))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(raise_expression . 161)(relation 
. 614)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list 
. 170)(unary_adding_operator . 171))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(raise_expression . 168)(relation 
. 610)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list 
. 177)(unary_adding_operator . 178))
       nil
       nil
       nil
-      ((multiplying_operator . 362))
+      ((multiplying_operator . 363))
       nil
       nil
       nil
       nil
       ((aspect_specification_opt . 129))
-      ((aliased_opt . 607))
-      ((attribute_reference . 51)(name . 604)(qualified_expression . 
54)(selected_component . 55))
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 310)(declarations . 
311)(declarative_part_opt . 603)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(gen [...]
+      ((aliased_opt . 603))
+      ((attribute_reference . 51)(name . 243)(name_opt . 
600)(qualified_expression . 54)(selected_component . 55))
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 599)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(gen [...]
       nil
-      ((access_definition . 601)(null_exclusion_opt . 602))
-      ((discriminant_part_opt . 599))
+      ((access_definition . 597)(null_exclusion_opt . 598))
+      ((discriminant_part_opt . 595))
       nil
       nil
-      ((aspect_specification_opt . 596))
+      ((aspect_specification_opt . 592))
       nil
       nil
       nil
-      ((aspect_specification_opt . 592))
-      ((attribute_reference . 51)(name . 591)(qualified_expression . 
54)(selected_component . 55))
+      ((aspect_specification_opt . 588))
+      ((attribute_reference . 51)(name . 587)(qualified_expression . 
54)(selected_component . 55))
       nil
       nil
       nil
@@ -3599,24 +3612,24 @@
       nil
       nil
       nil
-      ((relational_operator . 583))
+      ((relational_operator . 579))
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(choice_relation . 
587)(factor . 156)(name . 157)(primary . 160)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 454)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(choice_relation . 
586)(factor . 156)(name . 157)(primary . 160)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 454)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((aggregate . 157)(attribute_reference . 51)(choice_relation . 
583)(factor . 161)(name . 163)(primary . 166)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 462)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(choice_relation . 
582)(factor . 161)(name . 163)(primary . 166)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 462)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(choice_relation . 
585)(factor . 156)(name . 157)(primary . 160)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 454)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((aggregate . 157)(attribute_reference . 51)(choice_relation . 
581)(factor . 161)(name . 163)(primary . 166)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 462)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(choice_relation . 
584)(factor . 156)(name . 157)(primary . 160)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 454)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((aggregate . 157)(attribute_reference . 51)(choice_relation . 
580)(factor . 161)(name . 163)(primary . 166)(qualified_expression . 
54)(selected_component . 55)(simple_expression . 462)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
       nil
       nil
-      ((relational_operator . 583))
+      ((relational_operator . 579))
       nil
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 
156)(membership_choice_list . 581)(membership_choice . 473)(name . 190)(primary 
. 160)(qualified_expression . 54)(range . 474)(selected_component . 
55)(simple_expression . 475)(term . 169)(term_list . 170)(unary_adding_operator 
. 171))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 
161)(membership_choice_list . 577)(membership_choice . 481)(name . 197)(primary 
. 166)(qualified_expression . 54)(range . 482)(selected_component . 
55)(simple_expression . 483)(term . 176)(term_list . 177)(unary_adding_operator 
. 178))
       nil
       nil
       nil
@@ -3629,9 +3642,9 @@
       nil
       nil
       nil
-      ((access_definition . 572)(attribute_reference . 51)(name . 
573)(null_exclusion_opt . 509)(null_exclusion_opt_name_type . 
574)(qualified_expression . 54)(selected_component . 575))
+      ((access_definition . 568)(attribute_reference . 51)(name . 
569)(null_exclusion_opt . 517)(null_exclusion_opt_name_type . 
570)(qualified_expression . 54)(selected_component . 571))
       nil
-      ((discriminant_specification_opt . 569)(identifier_list . 263))
+      ((discriminant_specification_opt . 565)(identifier_list . 263))
       nil
       nil
       nil
@@ -3645,62 +3658,60 @@
       nil
       nil
       nil
-      ((aspect_specification_opt . 556))
+      ((aspect_specification_opt . 552))
       nil
       nil
       nil
       nil
       nil
-      ((aspect_specification_opt . 551))
+      ((aspect_specification_opt . 547))
       nil
       nil
       nil
       nil
       nil
-      ((aspect_specification_opt . 548))
-      ((attribute_reference . 51)(name . 547)(qualified_expression . 
54)(selected_component . 55))
-      ((actual_parameter_part . 92)(aspect_specification_opt . 546))
-      ((aggregate . 154)(attribute_reference . 51)(expression . 544)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((aspect_specification_opt . 544))
+      ((attribute_reference . 51)(name . 543)(qualified_expression . 
54)(selected_component . 55))
+      ((actual_parameter_part . 92)(aspect_specification_opt . 542))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 540)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
       nil
-      ((aggregate . 154)(association_opt . 177)(association_list . 
542)(attribute_reference . 51)(choice_expression . 
179)(choice_relation_and_list . 180)(choice_relation_or_list . 
181)(choice_relation_xor_list . 182)(choice_relation_and_then_list . 
183)(choice_relation_or_else_list . 184)(choice_relation . 185)(discrete_choice 
. 186)(discrete_choice_list . 187)(expression . 188)(expression_opt . 
189)(factor . 156)(name . 190)(primary . 160)(qualified_expression . 
54)(raise_expression .  [...]
       nil
       nil
+      ((attribute_reference . 51)(name . 538)(qualified_expression . 
54)(selected_component . 55))
       nil
       nil
+      ((access_definition . 534)(mode_opt . 535)(null_exclusion_opt . 517))
       nil
       nil
+      ((null_exclusion_opt . 811))
+      ((formal_part . 93)(parameter_and_result_profile . 810))
+      ((formal_part . 117)(parameter_profile_opt . 809))
+      ((actual_parameter_part . 92))
       nil
+      ((aspect_specification_opt . 807))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 806)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((attribute_reference . 51)(name . 537)(qualified_expression . 
54)(selected_component . 55))
+      ((actual_parameter_part . 92)(formal_package_actual_part . 804))
       nil
       nil
-      ((access_definition . 533)(mode_opt . 534)(null_exclusion_opt . 509))
       nil
       nil
-      ((null_exclusion_opt . 801))
-      ((formal_part . 93)(parameter_and_result_profile . 800))
-      ((formal_part . 117)(parameter_profile_opt . 799))
-      ((actual_parameter_part . 92))
-      ((case_expression_alternative . 796)(case_expression_alternative_list . 
797))
-      ((aggregate . 154)(attribute_reference . 51)(expression . 794)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
       nil
+      ((attribute_reference . 51)(name . 800)(qualified_expression . 
54)(selected_component . 55))
       nil
       nil
       nil
-      ((aspect_specification_opt . 791))
-      ((aggregate . 154)(attribute_reference . 51)(expression . 790)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
       nil
-      ((actual_parameter_part . 92)(formal_package_actual_part . 788))
       nil
       nil
       nil
       nil
       nil
-      ((attribute_reference . 51)(name . 784)(qualified_expression . 
54)(selected_component . 55))
       nil
       nil
+      ((aggregate . 157)(attribute_reference . 51)(discrete_subtype_definition 
. 788)(discrete_subtype_definition_list . 789)(factor . 
161)(index_subtype_definition . 790)(index_subtype_definition_list . 791)(name 
. 792)(primary . 166)(qualified_expression . 54)(range . 
738)(selected_component . 55)(simple_expression . 487)(subtype_indication . 
739)(term . 176)(term_list . 177)(unary_adding_operator . 178))
       nil
       nil
       nil
@@ -3708,85 +3719,89 @@
       nil
       nil
       nil
+      ((actual_parameter_part . 92))
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(discrete_subtype_definition 
. 770)(discrete_subtype_definition_list . 771)(factor . 
156)(index_subtype_definition . 772)(index_subtype_definition_list . 773)(name 
. 774)(primary . 160)(qualified_expression . 54)(range . 
775)(selected_component . 55)(simple_expression . 479)(subtype_indication . 
776)(term . 169)(term_list . 170)(unary_adding_operator . 171))
       nil
       nil
       nil
       nil
+      ((aggregate . 157)(attribute_reference . 51)(factor . 
161)(membership_choice . 783)(name . 197)(primary . 166)(qualified_expression . 
54)(range . 482)(selected_component . 55)(simple_expression . 483)(term . 
176)(term_list . 177)(unary_adding_operator . 178))
       nil
+      ((aggregate . 157)(attribute_reference . 51)(expression . 782)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 781)(term . 176)(term_list . 177)(unary_adding_operator 
. 178))
       nil
       nil
-      ((actual_parameter_part . 92))
       nil
       nil
+      ((aggregate . 779)(record_rep . 780))
       nil
+      ((aggregate . 157)(attribute_reference . 51)(expression . 776)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((actual_parameter_part . 92)(aspect_specification_opt . 179))
       nil
+      ((discriminant_part_opt . 773))
+      ((aspect_specification_opt . 726))
+      ((attribute_reference . 51)(name . 730)(qualified_expression . 
54)(selected_component . 55)(subtype_indication . 771))
       nil
+      ((discriminant_part_opt . 768))
+      ((aspect_specification_opt . 725))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 
156)(membership_choice . 764)(name . 190)(primary . 160)(qualified_expression . 
54)(range . 474)(selected_component . 55)(simple_expression . 475)(term . 
169)(term_list . 170)(unary_adding_operator . 171))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 763)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 762)(term . 169)(term_list . 170)(unary_adding_operator 
. 171))
       nil
+      ((attribute_reference . 51)(name . 762)(qualified_expression . 
54)(selected_component . 55))
       nil
       nil
       nil
-      ((aggregate . 760)(record_rep . 761))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 757)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((actual_parameter_part . 92)(aspect_specification_opt . 172))
+      ((constant_opt . 758))
       nil
-      ((discriminant_part_opt . 754))
-      ((aspect_specification_opt . 721))
-      ((attribute_reference . 51)(name . 751)(qualified_expression . 
54)(selected_component . 55)(subtype_indication . 752))
       nil
-      ((discriminant_part_opt . 747))
-      ((aspect_specification_opt . 720))
+      ((paren_expression . 753))
+      ((formal_part . 117)(parameter_profile_opt . 751))
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 
657)(handled_sequence_of_statements . 749)(if_statement . 659)(iteration_scheme 
. 660)(label_opt . 661)(loop_statement . 662)(name . 663)(pragma . 
664)(procedure_call_statement . 665)(qualified_expression . 54)(raise_statement 
. 66 [...]
+      ((attribute_reference . 51)(name . 243)(name_opt . 
748)(qualified_expression . 54)(selected_component . 55))
       nil
       nil
       nil
-      ((attribute_reference . 51)(name . 741)(qualified_expression . 
54)(selected_component . 55))
       nil
-      ((actual_parameter_part . 92))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 747)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
-      ((constant_opt . 737))
       nil
       nil
-      ((paren_expression . 732))
-      ((formal_part . 117)(parameter_profile_opt . 730))
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 
652)(handled_sequence_of_statements . 728)(if_statement . 654)(iteration_scheme 
. 655)(label_opt . 656)(loop_statement . 657)(name . 658)(pragma . 
659)(procedure_call_statement . 660)(qualified_expression . 54)(raise_statement 
. 66 [...]
-      ((attribute_reference . 51)(name . 236)(name_opt . 
727)(qualified_expression . 54)(selected_component . 55))
+      ((elsif_expression_item . 743)(elsif_expression_list . 744))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 740)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(discrete_subtype_definition 
. 736)(factor . 161)(name . 737)(primary . 166)(qualified_expression . 
54)(range . 738)(selected_component . 55)(simple_expression . 
487)(subtype_indication . 739)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((attribute_reference . 51)(name . 733)(qualified_expression . 
54)(selected_component . 55))
+      ((attribute_reference . 51)(name . 730)(qualified_expression . 
54)(selected_component . 55)(subtype_indication . 731))
+      ((aggregate . 157)(attribute_reference . 51)(choice_expression . 
186)(choice_relation_and_list . 187)(choice_relation_or_list . 
188)(choice_relation_xor_list . 189)(choice_relation_and_then_list . 
190)(choice_relation_or_else_list . 191)(choice_relation . 192)(discrete_choice 
. 193)(discrete_choice_list . 728)(factor . 161)(name . 197)(primary . 
166)(qualified_expression . 54)(range . 198)(selected_component . 
55)(simple_expression . 475)(term . 176)(term_list . 177)(unary_adding_o [...]
       nil
       nil
+      ((aspect_specification_opt . 726))
+      ((aspect_specification_opt . 725))
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 726)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((attribute_reference . 51)(name . 723)(qualified_expression . 
54)(selected_component . 55))
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 
657)(handled_sequence_of_statements . 722)(if_statement . 659)(iteration_scheme 
. 660)(label_opt . 661)(loop_statement . 662)(name . 663)(pragma . 
664)(procedure_call_statement . 665)(qualified_expression . 54)(raise_statement 
. 66 [...]
+      ((aggregate . 157)(attribute_reference . 51)(expression . 
195)(expression_opt . 721)(factor . 161)(name . 163)(primary . 
166)(qualified_expression . 54)(raise_expression . 168)(relation_and_list . 
169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 720)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(gen [...]
+      ((aggregate . 157)(attribute_reference . 51)(expression . 719)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((identifier_opt . 717))
+      ((iterator_specification . 714)(iterator_specification_opt . 715))
       nil
+      ((aggregate . 157)(attribute_reference . 51)(expression . 
195)(expression_opt . 712)(factor . 161)(name . 163)(primary . 
166)(qualified_expression . 54)(raise_expression . 168)(relation_and_list . 
169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
       nil
+      ((attribute_reference . 51)(name . 709)(qualified_expression . 
54)(selected_component . 55))
+      ((attribute_reference . 51)(name . 707)(qualified_expression . 
54)(selected_component . 55))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 
704)(extended_return_object_declaration . 
705)(extended_return_object_declaration_opt . 706)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_op [...]
+      ((accept_statement . 692)(attribute_reference . 51)(delay_alternative . 
693)(delay_statement . 694)(entry_call_alternative . 695)(name . 
696)(procedure_call_statement . 697)(qualified_expression . 
54)(selected_component . 55)(select_alternative . 698)(select_alternative_list 
. 699)(select_alternative_list_opt . 700)(triggering_alternative . 701))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 
195)(expression_opt . 689)(factor . 161)(name . 163)(primary . 
166)(qualified_expression . 54)(raise_expression . 168)(relation_and_list . 
169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((aspect_specification_opt . 721))
-      ((aspect_specification_opt . 720))
       nil
       nil
-      ((attribute_reference . 51)(name . 718)(qualified_expression . 
54)(selected_component . 55))
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 
652)(handled_sequence_of_statements . 717)(if_statement . 654)(iteration_scheme 
. 655)(label_opt . 656)(loop_statement . 657)(name . 658)(pragma . 
659)(procedure_call_statement . 660)(qualified_expression . 54)(raise_statement 
. 66 [...]
-      ((aggregate . 154)(attribute_reference . 51)(expression . 
188)(expression_opt . 716)(factor . 156)(name . 157)(primary . 
160)(qualified_expression . 54)(raise_expression . 161)(relation_and_list . 
162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 310)(declarations . 
311)(declarative_part_opt . 715)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(gen [...]
-      ((aggregate . 154)(attribute_reference . 51)(expression . 714)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((identifier_opt . 712))
-      ((iterator_specification . 709)(iterator_specification_opt . 710))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 
188)(expression_opt . 707)(factor . 156)(name . 157)(primary . 
160)(qualified_expression . 54)(raise_expression . 161)(relation_and_list . 
162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
       nil
-      ((attribute_reference . 51)(name . 704)(qualified_expression . 
54)(selected_component . 55))
-      ((attribute_reference . 51)(name . 702)(qualified_expression . 
54)(selected_component . 55))
-      ((aggregate . 154)(attribute_reference . 51)(expression . 
699)(extended_return_object_declaration . 
700)(extended_return_object_declaration_opt . 701)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_op [...]
-      ((accept_statement . 687)(attribute_reference . 51)(delay_alternative . 
688)(delay_statement . 689)(entry_call_alternative . 690)(name . 
691)(procedure_call_statement . 692)(qualified_expression . 
54)(selected_component . 55)(select_alternative . 693)(select_alternative_list 
. 694)(select_alternative_list_opt . 695)(triggering_alternative . 696))
-      ((aggregate . 154)(attribute_reference . 51)(expression . 
188)(expression_opt . 684)(factor . 156)(name . 157)(primary . 
160)(qualified_expression . 54)(raise_expression . 161)(relation_and_list . 
162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
       nil
       nil
       nil
@@ -3796,292 +3811,288 @@
       nil
       nil
       nil
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(compound_statement . 683)(conditional_entry_call . 
654)(delay_statement . 655)(exit_statement . 656)(extended_return_statement . 
657)(if_statement . 659)(iteration_scheme . 660)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(s [...]
       nil
+      ((actual_parameter_part . 92))
       nil
       nil
       nil
       nil
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(compound_statement . 678)(conditional_entry_call . 
649)(delay_statement . 650)(exit_statement . 651)(extended_return_statement . 
652)(if_statement . 654)(iteration_scheme . 655)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(s [...]
       nil
-      ((actual_parameter_part . 92))
       nil
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
       nil
       nil
       nil
       nil
       nil
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
       nil
       nil
       nil
+      ((exception_handler . 951)(exception_handler_list . 
952)(exception_handler_list_opt . 953))
       nil
+      ((aggregate . 157)(attribute_reference . 51)(expression . 949)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
       nil
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
+      ((attribute_reference . 51)(name . 243)(name_opt . 
947)(qualified_expression . 54)(selected_component . 55))
       nil
-      ((exception_handler . 946)(exception_handler_list . 
947)(exception_handler_list_opt . 948))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 944)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
       nil
       nil
+      ((aggregate . 157)(attribute_reference . 51)(expression . 944)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
       nil
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
-      ((attribute_reference . 51)(name . 236)(name_opt . 
942)(qualified_expression . 54)(selected_component . 55))
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
       nil
+      ((accept_statement . 649)(actual_parameter_part . 
92)(assignment_statement . 650)(asynchronous_select . 651)(attribute_reference 
. 51)(block_statement . 652)(case_statement . 653)(conditional_entry_call . 
654)(delay_statement . 655)(exit_statement . 656)(extended_return_statement . 
657)(if_statement . 659)(iteration_scheme . 660)(label_opt . 
661)(loop_statement . 662)(name . 663)(pragma . 664)(procedure_call_statement . 
665)(qualified_expression . 54)(raise_statement . 666)(requeue [...]
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
       nil
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 939)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
       nil
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
       nil
-      ((accept_statement . 644)(actual_parameter_part . 
92)(assignment_statement . 645)(asynchronous_select . 646)(attribute_reference 
. 51)(block_statement . 647)(case_statement . 648)(conditional_entry_call . 
649)(delay_statement . 650)(exit_statement . 651)(extended_return_statement . 
652)(if_statement . 654)(iteration_scheme . 655)(label_opt . 
656)(loop_statement . 657)(name . 658)(pragma . 659)(procedure_call_statement . 
660)(qualified_expression . 54)(raise_statement . 661)(requeue [...]
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
       nil
       nil
       nil
       nil
+      ((actual_parameter_part . 92))
       nil
+      ((actual_parameter_part . 92))
       nil
       nil
       nil
       nil
-      ((actual_parameter_part . 92))
       nil
-      ((actual_parameter_part . 92))
       nil
       nil
       nil
+      ((aggregate . 157)(attribute_reference . 51)(expression . 920)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
       nil
       nil
+      ((actual_parameter_part . 92))
+      ((actual_parameter_part . 913)(actual_parameter_part_opt . 914))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 915)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
       nil
+      ((case_expression_alternative . 909))
       nil
       nil
+      ((actual_parameter_part . 92)(constraint . 829)(index_constraint . 830))
       nil
+      ((attribute_reference . 51)(name . 905)(qualified_expression . 
54)(selected_component . 55))
       ((actual_parameter_part . 92))
-      ((actual_parameter_part . 908)(actual_parameter_part_opt . 909))
+      ((aggregate . 157)(attribute_reference . 51)(name . 163)(primary . 
298)(qualified_expression . 54)(selected_component . 55))
+      ((aggregate . 157)(attribute_reference . 51)(discrete_subtype_definition 
. 903)(factor . 161)(name . 737)(primary . 166)(qualified_expression . 
54)(range . 738)(selected_component . 55)(simple_expression . 
487)(subtype_indication . 739)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      nil
+      ((actual_parameter_part . 92)(constraint . 829)(index_constraint . 830))
+      nil
+      nil
+      nil
+      ((aggregate . 157)(attribute_reference . 51)(expression . 901)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 900)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
+      ((elsif_expression_item . 899))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 904)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(discrete_subtype_definition 
. 903)(factor . 156)(name . 896)(primary . 160)(qualified_expression . 
54)(range . 775)(selected_component . 55)(simple_expression . 
479)(subtype_indication . 776)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((attribute_reference . 51)(name . 901)(qualified_expression . 
54)(selected_component . 55))
-      ((attribute_reference . 51)(name . 751)(qualified_expression . 
54)(selected_component . 55)(subtype_indication . 899))
       nil
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(discrete_subtype_definition 
. 895)(factor . 156)(identifier_list . 229)(name . 896)(parameter_specification 
. 230)(parameter_specification_list . 231)(primary . 160)(qualified_expression 
. 54)(range . 775)(selected_component . 55)(simple_expression . 
479)(subtype_indication . 776)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aspect_specification_opt . 894))
-      ((aggregate . 154)(attribute_reference . 51)(case_expression . 
891)(expression . 892)(factor . 156)(if_expression . 893)(name . 157)(primary . 
160)(qualified_expression . 54)(raise_expression . 161)(relation_and_list . 
162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      nil
+      ((aggregate . 157)(attribute_reference . 51)(discrete_subtype_definition 
. 894)(factor . 161)(identifier_list . 236)(name . 737)(parameter_specification 
. 237)(parameter_specification_list . 238)(primary . 166)(qualified_expression 
. 54)(range . 738)(selected_component . 55)(simple_expression . 
487)(subtype_indication . 739)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aspect_specification_opt . 893))
+      ((aggregate . 157)(attribute_reference . 51)(case_expression . 
158)(conditional_quantified_expression . 891)(expression . 892)(factor . 
161)(if_expression . 162)(name . 163)(primary . 166)(qualified_expression . 
54)(quantified_expression . 167)(raise_expression . 168)(relation_and_list . 
169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_l [...]
       ((aspect_specification_opt . 890))
       ((aspect_specification_opt . 889))
       ((aspect_specification_opt . 888))
       ((aspect_specification_opt . 887))
       nil
-      ((access_definition . 884)(array_type_definition . 
885)(attribute_reference . 51)(name . 751)(null_exclusion_opt . 
509)(qualified_expression . 54)(selected_component . 55)(subtype_indication . 
886))
+      ((access_definition . 884)(array_type_definition . 
885)(attribute_reference . 51)(name . 730)(null_exclusion_opt . 
517)(qualified_expression . 54)(selected_component . 55)(subtype_indication . 
886))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 882)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((attribute_reference . 51)(name . 236)(name_opt . 
881)(qualified_expression . 54)(selected_component . 55))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 882)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((attribute_reference . 51)(name . 243)(name_opt . 
881)(qualified_expression . 54)(selected_component . 55))
       ((actual_parameter_part . 92))
       ((attribute_reference . 51)(name . 879)(qualified_expression . 
54)(selected_component . 55))
       ((attribute_reference . 51)(name . 878)(qualified_expression . 
54)(selected_component . 55))
-      ((abstract_limited_synchronized_opt . 868)(abstract_limited_opt . 
869)(abstract_tagged_limited_opt . 870)(access_definition . 
871)(array_type_definition . 872)(derived_type_definition . 
873)(enumeration_type_definition . 874)(interface_type_definition . 
875)(null_exclusion_opt . 509)(record_type_definition . 876)(type_definition . 
877))
+      ((abstract_limited_synchronized_opt . 868)(abstract_limited_opt . 
869)(abstract_tagged_limited_opt . 870)(access_definition . 
871)(array_type_definition . 872)(derived_type_definition . 
873)(enumeration_type_definition . 874)(interface_type_definition . 
875)(null_exclusion_opt . 517)(record_type_definition . 876)(type_definition . 
877))
       nil
       nil
       ((aspect_specification_opt . 856))
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 310)(declarations . 
311)(declarative_part_opt . 854)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(gen [...]
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 854)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(gen [...]
       nil
+      ((aspect_specification_opt . 852))
       nil
-      ((actual_parameter_part . 92)(constraint . 826)(index_constraint . 827))
       ((aspect_specification_opt . 850))
-      nil
-      ((aspect_specification_opt . 848))
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 310)(declarations . 
311)(declarative_part_opt . 846)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(gen [...]
-      nil
-      nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 842)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((mod_clause_opt . 841))
-      nil
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 848)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(gen [...]
       nil
       nil
+      ((aggregate . 157)(attribute_reference . 51)(expression . 844)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((mod_clause_opt . 843))
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 836)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(expression . 835)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((attribute_reference . 51)(name . 573)(qualified_expression . 
54)(selected_component . 834))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(name . 157)(primary . 
297)(qualified_expression . 54)(selected_component . 55))
       nil
       nil
+      ((aggregate . 157)(attribute_reference . 51)(expression . 838)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 837)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((attribute_reference . 51)(name . 569)(qualified_expression . 
54)(selected_component . 836))
       nil
       nil
-      ((actual_parameter_part . 92)(constraint . 826)(index_constraint . 827))
       nil
       nil
       nil
+      ((actual_parameter_part . 92)(constraint . 829)(index_constraint . 830))
       nil
-      ((attribute_reference . 51)(interface_list . 822)(name . 
819)(qualified_expression . 54)(selected_component . 55))
-      ((attribute_reference . 51)(interface_list . 821)(name . 
819)(qualified_expression . 54)(selected_component . 55))
-      ((attribute_reference . 51)(interface_list . 820)(name . 
819)(qualified_expression . 54)(selected_component . 55))
       nil
-      ((attribute_reference . 51)(interface_list . 818)(name . 
819)(qualified_expression . 54)(selected_component . 55))
-      ((actual_parameter_part . 92)(and_interface_list_opt . 817))
+      ((attribute_reference . 51)(interface_list . 825)(name . 
822)(qualified_expression . 54)(selected_component . 55))
+      ((attribute_reference . 51)(interface_list . 824)(name . 
822)(qualified_expression . 54)(selected_component . 55))
+      ((attribute_reference . 51)(interface_list . 823)(name . 
822)(qualified_expression . 54)(selected_component . 55))
       nil
+      ((attribute_reference . 51)(interface_list . 821)(name . 
822)(qualified_expression . 54)(selected_component . 55))
+      ((actual_parameter_part . 92)(and_interface_list_opt . 820))
       nil
-      ((aggregate . 154)(association_opt . 177)(association_list . 
194)(attribute_reference . 51)(choice_expression . 
179)(choice_relation_and_list . 180)(choice_relation_or_list . 
181)(choice_relation_xor_list . 182)(choice_relation_and_then_list . 
183)(choice_relation_or_else_list . 184)(choice_relation . 185)(discrete_choice 
. 186)(discrete_choice_list . 187)(expression . 188)(expression_opt . 
189)(factor . 156)(name . 190)(primary . 160)(qualified_expression . 
54)(raise_expression .  [...]
-      ((aspect_specification_opt . 814))
       nil
-      ((aspect_specification_opt . 813))
+      ((aggregate . 157)(association_opt . 184)(association_list . 
201)(attribute_reference . 51)(case_expression . 158)(choice_expression . 
186)(choice_relation_and_list . 187)(choice_relation_or_list . 
188)(choice_relation_xor_list . 189)(choice_relation_and_then_list . 
190)(choice_relation_or_else_list . 191)(choice_relation . 
192)(conditional_quantified_expression . 202)(discrete_choice . 
193)(discrete_choice_list . 194)(expression . 195)(expression_opt . 196)(factor 
. 161)(if_expres [...]
+      ((aspect_specification_opt . 817))
       nil
+      ((aspect_specification_opt . 816))
       nil
+      ((identifier_list . 236)(parameter_specification . 
237)(parameter_specification_list . 238))
       nil
-      ((elsif_expression_item . 809)(elsif_expression_list . 810))
-      ((aggregate . 154)(attribute_reference . 51)(choice_expression . 
179)(choice_relation_and_list . 180)(choice_relation_or_list . 
181)(choice_relation_xor_list . 182)(choice_relation_and_then_list . 
183)(choice_relation_or_else_list . 184)(choice_relation . 185)(discrete_choice 
. 186)(discrete_choice_list . 806)(factor . 156)(name . 190)(primary . 
160)(qualified_expression . 54)(range . 191)(selected_component . 
55)(simple_expression . 467)(term . 169)(term_list . 170)(unary_adding_o [...]
       nil
-      nil
-      ((identifier_list . 229)(parameter_specification . 
230)(parameter_specification_list . 231))
-      nil
-      nil
-      ((attribute_reference . 51)(name . 804)(qualified_expression . 
54)(selected_component . 55))
-      ((aggregate . 154)(attribute_reference . 51)(expression . 803)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((attribute_reference . 51)(name . 814)(qualified_expression . 
54)(selected_component . 55))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 813)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       ((actual_parameter_part . 92))
-      ((case_expression_alternative . 1083))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 1081)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(expression . 1080)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
       nil
-      ((elsif_expression_item . 1079))
       nil
       nil
+      ((attribute_reference . 51)(interface_list . 1080)(name . 
822)(qualified_expression . 54)(selected_component . 55))
       nil
       nil
+      ((actual_parameter_part . 92))
       nil
-      ((attribute_reference . 51)(interface_list . 1074)(name . 
819)(qualified_expression . 54)(selected_component . 55))
       nil
       nil
-      ((actual_parameter_part . 92))
       nil
+      ((aggregate . 157)(association_opt . 184)(association_list . 
201)(attribute_reference . 51)(case_expression . 158)(choice_expression . 
186)(choice_relation_and_list . 187)(choice_relation_or_list . 
188)(choice_relation_xor_list . 189)(choice_relation_and_then_list . 
190)(choice_relation_or_else_list . 191)(choice_relation . 
192)(conditional_quantified_expression . 202)(discrete_choice . 
193)(discrete_choice_list . 194)(discrete_subtype_definition . 
788)(discrete_subtype_definition_ [...]
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
197)(primary . 166)(qualified_expression . 54)(range . 1001)(selected_component 
. 55)(simple_expression . 487)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
       nil
-      ((aggregate . 154)(association_opt . 177)(association_list . 
194)(attribute_reference . 51)(choice_expression . 
179)(choice_relation_and_list . 180)(choice_relation_or_list . 
181)(choice_relation_xor_list . 182)(choice_relation_and_then_list . 
183)(choice_relation_or_else_list . 184)(choice_relation . 185)(discrete_choice 
. 186)(discrete_choice_list . 187)(discrete_subtype_definition . 
770)(discrete_subtype_definition_list . 1070)(expression . 188)(expression_opt 
. 189)(factor . 15 [...]
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
190)(primary . 160)(qualified_expression . 54)(range . 1049)(selected_component 
. 55)(simple_expression . 479)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((attribute_reference . 51)(index_subtype_definition . 1071)(name . 
1072)(qualified_expression . 54)(selected_component . 55))
       nil
+      ((aggregate . 157)(attribute_reference . 51)(discrete_subtype_definition 
. 1069)(factor . 161)(name . 737)(primary . 166)(qualified_expression . 
54)(range . 738)(selected_component . 55)(simple_expression . 
487)(subtype_indication . 739)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
-      ((attribute_reference . 51)(index_subtype_definition . 1065)(name . 
1066)(qualified_expression . 54)(selected_component . 55))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(discrete_subtype_definition 
. 1063)(factor . 156)(name . 896)(primary . 160)(qualified_expression . 
54)(range . 775)(selected_component . 55)(simple_expression . 
479)(subtype_indication . 776)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((attribute_reference . 51)(name . 1048)(qualified_expression . 
54)(selected_component . 55))
       nil
       nil
       nil
       nil
       nil
+      ((component_clause . 1066)(component_clause_list . 1067))
       nil
       nil
+      ((aspect_specification_opt . 1063))
+      ((attribute_reference . 51)(interface_list . 1062)(name . 
822)(qualified_expression . 54)(selected_component . 55))
       nil
-      ((component_clause . 1060)(component_clause_list . 1061))
       nil
       nil
       ((aspect_specification_opt . 1057))
-      ((attribute_reference . 51)(interface_list . 1056)(name . 
819)(qualified_expression . 54)(selected_component . 55))
       nil
+      ((attribute_reference . 51)(interface_list . 1055)(name . 
822)(qualified_expression . 54)(selected_component . 55))
       nil
       nil
-      ((aspect_specification_opt . 1051))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
190)(primary . 160)(qualified_expression . 54)(range . 1049)(selected_component 
. 55)(simple_expression . 479)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((attribute_reference . 51)(name . 1048)(qualified_expression . 
54)(selected_component . 55))
-      ((attribute_reference . 51)(interface_list . 1047)(name . 
819)(qualified_expression . 54)(selected_component . 55))
+      ((aspect_specification_opt . 1049))
       nil
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1047)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1046)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((enumeration_literal . 1044)(enumeration_literal_list . 1045))
       nil
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1041)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((aspect_specification_opt . 1041))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1039)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aspect_clause . 1032)(at_clause . 308)(component_declaration . 
1033)(component_item . 1034)(component_list . 1035)(component_list_opt . 
1036)(enumeration_representation_clause . 315)(identifier_list . 
1037)(record_representation_clause . 339)(variant_part . 1038))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 1039)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(expression . 1038)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((enumeration_literal . 1036)(enumeration_literal_list . 1037))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 1033)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1031)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aspect_clause . 1024)(at_clause . 307)(component_declaration . 
1025)(component_item . 1026)(component_list . 1027)(component_list_opt . 
1028)(enumeration_representation_clause . 314)(identifier_list . 
1029)(record_representation_clause . 338)(variant_part . 1030))
+      ((record_definition . 1026))
       nil
       nil
       nil
-      ((record_definition . 1018))
       nil
       nil
       nil
+      ((aspect_specification_opt . 1024))
+      ((actual_parameter_part . 92)(aspect_specification_opt . 1023))
+      ((actual_parameter_part . 92)(aspect_specification_opt . 1022))
+      ((attribute_reference . 51)(name . 1021)(qualified_expression . 
54)(selected_component . 55))
       nil
       nil
       nil
+      ((aspect_specification_opt . 1018))
       ((aspect_specification_opt . 1016))
-      ((actual_parameter_part . 92)(aspect_specification_opt . 1015))
-      ((actual_parameter_part . 92)(aspect_specification_opt . 1014))
-      ((attribute_reference . 51)(name . 1013)(qualified_expression . 
54)(selected_component . 55))
+      ((aspect_specification_opt . 1014))
       nil
       nil
       nil
-      ((aspect_specification_opt . 1010))
-      ((aspect_specification_opt . 1008))
-      ((aspect_specification_opt . 1006))
       nil
       nil
       nil
       nil
       nil
+      ((attribute_reference . 51)(name . 243)(name_opt . 
1004)(qualified_expression . 54)(selected_component . 55))
       nil
       nil
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1003)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
-      ((actual_parameter_part . 92)(constraint . 826)(index_constraint . 827))
-      ((attribute_reference . 51)(name . 236)(name_opt . 
995)(qualified_expression . 54)(selected_component . 55))
       nil
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
197)(primary . 166)(qualified_expression . 54)(range . 1001)(selected_component 
. 55)(simple_expression . 487)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((attribute_reference . 51)(name . 993)(qualified_expression . 
54)(selected_component . 55))
+      ((attribute_reference . 51)(name . 998)(qualified_expression . 
54)(selected_component . 55))
       ((actual_parameter_part . 92))
-      ((aggregate . 154)(attribute_reference . 51)(discrete_subtype_definition 
. 992)(factor . 156)(name . 896)(primary . 160)(qualified_expression . 
54)(range . 775)(selected_component . 55)(simple_expression . 
479)(subtype_indication . 776)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((attribute_reference . 51)(name . 1000)(qualified_expression . 
54)(selected_component . 55))
+      ((attribute_reference . 51)(name . 998)(qualified_expression . 
54)(selected_component . 55))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 997)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
+      ((aspect_clause . 987)(at_clause . 308)(entry_body . 
988)(enumeration_representation_clause . 315)(expression_function_declaration . 
989)(function_specification . 16)(null_procedure_declaration . 
990)(overriding_indicator_opt . 991)(procedure_specification . 
32)(protected_operation_item . 992)(protected_operation_item_list . 
993)(protected_operation_item_list_opt . 994)(record_representation_clause . 
339)(subprogram_body . 995)(subprogram_declaration . 996))
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 985)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(gen [...]
+      ((aggregate . 157)(association_opt . 184)(association_list . 
201)(attribute_reference . 51)(case_expression . 158)(choice_expression . 
186)(choice_relation_and_list . 187)(choice_relation_or_list . 
188)(choice_relation_xor_list . 189)(choice_relation_and_then_list . 
190)(choice_relation_or_else_list . 191)(choice_relation . 
192)(conditional_quantified_expression . 202)(discrete_choice . 
193)(discrete_choice_list . 194)(expression . 195)(expression_opt . 196)(factor 
. 161)(if_expres [...]
       nil
-      ((aspect_clause . 982)(at_clause . 307)(entry_body . 
983)(enumeration_representation_clause . 314)(expression_function_declaration . 
984)(function_specification . 16)(null_procedure_declaration . 
985)(overriding_indicator_opt . 986)(procedure_specification . 
32)(protected_operation_item . 987)(protected_operation_item_list . 
988)(protected_operation_item_list_opt . 989)(record_representation_clause . 
338)(subprogram_body . 990)(subprogram_declaration . 991))
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 310)(declarations . 
311)(declarative_part_opt . 980)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(gen [...]
-      ((aggregate . 154)(association_opt . 177)(association_list . 
194)(attribute_reference . 51)(choice_expression . 
179)(choice_relation_and_list . 180)(choice_relation_or_list . 
181)(choice_relation_xor_list . 182)(choice_relation_and_then_list . 
183)(choice_relation_or_else_list . 184)(choice_relation . 185)(discrete_choice 
. 186)(discrete_choice_list . 187)(expression . 188)(expression_opt . 
189)(factor . 156)(name . 190)(primary . 160)(qualified_expression . 
54)(raise_expression .  [...]
+      ((formal_part . 117)(parameter_profile_opt . 984))
       nil
-      ((formal_part . 117)(parameter_profile_opt . 979))
+      ((identifier_opt . 983))
+      ((case_statement_alternative . 981)(case_statement_alternative_list . 
982))
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 
657)(handled_sequence_of_statements . 979)(if_statement . 659)(iteration_scheme 
. 660)(label_opt . 661)(loop_statement . 662)(name . 663)(pragma . 
664)(procedure_call_statement . 665)(qualified_expression . 54)(raise_statement 
. 66 [...]
       nil
-      ((identifier_opt . 978))
-      ((case_statement_alternative . 976)(case_statement_alternative_list . 
977))
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 
652)(handled_sequence_of_statements . 974)(if_statement . 654)(iteration_scheme 
. 655)(label_opt . 656)(loop_statement . 657)(name . 658)(pragma . 
659)(procedure_call_statement . 660)(qualified_expression . 54)(raise_statement 
. 66 [...]
       nil
+      ((aggregate . 157)(attribute_reference . 51)(expression . 
195)(expression_opt . 977)(factor . 161)(name . 163)(primary . 
166)(qualified_expression . 54)(raise_expression . 168)(relation_and_list . 
169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 
188)(expression_opt . 972)(factor . 156)(name . 157)(primary . 
160)(qualified_expression . 54)(raise_expression . 161)(relation_and_list . 
162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
       nil
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
       nil
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
+      ((aggregate . 157)(attribute_reference . 51)(expression . 974)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 969)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
       nil
       nil
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 
657)(handled_sequence_of_statements . 972)(if_statement . 659)(iteration_scheme 
. 660)(label_opt . 661)(loop_statement . 662)(name . 663)(pragma . 
664)(procedure_call_statement . 665)(qualified_expression . 54)(raise_statement 
. 66 [...]
       nil
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 
652)(handled_sequence_of_statements . 967)(if_statement . 654)(iteration_scheme 
. 655)(label_opt . 656)(loop_statement . 657)(name . 658)(pragma . 
659)(procedure_call_statement . 660)(qualified_expression . 54)(raise_statement 
. 66 [...]
       nil
+      ((aliased_opt . 971))
       nil
-      ((aliased_opt . 966))
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
       nil
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
+      ((accept_statement . 692)(delay_alternative . 693)(delay_statement . 
965)(select_alternative . 967))
       nil
-      ((accept_statement . 687)(delay_alternative . 688)(delay_statement . 
960)(select_alternative . 962))
       nil
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
+      ((delay_alternative . 964)(delay_statement . 965))
       nil
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
-      ((delay_alternative . 959)(delay_statement . 960))
       nil
       nil
       nil
@@ -4089,10 +4100,9 @@
       nil
       nil
       nil
+      ((attribute_reference . 51)(exception_choice . 
957)(exception_choice_list . 958)(name . 959)(qualified_expression . 
54)(selected_component . 55))
       nil
-      ((attribute_reference . 51)(exception_choice . 
952)(exception_choice_list . 953)(name . 954)(qualified_expression . 
54)(selected_component . 55))
-      nil
-      ((exception_handler . 949))
+      ((exception_handler . 954))
       nil
       nil
       nil
@@ -4103,26 +4113,26 @@
       nil
       nil
       nil
-      ((accept_statement . 1180)(delay_alternative . 1181)(delay_statement . 
960))
+      ((accept_statement . 1177)(delay_alternative . 1178)(delay_statement . 
965))
       nil
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
       nil
       nil
       nil
       nil
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
-      ((constant_opt . 1172))
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
+      ((constant_opt . 1169))
       nil
       nil
       nil
-      ((identifier_opt . 1168))
-      ((elsif_statement_item . 1166)(elsif_statement_list . 1167))
+      ((identifier_opt . 1165))
+      ((elsif_statement_item . 1163)(elsif_statement_list . 1164))
       nil
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(choice_expression . 
179)(choice_relation_and_list . 180)(choice_relation_or_list . 
181)(choice_relation_xor_list . 182)(choice_relation_and_then_list . 
183)(choice_relation_or_else_list . 184)(choice_relation . 185)(discrete_choice 
. 186)(discrete_choice_list . 1160)(factor . 156)(name . 190)(primary . 
160)(qualified_expression . 54)(range . 191)(selected_component . 
55)(simple_expression . 467)(term . 169)(term_list . 170)(unary_adding_ [...]
+      ((aggregate . 157)(attribute_reference . 51)(choice_expression . 
186)(choice_relation_and_list . 187)(choice_relation_or_list . 
188)(choice_relation_xor_list . 189)(choice_relation_and_then_list . 
190)(choice_relation_or_else_list . 191)(choice_relation . 192)(discrete_choice 
. 193)(discrete_choice_list . 1157)(factor . 161)(name . 197)(primary . 
166)(qualified_expression . 54)(range . 198)(selected_component . 
55)(simple_expression . 475)(term . 176)(term_list . 177)(unary_adding_ [...]
       nil
-      ((case_statement_alternative . 1159))
+      ((case_statement_alternative . 1156))
       nil
       nil
       nil
@@ -4131,49 +4141,51 @@
       nil
       nil
       nil
-      ((function_specification . 428)(procedure_specification . 
429)(subprogram_specification . 1152))
+      ((function_specification . 436)(procedure_specification . 
437)(subprogram_specification . 1149))
       nil
-      ((aspect_clause . 982)(at_clause . 307)(entry_body . 
983)(enumeration_representation_clause . 314)(expression_function_declaration . 
984)(function_specification . 16)(null_procedure_declaration . 
985)(overriding_indicator_opt . 986)(procedure_specification . 
32)(protected_operation_item . 1151)(record_representation_clause . 
338)(subprogram_body . 990)(subprogram_declaration . 991))
+      ((aspect_clause . 987)(at_clause . 308)(entry_body . 
988)(enumeration_representation_clause . 315)(expression_function_declaration . 
989)(function_specification . 16)(null_procedure_declaration . 
990)(overriding_indicator_opt . 991)(procedure_specification . 
32)(protected_operation_item . 1148)(record_representation_clause . 
339)(subprogram_body . 995)(subprogram_declaration . 996))
       nil
       nil
       nil
       nil
+      ((actual_parameter_part . 92)(constraint . 1146)(index_constraint . 830))
+      ((attribute_reference . 51)(name . 1145)(qualified_expression . 
54)(selected_component . 55))
       ((actual_parameter_part . 92))
-      ((attribute_reference . 51)(name . 1149)(qualified_expression . 
54)(selected_component . 55))
       nil
-      ((formal_part . 117)(parameter_profile_opt . 1146))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1144)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
+      ((formal_part . 117)(parameter_profile_opt . 1142))
       nil
       nil
       nil
       nil
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 1145)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 1143)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1141)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 1141)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1139)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((attribute_reference . 51)(name . 1048)(qualified_expression . 
54)(selected_component . 55))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1137)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((actual_parameter_part . 92)(aspect_specification_opt . 1139))
+      ((attribute_reference . 51)(name . 998)(qualified_expression . 
54)(selected_component . 55))
       nil
+      ((actual_parameter_part . 92)(aspect_specification_opt . 1135))
       nil
       nil
-      ((aspect_specification_opt . 1135))
       nil
-      ((attribute_reference . 51)(name . 1134)(qualified_expression . 
54)(selected_component . 55))
-      ((attribute_reference . 51)(name . 751)(qualified_expression . 
54)(selected_component . 55)(subtype_indication . 1133))
+      ((aspect_specification_opt . 1131))
       nil
-      ((direct_name . 1131)(direct_name_opt . 1132))
+      ((attribute_reference . 51)(name . 1130)(qualified_expression . 
54)(selected_component . 55))
+      ((attribute_reference . 51)(name . 730)(qualified_expression . 
54)(selected_component . 55)(subtype_indication . 1129))
       nil
+      ((direct_name . 1127)(direct_name_opt . 1128))
       nil
       nil
       nil
-      ((aspect_clause . 1024)(at_clause . 307)(component_declaration . 
1025)(component_item . 1126)(enumeration_representation_clause . 
314)(identifier_list . 1029)(record_representation_clause . 338)(variant_part . 
1127))
       nil
+      ((aspect_clause . 1032)(at_clause . 308)(component_declaration . 
1033)(component_item . 1122)(enumeration_representation_clause . 
315)(identifier_list . 1037)(record_representation_clause . 339)(variant_part . 
1123))
       nil
       nil
       nil
@@ -4183,62 +4195,52 @@
       nil
       nil
       nil
-      ((real_range_specification_opt . 1120))
-      ((real_range_specification_opt . 1119))
       nil
+      ((real_range_specification_opt . 1116))
+      ((real_range_specification_opt . 1115))
       nil
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 310)(declarations . 
311)(declarative_part_opt . 854)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(gen [...]
       nil
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 854)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(gen [...]
       nil
-      ((identifier_opt . 1113))
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 310)(declarations . 
311)(declarative_part_opt . 1112)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(ge [...]
       nil
-      ((actual_parameter_part . 92)(constraint . 1110)(index_constraint . 827))
+      ((identifier_opt . 1109))
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 1108)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(ge [...]
       nil
       nil
       nil
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 310)(declarations . 
311)(declarative_part_opt . 846)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(gen [...]
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 848)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(gen [...]
       nil
-      ((identifier_opt . 1106))
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 310)(declarations . 
311)(declarative_part_opt . 1105)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(ge [...]
+      ((identifier_opt . 1103))
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 1102)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(ge [...]
       nil
       nil
       nil
       nil
       nil
-      ((component_clause . 1101))
-      ((aggregate . 154)(attribute_reference . 51)(expression . 1099)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((component_clause . 1098))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1096)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((access_definition . 1094)(attribute_reference . 
51)(component_definition . 1098)(name . 751)(null_exclusion_opt . 
509)(qualified_expression . 54)(selected_component . 55)(subtype_indication . 
1096))
+      ((access_definition . 1091)(attribute_reference . 
51)(component_definition . 1095)(name . 730)(null_exclusion_opt . 
517)(qualified_expression . 54)(selected_component . 55)(subtype_indication . 
1093))
       nil
       ((actual_parameter_part . 92))
-      ((access_definition . 1094)(attribute_reference . 
51)(component_definition . 1095)(name . 751)(null_exclusion_opt . 
509)(qualified_expression . 54)(selected_component . 55)(subtype_indication . 
1096))
-      nil
-      ((aggregate . 154)(attribute_reference . 51)(name . 157)(primary . 
297)(qualified_expression . 54)(selected_component . 55))
-      nil
-      nil
-      ((attribute_reference . 51)(name . 1090)(qualified_expression . 
54)(selected_component . 55))
-      nil
+      ((access_definition . 1091)(attribute_reference . 
51)(component_definition . 1092)(name . 730)(null_exclusion_opt . 
517)(qualified_expression . 54)(selected_component . 55)(subtype_indication . 
1093))
       nil
+      ((aggregate . 157)(attribute_reference . 51)(name . 163)(primary . 
298)(qualified_expression . 54)(selected_component . 55))
       nil
       nil
+      ((attribute_reference . 51)(name . 1087)(qualified_expression . 
54)(selected_component . 55))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 1088)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
       nil
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 1086)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 1085)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      nil
-      nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 1248)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1085)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
       ((actual_parameter_part . 92))
       nil
-      ((attribute_reference . 51)(name . 1247)(qualified_expression . 
54)(selected_component . 55))
-      ((access_definition . 1245)(attribute_reference . 51)(name . 
751)(null_exclusion_opt . 509)(qualified_expression . 54)(selected_component . 
55)(subtype_indication . 1246))
+      ((attribute_reference . 51)(name . 1243)(qualified_expression . 
54)(selected_component . 55))
+      ((access_definition . 1241)(attribute_reference . 51)(name . 
730)(null_exclusion_opt . 517)(qualified_expression . 54)(selected_component . 
55)(subtype_indication . 1242))
       nil
       nil
       nil
@@ -4247,29 +4249,29 @@
       nil
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1242)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1238)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 310)(declarations . 
311)(declarative_part_opt . 846)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(gen [...]
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 848)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(gen [...]
       nil
       nil
-      ((attribute_reference . 51)(interface_list . 1239)(name . 
819)(qualified_expression . 54)(selected_component . 55))
+      ((attribute_reference . 51)(interface_list . 1235)(name . 
822)(qualified_expression . 54)(selected_component . 55))
       nil
       nil
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 854)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(gen [...]
       nil
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 310)(declarations . 
311)(declarative_part_opt . 854)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(gen [...]
       nil
+      ((attribute_reference . 51)(interface_list . 1231)(name . 
822)(qualified_expression . 54)(selected_component . 55))
       nil
-      ((attribute_reference . 51)(interface_list . 1235)(name . 
819)(qualified_expression . 54)(selected_component . 55))
       nil
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1229)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1228)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 1233)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1232)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
       nil
       nil
+      ((enumeration_literal . 1227))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1226)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((access_definition . 1091)(attribute_reference . 
51)(component_definition . 1225)(name . 730)(null_exclusion_opt . 
517)(qualified_expression . 54)(selected_component . 55)(subtype_indication . 
1093))
       nil
-      ((enumeration_literal . 1231))
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1230)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((access_definition . 1094)(attribute_reference . 
51)(component_definition . 1229)(name . 751)(null_exclusion_opt . 
509)(qualified_expression . 54)(selected_component . 55)(subtype_indication . 
1096))
       nil
       nil
       nil
@@ -4277,61 +4279,60 @@
       nil
       nil
       nil
+      ((and_interface_list_opt . 1222))
+      ((actual_parameter_part . 92)(and_interface_list_opt . 1219)(constraint 
. 1220)(constraint_opt . 1221)(index_constraint . 830))
       nil
-      ((and_interface_list_opt . 1226))
-      ((actual_parameter_part . 92)(and_interface_list_opt . 1223)(constraint 
. 1224)(constraint_opt . 1225)(index_constraint . 827))
       nil
       nil
       nil
       nil
       nil
+      ((aspect_specification_opt . 1216))
       nil
-      ((aspect_specification_opt . 1220))
+      ((aspect_specification_opt . 1215))
       nil
-      ((aspect_specification_opt . 1219))
+      ((aspect_specification_opt . 1214))
+      ((aspect_specification_opt . 1213))
       nil
-      ((aspect_specification_opt . 1218))
-      ((aspect_specification_opt . 1217))
       nil
-      ((attribute_reference . 51)(name . 1216)(qualified_expression . 
54)(selected_component . 55))
       ((actual_parameter_part . 92))
-      ((identifier_opt . 1215))
       nil
-      ((aspect_specification_opt . 129))
-      ((entry_body_formal_part . 1213)(formal_part . 
117)(parameter_profile_opt . 1214))
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 
652)(handled_sequence_of_statements . 1211)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 6 [...]
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 
652)(handled_sequence_of_statements . 1210)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 6 [...]
+      ((identifier_opt . 1212))
       nil
+      ((aspect_specification_opt . 129))
+      ((entry_body_formal_part . 1210)(formal_part . 
117)(parameter_profile_opt . 1211))
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 
657)(handled_sequence_of_statements . 1208)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 6 [...]
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 
657)(handled_sequence_of_statements . 1207)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 6 [...]
       nil
       nil
       nil
       nil
-      ((identifier_opt . 1207))
       nil
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
-      ((aggregate . 154)(attribute_reference . 51)(expression . 
188)(expression_opt . 1205)(factor . 156)(name . 157)(primary . 
160)(qualified_expression . 54)(raise_expression . 161)(relation_and_list . 
162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((identifier_opt . 1204))
       nil
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
+      ((aggregate . 157)(attribute_reference . 51)(expression . 
195)(expression_opt . 1202)(factor . 161)(name . 163)(primary . 
166)(qualified_expression . 54)(raise_expression . 168)(relation_and_list . 
169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((elsif_statement_item . 1203))
       nil
+      ((elsif_statement_item . 1200))
       nil
       nil
       nil
-      ((access_definition . 1196)(attribute_reference . 51)(name . 
751)(null_exclusion_opt . 509)(qualified_expression . 
54)(return_subtype_indication . 1197)(selected_component . 
55)(subtype_indication . 1198))
       nil
+      ((access_definition . 1193)(attribute_reference . 51)(name . 
730)(null_exclusion_opt . 517)(qualified_expression . 
54)(return_subtype_indication . 1194)(selected_component . 
55)(subtype_indication . 1195))
       nil
       nil
       nil
       nil
       nil
       nil
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
       nil
-      ((identifier_opt . 1189))
-      ((attribute_reference . 51)(exception_choice . 1188)(name . 
954)(qualified_expression . 54)(selected_component . 55))
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
-      ((attribute_reference . 51)(exception_choice . 
952)(exception_choice_list . 1186)(name . 954)(qualified_expression . 
54)(selected_component . 55))
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
       nil
+      ((identifier_opt . 1186))
+      ((attribute_reference . 51)(exception_choice . 1185)(name . 
959)(qualified_expression . 54)(selected_component . 55))
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
+      ((attribute_reference . 51)(exception_choice . 
957)(exception_choice_list . 1183)(name . 959)(qualified_expression . 
54)(selected_component . 55))
       nil
       nil
       nil
@@ -4346,22 +4347,21 @@
       nil
       nil
       nil
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
       nil
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
       nil
       nil
       nil
       nil
       nil
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
       nil
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
       nil
       nil
-      ((identifier_list . 229)(parameter_specification . 
230)(parameter_specification_list . 231))
       nil
+      ((identifier_list . 236)(parameter_specification . 
237)(parameter_specification_list . 238))
       nil
       nil
-      ((actual_parameter_part . 92))
       nil
       nil
       nil
@@ -4372,69 +4372,69 @@
       nil
       nil
       nil
-      ((variant_list . 1261)(variant . 1262))
       nil
-      ((aspect_specification_opt . 1259))
+      ((variant_list . 1256)(variant . 1257))
       nil
+      ((aspect_specification_opt . 1254))
       nil
       nil
-      ((real_range_specification_opt . 1256))
       nil
+      ((real_range_specification_opt . 1251))
       nil
-      ((identifier_opt . 1254))
       nil
+      ((identifier_opt . 1249))
       nil
       nil
-      ((identifier_opt . 1251))
       nil
+      ((identifier_opt . 1246))
       nil
       nil
       nil
       nil
       nil
-      ((actual_parameter_part . 92)(constraint . 1110)(index_constraint . 827))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1311)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((actual_parameter_part . 92)(constraint . 1146)(index_constraint . 830))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1306)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 310)(declarations . 
311)(declarative_part_opt . 846)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(gen [...]
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 848)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(gen [...]
       nil
       nil
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 310)(declarations . 
311)(declarative_part_opt . 854)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(gen [...]
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 854)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(gen [...]
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1308)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
-      ((aggregate . 154)(attribute_reference . 51)(expression . 1307)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1303)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1302)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((aggregate . 154)(attribute_reference . 51)(choice_expression . 
179)(choice_relation_and_list . 180)(choice_relation_or_list . 
181)(choice_relation_xor_list . 182)(choice_relation_and_then_list . 
183)(choice_relation_or_else_list . 184)(choice_relation . 185)(discrete_choice 
. 186)(discrete_choice_list . 1305)(factor . 156)(name . 190)(primary . 
160)(qualified_expression . 54)(range . 191)(selected_component . 
55)(simple_expression . 467)(term . 169)(term_list . 170)(unary_adding_ [...]
-      ((variant . 1304))
+      ((aggregate . 157)(attribute_reference . 51)(choice_expression . 
186)(choice_relation_and_list . 187)(choice_relation_or_list . 
188)(choice_relation_xor_list . 189)(choice_relation_and_then_list . 
190)(choice_relation_or_else_list . 191)(choice_relation . 192)(discrete_choice 
. 193)(discrete_choice_list . 1300)(factor . 161)(name . 197)(primary . 
166)(qualified_expression . 54)(range . 198)(selected_component . 
55)(simple_expression . 475)(term . 176)(term_list . 177)(unary_adding_ [...]
+      ((variant . 1299))
       nil
       nil
-      ((record_definition . 1301))
+      ((record_definition . 1296))
       nil
       nil
       nil
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 
188)(expression_opt . 1300)(factor . 156)(name . 157)(primary . 
160)(qualified_expression . 54)(raise_expression . 161)(relation_and_list . 
162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 
195)(expression_opt . 1295)(factor . 161)(name . 163)(primary . 
166)(qualified_expression . 54)(raise_expression . 168)(relation_and_list . 
169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((identifier_opt . 1298))
-      ((identifier_opt . 1297))
+      ((identifier_opt . 1293))
+      ((identifier_opt . 1292))
       nil
       nil
       nil
       nil
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
       nil
       nil
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(expression . 1292)(factor . 
156)(name . 157)(primary . 160)(qualified_expression . 54)(raise_expression . 
161)(relation_and_list . 162)(relation_and_then_list . 163)(relation_or_list . 
164)(relation_or_else_list . 165)(relation_xor_list . 166)(relation . 
167)(selected_component . 55)(simple_expression . 168)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1287)(factor . 
161)(name . 163)(primary . 166)(qualified_expression . 54)(raise_expression . 
168)(relation_and_list . 169)(relation_and_then_list . 170)(relation_or_list . 
171)(relation_or_else_list . 172)(relation_xor_list . 173)(relation . 
174)(selected_component . 55)(simple_expression . 175)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
       nil
       nil
       nil
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 652)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 661)(requeue_statement . 662)(selected_c [...]
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 657)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 666)(requeue_statement . 667)(selected_c [...]
       nil
       nil
       nil
@@ -4447,25 +4447,25 @@
       nil
       nil
       nil
-      ((aspect_specification_opt . 1318))
+      ((aspect_specification_opt . 1313))
       nil
       nil
       nil
       nil
-      ((aspect_specification_opt . 1315))
+      ((aspect_specification_opt . 1310))
       nil
       nil
       nil
       nil
-      ((aggregate . 154)(attribute_reference . 51)(factor . 156)(name . 
157)(primary . 160)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1332)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1327)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
       nil
-      ((aspect_clause . 1024)(at_clause . 307)(component_declaration . 
1025)(component_item . 1026)(component_list . 1027)(component_list_opt . 
1330)(enumeration_representation_clause . 314)(identifier_list . 
1029)(record_representation_clause . 338)(variant_part . 1030))
+      ((aspect_clause . 1032)(at_clause . 308)(component_declaration . 
1033)(component_item . 1034)(component_list . 1035)(component_list_opt . 
1325)(enumeration_representation_clause . 315)(identifier_list . 
1037)(record_representation_clause . 339)(variant_part . 1038))
       nil
       nil
-      ((abstract_subprogram_declaration . 305)(aspect_clause . 306)(at_clause 
. 307)(body . 308)(body_stub . 309)(declaration . 310)(declarations . 
311)(declarative_part_opt . 1327)(entry_declaration . 
313)(enumeration_representation_clause . 314)(exception_declaration . 
315)(expression_function_declaration . 316)(full_type_declaration . 
317)(function_specification . 16)(generic_declaration . 
318)(generic_formal_part . 18)(generic_instantiation . 
319)(generic_package_declaration . 20)(ge [...]
-      ((aggregate . 154)(attribute_reference . 51)(discrete_subtype_definition 
. 1326)(factor . 156)(name . 896)(primary . 160)(qualified_expression . 
54)(range . 775)(selected_component . 55)(simple_expression . 
479)(subtype_indication . 776)(term . 169)(term_list . 
170)(unary_adding_operator . 171))
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 1322)(entry_declaration . 
314)(enumeration_representation_clause . 315)(exception_declaration . 
316)(expression_function_declaration . 317)(full_type_declaration . 
318)(function_specification . 16)(generic_declaration . 
319)(generic_formal_part . 18)(generic_instantiation . 
320)(generic_package_declaration . 20)(ge [...]
+      ((aggregate . 157)(attribute_reference . 51)(discrete_subtype_definition 
. 1321)(factor . 161)(name . 737)(primary . 166)(qualified_expression . 
54)(range . 738)(selected_component . 55)(simple_expression . 
487)(subtype_indication . 739)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
       nil
@@ -4479,11 +4479,11 @@
       nil
       nil
       nil
-      ((accept_statement . 644)(assignment_statement . 
645)(asynchronous_select . 646)(attribute_reference . 51)(block_statement . 
647)(case_statement . 648)(conditional_entry_call . 649)(delay_statement . 
650)(exit_statement . 651)(extended_return_statement . 
652)(handled_sequence_of_statements . 1337)(if_statement . 
654)(iteration_scheme . 655)(label_opt . 656)(loop_statement . 657)(name . 
658)(pragma . 659)(procedure_call_statement . 660)(qualified_expression . 
54)(raise_statement . 6 [...]
-      ((formal_part . 117)(parameter_profile_opt . 1336))
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(conditional_entry_call . 654)(delay_statement . 
655)(exit_statement . 656)(extended_return_statement . 
657)(handled_sequence_of_statements . 1332)(if_statement . 
659)(iteration_scheme . 660)(label_opt . 661)(loop_statement . 662)(name . 
663)(pragma . 664)(procedure_call_statement . 665)(qualified_expression . 
54)(raise_statement . 6 [...]
+      ((formal_part . 117)(parameter_profile_opt . 1331))
       nil
       nil
-      ((identifier_opt . 1339))
+      ((identifier_opt . 1334))
       nil
       nil]))
   "Parser table.")
diff --git a/packages/ada-mode/ada-indent-user-options.el 
b/packages/ada-mode/ada-indent-user-options.el
index 78e1854..1be01cd 100644
--- a/packages/ada-mode/ada-indent-user-options.el
+++ b/packages/ada-mode/ada-indent-user-options.el
@@ -1,4 +1,4 @@
-;;; user options shared by Ada mode indentation engines  -*- lexical-binding:t 
-*-
+;; user options shared by Ada mode indentation engines  -*- lexical-binding:t 
-*-
 ;;
 ;; Copyright (C) 2012, 2013, 2015  Free Software Foundation, Inc.
 ;;
@@ -56,16 +56,30 @@ begin
 Example :
    My_Var : My_Type :=
    >>(Field1 => Value);"
-  :type  'integer
-  :safe  #'integerp)
+  :type 'integer
+  :safe #'integerp)
 (make-variable-buffer-local 'ada-indent-broken)
 
 (defcustom ada-indent-comment-col-0 nil
   "If non-nil, comments currently starting in column 0 are left in column 0.
 Otherwise, they are indented with previous comments or code."
+  :type 'boolean
+  :safe #'booleanp)
+(make-variable-buffer-local 'ada-indent-comment-col-0)
+
+(defcustom ada-indent-comment-gnat nil
+  "If non-nil, comments are indented to meet the GNAT comment style check.
+That is, one of:
+
+- multiple of ada-indent
+- next non-blank line
+- previous non-blank line
+
+Otherwise, they are indented as a with previous comments or code."
   :type  'boolean
+  :group 'ada-indentation
   :safe  #'booleanp)
-(make-variable-buffer-local 'ada-indent-comment-col-0)
+(make-variable-buffer-local 'ada-indent-comment-gnat)
 
 (defvar ada-label-indent nil)
 (make-obsolete-variable
@@ -101,8 +115,8 @@ Example :
 An example is:
    type A is
    >>>record"
-  :type  'integer
-  :safe  #'integerp)
+  :type 'integer
+  :safe #'integerp)
 (make-variable-buffer-local 'ada-indent-record-rel-type)
 
 (defcustom ada-indent-renames 2
@@ -130,8 +144,8 @@ Examples:
    function A (B : Integer)
                return C
    >>>>>>>>>>>renames Foo;"
-  :type  'integer
-  :safe  #'integerp)
+  :type 'integer
+  :safe #'integerp)
 (make-variable-buffer-local 'ada-indent-renames)
 
 (defcustom ada-indent-return 0
@@ -148,8 +162,8 @@ relative to line containing 'function'.
 An example is:
    function A (B : Integer)
    >>>>>>>>>>>return C;"
-  :type  'integer
-  :safe  #'integerp)
+  :type 'integer
+  :safe #'integerp)
 (make-variable-buffer-local 'ada-indent-return)
 
 (defvar ada-use-indent nil)
@@ -169,8 +183,8 @@ An example is:
 An example is:
    use Ada.Text_IO,
    >>Ada.Numerics;"
-  :type  'integer
-  :safe  #'integerp)
+  :type 'integer
+  :safe #'integerp)
 (make-variable-buffer-local 'ada-indent-use)
 
 (defvar ada-when-indent nil)
@@ -211,8 +225,8 @@ An example is:
 An example is:
    with Ada.Text_IO,
    >>Ada.Numerics;"
-  :type  'integer
-  :safe  #'integerp)
+  :type 'integer
+  :safe #'integerp)
 (make-variable-buffer-local 'ada-indent-with)
 
 (provide 'ada-indent-user-options)
diff --git a/packages/ada-mode/ada-mode-compat-24.2.el 
b/packages/ada-mode/ada-mode-compat-24.2.el
index 2338ff6..51ac700 100644
--- a/packages/ada-mode/ada-mode-compat-24.2.el
+++ b/packages/ada-mode/ada-mode-compat-24.2.el
@@ -1,4 +1,5 @@
-;;; ada-mode-compat-24.2.el --- Implement current Emacs features not present 
in Emacs 24.2  -*- lexical-binding:t -*-
+;; ada-mode-compat-24.2.el --- Implement current Emacs features not present in 
Emacs 24.2  -*- lexical-binding:t -*-
+;; FIXME: rename to ada-mode-compat.el, rely on functionp etc. doc emacs 
version for each item
 
 ;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
 
@@ -19,13 +20,18 @@
 
 ;; using cl-lib 0.4 from Gnu ELPA
 
-(defun file-name-base (&optional filename)
-  "Return the base name of the FILENAME: no directory, no extension.
+(when (not (functionp 'file-name-base))
+  (defun file-name-base (&optional filename)
+    "Return the base name of the FILENAME: no directory, no extension.
 FILENAME defaults to `buffer-file-name'."
-  (file-name-sans-extension
-   (file-name-nondirectory (or filename (buffer-file-name)))))
+    (file-name-sans-extension
+     (file-name-nondirectory (or filename (buffer-file-name))))))
 
+(when (not (functionp 'font-lock-ensure))
+  (defun font-lock-ensure (&optional beg end)
+    (font-lock-fontify-region (or beg (point-min)) (or end (point-max)))))
 
+;; FIXME: need cl-flet, but there is no macrop
 (provide 'ada-mode-compat-24.2)
 
 ;; end of file
diff --git a/packages/ada-mode/ada-mode.el b/packages/ada-mode/ada-mode.el
index 9e0bdfc..8fb112a 100644
--- a/packages/ada-mode/ada-mode.el
+++ b/packages/ada-mode/ada-mode.el
@@ -1,13 +1,13 @@
 ;;; ada-mode.el --- major-mode for editing Ada sources  -*- lexical-binding:t 
-*-
 ;;
-;; Copyright (C) 1994, 1995, 1997 - 2015  Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1995, 1997 - 2016  Free Software Foundation, Inc.
 ;;
 ;; Author: Stephen Leake <address@hidden>
 ;; Maintainer: Stephen Leake <address@hidden>
 ;; Keywords: languages
 ;;  ada
-;; Version: 5.1.8
-;; package-requires: ((wisi "1.1.1") (cl-lib "0.4") (emacs "24.2"))
+;; Version: 5.1.9
+;; package-requires: ((wisi "1.1.2") (cl-lib "0.4") (emacs "24.2"))
 ;; url: http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html
 ;;
 ;; (Gnu ELPA requires single digits between dots in versions)
@@ -168,7 +168,7 @@
 (defun ada-mode-version ()
   "Return Ada mode version."
   (interactive)
-  (let ((version-string "5.1.8"))
+  (let ((version-string "5.1.9"))
     ;; must match:
     ;; ada-mode.texi
     ;; README-ada-mode
@@ -214,31 +214,36 @@ character, and end either at the end of the word or at a _
 character.  Characters after the first word are ignored, and not
 preserved when the list is written back to the file."
   :type  '(repeat (file))
-  ;; :safe  #'listp    ;FIXME: is '("~/.emacs" "~/.bashrc" "/etc/passwd") safe?
-  )
+  :safe  #'listp)
 
-(defcustom ada-case-keyword 'downcase-word
+(defcustom ada-case-keyword 'lower-case
   "Buffer-local value that may override project variable `case_keyword'.
 Global value is default for project variable `case_keyword'.
 Function to call to adjust the case of Ada keywords."
-  :type '(choice (const downcase-word)
-                (const upcase-word))
-  ;; :safe #'functionp ; FIXME: `functionp' CANNOT be safe!
+  :type '(choice (const lower-case)
+                (const upper-case))
+  ;; We'd like to specify that the value must be a function that takes
+  ;; one arg, but custom doesn't support that. ':safe' is supposed
+  ;; to be used to prevent user-provided functions from compromising
+  ;; security, so ":safe #'functionp" is not appropriate. So we
+  ;; use a symbol, and a cl-ecase in ada-case-keyword.
+  :safe (lambda (val) (memq val '(lower-case upper-case)))
   )
 (make-variable-buffer-local 'ada-case-keyword)
 
-(defcustom ada-case-identifier 'ada-mixed-case
+(defcustom ada-case-identifier 'mixed-case
   "Buffer-local value that may override project variable `case_keyword'.
 Global value is default for project variable `case_keyword'.
 Function to call to adjust the case of Ada keywords.
 Called with three args;
 start      - buffer pos of start of identifier
 end        - end of identifier
-force-case - if t, treat `ada-strict-case' as t"
-  :type '(choice (const ada-mixed-case)
-                (const ada-lower-case)
-                (const ada-upper-case))
-  ;; :safe #'functionp ; FIXME: `functionp' CANNOT be safe!
+force-case - if t, treat `ada-case-strict' as t"
+  :type '(choice (const mixed-case)
+                (const lower-case)
+                (const upper-case))
+  ;; see comment on :safe at ada-case-keyword
+  :safe (lambda (val) (memq val '(mixed-case lower-case upper-case)))
   )
 ;; we'd like to check that there are 3 args, since the previous
 ;; release required 2 here. But there doesn't seem to be a way to
@@ -269,10 +274,12 @@ indentation parser accepts."
 (defcustom ada-fill-comment-prefix "-- "
   "Comment fill prefix."
   :type 'string)
+(make-variable-buffer-local 'ada-language-version)
 
 (defcustom ada-fill-comment-postfix " --"
   "Comment fill postfix."
   :type 'string)
+(make-variable-buffer-local 'ada-language-version)
 
 (defcustom ada-prj-file-extensions '("adp" "prj")
   "List of Emacs Ada mode project file extensions.
@@ -287,6 +294,12 @@ secondary project file (referenced from a primary).  The 
user
 must provide a parser for a file with one of these extensions."
   :type 'list)
 
+(defcustom ada-prj-parse-hook nil
+  "Hook run at start of `ada-parse-prj-file'.
+Useful for setting `ada-xref-tool' and similar vars."
+  :type 'function
+  :group 'ada)
+
 ;;;;; end of user variables
 
 (defconst ada-symbol-end
@@ -355,7 +368,7 @@ Values defined by cross reference packages.")
     (define-key map "\C-c\C-x"   'ada-show-overriding)
     (define-key map "\C-c\M-x"   'ada-show-overridden)
     (define-key map "\C-c\C-y"          'ada-case-create-exception)
-    (define-key map "\C-c\M-y"   'ada-case-create-partial-exception)
+    (define-key map "\C-c\C-\M-y" 'ada-case-create-partial-exception)
     (define-key map [C-down-mouse-3] 'ada-popup-menu)
 
     (ada-case-activate-keys map)
@@ -376,7 +389,8 @@ Values defined by cross reference packages.")
      ["Find and select project ..."   ada-build-prompt-select-prj-file t]
      ["Select project ..."            ada-prj-select                   t]
      ["Show project"                  ada-prj-show                     t]
-     ["Show project search path"      ada-prj-show-path                t]
+     ["Show project file search path" ada-prj-show-prj-path            t]
+     ["Show source file search path"  ada-prj-show-src-path            t]
     )
     ("Build"
      ["Next compilation error"     next-error                t]
@@ -456,29 +470,17 @@ Values defined by cross reference packages.")
     ["Indent current statement"    ada-indent-statement       t]
     ["Goto next statement keyword" ada-next-statement-keyword t]
     ["Goto prev statement keyword" ada-next-statement-keyword t]
-    ["Other File"                  ada-find-other-file        t]
-    ["Other file don't find decl"  ada-find-other-file-noset  t]))
+    ["Other File"                  ada-find-other-file        t]))
 
-(defun ada-popup-menu (_position)
-  "Pops up a `ada-context-menu', with `ada-context-menu-on-identifer' set 
appropriately.
-POSITION is the location the mouse was clicked on.
-Sets `ada-context-menu-last-point' to the current position before
-displaying the menu.  When a function from the menu is called,
-point is where the mouse button was clicked."
-  (interactive "e")
+(defun ada-popup-menu ()
+  "Pops up `ada-context-menu'.
+When a function from the menu is called, point is where the mouse
+button was clicked."
+  (interactive)
 
   (mouse-set-point last-input-event)
-
-  (setq ada-context-menu-on-identifier
-       (and (char-after)
-            (or (= (char-syntax (char-after)) ?w)
-                (= (char-after) ?_))
-            (not (ada-in-string-or-comment-p))
-            (save-excursion (skip-syntax-forward "w")
-                            (not (ada-after-keyword-p)))
-            ))
-    (popup-menu ada-context-menu)
-    )
+  (popup-menu ada-context-menu)
+  )
 
 (defun ada-indent-newline-indent ()
   "insert a newline, indent the old and new lines."
@@ -604,23 +606,32 @@ current construct."
         (deactivate-mark))
 
     ;; else see if we are in a construct we know how to align
-    (cond
-     ((ada-in-paramlist-p)
+    (let ((parse-result (syntax-ppss)))
+      (cond
+       ((ada-in-paramlist-p parse-result)
         (ada-format-paramlist))
 
-     (t
-      (align-current))
-     )))
+       ((and
+        (ada-in-paren-p parse-result)
+        (ada-in-case-expression))
+       ;; align '=>'
+       (let ((begin (nth 1 parse-result))
+             (end   (scan-lists (point) 1 1)))
+         (align begin end 'entire)))
+
+       (t
+       (align-current))
+       ))))
 
 (defvar ada-in-paramlist-p nil
   ;; Supplied by indentation engine parser
   "Function to return t if point is inside the parameter-list of a subprogram 
declaration.
-Function is called with no arguments.")
+Function is called with one optional argument; syntax-ppss result.")
 
-(defun ada-in-paramlist-p ()
+(defun ada-in-paramlist-p (&optional parse-result)
   "Return t if point is inside the parameter-list of a subprogram declaration."
   (when ada-in-paramlist-p
-    (funcall ada-in-paramlist-p)))
+    (funcall ada-in-paramlist-p parse-result)))
 
 (defun ada-format-paramlist ()
   "Reformat the parameter list point is in."
@@ -809,13 +820,13 @@ Each parameter declaration is represented by a list
 
 (defun ada-insert-paramlist-single-line (paramlist)
   "Insert a single-line formatted PARAMLIST in the buffer."
+  ;; point is properly indented
   (let ((i (length paramlist))
        param)
 
     ;; clean up whitespace
-    (skip-syntax-forward " ")
-    (delete-char (- (skip-syntax-backward " ")))
-    (insert " (")
+    (delete-char (- (skip-syntax-forward " ")))
+    (insert "(")
 
     (setq i (length paramlist))
     (while (not (zerop i))
@@ -985,8 +996,6 @@ replacing current values of `ada-case-full-exceptions', 
`ada-case-partial-except
     (push (cons word t) exceptions))
   exceptions)
 
-(defvar ada-prj-current-file)
-
 (defun ada-case-create-exception (&optional word file-name partial)
   "Define WORD as an exception for the casing system, save it in FILE-NAME.
 If PARTIAL is non-nil, create a partial word exception.  WORD
@@ -1025,7 +1034,9 @@ list."
 
   (unless word
     (if (use-region-p)
-       (setq word (buffer-substring-no-properties (region-beginning) 
(region-end)))
+       (progn
+         (setq word (buffer-substring-no-properties (region-beginning) 
(region-end)))
+         (deactivate-mark))
       (save-excursion
        (let ((syntax (if partial "w" "w_")))
          (skip-syntax-backward syntax)
@@ -1061,9 +1072,8 @@ User is prompted to choose a file from project variable 
casing if it is a list."
   (interactive)
   (ada-case-create-exception nil nil t))
 
-(defun ada-in-numeric-literal-p ()
-  "Return t if point is after a prefix of a numeric literal."
-  ;; FIXME: this is actually a based numeric literal; excludes 1234
+(defun ada-in-based-numeric-literal-p ()
+  "Return t if point is after a prefix of a based numeric literal."
   (looking-back "\\([0-9]+#[0-9a-fA-F_]+\\)" (line-beginning-position)))
 
 (defvar ada-keywords nil
@@ -1076,11 +1086,18 @@ User is prompted to choose a file from project variable 
casing if it is a list."
               (point))))
     (member (downcase word) ada-keywords)))
 
-(defun ada-lower-case (start end _force-case-strict)
-  (downcase-region start end))
+(defun ada-case-keyword (beg end)
+  (cl-ecase ada-case-keyword
+    (lower-case (downcase-region beg end))
+    (upper-case (upcase-region beg end))
+    ))
 
-(defun ada-upper-case (start end _force-case-strict)
-  (upcase-region start end))
+(defun ada-case-identifier (start end force-case-strict)
+  (cl-ecase ada-case-identifier
+    (mixed-case (ada-mixed-case start end force-case-strict))
+    (lower-case (downcase-region start end))
+    (upper-case (upcase-region start end))
+    ))
 
 (defun ada-mixed-case (start end force-case-strict)
   "Adjust case of region START END to Mixed_Case."
@@ -1127,7 +1144,7 @@ Uses `ada-case-identifier', with exceptions defined in
            (delete-region (point) end))
 
        ;; else apply ada-case-identifier
-       (funcall ada-case-identifier start end force-case)
+       (ada-case-identifier start end force-case)
 
        ;; apply partial-exceptions
        (goto-char start)
@@ -1148,7 +1165,16 @@ Uses `ada-case-identifier', with exceptions defined in
          (if (< (point) end)
              (setq start (point))
            (setq done t))
-       )))))
+          )))))
+
+(defun ada-case-adjust-keyword ()
+  "Adjust the case of the previous word as a keyword.
+'word' here is allowed to be underscore-separated (GPR external_as_list)."
+  (save-excursion
+    (let ((end   (point-marker))
+         (start (progn (skip-syntax-backward "w_") (point))))
+      (ada-case-keyword start end)
+    )))
 
 (defun ada-case-adjust (&optional typed-char in-comment)
   "Adjust the case of the word before point.
@@ -1171,7 +1197,8 @@ and treat `ada-case-strict' as t in code.."
                 ;; referenced in a comment, via
                 ;; ada-case-adjust-at-point.
 
-                (not (ada-in-numeric-literal-p))
+                (not (ada-in-based-numeric-literal-p))
+                ;; don't adjust case on hex digits
                 ))
 
       ;; The indentation engine may trigger a reparse on
@@ -1193,7 +1220,7 @@ and treat `ada-case-strict' as t in code.."
           (not in-comment)
           (not (eq typed-char ?_))
           (ada-after-keyword-p))
-         (funcall ada-case-keyword -1))
+         (ada-case-adjust-keyword))
 
         (t (ada-case-adjust-identifier in-comment))
         ))
@@ -1302,7 +1329,7 @@ Optional PLIST defaults to `ada-prj-current-project'."
        (plist-get prj prop)
 
       ;; no project, just use default vars
-      ;; must match code in ada-prj-default
+      ;; must match code in ada-prj-default, except for src_dir.
       (cl-case prop
        (ada_compiler    ada-compiler)
        (auto_case       ada-auto-case)
@@ -1314,7 +1341,7 @@ Optional PLIST defaults to `ada-prj-current-project'."
                           (list ada-case-exception-file)))
        (path_sep        path-separator)
        (proc_env        process-environment)
-       (src_dir         (list "."))
+       (src_dir         (list (directory-file-name default-directory)))
        (xref_tool       ada-xref-tool)
        ))))
 
@@ -1368,7 +1395,7 @@ Include properties set via 
`ada-prj-default-compiler-alist',
                         (list ada-case-exception-file))
       'path_sep        path-separator;; prj variable so users can override it 
for their compiler
       'proc_env        process-environment
-      'src_dir         (list (if src-dir src-dir "."))
+      'src_dir         (if src-dir (list src-dir) nil)
       'xref_tool       ada-xref-tool
       ))
 
@@ -1398,7 +1425,8 @@ list. Parser must modify or add to the property list and 
return it.")
 (defun ada-parse-prj-file (prj-file)
   "Read Emacs Ada or compiler-specific project file PRJ-FILE, set project 
properties in `ada-prj-alist'."
   ;; Not called ada-prj-parse-file for Ada mode 4.01 compatibility
-  ;; FIXME: use the right name, add an alias
+  ;; FIXME: need to kill gpr-query session if .gpr file has changed (like from 
non-agg to agg!)
+  (run-hooks `ada-prj-parse-hook)
   (let ((project (ada-prj-default))
        (parser (cdr (assoc (file-name-extension prj-file) 
ada-prj-parser-alist))))
 
@@ -1653,15 +1681,27 @@ Indexed by project variable xref_tool.")
   (interactive)
   (message "current Emacs Ada mode project file: %s" ada-prj-current-file))
 
-(defvar ada-prj-show-path nil
+(defvar ada-prj-show-prj-path nil
   ;; Supplied by compiler
-  "Function to show project search path used by compiler (and possibly xref 
tool)."
+  "Function to show project file search path used by compiler (and possibly 
xref tool)."
   )
 
-(defun ada-prj-show-path ()
+(defun ada-prj-show-prj-path ()
   (interactive)
-  (when ada-prj-show-path
-    (funcall ada-prj-show-path)))
+  (when ada-prj-show-prj-path
+    (funcall ada-prj-show-prj-path)))
+
+(defun ada-prj-show-src-path ()
+  "Show the project source file search path."
+  (interactive)
+  (if compilation-search-path
+      (progn
+       (pop-to-buffer (get-buffer-create "*Ada project source file search 
path*"))
+       (erase-buffer)
+       (dolist (file compilation-search-path)
+         (insert (format "%s\n" file))))
+    (message "no project source file search path set")
+    ))
 
 (defvar ada-show-xref-tool-buffer nil
   ;; Supplied by xref tool
@@ -1912,6 +1952,17 @@ other file.")
   (when ada-on-context-clause
     (funcall ada-on-context-clause)))
 
+(defvar ada-in-case-expression nil
+  ;; supplied by indentation engine
+  "Function called with no parameters; it should return non-nil
+  if point is in a case expression.")
+
+(defun ada-in-case-expression ()
+  "See `ada-in-case-expression' variable."
+  (interactive)
+  (when ada-in-case-expression
+    (funcall ada-in-case-expression)))
+
 (defvar ada-goto-subunit-name nil
   ;; supplied by indentation engine
   "Function called with no parameters; if the current buffer
@@ -1984,13 +2035,7 @@ set."
         (error "%s (opened) and %s (found in project) are two different files"
                file-name found-file)))))
 
-(defun ada-find-other-file-noset (other-window)
-  "Same as `ada-find-other-file', but preserve point in the other file,
-don't move to corresponding declaration."
-  (interactive "P")
-  (ada-find-other-file other-window t))
-
-(defun ada-find-other-file (other-window &optional _no-set-point)
+(defun ada-find-other-file (other-window)
   "Move to the corresponding declaration in another file.
 
 - If region is active, assume it contains a package name;
@@ -2010,11 +2055,7 @@ don't move to corresponding declaration."
   on the corresponding specification or body.
 
 If OTHER-WINDOW (set by interactive prefix) is non-nil, show the
-buffer in another window.
-
-If NO-SET-POINT is nil, set point in the other file on the
-corresponding declaration. If non-nil, preserve existing point in
-the other file."
+buffer in another window."
 
   ;; ff-get-file, ff-find-other file first process
   ;; ff-special-constructs, then run the following hooks:
@@ -2029,6 +2070,10 @@ the other file."
   (interactive "P")
   (ada-check-current-project (buffer-file-name))
 
+  ;; clear ff-function-name, so it either ff-special-constructs or
+  ;; ada-which-function will set it.
+  (setq ff-function-name nil)
+
   (cond
    (mark-active
     (setq ff-function-name (buffer-substring-no-properties (point) (mark)))
@@ -2078,9 +2123,9 @@ identifier.  May be an Ada identifier or operator."
     (cond
 
      ((and (= (char-before) ?\")
-           (progn
-             (forward-char -1)
-             (looking-at (concat "\"\\(" ada-operator-re "\\)\""))))
+          (progn
+            (forward-char -1)
+            (looking-at (concat "\"\\(" ada-operator-re "\\)\""))))
       (concat "\"" (match-string-no-properties 1) "\""))
 
      (t
@@ -2088,7 +2133,7 @@ identifier.  May be an Ada identifier or operator."
      ))
 
    ((and (= (char-after) ?\")
-         (looking-at (concat "\"\\(" ada-operator-re "\\)\"")))
+        (looking-at (concat "\"\\(" ada-operator-re "\\)\"")))
     (concat "\"" (match-string-no-properties 1) "\""))
 
    ((looking-at "[a-zA-Z0-9_]+\\|[+\\-*/&=<>]")
@@ -2098,7 +2143,7 @@ identifier.  May be an Ada identifier or operator."
     (error "No identifier around"))
    ))
 
-;; FIXME: use find-tag-marker-ring, ring-insert, pop-tag-mark (see xref.el)
+;; FIXME (for emacs 25): use find-tag-marker-ring, ring-insert, pop-tag-mark 
(see xref.el)
 (defvar ada-goto-pos-ring '()
   "List of positions selected by navigation functions. Used
 to go back to these positions.")
@@ -2123,6 +2168,7 @@ to go back to these positions.")
 (defun ada-goto-source (file line column other-window)
   "Find and select FILE, at LINE and COLUMN.
 FILE may be absolute, or on `compilation-search-path'.
+LINE, COLUMN are Emacs origin.
 
 If OTHER-WINDOW is non-nil, show the buffer in another window."
   (let ((file-1
@@ -2440,10 +2486,10 @@ is currently in.  Called with no parameters.")
   ;; Supplied by indentation engine
   "Function called with no parameters; it should move forward to
 the next keyword in the statement following the one point is
-in (ie from 'if' to 'then').  If not in a keyword, move forward
-to the next keyword in the current statement. If at the last keyword,
-move forward to the first keyword in the next statement or next
-keyword in the containing statement.")
+in (ie from 'if' to 'then'). If not in a keyword, move forward to
+the next keyword in the current statement. If at the last
+keyword, move forward to the first keyword in the next statement
+or next keyword in the containing statement.")
 
 (defvar ada-goto-end nil
   ;; Supplied by indentation engine
@@ -2457,12 +2503,18 @@ Called with no parameters.")
 
 (defun ada-next-statement-keyword ()
   ;; Supplied by indentation engine
-  "See `ada-next-statement-keyword' variable."
+  "See `ada-next-statement-keyword' variable. In addition,
+if on open parenthesis move to matching closing parenthesis."
   (interactive)
-  (when ada-next-statement-keyword
-    (unless (region-active-p)
-      (push-mark))
-    (funcall ada-next-statement-keyword)))
+  (if (= (syntax-class (syntax-after (point))) 4)
+      ;; on open paren
+      (forward-sexp)
+
+    ;; else move by keyword
+    (when ada-next-statement-keyword
+      (unless (region-active-p)
+       (push-mark))
+      (funcall ada-next-statement-keyword))))
 
 (defvar ada-prev-statement-keyword nil
   ;; Supplied by indentation engine
@@ -2472,12 +2524,18 @@ keyword in the statement following the one point is in 
(ie from
 keyword in the previous statement or containing statement.")
 
 (defun ada-prev-statement-keyword ()
-  "See `ada-prev-statement-keyword' variable."
+  "See `ada-prev-statement-keyword' variable. In addition,
+if on close parenthesis move to matching open parenthesis."
   (interactive)
-  (when ada-prev-statement-keyword
-    (unless (region-active-p)
-      (push-mark))
-    (funcall ada-prev-statement-keyword)))
+  (if (= (syntax-class (syntax-after (1- (point)))) 5)
+      ;; on close paren
+      (backward-sexp)
+
+    ;; else move by keyword
+    (when ada-prev-statement-keyword
+      (unless (region-active-p)
+       (push-mark))
+      (funcall ada-prev-statement-keyword))))
 
 ;;;; code creation
 
@@ -2511,17 +2569,22 @@ package body file, containing skeleton code that will 
compile.")
 (defun ada-ff-create-body ()
   ;; no error if not set; let ada-skel do its thing.
   (when ada-make-package-body
-    ;; ff-find-other-file calls us with point in an empty buffer for the
-    ;; body file; ada-make-package-body expects to be in the spec. So go
-    ;; back.
-    (let ((body-file-name (buffer-file-name)))
-      (ff-find-the-other-file)
+    ;; ff-find-other-file calls us with point in an empty buffer for
+    ;; the body file; ada-make-package-body expects to be in the
+    ;; spec. So go back to the spec, and delete the body buffer so it
+    ;; does not get written to disk.
+    (let ((body-buffer (current-buffer))
+         (body-file-name (buffer-file-name)))
+
+      (set-buffer-modified-p nil);; may have a skeleton; allow silent delete
+
+      (ff-find-the-other-file);; back to spec
+
+      (kill-buffer body-buffer)
 
       (ada-make-package-body body-file-name)
-      ;; FIXME (later): if 'ada-make-package-body' fails, delete the body 
buffer
-      ;; so it doesn't get written to disk, and we can try again.
 
-      ;; back to the body, read in from the disk.
+      ;; back to the new body file, read in from the disk.
       (ff-find-the-other-file)
       (revert-buffer t t))
     ))
@@ -2535,11 +2598,21 @@ If POSTFIX and JUSTIFY are non-nil, 
`ada-fill-comment-postfix' is appended
 to each line filled and justified.
 The paragraph is indented on the first line."
   (interactive "P")
-  (if (and (not (ada-in-comment-p))
-          (not (looking-at "[ \t]*--")))
+  (if (not (or (ada-in-comment-p)
+               (looking-at "[ \t]*--")))
       (error "Not inside comment"))
 
-  (let* ((inhibit-modification-hooks t) ;; don't run parser for font-lock; 
comment text is exposed
+  ;; fill-region-as-paragraph leaves comment text exposed (without
+  ;; comment prefix) when inserting a newline; don't trigger a parse
+  ;; because of that (in particular, jit-lock requires a parse; other
+  ;; hooks may as well). In general, we don't need to trigger a parse
+  ;; for comment changes.
+  ;;
+  ;; FIXME: add ada-inibit-parse instead; let other change hooks run.
+  ;; FIXME: wisi-after-change still needs to adjust wisi-cache-max
+  ;; FIXME: even better, consider patch suggested by Stefan Monnier to
+  ;; move almost all code out of the change hooks (see email).
+  (let* ((inhibit-modification-hooks t)
         indent from to
         (opos (point-marker))
         ;; we bind `fill-prefix' here rather than in ada-mode because
@@ -2548,6 +2621,8 @@ The paragraph is indented on the first line."
         (fill-prefix ada-fill-comment-prefix)
         (fill-column (current-fill-column)))
 
+    ;; We should run before-change-functions here, but we don't know from/to 
yet.
+
     ;;  Find end of comment paragraph
     (back-to-indentation)
     (while (and (not (eobp)) (looking-at ".*--[ \t]*[^ \t\n]"))
@@ -2610,13 +2685,11 @@ The paragraph is indented on the first line."
 
     ;; we disabled modification hooks, so font-lock will not run to
     ;; re-fontify the comment prefix; do that here.
-    (when (memq 'jit-lock-after-change after-change-functions)
-      (jit-lock-after-change from to 0))
-    ))
+    ;; FIXME: Use actual original size instead of 0!
+    (run-hook-with-args 'after-change-functions from to 0)))
 
 ;;;; support for font-lock.el
 
-;; casing keywords defined here to keep the two lists together
 (defconst ada-83-keywords
   '("abort" "abs" "accept" "access" "all" "and" "array" "at" "begin"
     "body" "case" "constant" "declare" "delay" "delta" "digits" "do"
@@ -2670,7 +2743,9 @@ The paragraph is indented on the first line."
   (setq local-abbrev-table ada-mode-abbrev-table)
 
   (set (make-local-variable 'syntax-propertize-function) 
'ada-syntax-propertize)
-  (set (make-local-variable 'syntax-begin-function) nil)
+  (when (boundp 'syntax-begin-function)
+    ;; obsolete in emacs-25.1
+    (set (make-local-variable 'syntax-begin-function) nil))
   (set (make-local-variable 'parse-sexp-ignore-comments) t)
   (set (make-local-variable 'parse-sexp-lookup-properties) t)
   (set 'case-fold-search t); Ada is case insensitive; the syntax parsing 
requires this setting
diff --git a/packages/ada-mode/ada-mode.info b/packages/ada-mode/ada-mode.info
index 485adad..a3f0aaa 100644
--- a/packages/ada-mode/ada-mode.info
+++ b/packages/ada-mode/ada-mode.info
@@ -1,4 +1,4 @@
-This is ada-mode.info, produced by makeinfo version 5.2 from
+This is ada-mode.info, produced by makeinfo version 6.0 from
 ada-mode.texi.
 
 Copyright (C) 1999 - 2015 Free Software Foundation, Inc.
@@ -22,7 +22,9 @@ END-INFO-DIR-ENTRY
 
 File: ada-mode.info,  Node: Top,  Next: Overview,  Prev: (dir),  Up: (dir)
 
-Copyright (C) 1999 - 2015 Free Software Foundation, Inc.
+Ada Mode Version 5.1.9
+
+   Copyright (C) 1999 - 2015 Free Software Foundation, Inc.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
@@ -145,15 +147,17 @@ distributed with GNAT GPL 2014.
 
    To build 'gpr_query', assuming GNAT GPL 2014 is installed in
 '/usr/gnat-gpl-2014', and '/usr/gnat-gpl-2014/bin' is in PATH (if you
-are running Windows, use Cygwin bash to run these commands):
+are running Windows, use Cygwin bash to run these commands, with GNAT
+GPL bin first in PATH) (note that gnatcoll-gpl-2014-src.tar.gz unzips to
+gnatcoll-1.7w-src):
 
      tar xf ~/Downloads/gnatcoll-gpl-2014-src.tar.gz
-     cd gnatcoll-gpl-2014-src
-     ./configure --enable-projects --prefix=/usr/gnat-gpl-2014
+     cd gnatcoll-1.7w-src
+     ./configure --prefix=/usr/gnat-gpl-2014
      make
      sudo make install
      cd ~/.emacs.d/elpa/ada-mode-5.xx/build
-     make install-gpr_query
+     make install
 
    To build an sqlite3 executable that is compatible with the database
 created by 'gpr_query':
@@ -332,6 +336,15 @@ the syntax to set a variable is the following:
      Navigate to subprograms and types by name, from a list in a
      dedicated window.
 'which-func'
+'jit-lock-defer-time'
+     In large files, parsing is slow, so it gets in the way of
+     interactive typing due to immediate font-lock triggering a parse.
+     Delay the font-lock by setting an Emacs file-local variable in an
+     Ada comment:
+
+          --  Local Variables:
+          --  jit-lock-defer-time: 0.5
+          --  End:
 
    The above can all be set by the following code in your '~/.emacs'.
 Note that some are functions are added to 'before-save-hook'; they run
@@ -1020,7 +1033,7 @@ line specifies a project variable name and its value, 
separated by "="
 concatenated.
 
    There must be no space between the variable name and "=", and no
-trailing spaces.
+trailing spaces after the value.
 
    The current project file is given by the lisp variable
 'ada-prj-default-project-file', and shown by the menu command <Ada |
@@ -1050,10 +1063,14 @@ File: ada-mode.info,  Node: Project file variables,  
Prev: Project file overview
 ==========================
 
 To set a project variable that is a list, specify each element of the
-list on a separate line in the project file.
+list on a separate line in the project file.  The value on the last line
+is the last element in the list.
 
-   Process environment variables can be referenced using the normal
-'$var' syntax.
+   A variable name that starts with '$' is set as a process environment
+variable, for processes launched from Emacs for the project.
+
+   In variable values, process environment variables can be referenced
+using the normal '$var' syntax.
 
    Most project variables have defaults that can be changed by setting
 elisp variables; the table below identifies the elisp variable for each
@@ -1259,6 +1276,15 @@ can also configure the indentation, via the following 
variables:
      column 0.  Otherwise, they are indented with previous comments or
      code.
 
+'ada-indent-comment-gnat' (default value: nil)
+     If non-nil, comments are indented to meet the GNAT style check; one
+     of:
+        * multiple of 'ada-indent'
+        * next non-blank line
+        * previous non-blank line
+
+     Otherwise, they are indented with previous comments or code.
+
 'ada-indent-label' (default value: -3)
      Number of columns to indent a label.
 
@@ -2437,47 +2463,47 @@ Index
 
 Tag Table:
 Node: Top945
-Node: Overview2576
-Node: Installation3787
-Node: Ada Reference Manual4679
-Node: gpr_query4955
-Node: Upgrading6058
-Node: Customization6630
-Node: Non-standard file names7112
-Node: Other compiler8953
-Node: Other cross-reference9532
-Node: Other customization10557
-Node: Compiling Executing13194
-Node: Compile commands13929
-Node: Compiling Examples16667
-Node: No project files17499
-Node: Set compiler options22865
-Node: Set source search path24827
-Node: Use GNAT project file27280
-Node: Use multiple GNAT project files30054
-Node: Use a Makefile32774
-Node: Compiler errors34089
-Node: Project files34906
-Node: Project file overview35933
-Node: Project file variables37461
-Node: Moving Through Ada Code41091
-Node: Identifier completion43790
-Node: Indentation44752
-Node: Statement skeletons48804
-Node: Aligning code50589
-Node: Automatic casing51534
-Node: Comment Handling54238
-Node: Key summary54757
-Node: Developer overview57384
-Node: Directory structure57724
-Node: Package organization61210
-Node: Ada mode61445
-Node: gpr mode63641
-Node: GNAT core63924
-Node: Wisi64758
-Node: OpenToken65725
-Node: ELPA66327
-Node: GNU Free Documentation License66937
-Node: Index92098
+Node: Overview2603
+Node: Installation3814
+Node: Ada Reference Manual4706
+Node: gpr_query4982
+Node: Upgrading6155
+Node: Customization6727
+Node: Non-standard file names7209
+Node: Other compiler9050
+Node: Other cross-reference9629
+Node: Other customization10654
+Node: Compiling Executing13626
+Node: Compile commands14361
+Node: Compiling Examples17099
+Node: No project files17931
+Node: Set compiler options23297
+Node: Set source search path25259
+Node: Use GNAT project file27712
+Node: Use multiple GNAT project files30486
+Node: Use a Makefile33206
+Node: Compiler errors34521
+Node: Project files35338
+Node: Project file overview36365
+Node: Project file variables37909
+Node: Moving Through Ada Code41754
+Node: Identifier completion44453
+Node: Indentation45415
+Node: Statement skeletons49763
+Node: Aligning code51548
+Node: Automatic casing52493
+Node: Comment Handling55197
+Node: Key summary55716
+Node: Developer overview58343
+Node: Directory structure58683
+Node: Package organization62169
+Node: Ada mode62404
+Node: gpr mode64600
+Node: GNAT core64883
+Node: Wisi65717
+Node: OpenToken66684
+Node: ELPA67286
+Node: GNU Free Documentation License67896
+Node: Index93057
 
 End Tag Table
diff --git a/packages/ada-mode/ada-mode.texi b/packages/ada-mode/ada-mode.texi
index 563ae6f..71b612f 100644
--- a/packages/ada-mode/ada-mode.texi
+++ b/packages/ada-mode/ada-mode.texi
@@ -26,7 +26,7 @@ developing GNU and promoting software freedom.''
 
 @titlepage
 @sp 10
address@hidden Ada Mode Version 5.1.8
address@hidden Ada Mode Version 5.1.9
 @page
 @vskip 0pt plus 1filll
 @insertcopying
@@ -36,6 +36,8 @@ developing GNU and promoting software freedom.''
 
 @node Top, Overview, (dir), (dir)
 
+Ada Mode Version 5.1.9
+
 @ifnottex
 @insertcopying
 @end ifnottex
@@ -136,24 +138,32 @@ tool @code{gpr_query}, which supports Ada, C, C++, and 
any other
 language for which AdaCore gcc provides the @code{-fdump-xref}
 (@code{-fdump-xref} is an AdaCore extension).
 
address@hidden FIXME: list xref features supported by gpr_query but not gnatfind
address@hidden at least:
address@hidden C and C++ source code
address@hidden ada-xref-overriding-function
address@hidden ada-xref-overridden-function
+
 @code{gpr_query} requires the @code{gnatcoll} library provided by
 AdaCore, distributed with GNAT GPL 2014.
 
 To build @code{gpr_query}, assuming GNAT GPL 2014 is installed in
 @file{/usr/gnat-gpl-2014}, and @file{/usr/gnat-gpl-2014/bin} is in
 PATH (if you are running Windows, use Cygwin bash to run these
-commands):
+commands, with GNAT GPL bin first in PATH) (note that
+gnatcoll-gpl-2014-src.tar.gz unzips to gnatcoll-1.7w-src):
 
 @example
 tar xf ~/Downloads/gnatcoll-gpl-2014-src.tar.gz
-cd gnatcoll-gpl-2014-src
-./configure --enable-projects --prefix=/usr/gnat-gpl-2014
+cd gnatcoll-1.7w-src
+./configure --prefix=/usr/gnat-gpl-2014
address@hidden on cygwin, finds cygwin as build type; not a problem
 @c make Gnatcoll_Build=Debug
 @c sudo make Gnatcoll_Build=Debug install
 make
 sudo make install
 cd ~/.emacs.d/elpa/ada-mode-5.xx/build
-make install-gpr_query
+make install
 @end example
 
 To build an sqlite3 executable that is compatible with the database
@@ -329,6 +339,18 @@ Navigate to subprograms and types by name, from a 
minibuffer menu.
 @item speedbar
 Navigate to subprograms and types by name, from a list in a dedicated window.
 @item which-func
address@hidden jit-lock-defer-time
+In large files, parsing is slow, so it gets in the way of
+interactive typing due to immediate font-lock triggering a
+parse. Delay the font-lock by setting an Emacs file-local variable
+in an Ada comment:
+
address@hidden
+--  Local Variables:
+--  jit-lock-defer-time: 0.5
+--  End:
address@hidden example
+
 @end table
 
 The above can all be set by the following code in your
@@ -1061,7 +1083,7 @@ Some variables (like @code{src_dir}) are lists; multiple 
occurrences
 are concatenated.
 
 There must be no space between the variable name and ``='', and no
-trailing spaces.
+trailing spaces after the value.
 
 The current project file is given by the lisp variable
 @code{ada-prj-default-project-file}, and shown by the menu command
@@ -1091,10 +1113,15 @@ just @code{ada-select-prj-file}, or by selecting it 
from the menu.
 @section Project file variables
 
 To set a project variable that is a list, specify each element of the
-list on a separate line in the project file.
+list on a separate line in the project file. The value on the last
+line is the last element in the list.
 
-Process environment variables can be referenced using the
-normal @code{$var} syntax.
+A variable name that starts with @code{$} is set as a process
+environment variable, for processes launched from Emacs for the
+project.
+
+In variable values, process environment variables can be referenced
+using the normal @code{$var} syntax.
 
 Most project variables have defaults that can be changed by setting
 elisp variables; the table below identifies the elisp variable for each
@@ -1188,6 +1215,7 @@ project file.
 @item @code{gpr_project_path}   [default: @code{""}]
 Same as @code{ada_project_path}.
 
address@hidden FIXME: add ada-build project vars
 @end table
 
 @node Moving Through Ada Code, Identifier completion, Project files, Top
@@ -1323,6 +1351,20 @@ Number of columns to indent the continuation of a broken 
line.
 If non-nil, comments currently starting in column 0 are left in column
 0.  Otherwise, they are indented with previous comments or code.
 
address@hidden @code{ada-indent-comment-gnat}  (default value: nil)
+If non-nil, comments are indented to meet the GNAT style check; one
+of:
+   @itemize
+   @item
+   multiple of @code{ada-indent}
+   @item
+   next non-blank line
+   @item
+   previous non-blank line
+   @end itemize
+
+Otherwise, they are indented with previous comments or code.
+
 @item @code{ada-indent-label}            (default value: -3)
 Number of columns to indent a label.
 
diff --git a/packages/ada-mode/ada-ref-man.el b/packages/ada-mode/ada-ref-man.el
old mode 100755
new mode 100644
index d481411..53f60c7
--- a/packages/ada-mode/ada-ref-man.el
+++ b/packages/ada-mode/ada-ref-man.el
@@ -1,6 +1,6 @@
-;;; ada-ref-man.el --- Ada Reference Manual 2012  -*- lexical-binding:t -*-
+;;; ada-ref-man.el --- Ada Reference Manual 2012
 ;;
-;; Copyright (C) 2014-2015  Free Software Foundation, Inc.
+;;; Copyright (C) 2014  Free Software Foundation, Inc.
 ;;
 ;; Author: Stephen Leake <address@hidden>
 ;; Maintainer: Stephen Leake <address@hidden>
diff --git a/packages/ada-mode/ada-wisi-opentoken.el 
b/packages/ada-mode/ada-wisi-opentoken.el
index cd86981..fbc4daf 100644
--- a/packages/ada-mode/ada-wisi-opentoken.el
+++ b/packages/ada-mode/ada-wisi-opentoken.el
@@ -1,5 +1,5 @@
-;;; ada-wisi-opentoken.el --- An indentation function for ada-wisi that 
indents OpenToken  -*- lexical-binding:t -*-
-;; grammar statements nicely.
+;; ada-wisi-opentoken.el --- An indentation function for ada-wisi that indents 
 -*- lexical-binding:t -*-
+;; OpenTokengrammar statements nicely.
 
 ;; Copyright (C) 2013-2015  Free Software Foundation, Inc.
 
diff --git a/packages/ada-mode/ada-wisi.el b/packages/ada-mode/ada-wisi.el
index 6d53739..e076bc0 100644
--- a/packages/ada-mode/ada-wisi.el
+++ b/packages/ada-mode/ada-wisi.el
@@ -2,7 +2,7 @@
 ;;
 ;; [1] ISO/IEC 8652:2012(E); Ada 2012 reference manual
 ;;
-;; Copyright (C) 2012 - 2015  Free Software Foundation, Inc.
+;; Copyright (C) 2012 - 2016  Free Software Foundation, Inc.
 ;;
 ;; Author: Stephen Leake <address@hidden>
 ;;
@@ -135,7 +135,11 @@ if in paren, pos following paren."
        ;; test/ada_mode-opentoken.ads
        ;; private package GDS.Commands.Add_Statement is
        ;;    type Instance is new Nonterminal.Instance with null record;
-       offset)
+       ;;
+       ;; test/ada_mode-nominal.adb
+       ;;     return B : Integer :=
+       ;;       (Local_Function);
+       (+ indent offset))
 
        ((eq 'label_opt (wisi-cache-token cache))
        (+ indent (- ada-indent-label) offset))
@@ -302,6 +306,17 @@ point must be on CACHE. PREV-TOKEN is the token before the 
one being indented."
         ;; defer to after-cache)
         nil)
 
+       (list-break
+       ;; test/ada_mode-parens.adb
+        ;; Foo (X
+        ;;        ,    --  used to get an error here; don't care about the 
actual indentation
+        ;; indenting ','
+        ;;
+        ;; We don't actually care what the indentation is, since this
+        ;; should only occur while editing; defer to after-cache
+        ;; avoids an error and does something reasonable.
+        nil)
+
        (name
         (cond
          ((let ((temp (save-excursion (wisi-goto-containing cache))))
@@ -564,6 +579,7 @@ point must be on CACHE. PREV-TOKEN is the token before the 
one being indented."
                     (+ (current-column) ada-indent-broken))
 
                    ((full_type_declaration
+                      protected_type_declaration
                      single_protected_declaration
                      single_task_declaration
                      subtype_declaration
@@ -669,10 +685,21 @@ point must be on CACHE. PREV-TOKEN is the token before 
the one being indented."
                       ))
 
                    (private_extension_declaration
-                    ;; test/ada_mode-nominal.ads
-                    ;; type Limited_Derived_Type_3 is abstract limited
-                    ;;   new Private_Type_1 with private;
-                    (+ (current-indentation) ada-indent-broken))
+                    (cl-ecase (wisi-cache-token cache)
+                      (WITH
+                       ;; test/aspects.ads
+                       ;; type Date_Set is tagged private
+                       ;; with
+                       ;; indenting 'with'
+                       (current-indentation))
+
+                      (t
+                       ;; test/ada_mode-nominal.ads
+                       ;; type Limited_Derived_Type_3 is abstract limited
+                       ;;   new Private_Type_1 with private;
+                       ;; indenting 'new'
+                       (+ (current-indentation) ada-indent-broken))
+                      ))
 
                    (private_type_declaration
                     ;; test/aspects.ads
@@ -703,7 +730,12 @@ point must be on CACHE. PREV-TOKEN is the token before the 
one being indented."
                        (ada-wisi-indent-cache ada-indent-broken cache))
                       ))
 
-                   ((subprogram_body subprogram_declaration 
subprogram_specification null_procedure_declaration)
+                   ((abstract_subprogram_declaration
+                     expression_function_declaration
+                     subprogram_body
+                     subprogram_declaration
+                     subprogram_specification
+                     null_procedure_declaration)
                     (cl-ecase (wisi-cache-token cache)
                       (IS
                        ;; test/ada_mode-nominal.ads
@@ -761,9 +793,6 @@ point must be on CACHE. PREV-TOKEN is the token before the 
one being indented."
                 (list-break
                  (ada-wisi-indent-list-break cache prev-token))
 
-                (statement-other
-                 ;; defer to ada-wisi-after-cache
-                 nil)
                 ))))
             ))
        ))
@@ -1104,11 +1133,15 @@ cached token, return new indentation for point."
                  ;; type Synchronized_Formal_Derived_Type is abstract 
synchronized new Formal_Private_Type and Interface_Type
                  ;;   with private;
 
-                 subtype_declaration)
-                ;; test/ada_mode-nominal.ads
-                ;;    subtype Subtype_2 is Signed_Integer_Type range 10 ..
-                ;;      20;
+                 subtype_declaration
+                 ;; test/ada_mode-nominal.ads
+                 ;;    subtype Subtype_2 is Signed_Integer_Type range 10 ..
+                 ;;      20;
 
+                 private_type_declaration
+                 ;; type Private_Type_2 is abstract tagged limited
+                 ;;  private;
+                 )
                 (+ (current-column) ada-indent-broken))
 
                (null_procedure_declaration
@@ -1228,8 +1261,47 @@ cached token, return new indentation for point."
       ;; would align the comment with the block-middle, which is wrong. So
       ;; we only call ada-wisi-after-cache.
 
-      ;; FIXME: need option to match gnat style check; change indentation to 
match (ie mod 3)
-      (ada-wisi-after-cache))
+      (let ((indent (ada-wisi-after-cache))
+           prev-indent next-indent)
+       (if ada-indent-comment-gnat
+         ;; match the gnat comment indent style check; comments must
+         ;; be aligned to one of:
+         ;;
+         ;; - multiple of ada-indent
+         ;; - next non-blank line
+         ;; - previous non-blank line
+         ;;
+         ;; Note that we must indent the prev and next lines, in case
+         ;; they are not currently correct.
+         (cond
+          ((= 0 (% indent ada-indent))
+           ;; this will handle comments at bob and eob, so we don't
+           ;; need to worry about those positions in the next checks.
+           indent)
+
+          ((and (setq prev-indent
+                      (save-excursion (forward-line 
-1)(indent-according-to-mode)(current-indentation)))
+                (= indent prev-indent))
+           indent)
+
+          ((and (setq next-indent
+                      ;; we use forward-comment here, instead of
+                      ;; forward-line, because consecutive comment
+                      ;; lines are indented to the current one, which
+                      ;; we don't know yet.
+                      (save-excursion (forward-comment 
(point-max))(indent-according-to-mode)(current-indentation)))
+                (= indent next-indent))
+           indent)
+
+          (t
+           (or
+            prev-indent
+            next-indent
+            (floor indent ada-indent)))
+          )
+
+         ;; not forcing gnat style
+         indent)))
 
       (t
        ;; comment is after a comment
@@ -1295,6 +1367,17 @@ cached token, return new indentation for point."
           (memq (wisi-cache-nonterm cache) '(use_clause with_clause))
           ))))
 
+(defun ada-wisi-in-case-expression ()
+  "For `ada-in-case-expression'."
+  (save-excursion
+    ;; Used by ada-align, which does indent, which will require parse
+    ;; We know we are in a paren.
+    (ada-goto-open-paren 1)
+    (let ((cache (wisi-get-cache (point))))
+      (and cache
+          (eq (wisi-cache-nonterm cache) 'case_expression)))
+    ))
+
 (defun ada-wisi-goto-subunit-name ()
   "For `ada-goto-subunit-name'."
   (wisi-validate-cache (point-max))
@@ -1356,7 +1439,10 @@ Also return cache at start."
                    ((protected_body protected_type_declaration 
single_protected_declaration)
                     (eq (wisi-cache-token cache) 'PROTECTED))
 
-                   ((subprogram_body subprogram_declaration 
null_procedure_declaration)
+                   ((abstract_subprogram_declaration
+                     subprogram_body
+                     subprogram_declaration
+                     null_procedure_declaration)
                     (memq (wisi-cache-token cache) '(NOT OVERRIDING FUNCTION 
PROCEDURE)))
 
                    (task_type_declaration
@@ -1439,11 +1525,11 @@ Also return cache at start."
       (when first (setq first nil)))
     ))
 
-(defun ada-wisi-in-paramlist-p ()
+(defun ada-wisi-in-paramlist-p (&optional parse-result)
   "For `ada-in-paramlist-p'."
   (wisi-validate-cache (point))
   ;; (info "(elisp)Parser State" "*syntax-ppss*")
-  (let* ((parse-result (syntax-ppss))
+  (let ((parse-result (or parse-result (syntax-ppss)))
         cache)
     (and (> (nth 0 parse-result) 0)
         ;; cache is nil if the parse failed
@@ -1534,6 +1620,10 @@ Also return cache at start."
        (setq default-begin (point))
        (wisi-forward-find-token 'SEMICOLON end t))
 
+       ((equal token 'LEFT_PAREN)
+       ;; anonymous access procedure type
+       (goto-char (scan-sexps (1- (point)) 1)))
+
        ((member token '(SEMICOLON RIGHT_PAREN))
        (when (not type-end)
          (setq type-end (save-excursion (backward-char 1) 
(skip-syntax-backward " ") (point))))
@@ -1575,6 +1665,7 @@ Also return cache at start."
   (let* ((cache (wisi-forward-find-class 'name (point-max)))
          (result (wisi-cache-text cache)))
 
+    ;; See comment at ada-mode.el on why we don't overwrite ff-function-name.
     (when (not ff-function-name)
       (setq ff-function-name
            (concat
@@ -1595,12 +1686,11 @@ Also return cache at start."
          ;; bob or failed parse
          (setq result "")
 
-       (cl-case (wisi-cache-nonterm cache)
-         ((generic_package_declaration generic_subprogram_declaration)
-          ;; name is after next statement keyword
-          (wisi-next-statement-cache cache)
-          (setq cache (wisi-get-cache (point))))
-         )
+       (when (memq (wisi-cache-nonterm cache)
+                   '(generic_package_declaration 
generic_subprogram_declaration))
+         ;; name is after next statement keyword
+         (wisi-next-statement-cache cache)
+         (setq cache (wisi-get-cache (point))))
 
        ;; add or delete 'body' as needed
        (cl-ecase (wisi-cache-nonterm cache)
@@ -1617,7 +1707,8 @@ Also return cache at start."
          ((protected_type_declaration single_protected_declaration)
           (setq result (ada-wisi-which-function-1 "protected" t)))
 
-         ((subprogram_declaration
+         ((abstract_subprogram_declaration
+           subprogram_declaration
            generic_subprogram_declaration ;; after 'generic'
            null_procedure_declaration)
           (setq result (ada-wisi-which-function-1
@@ -1761,6 +1852,7 @@ TOKEN-TEXT; move point to just past token."
 (setq ada-make-subprogram-body 'ada-wisi-make-subprogram-body)
 (setq ada-next-statement-keyword 'wisi-forward-statement-keyword)
 (setq ada-on-context-clause 'ada-wisi-on-context-clause)
+(setq ada-in-case-expression 'ada-wisi-in-case-expression)
 (setq ada-prev-statement-keyword 'wisi-backward-statement-keyword)
 (setq ada-reset-parser 'wisi-invalidate-cache)
 (setq ada-scan-paramlist 'ada-wisi-scan-paramlist)
diff --git a/packages/ada-mode/ada-xref.el b/packages/ada-mode/ada-xref.el
index e58cba8..6816d8a 100644
--- a/packages/ada-mode/ada-xref.el
+++ b/packages/ada-mode/ada-xref.el
@@ -1,4 +1,5 @@
 ;;; ada-xref.el --- Dummy file to hide obsolete bundled version  -*- 
lexical-binding:t -*-
+;;; see xref-ada.el for Emacs 25 xref minor mode for ada-mode
 (require 'ada-mode)
 (provide 'ada-xref)
 (message "'ada-xref' is obsolete; use 'ada-mode' instead")
diff --git a/packages/ada-mode/gnat-core.el b/packages/ada-mode/gnat-core.el
index ff62610..f8d4f31 100644
--- a/packages/ada-mode/gnat-core.el
+++ b/packages/ada-mode/gnat-core.el
@@ -56,16 +56,16 @@
 
     project))
 
-(defun gnat-prj-show-path ()
-  "For `ada-prj-show-path'."
+(defun gnat-prj-show-prj-path ()
+  "For `ada-prj-show-prj-path'."
     (interactive)
   (if (ada-prj-get 'prj_dir)
       (progn
-       (pop-to-buffer (get-buffer-create "*GNAT project search path*"))
+       (pop-to-buffer (get-buffer-create "*GNAT project file search path*"))
        (erase-buffer)
        (dolist (file (ada-prj-get 'prj_dir))
          (insert (format "%s\n" file))))
-    (message "no GNAT project search path files")
+    (message "no project file search path set")
     ))
 
 (defun gnat-prj-parse-emacs-one (name value project)
@@ -147,7 +147,7 @@ Uses 'gnat list'.  Returns new (SRC-DIRS PRJ-DIRS)."
          (while (not (looking-at "^$"))
            (back-to-indentation)
            (if (looking-at "<Current_Directory>")
-                (cl-pushnew "." prj-dirs :test #'equal)
+                (cl-pushnew (directory-file-name default-directory) prj-dirs 
:test #'equal)
               (let ((f (expand-file-name
                         (buffer-substring-no-properties (point) 
(point-at-eol)))))
                 (cl-pushnew f prj-dirs :test #'equal)
@@ -162,15 +162,16 @@ Uses 'gnat list'.  Returns new (SRC-DIRS PRJ-DIRS)."
        ))
     (list src-dirs prj-dirs)))
 
+;; FIXME: use a dispatching function instead, with autoload, to
+;; avoid "require" here, and this declare
+;; Using 'require' at top level gives the wrong default ada-xref-tool
+(declare-function gpr-query-get-src-dirs "gpr-query.el" (src-dirs))
+(declare-function gpr-query-get-prj-dirs "gpr-query.el" (prj-dirs))
 (defun gnat-get-paths (project)
   "Add project and/or compiler source, project paths to PROJECT src_dir and/or 
prj_dir."
   (let ((src-dirs (ada-prj-get 'src_dir project))
        (prj-dirs (ada-prj-get 'prj_dir project)))
 
-    ;; FIXME: use a dispatching function instead, with autoload, to
-    ;; avoid "require" here, which gives "warning: function not
-    ;; known".
-    ;; Using 'require' at top level gives the wrong default ada-xref-tool
     (cl-ecase (ada-prj-get 'xref_tool project)
       (gnat
        (let ((res (gnat-get-paths-1 src-dirs prj-dirs)))
@@ -378,6 +379,7 @@ list."
   '(("a-textio" . "Ada.Text_IO")
     ("a-chahan" . "Ada.Characters.Handling")
     ("a-comlin" . "Ada.Command_Line")
+    ("a-contai" . "Ada.Containers")
     ("a-except" . "Ada.Exceptions")
     ("a-numeri" . "Ada.Numerics")
     ("a-string" . "Ada.Strings")
@@ -397,7 +399,7 @@ list."
 (defun ada-gnat-ada-name-from-file-name (file-name)
   "For `ada-ada-name-from-file-name'."
   (let* ((ada-name (file-name-sans-extension (file-name-nondirectory 
file-name)))
-         (predefined (cdr (assoc ada-name ada-gnat-predefined-package-alist))))
+        (predefined (cdr (assoc ada-name ada-gnat-predefined-package-alist))))
 
     (if predefined
         predefined
@@ -419,19 +421,15 @@ list."
   ;; contain path info. So we pass a directory to gnat-run-no-prj.
   (let ((start-buffer (current-buffer))
        (start-file (buffer-file-name))
-       ;; can also specify gnat stub options/switches in .gpr file, in package 
'gnatstub'.
        (opts (when (ada-prj-get 'gnat_stub_opts)
                (split-string (ada-prj-get 'gnat_stub_opts))))
        (switches (when (ada-prj-get 'gnat_stub_switches)
                    (split-string (ada-prj-get 'gnat_stub_switches))))
+       (process-environment (ada-prj-get 'proc_env)) ;; for GPR_PROJECT_PATH
        )
 
-    ;; Make sure all relevant files are saved to disk. This also saves
-    ;; the bogus body buffer created by ff-find-the-other-file, so we
-    ;; need -f gnat stub option. We won't get here if there is an
-    ;; existing body file.
+    ;; Make sure all relevant files are saved to disk.
     (save-some-buffers t)
-    (cl-pushnew "-f" opts :test #'equal)
     (with-current-buffer (gnat-run-buffer)
       (gnat-run-no-prj
        (append (list "stub") opts (list start-file "-cargs") switches)
diff --git a/packages/ada-mode/gnat-inspect.el 
b/packages/ada-mode/gnat-inspect.el
deleted file mode 100644
index b7b839b..0000000
--- a/packages/ada-mode/gnat-inspect.el
+++ /dev/null
@@ -1,571 +0,0 @@
-;;; gnat-inspect.el --- Minor-mode for navigating sources using gnatinspect  
-*- lexical-binding:t -*-
-
-;; gnatinspect supports Ada and any gcc language that supports the
-;; -fdump-xref switch (which includes C, C++).
-;;
-;; Copyright (C) 2013-2015  Free Software Foundation, Inc.
-
-;; Author: Stephen Leake <address@hidden>
-;; Maintainer: Stephen Leake <address@hidden>
-;; Version: 1.0
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
-
-;;; Usage:
-;;
-;; M-x gnat-inspect
-
-(require 'ada-mode) ;; for ada-prj-*, some other things
-(require 'cl-lib)
-(require 'compile)
-
-;;;;; sessions
-
-;; gnatinspect reads the project files and the database at startup,
-;; which is noticeably slow for a reasonably sized project. But
-;; running queries after startup is fast. So we leave gnatinspect
-;; running, and send it new queries via stdin, getting responses via
-;; stdout.
-;;
-;; We maintain a cache of active sessions, one per gnat project.
-
-(cl-defstruct (gnat-inspect--session)
-  (process nil) ;; running gnatinspect
-  (buffer nil)  ;; receives output of gnatinspect
-  (sent-kill-p nil)
-  (closed-p nil))
-
-(defconst gnat-inspect-buffer-name-prefix " *gnatinspect-")
-
-(defun gnat-inspect--start-process (session)
-  "Start the session process running gnatinspect."
-  (unless (buffer-live-p (gnat-inspect--session-buffer session))
-    ;; user may have killed buffer
-    (setf (gnat-inspect--session-buffer session) (gnat-run-buffer 
gnat-inspect-buffer-name-prefix)))
-
-  (with-current-buffer (gnat-inspect--session-buffer session)
-    (let ((process-environment (ada-prj-get 'proc_env)) ;; for GPR_PROJECT_PATH
-
-         ;; WORKAROUND: gnatinspect from gnatcoll-1.6w-20130902 can't handle 
aggregate projects; M910-032
-         (project-file (file-name-nondirectory
-                        (ada-prj-get 'gpr_file))))
-      (erase-buffer); delete any previous messages, prompt
-      (setf (gnat-inspect--session-process session)
-           ;; FIXME: need good error message on bad project file:
-           ;;          "can't handle aggregate projects?")
-           (start-process (concat "gnatinspect " (buffer-name))
-                          (gnat-inspect--session-buffer session)
-                          "gnatinspect"
-                          (concat "--project=" project-file)))
-      (set-process-query-on-exit-flag (gnat-inspect--session-process session) 
nil)
-      (gnat-inspect-session-wait session)
-      )))
-
-(defun gnat-inspect--make-session ()
-  "Create and return a session for the current project file."
-  (let ((session
-        (make-gnat-inspect--session
-         :buffer (gnat-run-buffer gnat-inspect-buffer-name-prefix))))
-    (gnat-inspect--start-process session)
-    session))
-
-(defvar gnat-inspect--sessions '()
-  "Assoc list of sessions, indexed by absolute GNAT project file name.")
-
-(defun gnat-inspect-cached-session ()
-  "Return a session for the current project file, creating it if necessary."
-  (gnat-inspect-ensure-gpr)
-
-  (let* ((session (cdr (assoc ada-prj-current-file gnat-inspect--sessions))))
-    (if session
-       (progn
-         (unless (process-live-p (gnat-inspect--session-process session))
-           (gnat-inspect--start-process session))
-         session)
-      ;; else
-      (prog1
-          (setq session (gnat-inspect--make-session))
-       (setq gnat-inspect--sessions
-             (cl-acons ada-prj-current-file session gnat-inspect--sessions))))
-    ))
-
-(defun gnat-inspect-show-session-buffer ()
-  (interactive)
-  (pop-to-buffer (gnat-inspect-cached-session)))
-
-(defconst gnat-inspect-prompt "^>>> $"
-  ;; gnatinspect output ends with this
-  "Regexp matching gnatinspect prompt; indicates previous command is 
complete.")
-
-(defun gnat-inspect-session-wait (session)
-  "Wait for the current command to complete."
-  (unless (process-live-p (gnat-inspect--session-process session))
-    (error "gnatinspect process failed"))
-
-  (with-current-buffer (gnat-inspect--session-buffer session)
-    (let ((process (gnat-inspect--session-process session))
-         (search-start (point-min))
-         (wait-count 0))
-      (while (progn
-              ;; process output is inserted before point, so move back over it 
to search it
-              (goto-char search-start)
-              (not (re-search-forward gnat-inspect-prompt (point-max) 1)));; 
don't search same text again
-       (setq search-start (point))
-       (message (concat "running gnatinspect ..." (make-string wait-count ?.)))
-       (accept-process-output process 1.0)
-       (setq wait-count (1+ wait-count)))
-      (message (concat "running gnatinspect ... done"))
-      )))
-
-(defun gnat-inspect-session-send (cmd wait)
-  "Send CMD to gnatinspect session for current project.
-If WAIT is non-nil, wait for command to complete.
-Return buffer that holds output."
-  (let ((session (gnat-inspect-cached-session)))
-    (with-current-buffer (gnat-inspect--session-buffer session)
-      (erase-buffer)
-      (process-send-string (gnat-inspect--session-process session)
-                          (concat cmd "\n"))
-      (when wait
-       (gnat-inspect-session-wait session))
-      (current-buffer)
-      )))
-
-(defun gnat-inspect-kill-all-sessions ()
-  (interactive)
-  (let ((count 0))
-    (mapc (lambda (assoc)
-           (let ((session (cdr assoc)))
-             (when (process-live-p (gnat-inspect--session-process session))
-               (setq count (1+ count))
-               (process-send-string (gnat-inspect--session-process session) 
"exit\n")
-               )))
-           gnat-inspect--sessions)
-    (message "Killed %d sessions" count)
-    ))
-
-;;;;; utils
-
-(defun gnat-inspect-ensure-gpr ()
-  (unless (ada-prj-get 'gpr_file)
-    (error "no gpr file specified")))
-
-(defconst gnat-inspect-ident-file-regexp
-  ;; 
Write_Message:C:\Projects\GDS\work_dscovr_release\common\1553\gds-mil_std_1553-utf.ads:252:25
-  ;; 
Write_Message:/Projects/GDS/work_dscovr_release/common/1553/gds-mil_std_1553-utf.ads:252:25
-  
"\\([^:]*\\):\\(\\(?:.:\\\|/\\)[^:]*\\):\\([0123456789]+\\):\\([0123456789]+\\)"
-  "Regexp matching <identifier>:<file>:<line>:<column>")
-
-(defconst gnat-inspect-ident-file-regexp-alist
-  (list (concat "^" gnat-inspect-ident-file-regexp) 2 3 4)
-  "For compilation-error-regexp-alist, matching `gnatinspect 
overriding_recursive' output")
-
-(defconst gnat-inspect-ident-file-type-regexp
-  (concat gnat-inspect-ident-file-regexp " (\\(.*\\))")
-  "Regexp matching <identifier>:<file>:<line>:<column> (<type>)")
-
-(defconst gnat-inspect-ident-file-scope-regexp-alist
-  ;; RX_Enable:C:\common\1553\gds-hardware-bus_1553-raw_read_write.adb:163:13 
(write reference) 
scope=New_Packet_TX:C:\common\1553\gds-hardware-bus_1553-raw_read_write.adb:97:14
-
-  (list (concat
-        gnat-inspect-ident-file-regexp
-        " (.*) "
-        "scope="
-        gnat-inspect-ident-file-regexp
-        )
-       2 3 4;; file line column
-       ;; 2 ;; type = error
-       ;; nil ;; hyperlink
-       ;; (list 4 'gnat-inspect-scope-secondary-error)
-       )
-  "For compilation-error-regexp-alist, matching `gnatinspect refs' output")
-
-;; debugging:
-;; in *compilation-gnatinspect-refs*, run
-;;  (progn (set-text-properties (point-min)(point-max) 
nil)(compilation-parse-errors (point-min)(point-max) 
gnat-inspect-ident-file-scope-regexp-alist))
-
-(defun gnat-inspect-compilation (identifier file line col cmd comp-err)
-  "Run gnatinspect IDENTIFIER:FILE:LINE:COL CMD,
-set compilation-mode with compilation-error-regexp-alist set to COMP-ERR."
-  (gnat-inspect-ensure-gpr)
-
-  (let ((cmd-1 (format "%s %s:%s:%d:%d" cmd identifier file line col))
-       (result-count 0)
-       file line column)
-    (with-current-buffer (gnat-inspect--session-buffer 
(gnat-inspect-cached-session))
-      (compilation-mode)
-      (setq buffer-read-only nil)
-      (set (make-local-variable 'compilation-error-regexp-alist) (list 
comp-err))
-      (gnat-inspect-session-send cmd-1 t)
-      ;; at EOB. gnatinspect returns one line per result
-      (setq result-count (- (line-number-at-pos) 1))
-      (if (fboundp 'font-lock-ensure)
-          (font-lock-ensure)
-        (with-no-warnings (font-lock-fontify-buffer)))
-      ;; font-lock-fontify-buffer applies compilation-message text properties
-      ;; NOTE: Won't be needed in 24.5 any more, since compilation-next-error
-      ;; will apply compilation-message text properties on the fly.
-      ;; IMPROVEME: for some reason, next-error works, but the font
-      ;; colors are not right (no koolaid!)
-      (goto-char (point-min))
-
-      (cl-case result-count
-       (0
-        (error "gnatinspect returned no results"))
-       (1
-        ;; just go there, don't display session-buffer. We have to
-        ;; fetch the compilation-message while in the session-buffer.
-        (let* ((msg (compilation-next-error 0 nil (point-min)))
-                ;; FIXME: Woah!  This is messing with very internal details!
-               (loc (compilation--message->loc msg)))
-          (setq file (caar (compilation--loc->file-struct loc))
-                line (caar (cddr (compilation--loc->file-struct loc)))
-                column (1- (compilation--loc->col loc)))
-          ))
-
-       ));; case, with-currrent-buffer
-
-    ;; compilation-next-error-function assumes there is not at error
-    ;; at point-min; work around that by moving forward 0 errors for
-    ;; the first one.
-    (if (> result-count 1)
-       ;; more than one result; display session buffer
-       (next-error 0 t)
-      ;; else don't display
-      (ada-goto-source file line column nil))
-    ))
-
-(defun gnat-inspect-dist (found-line line found-col col)
-  "Return non-nil if found-line, -col is closer to line, col than 
min-distance."
-  (+ (abs (- found-line line))
-     (* (abs (- found-col col)) 250)))
-
-;;;;; user interface functions
-
-(defun gnat-inspect-refresh ()
-  "For `ada-xref-refresh-function', using gnatinspect."
-  (interactive)
-  (gnat-inspect-session-send "refresh" t))
-
-(defun gnat-inspect-other (identifier file line col)
-  "For `ada-xref-other-function', using gnatinspect."
-  (when (eq ?\" (aref identifier 0))
-    ;; gnatinspect wants the quotes stripped
-    (setq col (+ 1 col))
-    (setq identifier (substring identifier 1 (1- (length identifier))))
-    )
-
-  (let ((cmd (format "refs %s:%s:%d:%d" identifier (file-name-nondirectory 
file) line col))
-       (decl-loc nil)
-       (body-loc nil)
-       (search-type nil)
-       (min-distance (1- (expt 2 29)))
-       (result nil))
-
-    (with-current-buffer (gnat-inspect-session-send cmd t)
-      ;; 'gnatinspect refs' returns a list containing the declaration,
-      ;; the body, and all the references, in no particular order.
-      ;;
-      ;; We search the list, looking for the input location,
-      ;; declaration and body, then return the declaration or body as
-      ;; appropriate.
-      ;;
-      ;; the format of each line is name:file:line:column (type) 
scope=name:file:line:column
-      ;;                            1    2    3    4       5
-      ;;
-      ;; 'type' can be:
-      ;;   body
-      ;;   declaration
-      ;;   full declaration  (for a private type)
-      ;;   implicit reference
-      ;;   reference
-      ;;   static call
-      ;;
-      ;; 
Module_Type:/home/Projects/GDS/work_stephe_2/common/1553/gds-hardware-bus_1553-wrapper.ads:171:9
 (full declaration) 
scope=Wrapper:/home/Projects/GDS/work_stephe_2/common/1553/gds-hardware-bus_1553-wrapper.ads:49:31
-      ;;
-      ;; 
itc_assert:/home/Projects/GDS/work_stephe_2/common/itc/opsim/itc_dscovr_gdsi/Gds1553/src/Gds1553.cpp:830:9
 (reference) 
scope=Gds1553WriteSubaddress:/home/Projects/GDS/work_stephe_2/common/itc/opsim/itc_dscovr_gdsi/Gds1553/inc/Gds1553.hpp:173:24
-
-      (message "parsing result ...")
-
-      (goto-char (point-min))
-
-      (while (not (eobp))
-       (cond
-        ((looking-at gnat-inspect-ident-file-type-regexp)
-         ;; process line
-         (let* ((found-file (expand-file-name (match-string 2)));; converts 
Windows to normal
-                (found-line (string-to-number (match-string 3)))
-                (found-col  (string-to-number (match-string 4)))
-                (found-type (match-string 5))
-                (dist       (gnat-inspect-dist found-line line found-col col))
-                )
-
-           (when (string-equal found-type "declaration")
-             (setq decl-loc (list found-file found-line (1- found-col))))
-
-           (when (or
-                  (string-equal found-type "body")
-                  (string-equal found-type "full declaration"))
-             (setq body-loc (list found-file found-line (1- found-col))))
-
-           (when
-               ;; In general, we don't know where in the gnatinspect
-               ;; output the search item occurs, so we search for it.
-               ;;
-               ;; We use the same distance algorithm as gnatinspect
-               ;; to allow a fuzzy match on edited code.
-               (and (equal found-file file)
-                    (< dist min-distance))
-             (setq min-distance dist)
-             (setq search-type found-type))
-           ))
-
-        (t ;; ignore line
-         ;;
-         ;; This skips GPR_PROJECT_PATH and echoed command at start of buffer.
-         ;;
-         ;; It also skips warning lines. For example,
-         ;; gnatcoll-1.6w-20130902 can't handle the Auto_Text_IO
-         ;; language, because it doesn't use the gprconfig
-         ;; configuration project. That gives lines like:
-         ;;
-         ;; common_text_io.gpr:15:07: language unknown for 
"gds-hardware-bus_1553-time_tone.ads"
-         ;;
-         ;; There are probably other warnings that might be reported as well.
-         )
-        )
-       (forward-line 1)
-       )
-
-      (cond
-       ((null search-type)
-       (error "gnatinspect did not return other item; refresh?"))
-
-       ((and
-        (string-equal search-type "declaration")
-        body-loc)
-       (setq result body-loc))
-
-       (decl-loc
-       (setq result decl-loc))
-       )
-
-      (when (null result)
-       (error "gnatinspect did not return other item; refresh?"))
-
-      (message "parsing result ... done")
-      result)))
-
-(defun gnat-inspect-all (identifier file line col)
-  "For `ada-xref-all-function', using gnatinspect."
-  ;; This will in general return a list of references, so we use
-  ;; `compilation-start' to run gnatinspect, so the user can navigate
-  ;; to each result in turn via `next-error'.
-  (gnat-inspect-compilation identifier file line col "refs" 
'gnat-inspect-ident-file))
-
-(defun gnat-inspect-parents (identifier file line col)
-  "For `ada-xref-parent-function', using gnatinspect."
-  (gnat-inspect-compilation identifier file line col "parent_types" 
'gnat-inspect-ident-file))
-
-(defun gnat-inspect-overriding (identifier file line col)
-  "For `ada-xref-overriding-function', using gnatinspect."
-  (gnat-inspect-compilation identifier file line col "overridden_recursive" 
'gnat-inspect-ident-file))
-
-(defun gnat-inspect-overridden-1 (identifier file line col)
-  "For `ada-xref-overridden-function', using gnatinspect."
-  (unless (ada-prj-get 'gpr_file)
-    (error "no gnat project file defined."))
-
-  (when (eq ?\" (aref identifier 0))
-    ;; gnatinspect wants the quotes stripped
-    (setq col (+ 1 col))
-    (setq identifier (substring identifier 1 (1- (length identifier))))
-    )
-
-  (let ((cmd (format "overrides %s:%s:%d:%d" identifier 
(file-name-nondirectory file) line col))
-       result)
-    (with-current-buffer (gnat-inspect-session-send cmd t)
-
-      (goto-char (point-min))
-      (when (looking-at gnat-inspect-ident-file-regexp)
-       (setq result
-             (list
-              (match-string 2)
-              (string-to-number (match-string 3))
-              (string-to-number (match-string 4)))))
-
-      (when (null result)
-       (error "gnatinspect did not return other item; refresh?"))
-
-      (message "parsing result ... done")
-      result)))
-
-(defun gnat-inspect-overridden (other-window)
-  "Move to the overridden declaration of the identifier around point.
-If OTHER-WINDOW (set by interactive prefix) is non-nil, show the
-buffer in another window."
-  (interactive "P")
-
-  (let ((target
-        (gnat-inspect-overridden-1
-         (thing-at-point 'symbol)
-         (buffer-file-name)
-         (line-number-at-pos)
-         (save-excursion
-           (goto-char (car (bounds-of-thing-at-point 'symbol)))
-           (1+ (current-column)))
-         )))
-
-    (ada-goto-source (nth 0 target)
-                    (nth 1 target)
-                    (nth 2 target)
-                    other-window)
-    ))
-
-(defun gnat-inspect-goto-declaration (other-window)
-  "Move to the declaration or body of the identifier around point.
-If at the declaration, go to the body, and vice versa. If at a
-reference, goto the declaration.
-
-If OTHER-WINDOW (set by interactive prefix) is non-nil, show the
-buffer in another window."
-  (interactive "P")
-
-  (let ((target
-        (gnat-inspect-other
-         (thing-at-point 'symbol)
-         (buffer-file-name)
-         (line-number-at-pos)
-         (save-excursion
-           (goto-char (car (bounds-of-thing-at-point 'symbol)))
-           (1+ (current-column)))
-         )))
-
-    (ada-goto-source (nth 0 target)
-                    (nth 1 target)
-                    (nth 2 target)
-                    other-window)
-    ))
-
-(defvar gnat-inspect-map
-  (let ((map (make-sparse-keymap)))
-    ;; C-c C-i prefix for gnat-inspect minor mode
-
-    (define-key map "\C-c\C-i\C-d" 'gnat-inspect-goto-declaration)
-    (define-key map "\C-c\C-i\C-p" 'ada-build-prompt-select-prj-file)
-    (define-key map "\C-c\C-i\C-q" 'gnat-inspect-refresh)
-    (define-key map "\C-c\C-i\C-r" 'gnat-inspect-all)
-    map
-  )  "Local keymap used for GNAT inspect minor mode.")
-
-(defvar gnat-inspect-menu (make-sparse-keymap "gnat-inspect"))
-(easy-menu-define gnat-inspect-menu gnat-inspect-map "Menu keymap for 
gnat-inspect minor mode"
-  '("gnat-inspect"
-    ["Find and select project ..."   ada-build-prompt-select-prj-file t]
-    ["Select project ..."            ada-prj-select                   t]
-    ["Show current project"          ada-prj-show                     t]
-    ["Next compilation error"        next-error                       t]
-    ["Show secondary error"          ada-show-secondary-error         t]
-    ["Refresh cross reference cache" gnat-inspect-refresh        t]
-    ))
-
-(define-minor-mode gnat-inspect
-  "Minor mode for navigating sources using GNAT cross reference tool.
-Enable mode if ARG is positive"
-  :initial-value t
-  :lighter       " gnat-inspect"   ;; mode line
-
-  ;; just enable the menu and keymap
-  )
-
-;;;;; support for Ada mode
-
-(defun ada-gnat-inspect-select-prj ()
-  (setq ada-file-name-from-ada-name 'ada-gnat-file-name-from-ada-name)
-  (setq ada-ada-name-from-file-name 'ada-gnat-ada-name-from-file-name)
-  (setq ada-make-package-body       'ada-gnat-make-package-body)
-
-  (add-hook 'ada-syntax-propertize-hook 'gnatprep-syntax-propertize)
-
-  ;; must be after indentation engine setup, because that resets the
-  ;; indent function list.
-  (add-hook 'ada-mode-hook 'ada-gnat-inspect-setup t)
-
-  (setq ada-xref-refresh-function    'gnat-inspect-refresh)
-  (setq ada-xref-all-function        'gnat-inspect-all)
-  (setq ada-xref-other-function      'gnat-inspect-other)
-  (setq ada-xref-parent-function     'gnat-inspect-parents)
-  (setq ada-xref-all-function        'gnat-inspect-all)
-  (setq ada-xref-overriding-function 'gnat-inspect-overriding)
-  (setq ada-xref-overridden-function 'gnat-inspect-overridden-1)
-  (setq ada-show-xref-tool-buffer    'gnat-inspect-show-session-buffer)
-
-  (add-to-list 'completion-ignored-extensions ".ali") ;; gnat library files, 
used for cross reference
-  )
-
-(defun ada-gnat-inspect-deselect-prj ()
-  (setq ada-file-name-from-ada-name nil)
-  (setq ada-ada-name-from-file-name nil)
-  (setq ada-make-package-body       nil)
-
-  (setq ada-syntax-propertize-hook (delq 'gnatprep-syntax-propertize 
ada-syntax-propertize-hook))
-  (setq ada-mode-hook (delq 'ada-gnat-inspect-setup ada-mode-hook))
-
-  (setq ada-xref-other-function      nil)
-  (setq ada-xref-parent-function     nil)
-  (setq ada-xref-all-function        nil)
-  (setq ada-xref-overriding-function nil)
-  (setq ada-xref-overridden-function nil)
-  (setq ada-show-xref-tool-buffer    nil)
-
-  (setq completion-ignored-extensions (delete ".ali" 
completion-ignored-extensions))
-  )
-
-(defun ada-gnat-inspect-setup ()
-  (when (boundp 'wisi-indent-calculate-functions)
-    (add-to-list 'wisi-indent-calculate-functions 'gnatprep-indent))
-  )
-
-(defun ada-gnat-inspect ()
-  "Set Ada mode global vars to use gnatinspect."
-  (add-to-list 'ada-prj-parser-alist       '("gpr" . gnat-parse-gpr))
-  (add-to-list 'ada-select-prj-xref-tool   '(gnat_inspect  . 
ada-gnat-inspect-select-prj))
-  (add-to-list 'ada-deselect-prj-xref-tool '(gnat_inspect  . 
ada-gnat-inspect-deselect-prj))
-
-  ;; no parse-*-xref
-
-  (font-lock-add-keywords 'ada-mode
-   ;; gnatprep preprocessor line
-   (list (list "^[ \t]*\\(#.*\n\\)"  '(1 font-lock-type-face t))))
-
-  (add-hook 'ada-gnat-fix-error-hook 'ada-gnat-fix-error)
-  )
-
-(provide 'gnat-inspect)
-(provide 'ada-xref-tool)
-
-(add-to-list 'compilation-error-regexp-alist-alist
-            (cons 'gnat-inspect-ident-file       
gnat-inspect-ident-file-regexp-alist))
-(add-to-list 'compilation-error-regexp-alist-alist
-            (cons 'gnat-inspect-ident-file-scope 
gnat-inspect-ident-file-scope-regexp-alist))
-
-(unless (and (boundp 'ada-xref-tool)
-            (default-value 'ada-xref-tool))
-  (setq ada-xref-tool 'gnat_inspect))
-
-(ada-gnat-inspect)
-
-;;; end of file
diff --git a/packages/ada-mode/gpr-grammar-wy.el 
b/packages/ada-mode/gpr-grammar-wy.el
index 34c3553..1c1381e 100644
--- a/packages/ada-mode/gpr-grammar-wy.el
+++ b/packages/ada-mode/gpr-grammar-wy.el
@@ -1,6 +1,6 @@
-;;; gpr-grammar-wy.el --- Generated parser support file  -*- lexical-binding:t 
-*-
+;;; gpr-grammar-wy.el --- Generated parser support file
 
-;; Copyright (C) 2013, 2015  Free Software Foundation, Inc.
+;; Copyright (C) 2013 - 2015 Free Software Foundation, Inc.
 
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
@@ -27,6 +27,7 @@
     ("case" . CASE)
     ("configuration" . CONFIGURATION)
     ("end" . END)
+    ("extends" . EXTENDS)
     ("external" . EXTERNAL)
     ("external_as_list" . EXTERNAL_AS_LIST)
     ("for" . FOR)
@@ -37,6 +38,7 @@
     ("others" . OTHERS)
     ("package" . PACKAGE)
     ("project" . PROJECT)
+    ("renames" . RENAMES)
     (")" . RIGHT_PAREN)
     ("standard" . STANDARD)
     ("type" . TYPE)
@@ -73,7 +75,7 @@
 
 (defconst gpr-grammar-wy--parse-table
    (wisi-compile-grammar
-   '((AMPERSAND COLON COLON_EQUALS COMMA DOT EQUAL_GREATER QUOTE SEMICOLON 
VERTICAL_BAR IDENTIFIER STRING_LITERAL ABSTRACT AGGREGATE CASE CONFIGURATION 
END EXTERNAL EXTERNAL_AS_LIST FOR IS LEFT_PAREN LIBRARY NULL OTHERS PACKAGE 
PROJECT RIGHT_PAREN STANDARD TYPE USE WHEN WITH )
+   '((AMPERSAND COLON COLON_EQUALS COMMA DOT EQUAL_GREATER QUOTE SEMICOLON 
VERTICAL_BAR IDENTIFIER STRING_LITERAL ABSTRACT AGGREGATE CASE CONFIGURATION 
END EXTENDS EXTERNAL EXTERNAL_AS_LIST FOR IS LEFT_PAREN LIBRARY NULL OTHERS 
PACKAGE PROJECT RENAMES RIGHT_PAREN STANDARD TYPE USE WHEN WITH )
      ((aggregate
        ((LEFT_PAREN string_list RIGHT_PAREN )
         (progn
@@ -87,6 +89,10 @@
        ((FOR IDENTIFIER LEFT_PAREN STRING_LITERAL RIGHT_PAREN USE expression 
SEMICOLON )
         (progn
         (wisi-statement-action [1 statement-start 3 open-paren 5 close-paren 6 
statement-other 8 statement-end])
+        (wisi-containing-action 6 7)))
+       ((FOR EXTERNAL LEFT_PAREN STRING_LITERAL RIGHT_PAREN USE expression 
SEMICOLON )
+        (progn
+        (wisi-statement-action [1 statement-start 3 open-paren 5 close-paren 6 
statement-other 8 statement-end])
         (wisi-containing-action 6 7))))
       (attribute_prefix
        ((PROJECT ))
@@ -101,9 +107,10 @@
         (wisi-statement-action [1 statement-start 3 block-start 5 block-end 7 
statement-end])
         (wisi-containing-action 3 4))))
       (case_item
-       ((WHEN discrete_choice_list EQUAL_GREATER declarative_items )
+       ((WHEN discrete_choice_list EQUAL_GREATER declarative_items_opt )
         (progn
         (wisi-statement-action [1 block-middle 3 block-start])
+        (wisi-containing-action 1 3)
         (wisi-containing-action 3 4))))
       (case_items
        (())
@@ -122,9 +129,11 @@
        ((typed_string_declaration ))
        ((package_declaration )))
       (declarative_items
-       (())
        ((declarative_item ))
        ((declarative_items declarative_item )))
+      (declarative_items_opt
+       (())
+       ((declarative_items )))
       (discrete_choice
        (())
        ((STRING_LITERAL ))
@@ -146,14 +155,32 @@
        ((name DOT IDENTIFIER )))
       (project_declaration_opt
        (())
-       ((simple_project_declaration )))
+       ((simple_project_declaration ))
+       ((project_extension )))
       (package_declaration
-       ((package_spec )))
+       ((package_spec ))
+       ((package_extension ))
+       ((package_renaming )))
       (package_spec
-       ((PACKAGE identifier_opt IS simple_declarative_items END identifier_opt 
SEMICOLON )
+       ((PACKAGE identifier_opt IS declarative_items_opt END identifier_opt 
SEMICOLON )
         (progn
         (wisi-statement-action [1 statement-start 3 block-start 5 block-end 7 
statement-end])
         (wisi-containing-action 3 4))))
+      (package_extension
+       ((PACKAGE identifier_opt EXTENDS name IS declarative_items_opt END 
identifier_opt SEMICOLON )
+        (progn
+        (wisi-statement-action [1 statement-start 5 block-start 7 block-end 9 
statement-end])
+        (wisi-containing-action 5 6))))
+      (package_renaming
+       ((PACKAGE identifier_opt RENAMES name SEMICOLON )
+        (progn
+        (wisi-statement-action [1 statement-start 3 statement-other 5 
statement-end])
+        (wisi-containing-action 3 4))))
+      (project_extension
+       ((PROJECT identifier_opt EXTENDS STRING_LITERAL IS 
declarative_items_opt END identifier_opt SEMICOLON )
+        (progn
+        (wisi-statement-action [1 statement-start 5 block-start 7 block-end 9 
statement-end])
+        (wisi-containing-action 5 6))))
       (project_qualifier_opt
        (())
        ((ABSTRACT ))
@@ -175,12 +202,8 @@
        ((case_statement ))
        ((NULL SEMICOLON )
         (wisi-statement-action [1 statement-start 2 statement-end])))
-      (simple_declarative_items
-       (())
-       ((simple_declarative_item ))
-       ((simple_declarative_items simple_declarative_item )))
       (simple_project_declaration
-       ((PROJECT identifier_opt IS declarative_items END identifier_opt 
SEMICOLON )
+       ((PROJECT identifier_opt IS declarative_items_opt END identifier_opt 
SEMICOLON )
         (progn
         (wisi-statement-action [1 statement-start 3 block-start 5 block-end 7 
statement-end])
         (wisi-containing-action 3 4))))
@@ -210,146 +233,197 @@
        ((WITH string_list SEMICOLON ))))
      [((default . error) (ABSTRACT . (context_clause_opt . 0)) (AGGREGATE . 
(context_clause_opt . 0)) (CONFIGURATION . (context_clause_opt . 0)) (LIBRARY . 
(context_clause_opt . 0)) (STANDARD . (context_clause_opt . 0)) (PROJECT . 
(context_clause_opt . 0)) ($EOI . (context_clause_opt . 0)) (WITH .  7))
       ((default . error) ($EOI . (project_qualifier_opt . 1)) (PROJECT . 
(project_qualifier_opt . 1)))
-      ((default . error) (LIBRARY .  34) ($EOI . (project_qualifier_opt . 3)) 
(PROJECT . (project_qualifier_opt . 3)))
+      ((default . error) (LIBRARY .  35) ($EOI . (project_qualifier_opt . 3)) 
(PROJECT . (project_qualifier_opt . 3)))
       ((default . error) ($EOI . (project_qualifier_opt . 6)) (PROJECT . 
(project_qualifier_opt . 6)))
       ((default . error) ($EOI . (project_qualifier_opt . 5)) (PROJECT . 
(project_qualifier_opt . 5)))
-      ((default . error) (IS . (identifier_opt . 0)) (IDENTIFIER .  20))
+      ((default . error) (EXTENDS . (identifier_opt . 0)) (IS . 
(identifier_opt . 0)) (IDENTIFIER .  21))
       ((default . error) ($EOI . (project_qualifier_opt . 2)) (PROJECT . 
(project_qualifier_opt . 2)))
-      ((default . error) (LEFT_PAREN .  18) (STRING_LITERAL .  21) (EXTERNAL . 
 16) (EXTERNAL_AS_LIST .  17) (DOT . (identifier_opt . 0)) (AMPERSAND . 
(identifier_opt . 0)) (SEMICOLON . (identifier_opt . 0)) (COMMA . 
(identifier_opt . 0)) (QUOTE . (identifier_opt . 0)) (IDENTIFIER .  20) 
(PROJECT .  19))
-      ((default . error) ($EOI .  15))
+      ((default . error) (LEFT_PAREN .  19) (STRING_LITERAL .  22) (EXTERNAL . 
 17) (EXTERNAL_AS_LIST .  18) (DOT . (identifier_opt . 0)) (AMPERSAND . 
(identifier_opt . 0)) (SEMICOLON . (identifier_opt . 0)) (COMMA . 
(identifier_opt . 0)) (QUOTE . (identifier_opt . 0)) (IDENTIFIER .  21) 
(PROJECT .  20))
+      ((default . error) ($EOI .  16))
       ((default . error) (ABSTRACT . (context_clause_opt . 1)) (AGGREGATE . 
(context_clause_opt . 1)) (CONFIGURATION . (context_clause_opt . 1)) (LIBRARY . 
(context_clause_opt . 1)) (STANDARD . (context_clause_opt . 1)) (PROJECT . 
(context_clause_opt . 1)) ($EOI . (context_clause_opt . 1)) (WITH .  7))
       ((default . error) (PROJECT . (project_qualifier_opt . 0)) ($EOI . 
(project_qualifier_opt . 0)) (ABSTRACT .  1) (STANDARD .  6) (AGGREGATE .  2) 
(LIBRARY .  4) (CONFIGURATION .  3))
+      ((default . error) ($EOI . (project_declaration_opt . 2)))
       ((default . error) ($EOI . (project_declaration_opt . 1)))
       ((default . error) ($EOI . (context_clause . 0)) (PROJECT . 
(context_clause . 0)) (STANDARD . (context_clause . 0)) (LIBRARY . 
(context_clause . 0)) (CONFIGURATION . (context_clause . 0)) (AGGREGATE . 
(context_clause . 0)) (ABSTRACT . (context_clause . 0)) (WITH . (context_clause 
. 0)))
       ((default . error) ($EOI . (project_declaration_opt . 0)) (PROJECT .  5))
       ((default . error) (WITH . (context_clause . 1)) (ABSTRACT . 
(context_clause . 1)) (AGGREGATE . (context_clause . 1)) (CONFIGURATION . 
(context_clause . 1)) (LIBRARY . (context_clause . 1)) (STANDARD . 
(context_clause . 1)) (PROJECT . (context_clause . 1)) ($EOI . (context_clause 
. 1)))
-      ((default . error) ($EOI . accept) (STRING_LITERAL . accept) (IDENTIFIER 
. accept) (VERTICAL_BAR . accept) (SEMICOLON . accept) (QUOTE . accept) 
(EQUAL_GREATER . accept) (DOT . accept) (COMMA . accept) (COLON_EQUALS . 
accept) (COLON . accept) (AMPERSAND . accept) (WITH . accept) (WHEN . accept) 
(USE . accept) (TYPE . accept) (STANDARD . accept) (RIGHT_PAREN . accept) 
(PROJECT . accept) (PACKAGE . accept) (OTHERS . accept) (NULL . accept) 
(LIBRARY . accept) (LEFT_PAREN . accept) (IS [...]
-      ((default . error) (LEFT_PAREN .  43))
-      ((default . error) (LEFT_PAREN .  43))
-      ((default . error) (LEFT_PAREN .  18) (STRING_LITERAL .  21) (EXTERNAL . 
 16) (EXTERNAL_AS_LIST .  17) (DOT . (identifier_opt . 0)) (AMPERSAND . 
(identifier_opt . 0)) (RIGHT_PAREN . ( 41 (identifier_opt . 0))) (COMMA . 
(identifier_opt . 0)) (QUOTE . (identifier_opt . 0)) (IDENTIFIER .  20) 
(PROJECT .  19))
+      ((default . error) ($EOI . accept) (STRING_LITERAL . accept) (IDENTIFIER 
. accept) (VERTICAL_BAR . accept) (SEMICOLON . accept) (QUOTE . accept) 
(EQUAL_GREATER . accept) (DOT . accept) (COMMA . accept) (COLON_EQUALS . 
accept) (COLON . accept) (AMPERSAND . accept) (WITH . accept) (WHEN . accept) 
(USE . accept) (TYPE . accept) (STANDARD . accept) (RIGHT_PAREN . accept) 
(RENAMES . accept) (PROJECT . accept) (PACKAGE . accept) (OTHERS . accept) 
(NULL . accept) (LIBRARY . accept) (LEFT_ [...]
+      ((default . error) (LEFT_PAREN .  45))
+      ((default . error) (LEFT_PAREN .  45))
+      ((default . error) (LEFT_PAREN .  19) (STRING_LITERAL .  22) (EXTERNAL . 
 17) (EXTERNAL_AS_LIST .  18) (DOT . (identifier_opt . 0)) (AMPERSAND . 
(identifier_opt . 0)) (RIGHT_PAREN . ( 43 (identifier_opt . 0))) (COMMA . 
(identifier_opt . 0)) (QUOTE . (identifier_opt . 0)) (IDENTIFIER .  21) 
(PROJECT .  20))
       ((default . error) (QUOTE . (attribute_prefix . 0)))
-      ((default . error) (RIGHT_PAREN . (identifier_opt . 1)) (COMMA . 
(identifier_opt . 1)) (IS . (identifier_opt . 1)) (DOT . (identifier_opt . 1)) 
(AMPERSAND . (identifier_opt . 1)) (SEMICOLON . (identifier_opt . 1)) (QUOTE . 
(identifier_opt . 1)))
+      ((default . error) (RIGHT_PAREN . (identifier_opt . 1)) (COMMA . 
(identifier_opt . 1)) (EXTENDS . (identifier_opt . 1)) (RENAMES . 
(identifier_opt . 1)) (IS . (identifier_opt . 1)) (DOT . (identifier_opt . 1)) 
(AMPERSAND . (identifier_opt . 1)) (QUOTE . (identifier_opt . 1)) (SEMICOLON . 
(identifier_opt . 1)))
       ((default . error) (RIGHT_PAREN . (string_primary . 0)) (COMMA . 
(string_primary . 0)) (AMPERSAND . (string_primary . 0)) (SEMICOLON . 
(string_primary . 0)))
       ((default . error) (RIGHT_PAREN . (term . 2)) (COMMA . (term . 2)) 
(AMPERSAND . (term . 2)) (SEMICOLON . (term . 2)))
-      ((default . error) (QUOTE .  40))
+      ((default . error) (QUOTE .  42))
       ((default . error) (RIGHT_PAREN . (string_primary . 3)) (COMMA . 
(string_primary . 3)) (AMPERSAND . (string_primary . 3)) (SEMICOLON . 
(string_primary . 3)))
-      ((default . error) (SEMICOLON . (string_list . 0)) (RIGHT_PAREN . 
(string_list . 0)) (COMMA . (string_list . 0)) (AMPERSAND .  39))
+      ((default . error) (SEMICOLON . (string_list . 0)) (RIGHT_PAREN . 
(string_list . 0)) (COMMA . (string_list . 0)) (AMPERSAND .  41))
       ((default . error) (RIGHT_PAREN . (string_primary . 2)) (COMMA . 
(string_primary . 2)) (AMPERSAND . (string_primary . 2)) (SEMICOLON . 
(string_primary . 2)))
       ((default . error) (COMMA . (name . 0)) (RIGHT_PAREN . (name . 0)) (IS . 
(name . 0)) (SEMICOLON . (name . 0)) (AMPERSAND . (name . 0)) (DOT . (name . 
0)) (QUOTE . (name . 0)))
-      ((default . error) (RIGHT_PAREN . (string_primary . 1)) (COMMA . 
(string_primary . 1)) (AMPERSAND . (string_primary . 1)) (SEMICOLON . 
(string_primary . 1)) (DOT .  38) (QUOTE . (attribute_prefix . 1)))
+      ((default . error) (RIGHT_PAREN . (string_primary . 1)) (COMMA . 
(string_primary . 1)) (AMPERSAND . (string_primary . 1)) (SEMICOLON . 
(string_primary . 1)) (DOT .  40) (QUOTE . (attribute_prefix . 1)))
       ((default . error) (RIGHT_PAREN . (term . 0)) (COMMA . (term . 0)) 
(AMPERSAND . (term . 0)) (SEMICOLON . (term . 0)))
       ((default . error) (COMMA . (string_expression . 0)) (RIGHT_PAREN . 
(string_expression . 0)) (SEMICOLON . (string_expression . 0)) (AMPERSAND . 
(string_expression . 0)))
-      ((default . error) (COMMA .  36) (SEMICOLON .  37))
+      ((default . error) (COMMA .  38) (SEMICOLON .  39))
       ((default . error) (COMMA . (expression . 0)) (RIGHT_PAREN . (expression 
. 0)) (SEMICOLON . (expression . 0)) (AMPERSAND . (expression . 0)))
-      ((default . error) (IS .  35))
+      ((default . error) (EXTENDS .  36) (IS .  37))
       ((default . error) ($EOI . (project_qualifier_opt . 4)) (PROJECT . 
(project_qualifier_opt . 4)))
-      ((default . error) (END . (declarative_items . 0)) (TYPE . ( 56 
(declarative_items . 0))) (IDENTIFIER . ( 57 (declarative_items . 0))) (NULL . 
( 54 (declarative_items . 0))) (CASE . ( 52 (declarative_items . 0))) (FOR . ( 
53 (declarative_items . 0))) (PACKAGE . ( 55 (declarative_items . 0))))
-      ((default . error) (LEFT_PAREN .  18) (STRING_LITERAL .  21) (EXTERNAL . 
 16) (EXTERNAL_AS_LIST .  17) (DOT . (identifier_opt . 0)) (AMPERSAND . 
(identifier_opt . 0)) (RIGHT_PAREN . (identifier_opt . 0)) (COMMA . 
(identifier_opt . 0)) (SEMICOLON . (identifier_opt . 0)) (QUOTE . 
(identifier_opt . 0)) (IDENTIFIER .  20) (PROJECT .  19))
+      ((default . error) (STRING_LITERAL .  71))
+      ((default . error) (END . (declarative_items_opt . 0)) (TYPE .  58) 
(IDENTIFIER .  59) (NULL .  56) (CASE .  54) (FOR .  55) (PACKAGE .  57))
+      ((default . error) (LEFT_PAREN .  19) (STRING_LITERAL .  22) (EXTERNAL . 
 17) (EXTERNAL_AS_LIST .  18) (DOT . (identifier_opt . 0)) (AMPERSAND . 
(identifier_opt . 0)) (RIGHT_PAREN . (identifier_opt . 0)) (COMMA . 
(identifier_opt . 0)) (SEMICOLON . (identifier_opt . 0)) (QUOTE . 
(identifier_opt . 0)) (IDENTIFIER .  21) (PROJECT .  20))
       ((default . error) (WITH . (with_clause . 0)) (ABSTRACT . (with_clause . 
0)) (AGGREGATE . (with_clause . 0)) (CONFIGURATION . (with_clause . 0)) 
(LIBRARY . (with_clause . 0)) (STANDARD . (with_clause . 0)) (PROJECT . 
(with_clause . 0)) ($EOI . (with_clause . 0)))
+      ((default . error) (IDENTIFIER .  52))
+      ((default . error) (LEFT_PAREN .  19) (STRING_LITERAL .  22) (EXTERNAL . 
 17) (EXTERNAL_AS_LIST .  18) (DOT . (identifier_opt . 0)) (SEMICOLON . 
(identifier_opt . 0)) (COMMA . (identifier_opt . 0)) (RIGHT_PAREN . 
(identifier_opt . 0)) (AMPERSAND . (identifier_opt . 0)) (QUOTE . 
(identifier_opt . 0)) (IDENTIFIER .  21) (PROJECT .  20))
       ((default . error) (IDENTIFIER .  50))
-      ((default . error) (LEFT_PAREN .  18) (STRING_LITERAL .  21) (EXTERNAL . 
 16) (EXTERNAL_AS_LIST .  17) (DOT . (identifier_opt . 0)) (SEMICOLON . 
(identifier_opt . 0)) (COMMA . (identifier_opt . 0)) (RIGHT_PAREN . 
(identifier_opt . 0)) (AMPERSAND . (identifier_opt . 0)) (QUOTE . 
(identifier_opt . 0)) (IDENTIFIER .  20) (PROJECT .  19))
-      ((default . error) (IDENTIFIER .  48))
       ((default . error) (SEMICOLON . (term . 1)) (AMPERSAND . (term . 1)) 
(COMMA . (term . 1)) (RIGHT_PAREN . (term . 1)))
-      ((default . error) (COMMA .  36) (RIGHT_PAREN .  47))
-      ((default . error) (LEFT_PAREN .  18) (STRING_LITERAL .  21) (EXTERNAL . 
 16) (EXTERNAL_AS_LIST .  17) (DOT . (identifier_opt . 0)) (AMPERSAND . 
(identifier_opt . 0)) (RIGHT_PAREN . (identifier_opt . 0)) (COMMA . 
(identifier_opt . 0)) (QUOTE . (identifier_opt . 0)) (IDENTIFIER .  20) 
(PROJECT .  19))
+      ((default . error) (COMMA .  38) (RIGHT_PAREN .  49))
+      ((default . error) (LEFT_PAREN .  19) (STRING_LITERAL .  22) (EXTERNAL . 
 17) (EXTERNAL_AS_LIST .  18) (DOT . (identifier_opt . 0)) (AMPERSAND . 
(identifier_opt . 0)) (RIGHT_PAREN . (identifier_opt . 0)) (COMMA . 
(identifier_opt . 0)) (QUOTE . (identifier_opt . 0)) (IDENTIFIER .  21) 
(PROJECT .  20))
       ((default . error) (AMPERSAND . (external_value . 1)) (SEMICOLON . 
(external_value . 1)) (RIGHT_PAREN . (external_value . 1)) (COMMA . 
(external_value . 1)))
       ((default . error) (AMPERSAND . (external_value . 0)) (SEMICOLON . 
(external_value . 0)) (RIGHT_PAREN . (external_value . 0)) (COMMA . 
(external_value . 0)))
       ((default . error) ($EOI . (compilation_unit . 0)))
       ((default . error) (COMMA . (aggregate . 0)) (RIGHT_PAREN . (aggregate . 
0)) (SEMICOLON . (aggregate . 0)) (AMPERSAND . (aggregate . 0)))
-      ((default . error) (LEFT_PAREN .  75) (COMMA . (attribute_reference . 
0)) (RIGHT_PAREN . (attribute_reference . 0)) (SEMICOLON . (attribute_reference 
. 0)) (AMPERSAND . (attribute_reference . 0)))
+      ((default . error) (LEFT_PAREN .  83) (COMMA . (attribute_reference . 
0)) (RIGHT_PAREN . (attribute_reference . 0)) (SEMICOLON . (attribute_reference 
. 0)) (AMPERSAND . (attribute_reference . 0)))
       ((default . error) (SEMICOLON . (expression . 1)) (COMMA . (expression . 
1)) (RIGHT_PAREN . (expression . 1)) (AMPERSAND . (expression . 1)))
       ((default . error) (IS . (name . 1)) (COMMA . (name . 1)) (RIGHT_PAREN . 
(name . 1)) (SEMICOLON . (name . 1)) (AMPERSAND . (name . 1)) (DOT . (name . 
1)) (QUOTE . (name . 1)))
-      ((default . error) (AMPERSAND .  39) (RIGHT_PAREN . (string_list . 1)) 
(SEMICOLON . (string_list . 1)) (COMMA . (string_list . 1)))
-      ((default . error) (DOT . (identifier_opt . 0)) (IS . (identifier_opt . 
0)) (IDENTIFIER .  20))
-      ((default . error) (IDENTIFIER .  73))
-      ((default . error) (SEMICOLON .  72))
-      ((default . error) (IS . (identifier_opt . 0)) (IDENTIFIER .  20))
-      ((default . error) (IDENTIFIER .  70))
-      ((default . error) (COLON .  68) (COLON_EQUALS .  69))
+      ((default . error) (AMPERSAND .  41) (RIGHT_PAREN . (string_list . 1)) 
(SEMICOLON . (string_list . 1)) (COMMA . (string_list . 1)))
+      ((default . error) (DOT . (identifier_opt . 0)) (IS . (identifier_opt . 
0)) (IDENTIFIER .  21))
+      ((default . error) (EXTERNAL .  80) (IDENTIFIER .  81))
+      ((default . error) (SEMICOLON .  79))
+      ((default . error) (IS . (identifier_opt . 0)) (EXTENDS . 
(identifier_opt . 0)) (RENAMES . (identifier_opt . 0)) (IDENTIFIER .  21))
+      ((default . error) (IDENTIFIER .  77))
+      ((default . error) (COLON .  75) (COLON_EQUALS .  76))
       ((default . error) (WHEN . (simple_declarative_item . 2)) (END . 
(simple_declarative_item . 2)) (CASE . (simple_declarative_item . 2)) (FOR . 
(simple_declarative_item . 2)) (NULL . (simple_declarative_item . 2)) (PACKAGE 
. (simple_declarative_item . 2)) (TYPE . (simple_declarative_item . 2)) 
(IDENTIFIER . (simple_declarative_item . 2)))
       ((default . error) (WHEN . (simple_declarative_item . 3)) (END . 
(simple_declarative_item . 3)) (CASE . (simple_declarative_item . 3)) (FOR . 
(simple_declarative_item . 3)) (NULL . (simple_declarative_item . 3)) (PACKAGE 
. (simple_declarative_item . 3)) (TYPE . (simple_declarative_item . 3)) 
(IDENTIFIER . (simple_declarative_item . 3)))
-      ((default . error) (WHEN . (declarative_items . 1)) (END . 
(declarative_items . 1)) (CASE . (declarative_items . 1)) (FOR . 
(declarative_items . 1)) (NULL . (declarative_items . 1)) (PACKAGE . 
(declarative_items . 1)) (TYPE . (declarative_items . 1)) (IDENTIFIER . 
(declarative_items . 1)))
-      ((default . error) (END .  66) (TYPE .  56) (IDENTIFIER .  57) (NULL .  
54) (CASE .  52) (FOR .  53) (PACKAGE .  55))
+      ((default . error) (WHEN . (declarative_items . 0)) (END . 
(declarative_items . 0)) (CASE . (declarative_items . 0)) (FOR . 
(declarative_items . 0)) (NULL . (declarative_items . 0)) (PACKAGE . 
(declarative_items . 0)) (TYPE . (declarative_items . 0)) (IDENTIFIER . 
(declarative_items . 0)))
+      ((default . error) (WHEN . (declarative_items_opt . 1)) (END . 
(declarative_items_opt . 1)) (TYPE .  58) (IDENTIFIER .  59) (NULL .  56) (CASE 
.  54) (FOR .  55) (PACKAGE .  57))
+      ((default . error) (END .  73))
       ((default . error) (WHEN . (declarative_item . 2)) (END . 
(declarative_item . 2)) (IDENTIFIER . (declarative_item . 2)) (TYPE . 
(declarative_item . 2)) (PACKAGE . (declarative_item . 2)) (NULL . 
(declarative_item . 2)) (FOR . (declarative_item . 2)) (CASE . 
(declarative_item . 2)))
       ((default . error) (WHEN . (package_declaration . 0)) (END . 
(package_declaration . 0)) (CASE . (package_declaration . 0)) (FOR . 
(package_declaration . 0)) (NULL . (package_declaration . 0)) (PACKAGE . 
(package_declaration . 0)) (TYPE . (package_declaration . 0)) (IDENTIFIER . 
(package_declaration . 0)))
+      ((default . error) (WHEN . (package_declaration . 1)) (END . 
(package_declaration . 1)) (CASE . (package_declaration . 1)) (FOR . 
(package_declaration . 1)) (NULL . (package_declaration . 1)) (PACKAGE . 
(package_declaration . 1)) (TYPE . (package_declaration . 1)) (IDENTIFIER . 
(package_declaration . 1)))
+      ((default . error) (WHEN . (package_declaration . 2)) (END . 
(package_declaration . 2)) (CASE . (package_declaration . 2)) (FOR . 
(package_declaration . 2)) (NULL . (package_declaration . 2)) (PACKAGE . 
(package_declaration . 2)) (TYPE . (package_declaration . 2)) (IDENTIFIER . 
(package_declaration . 2)))
       ((default . error) (WHEN . (declarative_item . 0)) (END . 
(declarative_item . 0)) (IDENTIFIER . (declarative_item . 0)) (TYPE . 
(declarative_item . 0)) (PACKAGE . (declarative_item . 0)) (NULL . 
(declarative_item . 0)) (FOR . (declarative_item . 0)) (CASE . 
(declarative_item . 0)))
       ((default . error) (WHEN . (declarative_item . 1)) (END . 
(declarative_item . 1)) (IDENTIFIER . (declarative_item . 1)) (TYPE . 
(declarative_item . 1)) (PACKAGE . (declarative_item . 1)) (NULL . 
(declarative_item . 1)) (FOR . (declarative_item . 1)) (CASE . 
(declarative_item . 1)))
-      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  20))
-      ((default . error) (WHEN . (declarative_items . 2)) (IDENTIFIER . 
(declarative_items . 2)) (TYPE . (declarative_items . 2)) (PACKAGE . 
(declarative_items . 2)) (NULL . (declarative_items . 2)) (FOR . 
(declarative_items . 2)) (CASE . (declarative_items . 2)) (END . 
(declarative_items . 2)))
-      ((default . error) (IDENTIFIER .  83))
-      ((default . error) (LEFT_PAREN .  18) (STRING_LITERAL .  21) (EXTERNAL . 
 16) (EXTERNAL_AS_LIST .  17) (DOT . (identifier_opt . 0)) (AMPERSAND . 
(identifier_opt . 0)) (SEMICOLON . (identifier_opt . 0)) (QUOTE . 
(identifier_opt . 0)) (IDENTIFIER .  20) (PROJECT .  19))
-      ((default . error) (IS .  81))
-      ((default . error) (IS .  80))
+      ((default . error) (IS .  72))
+      ((default . error) (END . (declarative_items_opt . 0)) (TYPE .  58) 
(IDENTIFIER .  59) (NULL .  56) (CASE .  54) (FOR .  55) (PACKAGE .  57))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  21))
+      ((default . error) (WHEN . (declarative_items . 1)) (IDENTIFIER . 
(declarative_items . 1)) (TYPE . (declarative_items . 1)) (PACKAGE . 
(declarative_items . 1)) (NULL . (declarative_items . 1)) (FOR . 
(declarative_items . 1)) (CASE . (declarative_items . 1)) (END . 
(declarative_items . 1)))
+      ((default . error) (IDENTIFIER .  94))
+      ((default . error) (LEFT_PAREN .  19) (STRING_LITERAL .  22) (EXTERNAL . 
 17) (EXTERNAL_AS_LIST .  18) (DOT . (identifier_opt . 0)) (AMPERSAND . 
(identifier_opt . 0)) (SEMICOLON . (identifier_opt . 0)) (QUOTE . 
(identifier_opt . 0)) (IDENTIFIER .  21) (PROJECT .  20))
+      ((default . error) (IS .  92))
+      ((default . error) (IS .  90) (EXTENDS .  89) (RENAMES .  91))
       ((default . error) (WHEN . (simple_declarative_item . 4)) (IDENTIFIER . 
(simple_declarative_item . 4)) (TYPE . (simple_declarative_item . 4)) (PACKAGE 
. (simple_declarative_item . 4)) (NULL . (simple_declarative_item . 4)) (FOR . 
(simple_declarative_item . 4)) (CASE . (simple_declarative_item . 4)) (END . 
(simple_declarative_item . 4)))
-      ((default . error) (USE .  79) (LEFT_PAREN .  78))
-      ((default . error) (DOT .  38) (IS .  77))
-      ((default . error) (STRING_LITERAL .  76))
-      ((default . error) (RIGHT_PAREN .  96))
-      ((default . error) (END . (case_items . 0)) (WHEN . ( 93 (case_items . 
0))))
-      ((default . error) (STRING_LITERAL .  92))
-      ((default . error) (LEFT_PAREN .  18) (STRING_LITERAL .  21) (EXTERNAL . 
 16) (EXTERNAL_AS_LIST .  17) (DOT . (identifier_opt . 0)) (AMPERSAND . 
(identifier_opt . 0)) (SEMICOLON . (identifier_opt . 0)) (QUOTE . 
(identifier_opt . 0)) (IDENTIFIER .  20) (PROJECT .  19))
-      ((default . error) (END . (simple_declarative_items . 0)) (IDENTIFIER . 
( 57 (simple_declarative_items . 0))) (NULL . ( 54 (simple_declarative_items . 
0))) (CASE . ( 52 (simple_declarative_items . 0))) (FOR . ( 53 
(simple_declarative_items . 0))))
-      ((default . error) (LEFT_PAREN .  43))
-      ((default . error) (AMPERSAND .  39) (SEMICOLON .  87))
-      ((default . error) (COLON_EQUALS .  86))
-      ((default . error) (SEMICOLON .  85))
+      ((default . error) (LEFT_PAREN .  88))
+      ((default . error) (USE .  87) (LEFT_PAREN .  86))
+      ((default . error) (DOT .  40) (IS .  85))
+      ((default . error) (STRING_LITERAL .  84))
+      ((default . error) (RIGHT_PAREN .  111))
+      ((default . error) (END . (case_items . 0)) (WHEN . ( 108 (case_items . 
0))))
+      ((default . error) (STRING_LITERAL .  107))
+      ((default . error) (LEFT_PAREN .  19) (STRING_LITERAL .  22) (EXTERNAL . 
 17) (EXTERNAL_AS_LIST .  18) (DOT . (identifier_opt . 0)) (AMPERSAND . 
(identifier_opt . 0)) (SEMICOLON . (identifier_opt . 0)) (QUOTE . 
(identifier_opt . 0)) (IDENTIFIER .  21) (PROJECT .  20))
+      ((default . error) (STRING_LITERAL .  105))
+      ((default . error) (DOT . (identifier_opt . 0)) (IS . (identifier_opt . 
0)) (IDENTIFIER .  21))
+      ((default . error) (END . (declarative_items_opt . 0)) (TYPE .  58) 
(IDENTIFIER .  59) (NULL .  56) (CASE .  54) (FOR .  55) (PACKAGE .  57))
+      ((default . error) (DOT . (identifier_opt . 0)) (SEMICOLON . 
(identifier_opt . 0)) (IDENTIFIER .  21))
+      ((default . error) (LEFT_PAREN .  45))
+      ((default . error) (AMPERSAND .  41) (SEMICOLON .  100))
+      ((default . error) (COLON_EQUALS .  99))
+      ((default . error) (SEMICOLON .  98))
+      ((default . error) (END .  97))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  21))
       ((default . error) ($EOI . (simple_project_declaration . 0)))
-      ((default . error) (LEFT_PAREN .  18) (STRING_LITERAL .  21) (EXTERNAL . 
 16) (EXTERNAL_AS_LIST .  17) (DOT . (identifier_opt . 0)) (AMPERSAND . 
(identifier_opt . 0)) (SEMICOLON . (identifier_opt . 0)) (QUOTE . 
(identifier_opt . 0)) (IDENTIFIER .  20) (PROJECT .  19))
+      ((default . error) (LEFT_PAREN .  19) (STRING_LITERAL .  22) (EXTERNAL . 
 17) (EXTERNAL_AS_LIST .  18) (DOT . (identifier_opt . 0)) (AMPERSAND . 
(identifier_opt . 0)) (SEMICOLON . (identifier_opt . 0)) (QUOTE . 
(identifier_opt . 0)) (IDENTIFIER .  21) (PROJECT .  20))
       ((default . error) (WHEN . (simple_declarative_item . 0)) (IDENTIFIER . 
(simple_declarative_item . 0)) (TYPE . (simple_declarative_item . 0)) (PACKAGE 
. (simple_declarative_item . 0)) (NULL . (simple_declarative_item . 0)) (FOR . 
(simple_declarative_item . 0)) (CASE . (simple_declarative_item . 0)) (END . 
(simple_declarative_item . 0)))
-      ((default . error) (SEMICOLON .  107))
-      ((default . error) (END . (simple_declarative_items . 1)) (CASE . 
(simple_declarative_items . 1)) (FOR . (simple_declarative_items . 1)) (NULL . 
(simple_declarative_items . 1)) (IDENTIFIER . (simple_declarative_items . 1)))
-      ((default . error) (END .  105) (IDENTIFIER .  57) (NULL .  54) (CASE .  
52) (FOR .  53))
-      ((default . error) (AMPERSAND .  39) (SEMICOLON .  104))
-      ((default . error) (RIGHT_PAREN .  103))
-      ((default . error) (VERTICAL_BAR . (discrete_choice . 0)) (EQUAL_GREATER 
. (discrete_choice . 0)) (STRING_LITERAL .  100) (OTHERS .  99))
+      ((default . error) (SEMICOLON .  124))
+      ((default . error) (DOT .  40) (SEMICOLON .  123))
+      ((default . error) (END .  122))
+      ((default . error) (DOT .  40) (IS .  121))
+      ((default . error) (RIGHT_PAREN .  120))
+      ((default . error) (AMPERSAND .  41) (SEMICOLON .  119))
+      ((default . error) (RIGHT_PAREN .  118))
+      ((default . error) (VERTICAL_BAR . (discrete_choice . 0)) (EQUAL_GREATER 
. (discrete_choice . 0)) (STRING_LITERAL .  115) (OTHERS .  114))
       ((default . error) (END . (case_items . 1)) (WHEN . (case_items . 1)))
-      ((default . error) (END .  97) (WHEN .  93))
+      ((default . error) (END .  112) (WHEN .  108))
       ((default . error) (AMPERSAND . (attribute_reference . 1)) (SEMICOLON . 
(attribute_reference . 1)) (RIGHT_PAREN . (attribute_reference . 1)) (COMMA . 
(attribute_reference . 1)))
-      ((default . error) (CASE .  114))
+      ((default . error) (CASE .  135))
       ((default . error) (WHEN . (case_items . 2)) (END . (case_items . 2)))
       ((default . error) (VERTICAL_BAR . (discrete_choice . 2)) (EQUAL_GREATER 
. (discrete_choice . 2)))
       ((default . error) (VERTICAL_BAR . (discrete_choice . 1)) (EQUAL_GREATER 
. (discrete_choice . 1)))
       ((default . error) (EQUAL_GREATER . (discrete_choice_list . 0)) 
(VERTICAL_BAR . (discrete_choice_list . 0)))
-      ((default . error) (VERTICAL_BAR .  113) (EQUAL_GREATER .  112))
-      ((default . error) (USE .  111))
+      ((default . error) (VERTICAL_BAR .  134) (EQUAL_GREATER .  133))
+      ((default . error) (USE .  132))
       ((default . error) (WHEN . (attribute_declaration . 0)) (END . 
(attribute_declaration . 0)) (IDENTIFIER . (attribute_declaration . 0)) (TYPE . 
(attribute_declaration . 0)) (PACKAGE . (attribute_declaration . 0)) (NULL . 
(attribute_declaration . 0)) (FOR . (attribute_declaration . 0)) (CASE . 
(attribute_declaration . 0)))
-      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  20))
-      ((default . error) (IDENTIFIER . (simple_declarative_items . 2)) (NULL . 
(simple_declarative_items . 2)) (FOR . (simple_declarative_items . 2)) (CASE . 
(simple_declarative_items . 2)) (END . (simple_declarative_items . 2)))
+      ((default . error) (USE .  131))
+      ((default . error) (END . (declarative_items_opt . 0)) (TYPE .  58) 
(IDENTIFIER .  59) (NULL .  56) (CASE .  54) (FOR .  55) (PACKAGE .  57))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  21))
+      ((default . error) (WHEN . (package_renaming . 0)) (END . 
(package_renaming . 0)) (IDENTIFIER . (package_renaming . 0)) (TYPE . 
(package_renaming . 0)) (PACKAGE . (package_renaming . 0)) (NULL . 
(package_renaming . 0)) (FOR . (package_renaming . 0)) (CASE . 
(package_renaming . 0)))
       ((default . error) (WHEN . (typed_string_declaration . 0)) (END . 
(typed_string_declaration . 0)) (CASE . (typed_string_declaration . 0)) (FOR . 
(typed_string_declaration . 0)) (NULL . (typed_string_declaration . 0)) 
(PACKAGE . (typed_string_declaration . 0)) (TYPE . (typed_string_declaration . 
0)) (IDENTIFIER . (typed_string_declaration . 0)))
-      ((default . error) (AMPERSAND .  39) (SEMICOLON .  109))
+      ((default . error) (AMPERSAND .  41) (SEMICOLON .  128))
+      ((default . error) (SEMICOLON .  127))
+      ((default . error) ($EOI . (project_extension . 0)))
       ((default . error) (WHEN . (simple_declarative_item . 1)) (IDENTIFIER . 
(simple_declarative_item . 1)) (TYPE . (simple_declarative_item . 1)) (PACKAGE 
. (simple_declarative_item . 1)) (NULL . (simple_declarative_item . 1)) (FOR . 
(simple_declarative_item . 1)) (CASE . (simple_declarative_item . 1)) (END . 
(simple_declarative_item . 1)))
-      ((default . error) (SEMICOLON .  119))
-      ((default . error) (LEFT_PAREN .  18) (STRING_LITERAL .  21) (EXTERNAL . 
 16) (EXTERNAL_AS_LIST .  17) (DOT . (identifier_opt . 0)) (AMPERSAND . 
(identifier_opt . 0)) (SEMICOLON . (identifier_opt . 0)) (QUOTE . 
(identifier_opt . 0)) (IDENTIFIER .  20) (PROJECT .  19))
-      ((default . error) (END . (declarative_items . 0)) (WHEN . 
(declarative_items . 0)) (TYPE . ( 56 (declarative_items . 0))) (IDENTIFIER . ( 
57 (declarative_items . 0))) (NULL . ( 54 (declarative_items . 0))) (CASE . ( 
52 (declarative_items . 0))) (FOR . ( 53 (declarative_items . 0))) (PACKAGE . ( 
55 (declarative_items . 0))))
-      ((default . error) (EQUAL_GREATER . (discrete_choice . 0)) (VERTICAL_BAR 
. (discrete_choice . 0)) (STRING_LITERAL .  100) (OTHERS .  99))
-      ((default . error) (SEMICOLON .  115))
+      ((default . error) (SEMICOLON .  142))
+      ((default . error) (END .  141))
+      ((default . error) (LEFT_PAREN .  19) (STRING_LITERAL .  22) (EXTERNAL . 
 17) (EXTERNAL_AS_LIST .  18) (DOT . (identifier_opt . 0)) (AMPERSAND . 
(identifier_opt . 0)) (SEMICOLON . (identifier_opt . 0)) (QUOTE . 
(identifier_opt . 0)) (IDENTIFIER .  21) (PROJECT .  20))
+      ((default . error) (LEFT_PAREN .  19) (STRING_LITERAL .  22) (EXTERNAL . 
 17) (EXTERNAL_AS_LIST .  18) (DOT . (identifier_opt . 0)) (AMPERSAND . 
(identifier_opt . 0)) (SEMICOLON . (identifier_opt . 0)) (QUOTE . 
(identifier_opt . 0)) (IDENTIFIER .  21) (PROJECT .  20))
+      ((default . error) (END . (declarative_items_opt . 0)) (WHEN . 
(declarative_items_opt . 0)) (TYPE .  58) (IDENTIFIER .  59) (NULL .  56) (CASE 
.  54) (FOR .  55) (PACKAGE .  57))
+      ((default . error) (EQUAL_GREATER . (discrete_choice . 0)) (VERTICAL_BAR 
. (discrete_choice . 0)) (STRING_LITERAL .  115) (OTHERS .  114))
+      ((default . error) (SEMICOLON .  136))
       ((default . error) (WHEN . (case_statement . 0)) (END . (case_statement 
. 0)) (IDENTIFIER . (case_statement . 0)) (TYPE . (case_statement . 0)) 
(PACKAGE . (case_statement . 0)) (NULL . (case_statement . 0)) (FOR . 
(case_statement . 0)) (CASE . (case_statement . 0)))
       ((default . error) (EQUAL_GREATER . (discrete_choice_list . 1)) 
(VERTICAL_BAR . (discrete_choice_list . 1)))
-      ((default . error) (END . (case_item . 0)) (WHEN . (case_item . 0)) 
(TYPE .  56) (IDENTIFIER .  57) (NULL .  54) (CASE .  52) (FOR .  53) (PACKAGE 
.  55))
-      ((default . error) (AMPERSAND .  39) (SEMICOLON .  120))
+      ((default . error) (END . (case_item . 0)) (WHEN . (case_item . 0)))
+      ((default . error) (AMPERSAND .  41) (SEMICOLON .  145))
+      ((default . error) (AMPERSAND .  41) (SEMICOLON .  144))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  21))
       ((default . error) (WHEN . (package_spec . 0)) (END . (package_spec . 
0)) (IDENTIFIER . (package_spec . 0)) (TYPE . (package_spec . 0)) (PACKAGE . 
(package_spec . 0)) (NULL . (package_spec . 0)) (FOR . (package_spec . 0)) 
(CASE . (package_spec . 0)))
-      ((default . error) (WHEN . (attribute_declaration . 1)) (CASE . 
(attribute_declaration . 1)) (FOR . (attribute_declaration . 1)) (NULL . 
(attribute_declaration . 1)) (PACKAGE . (attribute_declaration . 1)) (TYPE . 
(attribute_declaration . 1)) (IDENTIFIER . (attribute_declaration . 1)) (END . 
(attribute_declaration . 1)))]
-     [((compilation_unit . 8)(context_clause . 9)(context_clause_opt . 
10)(simple_project_declaration . 11)(with_clause . 12))
+      ((default . error) (SEMICOLON .  146))
+      ((default . error) (WHEN . (attribute_declaration . 2)) (CASE . 
(attribute_declaration . 2)) (FOR . (attribute_declaration . 2)) (NULL . 
(attribute_declaration . 2)) (PACKAGE . (attribute_declaration . 2)) (TYPE . 
(attribute_declaration . 2)) (IDENTIFIER . (attribute_declaration . 2)) (END . 
(attribute_declaration . 2)))
+      ((default . error) (WHEN . (attribute_declaration . 1)) (CASE . 
(attribute_declaration . 1)) (FOR . (attribute_declaration . 1)) (NULL . 
(attribute_declaration . 1)) (PACKAGE . (attribute_declaration . 1)) (TYPE . 
(attribute_declaration . 1)) (IDENTIFIER . (attribute_declaration . 1)) (END . 
(attribute_declaration . 1)))
+      ((default . error) (WHEN . (package_extension . 0)) (END . 
(package_extension . 0)) (IDENTIFIER . (package_extension . 0)) (TYPE . 
(package_extension . 0)) (PACKAGE . (package_extension . 0)) (NULL . 
(package_extension . 0)) (FOR . (package_extension . 0)) (CASE . 
(package_extension . 0)))]
+     [((compilation_unit . 8)(context_clause . 9)(context_clause_opt . 
10)(project_extension . 11)(simple_project_declaration . 12)(with_clause . 13))
+      nil
+      nil
+      nil
+      nil
+      ((identifier_opt . 34))
+      nil
+      ((aggregate . 23)(attribute_prefix . 24)(attribute_reference . 
25)(expression . 26)(external_value . 27)(identifier_opt . 28)(name . 
29)(string_expression . 30)(string_primary . 31)(string_list . 32)(term . 33))
+      nil
+      ((with_clause . 15))
+      ((project_qualifier_opt . 14))
+      nil
+      nil
+      nil
+      ((project_declaration_opt . 48)(project_extension . 
11)(simple_project_declaration . 12))
+      nil
+      nil
+      ((aggregate . 47))
+      ((aggregate . 46))
+      ((aggregate . 23)(attribute_prefix . 24)(attribute_reference . 
25)(expression . 26)(external_value . 27)(identifier_opt . 28)(name . 
29)(string_expression . 30)(string_primary . 31)(string_list . 44)(term . 33))
+      nil
+      nil
+      nil
+      nil
+      nil
+      nil
+      nil
+      nil
+      nil
+      nil
       nil
       nil
       nil
       nil
-      ((identifier_opt . 33))
       nil
-      ((aggregate . 22)(attribute_prefix . 23)(attribute_reference . 
24)(expression . 25)(external_value . 26)(identifier_opt . 27)(name . 
28)(string_expression . 29)(string_primary . 30)(string_list . 31)(term . 32))
       nil
-      ((with_clause . 14))
-      ((project_qualifier_opt . 13))
       nil
+      ((attribute_declaration . 60)(case_statement . 61)(declarative_item . 
62)(declarative_items . 63)(declarative_items_opt . 64)(package_declaration . 
65)(package_spec . 66)(package_extension . 67)(package_renaming . 
68)(simple_declarative_item . 69)(typed_string_declaration . 70))
+      ((aggregate . 23)(attribute_prefix . 24)(attribute_reference . 
25)(expression . 53)(external_value . 27)(identifier_opt . 28)(name . 
29)(string_expression . 30)(string_primary . 31)(term . 33))
       nil
-      ((project_declaration_opt . 46)(simple_project_declaration . 11))
       nil
+      ((aggregate . 23)(attribute_prefix . 24)(attribute_reference . 
25)(external_value . 27)(identifier_opt . 28)(name . 29)(string_expression . 
30)(string_primary . 31)(term . 51))
       nil
-      ((aggregate . 45))
-      ((aggregate . 44))
-      ((aggregate . 22)(attribute_prefix . 23)(attribute_reference . 
24)(expression . 25)(external_value . 26)(identifier_opt . 27)(name . 
28)(string_expression . 29)(string_primary . 30)(string_list . 42)(term . 32))
       nil
       nil
+      ((aggregate . 23)(attribute_prefix . 24)(attribute_reference . 
25)(expression . 26)(external_value . 27)(identifier_opt . 28)(name . 
29)(string_expression . 30)(string_primary . 31)(string_list . 44)(term . 33))
       nil
       nil
       nil
@@ -358,47 +432,52 @@
       nil
       nil
       nil
+      ((identifier_opt . 28)(name . 82))
       nil
       nil
+      ((identifier_opt . 78))
       nil
       nil
       nil
       nil
-      ((attribute_declaration . 58)(case_statement . 59)(declarative_item . 
60)(declarative_items . 61)(package_declaration . 62)(package_spec . 
63)(simple_declarative_item . 64)(typed_string_declaration . 65))
-      ((aggregate . 22)(attribute_prefix . 23)(attribute_reference . 
24)(expression . 51)(external_value . 26)(identifier_opt . 27)(name . 
28)(string_expression . 29)(string_primary . 30)(term . 32))
       nil
+      ((attribute_declaration . 60)(case_statement . 61)(declarative_item . 
74)(package_declaration . 65)(package_spec . 66)(package_extension . 
67)(package_renaming . 68)(simple_declarative_item . 
69)(typed_string_declaration . 70))
       nil
-      ((aggregate . 22)(attribute_prefix . 23)(attribute_reference . 
24)(external_value . 26)(identifier_opt . 27)(name . 28)(string_expression . 
29)(string_primary . 30)(term . 49))
       nil
       nil
       nil
-      ((aggregate . 22)(attribute_prefix . 23)(attribute_reference . 
24)(expression . 25)(external_value . 26)(identifier_opt . 27)(name . 
28)(string_expression . 29)(string_primary . 30)(string_list . 42)(term . 32))
       nil
       nil
       nil
       nil
+      ((attribute_declaration . 60)(case_statement . 61)(declarative_item . 
62)(declarative_items . 63)(declarative_items_opt . 96)(package_declaration . 
65)(package_spec . 66)(package_extension . 67)(package_renaming . 
68)(simple_declarative_item . 69)(typed_string_declaration . 70))
+      ((identifier_opt . 95))
       nil
       nil
+      ((aggregate . 23)(attribute_prefix . 24)(attribute_reference . 
25)(expression . 93)(external_value . 27)(identifier_opt . 28)(name . 
29)(string_expression . 30)(string_primary . 31)(term . 33))
       nil
       nil
-      ((identifier_opt . 27)(name . 74))
       nil
       nil
-      ((identifier_opt . 71))
       nil
       nil
       nil
       nil
+      ((case_item . 109)(case_items . 110))
       nil
-      ((attribute_declaration . 58)(case_statement . 59)(declarative_item . 
67)(package_declaration . 62)(package_spec . 63)(simple_declarative_item . 
64)(typed_string_declaration . 65))
+      ((aggregate . 23)(attribute_prefix . 24)(attribute_reference . 
25)(expression . 106)(external_value . 27)(identifier_opt . 28)(name . 
29)(string_expression . 30)(string_primary . 31)(term . 33))
       nil
+      ((identifier_opt . 28)(name . 104))
+      ((attribute_declaration . 60)(case_statement . 61)(declarative_item . 
62)(declarative_items . 63)(declarative_items_opt . 103)(package_declaration . 
65)(package_spec . 66)(package_extension . 67)(package_renaming . 
68)(simple_declarative_item . 69)(typed_string_declaration . 70))
+      ((identifier_opt . 28)(name . 102))
+      ((aggregate . 101))
       nil
       nil
       nil
-      ((identifier_opt . 84))
       nil
+      ((identifier_opt . 126))
       nil
-      ((aggregate . 22)(attribute_prefix . 23)(attribute_reference . 
24)(expression . 82)(external_value . 26)(identifier_opt . 27)(name . 
28)(string_expression . 29)(string_primary . 30)(term . 32))
+      ((aggregate . 23)(attribute_prefix . 24)(attribute_reference . 
25)(expression . 125)(external_value . 27)(identifier_opt . 28)(name . 
29)(string_expression . 30)(string_primary . 31)(term . 33))
       nil
       nil
       nil
@@ -406,26 +485,22 @@
       nil
       nil
       nil
-      ((case_item . 94)(case_items . 95))
       nil
-      ((aggregate . 22)(attribute_prefix . 23)(attribute_reference . 
24)(expression . 91)(external_value . 26)(identifier_opt . 27)(name . 
28)(string_expression . 29)(string_primary . 30)(term . 32))
-      ((attribute_declaration . 58)(case_statement . 
59)(simple_declarative_item . 89)(simple_declarative_items . 90))
-      ((aggregate . 88))
+      ((discrete_choice . 116)(discrete_choice_list . 117))
       nil
+      ((case_item . 113))
       nil
       nil
       nil
-      ((aggregate . 22)(attribute_prefix . 23)(attribute_reference . 
24)(expression . 108)(external_value . 26)(identifier_opt . 27)(name . 
28)(string_expression . 29)(string_primary . 30)(term . 32))
       nil
       nil
       nil
-      ((attribute_declaration . 58)(case_statement . 
59)(simple_declarative_item . 106))
       nil
       nil
-      ((discrete_choice . 101)(discrete_choice_list . 102))
       nil
-      ((case_item . 98))
       nil
+      ((attribute_declaration . 60)(case_statement . 61)(declarative_item . 
62)(declarative_items . 63)(declarative_items_opt . 130)(package_declaration . 
65)(package_spec . 66)(package_extension . 67)(package_renaming . 
68)(simple_declarative_item . 69)(typed_string_declaration . 70))
+      ((identifier_opt . 129))
       nil
       nil
       nil
@@ -434,19 +509,19 @@
       nil
       nil
       nil
-      ((identifier_opt . 110))
+      ((aggregate . 23)(attribute_prefix . 24)(attribute_reference . 
25)(expression . 140)(external_value . 27)(identifier_opt . 28)(name . 
29)(string_expression . 30)(string_primary . 31)(term . 33))
+      ((aggregate . 23)(attribute_prefix . 24)(attribute_reference . 
25)(expression . 139)(external_value . 27)(identifier_opt . 28)(name . 
29)(string_expression . 30)(string_primary . 31)(term . 33))
+      ((attribute_declaration . 60)(case_statement . 61)(declarative_item . 
62)(declarative_items . 63)(declarative_items_opt . 138)(package_declaration . 
65)(package_spec . 66)(package_extension . 67)(package_renaming . 
68)(simple_declarative_item . 69)(typed_string_declaration . 70))
+      ((discrete_choice . 137))
       nil
       nil
       nil
       nil
       nil
-      ((aggregate . 22)(attribute_prefix . 23)(attribute_reference . 
24)(expression . 118)(external_value . 26)(identifier_opt . 27)(name . 
28)(string_expression . 29)(string_primary . 30)(term . 32))
-      ((attribute_declaration . 58)(case_statement . 59)(declarative_item . 
60)(declarative_items . 117)(package_declaration . 62)(package_spec . 
63)(simple_declarative_item . 64)(typed_string_declaration . 65))
-      ((discrete_choice . 116))
       nil
+      ((identifier_opt . 143))
       nil
       nil
-      ((attribute_declaration . 58)(case_statement . 59)(declarative_item . 
67)(package_declaration . 62)(package_spec . 63)(simple_declarative_item . 
64)(typed_string_declaration . 65))
       nil
       nil
       nil]))
diff --git a/packages/ada-mode/gpr-mode.el b/packages/ada-mode/gpr-mode.el
index 8e64eb7..4bdf5b3 100644
--- a/packages/ada-mode/gpr-mode.el
+++ b/packages/ada-mode/gpr-mode.el
@@ -1,4 +1,4 @@
-;;; gpr-mode.el --- Major-mode for editing GNAT project files  -*- 
lexical-binding:t -*-
+;; gpr-mode --- Major mode for editing GNAT project files  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 2004, 2007, 2008, 2012-2015  Free Software Foundation, Inc.
 
@@ -46,19 +46,16 @@
     (define-key map [return]   'ada-indent-newline-indent)
     (define-key map "\C-c`"    'ada-show-secondary-error)
     ;; comment-dwim is in global map on M-;
-    (define-key map "\C-c\C-c" 'compile)
+    (define-key map "\C-c\C-c" 'ada-build-make)
     (define-key map "\C-c\C-e" 'gpr-expand)
     (define-key map "\C-c\C-f" 'gpr-show-parse-error)
     (define-key map "\C-c\C-i" 'gpr-indent-statement)
-            ;; FIXME (later): implement?
-    ;; (define-key map "\C-c\C-n" 'ada-next-statement-keyword)
-    ;; (define-key map "\C-c\C-p" 'ada-prev-statement-keyword)
     (define-key map "\C-c\C-o"          'ff-find-other-file)
     (define-key map "\C-c\C-P" 'gpr-set-as-project)
     (define-key map "\C-c\C-t" 'ada-case-read-all-exceptions)
     (define-key map "\C-c\C-w" 'ada-case-adjust-at-point)
     (define-key map "\C-c\C-y" 'ada-case-create-exception)
-    (define-key map "\C-c\C-\M-y" (lambda () (ada-case-create-exception nil 
nil t)))
+    (define-key map "\C-c\C-\M-y" 'ada-case-create-partial-exception)
     (define-key map "\M-n" 'skeleton-next-placeholder)
     (define-key map "\M-p" 'skeleton-prev-placeholder)
     map
@@ -76,6 +73,7 @@
 
     ["Customize"     (customize-group 'ada)];; we reuse the Ada indentation 
options
     ["------"        nil nil]
+    ["Build current project"       ada-build-make                   t]
     ["Find and select project ..." ada-build-prompt-select-prj-file t]
     ["Select project ..."          ada-prj-select                   t]
     ["Parse and select current file" gpr-set-as-project             t]
@@ -131,11 +129,38 @@ Function is called with no arguments.")
   (when gpr-indent-statement
     (funcall gpr-indent-statement)))
 
+(defconst gpr-casing-keywords
+  '(
+    "abstract"
+    "aggregate"
+    "case"
+    "configuration"
+    "end"
+    "extends"
+    "external"
+    "external_as_list"
+    "for"
+    "is"
+    "library"
+    "limited"
+    "null"
+    "others"
+    "package"
+    "project"
+    "renames"
+    "standard"
+    "type"
+    "use"
+    "when"
+    "with"
+    )
+  "List of gpr mode keywords for auto-casing.")
+
 (defvar gpr-font-lock-keywords
   (progn
     (list
      ;;
-     ;; keyword plus name.
+     ;; keyword plus name. FIXME: move to grammar action, use gpr-keywords 
here (see ada-font-lock-keywords).
      (list (concat
            "\\<\\("
            "package\\|"
@@ -148,8 +173,10 @@ Function is called with no arguments.")
      ;; Main keywords
      (list (concat "\\<"
                   (regexp-opt
-                   '("abstract" "aggregate" "case" "configuration" "external" 
"is" "library" "null" "others"
-                     "renames" "standard" "type" "use" "when" "with") t)
+                   '("abstract" "aggregate" "case" "configuration" "extends"
+                      "external" "external_as_list" "is" "library" "null"
+                      "others" "renames" "standard" "type" "use" "when" "with")
+                   t)
                   "\\>")
           '(1 font-lock-keyword-face))
      ;;
@@ -207,6 +234,7 @@ of the package or project point is in or just after, or 
nil.")
     (end-of-line 1)
     (gpr-which-function)))
 
+(declare-function gpr-query-kill-all-sessions "gpr-query.el" nil)
 (defun gpr-set-as-project (&optional file)
   "Set FILE (default current buffer file) as Emacs project file."
   (interactive)
@@ -231,7 +259,9 @@ of the package or project point is in or just after, or 
nil.")
   (setq mode-name "GNAT Project")
   (use-local-map gpr-mode-map)
   (set-syntax-table ada-mode-syntax-table)
-  (set (make-local-variable 'syntax-begin-function) nil)
+  (when (boundp 'syntax-begin-function)
+    ;; obsolete in emacs-25.1
+    (set (make-local-variable 'syntax-begin-function) nil))
   (set 'case-fold-search t); gpr is case insensitive; the syntax parsing 
requires this setting
   (set (make-local-variable 'comment-start) "--")
   (set (make-local-variable 'comment-end) "")
@@ -240,6 +270,9 @@ of the package or project point is in or just after, or 
nil.")
 
   (set (make-local-variable 'require-final-newline) t)
 
+  (ada-case-activate-keys gpr-mode-map)
+  (set (make-local-variable 'ada-keywords) gpr-casing-keywords)
+
   (set (make-local-variable 'font-lock-defaults)
        '(gpr-font-lock-keywords
         nil t
diff --git a/packages/ada-mode/gpr-mode.info b/packages/ada-mode/gpr-mode.info
index a001029..48bcae5 100644
--- a/packages/ada-mode/gpr-mode.info
+++ b/packages/ada-mode/gpr-mode.info
@@ -1,4 +1,4 @@
-This is gpr-mode.info, produced by makeinfo version 5.2 from
+This is gpr-mode.info, produced by makeinfo version 6.0 from
 gpr-mode.texi.
 
 Copyright (C) 2013 Free Software Foundation, Inc.
diff --git a/packages/ada-mode/gpr-query.el b/packages/ada-mode/gpr-query.el
index 014d3c6..ccb980e 100644
--- a/packages/ada-mode/gpr-query.el
+++ b/packages/ada-mode/gpr-query.el
@@ -1,4 +1,4 @@
-;;; gpr-query.el --- Minor-mode for navigating sources using gpr_query  -*- 
lexical-binding:t -*-
+;; gpr-query.el --- Minor mode for navigating sources using gpr_query  -*- 
lexical-binding:t -*-
 ;;
 ;; gpr-query supports Ada and any gcc language that supports the
 ;; AdaCore -fdump-xref switch (which includes C, C++).
@@ -28,6 +28,8 @@
 ;;
 ;; M-x gpr-query
 
+(require 'ada-mode-compat-24.2)
+
 (require 'ada-mode) ;; for ada-prj-*, some other things
 (require 'gnat-core)
 (require 'cl-lib)
@@ -63,8 +65,6 @@
       (setf (gpr-query--session-process session)
            ;; gnatcoll-1.6 can't handle aggregate projects; M910-032
            ;; gpr_query can handle some aggregate projects, but not all
-           ;; FIXME: need good error message on bad project file:
-           ;;          "can't handle aggregate projects?")
            (start-process (concat "gpr_query " (buffer-name))
                           (gpr-query--session-buffer session)
                           "gpr_query"
@@ -72,10 +72,17 @@
       (set-process-query-on-exit-flag (gpr-query--session-process session) nil)
       (gpr-query-session-wait session)
 
-      ;; check for warnings about invalid directories etc
-      (goto-char (point-min))
-      (when (search-forward "warning:" nil t)
-       (error "gpr_query warnings"))
+      ;; Check for warnings about invalid directories etc. But some
+      ;; warnings are tolerable, so only abort if process actually
+      ;; died.
+      (if (process-live-p (gpr-query--session-process session))
+         (progn
+           (goto-char (point-min))
+           (when (search-forward "warning:" nil t)
+             (beep)
+             (message "gpr_query warnings")))
+
+       (error "gpr-query process failed to start"))
       )))
 
 (defun gpr-query--make-session ()
@@ -125,7 +132,7 @@
                    (not (re-search-forward gpr-query-prompt (point-max) 1))))
        (setq search-start (point));; don't search same text again
        (message (concat "running gpr_query ..." (make-string wait-count ?.)))
-       ;; FIXME: use --display-progress
+       ;; IMPROVEME: use --display-progress
        (accept-process-output process 1.0)
        (setq wait-count (1+ wait-count)))
       (if (process-live-p process)
@@ -202,16 +209,20 @@ Uses 'gpr_query'. Returns new list."
   src-dirs)
 
 (defun gpr-query-get-prj-dirs (prj-dirs)
-  "Append list of source dirs in current gpr project to PRJ-DIRS.
+  "Append list of project dirs in current gpr project to PRJ-DIRS.
 Uses 'gpr_query'. Returns new list."
 
   (with-current-buffer (gpr-query--session-buffer (gpr-query-cached-session))
     (gpr-query-session-send "project_path" t)
     (goto-char (point-min))
     (while (not (looking-at gpr-query-prompt))
-      (cl-pushnew (directory-file-name
-                   (buffer-substring-no-properties (point) (point-at-eol)))
-                  prj-dirs :test #'equal)
+      (cl-pushnew
+       (let ((dir (buffer-substring-no-properties (point) (point-at-eol))))
+        (if (string= dir ".")
+            (directory-file-name default-directory)
+            dir))
+       prj-dirs
+       :test #'equal)
       (forward-line 1))
     )
   prj-dirs)
@@ -219,7 +230,7 @@ Uses 'gpr_query'. Returns new list."
 (defconst gpr-query-ident-file-regexp
   ;; 
C:\Projects\GDS\work_dscovr_release\common\1553\gds-mil_std_1553-utf.ads:252:25
   ;; 
/Projects/GDS/work_dscovr_release/common/1553/gds-mil_std_1553-utf.ads:252:25
-  "\\(\\(?:.:\\\|/\\)[^:]*\\):\\([0123456789]+\\):\\([0123456789]+\\)"
+  "\\(\\(?:.:\\\\\\|/\\)[^:]*\\):\\([0123456789]+\\):\\([0123456789]+\\)"
   ;; 1                          2                   3
   "Regexp matching <file>:<line>:<column>")
 
@@ -231,10 +242,6 @@ Uses 'gpr_query'. Returns new list."
   (concat gpr-query-ident-file-regexp " (\\(.*\\))")
   "Regexp matching <file>:<line>:<column> (<type>)")
 
-;; debugging:
-;; in *compilation-gpr_query-refs*, run
-;;  (progn (set-text-properties (point-min)(point-max) 
nil)(compilation-parse-errors (point-min)(point-max) 
gpr-query-ident-file-regexp-alist))
-
 (defun gpr-query-compilation (identifier file line col cmd comp-err)
   "Run gpr_query IDENTIFIER:FILE:LINE:COL CMD,
 set compilation-mode with compilation-error-regexp-alist set to COMP-ERR."
@@ -243,42 +250,55 @@ set compilation-mode with compilation-error-regexp-alist 
set to COMP-ERR."
   ;; to each result in turn via `next-error'.
   (let ((cmd-1 (format "%s %s:%s:%d:%d" cmd identifier file line col))
        (result-count 0)
-       file line column)
+       target-file target-line target-col)
     (with-current-buffer (gpr-query--session-buffer (gpr-query-cached-session))
       (compilation-mode)
       (setq buffer-read-only nil)
       (set (make-local-variable 'compilation-error-regexp-alist) (list 
comp-err))
       (gpr-query-session-send cmd-1 t)
 
-      ;; point is at EOB. gpr_query returns one line per result plus prompt
+      ;; point is at EOB. gpr_query returns one line per result plus prompt, 
warnings
       (setq result-count (- (line-number-at-pos) 1))
 
-      (if (fboundp 'font-lock-ensure)
-          (font-lock-ensure)
-        (with-no-warnings (font-lock-fontify-buffer)))
-      ;; font-lock-fontify-buffer applies compilation-message text properties
-      ;; FIXME: Won't be needed in 24.5 any more, since compilation-next-error
-      ;; will apply compilation-message text properties on the fly.
-      ;; IMPROVEME: for some reason, next-error works, but the font
-      ;; colors are not right (no koolaid!) (fixed in 24.5?)
+      (font-lock-ensure)
+      ;; pre Emacs 25, font-lock-ensure applies compilation-message
+      ;; text properties
+      ;;
+      ;; post Emacs 25, compilation-next-error applies
+      ;; compilation-message text properties on the fly via
+      ;; compilation--ensure-parse. But that doesn't apply face text
+      ;; properties.
+      ;;
+      ;; IMPROVEME: next-error works, but the font colors are not
+      ;; right (bad regexp?)
 
       (goto-char (point-min))
+      (cond
+       ((looking-at "^warning: ")
+       (setq result-count (1- result-count))
+       (forward-line 1))
+       ((looking-at "^Error: entity not found")
+       (error (buffer-substring-no-properties (line-beginning-position) 
(line-end-position))))
+       )
 
       (cl-case result-count
        (0
         (error "gpr_query returned no results"))
        (1
-        (when (looking-at "^Error: entity not found")
-          (error (buffer-substring-no-properties (line-beginning-position) 
(line-end-position))))
-
         ;; just go there, don't display session-buffer. We have to
-        ;; fetch the compilation-message while in the session-buffer.
-        (let* ((msg (compilation-next-error 0 nil (point-min)))
-                ;; FIXME: '--' indicates internal-only; use compile-goto-error
-               (loc (compilation--message->loc msg)))
-          (setq file (caar (compilation--loc->file-struct loc))
-                line (caar (cddr (compilation--loc->file-struct loc)))
-                column (1- (compilation--loc->col loc)))
+        ;; fetch the compilation-message while in the
+        ;; session-buffer. and call ada-goot-source outside the
+        ;; with-current-buffer above.
+        (compilation--ensure-parse (point-max))
+        (let* ((msg (compilation-next-error 0))
+                ;; IMPROVEME: '--' indicates internal-only. But we can't
+                ;; use compile-goto-error, because that displays the
+                ;; session-buffer.
+               (loc (compilation--message->loc msg)))
+          (setq target-file (caar (compilation--loc->file-struct loc))
+                target-line (caar (cddr (compilation--loc->file-struct loc)))
+                target-col  (1- (compilation--loc->col loc))
+                )
           ))
 
        (t
@@ -287,18 +307,20 @@ set compilation-mode with compilation-error-regexp-alist 
set to COMP-ERR."
 
        ));; case, with-currrent-buffer
 
-    (if (> result-count 1)
-       ;; more than one result; display session buffer, goto first ref
-       ;;
-       ;; compilation-next-error-function assumes there is not an error
-       ;; at point-min; work around that by moving forward 0 errors for
-       ;; the first one. Unless the first line contains "warning: ".
-       (if (looking-at "^warning: ")
-           (next-error)
-         (next-error 0 t))
-
-      ;; just one result; go there
-      (ada-goto-source file line column nil))
+    (if (= result-count 1)
+       (ada-goto-source target-file target-line target-col nil)
+
+      ;; more than one result; display session buffer, goto first ref
+      ;;
+      ;; compilation-next-error-function assumes there is not an error
+      ;; at point-min; work around that by moving forward 0 errors for
+      ;; the first one. Unless the first line contains "warning: ".
+      (set-buffer next-error-last-buffer)
+      (goto-char (point-min))
+      (if (looking-at "^warning: ")
+         (next-error)
+       (next-error 0 t))
+      )
     ))
 
 (defun gpr-query-dist (found-line line found-col col)
@@ -373,8 +395,8 @@ buffer in another window."
     (define-key map "\C-c\C-i\C-p" 'ada-build-prompt-select-prj-file)
     (define-key map "\C-c\C-i\C-q" 'gpr-query-refresh)
     (define-key map "\C-c\C-i\C-r" 'gpr-query-show-references)
-    ;; FIXME: (define-key map "\C-c\M-d" 'gpr-query-parents)
-    ;; FIXME: overriding
+    ;; IMPROVEME: (define-key map "\C-c\M-d" 'gpr-query-parents)
+    ;; IMPROVEME: overriding
     map
   )  "Local keymap used for gpr query minor mode.")
 
@@ -397,7 +419,7 @@ buffer in another window."
 
 (define-minor-mode gpr-query
   "Minor mode for navigating sources using GNAT cross reference tool.
-Enable mode if ARG is positive"
+Enable mode if ARG is positive."
   :initial-value t
   :lighter       " gpr-query"   ;; mode line
 
diff --git a/packages/ada-mode/gpr-skel.el b/packages/ada-mode/gpr-skel.el
index 08a8d6d..6947845 100644
--- a/packages/ada-mode/gpr-skel.el
+++ b/packages/ada-mode/gpr-skel.el
@@ -1,4 +1,4 @@
-;;; gpr-skel.el --- an extension to Gpr mode for inserting statement skeletons 
 -*- lexical-binding:t -*-
+;; gpr-skel.el --- Extension to gpr-mode for inserting statement skeletons  
-*- lexical-binding:t -*-
 
 ;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
 
@@ -41,11 +41,14 @@
 
 ;;;;; user variables, example skeletons intended to be overwritten
 
+(defgroup gpr nil
+  "Major mode for editing GNAT project files in Emacs."
+  :group 'languages)
+
 (defcustom gpr-skel-initial-string "{header}\n{project}"
   "String to insert in empty buffer.
 This could end in a token recognized by `gpr-skel-expand'."
   :type 'string
-  :group 'gpr                           ;FIXME: Unknown!
   :safe #'stringp)
 
 (define-skeleton gpr-skel-user-restricted
diff --git a/packages/ada-mode/gpr-wisi.el b/packages/ada-mode/gpr-wisi.el
index 67c625f..13c8dcd 100644
--- a/packages/ada-mode/gpr-wisi.el
+++ b/packages/ada-mode/gpr-wisi.el
@@ -1,8 +1,6 @@
-;;; gpr-wisi.el --- An indentation engine for gpr mode, using the wisent LALR 
parser  -*- lexical-binding:t -*-
+;; gpr-wisi.el --- Indentation engine for gpr mode, using the wisi parser  -*- 
lexical-binding:t -*-
 ;;
-;; [1] GNAT user guide (info "gnat_ugn")
-;;
-;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2013 - 2015 Free Software Foundation, Inc.
 ;;
 ;; Author: Stephen Leake <address@hidden>
 ;;
@@ -77,7 +75,6 @@ or containing ancestor of CACHE that is at a line beginning."
        (block-middle
         (wisi-indent-start
          (if (eq (wisi-cache-token cache) 'WHEN) ada-indent-when 0)
-         ;; FIXME (later): need test of ada-indent-when in gpr
          cache))
        (close-paren (wisi-indent-paren 0))
        (open-paren nil); let after-keyword handle it
diff --git a/packages/aggressive-indent/README.md 
b/packages/aggressive-indent/README.md
index 8873568..68e07ad 100644
--- a/packages/aggressive-indent/README.md
+++ b/packages/aggressive-indent/README.md
@@ -39,10 +39,8 @@ every programming mode, you can do something like:
 #### Manual Installation ####
 
 If you don't want to install from Melpa, you can download it manually,
-place it in your `load-path` along with its two dependencies:
-
-- [Names](https://github.com/Bruce-Connor/names/)
-- and `cl-lib` (which you should already have if your `emacs-version` is at 
least 24.3).
+place it in your `load-path` along with its dependency `cl-lib` (which
+you should already have if your `emacs-version` is at least 24.3).
 
 Then require it with:
 
diff --git a/packages/aggressive-indent/aggressive-indent.el 
b/packages/aggressive-indent/aggressive-indent.el
index a4424cb..67c3af8 100644
--- a/packages/aggressive-indent/aggressive-indent.el
+++ b/packages/aggressive-indent/aggressive-indent.el
@@ -3,8 +3,8 @@
 ;; Copyright (C) 2014, 2015 Free Software Foundation, Inc
 
 ;; Author: Artur Malabarba <address@hidden>
-;; URL: http://github.com/Malabarba/aggressive-indent-mode
-;; Version: 1.4
+;; URL: https://github.com/Malabarba/aggressive-indent-mode
+;; Version: 1.5
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: indent lisp maint tools
 ;; Prefix: aggressive-indent
@@ -79,12 +79,6 @@
 ;; GNU General Public License for more details.
 ;;
 
-;;; Change Log:
-;; 0.3.1 - 2014/10/30 - Define new delete-backward bound to backspace.
-;; 0.3   - 2014/10/23 - Implement a smarter engine for non-lisp modes.
-;; 0.2   - 2014/10/20 - Reactivate `electric-indent-mode'.
-;; 0.2   - 2014/10/19 - Add variable `aggressive-indent-dont-indent-if', so 
the user can prevent indentation.
-;; 0.1   - 2014/10/15 - Release.
 ;;; Code:
 
 (require 'cl-lib)
@@ -92,6 +86,7 @@
 (defgroup aggressive-indent nil
   "Customization group for aggressive-indent."
   :prefix "aggressive-indent-"
+  :group 'electricity
   :group 'indent)
 
 (defun aggressive-indent-bug-report ()
@@ -105,7 +100,7 @@ Please include this in your report!"
                (require 'lisp-mnt)
                (lm-version)))
            emacs-version)
-  (browse-url 
"https://github.com/Bruce-Connor/aggressive-indent-mode/issues/new";))
+  (browse-url 
"https://github.com/Malabarba/aggressive-indent-mode/issues/new";))
 
 (defvar aggressive-indent-mode)
 
@@ -132,6 +127,7 @@ Please include this in your report!"
     jabber-chat-mode
     haml-mode
     haskell-mode
+    haskell-interactive-mode
     image-mode
     makefile-mode
     makefile-gmake-mode
@@ -234,6 +230,10 @@ This is for internal use only.  For user customization, use
   '(when (boundp 'iedit-mode)
      (add-to-list 'aggressive-indent--internal-dont-indent-if
                   'iedit-mode)))
+(eval-after-load 'evil
+  '(when (boundp 'iedit-mode)
+     (add-to-list 'aggressive-indent--internal-dont-indent-if
+                  'iedit-mode)))
 (eval-after-load 'coq
   '(add-to-list 'aggressive-indent--internal-dont-indent-if
                 '(and (derived-mode-p 'coq-mode)
@@ -335,7 +335,7 @@ until nothing more happens."
                               ;; not at all, stop at the limit.
                               (< (point) point-limit))))
               (forward-line 1)
-              (skip-chars-forward "[:blank:]\n\r\xc"))))
+              (skip-chars-forward "[:blank:]\n\r\f"))))
       (goto-char p))))
 
 (defun aggressive-indent--softly-indent-region-and-on (l r &rest _)
@@ -353,18 +353,21 @@ or messages."
 (defun aggressive-indent--indent-if-changed ()
   "Indent any region that changed in the last command loop."
   (when aggressive-indent--changed-list
-    (unless (or (run-hook-wrapped 'aggressive-indent--internal-dont-indent-if 
#'eval)
-                (aggressive-indent--run-user-hooks))
-      (while-no-input
-        (let ((inhibit-modification-hooks t)
-              (inhibit-point-motion-hooks t)
-              (indent-function
-               (if (cl-member-if #'derived-mode-p 
aggressive-indent-modes-to-prefer-defun)
-                   #'aggressive-indent--softly-indent-defun 
#'aggressive-indent--softly-indent-region-and-on)))
-          (while aggressive-indent--changed-list
-            (apply indent-function (car aggressive-indent--changed-list))
-            (setq aggressive-indent--changed-list
-                  (cdr aggressive-indent--changed-list))))))))
+    (save-excursion
+      (save-selected-window
+        (unless (or (run-hook-wrapped 
'aggressive-indent--internal-dont-indent-if #'eval)
+                    (aggressive-indent--run-user-hooks))
+          (while-no-input
+            (redisplay)
+            (let ((inhibit-modification-hooks t)
+                  (inhibit-point-motion-hooks t)
+                  (indent-function
+                   (if (cl-member-if #'derived-mode-p 
aggressive-indent-modes-to-prefer-defun)
+                       #'aggressive-indent--softly-indent-defun 
#'aggressive-indent--softly-indent-region-and-on)))
+              (while aggressive-indent--changed-list
+                (apply indent-function (car aggressive-indent--changed-list))
+                (setq aggressive-indent--changed-list
+                      (cdr aggressive-indent--changed-list))))))))))
 
 (defun aggressive-indent--keep-track-of-changes (l r &rest _)
   "Store the limits (L and R) of each change in the buffer."
@@ -375,7 +378,7 @@ or messages."
 ;;;###autoload
 (define-minor-mode aggressive-indent-mode
   nil nil " =>"
-  '(("" . aggressive-indent-indent-defun)
+  `((,(kbd "C-c C-q") . aggressive-indent-indent-defun)
     ([backspace]
      menu-item "maybe-delete-indentation" ignore :filter
      (lambda (&optional _)
diff --git a/packages/ahungry-theme/ahungry-theme.el 
b/packages/ahungry-theme/ahungry-theme.el
index d395fa2..98deaf0 100644
--- a/packages/ahungry-theme/ahungry-theme.el
+++ b/packages/ahungry-theme/ahungry-theme.el
@@ -1,11 +1,11 @@
 ;;; ahungry-theme.el --- Ahungry color theme for Emacs.  Make sure to 
(load-theme 'ahungry).  -*- lexical-binding:t -*-
 
-;; Copyright (C) 2015  Free Software Foundation, Inc.
+;; Copyright (C) 2015,2016  Free Software Foundation, Inc.
 
 ;; Author: Matthew Carter <address@hidden>
 ;; Maintainer: Matthew Carter <address@hidden>
 ;; URL: https://github.com/ahungry/color-theme-ahungry
-;; Version: 1.0.12
+;; Version: 1.1.0
 ;; Keywords: ahungry palette color theme emacs color-theme deftheme
 ;; Package-Requires: ((emacs "24"))
 
@@ -36,6 +36,9 @@
 
 ;;; News:
 
+;;;; Changes since 1.0.12:
+;; - Add erc/jabber faces to begin with
+
 ;;;; Changes since 1.0.11:
 ;; - Purple is too hard to read on poor contrast monitors, use a blue
 
@@ -229,6 +232,14 @@
    '(helm-selection ((t (:foreground "#ff0099" :italic t :bold t :background 
"#f2e997"))))
    '(helm-match ((t (:foreground "gold1"))))
    '(helm-visible-mark ((t (:background "#f2e997" :foreground "#ff0099" :bold 
nil :italic nil))))
+   '(erc-nick-default-face ((t (:foreground "#ff0099"))))
+   '(erc-current-nick-face ((t (:foreground "#0099ff"))))
+   '(erc-input-face ((t (:foreground "#0099ff"))))
+   '(erc-prompt-face ((t (:background nil :foreground "#666666" :bold t 
:italic t))))
+   '(erc-timestamp-face ((t (:background nil :foreground "#666666" :bold nil 
:italic t))))
+   '(jabber-chat-prompt-foreign ((t (:foreground "#ff0099"))))
+   '(jabber-chat-prompt-local ((t (:foreground "#0099ff"))))
+   '(jabber-rare-time-face ((t (:foreground "#666666" :bold nil :italic t))))
    )
   (custom-theme-set-variables
    'ahungry
diff --git a/packages/ampc/ampc.el b/packages/ampc/ampc.el
new file mode 100644
index 0000000..6e9bbd6
--- /dev/null
+++ b/packages/ampc/ampc.el
@@ -0,0 +1,3123 @@
+;;; ampc.el --- Asynchronous Music Player Controller -*- lexical-binding: t -*-
+
+;; Copyright (C) 2011-2012, 2016 Free Software Foundation, Inc.
+
+;; Author: Christopher Schmidt <address@hidden>
+;; Comment: On Jan 2016, I couldn't get hold of Christopher Schmidt
+;;   nor could I find ampc anywhere, so I re-instated GNU ELPA's old version
+;;   and marked it as "maintainerless".
+;; Maintainer: address@hidden
+;; Version: 0.2
+;; Created: 2011-12-06
+;; Keywords: ampc, mpc, mpd
+;; Compatibility: GNU Emacs: 24.x
+
+;; This file is part of ampc.
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;; * description
+;; ampc is a controller for the Music Player Daemon (http://mpd.wikia.com/).
+
+;;; ** installation
+;; If you use GNU ELPA, install ampc via M-x package-list-packages RET or
+;; (package-install 'ampc).  Otherwise, grab the files in this repository and
+;; put the Emacs Lisp ones somewhere in your load-path or add the directory the
+;; files are in to it, e.g.:
+;;
+;; (add-to-list 'load-path "~/.emacs.d/ampc")
+;; (autoload 'ampc "ampc" nil t)
+;;
+;; Byte-compile ampc (M-x byte-compile-file RET /path/to/ampc.el RET) to 
improve
+;; its performance!
+
+;;; *** tagger
+;; ampc is not only a frontend to MPD but also a full-blown audio file tagger.
+;; To use this feature you have to build the backend application, 
`ampc_tagger',
+;; which in turn uses TagLib (http://taglib.github.com/), a dual-licended
+;; (LGPL/MPL) audio meta-data library written in C++.  TagLib has no
+;; dependencies on its own.
+;;
+;; To build `ampc_tagger', locate ampc_tagger.cpp.  The file can be found in 
the
+;; directory in which this file, ampc.el, is located.  Compile the file and
+;; either customize `ampc-tagger-executable' to point to the binary file or 
move
+;; the executable in a suitable directory so Emacs finds it via consulting
+;; `exec-path'.
+;;
+;; g++ -O2 ampc_tagger.cpp -oampc_tagger -ltag && sudo cp ampc_tagger 
/usr/local/bin && rm ampc_tagger
+;;
+;; You have to customize `ampc-tagger-music-directories' in order to use the
+;; tagger.  This variable should be a list of directories in which your music
+;; files are located.  Usually this list should have only one entry, the value
+;; of your mpd.conf's `music_directory'.
+;;
+;; If `ampc-tagger-backup-directory' is non-nil, the tagger saved copies of all
+;; files that are about to be modified to this directory.  Emacs's regular
+;; numeric backup filename syntax is used for the backup file names.  By 
default
+;; `ampc-tagger-backup-directory' is set to "~/.emacs.d/ampc-backups/".
+
+;;; ** usage
+;; To invoke ampc call the command `ampc', e.g. via M-x ampc RET.  The first
+;; argument to `ampc' is the host, the second is the port.  Both values default
+;; to nil.  If nil, ampc will use the value specified in `ampc-default-server',
+;; by default localhost:6600.  To make ampc use the full frame rather than the
+;; selected window for its window setup, customise `ampc-use-full-frame' to a
+;; non-nil value.
+;;
+;; ampc offers three independent views which expose different parts of the user
+;; interface.  The current playlist view, the default view at startup, may be
+;; accessed using the `J' key (that is `S-j').  The playlist view may be
+;; accessed using the `K' key.  The outputs view may be accessed by pressing
+;; `L'.
+
+;;; *** current playlist view
+;; The playlist view looks like this:
+;;
+;; .........................
+;; . 1      . 3  . 4  . 5  .
+;; ..........    .    .    .
+;; . 2      .    .    .    .
+;; .        .    .    .    .
+;; .        .    .    .    .
+;; .        ................
+;; .        . 6            .
+;; .        .              .
+;; .........................
+;;
+;; Window one exposes basic information about the daemon, such as the current
+;; state (stop/play/pause), the song currently playing or the volume.
+;;
+;; All windows, except the status window, contain a tabular list of items.  
Each
+;; item may be selected/marked.  There may be multiple selections.
+;;
+;; To mark an entry, move the point to the entry and press `m' (ampc-mark).  To
+;; unmark an entry, press `u' (ampc-unmark).  To unmark all entries, press `U'
+;; (ampc-unmark-all).  To toggle marks, press `t' (ampc-toggle-marks).  
Pressing
+;; `<down-mouse-1>' with the mouse mouse cursor on a list entry will move point
+;; to the entry and toggle the mark.  To navigate to the next entry, press `n'
+;; (ampc-next-line).  Analogous, pressing `p' (ampc-previous-line) moves the
+;; point to the previous entry.
+;;
+;; Window two shows the current playlist.  The song that is currently played by
+;; the daemon, if any, is highlighted.  To delete the selected songs from the
+;; playlist, press `d' (ampc-delete).  Pressing `<down-mouse-3>' will move the
+;; point to the entry under cursor and delete it from the playlist.  To move 
the
+;; selected songs up, press `<up>' (ampc-up).  Analogous, press `<down>'
+;; (ampc-down) to move the selected songs down.  Pressing `RET'
+;; (ampc-play-this) or `<down-mouse-2>' will play the song at point/cursor.
+;;
+;; Windows three to five are tag browsers.  You use them to narrow the song
+;; database to certain songs.  Think of tag browsers as filters, analogous to
+;; piping `grep' outputs through additional `grep' filters.  The property of 
the
+;; songs that is filtered is displayed in the header line of the window.
+;;
+;; Window six shows the songs that match the filters defined by windows three 
to
+;; five.  To add the selected song to the playlist, press `a' (ampc-add).
+;; Pressing `<down-mouse-3>' will move the point to the entry under the cursor
+;; and execute `ampc-add'.  These key bindings works in tag browsers as well.
+;; Calling `ampc-add' in a tag browser adds all songs filtered up to the
+;; selected browser to the playlist.
+;;
+;; The tag browsers of the current playlist view (accessed via `J') are `Genre'
+;; (window 3), `Artist' (window 4) and `Album' (window 5).  The key `M' may be
+;; used to fire up a slightly modified current playlist view.  There is no
+;; difference to the default current playlist view other than that the tag
+;; browsers filter to `Genre' (window 3), `Album' (window 4) and `Artist'
+;; (window 5).  Metaphorically speaking, the order of the `grep' filters 
defined
+;; by the tag browsers is different.
+
+;;; *** playlist view
+;; The playlist view resembles the current playlist view.  The window, which
+;; exposes the playlist content, is replaced by three windows, vertically
+;; arragned, though.  The top one still shows the current playlist.  The bottom
+;; one shows a list of stored playlists.  The middle window exposes the content
+;; of the selected (stored) playlist.  All commands that used to work in the
+;; current playlist view and modify the current playlist now modify the 
selected
+;; (stored) playlist unless the point is within the current playlist buffer.
+;; The list of stored playlists is the only view in ampc that may have only one
+;; marked entry.
+;;
+;; To queue a playlist, press `l' (ampc-load) or `<down-mouse-2>'.  To delete a
+;; playlist, press `d' (ampc-delete-playlist) or `<down-mouse-3>'.  The command
+;; `ampc-rename-playlist', bound to `r', can be used to rename a playlist.
+;;
+;; Again, the key `<' may be used to setup a playlist view with a different
+;; order of tag browsers.
+
+;;; *** outputs view
+;; The outputs view contains a single list which shows the configured outputs 
of
+;; MPD.  To toggle the enabled property of the selected outputs, press `a'
+;; (ampc-toggle-output-enabled) or `<mouse-3>'.
+
+;;; ** tagger
+;; To start the tagging subsystem, press `I' (ampc-tagger).  This key binding
+;; works in every buffer associated with ampc.  First, the command tries to
+;; determine which files you want to tag.  The files are collected using either
+;; the selected entries within the current buffer, the file associated with the
+;; entry at point, or, if both sources did not provide any files, the audio 
file
+;; that is currently played by MPD.  Next, the tagger view is created.  On the
+;; right there is the buffer that contain the tag data.  Each line in this
+;; buffer represents a tag with a value.  Tag and value are separated by a
+;; colon.  Valid tags are "Title", "Artist", "Album", "Comment", "Genre", 
"Year"
+;; and "Track".  The value can be an arbitrary string.  Whitespaces in front 
and
+;; at the end of the value are ignored.  If the value is "<keep>", the tag line
+;; is ignored.
+;;
+;; To save the specified tag values back to the files, press `C-c C-c'
+;; (ampc-tagger-save).  To exit the tagger and restore the previous window
+;; configuration, press `C-c C-q'.  `C-u C-c C-c' saved the tags and exits the
+;; tagger.  Only tags that are actually specified within the tagger buffer
+;; written back to the file.  Other tags will not be touched by ampc.  For
+;; example, to clear the "Commentary" tag, you need to specify the line
+;;
+;; Commentary:
+;;
+;; In the tagger buffer.  Omitting this line will make the tagger not touch the
+;; "Commentary" tag at all.
+;;
+;; On the right there is the files list buffer.  The selection of this buffer
+;; specifies which files the command `ampc-tag-save' will write to.  If no file
+;; is selected, the file at point in the file list buffer is used.
+;;
+;; To reset the values of the tags specified in the tagger buffer to the common
+;; values of all selected files specified by the selection of the files list
+;; buffer, press `C-c C-r' (ampc-tagger-reset).  With a prefix argument,
+;; `ampc-tagger-reset' restores missing tags as well.
+;;
+;; You can use tab-completion within the tagger buffer for both tags and tag
+;; values.
+;;
+;; You can also use the tagging subsystem on its own without a running ampc
+;; instance.  To start the tagger, call `ampc-tag-files'.  This function 
accepts
+;; one argument, a list of absolute file names which are the files to tag.  
ampc
+;; provides a minor mode for dired, `ampc-tagger-dired-mode'.  If this mode is
+;; enabled within a dired buffer, pressing `C-c C-t' (ampc-tagger-dired) will
+;; start the tagger on the current selection.
+;;
+;; The following ampc-specific hooks are run during tagger usage:
+;;
+;; `ampc-tagger-grab-hook': Run by the tagger before grabbing tags of a file.
+;; Each function is called with one argument, the file name.
+;;
+;; `ampc-tagger-grabbed-hook': Run by the tagger after grabbing tags of a file.
+;; Each function is called with one argument, the file name.
+;;
+;; `ampc-tagger-store-hook': Run by the tagger before writing tags back to a
+;; file.  Each function is called with two arguments, FOUND-CHANGED and DATA.
+;; FOUND-CHANGED is non-nil if the tags that are about to be written differ 
from
+;; the ones in the file.  DATA is a cons.  The car specifies the full file name
+;; of the file that is about to be written to, the cdr is an alist that
+;; specifies the tags that are about to be (over-)written.  The car of each
+;; entry in this list is a symbol specifying the tag (one of the ones in
+;; `ampc-tagger-tags'), the cdr a string specifying the value.  The cdr of DATA
+;; may be modified.  If FOUND-CHANGED is nil and the cdr of DATA is not 
modified
+;; throughout the hook is run, the file is not touched.
+;; `ampc-tagger-stored-hook' is still run, though.
+;;
+;; `ampc-tagger-stored-hook': Run by the tagger after writing tags back to a
+;; file.  Each function is called with two arguments, FOUND-CHANGED and DATA.
+;; These are the same arguments that were already passed to
+;; `ampc-tagger-store-hook'.  The car of DATA, the file name, may be modified.
+;;
+;; These hooks can be used to handle vc locking and unlocking of files.  For
+;; renaming files according to their (new) tag values, ampc provides the
+;; function `ampc-tagger-rename-artist-title' which may be added to
+;; `ampc-tagger-stored-hook'.  The new file name generated by this function is
+;; "Artist"_-_"Title"."extension".  Characters within "Artist" and "Title" that
+;; are not alphanumeric are substituted with underscores.
+
+;;; ** global keys
+;; Aside from `J', `M', `K', `<' and `L', which may be used to select different
+;; views, and `I' which starts the tagger, ampc defines the following global
+;; keys.  These binding are available in every buffer associated with ampc:
+;;
+;; `k' (ampc-toggle-play): Toggle play state.  If MPD does not play a song,
+;; start playing the song at point if the current buffer is the playlist 
buffer,
+;; otherwise start at the beginning of the playlist.  With numeric prefix
+;; argument 4, stop player rather than pause if applicable.
+;;
+;; `l' (ampc-next): Play next song.
+;; `j' (ampc-previous): Play previous song
+;;
+;; `c' (ampc-clear): Clear playlist.
+;; `s' (ampc-shuffle): Shuffle playlist.
+;;
+;; `S' (ampc-store): Store playlist.
+;; `O' (ampc-load): Load selected playlist into the current playlist.
+;; `R' (ampc-rename-playlist): Rename selected playlist.
+;; `D' (ampc-delete-playlist): Delete selected playlist.
+;;
+;; `y' (ampc-increase-volume): Increase volume.
+;; `M-y' (ampc-decrease-volume): Decrease volume.
+;; `C-M-y' (ampc-set-volume): Set volume.
+;; `h' (ampc-increase-crossfade): Increase crossfade.
+;; `M-h' (ampc-decrease-crossfade): Decrease crossfade.
+;; `C-M-h' (ampc-set-crossfade): Set crossfade.
+;;
+;; `e' (ampc-toggle-repeat): Toggle repeat state.
+;; `r' (ampc-toggle-random): Toggle random state.
+;; `f' (ampc-toggle-consume): Toggle consume state.
+;;
+;; `P' (ampc-goto-current-song): Select the current playlist window and move
+;; point to the current song.
+;; `G' (ampc-mini): Select song to play via `completing-read'.
+;;
+;; `T' (ampc-trigger-update): Trigger a database update.
+;; `Z' (ampc-suspend): Suspend ampc.
+;; `q' (ampc-quit): Quit ampc.
+;;
+;; The keymap of ampc is designed to fit the QWERTY United States keyboard
+;; layout.  If you use another keyboard layout, feel free to modify
+;; `ampc-mode-map'.  For example, I use a regular QWERTZ German keyboard
+;; (layout), so I modify `ampc-mode-map' in my init.el like this:
+;;
+;; (eval-after-load 'ampc
+;;   '(flet ((substitute-ampc-key
+;;            (from to)
+;;            (define-key ampc-mode-map to (lookup-key ampc-mode-map from))
+;;            (define-key ampc-mode-map from nil)))
+;;      (substitute-ampc-key (kbd "z") (kbd "Z"))
+;;      (substitute-ampc-key (kbd "y") (kbd "z"))
+;;      (substitute-ampc-key (kbd "M-y") (kbd "M-z"))
+;;      (substitute-ampc-key (kbd "C-M-y") (kbd "C-M-z"))
+;;      (substitute-ampc-key (kbd "<") (kbd ";"))))
+;;
+;; If ampc is suspended, you can still use every interactive command that does
+;; not directly operate on or with the user interace of ampc.  For example it 
is
+;; perfectly fine to call `ampc-increase-volume' or `ampc-toggle-play' via M-x
+;; RET.  Especially the commands `ampc-status' and `ampc-mini' are 
predesignated
+;; to be bound in the global keymap and called when ampc is suspended.
+;; `ampc-status' messages the information that is displayed by the status 
window
+;; of ampc.  `ampc-mini' lets you select a song to play via `completing-read'.
+;; To start ampc suspended, call `ampc' with the third argument being non-nil.
+;; To check whether ampc is connected to the daemon and/or suspended, call
+;; `ampc-is-on-p' or `ampc-suspended-p'.
+;;
+;; (global-set-key (kbd "<f7>")
+;;                 (lambda ()
+;;                   (interactive)
+;;                   (unless (ampc-on-p)
+;;                     (ampc nil nil t))
+;;                   (ampc-status)))
+;; (global-set-key (kbd "<f8>")
+;;                 (lambda ()
+;;                   (interactive)
+;;                   (unless (ampc-on-p)
+;;                     (ampc nil nil t))
+;;                   (ampc-mini)))
+
+;;; Code:
+;;; * code
+(eval-when-compile (require 'cl-lib))
+(require 'network-stream)
+(require 'avl-tree)
+
+;;; ** declarations
+(defgroup ampc ()
+  "Asynchronous client for the Music Player Daemon."
+  :prefix "ampc-"
+  :group 'multimedia
+  :group 'applications)
+
+;;; *** customs
+(defcustom ampc-debug nil
+  "Non-nil means log outgoing communication between ampc and MPD.
+If the value is neither t nor nil, also log incoming data."
+  :type '(choice (const :tag "Disable" nil)
+                 (const :tag "Outgoing" t)
+                 (const :tag "Incoming and outgoing" full)))
+
+(defcustom ampc-use-full-frame nil
+  "If non-nil, ampc will use the entire Emacs screen."
+  :type 'boolean)
+
+(defcustom ampc-truncate-lines t
+  "If non-nil, truncate lines in ampc buffers."
+  :type 'boolean)
+
+(defcustom ampc-default-server '("localhost" . 6600)
+  "The MPD server to connect to if the arguments to `ampc' are nil.
+This variable is a cons cell, with the car specifying the
+hostname and the cdr specifying the port.  Both values can be
+nil, which will make ampc query the user for values on each
+invocation."
+  :type '(cons (choice :tag "Hostname"
+                       (string)
+                       (const :tag "Ask" nil))
+               (choice :tag "Port"
+                       (string)
+                       (integer)
+                       (const :tag "Ask" nil))))
+
+(defcustom ampc-synchronous-commands '(t status currentsong play)
+  "List of MPD commands that should be executed synchronously.
+Executing commands that print lots of output synchronously will
+result in massive performance improvements of ampc.  If the car
+of this list is t, execute all commands synchronously other
+than the ones specified by the rest of the list."
+  :type '(repeat symbol))
+
+(defcustom ampc-status-tags nil
+  "List of additional tags of the current song that are added to
+the internal status of ampc and thus are passed to the functions
+in `ampc-status-changed-hook'.  Each element may be a string that
+specifies a tag that is returned by MPD's `currentsong'
+command."
+  :type '(list symbol))
+
+(defcustom ampc-volume-step 5
+  "Default step of `ampc-increase-volume' and
+`ampc-decrease-volume' for changing the volume."
+  :type 'integer)
+
+(defcustom ampc-crossfade-step 5
+  "Default step of `ampc-increase-crossfade' and
+`ampc-decrease-crossfade' for changing the crossfade."
+  :type 'integer)
+
+(defcustom ampc-tag-transform-funcs '(("Time" . ampc-transform-time)
+                                      ("Track" . ampc-transform-track))
+  "Alist of tag treatment functions.
+The car, a string, of each entry specifies the MPD tag, the cdr a
+function which transforms the tag to the value that should be
+used by ampc.  The function is called with one string argument,
+the tag value, and should return the treated value."
+  :type '(alist :key-type string :value-type function))
+
+(defcustom ampc-tagger-music-directories nil
+  "List of base directories in which your music files are located.
+Usually this list should have only one entry, the value of your
+mpd.conf's `music_directory'"
+  :type '(list directory))
+
+(defcustom ampc-tagger-executable "ampc_tagger"
+  "The name or full path to ampc's tagger executable."
+  :type 'string)
+
+(defcustom ampc-tagger-backup-directory
+  (file-name-directory (locate-user-emacs-file "ampc-backups/"))
+  "The directory in which the tagger copies files before modifying.
+If nil, disable backups."
+  :type '(choice (const :tag "Disable backups" nil)
+                 (directory :tag "Directory")))
+
+;;; **** hooks
+(defcustom ampc-before-startup-hook nil
+  "A hook run before startup.
+This hook is called as the first thing when ampc is started."
+  :type 'hook)
+
+(defcustom ampc-connected-hook nil
+  "A hook run after ampc connected to MPD."
+  :type 'hook)
+
+(defcustom ampc-suspend-hook nil
+  "A hook run when suspending ampc."
+  :type 'hook)
+
+(defcustom ampc-quit-hook nil
+  "A hook run when exiting ampc."
+  :type 'hook)
+
+(defcustom ampc-status-changed-hook nil
+  "A hook run whenever the status of the daemon (that is volatile
+properties such as volume or current song) changes.  The hook is
+run with one arg, an alist that contains the new status.  The car
+of each entry is a symbol, the cdr is a string.  Valid keys are:
+
+    volume
+    repeat
+    random
+    consume
+    xfade
+    state
+    song
+    Artist
+    Title
+
+and the keys in `ampc-status-tags'.  Not all keys may be present
+all the time!"
+  :type 'hook)
+
+(defcustom ampc-tagger-grab-hook nil
+  "Hook run by the tagger before grabbing tags of a file.
+Each function is called with one argument, the file name."
+  :type 'hook)
+(defcustom ampc-tagger-grabbed-hook nil
+  "Hook run by the tagger after grabbing tags of a file.
+Each function is called with one argument, the file name."
+  :type 'hook)
+
+(defcustom ampc-tagger-store-hook nil
+  "Hook run by the tagger before writing tags back to a file.
+Each function is called with two arguments, FOUND-CHANGED and
+DATA.  FOUND-CHANGED is non-nil if the tags that are about to be
+written differ from the ones in the file.  DATA is a cons.  The
+car specifies the full file name of the file that is about to be
+written to, the cdr is an alist that specifies the tags that are
+about to be (over-)written.  The car of each entry in this list
+is a symbol specifying the tag (one of the ones in
+`ampc-tagger-tags'), the cdr a string specifying the value.  The
+cdr of DATA may be modified.  If FOUND-CHANGED is nil and the cdr
+of DATA is not modified throughout the hook is run, the file is
+not touched.  `ampc-tagger-stored-hook' is still run, though."
+  :type 'hook)
+(defcustom ampc-tagger-stored-hook nil
+  "Hook run by the tagger after writing tags back to a file.
+Each function is called with two arguments, FOUND-CHANGED and
+DATA.  These are the same arguments that were already passed to
+`ampc-tagger-store-hook'.  The car of DATA, the file name, may be
+modified."
+  :type 'hook)
+
+;;; *** faces
+(defface ampc-mark-face '((t (:inherit font-lock-constant-face)))
+  "Face of the mark.")
+(defface ampc-marked-face '((t (:inherit warning)))
+  "Face of marked entries.")
+(defface ampc-unmarked-face '((t (:inerhit default)))
+  "Face of unmarked entries.")
+(defface ampc-current-song-mark-face '((t (:inherit region)))
+  "Face of mark of the current song.")
+(defface ampc-current-song-marked-face '((t (:inherit region)))
+  "Face of the current song if marked.")
+
+(defface ampc-tagger-tag-face '((t (:inherit font-lock-constant-face)))
+  "Face of tags within the tagger.")
+(defface ampc-tagger-keyword-face '((t (:inherit font-lock-keyword-face)))
+  "Face of tags within the tagger.")
+
+;;; *** internal variables
+(defvar ampc-views
+  (let* ((songs '(1.0 song :properties (("Track" :title "#" :width 4)
+                                        ("Title" :min 15 :max 40)
+                                        ("Time" :width 6)
+                                        ("Artist" :min 15 :max 40)
+                                        ("Album" :min 15 :max 40))))
+         (rs_a `(1.0 vertical
+                     (0.7 horizontal
+                          (0.33 tag :tag "Genre" :id 1 :select t)
+                          (0.33 tag :tag "Artist" :id 2)
+                          (1.0 tag :tag "Album" :id 3))
+                     ,songs))
+         (rs_b `(1.0 vertical
+                     (0.7 horizontal
+                          (0.33 tag :tag "Genre" :id 1 :select t)
+                          (0.33 tag :tag "Album" :id 2)
+                          (1.0 tag :tag "Artist" :id 3))
+                     ,songs))
+         (pl-prop '(:properties (("Title" :min 15 :max 40)
+                                 ("Artist" :min 15 :max 40)
+                                 ("Album" :min 15 :max 40)
+                                 ("Time" :width 6)))))
+    `((tagger
+       horizontal
+       (0.65 files-list
+             :properties ((filename :shrink t :title "File" :min 20 :max 40)
+                          ("Title" :min 15 :max 40)
+                          ("Artist" :min 15 :max 40)
+                          ("Album" :min 15 :max 40)
+                          ("Genre" :min 15 :max 40)
+                          ("Year" :width 5)
+                          ("Track" :title "#" :width 4)
+                          ("Comment" :min 15 :max 40))
+             :dedicated nil)
+       (1.0 tagger))
+      ("Current playlist view (Genre|Artist|Album)"
+       ,(kbd "J")
+       horizontal
+       (0.4 vertical
+            (6 status)
+            (1.0 current-playlist ,@pl-prop))
+       ,rs_a)
+      ("Current playlist view (Genre|Album|Artist)"
+       ,(kbd "M")
+       horizontal
+       (0.4 vertical
+            (6 status)
+            (1.0 current-playlist ,@pl-prop))
+       ,rs_b)
+      ("Playlist view (Genre|Artist|Album)"
+       ,(kbd "K")
+       horizontal
+       (0.4 vertical
+            (6 status)
+            (1.0 vertical
+                 (0.4 current-playlist ,@pl-prop)
+                 (0.4 playlist ,@pl-prop)
+                 (1.0 playlists)))
+       ,rs_a)
+      ("Playlist view (Genre|Album|Artist)"
+       ,(kbd "<")
+       horizontal
+       (0.4 vertical
+            (6 status)
+            (1.0 vertical
+                 (0.4 current-playlist ,@pl-prop)
+                 (0.4 playlist ,@pl-prop)
+                 (1.0 playlists)))
+       ,rs_b)
+      ("Outputs view"
+       ,(kbd "L")
+       outputs :properties (("outputname" :title "Name" :min 10 :max 30)
+                            ("outputenabled" :title "Enabled" :width 9))))))
+
+(defvar ampc-connection nil)
+(defvar ampc-host nil)
+(defvar ampc-port nil)
+(defvar ampc-outstanding-commands nil)
+
+(defvar ampc-no-implicit-next-dispatch nil)
+(defvar ampc-working-timer nil)
+(defvar ampc-yield nil)
+(defvar ampc-yield-redisplay nil)
+
+(defvar ampc-windows nil)
+(defvar ampc-all-buffers nil)
+
+(defvar ampc-type nil)
+(make-variable-buffer-local 'ampc-type)
+(defvar ampc-dirty nil)
+(make-variable-buffer-local 'ampc-dirty)
+
+(defvar ampc-internal-db nil)
+(defvar ampc-status nil)
+
+(defvar ampc-tagger-previous-configuration nil)
+(defvar ampc-tagger-version-verified nil)
+(defvar ampc-tagger-completion-all-files nil)
+(defvar ampc-tagger-genres nil)
+
+(defconst ampc-tagger-version "0.1")
+(defconst ampc-tagger-tags '(Title Artist Album Comment Genre Year Track))
+
+;;; *** mode maps
+(defvar ampc-mode-map
+  (let ((map (make-sparse-keymap)))
+    (suppress-keymap map)
+    (define-key map (kbd "k") 'ampc-toggle-play)
+    (define-key map (kbd "l") 'ampc-next)
+    (define-key map (kbd "j") 'ampc-previous)
+    (define-key map (kbd "c") 'ampc-clear)
+    (define-key map (kbd "s") 'ampc-shuffle)
+    (define-key map (kbd "S") 'ampc-store)
+    (define-key map (kbd "O") 'ampc-load)
+    (define-key map (kbd "R") 'ampc-rename-playlist)
+    (define-key map (kbd "D") 'ampc-delete-playlist)
+    (define-key map (kbd "y") 'ampc-increase-volume)
+    (define-key map (kbd "M-y") 'ampc-decrease-volume)
+    (define-key map (kbd "C-M-y") 'ampc-set-volume)
+    (define-key map (kbd "h") 'ampc-increase-crossfade)
+    (define-key map (kbd "M-h") 'ampc-decrease-crossfade)
+    (define-key map (kbd "C-M-h") 'ampc-set-crossfade)
+    (define-key map (kbd "e") 'ampc-toggle-repeat)
+    (define-key map (kbd "r") 'ampc-toggle-random)
+    (define-key map (kbd "f") 'ampc-toggle-consume)
+    (define-key map (kbd "P") 'ampc-goto-current-song)
+    (define-key map (kbd "G") 'ampc-mini)
+    (define-key map (kbd "q") 'ampc-quit)
+    (define-key map (kbd "z") 'ampc-suspend)
+    (define-key map (kbd "T") 'ampc-trigger-update)
+    (define-key map (kbd "I") 'ampc-tagger)
+    (cl-loop for view in ampc-views
+             do (when (stringp (car view))
+                  (define-key map (cadr view)
+                    `(lambda ()
+                       (interactive)
+                       (ampc-change-view ',view)))))
+    map))
+
+(defvar ampc-item-mode-map
+  (let ((map (make-sparse-keymap)))
+    (suppress-keymap map)
+    (define-key map (kbd "m") 'ampc-mark)
+    (define-key map (kbd "u") 'ampc-unmark)
+    (define-key map (kbd "U") 'ampc-unmark-all)
+    (define-key map (kbd "n") 'ampc-next-line)
+    (define-key map (kbd "p") 'ampc-previous-line)
+    (define-key map (kbd "<down-mouse-1>") 'ampc-mouse-toggle-mark)
+    (define-key map (kbd "<mouse-1>") 'ampc-mouse-align-point)
+    (define-key map [remap next-line] 'ampc-next-line)
+    (define-key map [remap previous-line] 'ampc-previous-line)
+    (define-key map [remap tab-to-tab-stop] 'ampc-move-to-tab)
+    map))
+
+(defvar ampc-current-playlist-mode-map
+  (let ((map (make-sparse-keymap)))
+    (suppress-keymap map)
+    (define-key map (kbd "RET") 'ampc-play-this)
+    (define-key map (kbd "<down-mouse-2>") 'ampc-mouse-play-this)
+    (define-key map (kbd "<mouse-2>") 'ampc-mouse-align-point)
+    (define-key map (kbd "<down-mouse-3>") 'ampc-mouse-delete)
+    (define-key map (kbd "<mouse-3>") 'ampc-mouse-align-point)
+    map))
+
+(defvar ampc-playlist-mode-map
+  (let ((map (make-sparse-keymap)))
+    (suppress-keymap map)
+    (define-key map (kbd "t") 'ampc-toggle-marks)
+    (define-key map (kbd "d") 'ampc-delete)
+    (define-key map (kbd "<up>") 'ampc-up)
+    (define-key map (kbd "<down>") 'ampc-down)
+    (define-key map (kbd "<down-mouse-3>") 'ampc-mouse-delete)
+    (define-key map (kbd "<mouse-3>") 'ampc-mouse-align-point)
+    map))
+
+(defvar ampc-playlists-mode-map
+  (let ((map (make-sparse-keymap)))
+    (suppress-keymap map)
+    (define-key map (kbd "l") 'ampc-load)
+    (define-key map (kbd "r") 'ampc-rename-playlist)
+    (define-key map (kbd "d") 'ampc-delete-playlist)
+    (define-key map (kbd "<down-mouse-2>") 'ampc-mouse-load)
+    (define-key map (kbd "<mouse-2>") 'ampc-mouse-align-point)
+    (define-key map (kbd "<down-mouse-3>") 'ampc-mouse-delete-playlist)
+    (define-key map (kbd "<mouse-3>") 'ampc-mouse-align-point)
+    map))
+
+(defvar ampc-tag-song-mode-map
+  (let ((map (make-sparse-keymap)))
+    (suppress-keymap map)
+    (define-key map (kbd "t") 'ampc-toggle-marks)
+    (define-key map (kbd "a") 'ampc-add)
+    (define-key map (kbd "<down-mouse-3>") 'ampc-mouse-add)
+    (define-key map (kbd "<mouse-3>") 'ampc-mouse-align-point)
+    map))
+
+(defvar ampc-outputs-mode-map
+  (let ((map (make-sparse-keymap)))
+    (suppress-keymap map)
+    (define-key map (kbd "t") 'ampc-toggle-marks)
+    (define-key map (kbd "a") 'ampc-toggle-output-enabled)
+    (define-key map (kbd "<down-mouse-3>") 'ampc-mouse-toggle-output-enabled)
+    (define-key map (kbd "<mouse-3>") 'ampc-mouse-align-point)
+    map))
+
+(defvar ampc-files-list-mode-map
+  (let ((map (make-sparse-keymap)))
+    (suppress-keymap map)
+    (define-key map (kbd "t") 'ampc-toggle-marks)
+    (define-key map (kbd "C-c C-q") 'ampc-tagger-quit)
+    (define-key map (kbd "C-c C-c") 'ampc-tagger-save)
+    (define-key map (kbd "C-c C-r") 'ampc-tagger-reset)
+    (define-key map [remap ampc-tagger] nil)
+    (define-key map [remap ampc-quit] 'ampc-tagger-quit)
+    (cl-loop for view in ampc-views
+             do (when (stringp (car view))
+                  (define-key map (cadr view) nil)))
+    map))
+
+(defvar ampc-tagger-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map (kbd "C-c C-q") 'ampc-tagger-quit)
+    (define-key map (kbd "C-c C-c") 'ampc-tagger-save)
+    (define-key map (kbd "C-c C-r") 'ampc-tagger-reset)
+    (define-key map (kbd "TAB") 'ampc-tagger-completion-at-point)
+    map))
+
+(defvar ampc-tagger-dired-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map (kbd "C-c C-t") 'ampc-tagger-dired)
+    map))
+
+;;; **** menu
+(easy-menu-define nil ampc-mode-map nil
+  `("ampc"
+    ("Change view" ,@(cl-loop for view in ampc-views
+                              when (stringp (car view))
+                              collect (vector (car view)
+                                              `(lambda ()
+                                                 (interactive)
+                                                 (ampc-change-view ',view)))
+                              end))
+    ["Run tagger" ampc-tagger]
+    "--"
+    ["Play" ampc-toggle-play
+     :visible (and ampc-status
+                   (not (equal (cdr (assq 'state ampc-status)) "play")))]
+    ["Pause" ampc-toggle-play
+     :visible (and ampc-status
+                   (equal (cdr (assq 'state ampc-status)) "play"))]
+    ["Stop" (lambda () (interactive) (ampc-toggle-play 4))
+     :visible (and ampc-status
+                   (equal (cdr (assq 'state ampc-status)) "play"))]
+    ["Next" ampc-next]
+    ["Previous" ampc-previous]
+    "--"
+    ["Clear playlist" ampc-clear]
+    ["Shuffle playlist" ampc-shuffle]
+    ["Store playlist" ampc-store]
+    ["Queue Playlist" ampc-load :visible (ampc-playlist)]
+    ["Rename Playlist" ampc-rename-playlist :visible (ampc-playlist)]
+    ["Delete Playlist" ampc-delete-playlist :visible (ampc-playlist)]
+    "--"
+    ["Increase volume" ampc-increase-volume]
+    ["Decrease volume" ampc-decrease-volume]
+    ["Set volume" ampc-set-volume]
+    ["Increase crossfade" ampc-increase-crossfade]
+    ["Decrease crossfade" ampc-decrease-crossfade]
+    ["Set crossfade" ampc-set-crossfade]
+    ["Toggle repeat" ampc-toggle-repeat
+     :style toggle
+     :selected (equal (cdr (assq 'repeat ampc-status)) "1")]
+    ["Toggle random" ampc-toggle-random
+     :style toggle
+     :selected (equal (cdr (assq 'random ampc-status)) "1")]
+    ["Toggle consume" ampc-toggle-consume
+     :style toggle
+     :selected (equal (cdr (assq 'consume ampc-status)) "1")]
+    "--"
+    ["Trigger update" ampc-trigger-update]
+    ["Suspend" ampc-suspend]
+    ["Quit" ampc-quit]))
+
+(easy-menu-define ampc-selection-menu ampc-item-mode-map
+  "Selection menu for ampc"
+  '("ampc Mark"
+    ["Add to playlist" ampc-add
+     :visible (not (eq (car ampc-type) 'outputs))]
+    ["Toggle enabled" ampc-toggle-output-enabled
+     :visible (eq (car ampc-type) 'outputs)]
+    "--"
+    ["Next line" ampc-next-line]
+    ["Previous line" ampc-previous-line]
+    ["Mark" ampc-mark]
+    ["Unmark" ampc-unmark]
+    ["Unmark all" ampc-unmark-all]
+    ["Toggle marks" ampc-toggle-marks
+     :visible (not (eq (car ampc-type) 'playlists))]))
+
+(defvar ampc-tool-bar-map
+  (let ((map (make-sparse-keymap)))
+    (tool-bar-local-item
+     "mpc/prev" 'ampc-previous 'previous map
+     :help "Previous")
+    (tool-bar-local-item
+     "mpc/play" 'ampc-toggle-play 'play map
+     :help "Play"
+     :visible '(and ampc-status
+                    (not (equal (cdr (assq 'state ampc-status)) "play"))))
+    (tool-bar-local-item
+     "mpc/pause" 'ampc-toggle-play 'pause map
+     :help "Pause"
+     :visible '(and ampc-status
+                    (equal (cdr (assq 'state ampc-status)) "play")))
+    (tool-bar-local-item
+     "mpc/stop" (lambda () (interactive) (ampc-toggle-play 4)) 'stop map
+     :help "Stop"
+     :visible '(and ampc-status
+                    (equal (cdr (assq 'state ampc-status)) "play")))
+    (tool-bar-local-item
+     "mpc/next" 'ampc-next 'next map
+     :help "Next")
+    map))
+
+;;; ** code
+;;; *** macros
+(defmacro ampc-with-buffer (type &rest body)
+  (declare (indent 1) (debug t))
+  `(let* ((type- ,type)
+          (w (if (windowp type-)
+                 type-
+               (cl-loop for w in (ampc-normalize-windows)
+                        thereis (when (with-current-buffer
+                                          (window-buffer w)
+                                        (cl-etypecase type-
+                                          (symbol (eq (car ampc-type) type-))
+                                          (cons (equal ampc-type type-))))
+                                  w)))))
+     (when w
+       (with-selected-window w
+         (with-current-buffer (window-buffer w)
+           (let ((inhibit-read-only t))
+             ,@(if (eq (car body) 'no-se)
+                   (cdr body)
+                 `((save-excursion
+                     (goto-char (point-min))
+                     ,@body)))))))))
+
+(defmacro ampc-fill-skeleton (tag &rest body)
+  (declare (indent 1) (debug t))
+  `(let ((tag- ,tag)
+         (data-buffer (current-buffer)))
+     (ignore data-buffer)               ;Don't warn if `body' doesn't use it.
+     (ampc-with-buffer tag-
+       no-se
+       (unless (eq ampc-dirty 'keep-dirty)
+         (let ((old-point-data (get-text-property (point) 'cmp-data))
+               (old-window-start-offset
+                (1- (count-lines (window-start) (point)))))
+           (put-text-property (point-min) (point-max) 'not-updated t)
+           (when (eq ampc-dirty 'erase)
+             (put-text-property (point-min) (point-max) 'data nil))
+           (goto-char (point-min))
+           ,@body
+           (goto-char (point-min))
+           (cl-loop until (eobp)
+                    do (if (get-text-property (point) 'not-updated)
+                           (kill-line 1)
+                         (add-text-properties (+ (point) 2)
+                                              (progn (forward-line nil)
+                                                     (1- (point)))
+                                              '(mouse-face highlight))))
+           (remove-text-properties (point-min) (point-max) '(not-updated))
+           (goto-char (point-min))
+           (when old-point-data
+             (cl-loop until (eobp)
+                      do (when (equal (get-text-property (point) 'cmp-data)
+                                      old-point-data)
+                           (set-window-start
+                            nil
+                            (save-excursion
+                              (forward-line (- old-window-start-offset))
+                              (point))
+                            t)
+                           (cl-return))
+                      (forward-line)
+                      finally do (goto-char (point-min)))))
+         (let ((effective-height (- (window-height)
+                                    (if mode-line-format 1 0)
+                                    (if header-line-format 1 0))))
+           (when (< (- (1- (line-number-at-pos (point-max)))
+                       (line-number-at-pos (window-start)))
+                    effective-height)
+             (set-window-start nil
+                               (save-excursion
+                                 (goto-char (point-max))
+                                 (forward-line (- (1+ effective-height)))
+                                 (point))
+                               t)))
+         (ampc-align-point)
+         (ampc-set-dirty nil)))))
+
+(defmacro ampc-with-selection (arg &rest body)
+  (declare (indent 1) (debug t))
+  `(let ((arg- ,arg))
+     (if (or (and (not arg-)
+                  (save-excursion
+                    (goto-char (point-min))
+                    (search-forward-regexp "^* " nil t)))
+             (and arg- (symbolp arg-)))
+         (cl-loop initially do (goto-char (point-min))
+                  finally do (ampc-align-point)
+                  while (search-forward-regexp "^* " nil t)
+                  for index from 0
+                  do (save-excursion
+                       ,@body))
+       (setf arg- (prefix-numeric-value arg-))
+       (ampc-align-point)
+       (cl-loop until (eobp)
+                for index from 0 to (1- (abs arg-))
+                do (save-excursion
+                     ,@body)
+                until (if (< arg- 0) (ampc-previous-line) (ampc-next-line))))))
+
+(defmacro ampc-iterate-source (data-buffer delimiter bindings &rest body)
+  (declare (indent 3) (debug t))
+  (when (memq (intern delimiter) bindings)
+    (cl-callf2 delq (intern delimiter) bindings)
+    (push (list (intern delimiter)
+                '(buffer-substring (point) (line-end-position)))
+          bindings))
+  `(,@(if data-buffer `(with-current-buffer ,data-buffer) '(progn))
+    (when (search-forward-regexp
+           ,(concat "^" (regexp-quote delimiter) ": ")
+           nil t)
+      (cl-loop with next
+               do (save-restriction
+                    (setf next (ampc-narrow-entry
+                                ,(concat "^" (regexp-quote delimiter) ": ")))
+                    (let ,(cl-loop for binding in bindings
+                                   if (consp binding)
+                                   collect binding
+                                   else
+                                   collect `(,binding (ampc-extract
+                                                       (ampc-extract-regexp
+                                                        ,(symbol-name 
binding))))
+                                   end)
+                      ,@body))
+               while next
+               do (goto-char next)))))
+
+(defmacro ampc-iterate-source-output (delimiter bindings pad-data &rest body)
+  (declare (indent 2) (debug t))
+  `(let ((output-buffer (current-buffer))
+         (tags (cl-loop for (tag . props) in
+                        (plist-get (cdr ampc-type) :properties)
+                        collect (cons tag (ampc-extract-regexp tag)))))
+     (ampc-iterate-source
+         data-buffer ,delimiter ,bindings
+       (let ((pad-data ,pad-data))
+         (with-current-buffer output-buffer
+           (ampc-insert (ampc-pad pad-data) ,@body))))))
+
+(defmacro ampc-extract-regexp (tag)
+  (if (stringp tag)
+      (concat "^" (regexp-quote tag) ": \\(.*\\)$")
+    `(concat "^" (regexp-quote ,tag) ": \\(.*\\)$")))
+
+(defmacro ampc-tagger-log (&rest what)
+  (declare (indent 0) (debug t))
+  `(with-current-buffer (get-buffer-create "*Tagger Log*")
+     (ampc-tagger-log-mode)
+     (save-excursion
+       (goto-char (point-max))
+       (let ((inhibit-read-only t)
+             (what (concat ,@what)))
+         (when ampc-debug
+           (message "ampc: %s" what))
+         (insert what)))))
+
+;;; *** modes
+(define-derived-mode ampc-outputs-mode ampc-item-mode "ampc-o")
+
+(define-derived-mode ampc-tag-song-mode ampc-item-mode "ampc-ts")
+
+(define-derived-mode ampc-current-playlist-mode ampc-playlist-mode "ampc-cpl"
+  (ampc-highlight-current-song-mode))
+
+(define-derived-mode ampc-playlist-mode ampc-item-mode "ampc-pl")
+
+(define-derived-mode ampc-playlists-mode ampc-item-mode "ampc-pls")
+
+(define-derived-mode ampc-files-list-mode ampc-item-mode "ampc-files-list")
+
+(define-derived-mode ampc-tagger-mode nil "ampc-tagger"
+  (set (make-local-variable 'tool-bar-map) ampc-tool-bar-map)
+  (set (make-local-variable 'tab-stop-list)
+       (list (+ (cl-loop for tag in ampc-tagger-tags
+                         maximize (length (symbol-name tag)))
+                2)))
+  (set (make-local-variable 'completion-at-point-functions)
+       '(ampc-tagger-complete-tag ampc-tagger-complete-value))
+  (setf truncate-lines ampc-truncate-lines
+        font-lock-defaults
+        `(((,(concat "^\\([ \t]*\\(?:"
+                     (mapconcat #'symbol-name ampc-tagger-tags "\\|")
+                     "\\)[ \t]*:\\)"
+                     "\\(\\(?:[ \t]*"
+                     "\\(?:"
+                     (mapconcat #'identity ampc-tagger-genres "\\|") 
"\\|<keep>"
+                     "\\)"
+                     "[ \t]*$\\)?\\)")
+            (1 'ampc-tagger-tag-face)
+            (2 'ampc-tagger-keyword-face)))
+          t)))
+
+(define-derived-mode ampc-tagger-log-mode nil "ampc-tagger-log")
+
+(define-derived-mode ampc-item-mode ampc-mode "ampc-item"
+  (setf font-lock-defaults '((("^\\(\\*\\)\\(.*\\)$"
+                               (1 'ampc-mark-face)
+                               (2 'ampc-marked-face))
+                              ("" 0 'ampc-unmarked-face))
+                             t)))
+
+(define-derived-mode ampc-mode special-mode "ampc"
+  (buffer-disable-undo)
+  (set (make-local-variable 'tool-bar-map) ampc-tool-bar-map)
+  (setf truncate-lines ampc-truncate-lines
+        mode-line-modified "--"))
+
+(define-minor-mode ampc-highlight-current-song-mode ""
+  ;; FIXME: The "" above looks bogus!
+  nil
+  nil
+  nil
+  (funcall (if ampc-highlight-current-song-mode
+               #'font-lock-add-keywords
+             #'font-lock-remove-keywords)
+           nil
+           '((ampc-find-current-song
+              (1 'ampc-current-song-mark-face)
+              (2 'ampc-current-song-marked-face)))))
+
+;;;###autoload
+(define-minor-mode ampc-tagger-dired-mode
+  "Minor mode that adds a audio file meta data tagging key binding to dired."
+  :lighter " ampc-tagger"
+  (cl-assert (derived-mode-p 'dired-mode)))
+
+;;; *** internal functions
+(defun ampc-tagger-report (args status)
+  (unless (zerop status)
+    (let ((message (format (concat "ampc_tagger (%s %s) returned with a "
+                                   "non-zero exit status (%s)")
+                           ampc-tagger-executable
+                           (mapconcat #'identity args " ")
+                           status)))
+      (ampc-tagger-log message "\n")
+      (error message))))
+
+(defun ampc-tagger-call (&rest args)
+  (ampc-tagger-report
+   args
+   (apply #'call-process ampc-tagger-executable nil t nil args)))
+
+(defun ampc-int-insert-cmp (p1 p2)
+  (cond ((< p1 p2) 'insert)
+        ((eq p1 p2) 'overwrite)
+        (t (- p1 p2))))
+
+(defun ampc-normalize-windows ()
+  (setf ampc-windows
+        (cl-loop for (window . buffer) in ampc-windows
+                 collect (cons (if (and (window-live-p window)
+                                        (eq (window-buffer window) buffer))
+                                   window
+                                 (get-buffer-window buffer))
+                               buffer)))
+  (delq nil (mapcar #'car ampc-windows)))
+
+(defun ampc-restore-window-configuration ()
+  (let ((windows
+          (sort (delq nil
+                      (mapcar (lambda (w)
+                                (when (eq (window-frame w)
+                                          (selected-frame))
+                                  w))
+                              (ampc-normalize-windows)))
+                (lambda (w1 w2)
+                  (cl-loop for w in (window-list nil nil (frame-first-window))
+                           do (when (eq w w1)
+                                (cl-return t))
+                           (when (eq w w2)
+                             (cl-return nil)))))))
+    (when windows
+      (setf (window-dedicated-p (car windows)) nil)
+      (cl-loop for w in (cdr windows)
+               do (delete-window w)))))
+
+(defun ampc-tagger-tags-modified (tags new-tags)
+  (cl-loop with found-changed
+           for (tag . value) in new-tags
+           for prop = (assq tag tags)
+           do (unless (equal (cdr prop) value)
+                (setf (cdr prop) value
+                      found-changed t))
+           finally return found-changed))
+
+(defun ampc-change-view (view)
+  (if (equal ampc-outstanding-commands '((idle nil)))
+      (ampc-configure-frame (cddr view))
+    (message "ampc is busy, cannot change window layout")))
+
+(defun ampc-quote (string)
+  (concat "\"" (replace-regexp-in-string "\"" "\\\"" string) "\""))
+
+(defun ampc-in-ampc-p (&optional or-in-tagger)
+  (or (when (ampc-on-p)
+        ampc-type)
+      (when or-in-tagger
+        (memq (car ampc-type) '(files-list tagger)))))
+
+(defun ampc-add-impl (&optional data)
+  (ampc-on-files (lambda (file)
+                   (if (ampc-playlist)
+                       (ampc-send-command 'playlistadd
+                                          '(:keep-prev t)
+                                          (ampc-quote (ampc-playlist))
+                                          file)
+                     (ampc-send-command 'add '(:keep-prev t) (ampc-quote 
file)))
+                   data)))
+
+(defun ampc-on-files (func &optional data)
+  (cond ((null data)
+         (cl-loop for d in (get-text-property (line-end-position) 'data)
+                  do (ampc-on-files func d)))
+        ((avl-tree-p data)
+         (avl-tree-mapc (lambda (e) (ampc-on-files func (cdr e))) data))
+        ((stringp data)
+         (funcall func data))
+        (t
+         (cl-loop for d in (reverse data)
+                  do (ampc-on-files func (cdr (assoc "file" d)))))))
+
+(defun ampc-skip (N)
+  (ampc-send-command
+   'play
+   `(:callback ,(lambda ()
+                  (ampc-send-command 'status '(:front t))))
+   (lambda ()
+     (let ((song (cdr (assq 'song ampc-status)))
+           (playlist-length (cdr (assq 'playlistlength ampc-status))))
+       (unless (and song playlist-length)
+         (throw 'skip nil))
+       (max 0 (min (+ (string-to-number song) N)
+                   (1- (string-to-number playlist-length))))))))
+
+(cl-defun ampc-find-current-song
+    (limit &aux (point (point)) (song (cdr (assq 'song ampc-status))))
+  (when (and song
+             (<= (1- (line-number-at-pos (point)))
+                 (setf song (string-to-number song)))
+             (>= (1- (line-number-at-pos limit)) song))
+    (goto-char (point-min))
+    (forward-line song)
+    (save-restriction
+      (narrow-to-region (max point (point)) (min limit (line-end-position)))
+      (search-forward-regexp "\\(?1:\\(\\`\\*\\)?\\)\\(?2:.*\\)$"))))
+
+(defun ampc-set-volume-impl (arg &optional func)
+  (when arg
+    (setf arg (prefix-numeric-value arg)))
+  (ampc-send-command
+   'setvol
+   `(:callback ,(lambda ()
+                  (ampc-send-command 'status '(:front t))))
+   (lambda ()
+     (unless ampc-status
+       (throw 'skip nil))
+     (max (min (if func
+                   (funcall func
+                            (string-to-number
+                             (cdr (assq 'volume ampc-status)))
+                            (or arg ampc-volume-step))
+                 arg)
+               100)
+          0))))
+
+(defun ampc-set-crossfade-impl (arg &optional func)
+  (when arg
+    (setf arg (prefix-numeric-value arg)))
+  (ampc-send-command
+   'crossfade
+   `(:callback ,(lambda ()
+                  (ampc-send-command 'status '(:front t))))
+   (lambda ()
+     (unless ampc-status
+       (throw 'skip nil))
+     (max (if func
+              (funcall func
+                       (string-to-number
+                        (cdr (assq 'xfade ampc-status)))
+                       (or arg ampc-crossfade-step))
+            arg)
+          0))))
+
+(cl-defun ampc-tagger-make-backup (file)
+  (unless ampc-tagger-backup-directory
+    (cl-return-from ampc-tagger-make-backup))
+  (when (functionp ampc-tagger-backup-directory)
+    (funcall ampc-tagger-backup-directory file)
+    (cl-return-from ampc-tagger-make-backup))
+  (unless (file-directory-p ampc-tagger-backup-directory)
+    (make-directory ampc-tagger-backup-directory t))
+  (let* ((real-file
+          (cl-loop with real-file = file
+                   for target = (file-symlink-p real-file)
+                   while target
+                   do (setf real-file (expand-file-name
+                                       target (file-name-directory real-file)))
+                   finally return real-file))
+         (target
+          (cl-loop with base = (file-name-nondirectory real-file)
+                   for i from 1
+                   for file = (expand-file-name
+                               (concat base ".~"
+                                       (int-to-string i)
+                                       "~")
+                               ampc-tagger-backup-directory)
+                   while (file-exists-p file)
+                   finally return file)))
+    (ampc-tagger-log "\tBackup file: " (abbreviate-file-name target) "\n")
+    (copy-file real-file target nil t)))
+
+(cl-defun ampc-move (N &aux with-marks entries-to-move (up (< N 0)))
+  (save-excursion
+    (goto-char (point-min))
+    (cl-loop while (search-forward-regexp "^* " nil t)
+             do (push (point) entries-to-move)))
+  (if entries-to-move
+      (setf with-marks t)
+    (push (point) entries-to-move))
+  (when (save-excursion
+          (cl-loop with max = (1- (count-lines (point-min) (point-max)))
+                   for p in entries-to-move
+                   do (goto-char p)
+                   for line = (+ (1- (line-number-at-pos)) N)
+                   always (and (>= line 0) (<= line max))))
+    (when up
+      (setf entries-to-move (nreverse entries-to-move)))
+    (when with-marks
+      (ampc-unmark-all))
+    (cl-loop for p in entries-to-move
+             do  (goto-char p)
+             for line = (1- (line-number-at-pos))
+             do (if (and (not (eq (car ampc-type) 'current-playlist))
+                         (ampc-playlist))
+                    (ampc-send-command 'playlistmove
+                                       '(:keep-prev t)
+                                       (ampc-quote (ampc-playlist))
+                                       line
+                                       (+ line N))
+                  (ampc-send-command 'move '(:keep-prev t) line (+ line N))))
+    (if with-marks
+        (cl-loop for p in (nreverse entries-to-move)
+                 do (goto-char p)
+                 (forward-line N)
+                 (save-excursion
+                   (ampc-mark-impl t 1))
+                 (ampc-align-point))
+      (forward-line N)
+      (ampc-align-point))))
+
+(defun ampc-toggle-state (state arg)
+  (when (or arg ampc-status)
+    (ampc-send-command
+     state
+     nil
+     (cond ((null arg)
+            (if (equal (cdr (assq state ampc-status)) "1")
+                0
+              1))
+           ((> (prefix-numeric-value arg) 0) 1)
+           (t 0)))))
+
+(defun ampc-playlist (&optional at-point)
+  (ampc-with-buffer 'playlists
+    (if (and (not at-point)
+             (search-forward-regexp "^* \\(.*\\)$" nil t))
+        (let ((result (match-string 1)))
+          (set-text-properties 0 (length result) nil result)
+          result)
+      (unless (eobp)
+        (buffer-substring-no-properties
+         (+ (line-beginning-position) 2)
+         (line-end-position))))))
+
+(cl-defun ampc-mark-impl (select N &aux result (inhibit-read-only t))
+  (when (eq (car ampc-type) 'playlists)
+    (cl-assert (or (not select) (null N) (eq N 1)))
+    (ampc-with-buffer 'playlists
+      (cl-loop while (search-forward-regexp "^\\* " nil t)
+               do (replace-match "  " nil nil))))
+  (cl-loop repeat (or N 1)
+           until (eobp)
+           do (move-beginning-of-line nil)
+           (delete-char 1)
+           (insert (if select "*" " "))
+           (setf result (ampc-next-line nil)))
+  (ampc-post-mark-change-update)
+  result)
+
+(defun ampc-post-mark-change-update ()
+  (cl-ecase (car ampc-type)
+    ((current-playlist playlist outputs))
+    (playlists
+     (ampc-update-playlist))
+    ((song tag)
+     (cl-loop
+      for w in
+      (cl-loop for w on (ampc-normalize-windows)
+               thereis (when (or (eq (car w) (selected-window))
+                                 (and (eq (car ampc-type) 'tag)
+                                      (eq (with-current-buffer
+                                              (window-buffer (car w))
+                                            (car ampc-type))
+                                          'song)))
+                         (cdr w)))
+      do (with-current-buffer (window-buffer w)
+           (when (memq (car ampc-type) '(song tag))
+             (ampc-set-dirty t))))
+     (ampc-fill-tag-song))
+    (files-list
+     (ampc-tagger-update))))
+
+(cl-defun ampc-tagger-get-values (tag all-files &aux result)
+  (ampc-with-buffer 'files-list
+    no-se
+    (save-excursion
+      (cl-macrolet
+          ((add-file
+            ()
+            `(let ((value (cdr (assq tag (get-text-property (point) 'data)))))
+               (unless (member value result)
+                 (push value result)))))
+        (if all-files
+            (cl-loop until (eobp)
+                     initially do (goto-char (point-min))
+                     (ampc-align-point)
+                     do (add-file)
+                     until (ampc-next-line))
+          (ampc-with-selection nil
+            (add-file))))))
+  result)
+
+(defun ampc-tagger-update ()
+  (ampc-with-buffer 'tagger
+    (cl-loop
+     while (search-forward-regexp (concat "^[ \t]*\\("
+                                          (mapconcat #'symbol-name
+                                                     ampc-tagger-tags
+                                                     "\\|")
+                                          "\\)[ \t]*:"
+                                          "[ \t]*\\(<keep>[ \t]*?\\)"
+                                          "\\(?:\n\\)?$")
+                                  nil
+                                  t)
+     for tag = (intern (match-string 1))
+     do (when (memq tag ampc-tagger-tags)
+          (let ((values (save-match-data (ampc-tagger-get-values tag nil))))
+            (when (eq (length values) 1)
+              (replace-match (car values) nil t nil 2)))))))
+
+(defun ampc-tagger-complete-tag ()
+  (save-excursion
+    (save-restriction
+      (narrow-to-region (line-beginning-position) (line-end-position))
+      (unless (search-backward-regexp "^.*:" nil t)
+        (when (search-backward-regexp "\\(^\\|[ \t]\\).*" nil t)
+          (when (looking-at "[ \t]")
+            (forward-char 1))
+          (list (point)
+                (search-forward-regexp ":\\|$")
+                (mapcar (lambda (tag) (concat (symbol-name tag) ":"))
+                        ampc-tagger-tags)))))))
+
+(cl-defun ampc-tagger-complete-value (&aux tag)
+  (save-excursion
+    (save-restriction
+      (narrow-to-region (line-beginning-position) (line-end-position))
+      (save-excursion
+        (unless (search-backward-regexp (concat "^[ \t]*\\("
+                                                (mapconcat #'symbol-name
+                                                           ampc-tagger-tags
+                                                           "\\|")
+                                                "\\)[ \t]*:")
+                                        nil t)
+          (cl-return-from ampc-tagger-complete-tag))
+        (setf tag (intern (match-string 1))))
+      (save-excursion
+        (search-backward-regexp "[: \t]")
+        (forward-char 1)
+        (list (point)
+              (search-forward-regexp "[ \t]\\|$")
+              (let ((values (cons "<keep>" (ampc-tagger-get-values
+                                            tag
+                                            
ampc-tagger-completion-all-files))))
+                (when (eq tag 'Genre)
+                  (cl-loop for g in ampc-tagger-genres
+                           do (unless (member g values)
+                                (push g values))))
+                values))))))
+
+(defun ampc-align-point ()
+  (unless (eobp)
+    (move-beginning-of-line nil)
+    (forward-char 2)
+    (re-search-forward " *" nil t)))
+
+(cl-defun ampc-pad (tabs &optional dont-honour-item-mode)
+  (cl-loop with new-tab-stop-list
+           with offset-dec = (if (and (not dont-honour-item-mode)
+                                      (derived-mode-p 'ampc-item-mode))
+                                 2
+                               0)
+           for tab in tabs
+           for offset-cell on (if (derived-mode-p 'ampc-item-mode)
+                                  tab-stop-list
+                                (cons 0 tab-stop-list))
+           for offset = (car offset-cell)
+           for props in (or (plist-get (cdr ampc-type) :properties)
+                            '(nil . nil))
+           by (lambda (cell) (or (cdr cell) '(nil . nil)))
+           do (cl-decf offset offset-dec)
+           with first = t
+           with current-offset = 0
+           when (<= current-offset offset)
+           do (when (and (not first) (eq (- offset current-offset) 0))
+                (cl-incf offset))
+           and concat (make-string (- offset current-offset) ? ) into result
+           and do (setf current-offset offset)
+           else
+           concat " " into result
+           and do (cl-incf current-offset)
+           end
+           do (unless tab
+                (setf tab ""))
+           (when (and (plist-get (cdr props) :shrink)
+                      (cadr offset-cell)
+                      (>= (+ current-offset (length tab) 1) (- (cadr 
offset-cell)
+                                                               offset-dec)))
+             (setf tab (concat (substring tab 0 (max (- (cadr offset-cell)
+                                                        offset-dec
+                                                        current-offset
+                                                        4)
+                                                     3))
+                               "...")))
+           concat tab into result
+           do (push (+ current-offset offset-dec) new-tab-stop-list)
+           (cl-incf current-offset (length tab))
+           (setf first nil)
+           finally return
+           (if (equal (cl-callf nreverse new-tab-stop-list) tab-stop-list)
+               result
+             (propertize result 'tab-stop-list new-tab-stop-list))))
+
+(defun ampc-update-header ()
+  (when (or (memq (car ampc-type) '(tag playlists))
+            (plist-get (cdr ampc-type) :properties))
+    (setf header-line-format
+          (concat
+           (make-string (floor (fringe-columns 'left t)) ? )
+           (cl-ecase (car ampc-type)
+             (tag
+              (concat "  " (plist-get (cdr ampc-type) :tag)))
+             (playlists
+              "  Playlists")
+             (t
+              (ampc-pad (cl-loop for (name . props) in
+                                 (plist-get (cdr ampc-type) :properties)
+                                 collect (or (plist-get props :title) name))
+                        t)))))))
+
+(defun ampc-set-dirty (tag-or-dirty &optional dirty)
+  (if (or (null tag-or-dirty) (memq tag-or-dirty '(t erase keep-dirty)))
+      (setf ampc-dirty tag-or-dirty)
+    (cl-loop for w in (ampc-normalize-windows)
+             do (with-current-buffer (window-buffer w)
+                  (when (eq (car ampc-type) tag-or-dirty)
+                    (ampc-set-dirty dirty))))))
+
+(defun ampc-update ()
+  (if ampc-status
+      (cl-loop for w in (ampc-normalize-windows)
+               do (with-current-buffer (window-buffer w)
+                    (when (and ampc-dirty (not (eq ampc-dirty 'keep-dirty)))
+                      (cl-ecase (car ampc-type)
+                        (outputs
+                         (ampc-send-command 'outputs))
+                        (playlist
+                         (ampc-update-playlist))
+                        ((tag song)
+                         (if (assoc (ampc-tags) ampc-internal-db)
+                             (ampc-fill-tag-song)
+                           (push (cons (ampc-tags) nil) ampc-internal-db)
+                           (ampc-set-dirty 'tag 'keep-dirty)
+                           (ampc-set-dirty 'song 'keep-dirty)
+                           (ampc-send-command 'listallinfo)))
+                        (status
+                         (ampc-send-command 'status)
+                         (ampc-send-command 'currentsong))
+                        (playlists
+                         (ampc-send-command 'listplaylists))
+                        (current-playlist
+                         (ampc-send-command 'playlistinfo))))))
+    (ampc-send-command 'status)
+    (ampc-send-command 'currentsong)))
+
+(defun ampc-update-playlist ()
+  (ampc-with-buffer 'playlists
+    (if (search-forward-regexp "^\\* " nil t)
+        (ampc-send-command 'listplaylistinfo
+                           nil
+                           (get-text-property (point) 'data))
+      (ampc-with-buffer 'playlist
+        (erase-buffer)
+        (ampc-set-dirty nil)))))
+
+(defun ampc-send-command-impl (command)
+  (when ampc-debug
+    (message "ampc: -> %s" command))
+  (when (ampc-on-p)
+    (process-send-string ampc-connection (concat command "\n"))))
+
+(cl-defun ampc-send-command (command &optional props &rest args)
+  (cl-destructuring-bind (&key (front nil) (keep-prev nil) (full-remove nil)
+                               (remove-other nil) &allow-other-keys
+                               &aux idle)
+      props
+    (when (and (not keep-prev)
+               (eq (caar ampc-outstanding-commands) command)
+               (equal (cl-cddar ampc-outstanding-commands) args))
+      (cl-return-from ampc-send-command))
+    (unless ampc-working-timer
+      (setf ampc-yield 0
+            ampc-working-timer (run-at-time nil 0.1 'ampc-yield)))
+    (when (equal (caar ampc-outstanding-commands) 'idle)
+      (pop ampc-outstanding-commands)
+      (setf idle t))
+    (when (and (not keep-prev) (cdr ampc-outstanding-commands))
+      (setf (cdr ampc-outstanding-commands)
+            (cl-loop for other-cmd in (cdr ampc-outstanding-commands)
+                     unless (and (memq (car other-cmd) (list command 
remove-other))
+                                 (or (not full-remove)
+                                     (progn
+                                       (cl-assert (null remove-other))
+                                       (equal (cddr other-cmd) args))))
+                     collect other-cmd
+                     end)))
+    (setf command (apply #'list command props args))
+    (if front
+        (push command ampc-outstanding-commands)
+      (setf ampc-outstanding-commands
+            (nconc ampc-outstanding-commands
+                   (list command))))
+    (when idle
+      (push '(noidle nil) ampc-outstanding-commands)
+      (ampc-send-command-impl "noidle"))))
+
+(defun ampc-send-next-command ()
+  (cl-loop while ampc-outstanding-commands
+           for command =
+           (cl-loop for command = (car ampc-outstanding-commands)
+                    for command-id = (replace-regexp-in-string
+                                      "^.*?-" ""
+                                      (symbol-name (car command)))
+                    thereis
+                    (catch 'skip
+                      (ampc-send-command-impl
+                       (concat command-id
+                               (cl-loop for a in (cddr command)
+                                        concat " "
+                                        do (when (functionp a)
+                                             (cl-callf funcall a))
+                                        concat (cl-etypecase a
+                                                 (integer (number-to-string a))
+                                                 (string a)))))
+                      (let ((callback (plist-get (cl-cadar 
ampc-outstanding-commands)
+                                                 :callback))
+                            (old-head (pop ampc-outstanding-commands)))
+                        (when callback (funcall callback))
+                        (push old-head ampc-outstanding-commands))
+                      command-id)
+                    do (pop ampc-outstanding-commands)
+                    while ampc-outstanding-commands)
+           while command
+           while (let ((member (memq (intern command) 
ampc-synchronous-commands)))
+                   (if member
+                       (not (eq (car ampc-synchronous-commands) t))
+                     (eq (car ampc-synchronous-commands) t)))
+           do (cl-loop with head = ampc-outstanding-commands
+                       with ampc-no-implicit-next-dispatch = t
+                       with ampc-yield-redisplay = t
+                       while (ampc-on-p)
+                       while (eq head ampc-outstanding-commands)
+                       do (accept-process-output ampc-connection 0 100)))
+  (unless ampc-outstanding-commands
+    (when ampc-working-timer
+        (cancel-timer ampc-working-timer)
+        (setf ampc-yield nil
+              ampc-working-timer nil)
+        (ampc-fill-status))
+    (setf ampc-outstanding-commands '((idle nil)))
+    (ampc-send-command-impl "idle")))
+
+(defun ampc-tree< (a b)
+  (string< (car a) (car b)))
+
+(defun ampc-create-tree ()
+  (avl-tree-create 'ampc-tree<))
+
+(defsubst ampc-extract (regexp)
+  (goto-char (point-min))
+  (when (search-forward-regexp regexp nil t)
+    (match-string 1)))
+
+(defsubst ampc-clean-tag (tag value)
+  (if value
+      (let ((func (cdr (assoc tag ampc-tag-transform-funcs))))
+        (if func
+            (funcall func value)
+          value))
+    (unless (equal tag "Track")
+      "[Not Specified]")))
+
+(defun ampc-insert (element data &optional cmp cmp-data)
+  (goto-char (point-min))
+  (unless cmp-data
+    (setf cmp-data data))
+  (let ((action
+         (if (functionp cmp)
+             (cl-loop until (eobp)
+                      for tp = (get-text-property (+ (point) 2) 'cmp-data)
+                      thereis (let ((r (funcall cmp cmp-data tp)))
+                                (if (symbolp r)
+                                    r
+                                  (forward-line r)
+                                  nil))
+                      finally return 'insert)
+           (cl-loop with stringp-cmp-data = (stringp cmp-data)
+                    with min = 1
+                    with max = (1+ (count-lines (point-min) (point-max)))
+                    with at-min = t
+                    do (when (< (- max min) 20)
+                         (unless at-min
+                           (forward-line (- min max)))
+                         (cl-return (cl-loop repeat (- max min)
+                                          for tp = (get-text-property (+ 
(point) 2)
+                                                                      
'cmp-data)
+                                          thereis
+                                          (if (equal tp cmp-data)
+                                              'update
+                                            (unless (if stringp-cmp-data
+                                                        (string< tp cmp-data)
+                                                      (string<
+                                                       
(buffer-substring-no-properties
+                                                        (+ (point) 2)
+                                                        (line-end-position))
+                                                       element))
+                                              'insert))
+                                          do (forward-line)
+                                          finally return 'insert)))
+                    do (forward-line (funcall (if at-min #'+ #'-)
+                                              (/ (- max min) 2)))
+                    for tp = (get-text-property (+ (point) 2) 'cmp-data)
+                    thereis (when (equal tp cmp-data) 'update)
+                    do (if (setf at-min (if stringp-cmp-data
+                                            (string< tp cmp-data)
+                                          (string< 
(buffer-substring-no-properties
+                                                    (+ (point) 2)
+                                                    (line-end-position))
+                                                   element)))
+                           (cl-incf min (floor (/ (- max min) 2.0)))
+                         (cl-decf max (floor (/ (- max min) 2.0))))
+                    finally return 'insert))))
+    (cl-ecase action
+      (insert
+       (insert (propertize (concat "  " element "\n")
+                           'data (if (eq cmp t) (list data) data)
+                           'cmp-data cmp-data)))
+      ((update overwrite)
+       (remove-text-properties (point) (1+ (point)) '(not-updated))
+       (when (or (eq ampc-dirty 'erase) (eq action 'overwrite))
+         (let ((origin (point)))
+           (forward-char 2)
+           (kill-line 1)
+           (insert element "\n")
+           (goto-char origin)))
+       (let ((next (1+ (line-end-position))))
+         (put-text-property (point) next 'cmp-data cmp-data)
+         (put-text-property
+          (point) next
+          'data (cond ((eq cmp t)
+                       (let ((rest (get-text-property (point) 'data)))
+                         (if (memq data rest)
+                             rest
+                           (cons data rest))))
+                      (t data))))
+       (eq (char-after) ?*)))))
+
+(defun ampc-fill-tag (trees)
+  (put-text-property (point-min) (point-max) 'data nil)
+  (cl-loop with new-trees
+           for tree in trees
+           do (when tree
+                (avl-tree-mapc
+                 (lambda (e)
+                   (when (ampc-insert (car e) (cdr e) t (car e))
+                     (push (cdr e) new-trees)))
+                 tree))
+           finally return new-trees))
+
+(defun ampc-fill-song (trees)
+  (cl-loop
+   for songs in trees
+   do (cl-loop for song in songs
+               do (ampc-insert
+                   (ampc-pad
+                    (cl-loop for (p . v) in (plist-get (cdr ampc-type) 
:properties)
+                             collect (cdr (assoc p song))))
+                   `((,song))))))
+
+(defsubst ampc-narrow-entry (delimiter-regexp)
+  (let ((result))
+    (narrow-to-region
+     (line-beginning-position)
+     (or (save-excursion
+           (goto-char (line-end-position))
+           (when (search-forward-regexp delimiter-regexp nil t)
+             (setf result (point))
+             (1- (line-beginning-position))))
+         (point-max)))
+    result))
+
+(defun ampc-fill-playlist ()
+  (ampc-fill-skeleton 'playlist
+    (let ((index 0))
+      (ampc-iterate-source-output "file" (file)
+        (cl-loop for (tag . tag-regexp) in tags
+                 collect (ampc-clean-tag tag (ampc-extract tag-regexp)))
+        `(("file" . ,file)
+          (index . ,(1- (cl-incf index))))
+        'ampc-int-insert-cmp
+        index))))
+
+(defun ampc-fill-outputs ()
+  (ampc-fill-skeleton 'outputs
+    (ampc-iterate-source-output "outputid" (outputid outputenabled)
+      (cl-loop for (tag . tag-regexp) in tags
+               collect (ampc-clean-tag tag (ampc-extract tag-regexp)))
+      `(("outputid" . ,outputid)
+        ("outputenabled" . ,outputenabled)))))
+
+(cl-defun ampc-mini-impl (&aux songs)
+  (ampc-iterate-source
+      nil
+      "file"
+      (Title
+       Artist
+       (Pos (string-to-number (ampc-extract (ampc-extract-regexp "Pos")))))
+    (let ((entry (cons (concat Title
+                               (when Artist
+                                 (concat " - " Artist)))
+                       Pos)))
+      (cl-loop with mentry = (cons (car entry) (cdr entry))
+               for index from 2
+               while (assoc (car mentry) songs)
+               do (setf (car mentry) (concat (car entry)
+                                             " (" (int-to-string index) ")"))
+               finally do (push mentry songs))))
+  (unless songs
+    (message "No song in the playlist")
+    (cl-return-from ampc-mini-impl))
+  (let ((song (assoc (let ((inhibit-quit t))
+                       (prog1
+                           (with-local-quit
+                             (completing-read "Song to play: " songs nil t))
+                         (setf quit-flag nil)))
+                     songs)))
+    (when song
+      (ampc-play-this (cdr song)))))
+
+(defun ampc-fill-current-playlist ()
+  (ampc-fill-skeleton 'current-playlist
+    (ampc-iterate-source-output
+        "file"
+        (file (pos (string-to-number (ampc-extract
+                                      (ampc-extract-regexp "Pos")))))
+      (cl-loop for (tag . tag-regexp) in tags
+               collect (ampc-clean-tag tag (ampc-extract tag-regexp)))
+      `(("file" . ,file)
+        ("Pos" . ,pos))
+      'ampc-int-insert-cmp
+      pos)))
+
+(defun ampc-fill-playlists ()
+  (ampc-fill-skeleton 'playlists
+    (with-current-buffer data-buffer
+      (cl-loop while (search-forward-regexp "^playlist: \\(.*\\)$" nil t)
+               for playlist = (match-string 1)
+               do (ampc-with-buffer 'playlists
+                                    (ampc-insert playlist playlist)))))
+  (ampc-set-dirty 'playlist t)
+  (ampc-update))
+
+(defun ampc-yield ()
+  (cl-incf ampc-yield)
+  (ampc-fill-status)
+  (when ampc-yield-redisplay
+    (redisplay t)))
+
+(defun ampc-fill-status ()
+  (ampc-with-buffer 'status
+    (erase-buffer)
+    (funcall (or (plist-get (cadr ampc-type) :filler)
+                 (lambda (_)
+                   (insert (ampc-status t) "\n")))
+             ampc-status)
+    (ampc-set-dirty nil)))
+
+(defun ampc-fill-tag-song ()
+  (cl-loop
+   with trees = (list (cdr (assoc (ampc-tags) ampc-internal-db)))
+   for type in '(tag song)
+   do
+   (cl-loop
+    for w in (ampc-normalize-windows)
+    do
+    (with-current-buffer (window-buffer w)
+      (when (eq (car ampc-type) type)
+        (if ampc-dirty
+            (if (and (not trees) (not (eq ampc-dirty 'keep-dirty)))
+                (progn
+                  (let ((inhibit-read-only t))
+                    (erase-buffer))
+                  (ampc-set-dirty nil))
+              (ampc-fill-skeleton w
+                                  (if (eq type 'tag)
+                                      (setf trees (ampc-fill-tag trees))
+                                    (ampc-fill-song trees))))
+          (setf trees nil)
+          (save-excursion
+            (goto-char (point-min))
+            (cl-loop while (search-forward-regexp "^* " nil t)
+                     do (cl-callf append trees
+                          (get-text-property (point) 'data))))))))))
+
+(defun ampc-transform-track (track)
+  (when (eq (length track) 1)
+    (setf track (concat "0" track)))
+  track)
+
+(cl-defun ampc-transform-time (data &aux (time (string-to-number data)))
+  (concat (number-to-string (/ time 60))
+          ":"
+          (when (< (% time 60) 10)
+            "0")
+          (number-to-string (% time 60))))
+
+(defun ampc-handle-idle ()
+  (cl-loop until (eobp)
+           for subsystem = (buffer-substring (point) (line-end-position))
+           do (when (string-match "^changed: \\(.*\\)$" subsystem)
+                (cl-case (intern (match-string 1 subsystem))
+                  (database
+                   (setf ampc-internal-db (list (cons (ampc-tags) nil)))
+                   (ampc-set-dirty 'tag 'keep-dirty)
+                   (ampc-set-dirty 'song 'keep-dirty)
+                   (ampc-send-command 'listallinfo))
+                  (output
+                   (ampc-set-dirty 'outputs t))
+                  ((player options mixer)
+                   (setf ampc-status nil)
+                   (ampc-set-dirty 'status t))
+                  (stored_playlist
+                   (ampc-set-dirty 'playlists t))
+                  (playlist
+                   (ampc-set-dirty 'current-playlist t)
+                   (ampc-set-dirty 'status t))))
+           (forward-line))
+  (ampc-update))
+
+(defun ampc-handle-setup (status)
+  (unless (and (string-match "^ MPD \\(.+\\)\\.\\(.+\\)\\.\\(.+\\)$"
+                             status)
+               (let ((version-a (string-to-number (match-string 1 status)))
+                     (version-b (string-to-number (match-string 2 status)))
+                     ;; (version-c (string-to-number (match-string 2 status)))
+                     )
+                 (or (> version-a 0)
+                     (>= version-b 15))))
+    (error (concat "Your version of MPD is not supported.  "
+                   "ampc supports MPD protocol version 0.15.0 "
+                   "and later"))))
+
+(defun ampc-fill-internal-db (running)
+  (cl-loop with tree = (assoc (ampc-tags) ampc-internal-db)
+           with tags =
+           (cl-loop for w in (ampc-normalize-windows)
+                    for props = (with-current-buffer (window-buffer w)
+                                  (when (eq (car ampc-type) 'tag)
+                                    (ampc-set-dirty t)
+                                    (plist-get (cdr ampc-type) :tag)))
+                    when props
+                    collect props
+                    end)
+           with song-props = (ampc-with-buffer 'song
+                                               (ampc-set-dirty t)
+                                               (plist-get (cdr ampc-type) 
:properties))
+           for origin = (and (search-forward-regexp "^file: " nil t)
+                             (line-beginning-position))
+           then next
+           while origin
+           do (goto-char (1+ origin))
+           for next = (and (search-forward-regexp "^file: " nil t)
+                           (line-beginning-position))
+           while (or (not running) next)
+           do (save-restriction
+                (narrow-to-region origin (or next (point-max)))
+                (ampc-fill-internal-db-entry tree tags song-props))
+           (when running
+             (delete-region origin next)
+             (setf next origin))))
+
+(defun ampc-tags ()
+  (cl-loop for w in (ampc-normalize-windows)
+           for tag = (with-current-buffer (window-buffer w)
+                       (when (eq (car ampc-type) 'tag)
+                         (plist-get (cdr ampc-type) :tag)))
+           when tag
+           collect tag
+           end))
+
+(defun ampc-fill-internal-db-entry (tree tags song-props)
+  (cl-loop for tag in tags
+           for data = (ampc-clean-tag tag (ampc-extract (ampc-extract-regexp 
tag)))
+           do (unless (cdr tree)
+                (setf (cdr tree) (ampc-create-tree)))
+           (setf tree (avl-tree-enter (cdr tree)
+                                      (cons data nil)
+                                      (lambda (_ match)
+                                        match))))
+  (push (cons (cons "file" (ampc-extract (ampc-extract-regexp "file")))
+              (cl-loop for p in song-props
+                       for data = (ampc-clean-tag (car p)
+                                                  (ampc-extract
+                                                   (ampc-extract-regexp (car 
p))))
+                       when data
+                       collect (cons (car p) data)
+                       end))
+        (cdr tree)))
+
+(defun ampc-fill-status-var (tags)
+  (cl-loop for k in tags
+           for v = (ampc-extract (ampc-extract-regexp k))
+           for s = (intern k)
+           do (if v
+                  (setf (cdr (or (assq s ampc-status)
+                                 (car (push (cons s nil) ampc-status))))
+                        v)
+                (cl-callf2 assq-delete-all s ampc-status))))
+
+(defun ampc-handle-current-song ()
+  (ampc-fill-status-var (append ampc-status-tags '("Artist" "Title" "file")))
+  (ampc-fill-status)
+  (run-hook-with-args ampc-status-changed-hook ampc-status))
+
+(defun ampc-handle-status ()
+  (ampc-fill-status-var '("volume" "repeat" "random" "consume" "xfade" "state"
+                          "song" "playlistlength"))
+  (ampc-with-buffer 'current-playlist
+    (when ampc-highlight-current-song-mode
+      (font-lock-fontify-buffer)))
+  (run-hook-with-args ampc-status-changed-hook ampc-status))
+
+(defun ampc-handle-update ()
+  (message "Database update started"))
+
+(defun ampc-handle-command (status)
+  (cond
+   ((eq status 'error)
+    (pop ampc-outstanding-commands))
+   ((eq status 'running)
+    (cl-case (caar ampc-outstanding-commands)
+      (listallinfo (ampc-fill-internal-db t))))
+   (t
+    (let ((command (pop ampc-outstanding-commands)))
+      (cl-case (car command)
+        (idle
+         (ampc-handle-idle))
+        (setup
+         (ampc-handle-setup status))
+        (currentsong
+         (ampc-handle-current-song))
+        (status
+         (ampc-handle-status))
+        (update
+         (ampc-handle-update))
+        (listplaylistinfo
+         (ampc-fill-playlist))
+        (listplaylists
+         (ampc-fill-playlists))
+        (playlistinfo
+         (ampc-fill-current-playlist))
+        (mini-playlistinfo
+         (ampc-mini-impl))
+        (mini-currentsong
+         (ampc-status))
+        (shuffle-listplaylistinfo
+         (ampc-shuffle-playlist (plist-get (cadr command) :playlist)))
+        (listallinfo
+         (ampc-handle-listallinfo))
+        (outputs
+         (ampc-fill-outputs))))
+    (unless ampc-outstanding-commands
+      (ampc-update)))))
+
+(cl-defun ampc-shuffle-playlist (playlist &aux songs)
+  (ampc-iterate-source nil "file" (file)
+    (push (cons file (random)) songs))
+  (ampc-send-command 'playlistclear '(:full-remove t) (ampc-quote playlist))
+  (cl-loop for file in (mapcar #'car (sort songs
+                                          (lambda (a b) (< (cdr a) (cdr b)))))
+           do (ampc-send-command 'playlistadd
+                                 '(:keep-prev t)
+                                 (ampc-quote playlist)
+                                 file)))
+
+
+(defun ampc-handle-listallinfo ()
+  (ampc-fill-internal-db nil)
+  (ampc-set-dirty 'tag t)
+  (ampc-set-dirty 'song t))
+
+(defun ampc-filter (_process string)
+  (cl-assert (buffer-live-p (process-buffer ampc-connection)))
+  (with-current-buffer (process-buffer ampc-connection)
+    (when string
+      (when (and ampc-debug (not (eq ampc-debug t)))
+        (message "ampc: <- %s" string))
+      (goto-char (process-mark ampc-connection))
+      (insert string)
+      (set-marker (process-mark ampc-connection) (point)))
+    (save-excursion
+      (goto-char (point-min))
+      (let ((success))
+        (if (or (progn
+                  (when (search-forward-regexp
+                         "^ACK \\[\\(.*\\)\\] {.*} \\(.*\\)\n\\'"
+                         nil
+                         t)
+                    (message "ampc command error: %s (%s; %s)"
+                             (match-string 2)
+                             (match-string 1)
+                             (funcall (if ampc-debug #'identity #'car)
+                                      (car ampc-outstanding-commands)))
+                    t))
+                (when (search-forward-regexp "^OK\\(.*\\)\n\\'" nil t)
+                  (setf success t)))
+            (progn
+              (let ((match-end (match-end 0)))
+                (save-restriction
+                  (narrow-to-region (point-min) match-end)
+                  (goto-char (point-min))
+                  (ampc-handle-command (if success (match-string 1) 'error)))
+                (delete-region (point-min) match-end))
+              (unless ampc-no-implicit-next-dispatch
+                (ampc-send-next-command))))
+        (ampc-handle-command 'running)))))
+
+(cl-defun ampc-set-tab-offsets
+    (&rest properties &aux (min 2) (optional-padding 0))
+  (unless properties
+    (cl-return-from ampc-set-tab-offsets))
+  (set (make-local-variable 'tab-stop-list) nil)
+  (cl-loop for (_title . props) in properties
+           for min- = (plist-get props :min)
+           do (cl-incf min (or (plist-get props :width) min-))
+           (when min-
+             (cl-incf optional-padding (- (plist-get props :max) min-))))
+  (cl-loop for (_title . props) in properties
+           with offset = 2
+           do (push offset tab-stop-list)
+           (cl-incf offset (or (plist-get props :width)
+                            (let ((min- (plist-get props :min))
+                                  (max (plist-get props :max)))
+                              (if (>= min (window-width))
+                                  min-
+                                (min max
+                                     (+ min-
+                                        (floor (* (/ (float (- max min-))
+                                                     optional-padding)
+                                                  (- (window-width)
+                                                     min))))))))))
+  (cl-callf nreverse tab-stop-list))
+
+(cl-defun ampc-configure-frame-1 (split &aux (split-type (car split)))
+  (if (memq split-type '(vertical horizontal))
+      (let* ((sizes))
+        (cl-loop with length = (if (eq split-type 'horizontal)
+                                   (window-total-width)
+                                 (window-total-height))
+                 with rest = length
+                 with rest-car
+                 for (size . subsplit) in (cdr split)
+                 do (if (equal size 1.0)
+                        (progn (push t sizes)
+                               (setf rest-car sizes))
+                      (let ((l (if (integerp size) size (round (* size 
length)))))
+                        (cl-decf rest l)
+                        (push l sizes)))
+                 finally do (setf (car rest-car) rest))
+        (let ((first-window (selected-window)))
+          (cl-callf nreverse sizes)
+          (cl-loop for size in (copy-sequence sizes)
+                   for window on (cdr sizes)
+                   do (select-window
+                       (setf (car window)
+                             (split-window nil size (eq split-type 
'horizontal)))))
+          (setf (car sizes) first-window))
+        (cl-loop for subsplit in (cdr split)
+                 for window in sizes
+                 with result
+                 do (with-selected-window window
+                      (setf result
+                            (or (ampc-configure-frame-1 (cdr subsplit)) 
result)))
+                 finally return result))
+    (setf (window-dedicated-p (selected-window)) nil)
+    (pop-to-buffer-same-window
+     (get-buffer-create
+      (concat "*"
+              (mapconcat (lambda (s) (concat (upcase (substring s 0 1))
+                                             (substring s 1)))
+                         (if (memq split-type '(tag song))
+                             (list (or (plist-get (cdr split) :tag) "song"))
+                           (split-string (symbol-name split-type) "-"))
+                         " ")
+              "*")))
+    (if (memq split-type '(tag song))
+        (ampc-tag-song-mode)
+      (let ((mode (intern (concat "ampc-" (symbol-name split-type) "-mode"))))
+        (unless (fboundp mode)
+          (setf mode 'ampc-mode))
+        (unless (eq major-mode 'mode)   ;FIXME: This quote looks spurious!
+          (funcall mode))))
+    (cl-destructuring-bind
+        (&key (properties nil) (dedicated t) (mode-line t) &allow-other-keys)
+        (cdr split)
+      (apply #'ampc-set-tab-offsets properties)
+      (setf ampc-type split
+            (window-dedicated-p (selected-window)) dedicated
+            mode-line-format (when mode-line
+                               (default-value 'mode-line-format))))
+    (set (make-local-variable 'mode-line-buffer-identification)
+         '(:eval (let ((result
+                        (concat (car-safe (propertized-buffer-identification
+                                           (buffer-name)))
+                                (when ampc-dirty
+                                  " [Updating...]"))))
+                   (if (< (length result) 12)
+                       (concat result (make-string (- 12 (length result)) ? ))
+                     result))))
+    (ampc-update-header)
+    (add-to-list 'ampc-all-buffers (current-buffer))
+    (push (cons (or (plist-get (cdr split) :id) 9999) (selected-window))
+          ampc-windows)
+    (ampc-set-dirty t)
+    (when (plist-get (cdr split) :select)
+      (selected-window))))
+
+(cl-defun ampc-configure-frame
+    (split &optional no-update &aux (old-selection ampc-type) 
old-window-starts)
+  (cl-loop for w in (ampc-normalize-windows)
+           do (with-selected-window w
+                (with-current-buffer (window-buffer w)
+                  (push (cons (current-buffer) (window-start))
+                        old-window-starts))))
+  (if (not ampc-use-full-frame)
+      (ampc-restore-window-configuration)
+    (setf (window-dedicated-p (selected-window)) nil)
+    (delete-other-windows))
+  (setf ampc-windows nil)
+  (let ((select-window (ampc-configure-frame-1 split)))
+    (setf ampc-windows
+          (mapcar (lambda (window)
+                    (cons window (window-buffer window)))
+                  (mapcar #'cdr (sort ampc-windows
+                                     (lambda (a b) (< (car a) (car b)))))))
+    (cl-loop for w in (ampc-normalize-windows)
+             do (with-selected-window w
+                  (let ((old-window-start (cdr (assq (current-buffer)
+                                                     old-window-starts))))
+                    (when old-window-start
+                      (set-window-start nil old-window-start)))
+                  (when (and (derived-mode-p 'ampc-item-mode)
+                             (> (length tab-stop-list) 1))
+                    (ampc-set-dirty 'erase))))
+    (select-window (or (cl-loop for w in (ampc-normalize-windows)
+                                thereis
+                                (when (equal (with-current-buffer 
(window-buffer w)
+                                               ampc-type)
+                                             old-selection)
+                                  w))
+                       select-window
+                       (selected-window))))
+  (unless no-update
+    (ampc-update)))
+
+(defun ampc-tagger-rename-artist-title (_changed-tags data)
+  "Rename music file according to its tags.
+This function is meant to be inserted into
+`ampc-tagger-stored-hook'.  The new file name is
+`Artist'_-_`Title'.`extension'.  Characters within `Artist' and
+`Title' that are not alphanumeric are substituted with underscore."
+  (let* ((artist (replace-regexp-in-string
+                  "[^a-zA-Z0-9]" "_"
+                  (or (cdr (assq 'Artist (cdr data))) "")))
+         (title (replace-regexp-in-string
+                 "[^a-zA-Z0-9]" "_"
+                 (or (cdr (assq 'Title (cdr data))) "")))
+         (new-file
+          (expand-file-name (replace-regexp-in-string
+                             "_\\(_\\)+"
+                             "_"
+                             (concat artist
+                                     (when (and (> (length artist) 0)
+                                                (> (length title) 0))
+                                       "_-_")
+                                     title
+                                     (file-name-extension (car data) t)))
+                            (file-name-directory (car data)))))
+    (unless (equal (car data) new-file)
+      (ampc-tagger-log "Renaming file " (abbreviate-file-name (car data))
+                       " to " (abbreviate-file-name new-file) "\n")
+      (rename-file (car data) new-file)
+      (setf (car data) new-file))))
+
+;;; *** interactives
+(defun ampc-tagger-completion-at-point (&optional all-files)
+  "Perform completion at point via `completion-at-point'.
+If optional prefix argument ALL-FILES is non-nil, use all files
+within the files list buffer as source for completion.  The
+default behaviour is to use only the selected ones."
+  (interactive "P")
+  (let ((ampc-tagger-completion-all-files all-files))
+    (completion-at-point)))
+
+(defun ampc-tagger-reset (&optional reset-all-tags)
+  "Reset all tag values within the tagger, based on the selection of files.
+If optional prefix argument RESET-ALL-TAGS is non-nil, restore
+all tags."
+  (interactive "P")
+  (when reset-all-tags
+    (ampc-with-buffer 'tagger
+      no-se
+      (erase-buffer)
+      (cl-loop for tag in ampc-tagger-tags
+               do (insert (ampc-pad (list (concat (symbol-name tag) ":") 
"dummy"))
+                          "\n"))
+      (goto-char (point-min))
+      (re-search-forward ":\\( \\)+")))
+  (ampc-with-buffer 'tagger
+    (cl-loop while (search-forward-regexp
+                    (concat "^\\([ \t]*\\)\\("
+                            (mapconcat #'symbol-name ampc-tagger-tags "\\|")
+                            "\\)\\([ \t]*\\):\\([ \t]*.*\\)$")
+                    nil
+                    t)
+             do (replace-match "" nil nil nil 1)
+             (replace-match "" nil nil nil 3)
+             (replace-match (concat (make-string (- (car tab-stop-list)
+                                                    (1+ (length (match-string 
2))))
+                                                 ?  )
+                                    "<keep>")
+                            nil nil nil 4)))
+  (ampc-tagger-update)
+  (ampc-with-buffer 'tagger
+    no-se
+    (when (looking-at "[ \t]+")
+      (goto-char (match-end 0)))))
+
+(cl-defun ampc-tagger-save (&optional quit &aux tags)
+  "Save tags.
+If optional prefix argument QUIT is non-nil, quit tagger
+afterwards.  If the numeric value of QUIT is 16, quit tagger and
+do not trigger a database update"
+  (interactive "P")
+  (ampc-with-buffer 'tagger
+    (cl-loop do (cl-loop until (eobp)
+                         while (looking-at "^[ \t]*$")
+                         do (forward-line))
+             until (eobp)
+             do (unless (and (looking-at
+                              (concat "^[ \t]*\\("
+                                      (mapconcat #'symbol-name
+                                                 ampc-tagger-tags
+                                                 "\\|")
+                                      "\\)[ \t]*:"
+                                      "[ \t]*\\(.*\\)[ \t]*$"))
+                             (not (assq (intern (match-string 1)) tags)))
+                  (error "Malformed line \"%s\""
+                         (buffer-substring (line-beginning-position)
+                                           (line-end-position))))
+             (push (cons (intern (match-string 1))
+                         (let ((val (match-string 2)))
+                           (if (string= "<keep>" val)
+                               t
+                             (set-text-properties 0 (length val) nil val)
+                             val)))
+                   tags)
+             (forward-line)))
+  (cl-callf2 rassq-delete-all t tags)
+  (with-temp-buffer
+    (cl-loop for (tag . value) in tags
+             do (insert (symbol-name tag) "\n"
+                        value "\n"))
+    (let ((input-buffer (current-buffer)))
+      (ampc-with-buffer 'files-list
+        no-se
+        (let ((reporter
+               (make-progress-reporter "Storing tags"
+                                       0
+                                       (let ((count (count-matches "^\\* ")))
+                                         (if (zerop count)
+                                             1
+                                           count))))
+              (step 0))
+          (ampc-with-selection nil
+            (let* ((data (get-text-property (point) 'data))
+                   (old-tags (cl-loop for (tag . data) in (cdr data)
+                                      collect (cons tag data)))
+                   (found-changed (ampc-tagger-tags-modified (cdr data) tags)))
+              (let ((pre-hook-tags (cdr data)))
+                (run-hook-with-args 'ampc-tagger-store-hook found-changed data)
+                (setf found-changed
+                      (or found-changed
+                          (ampc-tagger-tags-modified pre-hook-tags
+                                                     (cdr data)))))
+              (when found-changed
+                (ampc-tagger-log
+                  "Storing tags for file "
+                  (abbreviate-file-name (car data)) "\n"
+                  "\tOld tags:\n"
+                  (cl-loop for (tag . value) in old-tags
+                           concat (concat "\t\t"
+                                          (symbol-name tag) ": "
+                                          value "\n"))
+                  "\tNew tags:\n"
+                  (cl-loop for (tag . value) in (cdr data)
+                           concat (concat "\t\t"
+                                          (symbol-name tag) ": "
+                                          value "\n")))
+                (ampc-tagger-make-backup (car data))
+                (ampc-tagger-report
+                 (list "--set" (car data))
+                 (with-temp-buffer
+                   (insert-buffer-substring input-buffer)
+                   (prog1
+                       (call-process-region (point-min) (point-max)
+                                            ampc-tagger-executable
+                                            nil t nil
+                                            "--set" (car data))
+                     (when ampc-debug
+                       (message "ampc-tagger: %s"
+                                (buffer-substring
+                                 (point-min) (point))))))))
+              (run-hook-with-args 'ampc-tagger-stored-hook found-changed data)
+              (let ((inhibit-read-only t))
+                (move-beginning-of-line nil)
+                (forward-char 2)
+                (kill-line 1)
+                (insert
+                 (ampc-pad (cl-loop for p in (plist-get (cdr ampc-type)
+                                                        :properties)
+                                    when (eq (car p) 'filename)
+                                    collect (file-name-nondirectory (car data))
+                                    else
+                                    collect (cdr (assq (intern (car p))
+                                                       (cdr data)))
+                                    end))
+                 "\n")
+                (forward-line -1)
+                (put-text-property (line-beginning-position)
+                                   (1+ (line-end-position))
+                                   'data data))
+              (progress-reporter-update reporter (cl-incf step))))
+          (progress-reporter-done reporter)))))
+  (when quit
+    (ampc-tagger-quit (eq (prefix-numeric-value quit) 16))))
+
+(defun ampc-tagger-quit (&optional no-update)
+  "Quit tagger and restore previous window configuration.
+With optional prefix NO-UPDATE, do not trigger a database update."
+  (interactive "P")
+  (set-window-configuration (or (car-safe ampc-tagger-previous-configuration)
+                                ampc-tagger-previous-configuration))
+  (when (car-safe ampc-tagger-previous-configuration)
+    (unless no-update
+      (ampc-trigger-update))
+    (setf ampc-windows (cadr ampc-tagger-previous-configuration)))
+  (setf ampc-tagger-previous-configuration nil))
+
+(defun ampc-move-to-tab ()
+  "Move point to next logical tab stop."
+  (interactive)
+  (let ((tab (cl-loop for tab in
+                      (or (get-text-property (point) 'tab-stop-list)
+                          tab-stop-list)
+                      while (>= (current-column) tab)
+                      finally return tab)))
+    (when tab
+      (goto-char (min (+ (line-beginning-position) tab) 
(line-end-position))))))
+
+(defun ampc-mouse-play-this (event)
+  (interactive "e")
+  (select-window (posn-window (event-end event)))
+  (goto-char (posn-point (event-end event)))
+  (ampc-play-this))
+
+(defun ampc-mouse-delete (event)
+  (interactive "e")
+  (select-window (posn-window (event-end event)))
+  (goto-char (posn-point (event-end event)))
+  (ampc-delete 1))
+
+(defun ampc-mouse-add (event)
+  (interactive "e")
+  (select-window (posn-window (event-end event)))
+  (goto-char (posn-point (event-end event)))
+  (ampc-add-impl))
+
+(defun ampc-mouse-delete-playlist (event)
+  (interactive "e")
+  (select-window (posn-window (event-end event)))
+  (goto-char (posn-point (event-end event)))
+  (ampc-delete-playlist t))
+
+(defun ampc-mouse-load (event)
+  (interactive "e")
+  (select-window (posn-window (event-end event)))
+  (goto-char (posn-point (event-end event)))
+  (ampc-load t))
+
+(defun ampc-mouse-toggle-output-enabled (event)
+  (interactive "e")
+  (select-window (posn-window (event-end event)))
+  (goto-char (posn-point (event-end event)))
+  (ampc-toggle-output-enabled 1))
+
+(cl-defun ampc-mouse-toggle-mark (event &aux (inhibit-read-only t))
+  (interactive "e")
+  (let ((window (posn-window (event-end event))))
+    (when (with-selected-window window
+            (goto-char (posn-point (event-end event)))
+            (unless (eobp)
+              (move-beginning-of-line nil)
+              (ampc-mark-impl (not (eq (char-after) ?*)) 1)
+              t))
+      (select-window window))))
+
+(defun ampc-mouse-align-point (event)
+  (interactive "e")
+  (select-window (posn-window (event-end event)))
+  (goto-char (posn-point (event-end event)))
+  (ampc-align-point))
+
+(cl-defun ampc-unmark-all (&aux (inhibit-read-only t))
+  "Remove all marks."
+  (interactive)
+  (cl-assert (ampc-in-ampc-p t))
+  (save-excursion
+    (goto-char (point-min))
+    (cl-loop while (search-forward-regexp "^\\* " nil t)
+             do (replace-match "  " nil nil)))
+  (ampc-post-mark-change-update))
+
+(defun ampc-trigger-update ()
+  "Trigger a database update."
+  (interactive)
+  (cl-assert (ampc-on-p))
+  (ampc-send-command 'update))
+
+(cl-defun ampc-toggle-marks (&aux (inhibit-read-only t))
+  "Toggle marks.
+Marked entries become unmarked, and vice versa."
+  (interactive)
+  (cl-assert (ampc-in-ampc-p t))
+  (save-excursion
+    (cl-loop for (a . b) in '(("* " . "T ")
+                              ("  " . "* ")
+                              ("T " . "  "))
+             do (goto-char (point-min))
+             (cl-loop while (search-forward-regexp (concat "^" (regexp-quote 
a))
+                                                   nil
+                                                   t)
+                      do (replace-match b nil nil))))
+  (ampc-post-mark-change-update))
+
+(defun ampc-up (&optional arg)
+  "Move selected entries ARG positions upwards.
+ARG defaults to one."
+  (interactive "p")
+  (cl-assert (ampc-in-ampc-p))
+  (ampc-move (- (or arg 1))))
+
+(defun ampc-down (&optional arg)
+  "Move selected entries ARG positions downwards.
+ARG defaults to one."
+  (interactive "p")
+  (cl-assert (ampc-in-ampc-p))
+  (ampc-move (or arg 1)))
+
+(defun ampc-mark (&optional arg)
+  "Mark the next ARG'th entries.
+ARG defaults to 1."
+  (interactive "p")
+  (cl-assert (ampc-in-ampc-p t))
+  (ampc-mark-impl t arg))
+
+(defun ampc-unmark (&optional arg)
+  "Unmark the next ARG'th entries.
+ARG defaults to 1."
+  (interactive "p")
+  (cl-assert (ampc-in-ampc-p t))
+  (ampc-mark-impl nil arg))
+
+(defun ampc-set-volume (&optional arg)
+  "Set volume to ARG percent.
+If ARG is nil, read ARG from minibuffer."
+  (interactive "P")
+  (cl-assert (ampc-on-p))
+  (ampc-set-volume-impl (or arg (read-number "Volume: "))))
+
+(defun ampc-increase-volume (&optional arg)
+  "Increase volume by prefix argument ARG or, if ARG is nil,
+`ampc-volume-step'."
+  (interactive "P")
+  (cl-assert (ampc-on-p))
+  (ampc-set-volume-impl arg '+))
+
+(defun ampc-decrease-volume (&optional arg)
+  "Decrease volume by prefix argument ARG or, if ARG is nil,
+`ampc-volume-step'."
+  (interactive "P")
+  (cl-assert (ampc-on-p))
+  (ampc-set-volume-impl arg '-))
+
+(defun ampc-set-crossfade (&optional arg)
+  "Set crossfade to ARG seconds.
+If ARG is nil, read ARG from minibuffer."
+  (interactive "P")
+  (cl-assert (ampc-on-p))
+  (ampc-set-crossfade-impl (or arg (read-number "Crossfade: "))))
+
+(defun ampc-increase-crossfade (&optional arg)
+  "Increase crossfade by prefix argument ARG or, if ARG is nil,
+`ampc-crossfade-step'."
+  (interactive "P")
+  (cl-assert (ampc-on-p))
+  (ampc-set-crossfade-impl arg '+))
+
+(defun ampc-decrease-crossfade (&optional arg)
+  "Decrease crossfade by prefix argument ARG or, if ARG is nil,
+`ampc-crossfade-step'."
+  (interactive "P")
+  (cl-assert (ampc-on-p))
+  (ampc-set-crossfade-impl arg '-))
+
+(defun ampc-toggle-repeat (&optional arg)
+  "Toggle MPD's repeat state.
+With prefix argument ARG, enable repeating if ARG is positive,
+otherwise disable it."
+  (interactive "P")
+  (cl-assert (ampc-on-p))
+  (ampc-toggle-state 'repeat arg))
+
+(defun ampc-toggle-consume (&optional arg)
+  "Toggle MPD's consume state.
+With prefix argument ARG, enable consuming if ARG is positive,
+otherwise disable it.
+
+When consume is activated, each song played is removed from the playlist."
+  (interactive "P")
+  (cl-assert (ampc-on-p))
+  (ampc-toggle-state 'consume arg))
+
+(defun ampc-toggle-random (&optional arg)
+  "Toggle MPD's random state.
+With prefix argument ARG, enable random playing if ARG is positive,
+otherwise disable it."
+  (interactive "P")
+  (ampc-toggle-state 'random arg))
+
+(defun ampc-play-this (&optional arg)
+  "Play selected song.
+With prefix argument ARG, play the ARG'th song located at the
+zero-indexed position of the current playlist."
+  (interactive "P")
+  (cl-assert (and (ampc-on-p) (or arg (ampc-in-ampc-p))))
+  (if (not arg)
+      (unless (eobp)
+        (ampc-send-command 'play nil (1- (line-number-at-pos)))
+        (ampc-send-command 'pause nil 0))
+    (ampc-send-command 'play nil arg)
+    (ampc-send-command 'pause nil 0)))
+
+(cl-defun ampc-toggle-play
+    (&optional arg &aux (state (cdr (assq 'state ampc-status))))
+  "Toggle play state.
+If MPD does not play a song already, start playing the song at
+point if the current buffer is the playlist buffer, otherwise
+start at the beginning of the playlist.
+
+If ARG is 4, stop player rather than pause if applicable."
+  (interactive "P")
+  (cl-assert (ampc-on-p))
+  (unless state
+    (cl-return-from ampc-toggle-play))
+  (when arg
+    (setf arg (prefix-numeric-value arg)))
+  (cl-ecase (intern state)
+    (stop
+     (when (or (null arg) (> arg 0))
+       (ampc-send-command
+        'play
+        '(:remove-other (pause))
+        (if (and (eq (car ampc-type) 'current-playlist) (not (eobp)))
+            (1- (line-number-at-pos))
+          0))))
+    (pause
+     (when (or (null arg) (> arg 0))
+       (ampc-send-command 'pause '(:remove-other (play)) 0)))
+    (play
+     (cond ((or (null arg) (< arg 0))
+            (ampc-send-command 'pause '(:remove-other (play)) 1))
+           ((eq arg 4)
+            (ampc-send-command 'stop))))))
+
+(defun ampc-next (&optional arg)
+  "Play next song.
+With prefix argument ARG, skip ARG songs."
+  (interactive "p")
+  (cl-assert (ampc-on-p))
+  (ampc-skip (or arg 1)))
+
+(defun ampc-previous (&optional arg)
+  "Play previous song.
+With prefix argument ARG, skip ARG songs."
+  (interactive "p")
+  (cl-assert (ampc-on-p))
+  (ampc-skip (- (or arg 1))))
+
+(defun ampc-rename-playlist (new-name)
+  "Rename selected playlist to NEW-NAME.
+If NEW-NAME is nil, read NEW-NAME from the minibuffer."
+  (interactive "M")
+  (unless new-name
+    (setf new-name (read-from-minibuffer (concat "New name for playlist "
+                                                 (ampc-playlist)
+                                                 ": "))))
+  (cl-assert (ampc-in-ampc-p))
+  (if (ampc-playlist)
+      (ampc-send-command 'rename '(:full-remove t) (ampc-quote new-name))
+    (message "No playlist selected")))
+
+(defun ampc-load (&optional at-point)
+  "Load selected playlist in the current playlist.
+If optional argument AT-POINT is non-nil (or if no playlist is
+selected), use playlist at point rather than the selected one."
+  (interactive)
+  (cl-assert (ampc-in-ampc-p))
+  (if (ampc-playlist at-point)
+      (ampc-send-command
+       'load '(:keep-prev t)
+       (ampc-quote (ampc-playlist at-point)))
+    (if at-point
+        (message "No playlist at point")
+      (message "No playlist selected"))))
+
+(defun ampc-toggle-output-enabled (&optional arg)
+  "Toggle the next ARG outputs.
+If ARG is omitted, use the selected entries."
+  (interactive "P")
+  (cl-assert (ampc-in-ampc-p))
+  (ampc-with-selection arg
+    (let ((data (get-text-property (point) 'data)))
+      (ampc-send-command (if (equal (cdr (assoc "outputenabled" data)) "1")
+                             'disableoutput
+                           'enableoutput)
+                         '(:full-remove t)
+                         (cdr (assoc "outputid" data))))))
+
+(defun ampc-delete (&optional arg)
+  "Delete the next ARG songs from the playlist.
+If ARG is omitted, use the selected entries.  If ARG is non-nil,
+all marks after point are removed nontheless."
+  (interactive "P")
+  (cl-assert (ampc-in-ampc-p))
+  (let ((first-del nil))
+    (ampc-with-selection arg
+      (unless (or first-del (when arg (< arg 0)))
+        (setf first-del (point)))
+      (let ((val (1- (- (line-number-at-pos) (if (or (not arg) (> arg 0))
+                                                 index
+                                               0)))))
+        (if (and (not (eq (car ampc-type) 'current-playlist)) (ampc-playlist))
+            (ampc-send-command 'playlistdelete
+                               '(:keep-prev t)
+                               (ampc-quote (ampc-playlist))
+                               val)
+          (ampc-send-command 'delete '(:keep-prev t) val))
+        (ampc-mark-impl nil nil)))
+    (when first-del
+      (goto-char first-del))))
+
+(defun ampc-shuffle ()
+  "Shuffle playlist."
+  (interactive)
+  (cl-assert (ampc-on-p))
+  (if (and (not (eq (car ampc-type) 'current-playlist)) (ampc-playlist))
+      (ampc-send-command 'shuffle-listplaylistinfo
+                         `(:playlist ,(ampc-playlist))
+                         (ampc-quote (ampc-playlist)))
+    (ampc-send-command 'shuffle)))
+
+(defun ampc-clear ()
+  "Clear playlist."
+  (interactive)
+  (cl-assert (ampc-on-p))
+  (if (and (not (eq (car ampc-type) 'current-playlist)) (ampc-playlist))
+      (ampc-send-command 'playlistclear '(:full-remove t)
+                         (ampc-quote (ampc-playlist)))
+    (ampc-send-command 'clear)))
+
+(defun ampc-add (&optional arg)
+  "Add the songs associated with the next ARG entries after point
+to the playlist.
+If ARG is omitted, use the selected entries in the current buffer."
+  (interactive "P")
+  (cl-assert (ampc-in-ampc-p))
+  (ampc-with-selection arg
+    (ampc-add-impl)))
+
+(defun ampc-status (&optional no-print)
+  "Display and return the information that is displayed in the status window.
+If optional argument NO-PRINT is non-nil, just return the text.
+If NO-PRINT is nil, the display may be delayed if ampc does not
+have enough information yet."
+  (interactive)
+  (cl-assert (ampc-on-p))
+  (unless (or ampc-status no-print)
+    (ampc-send-command 'status)
+    (ampc-send-command 'mini-currentsong)
+    (cl-return-from ampc-status))
+  (let* ((flags (mapconcat
+                 #'identity
+                 (cl-loop for (f . n) in '((repeat . "Repeat")
+                                           (random . "Random")
+                                           (consume . "Consume"))
+                          when (equal (cdr (assq f ampc-status)) "1")
+                          collect n
+                          end)
+                 "|"))
+         (state (cdr (assq 'state ampc-status)))
+         (status (concat "State:     " state
+                         (when (and ampc-yield no-print)
+                           (concat (make-string (- 10 (length state)) ? )
+                                   (nth (% ampc-yield 4) '("|" "/" "-" "\\"))))
+                         "\n"
+                         (when (equal state "play")
+                           (concat "Playing:   "
+                                   (ampc-clean-tag
+                                    'Artist
+                                    (cdr (assq 'Artist ampc-status)))
+                                   " - "
+                                   (ampc-clean-tag
+                                    'Title
+                                    (cdr (assq 'Title ampc-status)))
+                                   "\n"))
+                         "Volume:    " (cdr (assq 'volume ampc-status)) "\n"
+                         "Crossfade: " (cdr (assq 'xfade ampc-status))
+                         (unless (equal flags "")
+                           (concat "\n" flags)))))
+    (unless no-print
+      (message "%s" status))
+    status))
+
+(defun ampc-delete-playlist (&optional at-point)
+  "Delete selected playlist.
+If optional argument AT-POINT is non-nil (or if no playlist is
+selected), use playlist at point rather than the selected one."
+  (interactive)
+  (cl-assert (ampc-in-ampc-p))
+  (if (ampc-playlist at-point)
+      (when (y-or-n-p (concat "Delete playlist " (ampc-playlist at-point) "?"))
+        (ampc-send-command 'rm '(:full-remove t)
+                           (ampc-quote (ampc-playlist at-point))))
+    (if at-point
+        (message "No playlist at point")
+      (message "No playlist selected"))))
+
+(require 'dired)               ;Needed to properly compile 
dired-map-over-marks.
+;;;###autoload
+(defun ampc-tagger-dired (&optional arg)
+  "Start the tagging subsystem on dired's marked files.
+With optional prefix argument ARG, use the next ARG files."
+  (interactive "P")
+  (cl-assert (derived-mode-p 'dired-mode))
+  (ampc-tag-files
+   (cl-loop for file in (dired-map-over-marks (dired-get-filename) arg)
+            unless (file-directory-p file)
+            collect file
+            end)))
+
+;;;###autoload
+(defun ampc-tag-files (files)
+  "Start the tagging subsystem.
+FILES should be a list of absolute file names, the files to tag."
+  (unless files
+    (message "No files specified")
+    (cl-return-from ampc-tagger-files t))
+  (when (memq (car ampc-type) '(files-list tagger))
+    (message "You are already within the tagger")
+    (cl-return-from ampc-tagger-files t))
+  (let ((reporter (make-progress-reporter "Grabbing tags" 0 (length files))))
+    (cl-loop for file in-ref files
+             for i from 1
+             do (run-hook-with-args 'ampc-tagger-grab-hook file)
+             (with-temp-buffer
+               (ampc-tagger-call "--get" file)
+               (setf file
+                     (apply #'list
+                            file
+                            (cl-loop for tag in ampc-tagger-tags
+                                     collect
+                                     (cons tag (or (ampc-extract 
(ampc-extract-regexp
+                                                                  (symbol-name 
tag)))
+                                                   ""))))))
+             (run-hook-with-args 'ampc-tagger-grabbed-hook file)
+             (progress-reporter-update reporter i))
+    (progress-reporter-done reporter))
+  (unless ampc-tagger-previous-configuration
+    (setf ampc-tagger-previous-configuration (current-window-configuration)))
+  (ampc-configure-frame (cdr (assq 'tagger ampc-views)) t)
+  (ampc-with-buffer 'files-list
+    (erase-buffer)
+    (cl-loop for (file . props) in files
+             do (insert (propertize
+                         (concat
+                          "  "
+                          (ampc-pad
+                           (cl-loop for p in (plist-get (cdr ampc-type) 
:properties)
+                                    when (eq (car p) 'filename)
+                                    collect (file-name-nondirectory file)
+                                    else
+                                    collect (cdr (assq (intern (car p)) props))
+                                    end))
+                          "\n")
+                         'data (cons file props))))
+    (ampc-set-dirty nil)
+    (ampc-toggle-marks))
+  (ampc-with-buffer 'tagger
+    no-se
+    (ampc-tagger-reset t)
+    (goto-char (point-min))
+    (search-forward-regexp ": *")
+    (ampc-set-dirty nil))
+  nil)
+
+(cl-defun ampc-tagger (&optional arg &aux files)
+  "Start the tagging subsystem.
+The files to tag are collected by using either the selected
+entries within the current buffer or the next ARG entries at
+point if numeric perfix argument ARG is non-nil, the file
+associated with the entry at point, or, if both sources did not
+provide any files, the audio file that is currently played by
+MPD."
+  (interactive "P")
+  (cl-assert (ampc-in-ampc-p))
+  (unless ampc-tagger-version-verified
+    (with-temp-buffer
+      (ampc-tagger-call "--version")
+      (goto-char (point-min))
+      (let ((version (buffer-substring (line-beginning-position)
+                                       (line-end-position))))
+        (unless (equal version ampc-tagger-version)
+          (message (concat "The reported version of %s is not supported - "
+                           "got \"%s\", want \"%s\"")
+                   ampc-tagger-executable
+                   version
+                   ampc-tagger-version)
+          (cl-return-from ampc-tagger))))
+    (setf ampc-tagger-version-verified t))
+  (unless ampc-tagger-genres
+    (with-temp-buffer
+      (ampc-tagger-call "--genres")
+      (cl-loop while (search-backward-regexp "^\\(.+\\)$" nil t)
+               do (push (match-string 1) ampc-tagger-genres))))
+  (unless ampc-tagger-music-directories
+    (message (concat "ampc-tagger-music-directories is nil.  Fill it via "
+                     "M-x customize-variable RET ampc-tagger-music-directories 
"
+                     "RET"))
+    (cl-return-from ampc-tagger))
+  (cl-case (car ampc-type)
+    (current-playlist
+     (save-excursion
+       (ampc-with-selection arg
+         (cl-callf nconc files (list (cdr (assoc "file" (get-text-property
+                                                      (line-end-position)
+                                                      'data))))))))
+    ((playlist tag song)
+     (save-excursion
+       (ampc-with-selection arg
+         (ampc-on-files (lambda (file) (push file files)))))
+     (cl-callf nreverse files))
+    (t
+     (let ((file (cdr (assoc 'file ampc-status))))
+       (when file
+         (setf files (list file))))))
+  (cl-loop for file in-ref files
+           for read-file = (locate-file file ampc-tagger-music-directories)
+           do (unless read-file
+                (error "Cannot locate file %s in ampc-tagger-music-directories"
+                       file)
+                (cl-return-from ampc-tagger))
+           (setf file (expand-file-name read-file)))
+  (setf ampc-tagger-previous-configuration
+        (list (current-window-configuration) ampc-windows))
+  (when (ampc-tag-files files)
+    (setf ampc-tagger-previous-configuration nil)))
+
+(defun ampc-store (&optional name-or-append)
+  "Store current playlist as NAME-OR-APPEND.
+If NAME is non-nil and not a string, append selected entries
+within the current playlist buffer to the selected playlist.  If
+NAME-OR-APPEND is a negative integer, append the next (-
+NAME-OR-APPEND) entries after point within the current playlist
+buffer to the selected playlist.  If NAME-OR-APPEND is nil, read
+playlist name from the minibuffer."
+  (interactive "P")
+  (cl-assert (ampc-in-ampc-p))
+  (unless name-or-append
+    (setf name-or-append (read-from-minibuffer "Save playlist as: ")))
+  (if (stringp name-or-append)
+      (ampc-send-command 'save '(:full-remove t) (ampc-quote name-or-append))
+    (if (not (ampc-playlist))
+        (message "No playlist selected")
+      (ampc-with-buffer 'current-playlist
+        (when name-or-append
+          (cl-callf prefix-numeric-value name-or-append))
+        (ampc-with-selection (if (and name-or-append (< name-or-append 0))
+                                 (- name-or-append)
+                               nil)
+          (ampc-send-command
+           'playlistadd
+           '(:keep-prev t)
+           (ampc-quote (ampc-playlist))
+           (ampc-quote (cdr (assoc "file"
+                                   (get-text-property (point) 'data))))))))))
+
+(cl-defun ampc-goto-current-song (&aux (song (cdr (assq 'song ampc-status))))
+  "Select the current playlist window and move point to the current song."
+  (interactive)
+  (cl-assert (ampc-in-ampc-p))
+  (let ((window (ampc-with-buffer 'current-playlist
+                  (selected-window))))
+    (when window
+      (select-window window)
+      (when song
+        (goto-char (point-min))
+        (forward-line (string-to-number song)))
+      (ampc-align-point))))
+
+(defun ampc-previous-line (&optional arg)
+  "Go to previous ARG'th entry in the current buffer.
+ARG defaults to 1."
+  (interactive "p")
+  (cl-assert (ampc-in-ampc-p t))
+  (ampc-next-line (* (or arg 1) -1)))
+
+(defun ampc-next-line (&optional arg)
+  "Go to next ARG'th entry in the current buffer.
+ARG defaults to 1."
+  (interactive "p")
+  (cl-assert (ampc-in-ampc-p t))
+  (forward-line arg)
+  (if (eobp)
+      (progn (forward-line -1)
+             (forward-char 2)
+             t)
+    (ampc-align-point)
+    nil))
+
+(cl-defun ampc-suspend (&optional (run-hook t))
+  "Suspend ampc.
+This function resets the window configuration, but does not close
+the connection to MPD or destroy the internal cache of ampc.
+This means subsequent startups of ampc will be faster."
+  (interactive)
+  (when ampc-working-timer
+    (cancel-timer ampc-working-timer))
+  (ampc-restore-window-configuration)
+  (cl-loop for b in ampc-all-buffers
+           do (when (buffer-live-p b)
+                (kill-buffer b)))
+  (setf ampc-windows nil
+        ampc-all-buffers nil
+        ampc-working-timer nil)
+  (when run-hook
+    (run-hooks 'ampc-suspend-hook)))
+
+(defun ampc-mini ()
+  "Select song to play via `completing-read'."
+  (interactive)
+  (cl-assert (ampc-on-p))
+  (ampc-send-command 'mini-playlistinfo))
+
+(defun ampc-quit (&optional arg)
+  "Quit ampc.
+If prefix argument ARG is non-nil, kill the MPD instance that
+ampc is connected to."
+  (interactive "P")
+  (when (ampc-on-p)
+    (set-process-filter ampc-connection nil)
+    (when (equal (car-safe ampc-outstanding-commands) '(idle nil))
+      (ampc-send-command-impl "noidle")
+      (with-current-buffer (process-buffer ampc-connection)
+        (cl-loop do (goto-char (point-min))
+                 until (search-forward-regexp "^\\(ACK\\)\\|\\(OK\\).*\n\\'" 
nil t)
+                 while (ampc-on-p)
+                 do (accept-process-output ampc-connection nil 50))))
+    (ampc-send-command-impl (if arg "kill" "close"))
+    (delete-process ampc-connection))
+  (when ampc-working-timer
+    (cancel-timer ampc-working-timer))
+  (ampc-suspend nil)
+  (setf ampc-connection nil
+        ampc-internal-db nil
+        ampc-outstanding-commands nil
+        ampc-status nil)
+  (run-hooks 'ampc-quit-hook))
+
+;;;###autoload
+(defun ampc-suspended-p ()
+  "Return non-nil if ampc is suspended."
+  (interactive)
+  (and (ampc-on-p) (not ampc-windows)))
+
+;;;###autoload
+(defun ampc-on-p ()
+  "Return non-nil if ampc is connected to the daemon."
+  (interactive)
+  (and ampc-connection (memq (process-status ampc-connection) '(open run))))
+
+;;;###autoload
+(defun ampc (&optional host port suspend)
+  "Ampc is an asynchronous client for the MPD media player.
+This function is the main entry point for ampc.
+
+HOST and PORT specify the MPD instance to connect to.  The values
+default to the ones specified in `ampc-default-server'."
+  (interactive)
+  (unless (byte-code-function-p (symbol-function 'ampc))
+    (message "You should byte-compile ampc"))
+  (run-hooks 'ampc-before-startup-hook)
+  (unless host
+    (setf host (or (car ampc-default-server) (read-string  "Host: "))))
+  (unless port
+    (setf port (or (cdr ampc-default-server) (read-string "Port: "))))
+  (when (and ampc-connection
+             (not (and (equal host ampc-host)
+                       (equal port ampc-port)
+                       (ampc-on-p))))
+    (ampc-quit))
+  (unless ampc-connection
+    (let ((connection (open-network-stream "ampc"
+                                           (with-current-buffer
+                                               (get-buffer-create " *ampc*")
+                                             (erase-buffer)
+                                             (current-buffer))
+                                           host
+                                           port
+                                           :type 'plain :return-list t)))
+      (unless (car connection)
+        (error "Failed connecting to server: %s"
+               (plist-get ampc-connection :error)))
+      (setf ampc-connection (car connection)
+            ampc-host host
+            ampc-port port))
+    (set-process-coding-system ampc-connection 'utf-8-unix 'utf-8-unix)
+    (set-process-filter ampc-connection 'ampc-filter)
+    (set-process-query-on-exit-flag ampc-connection nil)
+    (setf ampc-outstanding-commands '((setup))))
+  (if suspend
+      (ampc-update)
+    (ampc-configure-frame (cl-cddadr ampc-views)))
+  (run-hooks 'ampc-connected-hook)
+  (when suspend
+    (ampc-suspend))
+  (ampc-filter (process-buffer ampc-connection) nil))
+
+(provide 'ampc)
+
+;; Local Variables:
+;; eval: (outline-minor-mode 1)
+;; outline-regexp: ";;; \\*+"
+;; fill-column: 80
+;; indent-tabs-mode: nil
+;; End:
+;;; ampc.el ends here
diff --git a/packages/ampc/ampc_tagger.cpp b/packages/ampc/ampc_tagger.cpp
new file mode 100644
index 0000000..b62de7c
--- /dev/null
+++ b/packages/ampc/ampc_tagger.cpp
@@ -0,0 +1,218 @@
+// ampc_tagger.el --- Asynchronous Music Player Controller Tagger
+
+// Copyright (C) 2012 Free Software Foundation, Inc.
+
+// Author: Christopher Schmidt <address@hidden>
+// Maintainer: Christopher Schmidt <address@hidden>
+// Created: 2012-07-17
+
+// This file is part of ampc.
+
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <iostream>
+#include <sstream>
+
+#include <taglib/fileref.h>
+#include <taglib/tag.h>
+#include <taglib/id3v1genres.h>
+
+std::wstring const version=L"0.1";
+std::locale original_wcout_locale;
+
+bool get(std::string const& file)
+{
+    using namespace TagLib;
+
+    FileRef file_ref(file.c_str());
+    Tag* tag;
+    if(file_ref.isNull() || !(tag=file_ref.tag()))
+    {
+        std::wcerr << L"ERROR: Failed opening file." << std::endl;
+        return true;
+    }
+
+    std::wcout << L"Title: " << tag->title().toWString() << std::endl <<
+        L"Artist: " << tag->artist().toWString() << std::endl <<
+        L"Album: " << tag->album().toWString() << std::endl <<
+        L"Comment: " << tag->comment().toWString() << std::endl <<
+        L"Genre: " << tag->genre().toWString() << std::endl;
+    if(tag->year())
+    {
+        std::wcout << L"Year: ";
+        std::locale new_locale=std::wcout.imbue(original_wcout_locale);
+        std::wcout << tag->year();
+        std::wcout.imbue(new_locale);
+        std::wcout << std::endl;
+    }
+    if(tag->track())
+    {
+        std::wcout << L"Track: ";
+        std::locale new_locale=std::wcout.imbue(original_wcout_locale);
+        std::wcout << tag->track();
+        std::wcout.imbue(new_locale);
+        std::wcout << std::endl;
+    }
+
+    return false;
+}
+
+bool set(std::string const& file)
+{
+    using namespace TagLib;
+
+    FileRef file_ref(file.c_str());
+    Tag* tag;
+    if(file_ref.isNull() || !(tag=file_ref.tag()))
+    {
+        std::wcerr << L"ERROR: Failed opening file." << std::endl;
+        return true;
+    }
+
+    for(;;)
+    {
+        if(!std::wcin)
+        {
+            std::wcerr << L"ERROR: invalid input data." << std::endl;
+            return true;
+        }
+
+        std::wstring tag_to_set;
+        getline(std::wcin, tag_to_set);
+        if(tag_to_set == L"")
+        {
+            break;
+        }
+
+        std::wstring value;
+        getline(std::wcin, value);
+
+        std::wcout << L"Setting " << tag_to_set <<
+            L" to " << value << std::endl;
+
+        if(tag_to_set == L"Title")
+        {
+            tag->setTitle(value);
+        }
+        else if(tag_to_set == L"Artist")
+        {
+            tag->setArtist(value);
+        }
+        else if(tag_to_set == L"Album")
+        {
+            tag->setAlbum(value);
+        }
+        else if(tag_to_set == L"Comment")
+        {
+            tag->setComment(value);
+        }
+        else if(tag_to_set == L"Genre")
+        {
+            tag->setGenre(value);
+        }
+        else if(tag_to_set == L"Year")
+        {
+            unsigned int ival;
+            if(value == L"")
+            {
+                ival=0;
+            }
+            else
+            {
+                std::wistringstream val(value);
+                val >> ival;
+            }
+            tag->setYear(ival);
+        }
+        else if(tag_to_set == L"Track")
+        {
+            unsigned int ival;
+            if(value == L"")
+            {
+                ival=0;
+            }
+            else
+            {
+                std::wistringstream val(value);
+                val >> ival;
+            }
+            tag->setTrack(ival);
+        }
+        else
+        {
+            std::wcerr << L"Unknown tag " << tag_to_set << std::endl;
+            return true;
+        }
+    }
+
+    if(!file_ref.save())
+    {
+        std::wcerr << L"Failed saving file." << std::endl;
+        return true;
+    }
+
+    return false;
+}
+
+int main(int const argc, char**const argv)
+{
+    std::locale loc("");
+    original_wcout_locale=std::wcout.imbue(loc);
+    std::wcin.imbue(loc);
+    std::locale::global(loc);
+
+    std::string action;
+    if(argc >= 2)
+    {
+        action=argv[1];
+    }
+
+    if(action == "--version")
+    {
+        std::wcout << version << std::endl;
+        return 0;
+    }
+    else if(action == "--genres")
+    {
+        using namespace TagLib;
+        StringList genres=ID3v1::genreList();
+        for(StringList::ConstIterator genre=genres.begin();
+            genre!=genres.end();
+            ++genre)
+        {
+            std::wcout << genre->toWString() << std::endl;
+        }
+        return 0;
+    }
+    else if(action == "--get" && argc == 3)
+    {
+        return get(argv[2]) ? 1 : 0;
+    }
+    else if(action == "--set" && argc == 3)
+    {
+        return set(argv[2]) ? 1 : 0;
+    }
+    else
+    {
+        std::wcerr <<
+            L"Usage: ampc_tagger [--version|--genres|--set file|--get file]" <<
+            std::endl;
+        return 1;
+    }
+}
+
+// Local Variables:
+// fill-column: 80
+// indent-tabs-mode: nil
+// End:
diff --git a/packages/async/README.md b/packages/async/README.md
new file mode 100644
index 0000000..a5b0866
--- /dev/null
+++ b/packages/async/README.md
@@ -0,0 +1,145 @@
+<p><a href="http://www.gnu.org/licenses/gpl-3.0.txt";><img 
src="https://img.shields.io/badge/license-GPL_3-green.svg"; alt="License GPL 3" 
/></a>
+<a href="http://melpa.org/#/async";><img 
src="http://melpa.org/packages/async-badge.svg"; alt="MELPA" title="" /></a>
+<a href="http://stable.melpa.org/#/async";><img 
src="http://stable.melpa.org/packages/async-badge.svg"; alt="MELPA Stable" 
title="" /></a></p>
+
+
+# emacs-async
+
+`async.el` is a module for doing asynchronous processing in Emacs.
+
+# Install
+
+## Install dired-async
+
+Add to your `.emacs.el`:
+
+    (autoload 'dired-async-mode "dired-async.el" nil t)
+    (dired-async-mode 1)
+
+This will allow you to run  asynchronously
+the dired commands for copying, renaming and symlinking.
+If you are a [helm](https://github.com/emacs-helm/helm) user, this will allow 
you
+to copy, rename etc... asynchronously from 
[helm](https://github.com/emacs-helm/helm).
+Note that with [helm](https://github.com/emacs-helm/helm)
+you can disable this by running the copy, rename etc... commands with a prefix 
argument.
+
+If you don't want to make dired/helm asynchronous disable it with 
`dired-async-mode`.
+
+## Enable asynchronous compilation of your (M)elpa packages
+
+By default emacs package.el compile packages in its running emacs session.
+This is not a problem when installing a new package (which is not actually 
loaded in current emacs)
+but it may create errors and bad compilation when upgrading a package (old 
version of package is already loaded
+and running in current emacs).
+You can remedy to this by allowing async to compile your packages 
asynchronously,
+(helm and magit actually do this by default,
+so if you are using these packages they will compile asynchronously)
+to do this, add to your init file:
+    
+    (async-bytecomp-package-mode 1)
+
+
+You can control which packages will compile async with 
`async-bytecomp-allowed-packages`.
+Set it to `'(all)` to be sure you will compile all packages asynchronously.
+
+# Usage
+
+The interface is intended to be very easy to use:
+
+## async-start
+
+    async-start START-FUNC FINISH-FUNC
+
+Execute START-FUNC (often a lambda) in a subordinate Emacs process.  When
+done, the return value is passed to FINISH-FUNC.  Example:
+
+    (async-start
+       ;; What to do in the child process
+       (lambda ()
+         (message "This is a test")
+         (sleep-for 3)
+         222)
+
+       ;; What to do when it finishes
+       (lambda (result)
+         (message "Async process done, result should be 222: %s" result)))
+
+If FINISH-FUNC is `nil` or missing, a future is returned that can be inspected
+using `async-get`, blocking until the value is ready.  Example:
+
+    (let ((proc (async-start
+                   ;; What to do in the child process
+                   (lambda ()
+                     (message "This is a test")
+                     (sleep-for 3)
+                     222))))
+
+        (message "I'm going to do some work here") ;; ....
+
+        (message "Waiting on async process, result should be 222: %s"
+                 (async-get proc)))
+
+If you don't want to use a callback, and you don't care about any return value
+from the child process, pass the `'ignore` symbol as the second argument (if
+you don't, and never call `async-get`, it will leave ``*emacs*`` process 
buffers
+hanging around):
+
+    (async-start
+     (lambda ()
+       (delete-file "a remote file on a slow link" nil))
+     'ignore)
+
+Note: Even when FINISH-FUNC is present, a future is still returned except that
+it yields no value (since the value is passed to FINISH-FUNC).  Calling
+`async-get` on such a future always returns `nil`.  It can still be useful,
+however, as an argument to `async-ready` or `async-wait`.
+
+## async-start-process
+
+    async-start-process NAME PROGRAM FINISH-FUNC &rest PROGRAM-ARGS
+
+Start the executable PROGRAM asynchronously.  See `async-start`.  PROGRAM is
+passed PROGRAM-ARGS, calling FINISH-FUNC with the process object when done.
+If FINISH-FUNC is `nil`, the future object will return the process object when
+the program is finished.  Set DEFAULT-DIRECTORY to change PROGRAM's current
+working directory.
+
+## async-get
+
+    async-get FUTURE
+
+Get the value from an asynchronously called function when it is ready.  FUTURE 
is
+returned by `async-start` or `async-start-process` when its FINISH-FUNC is
+`nil`.
+
+## async-ready
+
+    async-ready FUTURE
+
+Query a FUTURE to see if its function's value is ready -- i.e., if no blocking
+would result from a call to `async-get` on that FUTURE.
+
+## async-wait
+
+    async-wait FUTURE
+
+Wait for FUTURE to become ready.
+
+## async-inject-variables
+
+    async-inject-variables INCLUDE-REGEXP &optional PREDICATE EXCLUDE-REGEXP
+
+Return a `setq` form that replicates part of the calling environment.  It sets
+the value for every variable matching INCLUDE-REGEXP and also PREDICATE.  It
+will not perform injection for any variable matching EXCLUDE-REGEXP (if
+present).  It is intended to be used as follows:
+
+    (async-start
+       `(lambda ()
+          (require 'smtpmail)
+          (with-temp-buffer
+            (insert ,(buffer-substring-no-properties (point-min) (point-max)))
+            ;; Pass in the variable environment for smtpmail
+            ,(async-inject-variables "\\`\\(smtpmail\\|\\(user-\\)?mail\\)-")
+            (smtpmail-send-it)))
+       'ignore)
diff --git a/packages/async/async-bytecomp.el b/packages/async/async-bytecomp.el
new file mode 100644
index 0000000..54313c0
--- /dev/null
+++ b/packages/async/async-bytecomp.el
@@ -0,0 +1,177 @@
+;;; async-bytecomp.el --- Async functions to compile elisp files async
+
+;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
+
+;; Authors: John Wiegley <address@hidden>
+;;          Thierry Volpiatto <address@hidden>
+
+;; Keywords: dired async byte-compile
+;; X-URL: https://github.com/jwiegley/dired-async
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+;;
+;;  This package provide the `async-byte-recompile-directory' function
+;;  which allows, as the name says to recompile a directory outside of
+;;  your running emacs.
+;;  The benefit is your files will be compiled in a clean environment without
+;;  the old *.el files loaded.
+;;  Among other things, this fix a bug in package.el which recompile
+;;  the new files in the current environment with the old files loaded, 
creating
+;;  errors in most packages after upgrades.
+;;
+;;  NB: This package is advicing the function `package--compile'.
+
+;;; Code:
+
+(require 'cl-lib)
+(require 'async)
+
+(defcustom async-bytecomp-allowed-packages
+  '(async helm helm-core helm-ls-git helm-ls-hg magit)
+  "Packages in this list will be compiled asynchronously by `package--compile'.
+All the dependencies of these packages will be compiled async too,
+so no need to add dependencies to this list.
+The value of this variable can also be a list with a single element,
+the symbol `all', in this case packages are always compiled asynchronously."
+  :group 'async
+  :type '(repeat (choice symbol)))
+
+(defvar async-byte-compile-log-file "~/.emacs.d/async-bytecomp.log")
+
+;;;###autoload
+(defun async-byte-recompile-directory (directory &optional quiet)
+  "Compile all *.el files in DIRECTORY asynchronously.
+All *.elc files are systematically deleted before proceeding."
+  (cl-loop with dir = (directory-files directory t "\\.elc\\'")
+           unless dir return nil
+           for f in dir
+           when (file-exists-p f) do (delete-file f))
+  ;; Ensure async is reloaded when async.elc is deleted.
+  ;; This happen when recompiling its own directory.
+  (load "async")
+  (let ((call-back
+         `(lambda (&optional ignore)
+            (if (file-exists-p async-byte-compile-log-file)
+                (let ((buf (get-buffer-create byte-compile-log-buffer))
+                      (n 0))
+                  (with-current-buffer buf
+                    (goto-char (point-max))
+                    (let ((inhibit-read-only t))
+                      (insert-file-contents async-byte-compile-log-file)
+                      (compilation-mode))
+                    (display-buffer buf)
+                    (delete-file async-byte-compile-log-file)
+                    (unless ,quiet
+                      (save-excursion
+                        (goto-char (point-min))
+                        (while (re-search-forward "^.*:Error:" nil t)
+                          (cl-incf n)))
+                      (if (> n 0)
+                          (message "Failed to compile %d files in directory 
`%s'" n ,directory)
+                          (message "Directory `%s' compiled asynchronously 
with warnings" ,directory)))))
+                (unless ,quiet
+                  (message "Directory `%s' compiled asynchronously with 
success" ,directory))))))
+    (async-start
+     `(lambda ()
+        (require 'bytecomp)
+        ,(async-inject-variables "\\`\\(load-path\\)\\|byte\\'")
+        (let ((default-directory (file-name-as-directory ,directory))
+              error-data)
+          (add-to-list 'load-path default-directory)
+          (byte-recompile-directory ,directory 0 t)
+          (when (get-buffer byte-compile-log-buffer)
+            (setq error-data (with-current-buffer byte-compile-log-buffer
+                               (buffer-substring-no-properties (point-min) 
(point-max))))
+            (unless (string= error-data "")
+              (with-temp-file ,async-byte-compile-log-file
+                (erase-buffer)
+                (insert error-data))))))
+     call-back)
+    (unless quiet (message "Started compiling asynchronously directory %s" 
directory))))
+
+(defvar package-archive-contents)
+(defvar package-alist)
+(declare-function package-desc-reqs "package.el" (cl-x))
+
+(defun async-bytecomp--get-package-deps (pkg &optional only)
+  ;; Same as `package--get-deps' but parse instead `package-archive-contents'
+  ;; because PKG is not already installed and not present in `package-alist'.
+  ;; However fallback to `package-alist' in case PKG no more present
+  ;; in `package-archive-contents' due to modification to `package-archives'.
+  ;; See issue #58.
+  (let* ((pkg-desc (cadr (or (assq pkg package-archive-contents)
+                             (assq pkg package-alist))))
+         (direct-deps (cl-loop for p in (package-desc-reqs pkg-desc)
+                               for name = (car p)
+                               when (or (assq name package-archive-contents)
+                                        (assq name package-alist))
+                               collect name))
+         (indirect-deps (unless (eq only 'direct)
+                          (delete-dups
+                           (cl-loop for p in direct-deps append
+                                    (async-bytecomp--get-package-deps p))))))
+    (cl-case only
+      (direct   direct-deps)
+      (separate (list direct-deps indirect-deps))
+      (indirect indirect-deps)
+      (t        (delete-dups (append direct-deps indirect-deps))))))
+
+(defun async-bytecomp-get-allowed-pkgs ()
+  (when (and async-bytecomp-allowed-packages
+             (listp async-bytecomp-allowed-packages))
+    (if package-archive-contents
+        (cl-loop for p in async-bytecomp-allowed-packages
+                 when (assq p package-archive-contents)
+                 append (async-bytecomp--get-package-deps p) into reqs
+                 finally return
+                 (delete-dups
+                  (append async-bytecomp-allowed-packages reqs)))
+        async-bytecomp-allowed-packages)))
+
+(defadvice package--compile (around byte-compile-async)
+  (let ((cur-package (package-desc-name pkg-desc))
+        (pkg-dir (package-desc-dir pkg-desc)))
+    (if (or (equal async-bytecomp-allowed-packages '(all))
+            (memq cur-package (async-bytecomp-get-allowed-pkgs)))
+        (progn
+          (when (eq cur-package 'async)
+            (fmakunbound 'async-byte-recompile-directory))
+          ;; Add to `load-path' the latest version of async and
+          ;; reload it when reinstalling async.
+          (when (string= cur-package "async")
+            (cl-pushnew pkg-dir load-path)
+            (load "async-bytecomp"))
+          ;; `async-byte-recompile-directory' will add directory
+          ;; as needed to `load-path'.
+          (async-byte-recompile-directory (package-desc-dir pkg-desc) t))
+        ad-do-it)))
+
+;;;###autoload
+(define-minor-mode async-bytecomp-package-mode
+    "Byte compile asynchronously packages installed with package.el.
+Async compilation of packages can be controlled by
+`async-bytecomp-allowed-packages'."
+  :group 'async
+  :global t
+  (if async-bytecomp-package-mode
+      (ad-activate 'package--compile)
+      (ad-deactivate 'package--compile)))
+
+(provide 'async-bytecomp)
+
+;;; async-bytecomp.el ends here
diff --git a/packages/async/async-test.el b/packages/async/async-test.el
new file mode 100644
index 0000000..76d6a3a
--- /dev/null
+++ b/packages/async/async-test.el
@@ -0,0 +1,140 @@
+;;; async-test.el --- async.el-related tests
+
+;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
+
+;; Author: John Wiegley <address@hidden>
+;; Created: 10 Jul 2012
+;; Version: 1.0
+;; Keywords: async
+;; X-URL: https://github.com/jwiegley/emacs-async
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; Contains tests for all the async modules.
+
+;;; Code:
+
+(require 'async)
+
+
+(eval-when-compile
+  (require 'cl))
+
+(defun async-test-1 ()
+  (interactive)
+  (message "Starting async-test-1...")
+  (async-start
+   ;; What to do in the child process
+   (lambda ()
+     (message "This is a test")
+     (sleep-for 3)
+     222)
+
+   ;; What to do when it finishes
+   (lambda (result)
+     (message "Async process done, result should be 222: %s" result)))
+  (message "Starting async-test-1...done"))
+
+(defun async-test-2 ()
+  (interactive)
+  (message "Starting async-test-2...")
+  (let ((proc (async-start
+               ;; What to do in the child process
+               (lambda ()
+                 (message "This is a test")
+                 (sleep-for 3)
+                 222))))
+    (message "I'm going to do some work here")
+    ;; ....
+    (message "Async process done, result should be 222: %s"
+             (async-get proc))))
+
+(defun async-test-3 ()
+  (interactive)
+  (message "Starting async-test-3...")
+  (async-start
+   ;; What to do in the child process
+   (lambda ()
+     (message "This is a test")
+     (sleep-for 3)
+     (error "Error in child process")
+     222)
+
+   ;; What to do when it finishes
+   (lambda (result)
+     (message "Async process done, result should be 222: %s" result)))
+  (message "Starting async-test-1...done"))
+
+(defun async-test-4 ()
+  (interactive)
+  (message "Starting async-test-4...")
+  (async-start-process "sleep" "sleep"
+                       ;; What to do when it finishes
+                       (lambda (proc)
+                         (message "Sleep done, exit code was %d"
+                                  (process-exit-status proc)))
+                       "3")
+  (message "Starting async-test-4...done"))
+
+(defun async-test-5 ()
+  (interactive)
+  (message "Starting async-test-5...")
+  (let ((proc
+         (async-start
+          ;; What to do in the child process
+          (lambda ()
+            (message "This is a test, sending message")
+            (async-send :hello "world")
+            ;; wait for a message
+            (let ((msg (async-receive)))
+              (message "Child got message: %s"
+                       (plist-get msg :goodbye)))
+            (sleep-for 3)
+            222)
+
+          ;; What to do when it finishes
+          (lambda (result)
+            (if (async-message-p result)
+                (message "Got hello from child process: %s"
+                         (plist-get result :hello))
+              (message "Async process done, result should be 222: %s"
+                       result))))))
+    (async-send proc :goodbye "everyone"))
+  (message "Starting async-test-5...done"))
+
+(defun async-test-6 ()
+  (interactive)
+  (message "Starting async-test-6...")
+  (async-start
+   ;; What to do in the child process
+   `(lambda ()
+      ,(async-inject-variables "\\`user-mail-address\\'")
+      (format "user-mail-address = %s" user-mail-address))
+
+   ;; What to do when it finishes
+   (lambda (result)
+     (message "Async process done: %s" result))))
+
+
+(provide 'async-test)
+
+;;; async-test.el ends here
+
+;; Local Variables:
+;; no-byte-compile: t
+;; End:
diff --git a/packages/async/async.el b/packages/async/async.el
new file mode 100644
index 0000000..24db2a1
--- /dev/null
+++ b/packages/async/async.el
@@ -0,0 +1,303 @@
+;;; async.el --- Asynchronous processing in Emacs
+
+;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
+
+;; Author: John Wiegley <address@hidden>
+;; Created: 18 Jun 2012
+;; Version: 1.6
+
+;; Keywords: async
+;; X-URL: https://github.com/jwiegley/emacs-async
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; Adds the ability to call asynchronous functions and process with ease.  See
+;; the documentation for `async-start' and `async-start-process'.
+
+;;; Code:
+
+(defgroup async nil
+  "Simple asynchronous processing in Emacs"
+  :group 'emacs)
+
+(defvar async-debug nil)
+(defvar async-send-over-pipe t)
+(defvar async-in-child-emacs nil)
+(defvar async-callback nil)
+(defvar async-callback-for-process nil)
+(defvar async-callback-value nil)
+(defvar async-callback-value-set nil)
+(defvar async-current-process nil)
+(defvar async--procvar nil)
+
+(defun async-inject-variables
+  (include-regexp &optional predicate exclude-regexp)
+  "Return a `setq' form that replicates part of the calling environment.
+It sets the value for every variable matching INCLUDE-REGEXP and
+also PREDICATE.  It will not perform injection for any variable
+matching EXCLUDE-REGEXP (if present).  It is intended to be used
+as follows:
+
+    (async-start
+       `(lambda ()
+          (require 'smtpmail)
+          (with-temp-buffer
+            (insert ,(buffer-substring-no-properties (point-min) (point-max)))
+            ;; Pass in the variable environment for smtpmail
+            ,(async-inject-variables \"\\`\\(smtpmail\\|\\(user-\\)?mail\\)-\")
+            (smtpmail-send-it)))
+       'ignore)"
+  `(setq
+    ,@(let (bindings)
+        (mapatoms
+         (lambda (sym)
+           (if (and (boundp sym)
+                    (or (null include-regexp)
+                        (string-match include-regexp (symbol-name sym)))
+                    (not (string-match
+                          (or exclude-regexp "-syntax-table\\'")
+                          (symbol-name sym))))
+               (let ((value (symbol-value sym)))
+                 (when (or (null predicate)
+                           (funcall predicate sym))
+                   (setq bindings (cons `(quote ,value) bindings)
+                         bindings (cons sym bindings)))))))
+        bindings)))
+
+(defalias 'async-inject-environment 'async-inject-variables)
+
+(defun async-handle-result (func result buf)
+  (if (null func)
+      (progn
+        (set (make-local-variable 'async-callback-value) result)
+        (set (make-local-variable 'async-callback-value-set) t))
+    (unwind-protect
+        (if (and (listp result)
+                 (eq 'async-signal (nth 0 result)))
+            (signal (car (nth 1 result))
+                    (cdr (nth 1 result)))
+          (funcall func result))
+      (unless async-debug
+        (kill-buffer buf)))))
+
+(defun async-when-done (proc &optional change)
+  "Process sentinal used to retrieve the value from the child process."
+  (when (eq 'exit (process-status proc))
+    (with-current-buffer (process-buffer proc)
+      (let ((async-current-process proc))
+        (if (= 0 (process-exit-status proc))
+            (if async-callback-for-process
+                (if async-callback
+                    (prog1
+                        (funcall async-callback proc)
+                      (unless async-debug
+                        (kill-buffer (current-buffer))))
+                  (set (make-local-variable 'async-callback-value) proc)
+                  (set (make-local-variable 'async-callback-value-set) t))
+              (goto-char (point-max))
+              (backward-sexp)
+              (async-handle-result async-callback (read (current-buffer))
+                                   (current-buffer)))
+          (set (make-local-variable 'async-callback-value)
+               (list 'error
+                     (format "Async process '%s' failed with exit code %d"
+                             (process-name proc) (process-exit-status proc))))
+          (set (make-local-variable 'async-callback-value-set) t))))))
+
+(defun async--receive-sexp (&optional stream)
+  (let ((sexp (decode-coding-string (base64-decode-string
+                                     (read stream)) 'utf-8-unix))
+       ;; Parent expects UTF-8 encoded text.
+       (coding-system-for-write 'utf-8-unix))
+    (if async-debug
+        (message "Received sexp {{{%s}}}" (pp-to-string sexp)))
+    (setq sexp (read sexp))
+    (if async-debug
+        (message "Read sexp {{{%s}}}" (pp-to-string sexp)))
+    (eval sexp)))
+
+(defun async--insert-sexp (sexp)
+  (let (print-level
+       print-length
+       (print-escape-nonascii t)
+       (print-circle t))
+    (prin1 sexp (current-buffer))
+    ;; Just in case the string we're sending might contain EOF
+    (encode-coding-region (point-min) (point-max) 'utf-8-unix)
+    (base64-encode-region (point-min) (point-max) t)
+    (goto-char (point-min)) (insert ?\")
+    (goto-char (point-max)) (insert ?\" ?\n)))
+
+(defun async--transmit-sexp (process sexp)
+  (with-temp-buffer
+    (if async-debug
+        (message "Transmitting sexp {{{%s}}}" (pp-to-string sexp)))
+    (async--insert-sexp sexp)
+    (process-send-region process (point-min) (point-max))))
+
+(defun async-batch-invoke ()
+  "Called from the child Emacs process' command-line."
+  ;; Make sure 'message' and 'prin1' encode stuff in UTF-8, as parent
+  ;; process expects.
+  (let ((coding-system-for-write 'utf-8-unix))
+    (setq async-in-child-emacs t
+         debug-on-error async-debug)
+    (if debug-on-error
+       (prin1 (funcall
+               (async--receive-sexp (unless async-send-over-pipe
+                                      command-line-args-left))))
+      (condition-case err
+         (prin1 (funcall
+                 (async--receive-sexp (unless async-send-over-pipe
+                                        command-line-args-left))))
+       (error
+        (prin1 (list 'async-signal err)))))))
+
+(defun async-ready (future)
+  "Query a FUTURE to see if the ready is ready -- i.e., if no blocking
+would result from a call to `async-get' on that FUTURE."
+  (and (memq (process-status future) '(exit signal))
+       (with-current-buffer (process-buffer future)
+         async-callback-value-set)))
+
+(defun async-wait (future)
+  "Wait for FUTURE to become ready."
+  (while (not (async-ready future))
+    (sit-for 0.05)))
+
+(defun async-get (future)
+  "Get the value from an asynchronously function when it is ready.
+FUTURE is returned by `async-start' or `async-start-process' when
+its FINISH-FUNC is nil."
+  (async-wait future)
+  (with-current-buffer (process-buffer future)
+    (async-handle-result #'identity async-callback-value (current-buffer))))
+
+(defun async-message-p (value)
+  "Return true of VALUE is an async.el message packet."
+  (and (listp value)
+       (plist-get value :async-message)))
+
+(defun async-send (&rest args)
+  "Send the given messages to the asychronous Emacs PROCESS."
+  (let ((args (append args '(:async-message t))))
+    (if async-in-child-emacs
+        (if async-callback
+            (funcall async-callback args))
+      (async--transmit-sexp (car args) (list 'quote (cdr args))))))
+
+(defun async-receive (&rest args)
+  "Send the given messages to the asychronous Emacs PROCESS."
+  (async--receive-sexp))
+
+;;;###autoload
+(defun async-start-process (name program finish-func &rest program-args)
+  "Start the executable PROGRAM asynchronously.  See `async-start'.
+PROGRAM is passed PROGRAM-ARGS, calling FINISH-FUNC with the
+process object when done.  If FINISH-FUNC is nil, the future
+object will return the process object when the program is
+finished.  Set DEFAULT-DIRECTORY to change PROGRAM's current
+working directory."
+  (let* ((buf (generate-new-buffer (concat "*" name "*")))
+         (proc (let ((process-connection-type nil))
+                 (apply #'start-process name buf program program-args))))
+    (with-current-buffer buf
+      (set (make-local-variable 'async-callback) finish-func)
+      (set-process-sentinel proc #'async-when-done)
+      (unless (string= name "emacs")
+        (set (make-local-variable 'async-callback-for-process) t))
+      proc)))
+
+;;;###autoload
+(defun async-start (start-func &optional finish-func)
+  "Execute START-FUNC (often a lambda) in a subordinate Emacs process.
+When done, the return value is passed to FINISH-FUNC.  Example:
+
+    (async-start
+       ;; What to do in the child process
+       (lambda ()
+         (message \"This is a test\")
+         (sleep-for 3)
+         222)
+
+       ;; What to do when it finishes
+       (lambda (result)
+         (message \"Async process done, result should be 222: %s\"
+                  result)))
+
+If FINISH-FUNC is nil or missing, a future is returned that can
+be inspected using `async-get', blocking until the value is
+ready.  Example:
+
+    (let ((proc (async-start
+                   ;; What to do in the child process
+                   (lambda ()
+                     (message \"This is a test\")
+                     (sleep-for 3)
+                     222))))
+
+        (message \"I'm going to do some work here\") ;; ....
+
+        (message \"Waiting on async process, result should be 222: %s\"
+                 (async-get proc)))
+
+If you don't want to use a callback, and you don't care about any
+return value form the child process, pass the `ignore' symbol as
+the second argument (if you don't, and never call `async-get', it
+will leave *emacs* process buffers hanging around):
+
+    (async-start
+     (lambda ()
+       (delete-file \"a remote file on a slow link\" nil))
+     'ignore)
+
+Note: Even when FINISH-FUNC is present, a future is still
+returned except that it yields no value (since the value is
+passed to FINISH-FUNC).  Call `async-get' on such a future always
+returns nil.  It can still be useful, however, as an argument to
+`async-ready' or `async-wait'."
+  (let ((sexp start-func)
+       ;; Subordinate Emacs will send text encoded in UTF-8.
+       (coding-system-for-read 'utf-8-unix))
+    (setq async--procvar
+          (async-start-process
+           "emacs" (file-truename
+                    (expand-file-name invocation-name
+                                      invocation-directory))
+           finish-func
+           "-Q" "-l"
+           ;; Using `locate-library' ensure we use the right file
+           ;; when the .elc have been deleted.
+           (locate-library "async")
+           "-batch" "-f" "async-batch-invoke"
+           (if async-send-over-pipe
+               "<none>"
+               (with-temp-buffer
+                 (async--insert-sexp (list 'quote sexp))
+                 (buffer-string)))))
+    (if async-send-over-pipe
+        (async--transmit-sexp async--procvar (list 'quote sexp)))
+    async--procvar))
+
+(defmacro async-sandbox(func)
+  "Evaluate FUNC in a separate Emacs process, synchronously."
+  `(async-get (async-start ,func)))
+
+(provide 'async)
+
+;;; async.el ends here
diff --git a/packages/async/dired-async.el b/packages/async/dired-async.el
new file mode 100644
index 0000000..ecab9cb
--- /dev/null
+++ b/packages/async/dired-async.el
@@ -0,0 +1,290 @@
+;;; dired-async.el --- Copy/move/delete asynchronously in dired.
+
+;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
+
+;; Authors: John Wiegley <address@hidden>
+;;          Thierry Volpiatto <address@hidden>
+
+;; Keywords: dired async network
+;; X-URL: https://github.com/jwiegley/dired-async
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; This file provide a redefinition of `dired-create-file' function,
+;; performs copies, moves and all what is handled by `dired-create-file'
+;; in the background using a slave Emacs process,
+;; by means of the async.el module.
+;; To use it, put this in your .emacs:
+
+;;     (dired-async-mode 1)
+
+;; This will enable async copy/rename etc...
+;; in dired and helm.
+
+;;; Code:
+
+(require 'cl-lib)
+(require 'dired-aux)
+(require 'async)
+
+(eval-when-compile
+  (defvar async-callback))
+(defvar dired-async-operation nil)
+
+(defgroup dired-async nil
+  "Copy rename files asynchronously from dired."
+  :group 'dired)
+
+(defcustom dired-async-env-variables-regexp
+  "\\`\\(tramp-\\(default\\|connection\\|remote\\)\\|ange-ftp\\)-.*"
+  "Variables matching this regexp will be loaded on Child Emacs."
+  :type  'regexp
+  :group 'dired-async)
+
+(defcustom dired-async-message-function 'dired-async-mode-line-message
+  "Function to use to notify result when operation finish.
+Should take same args as `message'."
+  :group 'dired-async
+  :type  'function)
+
+(defcustom dired-async-log-file "/tmp/dired-async.log"
+  "File use to communicate errors from Child Emacs to host Emacs."
+  :group 'dired-async
+  :type 'string)
+
+(defface dired-async-message
+    '((t (:foreground "yellow")))
+  "Face used for mode-line message."
+  :group 'dired-async)
+
+(defface dired-async-mode-message
+    '((t (:foreground "Gold")))
+  "Face used for `dired-async--modeline-mode' lighter."
+  :group 'dired-async)
+
+(define-minor-mode dired-async--modeline-mode
+    "Notify mode-line that an async process run."
+  :group 'dired-async
+  :global t
+  :lighter (:eval (propertize (format " [%s Async job(s) running]"
+                                      (length (dired-async-processes)))
+                              'face 'dired-async-mode-message))
+  (unless dired-async--modeline-mode
+    (let ((visible-bell t)) (ding))))
+
+(defun dired-async-mode-line-message (text &rest args)
+  "Notify end of operation in `mode-line'."
+  (message nil)
+  (let ((mode-line-format (concat
+                           " " (propertize
+                                (if args
+                                    (apply #'format text args)
+                                    text)
+                                'face 'dired-async-message))))
+    (force-mode-line-update)
+    (sit-for 3)
+    (force-mode-line-update)))
+
+(defun dired-async-processes ()
+  (cl-loop for p in (process-list)
+           when (cl-loop for c in (process-command p) thereis
+                         (string= "async-batch-invoke" c))
+           collect p))
+
+(defun dired-async-kill-process ()
+  (interactive)
+  (let* ((processes (dired-async-processes))
+         (proc (car (last processes))))
+    (delete-process proc)
+    (unless (> (length processes) 1)
+      (dired-async--modeline-mode -1))))
+
+(defun dired-async-after-file-create (len-flist)
+  "Callback function used for operation handled by `dired-create-file'."
+  (unless (dired-async-processes)
+    ;; Turn off mode-line notification
+    ;; only when last process end.
+    (dired-async--modeline-mode -1))
+  (when dired-async-operation
+    (if (file-exists-p dired-async-log-file)
+        (progn
+          (pop-to-buffer (get-buffer-create "*dired async*"))
+          (erase-buffer)
+          (insert "Error: ")
+          (insert-file-contents dired-async-log-file)
+          (delete-file dired-async-log-file))
+        (run-with-timer
+         0.1 nil
+         dired-async-message-function "Asynchronous %s of %s file(s) on %s 
file(s) done"
+         (car dired-async-operation) (cadr dired-async-operation) len-flist))))
+
+(defun dired-async-maybe-kill-ftp ()
+  "Return a form to kill ftp process in child emacs."
+  (quote
+   (progn
+     (require 'cl-lib)
+     (let ((buf (cl-loop for b in (buffer-list)
+                         thereis (and (string-match
+                                       "\\`\\*ftp.*"
+                                       (buffer-name b)) b))))
+       (when buf (kill-buffer buf))))))
+
+(defun dired-async-create-files (file-creator operation fn-list 
name-constructor
+                                 &optional marker-char)
+  "Same as `dired-create-files' but asynchronous.
+
+See `dired-create-files' for the behavior of arguments."
+  (setq dired-async-operation nil)
+  (let (dired-create-files-failures
+        failures async-fn-list
+        skipped (success-count 0)
+        (total (length fn-list))
+        callback)
+    (let (to overwrite-query
+             overwrite-backup-query)    ; for dired-handle-overwrite
+      (dolist (from fn-list)
+        (setq to (funcall name-constructor from))
+        (if (equal to from)
+            (progn
+              (setq to nil)
+              (dired-log "Cannot %s to same file: %s\n"
+                         (downcase operation) from)))
+        (if (not to)
+            (setq skipped (cons (dired-make-relative from) skipped))
+            (let* ((overwrite (file-exists-p to))
+                   (dired-overwrite-confirmed ; for dired-handle-overwrite
+                    (and overwrite
+                         (let ((help-form '(format "\
+Type SPC or `y' to overwrite file `%s',
+DEL or `n' to skip to next,
+ESC or `q' to not overwrite any of the remaining files,
+`!' to overwrite all remaining files with no more questions." to)))
+                           (dired-query 'overwrite-query
+                                        "Overwrite `%s'?" to))))
+                   ;; must determine if FROM is marked before file-creator
+                   ;; gets a chance to delete it (in case of a move).
+                   (actual-marker-char
+                    (cond  ((integerp marker-char) marker-char)
+                           (marker-char (dired-file-marker from)) ; slow
+                           (t nil))))
+              ;; Handle the `dired-copy-file' file-creator specially
+              ;; When copying a directory to another directory or
+              ;; possibly to itself or one of its subdirectories.
+              ;; e.g "~/foo/" => "~/test/"
+              ;; or "~/foo/" =>"~/foo/"
+              ;; or "~/foo/ => ~/foo/bar/")
+              ;; In this case the 'name-constructor' have set the destination
+              ;; TO to "~/test/foo" because the old emacs23 behavior
+              ;; of `copy-directory' was to not create the subdirectory
+              ;; and instead copy the contents.
+              ;; With the new behavior of `copy-directory'
+              ;; (similar to the `cp' shell command) we don't
+              ;; need such a construction of the target directory,
+              ;; so modify the destination TO to "~/test/" instead of 
"~/test/foo/".
+              (let ((destname (file-name-directory to)))
+                (when (and (file-directory-p from)
+                           (file-directory-p to)
+                           (eq file-creator 'dired-copy-file))
+                  (setq to destname))
+                ;; If DESTNAME is a subdirectory of FROM, not a symlink,
+                ;; and the method in use is copying, signal an error.
+                (and (eq t (car (file-attributes destname)))
+                     (eq file-creator 'dired-copy-file)
+                     (file-in-directory-p destname from)
+                     (error "Cannot copy `%s' into its subdirectory `%s'"
+                            from to)))
+              (if overwrite
+                  (or (and dired-overwrite-confirmed
+                           (push (cons from to) async-fn-list))
+                      (progn
+                        (push (dired-make-relative from) failures)
+                        (dired-log "%s `%s' to `%s' failed"
+                                   operation from to)))
+                  (push (cons from to) async-fn-list)))))
+      (setq callback
+            `(lambda (&optional ignore)
+               (dired-async-after-file-create ,total)
+               (when (string= ,(downcase operation) "rename")
+                 (cl-loop for (file . to) in ',async-fn-list
+                          do (and (get-file-buffer file)
+                                  (with-current-buffer (get-file-buffer file)
+                                    (set-visited-file-name to nil t))))))))
+    ;; Handle error happening in host emacs.
+    (cond
+      (dired-create-files-failures
+       (setq failures (nconc failures dired-create-files-failures))
+       (dired-log-summary
+        (format "%s failed for %d file%s in %d requests"
+                operation (length failures)
+                (dired-plural-s (length failures))
+                total)
+        failures))
+      (failures
+       (dired-log-summary
+        (format "%s failed for %d of %d file%s"
+                operation (length failures)
+                total (dired-plural-s total))
+        failures))
+      (skipped
+       (dired-log-summary
+        (format "%s: %d of %d file%s skipped"
+                operation (length skipped) total
+                (dired-plural-s total))
+        skipped))
+      (t (message "%s: %s file%s"
+                  operation success-count (dired-plural-s success-count))))
+    ;; Start async process.
+    (when async-fn-list
+      (async-start `(lambda ()
+                      (require 'cl-lib) (require 'dired-aux) (require 'dired-x)
+                      ,(async-inject-variables 
dired-async-env-variables-regexp)
+                      (condition-case err
+                          (let ((dired-recursive-copies (quote always)))
+                            (cl-loop for (f . d) in (quote ,async-fn-list)
+                                     do (funcall (quote ,file-creator) f d t)))
+                        (file-error
+                         (with-temp-file ,dired-async-log-file
+                           (insert (format "%S" err)))))
+                      ,(dired-async-maybe-kill-ftp))
+                   callback)
+      ;; Run mode-line notifications while process running.
+      (dired-async--modeline-mode 1)
+      (setq dired-async-operation (list operation (length async-fn-list)))
+      (message "%s proceeding asynchronously..." operation))))
+
+(defadvice dired-create-files (around dired-async)
+  (dired-async-create-files file-creator operation fn-list
+                            name-constructor marker-char))
+
+;;;###autoload
+(define-minor-mode dired-async-mode
+    "Do dired actions asynchronously."
+  :group 'dired-async
+  :global t
+  (if dired-async-mode
+      (if (fboundp 'advice-add)
+          (advice-add 'dired-create-files :override #'dired-async-create-files)
+          (ad-activate 'dired-create-files))
+      (if (fboundp 'advice-remove)
+          (advice-remove 'dired-create-files #'dired-async-create-files)
+          (ad-deactivate 'dired-create-files))))
+
+
+(provide 'dired-async)
+
+;;; dired-async.el ends here
diff --git a/packages/async/smtpmail-async.el b/packages/async/smtpmail-async.el
new file mode 100644
index 0000000..5ac426d
--- /dev/null
+++ b/packages/async/smtpmail-async.el
@@ -0,0 +1,73 @@
+;;; smtpmail-async.el --- Send e-mail with smtpmail.el asynchronously
+
+;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
+
+;; Author: John Wiegley <address@hidden>
+;; Created: 18 Jun 2012
+
+;; Keywords: email async
+;; X-URL: https://github.com/jwiegley/emacs-async
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; Send e-mail with smtpmail.el asynchronously.  To use:
+;;
+;;   (require 'smtpmail-async)
+;;
+;;   (setq send-mail-function 'async-smtpmail-send-it
+;;         message-send-mail-function 'async-smtpmail-send-it)
+;;
+;; This assumes you already have smtpmail.el working.
+
+;;; Code:
+
+(defgroup smtpmail-async nil
+  "Send e-mail with smtpmail.el asynchronously"
+  :group 'smptmail)
+
+(require 'async)
+(require 'smtpmail)
+(require 'message)
+
+(defvar async-smtpmail-before-send-hook nil
+  "Hook running in the child emacs in `async-smtpmail-send-it'.
+It is called just before calling `smtpmail-send-it'.")
+
+(defun async-smtpmail-send-it ()
+  (let ((to          (message-field-value "To"))
+        (buf-content (buffer-substring-no-properties
+                      (point-min) (point-max))))
+    (message "Delivering message to %s..." to)
+    (async-start
+     `(lambda ()
+        (require 'smtpmail)
+        (with-temp-buffer
+          (insert ,buf-content)
+          (set-buffer-multibyte nil)
+          ;; Pass in the variable environment for smtpmail
+          ,(async-inject-variables
+            
"\\`\\(smtpmail\\|async-smtpmail\\|\\(user-\\)?mail\\)-\\|auth-sources\\|epg"
+            nil 
"\\`\\(mail-header-format-function\\|smtpmail-address-buffer\\|mail-mode-abbrev-table\\)")
+          (run-hooks 'async-smtpmail-before-send-hook)
+          (smtpmail-send-it)))
+     `(lambda (&optional ignore)
+        (message "Delivering message to %s...done" ,to)))))
+
+(provide 'smtpmail-async)
+
+;;; smtpmail-async.el ends here
diff --git a/packages/avy/avy.el b/packages/avy/avy.el
index a8a6a25..45f2120 100644
--- a/packages/avy/avy.el
+++ b/packages/avy/avy.el
@@ -1,10 +1,10 @@
-;;; avy.el --- set-based completion -*- lexical-binding: t -*-
+;;; avy.el --- tree-based completion -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2015  Free Software Foundation, Inc.
 
 ;; Author: Oleh Krehel <address@hidden>
 ;; URL: https://github.com/abo-abo/avy
-;; Version: 0.3.0
+;; Version: 0.4.0
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: point, location
 
@@ -28,9 +28,9 @@
 ;; This package provides a generic completion method based on building
 ;; a balanced decision tree with each candidate being a leaf.  To
 ;; traverse the tree from the root to a desired leaf, typically a
-;; sequence of `read-char' can be used.
+;; sequence of `read-key' can be used.
 ;;
-;; In order for `read-char' to make sense, the tree needs to be
+;; In order for `read-key' to make sense, the tree needs to be
 ;; visualized appropriately, with a character at each branch node.  So
 ;; this completion method works only for things that you can see on
 ;; your screen, all at once:
@@ -47,6 +47,7 @@
 
 ;;; Code:
 (require 'cl-lib)
+(require 'ring)
 
 ;;* Customization
 (defgroup avy nil
@@ -55,8 +56,15 @@
   :prefix "avy-")
 
 (defcustom avy-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)
-  "Default keys for jumping."
-  :type '(repeat :tag "Keys" character))
+  "Default keys for jumping.
+Any key is either a character representing a self-inserting
+key (letters, digits, punctuation, etc.) or a symbol denoting a
+non-printing key like an arrow key (left, right, up, down).  For
+non-printing keys, a corresponding entry in
+`avy-key-to-char-alist' must exist in order to visualize the key
+in the avy overlays."
+  :type '(repeat :tag "Keys" (choice (character :tag "char")
+                              (symbol :tag "non-printing key"))))
 
 (defcustom avy-keys-alist nil
   "Alist of avy-jump commands to `avy-keys' overriding the default `avy-keys'."
@@ -105,7 +113,25 @@ If the commands isn't on the list, `avy-style' is used."
                        (const :tag "Pre" pre)
                        (const :tag "At" at)
                        (const :tag "At Full" at-full)
-                       (const :tag "Post" post))))
+                       (const :tag "Post" post)
+                       (const :tag "De Bruijn" de-bruijn))))
+
+(defcustom avy-dispatch-alist
+  '((?x . avy-action-kill)
+    (?m . avy-action-mark)
+    (?n . avy-action-copy))
+  "List of actions for `avy-handler-default'.
+
+Each item is (KEY . ACTION).  When KEY not on `avy-keys' is
+pressed during the dispatch, ACTION is set to replace the default
+`avy-action-goto' once a candidate is finally selected."
+  :type
+  '(alist
+    :key-type (choice (character :tag "Char"))
+    :value-type (choice
+                 (const :tag "Mark" avy-action-mark)
+                 (const :tag "Copy" avy-action-copy)
+                 (const :tag "Kill" avy-action-kill))))
 
 (defcustom avy-background nil
   "When non-nil, a gray background will be added during the selection."
@@ -144,11 +170,11 @@ For example, to make SPC do the same as ?a, use
   "Face used for first non-terminating leading chars.")
 
 (defface avy-lead-face-1
-    '((t (:foreground "white" :background "gray")))
+  '((t (:foreground "white" :background "gray")))
   "Face used for matched leading chars.")
 
 (defface avy-lead-face-2
-    '((t (:foreground "white" :background "#f86bf3")))
+  '((t (:foreground "white" :background "#f86bf3")))
   "Face used for leading chars.")
 
 (defface avy-lead-face
@@ -159,6 +185,10 @@ For example, to make SPC do the same as ?a, use
   '((t (:foreground "gray40")))
   "Face for whole window background during selection.")
 
+(defface avy-goto-char-timer-face
+  '((t (:inherit highlight)))
+  "Face for matches during reading chars using `avy-goto-char-timer'.")
+
 (defconst avy-lead-faces '(avy-lead-face
                            avy-lead-face-0
                            avy-lead-face-2
@@ -167,6 +197,16 @@ For example, to make SPC do the same as ?a, use
                            avy-lead-face-2)
   "Face sequence for `avy--overlay-at-full'.")
 
+(defvar avy-key-to-char-alist '((left . ?â—€)
+                                (right . ?â–¶)
+                                (up . ?â–²)
+                                (down . ?â–¼)
+                                (prior . ?â–³)
+                                (next . ?â–½))
+  "An alist from non-character keys to printable chars used in avy overlays.
+This alist must contain all keys used in `avy-keys' which are not
+self-inserting keys and thus aren't read as characters.")
+
 ;;* Internals
 ;;** Tree
 (defmacro avy-multipop (lst n)
@@ -185,16 +225,16 @@ For example, to make SPC do the same as ?a, use
          (a (make-list (* n k) 0))
          sequence)
     (cl-labels ((db (T p)
-                  (if (> T n)
-                      (if (eq (% n p) 0)
-                          (setq sequence
-                                (append sequence
-                                        (cl-subseq a 1 (1+ p)))))
-                    (setf (nth T a) (nth (- T p) a))
-                    (db (1+ T) p)
-                    (cl-loop for j from (1+ (nth (- T p) a)) to (1- k) do
-                             (setf (nth T a) j)
-                             (db (1+ T) T)))))
+                    (if (> T n)
+                        (if (eq (% n p) 0)
+                            (setq sequence
+                                  (append sequence
+                                          (cl-subseq a 1 (1+ p)))))
+                      (setf (nth T a) (nth (- T p) a))
+                      (db (1+ T) p)
+                      (cl-loop for j from (1+ (nth (- T p) a)) to (1- k) do
+                               (setf (nth T a) j)
+                               (db (1+ T) T)))))
       (db 1 1)
       (mapcar (lambda (n)
                 (nth n keys))
@@ -295,13 +335,21 @@ KEYS is the path from the root of `avy-tree' to LEAF."
           (funcall walker key (cddr br))
         (avy-traverse (cdr br) walker key)))))
 
+(defvar avy-action nil
+  "Function to call at the end of select.")
+
 (defun avy-handler-default (char)
-  "The default hander for a bad CHAR."
-  (signal 'user-error (list "No such candidate" char))
-  (throw 'done nil))
+  "The default handler for a bad CHAR."
+  (let (dispatch)
+    (if (setq dispatch (assoc char avy-dispatch-alist))
+        (progn
+          (setq avy-action (cdr dispatch))
+          (throw 'done 'restart))
+      (signal 'user-error (list "No such candidate" char))
+      (throw 'done nil))))
 
 (defvar avy-handler-function 'avy-handler-default
-  "A function to call for a bad `read-char' in `avy-read'.")
+  "A function to call for a bad `read-key' in `avy-read'.")
 
 (defvar avy-current-path ""
   "Store the current incomplete path during `avy-read'.")
@@ -324,14 +372,14 @@ multiple DISPLAY-FN invokations."
                         (push (cons path leaf) avy--leafs)))
         (dolist (x avy--leafs)
           (funcall display-fn (car x) (cdr x))))
-      (let ((char (funcall avy-translate-char-function (read-char)))
+      (let ((char (funcall avy-translate-char-function (read-key)))
             branch)
         (funcall cleanup-fn)
         (if (setq branch (assoc char tree))
             (if (eq (car (setq tree (cdr branch))) 'leaf)
                 (throw 'done (cdr tree))
               (setq avy-current-path
-                    (concat avy-current-path (string char))))
+                    (concat avy-current-path (string (avy--key-to-char 
char)))))
           (funcall avy-handler-function char))))))
 
 (defun avy-read-de-bruijn (lst keys)
@@ -342,31 +390,32 @@ multiple DISPLAY-FN invokations."
   ;; possible that the path-len must be incremented, e.g., if we're matching
   ;; for x and a buffer contains xaxbxcx only every second subsequence is
   ;; usable for the four matches.
-  (let* ((path-len (ceiling (log (length lst) (length keys))))
-         (alist (avy--path-alist-1 lst path-len keys)))
-    (while (not alist)
-      (cl-incf path-len)
-      (setq alist (avy--path-alist-1 lst path-len keys)))
-    (let* ((len (length (caar alist)))
-           (i 0))
-      (setq avy-current-path "")
-      (while (< i len)
-        (dolist (x (reverse alist))
-          (avy--overlay-at-full (reverse (car x)) (cdr x)))
-        (let ((char (funcall avy-translate-char-function (read-char))))
-          (avy--remove-leading-chars)
-          (setq alist
-                (delq nil
-                      (mapcar (lambda (x)
-                                (when (eq (caar x) char)
-                                  (cons (cdr (car x)) (cdr x))))
-                              alist)))
-          (setq avy-current-path
-                (concat avy-current-path (string char)))
-          (cl-incf i)
-          (unless alist
-            (funcall avy-handler-function char))))
-      (cdar alist))))
+  (catch 'done
+    (let* ((path-len (ceiling (log (length lst) (length keys))))
+           (alist (avy--path-alist-1 lst path-len keys)))
+      (while (not alist)
+        (cl-incf path-len)
+        (setq alist (avy--path-alist-1 lst path-len keys)))
+      (let* ((len (length (caar alist)))
+             (i 0))
+        (setq avy-current-path "")
+        (while (< i len)
+          (dolist (x (reverse alist))
+            (avy--overlay-at-full (reverse (car x)) (cdr x)))
+          (let ((char (funcall avy-translate-char-function (read-key))))
+            (avy--remove-leading-chars)
+            (setq alist
+                  (delq nil
+                        (mapcar (lambda (x)
+                                  (when (eq (caar x) char)
+                                    (cons (cdr (car x)) (cdr x))))
+                                alist)))
+            (setq avy-current-path
+                  (concat avy-current-path (string (avy--key-to-char char))))
+            (cl-incf i)
+            (unless alist
+              (funcall avy-handler-function char))))
+        (cdar alist)))))
 
 ;;** Rest
 (defun avy-window-list ()
@@ -383,69 +432,108 @@ multiple DISPLAY-FN invokations."
         (t
          (error "Unrecognized option: %S" avy-all-windows))))
 
+(defcustom avy-all-windows-alt t
+  "The alternative `avy-all-windows' for use with \\[universal-argument]."
+  :type '(choice
+          (const :tag "All windows on the current frame" t)
+          (const :tag "All windows on all frames" all-frames)))
+
 (defmacro avy-dowindows (flip &rest body)
   "Depending on FLIP and `avy-all-windows' run BODY in each or selected 
window."
   (declare (indent 1)
            (debug (form body)))
   `(let ((avy-all-windows (if ,flip
-                              (not avy-all-windows)
+                              avy-all-windows-alt
                             avy-all-windows)))
      (dolist (wnd (avy-window-list))
        (with-selected-window wnd
          (unless (memq major-mode avy-ignored-modes)
            ,@body)))))
 
-(defmacro avy--with-avy-keys (command &rest body)
-  "Set `avy-keys' according to COMMAND and execute BODY."
+(defmacro avy-with (command &rest body)
+  "Set `avy-keys' according to COMMAND and execute BODY.
+Set `avy-style' according to COMMMAND as well."
   (declare (indent 1)
            (debug (form body)))
   `(let ((avy-keys (or (cdr (assq ',command avy-keys-alist))
                        avy-keys))
          (avy-style (or (cdr (assq ',command avy-styles-alist))
                         avy-style)))
+     (setq avy-action nil)
      ,@body))
 
-(defun avy--goto (x)
-  "Goto X.
-X is (POS . WND)
-POS is either a position or (BEG . END)."
-  (cond ((null x)
-         (message "zero candidates"))
-
-        ;; ignore exit from `avy-handler-function'
-        ((eq x 'exit))
-
-        (t
-         (let* ((window (cdr x))
-                (frame (window-frame window)))
-           (unless (equal frame (selected-frame))
-             (select-frame-set-input-focus frame))
-           (select-window window))
-         (let ((pt (car x)))
-           (when (consp pt)
-             (setq pt (car pt)))
-           (unless (= pt (point)) (push-mark))
-           (goto-char pt)))))
+(defun avy-action-goto (pt)
+  "Goto PT."
+  (goto-char pt))
+
+(defun avy-action-mark (pt)
+  "Mark sexp at PT."
+  (goto-char pt)
+  (set-mark (point))
+  (forward-sexp))
+
+(defun avy-action-copy (pt)
+  "Copy sexp starting on PT."
+  (save-excursion
+    (let (str)
+      (goto-char pt)
+      (forward-sexp)
+      (setq str (buffer-substring pt (point)))
+      (kill-new str)
+      (message "Copied: %s" str))))
+
+(defun avy-action-kill (pt)
+  "Kill sexp at PT."
+  (goto-char pt)
+  (forward-sexp)
+  (kill-region pt (point))
+  (message "Killed: %s" (current-kill 0)))
 
 (defun avy--process (candidates overlay-fn)
   "Select one of CANDIDATES using `avy-read'.
 Use OVERLAY-FN to visualize the decision overlay."
-  (unwind-protect
-       (cl-case (length candidates)
-         (0
-          nil)
-         (1
-          (car candidates))
-         (t
-          (avy--make-backgrounds
-           (avy-window-list))
-          (if (eq avy-style 'de-bruijn)
-              (avy-read-de-bruijn
-               candidates avy-keys)
-            (avy-read (avy-tree candidates avy-keys)
-                      overlay-fn
-                      #'avy--remove-leading-chars))))
-    (avy--done)))
+  (unless (and (consp (car candidates))
+               (windowp (cdar candidates)))
+    (setq candidates
+          (mapcar (lambda (x) (cons x (selected-window)))
+                  candidates)))
+  (let ((len (length candidates))
+        (cands (copy-sequence candidates))
+        res)
+    (if (= len 0)
+        (message "zero candidates")
+      (if (= len 1)
+          (setq res (car candidates))
+        (unwind-protect
+             (progn
+               (avy--make-backgrounds
+                (avy-window-list))
+               (setq res (if (eq avy-style 'de-bruijn)
+                             (avy-read-de-bruijn
+                              candidates avy-keys)
+                           (avy-read (avy-tree candidates avy-keys)
+                                     overlay-fn
+                                     #'avy--remove-leading-chars))))
+          (avy--done)))
+      (cond ((eq res 'restart)
+             (avy--process cands overlay-fn))
+            ;; ignore exit from `avy-handler-function'
+            ((eq res 'exit))
+            (t
+             (avy-push-mark)
+             (when (and (consp res)
+                        (windowp (cdr res)))
+               (let* ((window (cdr res))
+                      (frame (window-frame window)))
+                 (unless (equal frame (selected-frame))
+                   (select-frame-set-input-focus frame))
+                 (select-window window))
+               (setq res (car res)))
+
+             (funcall (or avy-action 'avy-action-goto)
+                      (if (consp res)
+                          (car res)
+                        res)))))))
 
 (defvar avy--overlays-back nil
   "Hold overlays for when `avy-background' is t.")
@@ -470,20 +558,53 @@ Use OVERLAY-FN to visualize the decision overlay."
   (setq avy--overlays-back nil)
   (avy--remove-leading-chars))
 
+(defun avy--next-visible-point ()
+  "Return the next closest point without 'invisible property."
+  (let ((s (point)))
+    (while (and (not (= (point-max) (setq s (next-overlay-change s))))
+                (get-char-property s 'invisible)))
+    s))
+
+(defun avy--next-invisible-point ()
+  "Return the next closest point with 'invisible property."
+  (let ((s (point)))
+    (while (and (not (= (point-max) (setq s (next-overlay-change s))))
+                (not (get-char-property s 'invisible))))
+    s))
+
+(defun avy--find-visible-regions (rbeg rend)
+  "Return a list of all visible regions between RBEG and REND."
+  (setq rbeg (max rbeg (point-min)))
+  (setq rend (min rend (point-max)))
+  (when (< rbeg rend)
+    (let (visibles beg)
+      (save-excursion
+        (save-restriction
+          (narrow-to-region rbeg rend)
+          (setq beg (goto-char (point-min)))
+          (while (not (= (point) (point-max)))
+            (goto-char (avy--next-invisible-point))
+            (push (cons beg (point)) visibles)
+            (setq beg (goto-char (avy--next-visible-point))))
+          (nreverse visibles))))))
+
 (defun avy--regex-candidates (regex &optional beg end pred group)
   "Return all elements that match REGEX.
 Each element of the list is ((BEG . END) . WND)
 When PRED is non-nil, it's a filter for matching point positions.
 When GROUP is non-nil, (BEG . END) should delimit that regex group."
   (setq group (or group 0))
-  (let ((case-fold-search avy-case-fold-search)
+  (let ((case-fold-search (or avy-case-fold-search
+                              (string= regex (downcase regex))))
         candidates)
-    (avy-dowindows nil
-      (let ((we (or end (window-end (selected-window) t))))
+    (avy-dowindows current-prefix-arg
+      (dolist (pair (avy--find-visible-regions
+                     (or beg (window-start))
+                     (or end (window-end (selected-window) t))))
         (save-excursion
-          (goto-char (or beg (window-start)))
-          (while (re-search-forward regex we t)
-            (unless (get-char-property (point) 'invisible)
+          (goto-char (car pair))
+          (while (re-search-forward regex (cdr pair) t)
+            (unless (get-char-property (1- (point)) 'invisible)
               (when (or (null pred)
                         (funcall pred))
                 (push (cons (cons (match-beginning group)
@@ -502,31 +623,88 @@ When GROUP is non-nil, (BEG . END) should delimit that 
regex group."
   (mapc #'delete-overlay avy--overlays-lead)
   (setq avy--overlays-lead nil))
 
-(defun avy--overlay (str pt wnd)
-  "Create an overlay with STR at PT in WND."
-  (when (<= (1+ pt) (with-selected-window wnd (point-max)))
-    (let* ((pt (+ pt avy--overlay-offset))
-           (ol (make-overlay pt (1+ pt) (window-buffer wnd)))
-           (old-str (with-selected-window wnd
-                      (buffer-substring pt (1+ pt)))))
-      (when avy-background
-        (setq old-str (propertize
-                       old-str 'face 'avy-background-face)))
-      (overlay-put ol 'window wnd)
-      (overlay-put ol 'display (concat str old-str))
-      (push ol avy--overlays-lead))))
+(defun avy--old-str (pt wnd)
+  "Return a one-char string at PT in WND."
+  (let ((old-str (with-selected-window wnd
+                   (buffer-substring pt (1+ pt)))))
+    (if avy-background
+        (propertize old-str 'face 'avy-background-face)
+      old-str)))
+
+(defun avy--overlay (str beg end wnd &optional compose-fn)
+  "Create an overlay with STR from BEG to END in WND.
+COMPOSE-FN is a lambda that concatenates the old string at BEG with STR."
+  (let ((eob (with-selected-window wnd (point-max))))
+    (when (<= beg eob)
+      (let* ((beg (+ beg avy--overlay-offset))
+             (ol (make-overlay beg (or end (1+ beg)) (window-buffer wnd)))
+             (old-str (if (eq beg eob) "" (avy--old-str beg wnd)))
+             (os-line-prefix (get-text-property 0 'line-prefix old-str))
+             (os-wrap-prefix (get-text-property 0 'wrap-prefix old-str))
+             other-ol)
+        (when os-line-prefix
+          (add-text-properties 0 1 `(line-prefix ,os-line-prefix) str))
+        (when os-wrap-prefix
+          (add-text-properties 0 1 `(wrap-prefix ,os-wrap-prefix) str))
+        (when (setq other-ol (cl-find-if
+                              (lambda (o) (overlay-get o 'goto-address))
+                              (overlays-at beg)))
+          (add-text-properties
+           0 (length old-str)
+           `(face ,(overlay-get other-ol 'face)) old-str))
+        (overlay-put ol 'window wnd)
+        (overlay-put ol 'category 'avy)
+        (overlay-put ol (if (eq beg eob)
+                            'after-string
+                          'display)
+                     (funcall
+                      (or compose-fn #'concat)
+                      str old-str))
+        (push ol avy--overlays-lead)))))
 
 (defcustom avy-highlight-first nil
   "When non-nil highlight the first decision char with `avy-lead-face-0'.
 Do this even when the char is terminating."
   :type 'boolean)
 
+(defun avy--key-to-char (c)
+  "If C is no character, translate it using `avy-key-to-char-alist'."
+  (if (characterp c)
+      c
+    (or (cdr (assoc c avy-key-to-char-alist))
+        (error "Unknown key %s" c))))
+
+(defun avy-candidate-beg (leaf)
+  "Return the start position for LEAF."
+  (cond ((numberp leaf)
+         leaf)
+        ((consp (car leaf))
+         (caar leaf))
+        (t
+         (car leaf))))
+
+(defun avy-candidate-end (leaf)
+  "Return the end position for LEAF."
+  (cond ((numberp leaf)
+         leaf)
+        ((consp (car leaf))
+         (cdar leaf))
+        (t
+         (car leaf))))
+
+(defun avy-candidate-wnd (leaf)
+  "Return the window for LEAF."
+  (if (consp leaf)
+      (cdr leaf)
+    (selected-window)))
+
 (defun avy--overlay-pre (path leaf)
   "Create an overlay with PATH at LEAF.
 PATH is a list of keys from tree root to LEAF.
 LEAF is normally ((BEG . END) . WND)."
-  (let ((str (propertize (apply #'string (reverse path))
-                         'face 'avy-lead-face)))
+  (let* ((path (mapcar #'avy--key-to-char path))
+         (str (propertize (apply #'string (reverse path))
+                          'face 'avy-lead-face)))
     (when (or avy-highlight-first (> (length str) 1))
       (set-text-properties 0 1 '(face avy-lead-face-0) str))
     (setq str (concat
@@ -535,54 +713,42 @@ LEAF is normally ((BEG . END) . WND)."
                str))
     (avy--overlay
      str
-     (cond ((numberp leaf)
-            leaf)
-           ((consp (car leaf))
-            (caar leaf))
-           (t
-            (car leaf)))
-     (if (consp leaf)
-         (cdr leaf)
-       (selected-window)))))
+     (avy-candidate-beg leaf) nil
+     (avy-candidate-wnd leaf))))
 
 (defun avy--overlay-at (path leaf)
   "Create an overlay with PATH at LEAF.
 PATH is a list of keys from tree root to LEAF.
 LEAF is normally ((BEG . END) . WND)."
-  (let ((str (propertize
-              (string (car (last path)))
-              'face 'avy-lead-face))
-        (pt (+ (if (consp (car leaf))
-                   (caar leaf)
-                 (car leaf))
-               avy--overlay-offset))
-        (wnd (cdr leaf)))
-    (let ((ol (make-overlay pt (1+ pt)
-                            (window-buffer wnd)))
-          (old-str (with-selected-window wnd
-                     (buffer-substring pt (1+ pt)))))
-      (when avy-background
-        (setq old-str (propertize
-                       old-str 'face 'avy-background-face)))
-      (overlay-put ol 'window wnd)
-      (overlay-put ol 'display (if (string= old-str "\n")
-                                   (concat str "\n")
-                                 str))
-      (push ol avy--overlays-lead))))
+  (let* ((path (mapcar #'avy--key-to-char path))
+         (str (propertize
+               (string (car (last path)))
+               'face 'avy-lead-face)))
+    (avy--overlay
+     str
+     (avy-candidate-beg leaf) nil
+     (avy-candidate-wnd leaf)
+     (lambda (str old-str)
+       (cond ((string= old-str "\n")
+              (concat str "\n"))
+             ;; add padding for wide-width character
+             ((eq (string-width old-str) 2)
+              (concat str " "))
+             (t
+              str))))))
 
 (defun avy--overlay-at-full (path leaf)
   "Create an overlay with PATH at LEAF.
 PATH is a list of keys from tree root to LEAF.
 LEAF is normally ((BEG . END) . WND)."
-  (let* ((str (propertize
+  (let* ((path (mapcar #'avy--key-to-char path))
+         (str (propertize
                (apply #'string (reverse path))
                'face 'avy-lead-face))
          (len (length path))
-         (beg (if (consp (car leaf))
-                  (caar leaf)
-                (car leaf)))
+         (beg (avy-candidate-beg leaf))
          (wnd (cdr leaf))
-         oov)
+         end)
     (dotimes (i len)
       (set-text-properties (- len i 1) (- len i)
                            `(face ,(nth i avy-lead-faces))
@@ -596,63 +762,55 @@ LEAF is normally ((BEG . END) . WND)."
     (with-selected-window wnd
       (save-excursion
         (goto-char beg)
-        (when (setq oov
-                    (delq nil
-                          (mapcar
-                           (lambda (o)
-                             (and (eq (overlay-get o 'category) 'avy)
-                                  (eq (overlay-get o 'window) wnd)
-                                  (overlay-start o)))
-                           (overlays-in (point) (min (+ (point) len)
-                                                     (line-end-position))))))
-          (setq len (- (apply #'min oov) beg))
-          (setq str (substring str 0 len)))
-        (let ((other-ov (cl-find-if
-                         (lambda (o)
-                           (and (eq (overlay-get o 'category) 'avy)
-                                (eq (overlay-start o) beg)
-                                (not (eq (overlay-get o 'window) wnd))))
-                         (overlays-in (point) (min (+ (point) len)
-                                                   (line-end-position))))))
-          (when (and other-ov
-                     (> (overlay-end other-ov)
-                        (+ beg len)))
-            (setq str (concat str (buffer-substring
-                                   (+ beg len)
-                                   (overlay-end other-ov))))
-            (setq len (- (overlay-end other-ov)
-                         beg))))
-        (let* ((end (if (= beg (line-end-position))
+        (let* ((lep (if (bound-and-true-p visual-line-mode)
+                        (save-excursion
+                          (end-of-visual-line)
+                          (point))
+                      (line-end-position)))
+               (len-and-str (avy--update-offset-and-str len str lep)))
+          (setq len (car len-and-str))
+          (setq str (cdr len-and-str))
+          (setq end (if (= beg lep)
                         (1+ beg)
                       (min (+ beg
                               (if (eq (char-after) ?\t)
                                   1
                                 len))
-                           (line-end-position))))
-               (ol (make-overlay
-                    beg end
-                    (current-buffer)))
-               (old-str (buffer-substring beg (1+ beg))))
-          (when avy-background
-            (setq old-str (propertize
-                           old-str 'face 'avy-background-face)))
-          (overlay-put ol 'window wnd)
-          (overlay-put ol 'category 'avy)
-          (overlay-put ol 'display
-                       (cond ((string= old-str "\n")
-                              (concat str "\n"))
-                             ((string= old-str "\t")
-                              (concat str (make-string (- tab-width len) ?\ )))
-                             (t
-                              str)))
-          (push ol avy--overlays-lead))))))
+                           lep)))
+          (when (and (bound-and-true-p visual-line-mode)
+                     (> len (- end beg))
+                     (not (eq lep beg)))
+            (setq len (- end beg))
+            (let ((old-str (apply #'string (reverse path))))
+              (setq str
+                    (substring
+                     (propertize
+                      old-str
+                      'face
+                      (if (= (length old-str) 1)
+                          'avy-lead-face
+                        'avy-lead-face-0))
+                     0 len)))))))
+    (avy--overlay
+     str beg end wnd
+     (lambda (str old-str)
+       (cond ((string= old-str "\n")
+              (concat str "\n"))
+             ((string= old-str "\t")
+              (concat str (make-string (max (- tab-width len) 0) ?\ )))
+             (t
+              ;; add padding for wide-width character
+              (if (eq (string-width old-str) 2)
+                  (concat str " ")
+                str)))))))
 
 (defun avy--overlay-post (path leaf)
   "Create an overlay with PATH at LEAF.
 PATH is a list of keys from tree root to LEAF.
 LEAF is normally ((BEG . END) . WND)."
-  (let ((str (propertize (apply #'string (reverse path))
-                         'face 'avy-lead-face)))
+  (let* ((path (mapcar #'avy--key-to-char path))
+         (str (propertize (apply #'string (reverse path))
+                          'face 'avy-lead-face)))
     (when (or avy-highlight-first (> (length str) 1))
       (set-text-properties 0 1 '(face avy-lead-face-0) str))
     (setq str (concat
@@ -661,15 +819,49 @@ LEAF is normally ((BEG . END) . WND)."
                str))
     (avy--overlay
      str
-     (cond ((numberp leaf)
-            leaf)
-           ((consp (car leaf))
-            (cdar leaf))
-           (t
-            (car leaf)))
-     (if (consp leaf)
-         (cdr leaf)
-       (selected-window)))))
+     (avy-candidate-end leaf) nil
+     (avy-candidate-wnd leaf))))
+
+(defun avy--update-offset-and-str (offset str lep)
+  "Recalculate the length of the new overlay at point.
+
+OFFSET is the previous overlay length.
+STR is the overlay string that we wish to add.
+LEP is the line end position.
+
+We want to add an overlay between point and END=point+OFFSET.
+When other overlays already exist between point and END, set
+OFFSET to be the difference between the start of the first
+overlay and point.  This is equivalent to truncating our new
+overlay, so that it doesn't intersect with overlays that already
+exist."
+  (let* ((wnd (selected-window))
+         (beg (point))
+         (oov (delq nil
+                    (mapcar
+                     (lambda (o)
+                       (and (eq (overlay-get o 'category) 'avy)
+                            (eq (overlay-get o 'window) wnd)
+                            (overlay-start o)))
+                     (overlays-in beg (min (+ beg offset) lep))))))
+    (when oov
+      (setq offset (- (apply #'min oov) beg))
+      (setq str (substring str 0 offset)))
+    (let ((other-ov (cl-find-if
+                     (lambda (o)
+                       (and (eq (overlay-get o 'category) 'avy)
+                            (eq (overlay-start o) beg)
+                            (not (eq (overlay-get o 'window) wnd))))
+                     (overlays-in (point) (min (+ (point) offset) lep)))))
+      (when (and other-ov
+                 (> (overlay-end other-ov)
+                    (+ beg offset)))
+        (setq str (concat str (buffer-substring
+                               (+ beg offset)
+                               (overlay-end other-ov))))
+        (setq offset (- (overlay-end other-ov)
+                        beg))))
+    (cons offset str)))
 
 (defun avy--style-fn (style)
   "Transform STYLE symbol to a style function."
@@ -681,27 +873,27 @@ LEAF is normally ((BEG . END) . WND)."
     (de-bruijn #'avy--overlay-at-full)
     (t (error "Unexpected style %S" style))))
 
-(defun avy--generic-jump (regex window-flip style)
+(defun avy--generic-jump (regex window-flip style &optional beg end)
   "Jump to REGEX.
 When WINDOW-FLIP is non-nil, do the opposite of `avy-all-windows'.
-STYLE determines the leading char overlay style."
+STYLE determines the leading char overlay style.
+BEG and END delimit the area where candidates are searched."
   (let ((avy-all-windows
          (if window-flip
              (not avy-all-windows)
            avy-all-windows)))
-    (avy--goto
-     (avy--process
-      (avy--regex-candidates regex)
-      (avy--style-fn style)))))
+    (avy--process
+     (avy--regex-candidates regex beg end)
+     (avy--style-fn style))))
 
 ;;* Commands
 ;;;###autoload
 (defun avy-goto-char (char &optional arg)
   "Jump to the currently visible CHAR.
 The window scope is determined by `avy-all-windows' (ARG negates it)."
-  (interactive (list (read-char "char: ")
+  (interactive (list (read-char "char: " t)
                      current-prefix-arg))
-  (avy--with-avy-keys avy-goto-char
+  (avy-with avy-goto-char
     (avy--generic-jump
      (if (= 13 char)
          "\n"
@@ -712,25 +904,23 @@ The window scope is determined by `avy-all-windows' (ARG 
negates it)."
 ;;;###autoload
 (defun avy-goto-char-in-line (char)
   "Jump to the currently visible CHAR in the current line."
-  (interactive (list (read-char "char: ")))
-  (let ((avy-all-windows nil))
-    (avy--with-avy-keys avy-goto-char
-      (avy--goto
-       (avy--process
-        (save-restriction
-          (narrow-to-region (line-beginning-position)
-                            (line-end-position))
-          (avy--regex-candidates (regexp-quote (string char))))
-        (avy--style-fn avy-style))))))
+  (interactive (list (read-char "char: " t)))
+  (avy-with avy-goto-char
+    (avy--generic-jump
+     (regexp-quote (string char))
+     avy-all-windows
+     avy-style
+     (line-beginning-position)
+     (line-end-position))))
 
 ;;;###autoload
 (defun avy-goto-char-2 (char1 char2 &optional arg)
   "Jump to the currently visible CHAR1 followed by CHAR2.
 The window scope is determined by `avy-all-windows' (ARG negates it)."
-  (interactive (list (read-char "char 1: ")
-                     (read-char "char 2: ")
+  (interactive (list (read-char "char 1: " t)
+                     (read-char "char 2: " t)
                      current-prefix-arg))
-  (avy--with-avy-keys avy-goto-char-2
+  (avy-with avy-goto-char-2
     (avy--generic-jump
      (regexp-quote (string char1 char2))
      arg
@@ -740,30 +930,28 @@ The window scope is determined by `avy-all-windows' (ARG 
negates it)."
 (defun avy-isearch ()
   "Jump to one of the current isearch candidates."
   (interactive)
-  (avy--with-avy-keys avy-isearch
-    (let* ((candidates
-            (avy--regex-candidates isearch-string))
-           (avy-background nil)
-           (candidate
-            (avy--process candidates (avy--style-fn avy-style))))
-      (isearch-done)
-      (avy--goto candidate))))
+  (avy-with avy-isearch
+    (let ((avy-background nil))
+      (avy--process
+       (avy--regex-candidates isearch-string)
+       (avy--style-fn avy-style))
+      (isearch-done))))
 
 ;;;###autoload
 (defun avy-goto-word-0 (arg)
   "Jump to a word start.
 The window scope is determined by `avy-all-windows' (ARG negates it)."
   (interactive "P")
-  (avy--with-avy-keys avy-goto-word-0
+  (avy-with avy-goto-word-0
     (avy--generic-jump "\\b\\sw" arg avy-style)))
 
 ;;;###autoload
 (defun avy-goto-word-1 (char &optional arg)
   "Jump to the currently visible CHAR at a word start.
 The window scope is determined by `avy-all-windows' (ARG negates it)."
-  (interactive (list (read-char "char: ")
+  (interactive (list (read-char "char: " t)
                      current-prefix-arg))
-  (avy--with-avy-keys avy-goto-word-1
+  (avy-with avy-goto-word-1
     (let* ((str (string char))
            (regex (cond ((string= str ".")
                          "\\.")
@@ -777,6 +965,12 @@ The window scope is determined by `avy-all-windows' (ARG 
negates it)."
       (avy--generic-jump regex arg avy-style))))
 
 (declare-function subword-backward "subword")
+(defvar subword-backward-regexp)
+
+(defcustom avy-subword-extra-word-chars '(?{ ?= ?} ?* ?: ?> ?<)
+  "A list of characters that should temporarily match \"\\w\".
+This variable is used by `avy-goto-subword-0' and `avy-goto-subword-1'."
+  :type '(repeat character))
 
 ;;;###autoload
 (defun avy-goto-subword-0 (&optional arg predicate)
@@ -788,36 +982,43 @@ When PREDICATE is non-nil it's a function of zero 
parameters that
 should return true."
   (interactive "P")
   (require 'subword)
-  (avy--with-avy-keys avy-goto-subword-0
+  (avy-with avy-goto-subword-0
     (let ((case-fold-search nil)
+          (subword-backward-regexp
+           
"\\(\\(\\W\\|[[:lower:][:digit:]]\\)\\([!-/:@`~[:upper:]]+\\W*\\)\\|\\W\\w+\\)")
           candidates)
       (avy-dowindows arg
-        (let ((ws (window-start))
-              window-cands)
-          (save-excursion
-            (goto-char (window-end (selected-window) t))
-            (subword-backward)
-            (while (> (point) ws)
-              (when (or (null predicate)
-                        (and predicate (funcall predicate)))
-                (push (cons (point) (selected-window)) window-cands))
-              (subword-backward)))
-          (setq candidates (nconc candidates window-cands))))
-      (avy--goto
-       (avy--process candidates (avy--style-fn avy-style))))))
+        (let ((syn-tbl (copy-syntax-table)))
+          (dolist (char avy-subword-extra-word-chars)
+            (modify-syntax-entry char "w" syn-tbl))
+          (with-syntax-table syn-tbl
+            (let ((ws (window-start))
+                  window-cands)
+              (save-excursion
+                (goto-char (window-end (selected-window) t))
+                (subword-backward)
+                (while (> (point) ws)
+                  (when (or (null predicate)
+                            (and predicate (funcall predicate)))
+                    (unless (get-char-property (point) 'invisible)
+                      (push (cons (point) (selected-window)) window-cands)))
+                  (subword-backward)))
+              (setq candidates (nconc candidates window-cands))))))
+      (avy--process candidates (avy--style-fn avy-style)))))
 
 ;;;###autoload
-(defun avy-goto-subword-1 (char arg)
+(defun avy-goto-subword-1 (char &optional arg)
   "Jump to the currently visible CHAR at a subword start.
 The window scope is determined by `avy-all-windows' (ARG negates it).
 The case of CHAR is ignored."
-  (interactive (list (read-char "char: ")
+  (interactive (list (read-char "char: " t)
                      current-prefix-arg))
-  (avy--with-avy-keys avy-goto-subword-1
+  (avy-with avy-goto-subword-1
     (let ((char (downcase char)))
       (avy-goto-subword-0
        arg (lambda () (eq (downcase (char-after)) char))))))
 
+;;;###autoload
 (defun avy-goto-word-or-subword-1 ()
   "Forward to `avy-goto-subword-1' or `avy-goto-word-1'.
 Which one depends on variable `subword-mode'."
@@ -826,16 +1027,18 @@ Which one depends on variable `subword-mode'."
       (call-interactively #'avy-goto-subword-1)
     (call-interactively #'avy-goto-word-1)))
 
-(defun avy--line (&optional arg)
+(defvar visual-line-mode)
+
+(defun avy--line (&optional arg beg end)
   "Select a line.
-The window scope is determined by `avy-all-windows' (ARG negates it)."
-  (let ((avy-background nil)
-        candidates)
+The window scope is determined by `avy-all-windows' (ARG negates it).
+Narrow the scope to BEG END."
+  (let (candidates)
     (avy-dowindows arg
-      (let ((ws (window-start)))
+      (let ((ws (or beg (window-start))))
         (save-excursion
           (save-restriction
-            (narrow-to-region ws (window-end (selected-window) t))
+            (narrow-to-region ws (or end (window-end (selected-window) t)))
             (goto-char (point-min))
             (while (< (point) (point-max))
               (unless (get-char-property
@@ -843,80 +1046,159 @@ The window scope is determined by `avy-all-windows' 
(ARG negates it)."
                 (push (cons
                        (if (eq avy-style 'post)
                            (line-end-position)
-                         (line-beginning-position))
+                         (point))
                        (selected-window)) candidates))
-              (forward-line 1))))))
-    (avy--process (nreverse candidates) (avy--style-fn avy-style))))
+              (if visual-line-mode
+                  (progn
+                    (setq temporary-goal-column 0)
+                    (line-move-visual 1 t))
+                (forward-line 1)))))))
+    (let ((avy-action #'identity))
+      (avy--process (nreverse candidates) (avy--style-fn avy-style)))))
 
 ;;;###autoload
 (defun avy-goto-line (&optional arg)
   "Jump to a line start in current buffer.
-The window scope is determined by `avy-all-windows' (ARG negates it)."
-  (interactive "P")
-  (avy--with-avy-keys avy-goto-line
-    (let ((avy-handler-function
-           (lambda (char)
-             (if (or (< char ?0)
-                     (> char ?9))
-                 (avy-handler-default char)
-               (let ((line (read-from-minibuffer
-                            "Goto line: " (string char))))
-                 (when line
-                   (goto-char (point-min))
-                   (forward-line (1- (string-to-number line)))
-                   (throw 'done 'exit)))))))
-      (avy--goto (avy--line arg)))))
+
+When ARG is 1, jump to lines currently visible, with the option
+to cancel to `goto-line' by entering a number.
+
+When ARG is 4, negate the window scope determined by
+`avy-all-windows'.
+
+Otherwise, forward to `goto-line' with ARG."
+  (interactive "p")
+  (setq arg (or arg 1))
+  (if (not (memq arg '(1 4)))
+      (progn
+        (goto-char (point-min))
+        (forward-line (1- arg)))
+    (avy-with avy-goto-line
+      (let* ((avy-handler-function
+              (lambda (char)
+                (if (or (< char ?0)
+                        (> char ?9))
+                    (avy-handler-default char)
+                  (let ((line (read-from-minibuffer
+                               "Goto line: " (string char))))
+                    (when line
+                      (avy-push-mark)
+                      (save-restriction
+                        (widen)
+                        (goto-char (point-min))
+                        (forward-line (1- (string-to-number line))))
+                      (throw 'done 'exit))))))
+             (r (avy--line (eq arg 4))))
+        (unless (eq r t)
+          (avy-action-goto r))))))
+
+;;;###autoload
+(defun avy-goto-line-above ()
+  "Goto visible line above the cursor."
+  (interactive)
+  (let* ((avy-all-windows nil)
+         (r (avy--line nil (window-start)
+                       (line-beginning-position))))
+    (unless (eq r t)
+      (avy-action-goto r))))
+
+;;;###autoload
+(defun avy-goto-line-below ()
+  "Goto visible line below the cursor."
+  (interactive)
+  (let* ((avy-all-windows nil)
+         (r (avy--line
+             nil (line-beginning-position 2)
+             (window-end (selected-window) t))))
+    (unless (eq r t)
+      (avy-action-goto r))))
+
+(defcustom avy-line-insert-style 'above
+  "How to insert the newly copied/cut line."
+  :type '(choice
+          (const :tag "Above" above)
+          (const :tag "Below" below)))
 
 ;;;###autoload
 (defun avy-copy-line (arg)
   "Copy a selected line above the current line.
 ARG lines can be used."
   (interactive "p")
-  (avy--with-avy-keys avy-copy-line
-    (let ((start (car (avy--line))))
-      (move-beginning-of-line nil)
-      (save-excursion
-        (insert
-         (buffer-substring-no-properties
-          start
-          (save-excursion
-            (goto-char start)
-            (move-end-of-line arg)
-            (point)))
-         "\n")))))
+  (let ((initial-window (selected-window)))
+    (avy-with avy-copy-line
+      (let* ((start (avy--line))
+             (str (buffer-substring-no-properties
+                   start
+                   (save-excursion
+                     (goto-char start)
+                     (move-end-of-line arg)
+                     (point)))))
+        (select-window initial-window)
+        (cond ((eq avy-line-insert-style 'above)
+               (beginning-of-line)
+               (save-excursion
+                 (insert str "\n")))
+              ((eq avy-line-insert-style 'below)
+               (end-of-line)
+               (insert "\n" str)
+               (beginning-of-line))
+              (t
+               (user-error "Unexpected `avy-line-insert-style'")))))))
 
 ;;;###autoload
 (defun avy-move-line (arg)
   "Move a selected line above the current line.
 ARG lines can be used."
   (interactive "p")
-  (avy--with-avy-keys avy-move-line
-    (let ((start (car (avy--line))))
-      (move-beginning-of-line nil)
-      (save-excursion
+  (let ((initial-window (selected-window)))
+    (avy-with avy-move-line
+      (let ((start (avy--line)))
         (save-excursion
           (goto-char start)
           (kill-whole-line arg))
-        (insert
-         (current-kill 0))))))
+        (select-window initial-window)
+        (cond ((eq avy-line-insert-style 'above)
+               (beginning-of-line)
+               (save-excursion
+                 (insert
+                  (current-kill 0))))
+              ((eq avy-line-insert-style 'below)
+               (end-of-line)
+               (newline)
+               (save-excursion
+                 (insert (substring (current-kill 0) 0 -1))))
+              (t
+               (user-error "Unexpected `avy-line-insert-style'")))))))
 
 ;;;###autoload
-(defun avy-copy-region ()
-  "Select two lines and copy the text between them here."
-  (interactive)
-  (avy--with-avy-keys avy-copy-region
-    (let ((beg (car (avy--line)))
-          (end (car (avy--line)))
-          (pad (if (bolp) "" "\n")))
-      (move-beginning-of-line nil)
-      (save-excursion
-        (insert
-         (buffer-substring-no-properties
-          beg
-          (save-excursion
-            (goto-char end)
-            (line-end-position)))
-         pad)))))
+(defun avy-copy-region (arg)
+  "Select two lines and copy the text between them to point.
+
+The window scope is determined by `avy-all-windows' or
+`avy-all-windows-alt' when ARG is non-nil."
+  (interactive "P")
+  (let ((initial-window (selected-window)))
+    (avy-with avy-copy-region
+      (let* ((beg (save-selected-window
+                    (avy--line arg)))
+             (end (avy--line arg))
+             (str (buffer-substring-no-properties
+                   beg
+                   (save-excursion
+                     (goto-char end)
+                     (line-end-position)))))
+        (select-window initial-window)
+        (cond ((eq avy-line-insert-style 'above)
+               (beginning-of-line)
+               (save-excursion
+                 (insert str "\n")))
+              ((eq avy-line-insert-style 'below)
+               (end-of-line)
+               (newline)
+               (save-excursion
+                 (insert str)))
+              (t
+               (user-error "Unexpected `avy-line-insert-style'")))))))
 
 ;;;###autoload
 (defun avy-setup-default ()
@@ -927,49 +1209,120 @@ ARG lines can be used."
 (defcustom avy-timeout-seconds 0.5
   "How many seconds to wait for the second char.")
 
+(defun avy--read-candidates ()
+  "Read as many chars as possible and return their occurences.
+At least one char must be read, and then repeatedly one next char
+may be read if it is entered before `avy-timeout-seconds'.  `DEL'
+deletes the last char entered, and `RET' exits with the currently
+read string immediately instead of waiting for another char for
+`avy-timeout-seconds'.
+The format of the result is the same as that of `avy--regex-candidates'.
+This function obeys `avy-all-windows' setting."
+  (let ((str "") char break overlays regex)
+    (unwind-protect
+         (progn
+           (while (and (not break)
+                       (setq char
+                             (read-char (format "char%s: "
+                                                (if (string= str "")
+                                                    str
+                                                  (format " (%s)" str)))
+                                        t
+                                        (and (not (string= str ""))
+                                             avy-timeout-seconds))))
+             ;; Unhighlight
+             (dolist (ov overlays)
+               (delete-overlay ov))
+             (setq overlays nil)
+             (cond
+               ;; Handle RET
+               ((= char 13)
+                (setq break t))
+               ;; Handle DEL
+               ((= char 127)
+                (let ((l (length str)))
+                  (when (>= l 1)
+                    (setq str (substring str 0 (1- l))))))
+               (t
+                (setq str (concat str (list char)))))
+             ;; Highlight
+             (when (>= (length str) 1)
+               (let ((case-fold-search
+                      (or avy-case-fold-search (string= str (downcase str))))
+                     found)
+                 (avy-dowindows current-prefix-arg
+                   (dolist (pair (avy--find-visible-regions
+                                  (window-start)
+                                  (window-end (selected-window) t)))
+                     (save-excursion
+                       (goto-char (car pair))
+                       (setq regex (regexp-quote str))
+                       (while (re-search-forward regex (cdr pair) t)
+                         (unless (get-char-property (1- (point)) 'invisible)
+                           (let ((ov (make-overlay
+                                      (match-beginning 0)
+                                      (match-end 0))))
+                             (setq found t)
+                             (push ov overlays)
+                             (overlay-put ov 'window (selected-window))
+                             (overlay-put ov 'face 
'avy-goto-char-timer-face)))))))
+                 ;; No matches at all, so there's surely a typo in the input.
+                 (unless found (beep)))))
+           (nreverse (mapcar (lambda (ov)
+                               (cons (cons (overlay-start ov)
+                                           (overlay-end ov))
+                                     (overlay-get ov 'window)))
+                             overlays)))
+      (dolist (ov overlays)
+        (delete-overlay ov)))))
+
 ;;;###autoload
 (defun avy-goto-char-timer (&optional arg)
-  "Read one or two consecutive chars and jump to the first one.
+  "Read one or many consecutive chars and jump to the first one.
 The window scope is determined by `avy-all-windows' (ARG negates it)."
   (interactive "P")
-  (let ((c1 (read-char "char 1: "))
-        (c2 (read-char "char 2: " nil avy-timeout-seconds)))
-    (avy--with-avy-keys avy-goto-char-timer
-      (avy--generic-jump
-       (regexp-quote
-        (if c2
-            (string c1 c2)
-          (string c1)))
-       arg
-       avy-style))))
-
-(define-obsolete-variable-alias
-    'avy-goto-char-style 'avy-style "0.1.0"
-    "Use `avy-style' and `avy-styles-alist' instead.")
-(define-obsolete-variable-alias
-    'avy-goto-word-style 'avy-style "0.1.0"
-    "Use `avy-style' and `avy-styles-alist' instead.")
-(define-obsolete-variable-alias 'avi-keys 'avy-keys "0.1.0")
-(define-obsolete-variable-alias 'avi-background 'avy-background "0.1.0")
-(define-obsolete-variable-alias 'avi-word-punc-regexp 'avy-word-punc-regexp 
"0.1.0")
-(define-obsolete-face-alias 'avi-lead-face 'avy-lead-face "0.1.0")
-(define-obsolete-function-alias 'avi--goto 'avy--goto "0.1.0")
-(define-obsolete-function-alias 'avi--process 'avy--process "0.1.0")
-(define-obsolete-variable-alias 'avi-all-windows 'avy-all-windows "0.1.0")
-(define-obsolete-function-alias 'avi--overlay-pre 'avy--overlay-pre "0.1.0")
-(define-obsolete-function-alias 'avi--overlay-at 'avy--overlay-at "0.1.0")
-(define-obsolete-function-alias 'avi--overlay-post 'avy--overlay-post "0.1.0")
-(define-obsolete-function-alias 'avi-goto-char 'avy-goto-char "0.1.0")
-(define-obsolete-function-alias 'avi-goto-char-2 'avy-goto-char-2 "0.1.0")
-(define-obsolete-function-alias 'avi-isearch 'avy-isearch "0.1.0")
-(define-obsolete-function-alias 'avi-goto-word-0 'avy-goto-word-0 "0.1.0")
-(define-obsolete-function-alias 'avi-goto-subword-0 'avy-goto-subword-0 
"0.1.0")
-(define-obsolete-function-alias 'avi-goto-word-1 'avy-goto-word-1 "0.1.0")
-(define-obsolete-function-alias 'avi-goto-line 'avy-goto-line "0.1.0")
-(define-obsolete-function-alias 'avi-copy-line 'avy-copy-line "0.1.0")
-(define-obsolete-function-alias 'avi-move-line 'avy-move-line "0.1.0")
-(define-obsolete-function-alias 'avi-copy-region 'avy-copy-region "0.1.0")
-(define-obsolete-function-alias 'avi--regex-candidates 'avy--regex-candidates 
"0.1.0")
+  (let ((avy-all-windows (if arg
+                             (not avy-all-windows)
+                           avy-all-windows)))
+    (avy-with avy-goto-char-timer
+      (avy--process
+       (avy--read-candidates)
+       (avy--style-fn avy-style)))))
+
+(defvar avy-ring (make-ring 20)
+  "Hold the window and point history.")
+
+(defun avy-push-mark ()
+  "Store the current point and window."
+  (ring-insert avy-ring
+               (cons (point) (selected-window)))
+  (unless (region-active-p)
+    (push-mark)))
+
+(defun avy-pop-mark ()
+  "Jump back to the last location of `avy-push-mark'."
+  (interactive)
+  (let (res)
+    (condition-case nil
+        (progn
+          (while (not (window-live-p
+                       (cdr (setq res (ring-remove avy-ring 0))))))
+          (let* ((window (cdr res))
+                 (frame (window-frame window)))
+            (when (and (frame-live-p frame)
+                       (not (eq frame (selected-frame))))
+              (select-frame-set-input-focus frame))
+            (select-window window)
+            (goto-char (car res))))
+      (error
+       (set-mark-command 4)))))
+
+(define-obsolete-function-alias
+    'avy--goto 'identity "0.3.0"
+    "Don't use this function any more.
+`avy--process' will do the jump all by itself.")
+
+(define-obsolete-function-alias 'avy--with-avy-keys 'avy-with "0.3.0")
 
 (provide 'avy)
 
diff --git a/packages/avy/doc/Changelog.org b/packages/avy/doc/Changelog.org
index 7dbcdf1..6d5b80c 100644
--- a/packages/avy/doc/Changelog.org
+++ b/packages/avy/doc/Changelog.org
@@ -205,7 +205,121 @@ Use this to restore the previous default behavior:
 #+begin_src elisp
 (setq avy-style 'pre)
 #+end_src
-
-* trunk
+* 0.4.0
 ** Fixes
 *** =avy-goto-char-timer= obeys =avy-styles-alist=
+See [[https://github.com/abo-abo/avy/issues/67][#67]].
+*** Add =de-bruijn= to the defcustom of =avy-styles-alist=
+See [[https://github.com/abo-abo/avy/issues/73][#73]].
+*** Respect the current input method for target chars
+See [[https://github.com/abo-abo/avy/issues/76][#76]].
+*** =avy-goto-subword-0= shouldn't offer invisible chars
+See [[https://github.com/abo-abo/avy/issues/90][#90]].
+*** Better =case-fold-search= handling
+See [[https://github.com/abo-abo/avy/issues/87][#87]].
+*** Add misc punctuation to subword commands
+See [[https://github.com/abo-abo/avy/issues/93][#93]].
+*** Add padding for wide-width chars (ex. Japanese and Chinese)
+See [[https://github.com/abo-abo/avy/issues/96][#96]].
+*** =avy-goto-line=
+**** Push mark for numeric line
+See [[https://github.com/abo-abo/avy/issues/74][#74]].
+**** Allow numeric prefix arg
+The old behavior remains for ARG 1 or 4. For all other ARG, simply go
+to that line.
+See [[https://github.com/abo-abo/avy/issues/86][#86]].
+**** Work for =visual-line-mode=
+See [[https://github.com/abo-abo/avy/issues/91][#91]].
+**** Don't error on end of buffer
+See [[https://github.com/abo-abo/avy/issues/91][#91]].
+**** Obey =avy-background=
+See [[https://github.com/abo-abo/avy/issues/94][#94]].
+**** Fix for narrowed regions
+See [[https://github.com/abo-abo/avy/issues/122][#122]], 
[[https://github.com/abo-abo/avy/issues/123][#123]].
+**** Don't modify =avy-action=
+See [[https://github.com/abo-abo/avy/issues/124][#124]].
+*** =avy-goto-char-timer=
+**** May read as many chars as you want
+See [[https://github.com/abo-abo/avy/issues/97][#97]].
+**** Highlight matches while reading chars
+See [[https://github.com/abo-abo/avy/issues/98][#98]].
+**** Highlight depending on =avy-all-windows=
+See [[https://github.com/abo-abo/avy/issues/104][#104]].
+**** Make faster for =org-mode=
+See [[https://github.com/abo-abo/avy/issues/100][#100]].
+**** Add case fold search
+See [[https://github.com/abo-abo/avy/issues/128][#128]].
+*** =avy-copy-region=
+**** Keep the same selectors for the second pass
+See [[https://github.com/abo-abo/avy/issues/120][#120]], 
[[https://github.com/abo-abo/avy/issues/121][#121]].
+**** Copy/move to initial window
+See [[https://github.com/abo-abo/avy/issues/131][#131]].
+*** Search only in the visible region
+See [[https://github.com/abo-abo/avy/issues/108][#108]], 
[[https://github.com/abo-abo/avy/issues/109][#109]].
+*** Fix jumping to the last char of a folded Org outline
+See [[https://github.com/abo-abo/avy/issues/108][#108]].
+*** Fix for both =org-indent-mode= and =visual-line-mode=
+See [[https://github.com/abo-abo/avy/issues/110][#110]].
+*** Beep when there are no matches
+See [[https://github.com/abo-abo/avy/issues/111][#111]].
+*** Simplify overlay code
+Most functions reuse =avy--overlay= now.
+*** Fix de-bruijn "no catch for tag"
+See [[https://github.com/abo-abo/avy/issues/116][#116]].
+*** Fix overlays at =point-max=
+See [[https://github.com/abo-abo/avy/issues/125][#125]].
+*** Improve =case-fold-search= condition
+See [[https://github.com/abo-abo/avy/issues/126][#126]].
+*** Don't shorten selector string for =visual-line-mode= and =bolp=
+See [[https://github.com/abo-abo/avy/issues/129][#129]].
+*** Fix interaction with =goto-address-mode=
+** New Features
+*** Allow non-printing keys in =avy-keys=
+Now you can set avy-keys also to the arrow keys and page up/down, e.g.
+
+#+begin_src elisp
+(setq avy-keys '(left right up down prior next))
+#+end_src
+
+and those will be displayed as â–², â–¼, â—€, â–¶, â–³, â–½ in the overlays.  The
+display is controlled by the variable =avy-key-to-char-alist=.
+
+See [[https://github.com/abo-abo/avy/issues/77][#77]].
+*** Allow to switch action midway from goto to kill/mark/copy
+For example, suppose you have:
+
+#+begin_src elisp
+(global-set-key (kbd "M-t") 'avy-goto-word-1)
+#+end_src
+
+- To jump to a certain word starting with "w" (e.g. first one on
+  screen): ~M-t w a~
+- To copy the word instead of jumping to it: ~M-t w na~.
+- To mark the word after jumping to it: ~M-t w ma~.
+- To kill the word after jumping to it: ~M-t w xa~.
+
+You can customize =avy-dispatch-alist= to modify these actions.
+
+See [[https://github.com/abo-abo/avy/issues/78][#78]].
+
+*** New command =avy-pop-mark=
+Goes back to the last location of =push-mark=:
+
+- has its own history,
+- handles multiple frames.
+
+See [[https://github.com/abo-abo/avy/issues/81][#81]] 
[[https://github.com/abo-abo/avy/issues/88][#88]] 
[[https://github.com/abo-abo/avy/issues/69][#69]].
+*** New commands =avy-goto-line-above= and =avy-goto-line-below=
+See [[https://github.com/abo-abo/avy/issues/106][#106]].
+*** New defcustom =avy-line-insert-style=
+Allows to modify the behavior of =avy-copy-line=, =avy-move-line=, and 
=avy-copy-region=.
+See [[https://github.com/abo-abo/avy/issues/117][#117]].
+*** New defcustom =avy-all-windows-alt=
+Allows to customize the behavior of =universal-argument= modifying
+=avy-all-windows=.
+See [[https://github.com/abo-abo/avy/issues/118][#118]].
+*** New defcustom =avy-subword-extra-word-chars=
+Allows to customize the behavior of =avy-goto-subword-0= and
+=avy-goto-subword-1= by adding extra chars that should match as word
+constituents.
+See [[https://github.com/abo-abo/avy/issues/116][#116]].
diff --git a/packages/beacon/beacon.el b/packages/beacon/beacon.el
index 5b6d924..4226149 100644
--- a/packages/beacon/beacon.el
+++ b/packages/beacon/beacon.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <address@hidden>
 ;; URL: https://github.com/Malabarba/beacon
 ;; Keywords: convenience
-;; Version: 0.4
+;; Version: 1.0
 ;; Package-Requires: ((seq "1.11"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -38,6 +38,24 @@
 ;;; Code:
 
 (require 'seq)
+(require 'faces)
+(unless (fboundp 'seq-mapn)
+  ;; This is for people who are on outdated Emacs snapshots. Will be
+  ;; deleted in a couple of weeks.
+  (defun seq-mapn (function sequence &rest sequences)
+    "Like `seq-map' but FUNCTION is mapped over all SEQUENCES.
+The arity of FUNCTION must match the number of SEQUENCES, and the
+mapping stops on the shortest sequence.
+Return a list of the results.
+
+\(fn FUNCTION SEQUENCES...)"
+    (let ((result nil)
+          (sequences (seq-map (lambda (s) (seq-into s 'list))
+                            (cons sequence sequences))))
+      (while (not (memq nil sequences))
+        (push (apply function (seq-map #'car sequences)) result)
+        (setq sequences (seq-map #'cdr sequences)))
+      (nreverse result))))
 
 (defgroup beacon nil
   "Customization group for beacon."
@@ -131,14 +149,17 @@ For instance, if you want to disable beacon on buffers 
where
 
 (add-hook 'beacon-dont-blink-predicates #'window-minibuffer-p)
 
-(defcustom beacon-dont-blink-major-modes '(magit-status-mode magit-popup-mode)
+(defcustom beacon-dont-blink-major-modes '(t magit-status-mode magit-popup-mode
+                                       inf-ruby-mode
+                                       gnus-summary-mode gnus-group-mode)
   "A list of major-modes where the beacon won't blink.
 Whenever the current buffer satisfies `derived-mode-p' for
 one of the major-modes on this list, the beacon will not
 blink."
   :type '(repeat symbol))
 
-(defcustom beacon-dont-blink-commands '(recenter-top-bottom)
+(defcustom beacon-dont-blink-commands '(next-line previous-line
+                                            forward-line)
   "A list of commands that should not make the beacon blink.
 Use this for commands that scroll the window in very
 predictable ways, when the blink would be more distracting
@@ -235,14 +256,22 @@ Only returns `beacon-size' elements."
 
 (defun beacon--color-range ()
   "Return a list of background colors for the beacon."
-  (let* ((default-bg (face-attribute 'default :background))
-         (bg (color-values (if (string-match "\\`unspecified-" default-bg)
+  (let* ((default-bg (or (save-excursion
+                           (unless (eobp)
+                             (forward-line 1)
+                             (unless (or (bobp) (not (bolp)))
+                               (forward-char -1)))
+                           (background-color-at-point))
+                         (face-background 'default)))
+         (bg (color-values (if (or (not (stringp default-bg))
+                                   (string-match "\\`unspecified-" default-bg))
                                (face-attribute 'beacon-fallback-background 
:background)
                              default-bg)))
          (fg (cond
               ((stringp beacon-color) (color-values beacon-color))
-              ((< (color-distance "black" bg)
-                  (color-distance "white" bg))
+              ((and (stringp bg)
+                    (< (color-distance "black" bg)
+                       (color-distance "white" bg)))
                (make-list 3 (* beacon-color 65535)))
               (t (make-list 3 (* (- 1 beacon-color) 65535))))))
     (apply #'seq-mapn (lambda (r g b) (format "#%04x%04x%04x" r g b))
@@ -272,8 +301,10 @@ Only returns `beacon-size' elements."
     (o
      (delete-overlay o)
      (save-excursion
-       (while (progn (forward-char 1)
-                     (setq o (beacon--ov-at-point)))
+       (while (and (condition-case nil
+                       (progn (forward-char 1) t)
+                     (end-of-buffer nil))
+                   (setq o (beacon--ov-at-point)))
          (let ((colors (overlay-get o 'beacon-colors)))
            (if (not colors)
                (move-overlay o (1- (point)) (point))
@@ -282,10 +313,26 @@ Only returns `beacon-size' elements."
              (beacon--ov-put-after-string o colors)
              (forward-char 1))))))))
 
+;;;###autoload
 (defun beacon-blink ()
-  "Blink the beacon at the position of the cursor."
+  "Blink the beacon at the position of the cursor.
+Unlike `beacon-blink-automated', the beacon will blink
+unconditionally (even if `beacon-mode' is disabled), and this can
+be invoked as a user command or called from lisp code."
   (interactive)
   (beacon--vanish)
+  (beacon--shine)
+  (setq beacon--timer
+        (run-at-time beacon-blink-delay
+                     (/ beacon-blink-duration 1.0 beacon-size)
+                     #'beacon--dec)))
+
+(defun beacon-blink-automated ()
+  "If appropriate, blink the beacon at the position of the cursor.
+Unlike `beacon-blink', the blinking is conditioned on a series of
+variables: `beacon-mode', `beacon-dont-blink-commands',
+`beacon-dont-blink-major-modes', and
+`beacon-dont-blink-predicates'."
   ;; Record vars here in case something is blinking outside the
   ;; command loop.
   (beacon--record-vars)
@@ -293,11 +340,7 @@ Only returns `beacon-size' elements."
               (run-hook-with-args-until-success 'beacon-dont-blink-predicates)
               (seq-find #'derived-mode-p beacon-dont-blink-major-modes)
               (memq (or this-command last-command) beacon-dont-blink-commands))
-    (beacon--shine)
-    (setq beacon--timer
-          (run-at-time beacon-blink-delay
-                       (/ beacon-blink-duration 1.0 beacon-size)
-                       #'beacon--dec))))
+    (beacon-blink)))
 
 
 ;;; Movement detection
@@ -342,22 +385,20 @@ The same is true for DELTA-X and horizonta movement."
 (defun beacon--post-command ()
   "Blink if point moved very far."
   (cond
-   ((not (markerp beacon--previous-place))
-    (beacon--vanish))
+   ;; Sanity check.
+   ((not (markerp beacon--previous-place)))
    ;; Blink for switching windows.
    ((and beacon-blink-when-window-changes
          (not (eq beacon--previous-window (selected-window))))
-    (beacon-blink))
+    (beacon-blink-automated))
    ;; Blink for scrolling.
    ((and beacon--window-scrolled
          (equal beacon--window-scrolled (selected-window)))
-    (beacon-blink))
+    (beacon-blink-automated))
    ;; Blink for movement
    ((beacon--movement-> beacon-blink-when-point-moves-vertically
                   beacon-blink-when-point-moves-horizontally)
-    (beacon-blink))
-   ;; Even if we don't blink, vanish any previous beacon.
-   (t (beacon--vanish)))
+    (beacon-blink-automated)))
   (beacon--maybe-push-mark)
   (setq beacon--window-scrolled nil))
 
@@ -376,12 +417,12 @@ unreliable, so just blink immediately."
     (if this-command
         (setq beacon--window-scrolled win)
       (setq beacon--window-scrolled nil)
-      (beacon-blink))))
+      (beacon-blink-automated))))
 
 (defun beacon--blink-on-focus ()
   "Blink if `beacon-blink-when-focused' is non-nil"
   (when beacon-blink-when-focused
-    (beacon-blink)))
+    (beacon-blink-automated)))
 
 
 ;;; Minor-mode
diff --git a/packages/bug-hunter/README.org b/packages/bug-hunter/README.org
index 78c622e..d8c9463 100644
--- a/packages/bug-hunter/README.org
+++ b/packages/bug-hunter/README.org
@@ -1,6 +1,7 @@
 #+OPTIONS: toc:nil num:nil
 #+TITLE: [[file:hunter.png]] The Bug Hunter 
[[https://travis-ci.org/Malabarba/elisp-bug-hunter][file:https://travis-ci.org/Malabarba/elisp-bug-hunter.svg?branch=master]]
 
+/Automatically debug and bisect your init (.emacs) file!/
 
 The Bug Hunter is an Emacs library that finds the source of an error
 or unexpected behavior inside an elisp configuration file (typically
diff --git a/packages/bug-hunter/bug-hunter.el 
b/packages/bug-hunter/bug-hunter.el
index 6faa5a1..6875470 100644
--- a/packages/bug-hunter/bug-hunter.el
+++ b/packages/bug-hunter/bug-hunter.el
@@ -1,10 +1,10 @@
-;;; bug-hunter.el --- Hunt down errors in elisp files  -*- lexical-binding: t; 
-*-
+;;; bug-hunter.el --- Hunt down errors by bisecting elisp files  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
 ;; Author: Artur Malabarba <address@hidden>
-;; URL: http://github.com/Malabarba/elisp-bug-hunter
-;; Version: 1.0
+;; URL: https://github.com/Malabarba/elisp-bug-hunter
+;; Version: 1.1
 ;; Keywords: lisp
 ;; Package-Requires: ((seq "1.3") (cl-lib "0.5"))
 
@@ -110,7 +110,7 @@ non-nil in your current (problematic) Emacs state, AND that
 returns nil on a clean Emacs instance.
 If you're unsure how to write an assertion, you can try the interactive
 hunt instead, or see some examples in the Readme:
-    https://github.com/Bruce-Connor/elisp-bug-hunter";
+    https://github.com/Malabarba/elisp-bug-hunter";
   "Printed to the user if they provide a bad assertion.")
 
 (defvar bug-hunter--current-head nil
@@ -143,7 +143,10 @@ file.")
               nil)
           (end-of-file `(bug-caught (end-of-file) ,line ,col))
           (invalid-read-syntax `(bug-caught ,er ,line ,col))
-          (error (error "Ran into an error we don't understand, please file a 
bug report: %S" er)))
+          (error
+           (if (string= (elt er 1) "Invalid modifier in string")
+               `(bug-caught (invalid-modifier) ,line ,col)
+             (error "Ran into an error we don't understand, please file a bug 
report: %S" er))))
         (nreverse out))))
 
 (defun bug-hunter--read-contents (file)
@@ -215,6 +218,9 @@ the file."
     (cl-case (car error)
       (end-of-file
        "There's a missing closing parenthesis, the expression on this line 
never ends.")
+      (invalid-modifier (concat "There's a string on this line with an invalid 
modifier."
+                                "\n  A \"modifier\" is a \\ followed by a few 
characters."
+                                "\n  For example, \\C-; is an invalid 
modifier."))
       (invalid-read-syntax
        (let ((char (cadr error)))
          (if (member char '("]" ")"))
@@ -288,7 +294,7 @@ ARGS are passed before \"-l FILE\"."
     (unwind-protect
         (bug-hunter--run-emacs file-name "-Q")
       (delete-file file-name))
-    (y-or-n-p "Did you find the problem/bug in this instance? ")))
+    (y-or-n-p "Did you find the problem/bug in this instance (if you encounter 
some other issue, answer `n')? ")))
 
 (defun bug-hunter--wrap-forms-for-eval (forms)
   "Return FORMS wrapped in initialization code."
@@ -416,7 +422,7 @@ If you're looking for something that's not an error, use the
 interactive hunt instead of the error hunt.  If you have some
 elisp proficiency, you can also use the assertion hunt, see this
 link for some examples:
-    https://github.com/Bruce-Connor/elisp-bug-hunter";)
+    https://github.com/Malabarba/elisp-bug-hunter";)
         (or assertion "")))
 
      ;; Make sure we're in a forest, not a volcano.
diff --git a/packages/company-statistics/company-statistics.el 
b/packages/company-statistics/company-statistics.el
index b982c48..62c3c1d 100644
--- a/packages/company-statistics/company-statistics.el
+++ b/packages/company-statistics/company-statistics.el
@@ -4,7 +4,7 @@
 
 ;; Author: Ingo Lohmar <address@hidden>
 ;; URL: https://github.com/company-mode/company-statistics
-;; Version: 0.2.1
+;; Version: 0.2.2
 ;; Keywords: abbrev, convenience, matching
 ;; Package-Requires: ((emacs "24.3") (company "0.8.5"))
 
@@ -184,12 +184,14 @@ number)."
 font-lock-keyword-face up to point, or nil."
   (let ((face-pos (point)))
     (while (and (number-or-marker-p face-pos)
-                (< 1 face-pos)
+                (< (point-min) face-pos)
                 (not (eq (get-text-property (1- face-pos) 'face)
                          'font-lock-keyword-face)))
       (setq face-pos
             (previous-single-property-change face-pos 'face nil (point-min))))
-    (when (and (number-or-marker-p face-pos))      ;else eval to nil
+    (when (and (number-or-marker-p face-pos)
+               (eq (get-text-property (max (point-min) (1- face-pos)) 'face)
+                   'font-lock-keyword-face))
       (list :keyword
             (buffer-substring-no-properties
              (previous-single-property-change face-pos 'face nil (point-min))
diff --git a/packages/context-coloring/.travis.yml 
b/packages/context-coloring/.travis.yml
index 0c3a48d..ba959a9 100644
--- a/packages/context-coloring/.travis.yml
+++ b/packages/context-coloring/.travis.yml
@@ -1,18 +1,21 @@
+sudo: false
+
 language: emacs-lisp
 
 env:
-  - EVM_EMACS=emacs-24.3-bin
-  - EVM_EMACS=emacs-24.4-bin
-  - EVM_EMACS=emacs-24.5-bin
+  - EVM_EMACS=emacs-24.3-travis
+  - EVM_EMACS=emacs-24.4-travis
+  - EVM_EMACS=emacs-24.5-travis
 
 before_install:
-  - sudo mkdir /usr/local/evm
-  - sudo chown travis:travis /usr/local/evm
-  - export PATH="/home/travis/.cask/bin:$PATH"
   - export PATH="/home/travis/.evm/bin:$PATH"
-  - curl -fsSkL https://raw.github.com/rejeep/evm/master/go | bash
-  - evm install ${EVM_EMACS} --use
+  - export PATH="/home/travis/.cask/bin:$PATH"
+  - git clone https://github.com/rejeep/evm.git /home/travis/.evm
+  - evm config path /tmp
+  - evm install ${EVM_EMACS} --use --skip
   - curl -fsSkL https://raw.github.com/cask/cask/master/go | python
+
+install:
   - cask
 
 script:
diff --git a/packages/context-coloring/LICENSE 
b/packages/context-coloring/LICENSE
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/packages/context-coloring/LICENSE
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/packages/context-coloring/context-coloring.el 
b/packages/context-coloring/context-coloring.el
index 8d6cacc..983315e 100644
--- a/packages/context-coloring/context-coloring.el
+++ b/packages/context-coloring/context-coloring.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2014-2015  Free Software Foundation, Inc.
 
 ;; Author: Jackson Ray Hamilton <address@hidden>
-;; Version: 7.1.0
+;; Version: 7.2.0
 ;; Keywords: convenience faces tools
 ;; Package-Requires: ((emacs "24.3") (js2-mode "20150713"))
 ;; URL: https://github.com/jacksonrayhamilton/context-coloring
@@ -493,6 +493,29 @@ For instance, the current file could be a Node.js program."
 
 ;;; Emacs Lisp colorization
 
+(defconst context-coloring-WORD-CODE 2)
+(defconst context-coloring-SYMBOL-CODE 3)
+(defconst context-coloring-OPEN-PARENTHESIS-CODE 4)
+(defconst context-coloring-CLOSE-PARENTHESIS-CODE 5)
+(defconst context-coloring-EXPRESSION-PREFIX-CODE 6)
+(defconst context-coloring-STRING-QUOTE-CODE 7)
+(defconst context-coloring-ESCAPE-CODE 9)
+(defconst context-coloring-COMMENT-START-CODE 11)
+(defconst context-coloring-COMMENT-END-CODE 12)
+
+(defconst context-coloring-OCTOTHORPE-CHAR (string-to-char "#"))
+(defconst context-coloring-APOSTROPHE-CHAR (string-to-char "'"))
+(defconst context-coloring-OPEN-PARENTHESIS-CHAR (string-to-char "("))
+(defconst context-coloring-COMMA-CHAR (string-to-char ","))
+(defconst context-coloring-AT-CHAR (string-to-char "@"))
+(defconst context-coloring-BACKTICK-CHAR (string-to-char "`"))
+
+(defsubst context-coloring-get-syntax-code ()
+  "Get the syntax code at point."
+  (syntax-class
+   ;; Faster version of `syntax-after':
+   (aref (syntax-table) (char-after (point)))))
+
 (defsubst context-coloring-forward-sws ()
   "Move forward through whitespace and comments."
   (while (forward-comment 1)))
@@ -504,18 +527,20 @@ For instance, the current file could be a Node.js 
program."
     (context-coloring-colorize-comments-and-strings start (point))))
 
 (defsubst context-coloring-elisp-forward-sexp ()
-  "Like `forward-sexp', coloring skipped comments and strings."
+  "Skip/ignore missing sexps, coloring comments and strings."
   (let ((start (point)))
-    (forward-sexp)
+    (when (= (context-coloring-get-syntax-code)
+             context-coloring-EXPRESSION-PREFIX-CODE)
+      ;; `forward-sexp' does not skip an unfinished expression (e.g. when the
+      ;; name of a symbol or the parentheses of a list do not follow a single
+      ;; quote).
+      (forward-char))
+    (condition-case nil
+        (forward-sexp)
+      (scan-error (context-coloring-forward-sws)))
     (context-coloring-elisp-colorize-comments-and-strings-in-region
      start (point))))
 
-(defsubst context-coloring-get-syntax-code ()
-  "Get the syntax code at point."
-  (syntax-class
-   ;; Faster version of `syntax-after':
-   (aref (syntax-table) (char-after (point)))))
-
 (defsubst context-coloring-exact-regexp (word)
   "Create a regexp matching exactly WORD."
   (concat "\\`" (regexp-quote word) "\\'"))
@@ -533,23 +558,6 @@ For instance, the current file could be a Node.js program."
                          "\\|")
   "Match symbols that can't be bound as variables.")
 
-(defconst context-coloring-WORD-CODE 2)
-(defconst context-coloring-SYMBOL-CODE 3)
-(defconst context-coloring-OPEN-PARENTHESIS-CODE 4)
-(defconst context-coloring-CLOSE-PARENTHESIS-CODE 5)
-(defconst context-coloring-EXPRESSION-PREFIX-CODE 6)
-(defconst context-coloring-STRING-QUOTE-CODE 7)
-(defconst context-coloring-ESCAPE-CODE 9)
-(defconst context-coloring-COMMENT-START-CODE 11)
-(defconst context-coloring-COMMENT-END-CODE 12)
-
-(defconst context-coloring-OCTOTHORPE-CHAR (string-to-char "#"))
-(defconst context-coloring-APOSTROPHE-CHAR (string-to-char "'"))
-(defconst context-coloring-OPEN-PARENTHESIS-CHAR (string-to-char "("))
-(defconst context-coloring-COMMA-CHAR (string-to-char ","))
-(defconst context-coloring-AT-CHAR (string-to-char "@"))
-(defconst context-coloring-BACKTICK-CHAR (string-to-char "`"))
-
 (defsubst context-coloring-elisp-identifier-p (syntax-code)
   "Check if SYNTAX-CODE is an elisp identifier constituent."
   (or (= syntax-code context-coloring-WORD-CODE)
@@ -660,6 +668,7 @@ bound immediately after its own initializer is parsed."
         syntax-code)
     ;; Enter.
     (forward-char)
+    (context-coloring-elisp-forward-sws)
     (while (/= (setq syntax-code (context-coloring-get-syntax-code))
                context-coloring-CLOSE-PARENTHESIS-CODE)
       (cond
@@ -699,6 +708,7 @@ bound immediately after its own initializer is parsed."
   (let (syntax-code)
     ;; Enter.
     (forward-char)
+    (context-coloring-elisp-forward-sws)
     (while (/= (setq syntax-code (context-coloring-get-syntax-code))
                context-coloring-CLOSE-PARENTHESIS-CODE)
       (cond
@@ -779,6 +789,7 @@ Parse the header with CALLBACK."
      (let (syntax-code)
        ;; Enter.
        (forward-char)
+       (context-coloring-elisp-forward-sws)
        (while (/= (setq syntax-code (context-coloring-get-syntax-code))
                   context-coloring-CLOSE-PARENTHESIS-CODE)
          (cond
@@ -813,6 +824,29 @@ Parsing the header with CALLBACK."
    (lambda ()
      (context-coloring-elisp-parse-let-varlist 'let*))))
 
+(defun context-coloring-elisp-colorize-macroexp-let2 ()
+  "Color the `macroexp-let2' at point."
+  (let (syntax-code
+        variable)
+    (context-coloring-elisp-colorize-scope
+     (lambda ()
+       (and
+        (progn
+          (setq syntax-code (context-coloring-get-syntax-code))
+          (context-coloring-elisp-identifier-p syntax-code))
+        (progn
+          (context-coloring-elisp-colorize-sexp)
+          (context-coloring-elisp-forward-sws)
+          (setq syntax-code (context-coloring-get-syntax-code))
+          (context-coloring-elisp-identifier-p syntax-code))
+        (progn
+          (context-coloring-elisp-parse-bindable
+           (lambda (parsed-variable)
+             (setq variable parsed-variable)))
+          (context-coloring-elisp-forward-sws)
+          (when variable
+            (context-coloring-elisp-add-variable variable))))))))
+
 (defun context-coloring-elisp-colorize-cond ()
   "Color the `cond' at point."
   (let (syntax-code)
@@ -928,8 +962,10 @@ Parsing the header with CALLBACK."
       (puthash callee #'context-coloring-elisp-colorize-condition-case table))
     (dolist (callee '("dolist" "dotimes"))
       (puthash callee #'context-coloring-elisp-colorize-dolist table))
-    (puthash "let" #'context-coloring-elisp-colorize-let table)
+    (dolist (callee '("let" "gv-letplace"))
+      (puthash callee #'context-coloring-elisp-colorize-let table))
     (puthash "let*" #'context-coloring-elisp-colorize-let* table)
+    (puthash "macroexp-let2" #'context-coloring-elisp-colorize-macroexp-let2 
table)
     (puthash "lambda" #'context-coloring-elisp-colorize-lambda table)
     (puthash "cond" #'context-coloring-elisp-colorize-cond table)
     (puthash "defadvice" #'context-coloring-elisp-colorize-defadvice table)
diff --git a/packages/context-coloring/test/context-coloring-test.el 
b/packages/context-coloring/test/context-coloring-test.el
index f643e91..c57dce2 100644
--- a/packages/context-coloring/test/context-coloring-test.el
+++ b/packages/context-coloring/test/context-coloring-test.el
@@ -749,6 +749,28 @@ ssssssssssss0"))
 1111 cc ccccccc
     1sss11")))
 
+(context-coloring-test-deftest-emacs-lisp empty-varlist
+  (lambda ()
+    (context-coloring-test-assert-coloring "
+1111111 1 11
+1111111 111
+
+1111 1cc
+      11
+1111111 111")))
+
+(context-coloring-test-deftest-emacs-lisp varlist-spacing
+  (lambda ()
+    (context-coloring-test-assert-coloring "
+(111 (
+      (1 (222222 ()))))
+
+(111111 ( 1 1 )
+  1 1)
+
+(111111111 0 ( (1) )
+  1)")))
+
 (context-coloring-test-deftest-emacs-lisp let*
   (lambda ()
     (context-coloring-test-assert-coloring "
@@ -765,6 +787,16 @@ ssssssssssss0"))
   1111 1 1 1 0 0 000011"))
   :fixture "let-star.el")
 
+(context-coloring-test-deftest-emacs-lisp macroexp-let2
+  (lambda ()
+    (context-coloring-test-assert-coloring "
+1111 11111
+  222222222-2222 00000000-00000000-0 2 111
+    2 11121
+
+(11111111-1111 00000000-00000000-0)
+(11111111-1111)")))
+
 (context-coloring-test-deftest-emacs-lisp cond
   (lambda ()
     (context-coloring-test-assert-coloring "
diff --git a/packages/context-coloring/test/fixtures/empty-varlist.el 
b/packages/context-coloring/test/fixtures/empty-varlist.el
new file mode 100644
index 0000000..5ee6a78
--- /dev/null
+++ b/packages/context-coloring/test/fixtures/empty-varlist.el
@@ -0,0 +1,6 @@
+(lambda ( ))
+(lambda ())
+
+(let (;;
+      ))
+(lambda ())
diff --git a/packages/context-coloring/test/fixtures/let.el 
b/packages/context-coloring/test/fixtures/let.el
index 04fc039..49edb50 100644
--- a/packages/context-coloring/test/fixtures/let.el
+++ b/packages/context-coloring/test/fixtures/let.el
@@ -9,3 +9,5 @@
 
 (let ;; comment
     ("s"))
+
+(let (a '))
diff --git a/packages/context-coloring/test/fixtures/macroexp-let2.el 
b/packages/context-coloring/test/fixtures/macroexp-let2.el
new file mode 100644
index 0000000..1b61df2
--- /dev/null
+++ b/packages/context-coloring/test/fixtures/macroexp-let2.el
@@ -0,0 +1,6 @@
+(let (exp)
+  (macroexp-let2 macroexp-copyable-p v exp
+    v exp))
+
+(macroexp-let2 macroexp-copyable-p)
+(macroexp-let2)
diff --git a/packages/context-coloring/test/fixtures/varlist-spacing.el 
b/packages/context-coloring/test/fixtures/varlist-spacing.el
new file mode 100644
index 0000000..97ec208
--- /dev/null
+++ b/packages/context-coloring/test/fixtures/varlist-spacing.el
@@ -0,0 +1,8 @@
+(let (
+      (a (lambda ()))))
+
+(lambda ( a b )
+  a b)
+
+(defadvice a ( (b) )
+  b)
diff --git a/packages/debbugs/Debbugs.wsdl b/packages/debbugs/Debbugs.wsdl
index 427a381..f9657db 100644
--- a/packages/debbugs/Debbugs.wsdl
+++ b/packages/debbugs/Debbugs.wsdl
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<!-- Copyright (C) 2011-2015  Free Software Foundation, Inc.
+<!-- Copyright (C) 2011-2016  Free Software Foundation, Inc.
 
 This file is not part of GNU Emacs.
 
diff --git a/packages/debbugs/README b/packages/debbugs/README
index 9b2cef5..74f8db8 100644
--- a/packages/debbugs/README
+++ b/packages/debbugs/README
@@ -12,6 +12,9 @@ could use the commands `M-x debbugs-org', `M-x 
debbugs-org-search' and
 A minor mode `debbugs-browse-mode' let you browse URLs to the GNU Bug
 Tracker as well as bug identifiers prepared for `bug-reference-mode'.
 
+All these commands are described in the Debbugs User Guide, accessible via
+(info "(debbugs-ug)")
+
 This package works by implementing basic functions to access a Debbugs
 SOAP server (see <http://wiki.debian.org/DebbugsSoapInterface>).  It
 implements the SOAP functions "get_bugs", "newest_bugs", "get_status",
diff --git a/packages/debbugs/debbugs-browse.el 
b/packages/debbugs/debbugs-browse.el
index 39b6357..b4e87c7 100644
--- a/packages/debbugs/debbugs-browse.el
+++ b/packages/debbugs/debbugs-browse.el
@@ -1,11 +1,10 @@
 ;; debbugs-browse.el --- browse bug URLs with debbugs-gnu or debbugs-org
 
-;; Copyright (C) 2015 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc.
 
 ;; Author: Michael Albinus <address@hidden>
 ;; Keywords: comm, hypermedia, maint
 ;; Package: debbugs
-;; Version: 0.7
 
 ;; This file is part of GNU Emacs.
 
diff --git a/packages/debbugs/debbugs-gnu.el b/packages/debbugs/debbugs-gnu.el
index 210554f..50487fc 100644
--- a/packages/debbugs/debbugs-gnu.el
+++ b/packages/debbugs/debbugs-gnu.el
@@ -1,12 +1,11 @@
 ;;; debbugs-gnu.el --- interface for the GNU bug tracker
 
-;; Copyright (C) 2011-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2016 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <address@hidden>
 ;;         Michael Albinus <address@hidden>
 ;; Keywords: comm, hypermedia, maint
 ;; Package: debbugs
-;; Version: 0.7
 
 ;; This file is not part of GNU Emacs.
 
@@ -59,7 +58,7 @@
 ;; If a prefix is given to the command, more search parameters are
 ;; asked for, like packages (also a comma separated list, "emacs" is
 ;; the default), whether archived bugs shall be shown, and whether
-;; closed bugs shall be shown.
+;; closed bugs shall be suppressed from being retrieved.
 
 ;; Another command is
 ;;
@@ -76,20 +75,20 @@
 
 ;; The bug reports are downloaded from the bug tracker.  In order to
 ;; not generate too much load of the server, up to 500 bugs will be
-;; downloaded at once.  If there are more hits, you will be asked to
-;; change this limit, but please don't increase this number too much.
+;; downloaded at once.  If there are more hits, several downloads will
+;; be performed, until all bugs are retrieved.
 
 ;; These default values could be changed also by customer options
-;; `debbugs-gnu-default-severities', `debbugs-gnu-default-packages',
-;; `debbugs-gnu-default-hits-per-page' and `debbugs-gnu-default-suppress-bugs'.
+;; `debbugs-gnu-default-severities', `debbugs-gnu-default-packages'
+;; and `debbugs-gnu-default-suppress-bugs'.
 
-;; The commands create one or more pages of bug lists.  Every bug is
-;; shown in one line, including the bug number, the status (combining
-;; merged bug numbers, keywords and severities), the name of the
-;; submitter, and the title of the bug.  On every bug line you could
-;; apply the following actions by the following keystrokes:
+;; The commands create a page of bug lists.  Every bug is shown in one
+;; line, including the bug number, the status (combining merged bug
+;; numbers, keywords and severities), the name of the submitter, and
+;; the title of the bug.  On every bug line you could apply the
+;; following actions by the following keystrokes:
 
-;;   RET: Show corresponding messages in Gnus
+;;   RET: Show corresponding messages in Gnus/Rmail
 ;;   "C": Send a control message
 ;;   "t": Mark the bug locally as tagged
 ;;   "b": Show bugs this bug is blocked by
@@ -103,10 +102,11 @@
 ;;   "s": Toggle bug sorting for age or for state
 ;;   "x": Toggle suppressing of bugs
 ;;   "/": Display only bugs matching a string
+;;   "R": Display only bugs blocking the current release
 ;;   "w": Display all the currently selected bug reports
 
-;; When you visit the related bug messages in Gnus, you could also
-;; send control messages by keystroke "C".
+;; When you visit the related bug messages in Gnus or Rmail, you could
+;; also send control messages by keystroke "C".
 
 ;; In the header line of every bug list page, you can toggle sorting
 ;; per column by selecting a column with the mouse.  The sorting
@@ -119,11 +119,11 @@
 
 ;; This command shows you all existing user tags for the packages
 ;; defined in `debbugs-gnu-default-packages'.  A prefix for the
-;; command allows you to use other packe names, or an arbitrary string
-;; for a user who has tagged bugs.  The command returns the list of
-;; existing user tags for the given user(s) or package name(s),
-;; respectively.  Applying RET on a user tag, all bugs tagged with
-;; this user tag are shown.
+;; command allows you to use other package names, or an arbitrary
+;; string for a user who has tagged bugs.  The command returns the
+;; list of existing user tags for the given user(s) or package
+;; name(s), respectively.  Applying RET on a user tag, all bugs tagged
+;; with this user tag are shown.
 
 ;; Unfortunately, it is not possible with the SOAP interface to show
 ;; all users who have tagged bugs.  This list can be retrieved via
@@ -139,14 +139,14 @@
 ;;; Code:
 
 (require 'debbugs)
-(require 'widget)
-(require 'wid-edit)
 (require 'tabulated-list)
 (require 'add-log)
+(require 'subr-x)
 (eval-when-compile (require 'cl))
 
 (autoload 'article-decode-charset "gnus-art")
 (autoload 'diff-goto-source "diff-mode")
+(autoload 'diff-hunk-file-names "diff-mode")
 (autoload 'gnus-article-mime-handles "gnus-art")
 (autoload 'gnus-read-ephemeral-emacs-bug-group "gnus-group")
 (autoload 'gnus-summary-article-header "gnus-sum")
@@ -155,20 +155,46 @@
 (autoload 'gnus-with-article-buffer "gnus-art")
 (autoload 'log-edit-insert-changelog "log-edit")
 (autoload 'mail-header-subject "nnheader")
+(autoload 'message-goto-body "message")
 (autoload 'message-make-from "message")
+(autoload 'rmail-get-new-mail "rmail")
+(autoload 'rmail-show-message "rmail")
+(autoload 'rmail-summary "rmailsum")
 (autoload 'vc-dir-hide-up-to-date "vc-dir")
 (autoload 'vc-dir-mark "vc-dir")
+
 (defvar compilation-in-progress)
+(defvar diff-file-header-re)
+(defvar gnus-article-buffer)
+(defvar gnus-posting-styles)
+(defvar gnus-save-duplicate-list)
+(defvar gnus-suppress-duplicates)
+(defvar rmail-current-message)
+(defvar rmail-mode-map)
+(defvar rmail-summary-mode-map)
+(defvar rmail-total-messages)
+
+;; Buffer-local variables.
+(defvar debbugs-gnu-local-query)
+(defvar debbugs-gnu-local-filter)
+(defvar debbugs-gnu-local-suppress)
+(defvar debbugs-gnu-sort-state)
+(defvar debbugs-gnu-limit)
 
 (defgroup debbugs-gnu ()
   "UI for the debbugs.gnu.org bug tracker."
   :group 'debbugs
   :version "24.1")
 
+(defvar debbugs-gnu-blocking-report 19759
+  "The ID of the current release report used to track blocking bug reports.")
+
 (defcustom debbugs-gnu-default-severities '("serious" "important" "normal")
   "*The list severities bugs are searched for.
 \"tagged\" is not a severity but marks locally tagged bugs."
   ;; <http://debbugs.gnu.org/Developer.html#severities>
+  ;; /ssh:debbugs:/etc/debbugs/config @gSeverityList
+  ;; We don't use "critical" and "grave".
   :group 'debbugs-gnu
   :type '(set (const "serious")
              (const "important")
@@ -217,23 +243,26 @@
   (mapcar 'cadr (cdr (get 'debbugs-gnu-default-packages 'custom-type)))
   "*List of all possible package names.")
 
-(defcustom debbugs-gnu-default-hits-per-page 500
-  "*The number of bugs shown per page."
-  :group 'debbugs-gnu
-  :type 'integer
-  :version "24.1")
-
 (defcustom debbugs-gnu-default-suppress-bugs
   '((pending . "done"))
   "*A list of specs for bugs to be suppressed.
 An element of this list is a cons cell \(KEY . REGEXP\), with key
-being returned by `debbugs-get-status', and VAL a regular
+being returned by `debbugs-get-status', and REGEXP a regular
 expression matching the corresponding value, a string.  Showing
 suppressed bugs is toggled by `debbugs-gnu-toggle-suppress'."
   :group 'debbugs-gnu
   :type '(alist :key-type symbol :value-type regexp)
   :version "24.1")
 
+(defcustom debbugs-gnu-mail-backend 'gnus
+  "*The email backend to use for reading bug report email exchange.
+If this is 'gnus, the default, use Gnus.
+If this is 'rmail, use Rmail instead."
+  :group 'debbugs-gnu
+  :type '(choice (const :tag "Use Gnus" 'gnus)
+                (const :tag "Use Rmail" 'rmail))
+  :version "25.1")
+
 (defface debbugs-gnu-archived '((t (:inverse-video t)))
   "Face for archived bug reports.")
 
@@ -255,14 +284,6 @@ suppressed bugs is toggled by 
`debbugs-gnu-toggle-suppress'."
 (defface debbugs-gnu-tagged '((t (:foreground "red")))
   "Face for reports that have been tagged locally.")
 
-(defvar debbugs-gnu-widgets nil)
-
-(defvar debbugs-gnu-widget-map
-  (let ((map (make-sparse-keymap)))
-    (define-key map "\r" 'widget-button-press)
-    (define-key map [mouse-2] 'widget-button-press)
-    map))
-
 (defvar debbugs-gnu-local-tags nil
   "List of bug numbers tagged locally, and kept persistent.")
 
@@ -277,7 +298,7 @@ suppressed bugs is toggled by 
`debbugs-gnu-toggle-suppress'."
      ";; -*- emacs-lisp -*-\n"
      ";; Debbugs tags connection history.  Don't change this file.\n\n"
      (format "(setq debbugs-gnu-local-tags '%S)"
-            (sort (copy-sequence debbugs-gnu-local-tags) '<)))))
+            (sort (copy-sequence debbugs-gnu-local-tags) '>)))))
 
 (defvar debbugs-gnu-current-query nil
   "The query object of the current search.
@@ -291,6 +312,11 @@ It will be applied client-side, when parsing the results of
 `debbugs-gnu-default-suppress-bugs'.  In case of keys representing
 a date, value is the cons cell \(BEFORE . AFTER\).")
 
+(defvar debbugs-gnu-current-suppress nil
+  "Whether bugs shall be suppressed.
+The specification which bugs shall be suppressed is taken from
+  `debbugs-gnu-default-suppress-bugs'.")
+
 (defun debbugs-gnu-calendar-read (prompt acceptable &optional initial-contents)
   "Return a string read from the minibuffer.
 Derived from `calendar-read'."
@@ -328,6 +354,8 @@ marked as \"client-side filter\"."
        (if (zerop (length phrase))
            (setq phrase nil)
          (add-to-list 'debbugs-gnu-current-query (cons 'phrase phrase)))
+       ;; We suppress closed bugs if there is no phrase.
+       (setq debbugs-gnu-current-suppress (null phrase))
 
        ;; The other queries.
        (catch :finished
@@ -438,11 +466,7 @@ marked as \"client-side filter\"."
             (t (throw :finished nil)))))
 
        ;; Do the search.
-       (debbugs-gnu severities packages archivedp))
-
-    ;; Reset query and filter.
-    (setq debbugs-gnu-current-query nil
-         debbugs-gnu-current-filter nil)))
+       (debbugs-gnu severities packages archivedp))))
 
 ;;;###autoload
 (defun debbugs-gnu (severities &optional packages archivedp suppress tags)
@@ -474,81 +498,40 @@ marked as \"client-side filter\"."
     (with-temp-buffer
       (insert-file-contents debbugs-gnu-persistency-file)
       (eval (read (current-buffer)))))
-  (setq debbugs-gnu-widgets nil)
+  ;; Per default, we suppress retrieved unwanted bugs.
+  (when (called-interactively-p 'any)
+    (setq debbugs-gnu-current-suppress t))
 
   ;; Add queries.
   (dolist (severity (if (consp severities) severities (list severities)))
     (when (not (zerop (length severity)))
+      (when (string-equal severity "tagged")
+       (setq debbugs-gnu-current-suppress nil))
       (add-to-list 'debbugs-gnu-current-query (cons 'severity severity))))
   (dolist (package (if (consp packages) packages (list packages)))
     (when (not (zerop (length package)))
       (add-to-list 'debbugs-gnu-current-query (cons 'package package))))
   (when archivedp
+    (setq debbugs-gnu-current-suppress nil)
     (add-to-list 'debbugs-gnu-current-query '(archive . "1")))
   (when suppress
+    (setq debbugs-gnu-current-suppress t)
     (add-to-list 'debbugs-gnu-current-query '(status . "open"))
     (add-to-list 'debbugs-gnu-current-query '(status . "forwarded")))
   (dolist (tag (if (consp tags) tags (list tags)))
     (when (not (zerop (length tag)))
       (add-to-list 'debbugs-gnu-current-query (cons 'tag tag))))
 
-  (unwind-protect
-      (let ((hits debbugs-gnu-default-hits-per-page)
-           (ids (debbugs-gnu-get-bugs debbugs-gnu-current-query)))
-
-       (if (> (length ids) hits)
-           (let ((cursor-in-echo-area nil))
-             (setq hits
-                   (string-to-number
-                    (read-string
-                     (format
-                      "How many reports (available %d, default %d): "
-                      (length ids) hits)
-                     nil
-                     nil
-                     (number-to-string hits))))))
-
-       (if (> (length ids) hits)
-           (let ((i 0)
-                 curr-ids)
-             (while ids
-               (setq i (1+ i)
-                     curr-ids (butlast ids (- (length ids) hits)))
-               (add-to-list
-                'debbugs-gnu-widgets
-                (widget-convert
-                 'push-button
-                 :follow-link 'mouse-face
-                 :notify (lambda (widget &rest ignore)
-                           (debbugs-gnu-show-reports widget))
-                 :keymap debbugs-gnu-widget-map
-                 :suppress suppress
-                 :buffer-name (format "*Emacs Bugs*<%d>" i)
-                 :bug-ids curr-ids
-                 :query debbugs-gnu-current-query
-                 :filter debbugs-gnu-current-filter
-                 :help-echo (format "%d-%d" (car ids) (car (last curr-ids)))
-                 :format " %[%v%]"
-                 (number-to-string i))
-                'append)
-               (setq ids (last ids (- (length ids) hits))))
-             (debbugs-gnu-show-reports (car debbugs-gnu-widgets)))
-
-         (debbugs-gnu-show-reports
-          (widget-convert
-           'const
-           :suppress suppress
-           :buffer-name "*Emacs Bugs*"
-           :bug-ids ids
-           :query debbugs-gnu-current-query
-           :filter debbugs-gnu-current-filter))))
-
-    ;; Reset query and filter.
-    (setq debbugs-gnu-current-query nil
-         debbugs-gnu-current-filter nil)))
+  ;; Show result.
+  (debbugs-gnu-show-reports)
+
+  ;; Reset query, filter and suppress.
+  (setq debbugs-gnu-current-query nil
+       debbugs-gnu-current-filter nil
+       debbugs-gnu-current-suppress nil))
 
 (defun debbugs-gnu-get-bugs (query)
-  "Retrieve bugs numbers from debbugs.gnu.org according search criteria."
+  "Retrieve bug numbers from debbugs.gnu.org according search criteria."
   (let* ((debbugs-port "gnu.org")
         (bugs (assoc 'bugs query))
         (tags (assoc 'tag query))
@@ -567,7 +550,7 @@ marked as \"client-side filter\"."
               (if phrase
                   (cond
                    ((eq (car elt) 'phrase)
-                    (list (list :phrase (cdr elt) :max 500)))
+                    (list (list :phrase (cdr elt))))
                    ((eq (car elt) 'date)
                     (list (list :date (cddr elt) (cadr elt)
                                 :operator "NUMBT")))
@@ -577,44 +560,39 @@ marked as \"client-side filter\"."
                 (list (intern (concat ":" (symbol-name (car elt))))
                       (cdr elt)))))))
 
-    (sort
-     (cond
-      ;; If the query is just a list of bug numbers, we return them.
-      (bugs (cdr bugs))
-      ;; If the query contains the pseudo-severity "tagged", we return
-      ;; just the local tagged bugs.
-      (local-tags (copy-sequence debbugs-gnu-local-tags))
-      ;; A full text query.
-      (phrase
-       (mapcar
-       (lambda (x) (cdr (assoc "id" x)))
-       (apply 'debbugs-search-est args)))
-      ;; User tags.
-      (tags
-       (setq args (mapcar (lambda (x) (if (eq x :package) :user x)) args))
-       (apply 'debbugs-get-usertag args))
-      ;; Otherwise, we retrieve the bugs from the server.
-      (t (apply 'debbugs-get-bugs args)))
-     ;; Sort function.
-     '<)))
-
-(defvar debbugs-gnu-current-widget nil)
-(defvar debbugs-gnu-current-limit nil)
-
-(defun debbugs-gnu-show-reports (widget)
-  "Show bug reports as given in WIDGET property :bug-ids."
-  ;; The tabulated mode sets several local variables.  We must get rid
-  ;; of them.
-  (when (get-buffer (widget-get widget :buffer-name))
-    (kill-buffer (widget-get widget :buffer-name)))
-  (pop-to-buffer (get-buffer-create (widget-get widget :buffer-name)))
-  (debbugs-gnu-mode)
+    (cond
+     ;; If the query is just a list of bug numbers, we return them.
+     (bugs (cdr bugs))
+     ;; If the query contains the pseudo-severity "tagged", we return
+     ;; just the local tagged bugs.
+     (local-tags (copy-sequence debbugs-gnu-local-tags))
+     ;; A full text query.
+     (phrase
+      (mapcar
+       (lambda (x) (cdr (assoc "id" x)))
+       (apply 'debbugs-search-est args)))
+     ;; User tags.
+     (tags
+      (setq args (mapcar (lambda (x) (if (eq x :package) :user x)) args))
+      (apply 'debbugs-get-usertag args))
+     ;; Otherwise, we retrieve the bugs from the server.
+     (t (apply 'debbugs-get-bugs args)))))
+
+(defun debbugs-gnu-show-reports ()
+  "Show bug reports."
   (let ((inhibit-read-only t)
-       (debbugs-port "gnu.org"))
-    (erase-buffer)
-    (set (make-local-variable 'debbugs-gnu-current-widget) widget)
-
-    (dolist (status (apply 'debbugs-get-status (widget-get widget :bug-ids)))
+       (buffer-name "*Emacs Bugs*"))
+    ;; The tabulated mode sets several local variables.  We must get
+    ;; rid of them.
+    (when (get-buffer buffer-name)
+      (kill-buffer buffer-name))
+    (switch-to-buffer (get-buffer-create buffer-name))
+    (debbugs-gnu-mode)
+
+    ;; Print bug reports.
+    (dolist (status
+            (apply 'debbugs-get-status
+                   (debbugs-gnu-get-bugs debbugs-gnu-local-query)))
       (let* ((id (cdr (assq 'id status)))
             (words
              (mapconcat
@@ -622,19 +600,20 @@ marked as \"client-side filter\"."
               (cons (cdr (assq 'severity status))
                     (cdr (assq 'keywords status)))
               ","))
-            (address (mail-header-parse-address
-                      (decode-coding-string (cdr (assq 'originator status))
-                                            'utf-8)))
+            (address (if (cdr (assq 'originator status))
+                         (mail-header-parse-address
+                          (decode-coding-string (cdr (assq 'originator status))
+                                                'utf-8))))
             (owner (if (cdr (assq 'owner status))
                        (car (mail-header-parse-address
                              (decode-coding-string (cdr (assq 'owner status))
                                                    'utf-8)))))
-            (subject (decode-coding-string (cdr (assq 'subject status))
-                                           'utf-8))
+            (subject (if (cdr (assq 'subject status))
+                         (decode-coding-string (cdr (assq 'subject status))
+                                               'utf-8)))
             merged)
        (unless (equal (cdr (assq 'pending status)) "pending")
-         (setq words
-               (concat words "," (cdr (assq 'pending status)))))
+         (setq words (concat words "," (cdr (assq 'pending status)))))
        (let ((packages (delete "emacs" (cdr (assq 'package status)))))
          (when packages
            (setq words (concat words "," (mapconcat 'identity packages ",")))))
@@ -667,7 +646,7 @@ marked as \"client-side filter\"."
                'default))
             (propertize
              ;; Mark status and age.
-             words
+             (or words "")
              'face
              (cond
               ((cdr (assq 'archived status))
@@ -688,7 +667,8 @@ marked as \"client-side filter\"."
             (propertize
              ;; Prefer the name over the address.
              (or (cdr address)
-                 (car address))
+                 (car address)
+                 "")
              'face
              ;; Mark own submitted bugs.
              (if (and (stringp (car address))
@@ -696,7 +676,7 @@ marked as \"client-side filter\"."
                  'debbugs-gnu-tagged
                'default))
             (propertize
-             subject
+             (or subject "")
              'face
              ;; Mark owned bugs.
              (if (and (stringp owner)
@@ -704,6 +684,7 @@ marked as \"client-side filter\"."
                  'debbugs-gnu-tagged
                'default))))
           'append))))
+
     (tabulated-list-init-header)
     (tabulated-list-print)
 
@@ -713,24 +694,6 @@ marked as \"client-side filter\"."
 (defun debbugs-gnu-print-entry (list-id cols)
   "Insert a debbugs entry at point.
 Used instead of `tabulated-list-print-entry'."
-  ;; This shall be in `debbugs-gnu-show-reports'.  But
-  ;; `tabulated-list-print' erases the buffer, therefore we do it
-  ;; here.  (bug#9047)
-  (when (and debbugs-gnu-widgets (= (point) (point-min)))
-    (widget-insert "Page:")
-    (mapc
-     (lambda (obj)
-       (if (eq obj debbugs-gnu-current-widget)
-          (widget-put obj :button-face 'widget-button-pressed)
-        (widget-put obj :button-face 'widget-button-face))
-       (widget-apply obj :create))
-     debbugs-gnu-widgets)
-    (widget-insert "\n\n")
-    (save-excursion
-      (widget-insert "\nPage:")
-      (mapc (lambda (obj) (widget-apply obj :create)) debbugs-gnu-widgets)
-      (widget-setup)))
-
   (let ((beg (point))
        (pos 0)
        (case-fold-search t)
@@ -744,22 +707,20 @@ Used instead of `tabulated-list-print-entry'."
        (title-length     (nth 1 (aref tabulated-list-format 3))))
     (when (and
           ;; We may have a narrowing in effect.
-          (or (not debbugs-gnu-current-limit)
-              (memq (cdr (assq 'id list-id)) debbugs-gnu-current-limit))
+          (or (not debbugs-gnu-limit)
+              (memq (cdr (assq 'id list-id)) debbugs-gnu-limit))
           ;; Filter suppressed bugs.
-          (or (not (widget-get debbugs-gnu-current-widget :suppress))
-              (and (not (memq (cdr (assq 'id list-id)) debbugs-gnu-local-tags))
-                   (not (catch :suppress
-                          (dolist (check debbugs-gnu-default-suppress-bugs)
-                            (when
-                                (string-match
-                                 (cdr check)
-                                 (or (cdr (assq (car check) list-id)) ""))
-                              (throw :suppress t)))))))
+          (or (not debbugs-gnu-local-suppress)
+              (not (catch :suppress
+                     (dolist (check debbugs-gnu-default-suppress-bugs)
+                       (when
+                           (string-match
+                            (cdr check)
+                            (or (cdr (assq (car check) list-id)) ""))
+                         (throw :suppress t))))))
           ;; Filter search list.
           (not (catch :suppress
-                 (dolist (check
-                          (widget-get debbugs-gnu-current-widget :filter))
+                 (dolist (check debbugs-gnu-local-filter)
                    (let ((val (cdr (assq (car check) list-id))))
                      (if (stringp (cdr check))
                          ;; Regular expression.
@@ -794,54 +755,109 @@ Used instead of `tabulated-list-print-entry'."
       (insert (propertize title 'help-echo title))
       ;; Add properties.
       (add-text-properties
-       beg (point) `(tabulated-list-id ,list-id mouse-face ,widget-mouse-face))
+       beg (point)
+       `(tabulated-list-id ,list-id mouse-face highlight))
       (insert ?\n))))
 
+(defun debbugs-gnu-menu-map-emacs-enabled ()
+  "Whether \"Show Release Blocking Bugs\" is enabled in the menu."
+  (or ;; No package discriminator has been used.
+      (not (assq 'package debbugs-gnu-local-query))
+      ;; Package "emacs" has been selected.
+      (member '(package . "emacs") debbugs-gnu-local-query)))
+
+(defconst debbugs-gnu-bug-triage-file
+  (expand-file-name "../admin/notes/bug-triage" data-directory)
+  "The \"bug-triage\" file.")
+
+(defun debbugs-gnu-menu-map-bug-triage-enabled ()
+  "Whether \"Describe Bug Triage Procedure\" is enabled in the menu."
+  (and (debbugs-gnu-menu-map-emacs-enabled)
+       (stringp debbugs-gnu-bug-triage-file)
+       (file-readable-p debbugs-gnu-bug-triage-file)))
+
+(defun debbugs-gnu-view-bug-triage ()
+  "Show \"bug-triage\" file."
+  (interactive)
+  (view-file debbugs-gnu-bug-triage-file))
+
 (defvar debbugs-gnu-mode-map
-  (let ((map (make-sparse-keymap)))
+  (let ((map (make-sparse-keymap))
+       (menu-map (make-sparse-keymap)))
     (set-keymap-parent map tabulated-list-mode-map)
     (define-key map "\r" 'debbugs-gnu-select-report)
     (define-key map [mouse-1] 'debbugs-gnu-select-report)
     (define-key map [mouse-2] 'debbugs-gnu-select-report)
+    (define-key map "g" 'debbugs-gnu-rescan)
+    (define-key map "R" 'debbugs-gnu-show-all-blocking-reports)
+    (define-key map "C" 'debbugs-gnu-send-control-message)
+
     (define-key map "s" 'debbugs-gnu-toggle-sort)
     (define-key map "t" 'debbugs-gnu-toggle-tag)
-    (define-key map "d" 'debbugs-gnu-display-status)
-    (define-key map "g" 'debbugs-gnu-rescan)
     (define-key map "x" 'debbugs-gnu-toggle-suppress)
     (define-key map "/" 'debbugs-gnu-narrow-to-status)
     (define-key map "w" 'debbugs-gnu-widen)
+
     (define-key map "b" 'debbugs-gnu-show-blocked-by-reports)
     (define-key map "B" 'debbugs-gnu-show-blocking-reports)
-    (define-key map "C" 'debbugs-gnu-send-control-message)
+    (define-key map "d" 'debbugs-gnu-display-status)
+
+    (define-key map [menu-bar debbugs] (cons "Debbugs" menu-map))
+    (define-key menu-map [debbugs-gnu-select-report]
+      '(menu-item "Show Reports" debbugs-gnu-select-report
+                 :help "Show all reports belonging to this bug"))
+    (define-key-after menu-map [debbugs-gnu-rescan]
+      '(menu-item "Refresh Bugs" debbugs-gnu-rescan
+                 :help "Refresh bug list")
+      'debbugs-gnu-select-report)
+    (define-key-after menu-map [debbugs-gnu-show-all-blocking-reports]
+      '(menu-item "Show Release Blocking Bugs"
+                 debbugs-gnu-show-all-blocking-reports
+                 :enable (debbugs-gnu-menu-map-emacs-enabled)
+                 :help "Show all bugs blocking next Emacs release")
+      'debbugs-gnu-rescan)
+    (define-key-after menu-map [debbugs-gnu-send-control-message]
+      '(menu-item "Send Control Message"
+                 debbugs-gnu-send-control-message
+                 :help "Send control message to debbugs.gnu.org")
+      'debbugs-gnu-show-all-blocking-reports)
+
+    (define-key-after menu-map [debbugs-gnu-separator1]
+      '(menu-item "--") 'debbugs-gnu-send-control-message)
+    (define-key-after menu-map [debbugs-gnu-search]
+      '(menu-item "Search Bugs" debbugs-gnu-search
+                 :help "Search bugs on debbugs.gnu.org")
+      'debbugs-gnu-separator1)
+    (define-key-after menu-map [debbugs-gnu]
+      '(menu-item "Retrieve Bugs" debbugs-gnu
+                 :help "Retrieve bugs from debbugs.gnu.org")
+      'debbugs-gnu-search)
+    (define-key-after menu-map [debbugs-gnu-bugs]
+      '(menu-item "Retrieve Bugs by Number" debbugs-gnu-bugs
+                 :help "Retrieve selected bugs from debbugs.gnu.org")
+      'debbugs-gnu)
+
+    (define-key-after menu-map [debbugs-gnu-separator2]
+      '(menu-item "--") 'debbugs-gnu-bugs)
+    (define-key-after menu-map [debbugs-gnu-view-bug-triage]
+      '(menu-item "Describe Bug Triage Procedure"
+                 debbugs-gnu-view-bug-triage
+                 :enable (debbugs-gnu-menu-map-bug-triage-enabled)
+                 :help "Show procedure of triaging bugs")
+      'debbugs-gnu-separator2)
     map))
 
 (defun debbugs-gnu-rescan ()
   "Rescan the current set of bug reports."
   (interactive)
-
-  ;; The last page will be provided with new bug ids.
-  ;; TODO: Do it also for the other pages.
-  (when (and debbugs-gnu-widgets
-            (eq debbugs-gnu-current-widget (car (last debbugs-gnu-widgets))))
-    (let ((first-id (car (widget-get debbugs-gnu-current-widget :bug-ids)))
-         (last-id  (car
-                    (last (widget-get debbugs-gnu-current-widget :bug-ids))))
-         (ids (debbugs-gnu-get-bugs
-               (widget-get debbugs-gnu-current-widget :query))))
-
-      (while (and (<= first-id last-id) (not (memq first-id ids)))
-       (setq first-id (1+ first-id)))
-
-      (when (<= first-id last-id)
-       (widget-put debbugs-gnu-current-widget :bug-ids (memq first-id ids)))))
-
-  ;; Refresh the buffer.  `save-excursion' does not work, so we
-  ;; remember the position.
-  (let ((pos (point)))
-    (debbugs-gnu-show-reports debbugs-gnu-current-widget)
-    (goto-char pos)))
-
-(defvar debbugs-gnu-sort-state 'number)
+  (let ((id (debbugs-gnu-current-id))
+       (debbugs-gnu-current-query debbugs-gnu-local-query)
+       (debbugs-gnu-current-filter debbugs-gnu-local-filter)
+       (debbugs-gnu-current-suppress debbugs-gnu-local-suppress)
+       (debbugs-cache-expiry (if current-prefix-arg t debbugs-cache-expiry)))
+    (debbugs-gnu-show-reports)
+    (when id
+      (debbugs-gnu-goto id))))
 
 (define-derived-mode debbugs-gnu-mode tabulated-list-mode "Debbugs"
   "Major mode for listing bug reports.
@@ -853,7 +869,13 @@ The following commands are available:
 
 \\{debbugs-gnu-mode-map}"
   (set (make-local-variable 'debbugs-gnu-sort-state) 'number)
-  (set (make-local-variable 'debbugs-gnu-current-limit) nil)
+  (set (make-local-variable 'debbugs-gnu-limit) nil)
+  (set (make-local-variable 'debbugs-gnu-local-query)
+       debbugs-gnu-current-query)
+  (set (make-local-variable 'debbugs-gnu-local-filter)
+       debbugs-gnu-current-filter)
+  (set (make-local-variable 'debbugs-gnu-local-suppress)
+       debbugs-gnu-current-suppress)
   (setq tabulated-list-format [("Id"         5 debbugs-gnu-sort-id)
                               ("State"     20 debbugs-gnu-sort-state)
                               ("Submitter" 25 t)
@@ -865,7 +887,7 @@ The following commands are available:
   (setq buffer-read-only t))
 
 (defun debbugs-gnu-sort-id (s1 s2)
-  (< (cdr (assq 'id (car s1)))
+  (> (cdr (assq 'id (car s1)))
      (cdr (assq 'id (car s2)))))
 
 (defconst debbugs-gnu-state-preference
@@ -941,7 +963,7 @@ The following commands are available:
   (interactive)
   (let ((id (debbugs-gnu-current-id t))
        (inhibit-read-only t))
-    (setq debbugs-gnu-current-limit nil)
+    (setq debbugs-gnu-limit nil)
     (tabulated-list-init-header)
     (tabulated-list-print)
     (when id
@@ -965,6 +987,26 @@ The following commands are available:
        (message "Bug %d is not blocking any other bug" id)
       (apply 'debbugs-gnu-bugs (cdr (assq 'blocks status))))))
 
+(defun debbugs-gnu-show-all-blocking-reports ()
+  "Narrow the display to just the reports that are blocking a release."
+  (interactive)
+  (let ((blockers (cdr (assq 'blockedby
+                            (car (debbugs-get-status
+                                  debbugs-gnu-blocking-report)))))
+       (id (debbugs-gnu-current-id t))
+       (inhibit-read-only t)
+       status)
+    (setq debbugs-gnu-limit nil)
+    (goto-char (point-min))
+    (while (not (eobp))
+      (setq status (debbugs-gnu-current-status))
+      (if (not (memq (cdr (assq 'id status)) blockers))
+         (delete-region (point) (progn (forward-line 1) (point)))
+       (push (cdr (assq 'id status)) debbugs-gnu-limit)
+       (forward-line 1)))
+    (when id
+      (debbugs-gnu-goto id))))
+
 (defun debbugs-gnu-narrow-to-status (string &optional status-only)
   "Only display the bugs matching STRING.
 If STATUS-ONLY (the prefix), ignore matches in the From and
@@ -973,20 +1015,21 @@ Subject fields."
   (let ((id (debbugs-gnu-current-id t))
        (inhibit-read-only t)
        status)
-    (setq debbugs-gnu-current-limit nil)
+    (setq debbugs-gnu-limit nil)
     (if (equal string "")
        (debbugs-gnu-toggle-suppress)
       (goto-char (point-min))
       (while (not (eobp))
        (setq status (debbugs-gnu-current-status))
        (if (and (not (member string (assq 'keywords status)))
-                (not (member string (assq 'severity status)))
+                (not (equal string (cdr (assq 'severity status))))
                 (or status-only
-                    (not (string-match string (cdr (assq 'originator 
status)))))
+                    (not (string-match
+                          string (cdr (assq 'originator status)))))
                 (or status-only
                     (not (string-match string (cdr (assq 'subject status))))))
            (delete-region (point) (progn (forward-line 1) (point)))
-         (push (cdr (assq 'id status)) debbugs-gnu-current-limit)
+         (push (cdr (assq 'id status)) debbugs-gnu-limit)
          (forward-line 1)))
       (when id
        (debbugs-gnu-goto id)))))
@@ -1033,8 +1076,7 @@ interest to you."
 (defun debbugs-gnu-toggle-suppress ()
   "Suppress bugs marked in `debbugs-gnu-suppress-bugs'."
   (interactive)
-  (widget-put debbugs-gnu-current-widget :suppress
-             (not (widget-get debbugs-gnu-current-widget :suppress)))
+  (setq debbugs-gnu-local-suppress (not debbugs-gnu-local-suppress))
   (tabulated-list-init-header)
   (tabulated-list-print))
 
@@ -1049,22 +1091,78 @@ interest to you."
 (defun debbugs-gnu-current-status ()
   (get-text-property (line-beginning-position) 'tabulated-list-id))
 
-(defun debbugs-gnu-current-query ()
-  (widget-get debbugs-gnu-current-widget :query))
-
-(defun debbugs-gnu-display-status (query status)
-  "Display the query and status of the report on the current line."
-  (interactive (list (debbugs-gnu-current-query)
+(defun debbugs-gnu-display-status (query filter status)
+  "Display the query, filter and status of the report on the current line."
+  (interactive (list debbugs-gnu-local-query
+                    debbugs-gnu-local-filter
                     (debbugs-gnu-current-status)))
-  (pop-to-buffer "*Bug Status*")
+  (switch-to-buffer "*Bug Status*")
   (let ((inhibit-read-only t))
     (erase-buffer)
-    (when query (pp query (current-buffer)))
-    (when status (pp status (current-buffer)))
+    (when query
+      (insert ";; Query\n")
+      (pp query (current-buffer))
+      (insert "\n"))
+    (when filter
+      (insert ";; Filter\n")
+      (pp filter (current-buffer))
+      (insert "\n"))
+    (when status
+      (insert ";; Status\n")
+      (pp status (current-buffer)))
     (goto-char (point-min)))
   (set-buffer-modified-p nil)
   (special-mode))
 
+(defun debbugs-read-emacs-bug-with-rmail (id status merged)
+  "Read email exchange for debbugs bug ID.
+STATUS is the bug's status list.
+MERGED is the list of bugs merged with this one."
+  (let* ((mbox-dir (make-temp-file "debbugs" t))
+        (mbox-fname (format "%s/bug_%d.mbox" mbox-dir id)))
+    (debbugs-get-mbox id 'mboxmaint mbox-fname)
+    (rmail mbox-fname)
+    ;; Download messages of all the merged bug reports and append them
+    ;; to the mailbox of the requested bug.
+    (when merged
+      (dolist (bugno merged)
+       (let ((fn (make-temp-file "url")))
+         (debbugs-get-mbox bugno 'mboxmaint fn)
+         (rmail-get-new-mail fn)
+         (delete-file fn)
+         ;; Remove the 'unseen' attribute from all the messages we've
+         ;; just read, so that all of them appear in the summary with
+         ;; the same face.
+         (while (< rmail-current-message rmail-total-messages)
+           (rmail-show-message (1+ rmail-current-message))))))
+    (set (make-local-variable 'debbugs-gnu-bug-number) id)
+    (set (make-local-variable 'debbugs-gnu-subject)
+        (format "Re: bug#%d: %s" id (cdr (assq 'subject status))))
+    (rmail-summary)
+    (define-key rmail-summary-mode-map "C" 'debbugs-gnu-send-control-message)
+    (set-window-text-height nil 10)
+    (other-window 1)
+    (define-key rmail-mode-map "C" 'debbugs-gnu-send-control-message)
+    (rmail-show-message 1)))
+
+(defun debbugs-read-emacs-bug-with-gnus (id status merged)
+  "Read email exchange for debbugs bug ID.
+STATUS is the bug's status list.
+MERGED is the list of bugs merged with this one."
+  (require 'gnus-dup)
+  (setq gnus-suppress-duplicates t
+       gnus-save-duplicate-list t)
+  ;; Use Gnus.
+  (gnus-read-ephemeral-emacs-bug-group
+   (cons id (if (listp merged) merged (list merged)))
+   (cons (current-buffer)
+        (current-window-configuration)))
+  (with-current-buffer (window-buffer (selected-window))
+    (set (make-local-variable 'debbugs-gnu-bug-number) id)
+    (set (make-local-variable 'debbugs-gnu-subject)
+        (format "Re: bug#%d: %s" id (cdr (assq 'subject status))))
+    (debbugs-gnu-summary-mode 1)))
+
 (defun debbugs-gnu-select-report ()
   "Select the report on the current line."
   (interactive)
@@ -1072,17 +1170,15 @@ interest to you."
   (let* ((status (debbugs-gnu-current-status))
         (id (cdr (assq 'id status)))
         (merged (cdr (assq 'mergedwith status))))
-    (gnus-read-ephemeral-emacs-bug-group
-     (cons id (if (listp merged)
-                 merged
-               (list merged)))
-     (cons (current-buffer)
-          (current-window-configuration)))
-    (with-current-buffer (window-buffer (selected-window))
-      (set (make-local-variable 'debbugs-gnu-bug-number) id)
-      (set (make-local-variable 'debbugs-gnu-subject)
-          (format "Re: bug#%d: %s" id (cdr (assq 'subject status))))
-      (debbugs-gnu-summary-mode 1))))
+    (setq merged (if (listp merged) merged (list merged)))
+    (cond
+     ((not id)
+      (message "No bug report on the current line"))
+     ((eq debbugs-gnu-mail-backend 'rmail)
+      (debbugs-read-emacs-bug-with-rmail id status merged))
+     ((eq debbugs-gnu-mail-backend 'gnus)
+      (debbugs-read-emacs-bug-with-gnus id status merged))
+     (t (error "No valid mail backend specified")))))
 
 (defvar debbugs-gnu-summary-mode-map
   (let ((map (make-sparse-keymap)))
@@ -1090,8 +1186,6 @@ interest to you."
     (define-key map [(meta m)] 'debbugs-gnu-apply-patch)
     map))
 
-(defvar gnus-posting-styles)
-
 (define-minor-mode debbugs-gnu-summary-mode
   "Minor mode for providing a debbugs interface in Gnus summary buffers.
 
@@ -1149,6 +1243,7 @@ removed instead."
            "owner" "noowner"
            "invalid"
            "reassign"
+           "retitle"
            "patch" "wontfix" "moreinfo" "unreproducible" "fixed" "notabug"
            "pending" "help" "security" "confirmed"
            "usertag")
@@ -1180,6 +1275,7 @@ removed instead."
       (insert "To: address@hidden"
              "From: " (message-make-from) "\n"
              (format "Subject: control message for bug #%d\n" id)
+             mail-header-separator
              "\n"
              (cond
               ((member message '("unarchive" "unmerge" "reopen" "noowner"))
@@ -1201,6 +1297,8 @@ removed instead."
                  " ")))
               ((equal message "owner")
                (format "owner %d !\n" id))
+              ((equal message "retitle")
+               (format "retitle %d %s\n" id (read-string "New title: ")))
               ((equal message "reassign")
                (format "reassign %d %s\n" id (read-string "Package(s): ")))
               ((equal message "close")
@@ -1228,7 +1326,11 @@ removed instead."
                (format "tags %d%s %s\n"
                        id (if reverse " -" "")
                        message))))
-      (funcall send-mail-function))))
+      (funcall send-mail-function)
+      (remhash id debbugs-cache-data)
+      (message-goto-body)
+      (message "Control message sent:\n%s"
+              (buffer-substring-no-properties (point) (1- (point-max)))))))
 
 (defvar debbugs-gnu-usertags-mode-map
   (let ((map (make-sparse-keymap)))
@@ -1279,13 +1381,12 @@ The following commands are available:
        ;; Create buffer.
        (when (get-buffer buffer-name)
          (kill-buffer buffer-name))
-       (pop-to-buffer (get-buffer-create buffer-name))
+       (switch-to-buffer (get-buffer-create buffer-name))
        (debbugs-gnu-usertags-mode)
        (setq tabulated-list-format `[("User" ,user-tab-length t)
                                      ("Tag"  10 t)])
        (setq tabulated-list-sort-key (cons "User" nil))
        ;(setq tabulated-list-printer 'debbugs-gnu-print-entry)
-       (erase-buffer)
 
        ;; Retrieve user tags.
        (dolist (user users)
@@ -1294,8 +1395,8 @@ The following commands are available:
             'tabulated-list-entries
             ;; `tabulated-list-id' is the parameter list for `debbugs-gnu'.
             `((("tagged") (,user) nil nil (,tag))
-              ,(vector (propertize user 'mouse-face widget-mouse-face)
-                       (propertize tag 'mouse-face widget-mouse-face)))
+              ,(vector (propertize user 'mouse-face 'highlight)
+                       (propertize tag  'mouse-face 'highlight)))
             'append)))
 
        ;; Add local tags.
@@ -1303,8 +1404,8 @@ The following commands are available:
          (add-to-list
             'tabulated-list-entries
             `((("tagged"))
-              ,(vector "" (propertize "(local tags)"
-                                      'mouse-face widget-mouse-face)))))
+              ,(vector
+                "" (propertize "(local tags)" 'mouse-face 'highlight)))))
 
        ;; Show them.
        (tabulated-list-init-header)
@@ -1329,12 +1430,14 @@ The following commands are available:
   (dolist (elt bugs)
     (unless (natnump elt) (signal 'wrong-type-argument (list 'natnump elt))))
   (add-to-list 'debbugs-gnu-current-query (cons 'bugs bugs))
+  ;; We do not suppress bugs requested explicitely.
+  (setq debbugs-gnu-current-suppress nil)
   (debbugs-gnu nil))
 
 (defvar debbugs-gnu-trunk-directory "~/src/emacs/trunk/"
   "The directory where the main source tree lives.")
 
-(defvar debbugs-gnu-branch-directory "~/src/emacs/emacs-24/"
+(defvar debbugs-gnu-branch-directory "~/src/emacs/emacs-25/"
   "The directory where the previous source tree lives.")
 
 (defun debbugs-gnu-apply-patch (&optional branch)
@@ -1360,13 +1463,21 @@ If given a prefix, patch in the branch directory 
instead."
     (gnus-with-article-buffer
       (dolist (handle (mapcar 'cdr (gnus-article-mime-handles)))
        (when (string-match "diff\\|patch" (mm-handle-media-type handle))
-         (push (mm-handle-buffer handle) patch-buffers))))
+         (push (cons (mm-handle-encoding handle)
+                     (mm-handle-buffer handle))
+               patch-buffers))))
     (unless patch-buffers
       (gnus-summary-show-article 'raw)
       (article-decode-charset)
-      (push (current-buffer) patch-buffers))
-    (dolist (buffer patch-buffers)
-      (with-current-buffer buffer
+      (push (cons nil gnus-article-buffer) patch-buffers))
+    (dolist (elem patch-buffers)
+      (with-temp-buffer
+       (insert-buffer-substring (cdr elem))
+       (cond ((eq (car elem) 'base64)
+              (base64-decode-region (point-min) (point-max)))
+             ((eq (car elem) 'quoted-printable)
+              (quoted-printable-decode-region (point-min) (point-max))))
+       (debbugs-gnu-fix-patch dir)
        (call-process-region (point-min) (point-max)
                             "patch" nil output-buffer nil
                             "-r" rej "--no-backup-if-mismatch"
@@ -1402,6 +1513,36 @@ If given a prefix, patch in the branch directory 
instead."
     (switch-to-buffer "*vc-diff*")
     (goto-char (point-min))))
 
+(defun debbugs-gnu-fix-patch (dir)
+  (setq dir (directory-file-name (expand-file-name dir)))
+  (goto-char (point-min))
+  (while (re-search-forward diff-file-header-re nil t)
+    (goto-char (match-beginning 0))
+    (let ((target-name (car (diff-hunk-file-names))))
+      (when (and target-name
+                (or (not (string-match "/" target-name))
+                    (and (string-match "^[ab]/" target-name)
+                         (not (file-exists-p
+                               (expand-file-name (substring target-name 2)
+                                                 dir))))
+                    (file-exists-p (expand-file-name target-name dir))))
+       ;; We have a simple patch that refers to a file somewhere in the
+       ;; tree.  Find it.
+       (when-let ((files (directory-files-recursively
+                          dir
+                          (concat "^" (regexp-quote
+                                       (file-name-nondirectory target-name))
+                                      "$"))))
+         (when (re-search-forward (concat "^[+]+ "
+                                          (regexp-quote target-name)
+                                          "\\([ \t\n]\\)")
+                                  nil t)
+           (replace-match (concat "+++ a"
+                                  (substring (car files) (length dir))
+                                  (match-string 1))
+                          nil t)))))
+    (forward-line 2)))
+
 (defun debbugs-gnu-find-contributor (string)
   "Search through ChangeLogs to find contributors."
   (interactive "sContributor match: ")
@@ -1444,7 +1585,7 @@ If given a prefix, patch in the branch directory instead."
                         ;; Fall back on the email address.
                         (t
                          (cadr from))))))
-         (goto-char (point-min))
+         (goto-char (point-max))
          (end-of-line)
          (insert "  (tiny change"))
        (goto-char point)))))
@@ -1491,7 +1632,11 @@ If given a prefix, patch in the branch directory 
instead."
   (save-some-buffers t)
    (when (get-buffer "*vc-dir*")
      (kill-buffer (get-buffer "*vc-dir*")))
-   (vc-dir debbugs-gnu-trunk-directory)
+   (let ((trunk (expand-file-name debbugs-gnu-trunk-directory)))
+     (if (equal (cl-subseq default-directory 0 (length trunk))
+               trunk)
+        (vc-dir debbugs-gnu-trunk-directory)
+       (vc-dir debbugs-gnu-branch-directory)))
    (goto-char (point-min))
    (while (not (search-forward "edited" nil t))
      (sit-for 0.01))
@@ -1512,6 +1657,7 @@ If given a prefix, patch in the branch directory instead."
 
 ;;; TODO:
 
-;; * Reorganize pages after client-side filtering.
+;; * Another random thought - is it possible to implement some local
+;;   cache, so only changed bugs are fetched?  Glenn Morris.
 
 ;;; debbugs-gnu.el ends here
diff --git a/packages/debbugs/debbugs-org.el b/packages/debbugs/debbugs-org.el
index a1b283a..a95672d 100644
--- a/packages/debbugs/debbugs-org.el
+++ b/packages/debbugs/debbugs-org.el
@@ -1,11 +1,10 @@
 ;;; debbugs-org.el --- Org-mode interface for the GNU bug tracker
 
-;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
 
 ;; Author: Michael Albinus <address@hidden>
 ;; Keywords: comm, hypermedia, maint, outlines
 ;; Package: debbugs
-;; Version: 0.7
 
 ;; This file is not part of GNU Emacs.
 
@@ -56,7 +55,7 @@
 ;; If a prefix is given to the command, more search parameters are
 ;; asked for, like packages (also a comma separated list, "emacs" is
 ;; the default), whether archived bugs shall be shown, and whether
-;; closed bugs shall be shown.
+;; closed bugs shall be suppressed from being retrieved.
 
 ;; Another command is
 ;;
@@ -71,12 +70,11 @@
 
 ;; The bug reports are downloaded from the bug tracker.  In order to
 ;; not generate too much load of the server, up to 500 bugs will be
-;; downloaded at once.  If there are more hits, you will be asked to
-;; change this limit, but please don't increase this number too much.
+;; downloaded at once.  If there are more hits, several downloads will
+;; be performed, until all bugs are retrieved.
 
 ;; These default values could be changed also by customer options
-;; `debbugs-gnu-default-severities', `debbugs-gnu-default-packages'
-;; and `debbugs-gnu-default-hits-per-page'.
+;; `debbugs-gnu-default-severities' and `debbugs-gnu-default-packages'.
 
 ;; The commands create a TODO list.  Besides the usual handling of
 ;; TODO items, you could apply the following actions by the following
@@ -87,9 +85,9 @@
 ;;   "C-c # d": Show bug attributes
 
 ;; The last entry in a TODO record is the link [[Messages]].  If you
-;; follow this link, a Gnus ephemeral group is opened presenting all
-;; related messages for this bug.  Here you could also send debbugs
-;; control messages by keystroke "C".
+;; follow this link, a Gnus ephemeral group or an Rmail buffer is
+;; opened presenting all related messages for this bug.  Here you
+;; could also send debbugs control messages by keystroke "C".
 
 ;; Finally, if you simply want to list some bugs with known bug
 ;; numbers, call the command
@@ -104,6 +102,10 @@
 (require 'org)
 (eval-when-compile (require 'cl))
 
+;; Buffer-local variables.
+(defvar debbugs-gnu-local-query)
+(defvar debbugs-gnu-local-filter)
+
 (defconst debbugs-org-severity-priority
   (let ((priority ?A))
     (mapcar
@@ -122,22 +124,10 @@
     ("B" . org-warning))
   "Highlighting of prioritized TODO items.")
 
-;; We do not add the bug numbers list to the elisp:link, because this
-;; would be much too long.  Instead, this variable shall keep the bug
-;; numbers.
-(defvar-local debbugs-org-ids nil
-  "The list of bug ids to be shown following the elisp link.")
-
-(defvar debbugs-org-show-buffer-name "*Org Bugs*"
+(defvar debbugs-org-buffer-name "*Org Bugs*"
   "The buffer name we present the bug reports.
 This could be a temporary buffer, or a buffer linked with a file.")
 
-(defvar debbugs-org-mode) ;; Silence compiler.
-(defun debbugs-org-show-buffer-name ()
-  "The buffer name we present the bug reports.
-This could be a temporary buffer, or a buffer linked with a file."
-  (if debbugs-org-mode (buffer-name) debbugs-org-show-buffer-name))
-
 ;;;###autoload
 (defun debbugs-org-search ()
   "Search for bugs interactively.
@@ -203,10 +193,7 @@ returned."
             (t (throw :finished nil)))))
 
        ;; Do the search.
-       (debbugs-org severities packages))
-
-    ;; Reset query and filter.
-    (setq debbugs-gnu-current-query nil)))
+       (debbugs-org severities packages))))
 
 ;;;###autoload
 (defun debbugs-org (severities &optional packages archivedp suppress tags)
@@ -255,46 +242,28 @@ returned."
     (when (not (zerop (length tag)))
       (add-to-list 'debbugs-gnu-current-query (cons 'tag tag))))
 
-    (unwind-protect
-       (with-current-buffer (get-buffer-create (debbugs-org-show-buffer-name))
-         (erase-buffer)
-
-         (let ((hits debbugs-gnu-default-hits-per-page))
-           (setq debbugs-org-ids
-                 (debbugs-gnu-get-bugs debbugs-gnu-current-query))
-
-           (when (> (length debbugs-org-ids) hits)
-             (let ((cursor-in-echo-area nil))
-               (setq hits
-                     (string-to-number
-                      (read-string
-                       (format
-                        "How many reports (available %d, default %d): "
-                        (length debbugs-org-ids) hits)
-                       nil
-                       nil
-                       (number-to-string hits))))))
-
-           (debbugs-org-show-next-reports hits)))
-
-      ;; Reset query.
-      (setq debbugs-gnu-current-query nil)))
-
-(defun debbugs-org-show-reports (bug-numbers)
-  "Show bug reports as given in BUG-NUMBERS."
-  (pop-to-buffer (get-buffer-create (debbugs-org-show-buffer-name)))
-  ;; Local variable `debbugs-org-ids' must survive.
-  (let ((doi debbugs-org-ids))
+  ;; Show result.
+  (debbugs-org-show-reports)
+
+  ;; Reset query.
+  (setq debbugs-gnu-current-query nil))
+
+(defun debbugs-org-show-reports ()
+  "Show bug reports as retrieved via `debbugs-gnu-current-query'."
+  (let ((inhibit-read-only t)
+       (org-startup-folded t))
+    (when (get-buffer debbugs-org-buffer-name)
+      (kill-buffer debbugs-org-buffer-name))
+    (switch-to-buffer (get-buffer-create debbugs-org-buffer-name))
     (org-mode)
     (debbugs-org-mode 1)
-    (setq debbugs-org-ids doi))
 
-  (let ((inhibit-read-only t)
-       (debbugs-port "gnu.org"))
     (dolist (status
+            ;; `debbugs-get-status' returns in random order, so we must sort.
             (sort
-             (apply 'debbugs-get-status bug-numbers)
-             (lambda (x y) (< (cdr (assq 'id x)) (cdr (assq 'id y))))))
+             (apply 'debbugs-get-status
+                    (debbugs-gnu-get-bugs debbugs-gnu-local-query))
+              (lambda (a b) (> (cdr (assq 'id a)) (cdr (assq 'id b))))))
       (let* ((beg (point))
             (id (cdr (assq 'id status)))
             (done (string-equal (cdr (assq 'pending status)) "done"))
@@ -369,7 +338,17 @@ returned."
            (seconds-to-time last-modified))))
 
        ;; Add text properties.
-       (add-text-properties beg (point) `(tabulated-list-id ,status))))))
+       (add-text-properties beg (point) `(tabulated-list-id ,status))))
+
+    ;; The end.
+    (insert "* COMMENT Local " "Variables\n"
+           "# Local " "Variables:\n"
+           "# mode: org\n"
+           "# eval: (debbugs-org-mode 1)\n"
+           "# End:\n")
+    (goto-char (point-min))
+    (org-overview)
+    (set-buffer-modified-p nil)))
 
 (defun debbugs-org-regenerate-status ()
   "Regenerate the `tabulated-list-id' text property.
@@ -388,42 +367,6 @@ the corresponding buffer (e.g. by closing Emacs)."
            (end (org-end-of-subtree t)))
        (add-text-properties beg end `(tabulated-list-id ,tli))))))
 
-(defun debbugs-org-show-next-reports (hits)
-  "Show next HITS of bug reports."
-  (with-current-buffer (get-buffer-create (debbugs-org-show-buffer-name))
-    (save-excursion
-      (goto-char (point-max))
-      (when (re-search-backward
-            "^* COMMENT \\[\\[elisp:(debbugs-org-show-next-reports" nil t)
-       (forward-line -1)
-       (delete-region (point) (point-max)))
-      (debbugs-org-show-reports
-       (butlast debbugs-org-ids (- (length debbugs-org-ids) hits)))
-      (setq debbugs-org-ids
-           (last debbugs-org-ids (- (length debbugs-org-ids) hits)))
-      (goto-char (point-max))
-      (when debbugs-org-ids
-       (insert
-        (format
-         "* COMMENT [[elisp:(debbugs-org-show-next-reports %s)][Next 
bugs]]\n\n"
-         hits)))
-      (insert "* COMMENT Local " "Variables\n")
-      (when debbugs-org-ids
-       (insert "#+NAME: init\n"
-               "#+BEGIN_SRC elisp\n"
-               (format "(setq debbugs-org-ids '%s)\n" debbugs-org-ids)
-               "#+END_SRC\n\n"))
-      (insert "# Local " "Variables:\n"
-             "# mode: org\n"
-             "# eval: (debbugs-org-mode 1)\n")
-      (when debbugs-org-ids
-       (insert (format "# eval: (%s \"init\")\n"
-                       (if (macrop 'org-sbe) "org-sbe" "sbe"))))
-      (insert "# End:\n")
-      (goto-char (point-min))
-      (org-overview)
-      (set-buffer-modified-p nil))))
-
 (defconst debbugs-org-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map (kbd "C-c # t") 'debbugs-gnu-toggle-tag)
@@ -441,6 +384,9 @@ the corresponding buffer (e.g. by closing Emacs)."
 
 \\{debbugs-org-mode-map}"
   :lighter " Debbugs" :keymap debbugs-org-mode-map
+  (set (make-local-variable 'debbugs-gnu-local-query) 
debbugs-gnu-current-query)
+  (set (make-local-variable 'debbugs-gnu-local-filter)
+       debbugs-gnu-current-filter)
   ;; FIXME: Does not show any effect.
   (set (make-local-variable 'org-priority-faces) debbugs-org-priority-faces)
   (set (make-local-variable 'gnus-posting-styles)
diff --git a/packages/debbugs/debbugs-ug.info b/packages/debbugs/debbugs-ug.info
index 25b92ea..422aa98 100644
--- a/packages/debbugs/debbugs-ug.info
+++ b/packages/debbugs/debbugs-ug.info
@@ -1,20 +1,21 @@
-This is debbugs-ug.info, produced by makeinfo version 5.2 from
+This is debbugs-ug.info, produced by makeinfo version 6.0 from
 debbugs-ug.texi.
 
-Copyright (C) 2015 Free Software Foundation, Inc.
+Copyright (C) 2015-2016 Free Software Foundation, Inc.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
      Version 1.2 or any later version published by the Free Software
      Foundation; with no Invariant Sections, with the Front-Cover, or
-     Back-Cover Texts.  A copy of the license is included in the section
-     entitled "GNU Free Documentation License" in the Emacs manual.
+     Back-Cover Texts.  A copy of the license is included in the
+     section entitled "GNU Free Documentation License" in the Emacs
+     manual.
 
      This document is part of a collection distributed under the GNU
      Free Documentation License.  If you want to distribute this
-     document separately from the collection, you can do so by adding a
-     copy of the license to the document, as described in section 6 of
-     the license.
+     document separately from the collection, you can do so by adding
+     a copy of the license to the document, as described in section 6
+     of the license.
 
      All Emacs Lisp code contained in this document may be used,
      distributed, and modified without restriction.
@@ -29,21 +30,21 @@ File: debbugs-ug.info,  Node: Top,  Next: Retrieving Bugs,  
Up: (dir)
 Debbugs User Guide
 ******************
 
-Debbugs is a bugtracking system (BTS) that was initially written for the
-Debian project but currently used also by the GNU project.  The main
-distinctive feature of Debbugs is that it's mostly email-based.  All
-actions on bug reports: opening, closing, changing the status,
+Debbugs is a bugtracking system (BTS) that was initially written for
+the Debian project but currently used also by the GNU project.  The
+main distinctive feature of Debbugs is that it's mostly email-based.
+All actions on bug reports: opening, closing, changing the status,
 commenting, forwarding are performed via email by sending specially
-composed letters to the particular mail addresses.  However, searching
-the bug reports, querying bug report status and viewing comments have
-been web-based for a long time.  To overcome this inconvenience the
-Debbugs/SOAP service was introduced.
-
-   Based on the Debbugs/SOAP service, frontends are written which offer
-handling of bugs inside Emacs.  These frontends are restricted to the
-GNU Debbugs server.  Bugs are presented either as tabulated list
-('debbugs-gnu') or as 'org-mode' TODO list ('debbugs-org', *note Org
-Mode: (org)Top.).  As backend they use the 'debbugs' Emacs library
+composed letters to the particular email addresses.  However,
+searching the bug reports, querying bug report status and viewing
+comments have been web-based for a long time.  To overcome this
+inconvenience the Debbugs/SOAP service was introduced.
+
+   Based on the Debbugs/SOAP service, frontends are written which
+offer handling of bugs inside Emacs.  These frontends are restricted
+to the GNU Debbugs server.  Bugs are presented either as tabulated
+list ('debbugs-gnu') or as 'org-mode' TODO list ('debbugs-org', *note
+Org Mode: (org)Top.).  As backend they use the 'debbugs' Emacs library
 (*note Debbugs Programmer's Manual: (debbugs)Top.).
 
 * Menu:
@@ -64,9 +65,10 @@ File: debbugs-ug.info,  Node: Retrieving Bugs,  Next: 
Searching Bugs,  Prev: Top
 *****************
 
 Bugs are retrieved by the 'debbugs-gnu' or 'debbugs-org' commands.  In
-their simple version, they retrieve just bugs for the '"emacs"' package
-on the GNU Debbugs server, filtered by bug severities.  Further
-filtering is possible when the commands are called with a prefix.
+their simple version, they retrieve just bugs for the '"emacs"'
+package on the GNU Debbugs server, filtered by bug severities.
+Further filtering is possible when the commands are called with a
+prefix.
 
    When the bug numbers to be retrieved are known, the commands
 'debbugs-gnu-bugs' or 'debbugs-org-bugs' are applicable.
@@ -77,60 +79,60 @@ filtering is possible when the commands are called with a 
prefix.
           suppress tags
 
      These commands retrieve bug reports from the GNU Debbugs server.
-     'debbugs-gnu' returns a tabulated list, and 'debbugs-org' returns a
-     list of TODO items in 'org-mode'.  If there were more than
-     'debbugs-gnu-default-hits-per-page' bug results from the query,
-     there are widgets ('debbugs-gnu') or links ('debbugs-org') in the
-     result buffer for retrieving the other results.
-
-     SEVERITIES is a list of strings which filter for the severities of
-     the bugs to be retrieved.  Valid severities are '"serious"',
-     '"important"', '"normal"', '"minor"' and '"wishlist"' (see also the
-     constant 'debbugs-gnu-all-severities').  If the list is empty,
-     there is no filtering with respect to severities.  The keyword
-     '"tagged"', which is also possible, is not a severity in the GNU
-     Debbugs server but allows to restrict the result to bugs with a
-     given user tag.
+     'debbugs-gnu' returns a tabulated list, and 'debbugs-org' returns
+     a list of TODO items in 'org-mode'.  In order not to stress the
+     GNU Debbugs server, the bugs are retrieved in chunks of 500 bugs.
+     However, the bug report buffer shows all retrieved bugs then, in
+     reverse bug number order.
+
+     SEVERITIES is a list of strings which filter for the severities
+     of the bugs to be retrieved.  Valid severities are '"serious"',
+     '"important"', '"normal"', '"minor"' and '"wishlist"' (see also
+     the constant 'debbugs-gnu-all-severities').  If the list is
+     empty, there is no filtering with respect to severities.  The
+     keyword '"tagged"', which is also possible, is not a severity in
+     the GNU Debbugs server but allows to restrict the result to bugs
+     with a given user tag.
 
      PACKAGES, also a list of strings, point to the defined software
      packages on the GNU Debbugs server which shall be taken into
-     account.  The existing package names are compiled into the constant
-     'debbugs-gnu-all-packages'.
+     account.  The existing package names are compiled into the
+     constant 'debbugs-gnu-all-packages'.
 
      ARCHIVEDP, if non-'nil', extends the result also on archived bugs
      on the GNU Debbugs server.
 
      SUPPRESS shall also distinct between 'nil' and non-'nil'.  When
-     non-'nil', closed bugs are suppressed from the results.
-
-     When SEVERITIES contains the severity '"tagged"', TAGS is consulted
-     in order to restrict the result on bugs which are tagged with one
-     of the strings of the list TAGS.  This list can also be empty; in
-     this case locally tagged bugs are included into the results.
-
-     Called interactively, the commands require just the SEVERITIES and
-     the TAGS (if SEVERITIES includes '"tagged"').  In order to provide
-     the other arguments interactively, the commands must be called with
-     a prefix, like 'C-u M-x debbugs-gnu'.  In the minibuffer, lists
-     must be entered comma-separated.
+     non-'nil', closed bugs are suppressed from being retrieved from
+     the Debbugs server.  Which bugs are regarded as suppressed is
+     configured in the customer option 'debbugs-gnu-suppress-bugs'.
+     Per default, bugs marked as '"done"' are suppressed from being
+     retrieved.
+
+     When SEVERITIES contains the severity '"tagged"', TAGS is
+     consulted in order to restrict the result on bugs which are
+     tagged with one of the strings of the list TAGS.  This list can
+     also be empty; in this case locally tagged bugs are included into
+     the results.
+
+     Called interactively, the commands require just the SEVERITIES
+     and the TAGS (if SEVERITIES includes '"tagged"').  In order to
+     provide the other arguments interactively, the commands must be
+     called with a prefix, like 'C-u M-x debbugs-gnu'.  In the
+     minibuffer, lists must be entered comma-separated.
 
      Default values for interactive use could be configured in the
      customer options 'debbugs-gnu-default-severities' and
      'debbugs-gnu-default-packages'.
 
-     When the result would exceed more than 500 bugs, the user is asked
-     how many bugs to retrieve at once.  This value can be configured in
-     the customer option 'debbugs-gnu-default-hits-per-page'.  However,
-     it is not recommended to exceeds the default value.
-
      *note Layout:: for the presentation of the results.
 
  -- Command: debbugs-gnu-bugs &rest bugs
  -- Command: debbugs-org-bugs &rest bugs
 
      The commands 'debbugs-gnu-bugs' and 'debbugs-org-bugs' show bugs
-     specified by their bug number.  Interactively, the bug numbers must
-     be entered as comma-separated list.
+     specified by their bug number.  Interactively, the bug numbers
+     must be entered as comma-separated list.
 
      *note Layout:: for the presentation of the results.
 
@@ -140,8 +142,8 @@ File: debbugs-ug.info,  Node: Searching Bugs,  Next: 
Layout,  Prev: Retrieving B
 2 Searching in the Debbugs Database.
 ************************************
 
-The GNU Debbugs server allows full text search in the database.  It uses
-a HyperEstraier based search engine
+The GNU Debbugs server allows full text search in the database.  It
+uses a HyperEstraier based search engine
 (http://fallabs.com/hyperestraier/uguide-en.html#searchcond)(1).
 
  -- Command: debbugs-gnu-search
@@ -149,22 +151,22 @@ a HyperEstraier based search engine
 
      These both commands are completely interactive.  They ask for a
      '"search phrase"' for the full text search.  It is just a string
-     which contains the words to be searched for, combined by operators
-     like AND, ANDNOT and OR. If there is no operator between the words,
-     AND is used by default.
+     which contains the words to be searched for, combined by
+     operators like AND, ANDNOT and OR. If there is no operator
+     between the words, AND is used by default.
 
-     Wild card searches are also supported.  It can be used for forward
-     match search and backward match search.  For example, "[BW] euro"
-     matches words which begin with "euro".  "[EW] shere" matches words
-     which end with "sphere".  Moreover, regular expressions are also
-     supported.  For example, "[RX] ^inter.*al$" matches words which
-     begin with "inter" and end with "al".(2)
+     Wild card searches are also supported.  It can be used for
+     forward match search and backward match search.  For example,
+     "[BW] euro" matches words which begin with "euro".  "[EW] shere"
+     matches words which end with "sphere".  Moreover, regular
+     expressions are also supported.  For example, "[RX] ^inter.*al$"
+     matches words which begin with "inter" and end with "al".(2)
 
      While the words to be searched for are case insensitive, the
      operators must be specified case sensitive.
 
-     While the search for the phrase is performed only in the bodies of
-     the messages belonging to a bug report, it is also possible to
+     While the search for the phrase is performed only in the bodies
+     of the messages belonging to a bug report, it is also possible to
      discriminate the search to further bug attributes.  The commands
      ask for such key-value pairs, until an empty key is returned.
      Possible attributes are
@@ -174,14 +176,14 @@ a HyperEstraier based search engine
           Bugs::.
 
      'package'
-          A comma-separated list of defined software packages on the GNU
-          Debbugs server, *Note Retrieving Bugs::.
+          A comma-separated list of defined software packages on the
+          GNU Debbugs server, *Note Retrieving Bugs::.
 
      'tags'
           A comma-separated list of defined user tags.
 
      'submitter'
-          The address of the bug submitter.
+          The email address of the bug submitter.
 
      'date'
           A time period the bug has been in which the bug has been
@@ -195,9 +197,9 @@ a HyperEstraier based search engine
           "forwarded" and "open".
 
      It is also possible to apply these commands with an empty search
-     phrase.  In this case, the GNU Debbugs server is searched only for
-     bugs which fulfill the given attributes.  The attributes to be
-     applied are the same as already described, plus
+     phrase.  In this case, the GNU Debbugs server is searched only
+     for bugs which fulfill the given attributes.  The attributes to
+     be applied are the same as already described, plus
 
      'archive'
           Whether archived bugs shall be searched (no value to be
@@ -208,14 +210,15 @@ a HyperEstraier based search engine
           set.
 
      'tag'
-          An arbitrary string the bug is annotated with.  Usually, this
-          is the same as the status mentioned above.
+          An arbitrary string the bug is annotated with.  Usually,
+          this is the same as the status mentioned above.
 
      'owner'
      'maint'
      'correspondent'
           The email address of the bug's owner, maintainer, or
-          correspondent (somebody who has participated in bug messages).
+          correspondent (somebody who has participated in bug
+          messages).
 
      'log_modified'
      'last_modified'
@@ -241,10 +244,10 @@ a HyperEstraier based search engine
           The summary of the bug report.
 
      Not all of these attributes could be queried on the GNU Debbugs
-     server via the Debbugs/SOAP backend.  In this case, the results of
-     a query are discriminated on the client side, which is indicated by
-     the string "(client-side filter)" in the minibuffer after the
-     attribute name.
+     server via the Debbugs/SOAP backend.  In this case, the results
+     of a query are discriminated on the client side, which is
+     indicated by the string "(client-side filter)" in the minibuffer
+     after the attribute name.
 
    ---------- Footnotes ----------
 
@@ -261,8 +264,9 @@ File: debbugs-ug.info,  Node: Layout,  Next: Minor Mode,  
Prev: Searching Bugs,
 ********
 
 The commands described in the previous chapters generate (a) report
-buffer(s) applicable for navigation.  'debbugs-gnu-*' return a tabulated
-list, and 'debbugs-org-*' return a list of TODO items in 'org-mode'.
+buffer(s) applicable for navigation.  'debbugs-gnu-*' return a
+tabulated list, and 'debbugs-org-*' return a list of TODO items in
+'org-mode'.
 
 * Menu:
 
@@ -277,21 +281,15 @@ File: debbugs-ug.info,  Node: Tabulated Lists,  Next: 
TODO Items,  Up: Layout
 ===================
 
 A tabulated list of bug reports consist of four columns for every bug
-entry: 'Id' (the bug number), 'State' (some bug attributes), 'Submitter'
-(the name of the bug submitter), and 'Title' (the bug subject).  Per
-default the bugs are sorted by 'Id'; this could be changed by clicking
-in the headline.
-
-   Per bug retrieval only up to 500
-('debbugs-gnu-default-hits-per-page') bugs are retrieved and presented
-in a buffer.  If there shall be presented more bugs, widgets are placed
-on the top and bottom of the buffer for navigation to further report
-buffers.
+entry: 'Id' (the bug number), 'State' (some bug attributes),
+'Submitter' (the name of the bug submitter), and 'Title' (the bug
+subject).  Per default the bugs are sorted descending by 'Id'; this
+could be changed by clicking in the headline.
 
    Different foreground colours present further information on the bug
-report.  If the bug number uses a red colour ('debbugs-gnu-tagged'), the
-bug has been tagged locally.  The same face is used to mark bugs in the
-submitter or title column, when the bug has been reported / is
+report.  If the bug number uses a red colour ('debbugs-gnu-tagged'),
+the bug has been tagged locally.  The same face is used to mark bugs
+in the submitter or title column, when the bug has been reported / is
 maintained by the user.
 
    The bug state could appear in different colours: red
@@ -305,32 +303,53 @@ shown with inverse face ('debbugs-gnu-archived').
    The bug report buffers have enabled the minor 'debbugs-gnu-mode'.
 This enables the following key strokes:
 
-'<RET>'       'debbugs-gnu-select-report'
-'<mouse-1>'   Open a GNUS ephemeral group for that bug.
-'<mouse-2>'   
-              
-'d'           'debbugs-gnu-display-status'
-              Show all bug attributes.
-              
-'g'           'debbugs-gnu-rescan'
-              Reload all bugs from the GNU Debbugs server.
-              
-'B'           'debbugs-gnu-show-blocking-reports'
-'b'           'debbugs-gnu-show-blocked-by-reports'
-              Show all bug reports which are blocking / blocked by this bug.
-              
-'s'           'debbugs-gnu-toggle-sort'
-              Toggle sorting order of bugs.
-              
-'t'           'debbugs-gnu-toggle-tag'
-              Toggle local tag of bugs.
-              
-'x'           'debbugs-gnu-toggle-suppress'
-              Toggle showing of closed bugs.
-              
-'C'           'debbugs-gnu-send-control-message'
-              Send a control message for this bug, *note Control Messages::.
-              
+'<RET>'        'debbugs-gnu-select-report'
+'<mouse-1>'    Show the email messages that discuss the bug.
+'<mouse-2>'    
+               
+'d'            'debbugs-gnu-display-status'
+               Show all bug attributes.
+               
+'/'            'debbugs-gnu-narrow-to-status'
+               Narrow the list of bugs to the bugs that match the
+               given regex in 'State', 'Submitter' or 'Title'.
+               
+'R'            'debbugs-gnu-show-all-blocking-reports'
+               Narrow the list of bug reports to the ones that are
+               blocking the current release.
+               
+'w'            'debbugs-gnu-widen'
+               Restore the full list again after narrowing.
+               
+'g'            'debbugs-gnu-rescan'
+               Reload all bugs.  With a prefix argument 'C-u', the
+               bug status cache is disabled, and all bug reports are
+               retrieved from the GNU Debbugs server.
+               
+'B'            'debbugs-gnu-show-blocking-reports'
+'b'            'debbugs-gnu-show-blocked-by-reports'
+               Show all bug reports which are blocking / blocked by
+               this bug.
+               
+'s'            'debbugs-gnu-toggle-sort'
+               Toggle sorting order of bugs.
+               
+'t'            'debbugs-gnu-toggle-tag'
+               Toggle local tag of bugs.
+               
+'x'            'debbugs-gnu-toggle-suppress'
+               Toggle showing of closed bugs.
+               
+'C'            'debbugs-gnu-send-control-message'
+               Send a control message for this bug,
+               *note Control Messages::.
+               
+
+   The user option 'debbugs-gnu-mail-backend' controls the
+presentation of email messages produced by typing '<RET>' or by
+clicking the mouse on a bug: if its value is 'gnus', the default, a
+GNUS ephemeral group for that bug will be shown; if its value is
+'rmail', the command will present an Rmail folder instead.
 
 
 File: debbugs-ug.info,  Node: TODO Items,  Next: Control Messages,  Prev: 
Tabulated Lists,  Up: Layout
@@ -342,15 +361,10 @@ TODO items are offered as usual in 'org-mode'.  The bug 
attributes are
 mapped onto properties of these items.  They can be shown by the usual
 navigation in 'org-mode'.
 
-   Per bug retrieval only up to 500
-('debbugs-gnu-default-hits-per-page') bugs are retrieved and presented
-in a buffer.  At the end of the buffer there is a link, which allows to
-append the next 500 bugs to the list.
-
    Bug severities are mapped onto org severities, see
 'debbugs-org-severity-priority'.
 
-   The bug report buffers have enabled the minor 'debbugs-gnu-mode'.
+   The bug report buffers have enabled the minor 'debbugs-org-mode'.
 This enables the following key strokes:
 
 '<TAB>'     'org-cycle'
@@ -379,11 +393,11 @@ Debbugs control messages are sent by email to the GNU 
Debbugs control
 server.  Their format is described in
 <http://debbugs.gnu.org/server-control.html>.
 
-   A control message can be initiated in the tabulated list of bugs, in
-the list of org TODO items, or in the GNUS ephemeral group opened for
-the messages belonging to a given bug.  Control messages can be sent to
-unarchived bugs only, in case a bug is archived the control message
-'unarchive' must be sent first.
+   A control message can be initiated in the tabulated list of bugs,
+in the list of org TODO items, or in the GNUS ephemeral group or Rmail
+folder opened for the messages belonging to a given bug.  Control
+messages can be sent to unarchived bugs only, in case a bug is
+archived the control message 'unarchive' must be sent first.
 
    In the minibuffer, the following control messages can be requested
 (assuming that 12345 is the bug the control message is intended for).
@@ -431,13 +445,6 @@ The strings show the exact format of the control messages.
 
      The second bug number is read interactively.
 
-'important'
-'minor'
-'normal'
-'serious'
-'wishlist'
-     "severity 12345 important|minor|normal|serious|wishlist"
-
 'invalid'
      "tags 12345 notabug"
      "tags 12345 wontfix"
@@ -457,6 +464,18 @@ The strings show the exact format of the control messages.
 'reopen'
      "reopen 12345"
 
+'retitle'
+     "retitle 12345 TITLE"
+
+     The new bug title is read interactively.
+
+'serious'
+'important'
+'normal'
+'minor'
+'wishlist'
+     "severity 12345 serious|important|normal|minor|wishlist"
+
 'unarchive'
      "unarchive 12345"
 
@@ -484,13 +503,14 @@ hyperlinks are implemented as minor modes 
'bug-reference-mode' and
 
    This package adds a new minor mode 'debbugs-browse-mode' on top of
 them.  Instead of using the default built-in Emacs browser for a given
-bug reference, it opens a corresponding bug report buffer.  The customer
-option 'debbugs-browse-function' controls, whether 'debbugs-gnu-bugs' or
-'debbugs-org-bugs' is called.
+bug reference, it opens a corresponding bug report buffer.  The
+customer option 'debbugs-browse-function' controls, whether
+'debbugs-gnu-bugs' or 'debbugs-org-bugs' is called.
 
-   This minor mode is applicable for all URLs, not only bug references.
-Any URL with the format <http://debbugs.gnu.org/12345> will be shown in
-a bug report buffer, when 'debbugs-browse-mode' is enabled.
+   This minor mode is applicable for all URLs, not only bug
+references.  Any URL with the format <http://debbugs.gnu.org/12345>
+will be shown in a bug report buffer, when 'debbugs-browse-mode' is
+enabled.
 
 
 File: debbugs-ug.info,  Node: Command Index,  Next: Variable Index,  Prev: 
Minor Mode,  Up: Top
@@ -501,13 +521,13 @@ Command Index
 [index]
 * Menu:
 
-* debbugs-browse-mode:                   Minor Mode.           (line 12)
-* debbugs-gnu:                           Retrieving Bugs.      (line 14)
-* debbugs-gnu-bugs:                      Retrieving Bugs.      (line 68)
-* debbugs-gnu-search:                    Searching Bugs.       (line 10)
-* debbugs-org:                           Retrieving Bugs.      (line 16)
-* debbugs-org-bugs:                      Retrieving Bugs.      (line 69)
-* debbugs-org-search:                    Searching Bugs.       (line 11)
+* debbugs-browse-mode:                   Minor Mode.         (line 12)
+* debbugs-gnu:                           Retrieving Bugs.    (line 15)
+* debbugs-gnu-bugs:                      Retrieving Bugs.    (line 69)
+* debbugs-gnu-search:                    Searching Bugs.     (line 10)
+* debbugs-org:                           Retrieving Bugs.    (line 17)
+* debbugs-org-bugs:                      Retrieving Bugs.    (line 70)
+* debbugs-org-search:                    Searching Bugs.     (line 11)
 
 
 File: debbugs-ug.info,  Node: Variable Index,  Next: Key Index,  Prev: Command 
Index,  Up: Top
@@ -518,12 +538,13 @@ Variable Index
 [index]
 * Menu:
 
-* debbugs-browse-function:               Minor Mode.           (line 12)
-* debbugs-gnu-all-packages:              Retrieving Bugs.      (line 35)
-* debbugs-gnu-all-severities:            Retrieving Bugs.      (line 26)
-* debbugs-gnu-default-hits-per-page:     Retrieving Bugs.      (line 61)
-* debbugs-gnu-default-packages:          Retrieving Bugs.      (line 57)
-* debbugs-gnu-default-severities:        Retrieving Bugs.      (line 57)
+* debbugs-browse-function:               Minor Mode.         (line 12)
+* debbugs-gnu-all-packages:              Retrieving Bugs.    (line 36)
+* debbugs-gnu-all-severities:            Retrieving Bugs.    (line 27)
+* debbugs-gnu-default-packages:          Retrieving Bugs.    (line 63)
+* debbugs-gnu-default-severities:        Retrieving Bugs.    (line 63)
+* debbugs-gnu-default-suppress-bugs:     Retrieving Bugs.    (line 44)
+* debbugs-gnu-mail-backend:              Tabulated Lists.    (line 71)
 
 
 File: debbugs-ug.info,  Node: Key Index,  Prev: Variable Index,  Up: Top
@@ -534,37 +555,40 @@ Key Index
 [index]
 * Menu:
 
-* 'B':                                   Tabulated Lists.      (line 45)
-* 'b':                                   Tabulated Lists.      (line 46)
-* 'C':                                   Tabulated Lists.      (line 58)
-* 'C-c # C':                             TODO Items.           (line 30)
-* 'C-c # d':                             TODO Items.           (line 24)
-* 'C-c # t':                             TODO Items.           (line 27)
-* 'd':                                   Tabulated Lists.      (line 39)
-* 'g':                                   Tabulated Lists.      (line 42)
-* '<mouse-1>':                           Tabulated Lists.      (line 35)
-* '<mouse-2>':                           Tabulated Lists.      (line 37)
-* '<RET>':                               Tabulated Lists.      (line 35)
-* 's':                                   Tabulated Lists.      (line 49)
-* 't':                                   Tabulated Lists.      (line 52)
-* '<TAB>':                               TODO Items.           (line 21)
-* 'x':                                   Tabulated Lists.      (line 55)
+* '/':                                   Tabulated Lists.    (line 36)
+* 'B':                                   Tabulated Lists.    (line 52)
+* 'b':                                   Tabulated Lists.    (line 53)
+* 'C':                                   Tabulated Lists.    (line 66)
+* 'C-c # C':                             TODO Items.         (line 25)
+* 'C-c # d':                             TODO Items.         (line 19)
+* 'C-c # t':                             TODO Items.         (line 22)
+* 'd':                                   Tabulated Lists.    (line 33)
+* 'g':                                   Tabulated Lists.    (line 47)
+* '<mouse-1>':                           Tabulated Lists.    (line 30)
+* '<mouse-2>':                           Tabulated Lists.    (line 31)
+* 'R':                                   Tabulated Lists.    (line 40)
+* '<RET>':                               Tabulated Lists.    (line 29)
+* 's':                                   Tabulated Lists.    (line 57)
+* 't':                                   Tabulated Lists.    (line 60)
+* '<TAB>':                               TODO Items.         (line 16)
+* 'w':                                   Tabulated Lists.    (line 44)
+* 'x':                                   Tabulated Lists.    (line 63)
 
 
 
 Tag Table:
-Node: Top1087
-Node: Retrieving Bugs2625
-Node: Searching Bugs6147
-Ref: Searching Bugs-Footnote-110016
-Ref: Searching Bugs-Footnote-210104
-Node: Layout10195
-Node: Tabulated Lists10670
-Node: TODO Items13173
-Node: Control Messages14438
-Node: Minor Mode16733
-Node: Command Index17671
-Node: Variable Index18332
-Node: Key Index18921
+Node: Top1097
+Node: Retrieving Bugs2635
+Node: Searching Bugs6095
+Ref: Searching Bugs-Footnote-19980
+Ref: Searching Bugs-Footnote-210068
+Node: Layout10159
+Node: Tabulated Lists10634
+Node: TODO Items13881
+Node: Control Messages14928
+Node: Minor Mode17324
+Node: Command Index18263
+Node: Variable Index18910
+Node: Key Index19558
 
 End Tag Table
diff --git a/packages/debbugs/debbugs-ug.texi b/packages/debbugs/debbugs-ug.texi
index d96c62b..553e19b 100644
--- a/packages/debbugs/debbugs-ug.texi
+++ b/packages/debbugs/debbugs-ug.texi
@@ -8,7 +8,7 @@
 @end direntry
 
 @copying
-Copyright @copyright{} 2015 Free Software Foundation, Inc.
+Copyright @copyright{} 2015-2016 Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -37,6 +37,7 @@ and modified without restriction.
 
 @contents
 
+
 @node Top
 @top Debbugs User Guide
 
@@ -45,10 +46,10 @@ the Debian project but currently used also by the GNU 
project.  The
 main distinctive feature of Debbugs is that it's mostly email-based.
 All actions on bug reports: opening, closing, changing the status,
 commenting, forwarding are performed via email by sending specially
-composed letters to the particular mail addresses.  However, searching
-the bug reports, querying bug report status and viewing comments have
-been web-based for a long time.  To overcome this inconvenience the
-Debbugs/SOAP service was introduced.
+composed letters to the particular email addresses.  However,
+searching the bug reports, querying bug report status and viewing
+comments have been web-based for a long time.  To overcome this
+inconvenience the Debbugs/SOAP service was introduced.
 
 Based on the Debbugs/SOAP service, frontends are written which offer
 handling of bugs inside Emacs.  These frontends are restricted to the
@@ -69,6 +70,7 @@ Programmer's Manual, debbugs}).
 * Key Index::                   Keyboard strokes on bug report buffers.
 @end menu
 
+
 @node Retrieving Bugs
 @chapter Retrieving Bugs
 
@@ -87,11 +89,10 @@ When the bug numbers to be retrieved are known, the commands
 
 These commands retrieve bug reports from the GNU Debbugs server.
 @code{debbugs-gnu} returns a tabulated list, and @code{debbugs-org}
-returns a list of TODO items in @code{org-mode}.  If there were more
-than @code{debbugs-gnu-default-hits-per-page} bug results from the
-query, there are widgets (@code{debbugs-gnu}) or links
-(@code{debbugs-org}) in the result buffer for retrieving the other
-results.
+returns a list of TODO items in @code{org-mode}.  In order not to
+stress the GNU Debbugs server, the bugs are retrieved in chunks of 500
+bugs.  However, the bug report buffer shows all retrieved bugs then,
+in reverse bug number order.
 
 @vindex debbugs-gnu-all-severities
 @var{severities} is a list of strings which filter for the severities
@@ -112,9 +113,13 @@ The existing package names are compiled into the constant
 @var{archivedp}, if address@hidden, extends the result also on
 archived bugs on the GNU Debbugs server.
 
address@hidden debbugs-gnu-default-suppress-bugs
 @var{suppress} shall also distinct between @code{nil} and
 address@hidden  When address@hidden, closed bugs are suppressed from
-the results.
+being retrieved from the Debbugs server.  Which bugs are regarded as
+suppressed is configured in the customer option
address@hidden  Per default, bugs marked as
address@hidden"done"} are suppressed from being retrieved.
 
 When @var{severities} contains the severity @code{"tagged"},
 @var{tags} is consulted in order to restrict the result on bugs which
@@ -134,12 +139,6 @@ Default values for interactive use could be configured in 
the customer
 options @code{debbugs-gnu-default-severities} and
 @code{debbugs-gnu-default-packages}.
 
address@hidden debbugs-gnu-default-hits-per-page
-When the result would exceed more than 500 bugs, the user is asked how
-many bugs to retrieve at once.  This value can be configured in the
-customer option @code{debbugs-gnu-default-hits-per-page}.  However, it
-is not recommended to exceeds the default value.
-
 @ref{Layout} for the presentation of the results.
 
 @end deffn
@@ -204,7 +203,7 @@ server, @xref{Retrieving Bugs}.
 A comma-separated list of defined user tags.
 
 @item submitter
-The address of the bug submitter.
+The email address of the bug submitter.
 
 @item date
 A time period the bug has been in which the bug has been submitted or
@@ -283,20 +282,15 @@ in @code{org-mode}.
 * Control Messages::            Control Messages.
 @end menu
 
+
 @node Tabulated Lists
 @section Tabulated Lists
 
 A tabulated list of bug reports consist of four columns for every bug
 entry: @code{Id} (the bug number), @code{State} (some bug attributes),
 @code{Submitter} (the name of the bug submitter), and @code{Title}
-(the bug subject).  Per default the bugs are sorted by @code{Id}; this
-could be changed by clicking in the headline.
-
-Per bug retrieval only up to 500
-(@code{debbugs-gnu-default-hits-per-page}) bugs are retrieved and
-presented in a buffer.  If there shall be presented more bugs, widgets
-are placed on the top and bottom of the buffer for navigation to
-further report buffers.
+(the bug subject).  Per default the bugs are sorted descending by
address@hidden; this could be changed by clicking in the headline.
 
 Different foreground colours present further information on the bug
 report.  If the bug number uses a red colour
@@ -316,17 +310,17 @@ is closed).  Archived bugs are shown with inverse face
 The bug report buffers have enabled the minor
 @code{debbugs-gnu-mode}.  This enables the following key strokes:
 
address@hidden address@hidden@key{mouse-2}}} {Some very very very long long 
text Some very very very long long text Some very very very long long text}
address@hidden @columnfractions .20 .80
 
 @item
 @kindex @address@hidden
address@hidden@key{RET}}
address@hidden@key{RET}} @*
 @kindex @address@hidden
address@hidden@key{mouse-1}}
address@hidden@key{mouse-1}} @*
 @kindex @address@hidden
 @address@hidden @tab
 @code{debbugs-gnu-select-report} @*
-Open a GNUS ephemeral group for that address@hidden (@pxref{xxx}).
+Show the email messages that discuss the bug.
 
 @* @item
 @kindex @kbd{d}
@@ -334,29 +328,40 @@ Open a GNUS ephemeral group for that address@hidden 
(@pxref{xxx}).
 @code{debbugs-gnu-display-status} @*
 Show all bug attributes.
 
address@hidden @item
address@hidden @kindex @kbd{/}
address@hidden @kbd{/} @tab
address@hidden @code{debbugs-gnu-narrow-to-status}
address@hidden
address@hidden @kbd{/}
address@hidden/} @tab
address@hidden @*
+Narrow the list of bugs to the bugs that match the given regex in
address@hidden, @code{Submitter} or @code{Title}.
 
address@hidden @item
address@hidden @kindex @kbd{w}
address@hidden @kbd{w} @tab
address@hidden @code{debbugs-gnu-widen}
address@hidden
address@hidden @kbd{R}
address@hidden @tab
address@hidden @*
+Narrow the list of bug reports to the ones that are blocking the
+current release.
+
address@hidden
address@hidden @kbd{w}
address@hidden @tab
address@hidden @*
+Restore the full list again after narrowing.
 
 @item
 @kindex @kbd{g}
 @kbd{g} @tab
 @code{debbugs-gnu-rescan} @*
-Reload all bugs from the GNU Debbugs server.
+Reload all bugs.  With a prefix argument @kbd{C-u}, the bug status
+cache is disabled, and all bug reports are retrieved from the GNU
+Debbugs server.
 
 @item
 @kindex @kbd{B}
address@hidden @tab
address@hidden
address@hidden
address@hidden @*
 @kindex @kbd{b}
 @kbd{b} @tab
address@hidden @*
 @code{debbugs-gnu-show-blocked-by-reports} @*
 Show all bug reports which are blocking / blocked by this bug.
 
@@ -386,6 +391,14 @@ Send a control message for this bug, @ref{Control 
Messages}.
 
 @end multitable
 
address@hidden debbugs-gnu-mail-backend
+The user option @code{debbugs-gnu-mail-backend} controls the
+presentation of email messages produced by typing @address@hidden or
+by clicking the mouse on a bug: if its value is @code{gnus}, the
+default, a GNUS ephemeral group for that bug will be shown; if its
+value is @code{rmail}, the command will present an Rmail folder
+instead.
+
 
 @node TODO Items
 @section TODO Items
@@ -394,16 +407,11 @@ TODO items are offered as usual in @code{org-mode}.  The 
bug
 attributes are mapped onto properties of these items.  They can be
 shown by the usual navigation in @code{org-mode}.
 
-Per bug retrieval only up to 500
-(@code{debbugs-gnu-default-hits-per-page}) bugs are retrieved and
-presented in a buffer.  At the end of the buffer there is a link,
-which allows to append the next 500 bugs to the list.
-
 Bug severities are mapped onto org severities, see
 @code{debbugs-org-severity-priority}.
 
 The bug report buffers have enabled the minor
address@hidden  This enables the following key strokes:
address@hidden  This enables the following key strokes:
 
 @multitable address@hidden # C}} {Some very very very long long text Some very 
very very long long text Some very very very long long text}
 
@@ -445,10 +453,10 @@ server.  Their format is described in
 @uref{http://debbugs.gnu.org/server-control.html}.
 
 A control message can be initiated in the tabulated list of bugs, in
-the list of org TODO items, or in the GNUS ephemeral group opened for
-the messages belonging to a given bug.  Control messages can be sent
-to unarchived bugs only, in case a bug is archived the control message
address@hidden must be sent first.
+the list of org TODO items, or in the GNUS ephemeral group or Rmail
+folder opened for the messages belonging to a given bug.  Control
+messages can be sent to unarchived bugs only, in case a bug is
+archived the control message @samp{unarchive} must be sent first.
 
 In the minibuffer, the following control messages can be requested
 (assuming that 12345 is the bug the control message is intended for).
@@ -497,13 +505,6 @@ interactively.
 
 The second bug number is read interactively.
 
address@hidden important
address@hidden minor
address@hidden normal
address@hidden serious
address@hidden wishlist
-"severity 12345 important|minor|normal|serious|wishlist"
-
 @item invalid
 "tags 12345 notabug" @*
 "tags 12345 wontfix" @*
@@ -523,6 +524,18 @@ The package name on the GNU Debbugs server is read 
interactively.
 @item reopen
 "reopen 12345"
 
address@hidden retitle
+"retitle 12345 @var{title}"
+
+The new bug title is read interactively.
+
address@hidden serious
address@hidden important
address@hidden normal
address@hidden minor
address@hidden wishlist
+"severity 12345 serious|important|normal|minor|wishlist"
+
 @item unarchive
 "unarchive 12345"
 
diff --git a/packages/debbugs/debbugs.el b/packages/debbugs/debbugs.el
index c469193..f145280 100644
--- a/packages/debbugs/debbugs.el
+++ b/packages/debbugs/debbugs.el
@@ -1,11 +1,12 @@
 ;;; debbugs.el --- SOAP library to access debbugs servers
 
-;; Copyright (C) 2011-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2016 Free Software Foundation, Inc.
 
 ;; Author: Michael Albinus <address@hidden>
 ;; Keywords: comm, hypermedia
 ;; Package: debbugs
-;; Version: 0.7
+;; Version: 0.9
+;; Package-Requires: ((async "1.6"))
 
 ;; This file is not part of GNU Emacs.
 
@@ -36,6 +37,10 @@
 (require 'soap-client)
 (eval-when-compile (require 'cl))
 
+(declare-function soap-invoke-async "soap-client")
+(declare-function async-start "async")
+(declare-function async-get "async")
+
 (defgroup debbugs nil
   "Debbugs library"
   :group 'hypermedia)
@@ -95,6 +100,52 @@ This corresponds to the Debbugs server to be accessed, 
either
       default-directory)))
   "The WSDL object to be used describing the SOAP interface.")
 
+;; Please do not increase this value, otherwise we would run into
+;; performance problems on the server.  Maybe we need to change this a
+;; server specific value.
+(defconst debbugs-max-hits-per-request 500
+  "The max number of bugs or results per soap invocation.")
+
+(defvar debbugs-cache-data
+  (make-hash-table :test 'equal :size debbugs-max-hits-per-request)
+  "Hash table of retrieved bugs.")
+
+(defcustom debbugs-cache-expiry (* 60 60)
+  "How many seconds debbugs query results are cached.
+`t' or 0 disables caching, `nil' disables expiring."
+  :group 'debbugs
+  :type '(choice (const :tag "Always" t)
+                (const :tag "Never" nil)
+                (integer :tag "Seconds")))
+
+(defvar debbugs-soap-invoke-async-object nil
+  "The object manipulated by `debbugs-soap-invoke-async'.")
+
+(defun debbugs-soap-invoke-async (operation-name &rest parameters)
+  "Invoke the SOAP connection asynchronously.
+If possible, it uses `soap-invoke-async' from soapclient 3.0.
+Otherwise, `async-start' from the async package is used."
+  (if (fboundp 'soap-invoke-async)
+      ;; This is soap-client 3.0.
+      (apply
+       'soap-invoke-async
+       (lambda (response &rest args)
+        (setq debbugs-soap-invoke-async-object
+              (append debbugs-soap-invoke-async-object (car response))))
+       nil
+       debbugs-wsdl debbugs-port operation-name parameters)
+    ;; Fallback with async.
+    (async-start
+     `(lambda ()
+       (load ,(locate-library "soap-client"))
+       (apply
+        'soap-invoke
+        (soap-load-wsdl
+         ,(expand-file-name
+           "Debbugs.wsdl"
+           (file-name-directory (locate-library "debbugs"))))
+        ,debbugs-port ,operation-name ',parameters)))))
+
 (defun debbugs-get-bugs (&rest query)
   "Return a list of bug numbers which match QUERY.
 
@@ -223,7 +274,8 @@ Every returned entry is an association list with the 
following attributes:
   `package': A list of package names the bug belongs to.
 
   `severity': The severity of the bug report. This can be
-  \"important\", \"grave\", \"normal\", \"minor\" or \"wishlist\".
+  \"critical\", \"grave\", \"serious\", \"important\",
+  \"normal\", \"minor\" or \"wishlist\".
 
   `tags': The status of the bug report, a list of strings.  This
   can be \"fixed\", \"notabug\", \"wontfix\", \"unreproducible\",
@@ -290,41 +342,103 @@ Example:
        \(last_modified . 1271200046.0)
        \(pending . \"pending\")
        \(package \"emacs\")))"
-  (when bug-numbers
-    (let ((object
-          (car
-           (soap-invoke
-            debbugs-wsdl debbugs-port "get_status"
-            (apply 'vector bug-numbers)))))
-      (mapcar
-       (lambda (x)
-        (let (y)
-          ;; "archived" is the number 1 or 0.
-          (setq y (assoc 'archived (cdr (assoc 'value x))))
-          (setcdr y (= (cdr y) 1))
-          ;; "found_versions" and "fixed_versions" are lists,
-          ;; containing strings or numbers.
-          (dolist (attribute '(found_versions fixed_versions))
-            (setq y (assoc attribute (cdr (assoc 'value x))))
-            (setcdr y (mapcar
-                       (lambda (z) (if (numberp z) (number-to-string z) z))
-                       (cdr y))))
-          ;; "mergedwith", "blocks" and "blockedby are strings,
-          ;; containing blank separated bug numbers.
-          (dolist (attribute '(mergedwith blocks blockedby))
-            (setq y (assoc attribute (cdr (assoc 'value x))))
-            (when (stringp (cdr y))
-              (setcdr y (mapcar
-                         'string-to-number (split-string (cdr y) " " t)))))
-          ;; "package" is a string, containing comma separated
-          ;; package names.  "keywords" and "tags" are strings,
-          ;; containing blank separated package names.
-          (dolist (attribute '(package keywords tags))
-            (setq y (assoc attribute (cdr (assoc 'value x))))
-            (when (stringp (cdr y))
-              (setcdr y (split-string (cdr y) ",\\| " t))))
-          (cdr (assoc 'value x))))
-       object))))
+  (let (cached-bugs)
+    ;; Check for cached bugs.
+    (setq bug-numbers (delete-dups bug-numbers)
+         bug-numbers
+         (delete
+          nil
+          (mapcar
+           (lambda (bug)
+             (let ((status (gethash bug debbugs-cache-data)))
+               (if (and
+                    status
+                    (or
+                     (null debbugs-cache-expiry)
+                     (and
+                      (natnump debbugs-cache-expiry)
+                      (> (cdr (assoc 'cache_time status))
+                         (- (float-time)) debbugs-cache-expiry))))
+                   (progn
+                     (setq cached-bugs (append cached-bugs (list status)))
+                     nil)
+                 bug)))
+           bug-numbers)))
+
+    ;; Retrieve the data.
+    (setq debbugs-soap-invoke-async-object nil)
+    (when bug-numbers
+      ;; Retrieve bugs asynchronously.
+      (let ((bug-ids bug-numbers)
+           results)
+       (while bug-ids
+         (setq results
+               (append
+                results
+                (list
+                 (debbugs-soap-invoke-async
+                  "get_status"
+                  (apply
+                   'vector
+                   (butlast
+                    bug-ids (- (length bug-ids)
+                               debbugs-max-hits-per-request))))))
+
+               bug-ids
+               (last bug-ids (- (length bug-ids)
+                                debbugs-max-hits-per-request))))
+
+       (dolist (res results)
+         (if (bufferp res)
+             ;; This is soap-client 3.0.
+             (while (buffer-live-p res)
+               (accept-process-output (get-buffer-process res) 0.1))
+           ;; Fallback with async.
+           (dolist (status (async-get res))
+             (setq debbugs-soap-invoke-async-object
+                   (append debbugs-soap-invoke-async-object status)))))))
+
+    (append
+     cached-bugs
+     ;; Massage results.
+     (mapcar
+      (lambda (x)
+       (let (y)
+         ;; "archived" is the number 1 or 0.
+         (setq y (assoc 'archived (cdr (assoc 'value x))))
+         (setcdr y (= (cdr y) 1))
+         ;; "found_versions" and "fixed_versions" are lists,
+         ;; containing strings or numbers.
+         (dolist (attribute '(found_versions fixed_versions))
+           (setq y (assoc attribute (cdr (assoc 'value x))))
+           (setcdr y (mapcar
+                      (lambda (z) (if (numberp z) (number-to-string z) z))
+                      (cdr y))))
+         ;; "mergedwith", "blocks" and "blockedby are strings,
+         ;; containing blank separated bug numbers.
+         (dolist (attribute '(mergedwith blocks blockedby))
+           (setq y (assoc attribute (cdr (assoc 'value x))))
+           (when (stringp (cdr y))
+             (setcdr y (mapcar
+                        'string-to-number (split-string (cdr y) " " t)))))
+         ;; "package" is a string, containing comma separated
+         ;; package names.  "keywords" and "tags" are strings,
+         ;; containing blank separated package names.
+         (dolist (attribute '(package keywords tags))
+           (setq y (assoc attribute (cdr (assoc 'value x))))
+           (when (stringp (cdr y))
+             (setcdr y (split-string (cdr y) ",\\| " t))))
+         ;; Cache the result, and return.
+         (if (and debbugs-cache-expiry (natnump debbugs-cache-expiry))
+             (puthash
+              (cdr (assoc 'key x))
+              ;; Put also a time stamp.
+              (cons (cons 'cache_time (floor (float-time)))
+                    (cdr (assoc 'value x)))
+              debbugs-cache-data)
+           ;; Don't cache.
+           (cdr (assoc 'value x)))))
+      debbugs-soap-invoke-async-object))))
 
 (defun debbugs-get-usertag (&rest query)
   "Return a list of bug numbers which match QUERY.
@@ -441,7 +555,8 @@ The following conditions are possible:
 
   :skip and :max are optional.  They specify, how many hits are
   skipped, and how many maximal hits are returned.  This can be
-  used for paged results.  Per default, :skip is 0 and :max is 10.
+  used for paged results.  Per default, :skip is 0 and all
+  possible hits are returned.
 
   There must be exactly one such condition.
 
@@ -543,134 +658,155 @@ Examples:
       ,\(floor \(float-time \(encode-time 0 0 0 31 8 2011)))
       :operator \"NUMBT\"))"
 
-  (let (args result)
-    ;; Compile search arguments.
-    (dolist (elt query)
-      (let (vec kw key val
-           phrase-cond attr-cond)
-
-       ;; Phrase is mandatory, even if empty.
-       (when (and (or  (member :skip elt) (member :max elt))
-                  (not (member :phrase elt)))
-         (setq vec (vector "phrase" "")))
-
-       ;; Parse condition.
-       (while (consp elt)
-         (setq kw (pop elt))
-         (unless (keywordp kw)
-           (error "Wrong keyword: %s" kw))
-         (setq key (substring (symbol-name kw) 1))
-         (cl-case kw
-           ;; Phrase condition.
-           (:phrase
-            ;; It shouldn't happen in an attribute condition.
-            (if attr-cond
-                (error "Wrong keyword: %s" kw))
-            (setq phrase-cond t val (pop elt))
-            ;; Value is a string.
-            (if (stringp val)
-                (setq vec (vconcat vec (list key val)))
-              (error "Wrong %s: %s" key val)))
-
-           ((:skip :max)
-            ;; It shouldn't happen in an attribute condition.
-            (if attr-cond
-                (error "Wrong keyword: %s" kw))
-            (setq phrase-cond t val (pop elt))
-            ;; Value is a number.
-            (if (numberp val)
-                (setq vec (vconcat vec (list key (number-to-string val))))
-              (error "Wrong %s: %s" key val)))
-
-           ;; Attribute condition.
-           ((:submitter :@author)
-            ;; It shouldn't happen in a phrase condition.
-            (if phrase-cond
-                (error "Wrong keyword: %s" kw))
-            (if (not (stringp (car elt)))
-                (setq vec (vconcat vec (list key "")))
-              ;; Value is an email address.
-              (while (and (stringp (car elt))
-                          (string-match "\\`\\S-+\\'" (car elt)))
-                (when (string-equal "me" (car elt))
-                  (setcar elt user-mail-address))
-                (when (string-match "<\\(.+\\)>" (car elt))
-                  (setcar elt (match-string 1 (car elt))))
-                 (let ((x (pop elt)))
-                   (unless (member x val)
-                     (setq val (append val (list x))))))
-              (setq vec
-                    (vconcat vec (list key (mapconcat 'identity val " "))))))
-
-           (:status
-            ;; It shouldn't happen in a phrase condition.
-            (if phrase-cond
-                (error "Wrong keyword: %s" kw))
-            (setq attr-cond t)
-            (if (not (stringp (car elt)))
-                (setq vec (vconcat vec (list key "")))
-              ;; Possible values: "done", "forwarded" and "open"
-              (while  (and (stringp (car elt))
-                           (string-match
-                            "\\`\\(done\\|forwarded\\|open\\)\\'" (car elt)))
-                (let ((x (pop elt)))
-                   (unless (member x val)
-                     (setq val (append val (list x))))))
-              (setq vec
-                    (vconcat vec (list key (mapconcat 'identity val " "))))))
-
-           ((:subject :package :tags :severity :@title)
-            ;; It shouldn't happen in a phrase condition.
-            (if phrase-cond
-                (error "Wrong keyword: %s" kw))
-            (setq attr-cond t)
-            (if (not (stringp (car elt)))
-                (setq vec (vconcat vec (list key "")))
-              ;; Just a string.
-              (while (stringp (car elt))
-                (let ((x (pop elt)))
-                   (unless (member x val)
-                     (setq val (append val (list x))))))
-              (setq vec
-                    (vconcat vec (list key (mapconcat 'identity val " "))))))
-
-           ((:date :@cdate)
-            ;; It shouldn't happen in a phrase condition.
-            (if phrase-cond
-                (error "Wrong keyword: %s" kw))
-            (setq attr-cond t)
-            (if (not (numberp (car elt)))
-                (setq vec (vconcat vec (list key "")))
-              ;; Just a number.
-              (while (numberp (car elt))
-                 (let ((x (pop elt)))
-                   (unless (member x val)
-                     (setq val (append val (list x))))))
-              (setq vec
-                    (vconcat
-                     vec (list key (mapconcat 'number-to-string val " "))))))
-
-           ((:operator :order)
-            ;; It shouldn't happen in a phrase condition.
-            (if phrase-cond
-                (error "Wrong keyword: %s" kw))
-            (setq attr-cond t val (pop elt))
-            ;; Value is a number.
-            (if (stringp val)
-                (setq vec (vconcat vec (list key val)))
-              (error "Wrong %s: %s" key val)))
-
-           (t (error "Unknown key: %s" kw))))
-
-       (setq args (vconcat args (list vec)))))
-
-    (setq result
-         (car (soap-invoke debbugs-wsdl debbugs-port "search_est" args)))
-    ;; The result contains lists (key value).  We transform it into
-    ;; cons cells (key . value).
-    (dolist (elt1 result result)
-      (dolist (elt2 elt1)
-       (setcdr elt2 (cadr elt2))))))
+  (let ((phrase (assoc :phrase query))
+       args result)
+    (if (and phrase (not (member :skip phrase)) (not (member :skip phrase)))
+       ;; We loop, until we have all results.
+       (let ((skip 0)
+             (query (delete phrase query))
+             result1)
+         (while skip
+           (setq result1
+                 (apply
+                  'debbugs-search-est
+                  (append
+                   (list
+                    (append
+                     phrase `(:skip ,skip)
+                     `(:max ,debbugs-max-hits-per-request)))
+                   query))
+                 skip (and (= (length result1) debbugs-max-hits-per-request)
+                           (+ skip debbugs-max-hits-per-request))
+                 result (append result result1)))
+         result)
+
+      ;; Compile search arguments.
+      (dolist (elt query)
+       (let (vec kw key val
+                 phrase-cond attr-cond)
+
+         ;; Phrase is mandatory, even if empty.
+         (when (and (or  (member :skip elt) (member :max elt))
+                    (not (member :phrase elt)))
+           (setq vec (vector "phrase" "")))
+
+         ;; Parse condition.
+         (while (consp elt)
+           (setq kw (pop elt))
+           (unless (keywordp kw)
+             (error "Wrong keyword: %s" kw))
+           (setq key (substring (symbol-name kw) 1))
+           (cl-case kw
+             ;; Phrase condition.
+             (:phrase
+              ;; It shouldn't happen in an attribute condition.
+              (if attr-cond
+                  (error "Wrong keyword: %s" kw))
+              (setq phrase-cond t val (pop elt))
+              ;; Value is a string.
+              (if (stringp val)
+                  (setq vec (vconcat vec (list key val)))
+                (error "Wrong %s: %s" key val)))
+
+             ((:skip :max)
+              ;; It shouldn't happen in an attribute condition.
+              (if attr-cond
+                  (error "Wrong keyword: %s" kw))
+              (setq phrase-cond t val (pop elt))
+              ;; Value is a number.
+              (if (numberp val)
+                  (setq vec (vconcat vec (list key (number-to-string val))))
+                (error "Wrong %s: %s" key val)))
+
+             ;; Attribute condition.
+             ((:submitter :@author)
+              ;; It shouldn't happen in a phrase condition.
+              (if phrase-cond
+                  (error "Wrong keyword: %s" kw))
+              (if (not (stringp (car elt)))
+                  (setq vec (vconcat vec (list key "")))
+                ;; Value is an email address.
+                (while (and (stringp (car elt))
+                            (string-match "\\`\\S-+\\'" (car elt)))
+                  (when (string-equal "me" (car elt))
+                    (setcar elt user-mail-address))
+                  (when (string-match "<\\(.+\\)>" (car elt))
+                    (setcar elt (match-string 1 (car elt))))
+                  (let ((x (pop elt)))
+                    (unless (member x val)
+                      (setq val (append val (list x))))))
+                (setq vec
+                      (vconcat vec (list key (mapconcat 'identity val " "))))))
+
+             (:status
+              ;; It shouldn't happen in a phrase condition.
+              (if phrase-cond
+                  (error "Wrong keyword: %s" kw))
+              (setq attr-cond t)
+              (if (not (stringp (car elt)))
+                  (setq vec (vconcat vec (list key "")))
+                ;; Possible values: "done", "forwarded" and "open"
+                (while  (and (stringp (car elt))
+                             (string-match
+                              "\\`\\(done\\|forwarded\\|open\\)\\'" (car elt)))
+                  (let ((x (pop elt)))
+                    (unless (member x val)
+                      (setq val (append val (list x))))))
+                (setq vec
+                      (vconcat vec (list key (mapconcat 'identity val " "))))))
+
+             ((:subject :package :tags :severity :@title)
+              ;; It shouldn't happen in a phrase condition.
+              (if phrase-cond
+                  (error "Wrong keyword: %s" kw))
+              (setq attr-cond t)
+              (if (not (stringp (car elt)))
+                  (setq vec (vconcat vec (list key "")))
+                ;; Just a string.
+                (while (stringp (car elt))
+                  (let ((x (pop elt)))
+                    (unless (member x val)
+                      (setq val (append val (list x))))))
+                (setq vec
+                      (vconcat vec (list key (mapconcat 'identity val " "))))))
+
+             ((:date :@cdate)
+              ;; It shouldn't happen in a phrase condition.
+              (if phrase-cond
+                  (error "Wrong keyword: %s" kw))
+              (setq attr-cond t)
+              (if (not (numberp (car elt)))
+                  (setq vec (vconcat vec (list key "")))
+                ;; Just a number.
+                (while (numberp (car elt))
+                  (let ((x (pop elt)))
+                    (unless (member x val)
+                      (setq val (append val (list x))))))
+                (setq vec
+                      (vconcat
+                       vec (list key (mapconcat 'number-to-string val " "))))))
+
+             ((:operator :order)
+              ;; It shouldn't happen in a phrase condition.
+              (if phrase-cond
+                  (error "Wrong keyword: %s" kw))
+              (setq attr-cond t val (pop elt))
+              ;; Value is a number.
+              (if (stringp val)
+                  (setq vec (vconcat vec (list key val)))
+                (error "Wrong %s: %s" key val)))
+
+             (t (error "Unknown key: %s" kw))))
+
+         (setq args (vconcat args (list vec)))))
+
+      (setq result
+           (car (soap-invoke debbugs-wsdl debbugs-port "search_est" args)))
+      ;; The result contains lists (key value).  We transform it into
+      ;; cons cells (key . value).
+      (dolist (elt1 result result)
+       (dolist (elt2 elt1)
+         (setcdr elt2 (cadr elt2)))))))
 
 (defun debbugs-get-attribute (bug-or-message attribute)
   "Return the value of key ATTRIBUTE.
diff --git a/packages/debbugs/debbugs.info b/packages/debbugs/debbugs.info
index fe4a55e..b05bf77 100644
--- a/packages/debbugs/debbugs.info
+++ b/packages/debbugs/debbugs.info
@@ -1,20 +1,21 @@
-This is debbugs.info, produced by makeinfo version 5.0 from
+This is debbugs.info, produced by makeinfo version 6.0 from
 debbugs.texi.
 
-Copyright (C) 2011-2015 Free Software Foundation, Inc.
+Copyright (C) 2011-2016 Free Software Foundation, Inc.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
      Version 1.2 or any later version published by the Free Software
      Foundation; with no Invariant Sections, with the Front-Cover, or
-     Back-Cover Texts.  A copy of the license is included in the section
-     entitled "GNU Free Documentation License" in the Emacs manual.
+     Back-Cover Texts.  A copy of the license is included in the
+     section entitled "GNU Free Documentation License" in the Emacs
+     manual.
 
      This document is part of a collection distributed under the GNU
      Free Documentation License.  If you want to distribute this
-     document separately from the collection, you can do so by adding a
-     copy of the license to the document, as described in section 6 of
-     the license.
+     document separately from the collection, you can do so by adding
+     a copy of the license to the document, as described in section 6
+     of the license.
 
      All Emacs Lisp code contained in this document may be used,
      distributed, and modified without restriction.
@@ -29,10 +30,10 @@ File: debbugs.info,  Node: Top,  Next: Installation,  Up: 
(dir)
 Debbugs Programmer's Manual
 ***************************
 
-Debbugs is a bugtracking system (BTS) that was initially written for the
-Debian project but currently used also by the GNU project.  The main
-distinctive feature of Debbugs is that it's mostly email-based.  All
-actions on bug reports: opening, closing, changing the status,
+Debbugs is a bugtracking system (BTS) that was initially written for
+the Debian project but currently used also by the GNU project.  The
+main distinctive feature of Debbugs is that it's mostly email-based.
+All actions on bug reports: opening, closing, changing the status,
 commenting, forwarding are performed via email by sending specially
 composed letters to the particular mail addresses.  However, searching
 the bug reports, querying bug report status and viewing comments have
@@ -51,8 +52,11 @@ exposes to developers the available functions provided by 
the Debbugs
 server.  'debbugs' uses Emacs' SOAP client library for communication
 with the Debbugs server.  In tandem with Emacs' email facilities,
 'debbugs' provides a solution for building applications that interact
-with the Debbugs BTS directly from Emacs without addressing Debbugs' web
-interface.
+with the Debbugs BTS directly from Emacs without addressing Debbugs'
+web interface.
+
+   The user interface for accessing the Debbugs server for GNU
+projects is described in *note Debbugs User Guide: (debbugs-ug)Top.
 
 * Menu:
 
@@ -78,8 +82,8 @@ Installation on Emacs 22 and Emacs 23
 -------------------------------------
 
 If you want to install 'debbugs' on Emacs 22/23, you will need to
-install the 'soap-client' library first.  It can be downloaded from the
-Emacs SOAP client project page
+install the 'soap-client' library first.  It can be downloaded from
+the Emacs SOAP client project page
 (http://code.google.com/p/emacs-soap-client/).
 
    Compile the library and add it into your 'load-path':
@@ -106,17 +110,17 @@ File: debbugs.info,  Node: Configuration,  Next: 
Requesting bug numbers,  Prev:
 
 'debbugs' is already configured to work with two main ports of Debbugs
 BTS: <http://bugs.debian.org> and <http://debbugs.gnu.org>.  So if you
-intend to use one of these ports, you don't need to configure 'debbugs'.
-If you want to interact with a Debbugs port other than those listed, you
-have to configure 'debbugs' by adding a new server specifier to the
-'debbugs-servers' variable.  The actual port can be selected by the
-'debbugs-port' variable.
+intend to use one of these ports, you don't need to configure
+'debbugs'.  If you want to interact with a Debbugs port other than
+those listed, you have to configure 'debbugs' by adding a new server
+specifier to the 'debbugs-servers' variable.  The actual port can be
+selected by the 'debbugs-port' variable.
 
  -- Variable: debbugs-servers
      List of Debbugs server specifiers.  Each entry is a list that
      contains a string identifying the port name and the server
-     parameters in keyword-value form.  The list initially contains two
-     predefined and configured Debbugs servers: '"gnu.org"' and
+     parameters in keyword-value form.  The list initially contains
+     two predefined and configured Debbugs servers: '"gnu.org"' and
      '"debian.org"'.
 
      Valid keywords are:
@@ -129,8 +133,8 @@ have to configure 'debbugs' by adding a new server 
specifier to the
 
      ':bugreport-url'
           The URL of the server script ('bugreport.cgi' in the default
-          Debbugs installation) that provides the access to mboxes with
-          messages from bug reports.
+          Debbugs installation) that provides the access to mboxes
+          with messages from bug reports.
 
      Example.  Add a new Debbugs port with name "foobars.net":
 
@@ -141,9 +145,18 @@ have to configure 'debbugs' by adding a new server 
specifier to the
              :bugreport-url "http://bugs.foobars.net/cgi/bugreport.cgi";))
 
  -- Variable: debbugs-port
-     This variable holds the name of the currently used port.  The value
-     of the variable corresponds to the Debbugs server to be accessed,
-     either '"gnu.org"' or '"debian.org"', or a user defined port name.
+     This variable holds the name of the currently used port.  The
+     value of the variable corresponds to the Debbugs server to be
+     accessed, either '"gnu.org"' or '"debian.org"', or a user defined
+     port name.
+
+ -- Variable: debbugs-cache-expiry
+     The function 'debbugs-get-status' (*note Requesting bugs
+     statuses::) caches retrieved status entries in order to improve
+     the performance.  This variable determines the number of seconds
+     an entry is cached, before it is retrieved again.  A value of
+     'nil' disables cache expiration, and a value of 't' disables
+     caching.  Both values are not recommended for a usual workflow.
 
 
 File: debbugs.info,  Node: Requesting bug numbers,  Next: Requesting bugs 
statuses,  Prev: Configuration,  Up: Top
@@ -151,17 +164,17 @@ File: debbugs.info,  Node: Requesting bug numbers,  Next: 
Requesting bugs status
 3 Requesting bug numbers
 ************************
 
-In Debbugs BTS, the bug number is the unique identifier of a bug report.
-The functions described in this section return from the Debbugs server
-the list of bug numbers that match a user's query.
+In Debbugs BTS, the bug number is the unique identifier of a bug
+report.  The functions described in this section return from the
+Debbugs server the list of bug numbers that match a user's query.
 
  -- Function: debbugs-get-bugs &rest query
      This function returns a list of bug numbers that match the QUERY.
      QUERY is a sequence of keyword-value pairs where the values are
      strings, i.e.  :KEYWORD "VALUE" [:KEYWORD "VALUE"]*
 
-     The keyword-value pair is a subquery.  The keywords are allowed to
-     have multiple occurrence within the query at any place.  The
+     The keyword-value pair is a subquery.  The keywords are allowed
+     to have multiple occurrence within the query at any place.  The
      subqueries with the same keyword form the logical subquery, which
      returns the union of bugs of every subquery it contains.
 
@@ -175,12 +188,13 @@ the list of bug numbers that match a user's query.
           '"emacs"', '"coreutils"', '"gnus"', or '"tramp"'.
 
      ':src'
-          This is used to retrieve bugs that belong to source with given
-          name.
+          This is used to retrieve bugs that belong to source with
+          given name.
 
      ':severity'
           This is the severity of the bug.  The exact set of available
-          severities depends on the policy of a particular Debbugs port:
+          severities depends on the policy of a particular Debbugs
+          port:
 
           Debian port: '"critical"', '"grave"', '"serious"',
           '"important"', '"normal"', '"minor"', '"wishlist"', and
@@ -190,19 +204,20 @@ the list of bug numbers that match a user's query.
           '"wishlist"'.
 
      ':tag'
-          An arbitrary string the bug is annotated with.  Usually, this
-          is used to mark the status of the bug.  The list of possible
-          tags depends on the Debbugs port.
+          An arbitrary string the bug is annotated with.  Usually,
+          this is used to mark the status of the bug.  The list of
+          possible tags depends on the Debbugs port.
 
           Debian port: '"patch"', '"wontfix"', '"moreinfo"',
-          '"unreproducible"', '"fixed"', '"potato"', '"woody"', '"sid"',
-          '"help"', '"security"', '"upstream"', '"pending"', '"sarge"',
-          '"sarge-ignore"', '"experimental"', '"d-i"', '"confirmed"',
-          '"ipv6"', '"lfs"', '"fixed-in-experimental"',
+          '"unreproducible"', '"fixed"', '"potato"', '"woody"',
+          '"sid"', '"help"', '"security"', '"upstream"', '"pending"',
+          '"sarge"', '"sarge-ignore"', '"experimental"', '"d-i"',
+          '"confirmed"', '"ipv6"', '"lfs"', '"fixed-in-experimental"',
           '"fixed-upstream"', '"l10n"', '"etch"', '"etch-ignore"',
-          '"lenny"', '"lenny-ignore"', '"squeeze"', '"squeeze-ignore"',
-          '"wheezy"', '"wheezy-ignore"'.  The actual list of tags can be
-          found on <http://www.debian.org/Bugs/Developer#tags>.
+          '"lenny"', '"lenny-ignore"', '"squeeze"',
+          '"squeeze-ignore"', '"wheezy"', '"wheezy-ignore"'.  The
+          actual list of tags can be found on
+          <http://www.debian.org/Bugs/Developer#tags>.
 
           GNU port: '"fixed"', '"notabug"', '"wontfix"',
           '"unreproducible"', '"moreinfo"', '"patch"', '"pending"',
@@ -212,9 +227,9 @@ the list of bug numbers that match a user's query.
 
      ':owner'
           This is used to identify bugs by the owner's email address.
-          The special email address '"me"' is used as pattern, replaced
-          with the variable 'user-mail-address' (*note (elisp)User
-          Identification::).
+          The special email address '"me"' is used as pattern,
+          replaced with the variable 'user-mail-address' (*note
+          (elisp)User Identification::).
 
      ':submitter'
           With this keyword it is possible to filter bugs by the
@@ -223,10 +238,10 @@ the list of bug numbers that match a user's query.
           'user-mail-address'.
 
      ':maint'
-          This is used to find bugs of the packages which are maintained
-          by the person with the given email address.  The special email
-          address '"me"' is used as pattern, replaced with
-          'user-mail-address'.
+          This is used to find bugs of the packages which are
+          maintained by the person with the given email address.  The
+          special email address '"me"' is used as pattern, replaced
+          with 'user-mail-address'.
 
      ':correspondent'
           This allows to find bug reports where the person with the
@@ -235,10 +250,10 @@ the list of bug numbers that match a user's query.
           'user-mail-address'.
 
      ':affects'
-          With this keyword it is possible to find bugs which affect the
-          package with the given name.  The bugs are chosen by the value
-          of field 'affects' in bug's status.  The returned bugs do not
-          necessary belong to this package.
+          With this keyword it is possible to find bugs which affect
+          the package with the given name.  The bugs are chosen by the
+          value of field 'affects' in bug's status.  The returned bugs
+          do not necessary belong to this package.
 
      ':status'
           Status of bug.  Valid values are '"done"', '"forwarded"' and
@@ -246,12 +261,13 @@ the list of bug numbers that match a user's query.
 
      ':archive'
           A keyword to filter for bugs which are already archived, or
-          not.  Valid values are '"0"' (not archived), '"1"' (archived)
-          or '"both"'.  If this keyword is not given in the query,
-          ':archive "0"' is assumed by default.
+          not.  Valid values are '"0"' (not archived), '"1"'
+          (archived) or '"both"'.  If this keyword is not given in the
+          query, ':archive "0"' is assumed by default.
 
      Example.  Get all opened and forwarded release critical bugs for
-     the packages which are maintained by '"me"' and which have a patch:
+     the packages which are maintained by '"me"' and which have a
+     patch:
 
           (let ((debbugs-port "debian.org"))
             (debbugs-get-bugs :maint "me" :tag "patch"
@@ -262,8 +278,8 @@ the list of bug numbers that match a user's query.
                               :severity "serious"))
 
  -- Function: debbugs-newest-bugs amount
-     This function returns a list of bug numbers, according to AMOUNT (a
-     number) of latest bugs.
+     This function returns a list of bug numbers, according to AMOUNT
+     (a number) of latest bugs.
 
      Example.  Get the latest six bug report numbers from Debian BTS:
 
@@ -278,13 +294,13 @@ File: debbugs.info,  Node: Requesting bugs statuses,  
Next: Requesting messages,
 **************************
 
 Bug status is a collection of fields that holds the information about
-the state and importance of the bug report, about originator, owner and
-various aspects of relationship with other bug reports.
+the state and importance of the bug report, about originator, owner
+and various aspects of relationship with other bug reports.
 
  -- Function: debbugs-get-status &rest bug-numbers
      Return a list of status entries for the bug reports identified by
-     BUG-NUMBERS.  Every returned entry is an association list with the
-     following attributes:
+     BUG-NUMBERS.  Every returned entry is an association list with
+     the following attributes:
 
      'id'
      'bug_num'
@@ -294,9 +310,9 @@ various aspects of relationship with other bug reports.
           A list of package names the bug belongs to.
 
      'severity'
-          The severity of the bug report.  Possible values are the same
-          as for ':severity' in 'debbugs-get-bugs' (*note Requesting bug
-          numbers::).
+          The severity of the bug report.  Possible values are the
+          same as for ':severity' in 'debbugs-get-bugs' (*note
+          Requesting bug numbers::).
 
      'tags'
           The status of the bug report, a list of strings.  Possible
@@ -327,8 +343,8 @@ various aspects of relationship with other bug reports.
 
      'found_date'
      'fixed_date'
-          Date of bug report / bug fix (empty for now).  Encoded as UNIX
-          time.
+          Date of bug report / bug fix (empty for now).  Encoded as
+          UNIX time.
 
      'done'
           The E-mail address of the worker who has closed the bug (if
@@ -408,20 +424,20 @@ File: debbugs.info,  Node: Requesting messages,  Next: 
Requesting user tags,  Pr
 *********************
 
  -- Function: debbugs-get-bug-log bug-number
-     Returns a list of messages related to BUG-NUMBER.  Every message is
-     an association list with the following attributes:
+     Returns a list of messages related to BUG-NUMBER.  Every message
+     is an association list with the following attributes:
 
      'msg_num'
-          The number of the message inside the bug log.  The numbers are
-          ascending, newer messages have a higher number.
+          The number of the message inside the bug log.  The numbers
+          are ascending, newer messages have a higher number.
      'header'
           The header lines from the E-mail messages, as arrived at the
           bug tracker.
      'body'
           The message body.
      'attachments'
-          A list of possible attachments, or 'nil'.  Not implemented yet
-          server side.
+          A list of possible attachments, or 'nil'.  Not implemented
+          yet server side.
 
  -- Function: debbugs-get-message-numbers messages
      Returns the message numbers of MESSAGES.  MESSAGES must be the
@@ -440,11 +456,11 @@ File: debbugs.info,  Node: Requesting messages,  Next: 
Requesting user tags,  Pr
      is a list of strings.  The first element are the header lines of
      the message, the second element is the body of the message.
      Further elements of the list, if any, are attachments of the
-     message.  If there is no message with MESSAGE-NUMBER, the function
-     returns 'nil'.
+     message.  If there is no message with MESSAGE-NUMBER, the
+     function returns 'nil'.
 
-     Example: Return the first message of the last submitted bug report
-     to GNU BTS:
+     Example: Return the first message of the last submitted bug
+     report to GNU BTS:
 
           (let* ((debbugs-port "gnu.org")
                  (messages (apply 'debbugs-get-bug-log
@@ -455,12 +471,12 @@ File: debbugs.info,  Node: Requesting messages,  Next: 
Requesting user tags,  Pr
 
  -- Function: debbugs-get-mbox bug-number mbox-type &optional filename
      Download mbox with all messages from bug report BUG-NUMBER.
-     MBOX-TYPE specifies a type of mbox and can be one of the following
-     symbols:
+     MBOX-TYPE specifies a type of mbox and can be one of the
+     following symbols:
 
      'mboxfolder'
-          Download mbox folder, i.e.  mbox with messages as they arrived
-          at the Debbugs server.
+          Download mbox folder, i.e.  mbox with messages as they
+          arrived at the Debbugs server.
 
      'mboxmaint'
           Download maintainer's mbox, i.e.  mbox with messages as they
@@ -468,17 +484,17 @@ File: debbugs.info,  Node: Requesting messages,  Next: 
Requesting user tags,  Pr
 
      'mboxstat'
      'mboxstatus'
-          Download status mbox.  The use of either symbol depends on the
-          actual Debbugs server configuration.  For '"gnu.org"', use the
-          former; for '"debian.org' - the latter.
+          Download status mbox.  The use of either symbol depends on
+          the actual Debbugs server configuration.  For '"gnu.org"',
+          use the former; for '"debian.org' - the latter.
 
-     FILENAME, if non-'nil', is the name of the file to store mbox.  If
-     FILENAME is 'nil', the downloaded mbox is inserted into the current
-     buffer.
+     FILENAME, if non-'nil', is the name of the file to store mbox.
+     If FILENAME is 'nil', the downloaded mbox is inserted into the
+     current buffer.
 
-     Note, that mbox downloading will work only if the ':bugreport-url'
-     field of the 'debbugs-servers' variable is specified (*note
-     Configuration::).
+     Note, that mbox downloading will work only if the
+     ':bugreport-url' field of the 'debbugs-servers' variable is
+     specified (*note Configuration::).
 
 
 File: debbugs.info,  Node: Requesting user tags,  Prev: Requesting messages,  
Up: Top
@@ -486,9 +502,9 @@ File: debbugs.info,  Node: Requesting user tags,  Prev: 
Requesting messages,  Up
 6 Requesting user tags
 **********************
 
-A user tag is a string, a user has assigned to one or several bugs.  The
-user is identified by an email address.  The port '"gnu.org"' uses also
-package names as user identification.
+A user tag is a string, a user has assigned to one or several bugs.
+The user is identified by an email address.  The port '"gnu.org"' uses
+also package names as user identification.
 
  -- Function: debbugs-get-usertag &rest query
      Return a list of bug numbers which match QUERY.
@@ -502,17 +518,17 @@ package names as user identification.
           The value is the name of the package a bug belongs to, like
           '"emacs"', '"coreutils"', or '"tramp"'.  It can also be an
           email address of a user who has applied a user tag.  The
-          special email address '"me"' is used as pattern, replaced with
-          'user-mail-address'.  There must be at least one such entry;
-          it is recommended to have exactly one.
+          special email address '"me"' is used as pattern, replaced
+          with 'user-mail-address'.  There must be at least one such
+          entry; it is recommended to have exactly one.
 
      ':tag'
           A string applied as user tag.  Often, it is a subproduct
           identification, like '"cedet"' or '"tramp"' for the package
           '"emacs"'.
 
-     If there is no ':tag' entry, no bug numbers will be returned but a
-     list of existing user tags for ':user'.
+     If there is no ':tag' entry, no bug numbers will be returned but
+     a list of existing user tags for ':user'.
 
      Example.  Get all user tags for the package '"emacs"':
 
@@ -530,12 +546,12 @@ package names as user identification.
 
 
 Tag Table:
-Node: Top1089
-Node: Installation3043
-Node: Configuration4142
-Node: Requesting bug numbers6048
-Node: Requesting bugs statuses11276
-Node: Requesting messages15327
-Node: Requesting user tags18343
+Node: Top1094
+Node: Installation3179
+Node: Configuration4278
+Node: Requesting bug numbers6629
+Node: Requesting bugs statuses11883
+Node: Requesting messages15934
+Node: Requesting user tags18949
 
 End Tag Table
diff --git a/packages/debbugs/debbugs.texi b/packages/debbugs/debbugs.texi
index c976d98..0a627d6 100644
--- a/packages/debbugs/debbugs.texi
+++ b/packages/debbugs/debbugs.texi
@@ -8,7 +8,7 @@
 @end direntry
 
 @copying
-Copyright @copyright{} 2011-2015 Free Software Foundation, Inc.
+Copyright @copyright{} 2011-2016 Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -65,6 +65,9 @@ facilities, @code{debbugs} provides a solution for building
 applications that interact with the Debbugs BTS directly from Emacs
 without addressing Debbugs' web interface.
 
+The user interface for accessing the Debbugs server for GNU projects
+is described in @ref{Top, Debbugs User Guide, , debbugs-ug}.
+
 @menu
 * Installation::                Getting and installing @code{debbugs}.
 * Configuration::               Configuring @code{debbugs}.
@@ -157,6 +160,15 @@ the variable corresponds to the Debbugs server to be 
accessed, either
 @code{"gnu.org"} or @code{"debian.org"}, or a user defined port name.
 @end defvar
 
address@hidden debbugs-cache-expiry
+The function @code{debbugs-get-status} (@pxref{Requesting bugs
+statuses}) caches retrieved status entries in order to improve the
+performance.  This variable determines the number of seconds an entry
+is cached, before it is retrieved again.  A value of @code{nil}
+disables cache expiration, and a value of @code{t} disables caching.
+Both values are not recommended for a usual workflow.
address@hidden defvar
+
 @node Requesting bug numbers
 @chapter Requesting bug numbers
 
diff --git a/packages/diff-hl/README.md b/packages/diff-hl/README.md
index ab8c9d8..b8bbe3a 100644
--- a/packages/diff-hl/README.md
+++ b/packages/diff-hl/README.md
@@ -90,5 +90,11 @@ psvn
 Magit
 -----
 
-If you have a recent enough version installed, it defines
-`magit-revert-buffer-hook` (or `magit-not-reverted-hook`), which we use.
+If you're using a version before 2.4.0, it defines `magit-revert-buffer-hook`
+(or `magit-not-reverted-hook`), which we use.
+
+When using Magit 2.4 or newer, add this to your init script:
+
+```lisp
+(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh)
+```
diff --git a/packages/diff-hl/diff-hl-dired.el 
b/packages/diff-hl/diff-hl-dired.el
index 663d293..895341b 100644
--- a/packages/diff-hl/diff-hl-dired.el
+++ b/packages/diff-hl/diff-hl-dired.el
@@ -33,6 +33,7 @@
 
 (require 'diff-hl)
 (require 'dired)
+(require 'vc-hooks)
 
 (defvar diff-hl-dired-process-buffer nil)
 
@@ -62,9 +63,17 @@
 
 (defcustom diff-hl-dired-extra-indicators t
   "Non-nil to indicate ignored files."
-  :group 'diff-hl
   :type 'boolean)
 
+(defcustom diff-hl-dired-ignored-backends '(RCS)
+  "VC backends to ignore.
+The directories registered to one of these backends won't have
+status indicators."
+  :type `(repeat (choice ,@(mapcar
+                            (lambda (name)
+                              `(const :tag ,(symbol-name name) ,name))
+                            vc-handled-backends))))
+
 ;;;###autoload
 (define-minor-mode diff-hl-dired-mode
   "Toggle VC diff highlighting on the side of a Dired window."
@@ -83,7 +92,7 @@
         (def-dir default-directory)
         (buffer (current-buffer))
         dirs-alist files-alist)
-    (when backend
+    (when (and backend (not (memq backend diff-hl-dired-ignored-backends)))
       (diff-hl-dired-clear)
       (if (buffer-live-p diff-hl-dired-process-buffer)
           (let ((proc (get-buffer-process diff-hl-dired-process-buffer)))
diff --git a/packages/diff-hl/diff-hl-flydiff.el 
b/packages/diff-hl/diff-hl-flydiff.el
index 53d31f7..94dbbd7 100644
--- a/packages/diff-hl/diff-hl-flydiff.el
+++ b/packages/diff-hl/diff-hl-flydiff.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2015 Free Software Foundation, Inc.
+;; Copyright (C) 2015, 2016 Free Software Foundation, Inc.
 
 ;; Author:   Jonathan Hayase <address@hidden>
 ;; URL:      https://github.com/dgutov/diff-hl
@@ -105,19 +105,18 @@ the user should be returned."
       (if (file-exists-p automatic-backup)
           (rename-file automatic-backup filename nil)
         (with-current-buffer filebuf
-          (let ((failed t)
-                (coding-system-for-read 'no-conversion)
+          (let ((coding-system-for-read 'no-conversion)
                 (coding-system-for-write 'no-conversion))
-            (unwind-protect
+            (condition-case nil
                 (with-temp-file filename
                   (let ((outbuf (current-buffer)))
                     ;; Change buffer to get local value of
                     ;; vc-checkout-switches.
                     (with-current-buffer filebuf
                       (vc-call find-revision file revision outbuf))))
-              (setq failed nil)
-              (when (and failed (file-exists-p filename))
-                (delete-file filename)))))))
+              (error
+               (when (file-exists-p filename)
+                 (delete-file filename))))))))
     filename))
 
 (defun diff-hl-flydiff-buffer-with-head (file &optional backend)
@@ -125,7 +124,8 @@ the user should be returned."
 This requires the external program `diff' to be in your `exec-path'."
   (interactive)
   (vc-ensure-vc-buffer)
-  (with-current-buffer (get-buffer (current-buffer))
+  (setq diff-hl-flydiff-modified-tick (buffer-modified-tick))
+  (save-current-buffer
     (let* ((temporary-file-directory
             (if (file-directory-p "/dev/shm/")
                 "/dev/shm/"
@@ -136,20 +136,16 @@ This requires the external program `diff' to be in your 
`exec-path'."
       (diff-no-select rev (current-buffer) "-U 0 --strip-trailing-cr" 'noasync
                       (get-buffer-create " *diff-hl-diff*")))))
 
-(defun diff-hl-flydiff/update (old-fun &optional auto)
-  (unless (and auto
-               (or
-                (= diff-hl-flydiff-modified-tick (buffer-modified-tick))
-                (file-remote-p default-directory)
-                (not (buffer-modified-p))))
-    (funcall old-fun)))
+(defun diff-hl-flydiff-update ()
+  (unless (or
+           (not diff-hl-mode)
+           (= diff-hl-flydiff-modified-tick (buffer-modified-tick))
+           (file-remote-p default-directory))
+    (diff-hl-update)))
 
 (defun diff-hl-flydiff/modified-p (state)
   (buffer-modified-p))
 
-(defun diff-hl-flydiff/update-modified-tick (&rest args)
-  (setq diff-hl-flydiff-modified-tick (buffer-modified-tick)))
-
 ;;;###autoload
 (define-minor-mode diff-hl-flydiff-mode
   "Highlight diffs on-the-fly"
@@ -157,25 +153,19 @@ This requires the external program `diff' to be in your 
`exec-path'."
   :global t
   (if diff-hl-flydiff-mode
       (progn
-        (advice-add 'diff-hl-update :around #'diff-hl-flydiff/update)
         (advice-add 'diff-hl-overlay-modified :override #'ignore)
 
         (advice-add 'diff-hl-modified-p :before-until
                     #'diff-hl-flydiff/modified-p)
         (advice-add 'diff-hl-changes-buffer :override
                     #'diff-hl-flydiff-buffer-with-head)
-        (advice-add 'diff-hl-change :after
-                    #'diff-hl-flydiff/update-modified-tick)
-
         (setq diff-hl-flydiff-timer
-              (run-with-idle-timer diff-hl-flydiff-delay t #'diff-hl-update 
t)))
+              (run-with-idle-timer diff-hl-flydiff-delay t 
#'diff-hl-flydiff-update)))
 
-    (advice-remove 'diff-hl-update #'diff-hl-flydiff/update)
     (advice-remove 'diff-hl-overlay-modified #'ignore)
 
     (advice-remove 'diff-hl-modified-p #'diff-hl-flydiff/modified-p)
     (advice-remove 'diff-hl-changes-buffer #'diff-hl-flydiff-buffer-with-head)
-    (advice-remove 'diff-hl-change #'diff-hl-flydiff/update-modified-tick)
 
     (cancel-timer diff-hl-flydiff-timer)))
 
diff --git a/packages/diff-hl/diff-hl.el b/packages/diff-hl/diff-hl.el
index 8790352..2aaabd4 100644
--- a/packages/diff-hl/diff-hl.el
+++ b/packages/diff-hl/diff-hl.el
@@ -1,11 +1,11 @@
-;;; diff-hl.el --- Highlight uncommitted changes -*- lexical-binding: t -*-
+;;; diff-hl.el --- Highlight uncommitted changes using VC -*- lexical-binding: 
t -*-
 
-;; Copyright (C) 2012-2015  Free Software Foundation, Inc.
+;; Copyright (C) 2012-2016  Free Software Foundation, Inc.
 
 ;; Author:   Dmitry Gutov <address@hidden>
 ;; URL:      https://github.com/dgutov/diff-hl
 ;; Keywords: vc, diff
-;; Version:  1.8.0
+;; Version:  1.8.3
 ;; Package-Requires: ((cl-lib "0.2"))
 
 ;; This file is part of GNU Emacs.
@@ -391,7 +391,8 @@ in the source file, or the last line of the hunk above it."
               (when (eobp)
                 (with-current-buffer ,buffer (diff-hl-remove-overlays))
                 (error "Buffer is up-to-date"))
-              (diff-hl-diff-skip-to ,line)
+              (let (diff-auto-refine-mode)
+                (diff-hl-diff-skip-to ,line))
               (save-excursion
                 (while (looking-at "[-+]") (forward-line 1))
                 (setq end-line (line-number-at-pos (point)))
@@ -406,6 +407,8 @@ in the source file, or the last line of the hunk above it."
                 (if (>= wbh (- end-line beg-line))
                     (recenter (/ (+ wbh (- beg-line end-line) 2) 2))
                   (recenter 1)))
+              (when diff-auto-refine-mode
+                (diff-refine-hunk))
               (unless (yes-or-no-p (format "Revert current hunk in %s?"
                                            ,(cl-caadr fileset)))
                 (error "Revert canceled"))
@@ -414,7 +417,7 @@ in the source file, or the last line of the hunk above it."
               (with-current-buffer ,buffer
                 (save-buffer))
               (message "Hunk reverted"))))
-      (quit-windows-on diff-buffer))))
+      (quit-windows-on diff-buffer t))))
 
 (defun diff-hl-hunk-overlay-at (pos)
   (cl-loop for o in (overlays-in pos (1+ pos))
@@ -442,6 +445,14 @@ in the source file, or the last line of the hunk above it."
   (interactive)
   (diff-hl-next-hunk t))
 
+(defun diff-hl-mark-hunk ()
+  (interactive)
+  (let ((hunk (diff-hl-hunk-overlay-at (point))))
+    (unless hunk
+      (error "No hunk at point"))
+    (goto-char (overlay-start hunk))
+    (push-mark (overlay-end hunk) nil t)))
+
 (defvar diff-hl-command-map
   (let ((map (make-sparse-keymap)))
     (define-key map "n" 'diff-hl-revert-hunk)
@@ -477,8 +488,8 @@ in the source file, or the last line of the hunk above it."
         ;; doesn't care about changed VC state.
         ;; https://github.com/magit/magit/issues/603
         (add-hook 'magit-revert-buffer-hook 'diff-hl-update nil t)
-        ;; Magit 2+ doesn't do the above and calls this instead,
-        ;; but only when it doesn't call `revert-buffer':
+        ;; Magit versions 2.0-2.3 don't do the above and call this
+        ;; instead, but only when they dosn't call `revert-buffer':
         (add-hook 'magit-not-reverted-hook 'diff-hl-update nil t)
         (add-hook 'auto-revert-mode-hook 'diff-hl-update nil t)
         (add-hook 'text-scale-mode-hook 'diff-hl-define-bitmaps nil t))
@@ -506,6 +517,32 @@ in the source file, or the last line of the hunk above it."
       (scan diff-hl-command-map)
       (smartrep-define-key diff-hl-mode-map diff-hl-command-prefix 
smart-keys))))
 
+(declare-function magit-toplevel "magit-git")
+(declare-function magit-unstaged-files "magit-git")
+
+(defun diff-hl-magit-post-refresh ()
+  (let* ((topdir (magit-toplevel))
+         (modified-files
+          (mapcar (lambda (file) (expand-file-name file topdir))
+                  (magit-unstaged-files t)))
+         (unmodified-states '(up-to-date ignored unregistered)))
+    (dolist (buf (buffer-list))
+      (when (and (buffer-local-value 'diff-hl-mode buf)
+                 (not (buffer-modified-p buf))
+                 (file-in-directory-p (buffer-file-name buf) topdir))
+        (with-current-buffer buf
+          (let* ((file buffer-file-name)
+                 (backend (vc-backend file)))
+            (when backend
+              (cond
+               ((member file modified-files)
+                (when (memq (vc-state file) unmodified-states)
+                  (vc-state-refresh file backend))
+                (diff-hl-update))
+               ((not (memq (vc-state file backend) unmodified-states))
+                (vc-state-refresh file backend)
+                (diff-hl-update))))))))))
+
 (defun diff-hl-dir-update ()
   (dolist (pair (if (vc-dir-marked-files)
                     (vc-dir-marked-only-files-and-states)
diff --git a/packages/dts-mode/dts-mode.el b/packages/dts-mode/dts-mode.el
index 99aff26..e1ce4fd 100644
--- a/packages/dts-mode/dts-mode.el
+++ b/packages/dts-mode/dts-mode.el
@@ -163,7 +163,9 @@
   (dts--using-macro syntax-propertize-rules
     (set (make-local-variable 'syntax-propertize-function)
          (syntax-propertize-rules
-          ("#include[ \t]+\\(<\\).*\\(>\\)" (1 "|") (2 "|")))))
+          ("#include[ \t]+\\(<\\).*\\(>\\)" (1 "|") (2 "|"))
+          ;; Treat things like /delete-property/ as a single identifier.
+          ("\\(/\\)[a-z]+\\(/\\)" (1 "_") (2 "_")))))
   (if dts-use-smie
       (smie-setup dts-grammar #'dts-indent-rules)
     (set (make-local-variable 'indent-line-function) #'dts-indent-line)))
diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index 6e9fa5e..00b1b15 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -7,7 +7,7 @@
 ;; Created: 29 Jul 2015
 ;; Keywords: lisp
 ;; Compatibility: GNU Emacs 25
-;; Version: 0.0.3
+;; Version: 0.1.3
 ;; Package-Requires: ((emacs "25"))
 
 
@@ -33,14 +33,22 @@
 ;; ============
 ;;
 ;;
-;; The main user entry point is the command `el-search-pattern'.  It
+;; The main user entry point is `el-search-pattern'.  This command
 ;; prompts for a `pcase' pattern and searches the current buffer for
-;; expressions that are matched by it when read.  Point is put at the
-;; beginning of the expression found (unlike isearch).
+;; matching expressions by iteratively `read'ing buffer contents.  For
+;; any match, point is put at the beginning of the expression found
+;; (unlike isearch which puts point at the end of matches).
+;;
+;; Why is it based on `pcase'?  Because pattern matching (and the
+;; ability to combine destructuring and condition testing) is well
+;; suited for this task.  In addition, pcase allows to add specialized
+;; pattern types and to combine them with other patterns in a natural
+;; and transparent way out of the box.
 ;;
 ;; It doesn't matter how the code is actually formatted.  Comments are
-;; ignored by the search, and strings are treated as objects, their
-;; contents are not being searched.
+;; ignored, and strings are treated as atomic objects, their contents
+;; are not being searched.
+;;
 ;;
 ;; Example 1: if you enter
 ;;
@@ -65,22 +73,46 @@
 ;;      ,(and s (guard (< 70 (length (car (split-string s "\n")))))))
 ;;
 ;;
+;; When a search pattern is processed, the searched buffer is current
+;; with point at the beginning of the currently tested expression.
+;;
+;;
 ;; Convenience
 ;; ===========
 ;;
-;; For expression input, the minibuffer prompts here uses
-;; `emacs-lisp-mode'.
+;; For pattern input, the minibuffer is put into `emacs-lisp-mode'.
+;;
+;; Any input PATTERN is silently transformed into (and exp PATTERN)
+;; so that you can always refer to the whole currently tested
+;; expression via the variable `exp'.
+;;
 ;;
-;; When reading a search pattern in the minibuffer, the input is
-;; automatically wrapped into `(and expr ,(read input)).  So, if you
-;; want to search a buffer for symbols that are defined in "cl-lib",
-;; you can use this pattern
+;; Example 3:
 ;;
-;;   (guard (and (symbolp expr)
-;;               (when-let ((file (symbol-file expr)))
+;; If you want to search a buffer for symbols that are defined in
+;; "cl-lib", you can use this pattern
+;;
+;;   (guard (and (symbolp exp)
+;;               (when-let ((file (symbol-file exp)))
 ;;                 (string-match-p "cl-lib\\.elc?$" file))))
 ;;
-;; without binding the variable `expr'.
+;;
+;; ,----------------------------------------------------------------------
+;; | Q: "But I hate `pcase'!  Can't we just do without?"                 |
+;; |                                                                     |
+;; | A: Respect that you kept up until here! Just use (guard CODE), where|
+;; | CODE is any normal Elisp expression that returns non-nil when and   |
+;; | only when you have a match.  Use the variable `exp' to refer to     |
+;; | the currently tested expression.  Just like in the last example!    |
+;; `----------------------------------------------------------------------
+;;
+;;
+;; It's cumbersome to write out the same complicated pattern
+;; constructs in the minibuffer again and again.  You can define your
+;; own pcase pattern types for the purpose of el-search with
+;; `el-search-defpattern'.  It is just like `pcase-defmacro', but the
+;; effect is limited to this package.  See C-h f `el-search-pattern'
+;; for a list of predefined additional pattern forms.
 ;;
 ;;
 ;; Replacing
@@ -114,6 +146,12 @@
 ;; y and n work like in isearch (meaning "yes" and "no") if you are
 ;; used to that.
 ;;
+;; It is possible to replace a match with multiple expressions using
+;; "splicing mode".  When it is active, the replacement expression
+;; must evaluate to a list, and is spliced instead of inserted into
+;; the buffer for any replaced match.  Use s to toggle splicing mode
+;; in a `el-search-query-replace' session.
+;;
 ;;
 ;; Suggested key bindings
 ;; ======================
@@ -156,19 +194,25 @@
 ;;
 ;; TODO:
 ;;
-;; - implement backward searching and wrapped searching
+;; - When replacing like (progn A B C) -> A B C, the layout of the
+;; whole "group" A B C as a unit is lost.  Instead of restoring layout
+;; as we do now (via "read mappings"), we could just make a backup of
+;; the original expression as a string, and use our search machinery
+;; to find occurrences in the replacement recursively.
 ;;
-;; - improve docstrings
+;; - detect infloops when replacing automatically (e.g. for 1 -> '(1))
+;;
+;; - implement backward searching
 ;;
-;; - add more examples
+;; - improve docstrings
 ;;
 ;; - handle more reader syntaxes, e.g. #n, #n#
 ;;
 ;; - Implement sessions; add multi-file support based on iterators.  A
-;; file list is read in (or the user can specify an iterator as a
-;; variable).  The state in the current buffer is just (buffer
-;; . marker).  Or should this be abstracted into an own lib?  Could be
-;; named "files-session" or so.
+;;   file list is read in (or the user can specify an iterator as a
+;;   variable).  The state in the current buffer is just (buffer
+;;   . marker).  Or should this be abstracted into an own lib?  Could
+;;   be named "files-session" or so.
 
 
 
@@ -182,6 +226,7 @@
 (require 'cl-lib)
 (require 'elisp-mode)
 (require 'thingatpt)
+(require 'help-fns) ;el-search--make-docstring
 
 
 ;;;; Configuration stuff
@@ -191,16 +236,23 @@
   :group 'lisp)
 
 (defcustom el-search-this-expression-identifier 'exp
-  "Name of the identifier referring to the whole expression.
-The default value is `expr'.  You can use this variable in the
-search prompt to refer to value of the currently searched
-expression."
+  "Identifier referring to the current expression in pattern input.
+When entering a PATTERN in an interactive \"el-search\" command,
+the pattern actually used will be
+
+    `(and ,el-search-this-expression-identifier ,pattern)
+
+The default value is `exp'."
   :type 'symbol)
 
 (defface el-search-match '((((background dark)) (:background "#0000A0"))
-                          (t                   (:background "DarkSlateGray1")))
+                          (t                   (:background "DarkSlateGray3")))
   "Face for highlighting the current match.")
 
+(defface el-search-other-match '((((background dark)) (:background "#202060"))
+                                 (t                   (:background 
"DarkSlateGray1")))
+  "Face for highlighting the other matches.")
+
 
 ;;;; Helpers
 
@@ -221,27 +273,35 @@ expression."
     map)
   "Map for reading input with `el-search-read-expression'.")
 
+(defun el-search--setup-minibuffer ()
+  (emacs-lisp-mode)
+  (use-local-map el-search-read-expression-map)
+  (setq font-lock-mode t)
+  (funcall font-lock-function 1)
+  (backward-sexp)
+  (indent-sexp)
+  (goto-char (point-max))
+  (when-let ((this-sexp (with-current-buffer (window-buffer 
(minibuffer-selected-window))
+                          (thing-at-point 'sexp))))
+    (let ((more-defaults (list (concat "'" this-sexp))))
+      (setq-local minibuffer-default-add-function
+                  (lambda () (if (listp minibuffer-default)
+                            (append minibuffer-default more-defaults)
+                          (cons minibuffer-default more-defaults)))))))
+
 ;; $$$$$FIXME: this should be in Emacs!  There is only a helper 
`read--expression'.
 (defun el-search-read-expression (prompt &optional initial-contents hist 
default read)
   "Read expression for `my-eval-expression'."
-  (minibuffer-with-setup-hook
-      (lambda ()
-        (emacs-lisp-mode)
-        (use-local-map el-search-read-expression-map)
-        (setq font-lock-mode t)
-        (funcall font-lock-function 1)
-        (backward-sexp)
-        (indent-sexp)
-        (goto-char (point-max)))
+  (minibuffer-with-setup-hook #'el-search--setup-minibuffer
     (read-from-minibuffer prompt initial-contents 
el-search-read-expression-map read
                           (or hist 'read-expression-history) default)))
 
-(defun el-search--read-pattern (prompt &optional default initial-contents read)
-  (el-search-read-expression
-   prompt initial-contents 'el-search-history
-   (or default (when-let ((this-sexp (sexp-at-point)))
-                 (concat "'" (el-search--print this-sexp))))
-   read))
+(defvar el-search--initial-mb-contents nil)
+
+(defun el-search--read-pattern (prompt &optional default read)
+  (let ((input (el-search-read-expression
+                prompt el-search--initial-mb-contents 'el-search-history 
default read)))
+    (if (or read (not (string= input ""))) input (car el-search-history))))
 
 (defun el-search--end-of-sexp ()
   ;;Point must be at sexp beginning
@@ -253,7 +313,7 @@ Don't move if already at beginning of a sexp.
 Point must not be inside a string or comment."
   (let ((not-done t) res)
     (while not-done
-      (let ((stop-here nil) syntax-here
+      (let ((stop-here nil)
             (looking-at-from-back (lambda (regexp n)
                                     (save-excursion
                                       (backward-char n)
@@ -263,10 +323,7 @@ Point must not be inside a string or comment."
            ((eobp) (signal 'end-of-buffer nil))
            ((looking-at (rx (and (* space) ";"))) (forward-line))
            ((looking-at (rx (+ (or space "\n")))) (goto-char (match-end 0)))
-           ((progn (setq syntax-here (syntax-ppss))
-                   (or (nth 4 syntax-here) (nth 8 syntax-here)))
-            (if (nth 4 syntax-here) (forward-line) (search-forward "\"")))
-           
+
            ;; FIXME: can the rest be done more generically?
            ((and (looking-at (rx (or (syntax symbol) (syntax word))))
                  (not (looking-at "\\_<"))
@@ -283,13 +340,53 @@ Point must not be inside a string or comment."
         (error (forward-char))))
     res))
 
+(defvar el-search--pcase-macros '()
+  "List of additional \"el-search\" pcase macros.")
+
+(defun el-search--make-docstring ()
+  ;; code mainly from `pcase--make-docstring'
+  (let* ((main (documentation (symbol-function 'el-search-pattern) 'raw))
+         (ud (help-split-fundoc main 'pcase)))
+    (with-temp-buffer
+      (insert (or (cdr ud) main))
+      (mapc
+       (pcase-lambda (`(,symbol . ,fun))
+         (when-let ((doc (documentation fun)))
+           (insert "\n\n\n-- ")
+           (setq doc (help-fns--signature symbol doc fun fun nil))
+           (insert "\n" (or doc "Not documented."))))
+       (reverse el-search--pcase-macros))
+      (let ((combined-doc (buffer-string)))
+        (if ud (help-add-fundoc-usage combined-doc (car ud)) combined-doc)))))
+
+(put 'el-search-pattern 'function-documentation '(el-search--make-docstring))
+
+(defmacro el-search-defpattern (name args &rest body)
+  "Like `pcase-defmacro', but limited to el-search patterns.
+The semantics is exactly that of `pcase-defmacro', but the scope
+of the definitions is limited to \"el-search\"."
+  (declare (indent 2) (debug defun))
+  `(setf (alist-get ',name el-search--pcase-macros)
+         (lambda ,args ,@body)))
+
+
+(defmacro el-search--with-additional-pcase-macros (&rest body)
+  `(cl-letf ,(mapcar (pcase-lambda (`(,symbol . ,fun))
+                       `((get ',symbol 'pcase-macroexpander) #',fun))
+                     el-search--pcase-macros)
+     ,@body))
+
 (defun el-search--matcher (pattern &rest body)
-  (let ((warning-suppress-log-types '((bytecomp))))
-    (byte-compile
-     `(lambda (expression)
-        (pcase expression
-          (,pattern ,@(or body (list t)))
-          (_        nil))))))
+  (eval ;use `eval' to allow for user defined pattern types at run time
+   (let ((expression (make-symbol "expression")))
+     `(el-search--with-additional-pcase-macros
+       (let ((byte-compile-debug t) ;make undefined pattern types raise an 
error
+             (warning-suppress-log-types '((bytecomp)))
+             (pcase--dontwarn-upats (cons '_ pcase--dontwarn-upats)))
+         (byte-compile (lambda (,expression)
+                         (pcase ,expression
+                           (,pattern ,@(or body (list t)))
+                           (_        nil)))))))))
 
 (defun el-search--match-p (matcher expression)
   (funcall matcher expression))
@@ -297,15 +394,41 @@ Point must not be inside a string or comment."
 (defun el-search--wrap-pattern (pattern)
   `(and ,el-search-this-expression-identifier ,pattern))
 
-(defun el-search--search-pattern (pattern &optional noerror)
-  "Search elisp buffer with `pcase' PATTERN.
-Set point to the beginning of the occurrence found and return
-point.  Optional second argument, if non-nil, means if fail just
-return nil (no error)."
-  ;; For better performance we read complete top-level sexps and test
-  ;; for matches.  We enter top-level expressions in the buffer text
-  ;; only when the test was successful.
-  (let ((matcher (el-search--matcher pattern)) (match-beg nil) (opoint 
(point)) current-expr)
+(defun el-search--skip-expression (expression &optional read)
+  ;; Move forward at least one character.  Don't move into a string or
+  ;; comment.  Don't move further than the beginning of the next sexp.
+  ;; Try to move as far as possible.  Point must be at the beginning
+  ;; of an expression.
+  ;; If there are positions where `read' would succeed, but that do
+  ;; not represent a valid sexp start, move past them (e.g. when
+  ;; before "#'" move past both characters).
+  ;;
+  ;; EXPRESSION must be the (read) expression at point, but when READ
+  ;; is non-nil, ignore the first argument and read the expression at
+  ;; point instead.
+  (when read (setq expression (save-excursion (read (current-buffer)))))
+  (cond
+   ((or (null expression)
+        (equal [] expression)
+        (not (or (listp expression) (vectorp expression))))
+    (goto-char (el-search--end-of-sexp)))
+   ((looking-at (rx (or ",@" "," "#'" "'")))
+    (goto-char (match-end 0)))
+   (t (forward-char))))
+
+(defun el-search--search-pattern-1 (matcher &optional noerror)
+  (let ((match-beg nil) (opoint (point)) current-expr)
+
+    ;; when inside a string or comment, move past it
+    (let ((syntax-here (syntax-ppss)))
+      (when (nth 3 syntax-here) ;inside a string
+        (goto-char (nth 8 syntax-here))
+        (forward-sexp))
+      (when (nth 4 syntax-here) ;inside a comment
+        (forward-line 1)
+        (while (and (not (eobp)) (looking-at (rx (and (* space) ";"))))
+          (forward-line 1))))
+
     (if (catch 'no-match
           (while (not match-beg)
             (condition-case nil
@@ -316,21 +439,32 @@ return nil (no error)."
             (if (el-search--match-p matcher current-expr)
                 (setq match-beg (point)
                       opoint (point))
-              (forward-char))))
+              (el-search--skip-expression current-expr))))
         (if noerror nil (signal 'end-of-buffer nil)))
     match-beg))
 
+(defun el-search--search-pattern (pattern &optional noerror)
+  "Search elisp buffer with `pcase' PATTERN.
+Set point to the beginning of the occurrence found and return
+point.  Optional second argument, if non-nil, means if fail just
+return nil (no error)."
+  (el-search--search-pattern-1 (el-search--matcher pattern) noerror))
+
 (defun el-search--do-subsexps (pos do-fun &optional ret-fun bound)
-  ;; bound -> nil means till end of buffer
+  ;; In current buffer, for any expression start between POS and BOUND
+  ;; or (point-max), in order, call two argument function DO-FUN with
+  ;; the current sexp string and the ending position of the current
+  ;; sexp.  When done, with RET-FUN given, call it with no args and
+  ;; return the result; else, return nil.
   (save-excursion
     (goto-char pos)
     (condition-case nil
         (while (< (point) (or bound (point-max)))
           (let* ((this-sexp-end (save-excursion (thing-at-point--end-of-sexp) 
(point)))
-                 (this-sexp-bounds (buffer-substring-no-properties (point) 
this-sexp-end)))
-            (funcall do-fun this-sexp-bounds this-sexp-end))
-          (forward-char)
-          (el-search--ensure-sexp-start))
+                 (this-sexp-string (buffer-substring-no-properties (point) 
this-sexp-end)))
+            (funcall do-fun this-sexp-string this-sexp-end)
+            (el-search--skip-expression (read this-sexp-string))
+            (el-search--ensure-sexp-start)))
       (end-of-buffer))
     (when ret-fun (funcall ret-fun))))
 
@@ -356,37 +490,308 @@ return nil (no error)."
            (unless (looking-at "[[:space:]\)]*$")
              (insert "\n")
              (backward-char)))
-         (insert old)))
+         (save-excursion (insert old))))
      (lambda () (buffer-substring (point-min) (point-max))))))
 
+(defun el-search--check-pattern-args (type args predicate &optional message)
+  "Check whether all ARGS fulfill PREDICATE.
+Raise an error if not.  TYPE and optional argument MESSAGE are
+used to construct the error message."
+  (mapc (lambda (arg)
+          (unless (funcall predicate arg)
+            (error (concat "Pattern `%S': "
+                           (or message (format "argument doesn't fulfill %S" 
predicate))
+                           ": %S")
+                   type arg)))
+        args))
+
+
+;;;; Additional pattern type definitions
+
+(defun el-search--split (matcher1 matcher2 list)
+  "Helper for the append pattern type.
+
+When a splitting of LIST into two lists L1, L2 exist so that Li
+is matched by MATCHERi, return (L1 L2) for such Li, else return
+nil."
+  (let ((try-match (lambda (list1 list2)
+                     (when (and (el-search--match-p matcher1 list1)
+                                (el-search--match-p matcher2 list2))
+                       (list list1 list2))))
+        (list1 list) (list2 '()) (match nil))
+    ;; don't use recursion, this could hit `max-lisp-eval-depth'
+    (while (and (not (setq match (funcall try-match list1 list2)))
+                (consp list1))
+      (let ((last-list1 (last list1)))
+        (if-let ((cdr-last-list1 (cdr last-list1)))
+            ;; list1 is a dotted list.  Then list2 must be empty.
+            (progn (setcdr last-list1 nil)
+                   (setq list2 cdr-last-list1))
+          (setq list1 (butlast list1 1)
+                list2 (cons (car last-list1) list2)))))
+    match))
+
+(el-search-defpattern append (&rest patterns)
+  "Matches any list factorable into lists matched by PATTERNS in order.
+
+PATTERNS is a list of patterns P1..Pn.  Match any list L for that
+lists L1..Ln exist that are matched by P1..Pn in order and L is
+equal to the concatenation of L1..Ln.  Ln is allowed to be no
+list.
+
+When different ways of matching are possible, it is unspecified
+which one is chosen.
+
+Example: the pattern
+
+   (append '(1 2 3) x (app car-safe 7))
+
+matches the list (1 2 3 4 5 6 7 8 9) and binds `x' to (4 5 6)."
+  (if (null patterns)
+      '(pred null)
+    (pcase-let ((`(,pattern . ,more-patterns) patterns))
+      (cond
+       ((null more-patterns)  pattern)
+       ((null (cdr more-patterns))
+        `(and (pred listp)
+              (app ,(apply-partially #'el-search--split
+                                     (el-search--matcher pattern)
+                                     (el-search--matcher (car more-patterns)))
+                   (,'\` ((,'\, ,pattern)
+                          (,'\, ,(car more-patterns)))))))
+       (t `(append ,pattern (append ,@more-patterns)))))))
+
+(el-search-defpattern string (&rest regexps)
+  "Matches any string that is matched by all REGEXPS."
+  (el-search--check-pattern-args 'string regexps #'stringp)
+  (let ((string (make-symbol "string"))
+        (regexp (make-symbol "regexp")))
+    `(and (pred stringp)
+          (pred (lambda (,string)
+                  (cl-every
+                   (lambda (,regexp) (string-match-p ,regexp ,string))
+                   (list ,@regexps)))))))
+
+(el-search-defpattern symbol (&rest regexps)
+  "Matches any symbol whose name is matched by all REGEXPS."
+  (el-search--check-pattern-args 'symbol regexps #'stringp)
+  `(and (pred symbolp)
+        (app symbol-name (string ,@regexps))))
+
+(defun el-search--contains-p (matcher exp)
+  "Return non-nil when tree EXP contains a match for MATCHER.
+Recurse on all types of sequences.  In the positive case the
+return value is (t elt), where ELT is a matching element found in
+EXP."
+  (if (el-search--match-p matcher exp)
+      (list t exp)
+    (and (sequencep exp)
+         (let ((try-match (apply-partially #'el-search--contains-p matcher)))
+           (if (consp exp)
+               (or (funcall try-match (car exp))
+                   (funcall try-match (cdr exp)))
+             (cl-some try-match exp))))))
+
+(el-search-defpattern contains (&rest patterns)
+  "Matches trees that contain a match for all PATTERNs.
+Searches any tree of sequences recursively for matches.  Objects
+of any kind matched by all PATTERNs are also matched.
+
+  Example: (contains (string \"H\") 17) matches ((\"Hallo\") x (5 [1 17]))"
+  (cond
+   ((null patterns) '_)
+   ((null (cdr patterns))
+    (let ((pattern (car patterns)))
+      `(app ,(apply-partially #'el-search--contains-p (el-search--matcher 
pattern))
+            (,'\`  (t (,'\, ,pattern))))))
+   (t `(and ,@(mapcar (lambda (pattern) `(contains ,pattern)) patterns)))))
+
+(el-search-defpattern not (pattern)
+  "Matches any object that is not matched by PATTERN."
+  `(app ,(apply-partially #'el-search--match-p (el-search--matcher pattern))
+        (pred not)))
+
+(defun el-search--match-symbol-file (regexp symbol)
+  (when-let ((symbol-file (and (symbolp symbol)
+                               (symbol-file symbol))))
+    (string-match-p
+     (if (symbolp regexp) (concat "\\`" (symbol-name regexp) "\\'") regexp)
+     (file-name-sans-extension (file-name-nondirectory symbol-file)))))
+
+(el-search-defpattern source (regexp)
+  "Matches any symbol whose `symbol-file' is matched by REGEXP.
+
+This pattern matches when the object is a symbol for that
+`symbol-file' returns a (non-nil) FILE-NAME that fulfills
+  (string-match-p REGEXP (file-name-sans-extension
+                           (file-name-nondirectory FILENAME)))
+
+REGEXP can also be a symbol, in which case
+
+  (concat \"^\" (symbol-name regexp) \"$\")
+
+is used as regular expression."
+  (el-search--check-pattern-args 'source (list regexp) #'stringp)
+  `(pred (el-search--match-symbol-file ,regexp)))
+
+(defun el-search--match-key-sequence (keys expr)
+  (when-let ((expr-keys (pcase expr
+                          ((or (pred stringp) (pred vectorp))  expr)
+                          (`(kbd ,(and (pred stringp) string)) (ignore-errors 
(kbd string))))))
+    (apply #'equal
+           (mapcar (lambda (keys) (ignore-errors (key-description keys)))
+                   (list keys expr-keys)))))
+
+(el-search-defpattern keys (key-sequence)
+  "Matches descriptions of the KEY-SEQUENCE.
+KEY-SEQUENCE is a string or vector representing a key sequence,
+or an expression of the form (kbd STRING).
+
+Match any description of the same key sequence in any of these
+formats.
+
+Example: the pattern
+
+    (keys (kbd \"C-s\"))
+
+matches any of these expressions:
+
+    \"\\C-s\"
+    \"\C-s\"
+    (kbd \"C-s\")
+    [(control ?s)]"
+  (when (eq (car-safe key-sequence) 'kbd)
+    (setq key-sequence (kbd (cadr key-sequence))))
+  (el-search--check-pattern-args 'keys (list key-sequence) (lambda (x) (or 
(stringp x) (vectorp x)))
+                                 "argument not a string or vector")
+  `(pred (el-search--match-key-sequence ,key-sequence)))
+
+(defun el-search--s (expr)
+  (cond
+   ((symbolp expr) `(or (symbol ,(symbol-name expr))
+                        (,'\` (,'quote    (,'\, (symbol ,(symbol-name expr)))))
+                        (,'\` (,'function (,'\, (symbol ,(symbol-name 
expr)))))))
+   ((stringp expr) `(string ,expr))
+   (t expr)))
+
+(el-search-defpattern l (&rest lpats)
+  "Alternative pattern type for matching lists.
+Match any list with subsequent elements matched by all LPATS in
+order.
+
+The idea is to be able to search for pieces of code (i.e. lists)
+with very brief input by using a specialized syntax.
+
+An LPAT can take the following forms:
+
+SYMBOL  Matches any symbol S matched by SYMBOL's name interpreted
+        as a regexp.  Matches also 'S and #'S for any such S.
+STRING  Matches any string matched by STRING interpreted as a
+        regexp
+_       Matches any list element
+__      Matches any number of list elements (including zero)
+^       Matches zero elements, but only at the beginning of a list
+$       Matches zero elements, but only at the end of a list
+PAT     Anything else is interpreted as a normal pcase pattern, and
+        matches one list element matched by it
+
+^ is only valid as the first, $ as the last of the LPATS.
+
+Example: To match defuns that contain \"hl\" in their name and
+have at least one mandatory, but also optional arguments, you
+could use this pattern:
+
+    (l ^ 'defun hl (l _ &optional))"
+  (let ((match-start nil) (match-end nil))
+    (when (eq (car-safe lpats) '^)
+      (setq match-start t)
+      (cl-callf cdr lpats))
+    (when (eq (car-safe (last lpats)) '$)
+      (setq match-end t)
+      (cl-callf butlast lpats 1))
+    `(append ,@(if match-start '() '(_))
+             ,@(mapcar
+                (lambda (elt)
+                  (pcase elt
+                    ('__ '_)
+                    ('_ '`(,_))
+                    ('_? '(or '() `(,_))) ;FIXME: useful - document? or should 
we provide a (? PAT)
+                                          ;thing?
+                    (_ `(,'\` ((,'\, ,(el-search--s elt)))))))
+                lpats)
+             ,@(if match-end '() '(_)))))
+
 
 ;;;; Highlighting
 
 (defvar-local el-search-hl-overlay nil)
 
+(defvar-local el-search-hl-other-overlays '())
+
 (defvar el-search-keep-hl nil)
 
-(defun el-search-hl-sexp-at-point ()
-  (let ((bounds (list (point) (el-search--end-of-sexp))))
+(defun el-search-hl-sexp (&optional bounds)
+  (let ((bounds (or bounds
+                    (list (point) (el-search--end-of-sexp)))))
     (if (overlayp el-search-hl-overlay)
         (apply #'move-overlay el-search-hl-overlay bounds)
       (overlay-put (setq el-search-hl-overlay (apply #'make-overlay bounds))
-                   'face 'el-search-match)))
-  (add-hook 'post-command-hook (el-search-hl-post-command-fun 
(current-buffer)) t))
+                   'face 'el-search-match))
+    (overlay-put el-search-hl-overlay 'priority 1002))
+  (add-hook 'post-command-hook #'el-search-hl-post-command-fun t t))
+
+(defun el-search--hl-other-matches-1 (pattern from to)
+  (mapc #'delete-overlay el-search-hl-other-overlays)
+  (setq el-search-hl-other-overlays '())
+  (let ((matcher (el-search--matcher pattern))
+        this-match-beg this-match-end
+        (done nil))
+    (save-excursion
+      (goto-char from)
+      (while (not done)
+        (setq this-match-beg (el-search--search-pattern-1 matcher t))
+        (if (not this-match-beg)
+            (setq done t)
+          (goto-char this-match-beg)
+          (setq this-match-end (el-search--end-of-sexp))
+          (let ((ov (make-overlay this-match-beg this-match-end)))
+            (overlay-put ov 'face 'el-search-other-match)
+            (overlay-put ov 'priority 1001)
+            (push ov el-search-hl-other-overlays)
+            (goto-char this-match-end)
+            (when (>= (point) to) (setq done t))))))))
+
+(defun el-search-hl-other-matches (pattern)
+  "Highlight all matches visible in the selected window."
+  (el-search--hl-other-matches-1 pattern
+                                 (save-excursion
+                                   (goto-char (window-start))
+                                   (beginning-of-defun-raw)
+                                   (point))
+                                 (window-end))
+  (add-hook 'window-scroll-functions #'el-search--after-scroll t t))
+
+(defun el-search--after-scroll (_win start)
+  (el-search--hl-other-matches-1 el-search-current-pattern
+                                 (save-excursion
+                                   (goto-char start)
+                                   (beginning-of-defun-raw)
+                                   (point))
+                                 (window-end nil t)))
 
 (defun el-search-hl-remove ()
   (when (overlayp el-search-hl-overlay)
-    (delete-overlay el-search-hl-overlay)))
-
-(defun el-search-hl-post-command-fun (buf)
-  (lambda ()
-    (when (buffer-live-p buf)
-      (unless (or el-search-keep-hl
-                  (eq this-command 'el-search-query-replace)
-                  (eq this-command 'el-search-pattern))
-        (with-current-buffer buf
-          (el-search-hl-remove)
-          (remove-hook 'post-command-hook #'el-search-hl-post-command-fun 
t))))))
+    (delete-overlay el-search-hl-overlay))
+  (remove-hook 'window-scroll-functions #'el-search--after-scroll t)
+  (mapc #'delete-overlay el-search-hl-other-overlays)
+  (setq el-search-hl-other-overlays '()))
+
+(defun el-search-hl-post-command-fun ()
+  (unless (or el-search-keep-hl
+              (eq this-command 'el-search-query-replace)
+              (eq this-command 'el-search-pattern))
+    (el-search-hl-remove)
+    (remove-hook 'post-command-hook 'el-search-hl-post-command-fun t)))
 
 
 ;;;; Core functions
@@ -399,14 +804,24 @@ return nil (no error)."
 
 ;;;###autoload
 (defun el-search-pattern (pattern)
-  "Do incremental elisp search forward."
+  "Start new or resume last elisp search.
+
+Search current buffer for expressions that are matched by `pcase'
+PATTERN.  Use `read' to transform buffer contents into
+expressions.
+
+
+Additional `pcase' pattern types to be used with this command can
+be defined with `el-search-defpattern'.
+
+The following additional pattern types are currently defined:"
   (interactive (list (if (and (eq this-command last-command)
                               el-search-success)
                          el-search-current-pattern
                        (let ((pattern
                               (el-search--read-pattern "Find pcase pattern: "
                                                        (car el-search-history)
-                                                       nil t)))
+                                                       t)))
                          ;; A very common mistake: input "foo" instead of 
"'foo"
                          (when (and (symbolp pattern)
                                     (not (eq pattern '_))
@@ -414,11 +829,12 @@ return nil (no error)."
                                         (not (eq (symbol-value pattern) 
pattern))))
                            (error "Please don't forget the quote when 
searching for a symbol"))
                          (el-search--wrap-pattern pattern)))))
+  (setq this-command 'el-search-pattern) ;in case we come from isearch
   (setq el-search-current-pattern pattern)
-  (setq el-search-success nil)
   (let ((opoint (point)))
-    (when (eq this-command last-command)
-      (forward-char))
+    (when (and (eq this-command last-command) el-search-success)
+      (el-search--skip-expression nil t))
+    (setq el-search-success nil)
     (when (condition-case nil
               (el-search--search-pattern pattern)
             (end-of-buffer (message "No match")
@@ -427,25 +843,52 @@ return nil (no error)."
                            (ding)
                            nil))
       (setq el-search-success t)
-      (el-search-hl-sexp-at-point)
-      (message "%s" (substitute-command-keys "Type \\[el-search-pattern] to 
repeat")))))
-
-(defun el-search-search-and-replace-pattern (pattern replacement &optional 
mapping)
+      (el-search-hl-sexp)
+      (unless (eq this-command last-command)
+        (el-search-hl-other-matches pattern)))))
+
+(defvar el-search-search-and-replace-help-string
+  "\
+y         Replace this match and move to the next.
+SPC or n  Skip this match and move to the next.
+r         Replace this match but don't move.
+!         Replace all remaining matches automatically.
+q         Quit.  To resume, use e.g. `repeat-complex-command'.
+?         Show this help.
+s         Toggle splicing mode.  When splicing mode is
+          on (default off), the replacement expression must
+          evaluate to a list, and the result is spliced into the
+          buffer, instead of just inserted.
+
+Hit any key to proceed."
+  "Help string for ? in `el-search-query-replace'.")
+
+(defun el-search-search-and-replace-pattern (pattern replacement &optional 
mapping splice)
   (let ((replace-all nil) (nbr-replaced 0) (nbr-skipped 0) (done nil)
         (el-search-keep-hl t) (opoint (point))
         (get-replacement (el-search--matcher pattern replacement)))
     (unwind-protect
         (while (and (not done) (el-search--search-pattern pattern t))
           (setq opoint (point))
-          (unless replace-all (el-search-hl-sexp-at-point))
+          (unless replace-all
+            (el-search-hl-sexp)
+            (unless (eq this-command last-command)
+              (el-search-hl-other-matches pattern)))
           (let* ((read-mapping (el-search--create-read-map))
                  (region (list (point) (el-search--end-of-sexp)))
                  (substring (apply #'buffer-substring-no-properties region))
                  (expr      (read substring))
                  (replaced-this nil)
                  (new-expr  (funcall get-replacement expr))
-                 (to-insert (el-search--repair-replacement-layout
-                             (el-search--print new-expr) (append mapping 
read-mapping)))
+                 (get-replacement-string
+                  (lambda () (if (and splice (not (listp new-expr)))
+                            (error "Expression to splice in is an atom")
+                          (el-search--repair-replacement-layout
+                           (if splice
+                               (mapconcat #'el-search--print new-expr " ")
+                             (el-search--print new-expr))
+                           (append mapping read-mapping)))))
+                 (to-insert (funcall get-replacement-string))
                  (do-replace (lambda ()
                                (atomic-change-group
                                  (apply #'delete-region region)
@@ -453,21 +896,24 @@ return nil (no error)."
                                        (opoint (point)))
                                    (insert to-insert)
                                    (indent-region opoint (point))
-                                   (goto-char opoint)
-                                   (el-search-hl-sexp-at-point)))
+                                   (el-search-hl-sexp (list opoint (point)))
+                                   (goto-char opoint)))
                                (cl-incf nbr-replaced)
                                (setq replaced-this t))))
             (if replace-all
                 (funcall do-replace)
               (while (not (pcase (if replaced-this
-                                     (read-char-choice "[SPC ! q]" '(?\ ?! ?q 
?n))
+                                     (read-char-choice "[SPC ! q]  (? for 
help)"
+                                                       '(?\ ?! ?q ?n ??))
                                    (read-char-choice
-                                    (concat "Replace this occurence"
+                                    (concat "Replace this occurrence"
                                             (if (or (string-match-p "\n" 
to-insert)
                                                     (< 40 (length to-insert)))
                                                 "" (format " with `%s'" 
to-insert))
-                                            "? [y SPC r ! q]" )
-                                    '(?y ?n ?r ?\ ?! ?q)))
+                                            "? "
+                                            (if splice "{splice} " "")
+                                            "[y SPC r ! s q]  (? for help)" )
+                                    '(?y ?n ?r ?\ ?! ?q ?s ??)))
                             (?r (funcall do-replace)
                                 nil)
                             (?y (funcall do-replace)
@@ -479,9 +925,14 @@ return nil (no error)."
                                   (funcall do-replace))
                                 (setq replace-all t)
                                 t)
+                            (?s (cl-callf not splice)
+                                (setq to-insert (funcall 
get-replacement-string))
+                                nil)
                             (?q (setq done t)
-                                t)))))
-            (unless (or done (eobp)) (forward-char 1)))))
+                                t)
+                            (?? (ignore (read-char 
el-search-search-and-replace-help-string))
+                                nil)))))
+            (unless (or done (eobp)) (el-search--skip-expression nil t)))))
     (el-search-hl-remove)
     (goto-char opoint)
     (message "Replaced %d matches%s"
@@ -489,10 +940,11 @@ return nil (no error)."
              (if (zerop nbr-skipped)  ""
                (format "   (%d skipped)" nbr-skipped)))))
 
-(defun el-search-query-replace-read-args (&optional initial-contents)
+(defun el-search-query-replace-read-args ()
   (barf-if-buffer-read-only)
-  (let* ((from (el-search--read-pattern "Replace from: " nil initial-contents))
-         (to   (el-search--read-pattern "Replace with result of evaluation of: 
" from)))
+  (let* ((from (el-search--read-pattern "Replace from: "))
+         (to   (let ((el-search--initial-mb-contents nil))
+                 (el-search--read-pattern "Replace with result of evaluation 
of: " from))))
     (list (el-search--wrap-pattern (read from)) (read to)
           (with-temp-buffer
             (insert to)
@@ -502,12 +954,13 @@ return nil (no error)."
 (defun el-search-query-replace (from to &optional mapping)
   "Replace some occurrences of FROM pattern with evaluated TO."
   (interactive (el-search-query-replace-read-args))
+  (setq this-command 'el-search-query-replace) ;in case we come from isearch
   (setq el-search-current-pattern from)
   (barf-if-buffer-read-only)
   (el-search-search-and-replace-pattern from to mapping))
 
-(defun el-search--take-over-from-isearch ()
-  (let ((other-end isearch-other-end)
+(defun el-search--take-over-from-isearch (&optional goto-left-end)
+  (let ((other-end (and goto-left-end isearch-other-end))
         (input isearch-string))
     (isearch-exit)
     (when (and other-end (< other-end (point)))
@@ -520,17 +973,15 @@ return nil (no error)."
   ;; with Isearch, using `isearch-search-fun-function'.
   ;; Alas, this is not trivial if we want to transfer our optimizations.
   (interactive)
-  (el-search-pattern
-   (el-search--read-pattern
-    "Find pcase pattern: " nil (concat "'" 
(el-search--take-over-from-isearch)) t))
-  (setq this-command 'el-search-pattern))
+  (let ((el-search--initial-mb-contents (concat "'" 
(el-search--take-over-from-isearch))))
+    ;; use `call-interactively' so we get recorded in 
`extended-command-history'
+    (call-interactively #'el-search-pattern)))
 
 ;;;###autoload
 (defun el-search-replace-from-isearch ()
   (interactive)
-  (let ((this-command 'el-search-query-replace))
-    (apply #'el-search-query-replace
-           (el-search-query-replace-read-args (concat "'" 
(el-search--take-over-from-isearch))))))
+  (let ((el-search--initial-mb-contents (concat "'" 
(el-search--take-over-from-isearch t))))
+    (call-interactively #'el-search-query-replace)))
 
 
 
diff --git a/packages/f90-interface-browser/f90-interface-browser.el 
b/packages/f90-interface-browser/f90-interface-browser.el
index d499ba0..8113a8b 100644
--- a/packages/f90-interface-browser/f90-interface-browser.el
+++ b/packages/f90-interface-browser/f90-interface-browser.el
@@ -1,6 +1,6 @@
 ;;; f90-interface-browser.el --- Parse and browse f90 interfaces
 
-;; Copyright (C) 2011, 2012, 2013, 2014  Free Software Foundation, Inc
+;; Copyright (C) 2011, 2012, 2013, 2014, 2015  Free Software Foundation, Inc
 
 ;; Author: Lawrence Mitchell <address@hidden>
 ;; Created: 2011-07-06
@@ -272,7 +272,8 @@ an alphanumeric character."
   (loop for file in (directory-files dir t
                                      (rx-to-string
                                       `(and "." (or ,@f90-file-extensions)
-                                            eos) t))
+                                            eos)
+                                      t))
         do (f90-parse-interfaces file f90-all-interfaces)))
 
 (defun f90-find-tag-interface (name &optional match-sublist)
@@ -530,11 +531,11 @@ default is the type of the variable."
       "UNION-TYPE"
     ;; Ignore name
     (setq type (cdr type))
-    (mapconcat 'identity (loop for a in type
+    (mapconcat #'identity (loop for a in type
                                if (and (consp a)
                                        (string= (car a) "dimension"))
                                collect (format "dimension(%s)"
-                                               (mapconcat 'identity
+                                               (mapconcat #'identity
                                                           (make-list (cdr a)
                                                                      ":")
                                                           ","))
@@ -555,9 +556,10 @@ default is the type of the variable."
                          arglist "\n")))
     (f90-mode)
     (if (fboundp 'font-lock-ensure)
-        (font-lock-ensure) (font-lock-fontify-buffer))
+        (font-lock-ensure)
+      (with-no-warnings (font-lock-fontify-buffer)))
     (goto-char (point-min))
-    (mapconcat 'identity
+    (mapconcat #'identity
                (loop while (not (eobp))
                      collect (buffer-substring (line-beginning-position)
                                                (- (line-end-position)
@@ -817,16 +819,16 @@ needs a reference count interface, so insert one."
 
 (defun f90-parse-type-definition ()
   "Parse a type definition at (or in front of) `point'."
-  (let (type slots slot fn)
-    (goto-char (point-min))
-    (unless (re-search-forward "^[ \t]*type[ \t]+\\(.+?\\)[ \t]*$" nil t)
-      (error "Trying parse a type but no type found"))
-    (setq type (format "type(%s)" (f90-normalise-string (match-string 1))))
+  (goto-char (point-min))
+  (unless (re-search-forward "^[ \t]*type[ \t]+\\(.+?\\)[ \t]*$" nil t)
+    (error "Trying parse a type but no type found"))
+  (let ((type (format "type(%s)" (f90-normalise-string (match-string 1))))
+        (slots ()))
     (while (not (eobp))
-      (setq slot (f90-parse-single-type-declaration))
-      (when slot
-        (setf slots (nconc slot slots)))
-      (forward-line 1))
+      (let ((slot (f90-parse-single-type-declaration)))
+        (when slot
+          (setf slots (nconc slot slots)))
+        (forward-line 1)))
     (setf (gethash type f90-types) slots)))
 
 (defun f90-arglist-types ()
diff --git a/packages/ggtags/README.rst b/packages/ggtags/README.rst
index 08640b4..eda0427 100644
--- a/packages/ggtags/README.rst
+++ b/packages/ggtags/README.rst
@@ -4,7 +4,7 @@
 
 This package is part of `GNU ELPA <http://elpa.gnu.org>`_ (``M-x
 list-packages``) and is also available on `MELPA
-<http://melpa.milkbox.net/#/ggtags>`_.
+<https://melpa.org/#/ggtags>`_.
 
 The goal is to make working with GNU Global in Emacs as effortlessly
 and intuitively as possible and to integrate tightly with standard
@@ -61,10 +61,11 @@ Install Global and plugins
      ./configure --prefix=<PREFIX> --with-exuberant-ctags=/usr/local/bin/ctags
      make && make install
 
-   The executable ``ctags`` is unfortunately named because ``emacs`` also
-   includes a command of the same name. So make sure it is from
-   http://ctags.sourceforge.net. See ``plugin-factory/README`` in GNU
-   Global source for further information.
+   The executable ``ctags`` is unfortunately named because ``emacs``
+   also includes a command of the same name. So make sure it is from
+   http://ctags.sourceforge.net. See ``plugin-factory/PLUGIN_HOWTO``
+   (``plugin-factory/README`` for Global < 6.5) in GNU Global
+   source for further information.
 
 2. Install ``pygments`` plugin
 
@@ -222,7 +223,7 @@ turned on to facilitate locating the right match.
 Miscellaneous commands
 ++++++++++++++++++++++
 
-Commands are avaiable from the ``Ggtags`` menu in ``ggtags-mode``.
+Commands are available from the ``Ggtags`` menu in ``ggtags-mode``.
 
 ggtags-prev-mark
 
@@ -271,7 +272,7 @@ ggtags-explain-tags
 ggtags-browse-file-as-hypertext
 
    Use ``htags`` to generate HTML of the source tree. This allows
-   browsing the porject in a browser with cross-references.
+   browsing the project in a browser with cross-references.
 
 Integration with other packages
 +++++++++++++++++++++++++++++++
@@ -312,6 +313,14 @@ Integration with other packages
 NEWS
 ~~~~
 
+[2015-12-15 Tue] 0.8.11
++++++++++++++++++++++++
+
+#. ``ggtags-highlight-tag-delay`` is renamed to
+   ``ggtags-highlight-tag``.
+#. Tag highlighting can be disabled by setting
+   ``ggtags-highlight-tag`` to nil.
+
 [2015-06-12 Fri] 0.8.10
 +++++++++++++++++++++++
 
diff --git a/packages/ggtags/ggtags.el b/packages/ggtags/ggtags.el
index 52b96cf..08fb4c8 100644
--- a/packages/ggtags/ggtags.el
+++ b/packages/ggtags/ggtags.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2013-2015  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
-;; Version: 0.8.10
+;; Version: 0.8.11
 ;; Keywords: tools, convenience
 ;; Created: 2013-01-29
 ;; URL: https://github.com/leoliu/ggtags
@@ -36,13 +36,11 @@
 ;;
 ;; All commands are available from the `Ggtags' menu in `ggtags-mode'.
 
-;;; NEWS 0.8.10 (2015-06-12):
+;;; NEWS 0.8.11 (2015-12-15):
 
-;; - Tags update on save is configurable by `ggtags-update-on-save'.
-;; - New command `ggtags-explain-tags' to explain how each file is
-;;   indexed in current project.
-;; - New user option `ggtags-sort-by-nearness' that sorts matched tags
-;;   by nearness to current directory.
+;; - `ggtags-highlight-tag-delay' is renamed to `ggtags-highlight-tag'
+;; - Tag highlighting can be disabled by setting
+;;   `ggtags-highlight-tag' to nil.
 ;;
 ;; See full NEWS on https://github.com/leoliu/ggtags#news
 
@@ -331,13 +329,17 @@ Nil means using the value of `completing-read-function'."
                  function)
   :group 'ggtags)
 
-(defcustom ggtags-highlight-tag-delay 0.25
-  "Time in seconds before highlighting tag at point."
+(define-obsolete-variable-alias 'ggtags-highlight-tag-delay 
'ggtags-highlight-tag
+  "0.8.11")
+
+(defcustom ggtags-highlight-tag 0.25
+  "If non-nil time in seconds before highlighting tag at point.
+Set to `nil' to disable tag highlighting."
   :set (lambda (sym value)
-         (when (bound-and-true-p ggtags-highlight-tag-timer)
-           (timer-set-idle-time ggtags-highlight-tag-timer value t))
+         (when (fboundp 'ggtags-setup-highlight-tag-at-point)
+           (ggtags-setup-highlight-tag-at-point value))
          (set-default sym value))
-  :type 'number
+  :type '(choice (const :tag "Disable" nil) number)
   :group 'ggtags)
 
 (defcustom ggtags-bounds-of-tag-function (lambda ()
@@ -647,7 +649,7 @@ When called with a prefix \\[universal-argument], choose 
from past projects."
                           (ggtags-ensure-localname
                            (directory-file-name 
(ggtags-current-project-root)))))
             (process-environment
-             (append (let ((process-environment process-environment))
+             (append (let ((process-environment (copy-sequence 
process-environment)))
                        (and ,gtagsroot (setenv "GTAGSROOT" ,gtagsroot))
                        (mapcar #'substitute-env-vars 
ggtags-process-environment))
                      process-environment
@@ -703,7 +705,7 @@ If file gtags.files exists in ROOT, it should be a list of 
source
 files to index, which can be used to speed gtags up in large
 source trees. See Info node `(global)gtags' for details."
   (interactive "DRoot directory: ")
-  (let ((process-environment process-environment))
+  (let ((process-environment (copy-sequence process-environment)))
     (when (zerop (length root)) (error "No root directory provided"))
     (setenv "GTAGSROOT" (ggtags-ensure-localname
                          (expand-file-name
@@ -929,7 +931,8 @@ blocking emacs."
   (let* ((default-directory (or directory (ggtags-current-project-root)))
          (split-window-preferred-function ggtags-split-window-function)
          (env ggtags-process-environment))
-    (unless (markerp ggtags-global-start-marker)
+    (unless (and (markerp ggtags-global-start-marker)
+                 (marker-position ggtags-global-start-marker))
       (setq ggtags-global-start-marker (point-marker)))
     ;; Record the file name for `ggtags-navigation-start-file'.
     (setq ggtags-global-start-file buffer-file-name)
@@ -1622,19 +1625,23 @@ commands `next-error' and `previous-error'.
                 ggtags-auto-jump-to-match-target))
     (ggtags-forward-to-line ggtags-auto-jump-to-match-target)
     (setq-local ggtags-auto-jump-to-match-target nil)
-    ;;
-    ;; Can't call `compile-goto-error' here becuase
+    (ggtags-delay-finish-functions
+      (with-display-buffer-no-window
+        (condition-case nil
+            (let ((compilation-auto-jump-to-first-error t))
+              (compilation-auto-jump (current-buffer) (point)))
+          (error (message "\
+ggtags: history match invalid, jump to first match instead")
+                 (first-error)))))
     ;; `compilation-filter' restores point and as a result commands
     ;; dependent on point such as `ggtags-navigation-next-file' and
     ;; `ggtags-navigation-previous-file' fail to work.
-    (run-with-idle-timer 0 nil (lambda (buf pt)
-                                 (and (buffer-live-p buf)
-                                      (with-current-buffer buf
-                                        (ggtags-delay-finish-functions
-                                          (let 
((compilation-auto-jump-to-first-error t))
-                                            (with-display-buffer-no-window
-                                              (compilation-auto-jump buf 
pt)))))))
-                         (current-buffer) (point)))
+    (run-with-idle-timer
+     0 nil
+     (lambda (buf pt)
+       (and (buffer-live-p buf)
+            (with-current-buffer buf (goto-char pt))))
+     (current-buffer) (point)))
   (make-local-variable 'ggtags-global-large-output)
   (when (> ggtags-global-output-lines ggtags-global-large-output)
     (cl-incf ggtags-global-large-output 500)
@@ -2022,6 +2029,7 @@ When finished invoke CALLBACK in BUFFER with process exit 
status."
                             (delay-mode-hooks (funcall mode))
                             (setq font-lock-mode t)
                             (funcall font-lock-function font-lock-mode)
+                            (setq jit-lock-mode nil)
                             (current-buffer))))
               (with-current-buffer (prepare-buffer)
                 (let ((inhibit-read-only t))
@@ -2198,10 +2206,7 @@ to nil disables displaying this information.")
 ;;;###autoload
 (define-minor-mode ggtags-mode nil
   :lighter (:eval (if ggtags-navigation-mode "" " GG"))
-  (unless (timerp ggtags-highlight-tag-timer)
-    (setq ggtags-highlight-tag-timer
-          (run-with-idle-timer
-           ggtags-highlight-tag-delay t #'ggtags-highlight-tag-at-point)))
+  (ggtags-setup-highlight-tag-at-point ggtags-highlight-tag)
   (if ggtags-mode
       (progn
         (add-hook 'after-save-hook 'ggtags-after-save-function nil t)
@@ -2224,9 +2229,7 @@ to nil disables displaying this information.")
     (remove-function (local 'eldoc-documentation-function) 
'ggtags-eldoc-function)
     (setq mode-line-buffer-identification
           (delq 'ggtags-mode-line-project-name 
mode-line-buffer-identification))
-    (and (overlayp ggtags-highlight-tag-overlay)
-         (delete-overlay ggtags-highlight-tag-overlay))
-    (setq ggtags-highlight-tag-overlay nil)))
+    (ggtags-cancel-highlight-tag-at-point 'keep-timer)))
 
 (defvar ggtags-highlight-tag-map
   (let ((map (make-sparse-keymap)))
@@ -2246,6 +2249,22 @@ to nil disables displaying this information.")
 (put 'ggtags-active-tag 'help-echo
      "S-mouse-1 for definitions\nS-mouse-3 for references")
 
+(defun ggtags-setup-highlight-tag-at-point (flag)
+  (cond ((null flag) (ggtags-cancel-highlight-tag-at-point))
+        ((not (timerp ggtags-highlight-tag-timer))
+         (setq ggtags-highlight-tag-timer
+               (run-with-idle-timer flag t #'ggtags-highlight-tag-at-point)))
+        (t (timer-set-idle-time ggtags-highlight-tag-timer flag t))))
+
+(defun ggtags-cancel-highlight-tag-at-point (&optional keep-timer)
+  (when (and (not keep-timer)
+             (timerp ggtags-highlight-tag-timer))
+    (cancel-timer ggtags-highlight-tag-timer)
+    (setq ggtags-highlight-tag-timer nil))
+  (when ggtags-highlight-tag-overlay
+    (delete-overlay ggtags-highlight-tag-overlay)
+    (setq ggtags-highlight-tag-overlay nil)))
+
 (defun ggtags-highlight-tag-at-point ()
   (when (and ggtags-mode ggtags-project-root (ggtags-find-project))
     (unless (overlayp ggtags-highlight-tag-overlay)
diff --git a/packages/gnome-c-style/.gitignore 
b/packages/gnome-c-style/.gitignore
new file mode 100644
index 0000000..7c5214c
--- /dev/null
+++ b/packages/gnome-c-style/.gitignore
@@ -0,0 +1,2 @@
+*.elc
+
diff --git a/packages/gnome-c-style/Makefile b/packages/gnome-c-style/Makefile
new file mode 100644
index 0000000..571841e
--- /dev/null
+++ b/packages/gnome-c-style/Makefile
@@ -0,0 +1,16 @@
+EMACS ?= emacs
+RM ?= rm
+ELC = gnome-c-align.elc gnome-c-snippet.elc gnome-c-style.elc
+
+all: $(ELC)
+
+%.elc: %.el
+       $(EMACS) -Q -batch --eval "(setq load-path (cons nil load-path))" \
+               -f batch-byte-compile $<
+
+check:
+       $(EMACS) -Q -batch --eval "(setq load-path (cons nil load-path))" \
+               -l ert -l gnome-c-tests.el -f ert-run-tests-batch-and-exit
+
+clean:
+       $(RM) -rf $(ELC)
diff --git a/packages/gnome-c-style/README b/packages/gnome-c-style/README
new file mode 120000
index 0000000..42061c0
--- /dev/null
+++ b/packages/gnome-c-style/README
@@ -0,0 +1 @@
+README.md
\ No newline at end of file
diff --git a/packages/gnome-c-style/README.md b/packages/gnome-c-style/README.md
new file mode 100644
index 0000000..69532eb
--- /dev/null
+++ b/packages/gnome-c-style/README.md
@@ -0,0 +1,88 @@
+gnome-c-style
+======
+
+gnome-c-style is an Emacs minor mode for editing C source code in [GNOME C 
coding 
style](https://developer.gnome.org/programming-guidelines/stable/c-coding-style.html.en).
+In particular, it is useful to properly line-up [function 
arguments](https://developer.gnome.org/programming-guidelines/stable/c-coding-style.html.en#functions)
 and
+[function declarations in header 
files](https://developer.gnome.org/programming-guidelines/stable/c-coding-style.html.en#header-files).
+
+Install
+------
+
+* `M-x package-install gnome-c-style`
+* Add the following line to `~/.emacs.d/init.el`:
+
+```
+(add-hook 'c-mode-hook 'gnome-c-style-mode)
+```
+
+Usage
+------
+
+| Key         | Command                                                   |
+--------------|-----------------------------------------------------------|
+| C-c C-g a   | Align argument list at the current point                  |
+| C-c C-g r   | Align function declarations in the current region         |
+| C-c C-g C-g | Compute optimal alignment columns from the current region |
+| C-c C-g g   | Guess alignment columns from the current region           |
+| C-c C-g f   | Set alignment column to the current point                 |
+| C-c C-g c   | Insert `module_object`                                    |
+| C-c C-g C   | Insert `MODULE_OBJECT`                                    |
+| C-c C-g C-c | Insert `ModuleObject`                                     |
+| C-c C-g s   | Insert custom snippet                                     |
+
+Example
+------
+
+If you have the following code in a header file:
+```c
+GGpgCtx *g_gpg_ctx_new (GError **error);
+
+typedef void (*GGpgProgressCallback) (gpointer user_data,
+                                      const gchar *what,
+                                      gint type,
+                                      gint current,
+                                      gint total);
+
+void g_gpg_ctx_set_progress_callback (GGpgCtx *ctx,
+                                      GGpgProgressCallback callback,
+                                      gpointer user_data,
+                                      GDestroyNotify destroy_data);
+void g_gpg_ctx_add_signer (GGpgCtx *ctx, GGpgKey *key);
+guint g_gpg_ctx_get_n_signers (GGpgCtx *ctx);
+GGpgKey *g_gpg_ctx_get_signer (GGpgCtx *ctx, guint index);
+void g_gpg_ctx_clear_signers (GGpgCtx *ctx);
+```
+
+Mark the region, type `C-c C-g C-g`, and you will see the optimum
+alignment columns:
+
+```
+identifier-start: 9, arglist-start: 41, arglist-identifier-start: 64
+```
+
+Then, mark the region again, type `C-c C-g r`, and you will get the
+code aligned:
+
+```c
+GGpgCtx *g_gpg_ctx_new                   (GError              **error);
+
+typedef void (*GGpgProgressCallback) (gpointer user_data,
+                                      const gchar *what,
+                                      gint type,
+                                      gint current,
+                                      gint total);
+
+void     g_gpg_ctx_set_progress_callback (GGpgCtx              *ctx,
+                                          GGpgProgressCallback  callback,
+                                          gpointer              user_data,
+                                          GDestroyNotify        destroy_data);
+void     g_gpg_ctx_add_signer            (GGpgCtx              *ctx,
+                                          GGpgKey              *key);
+guint    g_gpg_ctx_get_n_signers         (GGpgCtx              *ctx);
+GGpgKey *g_gpg_ctx_get_signer            (GGpgCtx              *ctx,
+                                          guint                 index);
+void     g_gpg_ctx_clear_signers         (GGpgCtx              *ctx);
+```
+
+Note that the `typedef` statement is skipped as it is not a function
+declaration.
diff --git a/packages/gnome-c-style/gnome-c-align.el 
b/packages/gnome-c-style/gnome-c-align.el
new file mode 100644
index 0000000..734800a
--- /dev/null
+++ b/packages/gnome-c-style/gnome-c-align.el
@@ -0,0 +1,547 @@
+;; gnome-c-align.el --- GNOME-style code alignment -*- lexical-binding: t; -*-
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Daiki Ueno <address@hidden>
+;; Keywords: GNOME, C, coding style
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(require 'cc-mode)
+(require 'cl-lib)
+
+(defcustom gnome-c-align-max-column 80
+  "Maximum number of columns per line."
+  :type '(choice (integer :tag "Columns")
+                (const :tag "No wrap"))
+  :group 'gnome-c-style)
+
+(defvar gnome-c-align-identifier-start-column nil)
+(make-variable-buffer-local 'gnome-c-align-identifier-start-column)
+
+(defvar gnome-c-align-arglist-start-column nil)
+(make-variable-buffer-local 'gnome-c-align-arglist-start-column)
+
+(defvar gnome-c-align-arglist-identifier-start-column nil)
+(make-variable-buffer-local 'gnome-c-align-arglist-identifier-start-column)
+
+(cl-defstruct (gnome-c-align--argument
+              (:constructor nil)
+              (:constructor gnome-c-align--make-argument (type-start
+                                                          type-identifier-end
+                                                          type-end
+                                                          identifier-start
+                                                          identifier-end))
+              (:copier nil)
+              (:predicate nil))
+  (type-start nil :read-only t)
+  (type-identifier-end nil :read-only t)
+  (type-end nil :read-only t)
+  (identifier-start nil :read-only t)
+  (identifier-end nil :read-only t))
+
+(defun gnome-c-align--marker-column (marker)
+  (save-excursion
+    (goto-char marker)
+    (current-column)))
+
+(defun gnome-c-align--indent-to-column (column)
+  ;; Prefer 'char **foo' than 'char ** foo'
+  (when (looking-back "\\*+" nil t)
+    (setq column (- column (- (match-end 0) (match-beginning 0))))
+    (goto-char (match-beginning 0)))
+  ;; FIXME: should respect indent-tabs-mode?
+  (let (indent-tabs-mode)
+    (indent-to-column column)))
+
+(defun gnome-c-align--argument-type-width (arg)
+  (- (gnome-c-align--marker-column (gnome-c-align--argument-type-end arg))
+     (gnome-c-align--marker-column (gnome-c-align--argument-type-start arg))))
+
+(defun gnome-c-align--argument-type-identifier-width (arg)
+  (- (gnome-c-align--marker-column
+      (gnome-c-align--argument-type-identifier-end arg))
+     (gnome-c-align--marker-column
+      (gnome-c-align--argument-type-start arg))))
+
+(defun gnome-c-align--arglist-identifier-start-column (arglist start-column)
+  (let ((max-type-identifier-width
+        (apply #'max
+               0
+               (mapcar #'gnome-c-align--argument-type-identifier-width
+                       arglist)))
+       (max-extra-width
+        (apply #'max
+               0
+               (mapcar
+                (lambda (argument)
+                  (- (gnome-c-align--argument-type-end argument)
+                     (gnome-c-align--argument-type-identifier-end argument)))
+                arglist))))
+    (+ start-column max-type-identifier-width max-extra-width)))
+
+(defun gnome-c-align--argument-identifier-width (argument)
+  (if (gnome-c-align--argument-identifier-start argument)
+      (- (gnome-c-align--marker-column
+         (gnome-c-align--argument-identifier-end argument))
+        (gnome-c-align--marker-column
+         (gnome-c-align--argument-identifier-start argument)))
+    0))
+
+(defun gnome-c-align--arglist-identifier-width (arglist)
+  (apply #'max 0 (mapcar #'gnome-c-align--argument-identifier-width arglist)))
+
+(defun gnome-c-align--normalize-arglist-region (arglist beg end)
+  (save-excursion
+    (save-restriction
+      (narrow-to-region beg end)
+      (goto-char (point-min))
+      (while (re-search-forward "\\s-+" nil t)
+       (replace-match " "))
+      (goto-char (point-min))
+      (while (re-search-forward "\\s-*," nil t)
+       (replace-match ",\n"))
+      (goto-char (point-min))
+      (delete-trailing-whitespace)
+      ;; Remove whitespace at the beginning of line
+      (goto-char (point-min))
+      (while (re-search-forward "^\\s-+" nil t)
+       (replace-match ""))
+      ;; Remove empty lines
+      (goto-char (point-min))
+      (delete-matching-lines "^$")
+      ;; 'int * * * foo' -> 'int ***foo'
+      (dolist (argument arglist)
+       (goto-char (gnome-c-align--argument-type-end argument))
+       (while (re-search-backward
+               "\\(\\*+\\)\\s-+"
+               (gnome-c-align--argument-type-identifier-end argument)
+               t)
+         (replace-match "\\1"))
+       (when (gnome-c-align--argument-identifier-start argument)
+         (goto-char (gnome-c-align--argument-identifier-start argument))
+         (if (looking-back "\\* " nil)
+             (delete-char -1)))
+       (goto-char (gnome-c-align--argument-type-end argument))))))
+
+(defun gnome-c-align--parse-arglist (beg end)
+  (save-excursion
+    (save-restriction
+      (narrow-to-region beg end)
+      (let (type-start
+           type-identifier-end
+           type-end
+           identifier-start
+           identifier-end
+           arglist
+           last-token-start)
+       (goto-char (point-max))
+       (while (not (bobp))
+         (c-backward-syntactic-ws)
+         (setq identifier-end (point-marker))
+         ;; Array argument, such as 'int a[]'
+         (if (eq (preceding-char) ?\])
+             (c-backward-sexp))
+         (c-backward-token-2)
+         (setq identifier-start (point-marker))
+         (c-backward-syntactic-ws)
+         (if (or (bobp) (eq (preceding-char) ?,))
+             (progn
+               ;; Identifier is omitted, or '...'.
+               (setq type-start identifier-start
+                     type-identifier-end identifier-end
+                     type-end identifier-end
+                     identifier-start nil
+                     identifier-end nil)
+               (c-backward-token-2))
+           (setq type-end (point-marker)
+                 last-token-start type-end)
+           (while (and (not (bobp))
+                       (progn
+                         (c-backward-token-2)
+                         (unless (eq (char-after) ?,)
+                           (setq last-token-start (point-marker)))))
+             (c-backward-syntactic-ws))
+           (setq type-start last-token-start)
+           (save-excursion
+             (goto-char type-end)
+             (skip-chars-backward "* " type-start)
+             (c-backward-syntactic-ws)
+             (setq type-identifier-end (point-marker))))
+         (push (gnome-c-align--make-argument type-start
+                                             type-identifier-end
+                                             type-end
+                                             identifier-start
+                                             identifier-end)
+               arglist))
+       arglist))))
+
+;;;###autoload
+(defun gnome-c-align-arglist-at-point (&optional identifier-start-column)
+  "Reformat argument list at point, aligning argument to the right end."
+  (interactive)
+  (save-excursion
+    (let* (start-column arglist)
+      (cl-destructuring-bind (beg end)
+         (gnome-c-align--arglist-region-at-point (point))
+       (goto-char beg)
+       (setq start-column (current-column))
+       (save-restriction
+         (narrow-to-region beg end)
+         (setq arglist (gnome-c-align--parse-arglist (point-min) (point-max)))
+         (gnome-c-align--normalize-arglist-region
+          arglist (point-min) (point-max))
+         (unless identifier-start-column
+           (setq identifier-start-column
+                 (gnome-c-align--arglist-identifier-start-column arglist 0)))
+         (dolist (argument arglist)
+           (goto-char (gnome-c-align--argument-type-start argument))
+           (let ((column (if (bobp) 0 start-column)))
+             (when (not (bobp))
+               (gnome-c-align--indent-to-column start-column))
+             (when (gnome-c-align--argument-identifier-start argument)
+               (setq column (+ column identifier-start-column))
+               (goto-char (gnome-c-align--argument-identifier-start argument))
+               (gnome-c-align--indent-to-column column)))))))))
+
+(cl-defstruct (gnome-c-align--decl
+              (:constructor nil)
+              (:constructor gnome-c-align--make-decl (start
+                                                      end
+                                                      identifier-start
+                                                      identifier-end
+                                                      arglist-start
+                                                      arglist-end
+                                                      arglist))
+              (:copier nil)
+              (:predicate nil))
+  (start nil :read-only t)
+  (end nil :read-only t)
+  (identifier-start nil :read-only t)
+  (identifier-end nil :read-only t)
+  (arglist-start nil :read-only t)
+  (arglist-end nil :read-only t)
+  (arglist nil :read-only t))
+
+(defun gnome-c-align--decls-identifier-start-column (decls start-column)
+  (apply #'max
+        start-column
+        (delq nil
+              (mapcar
+               (lambda (decl)
+                 (let ((decl-column
+                        (+ start-column
+                           (gnome-c-align--marker-column
+                            (gnome-c-align--decl-identifier-start decl)))))
+                   (if (and gnome-c-align-max-column
+                            (> decl-column gnome-c-align-max-column))
+                       nil
+                     decl-column)))
+               decls))))
+
+(defun gnome-c-align--decl-identifier-width (decl)
+  (- (gnome-c-align--marker-column
+      (gnome-c-align--decl-identifier-end decl))
+     (gnome-c-align--marker-column
+      (gnome-c-align--decl-identifier-start decl))))
+
+(defun gnome-c-align--decls-arglist-start-column (decls start-column)
+  (let ((arglist-width
+        (+ (gnome-c-align--decls-arglist-identifier-start-column decls 0)
+           (gnome-c-align--decls-arglist-identifier-width decls)
+           (length ");"))))
+    (apply #'max
+          start-column
+          (delq nil
+                (mapcar
+                 (lambda (decl)
+                   (let ((decl-column
+                          (+ start-column
+                             (gnome-c-align--decl-identifier-width decl)
+                             1)))
+                     (if (and gnome-c-align-max-column
+                              (> (+ decl-column arglist-width)
+                                 gnome-c-align-max-column))
+                         nil
+                       decl-column)))
+                 decls)))))
+
+(defun gnome-c-align--decls-arglist-identifier-width (decls)
+  (apply #'max 0 (mapcar (lambda (decl)
+                          (gnome-c-align--arglist-identifier-width
+                           (gnome-c-align--decl-arglist decl)))
+                        decls)))
+
+(defun gnome-c-align--decls-arglist-identifier-start-column (decls 
start-column)
+  (apply #'max 0 (mapcar (lambda (decl)
+                          ;; FIXME: should wrap lines inside argument list?
+                          (gnome-c-align--arglist-identifier-start-column
+                           (gnome-c-align--decl-arglist decl)
+                           start-column))
+                        decls)))
+
+(defun gnome-c-align--parse-decl (beg end)
+  ;; Parse at most one func declaration found in BEG END.
+  (save-excursion
+    (save-restriction
+      (narrow-to-region beg end)
+      (let (arglist-start
+           arglist-end
+           identifier-start
+           identifier-end
+           vfunc-p)
+       (goto-char (point-min))
+       (c-forward-syntactic-ws)
+       (unless (looking-at
+                "typedef\\|#\\|G_\\(?:DECLARE\\|DEFINE\\)")
+         (while (and (not (eobp))
+                     (not (eq (char-after) ?\()))
+           (c-forward-token-2)
+           (c-forward-syntactic-ws))
+         ;; Identifier is vfunc.
+         (when (looking-at "(\\s-*\\*")
+           (c-forward-sexp)
+           (c-forward-syntactic-ws)
+           (setq vfunc-p t))
+         (when (eq (char-after) ?\()
+           (setq arglist-start (point-marker))
+           (c-backward-syntactic-ws)
+           (setq identifier-end (point-marker))
+           (if vfunc-p
+               (c-backward-sexp)
+             (c-backward-token-2))
+           (setq identifier-start (point-marker))
+           (goto-char arglist-start)
+           (c-forward-sexp)
+           (setq arglist-end (point-marker))
+           (gnome-c-align--make-decl beg end
+                                     identifier-start identifier-end
+                                     arglist-start arglist-end
+                                     (gnome-c-align--parse-arglist
+                                      (1+ arglist-start)
+                                      (1- arglist-end)))))))))
+
+(defun gnome-c-align--normalize-decl (decl)
+  (save-excursion
+    ;; Replace newlines with a space
+    (save-restriction
+      ;; Ignore lines before identifier-start
+      (goto-char (gnome-c-align--decl-identifier-start decl))
+      (beginning-of-line)
+      (narrow-to-region (point)
+                       (gnome-c-align--decl-arglist-end decl))
+      (goto-char (point-min))
+      (while (re-search-forward "\n" nil t)
+       (replace-match " ")))
+    ;; Replace consequent spaces with a space
+    (save-restriction
+      ;; Ignore lines before identifier-start
+      (goto-char (gnome-c-align--decl-identifier-start decl))
+      (beginning-of-line)
+      (narrow-to-region (point)
+                       (gnome-c-align--decl-arglist-end decl))
+      (goto-char (point-min))
+      (while (re-search-forward "\\s-+" nil t)
+       (replace-match " ")))
+    (goto-char (gnome-c-align--decl-identifier-start decl))
+    (if (looking-back "\\* " nil)
+       (delete-char -1))
+    ;; Normalize the argument list
+    (gnome-c-align--normalize-arglist-region
+     (gnome-c-align--decl-arglist decl)
+     (gnome-c-align--decl-arglist-start decl)
+     (gnome-c-align--decl-arglist-end decl))))
+
+(defun gnome-c-align--arglist-region-at-point (point)
+  (save-excursion
+    (let (start)
+      (goto-char point)
+      (c-beginning-of-statement-1)
+      (c-backward-syntactic-ws)
+      (unless (eq ?\( (preceding-char))
+       (error "No containing argument list"))
+      (setq start (point))
+      (backward-char)
+      (condition-case nil
+         (c-forward-sexp)
+       (error
+        (error "No closing parenthesis")))
+      (backward-char)
+      (list start (point)))))
+
+;;;###autoload
+(defun gnome-c-align-set-column (symbol)
+  "Set alignment column of SYMBOL."
+  (interactive
+   (let ((symbol-name (completing-read "Symbol to change: "
+                                      '("identifier-start"
+                                        "arglist-start"
+                                        "arglist-identifier-start")
+                                      nil t)))
+     (list (intern (format "gnome-c-align-%s-column" symbol-name)))))
+  (set symbol (current-column)))
+
+(defun gnome-c-align--scan-decls (beg end)
+  (save-excursion
+    (save-restriction
+      (narrow-to-region beg end)
+      (goto-char (point-min))
+      (let (decls)
+       (while (not (eobp))
+         (let (decl-start decl-end decl)
+           (c-forward-syntactic-ws)
+           (setq decl-start (point-marker))
+           (c-end-of-statement)
+           (setq decl-end (point-marker))
+           (setq decl (gnome-c-align--parse-decl decl-start decl-end))
+           (when decl
+             (push decl decls))))
+       decls))))
+
+(defun gnome-c-align--guess-optimal-columns (beg end)
+  (let ((buffer (current-buffer))
+       decls)
+    (with-temp-buffer
+      (insert-buffer-substring-no-properties buffer beg end)
+      (c-mode)
+      (setq decls (gnome-c-align--scan-decls (point-min) (point-max)))
+      (mapc #'gnome-c-align--normalize-decl decls)
+      (let* ((identifier-start-column
+             (gnome-c-align--decls-identifier-start-column
+              decls 0))
+            (arglist-start-column
+             (gnome-c-align--decls-arglist-start-column
+              decls identifier-start-column))
+            (arglist-identifier-start-column
+             (gnome-c-align--decls-arglist-identifier-start-column
+              decls (+ (length "(") arglist-start-column))))
+       (list (cons 'identifier-start-column
+                   identifier-start-column)
+             (cons 'arglist-start-column
+                   arglist-start-column)
+             (cons 'arglist-identifier-start-column
+                   arglist-identifier-start-column))))))
+
+;;;###autoload
+(defun gnome-c-align-guess-optimal-columns (beg end)
+  "Compute the optimal alignment rule from the declarations in BEG and END.
+
+This sets `gnome-c-align-identifier-start-column',
+`gnome-c-align-arglist-start-column', and
+`gnome-c-align-arglist-identifier-start-column'."
+  (interactive "r")
+  (let ((columns (gnome-c-align--guess-optimal-columns beg end)))
+    (setq gnome-c-align-identifier-start-column
+         (cdr (assq 'identifier-start-column columns))
+         gnome-c-align-arglist-start-column
+         (cdr (assq 'arglist-start-column columns))
+         gnome-c-align-arglist-identifier-start-column
+         (cdr (assq 'arglist-identifier-start-column columns)))
+    (message
+     "identifier-start: %d, arglist-start: %d, arglist-identifier-start: %d"
+     gnome-c-align-identifier-start-column
+     gnome-c-align-arglist-start-column
+     gnome-c-align-arglist-identifier-start-column)))
+
+;;;###autoload
+(defun gnome-c-align-guess-columns (beg end)
+  "Guess the existing alignment rule from the declarations in BEG and END.
+
+This sets `gnome-c-align-identifier-start-column',
+`gnome-c-align-arglist-start-column', and
+`gnome-c-align-arglist-identifier-start-column'."
+  (interactive "r")
+  (let ((decls (gnome-c-align--scan-decls beg end))
+       arglist)
+    (unless decls
+      (error "No function declaration in the region"))
+    (setq arglist (gnome-c-align--parse-arglist
+                  (1+ (gnome-c-align--decl-arglist-start (car decls)))
+                  (1- (gnome-c-align--decl-arglist-end (car decls)))))
+    (unless arglist
+      (error "Empty argument list"))
+    (unless (gnome-c-align--argument-identifier-start (car arglist))
+      (error "No identifier in the argument list"))
+    (setq gnome-c-align-identifier-start-column
+         (gnome-c-align--marker-column
+          (gnome-c-align--decl-identifier-start (car decls)))
+         gnome-c-align-arglist-start-column
+         (gnome-c-align--marker-column
+          (gnome-c-align--decl-arglist-start (car decls)))
+         gnome-c-align-arglist-identifier-start-column
+         (gnome-c-align--marker-column
+          (gnome-c-align--argument-identifier-start (car arglist))))
+    (message
+     "identifier-start: %d, arglist-start: %d, arglist-identifier-start: %d"
+     gnome-c-align-identifier-start-column
+     gnome-c-align-arglist-start-column
+     gnome-c-align-arglist-identifier-start-column)))
+
+;;;###autoload
+(defun gnome-c-align-decls-region (beg end)
+  "Reformat function declarations in the region between BEG and END.
+
+The `gnome-c-align-identifier-start-column',
+`gnome-c-align-arglist-start-column', and
+`gnome-c-align-arglist-identifier-start-column' variables
+control the widths.
+
+To set those variables, use \\[gnome-c-align-set-column],
+\\[gnome-c-align-guess-columns], or
+\\[gnome-c-align-guess-optimal-columns].
+
+If they are not set, this function internally calls
+\\[gnome-c-align-guess-optimal-columns] before formatting."
+  (interactive "r")
+  (save-excursion
+    (let (decls)
+      (save-restriction
+       (narrow-to-region beg end)
+       (unless (and gnome-c-align-identifier-start-column
+                    gnome-c-align-arglist-start-column
+                    gnome-c-align-arglist-identifier-start-column)
+         (let ((columns (gnome-c-align--guess-optimal-columns beg end)))
+           (unless gnome-c-align-identifier-start-column
+             (setq gnome-c-align-identifier-start-column
+                   (cdr (assq 'identifier-start-column columns))))
+           (unless gnome-c-align-arglist-start-column
+             (setq gnome-c-align-arglist-start-column
+                   (cdr (assq 'arglist-start-column columns))))
+           (unless gnome-c-align-arglist-identifier-start-column
+             (setq gnome-c-align-arglist-identifier-start-column
+                   (cdr (assq 'arglist-identifier-start-column columns))))))
+       (setq decls (gnome-c-align--scan-decls beg end))
+       (dolist (decl decls)
+         (gnome-c-align--normalize-decl decl)
+         (goto-char (gnome-c-align--decl-identifier-start decl))
+         (gnome-c-align--indent-to-column
+          gnome-c-align-identifier-start-column)
+         (goto-char (gnome-c-align--decl-identifier-end decl))
+         (when (>= (current-column) gnome-c-align-arglist-start-column)
+           (insert "\n"))
+         (goto-char (gnome-c-align--decl-arglist-start decl))
+         (gnome-c-align--indent-to-column
+          gnome-c-align-arglist-start-column)
+         (forward-char)
+         (gnome-c-align-arglist-at-point
+          (- (- gnome-c-align-arglist-identifier-start-column
+                (length "("))
+             gnome-c-align-arglist-start-column)))))))
+
+(provide 'gnome-c-align)
+
+;;; gnome-c-align.el ends here
diff --git a/packages/gnome-c-style/gnome-c-snippet.el 
b/packages/gnome-c-style/gnome-c-snippet.el
new file mode 100644
index 0000000..95c5f6d
--- /dev/null
+++ b/packages/gnome-c-style/gnome-c-snippet.el
@@ -0,0 +1,703 @@
+;;; gnome-c-snippet.el --- GNOME-style code generation -*- lexical-binding: t; 
-*-
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Daiki Ueno <address@hidden>
+;; Keywords: GNOME, C, coding style
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; FIXME: The snippets defined here could be rewritten in yasnippet
+
+;;; Code:
+
+(require 'gnome-c-align)
+(require 'subword)
+
+(defvar gnome-c-snippet-package nil)
+(make-variable-buffer-local 'gnome-c-snippet-package)
+
+(defvar gnome-c-snippet-class nil)
+(make-variable-buffer-local 'gnome-c-snippet-class)
+
+(defvar gnome-c-snippet-parent-package nil)
+(make-variable-buffer-local 'gnome-c-snippet-parent-package)
+
+(defvar gnome-c-snippet-parent-class nil)
+(make-variable-buffer-local 'gnome-c-snippet-parent-class)
+
+(defconst gnome-c-snippet-guess-name-functions
+  '(gnome-c-snippet--guess-name-from-header-buffer
+    gnome-c-snippet--guess-name-from-declaration
+    gnome-c-snippet--guess-name-from-file-name))
+
+(defcustom gnome-c-snippet-align-arglist t
+  "Whether to align argument list of the inserted snippet"
+  :type 'boolean
+  :group 'gnome-c-style)
+
+(make-variable-buffer-local 'gnome-c-snippet-align-arglist)
+
+(defun gnome-c-snippet--find-declaration ()
+  (save-excursion
+    (let (beg end)
+      (goto-char (point-min))
+      (when (re-search-forward
+            "^G_DECLARE_\\(?:FINAL\\|DERIVABLE\\)_TYPE\\s-*("
+            nil t)
+       (setq beg (match-beginning 0))
+       (goto-char (match-end 0))
+       (backward-char)
+       (condition-case nil
+           (progn
+             (c-forward-sexp)
+             (setq end (point)))
+         (error)))
+      (when (and beg end)
+       (list beg end)))))
+
+(defun gnome-c-snippet--extract-names-from-declaration (beg end)
+  (save-excursion
+    (narrow-to-region beg end)
+    (goto-char (point-min))
+    (search-forward "(")
+    (c-forward-syntactic-ws)
+    (let ((capitalized-package-class
+          (buffer-substring-no-properties (point)
+                                          (progn
+                                            (c-forward-token-2)
+                                            (c-backward-syntactic-ws)
+                                            (point))))
+         uppercased-package uppercased-class
+         capitalized-package capitalized-class capitalized-parent)
+      (c-forward-syntactic-ws)
+      (c-forward-token-2 3)
+      (setq uppercased-package (split-string
+                               (buffer-substring (point)
+                                                 (progn
+                                                   (c-forward-token-2)
+                                                   (c-backward-syntactic-ws)
+                                                   (point)))
+                               "_"))
+      (c-forward-syntactic-ws)
+      (c-forward-token-2)
+      (setq uppercased-class (split-string
+                             (buffer-substring (point)
+                                               (progn
+                                                 (c-forward-token-2)
+                                                 (c-backward-syntactic-ws)
+                                                 (point)))
+                             "_"))
+      (c-forward-syntactic-ws)
+      (c-forward-token-2)
+      (setq capitalized-parent (gnome-c-snippet--parse-name
+                               (buffer-substring (point)
+                                                 (progn
+                                                   (c-forward-token-2)
+                                                   (c-backward-syntactic-ws)
+                                                   (point)))))
+      (catch 'error
+       (let ((index 0))
+         (dolist (uppercased uppercased-package)
+           (let* ((length (length uppercased))
+                  (capitalized
+                   (substring capitalized-package-class
+                              index (+ index length))))
+             (unless (equal (upcase capitalized) uppercased)
+               (throw 'error nil))
+             (push capitalized capitalized-package)
+             (setq index (+ index length))))
+         (dolist (uppercased uppercased-class)
+           (let* ((length (length uppercased))
+                  (capitalized
+                   (substring capitalized-package-class
+                              index (+ index length))))
+             (unless (equal (upcase capitalized) uppercased)
+               (throw 'error nil))
+             (push capitalized capitalized-class)
+             (setq index (+ index length))))))
+      (list (nreverse capitalized-package)
+           (nreverse capitalized-class)
+           capitalized-parent))))
+
+(defun gnome-c-snippet--find-header-buffer ()
+  (pcase (file-name-extension buffer-file-name)
+    ("h"
+     (current-buffer))
+    ("c"
+     (let ((header-file-name
+           (concat (file-name-sans-extension buffer-file-name) ".h")))
+       (cl-find-if
+       (lambda (buffer)
+         (with-current-buffer buffer
+           (equal buffer-file-name header-file-name)))
+       (buffer-list))))))
+
+(defun gnome-c-snippet--guess-name-from-header-buffer (symbol)
+  (let ((header-buffer (gnome-c-snippet--find-header-buffer)))
+    (when header-buffer
+      (with-current-buffer header-buffer
+       (symbol-value (intern (format "gnome-c-snippet-%S" symbol)))))))
+
+(defun gnome-c-snippet--guess-name-from-declaration (symbol)
+  (when (memq symbol '(package class parent-package parent-class))
+    (let ((header-buffer (gnome-c-snippet--find-header-buffer)))
+      (when header-buffer
+       (with-current-buffer header-buffer
+         (let ((region (gnome-c-snippet--find-declaration))
+               names)
+           (when region
+             (setq names
+                   (apply #'gnome-c-snippet--extract-names-from-declaration
+                          region))
+             (when names
+               (pcase symbol
+                 (`package (car names))
+                 (`class (nth 1 names))
+                 (`parent-package (list (car (nth 2 names))))
+                 (`parent-class (cdr (nth 2 names))))))))))))
+
+(defun gnome-c-snippet--guess-name-from-file-name (symbol)
+  (when (memq symbol '(package class))
+    (let ((filename (file-name-sans-extension
+                    (file-name-nondirectory buffer-file-name))))
+      (when (string-match-p "-" filename)
+       (let ((names (split-string filename "-")))
+         (pcase symbol
+           (`package (list (upcase-initials (car names))))
+           (`class (mapcar #'upcase-initials (cdr names)))))))))
+
+(defun gnome-c-snippet--parse-name (name)
+  (with-temp-buffer
+    (let (words)
+      (insert (upcase-initials name))
+      (goto-char (point-min))
+      (while (not (eobp))
+       ;; Skip characters not recognized by subword-mode.
+       (if (looking-at "[^[:lower:][:upper:][:digit:]]+")
+           (goto-char (match-end 0)))
+       (push (buffer-substring (point) (progn (subword-forward 1)
+                                              (point)))
+             words))
+      (nreverse words))))
+
+(defun gnome-c-snippet--read-name (prompt symbol &optional default)
+  (when (or current-prefix-arg
+           (not (symbol-value symbol)))
+    (set symbol
+        (gnome-c-snippet--parse-name
+         (read-string prompt
+                      (or (if (symbol-value symbol)
+                              (gnome-c-snippet--format-Package
+                               (symbol-value symbol)))
+                          default)))))
+  (symbol-value symbol))
+
+(defun gnome-c-snippet--read-package-and-class (parent)
+  (append (list (gnome-c-snippet--read-name
+                "Package (CamelCase): "
+                'gnome-c-snippet-package
+                (gnome-c-snippet--format-Package
+                 (run-hook-with-args-until-success
+                  'gnome-c-snippet-guess-name-functions
+                  'package)))
+               (gnome-c-snippet--read-name
+                "Class (CamelCase): "
+                'gnome-c-snippet-class
+                (gnome-c-snippet--format-Class
+                 (run-hook-with-args-until-success
+                  'gnome-c-snippet-guess-name-functions
+                  'class))))
+         (when parent
+           (list (gnome-c-snippet--read-name
+                  "Parent package (CamelCase): "
+                  'gnome-c-snippet-parent-package
+                  (gnome-c-snippet--format-Package
+                   (run-hook-with-args-until-success
+                    'gnome-c-snippet-guess-name-functions
+                    'parent-package)))
+                 (gnome-c-snippet--read-name
+                  "Parent class (CamelCase): "
+                  'gnome-c-snippet-parent-class
+                  (gnome-c-snippet--format-Class
+                   (run-hook-with-args-until-success
+                    'gnome-c-snippet-guess-name-functions
+                    'parent-class)))))))
+
+(defun gnome-c-snippet--read-package-and-interface (parent)
+  (list (gnome-c-snippet--read-name
+         "Package (CamelCase): "
+         'gnome-c-snippet-package
+         (gnome-c-snippet--format-Package
+          (run-hook-with-args-until-success
+           'gnome-c-snippet-guess-name-functions
+           'package)))
+        (gnome-c-snippet--read-name
+         "Interface (CamelCase): "
+         'gnome-c-snippet-class
+         (gnome-c-snippet--format-Class
+          (run-hook-with-args-until-success
+           'gnome-c-snippet-guess-name-functions
+           'class)))
+        (when parent
+          (list (gnome-c-snippet--read-name
+                 "Parent package (CamelCase): "
+                 'gnome-c-snippet-parent-package
+                 (gnome-c-snippet--format-Package
+                  (run-hook-with-args-until-success
+                   'gnome-c-snippet-guess-name-functions
+                   'parent-package)))
+                (gnome-c-snippet--read-name
+                 "Parent class (CamelCase): "
+                 'gnome-c-snippet-parent-class
+                  (gnome-c-snippet--format-Class
+                   (run-hook-with-args-until-success
+                    'gnome-c-snippet-guess-name-functions
+                    'parent-class)))))))
+
+(defun gnome-c-snippet--format-PACKAGE (package)
+  (mapconcat #'upcase package "_"))
+(defalias 'gnome-c-snippet--format-CLASS 'gnome-c-snippet--format-PACKAGE)
+
+(defun gnome-c-snippet--format-PACKAGE_CLASS (package class)
+  (concat (gnome-c-snippet--format-PACKAGE package)
+         "_"
+         (gnome-c-snippet--format-CLASS class)))
+
+(defun gnome-c-snippet--format-package (package)
+  (mapconcat #'downcase package "_"))
+(defalias 'gnome-c-snippet--format-class 'gnome-c-snippet--format-package)
+
+(defun gnome-c-snippet--format-package_class (package class)
+  (concat (gnome-c-snippet--format-package package)
+         "_"
+         (gnome-c-snippet--format-class class)))
+
+(defun gnome-c-snippet--format-Package (package)
+  (mapconcat #'identity package ""))
+(defalias 'gnome-c-snippet--format-Class 'gnome-c-snippet--format-Package)
+
+(defun gnome-c-snippet--format-PackageClass (package class)
+  (concat (gnome-c-snippet--format-Package package)
+         (gnome-c-snippet--format-Class class)))
+
+;;;###autoload
+(defun gnome-c-snippet-insert-package_class (package class)
+  "Insert the class name before the current point."
+  (interactive (gnome-c-snippet--read-package-and-class nil))
+  (insert (gnome-c-snippet--format-package_class package class)))
+
+;;;###autoload
+(defun gnome-c-snippet-insert-PACKAGE_CLASS (package class)
+  "Insert the class name before the current point."
+  (interactive (gnome-c-snippet--read-package-and-class nil))
+  (insert (gnome-c-snippet--format-PACKAGE_CLASS package class)))
+
+;;;###autoload
+(defun gnome-c-snippet-insert-PackageClass (package class)
+  "Insert the class name (in CamelCase) before the current point."
+  (interactive (gnome-c-snippet--read-package-and-class nil))
+  (insert (gnome-c-snippet--format-PackageClass package class)))
+
+(defun gnome-c-snippet-insert-interface-declaration (package iface
+                                                            parent-package 
parent-class)
+  "Insert interface declaration for PACKAGE and IFACE"
+  (interactive (gnome-c-snippet--read-package-and-interface t))
+  (insert "\
+#define " (gnome-c-snippet--format-PACKAGE package) "_TYPE_" 
(gnome-c-snippet--format-CLASS iface) " (" (gnome-c-snippet--format-package 
package) "_" (gnome-c-snippet--format-class iface) "_get_type ())
+G_DECLARE_INTERFACE (" (gnome-c-snippet--format-PackageClass package iface) ", 
"
+(gnome-c-snippet--format-package_class package iface) ", " 
(gnome-c-snippet--format-PACKAGE package) ", " (gnome-c-snippet--format-CLASS 
iface) ", " (gnome-c-snippet--format-PackageClass parent-package parent-class) 
")
+"))
+
+(defun gnome-c-snippet--insert-class-declaration (package
+                                                 class
+                                                 parent-package
+                                                 parent-class
+                                                 derivable)
+  (insert "\
+#define " (gnome-c-snippet--format-PACKAGE package) "_TYPE_" 
(gnome-c-snippet--format-CLASS class) " (" 
(gnome-c-snippet--format-package_class package class) "_get_type ())
+G_DECLARE_" (if derivable "DERIVABLE" "FINAL") "_TYPE (" 
(gnome-c-snippet--format-PackageClass package class) ", "
+(gnome-c-snippet--format-package_class package class) ", " 
(gnome-c-snippet--format-PACKAGE package) ", " (gnome-c-snippet--format-CLASS 
class) ", " (gnome-c-snippet--format-PackageClass parent-package parent-class) 
")
+"))
+
+(defun gnome-c-snippet-insert-final-class-declaration (package
+                                                      class
+                                                      parent-package
+                                                      parent-class)
+  "Insert final class declaration for PACKAGE and CLASS."
+  (interactive (gnome-c-snippet--read-package-and-class t))
+  (gnome-c-snippet--insert-class-declaration package
+                                            class
+                                            parent-package
+                                            parent-class
+                                            nil))
+
+(defun gnome-c-snippet-insert-derivable-class-declaration (package
+                                                          class
+                                                          parent-package
+                                                          parent-class)
+  "Insert derivable class declaration for PACKAGE and CLASS."
+  (interactive (gnome-c-snippet--read-package-and-class t))
+  (gnome-c-snippet--insert-class-declaration package
+                                            class
+                                            parent-package
+                                            parent-class
+                                            t))
+
+(defun gnome-c-snippet-insert-interface-definition (package
+                                                   iface
+                                                   parent-package
+                                                   parent-class)
+  "Insert class definition for PACKAGE and CLASS."
+  (interactive (gnome-c-snippet--read-package-and-interface t))
+  (insert "\
+static void
+" (gnome-c-snippet--format-package_class package iface) "_default_init (" 
(gnome-c-snippet--format-PackageClass package iface) "Interface *iface) {
+}
+
+G_DEFINE_INTERFACE (" (gnome-c-snippet--format-PackageClass package iface) ", "
+(gnome-c-snippet--format-package_class package iface) ", " 
(gnome-c-snippet--format-PACKAGE parent-package) "_TYPE_" 
(gnome-c-snippet--format-CLASS parent-class) ")
+"))
+
+(defun gnome-c-snippet--insert-class-definition (package
+                                                class
+                                                parent-package
+                                                parent-class
+                                                abstract
+                                                code)
+  (insert "\
+G_DEFINE_" (if abstract "ABSTRACT_" "") "TYPE" (if code "WITH_CODE" "") " (" 
(gnome-c-snippet--format-PackageClass package class) ", "
+(gnome-c-snippet--format-package_class package class) ", " 
(gnome-c-snippet--format-PACKAGE parent-package) "_TYPE_" 
(gnome-c-snippet--format-CLASS parent-class) (if code ", " "") ")"))
+
+(defun gnome-c-snippet-insert-G_DEFINE_TYPE (package
+                                            class
+                                            parent-package
+                                            parent-class)
+  "Insert G_DEFINE_TYPE for PACKAGE and CLASS."
+  (interactive (gnome-c-snippet--read-package-and-class t))
+  (gnome-c-snippet--insert-class-definition package
+                                           class
+                                           parent-package
+                                           parent-class
+                                           nil
+                                           nil))
+
+(defun gnome-c-snippet-insert-G_DEFINE_TYPE_WITH_CODE (package
+                                                      class
+                                                      parent-package
+                                                      parent-class)
+  "Insert G_DEFINE_TYPE_WITH_CODE for PACKAGE and CLASS."
+  (interactive (gnome-c-snippet--read-package-and-class t))
+  (gnome-c-snippet--insert-class-definition package
+                                           class
+                                           parent-package
+                                           parent-class
+                                           nil
+                                           t))
+
+(defun gnome-c-snippet-insert-G_DEFINE_ABSTRACT_TYPE (package
+                                                     class
+                                                     parent-package
+                                                     parent-class)
+  "Insert G_DEFINE_ABSTRACT_TYPE for PACKAGE and CLASS."
+  (interactive (gnome-c-snippet--read-package-and-class t))
+  (gnome-c-snippet--insert-class-definition package
+                                           class
+                                           parent-package
+                                           parent-class
+                                           t
+                                           nil))
+
+(defun gnome-c-snippet-insert-G_DEFINE_ABSTRACT_TYPE_WITH_CODE (package
+                                                               class
+                                                               parent-package
+                                                               parent-class)
+  "Insert G_DEFINE_ABSTRACT_TYPE_WITH_CODE for PACKAGE and CLASS."
+  (interactive (gnome-c-snippet--read-package-and-class t))
+  (gnome-c-snippet--insert-class-definition package
+                                           class
+                                           parent-package
+                                           parent-class
+                                           t
+                                           t))
+
+(defun gnome-c-snippet-insert-constructor (package class)
+  "Insert 'constructor' vfunc of GObjectClass for PACKAGE and CLASS."
+  (interactive (gnome-c-snippet--read-package-and-class nil))
+  (let (arglist-start body-start)
+    (insert "\
+static GObject *
+" (gnome-c-snippet--format-package_class package class) "_constructor (")
+    (setq arglist-start (point-marker))
+    (insert "GType *object,
+guint n_construct_properties,
+GObjectConstructParam *construct_properties)\n")
+    (setq body-start (point-marker))
+    (if gnome-c-snippet-align-arglist
+       (progn
+         (goto-char arglist-start)
+         (gnome-c-align-arglist-at-point))
+      (indent-region arglist-start (point)))
+    (goto-char body-start)
+    (insert "{
+  " (gnome-c-snippet--format-PackageClass package class) " *self = "
+  (gnome-c-snippet--format-PACKAGE_CLASS package class) " (object);
+
+  G_OBJECT_CLASS (" (gnome-c-snippet--format-package_class package class) 
"_parent_class)->constructor (type, n_construct_properties, 
construct_properties);
+}
+")
+    (indent-region body-start (point))))
+
+(defun gnome-c-snippet-insert-set_property (package class)
+  "Insert 'set_property' vfunc of GObjectClass for PACKAGE and CLASS."
+  (interactive (gnome-c-snippet--read-package-and-class nil))
+  (let (arglist-start body-start)
+    (insert "\
+static void
+" (gnome-c-snippet--format-package_class package class) "_set_property (")
+    (setq arglist-start (point-marker))
+    (insert "GObject *object,
+guint prop_id,
+const GValue *value,
+GParamSpec *pspec)\n")
+    (setq body-start (point-marker))
+    (if gnome-c-snippet-align-arglist
+       (progn
+         (goto-char arglist-start)
+         (gnome-c-align-arglist-at-point))
+      (indent-region arglist-start (point)))
+    (goto-char body-start)
+    (insert "{
+  " (gnome-c-snippet--format-PackageClass package class) " *self = "
+  (gnome-c-snippet--format-PACKAGE_CLASS package class) " (object);
+
+  switch (prop_id)
+    {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+")
+    (indent-region body-start (point))))
+
+(defun gnome-c-snippet-insert-get_property (package class)
+  "Insert 'get_property' vfunc of GObjectClass for PACKAGE and CLASS."
+  (interactive (gnome-c-snippet--read-package-and-class nil))
+  (let (arglist-start body-start)
+    (insert "\
+static void
+" (gnome-c-snippet--format-package_class package class) "_get_property (")
+    (setq arglist-start (point-marker))
+    (insert "GObject *object,
+guint prop_id,
+GValue *value,
+GParamSpec *pspec)\n")
+    (setq body-start (point-marker))
+    (if gnome-c-snippet-align-arglist
+       (progn
+         (goto-char arglist-start)
+         (gnome-c-align-arglist-at-point))
+      (indent-region arglist-start (point)))
+    (goto-char body-start)
+    (insert "{
+  " (gnome-c-snippet--format-PackageClass package class) " *self = "
+  (gnome-c-snippet--format-PACKAGE_CLASS package class) " (object);
+
+  switch (prop_id)
+    {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+")
+    (indent-region body-start (point))))
+
+(defun gnome-c-snippet-insert-dispose (package class)
+  "Insert 'dispose' vfunc of GObjectClass for PACKAGE and CLASS."
+  (interactive (gnome-c-snippet--read-package-and-class nil))
+  (let (body-start)
+    (insert "\
+static void
+" (gnome-c-snippet--format-package_class package class) "_dispose (GObject 
*object)\n")
+    (setq body-start (point-marker))
+    (insert "{
+  " (gnome-c-snippet--format-PackageClass package class) " *self = "
+  (gnome-c-snippet--format-PACKAGE_CLASS package class) " (object);
+
+  G_OBJECT_CLASS (" (gnome-c-snippet--format-package_class package class) 
"_parent_class)->dispose (object);
+}
+")
+    (indent-region body-start (point))))
+
+(defun gnome-c-snippet-insert-finalize (package class)
+  "Insert 'finalize' vfunc of GObjectClass for PACKAGE and CLASS."
+  (interactive (gnome-c-snippet--read-package-and-class nil))
+  (let (body-start)
+    (insert "\
+static void
+" (gnome-c-snippet--format-package_class package class) "_finalize (GObject 
*object)\n")
+    (setq body-start (point-marker))
+    (insert "{
+  " (gnome-c-snippet--format-PackageClass package class) " *self = "
+  (gnome-c-snippet--format-PACKAGE_CLASS package class) " (object);
+
+  G_OBJECT_CLASS (" (gnome-c-snippet--format-package_class package class) 
"_parent_class)->finalize (object);
+}
+")
+    (indent-region body-start (point))))
+
+(defun gnome-c-snippet-insert-dispatch_properties_changed (package class)
+  "Insert 'dispatch_properties_changed vfunc of GObjectClass for
+PACKAGE and CLASS."
+  (interactive (gnome-c-snippet--read-package-and-class nil))
+  (let (arglist-start body-start)
+    (insert "\
+static void
+" (gnome-c-snippet--format-package_class package class) 
"_dispatch_properties_changed (")
+    (setq arglist-start (point-marker))
+    (insert "GObject *object,
+guint n_pspecs,
+GParamSpec **pspecs)\n")
+    (setq body-start (point-marker))
+    (if gnome-c-snippet-align-arglist
+       (progn
+         (goto-char arglist-start)
+         (gnome-c-align-arglist-at-point))
+      (indent-region arglist-start (point)))
+    (goto-char body-start)
+    (insert "{
+  " (gnome-c-snippet--format-PackageClass package class) " *self = "
+  (gnome-c-snippet--format-PACKAGE_CLASS package class) " (object);
+
+  G_OBJECT_CLASS (" (gnome-c-snippet--format-package_class package class) 
"_parent_class)->dispatch_properties_changed (object, n_pspecs, pspecs);
+}
+")
+    (indent-region body-start (point))))
+
+(defun gnome-c-snippet-insert-notify (package class)
+  "Insert 'notify' vfunc of GObjectClass for PACKAGE and CLASS."
+  (interactive (gnome-c-snippet--read-package-and-class nil))
+  (let (arglist-start body-start)
+    (insert "\
+static void
+" (gnome-c-snippet--format-package_class package class) "_notify (")
+    (setq arglist-start (point-marker))
+    (insert "GObject *object,
+GParamSpec *pspec)\n")
+    (setq body-start (point-marker))
+    (if gnome-c-snippet-align-arglist
+       (progn
+         (goto-char arglist-start)
+         (gnome-c-align-arglist-at-point))
+      (indent-region arglist-start (point)))
+    (insert "{
+  " (gnome-c-snippet--format-PackageClass package class) " *self = "
+  (gnome-c-snippet--format-PACKAGE_CLASS package class) " (object);
+
+  G_OBJECT_CLASS (" (gnome-c-snippet--format-package_class package class) 
"_parent_class)->notify (object, pspec);
+}
+")
+    (indent-region body-start (point))))
+
+(defun gnome-c-snippet-insert-constructed (package class)
+  "Insert 'constructed' vfunc of GObjectClass for PACKAGE and CLASS."
+  (interactive (gnome-c-snippet--read-package-and-class nil))
+  (let (body-start)
+    (insert "\
+static void
+" (gnome-c-snippet--format-package_class package class) "_constructed (GObject 
*object)\n")
+    (setq body-start (point-marker))
+    (insert "{
+  " (gnome-c-snippet--format-PackageClass package class) " *self = "
+  (gnome-c-snippet--format-PACKAGE_CLASS package class) " (object);
+
+  G_OBJECT_CLASS (" (gnome-c-snippet--format-package_class package class) 
"_parent_class)->constructed (object);
+}
+")
+    (indent-region body-start (point))))
+
+(defun gnome-c-snippet-insert-class-init (package class)
+  "Insert '_class_init' function for PACKAGE and CLASS."
+  (interactive (gnome-c-snippet--read-package-and-class nil))
+  (insert "\
+static void
+" (gnome-c-snippet--format-package_class package class) "_class_init (" 
(gnome-c-snippet--format-PackageClass package class) "Class *klass)\n")
+    (insert "{
+}
+"))
+
+(defun gnome-c-snippet-insert-init (package class)
+  "Insert '_init' function for PACKAGE and CLASS."
+  (interactive (gnome-c-snippet--read-package-and-class nil))
+  (insert "\
+static void
+" (gnome-c-snippet--format-package_class package class) "_init (" 
(gnome-c-snippet--format-PackageClass package class) " *self)\n")
+    (insert "{
+}
+"))
+
+(defvar gnome-c-snippet-snippet-commands
+  '(("G_DECLARE_INTERFACE" . gnome-c-snippet-insert-interface-declaration)
+    ("G_DECLARE_FINAL_TYPE" . gnome-c-snippet-insert-final-class-declaration)
+    ("G_DECLARE_DERIVABLE_TYPE" .
+     gnome-c-snippet-insert-derivable-class-declaration)
+    ("G_DEFINE_INTERFACE" . gnome-c-snippet-insert-interface-definition)
+    ("G_DEFINE_TYPE" . gnome-c-snippet-insert-G_DEFINE_TYPE)
+    ("G_DEFINE_TYPE_WITH_CODE" . 
gnome-c-snippet-insert-G_DEFINE_TYPE_WITH_CODE)
+    ("G_DEFINE_ABSTRACT_TYPE" .
+     gnome-c-snippet-insert-G_DEFINE_ABSTRACT_TYPE)
+    ("G_DEFINE_ABSTRACT_TYPE_WITH_CODE" .
+     gnome-c-snippet-insert-G_DEFINE_ABSTRACT_TYPE_WITH_CODE)
+    ("GObjectClass.constructor" . gnome-c-snippet-insert-constructor)
+    ("GObjectClass.set_property" . gnome-c-snippet-insert-set_property)
+    ("GObjectClass.get_property" . gnome-c-snippet-insert-get_property)
+    ("GObjectClass.dispose" . gnome-c-snippet-insert-dispose)
+    ("GObjectClass.finalize" . gnome-c-snippet-insert-finalize)
+    ("GObjectClass.dispatch_properties_changed" .
+     gnome-c-snippet-insert-dispatch_properties_changed)
+    ("GObjectClass.notify" . gnome-c-snippet-insert-notify)
+    ("GObjectClass.constructed" . gnome-c-snippet-insert-constructed)
+    ;; Will be overridden by `gnome-c-snippet-insert'.
+    ("_class_init" . gnome-c-snippet-insert-class-init)
+    ;; Will be overridden by `gnome-c-snippet-insert'.
+    ("_init" . gnome-c-snippet-insert-init)))
+
+;;;###autoload
+(defun gnome-c-snippet-insert (command)
+  (interactive
+   (let ((commands (copy-tree gnome-c-snippet-snippet-commands)))
+     (when (and gnome-c-snippet-package gnome-c-snippet-class)
+       (setcar (assoc "_class_init" commands)
+              (concat (gnome-c-snippet--format-package_class
+                       gnome-c-snippet-package gnome-c-snippet-class)
+                      "_class_init"))
+       (setcar (assoc "_init" commands)
+              (concat (gnome-c-snippet--format-package_class
+                       gnome-c-snippet-package gnome-c-snippet-class)
+                      "_init")))
+     (let* ((name (completing-read "Snippet: " commands nil t))
+           (entry (assoc name commands)))
+       (unless entry
+        (error "Unknown snippet: %s" name))
+       (list (cdr entry)))))
+  (call-interactively command))
+
+(provide 'gnome-c-snippet)
+
+;;; gnome-c-snippet.el ends here
diff --git a/packages/gnome-c-style/gnome-c-style.el 
b/packages/gnome-c-style/gnome-c-style.el
new file mode 100644
index 0000000..66c6578
--- /dev/null
+++ b/packages/gnome-c-style/gnome-c-style.el
@@ -0,0 +1,74 @@
+;;; gnome-c-style.el --- minor mode for editing GNOME-style C source code -*- 
lexical-binding: t; -*-
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Daiki Ueno <address@hidden>
+;; Keywords: GNOME, C, coding style
+;; Version: 0.1
+;; Maintainer: Daiki Ueno <address@hidden>
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This package provides a minor mode to help editing C source code
+;; in the GNOME C coding style:
+;;
+;; 
<https://developer.gnome.org/programming-guidelines/stable/c-coding-style.html.en#header-files>
+;; 
<https://developer.gnome.org/programming-guidelines/stable/c-coding-style.html.en#functions>
+;;
+;; It basically provides two functions: code alignment and snippet
+;; insertion.  To align code, use `gnome-c-style-align-decls-region'
+;; to line-up multiple function declarations in region, and
+;; `gnome-c-style-align-arglist-at-point' to line-up arguments in the
+;; argument list at point.
+;;
+;; To insert code snippet, use `gnome-c-snippet-insert'.  The command
+;; will let you choose a template to be inserted.  This package also
+;; provide commands to insert package/class names in upper case,
+;; capital case, and lower case.  For complete list of commands, do
+;; M-x describe-bindings.
+
+;;; Code:
+
+(require 'gnome-c-align)
+(require 'gnome-c-snippet)
+
+(defgroup gnome-c-style nil
+  "GNOME-style C source code editing"
+  :prefix "gnome-c-"
+  :group 'c)
+
+(defvar gnome-c-style-mode-map
+  (let ((keymap (make-sparse-keymap)))
+    (define-key keymap "\C-c\C-ga" 'gnome-c-align-arglist-at-point)
+    (define-key keymap "\C-c\C-gr" 'gnome-c-align-decls-region)
+    (define-key keymap "\C-c\C-gf" 'gnome-c-align-set-column)
+    (define-key keymap "\C-c\C-gg" 'gnome-c-align-guess-columns)
+    (define-key keymap "\C-c\C-g\C-g" 'gnome-c-align-guess-optimal-columns)
+    (define-key keymap "\C-c\C-gc" 'gnome-c-snippet-insert-package_class)
+    (define-key keymap "\C-c\C-gC" 'gnome-c-snippet-insert-PACKAGE_CLASS)
+    (define-key keymap "\C-c\C-g\C-c" 'gnome-c-snippet-insert-PackageClass)
+    (define-key keymap "\C-c\C-gs" 'gnome-c-snippet-insert)
+    keymap))
+
+;;;###autoload
+(define-minor-mode gnome-c-style-mode
+  "A minor-mode for editing GNOME-style C source code."
+  nil " GNOME" gnome-c-style-mode-map)
+
+(provide 'gnome-c-style)
+
+;;; gnome-c-style.el ends here
diff --git a/packages/gnome-c-style/gnome-c-tests.el 
b/packages/gnome-c-style/gnome-c-tests.el
new file mode 100644
index 0000000..17dbfe1
--- /dev/null
+++ b/packages/gnome-c-style/gnome-c-tests.el
@@ -0,0 +1,284 @@
+;;; gnome-c-tests.el --- tests for gnome-c-style -*- lexical-binding: t; -*-
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Daiki Ueno <address@hidden>
+;; Keywords: GNOME, C, coding style
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(require 'gnome-c-align)
+(require 'gnome-c-snippet)
+
+(defconst gnome-c-test-program-1 "\
+GGpgCtx *g_gpg_ctx_new (GError **error);
+
+typedef void (*GGpgProgressCallback) (gpointer user_data,
+                                      const gchar *what,
+                                      gint type,
+                                      gint current,
+                                      gint total);
+
+void g_gpg_ctx_set_progress_callback (GGpgCtx *ctx,
+                                      GGpgProgressCallback callback,
+                                      gpointer user_data,
+                                      GDestroyNotify destroy_data);
+void g_gpg_ctx_add_signer (GGpgCtx *ctx, GGpgKey *key);
+guint g_gpg_ctx_get_n_signers (GGpgCtx *ctx);
+GGpgKey *g_gpg_ctx_get_signer (GGpgCtx *ctx, guint index);
+void g_gpg_ctx_clear_signers (GGpgCtx *ctx);
+")
+
+(defconst gnome-c-test-program-1-aligned "\
+GGpgCtx *g_gpg_ctx_new                   (GError              **error);
+
+typedef void (*GGpgProgressCallback) (gpointer user_data,
+                                      const gchar *what,
+                                      gint type,
+                                      gint current,
+                                      gint total);
+
+void     g_gpg_ctx_set_progress_callback (GGpgCtx              *ctx,
+                                          GGpgProgressCallback  callback,
+                                          gpointer              user_data,
+                                          GDestroyNotify        destroy_data);
+void     g_gpg_ctx_add_signer            (GGpgCtx              *ctx,
+                                          GGpgKey              *key);
+guint    g_gpg_ctx_get_n_signers         (GGpgCtx              *ctx);
+GGpgKey *g_gpg_ctx_get_signer            (GGpgCtx              *ctx,
+                                          guint                 index);
+void     g_gpg_ctx_clear_signers         (GGpgCtx              *ctx);
+")
+
+(defconst gnome-c-test-program-2 "\
+GDK_AVAILABLE_IN_3_16
+const gchar **          gtk_widget_list_action_prefixes (GtkWidget             
*widget);
+")
+
+(defconst gnome-c-test-program-3 "\
+  /* overridable methods */
+  void       (*set_property)            (GObject        *object,
+                                         guint           property_id,
+                                         const GValue   *value,
+                                         GParamSpec     *pspec);
+  void       (*get_property)            (GObject        *object,
+                                         guint           property_id,
+                                         GValue         *value,
+                                         GParamSpec     *pspec);
+")
+
+(defconst gnome-c-test-program-4 "\
+FOO_AVAILABLE_IN_ALL
+int foo (struct foo ***a, int b, ...) G_GNUC_CONST;
+")
+
+(defconst gnome-c-test-program-4-aligned "\
+FOO_AVAILABLE_IN_ALL
+int foo (struct foo ***a,
+         int           b,
+         ...) G_GNUC_CONST;
+")
+
+(defconst gnome-c-test-program-5 "\
+int  * bar (const char * const *  * a, int b);
+")
+
+(defconst gnome-c-test-program-5-aligned "\
+int *bar (const char * const **a,
+          int                  b);
+")
+
+(defconst gnome-c-test-program-6 "\
+int foo (char **a, int b);
+type_1234567890 bar (char a, int b);
+int identifier_1234567890 (double a, double b);
+")
+
+(defconst gnome-c-test-program-6-aligned-1 "\
+int             foo
+                (char **a,
+                 int    b);
+type_1234567890 bar
+                (char   a,
+                 int    b);
+int             identifier_1234567890
+                (double a,
+                 double b);
+")
+
+(defconst gnome-c-test-program-6-aligned-2 "\
+int             foo (char **a,
+                     int    b);
+type_1234567890 bar (char   a,
+                     int    b);
+int             identifier_1234567890
+                    (double a,
+                     double b);
+")
+
+(defconst gnome-c-test-program-7 "\
+G_DECLARE_FINAL_TYPE (GGpgEngineInfo, g_gpg_engine_info, G_GPG, ENGINE_INFO,
+                      GObject)
+")
+
+(ert-deftest gnome-c-test-align--guess-optimal-columns ()
+  "Tests the `gnome-c-align--guess-optimal-columns'."
+  (with-temp-buffer
+    (insert gnome-c-test-program-1)
+    (c-mode)
+    (let* (gnome-c-align-max-column
+          (columns
+           (gnome-c-align--guess-optimal-columns (point-min) (point-max))))
+      (should (= (cdr (assq 'identifier-start-column columns)) 9))
+      (should (= (cdr (assq 'arglist-start-column columns)) 41))
+      (should (= (cdr (assq 'arglist-identifier-start-column columns)) 64)))))
+
+(ert-deftest gnome-c-test-align-region ()
+  "Tests the `gnome-c-align-decls-region'."
+  (with-temp-buffer
+    (insert gnome-c-test-program-1)
+    (c-mode)
+    (let (gnome-c-align-max-column)
+      (gnome-c-align-guess-optimal-columns (point-min) (point-max))
+      (gnome-c-align-decls-region (point-min) (point-max)))
+    (should (equal (buffer-string) gnome-c-test-program-1-aligned))))
+
+(ert-deftest gnome-c-test-align-region-2 ()
+  "Tests the `gnome-c-align-decls-region'."
+  (with-temp-buffer
+    (insert gnome-c-test-program-4)
+    (c-mode)
+    (let (gnome-c-align-max-column)
+      (gnome-c-align-guess-optimal-columns (point-min) (point-max))
+      (gnome-c-align-decls-region (point-min) (point-max)))
+    (should (equal (buffer-string) gnome-c-test-program-4-aligned))))
+
+(ert-deftest gnome-c-test-align-region-3 ()
+  "Tests the `gnome-c-align-decls-region'."
+  (with-temp-buffer
+    (insert gnome-c-test-program-5)
+    (c-mode)
+    (let (gnome-c-align-max-column)
+      (gnome-c-align-guess-optimal-columns (point-min) (point-max))
+      (gnome-c-align-decls-region (point-min) (point-max)))
+    (should (equal (buffer-string) gnome-c-test-program-5-aligned))))
+
+(ert-deftest gnome-c-test-align-region-4 ()
+  "Tests the `gnome-c-align-decls-region', with max columns set."
+  (with-temp-buffer
+    (insert gnome-c-test-program-6)
+    (c-mode)
+    (let ((gnome-c-align-max-column 20))
+      (gnome-c-align-guess-optimal-columns (point-min) (point-max))
+      (gnome-c-align-decls-region (point-min) (point-max)))
+    (should (equal (buffer-string) gnome-c-test-program-6-aligned-1))))
+
+(ert-deftest gnome-c-test-align-region-5 ()
+  "Tests the `gnome-c-align-decls-region', with max columns set."
+  (with-temp-buffer
+    (insert gnome-c-test-program-6)
+    (c-mode)
+    (let ((gnome-c-align-max-column 30))
+      (gnome-c-align-guess-optimal-columns (point-min) (point-max))
+      (gnome-c-align-decls-region (point-min) (point-max)))
+    (should (equal (buffer-string) gnome-c-test-program-6-aligned-2))))
+
+(ert-deftest gnome-c-test-align-guess-columns-1 ()
+  "Tests the `gnome-c-align-guess-columns'."
+  (with-temp-buffer
+    (insert gnome-c-test-program-2)
+    (c-mode)
+    (let (gnome-c-align-max-column)
+      (gnome-c-align-guess-columns (point-min) (point-max)))
+    (should (= gnome-c-align-identifier-start-column 24))
+    (should (= gnome-c-align-arglist-start-column 56))
+    (should (= gnome-c-align-arglist-identifier-start-column 80))))
+
+(ert-deftest gnome-c-test-align-guess-columns-2 ()
+  "Tests the `gnome-c-align-guess-columns'."
+  (with-temp-buffer
+    (insert gnome-c-test-program-3)
+    (c-mode)
+    (let (gnome-c-align-max-column)
+      (gnome-c-align-guess-columns (point-min) (point-max)))
+    (should (= gnome-c-align-identifier-start-column 13))
+    (should (= gnome-c-align-arglist-start-column 40))
+    (should (= gnome-c-align-arglist-identifier-start-column 57))))
+
+(ert-deftest gnome-c-test-snippet-guess-name-from-declaration ()
+  "Tests the `gnome-c-snippet--guess-name-from-declaration'."
+  (with-temp-buffer
+    (insert gnome-c-test-program-7)
+    (c-mode)
+    (setq buffer-file-name "gpgme-glib.h")
+    (let ((package (gnome-c-snippet--guess-name-from-declaration 'package))
+         (class (gnome-c-snippet--guess-name-from-declaration 'class))
+         (parent-package
+          (gnome-c-snippet--guess-name-from-declaration 'parent-package))
+         (parent-class
+          (gnome-c-snippet--guess-name-from-declaration 'parent-class)))
+      (should (equal package '("G" "Gpg")))
+      (should (equal class '("Engine" "Info")))
+      (should (equal parent-package '("G")))
+      (should (equal parent-class '("Object"))))))
+
+(ert-deftest gnome-c-test-snippet-guess-name-from-declaration-2 ()
+  "Tests the `gnome-c-snippet--guess-name-from-declaration'."
+  (let (buffer)
+    (unwind-protect
+       (progn
+         (setq buffer (generate-new-buffer "header"))
+         (with-current-buffer buffer
+           (insert gnome-c-test-program-7)
+           (c-mode)
+           (setq buffer-file-name "gpgme-glib.h"))
+         (with-temp-buffer
+           (c-mode)
+           (setq buffer-file-name "gpgme-glib.c")
+           (let ((package
+                  (gnome-c-snippet--guess-name-from-declaration 'package))
+                 (class
+                  (gnome-c-snippet--guess-name-from-declaration 'class))
+                 (parent-package
+                  (gnome-c-snippet--guess-name-from-declaration
+                   'parent-package))
+                 (parent-class
+                  (gnome-c-snippet--guess-name-from-declaration
+                   'parent-class)))
+             (should (equal package '("G" "Gpg")))
+             (should (equal class '("Engine" "Info")))
+             (should (equal parent-package '("G")))
+             (should (equal parent-class '("Object"))))))
+      (kill-buffer buffer))))
+
+(ert-deftest gnome-c-test-snippet-guess-name-from-file-name ()
+  "Tests the `gnome-c-snippet--guess-name-from-file-name'"
+  (with-temp-buffer
+    (c-mode)
+    (setq buffer-file-name "g-gpg-engine-info.c")
+    (let ((package
+          (gnome-c-snippet--guess-name-from-file-name 'package))
+         (class
+          (gnome-c-snippet--guess-name-from-file-name 'class))
+         (parent-package
+          (gnome-c-snippet--guess-name-from-file-name 'parent-package))
+         (parent-class
+          (gnome-c-snippet--guess-name-from-file-name 'parent-class)))
+      (should (equal package '("G")))
+      (should (equal class '("Gpg" "Engine" "Info")))
+      (should (equal parent-package nil))
+      (should (equal parent-class nil)))))
diff --git a/packages/gnorb/gnorb-bbdb.el b/packages/gnorb/gnorb-bbdb.el
index eb2f6eb..306ea01 100644
--- a/packages/gnorb/gnorb-bbdb.el
+++ b/packages/gnorb/gnorb-bbdb.el
@@ -255,24 +255,34 @@ is non-nil (as in interactive calls) be verbose."
        (unless (fboundp field)
          ;; what's the record's existing value for this field?
          (setq rec-val (bbdb-record-field r field)))
-       (when (cond
-              ((eq field 'address)
-               (dolist (a rec-val)
-                 (unless (and label
-                              (not (string-match label (car a))))
-                   (string-match val (bbdb-format-address-default a)))))
-              ((eq field 'phone)
-               (dolist (p rec-val)
-                 (unless (and label
-                              (not (string-match label (car p))))
-                   (string-match val (bbdb-phone-string p)))))
-              ((consp rec-val)
-               (dolist (f rec-val)
-                 (string-match val f)))
-              ((fboundp field)
-               (funcall field r))
-              ((stringp rec-val)
-               (string-match val rec-val)))
+       (when (catch 'match
+               (cond
+                ((eq field 'address)
+                 (dolist (a rec-val)
+                   (unless (and label
+                                (not (string-match label (car a))))
+                     (when
+                         (string-match-p
+                          val
+                          (bbdb-format-address-default a))
+                       (throw 'match t)))))
+                ((eq field 'phone)
+                 (dolist (p rec-val)
+                   (unless (and label
+                                (not (string-match label (car p))))
+                     (when
+                         (string-match-p val (bbdb-phone-string p))
+                       (throw 'match t)))))
+                ((consp rec-val)
+                 (dolist (f rec-val)
+                   (when (string-match-p val f)
+                     (throw 'match t))))
+                ((fboundp field)
+                 (when (string-match-p (funcall field r))
+                   (throw 'match t)))
+                ((stringp rec-val)
+                 (when (string-match-p val rec-val)
+                   (throw 'match t)))))
          ;; there are matches, run through the field setters in last
          ;; element of the sexp
          (dolist (attribute style)
diff --git a/packages/gnorb/gnorb-org.el b/packages/gnorb/gnorb-org.el
index 78d636b..34cd803 100644
--- a/packages/gnorb/gnorb-org.el
+++ b/packages/gnorb/gnorb-org.el
@@ -177,9 +177,10 @@ we came from."
                   strings)
                  ((numberp gnorb-org-mail-scan-scope)
                   (cl-subseq
-                   strings 0 (min
-                              (length strings)
-                              (1+ gnorb-org-mail-scan-scope))))
+                   (nreverse strings)
+                   0 (min
+                      (length strings)
+                      (1+ gnorb-org-mail-scan-scope))))
                  ;; We could provide more options here. 'tree vs
                  ;; 'subtree, for instance.
                  (t
@@ -302,7 +303,7 @@ headings."
   ;; insert text, if any
   (when text
     (message-goto-body)
-    (insert"\n")
+    (insert "\n")
     (if (bufferp text)
        (insert-buffer-substring text)
       (insert text)))
@@ -502,13 +503,17 @@ default set of parameters."
   ;; got too much hard-coded stuff.
   (interactive "P")
   (org-back-to-heading t)
-  (let* ((backend-string
+  (let* ((bkend-var
+         (if (boundp 'org-export--registered-backends)
+             org-export--registered-backends
+           org-export-registered-backends))
+        (backend-string
          (org-completing-read
           "Export backend: "
           (mapcar (lambda (b)
                     (symbol-name (org-export-backend-name b)))
-                  org-export--registered-backends)
-           nil t))
+                  bkend-var)
+          nil t))
         (backend-symbol (intern backend-string))
         (f-or-t (org-completing-read "Export as file or text? "
                                      '("file" "text") nil t))
@@ -531,8 +536,6 @@ default set of parameters."
                     ,@opts
                     ,gnorb-org-email-subtree-file-parameters))))
         text file)
-    (setq gnorb-window-conf (current-window-configuration))
-    (move-marker gnorb-return-marker (point))
     (if (bufferp result)
        (setq text result)
       (setq file result))
diff --git a/packages/gnorb/gnorb-registry.el b/packages/gnorb/gnorb-registry.el
index bcd5adc..9220565 100644
--- a/packages/gnorb/gnorb-registry.el
+++ b/packages/gnorb/gnorb-registry.el
@@ -235,7 +235,9 @@ number of tracked messages, the number of tracked headings, 
and how much of the
   (let ((messages (length (gnorb-registry-tracked-messages)))
        (headings (length (gnorb-registry-tracked-headings)))
        (reg-size (registry-size gnus-registry-db))
-       (reg-max-size (oref gnus-registry-db max-size)))
+       (reg-max-size (if (slot-exists-p gnus-registry-db 'max-size)
+                         (oref gnus-registry-db max-size)
+                       (oref gnus-registry-db max-hard))))
     (with-current-buffer "*Gnorb Usage*"
       (let ((inhibit-read-only t))
        (erase-buffer)
diff --git a/packages/gnorb/gnorb-utils.el b/packages/gnorb/gnorb-utils.el
index d7f5e86..4d473f1 100644
--- a/packages/gnorb/gnorb-utils.el
+++ b/packages/gnorb/gnorb-utils.el
@@ -334,24 +334,27 @@ agenda. Then let the user choose an action from the value 
of
   "Return pretty outline path of the Org heading indicated by ID.
 
 If the KW argument is true, add the TODO keyword into the path."
-  (org-with-point-at (org-id-find id t)
-    (let ((el (org-element-at-point)))
-      (concat
-       (if kw
-          (format "(%s): "
-                  (org-element-property :todo-keyword el))
-        "")
-       (org-format-outline-path
-       (append
-        (list
-         (file-name-nondirectory
-          (buffer-file-name
-           (org-base-buffer (current-buffer)))))
-        (org-get-outline-path)
-        (list
-         (replace-regexp-in-string
-          org-bracket-link-regexp
-          "\\3" (org-element-property :raw-value el)))))))))
+  (let ((pt (org-id-find id t)))
+    (if pt
+       (org-with-point-at pt
+         (let ((el (org-element-at-point)))
+           (concat
+            (if kw
+                (format "(%s): "
+                        (org-element-property :todo-keyword el))
+              "")
+            (org-format-outline-path
+             (append
+              (list
+               (file-name-nondirectory
+                (buffer-file-name
+                 (org-base-buffer (current-buffer)))))
+              (org-get-outline-path)
+              (list
+               (replace-regexp-in-string
+                org-bracket-link-regexp
+                "\\3" (org-element-property :raw-value el))))))))
+      "[none]")))
 
 (defun gnorb-scan-links (bound &rest types)
   "Scan from point to BOUND looking for links of type in TYPES.
diff --git a/packages/gnorb/gnorb.el b/packages/gnorb/gnorb.el
index d2800f0..d7e9289 100644
--- a/packages/gnorb/gnorb.el
+++ b/packages/gnorb/gnorb.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014  Free Software Foundation, Inc.
 
-;; Version: 1.1.1
+;; Version: 1.1.2
 ;; Package-Requires: ((cl-lib "0.5"))
 
 ;; Maintainer: Eric Abrahamsen <address@hidden>
diff --git a/packages/gnorb/nngnorb.el b/packages/gnorb/nngnorb.el
index 9d03e14..bb0ddfd 100644
--- a/packages/gnorb/nngnorb.el
+++ b/packages/gnorb/nngnorb.el
@@ -183,7 +183,7 @@ continue to provide tracking of sent messages."
        ;; this summary buffer.
        (buffer-local-value
         'nngnorb-attachment-file-list
-         (get-buffer nnir-tmp-buffer))))
+         (get-buffer-create nnir-tmp-buffer))))
 
 (define-key gnorb-summary-minor-mode-map
   [remap gnus-summary-exit]
diff --git a/packages/html5-schema/.htaccess b/packages/html5-schema/.htaccess
new file mode 100644
index 0000000..8727307
--- /dev/null
+++ b/packages/html5-schema/.htaccess
@@ -0,0 +1,10 @@
+AddDescription "RelaxNG Schema for HTML 5 Core (XML)" xhtml5core.rnc
+AddDescription "RelaxNG Schema for HTML 5 Core (HTML)" html5core.rnc
+AddDescription "RelaxNG Schema for HTML 5 Exclusions" html5exclusions.rnc
+
+AddDescription "RelaxNG Schema for HTML 5: Common Definitions" common.rnc
+AddDescription "RelaxNG Schema for HTML 5: Global Structure & Meta Data" 
meta.rnc
+AddDescription "RelaxNG Schema for HTML 5: (Inline) Phrase Markup" phrase.rnc
+AddDescription "RelaxNG Schema for HTML 5: Basic Block Markup" block.rnc
+AddDescription "Schema Testing Scripts and Instances" tests
+
diff --git a/packages/html5-schema/LICENSE b/packages/html5-schema/LICENSE
new file mode 100644
index 0000000..0a2a5e0
--- /dev/null
+++ b/packages/html5-schema/LICENSE
@@ -0,0 +1,23 @@
+The RELAX NG Schema for (X)HTML 5 is licensed under the MIT open source 
license.
+The following legal notice applies to all files in this directory:
+
+Copyright (c) 2005-2007 Elika J. Etemad (fantasai) and Henri Sivonen (hsivonen)
+Copyright (c) 2007-2012 Mozilla Foundation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/packages/html5-schema/applications.rnc 
b/packages/html5-schema/applications.rnc
new file mode 100644
index 0000000..618814d
--- /dev/null
+++ b/packages/html5-schema/applications.rnc
@@ -0,0 +1,405 @@
+datatypes w = "http://whattf.org/datatype-draft";
+
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Web Application Features              #
+# #####################################################################
+
+## Additions to Common Attributes
+
+       common.attrs.interact &=
+               (       common.attrs.contextmenu?
+               &       common.attrs.contenteditable?
+               &       common.attrs.draggable?
+               &       common.attrs.dropzone?
+               &       common.attrs.hidden?
+               &       common.attrs.spellcheck?
+               )
+               
+       common.attrs.other &= common.attrs.interact
+
+## Context Menu: contextmenu
+
+       common.attrs.contextmenu =
+               attribute contextmenu {
+                       common.data.idref
+               }
+
+## Editable Content: contenteditable
+
+       common.attrs.contenteditable =
+               attribute contenteditable {
+                       w:string "true" | w:string "false" | w:string ""
+               }
+
+## Draggable Element: draggable
+
+       common.attrs.draggable =
+               attribute draggable {
+                       w:string "true" | w:string "false"
+               }
+
+## Dropzone: dropzone
+
+       common.attrs.dropzone =
+               attribute dropzone {
+                       list {
+                               (       xsd:string { pattern = 
"[sS][tT][rR][iI][nN][gG]:.+" }
+                               |       xsd:string { pattern = 
"[fF][iI][lL][eE]:.+" }
+                               )*
+                               ,
+                               (       w:string "copy"
+                               |       w:string "move"
+                               |       w:string "link"
+                               )?
+                               ,
+                               (       xsd:string { pattern = 
"[sS][tT][rR][iI][nN][gG]:.+" }
+                               |       xsd:string { pattern = 
"[fF][iI][lL][eE]:.+" }
+                               )*
+                       }
+               }
+
+## Hidden Element: hidden
+
+       common.attrs.hidden =
+               attribute hidden {
+                       w:string "hidden" | w:string ""
+               }
+
+## Spellchecking and grammar checking: spellcheck
+
+       common.attrs.spellcheck =
+               attribute spellcheck{
+                       w:string "true" | w:string "false" | w:string ""
+               }
+
+## Application Cache: manifest
+
+       html.attrs.manifest =
+               attribute manifest {
+                       common.data.uri.non-empty
+               }
+               
+       html.attrs &= html.attrs.manifest?
+
+## Progess Indicator: <progress>
+
+       progress.elem =
+               element progress { progress.inner & progress.attrs }
+       progress.attrs =
+               (       common.attrs
+               &       progress.attrs.value?
+               &       progress.attrs.max?
+               &       (       common.attrs.aria.implicit.progressbar
+                       |       common.attrs.aria.role.progressbar
+                       )?
+               )
+               progress.attrs.value =
+                       attribute value {
+                               common.data.float.non-negative
+                       }
+               progress.attrs.max =
+                       attribute max {
+                               common.data.float.positive
+                       }
+       progress.inner =
+               ( common.inner.phrasing ) #Cannot enforce textContent format 
here
+
+       common.elem.phrasing |= progress.elem
+
+## Dialog box, inspector, or window: <dialog>
+       dialog.elem =
+               element dialog { dialog.inner & dialog.attrs }
+       dialog.attrs =
+               (       common.attrs
+               &       dialog.attrs.open?
+               &       (       common.attrs.aria.implicit.dialog
+                       |       common.attrs.aria.role.alert
+                       |       common.attrs.aria.role.alertdialog
+                       |       common.attrs.aria.role.contentinfo
+                       |       common.attrs.aria.role.dialog
+                       |       common.attrs.aria.role.log
+                       |       common.attrs.aria.role.marquee
+                       |       common.attrs.aria.role.region
+                       |       common.attrs.aria.role.status
+                       |       common.attrs.aria.landmark.application
+                       |       common.attrs.aria.landmark.document
+                       |       common.attrs.aria.landmark.main
+                       |       common.attrs.aria.landmark.search
+                       )?
+               )
+               dialog.attrs.open =
+                       attribute open {
+                               w:string "open" | w:string ""
+                       }
+       dialog.inner =
+               ( common.inner.flow )
+       common.elem.flow |= dialog.elem
+
+## Toolbar: <menu type=toolbar>
+
+       menu.toolbar.elem =
+               element menu { menu.toolbar.inner & menu.toolbar.attrs }
+       menu.toolbar.attrs =
+               (       common.attrs
+               &       menu.toolbar.attrs.type?
+               &       (       common.attrs.aria.implicit.toolbar
+                       |       common.attrs.aria.role.directory
+                       |       common.attrs.aria.role.list
+                       |       common.attrs.aria.role.listbox
+                       |       common.attrs.aria.role.menu
+                       |       common.attrs.aria.role.menubar
+                       |       common.attrs.aria.role.tablist
+                       |       common.attrs.aria.role.toolbar
+                       |       common.attrs.aria.role.tree
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+               menu.toolbar.attrs.type =
+                       attribute type {
+                               w:string "toolbar"
+                       }
+       menu.toolbar.inner =
+               (       mli.elem*
+               |       common.inner.flow
+               )
+       menu.elem |= menu.toolbar.elem
+       
+## Toolbar item: <li>
+
+       mli.elem =
+               element li { mli.inner & mli.attrs }
+       mli.attrs =
+               (       common.attrs
+               &       (       (       common.attrs.aria.role.listitem
+                               |       common.attrs.aria.role.menuitem
+                               |       common.attrs.aria.role.menuitemcheckbox
+                               |       common.attrs.aria.role.menuitemradio
+                               |       common.attrs.aria.role.option
+                               |       common.attrs.aria.role.tab
+                               |       common.attrs.aria.role.treeitem
+                               |       common.attrs.aria.role.presentation
+                               )
+                       )?
+               )
+       mli.inner =
+               ( common.inner.flow )
+
+## Popup menu: <menu type=popup>
+
+       menu.popup.elem =
+               element menu { menu.popup.inner & menu.popup.attrs }
+       menu.popup.attrs =
+               (       common.attrs
+               &       menu.popup.attrs.type?
+               &       menu.attrs.label?
+               &       common.attrs.aria?
+               )
+               menu.popup.attrs.type =
+                       attribute type {
+                               w:string "popup"
+                       }
+               menu.attrs.label =
+                       attribute label {
+                               string
+                       }
+       menu.popup.inner =
+               (       menuitem.elem*
+               &       hr.elem*
+               &       menu.popup.elem*
+               &       common.elem.script-supporting*
+               )
+       menu.elem |= menu.popup.elem
+
+## Ambiguous menu: <menu> (with no "type" attribute)
+       menu.ambiguous.elem =
+               element menu { menu.ambiguous.inner & menu.ambiguous.attrs }
+       menu.ambiguous.attrs =
+               (       common.attrs
+               &       menu.attrs.label?
+               &       common.attrs.aria?
+               )
+       menu.ambiguous.inner =
+               (       (       menuitem.elem*
+                       &       hr.elem*
+                       &       menu.ambiguous.elem*
+                       &       common.elem.script-supporting*
+                       )
+               |       (       mli.elem*
+                       |       common.inner.flow
+                       )
+               )
+       menu.elem |= menu.ambiguous.elem
+
+       common.elem.flow |= menu.elem
+       # REVISIT allow nested menus
+
+## Explicit command in popup menu: <menuitem type=command>
+       menuitem.explicit.command.elem =
+               element menuitem { menuitem.inner & 
menuitem.explicit.command.attrs }
+       menuitem.explicit.command.attrs =
+               (       common.attrs
+               &       menuitem.explicit.command.attrs.type?
+               &       menuitem.attrs.label?
+               &       menuitem.attrs.icon?
+               &       menuitem.attrs.disabled?
+               &       menuitem.attrs.default?
+               &       common.attrs.aria?
+               )
+               menuitem.explicit.command.attrs.type =
+                       attribute type {
+                               w:string "command"
+                       }
+               menuitem.attrs.label =
+                       attribute label {
+                               w:non-empty-string
+                       }
+               menuitem.attrs.icon =
+                       attribute icon {
+                               common.data.uri.non-empty
+                       }
+               menuitem.attrs.disabled =
+                       attribute disabled {
+                               w:string "" | w:string "disabled"
+                       }
+               menuitem.attrs.default =
+                       attribute default {
+                               w:string "" | w:string "default"
+                       }
+       menuitem.elem |= menuitem.explicit.command.elem
+
+## Checkbox in popup menu: <menuitem type=checkbox>
+       menuitem.checkbox.elem =
+               element menuitem { menuitem.inner & menuitem.checkbox.attrs }
+       menuitem.checkbox.attrs =
+               (       common.attrs
+               &       menuitem.checkbox.attrs.type
+               &       menuitem.attrs.label?
+               &       menuitem.attrs.icon?
+               &       menuitem.attrs.disabled?
+               &       menuitem.attrs.checked?
+               &       menuitem.attrs.radiogroup?
+               &       menuitem.attrs.default?
+               &       common.attrs.aria?
+               )
+               menuitem.checkbox.attrs.type =
+                       attribute type {
+                               w:string "checkbox"
+                       }
+               menuitem.attrs.checked =
+                       attribute checked {
+                               w:string "checked" | w:string ""
+                       }
+               menuitem.attrs.radiogroup =
+                       attribute radiogroup {
+                               string
+                       }
+       menuitem.elem |= menuitem.checkbox.elem
+
+## Radio button in popup menu: <menuitem type=radio>
+       menuitem.radio.elem =
+               element menuitem { menuitem.inner & menuitem.radio.attrs }
+       menuitem.radio.attrs =
+               (       common.attrs
+               &       menuitem.radio.attrs.type
+               &       menuitem.attrs.label?
+               &       menuitem.attrs.icon?
+               &       menuitem.attrs.disabled?
+               &       menuitem.attrs.checked?
+               &       menuitem.attrs.radiogroup?
+               &       menuitem.attrs.default?
+               &       common.attrs.aria?
+               )
+               menuitem.radio.attrs.type =
+                       attribute type {
+                               w:string "radio"
+                       }
+       menuitem.elem |= menuitem.radio.elem
+
+## Indirect command in popup menu: <menuitem command>
+       menuitem.indirect.command.elem =
+               element menuitem { menuitem.inner & 
menuitem.indirect.command.attrs }
+       menuitem.indirect.command.attrs =
+               (       common.attrs
+               &       menuitem.attrs.default?
+               &       menuitem.attrs.command
+               &       common.attrs.aria?
+               )
+               menuitem.attrs.command =
+                       attribute command {
+                               common.data.idref
+                       }
+       menuitem.elem |= menuitem.indirect.command.elem
+
+       menuitem.inner =
+               ( empty )
+
+## Canvas for Dynamic Graphics: <canvas>
+
+       canvas.elem.flow =
+               element canvas { canvas.inner.flow & canvas.attrs }
+       canvas.elem.phrasing =
+               element canvas { canvas.inner.phrasing & canvas.attrs }
+       canvas.attrs =
+               (       common.attrs
+               &       canvas.attrs.height?
+               &       canvas.attrs.width?
+               &       common.attrs.aria?
+               )
+               canvas.attrs.height =
+                       attribute height {
+                               common.data.integer.non-negative
+                       }
+               canvas.attrs.width =
+                       attribute width {
+                               common.data.integer.non-negative
+                       }
+       canvas.inner.flow =
+               ( common.inner.transparent.flow )
+       canvas.inner.phrasing =
+               ( common.inner.phrasing )
+       
+       common.elem.flow |= canvas.elem.flow
+       common.elem.phrasing |= canvas.elem.phrasing
+
+## Additional On-Demand Information: <details>
+
+       details.elem =
+               element details { details.inner & details.attrs }
+       details.attrs =
+               (       common.attrs
+               &       details.attrs.open?
+               &       (       common.attrs.aria.implicit.group # 
aria-expanded must be true if open attr present; check by assertions
+                       |       common.attrs.aria.role.group
+                       )?
+               )
+               details.attrs.open =
+                       attribute open {
+                               w:string "open" | w:string ""
+                       }
+       details.inner =
+               (       summary.elem
+               ,       common.inner.flow
+               )
+       
+       common.elem.flow |= details.elem
+
+## Caption/summary for details element: <summary>
+
+       summary.elem =
+               element summary { summary.inner & summary.attrs }
+       summary.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.implicit.button
+                       |       common.attrs.aria.role.button
+                       )?
+               )
+       summary.inner =
+               (       common.inner.phrasing
+               |       h1.elem
+               |       h2.elem
+               |       h3.elem
+               |       h4.elem
+               |       h5.elem
+               |       h6.elem
+               |       hgroup.elem
+               )
diff --git a/packages/html5-schema/aria.rnc b/packages/html5-schema/aria.rnc
new file mode 100644
index 0000000..61e007b
--- /dev/null
+++ b/packages/html5-schema/aria.rnc
@@ -0,0 +1,1251 @@
+# #####################################################################
+##     RELAX NG Schema for HTML 5: Accessible Rich Internet Applications #
+# #####################################################################
+#
+# history: http://hsivonen.iki.fi/aria-html5-bis/
+
+# #####################################################################
+## ARIA
+
+## Global states and properties
+
+aria.global = 
+       (       aria.prop.atomic?
+       &       aria.state.busy?
+       &       aria.prop.controls?
+       &       aria.prop.describedby?
+       &       aria.state.disabled?
+       &       aria.state.dropeffect?
+       &       aria.prop.flowto?
+       &       aria.state.grabbed?
+       &       aria.prop.haspopup?
+       &       aria.state.hidden?
+       &       aria.state.invalid?
+       &       aria.prop.label?
+       &       aria.prop.labelledby?
+       &       aria.prop.live?
+       &       aria.prop.owns?
+       &       aria.prop.relevant?
+       )
+
+common.attrs.other &= aria.global?
+
+## States and Properties for Native Roles
+
+common.attrs.aria.implicit.button |=
+       (       aria.state.expanded?
+       &       aria.state.pressed?
+       )
+
+common.attrs.aria.implicit.checkbox |=
+       (       aria.state.checked? )
+
+common.attrs.aria.implicit.combobox |=
+       (       aria.state.expanded?
+       &       aria.prop.autocomplete?
+       &       aria.prop.required?
+       &       aria.prop.activedescendant?
+       )
+
+common.attrs.aria.implicit.dialog |=
+       (       aria.state.expanded? )
+
+common.attrs.aria.implicit.document |=
+       (       aria.state.expanded? )
+
+common.attrs.aria.implicit.form |=
+       (       aria.state.expanded? )
+
+common.attrs.aria.implicit.group |=
+       (       aria.state.expanded?
+       &       aria.prop.activedescendant?
+       )
+
+common.attrs.aria.implicit.heading |=
+       (       aria.state.expanded?
+       &       aria.prop.level?
+       )
+
+common.attrs.aria.implicit.img |=
+       (       aria.state.expanded? )
+
+common.attrs.aria.implicit.link |=
+       (       aria.state.expanded? )
+
+common.attrs.aria.implicit.listbox |=
+       (       aria.prop.multiselectable?
+       &       aria.prop.required?
+       &       aria.prop.activedescendant?
+       &       aria.state.expanded?
+       )
+
+common.attrs.aria.implicit.listitem |=
+       (       aria.prop.level?
+       &       aria.prop.posinset?
+       &       aria.prop.setsize?
+       &       aria.state.expanded?
+       )
+
+common.attrs.aria.implicit.option |=
+       (       aria.prop.posinset?
+       &       aria.prop.setsize?
+       &       aria.state.checked?
+       &       aria.state.selected?
+       )
+
+common.attrs.aria.implicit.progressbar |=
+       (       aria.prop.valuemax?
+       &       aria.prop.valuemin?
+       &       aria.prop.valuenow?
+       &       aria.prop.valuetext?
+       )
+
+common.attrs.aria.implicit.radio |=
+       (       aria.prop.posinset?
+       &       aria.prop.setsize?
+       &       aria.state.checked?
+       &       aria.state.selected?
+       )
+
+common.attrs.aria.implicit.slider |=
+       (       aria.prop.valuemax?
+       &       aria.prop.valuemin?
+       &       aria.prop.valuenow?
+       &       aria.prop.valuetext?
+       &       aria.prop.orientation?
+       )
+
+common.attrs.aria.implicit.spinbutton |=
+       (       aria.prop.valuemax?
+       &       aria.prop.valuemin?
+       &       aria.prop.valuenow?
+       &       aria.prop.valuetext?
+       &       aria.prop.required?
+       )
+
+common.attrs.aria.implicit.textbox |=
+       (       aria.prop.activedescendant?
+       &       aria.prop.autocomplete?
+       &       aria.prop.multiline?
+       &       aria.prop.readonly?
+       &       aria.prop.required?
+       )
+
+common.attrs.aria.implicit.toolbar |=
+       (       aria.state.expanded?
+       &       aria.prop.activedescendant?
+       )
+
+common.attrs.aria.implicit.column-or-row-header |=
+       (       aria.prop.sort?
+       &       aria.prop.readonly?
+       &       aria.prop.required?
+       &       aria.state.selected?
+       &       aria.state.expanded?
+       )
+
+#common.attrs.aria.implicit.select |=
+#              (       aria.state.invalid?
+#      &       aria.prop.required?
+#      &       aria.prop.atomic?
+#      &       aria.state.busy?
+#      &       aria.prop.channel?
+#      &       aria.prop.controls?
+#      &       aria.prop.live?
+#      &       aria.prop.relevant?
+#      )
+
+# section
+#   |
+#   |_ region
+#        |
+#        |_ article
+#        |
+#        |_ landmark
+#        |     |_ banner
+#        |     |_ complementary
+#        |     |_ contentinfo
+#        |     |_ main
+#        |     |_ navigation
+#        |
+#        |_ list
+#        |
+#        |_ status
+
+common.attrs.aria.implicit.section |=
+       ( aria.state.expanded? )
+
+common.attrs.aria.implicit.region |= common.attrs.aria.implicit.section
+
+common.attrs.aria.implicit.article |= common.attrs.aria.implicit.region
+common.attrs.aria.implicit.landmark |= common.attrs.aria.implicit.region
+common.attrs.aria.implicit.list |= common.attrs.aria.implicit.region
+common.attrs.aria.implicit.status |= common.attrs.aria.implicit.region
+
+common.attrs.aria.implicit.banner |= common.attrs.aria.implicit.landmark
+common.attrs.aria.implicit.complementary |= common.attrs.aria.implicit.landmark
+common.attrs.aria.implicit.contentinfo |= common.attrs.aria.implicit.landmark
+common.attrs.aria.implicit.main |= common.attrs.aria.implicit.landmark
+common.attrs.aria.implicit.navigation |= common.attrs.aria.implicit.landmark
+
+# #####################################################################
+## States
+
+## busy
+       aria.state.busy =
+               attribute aria-busy 
+                       {       string "true"
+                       |       string "false" #default
+                       }
+
+## checked
+       aria.state.checked =
+               attribute aria-checked 
+                       {       string "true"
+                       |       string "false"
+                       |       string "mixed"
+                       |       string "undefined" #default
+                       }
+
+## disabled
+       aria.state.disabled =
+               attribute aria-disabled 
+                       {       string "true"
+                       |       string "false" #default
+                       }
+
+## dropeffect
+       aria.state.dropeffect =
+               attribute aria-dropeffect
+                       {       token "none" #default
+                       | token "popup"
+                       | token "execute"
+                       |       list 
+                               {       ( string "copy" )
+                               ,       ( string "execute" )?
+                               }
+                       |       list 
+                               {       ( string "move" )
+                               ,       ( string "execute" )?
+                               }
+                       |       list 
+                               {       ( string "link" )
+                               ,       ( string "execute" )?
+                               }
+                       |       list 
+                               {       ( string "execute" )
+                               ,       ( string "copy" )
+                               }
+                       |       list 
+                               {       ( string "execute" )
+                               ,       ( string "move" )
+                               }
+                       |       list 
+                               {       ( string "execute" )
+                               ,       ( string "link" )
+                               }
+                       }
+
+## expanded
+       aria.state.expanded =
+               attribute aria-expanded 
+                       {       string "true"
+                       |       string "false"
+                       |       string "undefined" #default
+                       }
+
+## grabbed
+       aria.state.grabbed =
+               attribute aria-grabbed 
+                       {       string "true"
+                       |       string "false"
+                       |       string "undefined" #default
+                       }
+
+## hidden
+       aria.state.hidden =
+               attribute aria-hidden 
+                       {       string "true"
+                       |       string "false" #default
+                       }
+
+## invalid
+       aria.state.invalid =
+               attribute aria-invalid 
+                       {       string "true"
+                       |       string "false" #default
+                       |       string "grammar"
+                       |       string "spelling"
+                       }
+
+## pressed
+       aria.state.pressed =
+               attribute aria-pressed 
+                       {       string "true"
+                       |       string "false"
+                       |       string "mixed"
+                       |       string "undefined" #default
+                       }
+
+## selected
+       aria.state.selected =
+               attribute aria-selected 
+                       {       string "true"
+                       |       string "false"
+                       |       string "undefined" #default
+                       }
+
+
+
+# #####################################################################
+## Properties
+
+## activedescendant
+       aria.prop.activedescendant =
+               attribute aria-activedescendant {
+                       common.data.idref #REVISIT add Schematron check
+               }
+
+## atomic
+       aria.prop.atomic =
+               attribute aria-atomic
+                       {       string "true"
+                       |       string "false" #default
+                       }       
+
+## autocomplete
+       aria.prop.autocomplete =
+               attribute aria-autocomplete
+                       {       string "inline"
+                       |       string "list"
+                       |       string "both"
+                       |       string "none" #default
+                       }
+
+## controls
+       aria.prop.controls =
+               attribute aria-controls {
+                       common.data.idrefs #REVISIT add Schematron check
+               }
+
+## describedby
+       aria.prop.describedby =
+               attribute aria-describedby {
+                       common.data.idrefs #REVISIT add Schematron check
+               }
+
+## flowto
+       aria.prop.flowto =
+               attribute aria-flowto {
+                       common.data.idrefs #REVISIT add Schematron check
+               }
+
+## haspopup
+       aria.prop.haspopup =
+               attribute aria-haspopup
+                       {       string "true" #REVISIT check owns or descendant
+                       |       string "false" #default
+                       }       
+
+## label
+       aria.prop.label =
+               attribute aria-label {
+                       string
+               }
+
+## labelledby
+       aria.prop.labelledby =
+               attribute aria-labelledby {
+                       common.data.idrefs #REVISIT add Schematron check
+               }
+
+## level
+       aria.prop.level =
+               attribute aria-level {
+                       common.data.integer.positive
+               }
+
+## live
+       aria.prop.live =
+               attribute aria-live
+                       {       string "off" #default
+                       |       string "polite"
+                       |       string "assertive"
+                       }       
+
+## multiline
+       aria.prop.multiline =
+               attribute aria-multiline
+                       {       string "true"
+                       |       string "false" #default
+                       }       
+
+## multiselectable
+       aria.prop.multiselectable =
+               attribute aria-multiselectable
+                       {       string "true"
+                       |       string "false" #default
+                       }       
+
+## orientation
+       aria.prop.orientation =
+               attribute aria-orientation
+                       {       string "vertical"
+                       |       string "horizontal" #default
+                       }
+
+## owns
+       aria.prop.owns =
+               attribute aria-owns {
+                       common.data.idrefs #REVISIT add Schematron check
+               }
+
+## posinset
+       aria.prop.posinset =
+               attribute aria-posinset {
+                       common.data.integer.positive
+               }
+
+## readonly
+       aria.prop.readonly =
+               attribute aria-readonly
+                       {       string "true"
+                       |       string "false" #default
+                       }       
+       common.attrs.aria.prop.readonly |= aria.prop.readonly
+
+## relevant
+       aria.prop.relevant =
+               attribute aria-relevant
+                       {       token "all"
+                       |       list 
+                               {       ( string "additions" )
+                               ,       ( string "removals" )?
+                               ,       ( string "text" )?
+                               }
+                       |       list 
+                               {       ( string "additions" )
+                               ,       ( string "text" )?
+                               ,       ( string "removals" )?
+                               }
+                       |       list 
+                               {       ( string "removals" )
+                               ,       ( string "additions" )?
+                               ,       ( string "text" )?
+                               }
+                       |       list 
+                               {       ( string "removals" )
+                               ,       ( string "text" )?
+                               ,       ( string "additions" )?
+                               }
+                       |       list 
+                               {       ( string "text" )
+                               ,       ( string "additions" )?
+                               ,       ( string "removals" )?
+                               }
+                       |       list 
+                               {       ( string "text" )
+                               ,       ( string "removals" )?
+                               ,       ( string "additions" )?
+                               }
+                       }       
+
+## required
+       aria.prop.required =
+               attribute aria-required
+                       {       string "true"
+                       |       string "false" #default
+                       }       
+
+## setsize
+       aria.prop.setsize =
+               attribute aria-setsize {
+                       common.data.integer.non-negative
+               }
+
+## sort
+       aria.prop.sort =
+               attribute aria-sort
+                       {       string "ascending"
+                       |       string "descending"
+                       |       string "none" #default
+                       |       string "other"
+                       }       
+
+## valuemax
+       aria.prop.valuemax =
+               attribute aria-valuemax {
+                       common.data.float #REVISIT
+               }
+
+## valuemin
+       aria.prop.valuemin =
+               attribute aria-valuemin {
+                       common.data.float #REVISIT
+               }
+
+## valuenow
+       aria.prop.valuenow =
+               attribute aria-valuenow {
+                       common.data.float #REVISIT
+               }
+
+## valuetext
+       aria.prop.valuetext =
+               attribute aria-valuetext {
+                       string
+               }
+
+# #####################################################################
+## Roles
+
+## alert
+       aria.alert =
+               (       aria.role.alert
+               &       aria.state.expanded? 
+               )
+               aria.role.alert = 
+                       attribute role { string "alert" }
+       
+       common.attrs.aria |= aria.alert
+       common.attrs.aria.role.alert |= aria.alert
+
+## alertdialog
+       aria.alertdialog =
+               (       aria.role.alertdialog
+               &       aria.state.expanded?
+               )
+               aria.role.alertdialog = 
+                       attribute role { string "alertdialog" }
+       
+       common.attrs.aria |= aria.alertdialog
+       common.attrs.aria.role.alertdialog |= aria.alertdialog
+
+## application
+       aria.application =
+               (       aria.role.application
+               &       aria.state.expanded?
+               )
+               aria.role.application = 
+                       attribute role { string "application" }
+
+       common.attrs.aria |= aria.application
+       common.attrs.aria.landmark.application |= aria.application
+
+## article
+       aria.article =
+               (       aria.role.article
+               &       aria.state.expanded?
+               )
+               aria.role.article = 
+                       attribute role { string "article" }
+
+       common.attrs.aria |= aria.article
+       common.attrs.aria.landmark.article |= aria.article
+
+## banner
+       aria.banner =
+               (       aria.role.banner
+               &       aria.state.expanded?
+               )
+               aria.role.banner = 
+                       attribute role { string "banner" }
+       
+       common.attrs.aria |= aria.banner
+       common.attrs.aria.landmark.banner |= aria.banner
+       
+## button
+       aria.button =
+               (       aria.role.button
+               &       aria.state.expanded?
+               &       aria.state.pressed? # not inherited
+               )
+               aria.role.button = 
+                       attribute role { string "button" }
+       
+       common.attrs.aria |= aria.button
+       common.attrs.aria.role.button |= aria.button
+
+## checkbox
+       aria.checkbox =
+               (       aria.role.checkbox
+               &       aria.state.checked #required!
+               )
+               aria.role.checkbox = 
+                       attribute role { string "checkbox" }
+       
+       common.attrs.aria |= aria.checkbox
+       common.attrs.aria.role.checkbox |= aria.checkbox
+
+# columnheader
+       aria.columnheader =
+               (       aria.role.columnheader
+               &       aria.prop.sort? # not inherited
+               &       aria.prop.readonly? # not inherited
+               &       aria.state.selected? # not inherited
+               &       aria.state.expanded?
+               &       aria.prop.required?
+               )
+               aria.role.columnheader = 
+                       attribute role { string "columnheader" }
+       
+       common.attrs.aria |= aria.columnheader
+
+## combobox
+       aria.combobox =
+               (       aria.role.combobox
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded #required!
+               &       aria.prop.autocomplete?
+               &       aria.prop.required?
+               )
+               aria.role.combobox = 
+                       attribute role { string "combobox" }
+       
+       common.attrs.aria |= aria.combobox
+       common.attrs.aria.role.combobox |= aria.combobox
+
+## complementary
+       aria.complementary =
+               (       aria.role.complementary
+               &       aria.state.expanded?
+               )
+               aria.role.complementary = 
+                       attribute role { string "complementary" }
+
+       common.attrs.aria |= aria.complementary
+       common.attrs.aria.landmark.complementary |= aria.complementary
+
+## contentinfo
+       aria.contentinfo =
+               (       aria.role.contentinfo
+               &       aria.state.expanded?
+               )
+               aria.role.contentinfo = 
+                       attribute role { string "contentinfo" }
+
+       common.attrs.aria |= aria.contentinfo
+       common.attrs.aria.landmark.contentinfo |= aria.contentinfo
+
+## definition
+       aria.definition =
+               (       aria.role.definition
+               &       aria.state.expanded?
+               )
+               aria.role.definition = 
+                       attribute role { string "definition" }
+
+       common.attrs.aria |= aria.definition
+
+## dialog
+       aria.dialog =
+               (       aria.role.dialog
+               &       aria.state.expanded?
+               )
+               aria.role.dialog = 
+                       attribute role { string "dialog" }
+
+       common.attrs.aria |= aria.dialog
+       common.attrs.aria.role.dialog |= aria.dialog
+
+## directory
+       aria.directory =
+               (       aria.role.directory
+               &       aria.state.expanded?
+               )
+               aria.role.directory = 
+                       attribute role { string "directory" }
+
+       common.attrs.aria |= aria.directory
+       common.attrs.aria.role.directory |= aria.directory
+
+## document
+       aria.document =
+               (       aria.role.document
+               &       aria.state.expanded?
+               )
+               aria.role.document = 
+                       attribute role { string "document" }
+
+       common.attrs.aria |= aria.document
+       common.attrs.aria.landmark.document |= aria.document
+
+## form
+       aria.form =
+               (       aria.role.form
+               &       aria.state.expanded?
+               )
+               aria.role.form =
+                       attribute role { string "form" }
+
+       common.attrs.aria |= aria.form
+       common.attrs.aria.landmark.form |= aria.form
+
+## grid
+       aria.grid =
+               (       aria.role.grid
+               &       aria.prop.level? # not inherited
+               &       aria.prop.multiselectable? # not inherited
+               &       aria.prop.readonly? # not inherited
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               )
+               aria.role.grid = 
+                       attribute role { string "grid" }
+       
+       common.attrs.aria |= aria.grid
+       
+## gridcell
+       aria.gridcell =
+               (       aria.role.gridcell
+               &       aria.prop.level? # net inherited
+               &       aria.prop.readonly? # not inherited
+               &       aria.state.selected? # not inherited
+               &       aria.state.expanded?
+               &       aria.prop.required?
+               )
+               aria.role.gridcell = 
+                       attribute role { string "gridcell" }
+       
+       common.attrs.aria |= aria.gridcell
+
+## group
+       aria.group =
+               (       aria.role.group
+               &       aria.prop.activedescendant? # not inherited
+               &       aria.state.expanded? # not inherited
+               )
+               aria.role.group = 
+                       attribute role { string "group" }
+       
+       common.attrs.aria |= aria.group
+       common.attrs.aria.role.group |= aria.group
+
+## heading
+       aria.heading =
+               (       aria.role.heading
+               &       aria.prop.level ? # not inherited
+               &       aria.state.expanded?
+               )
+               aria.role.heading =
+                       attribute role { string "heading" }
+       
+       common.attrs.aria |= aria.heading
+       common.attrs.aria.role.heading |= aria.heading
+
+## img
+       aria.img =
+               (       aria.role.img
+               &       aria.state.expanded?
+               )
+               aria.role.img = 
+                       attribute role { string "img" }
+       
+       common.attrs.aria |= aria.img
+       common.attrs.aria.role.img |= aria.img
+
+## link
+       aria.link =
+               (       aria.role.link
+               &       aria.state.expanded?
+               )
+               aria.role.link = 
+                       attribute role { string "link" }
+       
+       common.attrs.aria |= aria.link
+       common.attrs.aria.role.link |= aria.link
+
+## list
+       aria.list =
+               (       aria.role.list
+               &       aria.state.expanded?
+               )
+               aria.role.list = 
+                       attribute role { string "list" }
+       
+       common.attrs.aria |= aria.list
+       common.attrs.aria.role.list |= aria.list
+
+## listbox
+       aria.listbox =
+               (       aria.role.listbox
+               &       aria.prop.multiselectable? # not inherited
+               &       aria.prop.required?
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               )
+               aria.role.listbox = 
+                       attribute role { string "listbox" }
+       
+       common.attrs.aria |= aria.listbox
+       common.attrs.aria.role.listbox |= aria.listbox
+
+## listitem
+       aria.listitem =
+               (       aria.role.listitem
+               &       aria.prop.posinset? # not inherited
+               &       aria.prop.setsize? # not inherited
+               &       aria.prop.level? # not inherited
+               &       aria.state.expanded?
+               )
+               aria.role.listitem = 
+                       attribute role { string "listitem" }
+       
+       common.attrs.aria |= aria.listitem
+       common.attrs.aria.role.listitem |= aria.listitem
+
+## log
+       aria.log =
+               (       aria.role.log
+               &       aria.state.expanded?
+               )
+               aria.role.log = 
+                       attribute role { string "log" }
+       
+       common.attrs.aria |= aria.log
+       common.attrs.aria.role.log |= aria.log
+
+## main
+       aria.main =
+               (       aria.role.main
+               &       aria.state.expanded?
+               )
+               aria.role.main = 
+                       attribute role { string "main" }
+       
+       common.attrs.aria |= aria.main
+       common.attrs.aria.landmark.main |= aria.main
+
+## marquee
+       aria.marquee =
+               (       aria.role.marquee
+               &       aria.state.expanded?
+               )
+               aria.role.marquee = 
+                       attribute role { string "marquee" }
+       
+       common.attrs.aria |= aria.marquee
+       common.attrs.aria.role.marquee |= aria.marquee
+
+## math
+       aria.math =
+               (       aria.role.math
+               &       aria.state.expanded?
+               )
+               aria.role.math = 
+                       attribute role { string "math" }
+       
+       common.attrs.aria |= aria.math
+
+## menu
+       aria.menu =
+               (       aria.role.menu
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               )
+               aria.role.menu = 
+                       attribute role { string "menu" }
+       
+       common.attrs.aria |= aria.menu
+       common.attrs.aria.role.menu |= aria.menu
+
+## menubar
+       aria.menubar =
+               (       aria.role.menubar
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               )
+               aria.role.menubar = 
+                       attribute role { string "menubar" }
+       
+       common.attrs.aria |= aria.menubar
+       common.attrs.aria.role.menubar |= aria.menubar
+
+
+## menuitem
+       aria.menuitem =
+               (       aria.role.menuitem )
+               aria.role.menuitem = 
+                       attribute role { string "menuitem" }
+       
+       common.attrs.aria |= aria.menuitem
+       common.attrs.aria.role.menuitem |= aria.menuitem
+
+## menuitemcheckbox
+       aria.menuitemcheckbox =
+               (       aria.role.menuitemcheckbox
+               &       aria.state.checked #required
+               )
+               aria.role.menuitemcheckbox = 
+                       attribute role { string "menuitemcheckbox" }
+       
+       common.attrs.aria |= aria.menuitemcheckbox
+       common.attrs.aria.role.menuitemcheckbox |= aria.menuitemcheckbox
+
+## menuitemradio
+       aria.menuitemradio =
+               (       aria.role.menuitemradio
+               &       aria.state.checked #required
+               &       aria.state.selected?
+               &       aria.prop.posinset?
+               &       aria.prop.setsize?
+               )
+               aria.role.menuitemradio = 
+                       attribute role { string "menuitemradio" }
+       
+       common.attrs.aria |= aria.menuitemradio
+       common.attrs.aria.role.menuitemradio |= aria.menuitemradio
+
+## navigation
+       aria.navigation =
+               (       aria.role.navigation
+               &       aria.state.expanded?
+               )
+               aria.role.navigation = 
+                       attribute role { string "navigation" }
+       
+       common.attrs.aria |= aria.navigation
+       common.attrs.aria.landmark.navigation |= aria.navigation
+
+## note
+       aria.note =
+               (       aria.role.note
+               &       aria.state.expanded?
+               )
+               aria.role.note = 
+                       attribute role { string "note" }
+       
+       common.attrs.aria |= aria.note
+       common.attrs.aria.landmark.note |= aria.note
+
+## option
+       aria.option =
+               (       aria.role.option
+               &       aria.state.checked? # not inherited
+               &       aria.state.selected? # not inherited
+               &       aria.prop.posinset?
+               &       aria.prop.setsize?
+               )
+               aria.role.option = 
+                       attribute role { string "option" }
+       
+       common.attrs.aria |= aria.option
+       common.attrs.aria.role.option |= aria.option
+
+
+## presentation
+       aria.presentation =
+               (       aria.role.presentation
+               &       aria.state.expanded?
+               )
+               aria.role.presentation = 
+                       attribute role { string "presentation" }
+       
+       common.attrs.aria |= aria.presentation
+       common.attrs.aria.role.presentation |= aria.presentation
+
+## progressbar
+       aria.progressbar =
+               (       aria.role.progressbar
+               &       aria.prop.valuemax? # not inherited
+               &       aria.prop.valuemin? # not inherited
+               &       aria.prop.valuenow? # not inherited
+               &       aria.prop.valuetext? # not inherited
+               )
+               aria.role.progressbar = 
+                       attribute role { string "progressbar" }
+       
+       common.attrs.aria |= aria.progressbar
+       common.attrs.aria.role.progressbar |= aria.progressbar
+
+## radio
+       aria.radio =
+               (       aria.role.radio
+               &       aria.state.checked #required!
+               &       aria.state.selected?
+               &       aria.prop.posinset?
+               &       aria.prop.setsize?
+               )
+               aria.role.radio = 
+                       attribute role { string "radio" }
+       
+       common.attrs.aria |= aria.radio
+       common.attrs.aria.role.radio |= aria.radio
+
+## radiogroup
+       aria.radiogroup =
+               (       aria.role.radiogroup
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               &       aria.prop.required?
+               )
+               aria.role.radiogroup = 
+                       attribute role { string "radiogroup" }
+       
+       common.attrs.aria |= aria.radiogroup
+
+## region
+       aria.region =
+               (       aria.role.region
+               &       aria.state.expanded?
+               )
+               aria.role.region = 
+                       attribute role { string "region" }
+       
+       common.attrs.aria |= aria.region
+       common.attrs.aria.role.region |= aria.region
+
+## row
+       aria.row =
+               (       aria.role.row
+               &       aria.prop.level? # not inherited
+               &       aria.state.selected? # not inherited
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               )
+               aria.role.row = 
+                       attribute role { string "row" }
+       
+       common.attrs.aria |= aria.row
+
+## rowgroup
+       aria.rowgroup =
+               (       aria.role.rowgroup
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               )
+               aria.role.rowgroup =
+                       attribute role { string "rowgroup" }
+
+       common.attrs.aria |= aria.rowgroup
+
+# rowheader
+       aria.rowheader =
+               (       aria.role.rowheader
+               &       aria.prop.sort? # not inherited
+               &       aria.prop.readonly? # not inherited
+               &       aria.state.selected? # not inherited
+               &       aria.state.expanded?
+               &       aria.prop.required?
+               )
+               aria.role.rowheader = 
+                       attribute role { string "rowheader" }
+       
+       common.attrs.aria |= aria.rowheader
+
+## scrollbar
+       aria.scrollbar =
+               (       aria.role.scrollbar
+               &       aria.prop.orientation
+               &       aria.prop.valuemax
+               &       aria.prop.valuemin
+               &       aria.prop.valuenow
+               &       aria.prop.valuetext?
+               )
+               aria.role.scrollbar =
+                       attribute role { string "scrollbar" }
+
+       common.attrs.aria |= aria.scrollbar
+
+## search
+       aria.search =
+               (       aria.role.search
+               &       aria.state.expanded?
+               )
+               aria.role.search = 
+                       attribute role { string "search" }
+       
+       common.attrs.aria |= aria.search
+       common.attrs.aria.landmark.search |= aria.search
+
+## separator
+       aria.separator =
+               (       aria.role.separator
+               &       aria.state.expanded?
+               &       aria.prop.orientation?
+               )
+               aria.role.separator = 
+                       attribute role { string "separator" }
+       
+       common.attrs.aria |= aria.separator
+       common.attrs.aria.role.separator |= aria.separator
+
+## slider
+       aria.slider =
+               (       aria.role.slider
+               &       aria.prop.valuemax
+               &       aria.prop.valuemin
+               &       aria.prop.valuenow
+               &       aria.prop.valuetext?
+               &       aria.prop.orientation?
+               )
+               aria.role.slider = 
+                       attribute role { string "slider" }
+       
+       common.attrs.aria |= aria.slider
+       common.attrs.aria.role.slider |= aria.slider
+
+## spinbutton
+       aria.spinbutton =
+               (       aria.role.spinbutton
+               &       aria.prop.valuemax
+               &       aria.prop.valuemin
+               &       aria.prop.valuenow
+               &       aria.prop.valuetext?
+               &       aria.prop.required?
+               )
+               aria.role.spinbutton = 
+                       attribute role { string "spinbutton" }
+       
+       common.attrs.aria |= aria.spinbutton
+       common.attrs.aria.role.spinbutton |= aria.spinbutton
+
+## status
+       aria.status =
+               (       aria.role.status
+               &       aria.state.expanded?
+               )
+               aria.role.status = 
+                       attribute role { string "status" }
+       
+       common.attrs.aria |= aria.status
+       common.attrs.aria.role.status |= aria.status
+
+## switch
+       aria.switch =
+               (       aria.role.switch
+               &       aria.state.checked #required!
+               )
+               aria.role.switch =
+                       attribute role { string "switch" }
+
+       common.attrs.aria |= aria.switch
+       common.attrs.aria.role.switch |= aria.switch
+
+## tab
+       aria.tab =
+               (       aria.role.tab
+               &       aria.state.selected?
+               &       aria.state.expanded?
+               )
+               aria.role.tab = 
+                       attribute role { string "tab" }
+       
+       common.attrs.aria |= aria.tab
+       common.attrs.aria.role.tab |= aria.tab
+
+## tablist
+       aria.tablist =
+               (       aria.role.tablist
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               &       aria.prop.level?
+               &       aria.prop.multiselectable?
+               )
+               aria.role.tablist = 
+                       attribute role { string "tablist" }
+       common.attrs.aria |= aria.tablist
+       common.attrs.aria.role.tablist |= aria.tablist
+
+## tabpanel
+       aria.tabpanel =
+               (       aria.role.tabpanel
+               &       aria.state.expanded?
+               )
+               aria.role.tabpanel = 
+                       attribute role { string "tabpanel" }
+       
+       common.attrs.aria |= aria.tabpanel
+       common.attrs.aria.role.tabpanel |= aria.tabpanel
+
+## textbox
+       aria.textbox =
+               (       aria.role.textbox
+               &       aria.prop.activedescendant?
+               &       aria.prop.autocomplete? # not inherited
+               &       aria.prop.multiline? # not inherited
+               &       aria.prop.readonly? # not inherited
+               &       aria.prop.required?
+               )
+               aria.role.textbox = 
+                       attribute role { string "textbox" }
+       
+       common.attrs.aria |= aria.textbox
+       common.attrs.aria.role.textbox |= aria.textbox
+
+## timer
+       aria.timer =
+               (       aria.role.timer
+               &       aria.state.expanded?
+               )
+               aria.role.timer = 
+                       attribute role { string "timer" }
+       
+       common.attrs.aria |= aria.timer
+
+## toolbar
+       aria.toolbar =
+               (       aria.role.toolbar
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               )
+               aria.role.toolbar = 
+                       attribute role { string "toolbar" }
+       
+       common.attrs.aria |= aria.toolbar
+       common.attrs.aria.role.toolbar |= aria.toolbar
+
+## tooltip
+       aria.tooltip =
+               (       aria.role.tooltip
+               &       aria.state.expanded?
+               )
+               aria.role.tooltip = 
+                       attribute role { string "tooltip" }
+       
+       common.attrs.aria |= aria.tooltip
+
+## tree
+       aria.tree =
+               (       aria.role.tree
+               &       aria.prop.multiselectable? # not inherited
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               &       aria.prop.required?
+               )
+               aria.role.tree = 
+                       attribute role { string "tree" }
+       
+       common.attrs.aria |= aria.tree
+       common.attrs.aria.role.tree |= aria.tree
+
+## treegrid
+       aria.treegrid =
+               (       aria.role.treegrid
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               &       aria.prop.level?
+               &       aria.prop.multiselectable?
+               &       aria.prop.readonly?
+               &       aria.prop.required?
+               )
+               aria.role.treegrid = 
+                       attribute role { string "treegrid" }
+       
+       common.attrs.aria |= aria.treegrid
+
+## treeitem
+       aria.treeitem =
+               (       aria.role.treeitem
+               &       aria.state.checked?
+               &       aria.state.expanded?
+               &       aria.prop.level?
+               &       aria.prop.posinset?
+               &       aria.state.selected?
+               &       aria.prop.setsize?
+               )
+               aria.role.treeitem = 
+                       attribute role { string "treeitem" }
+       
+       common.attrs.aria |= aria.treeitem
+       common.attrs.aria.role.treeitem |= aria.treeitem
diff --git a/packages/html5-schema/assertions.sch 
b/packages/html5-schema/assertions.sch
new file mode 100644
index 0000000..2b34fcc
--- /dev/null
+++ b/packages/html5-schema/assertions.sch
@@ -0,0 +1,1235 @@
+<?xml version="1.0"?>
+<!-- * ********************************************************************* 
-->
+<!-- * WARNING: This file is no longer maintained and hasn't been updated in 
-->
+<!-- * years. There are numerous requirements in the HTML spec which should -->
+<!-- * rightly be captured by assertions in this schema but that aren't. So -->
+<!-- * don't consider the set of assertions here to be thorough or complete. 
-->
+<!-- * ********************************************************************* 
-->
+
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-->
+<!-- Schematron assertions for HTML5                                         
-->
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
+
+Copyright (c) 2005-2007 Elika J. Etemad (fantasai) and Henri Sivonen (hsivonen)
+Copyright (c) 2007-2012 Mozilla Foundation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+<schema xmlns='http://www.ascc.net/xml/schematron'>
+       <ns prefix='h' uri='http://www.w3.org/1999/xhtml'/>
+
+       <pattern name="required attributes">
+               <rule context='h:bdo'>
+                       <assert test='@dir'>
+                               A &#x201C;bdo&#x201D; element must have a
+                               &#x201C;dir&#x201D; attribute.
+                       </assert>
+               </rule>
+               <rule context='h:img[not(@alt)]'>
+                       <assert test='(@title and not(@title = ""))
+                       or //h:meta[(translate(@name,
+                               "GENERATOR", "generator") = "generator")]
+                       or (ancestor::h:figure
+                               and (ancestor::h:figure[1]/h:figcaption
+                                       and 
not(ancestor::h:figure[1]/h:figcaption = ""))
+                               and normalize-space(ancestor::h:figure[1])
+                                       = 
normalize-space(ancestor::h:figure[1]/h:figcaption)
+                               and not(ancestor::h:figure[1]//*[
+                                       local-name() = "audio"
+                                       or local-name() = "canvas"
+                                       or local-name() = "embed"
+                                       or local-name() = "iframe"
+                                       or local-name() = "math"
+                                       or local-name() = "object"
+                                       or local-name() = "svg"
+                                       or local-name() = "video"])
+                               and not(count(ancestor::h:figure[1]//h:img) > 
1))'>
+                               An &#x201C;img&#x201D; element must have an
+                               &#x201C;alt&#x201D; attribute, except under 
certain
+                               conditions. For details, consult guidance on
+                               providing text alternatives for images.
+                               
http://www.w3.org/wiki/HTML/Usage/TextAlternatives
+                       </assert>
+               </rule>
+       </pattern>
+
+       <pattern name='Triggered on mutually exclusive elements and 
prohibited-descendant cases'>
+
+       <!-- Exclusions and prohibited-descendant contraints  - - - - - - - - - 
- - -->
+
+       <rule context='h:form|h:dfn|h:noscript|h:address'>
+                       <report test='ancestor::*[name() = name(current())]'>
+                               The &#x201C;<name/>&#x201D; element must not 
contain any nested 
+                               &#x201C;<name/>&#x201D; elements.
+                       </report>
+               </rule>
+
+       <rule context='h:label'>
+                       <report test='ancestor::*[name() = name(current())]'>
+                               The &#x201C;<name/>&#x201D; element must not 
contain any nested 
+                               &#x201C;<name/>&#x201D; elements.
+                       </report>
+                       <report test='count(descendant::h:input
+                                          | descendant::h:button
+                                          | descendant::h:select
+                                          | descendant::h:keygen
+                                          | descendant::h:textarea) > 1'>
+                               The &#x201C;label&#x201D; element may contain 
at most one descendant
+                               &#x201C;input&#x201D; element,
+                               &#x201C;button&#x201D; element,
+                               &#x201C;select&#x201D; element,
+                               or &#x201C;textarea&#x201D; element.
+                       </report>
+                       <report test='@for and 
+                                     not(//h:input[not(translate(@type, 
"HIDEN", "hiden")="hidden")address@hidden = current()/@for] or 
+                                     //h:address@hidden = current()/@for] or 
+                                     //h:address@hidden = current()/@for] or 
+                                     //h:address@hidden = current()/@for] or 
+                                     //h:address@hidden = current()/@for] or 
+                                     //h:address@hidden = current()/@for])'>
+                               The &#x201C;for&#x201D; attribute of the 
&#x201C;label&#x201D; 
+                               element must refer to a form control.
+                       </report>
+               </rule>
+
+               <rule context='h:section|h:nav|h:article|h:aside'>
+                       <report test='ancestor::h:address'>
+                               The sectioning element &#x201C;<name/>&#x201D; 
must not
+                               appear as a descendant of the 
&#x201C;address&#x201D; element.
+                       </report>
+               </rule>
+
+               <rule context='h:footer'>
+                       <report test='ancestor::h:header'>
+                               The element &#x201C;footer&#x201D; must not
+                               appear as a descendant of the 
&#x201C;header&#x201D; element.
+                       </report>
+                       <report test='ancestor::h:footer'>
+                               The element &#x201C;footer&#x201D; must not
+                               appear as a descendant of the 
&#x201C;footer&#x201D; element.
+                       </report>
+                       <report test='ancestor::h:address'>
+                               The element &#x201C;footer&#x201D; must not
+                               appear as a descendant of the 
&#x201C;address&#x201D; element.
+                       </report>
+               </rule>
+
+               <rule context='h:h1|h:h2|h:h3|h:h4|h:h5|h:h6'>
+                       <report test='ancestor::h:address'>
+                               The &#x201C;<name/>&#x201D; element must not 
appear as a 
+                               descendant of the &#x201C;address&#x201D; 
element.
+                       </report>
+               </rule>
+
+               <rule context='h:header'>
+                       <report test='ancestor::h:footer'>
+                               The &#x201C;<name/>&#x201D; element must not 
appear as a 
+                               descendant of the &#x201C;footer&#x201D; 
element.
+                       </report>
+                       <report test='ancestor::h:address'>
+                               The &#x201C;<name/>&#x201D; element must not 
appear as a 
+                               descendant of the &#x201C;address&#x201D; 
element.
+                       </report>
+                       <report test='ancestor::h:header'>
+                               The &#x201C;header&#x201D; element must not 
appear as a 
+                               descendant of the &#x201C;header&#x201D; 
element.
+                       </report>
+               </rule>
+
+               <rule context='h:table'>
+                       <report test='ancestor::h:caption'>
+                               The element &#x201C;table&#x201D; must not 
appear as a
+                               descendant of the &#x201C;caption&#x201D; 
element.
+                       </report>
+                       <report test='@summary' role='warning'>
+                               The &#x201C;summary&#x201D; attribute on the
+                               &#x201C;table&#x201D; element is obsolete.
+                               Consider describing the structure of the table
+                               in a &#x201C;caption&#x201D; element or
+                               in a &#x201C;figure&#x201D; element containing
+                               the &#x201C;table&#x201D; element; or, simplify
+                               the structue of the table so that no
+                               description is needed.
+                       </report>
+               </rule>
+       </pattern>
+
+       <!-- Interactive element exclusions -->
+       <pattern name='interactive element exclusions'>
+       
+               <!-- 
+                  - Interactive descendants:
+                  - a
+                  - video[controls]
+                  - audio[controls]
+                  - details
+                  - menu[type=toolbar]
+                  - button
+                  - input[type!=hidden]
+                  - textarea
+                  - select
+                  - img[usemap]
+                  - embed
+                  - iframe
+                  - keygen
+                  - label
+                  - object[usemap]
+               
+                  - Interactive ancestors
+                  - a
+                  - button
+                 -->
+
+               <rule context='h:a|h:details|h:embed|h:iframe|h:label'>
+                       <report test='ancestor::h:a'>
+                               The interactive element &#x201C;<name/>&#x201D; 
must not 
+                               appear as a descendant of the &#x201C;a&#x201D; 
element.
+                       </report>
+                       <report test='ancestor::h:button'>
+                               The interactive element &#x201C;<name/>&#x201D; 
must not 
+                               appear as a descendant of the 
&#x201C;button&#x201D; element.
+                       </report>
+               </rule>
+
+               <rule 
context='h:button|h:textarea|h:select|h:keygen|h:input[not(translate(@type, 
"HIDEN", "hiden")="hidden")]'>
+                       <report test='ancestor::h:a'>
+                               The interactive element &#x201C;<name/>&#x201D; 
must not 
+                               appear as a descendant of the &#x201C;a&#x201D; 
element.
+                       </report>
+                       <report test='ancestor::h:button'>
+                               The interactive element &#x201C;<name/>&#x201D; 
must not 
+                               appear as a descendant of the 
&#x201C;button&#x201D; element.
+                       </report>
+                       <report test='ancestor::h:address@hidden and 
not(ancestor::h:address@hidden = current()/@id])'>
+                               Any &#x201C;<name/>&#x201D; element descendant 
of a &#x201C;label&#x201D; element
+                               with a &#x201C;for&#x201D; attribute must have 
an
+                               ID value that matches that &#x201C;for&#x201D; 
attribute.
+                       </report>
+               </rule>
+
+               <rule context='h:address@hidden|h:address@hidden'>
+                       <report test='ancestor::h:a'>
+                               The interactive element &#x201C;<name/>&#x201D;
+                               with the attribute &#x201C;controls&#x201D; 
must not
+                               appear as a descendant of the &#x201C;a&#x201D; 
element.
+                       </report>
+                       <report test='ancestor::h:button'>
+                               The interactive element &#x201C;<name/>&#x201D;
+                               with the attribute &#x201C;controls&#x201D; 
must not
+                               appear as a descendant of the 
&#x201C;button&#x201D; element.
+                       </report>
+               </rule>
+
+               <rule context='h:menu[translate(@type, "TOLBAR", 
"tolbar")="toolbar"]'>
+                       <report test='ancestor::h:a'>
+                               The element &#x201C;menu&#x201D;
+                               with the attribute &#x201C;type&#x201D; whose 
value is &#x201C;toolbar&#x201D; must not
+                               appear as a descendant of the &#x201C;a&#x201D; 
element.
+                       </report>
+                       <report test='ancestor::h:button'>
+                               The element &#x201C;menu&#x201D;
+                               with the attribute &#x201C;type&#x201D; whose 
value is &#x201C;toolbar&#x201D; must not
+                               appear as a descendant of the 
&#x201C;button&#x201D; element.
+                       </report>
+               </rule>
+
+               <rule context='h:address@hidden'>
+                       <report test='ancestor::h:a'>
+                               The element &#x201C;img&#x201D;
+                               with the attribute &#x201C;usemap&#x201D; must 
not
+                               appear as a descendant of the &#x201C;a&#x201D; 
element.
+                       </report>
+                       <report test='ancestor::h:button'>
+                               The element &#x201C;img&#x201D;
+                               with the attribute &#x201C;usemap&#x201D; must 
not
+                               appear as a descendant of the 
&#x201C;button&#x201D; element.
+                       </report>
+               </rule>
+
+               <rule context='h:address@hidden'>
+                       <report test='ancestor::h:a'>
+                               The element &#x201C;object&#x201D;
+                               with the attribute &#x201C;usemap&#x201D; must 
not
+                               appear as a descendant of the &#x201C;a&#x201D; 
element.
+                       </report>
+                       <report test='ancestor::h:button'>
+                               The element &#x201C;object&#x201D;
+                               with the attribute &#x201C;usemap&#x201D; must 
not
+                               appear as a descendant of the 
&#x201C;button&#x201D; element.
+                       </report>
+               </rule>
+       </pattern>
+
+       <!-- REVISIT fieldset 
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-April/006181.html -->
+
+       <!-- Misc requirements -->
+               
+       <pattern name="miscellaneous requirements">
+               <rule context='h:area'>
+                       <assert test='ancestor::h:map'>
+                               The &#x201C;area&#x201D; element must have an 
ancestor
+                               &#x201C;map&#x201D; element.
+                       </assert>
+               </rule>
+
+               <rule context='h:address@hidden'>
+                       <assert test='ancestor::h:address@hidden'>
+                               The &#x201C;img&#x201D; element with the 
+                               &#x201C;ismap&#x201D; attribute set must have 
an ancestor 
+                               &#x201C;a&#x201D; element with the 
&#x201C;href&#x201D; attribute.
+                       </assert>
+               </rule>
+
+               <rule context='h:input'>
+                       <report test='@list and not(//h:address@hidden = 
current()/@list])'>
+                               The &#x201C;list&#x201D; attribute of the 
&#x201C;input&#x201D; 
+                               element must refer to a 
&#x201C;datalist&#x201D; element.
+                       </report>
+                       <report test='@type = "button" and (not(@value) or 
@value = "")'>
+                               Element &#x201C;input&#x201D; with attribute 
&#x201C;type&#x201D;
+                               whose value is &#x201C;button&#x201D; must have 
non-empty attribute
+                               &#x201C;value&#x201D;.
+                       </report>
+               </rule>
+
+               <rule context='h:track'>
+                       <report test='@label = ""'>
+                               Attribute &#x201C;label&#x201D; for element 
&#x201C;track&#x201D;
+                               must have non-empty value.
+                       </report>
+                       <report test='@default and 
preceding-sibling::h:address@hidden'>
+                               The &#x201C;default&#x201D; attribute must not 
occur on more than one
+                               &#x201C;track&#x201D; element within the same 
&#x201C;audio&#x201D;
+                               element or &#x201C;video&#x201D; element.
+                       </report>
+               </rule>
+
+               <rule context='h:address@hidden and @name]'>
+                       <assert test='@id = @name'>
+                               The &#x201C;id&#x201D; attribute on a 
&#x201C;map&#x201D; element must have
+                               the same value as the &#x201C;name&#x201D; 
attribute.
+                       </assert>
+               </rule>
+
+               <rule context='h:select'>
+                       <report test='not(@multiple) and 
count(descendant::h:address@hidden) > 1'>
+                               The &#x201C;select&#x201D; element cannot have 
more than one 
+                               selected &#x201C;option&#x201D; element 
descendant unless the 
+                               &#x201C;multiple&#x201D; attribute is specified.
+                       </report>
+                       <report test='@required and not(@multiple)
+                               and (not(@size)
+                                       or (starts-with(normalize-space(@size), 
"+")
+                                       and substring-after(@size,"+") = 1)
+                                       or @size = 1)
+                               and not(h:option)'>
+                               A &#x201C;select&#x201D; element with
+                               a &#x201C;required&#x201D; attribute and without
+                               a &#x201C;multiple&#x201D; attribute, and whose
+                               size is &#x201C;1&#x201D;, must have a child
+                               &#x201C;option&#x201D; element.
+                       </report>
+               </rule>
+
+               <rule context='h:address@hidden and not(@multiple)
+                       and (not(@size)
+                               or (starts-with(normalize-space(@size), "+")
+                               and substring-after(@size,"+") = 1)
+                               or @size = 1)]/h:option[1]'>
+                       <assert test='(@value and @value = "")
+                               or ((not(@value) or @value = "") and . = "")'>
+                               The first child &#x201C;option&#x201D; element
+                               of a &#x201C;select&#x201D; element with
+                               a &#x201C;required&#x201D; attribute and without
+                               a &#x201C;multiple&#x201D; attribute, and whose
+                               size is &#x201C;1&#x201D;, must have either an
+                               empty &#x201C;value&#x201D; attribute, or must
+                               have no text content.
+                       </assert>
+               </rule>
+
+               <rule context='h:script'>
+                       <report test='@language and translate(@language, 
"JAVSCRIPT", "javscript")="javascript"
+                               and @type and not(translate(@type, 
"EXJAVSCRIPT", "exjavscript")="text/javascript")'>
+                               Element &#x201C;script&#x201D; with attribute
+                               &#x201C;language&#x201D; whose value is 
&#x201C;JavaScript&#x201D;
+                               must not have attribute &#x201C;type&#x201D; 
whose value is not
+                               &#x201C;text/javascript&#x201D;.
+                       </report>
+                       <report test='not(@src) and @charset'>
+                               Element &#x201C;script&#x201D; must not have 
attribute
+                               &#x201C;charset&#x201D; unless attribute 
&#x201C;src&#x201D; is
+                               also specified.
+                       </report>
+                       <report test='not(@src) and @defer'>
+                               Element &#x201C;script&#x201D; must not have 
attribute
+                               &#x201C;defer&#x201D; unless attribute 
&#x201C;src&#x201D; is
+                               also specified.
+                       </report>
+                       <report test='not(@src) and @async'>
+                               Element &#x201C;script&#x201D; must not have 
attribute
+                               &#x201C;async&#x201D; unless attribute 
&#x201C;src&#x201D; is
+                               also specified.
+                       </report>
+               </rule>
+
+               <rule context='h:time'>
+                       <report test='ancestor::h:time'>
+                               The element &#x201C;time&#x201D; must not
+                               appear as a descendant of the 
&#x201C;time&#x201D; element.
+                       </report>
+               </rule>
+
+               <rule context='h:progress'>
+                       <report test='ancestor::h:progress'>
+                               The element &#x201C;progress&#x201D; must not
+                               appear as a descendant of the 
&#x201C;progress&#x201D; element.
+                       </report>
+                       <assert test='@max and @value and number(@value) &lt;= 
number(@max)'>
+                               The value of the &#x201C;value&#x201D; 
attribute must be less than or equal to
+                               the value of the &#x201C;max&#x201D; attribute.
+                       </assert>
+                       <assert test='not(@max) and @value and number(@value) 
&lt;= 1'>
+                               The value of the  &#x201C;value&#x201D; 
attribute must be less than or equal to
+                               one when the &#x201C;max&#x201D; attribute is 
absent.
+                       </assert>
+               </rule>
+
+               <!-- 
+                       min <= value <= max
+               min <= low <= high <= max
+                       min <= optimum <= max 
+               -->
+
+               <rule context='h:meter'>
+                       <report test='ancestor::h:meter'>
+                               The element &#x201C;meter&#x201D; must not
+                               appear as a descendant of the 
&#x201C;meter&#x201D; element.
+                       </report>
+                       <report test='@min and @value and not(number(@min) 
&lt;= number(@value))'>
+                               The value of the  &#x201C;min&#x201D; attribute 
must be less than or equal to
+                               the value of the &#x201C;value&#x201D; 
attribute.
+                       </report>
+                       <report test='not(@min) and @value and not(0 &lt;= 
number(@value))'>
+                               The value of the &#x201C;value&#x201D; 
attribute must be greater than or equal to
+                               zero when the &#x201C;min&#x201D; attribute is 
absent.
+                       </report>
+                       <report test='@value and @max and not(number(@value) 
&lt;= number(@max))'>
+                               The value of the  &#x201C;value&#x201D; 
attribute must be less than or equal to
+                               the value of the &#x201C;max&#x201D; attribute.
+                       </report>
+                       <report test='@value and not(@max) and 
not(number(@value) &lt;= 1)'>
+                               The value of the  &#x201C;value&#x201D; 
attribute must be less than or equal to
+                               one when the &#x201C;max&#x201D; attribute is 
absent.
+                       </report>
+                       <report test='@min and @max and not(number(@min) &lt;= 
number(@max))'>
+                               The value of the  &#x201C;min&#x201D; attribute 
must be less than or equal to
+                               the value of the &#x201C;max&#x201D; attribute.
+                       </report>
+                       <report test='not(@min) and @max and not(0 &lt;= 
number(@max))'>
+                               The value of the &#x201C;max&#x201D; attribute 
must be greater than or equal to
+                               zero when the &#x201C;min&#x201D; attribute is 
absent.
+                       </report>
+                       <report test='@min and not(@max) and not(number(@min) 
&lt;= 1)'>
+                               The value of the  &#x201C;min&#x201D; attribute 
must be less than or equal to
+                               one when the &#x201C;max&#x201D; attribute is 
absent.
+                       </report>
+                       <report test='@min and @low and not(number(@min) &lt;= 
number(@low))'>
+                               The value of the  &#x201C;min&#x201D; attribute 
must be less than or equal to
+                               the value of the &#x201C;low&#x201D; attribute.
+                       </report>
+                       <report test='not(@min) and @low and not(0 &lt;= 
number(@low))'>
+                               The value of the &#x201C;low&#x201D; attribute 
must be greater than or equal to
+                               zero when the &#x201C;min&#x201D; attribute is 
absent.
+                       </report>
+                       <report test='@min and @high and not(number(@min) &lt;= 
number(@high))'>
+                               The value of the  &#x201C;min&#x201D; attribute 
must be less than or equal to
+                               the value of the &#x201C;high&#x201D; attribute.
+                       </report>
+                       <report test='not(@min) and @high and not(0 &lt;= 
number(@high))'>
+                               The value of the &#x201C;high&#x201D; attribute 
must be greater than or equal to
+                               zero when the &#x201C;min&#x201D; attribute is 
absent.
+                       </report>
+                       <report test='@low and @high and not(number(@low) &lt;= 
number(@high))'>
+                               The value of the  &#x201C;low&#x201D; attribute 
must be less than or equal to
+                               the value of the &#x201C;high&#x201D; attribute.
+                       </report>
+                       <report test='@high and @max and not(number(@high) 
&lt;= number(@max))'>
+                               The value of the  &#x201C;high&#x201D; 
attribute must be less than or equal to
+                               the value of the &#x201C;max&#x201D; attribute.
+                       </report>
+                       <report test='@high and not(@max) and not(number(@high) 
&lt;= 1)'>
+                               The value of the  &#x201C;high&#x201D; 
attribute must be less than or equal to
+                               one when the &#x201C;max&#x201D; attribute is 
absent.
+                       </report>
+                       <report test='@low and @max and not(number(@low) &lt;= 
number(@max))'>
+                               The value of the  &#x201C;low&#x201D; attribute 
must be less than or equal to
+                               the value of the &#x201C;max&#x201D; attribute.
+                       </report>
+                       <report test='@low and not(@max) and not(number(@low) 
&lt;= 1)'>
+                               The value of the  &#x201C;low&#x201D; attribute 
must be less than or equal to
+                               one when the &#x201C;max&#x201D; attribute is 
absent.
+                       </report>
+                       <report test='@min and @optimum and not(number(@min) 
&lt;= number(@optimum))'>
+                               The value of the  &#x201C;min&#x201D; attribute 
must be less than or equal to
+                               the value of the &#x201C;optimum&#x201D; 
attribute.
+                       </report>
+                       <report test='not(@min) and @optimum and not(0 &lt;= 
number(@optimum))'>
+                               The value of the &#x201C;optimum&#x201D; 
attribute must be greater than or equal to
+                               zero when the &#x201C;min&#x201D; attribute is 
absent.
+                       </report>
+                       <report test='@optimum and @max and 
not(number(@optimum) &lt;= number(@max))'>
+                               The value of the  &#x201C;optimum&#x201D; 
attribute must be less than or equal to
+                               the value of the &#x201C;max&#x201D; attribute.
+                       </report>
+                       <report test='@optimum and not(@max) and 
not(number(@optimum) &lt;= 1)'>
+                               The value of the  &#x201C;optimum&#x201D; 
attribute must be less than or equal to
+                               one when the &#x201C;max&#x201D; attribute is 
absent.
+                       </report>
+               </rule>
+       </pattern>
+
+       <!-- Obsolete Elements - - - - - - - - - - - - - - - - - - - - - - -->
+       <pattern name="obsolete elements">
+               <rule context='h:acronym'>
+                       <report test='true()'>
+                               The &#x201C;acronym&#x201D; element is 
obsolete. Use the &#x201C;abbr&#x201D; element instead.
+                       </report>
+               </rule>
+
+               <rule context='h:applet'>
+                       <report test='true()'>
+                               The &#x201C;applet&#x201D; element is obsolete. 
Use the &#x201C;object&#x201D; element instead.
+                       </report>
+               </rule>
+
+               <rule context='h:center|h:font|h:big|h:strike|h:tt|h:basefont'>
+                       <report test='true()'>
+                               The &#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+               </rule>
+
+               <rule context='h:dir'>
+                       <report test='true()'>
+                               The &#x201C;dir&#x201D; element is obsolete. 
Use the &#x201C;ul&#x201D; element instead.
+                       </report>
+               </rule>
+
+               <rule context='h:frameset|h:noframes'>
+                       <report test='true()'>
+                               The &#x201C;<name/>&#x201D; element is obsolete.
+                               Use the &#x201C;iframe&#x201D; element and CSS 
instead, or use server-side includes.
+                       </report>
+               </rule>
+       </pattern>
+
+       <!-- Obsolete Attributes- - - - - - - - - - - - - - - - - - - - - - -->
+
+       <pattern name="obsolete attributes">
+               <rule context='h:a'>
+                       <report test='@coords'>
+                               The &#x201C;coords&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               For image maps, use the &#x201C;area&#x201D; 
element instead of the &#x201C;a&#x201D; element.
+                       </report>
+                       <report test='@shape'>
+                               The &#x201C;shape&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               For image maps, use the &#x201C;area&#x201D; 
element instead of the &#x201C;a&#x201D; element.
+                       </report>
+                       <report test='@urn'>
+                               The &#x201C;urn&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Specify the preferred persistent identifier 
using the &#x201C;href&#x201D; attribute instead.
+                       </report>
+                       <report test='@charset'>
+                               The &#x201C;charset&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use an HTTP Content-Type header on the linked 
resource instead.
+                       </report>
+                       <report test='@methods'>
+                               The &#x201C;methods&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use the HTTP OPTIONS feature instead.
+                       </report>
+                       <report test='@rev'>
+                               The &#x201C;rev&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use the &#x201C;rel&#x201D; attribute instead, 
with a term having the opposite meaning.
+                       </report>
+               </rule>
+
+               <rule context='h:link'>
+                       <report test='@target'>
+                               The &#x201C;target&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               You can safely omit it.
+                       </report>
+                       <report test='@urn'>
+                               The &#x201C;urn&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Specify the preferred persistent identifier 
using the &#x201C;href&#x201D; attribute instead.
+                       </report>
+                       <report test='@charset'>
+                               The &#x201C;charset&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use an HTTP Content-Type header on the linked 
resource instead.
+                       </report>
+                       <report test='@methods'>
+                               The &#x201C;methods&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use the HTTP OPTIONS feature instead.
+                       </report>
+                       <report test='@rev'>
+                               The &#x201C;rev&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use the &#x201C;rel&#x201D; attribute instead, 
with a term having the opposite meaning.
+                       </report>
+               </rule>
+
+               <rule context="h:area">
+                       <report test='@nohref'>
+                               The &#x201C;nohref&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Omitting the &#x201C;href&#x201D; attribute is 
sufficient.
+                       </report>
+               </rule>
+
+               <rule context='h:embed'>
+                       <report test='@name'>
+                               The &#x201C;name&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use the &#x201C;id&#x201D; attribute instead.
+                       </report>
+               </rule>
+
+               <rule context='h:head'>
+                       <report test='@profile'>
+                               The &#x201C;profile&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               To declare which &#x201C;meta&#x201D; element 
terms are used in the document, instead register the
+                               names as meta extensions. 
&lt;http://wiki.whatwg.org/wiki/MetaExtensions>
+                               To trigger specific UA behaviors, use a 
&#x201C;link&#x201D; element instead.
+                       </report>
+               </rule>
+
+               <rule context='h:html'>
+                       <report test='@version'>
+                               The &#x201C;version&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               You can safely omit it.
+                       </report>
+               </rule>
+
+               <rule context='h:iframe'>
+                       <report test='@longdesc'>
+                               The &#x201C;longdesc&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use a regular &#x201C;a&#x201D; element to link 
to the description.
+                       </report>
+               </rule>
+
+               <rule context='h:img'>
+                       <report test='@longdesc'>
+                               The &#x201C;longdesc&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use a regular &#x201C;a&#x201D; element to link 
to the description.
+                       </report>
+                       <report test='@name'>
+                               The &#x201C;name&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use the &#x201C;id&#x201D; attribute instead.
+                       </report>
+               </rule>
+
+               <rule context='h:input'>
+                       <report test='@usemap'>
+                               The &#x201C;usemap&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use the &#x201C;img&#x201D; element instead of 
the &#x201C;input&#x201D; element for image maps.
+                       </report>
+               </rule>
+
+               <rule context='h:li|h:ul'>
+                       <report test='@type'>
+                               The &#x201C;type&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+               </rule>
+
+               <rule context='h:meta'>
+                       <report test='@scheme'>
+                               The &#x201C;scheme&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use only one scheme per field, or make the 
scheme declaration part of the value.
+                       </report>
+                       <report test='translate(@http-equiv,"CONTELAGUA", 
"contelagua")="content-language"' role='warning'>
+                               Using the &#x201C;meta&#x201D; element to 
specify the document-wide default language is obsolete.
+                               Consider specifying the language on the root 
element instead.
+                       </report>
+               </rule>
+
+               <rule context='h:object'>
+                       <report test='@archive'>
+                               The &#x201C;archive&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use the &#x201C;data&#x201D; attribute and 
&#x201C;type&#x201D; attribute to invoke plugins.
+                               To set a parameter with the name 
&#x201C;archive&#x201D;, use the &#x201C;param&#x201D; element.
+                       </report>
+                       <report test='@classid'>
+                               The &#x201C;classid&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use the &#x201C;data&#x201D; attribute and 
&#x201C;type&#x201D; attribute to invoke plugins.
+                               To set a parameter with the name 
&#x201C;classid&#x201D;, use the &#x201C;param&#x201D; element.
+                       </report>
+                       <report test='@code'>
+                               The &#x201C;code&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use the &#x201C;data&#x201D; attribute and 
&#x201C;type&#x201D; attribute to invoke plugins.
+                               To set a parameter with the name 
&#x201C;code&#x201D;, use the &#x201C;param&#x201D; element.
+                       </report>
+                       <report test='@codebase'>
+                               The &#x201C;codebase&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use the &#x201C;data&#x201D; attribute and 
&#x201C;type&#x201D; attribute to invoke plugins.
+                               To set a parameter with the name 
&#x201C;codebase&#x201D;, use the &#x201C;param&#x201D; element.
+                       </report>
+                       <report test='@codetype'>
+                               The &#x201C;codetype&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use the &#x201C;data&#x201D; attribute and 
&#x201C;type&#x201D; attribute to invoke plugins.
+                               To set a parameter with the name 
&#x201C;codetype&#x201D;, use the &#x201C;param&#x201D; element.
+                       </report>
+                       <report test='@declare'>
+                               The &#x201C;declare&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Repeat the &#x201C;object&#x201D; element 
completely each time the resource is to be reused.
+                       </report>
+                       <report test='@standby'>
+                               The &#x201C;standby&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Optimize the linked resource so that it loads 
quickly or, at least, incrementally.
+                       </report>
+               </rule>
+
+               <rule context='h:option'>
+                       <report test='@name'>
+                               The &#x201C;name&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use the &#x201C;id&#x201D; attribute instead.
+                       </report>
+               </rule>
+
+               <rule context='h:param'>
+                       <report test='@type'>
+                               The &#x201C;type&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use the &#x201C;name&#x201D; attribute and 
&#x201C;value&#x201D; attribute without declaring value types.
+                       </report>
+                       <report test='@valuetype'>
+                               The &#x201C;valuetype&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use the &#x201C;name&#x201D; attribute and 
&#x201C;value&#x201D; attribute without declaring value types.
+                       </report>
+               </rule>
+
+               <rule context='h:address@hidden and not(translate(@language, 
"JAVSCRIPT", "javscript")="javascript")]'>
+                       <report test='true()'>
+                               The &#x201C;language&#x201D; attribute on the 
&#x201C;script&#x201D; element is obsolete.
+                               Use the &#x201C;type&#x201D; attribute instead.
+                       </report>
+               </rule>
+
+               <rule context='h:td|h:th'>
+                       <report test='@scope and self::h:td'>
+                               The &#x201C;scope&#x201D; attribute on the 
&#x201C;td&#x201D; element is obsolete.
+                               Use the &#x201C;scope&#x201D; attribute on a 
&#x201C;th&#x201D; element instead.
+                       </report>
+                       <report test='@abbr'>
+                               The &#x201C;abbr&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Consider instead beginning the cell contents 
with concise text, followed by further elaboration if needed.
+                       </report>
+                       <report test='@axis'>
+                               The &#x201C;axis&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use the &#x201C;scope&#x201D; attribute instead.
+                       </report>
+               </rule>
+       </pattern>
+
+       <pattern name="obsolete presentational align attribute">
+               <rule 
context='h:caption|h:iframe|h:img|h:input|h:object|h:embed|h:legend
+                       
|h:table|h:hr|h:div|h:h1|h:h2|h:h3|h:h4|h:h5|h:h6|h:p|h:col|h:colgroup
+                       |h:tbody|h:td|h:tfoot|h:th|h:thead|h:tr'>
+                       <report test='@align'>
+                               The &#x201C;align&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+               </rule>
+       </pattern>
+
+       <pattern name="obsolete presentational width attribute">
+               <rule context='h:col|h:colgroup|h:hr|h:pre|h:table|h:td|h:th'>
+                       <report test='@width'>
+                               The &#x201C;width&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+               </rule>
+       </pattern>
+
+       <pattern name="obsolete presentational table attributes">
+               <rule 
context='h:col|h:colgroup|h:tbody|h:td|h:tfoot|h:th|h:thead|h:tr'>
+                       <report test='@char'>
+                               The &#x201C;char&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@charoff'>
+                               The &#x201C;charoff&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@valign'>
+                               The &#x201C;valign&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+               </rule>
+       </pattern>
+
+       <pattern name="obsolete presentational attributes">
+               <rule context='h:body'>
+                       <report test='@alink'>
+                               The &#x201C;alink&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@background'>
+                               The &#x201C;background&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@bgcolor'>
+                               The &#x201C;bgcolor&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@link'>
+                               The &#x201C;link&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@marginbottom'>
+                               The &#x201C;marginbottom&#x201D; attribute on 
the &#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@marginheight'>
+                               The &#x201C;marginheight&#x201D; attribute on 
the &#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@marginleft'>
+                               The &#x201C;marginleft&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@marginright'>
+                               The &#x201C;marginright&#x201D; attribute on 
the &#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@margintop'>
+                               The &#x201C;margintop&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@marginwidth'>
+                               The &#x201C;marginwidth&#x201D; attribute on 
the &#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@text'>
+                               The &#x201C;text&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@vlink'>
+                               The &#x201C;vlink&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+               </rule>
+
+               <rule context='h:br'>
+                       <report test='@clear'>
+                               The &#x201C;clear&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+               </rule>
+
+               <rule context='h:embed'>
+                       <report test='@hspace'>
+                               The &#x201C;hspace&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@vspace'>
+                               The &#x201C;vspace&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+               </rule>
+
+               <rule context='h:hr'>
+                       <report test='@noshade'>
+                               The &#x201C;noshade&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@size'>
+                               The &#x201C;size&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@color'>
+                               The &#x201C;color&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+               </rule>
+
+               <rule context='h:dl|h:menu|h:ol|h:ul'>
+                       <report test='@compact'>
+                               The &#x201C;compact&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+               </rule>
+
+               <rule context='h:iframe'>
+                       <report test='@allowtransparency'>
+                               The &#x201C;allowtransparency&#x201D; attribute 
on the &#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@frameborder'>
+                               The &#x201C;frameborder&#x201D; attribute on 
the &#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@marginheight'>
+                               The &#x201C;marginheight&#x201D; attribute on 
the &#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@marginwidth'>
+                               The &#x201C;marginwidth&#x201D; attribute on 
the &#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@scrolling'>
+                               The &#x201C;scrolling&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+               </rule>
+
+               <rule context='h:img|h:object'>
+                       <report test='@hspace'>
+                               The &#x201C;hspace&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@vspace'>
+                               The &#x201C;vspace&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@border and self::h:object'>
+                               The &#x201C;border&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+               </rule>
+
+               <rule context='h:table'>
+                       <report test='@bgcolor'>
+                               The &#x201C;bgcolor&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@border and not(@border = "" or @border = 
"1")'>
+                               The value of the &#x201C;border&#x201D; 
attribute on the &#x201C;<name/>&#x201D; element
+                               must be either &#x201C;1&#x201D; or the empty 
string. To regulate the thickness of table borders, 
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@cellpadding'>
+                               The &#x201C;cellpadding&#x201D; attribute on 
the &#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@cellspacing'>
+                               The &#x201C;cellspacing&#x201D; attribute on 
the &#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@frame'>
+                               The &#x201C;frame&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@rules'>
+                               The &#x201C;rules&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+               </rule>
+
+               <rule context='h:td|h:th'>
+                       <report test='@bgcolor'>
+                               The &#x201C;bgcolor&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@height'>
+                               The &#x201C;height&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+                       <report test='@nowrap'>
+                               The &#x201C;nowrap&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+               </rule>
+
+               <rule context='h:tr'>
+                       <report test='@bgcolor'>
+                               The &#x201C;bgcolor&#x201D; attribute on the 
&#x201C;<name/>&#x201D; element is obsolete.
+                               Use CSS instead. 
http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+                       </report>
+               </rule>
+       </pattern>
+
+<!-- lang and xml:lang in XHTML  - - - - - - - - - - - - - - - - - -->
+
+       <pattern name='lang and xml:lang in XHTML'>
+               <rule context='h:address@hidden and @xml:lang]'>
+                       <assert test='translate(@lang, 
"ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz") = 
translate(@xml:lang, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 
"abcdefghijklmnopqrstuvwxyz")'>
+                               When the attribute &#x201C;lang&#x201D; in no 
namespace and the attribute &#x201C;lang&#x201D;
+                               in the XML namespace are both present, they 
must have the same value.
+                       </assert>
+               </rule>
+       </pattern>
+
+<!-- IDREFs  - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+       <!-- Assuming that ID uniqueness is already enforced. -->
+
+       <pattern name='contextmenu must refer to a menu'>
+               <rule context='h:address@hidden'>
+                 <assert test='//h:address@hidden = current()/@contextmenu]'>
+                               The &#x201C;contextmenu&#x201D; attribute must 
refer to a 
+                               &#x201C;menu&#x201D; element.
+                       </assert>
+               </rule>
+       </pattern>
+
+       <!-- FIXME form attribute -->
+       
+       <!-- FIXME output for -->
+       
+<!-- Unique Definitions  - - - - - - - - - - - - - - - - - - - - - -->
+       
+       <!-- Only one definition per term per document' -->
+
+<!-- ARIA containment    - - - - - - - - - - - - - - - - - - - - - -->
+
+       <pattern name='Mutually Exclusive Role triggers'>
+
+    <!-- XXX columnheader and rowheader require row parent -->
+
+               <rule context='address@hidden"option"]'>
+                       <assert test='../@role="listbox"'>
+                               An element with &#x201C;role=option&#x201D; 
requires 
+                               &#x201C;role=listbox&#x201D; on the parent.
+                       </assert>
+               </rule>
+
+               <rule context='address@hidden"menuitem"]'>
+                       <assert test='../@role="menu"'>
+                               An element with &#x201C;role=menuitem&#x201D; 
requires 
+                               &#x201C;role=menu&#x201D; on the parent.
+                       </assert>
+               </rule>
+
+               <rule context='address@hidden"menuitemcheckbox"]'>
+                       <assert test='../@role="menu"'>
+                               An element with 
&#x201C;role=menuitemcheckbox&#x201D; requires 
+                               &#x201C;role=menu&#x201D; on the parent.
+                       </assert>
+               </rule>
+
+               <rule context='address@hidden"menuitemradio"]'>
+                       <assert test='../@role="menu"'>
+                               An element with 
&#x201C;role=menuitemradio&#x201D; requires 
+                               &#x201C;role=menu&#x201D; on the parent.
+                       </assert>
+               </rule>
+
+               <rule context='address@hidden"tab"]'>
+                       <assert test='../@role="tablist"'>
+                               An element with &#x201C;role=tab&#x201D; 
requires 
+                               &#x201C;role=tablist&#x201D; on the parent.
+                       </assert>
+               </rule>
+
+               <rule context='address@hidden"treeitem"]'>
+                       <assert test='../@role="tree"'>
+                               An element with &#x201C;role=treeitem&#x201D; 
requires 
+                               &#x201C;role=tree&#x201D; on the parent.
+                       </assert>
+               </rule>
+
+               <rule context='address@hidden"listitem"]'>
+                       <assert test='../@role="list"'>
+                               An element with &#x201C;role=listitem&#x201D; 
requires 
+                               &#x201C;role=list&#x201D; on the parent.
+                       </assert>
+               </rule>
+
+               <rule context='address@hidden"row"]'>
+                       <assert test='../@role="grid" or 
+                                     ../../@role="grid" or
+                                                 ../@role="treegrid" or 
+                                     ../../@role="treegrid"'>
+                               An element with &#x201C;role=row&#x201D; 
requires 
+                               &#x201C;role=treegrid&#x201D; or 
&#x201C;role=grid&#x201D; on the parent or grandparent.
+                       </assert>
+               </rule> 
+               <!-- XXX hoping for a spec change so not bothering with the 
reciprocal case -->
+
+               <rule context='address@hidden"gridcell"]'>
+                       <assert test='../@role="row"'>
+                               An element with &#x201C;role=gridcell&#x201D; 
requires 
+                               &#x201C;role=row&#x201D; on the parent.
+                       </assert>
+               </rule>
+               <!-- XXX hoping for a spec change so not bothering with the 
reciprocal case -->
+
+       </pattern>
+       
+       <pattern name='Not Option'>
+               <rule context='*[not(@role="option")]'>
+                       <report test='../@role="listbox"'>
+                               An element must not be a child of
+                               &#x201C;role=listbox&#x201D; unless it has 
&#x201C;role=option&#x201D;.
+                       </report>
+               </rule>
+       </pattern>
+       
+       <pattern name='Not menuitem*'>
+               <rule context='*[not(@role="menuitem" or 
+                                    @role="menuitemcheckbox" or 
+                                    @role="menuitemradio")]'>
+                       <report test='../@role="menu"'>
+                               An element must not be a child of
+                               &#x201C;role=menu&#x201D; unless it has 
+                               &#x201C;role=menuitem&#x201D;, 
+                               &#x201C;role=menuitemcheckbox&#x201D; or 
+                               &#x201C;role=menuitemradio&#x201D;.
+                       </report>
+               </rule>
+       </pattern>
+       
+       <pattern name='Not treeitem'>
+               <rule context='*[not(@role="treeitem")]'>
+                       <report test='../@role="tree"'>
+                               An element must not be a child of
+                               &#x201C;role=tree&#x201D; unless it has 
+                               &#x201C;role=treeitem&#x201D;.
+                       </report>
+               </rule>
+       </pattern>
+       
+       <pattern name='Not listitem'>
+               <rule context='*[not(@role="listitem")]'>
+                       <report test='../@role="list"'>
+                               An element must not be a child of
+                               &#x201C;role=list&#x201D; unless it has 
+                               &#x201C;role=listitem&#x201D;.
+                       </report>
+               </rule>
+               <!-- XXX role=group omitted due to lack of detail in spec -->
+       </pattern>
+       
+       <pattern name='Not radio'>
+               <rule context='*[not(@role="radio")]'>
+                       <report test='../@role="radiogroup"'>
+                               An element must not be a child of
+                               &#x201C;role=radiogroup&#x201D; unless it has 
+                               &#x201C;role=radio&#x201D;.
+                       </report>
+               </rule>
+       </pattern>
+       
+       <pattern name='Not gridcell'>
+               <rule context='*[not(@role="gridcell")]'>
+                       <report test='../@role="row"'>
+                               An element must not be a child of
+                               &#x201C;role=row&#x201D; unless it has 
+                               &#x201C;role=gridcell&#x201D;.
+                       </report>
+               </rule>
+       </pattern>
+       
+       <pattern name='Not tab'>
+               <rule context='*[not(@role="tab")]'>
+                       <report test='../@role="tablist"'>
+                               An element must not be a child of
+                               &#x201C;role=tablist&#x201D; unless it has 
+                               &#x201C;role=role&#x201D;.
+                       </report>
+               </rule>
+       </pattern>
+
+  <!-- XXX combobox requires a listbox child -->
+       
+       <pattern name='aria-activedescendant must refer to a descendant'>
+               <rule context='address@hidden'>
+                       <assert test='descendant::address@hidden = 
current()/@aria-activedescendant]'>
+                               The &#x201C;aria-activedescendant&#x201D; 
attribute must refer to a 
+                               descendant element.
+                       </assert>
+               </rule>
+       </pattern>
+
+       <pattern name='controls must not dangle'>
+               <rule context='address@hidden'>
+                 <assert test='//address@hidden = current()/@aria-controls]'>
+                               The &#x201C;aria-controls&#x201D; attribute 
must point to an element in the 
+                               same document.
+                       </assert>
+               </rule>
+       </pattern>
+
+       <pattern name='describedby must not dangle'>
+               <rule context='address@hidden'>
+                 <assert test='//address@hidden = 
current()/@aria-describedby]'>
+                               The &#x201C;aria-describedby&#x201D; attribute 
must point to an element in the 
+                               same document.
+                       </assert>
+               </rule>
+       </pattern>
+
+       <pattern name='flowto must not dangle'>
+               <rule context='address@hidden'>
+                 <assert test='//address@hidden = current()/@aria-flowto]'>
+                               The &#x201C;aria-flowto&#x201D; attribute must 
point to an element in the 
+                               same document.
+                       </assert>
+               </rule>
+       </pattern>
+
+       <pattern name='labelledby must not dangle'>
+               <rule context='address@hidden'>
+                 <assert test='//address@hidden = current()/@aria-labelledby]'>
+                               The &#x201C;aria-labelledby&#x201D; attribute 
must point to an element in the 
+                               same document.
+                       </assert>
+               </rule>
+       </pattern>
+
+       <pattern name='owns must not dangle'>
+               <rule context='address@hidden'>
+                 <assert test='//address@hidden = current()/@aria-owns]'>
+                               The &#x201C;aria-owns&#x201D; attribute must 
point to an element in the 
+                               same document.
+                       </assert>
+               </rule>
+       </pattern>
+
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-->
+<!--                               Warnings                                  
-->
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-->
+       <pattern name="Warnings for HTML5 attributes that are obsolete but 
conforming">
+               <rule context='h:img'>
+                       <report test='@border' role='warning'>
+                               The &#x201C;border&#x201D; attribute on the 
&#x201C;img&#x201D; element is obsolete.
+                               Consider specifying &#x201C;img { border: 0; 
}&#x201C; in CSS instead.
+                       </report>
+               </rule>
+               <rule context='h:script[translate(@language, "JAVSCRIPT", 
"javscript")="javascript"]'>
+                       <report test='not(@type) or translate(@type, 
"EXJAVSCRIPT", "exjavscript")="text/javascript"' role='warning'>
+                               The &#x201C;language&#x201D; attribute on the 
&#x201C;script&#x201D; element is obsolete. You can safely omit it.
+                       </report>
+               </rule>
+               <rule context='h:a'>
+                       <report test='@name' role='warning'>
+                               The &#x201C;name&#x201D; attribute on the 
&#x201C;a&#x201D; element is obsolete. Consider putting an
+                               &#x201C;id&#x201D; attribute on the nearest 
container instead.
+                       </report>
+               </rule>
+       </pattern>
+
+       <pattern name="Other warnings">
+               <rule context='h:video|h:audio'>
+                       <report test='count(h:address@hidden) > 1' 
role='warning'>
+                               &#x201C;<name/>&#x201D; element has more than 
one &#x201C;track&#x201D;
+                               child element with a &#x201C;default&#x201D; 
attribute.
+                       </report>
+               </rule>
+       </pattern>
+
+</schema>
diff --git a/packages/html5-schema/block.rnc b/packages/html5-schema/block.rnc
new file mode 100644
index 0000000..6d0eb0d
--- /dev/null
+++ b/packages/html5-schema/block.rnc
@@ -0,0 +1,250 @@
+datatypes w = "http://whattf.org/datatype-draft";
+
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Basic Prose Markup                    #
+# #####################################################################
+
+# #####################################################################
+## Paragraph-Level
+
+## Paragraph: <p>
+
+       p.elem =
+               element p { p.inner & p.attrs }
+       p.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       p.inner =
+               ( common.inner.phrasing ) # REVISIT lists in span?
+
+       common.elem.flow |= p.elem
+
+## Hint Transition: <hr>
+
+       hr.elem =
+               element hr { hr.inner & hr.attrs }
+       hr.attrs =
+               (       common.attrs
+               &       common.attrs.aria.role.separator?
+               )
+       hr.inner =
+               ( empty )
+
+       common.elem.flow |= hr.elem
+
+# #####################################################################
+## Preformatting Blocks
+
+## Preformatted Text: <pre>
+
+       pre.elem =
+               element pre { pre.inner & pre.attrs }
+       pre.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       pre.inner =
+               ( common.inner.phrasing )
+
+       common.elem.flow |= pre.elem
+
+# #####################################################################
+## Simple Lists
+
+## Unordered List: <ul>
+
+       ul.elem =
+               element ul { ul.inner & ul.attrs }
+       ul.attrs =
+               (       common.attrs
+               &       (       (       common.attrs.aria.role.directory
+                               |       common.attrs.aria.role.group
+                               |       common.attrs.aria.role.list
+                               |       common.attrs.aria.role.listbox
+                               |       common.attrs.aria.role.menu
+                               |       common.attrs.aria.role.menubar
+                               |       common.attrs.aria.role.tablist
+                               |       common.attrs.aria.role.toolbar
+                               |       common.attrs.aria.role.tree
+                               |       common.attrs.aria.role.presentation
+                               )
+                               |       common.attrs.aria.implicit.list
+                       )?
+               )
+       ul.inner =
+               (       li.elem*
+               &       common.elem.script-supporting*
+               )
+
+       common.elem.flow |= ul.elem
+
+## Unordered List Item: <li>
+
+       li.elem =
+               element li { li.inner & li.attrs }
+       li.attrs =
+               (       common.attrs 
+               &       (       common.attrs.aria.implicit.listitem
+                       |       common.attrs.aria.role.listitem
+                       |       common.attrs.aria.role.menuitem
+                       |       common.attrs.aria.role.menuitemcheckbox
+                       |       common.attrs.aria.role.menuitemradio
+                       |       common.attrs.aria.role.option
+                       |       common.attrs.aria.role.tab
+                       |       common.attrs.aria.role.treeitem
+                       |       common.attrs.aria.role.separator
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+       li.inner =
+               ( common.inner.flow )
+
+## Ordered List: <ol>
+
+       ol.elem =
+               element ol { ol.inner & ol.attrs }
+       ol.attrs =
+               (       common.attrs
+               &       ol.attrs.start?
+               &       ol.attrs.reversed?
+               &       ol.attrs.type?
+               &       (       (       common.attrs.aria.role.directory
+                               |       common.attrs.aria.role.group
+                               |       common.attrs.aria.role.list
+                               |       common.attrs.aria.role.listbox
+                               |       common.attrs.aria.role.menu
+                               |       common.attrs.aria.role.menubar
+                               |       common.attrs.aria.role.tablist
+                               |       common.attrs.aria.role.toolbar
+                               |       common.attrs.aria.role.tree
+                               |       common.attrs.aria.role.presentation
+                               )
+                               |       common.attrs.aria.implicit.list
+                       )?
+               )
+               ol.attrs.start =
+                       attribute start {
+                               common.data.integer
+                       }
+               ol.attrs.reversed =
+                       attribute reversed {
+                               w:string "reversed" | w:string ""
+                       }
+               ol.attrs.type =
+                       attribute type {
+                               w:string "1" | w:string "a" | w:string "A" | 
w:string "i" | w:string "I"
+                       }
+       ol.inner =
+               (       oli.elem*
+               &       common.elem.script-supporting*
+               )
+
+       common.elem.flow |= ol.elem
+
+## Ordered List Item: <li>
+
+       oli.elem =
+               element li { oli.inner & oli.attrs }
+       oli.attrs =
+               (       common.attrs
+               &       oli.attrs.value?
+               &       (       common.attrs.aria.implicit.listitem
+                       |       common.attrs.aria.role.listitem
+                       |       common.attrs.aria.role.menuitem
+                       |       common.attrs.aria.role.menuitemcheckbox
+                       |       common.attrs.aria.role.menuitemradio
+                       |       common.attrs.aria.role.option
+                       |       common.attrs.aria.role.tab
+                       |       common.attrs.aria.role.treeitem
+                       |       common.attrs.aria.role.separator
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+               oli.attrs.value =
+                       attribute value {
+                               common.data.integer
+                       }
+       oli.inner =
+               ( common.inner.flow )
+
+# #####################################################################
+## Definition Lists
+
+## Definition List: <dl>
+
+       dl.elem =
+               element dl { dl.inner & dl.attrs }
+       dl.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.implicit.list
+                       |       common.attrs.aria.role.list
+                       )?
+               )
+       dl.inner =
+               (       (       (       dt.elem
+                               &       common.elem.script-supporting*
+                               )+
+                       ,
+                               (       dd.elem
+                               &       common.elem.script-supporting*
+                               )+
+                       )*
+               )
+
+       common.elem.flow |= dl.elem
+
+## Definition Term: <dt>
+
+       dt.elem =
+               element dt { dt.inner & dt.attrs }
+       dt.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       dt.inner =
+               ( common.inner.flow )
+
+## Definition Description: <dd>
+
+       dd.elem =
+               element dd { dd.inner & dd.attrs }
+       dd.elem.phrasing =
+               element dd { dd.inner.phrasing & dd.attrs }
+       dd.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       dd.inner =
+               ( common.inner.flow )
+       dd.inner.phrasing =
+               ( common.inner.phrasing )
+
+# #####################################################################
+## Miscellaneous Elements
+
+## Generic Container: <div>
+
+       div.elem =
+               element div { div.inner & div.attrs }
+       div.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       div.inner =
+               ( common.inner.flow )
+
+       common.elem.flow |= div.elem
+
+## Title or Explanatory Caption: <legend>
+
+       legend.elem =
+               element legend { legend.inner & legend.attrs }
+       legend.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )       
+       legend.inner =
+               ( common.inner.phrasing )
diff --git a/packages/html5-schema/common.rnc b/packages/html5-schema/common.rnc
new file mode 100644
index 0000000..68d9acc
--- /dev/null
+++ b/packages/html5-schema/common.rnc
@@ -0,0 +1,526 @@
+datatypes w = "http://whattf.org/datatype-draft";
+
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Common Definitions                    #
+# #####################################################################
+
+
+# #####################################################################
+##  Language Parameters - redefine in inclusion block as necessary    #
+# #####################################################################
+
+## HTML vs. XHTML restrictions
+
+       XMLonly = empty
+       HTMLonly = notAllowed
+
+## HTML 4 Compatibility - set to notAllowed to disallow markup introduced in 
HTML 5
+#                         (This only affects mixed-version modules; wholly 
HTML5
+#                          modules should simply be left out of the inclusion 
list.)
+
+       v5only = empty
+
+## HTML Compatibility Switches - set to notAllowed to disallow
+
+       ## XML features that can't be roundtripped HTML <-> XHTML
+       #  (xml:base on elements other than <html>)
+       nonRoundtrippable = empty
+
+       ## XML features that can't be serialized as HTML
+       nonHTMLizable = empty
+
+## features that are not part of the W3C HTML spec
+       nonW3C = empty
+
+# #####################################################################
+##  Wildcards                                                         #
+# #####################################################################
+
+## Any attribute from any namespace
+
+       common.attr.anything =
+               attribute * { text }*
+
+## Any element from any namespace
+
+       common.elem.anything =
+               element * { common.inner.anything & common.attr.anything }
+
+## Any content from any namespace
+
+       common.inner.anything =
+               (       text
+               &       common.elem.anything*
+               )
+
+# #####################################################################
+##  Common Element Classes                                            #
+# #####################################################################
+
+## Metadata Elements
+
+       common.elem.metadata =
+               ( notAllowed )
+
+## Phrase Elements
+
+       common.elem.phrasing =
+               ( notAllowed )
+
+## Prose Elements
+
+       common.elem.flow =
+               ( common.elem.phrasing )
+
+
+# #####################################################################
+##  Common Content Models                                             #
+# #####################################################################
+
+## Metadata Content
+
+       common.inner.metadata =
+               ( common.elem.metadata* )
+
+## Phrase Content
+
+       common.inner.phrasing =
+               ( text & common.elem.phrasing* )
+
+## Prose Content
+
+       common.inner.transparent.flow =
+               ( text & common.elem.flow* )
+
+       common.inner.flow =
+               (       style.elem.scoped*,
+                       (       text
+                       &       common.elem.flow*
+                       )
+               )
+
+# #####################################################################
+##  Common Attributes                                                 #
+# #####################################################################
+
+# When updating, check <bdo> definition too
+
+common.attrs =
+       (       common.attrs.basic
+       &       common.attrs.i18n
+       &       common.attrs.present
+       &       common.attrs.other
+       )
+
+common.attrs.basic =
+       (       common.attrs.id?
+       &       common.attrs.class?
+       &       common.attrs.title?
+       &       common.attrs.base?
+       &       common.attrs.space?
+       )
+       common.attrs.id =
+               attribute id {
+                       common.data.id
+               }
+       common.attrs.class =
+               attribute class {
+                       common.data.tokens
+               }
+       common.attrs.title =
+               attribute title {
+                       text
+               }
+       common.attrs.base =
+               common.attrs.xmlbase
+               & nonRoundtrippable
+       common.attrs.xmlbase =
+               attribute xml:base {
+                       common.data.uri
+               } & XMLonly
+       common.attrs.space =
+               common.attrs.xmlspace
+       common.attrs.xmlspace =
+               attribute xml:space {
+                       string "preserve" | string "default"
+               } & XMLonly
+
+common.attrs.i18n =
+       (       common.attrs.dir?
+       &       common.attrs.language?
+       &       common.attrs.translate?
+       )
+       common.attrs.dir =
+               attribute dir {
+                       w:string "ltr" | w:string "rtl" | w:string "auto"
+               }
+       # This lang definition is a hack for enviroments where
+       # the HTML5 parser maps lang to xml:lang.
+       # Sameness check left to Schematron
+       common.attrs.language =
+               (       common.attrs.xmllang?
+               &       common.attrs.lang?
+               )
+       common.attrs.lang =
+               attribute lang {
+                       common.data.langcode
+               } & XMLonly
+       common.attrs.xmllang =
+               attribute xml:lang {
+                       common.data.langcode
+               }
+#      common.attrs.language =
+#              (       common.attrs.lang
+#              |       common.attrs.xmllang
+#              )
+#      common.attrs.lang =
+#              attribute lang {
+#                      common.data.langcode
+#              } & HTMLonly
+#      common.attrs.xmllang =
+#              attribute xml:lang {
+#                      common.data.langcode
+#              } & XMLonly
+       common.attrs.translate =
+               attribute translate {
+                       w:string "" | w:string "yes" | w:string "no"
+               }
+
+common.attrs.present =
+       (       common.attrs.style?
+       &       common.attrs.tabindex?
+       &       common.attrs.accesskey?
+       )
+       common.attrs.style =
+               attribute style {
+                       string
+               }
+       common.attrs.tabindex =
+               attribute tabindex {
+                       common.data.integer
+               }
+               # REVISIT move style to a module and bundle tabindex with ARIA
+       common.attrs.accesskey =
+               attribute accesskey {
+                       common.data.keylabellist
+               }
+
+common.attrs.other =
+       empty
+
+# #####################################################################
+##  Common Datatypes                                                  #
+# #####################################################################
+
+## Names and Tokens
+
+       common.data.tokens =
+               list { token* }
+
+       common.data.browsing-context =
+               w:browsing-context
+
+       common.data.browsing-context-or-keyword =
+               w:browsing-context-or-keyword
+#              xsd:string {
+#                      pattern = 
"()|([^_].*)|(_[bB][lL][aA][nN][kK])|(_[sS][eE][lL][fF])|(_[pP][aA][rR][eE][nN][tT])|(_[tT][oO][pP])"
+#              }
+
+
+## IDs and IDREFs
+
+       common.data.id =
+               w:ID
+#              xsd:string {
+#                      pattern = "\S+"
+#              }
+
+       common.data.idref =
+               w:IDREF
+               
+       common.data.idrefs =
+               w:IDREFS
+
+       common.data.name =
+               w:ID #FIXME
+
+       common.data.hash-name =
+               w:hash-name     
+#              xsd:string {
+#                      pattern = "#.+"
+#              }
+
+## Numerical
+
+       common.data.integer =
+               w:integer
+#              xsd:string {
+#                      pattern = "-?[0-9]+"
+#              }
+
+       common.data.integer.positive =
+               w:integer-positive
+#              xsd:string {
+#                      pattern = "0*[1-9][0-9]*"
+#              }
+
+       common.data.integer.non-negative =
+               w:integer-non-negative
+#              xsd:string {
+#                      pattern = "[0-9]+"
+#              }
+               
+#      common.data.percent =
+#              xsd:string {
+#                      pattern = "(100)|([1-9]?[0-9](\.[0-9]+)?)%"
+#              }
+               
+       common.data.float =
+               w:float
+#              xsd:string {
+#                      pattern = "-?[0-9]+(\.[0-9]+)?([eE]-?[0-9]+)?"
+#              }
+
+       common.data.float.positive =
+               w:float-positive
+#              xsd:string {
+#                      pattern = 
"(0*[1-9][0-9]*(\.[0-9]+)?)|([0-9]+(\.0*[1-9][0-9]*)?)([eE]-?[0-9]+)?"
+#              }
+               
+       common.data.float.non-negative =
+               w:float-non-negative
+#              xsd:string {
+#                      pattern = "[0-9]+(\.[0-9]+)?([eE]-?[0-9]+)?"
+#              }
+               
+## Temporal
+
+       common.data.datetime =
+               w:datetime-tz
+
+       common.data.date-or-time =
+               w:date-or-time
+
+       common.data.date =
+               w:date
+
+       common.data.time-datetime =
+               w:time-datetime
+
+## IRIs
+
+       common.data.uri =
+               # allow either a non-empty IRI ref or zero or more HTML
+               # space characters (which are: space, tab, LF, FF, CR)
+               (       w:iri-ref
+               |       xsd:string {
+                               pattern = "[ \x{0A}-\x{0D}]*"
+                               # NOTE The range above incorrectly allows U+000B
+                               # in addition to the HTML space characters; but
+                               # that's not a problem in practice because HTML
+                               # and XML parsers will both catch any U+000B
+                               # and report an error for it before that pattern
+                               # ever gets evaluated.
+                       }
+               )
+
+       common.data.uri.non-empty =
+               w:iri-ref
+
+       common.data.uris =
+               list { w:iri-ref* }
+
+       common.data.uri.absolute =
+               w:iri
+
+## <link type='icon'> sizes
+
+       common.data.sizes =
+#              list { w:sizes }
+               list {
+                       xsd:string {
+                               pattern = "[1-9][0-9]*x[1-9][0-9]*"
+                       }+
+               }
+
+## MIME types
+
+       common.data.mimetype =
+               w:mime-type
+
+## Encodings
+
+       common.data.charset =
+               w:charset
+
+       common.data.meta-charset =
+               w:meta-charset
+
+## Refresh
+
+       common.data.refresh =
+               w:refresh
+
+## Default style
+
+       common.data.default-style =
+        string
+#              w:default-style
+
+## X-UA-Compatible
+
+       common.data.x-ua-compatible =
+               string
+
+## Media Queries
+
+       common.data.mediaquery =
+               w:media-query
+
+## Language Codes
+
+       common.data.langcode =
+               w:string "" | w:language
+
+## List of Key Labels
+       common.data.keylabellist =
+               w:keylabellist
+
+## List of Source Sizes
+       common.data.source.size.list =
+               w:source-size-list
+
+## Subresource Integrity
+       common.data.integrity =
+               w:integrity-metadata
+
+## Content Security Policy
+       common.data.content-security-policy =
+               w:content-security-policy
+
+## List of sandbox keywords
+       common.data.sandbox-allow-list =
+               w:string "" | w:sandbox-allow-list
+
+## Microdata Properties
+  common.data.microdata-properties =
+    list { w:microdata-property+ }
+
+## Zero
+  common.data.zero =
+    w:zero
+
+## ECMAScript FunctionBody
+  common.data.functionbody =
+    w:functionbody
+
+# #####################################################################
+##  WF2 Module Hook                                                   #
+# #####################################################################
+               
+common-form.attrs.form = ( notAllowed )
+
+# #####################################################################
+##  Script-supporting elements
+# #####################################################################
+
+common.elem.script-supporting = ( notAllowed )
+
+# #####################################################################
+##  ARIA Module Hooks                                                 #
+# #####################################################################
+
+common.attrs.aria = ( notAllowed )
+common.attrs.aria.role.alert = ( notAllowed )
+common.attrs.aria.role.alertdialog = ( notAllowed )
+common.attrs.aria.role.application = ( notAllowed )
+common.attrs.aria.role.article = ( notAllowed )
+common.attrs.aria.role.banner = ( notAllowed )
+common.attrs.aria.role.button = ( notAllowed )
+common.attrs.aria.role.checkbox = ( notAllowed )
+common.attrs.aria.role.combobox = ( notAllowed )
+common.attrs.aria.role.complementary = ( notAllowed )
+common.attrs.aria.role.contentinfo = ( notAllowed )
+common.attrs.aria.role.dialog = ( notAllowed )
+common.attrs.aria.role.directory = ( notAllowed )
+common.attrs.aria.role.document = ( notAllowed )
+common.attrs.aria.role.group = ( notAllowed )
+common.attrs.aria.role.heading = ( notAllowed )
+common.attrs.aria.role.img = ( notAllowed )
+common.attrs.aria.role.link = ( notAllowed )
+common.attrs.aria.role.list = ( notAllowed )
+common.attrs.aria.role.listitem = ( notAllowed )
+common.attrs.aria.role.log = ( notAllowed )
+common.attrs.aria.role.listbox = ( notAllowed )
+common.attrs.aria.role.main = ( notAllowed )
+common.attrs.aria.role.marquee = ( notAllowed )
+common.attrs.aria.role.menu = ( notAllowed )
+common.attrs.aria.role.menubar = ( notAllowed )
+common.attrs.aria.role.menuitem = ( notAllowed )
+common.attrs.aria.role.menuitemcheckbox = ( notAllowed )
+common.attrs.aria.role.menuitemradio = ( notAllowed )
+common.attrs.aria.role.note = ( notAllowed )
+common.attrs.aria.role.option = ( notAllowed )
+common.attrs.aria.role.presentation = ( notAllowed )
+common.attrs.aria.role.progressbar = ( notAllowed )
+common.attrs.aria.role.radio = ( notAllowed )
+common.attrs.aria.role.region = ( notAllowed )
+common.attrs.aria.role.search = ( notAllowed )
+common.attrs.aria.role.separator = ( notAllowed )
+common.attrs.aria.role.slider = ( notAllowed )
+common.attrs.aria.role.spinbutton = ( notAllowed )
+common.attrs.aria.role.status = ( notAllowed )
+common.attrs.aria.role.switch = ( notAllowed )
+common.attrs.aria.role.tab = ( notAllowed )
+common.attrs.aria.role.tablist = ( notAllowed )
+common.attrs.aria.role.tabpanel = ( notAllowed )
+common.attrs.aria.role.textbox = ( notAllowed )
+common.attrs.aria.role.toolbar = ( notAllowed )
+common.attrs.aria.role.tree = ( notAllowed )
+common.attrs.aria.role.treeitem = ( notAllowed )
+common.attrs.aria.implicit.article = ( notAllowed )
+common.attrs.aria.implicit.banner = ( notAllowed )
+common.attrs.aria.implicit.button = ( notAllowed )
+common.attrs.aria.implicit.checkbox = ( notAllowed )
+common.attrs.aria.implicit.column-or-row-header = ( notAllowed )
+common.attrs.aria.implicit.combobox = ( notAllowed )
+common.attrs.aria.implicit.complementary = ( notAllowed )
+common.attrs.aria.implicit.contentinfo = ( notAllowed )
+common.attrs.aria.implicit.dialog = ( notAllowed )
+common.attrs.aria.implicit.document = ( notAllowed )
+common.attrs.aria.implicit.form = ( notAllowed )
+common.attrs.aria.implicit.group = ( notAllowed )
+common.attrs.aria.implicit.heading = ( notAllowed )
+common.attrs.aria.implicit.img = ( notAllowed )
+common.attrs.aria.implicit.landmark = ( notAllowed )
+common.attrs.aria.implicit.link = ( notAllowed )
+common.attrs.aria.implicit.list = ( notAllowed )
+common.attrs.aria.implicit.listbox = ( notAllowed )
+common.attrs.aria.implicit.listitem = ( notAllowed )
+common.attrs.aria.implicit.main = ( notAllowed )
+common.attrs.aria.implicit.navigation = ( notAllowed )
+common.attrs.aria.implicit.option = ( notAllowed )
+common.attrs.aria.implicit.progressbar = ( notAllowed )
+common.attrs.aria.implicit.radio = ( notAllowed )
+common.attrs.aria.implicit.region = ( notAllowed )
+common.attrs.aria.implicit.section = ( notAllowed )
+common.attrs.aria.implicit.select = ( notAllowed )
+common.attrs.aria.implicit.slider = ( notAllowed )
+common.attrs.aria.implicit.spinbutton = ( notAllowed )
+common.attrs.aria.implicit.status = ( notAllowed )
+common.attrs.aria.implicit.structure = ( notAllowed )
+common.attrs.aria.implicit.textbox = ( notAllowed )
+common.attrs.aria.implicit.toolbar = ( notAllowed )
+common.attrs.aria.prop.readonly = ( notAllowed )
+common.attrs.aria.landmark.application = ( notAllowed )
+common.attrs.aria.landmark.banner = ( notAllowed )
+common.attrs.aria.landmark.complementary = ( notAllowed )
+common.attrs.aria.landmark.contentinfo = ( notAllowed )
+common.attrs.aria.landmark.form = ( notAllowed )
+common.attrs.aria.landmark.main = ( notAllowed )
+common.attrs.aria.landmark.navigation = ( notAllowed )
+common.attrs.aria.landmark.search = ( notAllowed )
+# per ARIA spec: article, document, and note are not actually landmarks
+common.attrs.aria.landmark.article = ( notAllowed )
+common.attrs.aria.landmark.document = ( notAllowed )
+common.attrs.aria.landmark.note = ( notAllowed )
diff --git a/packages/html5-schema/core-scripting.rnc 
b/packages/html5-schema/core-scripting.rnc
new file mode 100644
index 0000000..33e8ff7
--- /dev/null
+++ b/packages/html5-schema/core-scripting.rnc
@@ -0,0 +1,386 @@
+datatypes w = "http://whattf.org/datatype-draft";
+
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Core Scripting                        #
+# #####################################################################
+
+# #####################################################################
+## Scripting Elements
+
+## Inline Scripts: <script>
+
+       script.elem.embedded =
+               element script { script.inner.embedded & script.attrs.embedded }
+       script.attrs.embedded =
+               (       common.attrs
+               &       script.attrs.type?
+               &       script.attrs.language? # restricted in Schematron
+               &       script.attrs.integrity?
+               &       script.attrs.nonce?
+               &       embedded.content.attrs.crossorigin?
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+       script.elem.imported =
+               element script { script.inner.imported & script.attrs.imported }
+       script.attrs.imported =
+               (       common.attrs
+               &       script.attrs.src?
+               &       script.attrs.defer?
+               &       script.attrs.async?
+               &       script.attrs.type?
+               &       script.attrs.charset?
+               &       script.attrs.language? # restricted in Schematron
+               &       script.attrs.integrity?
+               &       script.attrs.nonce?
+               &       embedded.content.attrs.crossorigin?
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               script.attrs.src =
+                       attribute src {
+                               common.data.uri.non-empty
+                       }
+               script.attrs.defer =
+                       attribute defer {
+                               w:string "defer" | w:string ""
+                       }
+               script.attrs.async =
+                       attribute async {
+                               w:string "async" | w:string ""
+                       } & v5only
+               script.attrs.type =
+                       attribute type {
+                               common.data.mimetype # XXX without charset 
parameter!
+                       }
+               script.attrs.charset =
+                       attribute charset {
+                               common.data.charset
+                       }
+               script.attrs.language =
+                       attribute language {
+                               string
+                       }
+               script.attrs.integrity =
+                       attribute integrity {
+                               common.data.integrity
+                       }
+               script.attrs.nonce =
+                       attribute nonce{
+                               string
+                       }
+       script.inner.embedded =
+               ( common.inner.anything )
+       script.inner.imported =
+               ( common.inner.anything )
+               
+       script.elem = 
+               (       script.elem.embedded
+               |       script.elem.imported
+               )
+               
+       common.elem.metadata |= script.elem
+       common.elem.phrasing |= script.elem
+
+## Fallback Unscripted Content: <noscript>
+
+       noscript.elem.head =
+               element noscript { noscript.inner.head & noscript.attrs }
+               & HTMLonly
+               noscript.inner.head = 
+                       (       link.elem
+                       |       meta.http-equiv.default-style.elem
+                       |       meta.http-equiv.refresh.elem
+                       |       style.elem
+                       )*
+       noscript.elem.phrasing =
+               element noscript { noscript.inner.phrasing & noscript.attrs }
+               & HTMLonly
+       noscript.inner.phrasing =
+               ( common.inner.phrasing )
+       noscript.elem.flow =
+               element noscript { noscript.inner.flow & noscript.attrs }
+               & HTMLonly
+       noscript.inner.flow =
+               ( common.inner.flow )
+       noscript.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+
+       common.elem.metadata |= noscript.elem.head
+       common.elem.phrasing |= noscript.elem.phrasing
+       common.elem.flow |= noscript.elem.flow
+
+# #####################################################################
+## Event Handler Attribute Definitions
+
+       common.attrs.scripting &=
+               (       scripting.attr.onabort?
+               &       scripting.attr.onautocomplete?
+               &       scripting.attr.onautocompleteerror?
+               &       scripting.attr.onblur?
+               &       scripting.attr.oncancel?
+               &       scripting.attr.oncanplay?
+               &       scripting.attr.oncanplaythrough?
+               &       scripting.attr.onchange?
+               &       scripting.attr.onclick?
+               &       scripting.attr.onclose?
+               &       scripting.attr.oncuechange?
+               &       scripting.attr.oncontextmenu?
+               &       scripting.attr.ondblclick?
+               &       scripting.attr.ondrag?
+               &       scripting.attr.ondragend?
+               &       scripting.attr.ondragenter?
+               &       scripting.attr.ondragexit?
+               &       scripting.attr.ondragleave?
+               &       scripting.attr.ondragover?
+               &       scripting.attr.ondragstart?
+               &       scripting.attr.ondrop?
+               &       scripting.attr.ondurationchange?
+               &       scripting.attr.onemptied?
+               &       scripting.attr.onended?
+               &       scripting.attr.onerror?
+               &       scripting.attr.onfocus?
+               &       scripting.attr.oninput?
+               &       scripting.attr.oninvalid?
+               &       scripting.attr.onkeydown?
+               &       scripting.attr.onkeypress?
+               &       scripting.attr.onkeyup?
+               &       scripting.attr.onload?
+               &       scripting.attr.onloadeddata?
+               &       scripting.attr.onloadedmetadata?
+               &       scripting.attr.onloadstart?
+               &       scripting.attr.onmousedown?
+               &       scripting.attr.onmouseenter?
+               &       scripting.attr.onmouseleave?
+               &       scripting.attr.onmousemove?
+               &       scripting.attr.onmouseout?
+               &       scripting.attr.onmouseover?
+               &       scripting.attr.onmouseup?
+               &       scripting.attr.onwheel?
+               &       scripting.attr.onpause?
+               &       scripting.attr.onplay?
+               &       scripting.attr.onplaying?
+               &       scripting.attr.onprogress?
+               &       scripting.attr.onratechange?
+               &       scripting.attr.onreset?
+               &       scripting.attr.onresize?
+               &       scripting.attr.onscroll?
+               &       scripting.attr.onseeked?
+               &       scripting.attr.onseeking?
+               &       scripting.attr.onselect?
+               &       scripting.attr.onshow?
+               &       scripting.attr.onsort?
+               &       scripting.attr.onstalled?
+               &       scripting.attr.onsubmit?
+               &       scripting.attr.onsuspend?
+               &       scripting.attr.ontimeupdate?
+               &       scripting.attr.ontoggle?
+               &       scripting.attr.onvolumechange?
+               &       scripting.attr.onwaiting?
+               )
+               
+       common.attrs.other &= common.attrs.scripting
+
+       scripting.attr.onabort =
+               attribute onabort { common.data.functionbody }
+       scripting.attr.onautocomplete =
+               attribute onautocomplete { common.data.functionbody }
+       scripting.attr.onautocompleteerror =
+               attribute onautocompleteerror { common.data.functionbody }
+       scripting.attr.onblur =
+               attribute onblur { common.data.functionbody }
+       scripting.attr.oncanplay =
+               attribute oncanplay { common.data.functionbody }
+       scripting.attr.oncancel =
+               attribute oncancel { common.data.functionbody }
+       scripting.attr.oncanplaythrough =
+               attribute oncanplaythrough { common.data.functionbody }
+       scripting.attr.onchange =
+               attribute onchange { common.data.functionbody }
+       scripting.attr.onclick =
+               attribute onclick { common.data.functionbody }
+       scripting.attr.onclose =
+               attribute onclose { common.data.functionbody }
+       scripting.attr.oncontextmenu =
+               attribute oncontextmenu { common.data.functionbody }
+       scripting.attr.oncuechange =
+               attribute oncuechange { common.data.functionbody }
+       scripting.attr.ondblclick =
+               attribute ondblclick { common.data.functionbody }
+       scripting.attr.ondrag =
+               attribute ondrag { common.data.functionbody }
+       scripting.attr.ondragend =
+               attribute ondragend { common.data.functionbody }
+       scripting.attr.ondragenter =
+               attribute ondragenter { common.data.functionbody }
+       scripting.attr.ondragexit =
+               attribute ondragexit { common.data.functionbody }
+       scripting.attr.ondragleave =
+               attribute ondragleave { common.data.functionbody }
+       scripting.attr.ondragover =
+               attribute ondragover { common.data.functionbody }
+       scripting.attr.ondragstart =
+               attribute ondragstart { common.data.functionbody }
+       scripting.attr.ondrop =
+               attribute ondrop { common.data.functionbody }
+       scripting.attr.ondurationchange =
+               attribute ondurationchange { common.data.functionbody }
+       scripting.attr.onemptied =
+               attribute onemptied { common.data.functionbody }
+       scripting.attr.onended =
+               attribute onended { common.data.functionbody }
+       scripting.attr.onerror =
+               attribute onerror { common.data.functionbody }
+       scripting.attr.onfocus =
+               attribute onfocus { common.data.functionbody }
+       scripting.attr.onformchange =
+               attribute onformchange { common.data.functionbody }
+       scripting.attr.onforminput =
+               attribute onforminput { common.data.functionbody }
+       scripting.attr.oninput =
+               attribute oninput { common.data.functionbody }
+       scripting.attr.oninvalid =
+               attribute oninvalid { common.data.functionbody }
+       scripting.attr.onkeydown =
+               attribute onkeydown { common.data.functionbody }
+       scripting.attr.onkeypress =
+               attribute onkeypress { common.data.functionbody }
+       scripting.attr.onkeyup =
+               attribute onkeyup { common.data.functionbody }
+       scripting.attr.onload =
+               attribute onload { common.data.functionbody }
+       scripting.attr.onloadeddata =
+               attribute onloadeddata { common.data.functionbody }
+       scripting.attr.onloadedmetadata =
+               attribute onloadedmetadata { common.data.functionbody }
+       scripting.attr.onloadstart =
+               attribute onloadstart { common.data.functionbody }
+       scripting.attr.onmousedown =
+               attribute onmousedown { common.data.functionbody }
+       scripting.attr.onmouseenter =
+               attribute onmouseenter { common.data.functionbody }
+       scripting.attr.onmouseleave =
+               attribute onmouseleave { common.data.functionbody }
+       scripting.attr.onmousemove =
+               attribute onmousemove { common.data.functionbody }
+       scripting.attr.onmouseout =
+               attribute onmouseout { common.data.functionbody }
+       scripting.attr.onmouseover =
+               attribute onmouseover { common.data.functionbody }
+       scripting.attr.onmouseup =
+               attribute onmouseup { common.data.functionbody }
+       scripting.attr.onwheel =
+               attribute onwheel { common.data.functionbody }
+       scripting.attr.onpause =
+               attribute onpause { common.data.functionbody }
+       scripting.attr.onplay =
+               attribute onplay { common.data.functionbody }
+       scripting.attr.onplaying =
+               attribute onplaying { common.data.functionbody }
+       scripting.attr.onprogress =
+               attribute onprogress { common.data.functionbody }
+       scripting.attr.onratechange =
+               attribute onratechange { common.data.functionbody }
+       scripting.attr.onreset =
+               attribute onreset { common.data.functionbody }
+       scripting.attr.onresize =
+               attribute onresize { common.data.functionbody }
+       scripting.attr.onscroll =
+               attribute onscroll { common.data.functionbody }
+       scripting.attr.onseeked =
+               attribute onseeked { common.data.functionbody }
+       scripting.attr.onseeking =
+               attribute onseeking { common.data.functionbody }
+       scripting.attr.onselect =
+               attribute onselect { common.data.functionbody }
+       scripting.attr.onshow =
+               attribute onshow { common.data.functionbody }
+       scripting.attr.onsort =
+               attribute onsort { common.data.functionbody }
+       scripting.attr.onstalled =
+               attribute onstalled { common.data.functionbody }
+       scripting.attr.onsubmit =
+               attribute onsubmit { common.data.functionbody }
+       scripting.attr.onsuspend =
+               attribute onsuspend { common.data.functionbody }
+       scripting.attr.ontimeupdate =
+               attribute ontimeupdate { common.data.functionbody }
+       scripting.attr.ontoggle =
+               attribute ontoggle { common.data.functionbody }
+       scripting.attr.onvolumechange =
+               attribute onvolumechange { common.data.functionbody }
+       scripting.attr.onwaiting =
+               attribute onwaiting { common.data.functionbody }
+
+#      scripting.attr.common =
+#              (       scripting.attr.mouse
+#              &       scripting.attr.keyboard
+#              &       scripting.attr.focus
+#              )
+#      
+#      scripting.attr.mouse =
+#              (       scripting.attr.mouse.click?
+#              &       scripting.attr.mouse.dblclick?
+#              &       scripting.attr.mouse.down?
+#              &       scripting.attr.mouse.up?
+#              &       scripting.attr.mouse.over?
+#              &       scripting.attr.mouse.move?
+#              &       scripting.attr.mouse.out?
+#              )
+#              scripting.attr.mouse.click =
+#                      attribute onclick { string }
+#              scripting.attr.mouse.dblclick =
+#                      attribute ondblclick { string }
+#              scripting.attr.mouse.down =
+#                      attribute onmousedown { string }
+#              scripting.attr.mouse.up =
+#                      attribute onmouseup { string }
+#              scripting.attr.mouse.over =
+#                      attribute onmouseover { string }
+#              scripting.attr.mouse.move =
+#                      attribute onmousemove { string }
+#              scripting.attr.mouse.out =
+#                      attribute onmouseout { string }
+#      
+#      scripting.attr.keyboard =
+#              (       scripting.attr.keyboard.press?
+#              &       scripting.attr.keyboard.down?
+#              &       scripting.attr.keyboard.up?
+#              )
+#              scripting.attr.keyboard.press =
+#                      attribute onkeypress { string }
+#              scripting.attr.keyboard.down =
+#                      attribute onkeydown { string }
+#              scripting.attr.keyboard.up =
+#                      attribute onkeyup { string }
+#      
+#      
+#      scripting.attr.focus =
+#              (       scripting.attr.focus.gain?
+#              &       scripting.attr.focus.lose?
+#              )
+#              scripting.attr.focus.gain =
+#                      attribute onfocus { string }
+#              scripting.attr.focus.lose =
+#                      attribute onblur { string }
+#      
+#      scripting.attr.loading =
+#              (       scripting.attr.loading.load?
+#              &       scripting.attr.loading.unload?
+#              )
+#              scripting.attr.loading.load =
+#                      attribute onload { string }
+#              scripting.attr.loading.unload =
+#                      attribute onunload { string }
+
+
+# #####################################################################
+# Event Handler Attribute Assignments
+
+#      body.attrs   &= scripting.attr.loading
diff --git a/packages/html5-schema/data.rnc b/packages/html5-schema/data.rnc
new file mode 100644
index 0000000..991f698
--- /dev/null
+++ b/packages/html5-schema/data.rnc
@@ -0,0 +1,94 @@
+datatypes w = "http://whattf.org/datatype-draft";
+
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Static Data Markup                    #
+# #####################################################################
+
+## Time: <time>
+
+       time.elem =
+               element time { time.inner & time.attrs }
+       time.attrs =
+               (       common.attrs
+               &       time.attrs.datetime?
+               &       common.attrs.aria?
+               )
+               time.attrs.datetime =
+                       attribute datetime {
+                               common.data.time-datetime
+                       }
+               time.attrs.datetime.dateonly =
+                       attribute datetime {
+                               common.data.date
+                       }
+               time.attrs.datetime.tz =
+                       attribute datetime {
+                               common.data.datetime
+                       }
+       time.inner =
+               ( common.inner.phrasing ) #Cannot enforce textContent format 
here
+
+       common.elem.phrasing |= time.elem
+
+## Data: <data>
+
+       data.elem =
+               element data { data.inner & data.attrs }
+       data.attrs =
+               (       common.attrs
+               &       data.attrs.value
+               &       common.attrs.aria?
+               )
+               data.attrs.value =
+                       attribute value {
+                               string
+                       }
+       data.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= data.elem
+
+## Scalar Gauge: <meter>
+
+       meter.elem =
+               element meter { meter.inner & meter.attrs }
+       meter.attrs =
+               (       common.attrs
+               &       meter.attrs.value
+               &       meter.attrs.min?
+               &       meter.attrs.low?
+               &       meter.attrs.high?
+               &       meter.attrs.max?
+               &       meter.attrs.optimum?
+               &       (       common.attrs.aria.implicit.progressbar
+                       |       common.attrs.aria.role.progressbar
+                       )?
+               )
+               meter.attrs.value =
+                       attribute value {
+                               common.data.float
+                       }
+               meter.attrs.min =
+                       attribute min {
+                               common.data.float
+                       }
+               meter.attrs.low =
+                       attribute low {
+                               common.data.float
+                       }
+               meter.attrs.high =
+                       attribute high {
+                               common.data.float
+                       }
+               meter.attrs.max =
+                       attribute max {
+                               common.data.float
+                       }
+               meter.attrs.optimum =
+                       attribute optimum {
+                               common.data.float
+                       }
+       meter.inner =
+               ( common.inner.phrasing ) #Cannot enforce textContent format 
here
+
+       common.elem.phrasing |= meter.elem
diff --git a/packages/html5-schema/embed.rnc b/packages/html5-schema/embed.rnc
new file mode 100644
index 0000000..a46b982
--- /dev/null
+++ b/packages/html5-schema/embed.rnc
@@ -0,0 +1,586 @@
+datatypes w = "http://whattf.org/datatype-draft";
+namespace local = ""
+
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Embedded Content                      #
+# #####################################################################
+
+#######################################################################
+## Replaced Content
+
+## Images: <img>
+
+       img.elem =
+               element img { img.inner & img.attrs }
+       img.attrs =
+               (       common.attrs
+               &       img.attrs.src
+               &       img.attrs.srcset?
+               &       img.attrs.sizes?
+               &       img.attrs.alt? # ARIA: if alt empty, only allowed role 
value is "presentation"; check in assertions
+               &       img.attrs.height?
+               &       img.attrs.width?
+               &       img.attrs.usemap?
+               &       img.attrs.ismap?
+               &       img.attrs.border? # obsolete
+               &       embedded.content.attrs.crossorigin?
+               &       (       common.attrs.aria.implicit.img
+                       |       common.attrs.aria
+                       )?
+               )
+               img.attrs.src =
+                       attribute src {
+                               common.data.uri.non-empty
+                       }
+               img.attrs.srcset =
+                       attribute srcset {
+                               string
+                       } & v5only
+               img.attrs.sizes =
+                       attribute sizes {
+                               common.data.source.size.list
+                       } & v5only
+               img.attrs.alt =
+                       attribute alt {
+                               text
+                       }
+               img.attrs.height =
+                       attribute height {
+                               common.data.integer.non-negative
+                       }
+               img.attrs.width =
+                       attribute width {
+                               common.data.integer.non-negative
+                       }
+               img.attrs.usemap =
+                       attribute usemap {
+                               common.data.hash-name
+                       }
+               img.attrs.ismap =
+                       attribute ismap {
+                               w:string "ismap" | w:string ""
+                       }
+               img.attrs.border =
+                       attribute border {
+                               common.data.zero
+                       }
+       img.inner =
+               empty
+
+       common.elem.phrasing |= img.elem
+
+## Image with multiple sources: <picture>
+
+       picture.elem =
+               element picture { picture.inner & picture.attrs }
+               & v5only
+       picture.attrs =
+               ( common.attrs )
+       picture.inner =
+               (       (       source.picture.elem*
+                       &       common.elem.script-supporting*
+                       ),
+                       (       img.elem
+                       &       common.elem.script-supporting*
+                       )
+               )
+
+       common.elem.phrasing |= picture.elem
+
+## Picture source: <source srcset>
+
+       source.picture.elem =
+               element source { source.picture.inner & source.picture.attrs }
+       source.picture.attrs =
+               (       common.attrs
+               &       source.picture.attrs.media?
+               &       source.picture.attrs.srcset
+               &       source.picture.attrs.sizes?
+               &       source.picture.attrs.type?
+               )
+               source.picture.attrs.media =
+                       attribute media {
+                               common.data.mediaquery
+                       }
+               source.picture.attrs.srcset =
+                       attribute srcset {
+                               string
+                       }
+               source.picture.attrs.sizes =
+                       attribute sizes {
+                               common.data.source.size.list
+                       }
+               source.picture.attrs.type =
+                       attribute type {
+                               common.data.mimetype
+                       }
+       source.picture.inner =
+               ( empty )
+
+## Plug-ins: <embed>
+
+       embed.elem =
+               element embed { embed.inner & embed.attrs }
+       embed.attrs =
+               (       common.attrs
+               &       embed.attrs.src?
+               &       embed.attrs.type?
+               &       embed.attrs.height?
+               &       embed.attrs.width?
+               &       embed.attrs.other*
+               &       (       common.attrs.aria.landmark.application
+                       |       common.attrs.aria.landmark.document
+                       |       common.attrs.aria.role.img
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+               embed.attrs.src =
+                       attribute src {
+                               common.data.uri.non-empty
+                       }
+               embed.attrs.type =
+                       attribute type {
+                               common.data.mimetype
+                       }
+               embed.attrs.height =
+                       attribute height {
+                               common.data.integer.non-negative
+                       }
+               embed.attrs.width =
+                       attribute width {
+                               common.data.integer.non-negative
+                       }
+               embed.attrs.other = # REVISIT common.attrs
+                       attribute local:* - ( src 
+                                           | type 
+                                           | height 
+                                           | width 
+                                           | id 
+                                           | class
+                                           | title 
+                                           | dir 
+                                           | lang 
+                                           | translate 
+                                           | style 
+                                           | tabindex 
+                                           | contextmenu 
+                                           | contenteditable 
+                                           | draggable 
+                                           | dropzone
+                                           | hidden
+                                           | onabort
+                                           | onautocomplete
+                                           | onautocompleteerror
+                                           | onblur
+                                           | oncancel
+                                           | oncanplay
+                                           | oncanplaythrough
+                                           | onchange
+                                           | onclick
+                                           | onclose
+                                           | oncontextmenu
+                                           | oncuechange
+                                           | ondblclick
+                                           | ondrag
+                                           | ondragend
+                                           | ondragenter
+                                           | ondragexit
+                                           | ondragleave
+                                           | ondragover
+                                           | ondragstart
+                                           | ondrop
+                                           | ondurationchange
+                                           | onemptied
+                                           | onended
+                                           | onerror
+                                           | onfocus
+                                           | oninput
+                                           | oninvalid
+                                           | onkeydown
+                                           | onkeypress
+                                           | onkeyup
+                                           | onload
+                                           | onloadeddata
+                                           | onloadedmetadata
+                                           | onloadstart
+                                           | onmousedown
+                                           | onmouseenter
+                                           | onmouseleave
+                                           | onmousemove
+                                           | onmouseout
+                                           | onmouseover
+                                           | onmouseup
+                                           | onwheel
+                                           | onpause
+                                           | onplay
+                                           | onplaying
+                                           | onprogress
+                                           | onratechange
+                                           | onreset
+                                           | onresize
+                                           | onscroll
+                                           | onseeked
+                                           | onseeking
+                                           | onselect
+                                           | onshow
+                                           | onsort
+                                           | onstalled
+                                           | onsubmit
+                                           | onsuspend
+                                           | ontimeupdate
+                                           | ontoggle
+                                           | onvolumechange
+                                           | onwaiting
+                                           | role
+                                           | aria-atomic
+                                           | aria-busy
+                                           | aria-controls
+                                           | aria-describedby
+                                           | aria-disabled
+                                           | aria-dropeffect
+                                           | aria-expanded
+                                           | aria-flowto
+                                           | aria-grabbed
+                                           | aria-haspopup
+                                           | aria-hidden
+                                           | aria-invalid
+                                           | aria-label
+                                           | aria-labelledby
+                                           | aria-live
+                                           | aria-owns
+                                           | aria-relevant
+                                           | aria-required
+                                           | spellcheck
+                                           | accesskey
+                                           | itemref
+                                           | itemprop
+                                           | itemscope
+                                           | itemtype
+                                           | itemid
+                                           | name
+                                           | align
+                                           | about
+                                           | prefix
+                                           | property
+                                           | typeof
+                                           | vocab
+                                           | content
+                                           | datatype
+                                           | href
+                                           | rel
+                                           | resource
+                                           | rev
+                                           | inlist
+                                           | its-loc-note
+                                            | its-loc-note-type
+                                            | its-loc-note-ref
+                                            | its-term-info-ref
+                                            | its-term
+                                            | its-term-confidence
+                                            | its-within-text
+                                            | its-domain-mapping
+                                            | its-ta-confidence
+                                            | its-ta-class-ref
+                                            | its-ta-ident
+                                            | its-ta-ident-ref
+                                            | its-ta-source
+                                            | its-locale-filter-list
+                                            | its-locale-filter-type
+                                            | its-person
+                                            | its-person-ref
+                                            | its-org
+                                            | its-org-ref
+                                            | its-tool
+                                            | its-tool-ref
+                                            | its-rev-person
+                                            | its-rev-person-ref
+                                            | its-rev-org
+                                            | its-rev-org-ref
+                                            | its-rev-tool
+                                            | its-rev-tool-ref
+                                            | its-prov-ref
+                                            | its-provenance-records-ref
+                                            | its-loc-quality-issues-ref
+                                            | its-loc-quality-issue-type
+                                            | its-loc-quality-issue-comment
+                                            | its-loc-quality-issue-severity
+                                            | its-loc-quality-issue-profile-ref
+                                            | its-loc-quality-issue-enabled
+                                            | its-loc-quality-rating-score
+                                            | its-loc-quality-rating-vote
+                                            | 
its-loc-quality-rating-score-threshold
+                                            | 
its-loc-quality-rating-vote-threshold
+                                            | 
its-loc-quality-rating-profile-ref
+                                            | its-mt-confidence
+                                            | its-allowed-characters
+                                            | its-storage-size
+                                            | its-storage-encoding
+                                            | its-line-break-type
+                                            | its-annotators-ref
+                                           ) 
+                       {
+                               string
+                       }
+       embed.inner =
+               empty
+
+       common.elem.phrasing |= embed.elem
+
+## Generic Objects: <object>
+
+       object.elem.flow =
+               element object { object.inner.flow & object.attrs }
+       object.elem.phrasing =
+               element object { object.inner.phrasing & object.attrs }
+       object.attrs =
+               (       common.attrs
+               &       (       (       object.attrs.data
+                               &       object.attrs.type?
+                               )
+                       |       object.attrs.type
+                       )
+               &       object.attrs.typemustmatch?
+#              &       object.attrs.classid?
+#              &       object.attrs.codebase?
+#              &       object.attrs.codetype?
+               &       object.attrs.height?
+               &       object.attrs.width?
+               &       object.attrs.usemap?
+               &       object.attrs.name?
+               &       common-form.attrs.form?
+               &       (       common.attrs.aria.landmark.application
+                       |       common.attrs.aria.landmark.document
+                       |       common.attrs.aria.role.img
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+               object.attrs.data =
+                       attribute data {
+                               common.data.uri.non-empty
+                       }
+               object.attrs.type =
+                       attribute type {
+                               common.data.mimetype
+                       }
+               object.attrs.typemustmatch =
+                       attribute typemustmatch {
+                               w:string "typemustmatch" | w:string ""
+                       } & v5only
+               object.attrs.height =
+                       attribute height {
+                               common.data.integer.non-negative
+                       }
+               object.attrs.width =
+                       attribute width {
+                               common.data.integer.non-negative
+                       }
+               object.attrs.usemap =
+                       attribute usemap {
+                               common.data.hash-name
+                       }
+               object.attrs.name =
+                       attribute name {
+                               common.data.browsing-context
+                       }
+       object.inner.flow =
+               (       param.elem*
+               ,       common.inner.transparent.flow
+               )
+       object.inner.phrasing =
+               (       param.elem*
+               ,       common.inner.phrasing
+               )
+
+       common.elem.flow |= object.elem.flow
+       common.elem.phrasing |= object.elem.phrasing
+
+## Initialization Parameters: <param>
+
+       param.elem =
+               element param { param.inner & param.attrs }
+       param.attrs =
+               (       common.attrs
+               &       param.attrs.name
+               &       param.attrs.value
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               param.attrs.name =
+                       attribute name {
+                               string
+                       }
+               param.attrs.value =
+                       attribute value {
+                               string
+                       }
+       param.inner =
+               ( empty )
+
+## Inline Frame: <iframe>
+
+       iframe.elem =
+               element iframe { iframe.inner & iframe.attrs }
+       iframe.attrs =
+               (       common.attrs
+               &       iframe.attrs.src?
+               &       iframe.attrs.srcdoc?
+               &       iframe.attrs.name?
+               &       iframe.attrs.width?
+               &       iframe.attrs.height?
+               &       iframe.attrs.sandbox?
+               &       iframe.attrs.seamless?
+               &       iframe.attrs.allowfullscreen?
+               &       (       common.attrs.aria.landmark.application
+                       |       common.attrs.aria.landmark.document
+                       |       common.attrs.aria.role.img
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+               iframe.attrs.src =
+                       attribute src {
+                               common.data.uri.non-empty
+                       }
+               iframe.attrs.srcdoc =
+                       attribute srcdoc {
+                               string #FIXME
+                       }
+               iframe.attrs.name =
+                       attribute name {
+                               common.data.browsing-context
+                       }
+               iframe.attrs.height =
+                       attribute height {
+                               common.data.integer.non-negative
+                       }
+               iframe.attrs.width =
+                       attribute width {
+                               common.data.integer.non-negative
+                       }
+               iframe.attrs.seamless =
+                       attribute seamless {
+                               w:string "seamless" | w:string ""
+                       } & v5only
+               iframe.attrs.sandbox =
+                       attribute sandbox {
+                               common.data.sandbox-allow-list
+                       } & v5only
+               iframe.attrs.allowfullscreen =
+                       attribute allowfullscreen {
+                               w:string "allowfullscreen" | w:string ""
+                       } & v5only
+       iframe.inner =
+               ( ( text & HTMLonly ) | empty )
+
+       common.elem.phrasing |= iframe.elem
+
+#######################################################################
+## Image Maps
+
+## Map Definition: <map>
+
+       map.elem.flow =
+               element map { map.inner.flow & map.attrs }
+       map.elem.phrasing  =
+               element map { map.inner.phrasing & map.attrs }
+       map.attrs =
+               (       common.attrs
+               &       map.attrs.name
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               ) # REVISIT make id required in Schematron
+               map.attrs.name =
+                       attribute name {
+                               common.data.name
+                       }
+       map.inner.flow =
+               ( common.inner.transparent.flow )
+       map.inner.phrasing =
+               ( common.inner.phrasing )
+
+       common.elem.flow |= map.elem.flow
+       common.elem.phrasing |= map.elem.phrasing
+
+## Map Area Definition: <area>
+
+       area.elem =
+               element area { area.inner & area.attrs }
+       area.attrs =
+               (       common.attrs.basic
+               &       common.attrs.i18n
+               &       common.attrs.present
+               &       common.attrs.other
+               &       shared-hyperlink.attrs.download?
+               &       (       area.attrs.alt
+                       &       shared-hyperlink.attrs.href
+                       )?
+               &       shared-hyperlink.attrs.target?
+               &       shared-hyperlink.attrs.ping?
+               &       shared-hyperlink.attrs.rel?
+               &       shared-hyperlink.attrs.hreflang?
+               &       shared-hyperlink.attrs.type?
+               &       area.attrs.shape?
+               &       (       common.attrs.aria.role.link
+                       |       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               area.attrs.alt =
+                       attribute alt {
+                               text
+                       }
+               area.attrs.shape =
+                       (       ( area.attrs.shape.rect?  & 
area.attrs.coords.rect   )
+                       |       ( area.attrs.shape.circle & 
area.attrs.coords.circle )
+                       |       ( area.attrs.shape.poly   & 
area.attrs.coords.poly   )
+                       |       ( area.attrs.shape.default )
+                       )
+               area.attrs.shape.rect =
+                       attribute shape {
+                               w:string "rect"
+                       }
+               area.attrs.coords.rect =
+                       attribute coords {
+                               w:rectangle
+#                              xsd:token {
+#                                      pattern = 
"-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+"
+#                              }
+                       }
+               area.attrs.shape.circle =
+                       attribute shape {
+                               w:string "circle"
+                       }
+               area.attrs.coords.circle =
+                       attribute coords {
+                               w:circle
+#                              xsd:token {
+#                                      pattern = "-?[0-9]+,-?[0-9]+,[0-9]+"
+#                              }
+                       }
+               area.attrs.shape.poly =
+                       attribute shape {
+                               w:string "poly"
+                       }
+               area.attrs.coords.poly =
+                       attribute coords {
+                               w:polyline
+#                              xsd:token {
+#                                      pattern = 
"-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+(,-?[0-9]+,-?[0-9]+)*"
+#                              }
+                       }
+               area.attrs.shape.default =
+                       attribute shape {
+                               w:string "default"
+                       }
+       area.inner =
+               ( empty )
+
+       common.elem.phrasing |= area.elem
+
+## Attributes Common to Embedded Content
+
+               embedded.content.attrs.crossorigin =
+                       attribute crossorigin {
+                               w:string "anonymous" | w:string 
"use-credentials" | w:string ""
+                       } & v5only
diff --git a/packages/html5-schema/form-datatypes.rnc 
b/packages/html5-schema/form-datatypes.rnc
new file mode 100644
index 0000000..db719f9
--- /dev/null
+++ b/packages/html5-schema/form-datatypes.rnc
@@ -0,0 +1,63 @@
+datatypes w = "http://whattf.org/datatype-draft";
+
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Datatypes related to forms            #
+# #####################################################################
+
+## MIME types
+               
+       form.data.mimetypelist = 
+               w:mime-type-list
+               
+       form.data.charsetlist =
+               string # FIXME should be a "a space- and/or comma-delimited 
+                      # list of charset values"
+
+## ECMAScript Regular Expression
+               
+       form.data.pattern = 
+               w:pattern
+               
+## Temporal
+               
+       form.data.datetime-local =
+               w:datetime-local
+       
+       form.data.date =
+               w:date
+       
+       form.data.month =
+               w:month
+       
+       form.data.week =
+               w:week
+       
+       form.data.time =
+               w:time
+
+## Email
+
+       form.data.emailaddress =
+               w:email-address
+
+       form.data.emailaddresslist =
+               w:email-address-list
+
+## Color
+
+       form.data.color =
+               w:simple-color
+#              xsd:string {
+#                      pattern = "#[a-fA-F0-9]{6}"
+#              }
+
+## Text without line breaks
+
+       form.data.stringwithoutlinebreaks =
+               w:string-without-line-breaks
+
+## Non-empty string
+
+       form.data.nonemptystring =
+               w:non-empty-string
+
diff --git a/packages/html5-schema/html5-schema.el 
b/packages/html5-schema/html5-schema.el
new file mode 100644
index 0000000..5fff760
--- /dev/null
+++ b/packages/html5-schema/html5-schema.el
@@ -0,0 +1,67 @@
+;;; html5-schema.el --- Add HTML5 schemas for use by nXML  -*- 
lexical-binding: t; -*-
+
+;; Copyright (C) 2016  Free Software Foundation, Inc
+
+;; Author: Stefan Monnier <address@hidden>
+;; Keywords: html, xml
+;; Version: 0.1
+;; URL: https://github.com/validator/validator
+;; Package-Type: multi
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; The RelaxNG files are taken straight from
+;; https://github.com/validator/validator.git's via:
+;;
+;;     git subtree -P schema/html5 split
+;;
+;; To which we manually add `locating-rules.xml` and this file.
+
+;;; Code:
+
+;;;###autoload
+(when load-file-name
+  (let* ((dir (file-name-directory load-file-name))
+         (file (expand-file-name "locating-rules.xml" dir)))
+    (eval-after-load 'rng-loc
+      `(progn
+         (add-to-list 'rng-schema-locating-files-default 'file)
+         ;; FIXME: We should only push to rng-schema-locating-files-default,
+         ;; since rng-schema-locating-files is a custom var, but by the time
+         ;; we run, rng-schema-locating-files has already been initialized
+         ;; from rng-schema-locating-files-default, so setting
+         ;; rng-schema-locating-files-default doesn't have any effect
+         ;; any more!
+         (add-to-list 'rng-schema-locating-files ,file)
+         (put 'http://whattf.org/datatype-draft 'rng-dt-compile
+              #'nxml-html5-dt-compile)))))
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.html?\\'" . nxml-mode))
+
+(defvar nxml-html5-dt-params nil)
+(defvar nxml-html5-dt-names nil)
+
+;;;###autoload
+(defun nxml-html5-dt-compile (name params)
+  ;; FIXME: How/when is `params' ever used?  It seems to always be nil!
+  (add-to-list 'nxml-html5-dt-params params)
+  (add-to-list 'nxml-html5-dt-names name)
+  ;; FIXME: We currently don't do any actual validation of datatypes!
+  '(t identity))
+
+(provide 'html5-schema)
+;;; html5-schema.el ends here
diff --git a/packages/html5-schema/html5.rnc b/packages/html5-schema/html5.rnc
new file mode 100644
index 0000000..0d8cef8
--- /dev/null
+++ b/packages/html5-schema/html5.rnc
@@ -0,0 +1,56 @@
+default namespace = "http://www.w3.org/1999/xhtml";
+# #####################################################################
+##  RELAX NG Schema for HTML 5                                       #
+# #####################################################################
+
+  # To validate an HTML 5 document, you must first validate against  #
+  # this schema and then ALSO validate against assertions.sch        #
+
+  ## HTML flavor RELAX NG schemas can only be used after the         #
+  ## document has been transformed to well-formed XML.               #
+  ##   - Insert closing slashes in all empty element tags            #
+  ##   - Insert all optional start and end tags                      #
+  ##   - Add xmlns "http://www.w3.org/1999/xhtml";                    #
+  ##   - Properly escape <script> and <style> CDATA                  #
+  ##   - Parse and transform all HTML-only entities to numeric       #
+  ##     character references                                        #
+  ## Obviously, syntax-checking involving these features cannot be   #
+  ## done by the RELAX NG schema and must be checked, along with the #
+  ## <!DOCTYPE> requirement, by some other application.              #
+
+# #####################################################################
+## Schema Framework & Parameters
+
+include "common.rnc" {
+       # XHTML flavor #
+               XMLonly = notAllowed
+               HTMLonly = empty
+       # HTML 4 compat #
+               v5only = empty
+       # HTML-serializability #
+               nonHTMLizable = notAllowed
+       # HTML-roundtrippability #
+               nonRoundtrippable = notAllowed
+}
+
+# #####################################################################
+## Language Definitions
+
+start = html.elem
+
+include "meta.rnc"
+include "phrase.rnc"
+include "block.rnc"
+include "sectional.rnc"
+include "structural.rnc"
+include "revision.rnc"
+include "embed.rnc"
+include "ruby.rnc"
+include "media.rnc"
+include "core-scripting.rnc"
+include "tables.rnc"
+include "form-datatypes.rnc"
+include "web-forms.rnc"
+include "web-forms2.rnc"
+include "applications.rnc"
+include "data.rnc"
diff --git a/packages/html5-schema/html5exclusions.rnc 
b/packages/html5-schema/html5exclusions.rnc
new file mode 100644
index 0000000..1fa0915
--- /dev/null
+++ b/packages/html5-schema/html5exclusions.rnc
@@ -0,0 +1,63 @@
+default namespace = "http://www.w3.org/1999/xhtml";
+# #####################################################################
+##  RELAX NG Schema for (X)HTML 5: Exclusions                         #
+# #####################################################################
+
+  ## This file is unmaintained. Please use assertions.sch instead.
+  
+# #####################################################################
+## Schema Framework & Parameters
+
+       start = normal.elem.all-inclusive
+
+# #####################################################################
+##  Normal Element Patterns
+
+## Any attribute from any namespace
+
+       normal.attr.anything =
+               attribute * { text }*
+
+## Any element from any namespace except exceptional elements,
+## but allowing those elements as descendants
+
+       normal.elem.all =
+               element * - (dfn) {
+                       normal.elem.all-inclusive
+               }
+
+## Any element from any namespace including exceptional elements
+
+       normal.elem.all-inclusive =
+               wildcard.elem.exclude-all | dfn.elem.exclude-self
+
+
+# #####################################################################
+##  Exclusion Element Patterns
+
+  # exclude all exceptional elements from the name classes;
+  # list them explicitly in content models instead
+
+normal.elem.exclude-dfn =
+       element * - (dfn) {
+               normal.elem.exclude-dfn
+       }
+
+dfn.elem.exclude-self =
+       element dfn {
+               (       normal.attr.anything
+               &       normal.elem.exclude-dfn
+               )
+       }
+
+# FIXME this part was cut off -- hsivonen
+wildcard.elem.exclude-all = 
+       notAllowed
+
+#FIXME no nested forms in HTML-serializable docs
+
+#FIXME no nested labels
+
+#FIXME no blockquote inside header or footer
+
+#FIXME exactly one hn in header
diff --git a/packages/html5-schema/locating-rules.xml 
b/packages/html5-schema/locating-rules.xml
new file mode 100644
index 0000000..86b2bb1
--- /dev/null
+++ b/packages/html5-schema/locating-rules.xml
@@ -0,0 +1,9 @@
+<!-- <?xml version="1.0"?> -->
+<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0";>
+  <uri pattern="*.html" typeId="HTML5" />
+  <uri pattern="*.xhtml" typeId="XHTML5" />
+  <namespace ns="http://www.w3.org/1999/xhtml"; typeId="XHTML5"/>
+  <documentElement localName="html" typeId="HTML5" />
+  <typeId id="XHTML5" uri="xhtml5.rnc" />
+  <typeId id="HTML5" uri="html5.rnc" />
+</locatingRules>
diff --git a/packages/html5-schema/media.rnc b/packages/html5-schema/media.rnc
new file mode 100644
index 0000000..28cbb63
--- /dev/null
+++ b/packages/html5-schema/media.rnc
@@ -0,0 +1,210 @@
+datatypes w = "http://whattf.org/datatype-draft";
+
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Advanced Embedded Content             #
+# #####################################################################
+
+## Attributes Common to Media Elements
+
+       # src not included
+       media.attrs = 
+               (       media.attrs.autoplay?
+               &       media.attrs.preload?
+               &       media.attrs.controls?
+               &       media.attrs.loop?
+               &       media.attrs.mediagroup?
+               &       media.attrs.muted?
+               &       embedded.content.attrs.crossorigin?
+               )
+               media.attrs.autoplay   =
+                       attribute autoplay   {
+                               w:string "autoplay" | w:string ""
+                       }
+               media.attrs.preload   =
+                       attribute preload   {
+                               w:string "none" | w:string "metadata" | 
w:string "auto" | w:string ""
+                       }
+               media.attrs.controls  =
+                       attribute controls  {
+                               w:string "controls" | w:string ""
+                       }
+               media.attrs.loop =
+                       attribute loop {
+                               w:string "loop" | w:string ""
+                       }
+               media.attrs.mediagroup =
+                       attribute mediagroup {
+                               string
+                       }
+               media.attrs.muted =
+                       attribute muted {
+                               w:string "muted" | w:string ""
+                       }
+               
+## Source: <source>
+
+       source.elem =
+               element source { source.inner & source.attrs }
+       source.attrs =
+               (       common.attrs
+               &       source.attrs.src
+               &       source.attrs.type?
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               source.attrs.src =
+                       attribute src {
+                               common.data.uri.non-empty
+                       }
+               source.attrs.type =
+                       attribute type {
+                               common.data.mimetype
+                       }
+       source.inner =
+               ( empty )
+
+## Media Source
+
+       media.source = 
+               (       media.attrs.src
+               |       source.elem*
+               )
+
+       media.attrs.src =
+               attribute src {
+                       common.data.uri.non-empty
+               }
+
+## Video: <video>
+
+       video.elem.flow =
+               element video { video.inner.flow & video.attrs }
+       video.elem.phrasing =
+               element video { video.inner.phrasing & video.attrs }
+       video.attrs =
+               (       common.attrs
+               &       media.attrs
+               &       video.attrs.poster?
+               &       video.attrs.height?
+               &       video.attrs.width?
+               &       common.attrs.aria.landmark.application?
+               )
+               video.attrs.poster =
+                       attribute poster {
+                               common.data.uri.non-empty
+                       }
+               video.attrs.height =
+                       attribute height {
+                               common.data.integer.non-negative
+                       }
+               video.attrs.width =
+                       attribute width {
+                               common.data.integer.non-negative
+                       }
+       video.inner.flow =
+               (       media.source
+               ,       track.elem*
+               ,       common.inner.transparent.flow
+               )
+       video.inner.phrasing =
+               (       media.source
+               ,       track.elem*
+               ,       common.inner.phrasing
+               )
+
+       common.elem.flow |= video.elem.flow
+       common.elem.phrasing |= video.elem.phrasing
+
+## Audio: <audio>
+
+       audio.elem.flow =
+               element audio { audio.inner.flow & audio.attrs }
+       audio.elem.phrasing =
+               element audio { audio.inner.phrasing & audio.attrs }
+       audio.attrs =
+               (       common.attrs
+               &       media.attrs
+               &       common.attrs.aria.landmark.application?
+               )
+       audio.inner.flow =
+               (       media.source
+               ,       track.elem*
+               ,       common.inner.transparent.flow
+               )
+       audio.inner.phrasing =
+               (       media.source
+               ,       track.elem*
+               ,       common.inner.phrasing
+               )
+
+       common.elem.flow |= audio.elem.flow
+       common.elem.phrasing |= audio.elem.phrasing
+
+## supplementary media track: <track>
+#
+       track.elem =
+               element track { track.inner & track.attrs }
+
+       track.attrs =
+               (       common.attrs
+               &       track.attrs.kind?
+               &       track.attrs.src
+               &       track.attrs.srclang?
+               &       track.attrs.label?
+               &       track.attrs.default?
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               track.attrs.kind =
+                       attribute kind {
+                               w:string "subtitles" | w:string "captions" | 
w:string "descriptions" | w:string "chapters" | w:string "metadata"
+                       }
+               track.attrs.src =
+                       attribute src {
+                               common.data.uri.non-empty
+                       }
+               track.attrs.srclang =
+                       attribute srclang {
+                               common.data.langcode
+                       }
+               track.attrs.label =
+                       attribute label {
+                               string # must be non-empty value; check is in 
assertions code
+                       }
+               track.attrs.default =
+                       attribute default {
+                               w:string "default" | w:string ""
+                       }
+
+       track.inner =
+               ( empty )
+
+## Captioned Content: <figure>
+
+       figure.elem =
+               element figure { figure.inner & figure.attrs }
+       figure.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       figure.inner =
+               (       ( figcaption.elem?, common.inner.flow )
+               |       ( common.inner.flow, figcaption.elem? )
+               )
+
+       common.elem.flow |= figure.elem
+
+## Figure caption: <figcaption>
+
+       figcaption.elem =
+               element figcaption { figcaption.inner & figcaption.attrs }
+       figcaption.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+       figcaption.inner =
+               ( common.inner.flow )
diff --git a/packages/html5-schema/meta.rnc b/packages/html5-schema/meta.rnc
new file mode 100644
index 0000000..ff67c2d
--- /dev/null
+++ b/packages/html5-schema/meta.rnc
@@ -0,0 +1,424 @@
+datatypes w = "http://whattf.org/datatype-draft";
+
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Global Structure & Metadata          #
+# #####################################################################
+
+## Root Element: <html>
+
+       html.elem =
+               element html { html.inner & html.attrs }
+       html.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+       html.inner =
+               (       head.elem
+               ,       body.elem
+               )
+
+## Metadata Container: <head>
+
+       head.elem =
+               element head { head.inner & head.attrs }
+       head.attrs =
+               (       common.attrs
+#              &       head.attrs.profile?
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+#              head.attrs.profile =
+#                      attribute profile {
+#                              common.data.uris #REVISIT should these be 
absolute (zero or more)
+#                      }
+       head.inner =
+               (       title.elem
+               &       base.elem? # REVISIT need a non-schema checker or 
Schematron
+               &       common.inner.metadata # Limit encoding decl position in 
Schematron
+               )
+#      head.inner =
+#              (       meta.elem.encoding?
+#              ,       (       title.elem
+#                      &       base.elem? # REVISIT need a non-schema checker 
or Schematron
+#                      &       common.inner.metadata
+#                      )
+#              )
+               
+## Content Container: <body>
+
+       body.elem =
+               element body { body.inner & body.attrs }
+       body.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.landmark.application
+                       |       common.attrs.aria.landmark.document
+                       |       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.implicit.document
+                       )?
+               &       body.attrs.onafterprint?
+               &       body.attrs.onbeforeprint?
+               &       body.attrs.onbeforeunload?
+               &       body.attrs.onhashchange?
+               &       body.attrs.onmessage?
+               &       body.attrs.onoffline?
+               &       body.attrs.ononline?
+               &       body.attrs.onpagehide?
+               &       body.attrs.onpageshow?
+               &       body.attrs.onpopstate?
+               &       body.attrs.onstorage?
+               &       body.attrs.onunload?
+               )
+       body.inner =
+               ( common.inner.flow )
+
+       body.attrs.onafterprint =
+               attribute onafterprint { common.data.functionbody }
+       body.attrs.onbeforeprint =
+               attribute onbeforeprint { common.data.functionbody }
+       body.attrs.onbeforeunload =
+               attribute onbeforeunload { common.data.functionbody }
+       body.attrs.onhashchange =
+               attribute onhashchange { common.data.functionbody }
+       body.attrs.onmessage =
+               attribute onmessage { common.data.functionbody }
+       body.attrs.onoffline =
+               attribute onoffline { common.data.functionbody }
+       body.attrs.ononline =
+               attribute ononline { common.data.functionbody }
+       body.attrs.onpopstate =
+               attribute onpopstate { common.data.functionbody }
+       body.attrs.onpagehide =
+               attribute onpagehide { common.data.functionbody }
+       body.attrs.onpageshow =
+               attribute onpageshow { common.data.functionbody }
+       body.attrs.onredo =
+               attribute onredo { common.data.functionbody }
+       body.attrs.onresize =
+               attribute onresize { common.data.functionbody }
+       body.attrs.onstorage =
+               attribute onstorage { common.data.functionbody }
+       body.attrs.onundo =
+               attribute onundo { common.data.functionbody }
+       body.attrs.onunload =
+               attribute onunload { common.data.functionbody }
+
+## Document Title: <title>
+
+       title.elem =
+               element title { title.inner & title.attrs }
+       title.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+       title.inner =
+               ( text )
+
+## Base URI: <base>
+
+       base.elem =
+               element base { base.inner & base.attrs }
+       base.attrs =
+               (       common.attrs.basic
+               &       common.attrs.i18n
+               &       common.attrs.present
+               &       common.attrs.other
+               &       (       (       base.attrs.href
+                               &       base.attrs.target?
+                               )
+                       |       base.attrs.target
+                       )
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+       base.attrs.href =
+               attribute href {
+                       common.data.uri
+               }
+       base.attrs.target =
+               attribute target {
+                       common.data.browsing-context-or-keyword
+               }
+       base.inner =
+               ( empty )
+
+## Global Relationships: <link>
+
+       link.elem =
+               element link { link.inner & link.attrs }
+       link.attrs =
+               (       common.attrs.basic
+               &       common.attrs.i18n
+               &       common.attrs.present
+               &       common.attrs.other
+               &       link.attrs.href
+               &       link.attrs.rel
+               &       link.attrs.integrity?
+               &       shared-hyperlink.attrs.hreflang?
+               &       shared-hyperlink.attrs.media?
+               &       shared-hyperlink.attrs.type?
+               &       link.attrs.sizes?
+               #       link.attrs.title included in common.attrs
+               &       embedded.content.attrs.crossorigin?
+               &       (       common.attrs.aria.role.link
+                       |       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               link.attrs.href =
+                       attribute href {
+                               common.data.uri.non-empty
+                       }
+               link.attrs.rel =
+                       attribute rel {
+                               w:link-rel
+                       }
+               link.attrs.integrity =
+                       attribute integrity {
+                               common.data.integrity
+                       }
+               link.attrs.sizes =
+                       attribute sizes {
+                               w:string "any" | common.data.sizes
+                       }
+       link.inner =
+               ( empty )
+               
+       common.elem.metadata |= link.elem
+
+## Global Style: <style>
+
+       style.elem =
+               element style { style.inner & style.attrs }
+       style.attrs =
+               (       common.attrs
+               &       style.attrs.type?
+               &       style.attrs.media?
+               &       style.attrs.nonce?
+               #       style.attrs.title included in common.attrs
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               style.attrs.type =
+                       attribute type {
+                               common.data.mimetype
+                       }
+               style.attrs.media =
+                       attribute media {
+                               common.data.mediaquery
+                       }
+               style.attrs.nonce =
+                       attribute nonce{
+                               string
+                       }
+       style.inner =
+               ( common.inner.anything )
+               
+       common.elem.metadata |= style.elem
+
+## Scoped Style: <style scoped>
+
+       style.elem.scoped =
+               element style { style.inner & style.scoped.attrs }
+       style.scoped.attrs =
+               (       common.attrs
+               &       style.attrs.type?
+               &       style.attrs.media?
+               &       style.attrs.scoped
+               #       style.attrs.title included in common.attrs
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               style.attrs.scoped =
+                       attribute scoped {
+                               w:string "scoped" | w:string ""
+                       }
+
+## Name-Value Metadata: <meta name>
+
+       meta.name.elem =
+               element meta { meta.inner & meta.name.attrs }
+       meta.name.attrs =
+               (       common.attrs.basic
+               &       common.attrs.i18n
+               &       common.attrs.present
+               &       common.attrs.other
+               &       meta.name.attrs.name
+               &       meta.name.attrs.content
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               meta.name.attrs.name =
+                       attribute name {
+                               w:non-empty-string
+                       }
+               meta.name.attrs.content =
+                       attribute content {
+                               string
+                       }
+       meta.inner =
+               ( empty )
+               
+       common.elem.metadata |= meta.name.elem
+
+## "refresh" pragma directive: <meta http-equiv='refresh'>
+
+       meta.http-equiv.refresh.elem =
+               element meta { meta.inner & meta.http-equiv.refresh.attrs }
+       meta.http-equiv.refresh.attrs =
+               (       common.attrs.basic
+               &       common.attrs.i18n
+               &       common.attrs.present
+               &       common.attrs.other
+               &       meta.http-equiv.attrs.http-equiv.refresh
+               &       meta.http-equiv.attrs.content.refresh
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               meta.http-equiv.attrs.http-equiv.refresh =
+                       attribute http-equiv {
+                               w:string "refresh"
+                       }
+               meta.http-equiv.attrs.content.refresh =
+                       attribute content { 
+                               common.data.refresh
+                       }
+       common.elem.metadata |= meta.http-equiv.refresh.elem # not quite right 
per spec
+                                                       # if the definition is 
+                                                       # reused in another 
language
+
+## "default-style" pragma directive: <meta http-equiv='default-style'>
+
+       meta.http-equiv.default-style.elem =
+               element meta { meta.inner & meta.http-equiv.default-style.attrs 
}
+       meta.http-equiv.default-style.attrs =
+               (       common.attrs.basic
+               &       common.attrs.i18n
+               &       common.attrs.present
+               &       common.attrs.other
+               &       meta.http-equiv.attrs.http-equiv.default-style
+               &       meta.http-equiv.attrs.content.default-style
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               meta.http-equiv.attrs.http-equiv.default-style =
+                       attribute http-equiv {
+                               w:string "default-style"
+                       }
+               meta.http-equiv.attrs.content.default-style =
+                       attribute content {
+                               common.data.default-style
+                       }
+               
+       common.elem.metadata |= meta.http-equiv.default-style.elem # not quite 
right per spec
+                                                               # if the 
definition is 
+                                                               # reused in 
another language
+
+## Content Security Policy pragma directive: <meta 
http-equiv='content-security-policy'>
+
+       meta.http-equiv.content-security-policy.elem =
+               element meta { meta.inner & 
meta.http-equiv.content-security-policy.attrs }
+       meta.http-equiv.content-security-policy.attrs =
+               (       common.attrs.basic
+               &       common.attrs.i18n
+               &       common.attrs.present
+               &       common.attrs.other
+               &       meta.http-equiv.attrs.http-equiv.content-security-policy
+               &       meta.http-equiv.attrs.content.content-security-policy
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               meta.http-equiv.attrs.http-equiv.content-security-policy =
+                       attribute http-equiv {
+                               w:string "content-security-policy"
+                       }
+               meta.http-equiv.attrs.content.content-security-policy =
+                       attribute content {
+                               common.data.content-security-policy
+                       }
+       common.elem.metadata |= meta.http-equiv.content-security-policy.elem
+
+## "x-ua-compatible" pragma directive: <meta http-equiv='x-ua-compatible'>
+
+       meta.http-equiv.x-ua-compatible.elem =
+               element meta { meta.inner & 
meta.http-equiv.x-ua-compatible.attrs }
+       meta.http-equiv.x-ua-compatible.attrs =
+               (       common.attrs.basic
+               &       common.attrs.i18n
+               &       common.attrs.present
+               &       common.attrs.other
+               &       meta.http-equiv.attrs.http-equiv.x-ua-compatible
+               &       meta.http-equiv.attrs.content.x-ua-compatible
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               meta.http-equiv.attrs.http-equiv.x-ua-compatible =
+                       attribute http-equiv {
+                               w:string "x-ua-compatible"
+                       }
+               meta.http-equiv.attrs.content.x-ua-compatible =
+                       attribute content {
+                               common.data.x-ua-compatible
+                       }
+       common.elem.metadata |= meta.http-equiv.x-ua-compatible.elem
+
+## Inline Character Encoding Statement for HTML: <meta charset>
+
+       meta.charset.elem =
+               element meta { meta.inner & meta.charset.attrs }
+       meta.charset.attrs =
+               (       common.attrs.basic
+               &       common.attrs.i18n
+               &       common.attrs.present
+               &       common.attrs.other
+               &       meta.charset.attrs.charset
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               meta.charset.attrs.charset =
+                       attribute charset {
+                               (common.data.charset & HTMLonly)
+                               | (xsd:string {
+                                       pattern = "[uU][tT][fF]-8"
+                               } & XMLonly )
+                       } 
+
+## Inline Character Encoding Statement for HTML: <meta 
http-equiv='content-type'>
+
+       meta.http-equiv.content-type.elem =
+               element meta { meta.inner & meta.http-equiv.content-type.attrs }
+               & HTMLonly
+       meta.http-equiv.content-type.attrs =
+               (       common.attrs.basic
+               &       common.attrs.i18n
+               &       common.attrs.present
+               &       common.attrs.other
+               &       meta.http-equiv.attrs.http-equiv.content-type
+               &       meta.http-equiv.attrs.content.content-type
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               meta.http-equiv.attrs.http-equiv.content-type =
+                       attribute http-equiv {
+                               w:string "content-type"
+                       }
+               meta.http-equiv.attrs.content.content-type =
+                       attribute content {
+                               common.data.meta-charset
+                       }
+
+       common.elem.metadata |= ( meta.charset.elem | 
meta.http-equiv.content-type.elem )
diff --git a/packages/html5-schema/microdata.rnc 
b/packages/html5-schema/microdata.rnc
new file mode 100644
index 0000000..91616c8
--- /dev/null
+++ b/packages/html5-schema/microdata.rnc
@@ -0,0 +1,101 @@
+datatypes w = "http://whattf.org/datatype-draft";
+
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Microdata                             #
+# #####################################################################
+
+common.attrs.microdata =
+       (       common.attrs.microdata.itemref?
+       &       common.attrs.microdata.itemprop?
+       &       common.attrs.microdata.itemscope?
+       &       common.attrs.microdata.itemtype?
+       &       common.attrs.microdata.itemid?
+       )
+       common.attrs.microdata.itemref =
+               attribute itemref {
+                       common.data.idrefs
+               }
+       common.attrs.microdata.itemprop =
+               attribute itemprop {
+                       common.data.microdata-properties
+               }
+       common.attrs.microdata.itemscope =
+               attribute itemscope {
+                       w:string "itemscope" | w:string ""
+               }
+       common.attrs.microdata.itemtype =
+               attribute itemtype {
+                       list { common.data.uri.absolute+ }
+               }
+       common.attrs.microdata.itemid =
+               attribute itemid {
+                       common.data.uri
+               }
+
+common.attrs &= common.attrs.microdata
+
+a.attrs &= common.attrs.microdata
+area.attrs &= common.attrs.microdata
+base.attrs &= common.attrs.microdata
+
+## URL-valued Property Metadata: <link itemprop>
+
+       link.elem.phrasing =
+               element link { link.inner & link.phrasing.attrs }
+       link.phrasing.attrs =
+               (       common.attrs.basic
+               &       common.attrs.i18n
+               &       common.attrs.present
+               &       common.attrs.other
+               &       common.attrs.microdata.itemprop
+               &       common.attrs.microdata.itemref?
+               &       common.attrs.microdata.itemscope?
+               &       common.attrs.microdata.itemtype?
+               &       common.attrs.microdata.itemid?
+               &       shared-hyperlink.attrs.href
+               &       shared-hyperlink.attrs.hreflang?
+               &       shared-hyperlink.attrs.media?
+               &       shared-hyperlink.attrs.type?
+               &       link.attrs.sizes?
+               #       link.attrs.title included in common.attrs
+               &       embedded.content.attrs.crossorigin?
+               &       (       common.attrs.aria.role.link
+                       |       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+       common.elem.phrasing |= link.elem.phrasing
+
+## <link> element in head, extensions
+
+link.attrs.rel |= common.attrs.microdata.itemprop
+link.attrs &= common.attrs.microdata.itemref?
+link.attrs &= common.attrs.microdata.itemscope?
+link.attrs &= common.attrs.microdata.itemtype?
+link.attrs &= common.attrs.microdata.itemid?
+
+## Property Metadata: <meta itemprop>
+
+       meta.itemprop.elem =
+               element meta { meta.inner & meta.itemprop.attrs }
+       meta.itemprop.attrs =
+               (       common.attrs.basic
+               &       common.attrs.i18n
+               &       common.attrs.present
+               &       common.attrs.other
+               &       common.attrs.microdata.itemprop
+               &       common.attrs.microdata.itemref?
+               &       common.attrs.microdata.itemscope?
+               &       common.attrs.microdata.itemtype?
+               &       common.attrs.microdata.itemid?
+               &       meta.itemprop.attrs.content
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               meta.itemprop.attrs.content =
+                       attribute content {
+                               string
+                       }
+       common.elem.metadata |= meta.itemprop.elem
+       common.elem.phrasing |= meta.itemprop.elem
diff --git a/packages/html5-schema/phrase.rnc b/packages/html5-schema/phrase.rnc
new file mode 100644
index 0000000..f8fa725
--- /dev/null
+++ b/packages/html5-schema/phrase.rnc
@@ -0,0 +1,400 @@
+datatypes w = "http://whattf.org/datatype-draft";
+
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Phrase Markup                         #
+# #####################################################################
+
+## Contextual Hyperlink: <a>
+
+       a.elem.phrasing =
+               element a { a.inner.phrasing & a.attrs }
+       a.elem.flow =
+               element a { a.inner.flow & a.attrs }
+       a.attrs =
+               (       common.attrs.basic
+               &       common.attrs.i18n
+               &       common.attrs.present
+               &       common.attrs.other
+               &       a.attrs.name?
+               &       shared-hyperlink.attrs.download?
+               &       shared-hyperlink.attrs.href?
+               &       shared-hyperlink.attrs.target?
+               &       shared-hyperlink.attrs.rel?
+               &       shared-hyperlink.attrs.hreflang?
+               &       shared-hyperlink.attrs.type?
+               &       shared-hyperlink.attrs.ping?
+               &       (       common.attrs.aria.implicit.link
+                       |       common.attrs.aria.role.button
+                       |       common.attrs.aria.role.checkbox
+                       |       common.attrs.aria.role.link
+                       |       common.attrs.aria.role.menuitem
+                       |       common.attrs.aria.role.menuitemcheckbox
+                       |       common.attrs.aria.role.menuitemradio
+                       |       common.attrs.aria.role.switch
+                       |       common.attrs.aria.role.tab
+                       |       common.attrs.aria.role.treeitem
+                       )?
+               )
+               a.attrs.name =
+                 attribute name {
+                   common.data.id # XXX not what the spec says
+                 }
+       a.inner.phrasing =
+               ( common.inner.phrasing )
+       a.inner.flow =
+               ( common.inner.transparent.flow )
+
+       common.elem.phrasing |= a.elem.phrasing
+       common.elem.flow |= a.elem.flow
+
+## Shared hyperlink attributes
+
+  shared-hyperlink.attrs.download =
+    attribute download {
+      string
+    }
+  shared-hyperlink.attrs.href =
+    attribute href {
+      common.data.uri
+    }
+  shared-hyperlink.attrs.target =
+    attribute target {
+      common.data.browsing-context-or-keyword
+    }
+  shared-hyperlink.attrs.rel =
+    attribute rel {
+      w:a-rel
+    }
+  shared-hyperlink.attrs.hreflang =
+    attribute hreflang {
+      common.data.langcode
+    }
+  shared-hyperlink.attrs.media =
+    attribute media {
+      common.data.mediaquery
+    }
+  shared-hyperlink.attrs.type =
+    attribute type {
+      common.data.mimetype
+    }
+  shared-hyperlink.attrs.ping =
+    attribute ping {
+      common.data.uris
+    } & v5only
+
+## Emphatic Stress: <em>
+
+       em.elem =
+               element em { em.inner & em.attrs }
+       em.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       em.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= em.elem
+
+## Strong Importance: <strong>
+
+       strong.elem =
+               element strong { strong.inner & strong.attrs }
+       strong.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       strong.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= strong.elem
+
+## Small Print and Side Comments: <small>
+
+       small.elem =
+               element small { small.inner & small.attrs }
+       small.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       small.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= small.elem
+
+## Marked (Highlighted) Text: <mark>
+
+       mark.elem =
+               element mark { mark.inner & mark.attrs }
+               & v5only
+       mark.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+       mark.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= mark.elem
+
+## Abbreviation: <abbr>
+
+       abbr.elem =
+               element abbr { abbr.inner & abbr.attrs }
+       abbr.attrs =
+               (       common.attrs
+               #       abbr.attrs.title included in common.attrs
+               &       common.attrs.aria?
+               )
+       abbr.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= abbr.elem
+
+## Defining Instance: <dfn>
+
+       dfn.elem =
+               element dfn { dfn.inner & dfn.attrs }
+       dfn.attrs =
+               (       common.attrs
+               #       dfn.attrs.title included in common.attrs
+               &       common.attrs.aria?
+               )
+       dfn.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= dfn.elem
+
+## Italic: <i>
+
+       i.elem =
+               element i { i.inner & i.attrs }
+       i.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       i.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= i.elem
+
+## Bold: <b>
+
+       b.elem =
+               element b { b.inner & b.attrs }
+       b.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       b.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= b.elem
+
+## Struck Text: <s>
+
+       s.elem =
+               element s { s.inner & s.attrs }
+       s.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       s.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= s.elem
+
+## Underline: <u>
+
+       u.elem =
+               element u { u.inner & u.attrs }
+       u.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       u.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= u.elem
+
+## Code Fragment: <code>
+
+       code.elem =
+               element code { code.inner & code.attrs }
+       code.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       code.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= code.elem
+
+## Variable or Placeholder: <var>
+
+       var.elem =
+               element var { var.inner & var.attrs }
+       var.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       var.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= var.elem
+
+## (Sample) Output: <samp>
+
+       samp.elem =
+               element samp { samp.inner & samp.attrs }
+       samp.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       samp.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= samp.elem
+
+## User Input: <kbd>
+
+       kbd.elem =
+               element kbd { kbd.inner & kbd.attrs }
+       kbd.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       kbd.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= kbd.elem
+
+## Superscript: <sup>
+
+       sup.elem =
+               element sup { sup.inner & sup.attrs }
+       sup.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       sup.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= sup.elem
+
+## Subscript: <sub>
+
+       sub.elem =
+               element sub { sub.inner & sub.attrs }
+       sub.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       sub.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= sub.elem
+
+## Quotation: <q>
+
+       q.elem =
+               element q { q.inner & q.attrs }
+       q.attrs =
+               (       common.attrs
+               &       q.attrs.cite?
+               &       common.attrs.aria?
+               )
+               q.attrs.cite =
+                       attribute cite {
+                               common.data.uri
+                       }
+       q.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= q.elem
+
+## Title of Work: <cite>
+
+       cite.elem =
+               element cite { cite.inner & cite.attrs }
+       cite.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       cite.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= cite.elem
+
+## Generic Span: <span>
+
+       span.elem =
+               element span { span.inner & span.attrs }
+       span.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       span.inner =
+               ( common.inner.phrasing ) # REVISIT allow ol and ul?
+
+       common.elem.phrasing |= span.elem
+
+## Bidirectional Override: <bdo>
+
+       bdo.elem =
+               element bdo { bdo.inner & bdo.attrs }
+       bdo.attrs =
+               (       common.attrs # dir required in Schematron
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+       bdo.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= bdo.elem
+
+## Bidirectional Isolate: <bdi>
+
+       bdi.elem =
+               element bdi { bdi.inner & bdi.attrs }
+       bdi.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+       bdi.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= bdi.elem
+
+## Line Break: <br>
+
+       br.elem =
+               element br { br.inner & br.attrs }
+       br.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+       br.inner =
+               ( empty )
+
+       common.elem.phrasing |= br.elem
+
+## Line-break opportunity: <wbr>
+
+       wbr.elem =
+               element wbr { wbr.inner & wbr.attrs }
+       wbr.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+       wbr.inner =
+               ( empty )
+
+       common.elem.phrasing |= wbr.elem
diff --git a/packages/html5-schema/rdfa.rnc b/packages/html5-schema/rdfa.rnc
new file mode 100644
index 0000000..3c849d9
--- /dev/null
+++ b/packages/html5-schema/rdfa.rnc
@@ -0,0 +1,285 @@
+nonRDFaLite = empty
+# #####################################################################
+##  RELAX NG Schema for HTML 5: RDFa 1.1 and RDFa Lite 1.1            #
+# #####################################################################
+
+# #####################################################################
+##  RDFa Datatypes                                                    #
+# #####################################################################
+
+common.data.rdfa.safecurie =
+       xsd:string {
+               pattern = "\[(([\i-[:]][\c-[:]]*)?:?)[^\s]*\]"
+               minLength = "2"
+       }
+common.data.rdfa.curie =
+       xsd:string {
+               pattern = "(([\i-[:]][\c-[:]]*)?:)[^\s]*"
+               minLength = "1"
+       }
+common.data.rdfa.term =
+       xsd:string {
+               pattern = "[\i-[:]][/\c-[:]]*"
+       }
+
+# #####################################################################
+##  RDFa Attributes                                                   #
+# #####################################################################
+
+common.attrs.rdfa &=
+       (       common.attrs.rdfa.about?
+       &       common.attrs.rdfa.prefix?
+       &       common.attrs.rdfa.property?
+       &       common.attrs.rdfa.typeof?
+       &       common.attrs.rdfa.vocab?
+       &       common.attrs.rdfa.content?
+       &       common.attrs.rdfa.datatype?
+       &       common.attrs.rdfa.rel?
+       &       common.attrs.rdfa.resource?
+       &       common.attrs.rdfa.rev?
+       &       common.attrs.rdfa.inlist?
+       )
+       common.attrs.rdfa.prefix =
+               attribute prefix {
+                       (
+                               xsd:string {
+                                       pattern = "\s*([\i-[:]][\c-[:]]*: [^ 
]+)(\s+[\i-[:]][\c-[:]]*: [^ ]+)*\s*"
+                               }
+                               |       string ""
+                       )
+               }
+       common.attrs.rdfa.property =
+               attribute property {
+                       (
+                               list {
+                                       (       common.data.rdfa.term
+                                       |       common.data.rdfa.curie
+                                       |       common.data.uri.absolute
+                                       )+
+                               }
+                       |       string ""
+                       )
+               }
+       common.attrs.rdfa.resource =
+               attribute resource {
+                       (       common.data.rdfa.safecurie
+                       |       common.data.rdfa.curie
+                       |       common.data.uri
+                       )
+               }
+       common.attrs.rdfa.typeof =
+               attribute typeof {
+                       (
+                       list {
+                               (       common.data.rdfa.term
+                               |       common.data.rdfa.curie
+                               |       common.data.uri.absolute
+                               )+
+                       }
+                       |       string ""
+                       )
+               }
+       common.attrs.rdfa.vocab =
+               attribute vocab {
+                       (       common.data.uri.absolute
+                       |       string ""
+                       )
+               }
+       common.attrs.rdfa.about =
+               attribute about {
+                       (       common.data.rdfa.safecurie
+                       |       common.data.rdfa.curie
+                       |       common.data.uri
+                       )
+               } & nonRDFaLite
+       common.attrs.rdfa.content =
+               attribute content {
+                       string
+               } & nonRDFaLite
+       common.attrs.rdfa.datatype =
+               attribute datatype {
+                       (       common.data.rdfa.term
+                       |       common.data.rdfa.curie
+                       |       common.data.uri.absolute
+                       |       string ""
+                       )
+               } & nonRDFaLite
+       common.attrs.rdfa.rel =
+               attribute rel {
+                       (
+                               list {
+                                       (       common.data.rdfa.term
+                                       |       common.data.rdfa.curie
+                                       |       common.data.uri.absolute
+                                       )+
+                               }
+                               |       string ""
+                       )
+               } & nonRDFaLite
+       common.attrs.rdfa.rev =
+               attribute rev {
+                       (
+                               list {
+                                       (       common.data.rdfa.term
+                                       |       common.data.rdfa.curie
+                                       |       common.data.uri.absolute
+                                       )+
+                               }
+                               |       string ""
+                       )
+               } & nonRDFaLite
+       common.attrs.rdfa.inlist =
+               attribute inlist {
+                       string
+               } & nonRDFaLite
+
+common.attrs.rdfa.no-rel &=
+       (       common.attrs.rdfa.about?
+       &       common.attrs.rdfa.prefix?
+       &       common.attrs.rdfa.property?
+       &       common.attrs.rdfa.typeof?
+       &       common.attrs.rdfa.vocab?
+       &       common.attrs.rdfa.content?
+       &       common.attrs.rdfa.datatype?
+       &       common.attrs.rdfa.resource?
+       &       common.attrs.rdfa.rev?
+       &       common.attrs.rdfa.inlist?
+       )
+common.attrs.rdfa.no-rel-rev &=
+       (       common.attrs.rdfa.about?
+       &       common.attrs.rdfa.prefix?
+       &       common.attrs.rdfa.property?
+       &       common.attrs.rdfa.typeof?
+       &       common.attrs.rdfa.vocab?
+       &       common.attrs.rdfa.content?
+       &       common.attrs.rdfa.datatype?
+       &       common.attrs.rdfa.resource?
+       &       common.attrs.rdfa.inlist?
+       )
+common.attrs.rdfa.no-content-noproperty &=
+       (       common.attrs.rdfa.about?
+       &       common.attrs.rdfa.prefix?
+       &       common.attrs.rdfa.typeof?
+       &       common.attrs.rdfa.vocab?
+       &       common.attrs.rdfa.datatype?
+       &       common.attrs.rdfa.resource?
+       &       common.attrs.rdfa.inlist?
+       )
+
+common.attrs &= common.attrs.rdfa
+
+a.attrs &= common.attrs.rdfa.no-rel-rev
+area.attrs &= common.attrs.rdfa.no-rel
+base.attrs &= common.attrs.rdfa.no-rel
+
+link.rdfa.elem.metadata =
+       element link { link.inner & link.rdfa.attrs.metadata }
+link.rdfa.elem.phrasing =
+       element link { link.inner & link.rdfa.attrs.phrasing }
+link.rdfa.attrs.metadata =
+       (       common.attrs.basic
+       &       common.attrs.i18n
+       &       common.attrs.present
+       &       common.attrs.other
+       &       (       (       common.attrs.rdfa.property
+                       &       link.attrs.rel?
+                       )
+                       |
+                       (       common.attrs.rdfa.property?
+                       &       link.attrs.rel
+                       )
+               )
+       &       link.attrs.href
+       &       common.attrs.rdfa.about?
+       &       common.attrs.rdfa.prefix?
+       &       common.attrs.rdfa.typeof?
+       &       common.attrs.rdfa.vocab?
+       &       common.attrs.rdfa.content?
+       &       common.attrs.rdfa.datatype?
+       &       common.attrs.rdfa.resource?
+       &       common.attrs.rdfa.rev?
+       &       common.attrs.rdfa.inlist?
+       &       shared-hyperlink.attrs.hreflang?
+       &       shared-hyperlink.attrs.media?
+       &       shared-hyperlink.attrs.type?
+       &       link.attrs.sizes?
+       #       link.attrs.title included in common.attrs
+       &       embedded.content.attrs.crossorigin?
+       &       (       common.attrs.aria.role.link
+               |       common.attrs.aria.role.presentation
+               |       common.attrs.aria.role.menuitem
+               )?
+       )
+link.rdfa.attrs.phrasing =
+       (       common.attrs.basic
+       &       common.attrs.i18n
+       &       common.attrs.present
+       &       common.attrs.other
+       &       common.attrs.rdfa.property
+       &       link.attrs.rel?
+       &       (       (       common.attrs.rdfa.resource
+                       &       link.attrs.href?
+                       )
+                       |
+                       (       common.attrs.rdfa.resource?
+                       &       link.attrs.href
+                       )
+               )
+       &       common.attrs.rdfa.about?
+       &       common.attrs.rdfa.prefix?
+       &       common.attrs.rdfa.typeof?
+       &       common.attrs.rdfa.vocab?
+       &       common.attrs.rdfa.content?
+       &       common.attrs.rdfa.datatype?
+       &       common.attrs.rdfa.rev?
+       &       common.attrs.rdfa.inlist?
+       &       shared-hyperlink.attrs.hreflang?
+       &       shared-hyperlink.attrs.media?
+       &       shared-hyperlink.attrs.type?
+       &       link.attrs.sizes?
+       #       link.attrs.title included in common.attrs
+       &       embedded.content.attrs.crossorigin?
+       &       (       common.attrs.aria.role.link
+               |       common.attrs.aria.role.presentation
+               |       common.attrs.aria.role.menuitem
+               )?
+       )
+       common.elem.metadata |= link.rdfa.elem.metadata
+       common.elem.phrasing |= link.rdfa.elem.phrasing
+
+## <meta property=foo content=bar> in head ("name" attribute optional)
+       meta.property.elem =
+               element meta { meta.inner & meta.property.attrs }
+       meta.property.attrs =
+               (       common.attrs.basic
+               &       common.attrs.i18n
+               &       common.attrs.present
+               &       common.attrs.other
+               &       meta.name.attrs.name?
+               &       common.attrs.rdfa.property
+               &       meta.name.attrs.content
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+       common.elem.metadata |= meta.property.elem
+
+## <meta property=foo content=bar> in body ("name" attribute disallowed)
+       meta.property-no-name.elem =
+               element meta { meta.inner & meta.property-no-name.attrs }
+       meta.property-no-name.attrs =
+               (       common.attrs.basic
+               &       common.attrs.i18n
+               &       common.attrs.present
+               &       common.attrs.other
+               &       common.attrs.rdfa.property
+               &       meta.name.attrs.content
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+       common.elem.phrasing |= meta.property-no-name.elem
+
+meta.property.attrs &= common.attrs.rdfa.no-content-noproperty
+meta.property-no-name.attrs &= common.attrs.rdfa.no-content-noproperty
+meta.name.attrs &= common.attrs.rdfa.no-content-noproperty
diff --git a/packages/html5-schema/revision.rnc 
b/packages/html5-schema/revision.rnc
new file mode 100644
index 0000000..a357bd4
--- /dev/null
+++ b/packages/html5-schema/revision.rnc
@@ -0,0 +1,54 @@
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Revision Annotations                  #
+# #####################################################################
+
+## Common Attributes
+
+       edit.attrs.cite =
+               attribute cite {
+                       common.data.uri
+               }
+       edit.attrs.datetime =
+               attribute datetime {
+                       common.data.datetime | common.data.date
+               }
+
+## Inserts: <ins>
+
+       ins.elem.flow =
+               element ins { ins.inner.flow & ins.attrs }
+       ins.elem.phrasing =
+               element ins { ins.inner.phrasing & ins.attrs }
+       ins.attrs =
+               (       common.attrs
+               &       edit.attrs.cite?
+               &       edit.attrs.datetime?
+               &       common.attrs.aria?
+               )
+       ins.inner.flow =
+               ( common.inner.transparent.flow )
+       ins.inner.phrasing =
+               ( common.inner.phrasing )
+
+       common.elem.flow |= ins.elem.flow
+       common.elem.phrasing |= ins.elem.phrasing
+
+## Deletions: <del>
+
+       del.elem.flow =
+               element del { del.inner.flow & del.attrs }
+       del.elem.phrasing =
+               element del { del.inner.phrasing & del.attrs }
+       del.attrs =
+               (       common.attrs
+               &       edit.attrs.cite?
+               &       edit.attrs.datetime?
+               &       common.attrs.aria?
+               )
+       del.inner.flow =
+               ( common.inner.transparent.flow )
+       del.inner.phrasing =
+               ( common.inner.phrasing )
+
+       common.elem.flow |= del.elem.flow
+       common.elem.phrasing |= del.elem.phrasing
diff --git a/packages/html5-schema/ruby.rnc b/packages/html5-schema/ruby.rnc
new file mode 100644
index 0000000..dfd0e3f
--- /dev/null
+++ b/packages/html5-schema/ruby.rnc
@@ -0,0 +1,81 @@
+datatypes w = "http://whattf.org/datatype-draft";
+namespace local = ""
+
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Ruby                                  #
+# #####################################################################
+
+#######################################################################
+
+## Ruby Annotation: <ruby>
+
+       ruby.elem =
+               element ruby { ruby.inner & ruby.attrs }
+       ruby.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       ruby.inner =
+               (       (       common.inner.phrasing
+                       |       rb.elem
+                       )+
+               ,       (       (       rt.elem
+                               |       rtc.elem
+                               )+
+                               |       (       rp.elem
+                                       ,       (       rt.elem
+                                               |       rtc.elem
+                                               )+
+                                       ,       rp.elem
+                                       )
+                       )
+               )+
+
+       common.elem.phrasing |= ruby.elem
+
+## Ruby Text: <rt>
+
+       rt.elem =
+               element rt { rt.inner & rt.attrs }
+       rt.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       rt.inner =
+               ( common.inner.phrasing )
+
+## Ruby Text Container: <rtc>
+
+       rtc.elem =
+               element rtc { rtc.inner & rtc.attrs }
+       rtc.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       rtc.inner =
+               (       common.inner.phrasing
+                       |       rt.elem
+                       |       rp.elem
+               )*
+
+## Ruby Base: <rb>
+
+       rb.elem =
+               element rb { rb.inner & rb.attrs }
+       rb.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       rb.inner =
+               ( common.inner.phrasing )
+
+## Ruby Parenthesis: <rp>
+
+       rp.elem =
+               element rp { rp.inner & rp.attrs }
+       rp.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       rp.inner =
+               ( common.inner.phrasing )
diff --git a/packages/html5-schema/sectional.rnc 
b/packages/html5-schema/sectional.rnc
new file mode 100644
index 0000000..afbac8f
--- /dev/null
+++ b/packages/html5-schema/sectional.rnc
@@ -0,0 +1,172 @@
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Sectioning Markup                     #
+# #####################################################################
+
+# #####################################################################
+## Headings
+
+## Heading (Rank 1): <h1>
+
+       h1.elem =
+               element h1 { h1.inner & h1.attrs }
+       h1.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.implicit.heading
+                       |       common.attrs.aria.role.heading
+                       |       common.attrs.aria.role.tab
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+       h1.inner =
+               ( common.inner.phrasing )
+
+       common.elem.flow |= h1.elem
+
+## Heading (Rank 2): <h2>
+
+       h2.elem =
+               element h2 { h2.inner & h2.attrs }
+       h2.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.implicit.heading
+                       |       common.attrs.aria.role.heading
+                       |       common.attrs.aria.role.tab
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+       h2.inner =
+               ( common.inner.phrasing )
+
+       common.elem.flow |= h2.elem
+
+## Heading (Rank 3): <h3>
+
+       h3.elem =
+               element h3 { h3.inner & h3.attrs }
+       h3.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.implicit.heading
+                       |       common.attrs.aria.role.heading
+                       |       common.attrs.aria.role.tab
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+       h3.inner =
+               ( common.inner.phrasing )
+
+       common.elem.flow |= h3.elem
+
+## Heading (Rank 4): <h4>
+
+       h4.elem =
+               element h4 { h4.inner & h4.attrs }
+       h4.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.implicit.heading
+                       |       common.attrs.aria.role.heading
+                       |       common.attrs.aria.role.tab
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+       h4.inner =
+               ( common.inner.phrasing )
+
+       common.elem.flow |= h4.elem
+
+## Heading (Rank 5): <h5>
+
+       h5.elem =
+               element h5 { h5.inner & h5.attrs }
+       h5.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.implicit.heading
+                       |       common.attrs.aria.role.heading
+                       |       common.attrs.aria.role.tab
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+       h5.inner =
+               ( common.inner.phrasing )
+
+       common.elem.flow |= h5.elem
+
+## Heading (Rank 6): <h6>
+
+       h6.elem =
+               element h6 { h6.inner & h6.attrs }
+       h6.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.implicit.heading
+                       |       common.attrs.aria.role.heading
+                       |       common.attrs.aria.role.tab
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+       h6.inner =
+               ( common.inner.phrasing )
+
+       common.elem.flow |= h6.elem
+
+## Heading Group: <hgroup>
+
+       hgroup.elem =
+               element hgroup { hgroup.inner & hgroup.attrs } & nonW3C
+       hgroup.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.implicit.heading
+                       |       common.attrs.aria.role.heading
+                       |       common.attrs.aria.role.tab
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+       hgroup.inner =
+               (       (       h1.elem
+                       |       h2.elem
+                       |       h3.elem
+                       |       h4.elem
+                       |       h5.elem
+                       |       h6.elem
+                       )
+                       &       common.elem.script-supporting*
+               )+
+
+       common.elem.flow |= hgroup.elem
+
+# #####################################################################
+## Section Meta
+
+## Contact Info: <address>
+
+       address.elem =
+               element address { address.inner & address.attrs }
+       address.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.role.contentinfo
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+       address.inner = 
+               ( common.inner.flow )
+
+       common.elem.flow |= address.elem
+
+# #####################################################################
+## Quotations  
+
+## Block Quotes: <blockquote>
+
+       blockquote.elem =
+               element blockquote { blockquote.inner & blockquote.attrs }
+       blockquote.attrs =
+               (       common.attrs
+               &       blockquote.attrs.cite?
+               &       common.attrs.aria?
+               )
+               blockquote.attrs.cite =
+                       attribute cite {
+                               common.data.uri
+                       }
+       blockquote.inner =
+               ( common.inner.flow )
+
+       common.elem.flow |= blockquote.elem
diff --git a/packages/html5-schema/structural.rnc 
b/packages/html5-schema/structural.rnc
new file mode 100644
index 0000000..410f34d
--- /dev/null
+++ b/packages/html5-schema/structural.rnc
@@ -0,0 +1,135 @@
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Block Markup Added in HTML5           #
+# #####################################################################
+
+## Section: <section>
+
+       section.elem =
+               element section { section.inner & section.attrs }
+       section.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.implicit.region
+                       |       common.attrs.aria.role.alert
+                       |       common.attrs.aria.role.alertdialog
+                       |       common.attrs.aria.role.contentinfo
+                       |       common.attrs.aria.role.dialog
+                       |       common.attrs.aria.role.log
+                       |       common.attrs.aria.role.marquee
+                       |       common.attrs.aria.role.region
+                       |       common.attrs.aria.role.status
+                       |       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.landmark.application
+                       |       common.attrs.aria.landmark.document
+                       |       common.attrs.aria.landmark.main
+                       |       common.attrs.aria.landmark.search
+                       )?
+               )
+       section.inner =
+               ( common.inner.flow )
+
+       common.elem.flow |= section.elem
+
+## Navigational Links: <nav>
+
+       nav.elem =
+               element nav { nav.inner & nav.attrs }
+       nav.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.implicit.navigation
+                       |       common.attrs.aria.landmark.navigation
+                       )?
+               )
+       nav.inner =
+               ( common.inner.flow )
+
+       common.elem.flow |= nav.elem
+
+## Article: <article>
+
+       article.elem =
+               element article { article.inner & article.attrs }
+       article.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.implicit.article
+                       |       common.attrs.aria.landmark.article
+                       |       common.attrs.aria.landmark.document
+                       |       common.attrs.aria.landmark.application
+                       |       common.attrs.aria.landmark.main
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+       article.inner =
+               (       style.elem*
+               ,       common.inner.flow 
+               )
+               
+       common.elem.flow |= article.elem
+
+## Tangential Aside: <aside>
+
+       aside.elem =
+               element aside { aside.inner & aside.attrs }
+       aside.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.implicit.complementary
+                       |       common.attrs.aria.landmark.note
+                       |       common.attrs.aria.landmark.complementary
+                       |       common.attrs.aria.landmark.search
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+       aside.inner =
+               (       style.elem*
+               ,       common.inner.flow 
+               )
+
+       common.elem.flow |= aside.elem
+
+## Header: <header>
+
+       header.elem =
+               element header { header.inner & header.attrs }
+       header.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.implicit.banner
+                       |       common.attrs.aria.landmark.banner
+                       |       common.attrs.aria.role.group
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+       header.inner =
+               ( common.inner.flow )
+
+       common.elem.flow |= header.elem
+
+## Footer: <footer>
+
+       footer.elem =
+               element footer { footer.inner & footer.attrs }
+       footer.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.implicit.contentinfo
+                       |       common.attrs.aria.landmark.contentinfo
+                       |       common.attrs.aria.role.group
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+       footer.inner =
+               ( common.inner.flow )
+
+       common.elem.flow |= footer.elem
+
+## main content: <main>
+
+       main.elem =
+               element main { main.inner & main.attrs }
+       main.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.implicit.main
+                       |       common.attrs.aria.landmark.main
+                       )?
+               )
+       main.inner =
+               ( common.inner.flow )
+
+       common.elem.flow |= main.elem
diff --git a/packages/html5-schema/tables.rnc b/packages/html5-schema/tables.rnc
new file mode 100644
index 0000000..b6021da
--- /dev/null
+++ b/packages/html5-schema/tables.rnc
@@ -0,0 +1,244 @@
+datatypes w = "http://whattf.org/datatype-draft";
+
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Tables                                #
+# #####################################################################
+
+# #####################################################################
+## Table Envelope
+
+## Table Datatypes
+
+#      tables.data.multilen =
+#              (       common.data.integer.positive
+#              |       common.data.percent
+#              |       xsd:token { pattern = "[0-9]+\*" } #REVISIT should this 
one be string? 
+#              )
+
+## Table Alignment Attributes
+
+       tables.attrs.alignment =
+               (       tables.attrs.align?
+               &       tables.attrs.char?
+               &       tables.attrs.valign?
+               )
+               tables.attrs.align =
+                       attribute align {
+                               (       w:string "left" 
+                               |       w:string "center"
+                               |       w:string "right"
+                               |       w:string "justify"
+                               |       w:string "char"
+                               )
+                       }
+               tables.attrs.char =
+                       attribute char {
+                               xsd:string { pattern = "." }
+                       }
+               tables.attrs.valign =
+                       attribute valign {
+                               (       w:string "top"
+                               |       w:string "middle"
+                               |       w:string "bottom"
+                               |       w:string "baseline"
+                               )
+                       }
+
+## Data Table: <table>
+
+       table.elem =
+               element table { table.inner & table.attrs }
+       table.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       table.inner =
+               (       caption.elem?
+               ,       common.elem.script-supporting*
+               ,       colgroup.elem*
+               ,       common.elem.script-supporting*
+               ,       thead.elem?
+               ,       common.elem.script-supporting*
+               ,       (       (       tfoot.elem
+                               ,       common.elem.script-supporting*
+                               ,       ( tbody.elem* | tr.elem+ )
+                               ,       common.elem.script-supporting*
+                               )
+                       |       (       ( tbody.elem* | tr.elem+ )
+                               ,       common.elem.script-supporting*
+                               ,       tfoot.elem?
+                               )
+                       )
+               ) 
+
+       common.elem.flow |= table.elem
+
+## Table Caption: <caption>
+
+       caption.elem =
+               element caption { caption.inner & caption.attrs }
+       caption.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       caption.inner =
+               ( common.inner.flow )
+
+# #####################################################################
+## Table Super Structure
+
+## Table Column Group: <colgroup>
+
+       colgroup.elem =
+               element colgroup { colgroup.inner & colgroup.attrs }
+       colgroup.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+               colgroup.attrs.span =
+                       attribute span {
+                               common.data.integer.positive
+                       }
+       colgroup.inner =
+               (       (       col.elem*
+                       &       common.elem.script-supporting*
+                       )
+                       |       colgroup.attrs.span?
+               )
+
+## Table Column: <col>
+
+       col.elem =
+               element col { col.inner & col.attrs }
+       col.attrs =
+               (       common.attrs
+               &       col.attrs.span?
+               &       common.attrs.aria?
+               )
+               col.attrs.span =
+                       attribute span {
+                               common.data.integer.positive
+                       }
+       col.inner =
+               ( empty )
+
+## Table Header Row Group
+
+       thead.elem =
+               element thead { thead.inner & thead.attrs }
+       thead.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       thead.inner =
+               (       tr.elem*
+               &       common.elem.script-supporting*
+               )
+
+## Table Footer Row Group
+
+       tfoot.elem =
+               element tfoot { tfoot.inner & tfoot.attrs }
+       tfoot.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       tfoot.inner =
+               (       tr.elem*
+               &       common.elem.script-supporting*
+               )
+
+## Table Row Group
+
+       tbody.elem =
+               element tbody { tbody.inner & tbody.attrs }
+       tbody.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       tbody.inner =
+               (       tr.elem*
+               &       common.elem.script-supporting*
+               )
+
+# #####################################################################
+## Cell Structure
+
+## Table Row
+
+       tr.elem =
+               element tr { tr.inner & tr.attrs }
+       tr.attrs =
+               (       common.attrs
+               &       common.attrs.aria?
+               )
+       tr.inner =
+               ( ( td.elem | th.elem | common.elem.script-supporting )* )
+
+## Common Table Cell Attributes
+
+       tables.attrs.cell-structure =
+               (       tables.attrs.colspan?
+               &       tables.attrs.rowspan?
+               )
+               tables.attrs.colspan =
+                       attribute colspan {
+                               common.data.integer.positive
+                       }
+               tables.attrs.rowspan =
+                       attribute rowspan {
+                               common.data.integer.non-negative
+                       }
+
+       tables.attrs.access-headers =
+               ( tables.attrs.headers? )
+               tables.attrs.headers =
+                       attribute headers {
+                               common.data.idrefs
+                       }
+
+       tables.attrs.define-headers =
+               ( tables.attrs.scope? )
+               tables.attrs.scope =
+                       attribute scope {
+                               (       w:string "row"
+                               |       w:string "col"
+                               |       w:string "rowgroup"
+                               |       w:string "colgroup"
+                               )
+                       }
+               tables.attrs.abbr =
+                       attribute abbr {
+                               text
+                       }
+
+## Table Data Cell: <td>
+
+       td.elem =
+               element td { td.inner & td.attrs }
+       td.attrs =
+               (       common.attrs
+               &       tables.attrs.cell-structure
+               &       tables.attrs.headers?
+#              &       tables.attrs.alignment
+               &       common.attrs.aria?
+               )
+       td.inner =
+               ( common.inner.flow )
+
+## Table Header Cells: <th>
+
+       th.elem =
+               element th { th.inner & th.attrs }
+       th.attrs =
+               (       common.attrs
+               &       tables.attrs.cell-structure
+               &       tables.attrs.scope?
+               &       tables.attrs.headers?
+#              &       tables.attrs.alignment
+               &       (       common.attrs.aria?
+                       |       common.attrs.aria.implicit.column-or-row-header
+                       )
+               )
+       th.inner =
+               ( common.inner.flow )
diff --git a/packages/html5-schema/web-components.rnc 
b/packages/html5-schema/web-components.rnc
new file mode 100644
index 0000000..bf45715
--- /dev/null
+++ b/packages/html5-schema/web-components.rnc
@@ -0,0 +1,43 @@
+datatypes w = "http://whattf.org/datatype-draft";
+
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Web Components
+# #####################################################################
+
+## Templates: <template>
+
+       template.elem =
+               element template { template.inner & template.attrs }
+       template.attrs =
+               ( common.attrs )
+       template.inner =
+               (       common.inner.metadata
+               |       common.inner.flow
+               |       ol.inner
+               |       ul.inner
+               |       dl.inner
+               |       figure.inner
+               |       ruby.inner
+               |       object.inner.flow
+               |       object.inner.phrasing
+               |       video.inner.flow
+               |       video.inner.phrasing
+               |       audio.inner.flow
+               |       audio.inner.phrasing
+               |       table.inner
+               |       colgroup.inner
+               |       thead.inner
+               |       tbody.inner
+               |       tfoot.inner
+               |       tr.inner
+               |       fieldset.inner
+               |       select.inner
+               |       details.inner
+               |       menu.popup.inner
+               )
+       common.elem.metadata |= template.elem
+       common.elem.phrasing |= template.elem
+       common.elem.script-supporting |= template.elem
+
+# also allow <script> wherever <template> is allowed
+       common.elem.script-supporting |= script.elem
diff --git a/packages/html5-schema/web-forms-scripting.rnc 
b/packages/html5-schema/web-forms-scripting.rnc
new file mode 100644
index 0000000..63fe1c4
--- /dev/null
+++ b/packages/html5-schema/web-forms-scripting.rnc
@@ -0,0 +1,27 @@
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Web Forms 1.0 Scripting               #
+# #####################################################################
+
+       scripting.attr.form.select =
+               attribute onselect { string }
+       scripting.attr.form.change =
+               attribute onchange { string }
+
+#      input.text.attrs &=
+#              (       scripting.attr.form.select?
+#              )
+
+#      shared-form.attrs &=
+#              (       scripting.attr.form.change?
+#              )
+
+#      form.attrs &=
+#              (       scripting.attr.form.reset?
+#              &       scripting.attr.form.submit?
+#              )
+               scripting.attr.form.submit =
+                       attribute onsubmit { string }
+               scripting.attr.form.reset =
+                       attribute onreset { string } 
+               
+               
diff --git a/packages/html5-schema/web-forms.rnc 
b/packages/html5-schema/web-forms.rnc
new file mode 100644
index 0000000..c58e652
--- /dev/null
+++ b/packages/html5-schema/web-forms.rnc
@@ -0,0 +1,607 @@
+datatypes w = "http://whattf.org/datatype-draft";
+
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Web Forms 1.0 markup                  #
+# #####################################################################
+
+## Shared attributes for form controls
+
+       common-form.attrs =
+               (       common-form.attrs.name?
+               &       common-form.attrs.disabled?
+               )
+               
+       common-form.attrs.name = 
+               attribute name {
+                       form.data.nonemptystring
+               }
+
+       common-form.attrs.disabled = 
+               attribute disabled {
+                       w:string "disabled" | w:string ""
+               }
+
+       shared-form.attrs.readonly = 
+               attribute readonly {
+                       w:string "readonly" | w:string ""
+               }
+
+       shared-form.attrs.maxlength = 
+               attribute maxlength {
+                       common.data.integer.non-negative
+               }
+
+       shared-form.attrs.size = 
+               attribute size {
+                       common.data.integer.positive
+               }
+       
+       # REVISIT tabindex goes in common.attrs
+
+## Shared attributes for <input>
+       
+       input.attrs.checked = 
+               attribute checked {
+                       w:string "checked" | w:string ""
+               }
+
+## Text Field: <input type='text'>
+
+       input.text.elem = 
+               element input { input.text.attrs }
+       input.text.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       input.text.attrs.type?
+               &       shared-form.attrs.maxlength? 
+               &       shared-form.attrs.readonly?
+               &       shared-form.attrs.size?
+               &       input.text.attrs.value? 
+               &       (       common.attrs.aria.implicit.textbox
+                       |       common.attrs.aria.implicit.combobox
+                       |       common.attrs.aria.role.textbox
+                       |       common.attrs.aria.role.combobox
+                       )?
+               )
+               input.text.attrs.type = 
+                       attribute type {
+                               w:string "text"
+                       }
+               input.text.attrs.value =
+                       attribute value {
+                               form.data.stringwithoutlinebreaks
+                       }
+               
+       input.elem = input.text.elem
+
+## Password Field: <input type='password'>
+
+       input.password.elem = 
+               element input { input.password.attrs }
+       input.password.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       input.password.attrs.type
+               &       shared-form.attrs.maxlength? 
+               &       shared-form.attrs.readonly? 
+               &       shared-form.attrs.size?
+               &       input.password.attrs.value? 
+               &       (       common.attrs.aria.implicit.textbox
+                       |       common.attrs.aria.role.textbox
+                       )?
+               )
+               input.password.attrs.type = 
+                       attribute type {
+                               w:string "password"
+                       }
+               input.password.attrs.value =
+                       attribute value {
+                               form.data.stringwithoutlinebreaks
+                       }
+               
+       input.elem |= input.password.elem
+               
+## Checkbox: <input type='checkbox'>
+
+       input.checkbox.elem = 
+               element input { input.checkbox.attrs }
+       input.checkbox.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       input.checkbox.attrs.type
+               &       input.attrs.checked? 
+               &       input.checkbox.attrs.value? 
+               &       (       common.attrs.aria.implicit.checkbox
+                       |       common.attrs.aria.role.checkbox
+                       |       common.attrs.aria.role.menuitemcheckbox
+                       |       common.attrs.aria.role.switch
+                       )?
+               )
+               input.checkbox.attrs.type = 
+                       attribute type {
+                               w:string "checkbox"
+                       }
+               input.checkbox.attrs.value =
+                       attribute value {
+                               string #REVISIT require non-empty value?
+                       }
+               
+       input.elem |= input.checkbox.elem
+       
+## Radiobutton: <input type='radio'>
+
+       input.radio.elem = 
+               element input { input.radio.attrs }
+       input.radio.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       input.radio.attrs.type
+               &       input.attrs.checked? 
+               &       input.radio.attrs.value? 
+               &       (       common.attrs.aria.implicit.radio
+                       |       common.attrs.aria.role.radio
+                       |       common.attrs.aria.role.menuitemradio
+                       )?
+               )
+               input.radio.attrs.type = 
+                       attribute type {
+                               w:string "radio"
+                       }
+               input.radio.attrs.value =
+                       attribute value {
+                               string #REVISIT require non-empty value?
+                       }
+               
+       input.elem |= input.radio.elem
+       
+## Scripting Hook Button: <input type='button'>
+
+       input.button.elem = 
+               element input { input.button.attrs }
+       input.button.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       input.button.attrs.type
+               &       input.button.attrs.value? 
+               &       (       common.attrs.aria.implicit.button
+                       |       common.attrs.aria.role.button
+                       |       common.attrs.aria.role.link
+                       |       common.attrs.aria.role.menuitem
+                       |       common.attrs.aria.role.menuitemcheckbox
+                       |       common.attrs.aria.role.menuitemradio
+                       |       common.attrs.aria.role.radio
+                       |       common.attrs.aria.role.switch
+                       )?
+               )
+               input.button.attrs.type = 
+                       attribute type {
+                               w:string "button"
+                       }
+               input.button.attrs.value =
+                       attribute value {
+                               string #REVISIT require non-empty value?
+                       }
+               
+       input.elem |= input.button.elem
+       #REVISIT should this be enabled by a scripting module only?
+       
+## Submit Button: <input type='submit'>
+
+       input.submit.elem = 
+               element input { input.submit.attrs }
+       input.submit.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       input.submit.attrs.type
+               &       input.submit.attrs.value? 
+               &       (       common.attrs.aria.implicit.button
+                       |       common.attrs.aria.role.button
+                       )?
+               )
+               input.submit.attrs.type = 
+                       attribute type {
+                               w:string "submit"
+                       }
+               input.submit.attrs.value =
+                       attribute value {
+                               string #REVISIT require non-empty value?
+                       }
+               
+       input.elem |= input.submit.elem
+               
+## Reset Button: <input type='reset'>
+
+       input.reset.elem = 
+               element input { input.reset.attrs }
+       input.reset.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       input.reset.attrs.type
+               &       input.reset.attrs.value? 
+               &       (       common.attrs.aria.implicit.button
+                       |       common.attrs.aria.role.button
+                       )?
+               )
+               input.reset.attrs.type = 
+                       attribute type {
+                               w:string "reset"
+                       }
+               input.reset.attrs.value =
+                       attribute value {
+                               string #REVISIT require non-empty value?
+                       }
+               
+       input.elem |= input.reset.elem
+       # REVISIT does reset make sense outside a form?
+               
+## File Upload: <input type='file'>
+
+       input.file.elem = 
+               element input { input.file.attrs }
+       input.file.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       input.file.attrs.type
+               &       input.file.attrs.accept?
+               &       common.attrs.aria?
+               )
+               input.file.attrs.type = 
+                       attribute type {
+                               w:string "file"
+                       }
+               input.file.attrs.accept = 
+                       attribute accept {
+                               form.data.mimetypelist
+                       }
+
+       input.elem |= input.file.elem
+       
+## Hidden String: <input type='hidden'>
+
+       input.hidden.elem = 
+               element input { input.hidden.attrs }
+       input.hidden.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       input.hidden.attrs.type
+               &       input.hidden.attrs.value? 
+               &       common.attrs.aria?
+               )
+               input.hidden.attrs.type = 
+                       attribute type {
+                               w:string "hidden"
+                       }
+               input.hidden.attrs.value =
+                       attribute value {
+                               string
+                       }
+               
+       input.elem |= input.hidden.elem
+               
+## Image Submit Button: <input type='image'>
+
+       input.image.elem = 
+               element input { input.image.attrs }
+       input.image.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       input.image.attrs.type
+               &       input.image.attrs.alt 
+               &       input.image.attrs.src? 
+               &       (       common.attrs.aria.implicit.button
+                       |       common.attrs.aria.role.button
+                       |       common.attrs.aria.role.link
+                       |       common.attrs.aria.role.menuitem
+                       |       common.attrs.aria.role.menuitemcheckbox
+                       |       common.attrs.aria.role.menuitemradio
+                       |       common.attrs.aria.role.radio
+                       |       common.attrs.aria.role.switch
+                       )?
+               )       
+               input.image.attrs.type = 
+                       attribute type {
+                               w:string "image"
+                       }
+               input.image.attrs.alt = 
+                       attribute alt {
+                               form.data.nonemptystring
+                       }
+               input.image.attrs.src = 
+                       attribute src {
+                               common.data.uri.non-empty
+                       }
+       
+       input.elem |= input.image.elem
+       
+       common.elem.phrasing |= input.elem
+
+## Text Area: <textarea>
+
+       textarea.elem =
+               element textarea { textarea.inner & textarea.attrs }
+       textarea.attrs =
+               (       common.attrs
+               &       common-form.attrs
+               &       shared-form.attrs.readonly?
+               &       textarea.attrs.rows-and-cols-wf1
+               &       (       common.attrs.aria.implicit.textbox
+                       |       common.attrs.aria.role.textbox
+                       )?
+               #FIXME onfocus, onblur, onselect,onchange
+               )
+               # This is ugly. 
+               textarea.attrs.rows-and-cols-wf1 = 
+                       textarea.attrs.rows-and-cols-wf1.inner  
+               textarea.attrs.rows-and-cols-wf1.inner =
+                       (       textarea.attrs.cols
+                       &       textarea.attrs.rows
+                       )
+               textarea.attrs.cols = 
+                       attribute cols {
+                               common.data.integer.positive
+                       }
+               textarea.attrs.rows = 
+                       attribute rows {
+                               common.data.integer.positive
+                       }
+       textarea.inner =
+               ( text )
+
+       common.elem.phrasing |= textarea.elem
+
+# Due to limitations with interleave, handling single/multiple selection
+# enforcement in RELAX NG seems to be possible but really awkward.
+# Tried it. Leaving it to Schematron.
+
+## Select menu option: <option selected>
+
+       option.elem =
+               element option { option.inner & option.attrs }
+       option.attrs =
+               (       common.attrs
+               &       common-form.attrs.disabled?
+               &       option.attrs.selected?
+               &       option.attrs.label?
+               &       option.attrs.value?
+               &       (       common.attrs.aria.implicit.option
+                       |       common.attrs.aria.role.option
+                       )?
+               )
+               option.attrs.selected =
+                       attribute selected {
+                               w:string "selected" | w:string ""
+                       }
+               option.attrs.label =
+                       attribute label {
+                               form.data.nonemptystring
+                       }               
+               option.attrs.value =
+                       attribute value {
+                               string
+                       }               
+       option.inner =
+               ( text )
+
+## Option Group: <optgroup>
+
+       optgroup.elem =
+               element optgroup { optgroup.inner & optgroup.attrs }
+       optgroup.attrs = 
+               (       common.attrs
+               &       optgroup.attrs.label
+               &       common-form.attrs.disabled?
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               optgroup.attrs.label =
+                       attribute label {
+                               string
+                       }
+       optgroup.inner =
+               (       option.elem*
+               &       common.elem.script-supporting*
+               )
+
+## Selection Menu: <select>
+
+       select.elem =
+               element select { select.inner & select.attrs }
+       select.attrs =
+               (       common.attrs
+               &       common-form.attrs
+               &       select.attrs.size?
+               &       select.attrs.multiple?
+               # FIXME onfocus, onblur, onchange
+               &       (       common.attrs.aria.implicit.listbox
+                       |       common.attrs.aria.role.listbox # 
aria-multiselectable depends on "multiple" value; check in assertions
+                       )?
+               )
+               select.attrs.size =
+                       attribute size {
+                               common.data.integer.positive
+                       }
+               select.attrs.multiple =
+                       attribute multiple {
+                               w:string "multiple" | w:string ""
+                       }
+       select.inner =
+               (       optgroup.elem*
+               &       option.elem*
+               &       common.elem.script-supporting*
+               )
+
+       common.elem.phrasing |= select.elem
+       
+## Shared Definitions for Complex Button
+       
+       button.attrs.value =
+               attribute value {
+                       string
+               }
+       button.inner = 
+               ( common.inner.phrasing )
+       
+## Complex Submit Button: <button type='submit'>
+
+       button.submit.elem =
+               element button { button.inner & button.submit.attrs }   
+       button.submit.attrs =
+               (       common.attrs
+               &       common-form.attrs
+               &       button.submit.attrs.type?
+               &       button.attrs.value?
+               &       (       common.attrs.aria.implicit.button
+                       |       common.attrs.aria.role.button
+                       |       common.attrs.aria.role.checkbox
+                       |       common.attrs.aria.role.link
+                       |       common.attrs.aria.role.menuitem
+                       |       common.attrs.aria.role.menuitemcheckbox
+                       |       common.attrs.aria.role.menuitemradio
+                       |       common.attrs.aria.role.radio
+                       )?
+               )
+               button.submit.attrs.type =
+                       attribute type {
+                               w:string "submit"
+                       }
+
+       button.elem = button.submit.elem
+       
+## Complex Reset Button: <button type='reset'>
+
+       button.reset.elem =
+               element button { button.inner & button.reset.attrs }    
+       button.reset.attrs =
+               (       common.attrs
+               &       common-form.attrs
+               &       button.reset.attrs.type
+               &       button.attrs.value? #REVISIT I guess this still affects 
the DOM
+               &       (       common.attrs.aria.implicit.button
+                       |       common.attrs.aria.role.button
+                       |       common.attrs.aria.role.checkbox
+                       |       common.attrs.aria.role.link
+                       |       common.attrs.aria.role.menuitem
+                       |       common.attrs.aria.role.menuitemcheckbox
+                       |       common.attrs.aria.role.menuitemradio
+                       |       common.attrs.aria.role.radio
+                       |       common.attrs.aria.role.switch
+                       )?
+               )
+               button.reset.attrs.type =
+                       attribute type {
+                               w:string "reset"
+                       }
+
+       button.elem |= button.reset.elem
+       
+## Complex Push Button: <button type='button'>
+
+       button.button.elem =
+               element button { button.inner & button.button.attrs }   
+       button.button.attrs =
+               (       common.attrs
+               &       common-form.attrs
+               &       button.button.attrs.type
+               &       button.attrs.value? #REVISIT I guess this still affects 
the DOM
+               &       (       common.attrs.aria.implicit.button
+                       |       common.attrs.aria.role.button
+                       |       common.attrs.aria.role.checkbox
+                       |       common.attrs.aria.role.link
+                       |       common.attrs.aria.role.menuitem
+                       |       common.attrs.aria.role.menuitemcheckbox
+                       |       common.attrs.aria.role.menuitemradio
+                       |       common.attrs.aria.role.radio
+                       |       common.attrs.aria.role.switch
+                       )?
+               )
+               button.button.attrs.type =
+                       attribute type {
+                               w:string "button"
+                       }
+
+       button.elem |= button.button.elem
+
+       common.elem.phrasing |= button.elem
+
+## Form: <form>
+
+       form.elem =
+               element form { form.inner & form.attrs }
+       form.attrs =
+               (       common.attrs
+               &       form.attrs.action? #REVISIT Should this be required 
anyway?
+               &       form.attrs.method?
+               &       form.attrs.enctype?
+               &       common-form.attrs.name?
+               &       form.attrs.accept-charset?
+               &       (       common.attrs.aria.implicit.form
+                       |       common.attrs.aria.landmark.form
+                       |       common.attrs.aria.role.search
+                       |       common.attrs.aria.role.presentation
+                       )?
+               )
+               form.attrs.action =
+                       attribute action {
+                               common.data.uri.non-empty
+                       }
+               form.attrs.method =
+                       attribute method {
+                               form.attrs.method.data
+                       }
+                       form.attrs.method.data = 
+                               ( w:string "get" | w:string "post" )
+               form.attrs.enctype =
+                       attribute enctype {
+                               form.attrs.enctype.data
+                       }
+                       form.attrs.enctype.data = 
+                               (       w:string 
"application/x-www-form-urlencoded" 
+                               |       w:string "multipart/form-data"
+                               )
+               form.attrs.accept-charset =
+                       attribute accept-charset {
+                               form.data.charsetlist
+                       }       
+       form.inner =
+               ( common.inner.flow )
+
+       common.elem.flow |= form.elem
+
+## Fieldset: <fieldset>
+
+       fieldset.elem =
+               element fieldset { fieldset.inner & fieldset.attrs }
+       fieldset.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.implicit.group
+                       |       common.attrs.aria
+                       )?
+               )
+       fieldset.inner =
+               (       legend.elem? #REVISIT should this be required?
+               ,       common.inner.flow
+               )
+
+       common.elem.flow |= fieldset.elem
+       
+## Label: <label>
+
+       label.elem =
+               element label { label.inner & label.attrs }
+       label.attrs =
+               (       common.attrs
+               &       label.attrs.for?
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               label.attrs.for =
+                       attribute for {
+                               common.data.idref
+                       }
+       label.inner =
+               ( common.inner.phrasing ) #REVISIT making obvious guess
+
+       common.elem.phrasing |= label.elem
+
diff --git a/packages/html5-schema/web-forms2-scripting.rnc 
b/packages/html5-schema/web-forms2-scripting.rnc
new file mode 100644
index 0000000..e0f6a38
--- /dev/null
+++ b/packages/html5-schema/web-forms2-scripting.rnc
@@ -0,0 +1,9 @@
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Web Forms 2.0 Scripting               #
+# #####################################################################
+
+#      output.attrs &=
+#              (       scripting.attr.form.formchange?
+#              &       scripting.attr.form.forminput?
+#              &       scripting.attr.form.change?
+#              )
diff --git a/packages/html5-schema/web-forms2.rnc 
b/packages/html5-schema/web-forms2.rnc
new file mode 100644
index 0000000..ebd3ee4
--- /dev/null
+++ b/packages/html5-schema/web-forms2.rnc
@@ -0,0 +1,789 @@
+datatypes w = "http://whattf.org/datatype-draft";
+
+# #####################################################################
+##  RELAX NG Schema for HTML 5: Web Forms 2.0 markup                  #
+# #####################################################################
+
+## Shared attributes for form controls
+
+       common-form.attrs &=
+               ( common-form.attrs.form? )
+
+       common-form.attrs.form |= 
+               attribute form {
+                       common.data.idref
+               }
+
+       shared-form.attrs.formaction =
+               attribute formaction {
+                       common.data.uri.non-empty
+               }
+
+       shared-form.attrs.formenctype =
+               attribute formenctype {
+                       shared-form.attrs.formenctype.data
+               }
+               shared-form.attrs.formenctype.data = 
+                       (       w:string "application/x-www-form-urlencoded" 
+                       |       w:string "multipart/form-data"
+                       |       w:string "text/plain"
+                       )
+
+       shared-form.attrs.formmethod =
+               attribute formmethod {
+                       shared-form.attrs.formmethod.data
+               }
+               shared-form.attrs.formmethod.data = 
+                       ( w:string "get"
+                       | w:string "post"
+                       )
+
+       shared-form.attrs.formtarget = 
+               attribute formtarget {
+                       common.data.browsing-context-or-keyword
+               }
+
+       shared-form.attrs.formnovalidate = 
+               attribute formnovalidate {
+                       w:string "formnovalidate" | w:string ""
+               }
+
+       shared-form.attrs.autofocus = 
+               attribute autofocus {
+                       w:string "autofocus" | w:string ""
+               }
+       
+       shared-form.attrs.pattern = 
+               attribute pattern {
+                       form.data.pattern
+               }
+
+       shared-form.attrs.template = 
+               attribute template {
+                       common.data.idref
+               }
+
+       shared-form.attrs.required = 
+               attribute required {
+                       w:string "required" | w:string ""
+               }
+
+       shared-form.attrs.placeholder = 
+               attribute placeholder {
+                       form.data.stringwithoutlinebreaks
+               }
+
+       shared-form.attrs.dirname = 
+               attribute dirname {
+                       form.data.nonemptystring
+               }
+
+       shared-form.attrs.inputmode =
+               attribute inputmode {
+                       string
+               }
+
+       shared-form.attrs.minlength =
+               attribute minlength {
+                       common.data.integer.non-negative
+               }
+
+## Shared attributes for <input>
+               
+       shared-input.attrs =
+               (       input.attrs.autocomplete?
+               &       shared-form.attrs.autofocus?
+               &       input.attrs.list?
+               &       shared-form.attrs.maxlength?
+               &       shared-form.attrs.minlength?
+               &       shared-form.attrs.pattern?
+               &       shared-form.attrs.placeholder?
+               &       shared-form.attrs.readonly?
+               &       shared-form.attrs.required?
+               &       shared-form.attrs.size?
+               )
+
+       input.attrs.autocomplete = 
+               attribute autocomplete {
+                       w:string "on" | w:string "off"
+               }
+       
+       input.attrs.list = 
+               attribute list {
+                       common.data.idref
+               }
+       
+       input.attrs.step.float = 
+               attribute step {
+                       w:string "any" | common.data.float.positive
+               }
+       
+       input.attrs.step.integer = 
+               attribute step {
+                       w:string "any" | common.data.integer.positive 
+               }
+       
+       input.attrs.multiple = 
+               attribute multiple {
+                       w:string "multiple" | w:string ""
+               }
+               
+## Text Field: <input type='text'>, Extensions
+
+       input.text.attrs &=
+               (       input.attrs.autocomplete?
+               &       shared-form.attrs.autofocus?
+               &       shared-form.attrs.dirname?
+               &       input.attrs.list?
+               &       shared-form.attrs.pattern?
+               &       shared-form.attrs.required?
+               &       shared-form.attrs.placeholder?
+               &       shared-form.attrs.inputmode?
+               &       shared-form.attrs.minlength?
+               )
+
+## Password Field: <input type='password'>, Extensions
+
+       input.password.attrs &=
+               (       input.attrs.autocomplete?
+               &       shared-form.attrs.autofocus?
+               &       input.attrs.list?
+               &       shared-form.attrs.pattern?
+               &       shared-form.attrs.placeholder?
+               &       shared-form.attrs.required?
+               &       shared-form.attrs.minlength?
+               )
+
+## Checkbox <input type='checkbox'>, Extensions
+
+       input.checkbox.attrs &=
+               (       shared-input.attrs      )
+
+## Radiobutton: <input type='radio'>, Extensions
+
+       input.radio.attrs &=
+               (       shared-input.attrs      )
+
+## Scripting Hook Button: <input type='button'>, Extensions
+
+       input.button.attrs &=
+               (       shared-input.attrs      )
+
+## Submit Button: <input type='submit'>, Extensions
+
+       input.submit.attrs &=
+               (       shared-input.attrs
+               &       shared-form.attrs.formaction?
+               &       shared-form.attrs.formenctype?
+               &       shared-form.attrs.formmethod?
+               &       shared-form.attrs.formtarget?
+               &       shared-form.attrs.formnovalidate?
+               )
+
+## Reset Button: <input type='reset'>, Extensions
+
+       input.reset.attrs &=
+               (       shared-input.attrs      )
+
+## File Upload: <input type='file'>, Extensions
+
+       input.file.attrs &=
+               (       shared-input.attrs
+               &       input.attrs.multiple?
+               )
+
+## Image Submit Button: <input type='image'>, Extensions
+
+       input.image.attrs &=
+               (       shared-input.attrs
+               &       shared-form.attrs.formaction?
+               &       shared-form.attrs.formenctype?
+               &       shared-form.attrs.formmethod?
+               &       shared-form.attrs.formtarget?
+               &       shared-form.attrs.formnovalidate?
+               &       input.image.attrs.height?
+               &       input.image.attrs.width?
+               )       
+               input.image.attrs.height =
+                       attribute height {
+                               common.data.integer.non-negative
+                       }
+               input.image.attrs.width =
+                       attribute width {
+                               common.data.integer.non-negative
+                       }
+
+## Global Date and Time: <input type='datetime'>
+
+       input.datetime.elem = 
+               element input { input.datetime.attrs }
+       input.datetime.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       shared-input.attrs
+               &       input.datetime.attrs.type
+               &       input.datetime.attrs.min?
+               &       input.datetime.attrs.max?
+               &       input.attrs.step.float?
+               &       input.datetime.attrs.value?
+               &       common.attrs.aria?
+               )       
+               input.datetime.attrs.type = 
+                       attribute type {
+                               w:string "datetime"
+                       }
+               input.datetime.attrs.min =
+                       attribute min {
+                               common.data.datetime
+                       }
+               input.datetime.attrs.max =
+                       attribute max {
+                               common.data.datetime
+                       }       
+               input.datetime.attrs.value =
+                       attribute value {
+                               w:string "" | common.data.datetime
+                       }
+               
+       input.elem |= input.datetime.elem
+
+## Date and Time with No Time Zone Information: <input type='datetime-local'>
+
+       input.datetime-local.elem = 
+               element input { input.datetime-local.attrs }
+       input.datetime-local.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       shared-input.attrs
+               &       input.datetime-local.attrs.type
+               &       input.datetime-local.attrs.min?
+               &       input.datetime-local.attrs.max?
+               &       input.attrs.step.float?
+               &       input.datetime-local.attrs.value?
+               &       common.attrs.aria?
+               )       
+               input.datetime-local.attrs.type = 
+                       attribute type {
+                               w:string "datetime-local"
+                       }
+               input.datetime-local.attrs.min =
+                       attribute min {
+                               form.data.datetime-local
+                       }
+               input.datetime-local.attrs.max =
+                       attribute max {
+                               form.data.datetime-local                        
+                       }       
+               input.datetime-local.attrs.value =
+                       attribute value {
+                               w:string "" | form.data.datetime-local
+                       }
+               
+       input.elem |= input.datetime-local.elem
+
+## Date: <input type='date'>
+
+       input.date.elem = 
+               element input { input.date.attrs }
+       input.date.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       shared-input.attrs
+               &       input.date.attrs.type
+               &       input.date.attrs.min?
+               &       input.date.attrs.max?
+               &       input.attrs.step.integer?
+               &       input.date.attrs.value?
+               &       common.attrs.aria?
+               )       
+               input.date.attrs.type = 
+                       attribute type {
+                               w:string "date"
+                       }
+               input.date.attrs.min =
+                       attribute min {
+                               form.data.date
+                       }
+               input.date.attrs.max =
+                       attribute max {
+                               form.data.date                  
+                       }       
+               input.date.attrs.value =
+                       attribute value {
+                               w:string "" | form.data.date
+                       }
+               
+       input.elem |= input.date.elem
+
+## Year and Month: <input type='month'>
+
+       input.month.elem = 
+               element input { input.month.attrs }
+       input.month.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       shared-input.attrs
+               &       input.month.attrs.type
+               &       input.month.attrs.min?
+               &       input.month.attrs.max?
+               &       input.attrs.step.integer?
+               &       input.month.attrs.value?
+               &       common.attrs.aria?
+               )       
+               input.month.attrs.type = 
+                       attribute type {
+                               w:string "month"
+                       }
+               input.month.attrs.min =
+                       attribute min {
+                               form.data.month
+                       }
+               input.month.attrs.max =
+                       attribute max {
+                               form.data.month                 
+                       }       
+               input.month.attrs.value =
+                       attribute value {
+                               w:string "" | form.data.month
+                       }
+               
+       input.elem |= input.month.elem
+
+## Time without Time Zone Information: <input type='time'>
+
+       input.time.elem = 
+               element input { input.time.attrs }
+       input.time.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       shared-input.attrs
+               &       input.time.attrs.type
+               &       input.time.attrs.min?
+               &       input.time.attrs.max?
+               &       input.attrs.step.float?
+               &       input.time.attrs.value?
+               &       common.attrs.aria?
+               )       
+               input.time.attrs.type = 
+                       attribute type {
+                               w:string "time"
+                       }
+               input.time.attrs.min =
+                       attribute min {
+                               form.data.time
+                       }
+               input.time.attrs.max =
+                       attribute max {
+                               form.data.time                  
+                       }       
+               input.time.attrs.value =
+                       attribute value {
+                               w:string "" | form.data.time
+                       }
+               
+       input.elem |= input.time.elem
+
+## Year and Week: <input type='week'>
+
+       input.week.elem = 
+               element input { input.week.attrs }
+       input.week.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       shared-input.attrs
+               &       input.week.attrs.type
+               &       input.week.attrs.min?
+               &       input.week.attrs.max?
+               &       input.attrs.step.integer?
+               &       input.week.attrs.value?
+               &       common.attrs.aria?
+               )       
+               input.week.attrs.type = 
+                       attribute type {
+                               w:string "week"
+                       }
+               input.week.attrs.min =
+                       attribute min {
+                               form.data.week
+                       }
+               input.week.attrs.max =
+                       attribute max {
+                               form.data.week                  
+                       }       
+               input.week.attrs.value =
+                       attribute value {
+                               w:string "" | form.data.week
+                       }
+               
+       input.elem |= input.week.elem
+
+## Number: <input type='number'>
+
+       input.number.elem = 
+               element input { input.number.attrs }
+       input.number.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       shared-input.attrs
+               &       input.number.attrs.type
+               &       input.number.attrs.min?
+               &       input.number.attrs.max?
+               &       input.attrs.step.float?
+               &       input.number.attrs.value?
+               &       (       common.attrs.aria.implicit.spinbutton
+                       |       common.attrs.aria.role.spinbutton
+                       )?
+               )       
+               input.number.attrs.type = 
+                       attribute type {
+                               w:string "number"
+                       }
+               input.number.attrs.min =
+                       attribute min {
+                               common.data.float
+                       }
+               input.number.attrs.max =
+                       attribute max {
+                               common.data.float                       
+                       }       
+               input.number.attrs.value =
+                       attribute value {
+                               w:string "" | common.data.float
+                       }
+               
+       input.elem |= input.number.elem
+
+## Imprecise Number: <input type='range'>
+
+       input.range.elem = 
+               element input { input.range.attrs }
+       input.range.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       shared-input.attrs
+               &       input.range.attrs.type
+               &       input.range.attrs.min?
+               &       input.range.attrs.max?
+               &       input.attrs.step.float?
+               &       input.range.attrs.value?
+               &       (       common.attrs.aria.implicit.slider
+                       |       common.attrs.aria.role.slider
+                       )?
+               )       
+               input.range.attrs.type = 
+                       attribute type {
+                               w:string "range"
+                       }
+               input.range.attrs.min =
+                       attribute min {
+                               common.data.float
+                       }
+               input.range.attrs.max =
+                       attribute max {
+                               common.data.float                       
+                       }       
+               input.range.attrs.value =
+                       attribute value {
+                               common.data.float
+                       }
+               
+       input.elem |= input.range.elem
+
+## Email Address: <input type='email'>
+
+       input.email.elem = 
+               element input { input.email.attrs }     
+       input.email.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       shared-input.attrs
+               &       input.email.attrs.type
+               &       (       (       input.attrs.multiple
+                               &       input.email.attrs.value.multiple?
+                               )
+                       |       input.email.attrs.value.single?
+                       )?
+               &       (       common.attrs.aria.implicit.textbox
+                       |       common.attrs.aria.implicit.combobox
+                       |       common.attrs.aria.role.textbox
+                       |       common.attrs.aria.role.combobox
+                       )?
+               )       
+               input.email.attrs.type = 
+                       attribute type {
+                               w:string "email"
+                       }
+               input.email.attrs.value.single =
+                       attribute value {
+                               form.data.emailaddress
+                       }
+               input.email.attrs.value.multiple =
+                       attribute value {
+                               form.data.emailaddresslist
+                       }
+               
+       input.elem |= input.email.elem
+
+## IRI: <input type='url'>
+
+       input.url.elem = 
+               element input { input.url.attrs }
+       input.url.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       shared-input.attrs
+               &       input.url.attrs.type
+               &       input.url.attrs.value?
+               &       (       common.attrs.aria.implicit.textbox
+                       |       common.attrs.aria.implicit.combobox
+                       |       common.attrs.aria.role.textbox
+                       |       common.attrs.aria.role.combobox
+                       )?
+               )       
+               input.url.attrs.type = 
+                       attribute type {
+                               w:string "url"
+                       }
+               input.url.attrs.value =
+                       attribute value {
+                               w:string "" | common.data.uri.absolute
+                       }
+               
+       input.elem |= input.url.elem
+
+## Search: <input type='search'>
+
+       input.search.elem = 
+               element input { input.search.attrs }
+       input.search.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       shared-input.attrs
+               &       input.search.attrs.type
+               &       input.search.attrs.value?
+               &       shared-form.attrs.dirname?
+               &       (       common.attrs.aria.implicit.textbox
+                       |       common.attrs.aria.implicit.combobox
+                       |       common.attrs.aria.role.textbox
+                       |       common.attrs.aria.role.combobox
+                       )?
+               )       
+               input.search.attrs.type = 
+                       attribute type {
+                               w:string "search"
+                       }
+               input.search.attrs.value =
+                       attribute value {
+                               form.data.stringwithoutlinebreaks
+                       }
+               
+       input.elem |= input.search.elem
+
+## Telephone Number: <input type='tel'>
+
+       input.tel.elem = 
+               element input { input.tel.attrs }       
+       input.tel.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       shared-input.attrs
+               &       input.tel.attrs.type
+               &       input.tel.attrs.value?
+               &       (       common.attrs.aria.implicit.textbox
+                       |       common.attrs.aria.implicit.combobox
+                       |       common.attrs.aria.role.textbox
+                       |       common.attrs.aria.role.combobox
+                       )?
+               )       
+               input.tel.attrs.type = 
+                       attribute type {
+                               w:string "tel"
+                       }
+               input.tel.attrs.value =
+                       attribute value {
+                               form.data.stringwithoutlinebreaks
+                       }
+               
+       input.elem |= input.tel.elem
+
+## Color: <input type='color'>
+
+       input.color.elem = 
+               element input { input.color.attrs }     
+       input.color.attrs = 
+               (       common.attrs
+               &       common-form.attrs
+               &       input.color.attrs.type
+               &       input.color.attrs.value?
+               &       shared-input.attrs
+               &       common.attrs.aria?
+               )       
+               input.color.attrs.type = 
+                       attribute type {
+                               w:string "color"
+                       }
+               input.color.attrs.value =
+                       attribute value {
+                               w:string "" | form.data.color
+                       }
+               
+       input.elem |= input.color.elem
+
+## Form Output: <output>
+
+       output.elem =
+               element output { output.inner & output.attrs }
+       output.attrs =
+               (       common.attrs
+               &       common-form.attrs.name?
+               &       common-form.attrs.form?
+               &       output.attrs.for?
+               &       (       common.attrs.aria.implicit.status
+                       |       common.attrs.aria
+                       )?
+               )
+               output.attrs.for = 
+                       attribute for {
+                               common.data.idrefs #REVISIT spec says 
space--not whitespace
+                       }
+       output.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= output.elem
+
+## Text Area: <textarea>, extensions
+
+       textarea.attrs.rows-and-cols-wf1.inner &=
+               notAllowed
+       textarea.attrs.rows-and-cols-wf1 |= 
+               empty
+       textarea.attrs &=
+               (       shared-form.attrs.maxlength?
+               &       shared-form.attrs.minlength?
+               &       shared-form.attrs.autofocus? 
+               &       shared-form.attrs.required? 
+               &       shared-form.attrs.placeholder?
+               &       shared-form.attrs.dirname?
+               &       textarea.attrs.rows?
+               &       (       (       textarea.attrs.wrap.hard 
+                               &       textarea.attrs.cols
+                               )
+                       |       (       textarea.attrs.wrap.soft?
+                               &       textarea.attrs.cols?
+                               )
+                       )
+               &       shared-form.attrs.inputmode?
+               )
+               textarea.attrs.wrap.hard =
+                       attribute wrap {
+                               w:string "hard"
+                       }
+               textarea.attrs.wrap.soft =
+                       attribute wrap {
+                               w:string "soft"
+                       }
+
+## List of Prefill Data: <datalist>
+
+       #REVISIT should the options in datalist be non-selectable?
+
+       datalist.elem =
+               element datalist { datalist.inner & datalist.attrs }
+       datalist.inner =
+               ( option.elem* & common.inner.phrasing )
+       datalist.attrs =
+               (       common.attrs
+               &       (       common.attrs.aria.role.listbox # 
aria-multiselectable must be false; check by assertions
+                       |       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+
+       common.elem.phrasing |= datalist.elem
+
+## Complex Submit Button: <button type='submit'>, extensions
+
+       button.submit.attrs &=
+               (       shared-form.attrs.formaction? 
+               &       shared-form.attrs.autofocus? 
+               &       shared-form.attrs.formenctype? 
+               &       shared-form.attrs.formmethod? 
+               &       shared-form.attrs.formtarget? 
+               &       shared-form.attrs.formnovalidate? 
+               )
+       
+## Complex Reset Button: <button type='reset'>, extensions
+
+       button.reset.attrs &=
+               ( shared-form.attrs.autofocus? )
+       
+## Complex Push Button: <button type='button'>, extensions
+
+       button.button.attrs &=
+               ( shared-form.attrs.autofocus? )
+
+## Form: <form>, extensions
+       form.attrs &= 
+               (       form.attrs.novalidate?
+               &       form.attrs.target?
+               &       form.attrs.autocomplete?
+               )
+               form.attrs.novalidate = 
+                       attribute novalidate {
+                               w:string "novalidate" | w:string ""
+                       }
+               form.attrs.target = 
+                       attribute target {
+                               common.data.browsing-context-or-keyword
+                       }
+               form.attrs.autocomplete = 
+                       attribute autocomplete {
+                               w:string "on" | w:string "off"
+                       }
+               # REVISIT should this be case-insensitive in conforming XHTML 
documents?
+               form.attrs.enctype.data |= 
+                       ( w:string "text/plain" )
+
+## Fieldset: <fieldset>, extensions
+
+       fieldset.attrs &=
+               ( common-form.attrs )
+
+## Label: <label>, extensions
+
+       label.attrs &=
+               ( common-form.attrs.form? )
+
+## Key-pair generator/input control: <keygen>
+
+       keygen.elem =
+               element keygen { keygen.inner & keygen.attrs }
+       keygen.attrs =
+               (       common.attrs
+               &       keygen.attrs.challenge?
+               &       keygen.attrs.keytype?
+               &       shared-form.attrs.autofocus? 
+               &       common-form.attrs?
+               &       (       common.attrs.aria.role.presentation
+                       |       common.attrs.aria.role.menuitem
+                       )?
+               )
+               keygen.attrs.challenge =
+                       attribute challenge {
+                               string
+                       }
+               keygen.attrs.keytype = 
+                       attribute keytype {
+                               w:string "rsa"
+                       }
+       keygen.inner =
+               ( empty )
+
+       common.elem.phrasing |= keygen.elem
+
+## Selection Menu: <select>, Extensions
+
+       select.attrs &=
+               (       shared-form.attrs.autofocus? 
+               &       shared-form.attrs.required? 
+               )
diff --git a/packages/html5-schema/xhtml5.rnc b/packages/html5-schema/xhtml5.rnc
new file mode 100644
index 0000000..1c6c524
--- /dev/null
+++ b/packages/html5-schema/xhtml5.rnc
@@ -0,0 +1,40 @@
+default namespace = "http://www.w3.org/1999/xhtml";
+# #####################################################################
+##  RELAX NG Schema for XHTML 5                                       #
+# #####################################################################
+
+  # To validate an XHTML 5 document, you must first validate against #
+  # this schema and then ALSO validate against assertions.sch        #
+
+# #####################################################################
+## Schema Framework & Parameters
+
+include "common.rnc" {
+       # XHTML flavor #
+               XMLonly = empty
+               HTMLonly = notAllowed
+       # HTML 4 compat #
+               v5only = empty
+}
+
+# #####################################################################
+## Language Definitions
+
+start = html.elem
+
+include "meta.rnc"
+include "phrase.rnc"
+include "block.rnc"
+include "sectional.rnc"
+include "structural.rnc"
+include "revision.rnc"
+include "embed.rnc"
+include "ruby.rnc"
+include "media.rnc"
+include "core-scripting.rnc"
+include "tables.rnc"
+include "form-datatypes.rnc"
+include "web-forms.rnc"
+include "web-forms2.rnc"
+include "applications.rnc"
+include "data.rnc"
diff --git a/packages/hydra/hydra-ox.el b/packages/hydra/hydra-ox.el
index 1dc7088..e8d48e3 100644
--- a/packages/hydra/hydra-ox.el
+++ b/packages/hydra/hydra-ox.el
@@ -24,6 +24,8 @@
 ;; This shows how a complex dispatch menu can be built with Hydra.
 
 ;;; Code:
+
+(require 'hydra)
 (require 'org)
 (require 'hydra)                        ;`defhydradio' is not autoloaded!
 
diff --git a/packages/hydra/hydra-test.el b/packages/hydra/hydra-test.el
index 3fcd403..a40a0ca 100644
--- a/packages/hydra/hydra-test.el
+++ b/packages/hydra/hydra-test.el
@@ -1310,7 +1310,7 @@ _w_ Worf:                      % -8`hydra-tng/worf^^    
_h_ Set phasers to
               (goto-char (point-max))
               (search-backward "|")
               (delete-char 1)
-              (setq current-prefix-arg)
+              (setq current-prefix-arg nil)
               ,@body
               (insert "|")
               (when (region-active-p)
diff --git a/packages/hydra/hydra.el b/packages/hydra/hydra.el
index 16d44b0..1516c85 100644
--- a/packages/hydra/hydra.el
+++ b/packages/hydra/hydra.el
@@ -5,7 +5,7 @@
 ;; Author: Oleh Krehel <address@hidden>
 ;; Maintainer: Oleh Krehel <address@hidden>
 ;; URL: https://github.com/abo-abo/hydra
-;; Version: 0.13.3
+;; Version: 0.13.4
 ;; Keywords: bindings
 ;; Package-Requires: ((cl-lib "0.5"))
 
@@ -149,12 +149,12 @@ warn: keep KEYMAP and issue a warning instead of running 
the command."
   (dolist (frame (frame-list))
     (with-selected-frame frame
       (when overriding-terminal-local-map
-        (internal-pop-keymap hydra-curr-map 'overriding-terminal-local-map)
-        (unless hydra--ignore
-          (when hydra-curr-on-exit
-            (let ((on-exit hydra-curr-on-exit))
-              (setq hydra-curr-on-exit nil)
-              (funcall on-exit))))))))
+        (internal-pop-keymap hydra-curr-map 'overriding-terminal-local-map))))
+  (unless hydra--ignore
+    (when hydra-curr-on-exit
+      (let ((on-exit hydra-curr-on-exit))
+        (setq hydra-curr-on-exit nil)
+        (funcall on-exit)))))
 
 (unless (fboundp 'internal-push-keymap)
   (defun internal-push-keymap (keymap symbol)
@@ -1148,6 +1148,8 @@ DOC defaults to TOGGLE-NAME split and capitalized."
                    0
                  i)))))
 
+(require 'ring)
+
 (defvar hydra-pause-ring (make-ring 10)
   "Ring for paused hydras.")
 
diff --git a/packages/ioccur/ioccur.el b/packages/ioccur/ioccur.el
index 521d3de..aa2b23d 100644
--- a/packages/ioccur/ioccur.el
+++ b/packages/ioccur/ioccur.el
@@ -1,8 +1,8 @@
 ;;; ioccur.el --- Incremental occur
 
-;; Copyright (C) 2010-2013  Free Software Foundation, Inc.
+;; Copyright (C) 2010-2013, 2016  Free Software Foundation, Inc.
 
-;; Author: Thierry Volpiatto <thierry dot volpiatto at gmail dot com>
+;; Author: Thierry Volpiatto <address@hidden>
 ;; X-URL: https://github.com/thierryvolpiatto/ioccur
 ;; Version: 2.4
 ;; Compatibility: GNU Emacs >=22.3
diff --git a/packages/iterators/iterators.el b/packages/iterators/iterators.el
index 5ed1e8a..d9cb96b 100644
--- a/packages/iterators/iterators.el
+++ b/packages/iterators/iterators.el
@@ -28,6 +28,12 @@
 ;;; Commentary:
 ;;
 ;; This package extends "generator.el" with higher-level functions.
+;;
+;;
+;; TODO:
+;;
+;; - hook ilists into seq.el via `cl-defgeneric'
+
 
 ;;; Code:
 
@@ -91,6 +97,41 @@ used between the numbers and defaults to 1."
              (iter-yield (prog1 i (cl-incf i inc))))))
       (iterator-make (while t (iter-yield (prog1 i (cl-incf i))))))))
 
+(iter-defun iterator-of-directory-files-1 (directory &optional match nosort 
recurse follow-links)
+  "Helper for `iterator-of-directory-files'."
+  (when (file-accessible-directory-p directory)
+    (let ((files (directory-files directory t match nosort))  file)
+      (while (setq file (pop files))
+        (cond
+         ((not (file-directory-p file))
+          (iter-yield file))
+         ((member (file-name-nondirectory (directory-file-name file))
+                  '("." "..")))
+         (t
+          (iter-yield file)
+          (when (and (or follow-links (not (file-symlink-p file)))
+                     (if (functionp recurse) (funcall recurse file) recurse))
+            (iter-yield-from (iterator-of-directory-files-1
+                              file match nosort recurse follow-links)))))))))
+
+(defun iterator-of-directory-files (directory &optional full match nosort 
recurse follow-links)
+  "Return an iterator of names of files in DIRECTORY.
+Don't include files named \".\" or \"..\".  The arguments FULL,
+MATCH and NOSORT are like in `directory-files'.
+
+Optional argument RECURSE non-nil means recurse on
+subdirectories.  If RECURSE is a function, it should be a
+predicate accepting one argument, an absolute file name of a
+directory, and return non-nil when the returned iterator should
+recurse into that directory.  Any other non-nil value means
+recurse into every readable subdirectory.
+
+Even with recurse non-nil, don't descent into directories by
+following symlinks unless FOLLOW-LINKS is non-nil."
+  (iterator-map
+   (lambda (file) (if full file (file-relative-name file directory)))
+   (iterator-of-directory-files-1 directory match nosort recurse 
follow-links)))
+
 
 ;;;; Operations on iterators, transducers
 
diff --git a/packages/js2-mode/js2-mode.el b/packages/js2-mode/js2-mode.el
index 926003d..2d6f336 100644
--- a/packages/js2-mode/js2-mode.el
+++ b/packages/js2-mode/js2-mode.el
@@ -11212,18 +11212,13 @@ highlighting features of `js2-mode'."
     map)
   "Keymap used for js2 diagnostics buffers.")
 
-(defun js2-error-buffer-mode ()
+(define-derived-mode js2-error-buffer-mode special-mode "JS Lint Diagnostics"
   "Major mode for js2 diagnostics buffers.
 Selecting an error will jump it to the corresponding source-buffer error.
 \\{js2-error-buffer-mode-map}"
-  (interactive)
-  (setq major-mode 'js2-error-buffer-mode
-        mode-name "JS Lint Diagnostics")
-  (use-local-map js2-error-buffer-mode-map)
   (setq truncate-lines t)
   (set-buffer-modified-p nil)
-  (setq buffer-read-only t)
-  (run-hooks 'js2-error-buffer-mode-hook))
+  (setq buffer-read-only t))
 
 (defun js2-error-buffer-next ()
   "Move to next error and view it."
@@ -11252,7 +11247,7 @@ Selecting an error will jump it to the corresponding 
source-buffer error.
   "Scroll source buffer to show error at current line."
   (interactive)
   (cond
-   ((not (eq major-mode 'js2-error-buffer-mode))
+   ((not (derived-mode-p 'js2-error-buffer-mode))
     (message "Not in a js2 errors buffer"))
    ((not (buffer-live-p js2-source-buffer))
     (message "Source buffer has been killed"))
diff --git a/packages/let-alist/let-alist.el b/packages/let-alist/let-alist.el
deleted file mode 100644
index ca7a904..0000000
--- a/packages/let-alist/let-alist.el
+++ /dev/null
@@ -1,142 +0,0 @@
-;;; let-alist.el --- Easily let-bind values of an assoc-list by their names 
-*- lexical-binding: t; -*-
-
-;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
-
-;; Author: Artur Malabarba <address@hidden>
-;; Maintainer: Artur Malabarba <address@hidden>
-;; Version: 1.0.4
-;; Keywords: extensions lisp
-;; Prefix: let-alist
-;; Separator: -
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; This package offers a single macro, `let-alist'.  This macro takes a
-;; first argument (whose value must be an alist) and a body.
-;;
-;; The macro expands to a let form containing body, where each dotted
-;; symbol inside body is let-bound to their cdrs in the alist.  Dotted
-;; symbol is any symbol starting with a `.'.  Only those present in
-;; the body are let-bound and this search is done at compile time.
-;;
-;; For instance, the following code
-;;
-;;   (let-alist alist
-;;     (if (and .title .body)
-;;         .body
-;;       .site
-;;       .site.contents))
-;;
-;; essentially expands to
-;;
-;;   (let ((.title (cdr (assq 'title alist)))
-;;         (.body  (cdr (assq 'body alist)))
-;;         (.site  (cdr (assq 'site alist)))
-;;         (.site.contents (cdr (assq 'contents (cdr (assq 'site alist))))))
-;;     (if (and .title .body)
-;;         .body
-;;       .site
-;;       .site.contents))
-;;
-;; If you nest `let-alist' invocations, the inner one can't access
-;; the variables of the outer one. You can, however, access alists
-;; inside the original alist by using dots inside the symbol, as
-;; displayed in the example above by the `.site.contents'.
-;;
-;;; Code:
-
-
-(defun let-alist--deep-dot-search (data)
-  "Return alist of symbols inside DATA that start with a `.'.
-Perform a deep search and return an alist where each car is the
-symbol, and each cdr is the same symbol without the `.'."
-  (cond
-   ((symbolp data)
-    (let ((name (symbol-name data)))
-      (when (string-match "\\`\\." name)
-        ;; Return the cons cell inside a list, so it can be appended
-        ;; with other results in the clause below.
-        (list (cons data (intern (replace-match "" nil nil name)))))))
-   ((not (consp data)) nil)
-   (t (append (let-alist--deep-dot-search (car data))
-              (let-alist--deep-dot-search (cdr data))))))
-
-(defun let-alist--access-sexp (symbol variable)
-  "Return a sexp used to access SYMBOL inside VARIABLE."
-  (let* ((clean (let-alist--remove-dot symbol))
-         (name (symbol-name clean)))
-    (if (string-match "\\`\\." name)
-        clean
-      (let-alist--list-to-sexp
-       (mapcar #'intern (nreverse (split-string name "\\.")))
-       variable))))
-
-(defun let-alist--list-to-sexp (list var)
-  "Turn symbols LIST into recursive calls to `cdr' `assq' on VAR."
-  `(cdr (assq ',(car list)
-              ,(if (cdr list) (let-alist--list-to-sexp (cdr list) var)
-                 var))))
-
-(defun let-alist--remove-dot (symbol)
-  "Return SYMBOL, sans an initial dot."
-  (let ((name (symbol-name symbol)))
-    (if (string-match "\\`\\." name)
-        (intern (replace-match "" nil nil name))
-      symbol)))
-
-
-;;; The actual macro.
-;;;###autoload
-(defmacro let-alist (alist &rest body)
-  "Let-bind dotted symbols to their cdrs in ALIST and execute BODY.
-Dotted symbol is any symbol starting with a `.'.  Only those present
-in BODY are let-bound and this search is done at compile time.
-
-For instance, the following code
-
-  (let-alist alist
-    (if (and .title .body)
-        .body
-      .site
-      .site.contents))
-
-essentially expands to
-
-  (let ((.title (cdr (assq 'title alist)))
-        (.body  (cdr (assq 'body alist)))
-        (.site  (cdr (assq 'site alist)))
-        (.site.contents (cdr (assq 'contents (cdr (assq 'site alist))))))
-    (if (and .title .body)
-        .body
-      .site
-      .site.contents))
-
-If you nest `let-alist' invocations, the inner one can't access
-the variables of the outer one. You can, however, access alists
-inside the original alist by using dots inside the symbol, as
-displayed in the example above."
-  (declare (indent 1) (debug t))
-  (let ((var (make-symbol "alist")))
-    `(let ((,var ,alist))
-       (let ,(mapcar (lambda (x) `(,(car x) ,(let-alist--access-sexp (car x) 
var)))
-               (delete-dups (let-alist--deep-dot-search body)))
-         ,@body))))
-
-(provide 'let-alist)
-
-;;; let-alist.el ends here
diff --git a/packages/lex/lex.el b/packages/lex/lex.el
index bd84f58..6ba8123 100644
--- a/packages/lex/lex.el
+++ b/packages/lex/lex.el
@@ -1,6 +1,6 @@
 ;;; lex.el --- Lexical analyser construction  -*- lexical-binding:t -*-
 
-;; Copyright (C) 2008,2013,2014  Free Software Foundation, Inc.
+;; Copyright (C) 2008,2013,2014,2015  Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <address@hidden>
 ;; Keywords:
@@ -918,7 +918,15 @@ Returns a new NFA."
 
     res))
 
+;;;###autoload
 (defun lex-compile (alist)
+  "Compile a set of regular expressions.
+ALIST is a list of elements of the form (REGEXP . VALUE).
+The compiled automaton will match all those regexps at the same time
+and will return the VALUE fof the leftmost longest match.
+
+Each REGEXP object should be in the sexp form described in the
+Commentary section."
   (lex--dfa-wrapper
    (lambda ()
      (let* ((lex--char-equiv-table
diff --git a/packages/loccur/README.md b/packages/loccur/README.md
new file mode 100644
index 0000000..cea09cd
--- /dev/null
+++ b/packages/loccur/README.md
@@ -0,0 +1,50 @@
+# Loccur
+## Introduction
+**Loccur** is an amazing tool to quickly navigate in a file. It is a minor 
mode for Emacs acting like **occur** but w/o creating a new window. It just 
hides all the text excepting lines containing matches.
+## Installation
+Add to your `.emacs` or `.emacs.d/init.el` following lines:
+
+```scheme
+(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/";)
+                         ("melpa" . "http://melpa.milkbox.net/packages/";)))
+```
+                         
+Press `M-x` in GNU Emacs and write `list-packages`. Find the `loccur` in the 
list of packages and press `i` to select this package, `x` to install the 
package.
+
+
+## Screenshots
+Better to see it once:
+
+![loccur_gui](https://github.com/fourier/loccur/raw/screenshots/gui_emacs_with_loccur.gif
 "GUI Emacs with loccur")
+![loccur_term](https://github.com/fourier/loccur/raw/screenshots/emacs_with_loccur.gif
 "Emacs in terminal with loccur")
+
+
+## Usage
+
+To use it, add the following to your .emacs file:
+
+```scheme
+(require 'loccur)
+;; defines shortcut for loccur of the current word
+(define-key global-map [(control o)] 'loccur-current)
+;; defines shortcut for the interactive loccur command
+(define-key global-map [(control meta o)] 'loccur)
+;; defines shortcut for the loccur of the previously found word
+(define-key global-map [(control shift o)] 'loccur-previous-match)
+```
+
+Now you can point the cursor to the word and press `Ctrl+o` to hide all lines 
except those containing this word. Moving cursor to the required line and 
pressing `Ctrl+o` again will shows all the text. The good thing about this mode 
is what you can navigate through the buffer easily. `Ctrl+Shift+o` will repeat 
last search.
+
+### Available commands
+Below is the list of interactive commands available for user:
+
+* `loccur` interactively asks user for regexp to search or toggle search off 
(if `loccur-mode` is already enabled)
+* `loccur-current` searches for the current word under the cursor
+* `loccur-previous-match` repeat previous `loccur` command
+* `loccur-no-highlight` is the same as `loccur` but not highlighting matches
+* `loccur-toggle-highlight` toggles highlighting of matches
+
+### Customization
+* `loccur-jump-beginning-of-line` variable specifies if move the cursor to the 
beginning of the matching line. Default `nil`
+* `loccur-highlight-matching-regexp` variable whenever `loccur` should 
highlight matching words. Default `t`.
+* `loccur-face` face to be used while highlighting. Default points to 
`isearch` face.
diff --git a/packages/loccur/loccur.el b/packages/loccur/loccur.el
new file mode 100644
index 0000000..2921ba0
--- /dev/null
+++ b/packages/loccur/loccur.el
@@ -0,0 +1,323 @@
+;;; loccur.el --- Perform an occur-like folding in current buffer -*- 
lexical-binding: t; -*-
+
+;; Copyright (C) 2009-2016 Free Software Foundation, Inc
+;;
+;; Author: Alexey Veretennikov <address@hidden>
+;;
+;; Created: 2009-09-08
+;; Version: 1.2.2
+;; Package-Requires: ((cl-lib "0"))
+;; Keywords: matching
+;; URL: https://github.com/fourier/loccur
+;; Compatibility: GNU Emacs 23.x, GNU Emacs 24.x
+;;
+;; This file is part of GNU Emacs.
+;;
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+;;
+;;; Commentary:
+;;
+;; Add the following to your .emacs file:
+;; 
+;; (require 'loccur)
+;; ;; defines shortcut for loccur of the current word
+;; (define-key global-map [(control o)] 'loccur-current)
+;; ;; defines shortcut for the interactive loccur command
+;; (define-key global-map [(control meta o)] 'loccur)
+;; ;; defines shortcut for the loccur of the previously found word
+;; (define-key global-map [(control shift o)] 'loccur-previous-match)
+;;
+;;; Issues:
+;; Using with smooth-scrolling.el sometimes
+;; gives unexpected jumps in loccur mode
+;;
+;;; TODO:
+;; 
+;;; Change Log:
+;;
+;; 2015-12-27 (1.2.2)
+;;    + Preparation for GNU ELPA submission. Removed contributions
+;;    without signed papers
+;;    + added loccur-face - face to highlight text, by default isearch
+;; 
+;; 2013-10-22 (1.2.1)
+;;    + Added custom option loccur-jump-beginning-of-line; removed some
+;;    of cl dependencies
+;;
+;; 2010-03-07 (1.1.1)
+;;    + Default value is taken from prompt instead of an edit area
+;;    (thanks to Nathaniel Flath)
+;;
+;; 2009-10-05 (1.1.0)
+;;    + Added highlighting of the matched strings
+;;    + Now inserts selected region to the prompt
+;;    + Added defun for applying last found regexp(loccur-previous-match)
+;;    + Added intangible property together with invisibility
+;;
+;; 2009-09-08 (1.0.0)
+;;    Initial Release.
+;;
+;;; Code:
+
+(require 'cl-lib)
+
+(defgroup loccur nil
+  "Perform an occur-like folding in current buffer."
+  :group 'tools)
+
+;; should be defined before define-minor-mode
+(defvar loccur-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map (kbd "RET") '(lambda () (interactive) (loccur nil)))
+    ;; redefine Ctrl+Up/Down to Up/Down, since it looks like some problem
+    ;; with backward-paragraph and forward-paragraph with invisible overlays
+    (define-key map (kbd "<C-up>") 'previous-line)
+    (define-key map (kbd "<C-down>") 'next-line)
+    map)
+  "Keymap for the variable `loccur-mode'.")
+
+;;;###autoload
+(define-minor-mode loccur-mode
+  "Minor mode for navigating through the file.
+Hides all lines without matches like `occur' does, but without opening
+a new window."
+  :lighter " loccur"
+  (if loccur-mode
+      (loccur-1 loccur-current-search)
+    (loccur-remove-overlays)
+    (recenter)))
+
+(defface loccur-face
+  '((t (:inherit isearch)))
+  "Loccur face")
+
+
+(defconst loccur-overlay-invisible-property-name 'loccur-invisible-overlay
+  "Property name of the overlay for all invisible text.")
+
+(defconst loccur-overlay-visible-property-name 'loccur-visible-overlay
+  "Property name of the overlay for all visible text.")
+
+(defcustom loccur-jump-beginning-of-line nil
+  "Set cursor to the beginning of the line when the loccur function is called.
+Default: nil"
+  :type '(boolean)
+  :group 'loccur)
+
+(defcustom loccur-highlight-matching-regexp t
+  "If set to nil, do not highlight matching words.
+Default: t"
+  :type '(boolean)
+  :group 'loccur)
+
+(defvar loccur-history nil
+  "History of previously searched expressions for the prompt.")
+
+(defvar-local loccur-last-match nil
+  "Last match found.")
+
+(defvar-local loccur-overlay-list nil
+  "A list of currently active overlays.")
+
+(defvar-local loccur-current-search nil
+  "The expression to search in the current active mode.")
+
+(defun loccur-current ()
+  "Call `loccur' for the current word."
+  (interactive)
+  (loccur (current-word)))
+
+
+(defun loccur-previous-match ()
+  "Call `loccur' for the previously found word."
+  (interactive)
+  (loccur loccur-last-match))
+
+(defun loccur-no-highlight (regex)
+  "Perform search like loccur, but temporary removing match highlight.
+REGEX is regexp to search"
+  (interactive
+   (if loccur-mode
+       nil
+     (list (read-string "Loccur: " (loccur-prompt) 'loccur-history))))
+  (let ((loccur-highlight-matching-regexp nil))
+    (loccur regex)))
+
+(defun loccur-toggle-highlight ()
+  "Toggle the highlighting of the match."
+  (interactive)
+  (setq loccur-highlight-matching-regexp (not 
loccur-highlight-matching-regexp))
+  (when loccur-mode
+    (dolist (ovl loccur-overlay-list)
+      (when (overlay-get ovl loccur-overlay-visible-property-name)
+        (overlay-put ovl 'face (if loccur-highlight-matching-regexp 
'loccur-face nil))))))
+
+(defun loccur (regex)
+  "Perform a simple grep in current buffer.
+
+This command hides all lines from the current buffer except those
+containing the regular expression REGEX.  A second call of the function
+unhides lines again"
+  (interactive
+   (if loccur-mode
+       (list nil)
+     (list (read-string "Loccur: " (loccur-prompt) 'loccur-history))))
+  (if (or loccur-mode
+          (= (length regex) 0))
+      (progn
+        ;; remove current search and turn off loccur mode
+        ;; to allow to call `loccur' multiple times
+        (setf loccur-current-search nil)
+        (loccur-mode 0))
+    ;; otherwise do as usual
+    ;; if the regex argument is not equal to previous search
+    (when (not (string-equal regex loccur-current-search))
+      (cl-pushnew regex loccur-history)
+      (setf loccur-current-search regex)
+      (loccur-mode)
+      (when loccur-jump-beginning-of-line
+        (beginning-of-line))))) ; optionally jump to the beginning of line
+
+
+(defun loccur-prompt ()
+  "Return the default value of the prompt.
+
+Default value for prompt is a current word or active region(selection),
+if its size is 1 line"
+  (let ((prompt
+         (if (and transient-mark-mode
+                  mark-active)
+             (let ((pos1 (region-beginning))
+                   (pos2 (region-end)))
+               ;; Check if the start and the end of an active region is on
+               ;; the same line
+               (when (save-excursion
+                       (goto-char pos1)
+                       (<= pos2 (line-end-position)))
+                   (buffer-substring-no-properties pos1 pos2)))
+           (current-word))))
+    prompt))
+
+
+(defun loccur-1 (regex)
+  "Implementation of the `loccur' functionality.
+
+REGEX is an argument to `loccur'."
+  (let* ((buffer-matches (loccur-find-matches regex))
+         (ovl-bounds (loccur-create-overlay-bounds-btw-lines buffer-matches)))
+    (setq loccur-overlay-list
+          (loccur-create-invisible-overlays ovl-bounds))
+
+    (setq loccur-overlay-list
+          (append loccur-overlay-list
+                  (loccur-create-highlighted-overlays buffer-matches)))
+    (setq loccur-last-match regex)
+    (recenter)))
+
+(defun loccur-create-highlighted-overlays (buffer-matches)
+  "Create the list of overlays for BUFFER-MATCHES."
+  (let ((overlays
+         (mapcar (lambda (match)
+                   (make-overlay
+                    (nth 1 match)
+                    (nth 2 match)
+                    (current-buffer) t nil))
+                 buffer-matches)))
+    (mapc (lambda (ovl)
+            (overlay-put ovl loccur-overlay-visible-property-name t)
+            (when loccur-highlight-matching-regexp
+              (overlay-put ovl 'face 'loccur-face)))
+          overlays)))
+
+
+(defun loccur-create-invisible-overlays (ovl-bounds)
+  "Create a list of invisible overlays by given OVL-BOUNDS."
+  (let ((overlays
+         (mapcar (lambda (bnd)
+                   (make-overlay
+                    (car bnd)
+                    (cadr bnd)
+                    (current-buffer) t nil))
+                 ovl-bounds)))
+    (mapc (lambda (ovl)
+            (overlay-put ovl loccur-overlay-invisible-property-name t)
+            (overlay-put ovl 'invisible t)
+            ;; force intangible property if invisible property
+            ;; does not automatically set it
+            (overlay-put ovl 'intangible t))
+          overlays)))
+
+
+(defun loccur-remove-overlays ()
+  "Remove all overlays."
+  (remove-overlays (point-min) (point-max) 
loccur-overlay-visible-property-name t)
+  (remove-overlays (point-min) (point-max) 
loccur-overlay-invisible-property-name t)
+  (setq loccur-overlay-list nil))
+
+
+(defun loccur-create-overlay-bounds-btw-lines (buffer-matches)
+  "Create a list of overlays between matched lines BUFFER-MATCHES."
+  (let ((prev-end (point-min))
+        (overlays (list)))
+    (when buffer-matches
+      (mapc (lambda (line)
+              (let ((beginning (car line)))
+                (unless ( = (- beginning prev-end) 1)
+                  (let ((ovl-end  (1- beginning)))
+                    (push (list prev-end ovl-end) overlays)))
+                (setq prev-end (nth 3 line))))
+            buffer-matches)
+      (push (list (1+ prev-end) (point-max)) overlays)
+      (setq overlays (nreverse overlays)))))
+
+
+(defun loccur-find-matches (regex)
+  "Find all occurences in the current buffer for given REGEX.
+
+Returns a list of 4-number tuples, specifying begnning of the line,
+1st match begin of a line, 1st match end of a line, end of a line
+containing match"
+  (save-excursion
+    ;; Go to the beginnig of buffer
+    (goto-char (point-min))
+    ;; Set initial values for variables
+    (let ((endpoint nil)
+          (lines (list)))
+      ;; Search loop
+      (while (not (eobp))
+        ;; if something found
+        (when (setq endpoint (re-search-forward regex nil t))
+          (save-excursion
+            (let ((found-begin (match-beginning 0))
+                  (found-end (match-end 0)))
+              ;; Get the start and the and of the matching line
+              ;; and store it to the overlays array
+              (goto-char found-begin)
+              (setq endpoint (line-end-position))
+              (push (list (line-beginning-position)
+                          found-begin
+                          found-end
+                          endpoint) lines)))
+          ;; maybe add some code to highlight matches like in occur-mode?
+          ;; goto the end of line for any case
+          (goto-char endpoint))
+        (forward-line 1))
+      (setq lines (nreverse lines)))))
+
+        
+    
+
+
+(provide 'loccur)
+;;; loccur.el ends here
diff --git a/packages/multishell/.gitignore b/packages/multishell/.gitignore
new file mode 100644
index 0000000..1c17549
--- /dev/null
+++ b/packages/multishell/.gitignore
@@ -0,0 +1,2 @@
+# Compiled
+*.elc
diff --git a/packages/multishell/LICENSE b/packages/multishell/LICENSE
new file mode 100644
index 0000000..ef7e7ef
--- /dev/null
+++ b/packages/multishell/LICENSE
@@ -0,0 +1,674 @@
+GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    {one line to give the program's name and a brief idea of what it does.}
+    Copyright (C) {year}  {name of author}
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    {project}  Copyright (C) {year}  {fullname}
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/packages/multishell/README.md b/packages/multishell/README.md
new file mode 100644
index 0000000..4004e51
--- /dev/null
+++ b/packages/multishell/README.md
@@ -0,0 +1,57 @@
+multishell.el
+=============
+
+Facilitate use of multiple local and remote Emacs shell buffers.
+
+Multishell is available via Emacs package manager, [in 
ELPA](https://elpa.gnu.org/packages/multishell.html). Install "multishell" from 
the `M-x package-list-packages` listing.
+
+I use the emacs shell a *lot*, including separate shells for separate
+project, and more shells for access to remote systems (which I do a lot, as
+a systems administrator). On top of emacs' powerful shell and tramp
+facilities, use a `multishell` (customization-activated) key binding to:
+
+* Get to the input point from wherever you are in a shell buffer,
+  ... or to any of your shell buffers, from anywhere inside emacs.
+
+* Use universal arguments to launch and choose among alternate shell buffers,
+  ... and change which is the current default.
+
+* Easily restart disconnected shells, or shells from prior sessions
+  ... the latter from Emacs builtin savehist minibuf history persistence
+
+* Append a path to a new shell name to launch a shell in that directory,
+  ... and use a path with Emacs tramp syntax to launch a remote shell -
+  for example:
+
+  * `#root/sudo:address@hidden:/etc` for a buffer named "#root" with a
+    root shell starting in /etc.
+
+  * `/ssh:example.net:/` for a shell buffer in / on example.net.
+    The buffer will be named "*example.net*".
+
+  * `#ex/ssh:example.net|sudo:address@hidden:/etc` for a root shell
+    starting in /etc on example.net named "*#ex*".
+
+  * `interior/ssh:gateway.corp.com|ssh:interior.corp.com:` to go via
+    gateway.corp.com to your homedir on interior.corp.com.  The buffer
+    will be named "*interior*". You could append a sudo hop, and so on.
+
+* Thanks to tramp, file visits from the shell will seamlessly be on the
+  host where the shell is running, in the auspices of the target account.
+
+See the `multishell-pop-to-shell` docstring (in
+[multishell.el](multishell.el)) for details, and
+[getting-to-a-shell.md](getting-to-a-shell.md) for the nitty-gritty
+decision tree that determines where the keybinding according to the various
+conditions.
+
+Customize-group `multishell' to select and activate a keybinding and set
+various behaviors. Customize-group `savehist' to preserve buffer
+names/paths across emacs restarts.
+
+Please use
+[the multishell repository](https://github.com/kenmanheimer/EmacsMultishell)
+issue tracker to report problems, suggestions, etc.
+
+See the [multishell.el](multishell.el) file commentary for a change log and
+Todo list.
diff --git a/packages/multishell/getting-to-a-shell.md 
b/packages/multishell/getting-to-a-shell.md
new file mode 100644
index 0000000..a2ad649
--- /dev/null
+++ b/packages/multishell/getting-to-a-shell.md
@@ -0,0 +1,41 @@
+Multishell enables you to get to the input prompt in the shell you want
+with as few keystrokes as possible.
+
+* One keybinding, unmodified, gets you to the your current default shell, if
+  not in a shell, or to the input prompt of the current shell, if you're in
+  one.
+
+* Use the universal argument to select a specific shell buffer, wherever
+  point happens to be residing. Enter an empty line to the prompt to go to
+  your current default shell, or use completing read to go to a shell from
+  your multishell history, or start a new shell at the path you specify -
+  including remote paths, using tramp syntax. (See the
+  multishell-pop-to-shell docstring in [multishell.el](multishell.el) for
+  details.)
+
+* Use a doubled universal argument to set the shell you choose to be the
+  current default. (The prompt will indicate that mode with a "<==".)
+
+Here's the decision tree:
+
+* No universal argument - use:
+
+  * From-buffer is shell buffer: use from-buffer current name/path
+    - if shell/connection is stopped, restart/reconnect
+    - if not at input prompt, go there
+  * From-buffer is not shell buffer: 
+    - Go to multishell-primary-name current name/path, creating or
+      restarting and/or reconnecting if that shell is not currently running.
+
+* Universal argument provided - use:
+
+  - No name is specified - use current multishell-primary-name path
+  * Name is specified - use named buffer (creating if not already present):
+    * Path is also specified:
+      - shell is running - ignore new path
+      - shell will be started or restarted - use new path
+    * No path is specified:
+      - Name has history: use path from history
+      - Name has no history: use path that target buffer already has or 
inherits
+    - If the universal argument is doubled, set the selected shell as the
+      default one, going forwards.
diff --git a/packages/multishell/multishell-list.el 
b/packages/multishell/multishell-list.el
new file mode 100644
index 0000000..dc7529b
--- /dev/null
+++ b/packages/multishell/multishell-list.el
@@ -0,0 +1,312 @@
+;;; multishell-list.el --- tabulated-list-mode for multishell shell buffers
+
+;; Copyright (C) 2016 Free Software Foundation, Inc. and Ken Manheimer
+
+;; Author: Ken Manheimer <address@hidden>
+;; Version: 1.1.5
+;; Created: 2016 -- first public availability
+;; Keywords: processes
+;; URL: https://github.com/kenmanheimer/EmacsMultishell
+
+;; See multishell.el for commentary, change log, etc.
+
+(require 'tabulated-list)
+
+(defgroup multishell-list nil
+  "Show a menu of all shell buffers in a buffer."
+  :group 'multishell)
+
+(defface multishell-list-name
+  '((t (:weight bold)))
+  "Face for shell names in the Multishell List."
+  :group 'multishell-list)
+
+(defun multishell-list-open-pop (&optional arg)
+  "Pop to current entry's shell in separate window.
+
+The shell is started if it's not already going, unless this is
+invoked with optional `universal-argument'. In that case we
+pop to the buffer but don't change its run state."
+  (interactive "P")
+  (let ((list-buffer (current-buffer))
+        (entry (tabulated-list-get-id)))
+    (if arg
+        (pop-to-buffer
+         (multishell-bracket (multishell-name-from-entry entry)))
+      (multishell-list-dispatch-selected entry t))
+    (with-current-buffer list-buffer
+      (revert-buffer)
+      (multishell-list-goto-item-by-entry entry))))
+
+(defun multishell-list-open-as-default ()
+  "Pop to current entry's shell, and set as the default shell."
+  (interactive)
+  (let ((list-buffer (current-buffer))
+        (entry (tabulated-list-get-id)))
+    (message "%s <==" (multishell-name-from-entry entry))
+    (multishell-list-dispatch-selected entry t t)
+    (with-current-buffer list-buffer
+      (revert-buffer)
+      (multishell-list-goto-item-by-entry entry))))
+
+(defun multishell-list-open-here (&optional arg)
+  "Switch to current entry's shell buffer.
+
+The shell is started if it's not already going, unless this is
+invoked with optional `universal-argument'. In that case we
+switch to the buffer but don't activate (or deactivate) it it."
+  (interactive "P")
+  (let* ((list-buffer (current-buffer))
+         (entry  (tabulated-list-get-id)))
+    (if arg
+        (switch-to-buffer
+         (multishell-bracket (multishell-name-from-entry entry)))
+      (multishell-list-dispatch-selected entry nil))
+    (with-current-buffer list-buffer
+      (revert-buffer))))
+
+(defun multishell-list-delete (&optional arg)
+  "Remove current shell entry, and prompt for buffer-removal if present."
+  (interactive "P")
+  (let* ((entry (tabulated-list-get-id))
+         (name (multishell-name-from-entry entry))
+         (name-bracketed (multishell-bracket name))
+         (buffer (get-buffer name-bracketed)))
+    (when (multishell-delete-history-name name)
+      (and buffer
+           ;; If the process is live, let shell-mode get confirmation:
+           (or (comint-check-proc (current-buffer))
+               (y-or-n-p (format "Kill buffer %s? " name-bracketed)))
+           (kill-buffer name-bracketed)))
+    (tabulated-list-delete-entry)))
+
+(defun multishell-list-edit-entry (&optional arg)
+  "Edit the value of current shell entry.
+
+Submitting the change will not launch the entry, unless this is
+invoked with optional `universal-argument'. In the latter case,
+submitting the entry will pop to the shell in a new window,
+starting it if it's not already going."
+
+  (interactive "P")
+  (let* ((list-buffer (current-buffer))
+         (entry (tabulated-list-get-id))
+         (name (multishell-name-from-entry entry))
+         (revised (multishell-read-unbracketed-entry
+                   (format "Edit shell spec for %s: " name)
+                   entry
+                   'no-record))
+         (revised-name (multishell-name-from-entry revised))
+         buffer)
+    (when (not (string= revised entry))
+      (multishell-replace-entry entry revised)
+      (when (and (not (string= name revised-name))
+                 (setq buffer (get-buffer (multishell-bracket name))))
+        (with-current-buffer buffer
+          (rename-buffer (multishell-bracket revised-name)))))
+    (when arg
+      (multishell-list-dispatch-selected revised-name t))
+    (with-current-buffer list-buffer
+      (revert-buffer)
+      (multishell-list-goto-item-by-entry revised))))
+
+(defun multishell-list-clone-entry (&optional arg)
+  "Create a new list entry, edited from the current one, ready to launch.
+
+If you provide an optional `universal-argument', the new entry
+will be launched when it's created.
+
+The already existing original entry is left untouched."
+  (interactive "P")
+  (let* ((prototype (tabulated-list-get-id))
+         (name (multishell-name-from-entry prototype))
+         (new (multishell-read-unbracketed-entry
+               (format "Clone new shell spec from %s: " name)
+               prototype
+               'no-record))
+         (new-name (multishell-name-from-entry new))
+         (new-path (cadr (multishell-split-entry new))))
+    (when (not (string= new prototype))
+      (multishell-register-name-to-path new-name new-path)
+      (revert-buffer)
+      (multishell-list-goto-item-by-entry new)
+      (when arg
+        (multishell-list-dispatch-selected new-name t)))))
+
+(defun multishell-list-mouse-select (event)
+  "Select the shell whose line is clicked."
+  (interactive "e")
+  (select-window (posn-window (event-end event)))
+  (let ((entry (tabulated-list-get-id (posn-point (event-end event)))))
+    (multishell-list-dispatch-selected entry nil)))
+
+(defun multishell-list-dispatch-selected (entry pop &optional set-primary)
+  "Go to multishell ENTRY, popping to window if POP is non-nil.
+
+Optional arg SET-PRIMARY non-nil sets `multishell-primary-name' to entry.
+
+Provide for concluding minibuffer interaction if we're in completing mode."
+  (let ((set-primary-as-arg (and set-primary '(16))))
+    (if multishell-completing-read
+        ;; In multishell completing-read, arrange to conclude minibuffer input:
+        (throw 'multishell-minibuffer-exit (list entry pop set-primary-as-arg))
+      (multishell-pop-to-shell set-primary-as-arg entry (not pop)))))
+
+(defun multishell-list-placeholder (value default)
+  "Return VALUE if non-empty string, else DEFAULT."
+  (if (or (not value) (string= value ""))
+      default
+    value))
+(defconst multishell-list-active-flag "+")
+(defconst multishell-list-inactive-flag ".")
+(defconst multishell-list-absent-flag "x")
+
+(defun multishell-list-entries ()
+  "Generate multishell name/path-spec entries list for tabulated-list."
+  (let ((recency 0))
+    (mapcar #'(lambda (entry)
+                (setq recency (1+ recency))
+                (let* ((splat (multishell-split-entry entry))
+                       (name (car splat))
+                       (buffer (and name
+                                    (get-buffer
+                                     (multishell-bracket name))))
+                       (status (cond ((not buffer)
+                                      multishell-list-absent-flag)
+                                     ((comint-check-proc buffer)
+                                      multishell-list-active-flag)
+                                     (t multishell-list-inactive-flag)))
+                       (rest (cadr splat))
+                       (dir (and rest (or (file-remote-p rest 'localname)
+                                          rest)))
+                       (hops (and dir
+                                  (file-remote-p rest 'localname)
+                                  (substring
+                                   rest 0 (- (length rest) (length dir))))))
+                  (when (not name)
+                    (setq name (multishell-name-from-entry entry)))
+                  (list entry
+                        (vector (format "%d" recency)
+                                status
+                                (multishell-list--decorate-name name)
+                                (multishell-list-placeholder hops "-")
+                                (multishell-list-placeholder dir "~")))))
+            (multishell-all-entries))))
+
+(defun multishell-list-goto-item-by-entry (entry)
+  "Position at beginning of line of tabulated list item for ENTRY."
+  (goto-char (point-min))
+  (while (and (not (eobp))
+              (not (string= (tabulated-list-get-id) entry)))
+    (forward-line 1)))
+
+(defun multishell-collate-row-strings-as-numbers (a b)
+  (let ((a (aref (cadr a) 0))
+        (b (aref (cadr b) 0)))
+    (> (string-to-number a) (string-to-number b))))
+
+(defun multishell-list--decorate-name (name)
+  (propertize name
+              'font-lock-face 'multishell-list-name
+              'mouse-face 'highlight))
+
+(defvar multishell-list-mode-map
+  (let ((map (make-sparse-keymap)))
+    (set-keymap-parent map tabulated-list-mode-map)
+    (define-key map (kbd "c") 'multishell-list-clone-entry)
+    (define-key map (kbd "d") 'multishell-list-delete)
+    (define-key map (kbd "\C-k") 'multishell-list-delete)
+    (define-key map (kbd "k") 'multishell-list-delete)
+    (define-key map (kbd "e") 'multishell-list-edit-entry)
+    (define-key map (kbd "o") 'multishell-list-open-pop)
+    (define-key map (kbd " ") 'multishell-list-open-pop)
+    (define-key map (kbd "O") 'multishell-list-open-as-default)
+    (define-key map (kbd "RET") 'multishell-list-open-here)
+    (define-key map [mouse-2] 'multishell-list-mouse-select)
+    (define-key map [follow-link] 'mouse-face)
+    map))
+(define-derived-mode multishell-list-mode
+    tabulated-list-mode "Shells"
+  "Major mode for listing current and historically registered shells.
+
+Initial sort is from most to least recently used:
+
+- First active shells, flagged with '+' a plus sign
+- Then, inactive shells, flagged with '.' a period
+- Then historical shells that currently have no buffer, flagged with 'x' an ex
+
+\\{multishell-list-mode-map\}"
+  (setq tabulated-list-format
+        [;; (name width sort '(:right-align nil :pad-right nil))
+         ("#" 0 multishell-collate-row-strings-as-numbers :pad-right 1)
+         ("! " 1 t :pad-right 1)
+         ("Name" 15 t)
+         ("Hops" 30 t)
+         ("Directory" 30 t)]
+        tabulated-list-sort-key '("#" . t)
+        tabulated-list-entries #'multishell-list-entries)
+  (tabulated-list-init-header))
+
+(defun multishell-list-cull-dups (entries)
+  "Return list of multishell ENTRIES sans ones with duplicate names.
+
+For duplicates, we prefer the ones that have paths."
+  (let ((tally (make-hash-table :test #'equal))
+        got name name-order-reversed already)
+    (mapcar #'(lambda (entry)
+                (setq name (multishell-name-from-entry entry)
+                      already (gethash name tally nil))
+                (when (not already)
+                  (push name name-order-reversed))
+                (when (or (not already) (< (length already) (length entry)))
+                  ;; Add new or replace shorter prior entry for name:
+                  (puthash name entry tally)))
+            entries)
+    (dolist (name name-order-reversed)
+      (push (gethash name tally) got))
+    got))
+
+;;;###autoload
+(defun multishell-list (&optional completing)
+  "Edit your current and historic list of shell buffers.
+
+If optional COMPLETING is nil, we present the full
+`multishell-history' list in a popped buffer named '*Shells*'.
+
+In the buffer, hit ? or h for a list of commands.
+
+When optional COMPLETING is non-nil, it must be a list of
+multishell-history completion candidate entries, as provided by
+`completing-read'. Then we present the list as a part of
+minibuffer completion.
+
+You can get to the shells listing by recursively invoking
+\\[multishell-pop-to-shell] at the `multishell-pop-to-shell'
+`universal-argument' prompts."
+  (interactive)
+  (let ((from-entry (car (multishell-history-entries
+                          (multishell-unbracket (buffer-name
+                                                 (current-buffer))))))
+        (buffer (get-buffer-create (if completing
+                                       "*Completions*"
+                                     "*Shells*"))))
+    (if completing
+        (set-buffer buffer)
+      (pop-to-buffer buffer))
+    (multishell-list-mode)
+    (progv
+        ;; Temporarily assign multishell-history only when completing:
+        (when completing '(multishell-history))
+        (when completing
+          (list (multishell-list-cull-dups (mapcar 'substring-no-properties
+                                                   completing))))
+      (tabulated-list-print))
+    (when completing
+      )
+    (when from-entry
+      (multishell-list-goto-item-by-entry from-entry))))
+
+(provide 'multishell-list)
+(require 'multishell)
+
+;;; multishell-list.el ends here
diff --git a/packages/multishell/multishell.el 
b/packages/multishell/multishell.el
new file mode 100644
index 0000000..51bad08
--- /dev/null
+++ b/packages/multishell/multishell.el
@@ -0,0 +1,812 @@
+;;; multishell.el --- Easily use multiple shell buffers, local and remote.
+
+;; Copyright (C) 1999-2016 Free Software Foundation, Inc.
+
+;; Author: Ken Manheimer <address@hidden>
+;; Version: 1.1.5
+;; Created: 1999 -- first public availability
+;; Keywords: processes
+;; URL: https://github.com/kenmanheimer/EmacsMultishell
+;;
+;;; Commentary:
+;;
+;; Easily use and navigate multiple shell buffers, including remote shells.
+;; Fundamentally, multishell is the function `multishell-pop-to-shell' -
+;; a la `pop-to-buffer' - plus a keybinding. Together, they enable you to:
+;;
+;; * Get to the input point from wherever you are in a shell buffer,
+;;   ... or to any of your shell buffers, from anywhere inside emacs.
+;;
+;; * Use universal arguments to launch and choose among alternate shell 
buffers,
+;;   ... and change which is the current default.
+;;
+;; * Easily restart disconnected shells, or shells from prior sessions
+;;   ... the latter from Emacs builtin savehist minibuf history persistence
+;;
+;; * Append a path to a new shell name to launch a shell in that directory,
+;;   ... and use a path with Emacs tramp syntax to launch a remote shell -
+;;   for example:
+;;
+;;   * `#root/sudo:address@hidden:/etc` for a buffer named "*#root*" with a
+;;     root shell starting in /etc.
+;;
+;;   * `/ssh:example.net:` for a shell buffer in your homedir on example.net.
+;;     The buffer will be named "*example.net*".
+;;
+;;   * `#ex/ssh:example.net|sudo:address@hidden:/var/log` for a root shell
+;;     starting in /var/log on example.net named "*#ex*".
+;;
+;;   * 'interior/ssh:gateway.corp.com|ssh:interior.corp.com:' to go via
+;;     gateway.corp.com to your homedir on interior.corp.com.  The buffer
+;;     will be named "*interior*". You could append a sudo hop, and so on.
+;;
+;; * Thanks to tramp, file visits from the shell will seamlessly be in
+;;   the auspices of the target account, and relative to the current
+;;   directory, on the host where the shell is running.
+;;
+;; * Manage your list of shells, current and past, as a collection.
+;;
+;; See the `multishell-pop-to-shell` docstring for details.
+;;
+;; Customize-group `multishell' to select and activate a keybinding and set
+;; various behaviors. Customize-group `savehist' to preserve buffer
+;; names/paths across emacs restarts.
+;;
+;; Please use
+;; [the multishell repository](https://github.com/kenmanheimer/EmacsMultishell)
+;; issue tracker to report problems, suggestions, etc, and see that
+;; repository for a bit more documentation.
+;;
+;; Change Log:
+;;
+;; * 2016-02-11 1.1.5 Ken Manheimer:
+;;   - Rectify multishell list sorting to preserve recentness
+;;   - Increment the actual multishell-version setting, neglected for 1.1.4.
+;; * 2016-02-11 1.1.4 Ken Manheimer:
+;;   - hookup multishell-list as completion help buffer.
+;;     Mouse and keyboard selections from help listing properly exits
+;;     minibuffer.
+;; * 2016-02-09 1.1.3 Ken Manheimer:
+;;   multishell-list:
+;;   - add some handy operations, like cloning new entry from existing
+;;   - add optional behaviors to existing operations for returning to
+;;     stopped shells without restarting them.
+;;   - solidify maintaining focus on current entry
+;;   - fix miscellaneous.
+;; * 2016-01-31 1.1.2 Ken Manheimer:
+;;   - Settle puzzling instability of multishell-all-entries
+;;     - The accumulations was putting items going from more to less active
+;;       categories to be put at the end, not beginning.
+;;     - Also, using history for prompting changes history - implement
+;;       no-record option to avoid this when needed.
+;;   - Implement simple edit-in-place multishell-replace-entry and use in
+;;     multishell-list-edit-entry.
+;;   - Remove now unnecessary multishell-list-revert-buffer-kludge.
+;;   - Rectify byte compiler offenses, and other fixes - thanks to Stefan
+;;     Monnier for pointing out many of the corrections.
+;;   - Avoid directly calling tramp functions unnecessarily.
+;; * 2016-01-30 1.1.1 Ken Manheimer:
+;;   - shake out initial multishell-list glitches:
+;;     - (Offer to) delete shell buffer, if present, when deleting entry.
+;;     - Set recency (numeric rank) as initial sort field
+;;     - Recompute list on most operations that affect the order, and try to
+;;       preserve stability. (Kludgy solution, needs work.)
+;;   - Set version to 1.1.1 - multishell-list addition should have been 1.1.0.
+;; * 2016-01-30 1.0.9 Ken Manheimer:
+;;   - Add multishell-list for managing the collection of current and
+;;     history-registered shells: edit, delete, and switch/pop to entries.
+;;     Easy access by invoking `multishell-pop-to-shell' from in the
+;;     `multishell-pop-to-shell' universal arg prompts.
+;;   - Duplicate existing shell buffer names in completions, for distinction.
+;;   - Add paths to buffers started without one, when multishell history dir
+;;     tracking is enabled.
+;;   - Major code cleanup:
+;;     - Simplify multishell-start-shell-in-buffer, in particular using
+;;       shell function, rather than unnecessarily going underneath it.
+;;     - Establish multishell-name-from-entry as canonical name resolver.
+;;     - Fallback to eval-after-load in emacs versions that lack
+;;       with-eval-after-load (eg, emacs 23).
+;;     - save-match-data, where match-string is used
+;;     - resituate some helpers
+;; * 2016-01-24 1.0.8 Ken Manheimer:
+;;   - Work around the shell/tramp mishandling of remote+sudo+homedir problem!
+;;     The work around is clean and simple, basically using high-level `cd'
+;;     API and not messing with the low-level default-directory setting.
+;;     (Turns out the problem was not in my local config. Good riddance to the
+;;     awkward failure handler!)
+;;   - Clean up code resolving the destination shell, starting to document the
+;;     decision tree in the process. See getting-to-a-shell.md in the
+;;     multishell repository, https://github.com/kenmanheimer/EmacsMultishell
+;;   - There may be some shake-out on resolving the destination shell, but
+;;     this release gets the fundamental functionality soundly in place.
+;; * 2016-01-23 1.0.7 Ken Manheimer:
+;;   - Remove notes about tramp remote+sudo+homedir problem. Apparently it's
+;;     due to something in my local site configuration (happens with -q but
+;;     not -Q).
+;; * 2016-01-22 1.0.6 Ken Manheimer:
+;;   - Add multishell-version function.
+;;   - Tweak commentary/comments/docstrings.
+;;   - Null old multishell-buffer-name-history var, if present.
+;; * 2016-01-16 1.0.5 Ken Manheimer:
+;;   - History now includes paths, when designated.
+;;   - Actively track current directory in history entries that have a path.
+;;     Custom control: multishell-history-entry-tracks-current-directory
+;;   - Offer to remove shell's history entry when buffer is killed.
+;;     (Currently the only UI mechanism to remove history entries.)
+;;   - Fix - prevent duplicate entries for same name but different paths
+;;   - Fix - recognize and respect tramp path syntax to start in home dir
+;;   - Simplify history var name, migrate existing history if any from old name
+;; * 2016-01-04 1.0.4 Ken Manheimer - Released to ELPA
+;; * 2016-01-02 Ken Manheimer - working on this in public, but not yet 
released.
+;;
+;; TODO and Known Issues:
+;;
+;; * Add custom shell launch prep actions
+;;   - for, eg, port knocking, interface activations
+;;   - shell commands to execute when shell name or path matches a regexp
+;;   - list of (regexp, which - name, path, or both, command)
+;; * Investigate whether we can recognize and provide for failed hops.
+;;   - Tramp doesn't provide useful reactions for any hop but the first
+;;   - Might be stuff we can do to detect and convey failures?
+;;   - Might be no recourse but to seek tramp changes.
+;; * Try minibuffer field boundary at beginning of tramp path, to see whether
+;;   the field boundary magically enables tramp path completion.
+
+;;; Code:
+
+(require 'comint)
+(require 'shell)
+(require 'savehist)
+(require 'multishell-list)
+
+(defvar multishell-version "1.1.5")
+(defun multishell-version (&optional here)
+  "Return string describing the loaded multishell version."
+  (interactive "P")
+  (let ((msg (concat "Multishell " multishell-version)))
+    (if here (insert msg)
+      (if (called-interactively-p 'interactive)
+          (message "%s" msg)
+        msg))))
+
+(defgroup multishell nil
+  "Allout extension that highlights outline structure graphically.
+
+Customize `allout-widgets-auto-activation' to activate allout-widgets
+with allout-mode."
+  :group 'shell)
+
+(defcustom multishell-command-key "\M- "
+  "The key to use if `multishell-activate-command-key' is true.
+
+You can instead manually bind `multishell-pop-to-shell` using emacs
+lisp, eg: (global-set-key \"\\M- \" 'multishell-pop-to-shell)."
+  :type 'key-sequence)
+
+(defvar multishell--responsible-for-command-key nil
+  "Coordination for multishell key assignment.")
+(defun multishell-activate-command-key-setter (symbol setting)
+  "Implement `multishell-activate-command-key' choice."
+  (set-default symbol setting)
+  (when (or setting multishell--responsible-for-command-key)
+    (multishell-implement-command-key-choice (not setting))))
+(defun multishell-implement-command-key-choice (&optional unbind)
+  "If settings dicate, implement binding of multishell command key.
+
+If optional UNBIND is true, globally unbind the key.
+
+* `multishell-activate-command-key' - Set this to get the binding or not.
+* `multishell-command-key' - The key to use for the binding, if appropriate."
+  (cond (unbind
+         (when (and (boundp 'multishell-command-key) multishell-command-key)
+           (global-unset-key multishell-command-key)))
+        ((not (and (boundp 'multishell-activate-command-key)
+                   (boundp 'multishell-command-key)))
+         nil)
+        ((and multishell-activate-command-key multishell-command-key)
+         (setq multishell--responsible-for-command-key t)
+         (global-set-key multishell-command-key 'multishell-pop-to-shell))))
+
+(defcustom multishell-activate-command-key nil
+  "Set this to impose the `multishell-command-key' binding.
+
+You can instead manually bind `multishell-pop-to-shell` using emacs
+lisp, eg: (global-set-key \"\\M- \" 'multishell-pop-to-shell)."
+  :type 'boolean
+  :set 'multishell-activate-command-key-setter)
+
+;; Implement the key customization whenever the package is loaded:
+(if (fboundp 'with-eval-after-load)
+    (with-eval-after-load "multishell"
+                         (multishell-implement-command-key-choice))
+  (eval-after-load "multishell"
+    '(multishell-implement-command-key-choice)))
+
+(defcustom multishell-pop-to-frame nil
+  "*If non-nil, jump to a frame already showing the shell, if another one is.
+
+Otherwise, disregard already-open windows on the shell if they're
+in another frame, and open a new window on the shell in the
+current frame.
+
+\(Use `pop-up-windows' to change multishell other-window vs
+current-window behavior.)"
+  :type 'boolean)
+
+(defcustom multishell-history-entry-tracks-current-directory t
+  "Maintain shell's current directory in its multishell history entry.
+
+When set, the history entry for shells started with explicit
+paths will track the shell's current working directory.
+
+If `savehist-save-minibuffer-history' is enabled, the current
+working directory of shells will be conveyed between emacs
+sessions."
+ :type 'boolean)
+
+(defvar multishell-history nil
+  "Name/path entries, most recent first.")
+;; Migrate the few pre 1.0.5 users to changed history var:
+(when (and (not multishell-history)
+           (boundp 'multishell-buffer-name-history)
+           multishell-buffer-name-history)
+  (setq multishell-history multishell-buffer-name-history
+        multishell-buffer-name-history nil))
+
+(defvar multishell-primary-name "*shell*"
+  "Default shell name for un-modified multishell-pop-to-shell buffer target.
+
+This is set by `multishell-pop-to-shell' as the current default,
+when invoked with doubled universal argument.
+
+If you want the designated primary that you have at the end of
+one emacs session to be resumed at the next, customize
+`savehist-additional-variables' to include the
+`multishell-primary-name'.")
+
+(defvar multishell-completing-read nil
+  "Internal use, conveying whether or not we're in the midst of a multishell
+completing-read.")
+
+;; Multiple entries happen because completion also adds name to history.
+(defun multishell-register-name-to-path (name path)
+  "Add or replace entry associating NAME with PATH in `multishell-history'.
+
+If NAME already had a PATH and new PATH is empty, retain the prior one.
+
+Promote added/changed entry to the front of the list."
+  ;; Add or promote to the front, tracking path changes in the process.
+  (let* ((entries (multishell-history-entries name))
+         (path (or path "")))
+    (dolist (entry entries)
+      (when (string= path "")
+        ;; Retain explicit established path.
+        (setq path (cadr (multishell-split-entry entry))))
+      (setq multishell-history (delete entry multishell-history)))
+    (setq multishell-history (push (concat name path)
+                                   multishell-history))))
+
+(defun multishell-replace-entry (entry revised)
+  "Replace every instance of ENTRY in `multishell-history' with REVISED.
+
+Revised entry is situated where former one was.
+
+Returns non-nil iff any changes were made."
+  (let ((candidates multishell-history)
+        did-revisions)
+    (while (setq candidates (member entry candidates))
+      (setcar candidates revised)
+      (setq candidates (cdr candidates)
+            did-revisions t))
+    did-revisions))
+
+(defun multishell-history-entries (name)
+  "Return `multishell-history' entry that starts with NAME, or nil if none."
+  (let (got)
+    (dolist (entry multishell-history)
+      (when (and (string-equal name (multishell-name-from-entry entry))
+                 (not (member entry got)))
+        (push entry got)))
+    got))
+
+;;;###autoload
+(defun multishell-pop-to-shell (&optional arg name here)
+  "Easily navigate to and within multiple shell buffers, local and remote.
+
+Use a single `universal-argument' (\\[universal-argument]) to launch and 
choose between
+nalternate shell buffers, and a doubled universal argument to also set your
+choice as the ongoing default.  Append a path to a new shell name to launch
+a shell in that directory, and use Emacs tramp syntax to launch a remote
+shell. There is a shortcut to manage your list of current and
+historical shells, collectively, using `multishell-list' - see below.
+
+Customize-group `multishell' to set up a key binding and tweak behaviors.
+
+Manage your collection of current and historical shells by
+recursively invoking \\[multishell-pop-to-shell] at the
+`multishell-pop-to-shell' universal argument prompts, eg:
+
+  \\[universal-argument] \\[multishell-pop-to-shell] 
\\[multishell-pop-to-shell]
+
+\(That will be just a few keys if you do the above
+customization.) Hit ? in the listing buffer for editing commands.
+
+==== Basic operation:
+
+ - If the current buffer is shell-mode (or shell-mode derived)
+   buffer then focus is moved to the process input point.
+
+   \(You can use a universal argument go to a different shell
+   buffer when already in a buffer that has a process - see
+   below.)
+
+ - If not in a shell buffer (or with universal argument), go to a
+   window that is already showing the (a) shell buffer, if any.
+
+   In this case, the cursor is left in its prior position in the
+   shell buffer. Repeating the command will then go to the
+   process input point, per the first item in this list.
+
+   We respect `pop-up-windows', so you can adjust it to set the
+   other-buffer/same-buffer behavior.
+
+ - Otherwise, start a new shell buffer, using the current
+   directory as the working directory.
+
+If a buffer with the resulting name exists and its shell process
+was disconnected or otherwise stopped, it's resumed.
+
+===== Universal arg to start and select between named shell buffers:
+
+You can name alternate shell buffers to create or return to, by
+prefixing your \\[multishell-pop-to-shell] invocation with single or double
+`universal-argument', \\[universal-argument]:
+
+ - With a single universal argument, prompt for the buffer name
+   to use (without the asterisks that shell mode will put around
+   the name), defaulting to 'shell'.
+
+   Completion is available.
+
+   This combination makes it easy to start and switch across
+   multiple shell restarts.
+
+ - A double universal argument will prompt for the name *and* set
+   the default to that name, so the target shell becomes the
+   primary.
+
+   See `multishell-primary-name' for info about preserving the
+   setting across emacs restarts.
+
+ - Manage your collection of current and historical shells by
+   recursively invoking \\[multishell-pop-to-shell] at either of the
+   `multishell-pop-to-shell' universal argument prompts, or at any
+   time via \\[multishell-list]. Hit ? in the listing buffer for
+   editing commands.
+
+===== Select starting directory and remote host:
+
+The shell buffer name you give to the prompt for a universal arg
+can include an appended path. That will be used for the startup
+directory. You can use tramp remote syntax to specify a remote
+shell. If there is an element after a final '/', that's used for
+the buffer name. Otherwise, the host, domain, or path is used.
+
+For example:
+
+* '#root/sudo:address@hidden:/etc' for a buffer named \"*#root*\" with a
+  root shell starting in /etc.
+
+* '/ssh:example.net:' for a shell buffer in your homedir on example.net. 
+  The buffer will be named \"*example.net*\".
+
+* '#ex/ssh:example.net|sudo:address@hidden:/var/log' for a root shell
+  starting in /var/log on example.net named \"*#ex*\".
+
+* 'interior/ssh:gateway.corp.com|ssh:interior.corp.com:' to go
+  via gateway.corp.com to your homedir on interior.corp.com.  The
+  buffer will be named \"*interior*\". You could append a sudo
+  hop to the path, combining the previous example, and so on.
+
+File visits from the shell, and many common emacs activities like
+dired, will be on the host where the shell is running, in the
+auspices of the target account, and relative to the current
+directory.
+
+You can change the startup path for a shell buffer by editing it
+at the completion prompt. The new path will not take effect for
+an already-running shell.
+
+To remove a shell buffer's history entry, kill the buffer and
+affirm removal of the entry when prompted.
+
+===== Activate savehist to retain shell buffer names and paths across Emacs 
restarts:
+
+To have emacs maintain your history of shell buffer names and paths,
+customize the savehist group to activate savehist."
+
+  (interactive "P")
+
+  (let ((token '(token)))
+    (if (window-minibuffer-p)
+        (throw 'multishell-minibuffer-exit token)
+      (let ((got (catch 'multishell-minibuffer-exit
+                   (multishell-pop-to-shell-worker arg name here))))
+        ;; Handle catch or plain fall-through - see cond comments for protocol.
+        (cond
+         ;; Caught token from recursive invocation in minibuffer:
+         ((equal token got) (multishell-list))
+         ;; Caught specifaction of multishell args, eg from multishell-list:
+         ((listp got) (multishell-pop-to-shell-worker (nth 2 got)
+                                                      (nth 0 got)
+                                                      (nth 1 got)))
+         ;; Regular fallthrough - just relay the result:
+         (t got))))))
+
+(defun multishell-pop-to-shell-worker (&optional arg name here)
+  "Do real work of `multishell-pop-to-shell', which see."
+  (let* ((from-buffer (current-buffer))
+         (from-buffer-is-shell (derived-mode-p 'shell-mode))
+         (primary-name-unbracketed (multishell-unbracket
+                                    multishell-primary-name))
+         (fallthrough-name (if from-buffer-is-shell
+                               (buffer-name from-buffer)
+                             primary-name-unbracketed))
+         (doublearg (equal arg '(16)))
+         (target-name-and-path
+          (multishell-resolve-target-name-and-path
+           (cond (name name)
+                 (arg
+                  (or (multishell-read-unbracketed-entry
+                       (format "Shell buffer name [%s]%s "
+                               primary-name-unbracketed
+                               (if doublearg " <==" ":")))
+                      primary-name-unbracketed))
+                 (t fallthrough-name))))
+         (use-path (cadr target-name-and-path))
+         (target-shell-buffer-name (car target-name-and-path))
+         (target-buffer (get-buffer target-shell-buffer-name))
+         (curr-buff-proc (get-buffer-process from-buffer))
+         inwin
+         already-there)
+
+    ;; Register early so the entry is pushed to the front:
+    (multishell-register-name-to-path (multishell-unbracket
+                                       target-shell-buffer-name)
+                                      use-path)
+
+    (when doublearg
+      (setq multishell-primary-name target-shell-buffer-name))
+
+    ;; Situate:
+
+    (cond 
+
+     ((and (or curr-buff-proc from-buffer-is-shell)
+           (not arg)
+           (eq from-buffer target-buffer)
+           (not (eq target-shell-buffer-name (buffer-name from-buffer))))
+      ;; In a shell buffer, but not named - stay in buffer, but go to end.
+      (setq already-there t))
+
+     ((string= (buffer-name) target-shell-buffer-name)
+      ;; Already in the specified shell buffer:
+      (setq already-there t))
+
+     ((or (not target-buffer)
+          (not (setq inwin
+                     (multishell-get-visible-window-for-buffer 
target-buffer))))
+      ;; No preexisting shell buffer, or not in a visible window:
+      (when (not (get-buffer target-shell-buffer-name))
+        (message "Creating new shell buffer '%s'" target-shell-buffer-name))
+      (if here
+          (switch-to-buffer target-shell-buffer-name)
+        (pop-to-buffer target-shell-buffer-name pop-up-windows)))
+
+     ;; Buffer exists and already has a window - jump to it:
+     (t (if (and multishell-pop-to-frame
+                 inwin
+                 (not (equal (window-frame (selected-window))
+                             (window-frame inwin))))
+            (select-frame-set-input-focus (window-frame inwin)))
+        (if (not (string= (buffer-name (current-buffer))
+                          target-shell-buffer-name))
+            (if here
+                (switch-to-buffer target-shell-buffer-name)
+              (pop-to-buffer target-shell-buffer-name t)))))
+
+    ;; We're in the buffer. Activate:
+
+    (if (not (comint-check-proc (current-buffer)))
+        (multishell-start-shell-in-buffer use-path))
+
+    ;; If the destination buffer has a stopped process, resume it:
+    (let ((process (get-buffer-process (current-buffer))))
+      (if (and process (equal 'stop (process-status process)))
+          (continue-process process)))
+
+    (when (or already-there
+             (equal (current-buffer) from-buffer))
+      (goto-char (point-max))
+      (and (get-buffer-process from-buffer)
+           (goto-char (process-mark (get-buffer-process from-buffer)))))))
+
+(defun multishell-delete-history-name (name &optional ask)
+  "Remove all multishell history entries for NAME.
+
+if optional ask is non-nil (default nil), ask before each deletion.
+
+Return the last entry deleted."
+  (let (got)
+    (dolist (entry (multishell-history-entries name) got)
+      (when (and entry
+                 (or (not ask)
+                     (y-or-n-p (format "Remove multishell history entry `%s'? "
+                                       entry))))
+        (setq got entry
+              multishell-history (delete entry multishell-history))))))
+
+(defun multishell-kill-buffer-query-function ()
+  "Offer to remove multishell-history entry for buffer."
+  ;; Removal choice is crucial, so users can, eg, kill a shell with huge
+  ;; output backlog, while keeping the history entry to easily restart it.
+  ;;
+  ;; We use kill-buffer-query-functions instead of kill-buffer-hook because:
+  ;;
+  ;; 1. It enables the user to remove the history without actually killing a
+  ;;    running buffer, by not confirming the subsequent running-proc query.
+  ;; 2. kill-buffer-hooks often fails to run when killing shell buffers!
+  ;;    It's probably due to failures in other hooks - beyond our control -
+  ;;    and anyway, I like the first reason well enough.
+
+  ;; (Use condition-case to avoid inadvertant disruption of kill-buffer
+  ;; activity.  kill-buffer happens behind the scenes a whole lot.)
+  (condition-case err
+      (and (derived-mode-p 'shell-mode)
+           (multishell-delete-history-name
+            (multishell-unbracket (buffer-name))
+            t))
+    (error
+     (message "multishell-kill-buffer-query-function error: %s" err)))
+  t)
+(add-hook 'kill-buffer-query-functions 'multishell-kill-buffer-query-function)
+
+(defun multishell-get-visible-window-for-buffer (buffer)
+  "Return visible window containing buffer."
+  (catch 'got-a-vis
+    (walk-windows
+     (function (lambda (win)
+                 (if (and (eq (window-buffer win) buffer)
+                          (equal (frame-parameter
+                                  (selected-frame) 'display)
+                                 (frame-parameter
+                                  (window-frame win) 'display)))
+                     (throw 'got-a-vis win))))
+     nil 'visible)
+    nil))
+
+(defun multishell-all-entries (&optional active-duplicated)
+  "Return multishell history, with active buffers listed first.
+
+Optional ACTIVE-DUPLICATED will return a copy of
+`multishell-history' with unbracketed names of active buffers,
+sans paths, appended to the list, so they have short and long
+completions."
+  ;; Reorder so active lead present lead historical entries:
+  (let (active-entries active-names present past splat name buffer)
+    (dolist (entry multishell-history)
+      (setq splat (multishell-split-entry entry)
+            name (car splat)
+            buffer (and name (get-buffer (multishell-bracket name))))
+      (if (buffer-live-p buffer)
+          (if (comint-check-proc buffer)
+              (setq active-entries (push entry active-entries)
+                    active-names (push name active-names))
+            (setq present (push entry present)))
+        (setq past (push entry past))))
+    ;; Reverse present and past lists
+    (setq multishell-history (append (reverse active-entries)
+                                     (reverse present)
+                                     (reverse past)))
+    (if active-duplicated
+        (append multishell-history active-names)
+      multishell-history)))
+
+(defun multishell-read-unbracketed-entry (prompt &optional initial no-record)
+  "PROMPT for shell buffer name, sans asterisks.
+
+Optional INITIAL is preliminary value to be edited.
+
+Optional NO-RECORD prevents changes to `multishell-history'
+across the activity.
+
+Input and completion can include associated path, if any.
+
+Return what's provided, if anything, else nil."
+  (let* ((was-multishell-history multishell-history)
+         (candidates (multishell-all-entries 'active-duplicated))
+         (multishell-completing-read t)
+         (got
+          ;; Use `cl-letf' to dynamically bind multishell-list to
+          ;; display-completion-list, so multishell-list is used when doing
+          ;; minibuffer-completion-help.
+          (cl-letf (((symbol-function 'display-completion-list)
+                     #'multishell-list))
+              (completing-read prompt
+                               ;; COLLECTION:
+                               (reverse candidates)
+                               ;; PREDICATE:
+                               nil
+                               ;; REQUIRE-MATCH:
+                               'confirm
+                               ;; INITIAL-INPUT
+                               initial
+                               ;; HIST:
+                               'multishell-history))))
+    (when no-record
+      (setq multishell-history was-multishell-history))
+    (if (not (string= got ""))
+        got
+      nil)))
+
+(defun multishell-resolve-target-name-and-path (shell-spec)
+  "Given name/tramp-style address shell spec, resolve buffer name and 
directory.
+
+The name is the part of the string up to the first '/' slash, if
+any. Missing pieces are filled in from remote path elements, if
+any, and multishell history. Given a tramp-style remote address
+and no name part, either the address@hidden is used for the buffer
+name, if a user is specified, or just the host.
+
+Return them as a list: (name path), with name asterisk-bracketed
+and path nil if none is resolved."
+  (let* ((splat (multishell-split-entry (or shell-spec "")))
+         (path (cadr splat))
+         (name (or (car splat) (multishell-name-from-entry path))))
+    (when (not path)
+      ;; Get path from history, if present.
+      (dolist (entry
+               (multishell-history-entries
+                (multishell-unbracket name)))
+        (when (or (not path) (string= path ""))
+          (setq path (cadr (multishell-split-entry entry))))))
+    (list (multishell-bracket name) path)))
+
+(defun multishell-name-from-entry (entry)
+  "Derive a name for a shell buffer according to ENTRY."
+  (if (not entry)
+      (multishell-unbracket multishell-primary-name)
+    (let* ((splat (multishell-split-entry entry))
+           (name (car splat))
+           (path (cadr splat)))
+      (or name
+          (if (file-remote-p path)
+              (let ((host (file-remote-p path 'host))
+                    (user (file-remote-p path 'user)))
+                (cond ((and host user)
+                       (format "address@hidden" user host))
+                      (host host)
+                      (user user)
+                      ((system-name))))
+            (multishell-unbracket multishell-primary-name))))))
+
+(declare-function tramp-dissect-file-name "tramp")
+(declare-function tramp-cleanup-connection "tramp")
+
+(defun multishell-start-shell-in-buffer (path)
+  "Start, restart, or continue a shell in BUFFER-NAME on PATH."
+  (let* ((is-active (comint-check-proc (current-buffer))))
+
+    (when (and path (not is-active))
+
+      (when (and (derived-mode-p 'shell-mode) (file-remote-p path))
+        ;; Returning to disconnected remote shell - do some tidying.
+        ;; Without this cleanup, occasionally restarting a disconnected
+        ;; remote session, particularly one that includes sudo, results in
+        ;; an untraceable "Args out of range" error. That never happens if
+        ;; we precedeed connection attempts with this cleanup -
+        ;; prophylactic.
+        (tramp-cleanup-connection
+         (tramp-dissect-file-name default-directory 'noexpand)
+         'keep-debug 'keep-password))
+
+      (when (file-remote-p path) (message "Connecting to %s" path))
+      (cd path))
+
+    (shell (current-buffer))))
+
+(defun multishell-homedir-shorthand-p (dirpath)
+  "t if dirpath is an unexpanded remote homedir spec."
+  ;; Workaround to recognize tramp-style homedir shorthand, "...:" and "...:~".
+  (let ((localname (file-remote-p dirpath 'localname)))
+    (and localname
+         (or
+          ;; No directory path and no connection to expand homedir:
+          (string= localname "")
+          ;; Original path doesn't equal expanded homedir:
+          (save-match-data
+            (not (string-match (concat (regexp-quote localname) "/?$")
+                               dirpath)))))))
+;; (assert (multishell-homedir-shorthand-p "/ssh:myhost.net:")
+;; (assert (not (multishell-homedir-shorthand-p "/home/klm")))
+;; (assert (not (multishell-homedir-shorthand-p "/ssh:myhost.net:/home/me")))
+
+(defun multishell-track-dirchange (name newpath)
+  "Change multishell history entry to track current directory."
+  (let* ((entries (multishell-history-entries name)))
+    (dolist (entry entries)
+      (let* ((name-path (multishell-split-entry entry))
+             (name (car name-path))
+             (path (or (cadr name-path) "")))
+        (when path
+          (let* ((old-localname (or (file-remote-p path 'localname)
+                                    path))
+                 (newentry
+                  (if (multishell-homedir-shorthand-p path)
+                      (concat entry newpath)
+                    (replace-regexp-in-string (concat (regexp-quote
+                                                       old-localname)
+                                                      "$")
+                                              ;; REPLACEMENT
+                                              newpath
+                                              ;; STRING
+                                              entry
+                                              ;; FIXEDCASE
+                                              t
+                                              ;; LITERAL
+                                              t
+                                              )))
+                 (membership (member entry multishell-history)))
+            (when membership
+              (setcar membership newentry))))))))
+
+(defvar multishell-was-default-directory ()
+  "Provide for tracking directory changes.")
+(make-variable-buffer-local 'multishell-was-default-directory)
+(defun multishell-post-command-business ()
+  "Do multishell bookkeeping."
+  ;; Update multishell-history with dir changes.
+  (condition-case err
+      (when (and multishell-history-entry-tracks-current-directory
+                 (derived-mode-p 'shell-mode))
+        (let ((curdir (if (file-remote-p default-directory)
+                          (file-remote-p default-directory 'localname)
+                        default-directory)))
+          (when (not (string= curdir (or multishell-was-default-directory "")))
+            (multishell-track-dirchange (multishell-unbracket (buffer-name))
+                                        curdir))
+          (setq multishell-was-default-directory curdir)))
+    ;; To avoid disruption as a pervasive hook function, swallow all errors:
+    (error
+     (message "multishell-post-command-business error: %s" err))))
+(add-hook 'post-command-hook #'multishell-post-command-business)
+
+(defun multishell-split-entry (entry)
+  "Given multishell name/path ENTRY, return the separated name and path pair.
+
+Returns nil for empty parts, rather than the empty string."
+  (save-match-data
+    (string-match "^\\([^/]*\\)\\(/?.*\\)?" entry)
+    (let ((name (match-string 1 entry))
+          (path (match-string 2 entry)))
+      (and (string= name "") (setq name nil))
+      (and (string= path "") (setq path nil))
+      (list name path))))
+(defun multishell-bracket (name)
+  "Return a copy of name, ensuring it has an asterisk at the beginning and 
end."
+  (if (not (string= (substring name 0 1) "*"))
+      (setq name (concat "*" name)))
+  (if (not (string= (substring name -1) "*"))
+      (setq name (concat name "*")))
+  name)
+(defun multishell-unbracket (name)
+  "Return a copy of name, removing asterisks, if any, at beginning and end."
+  (if (string= (substring name 0 1) "*")
+      (setq name (substring name 1)))
+  (if (string= (substring name -1) "*")
+      (setq name (substring name 0 -1)))
+  name)
+
+(provide 'multishell)
+
+;;; multishell.el ends here
diff --git a/packages/names/names-dev.el b/packages/names/names-dev.el
index 0c2dc20..c139d64 100644
--- a/packages/names/names-dev.el
+++ b/packages/names/names-dev.el
@@ -2,9 +2,6 @@
 
 ;; Copyright (C) 2014 Free Software Foundation, Inc.
 
-;; Author: Artur Malabarba <address@hidden>
-;; Maintainer: Artur Malabarba <address@hidden>
-;; URL: http://github.com/Bruce-Connor/names
 ;; Prefix: names
 ;; Separator: -
 
diff --git a/packages/names/names.el b/packages/names/names.el
index f4ef7bd..62aafdf 100644
--- a/packages/names/names.el
+++ b/packages/names/names.el
@@ -3,8 +3,8 @@
 ;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
 
 ;; Author: Artur Malabarba <address@hidden>
-;; URL: https://github.com/Bruce-Connor/names
-;; Version: 20150723.0
+;; URL: https://github.com/Malabarba/names
+;; Version: 20151201.0
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: extensions lisp
 
@@ -13,7 +13,7 @@
 ;; The description is way too large to sanely write here, below is a
 ;; summary. For a complete description, please visit the package's
 ;; frontpage with `M-x names-view-manual', or see the Readme file on
-;; https://raw.githubusercontent.com/Bruce-Connor/names/master/Readme.org
+;; https://raw.githubusercontent.com/Malabarba/names/master/Readme.org
 
 ;;; License:
 ;;
@@ -123,7 +123,7 @@ it will set PROP."
 
 ;;; ---------------------------------------------------------------
 ;;; Variables
-(defconst names-version "20150723.0" "Version of the names.el package.")
+(defconst names-version "20151201.0" "Version of the names.el package.")
 
 (defvar names--name nil
   "Name of the current namespace inside the `define-namespace' macro.")
@@ -567,7 +567,7 @@ Either it's an undefined macro, a macro with a bad debug 
declaration, or we have
 (defun names-view-manual ()
   "Call `browse-url' to view the manual of the Names package."
   (interactive)
-  (browse-url "http://github.com/Bruce-Connor/names";))
+  (browse-url "http://github.com/Malabarba/names";))
 
 (defun names--package-name ()
   "Return the package name as a symbol.
diff --git a/packages/on-screen/.gitignore b/packages/on-screen/.gitignore
new file mode 100644
index 0000000..c531d98
--- /dev/null
+++ b/packages/on-screen/.gitignore
@@ -0,0 +1 @@
+*.elc
diff --git a/packages/on-screen/on-screen.el b/packages/on-screen/on-screen.el
new file mode 100644
index 0000000..e5c3977
--- /dev/null
+++ b/packages/on-screen/on-screen.el
@@ -0,0 +1,665 @@
+;;; on-screen.el --- guide your eyes while scrolling   -*- lexical-binding: t 
-*-
+
+;; Copyright (C) 2013-2015 Free Software Foundation, Inc
+
+;; Author: Michael Heerdegen <address@hidden>
+;; Maintainer: Michael Heerdegen <address@hidden>
+;; Created: 24 Jan 2013
+;; Keywords: convenience
+;; URL: https://github.com/michael-heerdegen/on-screen.el
+;; Version: 1.3.2
+;; Package-Requires: ((cl-lib "0"))
+
+
+;; This file is not part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+
+;; Scrolling can be distracting because your eyes may lose
+;; orientation.  This library implements a minor mode that highlights
+;; the previously visible buffer part after each scroll.
+;;
+;; Installation: Put this library somewhere in your load-path, or
+;; install via M-x package-list-packages.  Then add to your init-file:
+;;
+;;   (require 'on-screen)
+;;
+;; To invoke on-screen globally for all buffers, also add
+;;
+;;   (on-screen-global-mode +1)
+;;
+;; Alternatively you can use the buffer local version `on-screen-mode'.
+;; For example, add this line to your init file:
+;;
+;;   (add-hook 'Info-mode-hook 'on-screen-mode)
+;;
+;; to enable it in all Info buffers.
+;;
+;; By default, fringe markers are used for highlighting - see
+;; `on-screen-highlight-method' to change that.  Type M-x
+;; customize-group RET on-screen RET to see what else can be
+;; configured.  If you use a configuration file (.emacs), you may also
+;; want to define mode specific settings by using buffer local
+;; variables.  For example, to use non intrusive fringe markers by
+;; default, but transparent overlays in w3m, you would add
+;;
+;;   (add-hook
+;;    'w3m-mode-hook
+;;    (defun my-w3m-setup-on-screen ()
+;;      (setq-local on-screen-highlight-method 'shadow)))
+;;
+;; to your .emacs.
+;;
+;; If you use transparent overlays for highlighting and there is the
+;; library "hexrgb.el" in your `load-path', it will be used to compute
+;; highlighting colors dynamically instead of using constant faces.
+;; I.e. if you use non-default background colors (e.g. from custom
+;; themes), on-screen will try to perform highlighting with a
+;; suitable, slightly different color.  See
+;; `on-screen-highlighting-to-background-delta' to control this.
+;;
+;;
+;; Implementation notes (mainly for myself):
+;;
+;; Implementing this functionality is not as straightforward as one
+;; might think.  There are commands that scroll other windows than the
+;; current one.  Not only scrolling commands can scroll text - also
+;; editing or even redisplay can cause windows to scroll.  There is
+;; weird stuff such as folding and narrowing, influencing the visible
+;; buffer part.  And although highlighting is realized in the
+;; displayed buffers (with overlays), it must be organized on a
+;; per-window basis, because different buffer parts may be displayed
+;; in different windows, and their highlightings must not interfere.
+;;
+;; That all makes it necessary to observe windows via hacks in
+;; different hooks, and to manage information about buffers, visible
+;; parts and timers in a data structure (`on-screen-data').  It is
+;; realized as an association list whose keys are windows.  There are
+;; some pitfalls - e.g. the data can be out of date if the window
+;; configuration has changed and windows display different buffers
+;; now.  The data must be updated, but not simply be thrown away,
+;; because the highlightings in the old buffers must be removed
+;; nonetheless.
+;;
+;;
+;; Acknowledgments:
+;;
+;; This library was inspired by a similar feature of the "Conqueror"
+;; web browser.
+;;
+;; Thanks for Drew Adams for testing and contributions.
+
+
+
+
+;;; Code:
+
+;;;; Requirements
+
+(eval-when-compile
+  (require 'cl-lib))
+(require 'timer)
+(require 'hexrgb nil t)
+
+(declare-function hexrgb-saturation      "hexrgb")
+(declare-function hexrgb-approx-equal    "hexrgb")
+(declare-function hexrgb-increment-value "hexrgb")
+(declare-function hexrgb-increment-hue   "hexrgb")
+
+
+;;;; Configuration stuff
+
+(defgroup on-screen nil
+  "Guide your eyes while scrolling."
+  :group 'convenience
+  :prefix "on-screen")
+
+(defcustom on-screen-inverse-flag nil
+  "What area to highlight.
+When nil, highlight the previously visible screenful.  Else
+highlight the previously off-screen parts."
+  :type 'boolean)
+
+(defcustom on-screen-highlight-method 'fringe
+  "Type of highlighting used by `on-screen-mode'.
+The following values are valid:
+
+  fringe       - graphical markers in the fringe
+  shadow       - transparent overlay on the text
+  line         - transparent overlay on the confining text lines
+  narrow-line  - narrow horizontal lines
+
+The fringe and the narrow-line methods only work on graphical
+displays.  narrow-line only works with Emacs 24 or higher.
+
+`on-screen-inverse-flag' defines which part(s) of the buffers are
+highlighted.
+
+The face used for \"shadow\" and \"line\" may be computed
+dynamically to support different background colors (color themes)
+- see `on-screen-highlighting-to-background-delta'."
+  :type '(choice
+          (const :tag "Fringe markers"                     fringe)
+          (const :tag "Transparent overlay"                shadow)
+          (const :tag "Overlay on confining text lines"    line)
+          (const :tag "Narrow horizontal line"             narrow-line)))
+
+(defcustom on-screen-fringe-marker-position t
+  "Where to display fringe markers.
+Ignored if highlighting doesn't use the fringe."
+  :type '(choice
+          (const :tag "Left fringe only"  left)
+          (const :tag "Right fringe only" right)
+          (const :tag "Both sides"        t)))
+
+(defface on-screen-shadow
+  '((((class color) (min-colors 88) (background light))
+     :background "#f2efcb" ; alternative: "#f5f4ff" is a bit less intrusive
+     )
+    (((class color) (min-colors 88) (background dark))
+     :background "#272620")
+    (((class color) (min-colors 8)  (background light))
+     :background "green")
+    (((class color) (min-colors 8)  (background dark))
+     :background "blue"))
+  "Face used for displaying a transparent overlay.")
+
+(defface on-screen-hl-line
+  '((((background light)) :background "#ffa0a0")
+    (((background dark))  :background "#300000"))
+  "Face used for displaying the \"line\" style overlay.")
+
+(defcustom on-screen-highlighting-to-background-delta .05
+  "How much shadow and line highlighting should differ from background.
+This should be a positive floating point number less than 1.
+Smaller values will lead to a highlighting color being more
+similar to the frame background.  A value of nil means to use use
+just face `on-screen-shadow'.
+
+This variable is ignored if the library \"hexrgb\" is not
+available."
+  :type '(choice (const :tag "Use standard face" nil)
+                 (float :tag "Delta")))
+
+(defface on-screen-fringe '((t (:inherit shadow)))
+  "Face used for fringe markers.")
+
+(defface on-screen-narrow-line
+  '((((background dark))  (:width extra-expanded :underline (:color "gray30" 
:style wave)))
+    (((background light)) (:width extra-expanded :underline (:color "gray70" 
:style wave))))
+  "Face used by the narrow-line highlighting method.")
+
+(defcustom on-screen-delay 5
+  "How long `on-screen-mode' should display optical aids."
+  :type 'number)
+
+(defcustom on-screen-auto-update t
+  "Whether to update highlighting for successive scrolls.
+When non-nil, every scroll action will cause a highlighting
+according to the previously visible screenful.  When nil, a once
+drawn highlighting will remain fixed relative to the text even
+if you scroll further until `on-screen-delay' is over."
+  :type 'boolean)
+
+(defcustom on-screen-remove-when-edit nil
+  "Whether to instantly remove highlighting when editing.
+
+In those situations where a single command causes multiple
+changes to a buffer highlighting is always removed to avoid
+confusion."
+  :type 'boolean)
+
+(defvar on-screen-treat-cut-lines--default-fraction .3)
+
+(defcustom on-screen-treat-cut-lines nil
+  "Whether to care about vertically cut lines.
+If nil, always count lines at the window start or end that are
+only partially visible as part of the visible area.  Else, a
+number between 0 and 1, meaning that lines will count as visible
+when the hidden part of them is less than this number.  Note that
+a non-nil value may make scrolling stuttering on slow computers."
+  :type `(choice (const :tag "Count partially visible lines as visible"   nil)
+                 (const :tag "Count partially visible lines as not visible" t)
+                 (float
+                  :tag "Count lines with hidden part less than this as visible"
+                  :value ,on-screen-treat-cut-lines--default-fraction)))
+
+(defcustom on-screen-drawing-threshold 2
+  "If set, highlight only when scrolled at least that many lines."
+  :type '(choice (const :tag "Off" nil)
+                 (integer :value 2)))
+
+(defvar on-screen-inhibit-highlighting nil
+  "Disable highlighting if non-nil.
+This variable is checked before highlighting is actually being
+performed, with the according buffer being current.
+
+If a function, it will be called with zero arguments.
+Highlighting will be inhibited if the result is non-nil.")
+
+
+;;;; Other variables
+
+(defvar on-screen-overlay-priority 30     ; > stripe buffer, < ediff, isearch
+  "Priority for all on-screen overlays.")
+
+(defvar on-screen-initialized-p nil
+  "Whether we have already added stuff to the hooks.")
+
+(defvar on-screen-data nil
+  "Association list holding internal data.")
+
+(defvar on-screen-command-counter 0)
+(defvar on-screen-last-change 0)
+
+
+;;;; User Commands
+
+;;;###autoload
+(define-minor-mode on-screen-mode
+  "Buffer local minor mode guiding your eyes while scrolling.
+With a prefix argument ARG, enable the mode if ARG is positive,
+and disable it otherwise.  If called from Lisp, enable the mode
+if ARG is omitted or nil.
+Type M-x customize-group on-screen RET for configuration."
+  :group 'on-screen
+  (when on-screen-mode
+    (unless on-screen-initialized-p
+      (on-screen-initialize))))
+
+;;;###autoload
+(define-minor-mode on-screen-global-mode
+  "Global minor mode guiding your eyes while scrolling.
+With a prefix argument ARG, enable the mode if ARG is positive,
+and disable it otherwise.  If called from Lisp, enable the mode
+if ARG is omitted or nil.
+
+You can make use of `on-screen-inhibit-highlighting' to prevent
+highlighting on a per-buffer basis.
+
+Type M-x customize-group on-screen RET for configuration."
+  :group 'on-screen :global t
+  (when on-screen-global-mode
+    (unless on-screen-initialized-p
+      (on-screen-initialize))))
+
+;;;###autoload
+(defalias 'global-on-screen-mode 'on-screen-global-mode)
+
+
+;;;; Internal functions
+
+(defun on-screen--treat-cut-lines-get-fraction ()
+  (if (floatp on-screen-treat-cut-lines)
+      on-screen-treat-cut-lines
+    on-screen-treat-cut-lines--default-fraction))
+
+(defun on-screen-window-start (&optional window)
+  "Like `window-start', but exclude partially visible lines."
+  (let* ((start (window-start window))
+         (vis (and on-screen-treat-cut-lines (pos-visible-in-window-p start 
window t))))
+    (if (not (cddr vis))
+        start
+      (cl-destructuring-bind (_x _y rtop _rbot rowh _vpos) vis
+        (if (< (/ (float rtop) (+ rtop rowh))
+               (on-screen--treat-cut-lines-get-fraction)) ; count as visible
+            start
+          (with-current-buffer (window-buffer window)
+            (save-excursion
+              (goto-char start)
+              (on-screen-beginning-of-line +2)
+              (point))))))))
+
+(defun on-screen-window-end (&optional window)
+  "Like `window-end', but exclude partially visible lines."
+  (let* ((end (window-end window))
+         (vis (and on-screen-treat-cut-lines (pos-visible-in-window-p (1- end) 
window t))))
+    (if (not (cddr vis))
+        end
+      (cl-destructuring-bind (_x _y _rtop rbot rowh _vpos) vis
+        (if (< (/ (float rbot) (+ rbot rowh))
+               (on-screen--treat-cut-lines-get-fraction)) ; count as visible
+            end
+          (with-current-buffer (window-buffer window)
+            (save-excursion
+              (goto-char end)
+              (on-screen-beginning-of-line 0)
+              (point))))))))
+
+(defun on-screen-beginning-of-line (&optional n)
+  (cl-callf or n 1)
+  (forward-visible-line (- n 1)))
+
+(defun on-screen-end-of-line (&optional n)
+  (cl-callf or n 1)
+  (forward-visible-line (- n 1))
+  (end-of-visible-line))
+
+(defun on-screen-record-data (win area &optional timer overlays)
+  ;; The collected data has the form ((beg end) timer overlays), and
+  ;; this is what `on-screen-get-data' returns.  Internally, this
+  ;; function also remembers the window-buffer of the window, to
+  ;; enable the mode to check if remembered data still belongs to the
+  ;; same buffer.
+  "Store information for window WIN in `on-screen-data'.
+AREA is a list (beg end).  TIMER is the currently active timer
+object.  OVERLAYS are the on-screen overlays currently visible in
+WIN.
+
+A nil value for AREA, TIMER or OVERLAYS means that the remembered
+values should not be changed.  If TIMER is the symbol `finished',
+remember nil for the timer."
+  (let* ((entry (assoc win on-screen-data))
+        (data  (cdr entry))
+        (same-buffer-p (eq (car data) (window-buffer win))))
+    (setq area  (or area        (and same-buffer-p (cadr data)))
+         timer (cond  ((timerp timer) timer)
+                      (timer nil)
+                      (t (and same-buffer-p (cl-caddr data))))
+         overlays (or overlays (and same-buffer-p (cl-cadddr data)))
+         data  `(,(window-buffer win) ,area ,timer ,overlays))
+    (if entry
+       (setcdr entry data)
+      (push (cons win data) on-screen-data))))
+
+(defun on-screen-get-data (win)
+  "Return stored data for WIN if existent and up-to-date."
+  (let ((data (cdr (assoc win on-screen-data))))
+    (if (eq (car data) (window-buffer win))
+        (cdr data)
+      nil)))
+
+(defun on-screen-cleanup-data ()
+  "Delete information stored for deleted windows."
+  (setq on-screen-data
+        (delq nil (mapcar (lambda (entry) (if (window-live-p (car entry)) 
entry nil))
+                          on-screen-data))))
+
+(defun on-screen-derive-from-frame-bg
+  (win delta-brightness-dark-bg delta-brightness-light-bg delta-hue)
+  "Helper calculating a suitable background color for highlighting."
+  (let ((frame (window-frame win)))
+    (and (display-graphic-p frame) (featurep 'hexrgb)
+         (let* ((bg (or (let ((frame-bg  (cdr (assq 'background-color 
(frame-parameters frame)))))
+                          (when (member frame-bg '(nil unspecified 
"unspecified-bg"))
+                            (setq frame-bg  (if (eq (frame-parameter frame 
'background-mode) 'dark)
+                                                "Black"
+                                              "White")))
+                          (and frame-bg  (x-color-defined-p frame-bg)  
frame-bg))))
+                (sat (condition-case nil (hexrgb-saturation bg) (error nil))))
+           (and sat
+                (if (hexrgb-approx-equal sat 0.0)
+                    ;; Grayscale - change bg value slightly.
+                    (hexrgb-increment-value
+                     bg (if (eq (frame-parameter frame 'background-mode) 'dark)
+                            delta-brightness-dark-bg
+                          delta-brightness-light-bg))
+                  (hexrgb-increment-hue bg delta-hue)) ; Color - change bg hue 
slightly.
+                )))))
+
+(defun on-screen-get-shadow-face (win)
+  "Return face for the transparent overlay in WIN."
+  (if (eq on-screen-highlight-method 'shadow)
+      (or (and on-screen-highlighting-to-background-delta
+               (let ((bg-col (apply #'on-screen-derive-from-frame-bg win
+                                    (mapcar (lambda (x) (* x 
on-screen-highlighting-to-background-delta))
+                                            (list 1 -1 1)))))
+                 (and bg-col `((t (:background ,bg-col))))))
+          'on-screen-shadow)
+    'on-screen-hl-line))
+
+(defun on-screen-make-fringe-overlays (pos topp &optional inversep)
+  "Create and return list of fringe overlays."
+  (let (ov1 ov2)
+    (unless (eq on-screen-fringe-marker-position 'left)
+      (setq ov1  (save-excursion (make-overlay (progn (goto-char pos)
+                                                      
(on-screen-beginning-of-line
+                                                       (cond ((not inversep) 
+1)
+                                                             (topp           
+2)
+                                                             (t               
0)))
+                                                      (point))
+                                               (1+ (point)))))
+      (overlay-put ov1 'before-string (on-screen-fringe-string topp nil 
inversep)))
+    (unless (eq on-screen-fringe-marker-position 'right)
+      (setq ov2  (save-excursion (make-overlay (progn (goto-char pos)
+                                                      
(on-screen-beginning-of-line
+                                                       (cond ((not inversep) 
+1)
+                                                             (topp           
+2)
+                                                             (t               
0)))
+                                                      (point))
+                                               (1+ (point)))))
+      (overlay-put ov2 'before-string (on-screen-fringe-string topp t 
inversep)))
+    (delq nil (list ov1 ov2))))
+
+(defun on-screen-fringe-string (topp leftp &optional inversep)
+  "Return a string suitable for displaying fringe markers."
+  (let ((xor (lambda (x y) (if x (not y) y))))
+    (propertize (purecopy " ")
+                'display  (list (if leftp 'left-fringe 'right-fringe)
+                                (if (funcall xor topp (not inversep))
+                                    (if leftp 'top-left-angle 'top-right-angle)
+                                  (if leftp 'bottom-left-angle 
'bottom-right-angle))
+                                'on-screen-fringe))))
+
+(defun on-screen-make-line-overlay (pos)
+  "Create an overlay around POS for the line method."
+  (save-excursion
+    (make-overlay (progn (goto-char pos) (on-screen-beginning-of-line)     
(point))
+                  (progn (goto-char pos) (on-screen-end-of-line)       (1+ 
(point))))))
+
+(defun on-screen-make-narrow-line-overlay (win pos)
+  "Create an overlay around POS for the narrow-line method."
+  (let ((ov (save-excursion
+              (make-overlay (progn (goto-char pos) 
(on-screen-beginning-of-line) (point))
+                            (progn (goto-char pos) (on-screen-end-of-line)     
  (point))))))
+    (overlay-put ov 'face 'on-screen-narrow-line)
+    ;; The following is necessary to get a line spanning the entire
+    ;; window width, because underlining is only applied to text - a
+    ;; problem especially for empty lines.  However this hides any
+    ;; other highlighting there, e.g. from stripe-buffer or
+    ;; hl-line-mode.  I think there's nothing I can do about that.
+    (overlay-put ov 'after-string (propertize "foo"
+                                              'face 'on-screen-narrow-line
+                                              'display `(space :align-to 
,(window-width win))
+                                              'cursor 0))
+    ov))
+
+(defun on-screen-get-windows (&optional all-frames)
+  "Return a list of all windows.
+With ALL-FRAMES non-nil, include all windows of all frames, else
+only the windows of the selected frame."
+  (apply #'nconc
+         (mapcar (lambda (frame) (window-list frame))
+                 (if all-frames (frame-list) (list (selected-frame))))))
+
+(defun on-screen-pre-command ()
+  "Remember visible buffer parts in the selected frame."
+  ;;   This normally goes to `pre-command-hook'.
+  (cl-incf on-screen-command-counter)
+  (add-hook 'after-change-functions #'on-screen-after-change) ;$$$$ bug#16796
+  (condition-case nil
+      (mapc (lambda (win) (with-current-buffer (window-buffer win)
+                      (when (on-screen-enabled-p)
+                        (on-screen-record-data win (list 
(on-screen-window-start win)
+                                                         (on-screen-window-end 
  win))))))
+           (on-screen-get-windows))
+    ((debug error) nil)))
+
+(defun on-screen-after-scroll (win display-start)
+  "DTRT after scrolling.
+This should normally go to `window-scroll-functions'."
+  (condition-case nil
+      (with-current-buffer (window-buffer win)
+        (when (on-screen-enabled-p)
+          (let* ((win-data (on-screen-get-data win))
+                 (area     (car  win-data))
+                 (timer    (cadr win-data))
+                 (overlays (cl-caddr win-data))
+                 (s1       (car area))
+                 (s2       (cadr area)))
+            (when (and
+                  on-screen-auto-update
+                  (timerp timer)
+                  ;; avoid removing highlighting when 
`window-scroll-functions' is
+                  ;; called multiple times in succession (follow-mode does 
that)
+                  (not (eq (car-safe area) (on-screen-window-start win))))
+              ;; do what the timer would do, and cancel timer
+              (on-screen-remove-highlighting win)
+              (cancel-timer timer)
+              (on-screen-record-data win area 'finished)
+              (setq timer nil))
+            (cond
+             ((timerp timer)
+              (timer-set-time timer (timer-relative-time (current-time) 
on-screen-delay)))
+             ((or (not area)
+                  (= display-start s1)))
+             ((and (numberp on-screen-drawing-threshold)
+                   (< (abs (apply #'count-lines (sort (list display-start s1) 
#'<)))
+                      on-screen-drawing-threshold)))
+             (t
+              (setq
+               overlays
+               (let ((method `(,on-screen-highlight-method . 
,on-screen-inverse-flag)))
+
+                 ;; prevent highlighting in certain situations
+                 ;; note that `window-end' must not be used here!
+
+                 (when (and s1 s2
+                            (pos-visible-in-window-p (point-min) win)
+                            (pos-visible-in-window-p (point-max) win))
+                   ;; after narrow
+                   (setq s1 nil s2 nil))
+
+                 (when (and s1 s2
+                            (>= s2 (point-max))
+                            (< s1 (on-screen-window-start win))
+                            (pos-visible-in-window-p (point-max) win))
+                   ;;scrolling down near buffer end
+                   (setq s2 nil))
+
+                 (cond 
+                  ((equal method '(shadow . nil))
+                   (if (and s1 s2) (list (make-overlay s1 s2)) ()))
+                  ((eq (car method) 'shadow)
+                   (list (and s1 (make-overlay (point-min)  s1))
+                         (and s2 (make-overlay          s2  (point-max)))))
+                  ((eq (car method) 'fringe)
+                   (append (and s1 (on-screen-make-fringe-overlays     s1  nil 
(cdr method)))
+                           (and s2 (on-screen-make-fringe-overlays (1- s2)   t 
(cdr method)))))
+                  ((equal method '(line . nil))
+                   (list (and s1 (on-screen-make-line-overlay     s1))
+                         (and s2 (on-screen-make-line-overlay (1- s2)))))
+                  ((eq (car method) 'line)
+                   (list (and s1 (on-screen-make-line-overlay (1- s1)))
+                         (and s2 (on-screen-make-line-overlay     s2))))
+                  ((eq (car method) 'narrow-line)
+                   (list (and s1 (on-screen-make-narrow-line-overlay win (1- 
s1)))
+                         (and s2 (on-screen-make-narrow-line-overlay win (1- 
s2)))))))
+               overlays (delq nil overlays))
+              (dolist (ov overlays)
+                (overlay-put ov 'window win) ; display only in selected window
+                (overlay-put ov 'priority on-screen-overlay-priority))
+              (when (memq on-screen-highlight-method '(shadow line))
+                (dolist (ov overlays)
+                  (overlay-put ov 'face (on-screen-get-shadow-face win))))
+              (on-screen-record-data
+               win nil
+               (run-at-time (time-add (current-time) (seconds-to-time 
on-screen-delay)) nil
+                            (lambda (win)
+                              (condition-case nil
+                                  (progn
+                                    (when (window-live-p win)
+                                      (with-current-buffer (window-buffer win)
+                                        (on-screen-remove-highlighting win)
+                                        (on-screen-record-data
+                                         win (list (on-screen-window-start win)
+                                                   (on-screen-window-end win))
+                                         'finished)))
+                                    (on-screen-cleanup-data))
+                                ((debug error) nil)))
+                            win)
+               overlays))))))
+    ((debug error) nil)))
+
+(defun on-screen-remove-highlighting (win)
+  "Delete all on-screen overlays in window WIN.
+This has to be done for a previously buffer if the window-buffer
+had changed."
+  (let* ((entry (assoc win on-screen-data))
+         (data  (cdr entry))
+         (buffer (car data)))
+    (when (buffer-live-p buffer)
+      (with-current-buffer buffer
+        (let* ((data     (cdr data))
+               (timer    (cadr data))
+               (overlays (cl-caddr data)))
+          (dolist (ov overlays) (delete-overlay ov))
+          (when (timerp timer) (cancel-timer timer))))
+      (setq on-screen-data (delq entry on-screen-data)))))
+
+(defun on-screen-after-change (&rest _)
+  "Reset highligting for current buffer after it was changed.
+This has to be done for all its windows.  Goes to
+`after-change-functions'."
+  (when (or on-screen-remove-when-edit
+           (= on-screen-last-change on-screen-command-counter))
+    (let ((buf (current-buffer)))
+      (when (on-screen-enabled-p buf)
+       (dolist (win (on-screen-get-windows t))
+         (when (eq (window-buffer win) buf)
+           (on-screen-remove-highlighting win))))))
+  (setq on-screen-last-change on-screen-command-counter))
+
+(defun on-screen-after-wconf-change ()
+  "Clean up after the window configuration has changed.
+I.e., for all windows of the selected frame, remove all
+highlightings and clear all associated data."
+  (let ((wins (on-screen-get-windows)))
+    (dolist (win wins)
+      (on-screen-remove-highlighting win))))
+
+(defun on-screen-enabled-p (&optional buffer)
+  "Return non-nil if on-screen is enabled in BUFFER."
+  (with-current-buffer (or buffer (current-buffer))
+    (and
+     (or on-screen-global-mode on-screen-mode)
+     (cond
+      ((not on-screen-inhibit-highlighting) t)
+      ((functionp on-screen-inhibit-highlighting)
+       (not (funcall on-screen-inhibit-highlighting)))
+      (t nil)))))
+
+(defun on-screen-initialize ()
+  "Prepare for using on-screen."
+  (add-hook 'pre-command-hook        #'on-screen-pre-command)
+  (add-hook 'window-scroll-functions #'on-screen-after-scroll)
+  (add-hook 'after-change-functions  #'on-screen-after-change)
+  (add-hook 'window-configuration-change-hook #'on-screen-after-wconf-change)
+  (setq on-screen-initialized-p t))
+
+(defun on-screen-unload-function ()
+  "Function to run when unloading on-screen."
+  (remove-hook 'pre-command-hook        #'on-screen-pre-command)
+  (remove-hook 'window-scroll-functions #'on-screen-after-scroll)
+  (remove-hook 'after-change-functions  #'on-screen-after-change)
+  (remove-hook 'window-configuration-change-hook 
#'on-screen-after-wconf-change)
+  nil)
+
+
+(provide 'on-screen)
+
+;;; on-screen.el ends here
diff --git a/packages/other-frame-window/other-frame-window.el 
b/packages/other-frame-window/other-frame-window.el
index 6fc718f..2427ce6 100755
--- a/packages/other-frame-window/other-frame-window.el
+++ b/packages/other-frame-window/other-frame-window.el
@@ -5,7 +5,7 @@
 ;; Author: Stephen Leake <address@hidden>
 ;; Maintainer: Stephen Leake <address@hidden>
 ;; Keywords: frame window
-;; Version: 1.0.1
+;; Version: 1.0.2
 ;; Package-Requires: ((emacs "24.4"))
 ;;
 ;; This file is part of GNU Emacs.
@@ -123,8 +123,8 @@
   "Remove ourselves from 'display-buffer-overriding-action' action list, if 
present."
   (let ((functions (car display-buffer-overriding-action))
         (attrs (cdr display-buffer-overriding-action)))
-    (setq functions (delq #'ofw-display-buffer-other-frame
-                          (delq #'ofw-display-buffer-other-window functions)))
+    (setq functions (remq #'ofw-display-buffer-other-frame
+                          (remq #'ofw-display-buffer-other-window functions)))
     (setq display-buffer-overriding-action
           (when (or functions attrs) (cons functions attrs)))))
 
@@ -165,10 +165,10 @@ Intended for 'display-buffer-overriding-action'."
   ;; Reset for next display-buffer call.
   (ofw-delete-from-overriding)
 
+  ;; IMPROVEME: prompt for a frame if more than 2
   (or (display-buffer-use-some-frame buffer alist)
       (display-buffer-pop-up-frame buffer alist)))
 
-;; FIXME: use defadvice for Emacs 24.3
 (defun ofw-switch-to-buffer-advice (orig-fun buffer
                                     &optional norecord force-same-window)
   "Change `switch-to-buffer' to call `pop-to-buffer'.
@@ -178,14 +178,9 @@ This allows `switch-to-buffer' to respect 
`ofw-other-window',
       (pop-to-buffer buffer (list #'display-buffer-same-window) norecord)
     (funcall orig-fun buffer norecord force-same-window)))
 
-;; FIXME: use defadvice for Emacs 24.3
 (defun ofw--suspend-and-restore (orig-func &rest args)
   "Call ORIG-FUNC without any ofw actions on 
'display-buffer-overriding-action'."
   (let ((display-buffer-overriding-action display-buffer-overriding-action))
-    ;; FIXME: ofw-delete-from-overriding operates destructively, so the
-    ;; subsequent "restore" step only works if our ofw actions were all at the
-    ;; very beginning display-buffer-overriding-action (in which case `delq'
-    ;; happens not to be destructive).
     (ofw-delete-from-overriding)
     (apply orig-func args)))
 
@@ -253,23 +248,12 @@ Enable mode if ARG is positive."
          (setq display-buffer-base-action (cons functions attrs)))
 
        ;; Change switch-to-buffer to use display-buffer
-       (if (fboundp 'advice-add) ;Emacs≥24.4
-           (advice-add 'switch-to-buffer :around #'ofw-switch-to-buffer-advice)
-          ;; FIXME: `ad-activate' affects all pieces of advice of that
-          ;; function, which is not what we want!
-         ;; (ad-activate 'switch-to-buffer)
-          )
+       (advice-add 'switch-to-buffer :around #'ofw-switch-to-buffer-advice)
 
        ;; Completing-read <tab> pops up a buffer listing completions;
        ;; that should not respect or consume
        ;; ofw-frame-window-prefix-arg.
-       (if (fboundp 'advice-add)
-           (advice-add 'read-from-minibuffer
-                        :around #'ofw--suspend-and-restore)
-          ;; FIXME: `ad-activate' affects all pieces of advice of that
-          ;; function, which is not what we want!
-         ;; (ad-activate 'read-from-minibuffer)
-          )
+       (advice-add 'read-from-minibuffer :around #'ofw--suspend-and-restore)
        )
 
     ;; else disable
@@ -327,7 +311,7 @@ that allows the selected frame)."
 
 (defun ofw-dwim--frame-p ()
   "Return non-nil if the prefix is for \"other-frame\" rather than window."
-  ;; FIXME: Comparing functions is ugly/hackish!
+  ;; IMPROVEME: Comparing functions is ugly/hackish!
   (memq #'ofw-display-buffer-other-frame
         (car display-buffer-overriding-action)))
 
@@ -347,7 +331,7 @@ that allows the selected frame)."
   "Show current buffer in other frame or window."
   (interactive)
   (if (ofw-dwim--frame-p)
-      ;; FIXME: This is the old C-x 5 2 behavior, but maybe it should just use
+      ;; IMPROVEME: This is the old C-x 5 2 behavior, but maybe it should just 
use
       ;; display-buffer instead!
       (call-interactively #'make-frame-command)
     (display-buffer (current-buffer))))
diff --git a/packages/package-fixes/package-fixes.el 
b/packages/package-fixes/package-fixes.el
new file mode 100644
index 0000000..c0324e8
--- /dev/null
+++ b/packages/package-fixes/package-fixes.el
@@ -0,0 +1,148 @@
+;;; package-fixes.el --- package.el bug fixes ported to older Emacsen  -*- 
lexical-binding: t; -*-
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Artur Malabarba <address@hidden>
+;; Keywords: tools
+;; Version: 0
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This package fixes some critical bugs in package.el 1.0.1 which
+;; cause bad .elc files to be created during package upgrades when a
+;; macro changes.  It is designed to be required as a dependency by
+;; packages whose installation is affected by these bugs.
+
+;; This package can be safely installed on Emacs >= 25, in which
+;; case it does nothing.
+
+;;; Code:
+
+
+;;; Emacs < 25
+(unless (fboundp 'package--list-loaded-files)
+  (require 'package)
+  (require 'find-func)
+
+  (declare-function package-fixes--autoloads-file-name "package-fixes")
+  (declare-function find-library-name "find-func")
+  (declare-function package-fixes--list-loaded-files "package-fixes")
+  (declare-function package-fixes--activate-autoloads-and-load-path 
"package-fixes")
+
+  ;; None of these functions are defined in Emacs < 25.1.  Defining
+  ;; them here doesn't actually do anything yet, they will be used by
+  ;; the advices below.
+  (defun package-fixes--autoloads-file-name (pkg-desc)
+    "Return the absolute name of the autoloads file, sans extension.
+PKG-DESC is a `package-desc' object."
+    (expand-file-name
+     (format "%s-autoloads" (package-desc-name pkg-desc))
+     (package-desc-dir pkg-desc)))
+
+  (defun package-fixes--activate-autoloads-and-load-path (pkg-desc)
+    "Load the autoloads file and add package dir to `load-path'.
+PKG-DESC is a `package-desc' object."
+    (let* ((old-lp load-path)
+           (pkg-dir (package-desc-dir pkg-desc))
+           (pkg-dir-dir (file-name-as-directory pkg-dir)))
+      (with-demoted-errors "Error loading autoloads: %s"
+        (load (package-fixes--autoloads-file-name pkg-desc) nil t))
+      (when (and (eq old-lp load-path)
+                 (not (or (member pkg-dir load-path)
+                          (member pkg-dir-dir load-path))))
+        ;; Old packages don't add themselves to the `load-path', so we have to
+        ;; do it ourselves.
+        (push pkg-dir load-path))))
+
+  (defun package-fixes--list-loaded-files (dir)
+    "Recursively list all files in DIR which correspond to loaded features.
+Returns the `file-name-sans-extension' of each file, relative to
+DIR, sorted by most recently loaded last."
+    (let* ((history (delq nil
+                          (mapcar (lambda (x)
+                                    (let ((f (car x)))
+                                      (and f (file-name-sans-extension f))))
+                                  load-history)))
+           (dir (file-truename dir))
+           ;; List all files that have already been loaded.
+           (list-of-conflicts
+            (delq
+             nil
+             (mapcar
+              (lambda (x) (let* ((file (file-relative-name x dir))
+                            ;; Previously loaded file, if any.
+                            (previous
+                             (ignore-errors
+                               (file-name-sans-extension
+                                (file-truename (find-library-name file)))))
+                            (pos (when previous (member previous history))))
+                       ;; Return (RELATIVE-FILENAME . HISTORY-POSITION)
+                       (when pos
+                         (cons (file-name-sans-extension file) (length pos)))))
+              (directory-files-recursively dir "\\`[^\\.].*\\.el\\'")))))
+      ;; Turn the list of (FILENAME . POS) back into a list of features.  
Files in
+      ;; subdirectories are returned relative to DIR (so not actually 
features).
+      (let ((default-directory (file-name-as-directory dir)))
+        (mapcar (lambda (x) (file-truename (car x)))
+                (sort list-of-conflicts
+                      ;; Sort the files by ascending HISTORY-POSITION.
+                      (lambda (x y) (< (cdr x) (cdr y))))))))
+
+  (defun package-fixes--load-files-for-activation (pkg-desc reload)
+    "Load files for activating a package given by PKG-DESC.
+Load the autoloads file, and ensure `load-path' is setup.  If
+RELOAD is non-nil, also load all files in the package that
+correspond to previously loaded files."
+    (let* ((loaded-files-list (when reload
+                                (package-fixes--list-loaded-files 
(package-desc-dir pkg-desc)))))
+      ;; Add to load path, add autoloads, and activate the package.
+      (package-fixes--activate-autoloads-and-load-path pkg-desc)
+      ;; Call `load' on all files in `package-desc-dir' already present in
+      ;; `load-history'.  This is done so that macros in these files are 
updated
+      ;; to their new definitions.  If another package is being installed which
+      ;; depends on this new definition, not doing this update would cause
+      ;; compilation errors and break the installation.
+      (with-demoted-errors "Error in package--load-files-for-activation: %s"
+        (mapc (lambda (feature) (load feature nil t))
+              ;; Skip autoloads file since we already evaluated it above.
+              (remove (file-truename (package-fixes--autoloads-file-name 
pkg-desc))
+                      loaded-files-list)))))
+
+  
+;;; 24.1, 24.2, 24.3
+  (defadvice package--make-autoloads-and-compile (around 
fix-package--make-autoloads-and-compile
+                                                         (name pkg-dir) 
activate)
+    "Fixed `package--make-autoloads-and-compile'.
+Behave the same as `package--make-autoloads-and-compile', except
+it uses `package-fixes--load-files-for-activation' instead of just
+loading the autoloads file."
+    (package-generate-autoloads name pkg-dir)
+    (package-fixes--load-files-for-activation pkg-desc :reload)
+    (let ((load-path (cons pkg-dir load-path)))
+      ;; We must load the autoloads file before byte compiling, in
+      ;; case there are magic cookies to set up non-trivial paths.
+      (byte-recompile-directory pkg-dir 0 t)))
+
+;;; 24.4, 24.5
+  (defadvice package--compile (after fix-package--compile (pkg-desc) activate)
+    "Like `package--compile', but reload package first.
+Uses `package-fixes--load-files-for-activation' to reload files."
+    (package-activate-1 pkg-desc)
+    (package-fixes--load-files-for-activation pkg-desc :reload)
+    (byte-recompile-directory (package-desc-dir pkg-desc) 0 t)))
+
+(provide 'package-fixes)
+;;; package-fixes.el ends here
diff --git a/packages/rich-minority/rich-minority.el 
b/packages/rich-minority/rich-minority.el
index 864b4d3..78a4166 100644
--- a/packages/rich-minority/rich-minority.el
+++ b/packages/rich-minority/rich-minority.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <address@hidden>
 ;; URL: https://github.com/Malabarba/rich-minority
 ;; Package-Requires: ((cl-lib "0.5"))
-;; Version: 1.0
+;; Version: 1.0.1
 ;; Keywords: mode-line faces
 
 ;;; Commentary:
@@ -87,7 +87,7 @@ Please include your Emacs and rich-minority versions."
   (require 'lisp-mnt)
   (message "Your rm-version is: %s, and your emacs version is: %s.\nPlease 
include this in your report!"
            (lm-version "rich-minority.el") emacs-version)
-  (browse-url "https://github.com/Bruce-Connor/rich-minority/issues/new";))
+  (browse-url "https://github.com/Malabarba/rich-minority/issues/new";))
 (defun rm-customize ()
   "Open the customization menu in the `rich-minority' group."
   (interactive)
diff --git a/packages/rnc-mode/rnc-mode.el b/packages/rnc-mode/rnc-mode.el
new file mode 100644
index 0000000..81f891b
--- /dev/null
+++ b/packages/rnc-mode/rnc-mode.el
@@ -0,0 +1,153 @@
+;;; rnc-mode.el --- Emacs mode to edit Relax-NG Compact files  -*- 
lexical-binding:t -*-
+
+;; Copyright (C) 1994-1998, 2001-2016 Free Software Foundation, Inc.
+
+;; Author: Stefan Monnier <address@hidden>
+;; Keywords: xml relaxng
+;; Version: 0.1
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+
+(require 'smie)
+(require 'nxml-mode)
+
+;;; Code:
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.rnc\\'" . rnc-mode))
+
+(defconst rnc-mode-syntax-table
+  (let ((st (make-syntax-table)))
+    (modify-syntax-entry ?# "<" st)
+    (modify-syntax-entry ?\n ">" st)
+    (modify-syntax-entry ?\" "\"" st)
+    (modify-syntax-entry ?- "_" st)
+    (modify-syntax-entry ?. "_" st)
+    (modify-syntax-entry ?: "_" st)
+    (modify-syntax-entry ?_ "_" st)
+    st))
+
+(defconst rnc--keywords
+  ;; Taken from the grammar in http://relaxng.org/compact-20021121.html,
+  ;; by order of appearance.
+  '("namespace" "default" "datatypes" "element" "attribute"
+    "list" "mixed" "parent" "empty" "text" "notAllowed" "external"
+    "grammar" "div" "include" ;; "start"
+    "string" "token" "inherit"))
+
+(defconst rnc--def-regexp "^[ \t]*\\([\\[:alpha:]][[:alnum:]-._]*\\)[ \t]*=")
+
+(defconst rnc-font-lock-keywords
+  `((,rnc--def-regexp (1 font-lock-function-name-face))
+    (,(concat "\\_<" (regexp-opt rnc--keywords) "\\_>")
+     (0 font-lock-keyword-face))
+    ("attribute[ \t\n]+\\([^ ]+\\)" (1 'nxml-attribute-local-name))
+    ;; FIXME: We'd like to use nxml-element-local-name for element names,
+    ;; but by default this looks exactly like font-lock-function-name-face,
+    ;; which we want to use for local pattern definitions.
+    ;; ("element[ \t\n]+\\([^ ]+\\)" (1 'nxml-element-local-name))
+    ))
+
+(defconst rnc-imenu-generic-expression `((nil ,rnc--def-regexp 1)))
+
+(defconst rnc-smie-grammar
+  ;; The body of an RNC file is a sequence of definitions.
+  ;; Problem is: these definitions are not separated by any special keyword.
+  ;; It's basically a repetition of (id "=" pattern), where
+  ;; patterns can end with:
+  ;;     "}", ")" "*", "+", "?", id, stringliteral
+  ;; Since this is way beyond the power of SMIE, we resort to using a pseudo
+  ;; " ; " separator which is introduced by the tokenizer.
+  (smie-prec2->grammar
+   (smie-bnf->prec2
+    '((id) (atom) (args)
+      (header (header "include" atom))
+      (decls (id "=" pattern) (id "|=" pattern) (id "&=" pattern)
+             (decls " ; " decls))
+      (pattern ("element" args) ("attribute" args)
+               ("list" args) ("mixed" args)
+               ("parent" id) ("external" id)
+               ("grammar" atom)
+              ("{" pattern "}")
+              (pattern "," pattern)
+              (pattern "&" pattern)
+              (pattern "|" pattern)
+              (pattern "?")
+              (pattern "*")
+              (pattern "+")))
+    ;; The spec says "There is no notion of operator precedence".
+    '((assoc " ; "))
+    '((assoc "," "&" "|") (nonassoc "?" "*" "+"))
+    )))
+
+(defun rnc-smie-forward-token ()
+  (let ((start (point)))
+    (forward-comment (point-max))
+    (if (and (> (point) start)
+             (looking-at "\\(?:\\s_\\|\\sw\\)+[ \t\n]*[|&]?=")
+             (save-excursion
+               (goto-char start)
+               (forward-comment -1)
+               (= (point) start)))
+        " ; "
+      (smie-default-forward-token))))
+
+(defun rnc-smie-backward-token ()
+  (let ((start (point)))
+    (forward-comment (- (point)))
+    (if (and (< (point) start)
+             (let ((pos (point)))
+               (goto-char start)
+               (prog1
+                   (looking-at "\\(?:\\s_\\|\\sw\\)+[ \t\n]*[|&]?=")
+                 (goto-char pos))))
+        " ; "
+      (smie-default-backward-token))))
+
+(defun rnc-smie-rules (kind token)
+  (pcase (cons kind token)
+    (`(:list-intro . "element") t)
+    (`(:before . ,(or "include" "default" "namespace" "datatypes")) 0)
+    (`(:before . "{")
+     (save-excursion
+       (let ((offset (if (smie-rule-bolp) smie-indent-basic 0))
+             x)
+         (while (or (null (car-safe x))
+                    (integerp (car-safe x)))
+           (setq x (smie-backward-sexp 'halfsexp)))
+         (goto-char (nth 1 x))
+         `(column . ,(+ (smie-indent-virtual) offset)))))
+    (`(:after . ,(or "=" "|=" "&=")) smie-indent-basic)
+    (`(:before . ,(or "|" "&" ","))
+     (and (smie-rule-bolp) (smie-rule-parent-p "(" "{") (smie-rule-parent)))
+    (`(,_ . " ; ") (smie-rule-separator kind))
+    ))
+
+;;;###autoload
+(define-derived-mode rnc-mode prog-mode "RNC"
+  "Major mode to edit Relax-NG Compact files."
+  (setq-local comment-start "#")
+  (setq-local font-lock-defaults '(rnc-font-lock-keywords))
+  (setq-local imenu-generic-expression rnc-imenu-generic-expression)
+  (smie-setup rnc-smie-grammar #'rnc-smie-rules
+              :forward-token #'rnc-smie-forward-token
+              :backward-token #'rnc-smie-backward-token))
+
+(provide 'rnc-mode)
+;;; rnc-mode.el ends here
diff --git a/packages/sm-c-mode/GNUmakefile b/packages/sm-c-mode/GNUmakefile
new file mode 100644
index 0000000..c9d648a
--- /dev/null
+++ b/packages/sm-c-mode/GNUmakefile
@@ -0,0 +1,28 @@
+
+EMACS=emacs
+DIFF=diff
+HIJACK=--eval "(defalias 'c-mode 'sm-c-mode)"
+
+test: sm-c-mode-test.c.test
+
+.PHONY: refresh
+refresh:
+
+%.elc : %.el
+       $(EMACS) --batch -L . --no-init-file -f batch-byte-compile $<
+
+%.test: % sm-c-mode.elc refresh
+       $(EMACS) --batch -l sm-c-mode-autoloads.el               \
+           $<                                                   \
+           --eval '(setq indent-tabs-mode nil)'                 \
+           --eval '(setq create-lockfiles nil)'                 \
+           --eval '(indent-region (point-min) (point-max) nil)' \
+           --eval '(indent-region (point-min) (point-max) nil)' \
+           --eval '(write-region (point-min) (point-max) "$@")'
+       $(DIFF) $< $@ || true; $(RM) $@
+
+%.reindent: % sm-c-mode.elc refresh
+       $(EMACS) --batch -l sm-c-mode-autoloads.el $(HIJACK)     \
+           $<                                                   \
+           --eval '(indent-region (point-min) (point-max) nil)' \
+           --eval '(save-buffer)'
diff --git a/packages/sm-c-mode/sm-c-mode-test.c 
b/packages/sm-c-mode/sm-c-mode-test.c
new file mode 100644
index 0000000..4756064
--- /dev/null
+++ b/packages/sm-c-mode/sm-c-mode-test.c
@@ -0,0 +1,97 @@
+/* -*- sm-c -*- */
+
+#include <toto>
+
+#define toto(arg) /* bla
+                     bla */ \
+  if (a) {  /* toto
+             * titi
+             */    \
+    fs((arg) + 2); \
+  }
+
+#define test(arg) \
+  (hello + arg)
+
+struct foo
+  {
+    int field;
+  };
+
+struct foo {
+  int field;
+};
+
+typedef struct bar {
+  int field;
+} *BarPtr;
+
+struct foo *getfoo (void)
+{
+  return NULL;
+}
+
+#define titi(arg) { \
+    if (a) {        \
+      f(arg + 1)    \
+    }               \
+  }
+
+DEFUN ()
+  ()
+{
+  return Qnil;
+}
+
+int main (void)
+{
+  if (a)
+    do
+      if (b)
+        if (c)
+          printf ("hello\n");
+        else
+          printf ("there\n");
+      else
+        printf ("elsewhere\n");        
+    while (6);
+  else if (b)
+    printf ("wow\n");
+  else
+    if (c)
+      printf
+        ("weee\n");
+    else
+      printf ("wop\n");
+
+  if (a)
+    if (b) {
+      c;
+    }
+
+  *a = b;
+
+  if (pITORIG != pITCOPY)
+    *(pITORIG)
+      = *(pITCOPY);
+
+  switch (a)
+    {
+    case 1:
+      {
+        if (a)
+          {
+            y = 5;
+    case 2:
+            x = 3;
+          }
+      }
+    }
+}
+
+static struct myownspecialstruct *
+testfunction
+  (args)
+{
+  return NULL;
+}
diff --git a/packages/sm-c-mode/sm-c-mode.el b/packages/sm-c-mode/sm-c-mode.el
new file mode 100644
index 0000000..54b9a54
--- /dev/null
+++ b/packages/sm-c-mode/sm-c-mode.el
@@ -0,0 +1,917 @@
+;;; sm-c-mode.el --- Experimental C major mode based on SMIE  -*- 
lexical-binding: t; -*-
+
+;; Copyright (C) 2015  Free Software Foundation, Inc.
+
+;; Author: Stefan Monnier <address@hidden>
+;; Version: 0
+;; Keywords:
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; ¡¡Don't use this!!
+;;
+;; This is an experiment to see concretely where&how SMIE falls down when
+;; trying to handle a language like C.
+;; So, strictly speaking, this does provide "SMIE-based indentation for C" and
+;; might even do it OK for simple cases, but it really doesn't benefit much
+;; from SMIE:
+;; - it does a lot of its own parsing by hand.
+;; - its smie-rules-function also does a lot of indentation by hand.
+;; Hopefully at some point, someone will find a way to extend SMIE such that
+;; it can handle C without having to constantly work around SMIE, e.g.
+;; it'd be nice to hook sm-c--while-to-do, sm-c--else-to-if, sm-c--boi,
+;; sm-c--boe, ... into SMIE at some level.
+
+;; Note that this mode makes no attempt to try and handle sanely K&R style
+;; function definitions.
+
+;;;; Benchmarks
+
+;; This code can't be compared to CC-mode since its scope is much more limited
+;; (only tries to handle the kind of code found in Emacs's source code, for
+;; example; does not intend to be extensible to handle C++ or ObjC; does not
+;; offer the same kind of customizability of indentation style, ...).
+;; But in order to make sure it's doing a good enough job on the code for which
+;; it was tuned, I did run some quick benchmarks against CC-mode:
+;;
+;; Benchmarks: reindent emacs/src/*.[ch] (skipping macuvs.h and globals.h
+;; because CC-mode gets pathologically slow on them).
+;;    (cd src/emacs/work/; git reset --hard; mv src/macuvs.h src/globals.h ./);
+;;    files=($(echo ~/src/emacs/work/src/*.[ch]));
+;;    (cd src/emacs/work/; mv macuvs.h globals.h src/);
+;;    time make -j4 ${^${files}}.reindent EMACS="emacs24 -Q";
+;;    (cd src/emacs/work/; git diff|wc)
+;; - Default settings:
+;;   diff|wc =>  86800  379362 2879534
+;;   make -j4  191.57s user 1.77s system 334% cpu   57.78 total
+;; - With (setq sm-c-indent-cpp-basic 0)
+;;   diff|wc =>  59909  275415 2034045
+;;   make -j4  177.88s user 1.70s system 340% cpu   52.80 total
+;; - For reference, CC-mode gets:
+;;   diff|wc =>  79164  490894 3428542
+;;   make -j4  804.83s user 2.79s system 277% cpu 4:51.08 total
+;;
+;; Again: take this with a large grain of salt, since this is testing sm-c-mode
+;; in the most favorable light (IOW it's a very strongly biased benchmark).
+;; All this says, is that sm-c-mode's indentation might actually be usable if
+;; you use it on C code that is sufficiently similar to Emacs's.
+
+;;;; FIXME:
+
+;; - We "use but don't use" SMIE.
+;; - CPP directives are treated as comments.  To some extent this is OK, but in
+;;   many other cases it isn't.  See for instance the comment-only-p advice.
+;; - M-q in a comment doesn't do the right thing.
+
+;;; Code:
+
+(require 'cl-lib)
+(require 'smie)
+
+(defgroup sm-c-mode nil
+  "Major mode to edit C code, based on SMIE."
+  :group 'programming)
+
+(defcustom sm-c-indent-basic 2
+  "Basic step of indentation.
+Typically 2 for GNU style and `tab-width' for Linux style."
+  :type 'integer)
+
+(defcustom sm-c-indent-braces t
+  "If nil, braces in if/while/... are aligned with the if/while/...
+Else, they're indented by `sm-c-indent-basic' columns.
+For braces placed at the end of lines (which SMIE calls \"hanging\"), it makes
+no difference."
+  :type 'boolean)
+
+;;; Handling CPP directives.
+
+(defsubst sm-c--cpp-inside-p (ppss)
+  (eq 2 (nth 7 ppss)))
+
+(eval-and-compile
+  (defconst sm-c--cpp-regexp "^[ \t]*\\(\\(#\\)[ \t]*\\([a-z]+\\)\\)"))
+
+(defconst sm-c--cpp-syntax-table
+  (let ((st (make-syntax-table)))
+    (modify-syntax-entry ?/ ". 124" st)
+    (modify-syntax-entry ?* ". 23b" st)
+    (modify-syntax-entry ?\n ">" st)
+    st))
+
+(defun sm-c--cpp-goto-end (ppss &optional limit)
+  (cl-assert (sm-c--cpp-inside-p ppss))
+  (let (found)
+    (while
+        (and (setq found (re-search-forward "\\(?:\\\\\\\\\\)*\n" limit 'move))
+             ;; We could also check (nth 5 ppss) to figure out if we're
+             ;; after a backslash, but this is a very common case, so it's good
+             ;; to avoid calling parse-partial-sexp for that.
+             (or (eq ?\\ (char-before (match-beginning 0)))
+                 (with-syntax-table sm-c--cpp-syntax-table
+                   (nth 4 (parse-partial-sexp (1+ (nth 8 ppss)) (point)))))))
+    found))
+
+(defun sm-c--cpp-fontify-syntactically (ppss)
+  ;; FIXME: ¡¡BIG UGLY HACK!!
+  ;; Copied from font-lock.el's font-lock-fontify-syntactically-region.
+  (cl-assert (> (point) (nth 8 ppss)))
+  (save-excursion
+    (save-restriction
+      (sm-c--cpp-goto-end ppss)
+      (narrow-to-region (1+ (nth 8 ppss)) (point))
+      ;; FIXME: We should add some "with-local-syntax-ppss" macro to
+      ;; encapsulate this.
+      (let ((syntax-propertize-function nil)
+            (syntax-ppss-cache nil)
+            (syntax-ppss-last nil))
+        (font-lock-fontify-syntactically-region (point-min) (point-max))))))
+
+(defun sm-c--cpp-syntax-propertize (end)
+  (let ((ppss (syntax-ppss))
+        found)
+    (when (sm-c--cpp-inside-p ppss)
+      (while
+          (and (setq found (re-search-forward "\\(\\\\\\\\\\)*\n" end 'move))
+               (or (eq ?\\ (char-before (match-beginning 0)))
+                   (with-syntax-table sm-c--cpp-syntax-table
+                     (nth 4 (parse-partial-sexp (1+ (nth 8 ppss)) (point)))))))
+      (when found
+        (put-text-property (1- (point)) (point)
+                           'syntax-table (string-to-syntax "> c"))))))
+
+;;;; Indenting CPP directives.
+
+(defcustom sm-c-indent-cpp-basic 1
+  "Indent step for CPP directives.
+If non-zero, CPP directives are indented according to CPP depth.
+E.g. a #define nested within 2 #ifs will be turned into \"#  define\"."
+  :type 'integer)
+
+(defun sm-c--cpp-prev (tok)
+  (let ((offset nil))
+    (while
+        (when (re-search-backward sm-c--cpp-regexp nil t)
+          (pcase (cons tok (match-string 3))
+            (`(,_ . "endif") (sm-c--cpp-prev "endif"))
+            ((or `(,(or "endif" "else" "elif") . ,(or "if" "ifdef" "ifndef"))
+                 `(,(or "else" "elif") . "elif"))
+             (setq offset 0))
+            (`(,(or "endif" "else" "elif") . ,_) nil)
+            (`(,_ . ,(or "if" "ifdef" "ifndef" "elif" "else"))
+             (setq offset sm-c-indent-cpp-basic))
+            (_ (setq offset 0)))
+          (not offset)))
+    (when offset
+      (goto-char (match-beginning 3))
+      (+ offset (current-column)))))
+
+
+(defun sm-c--cpp-indent-line (&optional _arg)
+  ;; FIXME: Also align the terminating \, if any.
+  (when (> sm-c-indent-cpp-basic 0)
+    (let* ((pos (point-marker))
+           (beg)
+           (indent
+            (save-excursion
+              (forward-line 0)
+              (when (looking-at sm-c--cpp-regexp)
+                (setq beg (match-beginning 3))
+                (or (sm-c--cpp-prev (match-string 3)) 0)))))
+      (when indent
+        (let ((before (<= pos beg)))
+          (goto-char beg)
+          (unless (= (current-column) indent)
+            (skip-chars-backward " \t")
+            (delete-region (point)
+                           (progn (skip-chars-forward " \t") (point)))
+            (indent-to indent))
+          (unless before (goto-char pos)))))))
+
+;;;; Indenting inside CPP #define.
+
+(defconst sm-c--cpp-smie-indent-functions
+  ;; FIXME: Don't just align line after #define with the "d"!
+  (mapcar
+   (lambda (f)
+     (cond
+      ((eq f #'smie-indent-comment-inside) #'sm-c--cpp-indent-comment-inside)
+      ;; ((eq f #'smie-indent-exps) #'sm-c--cpp-indent-exps)
+      (t f)))
+   (default-value 'smie-indent-functions)))
+
+(defun sm-c--cpp-indent-comment-inside ()
+  (let ((ppss (syntax-ppss)))
+    (when (nth 4 ppss)
+      ;; Indicate where's the comment start.
+      `(noindent . ,(nth 8 ppss)))))
+
+(defun sm-c--cpp-smie-indent ()
+  (let ((ppss (syntax-ppss)))
+    (cond
+     ((sm-c--cpp-inside-p ppss)
+      (save-restriction
+        (narrow-to-region (nth 8 ppss) (point-max))
+        (let ((indent
+               (let ((smie-indent-functions sm-c--cpp-smie-indent-functions)
+                     (syntax-ppss-cache nil)
+                     (syntax-ppss-last nil)
+                     (parse-sexp-lookup-properties nil))
+                 (smie-indent-calculate))))
+          (if (not (eq 'noindent (car-safe indent)))
+              (if (integerp indent)
+                  (max (funcall smie-rules-function :elem 'basic) indent)
+                indent)
+            ;; We can't just return `noindent' if we're inside a comment,
+            ;; because the indent.el code would then be similarly confused,
+            ;; thinking the `noindent' is because we're inside the cpp
+            ;; pseudo-comment, and would hence align the code with the content
+            ;; of the psuedo-comment rather than the nested real comment!
+            ;;
+            ;; FIXME: Copy&paste from indent--default-inside-comment.
+            ;; FIXME: This will always re-indent inside these comments, even
+            ;; during indent-region.
+            (save-excursion
+              (forward-line -1)
+              (skip-chars-forward " \t")
+              (when (< (1- (point)) (cdr indent) (line-end-position))
+                (goto-char (cdr indent))
+                (when (looking-at comment-start-skip)
+                  (goto-char (match-end 0))))
+              (current-column))))))
+
+     ((equal (syntax-after (point)) (string-to-syntax "< c")) 0)
+     )))
+
+;;; Syntax table
+
+(defvar sm-c-mode-syntax-table
+  (let ((st (make-syntax-table)))
+    (modify-syntax-entry ?/ ". 124" st)
+    (modify-syntax-entry ?* ". 23b" st)
+    (modify-syntax-entry ?\n ">" st)
+    (modify-syntax-entry ?\" "\"" st)
+    (modify-syntax-entry ?\' "\"" st)
+    (modify-syntax-entry ?= "." st)
+    (modify-syntax-entry ?< "." st)
+    (modify-syntax-entry ?> "." st)
+    st))
+
+(defun sm-c-syntax-propertize (start end)
+  (goto-char start)
+  (sm-c--cpp-syntax-propertize end)
+  (funcall
+   (syntax-propertize-rules
+    (sm-c--cpp-regexp
+     (2 (prog1 "< c"
+          (when (and (equal (match-string 3) "include")
+                     (looking-at "[ \t]*\\(<\\)[^>\n]*\\(>\\)"))
+            (put-text-property (match-beginning 1) (match-end 1)
+                               'syntax-table (string-to-syntax "|"))
+            (put-text-property (match-beginning 2) (match-end 2)
+                               'syntax-table (string-to-syntax "|")))
+          (sm-c--cpp-syntax-propertize end)))))
+   (point) end))
+
+(defun sm-c-syntactic-face-function (ppss)
+  (if (sm-c--cpp-inside-p ppss)
+      (prog1 nil (sm-c--cpp-fontify-syntactically ppss))
+    (funcall (default-value 'font-lock-syntactic-face-function) ppss)))
+
+;;; SMIE support
+
+(defconst sm-c-paren-block-keywords '("if" "while" "for" "switch"))
+
+(defconst sm-c-smie-precedence-table
+  '((assoc ";")
+    ;; Compiled from https://en.wikipedia.org/wiki/Operators_in_C_and_C++.
+    (assoc ",")                         ;1
+    ;; (nonassoc "throw")
+    (nonassoc "=" "+=" "-=" "*=" "/=" "%=" "<<=" ">>=" "&=" "^=" "|=") ;2
+    ;; (nonassoc "?" ":") ;; Better handle it in the BNF.
+    (assoc "||")                        ;3
+    (assoc "&&")                        ;4
+    (assoc "|")                         ;5
+    (assoc "^")                         ;6
+    ;; (assoc "&") ;; Binary and.  Confused with address-of.
+    (nonassoc "==" "!=")                ;7
+    (nonassoc "<" "<=" ">" ">=")        ;8
+    (nonassoc "<<" ">>")                ;9
+    (assoc "+" "-")                     ;10
+    (assoc "/" "* mult" "%")            ;11
+    ;; (nonassoc ".*" "->*")            ;12   ;; Only C++
+    ;; (nonassoc "++" "--" "+" "-" "!" "~" "(type)" "*" "&"
+    ;;          "sizeof" "new" "delete");13  ;; All prefix.
+    (left "." "->") ;; "++" "--" suffixes, "()", "[]", "typeid", "*_cast". ;14
+    ;; (noassoc "::") ;; Only C++
+    ))
+
+(defconst sm-c-smie-grammar
+  ;; `((:smie-closer-alist ("{" . "}")) ("{" (39) 0) ("}" 0 (40)) ("else" 27 
26) ("," 38 38) ("do" (41) 22) ("while" (42) 23) ("for" (43) 24) (";" 11 11) 
("if" (44) 25))
+  (let ((grm
+         (smie-prec2->grammar
+          (smie-merge-prec2s
+           (smie-bnf->prec2
+            '((decls ("typedef" decl) ("extern" decl)
+                     (decls ";" decls))
+              (decl)
+              (id)
+              (insts ("{" insts "}")
+                     (insts ";" insts)
+                     ("return" exp)
+                     ("goto" exp)
+                     (":label")
+                     ("case" subexp ": case")
+                     ("else" exp-if))
+              (exp-if ("if" exp) ("do" exp) ("while" exp) ("switch" exp) 
("for" exp)
+                      (exp))
+              (exp ("(" exp ")") (exp "," exp) (subexp "?" exp ":" exp))
+              (subexp (subexp "||" subexp))
+              ;; Some of the precedence table deals with pre/postfixes, which
+              ;; smie-precs->prec2 can't handle, so handle it here instead.
+              (exp11 (exp12) (exp11 "/" exp11))
+              (exp12 (exp13))           ;C++ only.
+              (exp13 (exp14) ("++ prefix" exp13) ("-- prefix" exp13)
+                     ("!" exp13) ("~" exp13) ("&" exp13) ("* deref" exp13))
+              (exp14 (id) (exp14 "++ postfix") (exp14 "-- postfix")
+                     (exp14 "->" id) (exp14 "." id)))
+            '((assoc ";") (assoc ",") (nonassoc "?" ":"))
+            sm-c-smie-precedence-table)
+           (smie-precs->prec2 sm-c-smie-precedence-table)
+           (smie-precs->prec2 '((nonassoc ";") (nonassoc ":")))))))
+    ;; SMIE gives (":label" 261 262), but really this could just as well be
+    ;; (":label" nil nil) because labels don't have any argument to their left
+    ;; or right.  They're like both openers and closers at the same time.
+    (mapcar (lambda (x)
+              (if (equal (car-safe x) ":label")
+                  ;; Rather than (":label" (n1) (n2)) we use
+                  ;; (":label" (n1) n2) because SMIE otherwise complains:
+                  ;; cl--assertion-failed((numberp (funcall op-forw 
toklevels)))
+                  ;; in smie-next-sexp.
+                  `(,(nth 0 x) (,(nth 1 x)) ,(nth 2 x)) x))
+            grm)))
+
+;; (defun sm-c--:-discriminate ()
+;;   (save-excursion
+;;     (and (null (smie-backward-sexp))
+;;          (let ((prev (smie-indent-backward-token)))
+;;            (cond
+;;             ((equal prev "case" ) ": case")
+;;             ((member prev '(";" "{" "}")) ":-label")
+;;             (t ":"))))))
+
+(defconst sm-c-smie-operator-regexp
+  (let ((ops '()))
+    (pcase-dolist (`(,token . ,_) sm-c-smie-grammar)
+      (when (and (stringp token) (string-match "\\`[^ [:alnum:](){}]+" token))
+        (push (match-string 0 token) ops)))
+    (regexp-opt ops)))
+
+(defun sm-c-smie-forward-token ()
+  (forward-comment (point-max))
+  (let ((tok (if (looking-at sm-c-smie-operator-regexp)
+                 (progn (goto-char (match-end 0)) (match-string 0))
+               (smie-default-forward-token))))
+    (cond
+     ((and (equal tok "") (looking-at "\\\\\n"))
+      (goto-char (match-end 0))
+      (sm-c-smie-forward-token))
+     ((member tok '(":" "*"))
+      (save-excursion (sm-c-smie-backward-token)))
+     ((looking-at "[ \t]*:")
+      (if (not (equal (save-excursion (sm-c-smie-forward-token)) ":label"))
+          tok
+        (looking-at "[ \t]*:")
+        (goto-char (match-end 0)) ":label"))
+     (t tok))))
+
+
+(defun sm-c-smie-backward-token ()
+  (forward-comment (- (point)))
+  (let ((tok (if (looking-back sm-c-smie-operator-regexp (- (point) 3) t)
+                 (progn (goto-char (match-beginning 0)) (match-string 0))
+               (smie-default-backward-token))))
+    (cond
+     ((and (equal tok "") (looking-at "\n"))
+      (let ((pos (point)))
+        (if (not (= 0 (mod (skip-chars-backward "\\\\") 2)))
+            (sm-c-smie-backward-token)
+          (goto-char pos)
+          tok)))
+     ((equal tok "*") (sm-c-smie--*-token))
+     ((equal tok ":")
+      (let ((pos1 (point))
+            (prev (sm-c-smie-backward-token)))
+        (if (zerop (length prev))
+            (progn (goto-char pos1) tok)
+          (let ((pos2 (point)))
+            (pcase (car (smie-indent-backward-token))
+              ("case" (goto-char pos1) ": case")
+              ((or ";" "{" "}") (goto-char pos2) ":label")
+              (_ (goto-char pos1) tok))))))
+     (t tok))))
+
+(defun sm-c--prev-token ()
+  (car (smie-indent-backward-token)))
+
+(defun sm-c--else-to-if ()
+  (let ((pos (point)))
+    (unless (equal (sm-c--prev-token) ";")
+      (goto-char pos))
+    (while
+        (pcase (smie-backward-sexp)
+          (`(,_ ,pos "if") (goto-char pos) nil) ;Found it!
+          (`(,_ ,_ ";") nil)                    ;Can't find it!
+          (`(,_ ,pos "else") (goto-char pos) (sm-c--else-to-if) t)
+          (`(,_ ,pos "while")
+           (goto-char pos) (unless (sm-c--while-to-do) (goto-char pos)) t)
+          (`(t . ,_) nil)               ;Can't find it!
+          (`(,_ ,pos . ,_) (goto-char pos) t)
+          (`nil t)))))
+
+(defun sm-c--while-to-do ()
+  "Jump to the matching `do' and return non-nil, if any.  Return nil 
otherwise."
+  (pcase (sm-c--prev-token)
+    ("}"
+     ;; The easy case!
+     (forward-char 1) (backward-sexp 1)
+     (equal (sm-c--prev-token) "do"))
+    (";"
+     (let ((found-do nil))
+       (while
+           (pcase (smie-backward-sexp)
+             (`(,_ ,pos "do") (goto-char pos) (setq found-do t) nil)
+             (`(,_ ,_ ";") nil)         ;Can't find it!
+             (`(,_ ,pos "else") (goto-char pos) (sm-c--else-to-if) t)
+             (`(,_ ,pos "while")
+              (goto-char pos) (unless (sm-c--while-to-do) (goto-char pos)) t)
+             (`(t . ,_) nil)            ;Can't find it!
+             (`(,_ ,pos . ,_) (goto-char pos) t)
+             (`nil (or (not (looking-at "{"))
+                       (smie-rule-prev-p "=")))))
+       found-do))))
+
+(defun sm-c--skip-labels (max)
+  (while
+      (let ((start (point)))
+        (pcase (sm-c-smie-forward-token)
+          ("case"
+           (smie-forward-sexp "case")
+           (forward-comment (point-max))
+           (if (>= (point) max) (progn (goto-char start) nil)
+             t))
+          (":label"
+           (forward-comment (point-max))
+           (if (>= (point) max) (progn (goto-char start) nil)
+             t))
+          (_ (goto-char start) nil)))))
+
+(defun sm-c--boi (&optional inner)
+  "Jump to the beginning-of-instruction.
+By default for things like nested ifs, it jumps to the outer if, but
+if INNER is non-nil, it stops at the innermost one."
+  (while
+      (let ((pos (point)))
+        (pcase (smie-backward-sexp)
+          (`(,_ ,_ ";") nil)            ;Found it!
+          (`(,_ ,pos "else") (goto-char pos) (sm-c--else-to-if) t)
+          (`(,_ ,pos "while")
+           (goto-char pos) (unless (sm-c--while-to-do) (goto-char pos)) t)
+          (`(,(pred numberp) ,pos . ,_) (goto-char pos) t)
+          ((or `nil `(nil . ,_))
+           (if (and (or (not (looking-at "{"))
+                        (smie-rule-prev-p "="))
+                    (not (bobp)))
+               t
+             (goto-char pos) nil))
+          (`(,_ ,_ ,(or "(" "{" "[")) nil) ;Found it!
+          (`(,_ ,pos ,(and tok
+                           (guard (when inner
+                                    (or (member tok sm-c-paren-block-keywords)
+                                        (equal tok "do"))))))
+           (goto-char pos) nil) ;Found it!
+          (`(t ,(pred (eq (point-min))) . ,_) nil)
+          (`(,_ ,pos . ,_) (goto-char pos) t)))))
+
+;; (defun sm-c--if-tail-to-head ()
+;;   (pcase (sm-c--prev-token)
+;;     (")"
+;;      (forward-char 1) (backward-sexp 1)
+;;      (pcase (sm-c--prev-token)
+;;        ("if" nil)
+;;        ((or "while" "for") (sm-c--if-tail-to-head))))
+;;     ("do" (sm-c--if-tail-to-head))))
+
+(defun sm-c--boe (tok)
+  (let ((start (point))
+        (res (smie-backward-sexp tok)))
+    (when (member (nth 2 res) '("if" "while" "do" "for" "else"))
+      (when (member (nth 2 res) '("if" "for"))
+        (let ((forward-sexp-function nil))
+          (forward-sexp 1))
+        (forward-comment (point-max)))
+      (when (looking-at "{")
+        (let ((forward-sexp-function nil))
+          (forward-sexp 1))
+        (forward-comment (point-max)))
+      (if (> (point) start) (goto-char start)))))
+
+(defun sm-c-smie--*-token ()
+  (save-excursion
+    (let ((pos (point)))
+      (pcase (car (smie-indent-backward-token))
+        (")"
+         ;; Can be a multiplication (as in "(a+b)*c"), or a deref
+         ;; (as in "if (stop) *a = 0;")
+         (if (and (goto-char (nth 1 (syntax-ppss)))
+                  (eq ?\( (char-after))
+                  (member (smie-default-backward-token) '("if" "for")))
+             "* deref"
+           "* mult"))
+        ("]" "* mult")                         ;Multiplication.
+        ((or "(" "[" "{" "}") "* deref")
+        (`nil
+         (goto-char pos)
+         (let ((res nil))
+           (while (not (or res (bobp)))
+             (pcase (smie-backward-sexp)
+               (`(,_ ,_ ,(or ";" "{")) (setq res "* deref"))
+               ((and `nil (guard (looking-at "{"))) (setq res "* deref"))
+               (`(,left ,_ ,op)
+                (if (and (numberp left)
+                         (numberp (nth 2 (assoc op smie-grammar)))
+                         (< (nth 2 (assoc op smie-grammar))
+                            (nth 1 (assoc "* mult" smie-grammar))))
+                    (smie-backward-sexp 'halfsexp)
+                  (setq res "* mult")))))
+           (or res "* mult")))
+        (_ "* mult")))))
+
+(defun sm-c-smie-hanging-eolp ()
+  (let ((start (point))
+        (prev (smie-indent-backward-token)))
+    (if (and (not (numberp (nth 1 prev)))
+             (save-excursion (equal (sm-c-smie-backward-token) ";")))
+        ;; Treat instructions that start after ";" as always "hanging".
+        (end-of-line)
+      (goto-char start)))
+  (skip-chars-forward " \t")
+  (or (eolp)
+      (forward-comment (point-max))
+      (and (looking-at "\\\\\n")
+           (goto-char (match-end 0)))))
+
+(defvar sm-c-smie--inhibit-case/label-rule nil)
+
+(defun sm-c--smie-virtual ()
+  (if (and (smie-indent--bolp)
+           (not (save-excursion
+                  (member (sm-c-smie-forward-token)
+                          '("case" ":label")))))
+      (current-column)
+    (let ((sm-c-smie--inhibit-case/label-rule t))
+      (smie-indent-calculate))))
+
+(defun sm-c-smie-rules (kind token)
+  (pcase (cons kind token)
+    (`(:elem . basic) sm-c-indent-basic)
+    (`(:list-intro . ";")
+     (save-excursion
+       (forward-char 1)
+       (if (and (null (smie-forward-sexp))
+                ;; FIXME: Handle \\\n as well!
+                (progn (forward-comment (point-max))
+                       (looking-at "(")))
+           nil
+         t)))
+    (`(:before . "else")
+     (save-excursion
+       (sm-c--else-to-if)
+       `(column . ,(smie-indent-virtual))))
+    (`(:before . "while")
+     (save-excursion
+       (when (sm-c--while-to-do)
+         `(column . ,(smie-indent-virtual)))))
+    (`(:before . ,(or "=" "+=" "-=" "*=" "/=" "%=" "<<=" ">>=" "&=" "^=" "|="))
+     (save-excursion
+       (sm-c--boe token)
+       `(column . ,(+ (funcall smie-rules-function :elem 'basic)
+                      (smie-indent-virtual)))))
+    (`(:before . "if")
+     (when (and (not (smie-rule-bolp)) (smie-rule-prev-p "else"))
+       (save-excursion
+         (smie-indent-backward-token)
+         `(column . ,(sm-c--smie-virtual)))))
+    ;; (`(:after . ,(or "=" "+=" "-=" "*=" "/=" "%=" "<<=" ">>=" "&=" "^=" 
"|="))
+    ;;  (funcall smie-rules-function :elem 'basic))
+    (`(:before . "{")
+     (cond
+      ((smie-rule-prev-p "=") nil)      ;Not a block of instructions!
+      ((save-excursion
+         (let ((pos (point)))
+           (sm-c--boi 'inner) (sm-c--skip-labels (point-max))
+           (let ((tok (save-excursion (sm-c-smie-forward-token))))
+             (cond
+              ((or (equal tok "typedef")
+                   (and (member tok '("enum" "struct"))
+                        ;; Make sure that the {...} is about this struct/enum,
+                        ;; as opposed to "struct foo *get_foo () {...}"!
+                        (save-excursion
+                          (smie-indent-forward-token)
+                          (smie-indent-forward-token)
+                          (forward-comment (point-max))
+                          (>= (point) pos))))
+               `(column . ,(+ (if (save-excursion
+                                    (goto-char pos)
+                                    (smie-rule-hanging-p))
+                                  0
+                                (funcall smie-rules-function :elem 'basic))
+                              (smie-indent-virtual))))
+              ((and (member tok '("enum" "struct"))
+                    ;; Make sure that the {...} is about this struct/enum, as
+                    ;; opposed to "struct foo *get_foo () {...}"!
+                    (save-excursion
+                      (smie-indent-forward-token)
+                      (smie-indent-forward-token)
+                      (forward-comment (point-max))
+                      (>= (point) pos)))
+               `(column . ,(+ (funcall smie-rules-function :elem 'basic)
+                              (smie-indent-virtual))))
+              ((or (member tok sm-c-paren-block-keywords)
+                   (equal tok "do"))
+               nil)
+              ((save-excursion
+                 (goto-char pos)
+                 (when (and (> (car (syntax-ppss)) 0)
+                            (equal ")" (car (smie-indent-backward-token))))
+                   (up-list -1)
+                   `(column . ,(sm-c--smie-virtual)))))
+              (t `(column . ,(smie-indent-virtual))))))))
+      ((smie-rule-hanging-p)
+       (cond
+        ((smie-rule-prev-p "do" "else")
+         (smie-indent-backward-token))
+        ((smie-rule-prev-p ")")
+         (smie-backward-sexp)
+         (smie-indent-backward-token))
+        (t (sm-c--boi 'inner)))
+       `(column . ,(sm-c--smie-virtual)))
+      (t
+       (let ((pos (point)))
+         (pcase (sm-c--prev-token)
+           ((or "do" "else")
+            (cond
+             (sm-c-indent-braces
+              `(column . ,(+ (funcall smie-rules-function :elem 'basic)
+                             (smie-indent-virtual))))))
+           (")" nil)
+           (_ (goto-char pos) (sm-c--boi)
+              (if (< (point) pos)
+                  `(column . ,(sm-c--smie-virtual)))))))))
+    (`(:before . "(")
+     (save-excursion
+       (let ((res (smie-backward-sexp)))
+         (pcase res
+           (`nil
+            (if (looking-at "(")
+                ;; (unless (save-excursion
+                ;;           (member (sm-c-smie-backward-token)
+                ;;                   sm-c-paren-block-keywords))
+                ;;   `(column . ,(sm-c--smie-virtual)))
+                nil
+              `(column . ,(+ (funcall smie-rules-function :elem 'basic)
+                             (sm-c--smie-virtual)))))))))
+    (`(:after . "else")
+     (save-excursion
+       (funcall smie-rules-function :elem 'basic)))
+    (`(:after . ")")
+     (save-excursion
+       (let ((_ (progn (forward-char 1) (backward-sexp 1)))
+             (pos (point))
+             (prev (sm-c-smie-backward-token)))
+         (cond
+          ((member prev sm-c-paren-block-keywords)
+           `(column . ,(+ (funcall smie-rules-function :elem 'basic)
+                          (smie-indent-virtual))))
+          ((and (looking-at "[[:alnum:]_]+(")
+                (save-excursion
+                  (forward-line 0)
+                  (and (bobp) (looking-at sm-c--cpp-regexp))))
+           ;; Will be bumped up presumably by the "max" in
+           ;; sm-c--cpp-smie-indent.
+           `(column . 0))
+          (t (goto-char pos) `(column . ,(sm-c--smie-virtual)))))))
+    (`(:after . "}")
+     (save-excursion
+       (forward-char 1) (backward-sexp 1)
+       (sm-c--boi)
+       `(column . ,(sm-c--smie-virtual))))
+    (`(:after . ";")
+     (save-excursion
+       (sm-c--boi)
+       `(column . ,(sm-c--smie-virtual))))
+    (`(:after . ":label")
+     ;; Yuck!
+     `(column . ,(sm-c--smie-virtual)))
+    (`(:after . ": case")
+     ;; Yuck!
+     (save-excursion
+       (smie-backward-sexp ": case")
+       `(column . ,(sm-c--smie-virtual))))
+    (`(:after . "* deref") `(column . ,(sm-c--smie-virtual)))
+    ((and `(:before . ":label") (guard (not 
sm-c-smie--inhibit-case/label-rule)))
+     (let ((ppss (syntax-ppss)))
+       (when (nth 1 ppss)
+         (save-excursion
+           (goto-char (nth 1 ppss))
+           `(column . ,(smie-indent-virtual))))))
+    ((and `(:before . "case") (guard (not sm-c-smie--inhibit-case/label-rule)))
+     (catch 'found
+       (dolist (pos (reverse (nth 9 (syntax-ppss))))
+         (save-excursion
+           (goto-char pos)
+           (and (looking-at "{")
+                (null (car-safe (smie-backward-sexp)))
+                (equal "switch" (sm-c-smie-backward-token))
+                (goto-char pos)
+                (throw 'found `(column . ,(smie-indent-virtual))))))))))
+
+;;; Backslash alignment
+
+(defvar-local sm-c--bs-changed nil)
+
+(defun sm-c--bs-after-change (beg end _len)
+  (unless undo-in-progress
+    (if (null sm-c--bs-changed)
+        (setq sm-c--bs-changed (cons beg end))
+      (cl-callf (lambda (x) (min x beg)) (car sm-c--bs-changed))
+      (cl-callf (lambda (x) (max x end)) (cdr sm-c--bs-changed)))))
+
+(defun sm-c--bs-realign ()
+  (when sm-c--bs-changed
+    (sm-c--bs-realign-1 (car sm-c--bs-changed) (cdr sm-c--bs-changed))
+    (setq sm-c--bs-changed nil)))
+
+(defun sm-c--bs-realign-1 (from to)
+  (save-excursion
+    (goto-char from)
+    (end-of-line)
+    (unless (zerop (mod (skip-chars-backward "\\\\") 2))
+      (skip-chars-backward " \t")
+      (setq from (point))
+      (let ((col (current-column))
+            start end)
+        (while
+            (progn (setq start (point))
+                   (end-of-line 0)
+                   (and (< (point) start)
+                        (not (zerop (mod (skip-chars-backward "\\\\") 2)))))
+          (skip-chars-backward " \t")
+          (setq col (max (current-column) col)))
+        (goto-char from)
+        (while
+            (progn (setq end (point))
+                   (end-of-line 2)
+                   (and (> (line-beginning-position) end)
+                        (not (zerop (mod (skip-chars-backward "\\\\") 2)))))
+          (skip-chars-backward " \t")
+          (setq col (max (current-column) col)))
+        (goto-char to)
+        (beginning-of-line)
+        (unless (or (> (point) end)       ;Don't realign if we changed outside!
+                    (<= end start))        ;A lone \
+          
+          (setq col (1+ col))         ;Add a space before the backslashes.
+          (goto-char end)
+          (end-of-line)
+          (while (>= (point) start)
+            (cl-assert (eq (char-before) ?\\))
+            (forward-char -1)
+            (let ((curcol (current-column)))
+              (cond
+               ((> col curcol) (indent-to col))
+               ((< col curcol)
+                (move-to-column col t)
+                (delete-region (point)
+                               (progn (skip-chars-forward " \t") (point))))))
+            (end-of-line 0)))))))
+            
+;;; Font-lock support
+
+(defconst sm-c--comment-regexp
+  "/\\(?:/.*\n\\|\\*\\(?:[^*]+\\(?:\\*+[^/*]\\)*\\)*\\*/\\)")
+
+(defconst sm-c--defun-regexp
+  (let* ((spc0 (concat "\\(?:\n?[ \t]\\|" sm-c--comment-regexp "\\)*"))
+         (spc1 (concat "\n?[ \t]" spc0))
+         (id "\\(?:\\sw\\|\\s_\\)+"))
+    (cl-flet ((repeat (repetition &rest res)
+                      (concat "\\(?:" (apply #'concat res) "\\)"
+                              (pcase repetition
+                                ((pred symbolp) (symbol-name repetition))
+                                (1 "")))))
+      (concat
+       "^\\(?:"
+       (repeat '* "\\*" spc0)
+       (repeat '* id (repeat 1 spc1 "\\|" spc0 "\\*" spc0))
+       "\\(" id "\\)[ \t\n]*("
+       "\\|"
+       "[ \t]*#[ \t]*define[ \t]+\\(?1:" id "\\)("
+       "\\)"))))
+
+(defconst sm-c-font-lock-keywords
+  `((,sm-c--cpp-regexp (1 font-lock-preprocessor-face))
+    ("\\_<\\(?:true\\|false\\)\\_>" (0 font-lock-constant-face))
+    ("\\_<\\(case\\)\\_>[ \t]*\\([^: \t]+\\)"
+     (1 font-lock-keyword-face)
+     (2 font-lock-constant-face))
+    ("\\(?:[{};]\\(\\)\\|^\\)[ \t]*\\([[:alpha:]_][[:alnum:]_]*\\)[ \t]*:"
+     (2 (if (or (match-beginning 1)
+                (save-excursion (equal ":label" (sm-c-smie-backward-token))))
+            font-lock-constant-face)))
+    (,(let ((kws (delq nil (mapcar (lambda (x)
+                                     (setq x (car x))
+                                     (and (stringp x)
+                                          (string-match "\\`[a-z]" x)
+                                          x))
+                                   sm-c-smie-grammar))))
+        (concat "\\_<" (regexp-opt
+                        (append
+                         ;; Elements not in SMIE's grammar.  Either because
+                         ;; they're uninteresting from a parsing point of view,
+                         ;; or because SMIE's parsing engine can't handle them
+                         ;; even poorly.
+                         '("break" "continue" "struct" "enum" "union" "static")
+                         ;; "case" already handled above.
+                         (delete "case" kws)))
+                "\\_>"))
+     (0 font-lock-keyword-face))
+    (,sm-c--defun-regexp
+     (1
+      (prog1 font-lock-function-name-face
+        (if (< (match-beginning 0) (line-beginning-position))
+            (put-text-property (match-beginning 0) (match-end 0)
+                               'font-lock-multiline t)))))))
+
+(defconst sm-c--def-regexp
+  (let ((spc0 (concat "\\(?:[ \t\n]\\|" sm-c--comment-regexp "\\)*"))
+        (id "\\(?:\\sw\\|\\s_\\)+"))
+    (concat sm-c--defun-regexp
+            "\\|"
+            "\\_<\\(?1:\\(?:struct\\|enum\\)[ \t]+" id "\\)" spc0 "{")))
+
+;;;###autoload
+(define-derived-mode sm-c-mode prog-mode "smC"
+  "C editing mode based on SMIE."
+  ;; (setq-local font-lock-support-mode nil) ;; To help debugging.
+  (setq-local comment-start "/* ")
+  (setq-local comment-end " */")
+  (setq-local parse-sexp-lookup-properties t)
+  (setq-local open-paren-in-column-0-is-defun-start nil)
+  (setq-local syntax-propertize-function #'sm-c-syntax-propertize)
+  (setq-local font-lock-defaults '(sm-c-font-lock-keywords))
+  (setq-local font-lock-syntactic-face-function #'sm-c-syntactic-face-function)
+  (smie-setup sm-c-smie-grammar #'sm-c-smie-rules
+              :backward-token #'sm-c-smie-backward-token
+              :forward-token #'sm-c-smie-forward-token)
+  ;; FIXME: The stock SMIE forward-sexp-function is not good enough here, since
+  ;; our grammar is much too poor.  We should setup another function instead
+  ;; (or ideally teach SMIE to use it).
+  (kill-local-variable 'forward-sexp-function)
+  (add-hook 'smie-indent-functions #'sm-c--cpp-smie-indent nil t)
+  (add-function :after (local 'indent-line-function)
+                #'sm-c--cpp-indent-line)
+  (setq-local smie--hanging-eolp-function #'sm-c-smie-hanging-eolp)
+  ;; Backslash auto-realign.
+  (add-hook 'after-change-functions #'sm-c--bs-after-change nil t)
+  (add-hook 'post-command-hook #'sm-c--bs-realign nil t)
+  (setq-local add-log-current-defun-header-regexp sm-c--def-regexp)
+  (setq-local imenu-generic-expression `((nil ,sm-c--def-regexp 1))))
+
+(defun sm-c--cpp-is-not-really-a-comment (&rest args)
+  ;; Without this, placing the region around a CPP directive and hitting
+  ;; M-; would just strip the leading "#" instead of commenting things out.
+  (if (not (derived-mode-p 'sm-c-mode))
+      (apply args)
+    (let ((parse-sexp-lookup-properties nil))
+      (apply args))))
+
+;; FIXME: Maybe we should change newcomment.el instead; or maybe CPP directives
+;; should not be defined as comments, or at least "not always"!
+(advice-add 'comment-only-p :around #'sm-c--cpp-is-not-really-a-comment)
+
+(provide 'sm-c-mode)
+;;; sm-c-mode.el ends here
diff --git a/packages/spinner/spinner.el b/packages/spinner/spinner.el
index 12fafe6..63ead1e 100644
--- a/packages/spinner/spinner.el
+++ b/packages/spinner/spinner.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
 ;; Author: Artur Malabarba <address@hidden>
-;; Version: 1.4
+;; Version: 1.7
 ;; URL: https://github.com/Malabarba/spinner.el
 ;; Keywords: processes mode-line
 
@@ -123,6 +123,18 @@
 Each car is a symbol identifying the spinner, and each cdr is a
 vector, the spinner itself.")
 
+(defun spinner-make-progress-bar (width &optional char)
+  "Return a vector of strings of the given WIDTH.
+The vector is a valid spinner type and is similar to the
+`progress-bar' spinner, except without the sorrounding brackets.
+CHAR is the character to use for the moving bar (defaults to =)."
+  (let ((whole-string (concat (make-string (1- width) ?\s)
+                              (make-string 4 (or char ?=))
+                              (make-string width ?\s))))
+    (thread-last (mapcar (lambda (n) (substring whole-string n (+ n width)))
+                         (number-sequence (+ width 3) 0 -1))
+      (apply #'vector))))
+
 (defvar spinner-current nil
   "Spinner curently being displayed on the `mode-line-process'.")
 (make-variable-buffer-local 'spinner-current)
@@ -243,8 +255,8 @@ stop the SPINNER's timer."
 
     (unless (ignore-errors (> (spinner--fps spinner) 0))
       (error "A spinner's FPS must be a positive number"))
-    (setf (spinner--counter spinner) (- (* (or (spinner--delay spinner) 0)
-                                    (spinner--fps spinner))))
+    (setf (spinner--counter spinner) (round (- (* (or (spinner--delay spinner) 
0)
+                                           (spinner--fps spinner)))))
     ;; Create timer.
     (let* ((repeat (/ 1.0 (spinner--fps spinner)))
            (time (timer-next-integral-multiple-of-time (current-time) repeat))
@@ -307,12 +319,16 @@ this time, in which case it won't display at all."
   (spinner-print spinner))
 
 (defun spinner-stop (&optional spinner)
-  "Stop the current buffer's spinner."
-  (let* ((spinner (or spinner spinner-current))
-         (timer (spinner--timer spinner)))
-    (when (timerp timer)
-      (cancel-timer timer))
-    (setf (spinner--active-p spinner) nil)))
+  "Stop SPINNER, defaulting to the current buffer's spinner.
+It is always safe to call this function, even if there is no
+active spinner."
+  (let ((spinner (or spinner spinner-current)))
+    (when (spinner-p spinner)
+      (let ((timer (spinner--timer spinner)))
+        (when (timerp timer)
+          (cancel-timer timer)))
+      (setf (spinner--active-p spinner) nil)
+      (force-mode-line-update))))
 
 (provide 'spinner)
 
diff --git a/packages/stream/stream.el b/packages/stream/stream.el
index 17ef877..567a9e3 100644
--- a/packages/stream/stream.el
+++ b/packages/stream/stream.el
@@ -4,7 +4,7 @@
 
 ;; Author: Nicolas Petton <address@hidden>
 ;; Keywords: stream, laziness, sequences
-;; Version: 2.0.1
+;; Version: 2.1.0
 ;; Package-Requires: ((emacs "25"))
 ;; Package: stream
 
@@ -62,7 +62,7 @@
 
 (defmacro stream-make (&rest body)
   "Return a stream built from BODY.
-BODY must return nil or a cons cell, which cdr is itself a
+BODY must return nil or a cons cell whose cdr is itself a
 stream."
   (declare (debug t))
   `(list ',stream--identifier (thunk-delay ,@body)))
@@ -98,7 +98,7 @@ SEQ can be a list, vector or string."
 
 (cl-defmethod stream ((buffer buffer) &optional pos)
   "Return a stream of the characters of the buffer BUFFER.
-BUFFER-OR-NAME may be a buffer or a string (buffer name).
+BUFFER may be a buffer or a string (buffer name).
 The sequence starts at POS if non-nil, 1 otherwise."
   (with-current-buffer buffer
     (unless pos (setq pos (point-min)))
@@ -113,6 +113,25 @@ The sequence starts at POS if non-nil, 1 otherwise."
            (char-after (point)))))
      (stream buffer (1+ pos)))))
 
+(declare-function iter-next "generator")
+
+(defun stream-from-iterator (iterator)
+  "Return a stream generating new elements through ITERATOR.
+ITERATOR is an iterator object in terms of the \"generator\"
+package."
+  (stream-make
+   (condition-case nil
+       (cons (iter-next iterator) (stream-from-iterator iterator))
+     (iter-end-of-sequence nil))))
+
+(defun stream-regexp (buffer regexp)
+  (stream-make
+   (let (match)
+     (with-current-buffer buffer
+       (setq match (re-search-forward regexp nil t)))
+     (when match
+       (cons (match-data) (stream-regexp buffer regexp))))))
+
 (defun stream-range (&optional start end step)
   "Return a stream of the integers from START to END, stepping by STEP.
 If START is nil, it defaults to 0. If STEP is nil, it defaults to
@@ -148,19 +167,42 @@ range is infinite."
   "Return a stream of all but the first element of STREAM."
   (or (cdr (thunk-force (cadr stream)))
       (stream-empty)))
+
+(defun stream-append (&rest streams)
+  "Concatenate the STREAMS.
+Requesting elements from the resulting stream will request the
+elements in the STREAMS in order."
+  (if (null streams)
+      (stream-empty)
+    (stream-make
+     (let ((first (pop streams)))
+       (while (and (stream-empty-p first) streams)
+         (setq first (pop streams)))
+       (if (stream-empty-p first)
+           nil
+         (cons (stream-first first)
+               (if streams (apply #'stream-append (stream-rest first) streams)
+                 (stream-rest first))))))))
+
+(defmacro stream-pop (stream)
+  "Return the first element of STREAM and set the value of STREAM to its rest."
+  (unless (symbolp stream)
+    (error "STREAM must be a symbol"))
+  `(prog1
+       (stream-first ,stream)
+     (setq ,stream (stream-rest ,stream))))
 
 
 ;;; cl-generic support for streams
 
-(defvar stream--generalizer
-  (cl-generic-make-generalizer
-   11
-   (lambda (name)
-     `(when (streamp ,name)
-        'stream))
-   (lambda (tag)
-     (when (eq tag 'stream)
-       '(stream)))))
+(cl-generic-define-generalizer stream--generalizer
+  11
+  (lambda (name)
+    `(when (streamp ,name)
+       'stream))
+  (lambda (tag)
+    (when (eq tag 'stream)
+      '(stream))))
 
 (cl-defmethod cl-generic-generalizers ((_specializer (eql stream)))
   "Support for `stream' specializers."
@@ -169,7 +211,7 @@ range is infinite."
 
 ;;; Implementation of seq.el generic functions
 
-(cl-defmethod seq-p ((_stream stream))
+(cl-defmethod seqp ((_stream stream))
   t)
 
 (cl-defmethod seq-elt ((stream stream) n)
@@ -192,7 +234,7 @@ This function will eagerly consume the entire stream."
   (seq-take (seq-drop stream start) (- end start)))
 
 (cl-defmethod seq-into-sequence ((stream stream))
-  "Convert STREAM into a sequence"
+  "Convert STREAM into a sequence."
   (let ((list))
     (seq-doseq (elt stream)
       (push elt list))
@@ -245,19 +287,19 @@ This function will eagerly consume the entire stream."
            (stream-rest stream)))))
 
 (cl-defmethod seq-map (function (stream stream))
-  "Return a stream.
-The elements of the produced sequence consist of the application
-of FUNCTION to each element of STREAM."
-  (if (stream-empty-p stream)
-      stream
-    (stream-cons
-      (funcall function (stream-first stream))
-     (seq-map function (stream-rest stream)))))
+    "Return a stream representing the mapping of FUNCTION over STREAM.
+The elements of the produced stream are the results of the
+applications of FUNCTION on each element of STREAM in succession."
+  (stream-make
+   (when (not (stream-empty-p stream))
+     (cons (funcall function (stream-first stream))
+           (seq-map function (stream-rest stream))))))
 
 (cl-defmethod seq-do (function (stream stream))
   "Evaluate FUNCTION for each element of STREAM eagerly, and return nil.
 
-`seq-do' should never be used on infinite streams."
+`seq-do' should never be used on infinite streams without some
+kind of nonlocal exit."
   (while (not (stream-empty-p stream))
     (funcall function (stream-first stream))
     (setq stream (stream-rest stream))))
diff --git a/packages/stream/tests/stream-tests.el 
b/packages/stream/tests/stream-tests.el
index a7cb727..88edf91 100644
--- a/packages/stream/tests/stream-tests.el
+++ b/packages/stream/tests/stream-tests.el
@@ -26,6 +26,7 @@
 
 (require 'ert)
 (require 'stream)
+(require 'cl-lib)
 
 (defun stream-to-list (stream)
   "Eagerly traverse STREAM and return a list of its elements."
@@ -51,8 +52,37 @@
   (should (= 4 (stream-first (stream-rest (stream-range 3)))))
   (should (= 5 (stream-first (stream-rest (stream-rest (stream-range 3)))))))
 
-(ert-deftest stream-seq-p-test ()
-  (should (seq-p (stream-range))))
+(ert-deftest stream-from-iterator-test ()
+  (skip-unless (require 'generator nil t))
+  (should (equal '(1 2)
+                 (seq-into-sequence
+                  (stream-from-iterator
+                   (funcall (iter-lambda ()
+                              (iter-yield 1)
+                              (iter-yield 2))))))))
+
+(ert-deftest stream-append-test ()
+  (should (stream-empty-p (stream-append)))
+  (should (let ((list '(1 2)))
+            (equal list (seq-into-sequence (stream-append (stream list))))))
+  (should (= (seq-elt (stream-append
+                       (stream (list 0 1))
+                       (stream-range 2))
+                      4)
+             4))
+  (should (let ((stream (stream (list 0))))
+            (and (= (seq-elt (stream-append stream (stream-range 1)) 10)
+                    10)
+                 (stream-empty-p (stream-rest stream)))))
+  (should (equal (seq-into-sequence
+                  (stream-append
+                   (stream '(1))
+                   (stream '())
+                   (stream '(2 3))))
+                 '(1 2 3))))
+
+(ert-deftest stream-seqp-test ()
+  (should (seqp (stream-range))))
 
 (ert-deftest stream-seq-elt-test ()
   (should (null (seq-elt (stream-empty) 0)))
@@ -108,18 +138,18 @@
 (ert-deftest stream-seq-take-while-test ()
   (let ((stream (stream '(1 3 2 5))))
     (should (stream-empty-p (seq-take-while #'identity (stream-empty))))
-    (should (streamp (seq-take-while #'oddp stream)))
-    (should (= 1 (stream-first (seq-take-while #'oddp stream))))
-    (should (= 3 (stream-first (stream-rest (seq-take-while #'oddp stream)))))
-    (should (stream-empty-p (stream-rest (stream-rest (seq-take-while #'oddp 
stream)))))))
+    (should (streamp (seq-take-while #'cl-oddp stream)))
+    (should (= 1 (stream-first (seq-take-while #'cl-oddp stream))))
+    (should (= 3 (stream-first (stream-rest (seq-take-while #'cl-oddp 
stream)))))
+    (should (stream-empty-p (stream-rest (stream-rest (seq-take-while 
#'cl-oddp stream)))))))
 
 (ert-deftest stream-seq-drop-while-test ()
   (let ((stream (stream '(1 3 2 5))))
-    (should (streamp (seq-drop-while #'evenp stream)))
+    (should (streamp (seq-drop-while #'cl-evenp stream)))
     (should (stream-empty-p (seq-drop-while #'identity (stream-empty))))
-    (should (= 2 (stream-first (seq-drop-while #'evenp stream))))
-    (should (= 5 (stream-first (stream-rest (seq-drop-while #'evenp stream)))))
-    (should (stream-empty-p (stream-rest (stream-rest (seq-drop-while #'evenp 
stream)))))))
+    (should (= 2 (stream-first (seq-drop-while #'cl-evenp stream))))
+    (should (= 5 (stream-first (stream-rest (seq-drop-while #'cl-evenp 
stream)))))
+    (should (stream-empty-p (stream-rest (stream-rest (seq-drop-while 
#'cl-evenp stream)))))))
 
 (ert-deftest stream-seq-map-test ()
   (should (stream-empty-p (seq-map #'- (stream-empty))))
@@ -135,11 +165,11 @@
     (should (equal result '(4 3 2 1 0)))))
 
 (ert-deftest stream-seq-filter-test ()
-  (should (stream-empty-p (seq-filter #'oddp (stream-empty))))
-  (should (stream-empty-p (seq-filter #'oddp (stream-range 0 4 2))))
-  (should (= 1 (stream-first (seq-filter #'oddp (stream-range 0 4)))))
-  (should (= 3 (stream-first (stream-rest (seq-filter #'oddp (stream-range 0 
4))))))
-  (should (stream-empty-p (stream-rest (stream-rest (seq-filter #'oddp 
(stream-range 0 4)))))))
+  (should (stream-empty-p (seq-filter #'cl-oddp (stream-empty))))
+  (should (stream-empty-p (seq-filter #'cl-oddp (stream-range 0 4 2))))
+  (should (= 1 (stream-first (seq-filter #'cl-oddp (stream-range 0 4)))))
+  (should (= 3 (stream-first (stream-rest (seq-filter #'cl-oddp (stream-range 
0 4))))))
+  (should (stream-empty-p (stream-rest (stream-rest (seq-filter #'cl-oddp 
(stream-range 0 4)))))))
 
 (ert-deftest stream-seq-copy-test ()
   (should (streamp (seq-copy (stream-range))))
@@ -168,5 +198,19 @@
   (should (= (seq-length (seq-subseq (stream-range 2 10) 1 3)) 2))
   (should (= (seq-elt (seq-subseq (stream-range 2 10) 1 3) 1) 4)))
 
+(ert-deftest stream-seq-map-should-not-consume-stream-elements ()
+  (let* (consumed
+         (stream (stream-cons (setq consumed t) (stream-empty))))
+    (seq-map #'identity stream)
+    (should-not consumed)))
+
+(ert-deftest stream-pop-test ()
+  (let* ((str (stream '(1 2 3)))
+         (first (stream-pop str))
+         (stream-empty (stream-empty)))
+    (should (= 1 first))
+    (should (= 2 (stream-first str)))
+    (should (null (stream-pop stream-empty)))))
+
 (provide 'stream-tests)
 ;;; stream-tests.el ends here
diff --git a/packages/svg-clock/svg-clock.el b/packages/svg-clock/svg-clock.el
index 438885e..3603651 100644
--- a/packages/svg-clock/svg-clock.el
+++ b/packages/svg-clock/svg-clock.el
@@ -6,7 +6,7 @@
 ;; Author:      Ulf Jasper <address@hidden>
 ;; Created:     22. Sep. 2011
 ;; Keywords:    demo, svg, clock
-;; Version:     0.5
+;; Version:     1.0
 ;; Package-Requires: ((svg "0.1") (emacs "25.0"))
 
 ;; This file is part of GNU Emacs.
@@ -43,7 +43,7 @@
 
 ;;; News:
 
-;;  Version FIXME
+;;  Version 1.0
 ;;    New function `svg-clock-insert'.  Removed customization
 ;;    options.
 
diff --git a/packages/swiper/README.md b/packages/swiper/README.md
index d70eeaf..0d80f8d 100644
--- a/packages/swiper/README.md
+++ b/packages/swiper/README.md
@@ -34,11 +34,18 @@ Here is some typical configuration:
 (ivy-mode 1)
 (setq ivy-use-virtual-buffers t)
 (global-set-key "\C-s" 'swiper)
-(global-set-key "\C-r" 'swiper)
 (global-set-key (kbd "C-c C-r") 'ivy-resume)
-(global-set-key [f6] 'ivy-resume)
+(global-set-key (kbd "<f6>") 'ivy-resume)
+(global-set-key (kbd "M-x") 'counsel-M-x)
+(global-set-key (kbd "C-x C-f") 'counsel-find-file)
+(global-set-key (kbd "<f1> f") 'counsel-describe-function)
+(global-set-key (kbd "<f1> v") 'counsel-describe-variable)
+(global-set-key (kbd "<f1> l") 'counsel-load-library)
+(global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
+(global-set-key (kbd "<f2> u") 'counsel-unicode-char)
+(global-set-key (kbd "C-c g") 'counsel-git)
+(global-set-key (kbd "C-c j") 'counsel-git-grep)
+(global-set-key (kbd "C-c k") 'counsel-ag)
+(global-set-key (kbd "C-x l") 'counsel-locate)
+(global-set-key (kbd "C-S-o") 'counsel-rhythmbox)
 ```
-
-## Issues
-
-Recently, the `ivy` package that provided `ivy.el` was removed from MELPA.  
Now, the `swiper` package provides `ivy.el`. You should remove the outdated 
`ivy` package from your system.
diff --git a/packages/swiper/colir.el b/packages/swiper/colir.el
index 7eacbbd..e11ef7d 100644
--- a/packages/swiper/colir.el
+++ b/packages/swiper/colir.el
@@ -63,7 +63,10 @@
 C1 and C2 are triples of floats in [0.0 1.0] range."
   (apply #'color-rgb-to-hex
          (cl-mapcar
-          colir-compose-method
+          (if (eq (frame-parameter nil 'background-mode) 'dark)
+              ;; this method works nicely for dark themes
+              'colir-compose-soft-light
+            colir-compose-method)
           c1 c2)))
 
 (defun colir-blend-face-background (start end face &optional object)
diff --git a/packages/swiper/counsel.el b/packages/swiper/counsel.el
index 22dc505..9c86ec0 100644
--- a/packages/swiper/counsel.el
+++ b/packages/swiper/counsel.el
@@ -159,26 +159,29 @@
 (defun counsel-find-symbol ()
   "Jump to the definition of the current symbol."
   (interactive)
-  (ivy-set-action #'counsel--find-symbol)
-  (ivy-done))
+  (ivy-exit-with-action #'counsel--find-symbol))
 
 (defun counsel--info-lookup-symbol ()
   "Lookup the current symbol in the info docs."
   (interactive)
-  (ivy-set-action #'counsel-info-lookup-symbol)
-  (ivy-done))
+  (ivy-exit-with-action #'counsel-info-lookup-symbol))
 
 (defun counsel--find-symbol (x)
   "Find symbol definition that corresponds to string X."
-  (ring-insert find-tag-marker-ring (point-marker))
+  (with-no-warnings
+    (ring-insert find-tag-marker-ring (point-marker)))
   (let ((full-name (get-text-property 0 'full-name x)))
     (if full-name
         (find-library full-name)
       (let ((sym (read x)))
-        (cond ((boundp sym)
+        (cond ((and (eq (ivy-state-caller ivy-last)
+                        'counsel-describe-variable)
+                    (boundp sym))
                (find-variable sym))
               ((fboundp sym)
                (find-function sym))
+              ((boundp sym)
+               (find-variable sym))
               ((or (featurep sym)
                    (locate-library
                     (prin1-to-string sym)))
@@ -224,7 +227,8 @@
      :sort t
      :action (lambda (x)
                (describe-variable
-                (intern x))))))
+                (intern x)))
+     :caller 'counsel-describe-variable)))
 
 (ivy-set-actions
  'counsel-describe-variable
@@ -236,6 +240,10 @@
  '(("i" counsel-info-lookup-symbol "info")
    ("d" counsel--find-symbol "definition")))
 
+(ivy-set-actions
+ 'counsel-M-x
+ '(("d" counsel--find-symbol "definition")))
+
 ;;;###autoload
 (defun counsel-describe-function ()
   "Forward to `describe-function'."
@@ -255,7 +263,8 @@
               :sort t
               :action (lambda (x)
                         (describe-function
-                         (intern x))))))
+                         (intern x)))
+              :caller 'counsel-describe-function)))
 
 (defvar info-lookup-mode)
 (declare-function info-lookup->completions "info-look")
@@ -333,7 +342,9 @@
                   "git ls-files --full-name --")
                  "\n"
                  t))
-         (action (lambda (x) (find-file x))))
+         (action `(lambda (x)
+                    (let ((default-directory ,default-directory))
+                      (find-file x)))))
     (ivy-read "Find file: " cands
               :action action)))
 
@@ -348,13 +359,16 @@
   (list ""
         (format "%d chars more" (- n (length ivy-text)))))
 
+(defvar counsel-git-grep-cmd "git --no-pager grep --full-name -n --no-color -i 
-e %S"
+  "Store the command for `counsel-git-grep'.")
+
 (defun counsel-git-grep-function (string &optional _pred &rest _unused)
   "Grep in the current git repository for STRING."
   (if (and (> counsel--git-grep-count 20000)
            (< (length string) 3))
       (counsel-more-chars 3)
     (let* ((default-directory counsel--git-grep-dir)
-           (cmd (format "git --no-pager grep --full-name -n --no-color -i -e 
%S"
+           (cmd (format counsel-git-grep-cmd
                         (setq ivy--old-re (ivy--regex string t)))))
       (if (<= counsel--git-grep-count 20000)
           (split-string (shell-command-to-string cmd) "\n" t)
@@ -364,8 +378,32 @@
 (defvar counsel-git-grep-map
   (let ((map (make-sparse-keymap)))
     (define-key map (kbd "C-l") 'counsel-git-grep-recenter)
+    (define-key map (kbd "M-q") 'counsel-git-grep-query-replace)
     map))
 
+(defun counsel-git-grep-query-replace ()
+  "Start `query-replace' with string to replace from last search string."
+  (interactive)
+  (if (null (window-minibuffer-p))
+      (user-error
+       "Should only be called in the minibuffer through 
`counsel-git-grep-map'")
+    (let* ((enable-recursive-minibuffers t)
+           (from (ivy--regex ivy-text))
+           (to (query-replace-read-to from "Query replace" t)))
+      (ivy-exit-with-action
+       (lambda (_)
+         (let (done-buffers)
+           (dolist (cand ivy--old-cands)
+             (when (string-match "\\`\\(.*?\\):\\([0-9]+\\):\\(.*\\)\\'" cand)
+               (with-ivy-window
+                 (let ((file-name (match-string-no-properties 1 cand)))
+                   (setq file-name (expand-file-name file-name 
counsel--git-grep-dir))
+                   (unless (member file-name done-buffers)
+                     (push file-name done-buffers)
+                     (find-file file-name)
+                     (goto-char (point-min)))
+                   (perform-replace from to t t nil)))))))))))
+
 (defun counsel-git-grep-recenter ()
   (interactive)
   (with-ivy-window
@@ -388,11 +426,28 @@
 (defvar counsel-git-grep-history nil
   "History for `counsel-git-grep'.")
 
+(defvar counsel-git-grep-cmd-history
+  '("git --no-pager grep --full-name -n --no-color -i -e %S")
+  "History for `counsel-git-grep' shell commands.")
+
 ;;;###autoload
-(defun counsel-git-grep (&optional initial-input)
+(defun counsel-git-grep (&optional cmd initial-input)
   "Grep for a string in the current git repository.
+When CMD is a string, use it as a \"git grep\" command.
+When CMD is non-nil, prompt for a specific \"git grep\" command.
 INITIAL-INPUT can be given as the initial minibuffer input."
-  (interactive)
+  (interactive "P")
+  (cond
+    ((stringp cmd)
+     (setq counsel-git-grep-cmd cmd))
+    (cmd
+     (setq counsel-git-grep-cmd
+           (ivy-read "cmd: " counsel-git-grep-cmd-history
+                     :history 'counsel-git-grep-cmd-history))
+     (setq counsel-git-grep-cmd-history
+           (delete-dups counsel-git-grep-cmd-history)))
+    (t
+     (setq counsel-git-grep-cmd "git --no-pager grep --full-name -n --no-color 
-i -e %S")))
   (setq counsel--git-grep-dir
         (locate-dominating-file default-directory ".git"))
   (if (null counsel--git-grep-dir)
@@ -405,7 +460,8 @@ INITIAL-INPUT can be given as the initial minibuffer input."
               :keymap counsel-git-grep-map
               :action #'counsel-git-grep-action
               :unwind #'swiper--cleanup
-              :history 'counsel-git-grep-history)))
+              :history 'counsel-git-grep-history
+              :caller 'counsel-git-grep)))
 
 (defcustom counsel-find-file-at-point nil
   "When non-nil, add file-at-point to the list of candidates."
@@ -479,6 +535,10 @@ Skip some dotfiles unless `ivy-text' requires them."
                  candidates))
         (setq ivy--old-re regexp))))
 
+(defvar counsel--async-time nil
+  "Store the time when a new process was started.
+Or the time of the last minibuffer update.")
+
 (defun counsel--async-command (cmd)
   (let* ((counsel--process " *counsel*")
          (proc (get-process counsel--process))
@@ -491,7 +551,9 @@ Skip some dotfiles unless `ivy-text' requires them."
                 counsel--process
                 counsel--process
                 cmd))
-    (set-process-sentinel proc #'counsel--async-sentinel)))
+    (setq counsel--async-time (current-time))
+    (set-process-sentinel proc #'counsel--async-sentinel)
+    (set-process-filter proc #'counsel--async-filter)))
 
 (defun counsel--async-sentinel (process event)
   (if (string= event "finished\n")
@@ -500,6 +562,16 @@ Skip some dotfiles unless `ivy-text' requires them."
           (setq ivy--all-candidates
                 (ivy--sort-maybe
                  (split-string (buffer-string) "\n" t)))
+          (if (null ivy--old-cands)
+              (setq ivy--index
+                    (or (ivy--preselect-index
+                         (ivy-state-preselect ivy-last)
+                         ivy--all-candidates)
+                        0))
+            (ivy--recompute-index
+             ivy-text
+             (funcall ivy--regex-function ivy-text)
+             ivy--all-candidates))
           (setq ivy--old-cands ivy--all-candidates))
         (ivy--exhibit))
     (if (string= event "exited abnormally with code 1\n")
@@ -508,6 +580,24 @@ Skip some dotfiles unless `ivy-text' requires them."
           (setq ivy--old-cands ivy--all-candidates)
           (ivy--exhibit)))))
 
+(defun counsel--async-filter (process str)
+  "Receive from PROCESS the output STR.
+Update the minibuffer with the amount of lines collected every
+0.5 seconds since the last update."
+  (with-current-buffer (process-buffer process)
+    (insert str))
+  (let (size)
+    (when (time-less-p
+           ;; 0.5s
+           '(0 0 500000 0)
+           (time-since counsel--async-time))
+      (with-current-buffer (process-buffer process)
+        (goto-char (point-min))
+        (setq size (- (buffer-size) (forward-line (buffer-size)))))
+      (ivy--insert-minibuffer
+       (format "\ncollected: %d" size))
+      (setq counsel--async-time (current-time)))))
+
 (defun counsel-locate-action-extern (x)
   "Use xdg-open shell command on X."
   (call-process shell-file-name nil
@@ -556,16 +646,25 @@ Skip some dotfiles unless `ivy-text' requires them."
               (ivy--regex str))))
     '("" "working...")))
 
+(defun counsel-delete-process ()
+  (let ((process (get-process " *counsel*")))
+    (when process
+      (delete-process process))))
+
 ;;;###autoload
-(defun counsel-locate ()
-  "Call locate shell command."
+(defun counsel-locate (&optional initial-input)
+  "Call the \"locate\" shell command.
+INITIAL-INPUT can be given as the initial minibuffer input."
   (interactive)
   (ivy-read "Locate: " #'counsel-locate-function
+            :initial-input initial-input
             :dynamic-collection t
             :history 'counsel-locate-history
             :action (lambda (file)
-                      (when file
-                        (find-file file)))))
+                      (with-ivy-window
+                        (when file
+                          (find-file file))))
+            :unwind #'counsel-delete-process))
 
 (defun counsel--generic (completion-fn)
   "Complete thing at point with COMPLETION-FN."
@@ -663,8 +762,9 @@ The libraries are offered from `load-path'."
     (setq proc (start-process-shell-command
                 counsel-gg-process
                 counsel-gg-process
-                (format "git --no-pager grep --full-name -n --no-color -i -e 
%S | head -n 200"
-                        regex)))
+                (concat
+                 (format counsel-git-grep-cmd regex)
+                 " | head -n 200")))
     (set-process-sentinel
      proc
      #'counsel--gg-sentinel)))
@@ -673,7 +773,9 @@ The libraries are offered from `load-path'."
   (if (string= event "finished\n")
       (progn
         (with-current-buffer (process-buffer process)
-          (setq ivy--all-candidates (split-string (buffer-string) "\n" t))
+          (setq ivy--all-candidates
+                (or (split-string (buffer-string) "\n" t)
+                    '("")))
           (setq ivy--old-cands ivy--all-candidates))
         (when (= 0 (cl-incf counsel-gg-state))
           (ivy--exhibit)))
@@ -687,8 +789,17 @@ The libraries are offered from `load-path'."
   "Quickly and asynchronously count the amount of git grep REGEX matches.
 When NO-ASYNC is non-nil, do it synchronously."
   (let ((default-directory counsel--git-grep-dir)
-        (cmd (format "git grep -i -c '%s' | sed 's/.*:\\(.*\\)/\\1/g' | awk 
'{s+=$1} END {print s}'"
-                     regex))
+        (cmd
+         (concat
+          (format
+           (replace-regexp-in-string
+            "--full-name" "-c"
+            counsel-git-grep-cmd)
+           ;; "git grep -i -c '%s'"
+           (replace-regexp-in-string
+            "-" "\\\\-"
+            (replace-regexp-in-string "'" "''" regex)))
+          " | sed 's/.*:\\(.*\\)/\\1/g' | awk '{s+=$1} END {print s}'"))
         (counsel-ggc-process " *counsel-gg-count*"))
     (if no-async
         (string-to-number (shell-command-to-string cmd))
@@ -711,15 +822,19 @@ When NO-ASYNC is non-nil, do it synchronously."
                (when (= 0 (cl-incf counsel-gg-state))
                  (ivy--exhibit)))))))))
 
-(defun counsel--M-x-transformer (cmd)
-  "Add a binding to CMD if it's bound in the current window.
-CMD is a command name."
-  (let ((binding (substitute-command-keys (format "\\[%s]" cmd))))
+(defun counsel--M-x-transformer (cand-pair)
+  "Add a binding to CAND-PAIR cdr if the car is bound in the current window.
+CAND-PAIR is (command-name . extra-info)."
+  (let* ((command-name (car cand-pair))
+         (extra-info (cdr cand-pair))
+         (binding (substitute-command-keys (format "\\[%s]" command-name))))
     (setq binding (replace-regexp-in-string "C-x 6" "<f2>" binding))
     (if (string-match "^M-x" binding)
-        cmd
-      (format "%s (%s)" cmd
-              (propertize binding 'face 'font-lock-keyword-face)))))
+        cand-pair
+      (cons command-name
+            (if extra-info
+                (format " %s (%s)" extra-info (propertize binding 'face 
'font-lock-keyword-face))
+              (format " (%s)" (propertize binding 'face 
'font-lock-keyword-face)))))))
 
 (defvar smex-initialized-p)
 (defvar smex-ido-cache)
@@ -728,6 +843,20 @@ CMD is a command name."
 (declare-function smex-update "ext:smex")
 (declare-function smex-rank "ext:smex")
 
+(defun counsel--M-x-prompt ()
+  "M-x plus the string representation of `current-prefix-arg'."
+  (if (not current-prefix-arg)
+      "M-x "
+    (concat
+     (if (eq current-prefix-arg '-)
+         "- "
+       (if (integerp current-prefix-arg)
+           (format "%d " current-prefix-arg)
+         (if (= (car current-prefix-arg) 4)
+             "C-u "
+           (format "%d " (car current-prefix-arg)))))
+     "M-x ")))
+
 ;;;###autoload
 (defun counsel-M-x (&optional initial-input)
   "Ivy version of `execute-extended-command'.
@@ -738,11 +867,11 @@ Optional INITIAL-INPUT is the initial input in the 
minibuffer."
                                     ivy-initial-inputs-alist))))
   (let* ((store ivy-format-function)
          (ivy-format-function
-          (lambda (cands)
+          (lambda (cand-pairs)
             (funcall
              store
              (with-ivy-window
-               (mapcar #'counsel--M-x-transformer cands)))))
+               (mapcar #'counsel--M-x-transformer cand-pairs)))))
          (cands obarray)
          (pred 'commandp)
          (sort t))
@@ -754,7 +883,7 @@ Optional INITIAL-INPUT is the initial input in the 
minibuffer."
       (setq cands smex-ido-cache)
       (setq pred nil)
       (setq sort nil))
-    (ivy-read "M-x " cands
+    (ivy-read (counsel--M-x-prompt) cands
               :predicate pred
               :require-match t
               :history 'extended-command-history
@@ -762,11 +891,13 @@ Optional INITIAL-INPUT is the initial input in the 
minibuffer."
               (lambda (cmd)
                 (when (featurep 'smex)
                   (smex-rank (intern cmd)))
-                (let ((prefix-arg current-prefix-arg))
+                (let ((prefix-arg current-prefix-arg)
+                      (ivy-format-function store))
                   (command-execute (intern cmd) 'record)))
               :sort sort
               :keymap counsel-describe-map
-              :initial-input initial-input)))
+              :initial-input initial-input
+              :caller 'counsel-M-x)))
 
 (declare-function powerline-reset "ext:powerline")
 
@@ -824,7 +955,8 @@ Usable with `ivy-resume', `ivy-next-line-and-call' and
             :action
             '(1
               ("p" helm-rhythmbox-play-song "Play song")
-              ("e" counsel-rhythmbox-enqueue-song "Enqueue song"))))
+              ("e" counsel-rhythmbox-enqueue-song "Enqueue song"))
+            :caller 'counsel-rhythmbox))
 
 (defvar counsel-org-tags nil
   "Store the current list of tags.")
@@ -834,7 +966,7 @@ Usable with `ivy-resume', `ivy-next-line-and-call' and
 (defvar org-indent-indentation-per-level)
 (defvar org-tags-column)
 (declare-function org-get-tags-string "org")
-(declare-function org-move-to-column "org")
+(declare-function org-move-to-column "org-compat")
 
 (defun counsel-org-change-tags (tags)
   (let ((current (org-get-tags-string))
@@ -983,24 +1115,73 @@ Usable with `ivy-resume', `ivy-next-line-and-call' and
   "Grep in the current directory for STRING."
   (if (< (length string) 3)
       (counsel-more-chars 3)
-    (let ((regex (counsel-unquote-regex-parens
+    (let ((default-directory counsel--git-grep-dir)
+          (regex (counsel-unquote-regex-parens
                   (setq ivy--old-re
                         (ivy--regex string)))))
       (counsel--async-command
-       (format "ag --noheading --nocolor %S" regex))
+       (format "ag --vimgrep %S" regex))
       nil)))
 
-(defun counsel-ag (&optional initial-input)
+;;;###autoload
+(defun counsel-ag (&optional initial-input initial-directory)
   "Grep for a string in the current directory using ag.
 INITIAL-INPUT can be given as the initial minibuffer input."
   (interactive)
-  (setq counsel--git-grep-dir default-directory)
+  (setq counsel--git-grep-dir (or initial-directory default-directory))
   (ivy-read "ag: " 'counsel-ag-function
             :initial-input initial-input
             :dynamic-collection t
             :history 'counsel-git-grep-history
             :action #'counsel-git-grep-action
-            :unwind #'swiper--cleanup))
+            :unwind (lambda ()
+                      (counsel-delete-process)
+                      (swiper--cleanup))))
+
+;;;###autoload
+(defun counsel-grep ()
+  "Grep for a string in the current file."
+  (interactive)
+  (setq counsel--git-grep-dir (buffer-file-name))
+  (ivy-read "grep: " 'counsel-grep-function
+            :dynamic-collection t
+            :preselect (format "%d:%s"
+                               (line-number-at-pos)
+                               (buffer-substring-no-properties
+                                (line-beginning-position)
+                                (line-end-position)))
+            :history 'counsel-git-grep-history
+            :update-fn (lambda ()
+                         (counsel-grep-action ivy--current))
+            :action #'counsel-grep-action
+            :unwind (lambda ()
+                      (counsel-delete-process)
+                      (swiper--cleanup))
+            :caller 'counsel-grep))
+
+(defun counsel-grep-function (string &optional _pred &rest _unused)
+  "Grep in the current directory for STRING."
+  (if (< (length string) 3)
+      (counsel-more-chars 3)
+    (let ((regex (counsel-unquote-regex-parens
+                  (setq ivy--old-re
+                        (ivy--regex string)))))
+      (counsel--async-command
+       (format "grep -nP --ignore-case '%s' %s" regex counsel--git-grep-dir))
+      nil)))
+
+(defun counsel-grep-action (x)
+  (when (string-match "\\`\\([0-9]+\\):\\(.*\\)\\'" x)
+    (with-ivy-window
+      (let ((file-name counsel--git-grep-dir)
+            (line-number (match-string-no-properties 1 x)))
+        (find-file file-name)
+        (goto-char (point-min))
+        (forward-line (1- (string-to-number line-number)))
+        (re-search-forward (ivy--regex ivy-text t) (line-end-position) t)
+        (unless (eq ivy-exit 'done)
+          (swiper--cleanup)
+          (swiper--add-overlays (ivy--regex ivy-text)))))))
 
 (defun counsel-recoll-function (string &optional _pred &rest _unused)
   "Grep in the current directory for STRING."
@@ -1035,6 +1216,38 @@ INITIAL-INPUT can be given as the initial minibuffer 
input."
                           (unless (string-match "pdf$" x)
                             (swiper ivy-text)))))))
 
+(defvar tmm-km-list nil)
+(declare-function tmm-get-keymap "tmm")
+(declare-function tmm--completion-table "tmm")
+(declare-function tmm-get-keybind "tmm")
+
+(defun counsel-tmm-prompt (menu)
+  "Select and call an item from the MENU keymap."
+  (let (out
+        choice
+        chosen-string)
+    (setq tmm-km-list nil)
+    (map-keymap (lambda (k v) (tmm-get-keymap (cons k v))) menu)
+    (setq tmm-km-list (nreverse tmm-km-list))
+    (setq out (ivy-read "Menu bar: " (tmm--completion-table tmm-km-list)
+                        :require-match t
+                        :sort nil))
+    (setq choice (cdr (assoc out tmm-km-list)))
+    (setq chosen-string (car choice))
+    (setq choice (cdr choice))
+    (cond ((keymapp choice)
+           (counsel-tmm-prompt choice))
+          ((and choice chosen-string)
+           (setq last-command-event chosen-string)
+           (call-interactively choice)))))
+
+(defun counsel-tmm ()
+  "Text-mode emulation of looking and choosing from a menubar."
+  (interactive)
+  (require 'tmm)
+  (run-hooks 'menu-bar-update-hook)
+  (counsel-tmm-prompt (tmm-get-keybind [menu-bar])))
+
 (defcustom counsel-yank-pop-truncate nil
   "When non-nil, truncate the display of long strings."
   :group 'ivy)
diff --git a/packages/swiper/doc/Changelog.org 
b/packages/swiper/doc/Changelog.org
index 0f5ac2c..21076de 100644
--- a/packages/swiper/doc/Changelog.org
+++ b/packages/swiper/doc/Changelog.org
@@ -65,7 +65,7 @@ To have this feature, use something like this:
 #+end_src
 See [[https://github.com/abo-abo/swiper/pull/167][#167]].
 
-You can also set this to nil, if you don't want any count, see 
[[https://github.com/abo-abo/swiper/pull/188][#188]].
+You can also set this to "", if you don't want any count, see 
[[https://github.com/abo-abo/swiper/pull/188][#188]].
 **** Allow to add additional exit points for any command
 Example for =ivy-switch-to-buffer=:
 #+begin_src elisp
@@ -294,3 +294,323 @@ Use this command to exit the minibuffer choosing not the 
current
 candidate, but the current text.  Bound to ~C-M-j~ or ~C-u C-j~.
 
 See [[https://github.com/abo-abo/swiper/pull/183][#183]].
+
+* 0.7.0
+** Fixes
+*** Fix :dynamic-collection not being sorted
+*** When :initial-input contains a plus, escape it
+See [[https://github.com/abo-abo/swiper/issues/195][#195]].
+*** Set line-spacing to 0 in the minibuffer
+See [[https://github.com/abo-abo/swiper/issues/198][#198]].
+*** Enlarge the minibuffer window if the candidate list doesn't fit
+See [[https://github.com/abo-abo/swiper/issues/198][#198]] and 
[[https://github.com/abo-abo/swiper/issues/161][#161]] and 
[[https://github.com/abo-abo/swiper/issues/220][#220]].
+*** Fix minibuffer collapsing to one line
+See [[https://github.com/abo-abo/swiper/issues/237][#237]], 
[[https://github.com/abo-abo/swiper/issues/229][#229]] and 
[[https://github.com/abo-abo/swiper/issues/77][#77]].
+*** Use minibuffer-allow-text-properties
+Allows =ivy-read= to return a propertized string.
+*** Improve ~C-g~ out of a long-running async process
+Use =counsel-delete-process= as =:unwind=.
+*** Don't regexp-quote :preselect
+See [[https://github.com/abo-abo/swiper/issues/245][#245]].
+*** Fix ivy-partial for fuzzy completion
+See [[https://github.com/abo-abo/swiper/issues/266][#266]].
+*** ivy-resume should pass :caller
+See [[https://github.com/abo-abo/swiper/issues/245][#245]].
+*** Fix the regression in perfect match logic
+See [[https://github.com/abo-abo/swiper/issues/270][#270]].
+*** Fix pasting file paths on Windows
+*** ~C-j~ should no stop completion for a pasted file path
+*** ~C-M-j~ should use =ivy--directory=
+When completing file names, expand the file name properly.
+See [[https://github.com/abo-abo/swiper/issues/275][#275]].
+*** Use a specific blend method for dark themes
+See [[https://github.com/abo-abo/swiper/issues/278][#278]].
+*** Fix one-off bug in =ivy-scroll-up-command= and =ivy-scroll-down-command=
+*** ~M-o~ shouldn't set the action permanently
+So now it's possible to e.g. =counsel-describe-function= -> ~M-o d~ ->
+=ivy-resume= -> ~M-o o~ -> =ivy-resume= -> ~M-o i~.
+*** Fix swiper preselect issue with similar or identical lines
+See [[https://github.com/abo-abo/swiper/issues/290][#290]].
+*** Make ivy-completing-read handle history as cons
+See [[https://github.com/abo-abo/swiper/issues/295][#295]].
+*** Perform string-match in the original buffer
+The syntax for whitespace, separators etc. is different for modes.  See 
[[https://github.com/abo-abo/swiper/issues/298][#298]].
+** New Features
+*** =swiper=
+**** Make line numbers into display properties
+Each candidate is now a single space plus the original string.  The
+display property of the single space holds the line number. This means
+that it's no longer possible to match line numbers in queries, which
+is a good thing if you're searching for numbers.
+**** Extend =swiper-font-lock-ensure=
+Add =mu4e-view-mode=, =mu4e-headers-mode=, =help-mode=,
+=elfeed-show-mode=, =emms-stream-mode=, =debbugs-gnu-mode=,
+=occur-mode=, =occur-edit-mode=, =bongo-mode=, =eww-mode=, =vc-dir-mode=.
+**** Add support for =evil-jumper/backward=
+See [[https://github.com/abo-abo/swiper/issues/268][#268]].
+**** Make compatible with =visual-line-mode=
+=swiper= will split the lines when =visual-line-mode= is on.  This is
+convenient for small buffers. For large buffers, it can be very slow,
+since =visual-line-mode= is slow.
+See [[https://github.com/abo-abo/swiper/issues/227][#227]].
+**** Add =swiper-toggle-face-matching=
+Bound to ~C-c C-f~.
+At each start of =swiper=, the face at point will be stored.
+Use this command to toggle matching only the candidates with that face.
+See [[https://github.com/abo-abo/swiper/issues/288][#288]].
+**** =push-mark= only if exited the minibuffer
+~C-M-n~ and ~C-M-p~ will no longer push mark and annoy with messages.
+**** =ivy-resume= should restore the buffer for =swiper=
+See [[https://github.com/abo-abo/swiper/issues/302][#302]].
+**** Enable recursive =swiper= calls
+While you =swiper= buffer-1, you can switch out of the minibuffer into
+buffer-2 and call =swiper= again.  Exiting the second minibuffer will
+restore the first minibuffer.
+
+To use this, you need to enable recursive minibuffers.
+#+begin_src elisp
+(setq enable-recursive-minibuffers t)
+#+end_src
+
+It's also useful to indicate the current depth:
+
+#+begin_src elisp
+(minibuffer-depth-indicate-mode 1)
+#+end_src
+
+See [[https://github.com/abo-abo/swiper/issues/309][#309]].
+**** Fix for =twittering-mode=
+The =field= text property is now removed before inserting text into
+the minibuffer. This fixes the =swiper= problems with
+=twittering-mode=. See [[https://github.com/abo-abo/swiper/issues/310][#310]].
+
+
+
+
+*** =ivy=
+**** Add manual
+In the current state, the manual covers the most basic topics, like
+the minibuffer key bindings and the regexp builders.
+**** Make <left> and <right> behave as in fundamental-mode
+**** Truncate minibuffer prompts longer than window-width
+See [[https://github.com/abo-abo/swiper/issues/240][#240]].
+**** ~C-M-n~ should not leave the minibuffer
+Make sure that the minibuffer window remains selected as long as the
+completion hasn't finished.  For example, ~<f1> f~ to call
+=counsel-describe-function=, input "forward" and spam ~C-M-n~ to read
+the doc for each function that starts with "forward". The =*Help*=
+window popup would move the window focus, but this change moves it
+back to the minibuffer.
+**** Add =flx= sorting
+See [[https://github.com/abo-abo/swiper/issues/207][#207]].
+Since flx is costly, move the caching to an earlier point. This means
+immediate return for when the input hasn't changed, i.e. for ~C-n~ or
+~C-p~. When =flx= is installed, and =(eq ivy--regex-function 
'ivy--regex-fuzzy)=
+for current function (through =ivy-re-builders-alist=), then sort the final 
candidates with
+=ivy--flx-sort=.
+
+In the worst case, when some error pops up, return the same list. In
+the best case sort the =cands= that all match =name= by closeness to
+=name=.
+
+How to use:
+1. Have =flx= installed - =(require 'flx)= should succeed.
+2. Configure =ivy-re-builders-alist= appropriately to use =ivy--regex-fuzzy=.
+
+For example:
+
+#+begin_src elisp
+(setq ivy-re-builders-alist
+      '((t . ivy--regex-fuzzy)))
+#+end_src
+**** Support hash tables
+Since =all-completions= also works for hash tables, no reason not to support 
them.
+**** Improve documentation of =ivy-count-format=
+Now possible to set it with Customize.
+**** Add =ivy-index-functions-alist=
+Customize this to decide how the index, i.e. the currently selected
+candidate, is updated with new input.
+For example, one strategy is not reset it to 0 after each change.
+
+Another strategy, used for =swiper=, is to try to select the first
+appropriate candidate after (inclusive) the first previously selected
+candidate. This way, if you're typing something that matches what is
+currently selected, the selection won't change.
+
+See [[https://github.com/abo-abo/swiper/issues/253][#253]].
+**** Add =ivy-virtual-abbreviate=
+The mode of abbreviation for virtual buffer names.
+**** Add =ivy-case-fold-search=
+Used to override =case-fold-search=. See 
[[https://github.com/abo-abo/swiper/issues/259][#259]].
+**** Add feedback for long-running async processes
+Each time 0.5s pass after the last input, if the external process
+hasn't finished yet, update minibuffer with the amount of candidates
+collected so far. This is useful to see that long running commands
+like =counsel-locate= or =counsel-ag= (when in a very large directory)
+aren't stuck.
+**** Promote =ivy-extra-directories= to defcustom
+**** Promote =ivy-sort-function-alist= to defcustom
+**** ~M-n~ should prefer url at point to symbol at point
+**** ~C-x C-f M-n~ calls =ffap-url-fetcher= when at URL
+**** Highlight modified file buffers with =ivy-modified-buffer= face
+This new face is blank by default, but you can use e.g.:
+#+begin_src elisp
+(custom-set-faces
+ '(ivy-modified-buffer ((t (:background "#ff7777")))))
+#+end_src
+**** Work with =enable-recursive-minibuffers=
+Store the old =ivy-last= in case =ivy-read= is called while inside the
+minibuffer.  Restore it after =ivy-call=.
+**** Allow user-specified matched candidate sorting
+New defcustom =ivy-sort-matches-functions-alist=.
+See [[https://github.com/abo-abo/swiper/issues/269][#269]] 
[[https://github.com/abo-abo/swiper/issues/265][#265]] 
[[https://github.com/abo-abo/swiper/issues/213][#213]].
+
+By default, Ivy doesn't sort the matched candidates, they remain in
+the same order as in the original collection. This option is the
+default, since it's fast and simple.
+
+A small problem with this approach is that we usually want prefix
+matches to be displayed first. One solution to this is to input "^" to
+see only the prefix matches.
+
+Now, another solution is to can set:
+#+begin_src elisp
+(setq ivy-sort-matches-functions-alist
+      '((t . ivy--prefix-sort)))
+#+end_src
+
+Here's another example of using this defcustom:
+#+begin_src elisp
+(add-to-list
+     'ivy-sort-matches-functions-alist
+     '(read-file-name-internal . ivy--sort-files-by-date))
+#+end_src
+
+After this, during file name completion, most recently changed files
+will be ahead.
+**** =ivy-display-style=
+Adds fancy highlighting to the minibuffer.
+See [[https://github.com/abo-abo/swiper/issues/212][#212]], 
[[https://github.com/abo-abo/swiper/issues/217][#217]], .
+*** =ivy-hydra=
+**** Bind ~t~ to =toggle-truncate-lines=
+See [[https://github.com/abo-abo/swiper/issues/214][#214]].
+**** Bind ~a~ to =ivy-read-action=
+*** =ivy-switch-buffer=
+**** Make ~M-o r~ rename the buffer instead of switching.
+See [[https://github.com/abo-abo/swiper/issues/233][#233]].
+*** =counsel-locate=
+**** Allow customizing locate options
+See =counsel-locate-options=.
+The current setting is:
+#+begin_src elisp
+(setq counsel-locate-options '("-i" "--regex"))
+#+end_src
+**** Support OSX
+Use =open= instead of =xdg-open=.  Modify =counsel-locate-options= for
+OSX, since there =locate= doesn't support =--regex=.
+**** Use single quotes for the regex
+See [[https://github.com/abo-abo/swiper/issues/194][#194]].
+**** Add initial-input argument
+See [[https://github.com/abo-abo/swiper/issues/289][#289]].
+*** =counsel-org-tag=
+**** Now works in agenda
+See [[https://github.com/abo-abo/swiper/issues/200][#200]].
+*** =counsel-unicode-char=
+**** Add own history
+*** =counsel-M-x=
+**** Add "definition" action
+Use ~M-o d~ to jump to definition.
+**** Show =current-prefix-arg= in the prompt
+See [[https://github.com/abo-abo/swiper/issues/287][#287]].
+*** =counsel-find-file=
+**** Input '/sudo::' goes to current directory instead of root's home
+See [[https://github.com/abo-abo/swiper/issues/283][#283]].
+**** Fix directory validity check
+See [[https://github.com/abo-abo/swiper/issues/283][#283]] 
[[https://github.com/abo-abo/swiper/issues/284][#284]].
+**** Improve TRAMP support
+Selecting items after ~//~ now works properly.
+*** =counsel-git-grep=
+**** Use prefix arg to specify the shell command.
+Remember to use ~M-i~ to insert the current candidate into the
+minibuffer.
+
+See [[https://github.com/abo-abo/swiper/issues/244][#244]].
+**** Allow =counsel-git-grep= -> =ivy-occur= -> =wgrep=
+Using ~C-c C-o~ (=ivy-occur=) while in =counsel-git-grep= will produce
+a =wgrep=-compatible buffer.
+**** =ivy-occur= gives full candidates
+This means that the =" | head -n 200"= speed-up isn't used and full
+candidates are returned.
+*** =counsel--find-symbol=
+**** Allow to jump back with pop-tag-mark
+Using ~C-.~ in:
+
+- =counsel-describe-function=
+- =counsel-describe-variable=
+- =counsel-load-library=
+
+will change the current buffer. The buffer and point can be restored
+with ~M-*~ (=pop-tag-mark=).
+
+I also recommend this binding:
+
+#+begin_src elisp
+(global-set-key (kbd "M-,") 'pop-tag-mark)
+#+end_src
+**** Resolve the name clash better
+When the symbol is both bound and fbound, prefer the fbound one,
+unless the =:caller= is =counsel-describe-variable=.
+*** =counsel-ag=
+**** Add =initial-directory=
+Support alternative initial directory which helps other packages call
+this function with their unique starting directory.
+**** Fix on Windows
+Using the "--vimgrep" argument improves things.
+** New Commands
+*** =ivy-occur=
+Bound to ~C-c C-o~. Store the current completion session to its own
+buffer.  You can have an unlimited amount of these buffers.
+*** =ivy-avy=
+Bound to ~C-'~.
+
+Speeds up selecting a candidate that's currently visible in the minibuffer.
+*** =ivy-kill-ring-save=
+Bound to ~M-w~.
+
+When the region is active, call =kill-ring-save=.  Otherwise, store
+all selected candidates to the kill ring.
+*** =ivy-dispatching-call=
+Bound to ~C-M-o~.
+
+This is a non-exiting version of ~M-o~ (=ivy-dispatching-done=).
+*** =ivy-read-action=
+Bound to ~C-M-a~. Select the current action. Don't call it yet.
+*** =swiper-multi=
+Use =swiper= in multiple buffers.
+See [[https://github.com/abo-abo/swiper/issues/182][#182]].
+
+Basic usage tips for selecting multiple buffers:
+
+- Use ~C-M-m~ (=ivy-call=) to add or remove one more buffer without exiting.
+- Use ~C-m~ (=ivy-done=) to add one last buffer.
+- Or use ~C-M-j~ (=ivy-immediate-done=) to finish without adding more buffers.
+- Hold ~C-M-n~ (=ivy-next-line-and-call=) to add a lot of buffers at once.
+*** =swiper-mc=
+Open multiple cursors at all selected candidates.
+*** =swiper-all=
+New command to launch =swiper= for all open file buffers.  Note that
+this can be excruciatingly slow if you don't clean up your buffer list
+often.
+*** =counsel-grep=
+This is essentially =swiper= for huge files. It's not as smooth as
+=swiper= for small files, but has a faster startup and faster matching
+for files that measure in megabytes.
+*** =counsel-git-grep-query-replace=
+Bound to ~M-q~. Perform =query-replace= on all matches in all buffers.
+*** =counsel-jedi=
+Complete Python symbols using Jedi.
+*** =counsel-cl=
+Complete Common Lisp symbols using SLIME.
+*** =counsel-yank-pop=
+Give completion for inserting from the kill ring.
+See =counsel-yank-pop-truncate= defcustom and 
[[https://github.com/abo-abo/swiper/issues/218][#218]].
diff --git a/packages/swiper/doc/ivy.org b/packages/swiper/doc/ivy.org
new file mode 100644
index 0000000..b26b00e
--- /dev/null
+++ b/packages/swiper/doc/ivy.org
@@ -0,0 +1,476 @@
+#+TITLE: Ivy User Manual
+#+AUTHOR: Oleh Krehel
+#+EMAIL: address@hidden
+#+DATE: 2015
+#+LANGUAGE: en
+
+#+TEXINFO_DIR_CATEGORY: Emacs
+#+TEXINFO_DIR_TITLE: Ivy: (ivy).
+#+TEXINFO_DIR_DESC: Using Ivy for completion.
+#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="style.css"/>
+
+#+OPTIONS: H:6 num:6 toc:4
+#+STARTUP: indent
+* Macros                                                                       
       :noexport:
+#+MACRO: defopt #+TEXINFO: @defopt $1
+#+MACRO: endopt #+TEXINFO: @end defopt
+* Copying
+:PROPERTIES:
+:COPYING:  t
+:END:
+
+#+BEGIN_TEXINFO
address@hidden
+Ivy manual, version 0.7.0
+
+Ivy is an interactive interface for completion in Emacs. Emacs uses
+completion mechanism in a variety of contexts: code, menus, commands,
+variables, functions, etc. Completion entails listing, sorting,
+filtering, previewing, and applying actions on selected items. When
+active, @code{ivy-mode} completes the selection process by narrowing
+available choices while previewing in the minibuffer. Selecting the
+final candidate is either through simple keyboard character inputs or
+through powerful regular expressions. @end ifnottex
+
+Copyright @copyright{} 2015 Free Software Foundation, Inc.
+
address@hidden
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
+and with the Back-Cover Texts as in (a) below.  A copy of the license
+is included in the section entitled ``GNU Free Documentation License.''
+
+(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
+modify this GNU manual.''
address@hidden quotation
+#+END_TEXINFO
+
+* Introduction
+Ivy is for quick and easy selection from a list. When Emacs prompts
+for a string from a list of several possible choices, Ivy springs into
+action to assist in narrowing and picking the right string from a vast
+number of choices.
+
+Ivy strives for minimalism, simplicity, customizability and
+discoverability.
+
+#+BEGIN_TEXINFO
address@hidden Minimalism
+#+END_TEXINFO
+Uncluttered minibuffer is minimalism. Ivy shows the completion
+defaults, the number of matches, and 10 candidate matches below the
+input line. Customize =ivy-length= to adjust the number of candidate
+matches displayed in the minibuffer.
+
+#+BEGIN_TEXINFO
address@hidden Simplicity
+#+END_TEXINFO
+Simplicity is about Ivy's behavior in the minibuffer. It is also about
+the code interface to extend Ivy's functionality. The minibuffer area
+behaves as close to =fundamental-mode= as possible. ~SPC~ inserts a
+space, for example, instead of being bound to the more complex
+=minibuffer-complete-word=. Ivy's code uses easy-to-examine global
+variables; avoids needless complications with branch-introducing
+custom macros.
+
+#+BEGIN_TEXINFO
address@hidden Customizability
+#+END_TEXINFO
+Customizability is about being able to use different methods and
+interfaces of completion to tailor the selection process. For example,
+adding a custom display function that points to a selected candidate
+with =->=, instead of highlighting the selected candidate with the
+=ivy-current-match= face. Or take the customization of actions, say
+after the candidate function is selected. ~RET~ uses
+=counsel-describe-function= to describe the function, whereas ~M-o d~
+jumps to that function's definition in the code. The ~M-o~ prefix can
+be uniformly used with characters like ~d~ to group similar actions.
+
+#+BEGIN_TEXINFO
address@hidden Discoverability
+#+END_TEXINFO
+Ivy displays easily discoverable commands through the hydra facility.
+~C-o~ in the minibuffer displays a hydra menu. It opens up within an
+expanded minibuffer area. Each menu item comes with short
+documentation strings and highlighted one-key completions. So
+discovering even seldom used keys is simply a matter of ~C-o~ in the
+minibuffer while in the midst of the Ivy interaction. This
+discoverability minimizes exiting Ivy interface for documentation
+look-ups.
+
+* Installation
+
+Install Ivy automatically through Emacs's package manager, or manually
+from Ivy's development repository.
+
+** Installing from Emacs Package Manager
+
+~M-x~ =package-install= ~RET~ =swiper= ~RET~
+
+Ivy is installed as part of =swiper= package. =swiper= is available
+from two different package archives, GNU ELPA and MELPA. For the
+latest stable version, use the GNU ELPA archives using the above M-x
+command.
+
+For current hourly builds, use the MELPA archives. See the code below
+for adding MELPA to the list of package archives:
+
+#+begin_src elisp
+(require 'package)
+(add-to-list 'package-archives
+             '("melpa" . "http://melpa.org/packages/";))
+#+end_src
+
+After this do ~M-x~ =package-refresh-contents= ~RET~, followed by
+~M-x~ =package-install= ~RET~ =swiper= ~RET~.
+
+For package manager details, see [[info:emacs#Packages]].
+
+** Installing from the Git repository
+
+Why install from Git?
+
+- No need to wait for MELPA's hourly builds
+- Easy to revert to previous versions
+- Contribute to Ivy's development; send patches; pull requests
+
+*Configuration steps*
+
+First clone the Swiper repository:
+#+begin_src sh
+cd ~/git && git clone https://github.com/abo-abo/swiper
+cd swiper && make compile
+#+end_src
+
+Then add this to Emacs init:
+#+begin_src elisp
+(add-to-list 'load-path "~/git/swiper/")
+(require 'ivy)
+#+end_src
+
+To update the code:
+#+begin_src sh
+git pull
+make
+#+end_src
+
+* Getting started
+
+First enable Ivy completion everywhere:
+
+#+begin_src elisp
+(ivy-mode 1)
+#+end_src
+
+Note: =ivy-mode= can be toggled on and off with ~M-x~ =ivy-mode=.
+** Basic customization
+Here are some basic settings particularly useful for new Ivy
+users:
+#+begin_src elisp
+(setq ivy-use-virtual-buffers t)
+(setq ivy-height 10)
+(setq ivy-display-style 'fancy)
+(setq ivy-count-format "(%d/%d) ")
+#+end_src
+
+For additional customizations, refer to =M-x describe-variable=
+documentation.
+
+* Key bindings
+** Global key bindings
+
+Recommended key bindings are:
+#+BEGIN_TEXINFO
address@hidden Ivy-based interface to standard commands
+#+END_TEXINFO
+#+begin_src elisp
+(global-set-key (kbd "C-s") 'swiper)
+(global-set-key (kbd "M-x") 'counsel-M-x)
+(global-set-key (kbd "C-x C-f") 'counsel-find-file)
+(global-set-key (kbd "<f1> f") 'counsel-describe-function)
+(global-set-key (kbd "<f1> v") 'counsel-describe-variable)
+(global-set-key (kbd "<f1> l") 'counsel-load-library)
+(global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
+(global-set-key (kbd "<f2> u") 'counsel-unicode-char)
+#+end_src
+#+BEGIN_TEXINFO
address@hidden Ivy-based interface to shell and system tools
+#+END_TEXINFO
+#+begin_src elisp
+(global-set-key (kbd "C-c g") 'counsel-git)
+(global-set-key (kbd "C-c j") 'counsel-git-grep)
+(global-set-key (kbd "C-c k") 'counsel-ag)
+(global-set-key (kbd "C-x l") 'counsel-locate)
+(global-set-key (kbd "C-S-o") 'counsel-rhythmbox)
+#+end_src
+#+BEGIN_TEXINFO
address@hidden Ivy-resume and other commands
+#+END_TEXINFO
+=ivy-resume= resumes the last Ivy-based completion.
+#+begin_src elisp
+(global-set-key (kbd "C-c C-r") 'ivy-resume)
+#+end_src
+
+** Minibuffer key bindings
+
+Ivy includes several minibuffer bindings, which are defined in the
+=ivy-minibuffer-map= keymap variable. The most frequently used ones
+are described here.
+
+=swiper= or =counsel-M-x= add more through the =keymap= argument to
+=ivy-read=. These keys, also active in the minibuffer, are described
+under their respective commands.
+
+*** Key bindings for navigation
+
+- ~C-n~ (=ivy-next-line=) selects the next candidate
+- ~C-p~ (=ivy-previous-line=) selects the previous candidate
+- ~M-<~ (=ivy-beginning-of-buffer=) selects the first candidate
+- ~M->~ (=ivy-end-of-buffer=) selects the last candidate
+- ~C-v~ (=ivy-scroll-up-command=) scrolls up by =ivy-height= lines
+- ~M-v~ (=ivy-scroll-down-command=) scrolls down by =ivy-height= lines
+
+{{{defopt(ivy-wrap)}}}
+This user option allows to get the wrap-around behavior for ~C-n~ and
+~C-p~.  When set to =t=, =ivy-next-line= and =ivy-previous-line= will
+cycle past the last and the first candidates respectively.
+
+This behavior is off by default.
+{{{endopt}}}
+
+{{{defopt(ivy-height)}}}
+Use this variable to adjust the minibuffer height, and therefore the
+scroll size for ~C-v~ and ~M-v~.
+{{{endopt}}}
+
+*** Key bindings for single selection, action, then exit minibuffer
+
+Ivy can offer several actions from which to choose which action to
+run. This "calling an action" operates on the selected candidate. For
+example, when viewing a list of files, one action could open it for
+editing, one to view it, another to invoke a special function, and so
+on. Custom actions can be added to this interface. The precise action
+to call on the selected candidate can be delayed until after the
+narrowing is completed. No need to exit the interface if unsure which
+action to run. This delayed flexibility and customization of actions
+extends usability of lists in Emacs.
+
+~C-m~ or ~RET~ (=ivy-done=) calls the default action and exits the
+minibuffer.
+
+~M-o~ (=ivy-dispatching-done=) presents all available valid actions
+from which to choose. When there is only one action available, there
+is no difference between ~M-o~ and ~C-m~.
+
+~C-j~ (=ivy-alt-done=) calls the alternate action, such as completing
+a directory name in a file list whereas ~C-m~ will select that directory
+and exit the minibuffer.
+
+Exiting the minibuffer also closes the Ivy window (as specified by
+=ivy-height=). This closing and exiting sequence is conveniently off
+when applying multiple actions. Multiple actions and multiple
+selections as covered in the next section of this manual.
+
+~TAB~ (=ivy-partial-or-done=) attempts partial completion, extending
+current input as much as possible.
+
+~TAB TAB~ is the same as ~C-j~.
+
+~C-M-j~ (=ivy-immediate-done=) is useful when there is no match for
+the given input. Or there is an incorrect partial match. ~C-M-j~ with
+=find-file= lists ignores the partial match and instead takes the
+current input to create a new directory with =dired-create-directory=.
+
+=ivy-immediate-done= illustrates how Ivy distinguishes between calling
+an action on the /currently selected/ candidate and calling an action
+on the /current input/.
+
+#+BEGIN_TEXINFO
+Invoking avy completion with @kbd{C-'} (@code{ivy-avy}).
+#+END_TEXINFO
+~C-`~ uses avy's visible jump mechanism, which can further reduce
+Ivy's line-by-line scrolling that requires multiple ~C-n~ or ~C-p~
+keystrokes.
+
+*** Key bindings for multiple selections and actions, keep minibuffer open
+
+For repeatedly applying multiple actions or acting on multiple
+candidates, Ivy does not close the minibuffer between commands. It
+keeps the minibuffer open for applying subsequent actions.
+
+Adding an extra meta key to the normal key chord invokes the special
+version of the regular commands that enables applying multiple
+actions.
+
+~C-M-m~ (=ivy-call=) is the non-exiting version of the default action,
+~C-m~ (=ivy-done=). Instead of closing the minibuffer, ~C-M-m~ allows
+selecting another candidate or another action. For example, ~C-M-m~ on
+functions list invokes =describe-function=. When combined with ~C-n~,
+function descriptions can be invoked quickly in succession.
+
+~RET~ exits the minibuffer.
+
+=ivy-resume= recalls the state of the completion session just before
+its last exit. Useful after an accidental ~C-m~ (=ivy-done=).
+
+~C-M-o~ (=ivy-dispatching-call=) is a non-exiting version of ~M-o~
+(=ivy-dispatching-done=) that can accumulate candidates into a queue.
+For example, for playback in =counsel-rhythmbox=, ~C-M-o e~ en-queues
+the selected candidate, and ~C-n C-m~ plays the next one in the queue.
+
+~C-M-n~ (=ivy-next-line-and-call=) combines ~C-n~ and ~C-M-m~. Applies
+an action and moves to next line. Comes in handy when opening multiple
+files from =counsel-find-file=, =counsel-git-grep=, =counsel-ag=, or
+=counsel-locate= lists. Just hold ~C-M-n~ for rapid-fire default
+action on each successive element of the list.
+
+~C-M-p~ (=ivy-previous-line-and-call=) combines ~C-p~ and ~C-M-m~. Is
+the same as above except that it moves through the list in the other
+direction.
+
+*** Key bindings that alter minibuffer input
+
+~M-n~ (=ivy-next-history-element=) and ~M-p~
+(=ivy-previous-history-element=) cycle through the Ivy command
+history. Ivy updates an internal history list after each action. When
+this history list is empty, ~M-n~ inserts symbol (or URL) at point
+into the minibuffer.
+
+~M-i~ (=ivy-insert-current=) inserts the current candidate into the
+minibuffer. Useful for copying and renaming files, for example: ~M-i~
+to insert the original file name string, edit it, and then ~C-m~ to
+complete the renaming.
+
+~M-j~ (=ivy-yank-word=) inserts sub-word at point into minibuffer. This
+is similar to ~C-s C-w~ with =isearch=. Ivy reserves ~C-w~ for
+=kill-region=.
+
+~S-SPC~ (=ivy-restrict-to-matches=) deletes the current input, and
+resets the candidates list to the currently restricted matches. This
+is how Ivy provides narrowing in successive tiers.
+
+~C-r~ (=ivy-reverse-i-search=) works just like ~C-r~ at bash command
+prompt, where the completion candidates are the history items. Upon
+completion, the selected candidate string is inserted into the
+minibuffer.
+
+*** Other key bindings
+
+~M-w~ (=ivy-kill-ring-save=) copies selected candidates to the kill
+ring; when the region is active, copies active region.
+
+*** Hydra in the minibuffer
+
+~C-o~ (=hydra-ivy/body=) invokes Hydra menus with key shortcuts.
+
+~C-o~ or ~i~ resumes editing.
+
+Hydra reduces key strokes, for example: ~C-n C-n C-n C-n~ is ~C-o
+jjjj~ in Hydra. Hydra has other benefits besides certain shorter key
+bindings:
+- ~<~ and ~>~ to adjust height of minibuffer,
+- describes the current completion state, such as case folding and the
+  current action.
+
+Minibuffer editing is disabled when Hydra is active.
+
+*** Saving the current completion session to a buffer
+
+~C-c C-o~ (=ivy-occur=) saves the current candidates to a new buffer;
+the list is active in the new buffer.
+
+~RET~ or ~mouse-1~ in the new buffer calls the appropriate action on
+the selected candidate.
+
+Ivy has no limit on the number of active buffers like these.
+
+Ivy takes care of making these buffer names unique. It applies
+descriptive names, for example: =*ivy-occur counsel-describe-variable
+"function$*=.
+
+* Completion styles
+
+Ivy's completion functions rely on the highly configurable regex
+builder.
+
+The default is:
+#+begin_src elisp
+(setq ivy-re-builders-alist
+      '((t . ivy--regex-plus)))
+#+end_src
+
+The default =ivy--regex-plus= narrowing is always invoked unless
+specified otherwise. For example, file name completion may have a
+custom completion function:
+#+begin_src elisp
+(setq ivy-re-builders-alist
+      '((read-file-name-internal . ivy--regex-fuzzy)
+        (t . ivy--regex-plus)))
+#+end_src
+
+Ivy's flexibility extends to using different styles of completion
+mechanics (regex-builders) for different types of lists. Despite this
+flexibility, Ivy operates within a consistent and uniform interface.
+The main regex-builders currently in Ivy are:
+
+** ivy--regex-plus
+
+=ivy--regex-plus= is Ivy's default completion method.
+
+=ivy--regex-plus= matches by splitting the input by spaces and
+rebuilding it into a regex.
+
+As the search string is typed in Ivy's minibuffer, it is transformed
+into proper regex syntax. If the string is "for example", it is
+transformed into
+
+#+BEGIN_EXAMPLE
+"\\(for\\).*\\(example\\)"
+#+END_EXAMPLE
+
+which in regex terminology matches "for" followed by a wild card and
+then "example". Note how Ivy uses the space character to build
+wild cards. For literal white space matching in Ivy, use an extra space:
+to match one space type two spaces, to match two spaces type three
+spaces, and so on.
+
+As Ivy transforms typed characters into regex strings, it provides an
+intuitive feedback through font highlights.
+
+Ivy supports regexp negation with "!". For example, "define key ! ivy
+quit" first selects everything matching "define.*key", then removes
+everything matching "ivy", and finally removes everything matching
+"quit". What remains is the final result set of the negation regexp.
+
+#+BEGIN_EXAMPLE
+Standard regexp identifiers work:
+
+"^", "$", "\b" or "[a-z]"
+#+END_EXAMPLE
+
+Since Ivy treats minibuffer input as a regexp, standard regexp
+identifiers work as usual. The exceptions are spaces, which
+translate to ".*", and "!" that signal the beginning of a negation
+group.
+
+** ivy--regex-ignore-order
+
+=ivy--regex-ignore-order= ignores the order of regexp tokens when
+searching for matching candidates. For instance, the input "for
+example" will match "example test for". Otherwise =ivy--regex-plus=
+normal behavior is to honor the order of regexp tokens.
+
+** ivy--regex-fuzzy
+
+=ivy--regex-fuzzy= splits each character with a wild card. Searching
+for "for" returns all "f.*o.*r" matches, resulting in a large number
+of hits.  Yet some searches need these extra hits. Ivy sorts such
+large lists using =flx= package's scoring mechanism, if it's
+installed.
+
+* Variable Index
+#+BEGIN_TEXINFO
address@hidden vr
+#+END_TEXINFO
diff --git a/packages/swiper/doc/ivy.texi b/packages/swiper/doc/ivy.texi
new file mode 100644
index 0000000..b06c68c
--- /dev/null
+++ b/packages/swiper/doc/ivy.texi
@@ -0,0 +1,591 @@
+\input texinfo    @c -*- texinfo -*-
address@hidden %**start of header
address@hidden ./ivy.info
address@hidden Ivy User Manual
address@hidden UTF-8
address@hidden en
address@hidden %**end of header
+
address@hidden
address@hidden
+Ivy manual, version 0.7.0
+
+Ivy is an interactive interface for completion in Emacs. Emacs uses
+completion mechanism in a variety of contexts: code, menus, commands,
+variables, functions, etc. Completion entails listing, sorting,
+filtering, previewing, and applying actions on selected items. When
+active, @code{ivy-mode} completes the selection process by narrowing
+available choices while previewing in the minibuffer. Selecting the
+final candidate is either through simple keyboard character inputs or
+through powerful regular expressions. @end ifnottex
+
+Copyright @copyright{} 2015 Free Software Foundation, Inc.
+
address@hidden
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
+and with the Back-Cover Texts as in (a) below.  A copy of the license
+is included in the section entitled ``GNU Free Documentation License.''
+
+(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
+modify this GNU manual.''
address@hidden quotation
address@hidden copying
+
address@hidden Emacs
address@hidden
+* Ivy: (ivy).           Using Ivy for completion.
address@hidden direntry
+
address@hidden
address@hidden
address@hidden Ivy User Manual
address@hidden Oleh Krehel
address@hidden
address@hidden 0pt plus 1filll
address@hidden
address@hidden titlepage
+
address@hidden
+
address@hidden
address@hidden Top
address@hidden Ivy User Manual
address@hidden
address@hidden ifnottex
+
address@hidden
+* Introduction::
+* Installation::
+* Getting started::
+* Key bindings::
+* Completion styles::
+* Variable Index::
+
address@hidden
+--- The Detailed Node Listing ---
+
+Installation
+
+* Installing from Emacs Package Manager::
+* Installing from the Git repository::
+
+Getting started
+
+* Basic customization::
+
+Key bindings
+
+* Global key bindings::
+* Minibuffer key bindings::
+
+Minibuffer key bindings
+
+* Key bindings for navigation::
+* Key bindings for single selection, action, then exit minibuffer: Key 
bindings for single selection action then exit minibuffer.
+* Key bindings for multiple selections and actions, keep minibuffer open: Key 
bindings for multiple selections and actions keep minibuffer open.
+* Key bindings that alter minibuffer input::
+* Other key bindings::
+* Hydra in the minibuffer::
+* Saving the current completion session to a buffer::
+Completion styles
+
+* ivy--regex-plus::
+* ivy--regex-ignore-order::
+* ivy--regex-fuzzy::
address@hidden detailmenu
address@hidden menu
+
address@hidden Introduction
address@hidden Introduction
+
+Ivy is for quick and easy selection from a list. When Emacs prompts
+for a string from a list of several possible choices, Ivy springs into
+action to assist in narrowing and picking the right string from a vast
+number of choices.
+
+Ivy strives for minimalism, simplicity, customizability and
+discoverability.
+
address@hidden Minimalism
+Uncluttered minibuffer is minimalism. Ivy shows the completion
+defaults, the number of matches, and 10 candidate matches below the
+input line. Customize @code{ivy-length} to adjust the number of candidate
+matches displayed in the minibuffer.
+
address@hidden Simplicity
+Simplicity is about Ivy's behavior in the minibuffer. It is also about
+the code interface to extend Ivy's functionality. The minibuffer area
+behaves as close to @code{fundamental-mode} as possible. @kbd{SPC} inserts a
+space, for example, instead of being bound to the more complex
address@hidden Ivy's code uses easy-to-examine global
+variables; avoids needless complications with branch-introducing
+custom macros.
+
address@hidden Customizability
+Customizability is about being able to use different methods and
+interfaces of completion to tailor the selection process. For example,
+adding a custom display function that points to a selected candidate
+with @code{->}, instead of highlighting the selected candidate with the
address@hidden face. Or take the customization of actions, say
+after the candidate function is selected. @kbd{RET} uses
address@hidden to describe the function, whereas @kbd{M-o d}
+jumps to that function's definition in the code. The @kbd{M-o} prefix can
+be uniformly used with characters like @kbd{d} to group similar actions.
+
address@hidden Discoverability
+Ivy displays easily discoverable commands through the hydra facility.
address@hidden in the minibuffer displays a hydra menu. It opens up within an
+expanded minibuffer area. Each menu item comes with short
+documentation strings and highlighted one-key completions. So
+discovering even seldom used keys is simply a matter of @kbd{C-o} in the
+minibuffer while in the midst of the Ivy interaction. This
+discoverability minimizes exiting Ivy interface for documentation
+look-ups.
+
address@hidden Installation
address@hidden Installation
+
+Install Ivy automatically through Emacs's package manager, or manually
+from Ivy's development repository.
address@hidden
+* Installing from Emacs Package Manager::
+* Installing from the Git repository::
address@hidden menu
+
address@hidden Installing from Emacs Package Manager
address@hidden Installing from Emacs Package Manager
+
address@hidden @code{package-install} @kbd{RET} @code{swiper} @kbd{RET}
+
+Ivy is installed as part of @code{swiper} package. @code{swiper} is available
+from two different package archives, GNU ELPA and MELPA. For the
+latest stable version, use the GNU ELPA archives using the above M-x
+command.
+
+For current hourly builds, use the MELPA archives. See the code below
+for adding MELPA to the list of package archives:
+
+
address@hidden
+(require 'package)
+(add-to-list 'package-archives
+             '("melpa" . "http://melpa.org/packages/";))
address@hidden lisp
+
+After this do @kbd{M-x} @code{package-refresh-contents} @kbd{RET}, followed by
address@hidden @code{package-install} @kbd{RET} @code{swiper} @kbd{RET}.
+
+For package manager details, see @ref{Packages,,,emacs,}.
+
address@hidden Installing from the Git repository
address@hidden Installing from the Git repository
+
+Why install from Git?
+
address@hidden
address@hidden
+No need to wait for MELPA's hourly builds
address@hidden
+Easy to revert to previous versions
address@hidden
+Contribute to Ivy's development; send patches; pull requests
address@hidden itemize
+
address@hidden steps}
+
+First clone the Swiper repository:
+
address@hidden
+cd ~/git && git clone https://github.com/abo-abo/swiper
+cd swiper && make compile
address@hidden example
+
+Then add this to Emacs init:
+
address@hidden
+(add-to-list 'load-path "~/git/swiper/")
+(require 'ivy)
address@hidden lisp
+
+To update the code:
+
address@hidden
+git pull
+make
address@hidden example
+
address@hidden Getting started
address@hidden Getting started
+
+First enable Ivy completion everywhere:
+
+
address@hidden
+(ivy-mode 1)
address@hidden lisp
+
+Note: @code{ivy-mode} can be toggled on and off with @kbd{M-x} @code{ivy-mode}.
address@hidden
+* Basic customization::
address@hidden menu
+
address@hidden Basic customization
address@hidden Basic customization
+
+Here are some basic settings particularly useful for new Ivy
+users:
+
address@hidden
+(setq ivy-use-virtual-buffers t)
+(setq ivy-height 10)
+(setq ivy-display-style 'fancy)
+(setq ivy-count-format "(%d/%d) ")
address@hidden lisp
+
+For additional customizations, refer to @code{M-x describe-variable}
+documentation.
+
address@hidden Key bindings
address@hidden Key bindings
+
address@hidden
+* Global key bindings::
+* Minibuffer key bindings::
address@hidden menu
+
address@hidden Global key bindings
address@hidden Global key bindings
+
+Recommended key bindings are:
address@hidden Ivy-based interface to standard commands
+
address@hidden
+(global-set-key (kbd "C-s") 'swiper)
+(global-set-key (kbd "M-x") 'counsel-M-x)
+(global-set-key (kbd "C-x C-f") 'counsel-find-file)
+(global-set-key (kbd "<f1> f") 'counsel-describe-function)
+(global-set-key (kbd "<f1> v") 'counsel-describe-variable)
+(global-set-key (kbd "<f1> l") 'counsel-load-library)
+(global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
+(global-set-key (kbd "<f2> u") 'counsel-unicode-char)
address@hidden lisp
address@hidden Ivy-based interface to shell and system tools
+
address@hidden
+(global-set-key (kbd "C-c g") 'counsel-git)
+(global-set-key (kbd "C-c j") 'counsel-git-grep)
+(global-set-key (kbd "C-c k") 'counsel-ag)
+(global-set-key (kbd "C-x l") 'counsel-locate)
+(global-set-key (kbd "C-S-o") 'counsel-rhythmbox)
address@hidden lisp
address@hidden Ivy-resume and other commands
address@hidden resumes the last Ivy-based completion.
+
address@hidden
+(global-set-key (kbd "C-c C-r") 'ivy-resume)
address@hidden lisp
+
address@hidden Minibuffer key bindings
address@hidden Minibuffer key bindings
+
+Ivy includes several minibuffer bindings, which are defined in the
address@hidden keymap variable. The most frequently used ones
+are described here.
+
address@hidden or @code{counsel-M-x} add more through the @code{keymap} 
argument to
address@hidden These keys, also active in the minibuffer, are described
+under their respective commands.
address@hidden
+* Key bindings for navigation::
+* Key bindings for single selection, action, then exit minibuffer: Key 
bindings for single selection action then exit minibuffer.
+* Key bindings for multiple selections and actions, keep minibuffer open: Key 
bindings for multiple selections and actions keep minibuffer open.
+* Key bindings that alter minibuffer input::
+* Other key bindings::
+* Hydra in the minibuffer::
+* Saving the current completion session to a buffer::
address@hidden menu
+
address@hidden Key bindings for navigation
address@hidden Key bindings for navigation
+
address@hidden
address@hidden
address@hidden (@code{ivy-next-line}) selects the next candidate
address@hidden
address@hidden (@code{ivy-previous-line}) selects the previous candidate
address@hidden
address@hidden<} (@code{ivy-beginning-of-buffer}) selects the first candidate
address@hidden
address@hidden>} (@code{ivy-end-of-buffer}) selects the last candidate
address@hidden
address@hidden (@code{ivy-scroll-up-command}) scrolls up by @code{ivy-height} 
lines
address@hidden
address@hidden (@code{ivy-scroll-down-command}) scrolls down by 
@code{ivy-height} lines
address@hidden itemize
+
address@hidden ivy-wrap
+This user option allows to get the wrap-around behavior for @kbd{C-n} and
address@hidden  When set to @code{t}, @code{ivy-next-line} and 
@code{ivy-previous-line} will
+cycle past the last and the first candidates respectively.
+
+This behavior is off by default.
address@hidden defopt
+
address@hidden ivy-height
+Use this variable to adjust the minibuffer height, and therefore the
+scroll size for @kbd{C-v} and @kbd{M-v}.
address@hidden defopt
+
address@hidden Key bindings for single selection action then exit minibuffer
address@hidden Key bindings for single selection, action, then exit minibuffer
+
+Ivy can offer several actions from which to choose which action to
+run. This "calling an action" operates on the selected candidate. For
+example, when viewing a list of files, one action could open it for
+editing, one to view it, another to invoke a special function, and so
+on. Custom actions can be added to this interface. The precise action
+to call on the selected candidate can be delayed until after the
+narrowing is completed. No need to exit the interface if unsure which
+action to run. This delayed flexibility and customization of actions
+extends usability of lists in Emacs.
+
address@hidden or @kbd{RET} (@code{ivy-done}) calls the default action and 
exits the
+minibuffer.
+
address@hidden (@code{ivy-dispatching-done}) presents all available valid 
actions
+from which to choose. When there is only one action available, there
+is no difference between @kbd{M-o} and @kbd{C-m}.
+
address@hidden (@code{ivy-alt-done}) calls the alternate action, such as 
completing
+a directory name in a file list whereas @kbd{C-m} will select that directory
+and exit the minibuffer.
+
+Exiting the minibuffer also closes the Ivy window (as specified by
address@hidden). This closing and exiting sequence is conveniently off
+when applying multiple actions. Multiple actions and multiple
+selections as covered in the next section of this manual.
+
address@hidden (@code{ivy-partial-or-done}) attempts partial completion, 
extending
+current input as much as possible.
+
address@hidden TAB} is the same as @kbd{C-j}.
+
address@hidden (@code{ivy-immediate-done}) is useful when there is no match for
+the given input. Or there is an incorrect partial match. @kbd{C-M-j} with
address@hidden lists ignores the partial match and instead takes the
+current input to create a new directory with @code{dired-create-directory}.
+
address@hidden illustrates how Ivy distinguishes between calling
+an action on the @emph{currently selected} candidate and calling an action
+on the @emph{current input}.
+
+Invoking avy completion with @kbd{C-'} (@code{ivy-avy}).
address@hidden uses avy's visible jump mechanism, which can further reduce
+Ivy's line-by-line scrolling that requires multiple @kbd{C-n} or @kbd{C-p}
+keystrokes.
+
address@hidden Key bindings for multiple selections and actions keep minibuffer 
open
address@hidden Key bindings for multiple selections and actions, keep 
minibuffer open
+
+For repeatedly applying multiple actions or acting on multiple
+candidates, Ivy does not close the minibuffer between commands. It
+keeps the minibuffer open for applying subsequent actions.
+
+Adding an extra meta key to the normal key chord invokes the special
+version of the regular commands that enables applying multiple
+actions.
+
address@hidden (@code{ivy-call}) is the non-exiting version of the default 
action,
address@hidden (@code{ivy-done}). Instead of closing the minibuffer, 
@kbd{C-M-m} allows
+selecting another candidate or another action. For example, @kbd{C-M-m} on
+functions list invokes @code{describe-function}. When combined with @kbd{C-n},
+function descriptions can be invoked quickly in succession.
+
address@hidden exits the minibuffer.
+
address@hidden recalls the state of the completion session just before
+its last exit. Useful after an accidental @kbd{C-m} (@code{ivy-done}).
+
address@hidden (@code{ivy-dispatching-call}) is a non-exiting version of 
@kbd{M-o}
+(@code{ivy-dispatching-done}) that can accumulate candidates into a queue.
+For example, for playback in @code{counsel-rhythmbox}, @kbd{C-M-o e} en-queues
+the selected candidate, and @kbd{C-n C-m} plays the next one in the queue.
+
address@hidden (@code{ivy-next-line-and-call}) combines @kbd{C-n} and 
@kbd{C-M-m}. Applies
+an action and moves to next line. Comes in handy when opening multiple
+files from @code{counsel-find-file}, @code{counsel-git-grep}, 
@code{counsel-ag}, or
address@hidden lists. Just hold @kbd{C-M-n} for rapid-fire default
+action on each successive element of the list.
+
address@hidden (@code{ivy-previous-line-and-call}) combines @kbd{C-p} and 
@kbd{C-M-m}. Is
+the same as above except that it moves through the list in the other
+direction.
+
address@hidden Key bindings that alter minibuffer input
address@hidden Key bindings that alter minibuffer input
+
address@hidden (@code{ivy-next-history-element}) and @kbd{M-p}
+(@code{ivy-previous-history-element}) cycle through the Ivy command
+history. Ivy updates an internal history list after each action. When
+this history list is empty, @kbd{M-n} inserts symbol (or URL) at point
+into the minibuffer.
+
address@hidden (@code{ivy-insert-current}) inserts the current candidate into 
the
+minibuffer. Useful for copying and renaming files, for example: @kbd{M-i}
+to insert the original file name string, edit it, and then @kbd{C-m} to
+complete the renaming.
+
address@hidden (@code{ivy-yank-word}) inserts sub-word at point into 
minibuffer. This
+is similar to @kbd{C-s C-w} with @code{isearch}. Ivy reserves @kbd{C-w} for
address@hidden
+
address@hidden (@code{ivy-restrict-to-matches}) deletes the current input, and
+resets the candidates list to the currently restricted matches. This
+is how Ivy provides narrowing in successive tiers.
+
address@hidden (@code{ivy-reverse-i-search}) works just like @kbd{C-r} at bash 
command
+prompt, where the completion candidates are the history items. Upon
+completion, the selected candidate string is inserted into the
+minibuffer.
+
address@hidden Other key bindings
address@hidden Other key bindings
+
address@hidden (@code{ivy-kill-ring-save}) copies selected candidates to the 
kill
+ring; when the region is active, copies active region.
+
address@hidden Hydra in the minibuffer
address@hidden Hydra in the minibuffer
+
address@hidden (@code{hydra-ivy/body}) invokes Hydra menus with key shortcuts.
+
address@hidden or @kbd{i} resumes editing.
+
+Hydra reduces key strokes, for example: @kbd{C-n C-n C-n C-n} is @kbd{C-o
+jjjj} in Hydra. Hydra has other benefits besides certain shorter key
+bindings:
address@hidden
address@hidden
address@hidden<} and @kbd{>} to adjust height of minibuffer,
address@hidden
+describes the current completion state, such as case folding and the
+current action.
address@hidden itemize
+
+Minibuffer editing is disabled when Hydra is active.
+
address@hidden Saving the current completion session to a buffer
address@hidden Saving the current completion session to a buffer
+
address@hidden C-o} (@code{ivy-occur}) saves the current candidates to a new 
buffer;
+the list is active in the new buffer.
+
address@hidden or @kbd{mouse-1} in the new buffer calls the appropriate action 
on
+the selected candidate.
+
+Ivy has no limit on the number of active buffers like these.
+
+Ivy takes care of making these buffer names unique. It applies
+descriptive names, for example: @code{*ivy-occur counsel-describe-variable
+"function$*}.
+
address@hidden Completion styles
address@hidden Completion styles
+
+Ivy's completion functions rely on the highly configurable regex
+builder.
+
+The default is:
+
address@hidden
+(setq ivy-re-builders-alist
+      '((t . ivy--regex-plus)))
address@hidden lisp
+
+The default @code{ivy--regex-plus} narrowing is always invoked unless
+specified otherwise. For example, file name completion may have a
+custom completion function:
+
address@hidden
+(setq ivy-re-builders-alist
+      '((read-file-name-internal . ivy--regex-fuzzy)
+        (t . ivy--regex-plus)))
address@hidden lisp
+
+Ivy's flexibility extends to using different styles of completion
+mechanics (regex-builders) for different types of lists. Despite this
+flexibility, Ivy operates within a consistent and uniform interface.
+The main regex-builders currently in Ivy are:
address@hidden
+* ivy--regex-plus::
+* ivy--regex-ignore-order::
+* ivy--regex-fuzzy::
address@hidden menu
+
address@hidden ivy--regex-plus
address@hidden ivy--regex-plus
+
address@hidden is Ivy's default completion method.
+
address@hidden matches by splitting the input by spaces and
+rebuilding it into a regex.
+
+As the search string is typed in Ivy's minibuffer, it is transformed
+into proper regex syntax. If the string is "for example", it is
+transformed into
+
address@hidden
+"\\(for\\).*\\(example\\)"
address@hidden verbatim
+
+which in regex terminology matches "for" followed by a wild card and
+then "example". Note how Ivy uses the space character to build
+wild cards. For literal white space matching in Ivy, use an extra space:
+to match one space type two spaces, to match two spaces type three
+spaces, and so on.
+
+As Ivy transforms typed characters into regex strings, it provides an
+intuitive feedback through font highlights.
+
+Ivy supports regexp negation with "!". For example, "define key ! ivy
+quit" first selects everything matching "define.*key", then removes
+everything matching "ivy", and finally removes everything matching
+"quit". What remains is the final result set of the negation regexp.
+
address@hidden
+Standard regexp identifiers work:
+
+"^", "$", "\b" or "[a-z]"
address@hidden verbatim
+
+Since Ivy treats minibuffer input as a regexp, standard regexp
+identifiers work as usual. The exceptions are spaces, which
+translate to ".*", and "!" that signal the beginning of a negation
+group.
+
address@hidden ivy--regex-ignore-order
address@hidden ivy--regex-ignore-order
+
address@hidden ignores the order of regexp tokens when
+searching for matching candidates. For instance, the input "for
+example" will match "example test for". Otherwise @code{ivy--regex-plus}
+normal behavior is to honor the order of regexp tokens.
+
address@hidden ivy--regex-fuzzy
address@hidden ivy--regex-fuzzy
+
address@hidden splits each character with a wild card. Searching
+for "for" returns all "f.*o.*r" matches, resulting in a large number
+of hits.  Yet some searches need these extra hits. Ivy sorts such
+large lists using @code{flx} package's scoring mechanism, if it's
+installed.
+
address@hidden Variable Index
address@hidden Variable Index
+
address@hidden vr
+
address@hidden
diff --git a/packages/swiper/doc/style.css b/packages/swiper/doc/style.css
new file mode 100644
index 0000000..547b4f0
--- /dev/null
+++ b/packages/swiper/doc/style.css
@@ -0,0 +1,107 @@
+body {
+    color: #333;
+    background-color: #ffffff;
+    margin-left: 1em;
+    margin-right: auto;
+    font-family: 'Ubuntu Mono', sans-serif;
+    max-width: 50em;
+}
+
+body a {
+    color: blue;
+}
+
+h2 {
+    font-weight: normal;
+    text-indent: 0;
+    border-radius: 15px;
+    background-color: #d6d8ec;
+    text-align: left;
+    padding: 3px 3px 3px 3px;
+}
+
+h2 a[id^="unnumbered"] {
+    background-color: #d6d8ec;
+}
+
+h2 a {
+    color: white;
+    background-color:#777777;
+    font-size:18px;
+    border-radius:3px;
+    padding: 0px 5px 0px 5px; 
+}
+
+kbd {
+    padding:0.1em 0.6em;
+    border:1px solid #ccc;
+    font-size:13px;
+    font-weight:bold;
+    font-family:monospace;
+    background-color:#d6d8ec;
+    color:#333;
+    -moz-box-shadow:0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset;
+    -webkit-box-shadow:0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset;
+    box-shadow:0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset;
+    -moz-border-radius:3px;
+    -webkit-border-radius:3px;
+    border-radius:3px;
+    display:inline-block;
+    margin:0 0.1em;
+    text-shadow:0 1px 0 #fff;
+    line-height:1.4;
+    white-space:nowrap;
+}
+
+body a code {
+    color: black;
+    border: 1px solid Blue;
+    border-radius:3px;
+}
+
+code {
+    font-size:13px;
+    border: 1px solid Silver;
+    background-color: #e3e4ec;
+}
+
+pre {
+    border: 1px solid Silver;
+    background-color: #eeeeee;
+    padding: 3px;
+    margin-left: 1em;
+}
+
+cursor {
+    color: #fff;
+    background-color: #000;
+    overflow: hidden;
+}
+
+h3 {
+    counter-reset: chapter;
+}
+
+h4 {
+    margin-left: auto;
+}
+
+table, td, th {
+    border: 0px;
+}
+
+th {
+    background-color:#d6d8ec;
+}
+
+tr:nth-child(odd) {
+    background-color:#fff;
+}
+tr:nth-child(even) {
+    background-color:#d6d8ec;
+}
+
+.region {
+    color: #ffffff;
+    background-color: #f9b593;
+}
diff --git a/packages/swiper/ivy-hydra.el b/packages/swiper/ivy-hydra.el
index 6ab1f9a..63755da 100644
--- a/packages/swiper/ivy-hydra.el
+++ b/packages/swiper/ivy-hydra.el
@@ -44,14 +44,20 @@
                    (byte-compile-file (buffer-file-name) t)))
              (error "Please install `hydra' and recompile/reinstall 
`ivy-hydra'")))))))
 
+(defun ivy--matcher-desc ()
+  (if (eq ivy--regex-function
+          'ivy--regex-fuzzy)
+      "fuzzy"
+    "ivy"))
+
 (defhydra hydra-ivy (:hint nil
                      :color pink)
   "
-^^^^^^          ^Yes^     ^No^     ^Maybe^           ^Action^
-^^^^^^^^^^^^^^---------------------------------------------------
-^ ^ _k_ ^ ^     _f_ollow  _i_nsert _c_: calling %s(if ivy-calling \"on\" 
\"off\")  _w_/_s_: %s(ivy-action-name)
-_h_ ^+^ _l_     _d_one    _o_ops   _m_: matcher %s(if (eq ivy--regex-function 
'ivy--regex-fuzzy) \"fuzzy\" \"ivy\")
-^ ^ _j_ ^ ^     _g_o      ^ ^      _<_/_>_: shrink/grow window
+^^^^^^          ^Yes^    ^^      ^No^     ^Maybe^            
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Action^               ^
+^^^^^^^^^^^^^^^----------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------------------
+^ ^ _k_ ^ ^     _f_ollow occ_u_r _i_nsert _c_: calling %-5s(if ivy-calling 
\"on\" \"off\") _w_/_s_/_a_: %-14s(ivy-action-name)
+_h_ ^+^ _l_     _d_one      ^ ^  _o_ops   _m_: matcher 
%-5s(ivy--matcher-desc)^^^^^^^^^^^^ _C_ase-fold: %-10`ivy-case-fold-search
+^ ^ _j_ ^ ^     _g_o        ^ ^  ^ ^      _<_/_>_: 
shrink/grow^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _t_runcate: %-11`truncate-lines
 "
   ;; arrows
   ("h" ivy-beginning-of-buffer)
@@ -73,7 +79,11 @@ _h_ ^+^ _l_     _d_one    _o_ops   _m_: matcher %s(if (eq 
ivy--regex-function 'i
   (">" ivy-minibuffer-grow)
   ("<" ivy-minibuffer-shrink)
   ("w" ivy-prev-action)
-  ("s" ivy-next-action))
+  ("s" ivy-next-action)
+  ("a" ivy-read-action)
+  ("t" (setq truncate-lines (not truncate-lines)))
+  ("C" ivy-toggle-case-fold)
+  ("u" ivy-occur :exit t))
 
 (provide 'ivy-hydra)
 
diff --git a/packages/swiper/ivy-test.el b/packages/swiper/ivy-test.el
index 10dd8f9..ec5857d 100644
--- a/packages/swiper/ivy-test.el
+++ b/packages/swiper/ivy-test.el
@@ -59,16 +59,33 @@
   (should (equal
            (ivy-with '(ivy-read "pattern: " '("blue" "yellow"))
                      "z C-m")
-           "z")))
+           "z"))
+  (should (equal
+           (ivy-with '(ivy-read "pattern: " '("blue" "yellow"))
+                     "y <backspace> C-m")
+           "blue"))
+  (should (equal
+           (ivy-with '(let ((ivy-re-builders-alist '((t . ivy--regex-fuzzy))))
+                       (ivy-read "pattern: " '("package-list-packages" 
"something-else")))
+                     "plp C-m")
+           "package-list-packages"))
+  (should (equal
+           (ivy-with '(ivy-read "test" '("aaab" "aaac"))
+                     "a C-n <tab> C-m")
+           "aaac"))
+  (should (equal
+           (ivy-with '(ivy-read "pattern: " '("can do" "can" "can't do"))
+                     "can C-m")
+           "can")))
 
 (ert-deftest swiper--re-builder ()
   (setq swiper--width 4)
   (should (string= (swiper--re-builder "^")
                    "."))
   (should (string= (swiper--re-builder "^a")
-                   "^[0-9][0-9 ]\\{4\\}\\(a\\)"))
+                   "^ ?\\(a\\)"))
   (should (string= (swiper--re-builder "^a b")
-                   "^[0-9][0-9 ]\\{4\\}\\(a\\).*?\\(b\\)")))
+                   "^ \\(a\\).*?\\(b\\)")))
 
 (ert-deftest ivy--split ()
   (should (equal (ivy--split "King of the who?")
@@ -84,11 +101,11 @@
 
 (ert-deftest ivy--regex-fuzzy ()
   (should (string= (ivy--regex-fuzzy "tmux")
-                   "t.*m.*u.*x"))
+                   "\\(t\\).*\\(m\\).*\\(u\\).*\\(x\\)"))
   (should (string= (ivy--regex-fuzzy "^tmux")
-                   "^t.*m.*u.*x"))
+                   "^\\(t\\).*\\(m\\).*\\(u\\).*\\(x\\)"))
   (should (string= (ivy--regex-fuzzy "^tmux$")
-                   "^t.*m.*u.*x$"))
+                   "^\\(t\\).*\\(m\\).*\\(u\\).*\\(x\\)$"))
   (should (string= (ivy--regex-fuzzy "")
                    ""))
   (should (string= (ivy--regex-fuzzy "^")
@@ -98,7 +115,7 @@
 
 (ert-deftest ivy--format ()
   (should (string= (let ((ivy--index 10)
-                         (ivy-format-function (lambda (x) (mapconcat 
#'identity x "\n")))
+                         (ivy-format-function (lambda (x) (mapconcat (lambda 
(y) (car y)) x "\n")))
                          (cands '("NAME"
                                   "SYNOPSIS"
                                   "DESCRIPTION"
@@ -121,4 +138,3 @@
                  '("the" "The")))
   (should (equal (ivy--filter "The" '("foo" "the" "The"))
                  '("The"))))
-
diff --git a/packages/swiper/ivy.el b/packages/swiper/ivy.el
index 04c254e..5127582 100644
--- a/packages/swiper/ivy.el
+++ b/packages/swiper/ivy.el
@@ -37,73 +37,126 @@
 
 ;;; Code:
 (require 'cl-lib)
+(require 'ffap)
 
 ;;* Customization
 (defgroup ivy nil
   "Incremental vertical completion."
   :group 'convenience)
 
+(defgroup ivy-faces nil
+  "Font-lock faces for `ivy'."
+  :group 'ivy)
+
 (defface ivy-current-match
   '((((class color) (background light))
      :background "#1a4b77" :foreground "white")
     (((class color) (background dark))
      :background "#65a7e2" :foreground "black"))
-  "Face used by Ivy for highlighting first match.")
+  "Face used by Ivy for highlighting the current match.")
+
+(defface ivy-minibuffer-match-face-1
+  '((((class color) (background light))
+     :background "#d3d3d3")
+    (((class color) (background dark))
+     :background "#555555"))
+  "The background face for `ivy' minibuffer matches.")
+
+(defface ivy-minibuffer-match-face-2
+  '((((class color) (background light))
+     :background "#e99ce8" :weight bold)
+    (((class color) (background dark))
+     :background "#777777" :weight bold))
+  "Face for `ivy' minibuffer matches modulo 1.")
+
+(defface ivy-minibuffer-match-face-3
+  '((((class color) (background light))
+     :background "#bbbbff" :weight bold)
+    (((class color) (background dark))
+     :background "#7777ff" :weight bold))
+  "Face for `ivy' minibuffer matches modulo 2.")
+
+(defface ivy-minibuffer-match-face-4
+  '((((class color) (background light))
+     :background "#ffbbff" :weight bold)
+    (((class color) (background dark))
+     :background "#8a498a" :weight bold))
+  "Face for `ivy' minibuffer matches modulo 3.")
 
 (defface ivy-confirm-face
   '((t :foreground "ForestGreen" :inherit minibuffer-prompt))
-  "Face used by Ivy to issue a confirmation prompt.")
+  "Face used by Ivy for a confirmation prompt.")
 
 (defface ivy-match-required-face
   '((t :foreground "red" :inherit minibuffer-prompt))
-  "Face used by Ivy to issue a match required prompt.")
+  "Face used by Ivy for a match required prompt.")
+
+(setcdr (assoc load-file-name custom-current-group-alist) 'ivy)
 
 (defface ivy-subdir
   '((t (:inherit 'dired-directory)))
   "Face used by Ivy for highlighting subdirs in the alternatives.")
 
+(defface ivy-modified-buffer
+  '((t :inherit 'default))
+  "Face used by Ivy for highlighting modified file visiting buffers.")
+
 (defface ivy-remote
   '((t (:foreground "#110099")))
   "Face used by Ivy for highlighting remotes in the alternatives.")
 
+(defface ivy-virtual
+  '((t :inherit font-lock-builtin-face))
+  "Face used by Ivy for matching virtual buffer names.")
+
 (defcustom ivy-height 10
   "Number of lines for the minibuffer window."
   :type 'integer)
 
 (defcustom ivy-count-format "%-4d "
-  "The style of showing the current candidate count for `ivy-read'.
-Set this to nil if you don't want the count.  You can also set it
-to e.g. \"(%d/%d) \" if you want to see both the candidate index
-and the candidate count."
-  :type '(choice (const :tag "Count disabled" nil) string))
+  "The style to use for displaying the current candidate count for `ivy-read'.
+Set this to \"\" to suppress the count visibility.
+Set this to \"(%d/%d) \" to display both the index and the count."
+  :type '(choice
+          (const :tag "Count disabled" "")
+          (const :tag "Count matches" "%-4d ")
+          (const :tag "Count matches and show current match" "(%d/%d) ")
+          string))
 
 (defcustom ivy-wrap nil
-  "Whether to wrap around after the first and last candidate."
+  "When non-nil, wrap around after the first and the last candidate."
   :type 'boolean)
 
-(defcustom ivy-display-style nil
+(defcustom ivy-display-style (unless (version< emacs-version "24.5") 'fancy)
   "The style for formatting the minibuffer.
 
-By default, the matched strings will be copied as they are.
+By default, the matched strings are copied as is.
 
-With the fancy method, the matching parts of the regexp will be
-additionally highlighted, just like `swiper' does it."
+The fancy display style highlights matching parts of the regexp,
+a behavior similar to `swiper'.
+
+This setting depends on `add-face-text-property' - a C function
+available as of Emacs 24.5. Fancy style will render poorly in
+earlier versions of Emacs."
   :type '(choice
           (const :tag "Plain" nil)
           (const :tag "Fancy" fancy)))
 
 (defcustom ivy-on-del-error-function 'minibuffer-keyboard-quit
   "The handler for when `ivy-backward-delete-char' throws.
-This is usually meant as a quick exit out of the minibuffer."
+Usually a quick exit out of the minibuffer."
   :type 'function)
 
 (defcustom ivy-extra-directories '("../" "./")
   "Add this to the front of the list when completing file names.
 Only \"./\" and \"../\" apply here. They appear in reverse order."
-  :type 'list)
+  :type '(repeat :tag "Dirs"
+          (choice
+           (const :tag "Parent Directory" "../")
+           (const :tag "Current Directory" "./"))))
 
 (defcustom ivy-use-virtual-buffers nil
-  "When non-nil, add `recentf-mode' and bookmarks to the list of buffers."
+  "When non-nil, add `recentf-mode' and bookmarks to `ivy-switch-buffer'."
   :type 'boolean)
 
 (defvar ivy--actions-list nil
@@ -149,9 +202,13 @@ Only \"./\" and \"../\" apply here. They appear in reverse 
order."
     (define-key map (kbd "M-i") 'ivy-insert-current)
     (define-key map (kbd "C-o") 'hydra-ivy/body)
     (define-key map (kbd "M-o") 'ivy-dispatching-done)
+    (define-key map (kbd "C-M-o") 'ivy-dispatching-call)
     (define-key map (kbd "C-k") 'ivy-kill-line)
     (define-key map (kbd "S-SPC") 'ivy-restrict-to-matches)
     (define-key map (kbd "M-w") 'ivy-kill-ring-save)
+    (define-key map (kbd "C-'") 'ivy-avy)
+    (define-key map (kbd "C-M-a") 'ivy-read-action)
+    (define-key map (kbd "C-c C-o") 'ivy-occur)
     map)
   "Keymap used in the minibuffer.")
 (autoload 'hydra-ivy/body "ivy-hydra" "" t)
@@ -169,15 +226,23 @@ Only \"./\" and \"../\" apply here. They appear in 
reverse order."
   history preselect keymap update-fn sort
   ;; The window in which `ivy-read' was called
   window
+  ;; The buffer in which `ivy-read' was called
+  buffer
+  ;; The value of `ivy-text' to be used by `ivy-occur'
+  text
   action
   unwind
   re-builder
   matcher
   ;; When this is non-nil, call it for each input change to get new candidates
-  dynamic-collection)
+  dynamic-collection
+  caller)
 
 (defvar ivy-last nil
-  "The last parameters passed to `ivy-read'.")
+  "The last parameters passed to `ivy-read'.
+
+This should eventually become a stack so that you could use
+`ivy-read' recursively.")
 
 (defsubst ivy-set-action (action)
   (setf (ivy-state-action ivy-last) action))
@@ -186,7 +251,7 @@ Only \"./\" and \"../\" apply here. They appear in reverse 
order."
   "History list of candidates entered in the minibuffer.
 
 Maximum length of the history list is determined by the value
-of `history-length', which see.")
+of `history-length'.")
 
 (defvar ivy--directory nil
   "Current directory when completing file names.")
@@ -215,7 +280,7 @@ Otherwise, store nil.")
 
 (defvar ivy--prompt nil
   "Store the format-style prompt.
-When non-nil, it should contain one %d.")
+When non-nil, it should contain at least one %d.")
 
 (defvar ivy--prompt-extra ""
   "Temporary modifications to the prompt.")
@@ -238,6 +303,9 @@ When non-nil, it should contain one %d.")
 (defvar ivy--old-text ""
   "Store old `ivy-text' for dynamic completion.")
 
+(defvar ivy-case-fold-search 'auto
+  "Store the current overriding `case-fold-search'.")
+
 (defvar Info-current-file)
 
 (defmacro ivy-quit-and-run (&rest body)
@@ -250,11 +318,20 @@ When non-nil, it should contain one %d.")
                     ,@body))
      (minibuffer-keyboard-quit)))
 
+(defun ivy-exit-with-action (action)
+  "Quit the minibuffer and call ACTION afterwards."
+  (ivy-set-action
+   `(lambda (x)
+      (funcall ',action x)
+      (ivy-set-action ',(ivy-state-action ivy-last))))
+  (setq ivy-exit 'done)
+  (exit-minibuffer))
+
 (defmacro with-ivy-window (&rest body)
   "Execute BODY in the window from which `ivy-read' was called."
   (declare (indent 0)
            (debug t))
-  `(with-selected-window (ivy-state-window ivy-last)
+  `(with-selected-window (ivy--get-window ivy-last)
      ,@body))
 
 (defun ivy--done (text)
@@ -290,12 +367,11 @@ When non-nil, it should contain one %d.")
          (insert ivy-text)
          (ivy--exhibit))))
 
-(defun ivy-dispatching-done ()
-  "Select one of the available actions and call `ivy-done'."
+(defun ivy-read-action ()
+  "Change the action to one of the available ones."
   (interactive)
   (let ((actions (ivy-state-action ivy-last)))
-    (if (null (ivy--actionp actions))
-        (ivy-done)
+    (unless (null (ivy--actionp actions))
       (let* ((hint (concat ivy--current
                            "\n"
                            (mapconcat
@@ -309,14 +385,31 @@ When non-nil, it should contain one %d.")
                             "\n")
                            "\n"))
              (key (string (read-key hint)))
-             (action (assoc key (cdr actions))))
+             (action-idx (cl-position-if
+                          (lambda (x) (equal (car x) key))
+                          (cdr actions))))
         (cond ((string= key ""))
-              ((null action)
+              ((null action-idx)
                (error "%s is not bound" key))
               (t
                (message "")
-               (ivy-set-action (nth 1 action))
-               (ivy-done)))))))
+               (setcar actions (1+ action-idx))
+               (ivy-set-action actions)))))))
+
+(defun ivy-dispatching-done ()
+  "Select one of the available actions and call `ivy-done'."
+  (interactive)
+  (ivy-read-action)
+  (ivy-done))
+
+(defun ivy-dispatching-call ()
+  "Select one of the available actions and call `ivy-call'."
+  (interactive)
+  (let ((actions (copy-sequence (ivy-state-action ivy-last))))
+    (unwind-protect
+         (when (ivy-read-action)
+           (ivy-call))
+      (ivy-set-action actions))))
 
 (defun ivy-build-tramp-name (x)
   "Reconstruct X into a path.
@@ -334,59 +427,88 @@ Is is a cons cell, related to 
`tramp-get-completion-function'."
   "Exit the minibuffer with the selected candidate.
 When ARG is t, exit with current text, ignoring the candidates."
   (interactive "P")
+  (cond (arg
+         (ivy-immediate-done))
+        (ivy--directory
+         (ivy--directory-done))
+        ((eq (ivy-state-collection ivy-last) 'Info-read-node-name-1)
+         (if (or (equal ivy--current "(./)")
+                 (equal ivy--current "(../)"))
+             (ivy-quit-and-run
+              (ivy-read "Go to file: " 'read-file-name-internal
+                        :action (lambda (x)
+                                  (Info-find-node
+                                   (expand-file-name x ivy--directory)
+                                   "Top"))))
+           (ivy-done)))
+        (t
+         (ivy-done))))
+
+(defun ivy--directory-done ()
+  "Handle exit from the minibuffer when completing file names."
   (let (dir)
-    (cond (arg
-           (ivy-immediate-done))
-          ((and ivy--directory
-                (or
-                 (and
-                  (not (string= ivy--current "./"))
-                  (cl-plusp ivy--length)
-                  (file-directory-p
-                   (setq dir (expand-file-name
-                              ivy--current ivy--directory))))))
-           (ivy--cd dir)
-           (ivy--exhibit))
-          ((eq (ivy-state-collection ivy-last) 'Info-read-node-name-1)
-           (if (or (equal ivy--current "(./)")
-                   (equal ivy--current "(../)"))
-               (ivy-quit-and-run
-                (ivy-read "Go to file: " 'read-file-name-internal
-                          :action (lambda (x)
-                                    (Info-find-node
-                                     (expand-file-name x ivy--directory)
-                                     "Top"))))
-             (ivy-done)))
-          ((and ivy--directory
-                (string-match "\\`/[^/]+:.*:.*\\'" ivy-text))
-           (ivy-done))
-          ((and ivy--directory
-                (string-match
-                 "\\`/\\([^/]+?\\):\\(?:\\(.*\\)@\\)?\\(.*\\)\\'"
-                 ivy-text))
-           (let ((method (match-string 1 ivy-text))
-                 (user (match-string 2 ivy-text))
-                 (rest (match-string 3 ivy-text))
-                 res)
-             (require 'tramp)
-             (dolist (x (tramp-get-completion-function method))
-               (setq res (append res (funcall (car x) (cadr x)))))
-             (setq res (delq nil res))
-             (when user
-               (dolist (x res)
-                 (setcar x user)))
-             (setq res (cl-delete-duplicates res :test #'equal))
-             (let* ((old-ivy-last ivy-last)
-                    (enable-recursive-minibuffers t)
-                    (host (ivy-read "Find File: "
-                                    (mapcar #'ivy-build-tramp-name res)
-                                    :initial-input rest)))
-               (setq ivy-last old-ivy-last)
-               (when host
-                 (setq ivy--directory "/")
-                 (ivy--cd (concat "/" method ":" host ":"))))))
-          (t
-           (ivy-done)))))
+    (cond
+      ((equal ivy-text "/sudo::")
+       (setq dir (concat ivy-text ivy--directory))
+       (ivy--cd dir)
+       (ivy--exhibit))
+      ((or
+        (and
+         (not (equal ivy-text ""))
+         (ignore-errors
+           (file-directory-p
+            (setq dir
+                  (file-name-as-directory
+                   (expand-file-name
+                    ivy-text ivy--directory))))))
+        (and
+         (not (string= ivy--current "./"))
+         (cl-plusp ivy--length)
+         (ignore-errors
+           (file-directory-p
+            (setq dir (file-name-as-directory
+                       (expand-file-name
+                        ivy--current ivy--directory)))))))
+       (ivy--cd dir)
+       (ivy--exhibit))
+      ((or (and (equal ivy--directory "/")
+                (string-match "\\`[^/]+:.*:.*\\'" ivy-text))
+           (string-match "\\`/[^/]+:.*:.*\\'" ivy-text))
+       (ivy-done))
+      ((or (and (equal ivy--directory "/")
+                (cond ((string-match
+                        "\\`\\([^/]+?\\):\\(?:\\(.*\\)@\\)?\\(.*\\)\\'"
+                        ivy-text))
+                      ((string-match
+                        "\\`\\([^/]+?\\):\\(?:\\(.*\\)@\\)?\\(.*\\)\\'"
+                        ivy--current)
+                       (setq ivy-text ivy--current))))
+           (string-match
+            "\\`/\\([^/]+?\\):\\(?:\\(.*\\)@\\)?\\(.*\\)\\'"
+            ivy-text))
+       (let ((method (match-string 1 ivy-text))
+             (user (match-string 2 ivy-text))
+             (rest (match-string 3 ivy-text))
+             res)
+         (require 'tramp)
+         (dolist (x (tramp-get-completion-function method))
+           (setq res (append res (funcall (car x) (cadr x)))))
+         (setq res (delq nil res))
+         (when user
+           (dolist (x res)
+             (setcar x user)))
+         (setq res (cl-delete-duplicates res :test #'equal))
+         (let* ((old-ivy-last ivy-last)
+                (enable-recursive-minibuffers t)
+                (host (ivy-read "Find File: "
+                                (mapcar #'ivy-build-tramp-name res)
+                                :initial-input rest)))
+           (setq ivy-last old-ivy-last)
+           (when host
+             (setq ivy--directory "/")
+             (ivy--cd (concat "/" method ":" host ":"))))))
+      (t
+       (ivy-done)))))
 
 (defcustom ivy-tab-space nil
   "When non-nil, `ivy-partial-or-done' should insert a space."
@@ -397,13 +519,16 @@ When ARG is t, exit with current text, ignoring the 
candidates."
 If the text hasn't changed as a result, forward to `ivy-alt-done'."
   (interactive)
   (if (and (eq (ivy-state-collection ivy-last) #'read-file-name-internal)
-           (string-match "\\`/" ivy-text))
+           (or (and (equal ivy--directory "/")
+                    (string-match "\\`[^/]+:.*\\'" ivy-text))
+               (string-match "\\`/" ivy-text)))
       (let ((default-directory ivy--directory))
         (minibuffer-complete)
         (setq ivy-text (ivy--input))
-        (when (and (file-directory-p ivy-text)
-                   (= ivy--length 1))
-          (ivy--cd (expand-file-name ivy-text))))
+        (when (file-directory-p
+               (expand-file-name ivy-text ivy--directory))
+          (ivy--cd (file-name-as-directory
+                    (expand-file-name ivy-text ivy--directory)))))
     (or (ivy-partial)
         (when (or (eq this-command last-command)
                   (eq ivy--length 1))
@@ -419,7 +544,10 @@ If the text hasn't changed as a result, forward to 
`ivy-alt-done'."
          (new (try-completion (if startp
                                   (substring postfix 1)
                                 postfix)
-                              (mapcar (lambda (str) (substring str 
(string-match postfix str)))
+                              (mapcar (lambda (str)
+                                        (let ((i (string-match postfix str)))
+                                          (when i
+                                            (substring str i))))
                                       ivy--old-cands))))
     (cond ((eq new t) nil)
           ((string= new ivy-text) nil)
@@ -437,7 +565,10 @@ If the text hasn't changed as a result, forward to 
`ivy-alt-done'."
   "Exit the minibuffer with the current input."
   (interactive)
   (delete-minibuffer-contents)
-  (insert (setq ivy--current ivy-text))
+  (insert (setq ivy--current
+                (if ivy--directory
+                    (expand-file-name ivy-text ivy--directory)
+                  ivy-text)))
   (setq ivy-exit 'done)
   (exit-minibuffer))
 
@@ -445,24 +576,28 @@ If the text hasn't changed as a result, forward to 
`ivy-alt-done'."
 (defun ivy-resume ()
   "Resume the last completion session."
   (interactive)
-  (ivy-read
-   (ivy-state-prompt ivy-last)
-   (ivy-state-collection ivy-last)
-   :predicate (ivy-state-predicate ivy-last)
-   :require-match (ivy-state-require-match ivy-last)
-   :initial-input ivy-text
-   :history (ivy-state-history ivy-last)
-   :preselect (unless (eq (ivy-state-collection ivy-last)
-                          'read-file-name-internal)
-                (regexp-quote ivy--current))
-   :keymap (ivy-state-keymap ivy-last)
-   :update-fn (ivy-state-update-fn ivy-last)
-   :sort (ivy-state-sort ivy-last)
-   :action (ivy-state-action ivy-last)
-   :unwind (ivy-state-unwind ivy-last)
-   :re-builder (ivy-state-re-builder ivy-last)
-   :matcher (ivy-state-matcher ivy-last)
-   :dynamic-collection (ivy-state-dynamic-collection ivy-last)))
+  (when (eq (ivy-state-caller ivy-last) 'swiper)
+    (switch-to-buffer (ivy-state-buffer ivy-last)))
+  (with-current-buffer (ivy-state-buffer ivy-last)
+    (ivy-read
+     (ivy-state-prompt ivy-last)
+     (ivy-state-collection ivy-last)
+     :predicate (ivy-state-predicate ivy-last)
+     :require-match (ivy-state-require-match ivy-last)
+     :initial-input ivy-text
+     :history (ivy-state-history ivy-last)
+     :preselect (unless (eq (ivy-state-collection ivy-last)
+                            'read-file-name-internal)
+                  ivy--current)
+     :keymap (ivy-state-keymap ivy-last)
+     :update-fn (ivy-state-update-fn ivy-last)
+     :sort (ivy-state-sort ivy-last)
+     :action (ivy-state-action ivy-last)
+     :unwind (ivy-state-unwind ivy-last)
+     :re-builder (ivy-state-re-builder ivy-last)
+     :matcher (ivy-state-matcher ivy-last)
+     :dynamic-collection (ivy-state-dynamic-collection ivy-last)
+     :caller (ivy-state-caller ivy-last))))
 
 (defvar ivy-calling nil
   "When non-nil, call the current action when `ivy--index' changes.")
@@ -487,13 +622,13 @@ If the text hasn't changed as a result, forward to 
`ivy-alt-done'."
 (defun ivy-scroll-up-command ()
   "Scroll the candidates upward by the minibuffer height."
   (interactive)
-  (ivy-set-index (min (+ ivy--index ivy-height)
+  (ivy-set-index (min (1- (+ ivy--index ivy-height))
                       (1- ivy--length))))
 
 (defun ivy-scroll-down-command ()
   "Scroll the candidates downward by the minibuffer height."
   (interactive)
-  (ivy-set-index (max (- ivy--index ivy-height)
+  (ivy-set-index (max (1+ (- ivy--index ivy-height))
                       0)))
 
 (defun ivy-minibuffer-grow ()
@@ -562,6 +697,15 @@ If the input is empty, select the previous history element 
instead."
           action
         (cadr (nth (car action) action))))))
 
+(defun ivy--get-window (state)
+  "Get the window from STATE."
+  (let ((window (ivy-state-window state)))
+    (if (window-live-p window)
+        window
+      (if (= (length (window-list)) 1)
+          (selected-window)
+        (next-window)))))
+
 (defun ivy--actionp (x)
   "Return non-nil when X is a list of actions."
   (and x (listp x) (not (eq (car x) 'closure))))
@@ -604,7 +748,12 @@ If the input is empty, select the previous history element 
instead."
                   (if (equal ivy--current "")
                       ivy-text
                     ivy--current))))
-        (funcall action x)))))
+        (prog1 (funcall action x)
+          (unless (or (eq ivy-exit 'done)
+                      (equal (selected-window)
+                             (active-minibuffer-window))
+                      (null (active-minibuffer-window)))
+            (select-window (active-minibuffer-window))))))))
 
 (defun ivy-next-line-and-call (&optional arg)
   "Move cursor vertically down ARG candidates.
@@ -642,15 +791,21 @@ Call the permanent action if possible."
   "Check if the current input points to a different directory.
 If so, move to that directory, while keeping only the file name."
   (when ivy--directory
-    (let* ((input (expand-file-name (ivy--input)))
-           (file (file-name-nondirectory input))
-           (dir (expand-file-name (file-name-directory input))))
-      (if (string= dir ivy--directory)
-          (progn
-            (delete-minibuffer-contents)
-            (insert file))
-        (ivy--cd dir)
-        (insert file)))))
+    (let ((input (ivy--input))
+          url)
+      (if (setq url (ffap-url-p input))
+          (ivy-exit-with-action
+           (lambda (_)
+             (funcall ffap-url-fetcher url)))
+        (setq input (expand-file-name input))
+        (let ((file (file-name-nondirectory input))
+              (dir (expand-file-name (file-name-directory input))))
+          (if (string= dir ivy--directory)
+              (progn
+                (delete-minibuffer-contents)
+                (insert file))
+            (ivy--cd dir)
+            (insert file)))))))
 
 (defun ivy--maybe-scroll-history ()
   "If the selected history element has an index, scroll there."
@@ -740,6 +895,52 @@ On error (read-only), call `ivy-on-del-error-function'."
   (setq ivy--old-re nil)
   (cl-rotatef ivy--regex-function ivy--regexp-quote))
 
+(defvar avy-all-windows)
+(defvar avy-action)
+(defvar avy-keys)
+(defvar avy-keys-alist)
+(defvar avy-style)
+(defvar avy-styles-alist)
+(declare-function avy--process "ext:avy")
+(declare-function avy--style-fn "ext:avy")
+
+(eval-after-load 'avy
+  '(add-to-list 'avy-styles-alist '(ivy-avy . pre)))
+
+(defun ivy-avy ()
+  "Jump to one of the current ivy candidates."
+  (interactive)
+  (unless (require 'avy nil 'noerror)
+    (error "Package avy isn't installed"))
+  (let* ((avy-all-windows nil)
+         (avy-keys (or (cdr (assq 'ivy-avy avy-keys-alist))
+                       avy-keys))
+         (avy-style (or (cdr (assq 'ivy-avy
+                                   avy-styles-alist))
+                        avy-style))
+         (candidate
+          (let ((candidates))
+            (save-excursion
+              (save-restriction
+                (narrow-to-region
+                 (window-start)
+                 (window-end))
+                (goto-char (point-min))
+                (forward-line)
+                (while (< (point) (point-max))
+                  (push
+                   (cons (point)
+                         (selected-window))
+                   candidates)
+                  (forward-line))))
+            (setq avy-action #'identity)
+            (avy--process
+             (nreverse candidates)
+             (avy--style-fn avy-style)))))
+    (ivy-set-index (- (line-number-at-pos candidate) 2))
+    (ivy--exhibit)
+    (ivy-done)))
+
 (defun ivy-sort-file-function-default (x y)
   "Compare two files X and Y.
 Prioritize directories."
@@ -751,7 +952,7 @@ Prioritize directories."
         nil
       (string< x y))))
 
-(defvar ivy-sort-functions-alist
+(defcustom ivy-sort-functions-alist
   '((read-file-name-internal . ivy-sort-file-function-default)
     (internal-complete-buffer . nil)
     (counsel-git-grep-function . nil)
@@ -761,11 +962,34 @@ Prioritize directories."
   "An alist of sorting functions for each collection function.
 Interactive functions that call completion fit in here as well.
 
-For each entry, nil means no sorting.  It's very useful to turn
-off the sorting for functions that have candidates in the natural
-buffer order, like `org-refile' or `Man-goto-section'.
-
-The entry associated to t is used for all fall-through cases.")
+Nil means no sorting, which is useful to turn off the sorting for
+functions that have candidates in the natural buffer order, like
+`org-refile' or `Man-goto-section'.
+
+The entry associated with t is used for all fall-through cases.
+
+See also `ivy-sort-max-size'."
+  :type
+  '(alist
+    :key-type (choice
+               (const :tag "All other functions" t)
+               (symbol :tag "Function"))
+    :value-type (choice
+                 (const :tag "plain sort" string-lessp)
+                 (const :tag "file sort" ivy-sort-file-function-default)
+                 (const :tag "no sort" nil)))
+  :group 'ivy)
+
+(defvar ivy-index-functions-alist
+  '((swiper . ivy-recompute-index-swiper)
+    (swiper-multi . ivy-recompute-index-swiper)
+    (counsel-git-grep . ivy-recompute-index-swiper)
+    (counsel-grep . ivy-recompute-index-swiper-async)
+    (t . ivy-recompute-index-zero))
+  "An alist of index recomputing functions for each collection function.
+When the input changes, the appropriate function returns an
+integer - the index of the matched candidate that should be
+selected.")
 
 (defvar ivy-re-builders-alist
   '((t . ivy--regex-plus))
@@ -773,10 +997,10 @@ The entry associated to t is used for all fall-through 
cases.")
 Each function should take a string and return a valid regex or a
 regex sequence (see below).
 
-The entry associated to t is used for all fall-through cases.
+The entry associated with t is used for all fall-through cases.
 Possible choices: `ivy--regex', `regexp-quote', `ivy--regex-plus'.
 
-In case a function returns a list, it should look like this:
+If a function returns a list, it should format like this:
 '((\"matching-regexp\" . t) (\"non-matching-regexp\") ...).
 
 The matches will be filtered in a sequence, you can mix the
@@ -821,41 +1045,47 @@ Directories come first."
 
 ;;** Entry Point
 (cl-defun ivy-read (prompt collection
-                    &key predicate require-match initial-input
-                      history preselect keymap update-fn sort
-                      action unwind re-builder matcher dynamic-collection)
+                           &key predicate require-match initial-input
+                           history preselect keymap update-fn sort
+                           action unwind re-builder matcher dynamic-collection 
caller)
   "Read a string in the minibuffer, with completion.
 
-PROMPT is a string to prompt with; normally it ends in a colon
-and a space.  When PROMPT contains %d, it will be updated with
-the current number of matching candidates.  If % appears elsewhere
-in the PROMPT it should be quoted as %%.
-See also `ivy-count-format'.
+PROMPT is a format string, normally ending in a colon and a
+space; %d anywhere in the string is replaced by the current
+number of matching candidates. For the literal % character,
+escape it with %%. See also `ivy-count-format'.
 
-COLLECTION is a list of strings.
+COLLECTION is either a list of strings, a function, an alist, or
+a hash table.
 
-If INITIAL-INPUT is non-nil, insert it in the minibuffer initially.
+If INITIAL-INPUT is not nil, then insert that input in the
+minibuffer initially.
 
-KEYMAP is composed together with `ivy-minibuffer-map'.
+KEYMAP is composed with `ivy-minibuffer-map'.
 
-If PRESELECT is non-nil select the corresponding candidate out of
-the ones that match INITIAL-INPUT.
+If PRESELECT is not nil, then select the corresponding candidate
+out of the ones that match the INITIAL-INPUT.
 
 UPDATE-FN is called each time the current candidate(s) is changed.
 
-When SORT is t, refer to `ivy-sort-functions-alist' for sorting.
+When SORT is t, use `ivy-sort-functions-alist' for sorting.
 
-ACTION is a lambda to call after a result was selected. It should
-take a single argument, usually a string.
+ACTION is a lambda function to call after selecting a result. It
+takes a single string argument.
 
-UNWIND is a lambda to call before exiting.
+UNWIND is a lambda function to call before exiting.
 
-RE-BUILDER is a lambda that transforms text into a regex.
+RE-BUILDER is a lambda function to call to transform text into a
+regex pattern.
 
-MATCHER can completely override matching.
+MATCHER is to override matching.
 
-DYNAMIC-COLLECTION is a function to call to update the list of
-candidates with each input."
+DYNAMIC-COLLECTION is a boolean to specify if the list of
+candidates is updated after each input by calling COLLECTION.
+
+CALLER is a symbol to uniquely identify the caller to `ivy-read'.
+It is used, along with COLLECTION, to determine which
+customizations apply to the current completion session."
   (let ((extra-actions (plist-get ivy--actions-list this-command)))
     (when extra-actions
       (setq action
@@ -864,60 +1094,65 @@ candidates with each input."
                   ("o" ,action "default")
                   ,@extra-actions)
               (delete-dups (append action extra-actions))))))
-  (setq ivy-last
-        (make-ivy-state
-         :prompt prompt
-         :collection collection
-         :predicate predicate
-         :require-match require-match
-         :initial-input initial-input
-         :history history
-         :preselect preselect
-         :keymap keymap
-         :update-fn update-fn
-         :sort sort
-         :action action
-         :window (selected-window)
-         :unwind unwind
-         :re-builder re-builder
-         :matcher matcher
-         :dynamic-collection dynamic-collection))
-  (ivy--reset-state ivy-last)
-  (prog1
-      (unwind-protect
-           (minibuffer-with-setup-hook
-               #'ivy--minibuffer-setup
-             (let* ((hist (or history 'ivy-history))
-                    (minibuffer-completion-table collection)
-                    (minibuffer-completion-predicate predicate)
-                    (resize-mini-windows (cond
-                                          ((display-graphic-p) nil)
-                                          ((null resize-mini-windows) 
'grow-only)
-                                          (t resize-mini-windows)))
-                    (res (read-from-minibuffer
-                          prompt
-                          (ivy-state-initial-input ivy-last)
-                          (make-composed-keymap keymap ivy-minibuffer-map)
-                          nil
-                          hist)))
-               (when (eq ivy-exit 'done)
-                 (let ((item (if ivy--directory
-                                 ivy--current
-                               ivy-text)))
-                   (unless (equal item "")
-                     (set hist (cons (propertize item 'ivy-index ivy--index)
-                                     (delete item
-                                             (cdr (symbol-value hist)))))))
-                 res)))
-        (remove-hook 'post-command-hook #'ivy--exhibit)
-        (when (setq unwind (ivy-state-unwind ivy-last))
-          (funcall unwind)))
-    (ivy-call)))
+  (let ((recursive-ivy-last (and (active-minibuffer-window) ivy-last)))
+    (setq ivy-last
+          (make-ivy-state
+           :prompt prompt
+           :collection collection
+           :predicate predicate
+           :require-match require-match
+           :initial-input initial-input
+           :history history
+           :preselect preselect
+           :keymap keymap
+           :update-fn update-fn
+           :sort sort
+           :action action
+           :window (selected-window)
+           :buffer (current-buffer)
+           :unwind unwind
+           :re-builder re-builder
+           :matcher matcher
+           :dynamic-collection dynamic-collection
+           :caller caller))
+    (ivy--reset-state ivy-last)
+    (prog1
+        (unwind-protect
+            (minibuffer-with-setup-hook
+                #'ivy--minibuffer-setup
+              (let* ((hist (or history 'ivy-history))
+                     (minibuffer-completion-table collection)
+                     (minibuffer-completion-predicate predicate)
+                     (resize-mini-windows (cond
+                                           ((display-graphic-p) nil)
+                                           ((null resize-mini-windows) 
'grow-only)
+                                           (t resize-mini-windows)))
+                     (res (read-from-minibuffer
+                           prompt
+                           (ivy-state-initial-input ivy-last)
+                           (make-composed-keymap keymap ivy-minibuffer-map)
+                           nil
+                           hist)))
+                (when (eq ivy-exit 'done)
+                  (let ((item (if ivy--directory
+                                  ivy--current
+                                ivy-text)))
+                    (unless (equal item "")
+                      (set hist (cons (propertize item 'ivy-index ivy--index)
+                                      (delete item
+                                              (cdr (symbol-value hist)))))))
+                  res)))
+          (remove-hook 'post-command-hook #'ivy--exhibit)
+          (when (setq unwind (ivy-state-unwind ivy-last))
+            (funcall unwind)))
+      (ivy-call)
+      (when recursive-ivy-last
+        (ivy--reset-state (setq ivy-last recursive-ivy-last))))))
 
 (defun ivy--reset-state (state)
   "Reset the ivy to STATE.
 This is useful for recursive `ivy-read'."
-  (let ((prompt (ivy-state-prompt state))
+  (let ((prompt (or (ivy-state-prompt state) ""))
         (collection (ivy-state-collection state))
         (predicate (ivy-state-predicate state))
         (history (ivy-state-history state))
@@ -927,15 +1162,18 @@ This is useful for recursive `ivy-read'."
         (dynamic-collection (ivy-state-dynamic-collection state))
         (initial-input (ivy-state-initial-input state))
         (require-match (ivy-state-require-match state))
-        (matcher (ivy-state-matcher state)))
+        (caller (ivy-state-caller state)))
     (unless initial-input
       (setq initial-input (cdr (assoc this-command
                                       ivy-initial-inputs-alist))))
     (setq ivy--directory nil)
+    (setq ivy-case-fold-search 'auto)
     (setq ivy--regex-function
           (or re-builder
               (and (functionp collection)
                    (cdr (assoc collection ivy-re-builders-alist)))
+              (and caller
+                   (cdr (assoc caller ivy-re-builders-alist)))
               (cdr (assoc t ivy-re-builders-alist))
               'ivy--regex))
     (setq ivy--subexps 0)
@@ -962,7 +1200,9 @@ This is useful for recursive `ivy-read'."
                              (string= preselect-directory
                                       default-directory))
                    (setq ivy--directory preselect-directory))
-                 (setq preselect (file-name-nondirectory preselect))))
+                 (setf
+                  (ivy-state-preselect state)
+                  (setq preselect (file-name-nondirectory preselect)))))
              (setq coll (ivy--sorted-files ivy--directory))
              (when initial-input
                (unless (or require-match
@@ -975,10 +1215,9 @@ This is useful for recursive `ivy-read'."
             ((or (functionp collection)
                  (byte-code-function-p collection)
                  (vectorp collection)
-                 (listp (car collection)))
+                 (and (consp collection) (listp (car collection)))
+                 (hash-table-p collection))
              (setq coll (all-completions "" collection predicate)))
-            ((hash-table-p collection)
-             (error "Hash table as a collection unsupported"))
             (t
              (setq coll collection)))
       (when sort
@@ -994,27 +1233,43 @@ This is useful for recursive `ivy-read'."
       (when preselect
         (unless (or (and require-match
                          (not (eq collection 'internal-complete-buffer)))
-                    (let ((re (format "\\`%s" (regexp-quote preselect))))
+                    dynamic-collection
+                    (let ((re (regexp-quote preselect)))
                       (cl-find-if (lambda (x) (string-match re x))
                                   coll)))
           (setq coll (cons preselect coll))))
-      (setq ivy--index (or
-                        (and dynamic-collection
-                             ivy--index)
-                        (and preselect
-                             (ivy--preselect-index
-                              coll initial-input preselect matcher))
-                        0))
       (setq ivy--old-re nil)
       (setq ivy--old-cands nil)
-      (setq ivy--all-candidates coll))
+      (when (integerp preselect)
+        (setq ivy--old-re "")
+        (setq ivy--index preselect))
+      (when initial-input
+        ;; Needed for anchor to work
+        (setq ivy--old-cands coll)
+        (setq ivy--old-cands (ivy--filter initial-input coll)))
+      (setq ivy--all-candidates coll)
+      (unless (integerp preselect)
+        (setq ivy--index (or
+                          (and dynamic-collection
+                               ivy--index)
+                          (and preselect
+                               (ivy--preselect-index
+                                preselect
+                                (if initial-input
+                                    ivy--old-cands
+                                  coll)))
+                          0))))
     (setq ivy-exit nil)
-    (setq ivy--default (or (thing-at-point 'symbol) ""))
+    (setq ivy--default (or
+                        (thing-at-point 'url)
+                        (thing-at-point 'symbol)
+                        ""))
     (setq ivy--prompt
           (cond ((string-match "%.*d" prompt)
                  prompt)
                 ((null ivy-count-format)
-                 nil)
+                 (error
+                  "`ivy-count-format' can't be nil.  Set it to an empty string 
instead"))
                 ((string-match "%d.*%d" ivy-count-format)
                  (let ((w (length (number-to-string
                                    (length ivy--all-candidates))))
@@ -1037,47 +1292,56 @@ This is useful for recursive `ivy-read'."
 ;;;###autoload
 (defun ivy-completing-read (prompt collection
                             &optional predicate require-match initial-input
-                              history def _inherit-input-method)
+                              history def inherit-input-method)
   "Read a string in the minibuffer, with completion.
 
-This is an interface that conforms to `completing-read', so that
-it can be used for `completing-read-function'.
+This interface conforms to `completing-read' and can be used for
+`completing-read-function'.
 
 PROMPT is a string to prompt with; normally it ends in a colon and a space.
 COLLECTION can be a list of strings, an alist, an obarray or a hash table.
 PREDICATE limits completion to a subset of COLLECTION.
-REQUIRE-MATCH is considered boolean. See `completing-read'.
+REQUIRE-MATCH is specified with a boolean value.  See `completing-read'.
 INITIAL-INPUT is a string that can be inserted into the minibuffer initially.
-_HISTORY is ignored for now.
+HISTORY is a list of previously selected inputs.
 DEF is the default value.
-_INHERIT-INPUT-METHOD is ignored for now.
-
-The history, defaults and input-method arguments are ignored for now."
-  (ivy-read (replace-regexp-in-string "%" "%%" prompt)
-            collection
-            :predicate predicate
-            :require-match require-match
-            :initial-input (if (consp initial-input)
-                               (car initial-input)
-                             (if (and (stringp initial-input)
-                                      (string-match "\\+" initial-input))
-                                 (replace-regexp-in-string
-                                  "\\+" "\\\\+" initial-input)
-                               initial-input))
-            :preselect (if (listp def) (car def) def)
-            :history history
-            :keymap nil
-            :sort
-            (let ((sort (assoc this-command ivy-sort-functions-alist)))
-              (if sort
-                  (cdr sort)
-                t))))
+INHERIT-INPUT-METHOD is currently ignored."
+  (if (memq this-command '(tmm-menubar tmm-shortcut))
+      (completing-read-default prompt collection
+                               predicate require-match
+                               initial-input history
+                               def inherit-input-method)
+    ;; See the doc of `completing-read'.
+    (when (consp history)
+      (when (numberp (cdr history))
+        (setq initial-input (nth (1- (cdr history))
+                                 (symbol-value (car history)))))
+      (setq history (car history)))
+    (ivy-read (replace-regexp-in-string "%" "%%" prompt)
+              collection
+              :predicate predicate
+              :require-match require-match
+              :initial-input (if (consp initial-input)
+                                 (car initial-input)
+                               (if (and (stringp initial-input)
+                                        (string-match "\\+" initial-input))
+                                   (replace-regexp-in-string
+                                    "\\+" "\\\\+" initial-input)
+                                 initial-input))
+              :preselect (if (listp def) (car def) def)
+              :history history
+              :keymap nil
+              :sort
+              (let ((sort (assoc this-command ivy-sort-functions-alist)))
+                (if sort
+                    (cdr sort)
+                  t)))))
 
 ;;;###autoload
 (define-minor-mode ivy-mode
   "Toggle Ivy mode on or off.
-With ARG, turn Ivy mode on if arg is positive, off otherwise.
-Turning on Ivy mode will set `completing-read-function' to
+Turn Ivy mode on if ARG is positive, off otherwise.
+Turning on Ivy mode sets `completing-read-function' to
 `ivy-completing-read'.
 
 Global bindings:
@@ -1093,26 +1357,17 @@ Minibuffer bindings:
       (setq completing-read-function 'ivy-completing-read)
     (setq completing-read-function 'completing-read-default)))
 
-(defun ivy--preselect-index (candidates initial-input preselect matcher)
-  "Return the index in CANDIDATES filtered by INITIAL-INPUT for PRESELECT.
-When MATCHER is non-nil it's used instead of `cl-remove-if-not'."
-  (if initial-input
-      (progn
-        (setq initial-input (ivy--regex-plus initial-input))
-        (setq candidates
-              (if matcher
-                  (funcall matcher initial-input candidates)
-                (cl-remove-if-not
-                 (lambda (x)
-                   (string-match initial-input x))
-                 candidates))))
-    (when matcher
-      (setq candidates (funcall matcher "" candidates))))
-  (or (cl-position preselect candidates :test #'equal)
-      (cl-position-if
-       (lambda (x)
-         (string-match (regexp-quote preselect) x))
-       candidates)))
+(defun ivy--preselect-index (preselect candidates)
+  "Return the index of PRESELECT in CANDIDATES."
+  (cond ((integerp preselect)
+         preselect)
+        ((cl-position preselect candidates :test #'equal))
+        ((stringp preselect)
+         (let ((re (regexp-quote preselect)))
+           (cl-position-if
+            (lambda (x)
+              (string-match re x))
+            candidates)))))
 
 ;;* Implementation
 ;;** Regex
@@ -1152,7 +1407,7 @@ This allows to \"quote\" N spaces by inputting N+1 
spaces."
     (nreverse res)))
 
 (defun ivy--regex (str &optional greedy)
-  "Re-build regex from STR in case it has a space.
+  "Re-build regex pattern from STR in case it has a space.
 When GREEDY is non-nil, join words in a greedy way."
   (let ((hashed (unless greedy
                   (gethash str ivy--regex-hash))))
@@ -1181,8 +1436,15 @@ When GREEDY is non-nil, join words in a greedy way."
                     ivy--regex-hash)))))
 
 (defun ivy--regex-ignore-order (str)
-  "Re-build regex from STR by splitting it on spaces.
-Ignore the order of each group."
+  "Re-build regex from STR by splitting at spaces.
+Ignore the order of each group.
+
+ATTENTION: This is just a proof of concept and may not work as
+expected. Besides ignoring the order of the tokens where 'foo'
+and 'bar', 'bar' and 'foo' are matched, it also matches multiple
+occurrences of 'foo' and 'bar'. To ignore the sort order and avoid
+multiple matches, use `ivy-restrict-to-matches' instead.
+"
   (let* ((subs (split-string str " +" t))
          (len (length subs)))
     (cl-case len
@@ -1202,8 +1464,8 @@ Ignore the order of each group."
 
 (defun ivy--regex-plus (str)
   "Build a regex sequence from STR.
-Spaces are wild, everything before \"!\" should match.
-Everything after \"!\" should not match."
+Spaces are wild card characters, everything before \"!\" should
+match. Everything after \"!\" should not match."
   (let ((parts (split-string str "!" t)))
     (cl-case (length parts)
       (0
@@ -1222,9 +1484,14 @@ Everything after \"!\" should not match."
   "Build a regex sequence from STR.
 Insert .* between each char."
   (if (string-match "\\`\\(\\^?\\)\\(.*?\\)\\(\\$?\\)\\'" str)
-      (concat (match-string 1 str)
-              (mapconcat #'string (string-to-list (match-string 2 str)) ".*")
-              (match-string 3 str))
+      (prog1
+          (concat (match-string 1 str)
+                  (mapconcat
+                   (lambda (x)
+                     (format "\\(%c\\)" x))
+                   (string-to-list (match-string 2 str)) ".*")
+                  (match-string 3 str))
+        (setq ivy--subexps (length (match-string 2 str))))
     str))
 
 ;;** Rest
@@ -1258,7 +1525,7 @@ Insert .* between each char."
   "Update the prompt according to `ivy--prompt'."
   (when ivy--prompt
     (unless (memq this-command '(ivy-done ivy-alt-done ivy-partial-or-done
-                                 counsel-find-symbol))
+                                          counsel-find-symbol))
       (setq ivy--prompt-extra ""))
     (let (head tail)
       (if (string-match "\\(.*\\): \\'" ivy--prompt)
@@ -1287,17 +1554,21 @@ Insert .* between each char."
                                   ivy--full-length)
                              ivy--length)))
                ivy--prompt-extra
-               tail)
-              (if ivy--directory
-                  (abbreviate-file-name ivy--directory)
-                ""))))
+               tail)))
+            (d-str (if ivy--directory
+                       (abbreviate-file-name ivy--directory)
+                     "")))
         (save-excursion
           (goto-char (point-min))
           (delete-region (point-min) (minibuffer-prompt-end))
-          (when (> (length n-str) (window-width))
-            (setq n-str (concat (substring n-str 0
-                                           (max (- (window-width) 30)
-                                                10)) "... ")))
+          (if (> (+ (mod (+ (length n-str) (length d-str)) (window-width))
+                    (length ivy-text))
+                 (window-width))
+              (setq n-str (concat n-str "\n" d-str))
+            (setq n-str (concat n-str d-str)))
+          (let ((regex (format "\\([^\n]\\{%d\\}\\)[^\n]" (window-width))))
+            (while (string-match regex n-str)
+              (setq n-str (replace-match (concat (match-string 1 n-str) "\n") 
nil t n-str 1))))
           (set-text-properties 0 (length n-str)
                                `(face minibuffer-prompt ,@std-props)
                                n-str)
@@ -1310,7 +1581,7 @@ Insert .* between each char."
         (constrain-to-field nil (point-max))))))
 
 (defun ivy--set-match-props (str match props)
-  "Set STR text proprties that match MATCH to PROPS."
+  "Set STR text properties that match MATCH to PROPS."
   (when (string-match match str)
     (set-text-properties
      (match-beginning 0)
@@ -1341,6 +1612,8 @@ Insert .* between each char."
   "Insert Ivy completions display.
 Should be run via minibuffer `post-command-hook'."
   (when (memq 'ivy--exhibit post-command-hook)
+    (let ((inhibit-field-text-motion nil))
+      (constrain-to-field nil (point-max)))
     (setq ivy-text (ivy--input))
     (if (ivy-state-dynamic-collection ivy-last)
         ;; while-no-input would cause annoying
@@ -1364,7 +1637,7 @@ Should be run via minibuffer `post-command-hook'."
                               (string-match "\\`[[:alpha:]]:/" 
default-directory))
                          (ivy--cd (match-string 0 default-directory))
                        (ivy--cd "/")))
-                   (when (string-match "[[:alpha:]]:/" ivy-text)
+                   (when (string-match "[[:alpha:]]:/$" ivy-text)
                      (let ((drive-root (match-string 0 ivy-text)))
                        (when (file-exists-p drive-root)
                          (ivy--cd drive-root)))))
@@ -1383,8 +1656,9 @@ Should be run via minibuffer `post-command-hook'."
                        (ivy--buffer-list "" ivy-use-virtual-buffers)))
                (setq ivy--old-re nil))))
       (ivy--insert-minibuffer
-       (ivy--format
-        (ivy--filter ivy-text ivy--all-candidates)))
+       (with-current-buffer (ivy-state-buffer ivy-last)
+         (ivy--format
+          (ivy--filter ivy-text ivy--all-candidates))))
       (setq ivy--old-text ivy-text))))
 
 (defun ivy--insert-minibuffer (text)
@@ -1406,18 +1680,17 @@ Should be run via minibuffer `post-command-hook'."
       (ivy--resize-minibuffer-to-fit))))
 
 (defun ivy--resize-minibuffer-to-fit ()
-  "Resize the minibuffer window so it has enough space to display
-all of the text contained in the minibuffer."
+  "Resize the minibuffer window size to fit the text in the minibuffer."
   (with-selected-window (minibuffer-window)
     (if (fboundp 'window-text-pixel-size)
         (let ((text-height (cdr (window-text-pixel-size)))
               (body-height (window-body-height nil t)))
           (when (> text-height body-height)
             (window-resize nil (- text-height body-height) nil t t)))
-        (let ((text-height (count-screen-lines))
-              (body-height (window-body-height)))
-          (when (> text-height body-height)
-            (window-resize nil (- text-height body-height) nil t))))))
+      (let ((text-height (count-screen-lines))
+            (body-height (window-body-height)))
+        (when (> text-height body-height)
+          (window-resize nil (- text-height body-height) nil t))))))
 
 (declare-function colir-blend-face-background "ext:colir")
 
@@ -1441,109 +1714,296 @@ all of the text contained in the minibuffer."
        (font-lock-append-text-property 0 (length str) 'face face str))))
   str)
 
+(declare-function flx-make-string-cache "ext:flx")
+(declare-function flx-score "ext:flx")
+
+(defvar ivy--flx-cache nil)
+
+(eval-after-load 'flx
+  '(setq ivy--flx-cache (flx-make-string-cache)))
+
+(defun ivy-toggle-case-fold ()
+  "Toggle the case folding between nil and auto.
+In any completion session, the case folding starts in auto:
+
+- when the input is all lower case, `case-fold-search' is t
+- otherwise nil.
+
+You can toggle this to make `case-fold-search' nil regardless of input."
+  (interactive)
+  (setq ivy-case-fold-search
+        (if ivy-case-fold-search
+            nil
+          'auto))
+  ;; reset cache so that the candidate list updates
+  (setq ivy--old-re nil))
+
 (defun ivy--filter (name candidates)
   "Return all items that match NAME in CANDIDATES.
 CANDIDATES are assumed to be static."
-  (let* ((re (funcall ivy--regex-function name))
-         (re-str (if (listp re) (caar re) re))
-         (matcher (ivy-state-matcher ivy-last))
-         (case-fold-search (string= name (downcase name)))
-         (cands (cond
-                  (matcher
-                   (funcall matcher re candidates))
-                  ((and (equal re ivy--old-re)
-                        ivy--old-cands)
-                   ivy--old-cands)
-                  ((and ivy--old-re
-                        (stringp re)
-                        (stringp ivy--old-re)
-                        (not (string-match "\\\\" ivy--old-re))
-                        (not (equal ivy--old-re ""))
-                        (memq (cl-search
-                               (if (string-match "\\\\)\\'" ivy--old-re)
-                                   (substring ivy--old-re 0 -2)
-                                 ivy--old-re)
-                               re)
-                              '(0 2)))
-                   (ignore-errors
-                     (cl-remove-if-not
-                      (lambda (x) (string-match re x))
-                      ivy--old-cands)))
-                  (t
-                   (let ((re-list (if (stringp re) (list (cons re t)) re))
-                         (res candidates))
-                     (dolist (re re-list)
-                       (setq res
-                             (ignore-errors
-                               (funcall
-                                (if (cdr re)
-                                    #'cl-remove-if-not
-                                  #'cl-remove-if)
-                                (let ((re (car re)))
-                                  (lambda (x) (string-match re x)))
-                                res))))
-                     res))))
-         (tail (nthcdr ivy--index ivy--old-cands))
-         idx)
-    (when (and tail ivy--old-cands (not (equal "^" ivy--old-re)))
-      (unless (and (not (equal re-str ivy--old-re))
-                   (or (setq ivy--index
-                             (or
-                              (cl-position (if (and (> (length re-str) 0)
-                                                    (eq ?^ (aref re-str 0)))
-                                               (substring re-str 1)
-                                             re-str) cands
-                                             :test #'equal)
-                              (and ivy--directory
-                                   (cl-position
-                                    (concat re-str "/") cands
-                                    :test #'equal))))))
-        (while (and tail (null idx))
-          ;; Compare with eq to handle equal duplicates in cands
-          (setq idx (cl-position (pop tail) cands)))
-        (setq ivy--index (or idx 0))))
-    (when (and (string= name "") (not (equal ivy--old-re "")))
+  (let ((re (funcall ivy--regex-function name)))
+    (if (and (equal re ivy--old-re)
+             ivy--old-cands)
+        ;; quick caching for "C-n", "C-p" etc.
+        ivy--old-cands
+      (let* ((re-str (if (listp re) (caar re) re))
+             (matcher (ivy-state-matcher ivy-last))
+             (case-fold-search
+              (and ivy-case-fold-search
+                   (string= name (downcase name))))
+             (cands (cond
+                     (matcher
+                      (funcall matcher re candidates))
+                     ((and ivy--old-re
+                           (stringp re)
+                           (stringp ivy--old-re)
+                           (not (string-match "\\\\" ivy--old-re))
+                           (not (equal ivy--old-re ""))
+                           (memq (cl-search
+                                  (if (string-match "\\\\)\\'" ivy--old-re)
+                                       (substring ivy--old-re 0 -2)
+                                     ivy--old-re)
+                                   re)
+                                  '(0 2)))
+                       (ignore-errors
+                         (cl-remove-if-not
+                          (lambda (x) (string-match re x))
+                          ivy--old-cands)))
+                      (t
+                       (let ((re-list (if (stringp re) (list (cons re t)) re))
+                             (res candidates))
+                         (dolist (re re-list)
+                           (setq res
+                                 (ignore-errors
+                                   (funcall
+                                    (if (cdr re)
+                                        #'cl-remove-if-not
+                                      #'cl-remove-if)
+                                    (let ((re-str (car re)))
+                                      (lambda (x) (string-match re-str x)))
+                                    res))))
+                         res)))))
+        (ivy--recompute-index name re-str cands)
+        (setq ivy--old-re (if cands re-str ""))
+        (setq ivy--old-cands (ivy--sort name cands))))))
+
+(defcustom ivy-sort-matches-functions-alist '((t . nil))
+  "An alist of functions used to sort the matching candidates.
+
+This is different from `ivy-sort-functions-alist', which is used
+to sort the whole collection only once.  The functions taken from
+here are instead used on each input change, but they are used
+only on already matching candidates, not on all of them.
+
+The alist KEY is a collection function or t to match previously
+not matched collection functions.
+
+The alist VAL is a sorting function with the signature of
+`ivy--prefix-sort'.")
+
+(defun ivy--sort-files-by-date (_name candidates)
+  "Re-soft CANDIDATES according to file modification date."
+  (let ((default-directory ivy--directory))
+    (cl-sort (copy-sequence candidates)
+             (lambda (f1 f2)
+               (time-less-p
+                (nth 5 (file-attributes f2))
+                (nth 5 (file-attributes f1)))))))
+
+(defun ivy--sort (name candidates)
+  "Re-sort CANDIDATES by NAME.
+All CANDIDATES are assumed to match NAME."
+  (let ((key (or (ivy-state-caller ivy-last)
+                 (when (functionp (ivy-state-collection ivy-last))
+                   (ivy-state-collection ivy-last))))
+        fun)
+    (cond ((and (require 'flx nil 'noerror)
+                (eq ivy--regex-function 'ivy--regex-fuzzy))
+           (ivy--flx-sort name candidates))
+          ((setq fun (cdr (or (assoc key ivy-sort-matches-functions-alist)
+                              (assoc t ivy-sort-matches-functions-alist))))
+           (funcall fun name candidates))
+          (t
+           candidates))))
+
+(defun ivy--prefix-sort (name candidates)
+  "Re-sort CANDIDATES.
+Prefix matches to NAME are put ahead of the list."
+  (if (or (string-match "^\\^" name) (string= name ""))
+      candidates
+    (let ((re-prefix (concat "^" (funcall ivy--regex-function name)))
+          res-prefix
+          res-noprefix)
+      (dolist (s candidates)
+        (if (string-match re-prefix s)
+            (push s res-prefix)
+          (push s res-noprefix)))
+      (nconc
+       (nreverse res-prefix)
+       (nreverse res-noprefix)))))
+
+(defun ivy--recompute-index (name re-str cands)
+  (let* ((caller (ivy-state-caller ivy-last))
+         (func (or (and caller (cdr (assoc caller ivy-index-functions-alist)))
+                   (cdr (assoc t ivy-index-functions-alist))
+                   #'ivy-recompute-index-zero)))
+    (unless (eq this-command 'ivy-resume)
       (setq ivy--index
-            (or (cl-position (ivy-state-preselect ivy-last)
-                             cands :test #'equal)
-                ivy--index)))
-    (setq ivy--old-re (if cands re-str ""))
-    (setq ivy--old-cands cands)))
+            (or
+             (cl-position (if (and (> (length re-str) 0)
+                                   (eq ?^ (aref re-str 0)))
+                              (substring re-str 1)
+                            re-str) cands
+                            :test #'equal)
+             (and ivy--directory
+                  (cl-position
+                   (concat re-str "/") cands
+                   :test #'equal))
+             (and (not (string= name ""))
+                  (not (and (require 'flx nil 'noerror)
+                            (eq ivy--regex-function 'ivy--regex-fuzzy)
+                            (< (length cands) 200)))
+
+                  (cl-position (nth ivy--index ivy--old-cands)
+                               cands))
+             (funcall func re-str cands))))
+    (when (and (or (string= name "")
+                   (string= name "^"))
+               (not (equal ivy--old-re "")))
+      (setq ivy--index
+            (or (ivy--preselect-index
+                 (ivy-state-preselect ivy-last)
+                 cands)
+                ivy--index)))))
+
+(defun ivy-recompute-index-swiper (_re-str cands)
+  (let ((tail (nthcdr ivy--index ivy--old-cands))
+        idx)
+    (if (and tail ivy--old-cands (not (equal "^" ivy--old-re)))
+        (progn
+          (while (and tail (null idx))
+            ;; Compare with eq to handle equal duplicates in cands
+            (setq idx (cl-position (pop tail) cands)))
+          (or idx 0))
+      (if ivy--old-cands
+          ivy--index
+        ;; already in ivy-state-buffer
+        (let ((n (line-number-at-pos))
+              (res 0)
+              (i 0))
+          (dolist (c cands)
+            (when (eq n (read (get-text-property 0 'display c)))
+              (setq res i))
+            (cl-incf i))
+          res)))))
+
+(defun ivy-recompute-index-swiper-async (_re-str cands)
+  (let ((tail (nthcdr ivy--index ivy--old-cands))
+        idx)
+    (if (and tail ivy--old-cands (not (equal "^" ivy--old-re)))
+        (progn
+          (while (and tail (null idx))
+            ;; Compare with `equal', since the collection is re-created
+            ;; each time with `split-string'
+            (setq idx (cl-position (pop tail) cands :test #'equal)))
+          (or idx 0))
+      ivy--index)))
+
+(defun ivy-recompute-index-zero (_re-str _cands)
+  0)
+
+(defun ivy--flx-sort (name cands)
+  "Sort according to closeness to string NAME the string list CANDS."
+  (condition-case nil
+      (if (and cands
+               (< (length cands) 200))
+          (let* ((flx-name (if (string-match "^\\^" name)
+                               (substring name 1)
+                             name))
+                 (cands-with-score
+                  (delq nil
+                        (mapcar
+                         (lambda (x)
+                           (let ((score (car (flx-score x flx-name 
ivy--flx-cache))))
+                             (and score
+                                  (cons score x))))
+                         cands))))
+            (if cands-with-score
+                (mapcar #'cdr
+                        (sort cands-with-score
+                              (lambda (x y)
+                                (> (car x) (car y)))))
+              cands))
+        cands)
+    (error
+     cands)))
 
-(defvar ivy-format-function 'ivy-format-function-default
+(defcustom ivy-format-function 'ivy-format-function-default
   "Function to transform the list of candidates into a string.
-This string will be inserted into the minibuffer.")
-
-(defun ivy-format-function-default (cands)
-  "Transform CANDS into a string for minibuffer."
-  (if (bound-and-true-p truncate-lines)
-      (mapconcat #'identity cands "\n")
-    (let ((ww (- (window-width)
-                 (if (and (boundp 'fringe-mode) (eq fringe-mode 0)) 1 0))))
-      (mapconcat
-       (lambda (s)
-         (if (> (length s) ww)
-             (concat (substring s 0 (- ww 3)) "...")
-           s))
-       cands "\n"))))
-
-(defun ivy-format-function-arrow (cands)
-  "Transform CANDS into a string for minibuffer."
+This string is inserted into the minibuffer."
+  :type '(choice
+          (const :tag "Default" ivy-format-function-default)
+          (const :tag "Arrow prefix" ivy-format-function-arrow)
+          (const :tag "Full line" ivy-format-function-line)))
+
+(defun ivy--truncate-string (str width)
+  "Truncate STR to WIDTH."
+  (if (> (string-width str) width)
+      (concat (substring str 0 (min (- width 3)
+                                    (- (length str) 3))) "...")
+    str))
+
+(defun ivy--format-function-generic (selected-fn other-fn cand-pairs separator)
+  "Transform CAND-PAIRS into a string for minibuffer.
+SELECTED-FN and OTHER-FN each take two string arguments.
+SEPARATOR is used to join the candidates."
   (let ((i -1))
     (mapconcat
-     (lambda (s)
-       (concat (if (eq (cl-incf i) ivy--index)
-                   "> "
-                 "  ")
-               s))
-     cands "\n")))
-
-(defcustom swiper-minibuffer-faces
-  '(swiper-minibuffer-match-face-1
-    swiper-minibuffer-match-face-2
-    swiper-minibuffer-match-face-3
-    swiper-minibuffer-match-face-4)
-  "List of `swiper' faces for minibuffer group matches.")
+     (lambda (pair)
+       (let ((str (car pair))
+             (extra (cdr pair))
+             (curr (eq (cl-incf i) ivy--index)))
+         (if curr
+             (funcall selected-fn str extra)
+           (funcall other-fn str extra))))
+     cand-pairs
+     separator)))
+
+(defun ivy-format-function-default (cand-pairs)
+  "Transform CAND-PAIRS into a string for minibuffer."
+  (ivy--format-function-generic
+   (lambda (str extra)
+     (concat (ivy--add-face str 'ivy-current-match) extra))
+   #'concat
+   cand-pairs
+   "\n"))
+
+(defun ivy-format-function-arrow (cand-pairs)
+  "Transform CAND-PAIRS into a string for minibuffer."
+  (ivy--format-function-generic
+   (lambda (str extra)
+     (concat "> " (ivy--add-face str 'ivy-current-match) extra))
+   (lambda (str extra)
+     (concat "  " str extra))
+   cand-pairs
+   "\n"))
+
+(defun ivy-format-function-line (cand-pairs)
+  "Transform CAND-PAIRS into a string for minibuffer."
+  (ivy--format-function-generic
+   (lambda (str extra)
+     (ivy--add-face (concat str extra "\n") 'ivy-current-match))
+   (lambda (str extra)
+     (concat str extra "\n"))
+   cand-pairs
+   ""))
+
+(defcustom ivy-minibuffer-faces
+  '(ivy-minibuffer-match-face-1
+    ivy-minibuffer-match-face-2
+    ivy-minibuffer-match-face-3
+    ivy-minibuffer-match-face-4)
+  "List of `ivy' faces for minibuffer group matches.")
 
 (defun ivy--format-minibuffer-line (str)
   (let ((start 0)
@@ -1558,12 +2018,12 @@ This string will be inserted into the minibuffer.")
           (while (<= i ivy--subexps)
             (let ((face
                    (cond ((zerop ivy--subexps)
-                          (cadr swiper-minibuffer-faces))
+                          (cadr ivy-minibuffer-faces))
                          ((zerop i)
-                          (car swiper-minibuffer-faces))
+                          (car ivy-minibuffer-faces))
                          (t
-                          (nth (1+ (mod (+ i 2) (1- (length 
swiper-minibuffer-faces))))
-                               swiper-minibuffer-faces)))))
+                          (nth (1+ (mod (+ i 2) (1- (length 
ivy-minibuffer-faces))))
+                               ivy-minibuffer-faces)))))
               (if (fboundp 'add-face-text-property)
                   (add-face-text-property
                    (match-beginning i)
@@ -1594,20 +2054,27 @@ CANDS is a list of strings."
            (start (max 0 (min start (- end (1- ivy-height)))))
            (cands (cl-subseq cands start end))
            (index (- ivy--index start)))
-      (when ivy--directory
-        (setq cands (mapcar (lambda (x)
-                              (if (string-match-p "/\\'" x)
-                                  (propertize x 'face 'ivy-subdir)
-                                x))
-                            cands)))
+      (cond (ivy--directory
+             (setq cands (mapcar (lambda (x)
+                                   (if (string-match-p "/\\'" x)
+                                       (propertize x 'face 'ivy-subdir)
+                                     x))
+                                 cands)))
+            ((eq (ivy-state-collection ivy-last) 'internal-complete-buffer)
+             (setq cands (mapcar (lambda (x)
+                                   (let ((b (get-buffer x)))
+                                     (if (and b
+                                              (buffer-file-name b)
+                                              (buffer-modified-p b))
+                                         (propertize x 'face 
'ivy-modified-buffer)
+                                       x)))
+                                 cands))))
       (setq ivy--current (copy-sequence (nth index cands)))
-      (setq cands (mapcar
-                   #'ivy--format-minibuffer-line
-                   cands))
-      (setf (nth index cands)
-            (ivy--add-face (nth index cands) 'ivy-current-match))
       (let* ((ivy--index index)
-             (res (concat "\n" (funcall ivy-format-function cands))))
+             (cand-pairs (mapcar
+                          (lambda (cand)
+                            (cons (ivy--format-minibuffer-line cand) nil)) 
cands))
+             (res (concat "\n" (funcall ivy-format-function cand-pairs))))
         (put-text-property 0 (length res) 'read-only nil res)
         res))))
 
@@ -1616,8 +2083,13 @@ CANDS is a list of strings."
 
 (defvar recentf-list)
 
-(defface ivy-virtual '((t :inherit font-lock-builtin-face))
-  "Face used by Ivy for matching virtual buffer names.")
+(defcustom ivy-virtual-abbreviate 'name
+  "The mode of abbreviation for virtual buffer names."
+  :type '(choice
+          (const :tag "Only name" name)
+          (const :tag "Full path" full)
+          ;; eventually, uniquify
+          ))
 
 (defun ivy--virtual-buffers ()
   "Adapted from `ido-add-virtual-buffers-to-list'."
@@ -1632,7 +2104,10 @@ CANDS is a list of strings."
                            (delq nil (mapcar (lambda (bookmark)
                                                (cdr (assoc 'filename 
bookmark)))
                                              bookmarks)))))
-      (setq name (file-name-nondirectory head))
+      (setq name
+            (if (eq ivy-virtual-abbreviate 'name)
+                (file-name-nondirectory head)
+              (expand-file-name head)))
       (when (equal name "")
         (setq name (file-name-nondirectory (directory-file-name head))))
       (when (equal name "")
@@ -1746,7 +2221,7 @@ BUFFER may be a string or nil."
             (goto-char pt)
           (setq amend (buffer-substring-no-properties pt (point))))))
     (when amend
-      (insert amend))))
+      (insert (replace-regexp-in-string "  +" " " amend)))))
 
 (defun ivy-kill-ring-save ()
   "Store the current candidates into the kill ring.
@@ -1780,7 +2255,7 @@ Don't finish completion."
 
 (defun ivy-reverse-i-search ()
   "Enter a recursive `ivy-read' session using the current history.
-The selected history element will be inserted into the minibufer."
+The selected history element will be inserted into the minibuffer."
   (interactive)
   (let ((enable-recursive-minibuffers t)
         (history (symbol-value (ivy-state-history ivy-last)))
@@ -1801,6 +2276,170 @@ The selected history element will be inserted into the 
minibufer."
   (setq ivy--all-candidates
         (ivy--filter ivy-text ivy--all-candidates)))
 
+;;* Occur
+(defvar-local ivy-occur-last nil
+  "Buffer-local value of `ivy-last'.
+Can't re-use `ivy-last' because using e.g. `swiper' in the same
+buffer would modify `ivy-last'.")
+
+(defvar ivy-occur-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map [mouse-1] 'ivy-occur-click)
+    (define-key map (kbd "RET") 'ivy-occur-press)
+    (define-key map (kbd "j") 'next-line)
+    (define-key map (kbd "k") 'previous-line)
+    (define-key map (kbd "h") 'backward-char)
+    (define-key map (kbd "l") 'forward-char)
+    (define-key map (kbd "g") 'ivy-occur-press)
+    (define-key map (kbd "a") 'ivy-occur-read-action)
+    (define-key map (kbd "o") 'ivy-occur-dispatch)
+    (define-key map (kbd "q") 'quit-window)
+    map)
+  "Keymap for Ivy Occur mode.")
+
+(define-derived-mode ivy-occur-mode fundamental-mode "Ivy-Occur"
+  "Major mode for output from \\[ivy-occur].
+
+\\{ivy-occur-mode-map}")
+
+(defvar ivy-occur-grep-mode-map
+  (let ((map (copy-keymap ivy-occur-mode-map)))
+    (define-key map (kbd "C-x C-q") 'ivy-wgrep-change-to-wgrep-mode)
+    map)
+  "Keymap for Ivy Occur Grep mode.")
+
+(define-derived-mode ivy-occur-grep-mode grep-mode "Ivy-Occur"
+  "Major mode for output from \\[ivy-occur].
+
+\\{ivy-occur-grep-mode-map}")
+
+(defvar counsel-git-grep-cmd)
+
+(defun ivy-occur ()
+  "Stop completion and put the current matches into a new buffer.
+
+The new buffer remembers current action(s).
+
+While in the *ivy-occur* buffer, selecting a candidate with RET or
+a mouse click will call the appropriate action for that candidate.
+
+There is no limit on the number of *ivy-occur* buffers."
+  (interactive)
+  (let ((buffer
+         (generate-new-buffer
+          (format "*ivy-occur%s \"%s\"*"
+                  (let (caller)
+                    (if (setq caller (ivy-state-caller ivy-last))
+                        (concat " " (prin1-to-string caller))
+                      ""))
+                  ivy-text)))
+        (do-grep (eq (ivy-state-caller ivy-last) 'counsel-git-grep)))
+    (with-current-buffer buffer
+      (if do-grep
+          (progn
+            (setq ivy--old-cands
+                  (split-string
+                   (shell-command-to-string
+                    (format counsel-git-grep-cmd ivy--old-re))
+                   "\n"
+                   t))
+            (ivy-occur-grep-mode))
+        (ivy-occur-mode))
+      (setf (ivy-state-text ivy-last) ivy-text)
+      (setq ivy-occur-last ivy-last)
+      (setq-local ivy--directory ivy--directory)
+      (let ((inhibit-read-only t))
+        (erase-buffer)
+        (when do-grep
+          ;; Need precise number of header lines for `wgrep' to work.
+          (insert (format "-*- mode:grep; default-directory: %S -*-\n\n\n"
+                          default-directory)))
+        (insert (format "%d candidates:\n" (length ivy--old-cands)))
+        (dolist (cand ivy--old-cands)
+          (let ((str (if do-grep
+                         (concat "./" cand)
+                       (concat "    " cand))))
+            (add-text-properties
+             0 (length str)
+             `(mouse-face
+               highlight
+               help-echo "mouse-1: call ivy-action")
+             str)
+            (insert str "\n")))))
+    (ivy-exit-with-action
+     `(lambda (_) (pop-to-buffer ,buffer)))))
+
+(declare-function wgrep-change-to-wgrep-mode "ext:wgrep")
+
+(defun ivy-wgrep-change-to-wgrep-mode ()
+  "Forward to `wgrep-change-to-wgrep-mode'."
+  (interactive)
+  (if (require 'wgrep nil 'noerror)
+      (wgrep-change-to-wgrep-mode)
+    (error "Package wgrep isn't installed")))
+
+(defun ivy-occur-read-action ()
+  "Select one of the available actions as the current one."
+  (interactive)
+  (let ((ivy-last ivy-occur-last))
+    (ivy-read-action)))
+
+(defun ivy-occur-dispatch ()
+  "Call one of the available actions on the current item."
+  (interactive)
+  (let* ((state-action (ivy-state-action ivy-occur-last))
+         (actions (if (symbolp state-action)
+                      state-action
+                    (copy-sequence state-action))))
+    (unwind-protect
+         (progn
+           (ivy-occur-read-action)
+           (ivy-occur-press))
+      (setf (ivy-state-action ivy-occur-last) actions))))
+
+(defun ivy-occur-click (event)
+  "Execute action for the current candidate.
+EVENT gives the mouse position."
+  (interactive "e")
+  (let ((window (posn-window (event-end event)))
+        (pos (posn-point (event-end event))))
+    (with-current-buffer (window-buffer window)
+      (goto-char pos)
+      (ivy-occur-press))))
+
+(defun ivy-occur-press ()
+  "Execute action for the current candidate."
+  (interactive)
+  (require 'pulse)
+  (when (save-excursion
+          (beginning-of-line)
+          (looking-at "\\(?:./\\|    \\)\\(.*\\)$"))
+    (let* ((ivy-last ivy-occur-last)
+           (ivy-text (ivy-state-text ivy-last))
+           (str (buffer-substring
+                 (match-beginning 1)
+                 (match-end 1)))
+           (coll (ivy-state-collection ivy-last))
+           (action (ivy--get-action ivy-last))
+           (ivy-exit 'done))
+      (with-ivy-window
+        (funcall action
+                 (if (and (consp coll)
+                          (consp (car coll)))
+                     (cdr (assoc str coll))
+                   str))
+        (if (memq (ivy-state-caller ivy-last)
+                  '(swiper counsel-git-grep))
+            (with-current-buffer (window-buffer (selected-window))
+              (swiper--cleanup)
+              (swiper--add-overlays
+               (ivy--regex ivy-text)
+               (line-beginning-position)
+               (line-end-position)
+               (selected-window))
+              (run-at-time 0.5 nil 'swiper--cleanup))
+          (pulse-momentary-highlight-one-line (point)))))))
+
 (provide 'ivy)
 
 ;;; ivy.el ends here
diff --git a/packages/swiper/swiper.el b/packages/swiper/swiper.el
index 1b2d906..d9bf724 100644
--- a/packages/swiper/swiper.el
+++ b/packages/swiper/swiper.el
@@ -4,7 +4,7 @@
 
 ;; Author: Oleh Krehel <address@hidden>
 ;; URL: https://github.com/abo-abo/swiper
-;; Version: 0.5.1
+;; Version: 0.7.0
 ;; Package-Requires: ((emacs "24.1"))
 ;; Keywords: matching
 
@@ -61,34 +61,17 @@
   '((t (:inherit isearch-fail)))
   "Face for `swiper' matches modulo 3.")
 
-(defface swiper-minibuffer-match-face-1
-  '((((class color) (background light))
-     :background "#d3d3d3")
-    (((class color) (background dark))
-     :background "#555555"))
-  "The background face for `swiper' minibuffer matches."
-  :group 'function-args-faces)
-
-(defface swiper-minibuffer-match-face-2
-  '((((class color) (background light))
-     :background "#e99ce8" :weight bold)
-    (((class color) (background dark))
-     :background "#777777" :weight bold))
-  "Face for `swiper' minibuffer matches modulo 1.")
-
-(defface swiper-minibuffer-match-face-3
-  '((((class color) (background light))
-     :background "#bbbbff" :weight bold)
-    (((class color) (background dark))
-     :background "#7777ff" :weight bold))
-  "Face for `swiper' minibuffer matches modulo 2.")
-
-(defface swiper-minibuffer-match-face-4
-  '((((class color) (background light))
-     :background "#ffbbff" :weight bold)
-    (((class color) (background dark))
-     :background "#8a498a" :weight bold))
-  "Face for `swiper' minibuffer matches modulo 3.")
+(define-obsolete-face-alias 'swiper-minibuffer-match-face-1
+    'ivy-minibuffer-match-face-1 "0.6.0")
+
+(define-obsolete-face-alias 'swiper-minibuffer-match-face-2
+    'ivy-minibuffer-match-face-2 "0.6.0")
+
+(define-obsolete-face-alias 'swiper-minibuffer-match-face-3
+    'ivy-minibuffer-match-face-3 "0.6.0")
+
+(define-obsolete-face-alias 'swiper-minibuffer-match-face-4
+    'ivy-minibuffer-match-face-4 "0.6.0")
 
 (defface swiper-line-face
   '((t (:inherit highlight)))
@@ -109,6 +92,8 @@
     (define-key map (kbd "M-q") 'swiper-query-replace)
     (define-key map (kbd "C-l") 'swiper-recenter-top-bottom)
     (define-key map (kbd "C-'") 'swiper-avy)
+    (define-key map (kbd "C-7") 'swiper-mc)
+    (define-key map (kbd "C-c C-f") 'swiper-toggle-face-matching)
     map)
   "Keymap for swiper.")
 
@@ -120,37 +105,93 @@
     (let* ((enable-recursive-minibuffers t)
            (from (ivy--regex ivy-text))
            (to (query-replace-read-to from "Query replace" t)))
-      (delete-minibuffer-contents)
-      (ivy-set-action (lambda (_)
-                        (with-ivy-window
-                          (move-beginning-of-line 1)
-                          (perform-replace from to
-                                           t t nil))))
       (swiper--cleanup)
-      (exit-minibuffer))))
+      (ivy-exit-with-action
+       (lambda (_)
+         (with-ivy-window
+           (move-beginning-of-line 1)
+           (perform-replace from to
+                            t t nil)))))))
 
 (defvar avy-background)
 (defvar avy-all-windows)
+(defvar avy-style)
+(defvar avy-keys)
 (declare-function avy--regex-candidates "ext:avy")
 (declare-function avy--process "ext:avy")
 (declare-function avy--overlay-post "ext:avy")
 (declare-function avy-action-goto "ext:avy")
+(declare-function avy--done "ext:avy")
+(declare-function avy--make-backgrounds "ext:avy")
+(declare-function avy-window-list "ext:avy")
+(declare-function avy-read "ext:avy")
+(declare-function avy-read-de-bruijn "ext:avy")
+(declare-function avy-tree "ext:avy")
+(declare-function avy-push-mark "ext:avy")
+(declare-function avy--remove-leading-chars "ext:avy")
 
 ;;;###autoload
 (defun swiper-avy ()
   "Jump to one of the current swiper candidates."
   (interactive)
   (unless (string= ivy-text "")
-    (with-ivy-window
-      (let* ((avy-all-windows nil)
-             (candidates
-              (avy--regex-candidates
-               (ivy--regex ivy-text)))
-             (avy-background nil)
-             (candidate
-              (avy--process candidates #'avy--overlay-post)))
+    (let* ((avy-all-windows nil)
+           (candidates (append
+                        (with-ivy-window
+                          (avy--regex-candidates
+                           (ivy--regex ivy-text)))
+                        (save-excursion
+                          (save-restriction
+                            (narrow-to-region (window-start) (window-end))
+                            (goto-char (point-min))
+                            (forward-line)
+                            (let ((cands))
+                              (while (< (point) (point-max))
+                                (push (cons (1+ (point))
+                                            (selected-window))
+                                      cands)
+                                (forward-line))
+                              cands)))))
+           (candidate (unwind-protect
+                          (prog2
+                              (avy--make-backgrounds
+                               (append (avy-window-list)
+                                       (list  (ivy-state-window ivy-last))))
+                              (if (eq avy-style 'de-bruijn)
+                                  (avy-read-de-bruijn
+                                   candidates avy-keys)
+                                (avy-read (avy-tree candidates avy-keys)
+                                          #'avy--overlay-post
+                                          #'avy--remove-leading-chars))
+                            (avy-push-mark))
+                        (avy--done))))
+      (if (window-minibuffer-p (cdr candidate))
+          (progn
+            (ivy-set-index (- (line-number-at-pos (car candidate)) 2))
+            (ivy--exhibit)
+            (ivy-done)
+            (ivy-call))
         (ivy-quit-and-run
-         (avy-action-goto candidate))))))
+         (avy-action-goto (caar candidate)))))))
+
+(declare-function mc/create-fake-cursor-at-point "ext:multiple-cursors-core")
+(declare-function multiple-cursors-mode "ext:multiple-cursors-core")
+
+;;;###autoload
+(defun swiper-mc ()
+  (interactive)
+  (unless (require 'multiple-cursors nil t)
+    (error "multiple-cursors isn't installed"))
+  (let ((cands (nreverse ivy--old-cands)))
+    (unless (string= ivy-text "")
+      (ivy-exit-with-action
+       (lambda (_)
+         (let (cand)
+           (while (setq cand (pop cands))
+             (swiper--action cand)
+             (when cands
+               (mc/create-fake-cursor-at-point))))
+         (multiple-cursors-mode 1))))))
 
 (defun swiper-recenter-top-bottom (&optional arg)
   "Call (`recenter-top-bottom' ARG)."
@@ -166,16 +207,28 @@
                                  gnus-summary-mode
                                  gnus-article-mode
                                  gnus-group-mode
-                                 emms-playlist-mode erc-mode
+                                 emms-playlist-mode
+                                 emms-stream-mode
+                                 erc-mode
                                  org-agenda-mode
                                  dired-mode
                                  jabber-chat-mode
                                  elfeed-search-mode
+                                 elfeed-show-mode
                                  fundamental-mode
                                  Man-mode
                                  woman-mode
                                  mu4e-view-mode
-                                 mu4e-headers-mode)))
+                                 mu4e-headers-mode
+                                 help-mode
+                                 debbugs-gnu-mode
+                                 occur-mode
+                                 occur-edit-mode
+                                 bongo-mode
+                                 eww-mode
+                                 twittering-mode
+                                 vc-dir-mode
+                                 w3m-mode)))
     (unless (> (buffer-size) 100000)
       (if (fboundp 'font-lock-ensure)
           (font-lock-ensure)
@@ -187,28 +240,67 @@
 (defvar swiper--width nil
   "Store the amount of digits needed for the longest line nubmer.")
 
-(defun swiper--candidates ()
-  "Return a list of this buffer lines."
+(defvar swiper-use-visual-line nil
+  "When non-nil, use `line-move' instead of `forward-line'.")
+
+(declare-function outline-show-all "outline")
+
+(defun swiper--candidates (&optional numbers-width)
+  "Return a list of this buffer lines.
+
+NUMBERS-WIDTH, when specified, is used for line numbers width
+spec, instead of calculating it as the log of the buffer line
+count."
+  (if (and visual-line-mode
+           ;; super-slow otherwise
+           (< (buffer-size) 20000))
+      (progn
+        (when (eq major-mode 'org-mode)
+          (require 'outline)
+          (if (fboundp 'outline-show-all)
+              (outline-show-all)
+            (with-no-warnings
+              (show-all))))
+        (setq swiper-use-visual-line t))
+    (setq swiper-use-visual-line nil))
   (let ((n-lines (count-lines (point-min) (point-max))))
     (unless (zerop n-lines)
-      (setq swiper--width (1+ (floor (log n-lines 10))))
+      (setq swiper--width (or numbers-width
+                              (1+ (floor (log n-lines 10)))))
       (setq swiper--format-spec
             (format "%%-%dd " swiper--width))
       (let ((line-number 0)
+            (advancer (if swiper-use-visual-line
+                          (lambda (arg) (line-move arg t))
+                        #'forward-line))
             candidates)
         (save-excursion
           (goto-char (point-min))
           (swiper-font-lock-ensure)
           (while (< (point) (point-max))
-            (let ((str (concat " " (buffer-substring
-                                    (line-beginning-position)
-                                    (line-end-position)))))
+            (let ((str (concat
+                        " "
+                        (replace-regexp-in-string
+                         "\t" "    "
+                         (if swiper-use-visual-line
+                             (buffer-substring
+                              (save-excursion
+                                (beginning-of-visual-line)
+                                (point))
+                              (save-excursion
+                                (end-of-visual-line)
+                                (point)))
+                           (buffer-substring
+                            (point)
+                            (line-end-position)))))))
+              (when (eq major-mode 'twittering-mode)
+                (remove-text-properties 0 (length str) '(field) str))
               (put-text-property 0 1 'display
                                  (format swiper--format-spec
                                          (cl-incf line-number))
                                  str)
               (push str candidates))
-            (forward-line 1))
+            (funcall advancer 1))
           (nreverse candidates))))))
 
 (defvar swiper--opoint 1
@@ -221,17 +313,13 @@ When non-nil, INITIAL-INPUT is the initial search 
pattern."
   (interactive)
   (swiper--ivy initial-input))
 
-(defvar swiper--anchor nil
-  "A line number to which the search should be anchored.")
-
-(defvar swiper--len 0
-  "The last length of input for which an anchoring was made.")
+(declare-function evil-jumper--set-jump "ext:evil-jumper")
 
 (defun swiper--init ()
   "Perform initialization common to both completion methods."
   (setq swiper--opoint (point))
-  (setq swiper--len 0)
-  (setq swiper--anchor (line-number-at-pos)))
+  (when (bound-and-true-p evil-jumper-mode)
+    (evil-jumper--set-jump)))
 
 (defun swiper--re-builder (str)
   "Transform STR into a swiper regex.
@@ -241,48 +329,84 @@ there have line numbers. In the buffer, `ivy--regex' 
should be used."
     ((equal str "")
      "")
     ((equal str "^")
+     (setq ivy--subexps 0)
      ".")
     ((string-match "^\\^" str)
      (setq ivy--old-re "")
      (let ((re (ivy--regex-plus (substring str 1))))
-       (format "^[0-9][0-9 ]\\{%d\\}%s"
-               swiper--width
-               (if (zerop ivy--subexps)
-                   (prog1 (format "\\(%s\\)" re)
-                     (setq ivy--subexps 1))
-                 re))))
+       (if (zerop ivy--subexps)
+           (prog1 (format "^ ?\\(%s\\)" re)
+             (setq ivy--subexps 1))
+         (format "^ %s" re))))
     (t
      (ivy--regex-plus str))))
 
 (defvar swiper-history nil
   "History for `swiper'.")
 
+(defvar swiper-invocation-face nil
+  "The face at the point of invocation of `swiper'.")
+
 (defun swiper--ivy (&optional initial-input)
   "`isearch' with an overview using `ivy'.
 When non-nil, INITIAL-INPUT is the initial search pattern."
   (interactive)
   (swiper--init)
+  (setq swiper-invocation-face
+        (plist-get (text-properties-at (point)) 'face))
   (let ((candidates (swiper--candidates))
-        (preselect (buffer-substring-no-properties
-                    (line-beginning-position)
-                    (line-end-position)))
+        (preselect
+         (if swiper-use-visual-line
+             (count-screen-lines
+              (point-min)
+              (save-excursion (beginning-of-visual-line) (point)))
+           (1- (line-number-at-pos))))
         (minibuffer-allow-text-properties t)
         res)
     (unwind-protect
-         (setq res (ivy-read
-                    "Swiper: "
-                    candidates
-                    :initial-input initial-input
-                    :keymap swiper-map
-                    :preselect preselect
-                    :require-match t
-                    :update-fn #'swiper--update-input-ivy
-                    :unwind #'swiper--cleanup
-                    :re-builder #'swiper--re-builder
-                    :history 'swiper-history))
-      (if (null ivy-exit)
-          (goto-char swiper--opoint)
-        (swiper--action res ivy-text)))))
+         (setq res
+               (ivy-read
+                "Swiper: "
+                candidates
+                :initial-input initial-input
+                :keymap swiper-map
+                :preselect preselect
+                :require-match t
+                :update-fn #'swiper--update-input-ivy
+                :unwind #'swiper--cleanup
+                :action #'swiper--action
+                :re-builder #'swiper--re-builder
+                :history 'swiper-history
+                :caller 'swiper))
+      (unless res
+        (goto-char swiper--opoint)))))
+
+(defun swiper-toggle-face-matching ()
+  "Toggle matching only the candidates with `swiper-invocation-face'."
+  (interactive)
+  (setf (ivy-state-matcher ivy-last)
+        (if (ivy-state-matcher ivy-last)
+            nil
+          #'swiper--face-matcher))
+  (setq ivy--old-re nil))
+
+(defun swiper--face-matcher (regexp candidates)
+  "Return REGEXP-matching CANDIDATES.
+Matched candidates should have `swiper-invocation-face'."
+  (cl-remove-if-not
+   (lambda (x)
+     (and
+      (string-match regexp x)
+      (let ((s (match-string 0 x))
+            (i 0))
+        (while (and (< i (length s))
+                    (text-property-any
+                     i (1+ i)
+                     'face swiper-invocation-face
+                     s))
+          (cl-incf i))
+        (eq i (length s)))))
+   candidates))
 
 (defun swiper--ensure-visible ()
   "Remove overlays hiding point."
@@ -315,30 +439,43 @@ When non-nil, INITIAL-INPUT is the initial search 
pattern."
              (num (if (string-match "^[0-9]+" str)
                       (string-to-number (match-string 0 str))
                     0)))
-        (goto-char (point-min))
-        (when (cl-plusp num)
+        (unless (eq this-command 'ivy-yank-word)
           (goto-char (point-min))
-          (forward-line (1- num))
-          (if (and (equal ivy-text "")
-                   (>= swiper--opoint (line-beginning-position))
-                   (<= swiper--opoint (line-end-position)))
-              (goto-char swiper--opoint)
-            (re-search-forward re (line-end-position) t))
-          (isearch-range-invisible (line-beginning-position)
-                                   (line-end-position))
-          (unless (and (>= (point) (window-start))
-                       (<= (point) (window-end (ivy-state-window ivy-last) t)))
-            (recenter)))
+          (when (cl-plusp num)
+            (goto-char (point-min))
+            (if swiper-use-visual-line
+                (line-move (1- num))
+              (forward-line (1- num)))
+            (if (and (equal ivy-text "")
+                     (>= swiper--opoint (line-beginning-position))
+                     (<= swiper--opoint (line-end-position)))
+                (goto-char swiper--opoint)
+              (re-search-forward re (line-end-position) t))
+            (isearch-range-invisible (line-beginning-position)
+                                     (line-end-position))
+            (unless (and (>= (point) (window-start))
+                         (<= (point) (window-end (ivy-state-window ivy-last) 
t)))
+              (recenter))))
         (swiper--add-overlays re)))))
 
-(defun swiper--add-overlays (re &optional beg end)
+(defun swiper--add-overlays (re &optional beg end wnd)
   "Add overlays for RE regexp in visible part of the current buffer.
-BEG and END, when specified, are the point bounds."
-  (let ((ov (make-overlay
-             (line-beginning-position)
-             (1+ (line-end-position)))))
+BEG and END, when specified, are the point bounds.
+WND, when specified is the window."
+  (setq wnd (or wnd (ivy-state-window ivy-last)))
+  (let ((ov (if visual-line-mode
+                (make-overlay
+                 (save-excursion
+                   (beginning-of-visual-line)
+                   (point))
+                 (save-excursion
+                   (end-of-visual-line)
+                   (point)))
+              (make-overlay
+               (line-beginning-position)
+               (1+ (line-end-position))))))
     (overlay-put ov 'face 'swiper-line-face)
-    (overlay-put ov 'window (ivy-state-window ivy-last))
+    (overlay-put ov 'window wnd)
     (push ov swiper--overlays)
     (let* ((wh (window-height))
            (beg (or beg (save-excursion
@@ -368,23 +505,31 @@ BEG and END, when specified, are the point bounds."
                                      swiper-faces)))))
                     (push overlay swiper--overlays)
                     (overlay-put overlay 'face face)
-                    (overlay-put overlay 'window (ivy-state-window ivy-last))
+                    (overlay-put overlay 'window wnd)
                     (overlay-put overlay 'priority i)))
                 (cl-incf i)))))))))
 
-(defun swiper--action (x input)
-  "Goto line X and search for INPUT."
+(defun swiper--action (x)
+  "Goto line X."
   (if (null x)
       (user-error "No candidates")
-    (goto-char (point-min))
-    (forward-line (1- (read (get-text-property 0 'display x))))
-    (re-search-forward
-     (ivy--regex input) (line-end-position) t)
-    (swiper--ensure-visible)
-    (when (/= (point) swiper--opoint)
-      (unless (and transient-mark-mode mark-active)
-        (push-mark swiper--opoint t)
-        (message "Mark saved where search started")))))
+    (with-ivy-window
+      (unless (equal (current-buffer)
+                     (ivy-state-buffer ivy-last))
+        (switch-to-buffer (ivy-state-buffer ivy-last)))
+      (goto-char (point-min))
+      (funcall (if swiper-use-visual-line
+                   #'line-move
+                 #'forward-line)
+               (1- (read (get-text-property 0 'display x))))
+      (re-search-forward
+       (ivy--regex ivy-text) (line-end-position) t)
+      (swiper--ensure-visible)
+      (when (/= (point) swiper--opoint)
+        (unless (and transient-mark-mode mark-active)
+          (when (eq ivy-exit 'done)
+            (push-mark swiper--opoint t)
+            (message "Mark saved where search started")))))))
 
 ;; (define-key isearch-mode-map (kbd "C-o") 'swiper-from-isearch)
 (defun swiper-from-isearch ()
@@ -411,13 +556,55 @@ BEG and END, when specified, are the point bounds."
 Run `swiper' for those buffers."
   (interactive)
   (setq swiper-multi-buffers nil)
-  (setq swiper-multi-candidates nil)
   (ivy-read (swiper-multi-prompt)
             'internal-complete-buffer
             :action 'swiper-multi-action-1)
   (ivy-read "Swiper: " swiper-multi-candidates
             :action 'swiper-multi-action-2
-            :unwind #'swiper--cleanup))
+            :unwind #'swiper--cleanup
+            :caller 'swiper-multi))
+
+(defun swiper-all ()
+  "Run `swiper' for all opened buffers."
+  (interactive)
+  (ivy-read "Swiper: " (swiper--multi-candidates
+                        (cl-remove-if-not
+                         #'buffer-file-name
+                         (buffer-list)))
+            :action 'swiper-multi-action-2
+            :unwind #'swiper--cleanup
+            :caller 'swiper-multi))
+
+(defun swiper--multi-candidates (buffers)
+  (let* ((ww (window-width))
+         (res nil)
+         (column-2 (apply #'max
+                          (mapcar
+                           (lambda (b)
+                             (length (buffer-name b)))
+                           buffers)))
+         (column-1 (- ww 4 column-2 1)))
+    (dolist (buf buffers)
+      (with-current-buffer buf
+        (setq res
+              (append
+               (mapcar
+                (lambda (s)
+                  (setq s (concat (ivy--truncate-string s column-1) " "))
+                  (let ((len (length s)))
+                    (put-text-property
+                     (1- len) len 'display
+                     (concat
+                      (make-string
+                       (- ww (string-width s) (length (buffer-name)) 3)
+                       ?\ )
+                      (buffer-name))
+                     s)
+                    s))
+                (swiper--candidates 4))
+               res))
+        nil))
+    res))
 
 (defun swiper-multi-action-1 (x)
   (if (member x swiper-multi-buffers)
@@ -431,31 +618,9 @@ Run `swiper' for those buffers."
   (cond ((memq this-command '(ivy-done
                               ivy-alt-done
                               ivy-immediate-done))
-         (let ((ww (window-width)))
-           (dolist (buf swiper-multi-buffers)
-             (with-current-buffer buf
-               (setq swiper-multi-candidates
-                     (append
-                      (mapcar
-                       (lambda (s)
-                         (setq s (concat s " "))
-                         (let ((len (length s)))
-                           (put-text-property
-                            (1- len) len 'display
-                            (concat
-                             (make-string
-                              (max
-                               (- ww
-                                  (string-width s)
-                                  (length (buffer-name))
-                                  1)
-                               0)
-                              ?\ )
-                             (buffer-name))
-                            s)
-                           s))
-                       (swiper--candidates))
-                      swiper-multi-candidates))))))
+         (setq swiper-multi-candidates
+               (swiper--multi-candidates
+                (mapcar #'get-buffer swiper-multi-buffers))))
         ((eq this-command 'ivy-call)
          (delete-minibuffer-contents))))
 
@@ -465,7 +630,7 @@ Run `swiper' for those buffers."
       (when (string-match "\\` *\\([^ ]+\\)\\'" buf-space)
         (switch-to-buffer (match-string 1 buf-space))
         (goto-char (point-min))
-        (forward-line (1- (read x)))
+        (forward-line (1- (read (get-text-property 0 'display x))))
         (re-search-forward
          (ivy--regex ivy-text)
          (line-end-position) t)
diff --git a/packages/tiny/Makefile b/packages/tiny/Makefile
index 6332238..708ea1a 100644
--- a/packages/tiny/Makefile
+++ b/packages/tiny/Makefile
@@ -1,18 +1,13 @@
-EMACS ?= emacs
-CASK_EXEC ?= cask exec
-
+emacs ?= emacs
 all: test
 
-test: clean-elc
-       ${MAKE} unit
-
-unit:
-       ${CASK_EXEC} ${EMACS} -Q -batch -l tiny-test.el -l tiny.el --eval "(ert 
t)"
+test: clean
+       cask exec emacs -Q -batch -l tiny-test.el -l tiny.el -f 
ert-run-tests-batch-and-exit
 
 compile:
-       ${CASK_EXEC} ${EMACS} -Q -batch -f batch-byte-compile tiny.el
+       $(emacs) -Q -batch -f batch-byte-compile tiny.el
 
-clean-elc:
+clean:
        rm -f f.elc
 
 .PHONY:        all test
diff --git a/packages/tiny/tiny-test.el b/packages/tiny/tiny-test.el
index dc9c3b9..3d9ec54 100644
--- a/packages/tiny/tiny-test.el
+++ b/packages/tiny/tiny-test.el
@@ -74,6 +74,8 @@ with point at the end of TXT."
 (ert-deftest tiny-mapconcat ()
   (should (equal (with-text-value "m10" (lambda()(eval (read 
(tiny-mapconcat)))))
                  "0 1 2 3 4 5 6 7 8 9 10"))
+  (should (equal (with-text-value "mm10" (lambda()(eval (read 
(tiny-mapconcat)))))
+                 "012345678910"))
   (should (equal (with-text-value "m5 10" (lambda()(eval (read 
(tiny-mapconcat)))))
                  "5 6 7 8 9 10"))
   (should (equal (with-text-value "m5 10*xx" (lambda()(eval (read 
(tiny-mapconcat)))))
diff --git a/packages/tiny/tiny.el b/packages/tiny/tiny.el
index 78d44bb..90c89d5 100644
--- a/packages/tiny/tiny.el
+++ b/packages/tiny/tiny.el
@@ -4,7 +4,7 @@
 
 ;; Author: Oleh Krehel <address@hidden>
 ;; URL: https://github.com/abo-abo/tiny
-;; Version: 0.1
+;; Version: 0.1.1
 ;; Keywords: convenience
 
 ;; This file is part of GNU Emacs.
@@ -122,6 +122,11 @@ At the moment, only `tiny-mapconcat' is supported.
   "Setup shortcuts."
   (global-set-key (kbd "C-;") 'tiny-expand))
 
+(defalias 'tiny--preceding-sexp
+    (if (fboundp 'elisp--preceding-sexp)
+        'elisp--preceding-sexp
+      'preceding-sexp))
+
 ;;;###autoload
 (defun tiny-replace-this-sexp ()
   "Eval and replace the current sexp.
@@ -137,9 +142,9 @@ On error go up list and try again."
     (catch 'success
       (while t
         (ignore-errors
-          (unless (looking-back ")")
+          (unless (looking-back ")" (line-beginning-position))
             (error "Bad location"))
-          (let ((sexp (preceding-sexp)))
+          (let ((sexp (tiny--preceding-sexp)))
             (if (eq (car sexp) 'lambda)
                 (error "Lambda evaluates to itself")
               (let ((value (eval sexp)))
@@ -169,8 +174,14 @@ Must throw an error when can't go up further."
 Defaults are used in place of null values."
   (let ((parsed (tiny-mapconcat-parse)))
     (when parsed
-      (let* ((n1 (or (nth 0 parsed) "0"))
-             (s1 (or (nth 1 parsed) " "))
+      (let* ((n0 (or (nth 0 parsed) "0"))
+             (n1 (nth 1 parsed))
+             (s1 (cond ((null n1)
+                        " ")
+                       ((equal n1 "m")
+                        "")
+                       (t
+                        n1)))
              (n2 (nth 2 parsed))
              (expr (or (nth 3 parsed) "x"))
              (lexpr (read expr))
@@ -193,12 +204,12 @@ Defaults are used in place of null values."
                                  (cdr tes)
                                  " ")
                       ")))(number-sequence %s %s) \"%s\")")))
-        (unless (>= (read n1) (read n2))
+        (unless (>= (read n0) (read n2))
           (format
            format-expression
            expr
            (replace-regexp-in-string "\\\\n" "\n" fmt)
-           n1
+           n0
            n2
            s1))))))
 
@@ -266,7 +277,8 @@ Return nil if nothing was matched, otherwise
     (when (catch 'done
             (cond
               ;; either start with a number
-              ((looking-back "\\bm\\(-?[0-9]+\\)\\([^\n]*?\\)")
+              ((looking-back "\\bm\\(-?[0-9]+\\)\\([^\n]*?\\)"
+                             (line-beginning-position))
                (setq n1 (match-string-no-properties 1)
                      str (match-string-no-properties 2)
                      tiny-beg (match-beginning 0)
@@ -276,7 +288,8 @@ Return nil if nothing was matched, otherwise
                        n1 nil)
                  (throw 'done t)))
               ;; else capture the whole thing
-              ((looking-back "\\bm\\([^%|\n]*[0-9][^\n]*\\)")
+              ((looking-back "\\bm\\([^%|\n]*[0-9][^\n]*\\)"
+                             (line-beginning-position))
                (setq str (match-string-no-properties 1)
                      tiny-beg (match-beginning 0)
                      tiny-end (match-end 0))
@@ -361,7 +374,7 @@ Return nil if nothing was matched, otherwise
                           (cond
                             ;; general functionp
                             ((not (eq t (help-function-arglist sym)))
-                             (setq expect-fun)
+                             (setq expect-fun nil)
                              (setq allow-spc t)
                              ;; (when (zerop n-paren) (push "(" out))
                              (unless (equal (car out) "(")
diff --git a/packages/transcribe/transcribe.el 
b/packages/transcribe/transcribe.el
new file mode 100644
index 0000000..684e505
--- /dev/null
+++ b/packages/transcribe/transcribe.el
@@ -0,0 +1,268 @@
+;;; transcribe.el --- Package for audio transcriptions
+
+;; Copyright 2014-2015  Free Software Foundation, Inc.
+
+;; Author: David Gonzalez Gandara <address@hidden>
+;; Version: 1.0.2
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; REQUIRES:
+;; -----------------------------
+;; This module works without any requires, but in order to use the audio 
+;; functions, you need to install the emacs package "emms", by Joe Drew, 
+;; and the external program "mpg321", by Jorgen Schafer and Ulrik Jensen,
+;; both under GPL licenses.
+;;
+;; USAGE:
+;; -------------------------
+;; Transcribe is a tool to make audio transcriptions. It allows the 
+;; transcriber to control the audio easily while typing, as well as 
+;; automate the insertion of xml tags, in case the transcription protocol 
+;; include them.
+;; The analyse function will search for a specific structure 
+;; of episodes that can be automatically added with the macro NewEpisode. 
+;; The function expects the speech acts to be transcribed inside a turn xml 
+;; tag with the identifier of the speaker with optional move attribute.
+;; Each speech act is spected inside a <l1> or <l2> tag, depending 
+;; on the language used by the person. The attributes expected are the 
+;; number of clauses that form the utterance, the number of errors the 
+;; transcriber observes, and the function of the speech act. The parser will
+;; work even if some attributes are missing.
+;; 
+;; 
+;; AUDIO COMMANDS
+;; ------------------------------
+;;     C-x C-p ------> Play audio file. You will be prompted for the name 
+;;                     of the file. The recommended format is mp2.
+;;     <f5> ---------> Pause or play audio.
+;;     C-x <right> --> seek audio 10 seconds forward.
+;;     C-x <left> --->seek audio 10 seconds backward.
+;;     <f8> ---------> seek interactively: positive seconds go forward and 
+;;                       negative seconds go backward
+;;
+;; XML TAGGING COMMANDS
+;; --------------------------------------------------
+;;     C-x C-n ------> Create new episode structure. This is useful in case 
your 
+;;                 xml file structure requires it.
+;;     <f2> ---------> Interactively insert a function attribute in a speech 
act 
+;;                 (l1 or l2) tag.
+;;     <f3> ---------> Interactively insert a move attribute in a turn 
(person) tag
+;;     <f4> ---------> Interactively insert an attribute (any kind)
+;;     <f9> ---------> Insert turn (person) tag. Inserts a move attribute.
+;;     <f10> --------> Insert a custom tag. Edit the function to adapt to your 
needs.
+;;     <f11> --------> Insert speech act tag in L1, with clauses, errors and 
function
+;;                     attributes.
+;;     <f12> --------> Insert speech act tag in L2, with clauses, errors and 
function
+;;                     attributes.
+;;
+;; AUTOMATIC PARSING
+;; -----------------------------------------------------
+;;     C-x C-a ------> Analyses the text for measurments of performance.
+
+;;; Code:
+
+(if t (require 'emms-setup))
+;(require 'emms-player-mpd)
+;(setq emms-player-mpd-server-name "localhost")
+;(setq emms-player-mpd-server-port "6600")
+
+(emms-standard)
+(emms-default-players)
+(if t (require 'emms-player-mpg321-remote))
+(defvar emms-player-list)
+(push 'emms-player-mpg321-remote emms-player-list)
+
+(if t (require 'emms-mode-line))
+(emms-mode-line 1)
+(if t (require 'emms-playing-time))
+(emms-playing-time 1)
+
+(defvar transcribe-function-list '("initiating" "responding" "control" 
"expresive" "interpersonal"))
+(defvar transcribe-move-list '("initiation" "response" "follow-up"))
+(defvar transcribe-attribute-list '("clauses" "errors" "function" "move"))
+;(append transcribe-attribute-list transcribe-function-list 
transcribe-move-list)
+
+(defun transcribe-analyze-episode (episode person)
+  "This calls the external python package analyze_episodes2.py. The new 
+   function transcribe-analyze implements its role now."
+  (interactive "sepisode: \nsperson:")
+  (shell-command (concat (expand-file-name  "analyze_episodes2.py") 
+                  " -e " episode " -p " person " -i " buffer-file-name )))
+
+(defun transcribe-analyze (episodenumber personid)
+  "Extract from a given episode and person the number of asunits per 
+   second produced, and the number of clauses per asunits, for L2 and L1."
+  (interactive "sepisodenumber: \nspersonid:")
+  (let* ((interventionsl2 '())
+     (interventionsl1 '())
+     (xml (xml-parse-region (point-min) (point-max)))
+     (results (car xml))
+     (episodes (xml-get-children results 'episode))
+     (asunitsl2 0.0000)
+     (asunitsl1 0.0000)
+     (shifts nil)
+     (clausesl1 0.0000)
+     (errorsl1 0.0000)
+     (clausesl2 0.0000)
+     (errorsl2 0.0000)
+     (duration nil)
+     (number nil))
+         
+     (dolist (episode episodes)
+       (let*((numbernode (xml-get-children episode 'number)))
+                 
+         (setq number (nth 2 (car numbernode)))
+         (when (equal episodenumber number)
+           (let* ((durationnode (xml-get-children episode 'duration))
+             (transcription (xml-get-children episode 'transcription)))
+                       
+             (setq duration (nth 2 (car durationnode)))
+             (dolist (turn transcription)
+               (let* ((interventionnode (xml-get-children turn 
+                 (intern personid))))
+                 
+                 (dolist (intervention interventionnode)
+                   (let* ((l2node (xml-get-children intervention 'l2))
+                     (l1node (xml-get-children intervention 'l1)))
+                       
+                     (dolist (l2turn l2node)
+                       (let* ((l2 (nth 2 l2turn))
+                          (clausesl2node (nth 1 l2turn))
+                          (clausesl2nodeinc (cdr (car clausesl2node))))
+                          
+                          (when (not (equal clausesl2node nil))
+                            (setq clausesl2 (+ clausesl2 (string-to-number 
+                             clausesl2nodeinc))))
+                          (when (not (equal l2 nil)) 
+                            (add-to-list 'interventionsl2 l2) 
+                            (setq asunitsl2 (1+ asunitsl2)))))
+                     (dolist (l1turn l1node)
+                       (let*((l1 (nth 2 l1turn))
+                         (clausesl1node (nth 1 l1turn))
+                         (clausesl1nodeinc (cdr (car clausesl1node))))
+                         
+                         (when (not (equal clausesl1node nil))
+                           (setq clausesl1 (+ clausesl1 (string-to-number 
+                              clausesl1nodeinc))))
+                         (when (not (equal l1 nil)) 
+                           (add-to-list 'interventionsl1 l1) 
+                           (setq asunitsl1 (1+ asunitsl1)))))))))))))
+  (reverse interventionsl2)
+  (reverse interventionsl1)
+  ;(print interventions) ;uncomment to display all the interventions on screen
+  (let((asunitspersecondl2 (/ asunitsl2 (string-to-number duration)))
+    (clausesperasunitl2 (/ clausesl2 asunitsl2))
+    (asunitspersecondl1 (/ asunitsl1 (string-to-number duration)))
+    (clausesperasunitl1 (/ clausesl1 asunitsl1)))
+  
+    (princ (format "episode: %s, duration: %s, person: %s\n" episodenumber 
duration personid))
+    (princ (format "L2(Asunits/second): %s, L2(clauses/Asunit): %s, 
L1(Asunits/second): %s" 
+          asunitspersecondl2 clausesperasunitl2 asunitspersecondl1)))))
+
+(defun transcribe-xml-tag-person (xmltag)
+  "This function allows the automatic insetion of a speaker xml tag and places 
the cursor."
+  (interactive "stag:")
+  (insert (format "<%s move=\"\"></%s>" xmltag xmltag))
+  (backward-char 3)
+  (backward-char (string-width xmltag)))
+
+(defun transcribe-xml-tag (xmltag)
+  "This function allows the automatic insetion of a custom xml tag and places 
the cursor."
+  (interactive "stag:")
+  (insert (format "<%s></%s>" xmltag xmltag))
+  (backward-char 3)
+  (backward-char (string-width xmltag)))
+
+(defun transcribe-region-xml-tag (xmltag)
+  "This function encapsulates the marked region in the given tag."
+  (interactive "stag:")
+  (let ((beginning (region-beginning))
+       (end (region-end)))
+  (goto-char beginning)
+  (insert (format "<%s>" xmltag))
+  (goto-char end)
+  (insert (format "</%s>" xmltag))))
+
+(defun transcribe-add-attribute (att val)
+  "Adds a xml attribute at cursor with the name and value specified 
(autocompletion possible)"
+  (interactive (list(completing-read "attibute name:" 
transcribe-attribute-list)(read-string "value:"))) 
+  (insert (format "%s=\"%s\"" att val)))
+
+(defun transcribe-add-attribute-function (val)
+  "Adds the xml attribute 'function' at cursor with the name specified 
(autocompletion possible)"
+  (interactive (list(completing-read "function name:" 
transcribe-function-list))) 
+  (insert (format "function=\"%s\"" val)))
+
+(defun transcribe-add-attribute-move (val)
+  "Adds the xml attribute 'move' at cursor with the name specified 
(autocompletion possible"
+  (interactive (list(completing-read "move name:" transcribe-move-list))) 
+  (insert (format "move=\"%s\"" val)))
+
+(defun transcribe-xml-tag-l1 ()
+  "Inserts a l1 tag and places the cursor"
+  (interactive)
+  (insert "<l1 clauses=\"1\" errors=\"0\" function=\"\"></l1>")
+  (backward-char 5))
+
+(defun transcribe-xml-tag-l2 ()
+  "Inserts a l2 tag and places the cursor"
+  (interactive)
+  (insert "<l2 clauses=\"1\" errors=\"0\" function=\"\"></l2>")
+  (backward-char 5))
+
+(defun transcribe-xml-tag-break (xmltag)
+  "This function breaks an unit into two. That is, insert a closing and an 
opening equal tags"
+  (interactive "stag:")
+  (insert (format "</%s><%s clauses=\"1\" errors=\"0\" function=\"\">" xmltag 
xmltag)))
+
+(defun transcribe-display-audio-info ()
+  (interactive)
+  (emms-player-mpg321-remote-proc)
+  (shell-command "/usr/bin/mpg321 -R - &"))
+
+
+(fset 'NewEpisode
+      
"<episode>\n<number>DATE-NUMBER</number>\n<duration></duration>\n<comment></comment>\n<subject>Subject
 (level)</subject>\n<task>\n\t<role>low or high</role>\n<context>low or 
high</context>\n<demand>low or 
high</demand>\r</task>\n<auxiliar>Yes/no</auxiliar>\n<transcription>\n</transcription>\n</episode>");Inserts
 a new episode structure
+
+;;;###autoload
+(define-minor-mode transcribe-mode
+ "Toggle transcribe-mode"
+  nil
+  " Trans"
+  '(([?\C-x ?\C-p] . emms-play-file)
+    ([?\C-x ?\C-a] . transcribe-analyze)
+    ([?\C-x ?\C-n] . NewEpisode)
+    ([?\C-x down] . emms-stop)
+    ([?\C-x right] . emms-seek-forward)
+    ([?\C-x left] . emms-seek-backward)
+    
+    ([f2] . transcribe-add-attribute-function)
+    ([f3] . transcribe-add-attribute-move)
+    ([f4] . transcribe-add-attribute)
+    
+    ([f5] . emms-pause)
+    ([f8] . emms-seek)
+   
+    ([f9] . transcribe-xml-tag)
+    ([f10] . transcribe-xml-tag-person)
+    ([f11] . transcribe-xml-tag-l1)
+    ([f12] . transcribe-xml-tag-l2))
+)
+
+(provide 'transcribe)
+
+;;; transcribe.el ends here
diff --git a/packages/wcheck-mode/README.md b/packages/wcheck-mode/README.md
index 87b1784..c7b11d8 100644
--- a/packages/wcheck-mode/README.md
+++ b/packages/wcheck-mode/README.md
@@ -18,7 +18,7 @@ checking text. For example, Wcheck mode can be used with 
spell-checker
 programs such as Ispell, Enchant and Hunspell, but actually any tool
 that can receive text from standard input stream and send text to
 standard output can be used. Wcheck mode sends parts of buffer's content
-to an external program or an Emacs Lisp function and, based on their
+to an external program or an Emacs Lisp function and, relying on their
 output, decides if some parts of text should be marked in the buffer.
 
 [Emacs]: http://www.gnu.org/software/emacs/
@@ -91,10 +91,10 @@ checker.
 Install
 -------
 
-You can install Wcheck mode through [Marmalade][] or [Melpa][] package
-archive. Alternatively you can put `wcheck-mode.el` file to some
-directory in your Emacs's `load-path` and add the following lines to
-Emacs's initialization file (`~/.emacs` or `~/.emacs.d/init.el`):
+You can install Wcheck mode through [Melpa][] package archive.
+Alternatively you can put `wcheck-mode.el` file to some directory in
+your Emacs's `load-path` and add the following lines to Emacs's
+initialization file (`~/.emacs` or `~/.emacs.d/init.el`):
 
     (autoload 'wcheck-mode "wcheck-mode"
       "Toggle wcheck-mode." t)
@@ -107,8 +107,7 @@ Emacs's initialization file (`~/.emacs` or 
`~/.emacs.d/init.el`):
     (autoload 'wcheck-jump-backward "wcheck-mode"
       "Move point backward to previous marked text area." t)
 
-[Marmalade]: http://marmalade-repo.org/
-[Melpa]:     http://melpa.milkbox.net/
+[Melpa]: https://melpa.org/
 
 
 Configuration and basic usage
@@ -337,7 +336,7 @@ branches and possibly merged to _master_ when they are 
ready.
 Copyright and license
 ---------------------
 
-Copyright (C) 2009-2014 Teemu Likonen <<address@hidden>>
+Copyright (C) 2009-2016 Free Software Foundation, Inc.
 
 This program is free software: you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
diff --git a/packages/wcheck-mode/wcheck-mode.el 
b/packages/wcheck-mode/wcheck-mode.el
index ed46e78..ae7e917 100644
--- a/packages/wcheck-mode/wcheck-mode.el
+++ b/packages/wcheck-mode/wcheck-mode.el
@@ -1,13 +1,13 @@
 ;;; wcheck-mode.el --- General interface for text checkers
 
-;; Copyright (C) 2009-2014  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2016  Free Software Foundation, Inc.
 
 ;; Author: Teemu Likonen <address@hidden>
 ;; Maintainer: Teemu Likonen <address@hidden>
 ;; Created: 2009-07-04
 ;; URL: https://github.com/tlikonen/wcheck-mode
 ;; Keywords: text spell check languages ispell
-;; Version: 2014.6.21
+;; Version: 2016.1.30
 
 ;; This program is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -58,7 +58,7 @@
 ;; actually any tool that can receive text from standard input stream
 ;; and send text to standard output can be used.  Wcheck mode sends parts
 ;; of buffer's content to an external program or an Emacs Lisp function
-;; and, based on their output, decides if some parts of text should be
+;; and, relying on their output, decides if some parts of text should be
 ;; marked in the buffer.
 
 ;;; Code:
@@ -892,7 +892,7 @@ otherwise turn it off. If ARG is not given toggle the mode.
 
 Wcheck is a minor mode for automatically checking and marking
 strings in Emacs buffer. Wcheck sends (parts of) buffer's content
-to a text-checker back-end and, based on its output, decides if
+to a text-checker back-end and, relying on its output, decides if
 some parts of text should be marked.
 
 Wcheck can be used with external spell-checker programs such as
@@ -1388,7 +1388,10 @@ areas, including invisible ones. Otherwise skip 
invisible text."
 
         (when font-lock-mode
           (save-excursion
-            (jit-lock-fontify-now (min beg end) (max beg end))))
+            (funcall (if (fboundp 'font-lock-ensure)
+                         #'font-lock-ensure
+                       #'font-lock-fontify-region)
+                     (min beg end) (max beg end))))
 
         (wcheck--with-language-data
             (language (wcheck--buffer-data-get :buffer buffer :language))
@@ -1415,7 +1418,7 @@ areas, including invisible ones. Otherwise skip invisible 
text."
                                      (match-beginning 1) 'invisible buffer
                                      end)))
 
-                        ((and (eval face-p)
+                        ((and (funcall face-p)
                               (or (equal regexp-discard "")
                                   (not (string-match
                                         regexp-discard
@@ -1475,7 +1478,7 @@ text."
                            (goto-char (next-single-char-property-change
                                        (match-beginning 1) 'invisible buffer
                                        end)))
-                          ((eval face-p)
+                          ((funcall face-p)
                            ;; Make an overlay.
                            (wcheck--make-overlay
                             buffer ol-face ol-mouse-face ol-help-echo ol-keymap
@@ -1933,16 +1936,18 @@ expression will return a boolean."
          (mode (nth 1 face-settings))
          (faces (nthcdr 2 face-settings)))
     (cond ((not font-lock-mode)
-           t)
+           (lambda () t))
           ((eq mode 'read)
-           `(wcheck--face-found-p
-             ',faces (wcheck--collect-faces
-                      (match-beginning 1) (match-end 1))))
+           `(lambda ()
+              (wcheck--face-found-p
+               ',faces (wcheck--collect-faces
+                        (match-beginning 1) (match-end 1)))))
           ((eq mode 'skip)
-           `(not (wcheck--face-found-p
-                  ',faces (wcheck--collect-faces
-                           (match-beginning 1) (match-end 1)))))
-          (t t))))
+           `(lambda ()
+              (not (wcheck--face-found-p
+                    ',faces (wcheck--collect-faces
+                             (match-beginning 1) (match-end 1))))))
+          (t (lambda () t)))))
 
 
 ;;; Miscellaneous low-level functions
@@ -2057,8 +2062,7 @@ The returned value is a floating point number."
          (high (nth 0 idle))
          (low (nth 1 idle))
          (micros (nth 2 idle)))
-    (+ (* high
-          (expt 2 16))
+    (+ (* high 65536)
        low
        (/ micros 1000000.0))))
 
@@ -2179,12 +2183,13 @@ But only if it doesn't exist already."
 If optional TARGET-KEY is not given return all data associated
 with the matching KEY VALUE."
   (catch 'answer
-    (dolist (item wcheck--buffer-data)
-      (when (equal value (aref item (wcheck--buffer-data-key-index key)))
-        (throw 'answer (if target-key
-                           (aref item (wcheck--buffer-data-key-index
-                                       target-key))
-                         item))))))
+    (let ((index (wcheck--buffer-data-key-index key)))
+      (dolist (item wcheck--buffer-data)
+        (when (equal value (aref item index))
+          (throw 'answer (if target-key
+                             (aref item (wcheck--buffer-data-key-index
+                                         target-key))
+                           item)))))))
 
 
 (defun wcheck--buffer-data-get-all (&optional key)
diff --git a/packages/websocket/websocket.el b/packages/websocket/websocket.el
index c42f2cc..1b0b294 100644
--- a/packages/websocket/websocket.el
+++ b/packages/websocket/websocket.el
@@ -1,9 +1,8 @@
 ;;; websocket.el --- Emacs WebSocket client and server
 
-;; Copyright (c) 2013  Free Software Foundation, Inc.
+;; Copyright (c) 2013, 2016  Free Software Foundation, Inc.
 
-;; Author: Andrew Hyatt <ahyatt at gmail dot com>
-;; Maintainer: Andrew Hyatt <ahyatt at gmail dot com>
+;; Author: Andrew Hyatt <address@hidden>
 ;; Keywords: Communication, Websocket, Server
 ;; Version: 1.5
 ;;
diff --git a/packages/wisi/NEWS b/packages/wisi/NEWS
index 17d084a..9e8ad77 100644
--- a/packages/wisi/NEWS
+++ b/packages/wisi/NEWS
@@ -7,6 +7,19 @@ Please send wisi bug reports to address@hidden, with
 'wisi' in the subject. If possible, use M-x report-emacs-bug.
 
 
+* wisi 1.1.2
+20 Jan 2016
+
+** wisi-compile no longer requires semantic.
+
+** wisi-parse slightly faster
+
+** minor bug fixes
+
+** wisi-extend-action now takes two args (first last)
+
+** wisi-face-action-1 optional arg no-override is replaced by 
override-no-error.
+
 * wisi 1.1.1
 10 Apr 2015
 
diff --git a/packages/wisi/README b/packages/wisi/README
index f363c12..098b476 100644
--- a/packages/wisi/README
+++ b/packages/wisi/README
@@ -1,4 +1,4 @@
-Emacs wisi package 1.1.1
+Emacs wisi package 1.1.2
 
 The wisi package provides utilities for using generalized LALR parsers
 to do indentation and navigation. See ada-mode for an example of its
diff --git a/packages/wisi/wisi-compile.el b/packages/wisi/wisi-compile.el
index 463fb01..b70a1ae 100644
--- a/packages/wisi/wisi-compile.el
+++ b/packages/wisi/wisi-compile.el
@@ -1,6 +1,6 @@
-;;; Grammar compiler for the wisent LALR parser, integrating Wisi OpenToken 
output.  -*- lexical-binding:t -*-
+;; wisi-compile.el --- Grammar compiler for the wisi parser, integrating Wisi 
OpenToken output.  -*- lexical-binding:t -*-
 ;;
-;; Copyright (C) 2012, 2013, 2015 Free Software Foundation, Inc.
+;; Copyright (C) 2012, 2013, 2015, 2016 Free Software Foundation, Inc.
 ;;
 ;; Author: Stephen Leake <address@hidden>
 ;;
@@ -19,20 +19,24 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 ;;
-;;; History: first experimental version Jan 2013
+
+;;; Commentary:
+;; 
+
+;;;; History: first experimental version Jan 2013
 ;;
-;;; Context
+;;;; Context
 ;;
 ;; Semantic (info "(semantic)Top") provides an LALR(1) parser
-;; wisent-parse. The grammar used is defined by the functions
+;; wisent-parse.  The grammar used is defined by the functions
 ;; semantic-grammar-create-package, which reads a bison-like source
 ;; file and produces corresponding elisp source, and
 ;; wisent-compile-grammar, which generates a parser table.
 ;;
 ;; However, the algorithm used in wisent-compile-grammar cannot cope
 ;; with the grammar for the Ada language, because it is not
-;; LALR(1). So we provide a generalized LALR parser, which spawns
-;; parallel LALR parsers at each conflict. Instead of also rewriting
+;; LALR(1).  So we provide a generalized LALR parser, which spawns
+;; parallel LALR parsers at each conflict.  Instead of also rewriting
 ;; the entire semantic grammar compiler, we use the OpenToken LALR
 ;; parser generator, which is easier to modify (it is written in Ada,
 ;; not Lisp).
@@ -41,33 +45,40 @@
 ;; produces corresponding elisp source code, similar to that
 ;; produced by semantic-grammar-create-package.
 ;;
-;; wisi-compile-grammar (provided here) generate the automaton
-;; structure required by wisi-parse, using functions from
-;; wisent/comp.el
+;; wisi-compile-grammar (provided here) generates the automaton
+;; structure required by wisi-parse
 ;;
 ;;;;
 
-(require 'semantic/wisent/comp)
+(defun wisi-compose-action (value symbol-obarray nonterms)
+  (let* ((nonterm (car value))
+       (index   (cdr value))
+       (symbol (intern-soft (format "%s:%d" nonterm index) symbol-obarray))
+       (rhs (car (nth index (cdr (assoc nonterm nonterms))))))
+    (list nonterm symbol (length rhs))
+    ))
 
-(defun wisi-compose-action (value symbol-array nonterms)
-  (let ((symbol (intern-soft (format "%s:%d" (car value) (cdr value)) 
symbol-array))
-       (prod (car (nth (cdr value) (cdr (assoc (car value) nonterms))))))
-    (if symbol
-       (list (car value) symbol (length prod))
-      (error "%s not in symbol-array" symbol))))
-
-(defun wisi-replace-actions (action symbol-array nonterms)
+(defun wisi-replace-actions (action symbol-obarray nonterms)
   "Replace semantic action symbol names in ACTION with list as defined in 
`wisi-compile-grammar'.
-ACTION is the alist for one state from the grammar; NONTERMS is from the 
grammar.
-Return the new alist."
-  ;; result is (nonterm index action-symbol token-count)
+ACTION is the alist for one state from the grammar, with the form:
+  ((default . error) ITEM ... )
+ITEM is one of:
+reduction  (TOKEN . (NONTERM . INDEX)) where NONTERM . INDEX gives the action 
symbol name.
+shift (TOKEN . STATE)
+shift/reduce conflict (STATE (NONTERM . INDEX))
+reduce/shift conflict ((NONTERM . INDEX) (NONTERM . INDEX))
+
+SYMBOL-OBARRAY contains the action symbols.
+NONTERMS is from the grammar.
+Return the new action alist."
+  ;; result is list of (nonterm index action-symbol token-count)
   (let (result item)
     (while action
      (setq item (pop action))
      (cond
       ((or
        (memq (cdr item) '(error accept))
-       (numberp (cdr item)))
+       (numberp (cdr item))) ;; shift
        (push item result))
 
       ((listp (cdr item))
@@ -76,27 +87,20 @@ Return the new alist."
          ((symbolp (car value))
           ;; reduction
           (push (cons (car item)
-                      (wisi-compose-action value symbol-array nonterms))
+                      (wisi-compose-action value symbol-obarray nonterms))
                 result))
 
          ((integerp (car value))
           ;; shift/reduce conflict
           (push (cons (car item)
                       (list (car value)
-                            (wisi-compose-action (cadr value) symbol-array 
nonterms)))
-                result))
-
-         ((integerp (cadr value))
-          ;; reduce/shift conflict
-          (push (cons (car item)
-                      (list (wisi-compose-action (car value) symbol-array 
nonterms)
-                            (cadr value)))
+                            (wisi-compose-action (cadr value) symbol-obarray 
nonterms)))
                 result))
 
          (t ;; reduce/reduce conflict
           (push (cons (car item)
-                      (list (wisi-compose-action (car value) symbol-array 
nonterms)
-                            (wisi-compose-action (cadr value) symbol-array 
nonterms)))
+                      (list (wisi-compose-action (car value) symbol-obarray 
nonterms)
+                            (wisi-compose-action (cadr value) symbol-obarray 
nonterms)))
                 result))
          )))
 
@@ -106,49 +110,36 @@ Return the new alist."
 
    (reverse result)))
 
-(defun wisi-semantic-action (r rcode tags rlhs)
-  "Define an Elisp function for semantic action at rule R.
-On entry RCODE[R] contains a vector [BODY N (NTERM I)] where BODY
-is the body of the semantic action, N is the number of tokens in
-the production, NTERM is the nonterminal the semantic action
-belongs to, and I is the index of the production and associated
-semantic action in the NTERM rule.  Returns the semantic action
-symbol, which is interned in RCODE[0].
-
-The semantic action function accepts one argument, the list of
-tokens to be reduced. It returns nil; it is called for the user
-side-effects only."
+(defun wisi-semantic-action (form nonterm iactn symbol-obarray)
+  "Define an Elisp semantic action function for a production, interned in 
SYMBOL-OBARRAY.
+FORM is the body of the semantic action.
+NONTERM is the nonterminal left hand side.
+IACTN is the index of the production in the NTERM rule.
+
+The semantic action function accepts two arguments;
+- $nterm      : the nonterminal
+- wisi-tokens : the list of tokens to be reduced.
+
+It returns nil; it is called for the semantic side-effects only."
   ;; based on comp.el wisent-semantic-action
-  (let* ((actn (aref rcode r))
-        (n    (aref actn 1))         ; number of tokens in production
-        (name (apply 'format "%s:%d" (aref actn 2)))
-        (form (aref actn 0))
-        (action-symbol (intern name (aref rcode 0))))
+  (let* ((name (format "%s:%d" nonterm iactn))
+        (action-symbol (intern name symbol-obarray)))
 
     (fset action-symbol
-         `(lambda (wisi-tokens)
-            (let* (($nterm ',(aref tags (aref rlhs r)))
-                   ($1 nil));; wisent-parse-nonterminals defines a default 
body of $1 for empty actions
-              ,form
-              nil)))
-
-    (list (car (aref actn 2)) action-symbol n)))
+         `(lambda ($nterm wisi-tokens)
+            ,form
+            nil))))
 
 (defun wisi-compile-grammar (grammar)
-  ;; FIXME: This docstring is full of ambiguities making it unclear whether
-  ;; we're talking for example about data that includes the symbol `nonterm' as
-  ;; opposed to data that includes some non terminal object we denote
-  ;; with the meta-variable "nonterm".
-  ;; The convention in Elisp's docstrings is to use all-caps for metavariables
-  ;; (and `...' quoting as opposed to the '... quoting used below in a few
-  ;; spots).
   "Compile the LALR(1) GRAMMAR; return the automaton for wisi-parse.
 GRAMMAR is a list TERMINALS NONTERMS ACTIONS GOTOS, where:
 
 TERMINALS is a list of terminal token symbols.
 
 NONTERMS is a list of productions; each production is a
-list (nonterm (tokens action) ...) where `action' is any lisp form.
+list (nonterm (tokens semantic-action) ...) where `semantic-action' is
+any lisp form. The set of (tokens semantic-action) are the right hand
+sides; nonterm is the left hand side.
 
 ACTIONS is an array indexed by parser state, of alists indexed by
 terminal tokens. The value of each item in the alists is one of:
@@ -162,7 +153,6 @@ integer - shift; gives new state
 '(nonterm . index) - reduce by nonterm production index.
 
 '(integer (nonterm . index)) - a shift/reduce conflict
-'((nonterm . index) integer) - a reduce/shift conflict
 '((nonterm . index) (nonterm . index)) - a reduce/reduce conflict
 
 The first item in the alist must have the key 'default (not a
@@ -173,54 +163,76 @@ GOTOS is an array indexed by parser state, of alists 
giving the
 new state after a reduce for each nonterminal legal in that
 state.
 
-The automaton is an array with 3 elements:
+The automaton is an array [parser-actions gotos symbol-obarray]:
 
-parser-actions is a copy of the input ACTIONS, with reduction
-actions replaced by a list (NONTERM ACTION-SYMBOL TOKEN-COUNT),
-where NONTERM is a symbol from NONTERMS, and is the
-non-terminal to reduce to, TOKEN-COUNT is the number of tokens in
-the reduction, ACTION-SYMBOL is nil if there is no user action,
-or a symbol from semantic-actions (below).
+- parser-actions is a copy of the input ACTIONS, with semantic
+actions replaced by a list (nonterm action-symbol token-count),
+where:
 
-gotos is a copy of GOTOS.
+-- nonterm is a symbol from NONTERMS, and is the non-terminal to
+reduce to
 
-semantic-actions is an obarray containing functions that
-implement the user action for each nonterminal; the function
-names have the format nonterm:index."
-  (defvar nrules) (defvar ptable) (defvar rcode) (defvar rlhs) (defvar tags)
-  (defvar token-list) (defvar var-list)
-  (let (nrules ptable rcode rlhs tags token-list var-list)
-    (wisent-parse-grammar;; set global vars used by wisent-semantic-action
-     (cons
-      (nth 0 grammar);; TOKENS
-      (cons nil ;; ASSOCS
-           (nth 1 grammar));; NONTERMS
-      ))
-
-    (aset rcode 0 (make-vector 13 0));; obarray for semantic actions
-
-    ;; create semantic action functions, interned in rcode[0]
-    (let* ((i 1))
-      (while (<= i nrules)
-       (wisi-semantic-action i rcode tags rlhs)
-       (setq i (1+ i)))
-      )
+-- token-count is the number of tokens in the reduction,
+
+-- action-symbol is nil if there is no semantic action, or a
+symbol interned in symbol-obarray
 
-    ;; replace semantic actions in ACTIONS with symbols from symbol-array
+- gotos is a copy of GOTOS.
+
+- symbol-obarray is an obarray containing functions that
+implement the semantic action for each nonterminal; the function
+names have the format nonterm:index."
+  ;; We store named symbols for semantic actions, not just lambda
+  ;; functions, so we have a name for debug trace.
+  ;;
+  ;; FIXME: TERMINALS is not used. Eliminating it requires decoupling
+  ;; from OpenToken; we'll do that in the move to FastToken.
+  ;;
+  ;; FIXME: eliminate use of semantic-lex-* in *-wy.el. Similarly
+  ;; requires decoupling from OpenToken
+  ;;
+  ;; FIXME: can eliminate obarray? We don't need the obarray to
+  ;; avoid garbage collection of the symbols; they are all referenced in the 
compiled grammar.
+  ;; But each semantic action function has to be defined (and byte-compiled?) 
somewhere?
+  ;;     currently actions are _not_ byte-compiled; wisi-compile-grammar is 
run at load time
+  ;;     need 'eval-when-compile' to byte-compile them?
+  ;;     can't byte-compile obarray?
+
+  (let ((defs (nth 1 grammar))
+       (symbol-obarray (make-vector 13 0));; for parse actions
+       def nonterm rhs-list rule
+       semantic-action index)
+
+    (while defs
+      (setq def      (car defs)
+            defs     (cdr defs)
+            nonterm  (car def)
+            rhs-list (cdr def)
+            index    0)
+      (while rhs-list
+        (setq rule            (car rhs-list)
+              rhs-list        (cdr rhs-list)
+              semantic-action (cadr rule))
+
+       (when semantic-action
+         (wisi-semantic-action semantic-action nonterm index symbol-obarray))
+
+       (setq index (1+ index))
+       ))
+
+    ;; replace semantic actions in ACTIONS with symbols from symbol-obarray
     (let ((nactions (length (nth 2 grammar)))
          (actions (nth 2 grammar))
-         (symbol-array (aref rcode 0))
          (i 0))
       (while (< i nactions)
        (aset actions i
-             (wisi-replace-actions (aref actions i) symbol-array (nth 1 
grammar)))
+             (wisi-replace-actions (aref actions i) symbol-obarray (nth 1 
grammar)))
        (setq i (1+ i)))
       (vector
        actions
        (nth 3 grammar)
-       symbol-array)
+       symbol-obarray)
       )))
 
 (provide 'wisi-compile)
-
 ;;; wisi-compile.el ends here
diff --git a/packages/wisi/wisi-parse.el b/packages/wisi/wisi-parse.el
index 4fa300e..b9da937 100644
--- a/packages/wisi/wisi-parse.el
+++ b/packages/wisi/wisi-parse.el
@@ -111,6 +111,9 @@ point at which that max was spawned.")
   list (symbol text start . end), where `symbol' is the terminal
   symbol, `text' is the token string, `start . end' is the range
   in the buffer."
+
+  ;; FIXME: (aref automaton 3) is the obarray storing the semantic actions;
+  ;; not used here (see related FIXME in wisi-compile)
   (let* ((actions (aref automaton 0))
         (gotos   (aref automaton 1))
         (parser-states ;; vector of parallel parser states
@@ -148,8 +151,8 @@ point at which that max was spawned.")
                        (let ((state (aref (wisi-parser-state-stack 
parser-state)
                                           (wisi-parser-state-sp 
parser-state))))
                          (wisi-error-msg (concat "too many parallel parsers 
required in grammar state %d;"
-                                                 " simplify grammar, or 
increase `wisi-parse-max-parallel'"
-                                                 state)))))
+                                                 " simplify grammar, or 
increase `wisi-parse-max-parallel'")
+                                                 state))))
 
              (let ((j (wisi-free-parser parser-states)))
                (cond
@@ -381,7 +384,7 @@ nil, 'shift, or 'accept."
     result)
   )
 
-(defun wisi-parse-exec-action (func tokens)
+(defun wisi-parse-exec-action (func nonterm tokens)
   "Execute action if all tokens past wisi-cache-max."
   ;; We don't execute actions if all tokens are before wisi-cache-max,
   ;; because later actions can update existing caches, and if the
@@ -392,7 +395,7 @@ nil, 'shift, or 'accept."
   (if (< 0 (length tokens))
       (if (>= (wisi-parse-max-pos tokens) wisi-cache-max)
 
-         (funcall func tokens)
+         (funcall func nonterm tokens)
 
        (when (> wisi-debug 1)
          (message "... action skipped; before wisi-cache-max %d" 
wisi-cache-max)))
@@ -407,7 +410,7 @@ nil, 'shift, or 'accept."
     (when (> wisi-debug 1) (message "%s" (car pending)))
 
     (let ((func-args (pop pending)))
-      (wisi-parse-exec-action (car func-args) (cadr func-args)))
+      (wisi-parse-exec-action (nth 0 func-args) (nth 1 func-args) (cl-caddr 
func-args)))
     ))
 
 (defun wisi-parse-1 (token parser-state pendingp actions gotos)
@@ -508,7 +511,7 @@ the first and last tokens of the nonterminal."
   "Reduce PARSER-STATE.stack, and execute or pend ACTION."
   (let* ((stack (wisi-parser-state-stack parser-state)); reference
         (sp (wisi-parser-state-sp parser-state)); copy
-        (token-count (or (nth 2 action) 0))
+        (token-count (nth 2 action))
         (nonterm (nth 0 action))
         (nonterm-region (when (> token-count 0)
                           (wisi-nonterm-bounds stack (- sp (* 2 (1- 
token-count)) 1) (1- sp))))
@@ -519,25 +522,29 @@ the first and last tokens of the nonterminal."
     (when (not new-state)
       (error "no goto for %s %d" nonterm post-reduce-state))
 
-    (dotimes (i token-count)
-      (aset tokens (- token-count i 1) (aref stack (- sp (* 2 i) 1))))
+    (when (nth 1 action)
+      ;; don't need wisi-tokens for a null user action
+      (dotimes (i token-count)
+       (aset tokens (- token-count i 1) (aref stack (- sp (* 2 i) 1)))))
 
     (setq sp (+ 2 (- sp (* 2 token-count))))
     (aset stack (1- sp) (cons nonterm nonterm-region))
     (aset stack sp new-state)
     (setf (wisi-parser-state-sp parser-state) sp)
 
-    (if pendingp
-       (if (wisi-parser-state-pending parser-state)
+    (when (nth 1 action)
+      ;; nothing to do for a null user action
+      (if pendingp
+         (if (wisi-parser-state-pending parser-state)
+             (setf (wisi-parser-state-pending parser-state)
+                   (append (wisi-parser-state-pending parser-state)
+                           (list (list (nth 1 action) nonterm tokens))))
            (setf (wisi-parser-state-pending parser-state)
-                 (append (wisi-parser-state-pending parser-state)
-                         (list (list (nth 1 action) tokens))))
-         (setf (wisi-parser-state-pending parser-state)
-               (list (list (nth 1 action) tokens))))
-
-      ;; Not pending.
-      (wisi-parse-exec-action (nth 1 action) tokens)
-      )
+                 (list (list (nth 1 action) nonterm tokens))))
+
+       ;; Not pending.
+       (wisi-parse-exec-action (nth 1 action) nonterm tokens)
+       ))
     ))
 
 (provide 'wisi-parse)
diff --git a/packages/wisi/wisi.el b/packages/wisi/wisi.el
index a748f62..0b29b3e 100644
--- a/packages/wisi/wisi.el
+++ b/packages/wisi/wisi.el
@@ -1,13 +1,13 @@
 ;;; wisi.el --- Utilities for implementing an indentation/navigation engine 
using a generalized LALR parser -*- lexical-binding:t -*-
 ;;
-;; Copyright (C) 2012 - 2015  Free Software Foundation, Inc.
+;; Copyright (C) 2012 - 2016  Free Software Foundation, Inc.
 ;;
 ;; Author: Stephen Leake <address@hidden>
 ;; Maintainer: Stephen Leake <address@hidden>
 ;; Keywords: parser
 ;;  indentation
 ;;  navigation
-;; Version: 1.1.1
+;; Version: 1.1.2
 ;; package-requires: ((cl-lib "0.4") (emacs "24.2"))
 ;; URL: http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html
 ;;
@@ -158,6 +158,7 @@
 ;; an appropriate end-point for syntax-propertize, other than
 ;; point-max. So we call (syntax-propertize point-max) in wisi-setup,
 ;; and also call syntax-propertize in wisi-after-change.
+;; FIXME: no longer needed in Emacs 25? (email from Stefan Monnier)
 ;;
 ;;;; code style
 ;;
@@ -289,10 +290,10 @@ If at end of buffer, returns `wisent-eoi-term'."
          (scan-error
           ;; Something screwed up; we should not get here if
           ;; syntax-propertize works properly.
-          (error "wisi-forward-token: forward-sexp failed %s" err)
+          (signal 'wisi-parse-error (format "wisi-forward-token: forward-sexp 
failed %s" err))
           ))))
 
-     (t ;; assuming word or symbol syntax
+     (t ;; assuming word or symbol syntax; includes numbers
       (skip-syntax-forward "w_'")
       (setq token-text (buffer-substring-no-properties start (point)))
       (setq token-id
@@ -442,6 +443,12 @@ Used in before/after change functions.")
   (wisi-delete-cache after)
   )
 
+;; To see the effects of wisi-before-change, wisi-after-change, you need:
+;; (global-font-lock-mode 0)
+;; (setq jit-lock-functions nil)
+;;
+;; otherwise jit-lock runs and overrides them
+
 (defun wisi-before-change (begin end)
   "For `before-change-functions'."
   ;; begin . end is range of text being deleted
@@ -562,6 +569,8 @@ Used in before/after change functions.")
        (setq begin-state (syntax-ppss begin))
        (setq end-state (syntax-ppss end))
        ;; syntax-ppss has moved point to "end".
+
+       ;; extend fontification over new text,
        (skip-syntax-forward "w_")
        (setq word-end (point))
        (goto-char begin)
@@ -592,7 +601,7 @@ Used in before/after change functions.")
          ;; no easy way to tell if there is intervening non-string
          (setq need-invalidate nil))
 
-        ((or
+        ((and
           (nth 4 begin-state)
           (nth 4 end-state)); in comment
          ;; no easy way to detect intervening code
@@ -644,7 +653,8 @@ If accessing cache at a marker for a token as set by 
`wisi-cache-tokens', POS mu
 
 (defun wisi-goto-error ()
   "Move point to position in last error message (if any)."
-  (when (string-match ":\\([0-9]+\\):\\([0-9]+\\):" wisi-parse-error-msg)
+  (when (and wisi-parse-error-msg
+            (string-match ":\\([0-9]+\\):\\([0-9]+\\):" wisi-parse-error-msg))
     (let ((line (string-to-number (match-string 1 wisi-parse-error-msg)))
          (col (string-to-number (match-string 2 wisi-parse-error-msg))))
       (push-mark)
@@ -679,7 +689,9 @@ If accessing cache at a marker for a token as set by 
`wisi-cache-tokens', POS mu
       (when (> wisi-debug 0)
        (message msg))
 
+      ;; Don't keep retrying failed parse until text changes again.
       (setq wisi-parse-try nil)
+
       (setq wisi-parse-error-msg nil)
       (setq wisi-end-caches nil)
 
@@ -762,8 +774,10 @@ delete from `wisi-end-caches'."
       )))
 
 (defvar wisi-tokens nil)
-;; keep byte-compiler happy; `wisi-tokens' is bound in action created
-;; by wisi-semantic-action
+(defvar $nterm nil)
+;; keep byte-compiler happy; `wisi-tokens' and `$nterm' are bound in
+;; action created by wisi-semantic-action, and in module parser.
+;; FIXME: $nterm should have wisi- prefix
 
 (defun wisi-statement-action (pairs)
   "Cache information in text properties of tokens.
@@ -842,7 +856,7 @@ grammar action as:
                     (1+ (car region))
                     'wisi-cache
                     (wisi-cache-create
-                     :nonterm    $nterm;; $nterm defined in 
wisi-semantic-action
+                     :nonterm    $nterm
                      :token      token
                      :last       (- (cdr region) (car region))
                      :class      (or override-start class)
@@ -856,8 +870,7 @@ grammar action as:
                (when first-item
                  (setq first-item nil)
                  (when (or override-start
-                           ;; FIXME: why block-middle here?
-                           (memq class '(block-middle block-start 
statement-start)))
+                           (memq class '(block-start statement-start)))
                    (setq override-start nil)
                    (setq first-keyword-mark mark)))
 
@@ -1009,57 +1022,50 @@ vector [number class token_id class token_id ...]:
          ))
       )))
 
-(defun wisi-extend-action (number)
-  "Extend text of cache at token NUMBER to cover all of token NUMBER.
-Also override token with new token."
-  (let* ((token-region (aref wisi-tokens (1- number)));; wisi-tokens is 
let-bound in wisi-parse-reduce
-        (token (car token-region))
-        (region (cdr token-region))
+(defun wisi-extend-action (first last)
+  "Extend text of cache at token FIRST to cover all tokens thru LAST."
+  (let* ((first-region (cdr (aref wisi-tokens (1- first))));; wisi-tokens is 
let-bound in wisi-parse-reduce
+        (last-region (cdr (aref wisi-tokens (1- last))))
        cache)
 
-    (when region
-      (setq cache (wisi-get-cache (car region)))
-      (setf (wisi-cache-last cache) (- (cdr region) (car region)))
-      (setf (wisi-cache-token cache) token)
+    (when first-region
+      (setq cache (wisi-get-cache (car first-region)))
+      (setf (wisi-cache-last cache) (- (cdr last-region) (car first-region)))
       )
     ))
 
-(defun wisi-face-action-1 (face region &optional no-override)
-  "Apply FACE to REGION. If NO-OVERRIDE is non-nil, don't override existing 
face."
+(defun wisi-face-action-1 (face region &optional override-no-error)
+  "Apply FACE to REGION.
+If OVERRIDE-NO-ERROR is non-nil, don't report an error for overriding an 
existing face."
   (when region
     ;; We allow overriding a face property, because we don't want to
     ;; delete them in wisi-invalidate (see comments there). On the
     ;; other hand, it can be an error, so keep this debug
-    ;; code. However, note that font-lock-face properties must be
-    ;; removed first, or the buffer must be fresh (never parsed).
+    ;; code. However, to validly report errors, note that
+    ;; font-lock-face properties must be removed first, or the buffer
+    ;; must be fresh (never parsed), and wisi-debug must be > 1.
     ;;
-    ;; Grammar sets no-override when a higher-level production might
-    ;; override a face in a lower-level production; that's not an
-    ;; error.
-    (let (cur-face
-         (do-set t))
-      (when (or no-override
-               (> wisi-debug 1))
-       (setq cur-face (get-text-property (car region) 'font-lock-face))
-       (if cur-face
-           (if no-override
-               (setq do-set nil)
-             (message "%s:%d overriding face %s with %s on '%s'"
+    ;; Grammar sets override-no-error when a higher-level production might
+    ;; override a face in a lower-level production.
+    (when (> wisi-debug 1)
+      (let ((cur-face (get-text-property (car region) 'font-lock-face)))
+       (when cur-face
+         (unless override-no-error
+           (message "%s:%d overriding face %s with %s on '%s'"
                     (buffer-file-name)
                     (line-number-at-pos (car region))
                     face
                     cur-face
                     (buffer-substring-no-properties (car region) (cdr 
region))))
 
-         ))
-      (when do-set
-       (with-silent-modifications
-         (add-text-properties
-          (car region) (cdr region)
-          (list
-           'font-lock-face face
-           'fontified t))))
-    )))
+         )))
+    (with-silent-modifications
+      (add-text-properties
+       (car region) (cdr region)
+       (list
+       'font-lock-face face
+       'fontified t)))
+    ))
 
 (defun wisi-face-action (pairs &optional no-override)
   "Cache face information in text properties of tokens.
@@ -1361,14 +1367,28 @@ Return start cache."
 (defun wisi-comment-indent ()
   "For `comment-indent-function'. Indent single line comment to
 the comment on the previous line."
-  ;; This should only be called by comment-indent-new-line or
-  ;; fill-comment-paragraph, so there will be a preceding comment line
-  ;; that we can trust.
-  (save-excursion
-    (forward-comment -1)
-    (if (looking-at comment-start)
-       (current-column)
-      (error "wisi-comment-indent called after non-comment"))))
+  (or
+   (save-excursion
+     (forward-comment -1)
+     (when (looking-at comment-start)
+       ;; There is a preceding comment line.
+       (current-column)))
+
+   ;; Probably called from `comment-indent'; either to insert a new
+   ;; comment, or to indent the first line of an existing one.  In
+   ;; either case, the comment may be after code on the same line.
+   (save-excursion
+     (let ((start-col (current-column)))
+       (back-to-indentation)
+       (if (looking-at comment-start)
+          ;; An existing comment alone on a line. Return nil, so
+          ;; `comment-indent' will call `indent-according-to-mode'
+          nil
+
+        ;; A comment after code on the same line; point was at the
+        ;; comment start, so assume it is already correct.
+        start-col)))
+   ))
 
 (defun wisi-indent-current (offset)
   "Return indentation OFFSET relative to indentation of current line."
@@ -1475,6 +1495,13 @@ correct. Must leave point at indentation of current 
line.")
   (wisi-invalidate-cache)
   (wisi-validate-cache (point-max)))
 
+(defun wisi-lex-buffer ()
+  (interactive)
+  (syntax-propertize (point-max))
+  (goto-char (point-min))
+  (while (not (eq wisent-eoi-term (car (wisi-forward-token)))))
+  )
+
 (defun wisi-show-cache ()
   "Show cache at point."
   (interactive)
diff --git a/packages/yasnippet/CONTRIBUTING.md 
b/packages/yasnippet/CONTRIBUTING.md
index 83310bc..7e2ce47 100644
--- a/packages/yasnippet/CONTRIBUTING.md
+++ b/packages/yasnippet/CONTRIBUTING.md
@@ -23,5 +23,7 @@ there is no separate Changelog file.
 
     * foo.el (a-function): Terse summary of per-function changes.
 
+For trivial changes, a message consisting of just the changelog entry
+(the `* foo.el ...` part) is fine.
 
 [bugnote]: 
https://github.com/capitaomorte/yasnippet#important-note-regarding-bug-reporting
diff --git a/packages/yasnippet/README.mdown b/packages/yasnippet/README.mdown
index 75ca37a..6646557 100644
--- a/packages/yasnippet/README.mdown
+++ b/packages/yasnippet/README.mdown
@@ -8,12 +8,10 @@ templates. Bundled language templates include: C, C++, C#, 
Perl,
 Python, Ruby, SQL, LaTeX, HTML, CSS and more. The snippet syntax
 is inspired from [TextMate's][textmate-snippets] syntax, you can
 even [import](#import) most TextMate templates to
-YASnippet. Watch [a demo on YouTube][youtube-demo] or download a
-[higher resolution version][high-res-demo].
+YASnippet. Watch [a demo on YouTube][youtube-demo].
 
 [textmate-snippets]: http://manual.macromates.com/en/snippets
 [youtube-demo]: http://www.youtube.com/watch?v=ZCGmZK4V7Sg
-[high-res-demo]: http://yasnippet.googlecode.com/files/yas_demo.avi
 
 # Installation
 
@@ -36,33 +34,22 @@ Add your own snippets to `~/.emacs.d/snippets` by placing 
files there or invokin
 ## Install with `package-install`
 
 In a recent emacs `M-x list-packages` is the recommended way to list and 
install packages.
-[MELPA][melpa] keeps a very recent snapshot of YASnippet, see 
http://melpa.milkbox.net/#installing.
+[MELPA][melpa] keeps a very recent snapshot of YASnippet, see 
http://melpa.org/#installing.
 
 ## Install with el-get
 
 El-get is a nice way to get the most recent version, too. See
-https://github.com/dimitri/el-get for instructions. Be sure to install the
-"master" branch since the 3.x series still use the old googlecode code, base.
-Consider using this "local" recipe.
-
-    (push '(:name yasnippet
-                  :website "https://github.com/capitaomorte/yasnippet.git";
-                  :description "YASnippet is a template system for Emacs."
-                  :type github
-                  :pkgname "capitaomorte/yasnippet"
-                  :features "yasnippet"
-                  :compile "yasnippet.el")
-          el-get-sources)
+https://github.com/dimitri/el-get for instructions.
 
 ## Use `yas-minor-mode` on a per-buffer basis
 
-To use YASnippet as a non-global minor mode, replace `(yas-global-mode 1)` with
-`(yas-reload-all)` to load the snippet tables. Then add a call to
-`(yas-minor-mode)` to the major-modes where you to enable YASnippet.
+To use YASnippet as a non-global minor mode, don't call
+`yas-global-mode`; instead call `yas-reload-all` to load the snippet
+tables and then call `yas-minor-mode` from the hooks of major-modes
+where you want YASnippet enabled.
 
-    (add-hook 'prog-mode-hook
-              '(lambda ()
-                 (yas-minor-mode)))
+    (yas-reload-all)
+    (add-hook 'prog-mode-hook #'yas-minor-mode)
 
 # Where are the snippets?
 
@@ -76,8 +63,8 @@ download "git submodules" and find two subdirs under the main 
tree.
 
 1. `snippets/`
 
-    Points to [yasnippet-snippets][yasnippet-snippets] the snippet
-    collection of [AndreaCrotti](https://github.com/AndreaCrotti).
+    Points to [yasnippet-snippets] the snippet collection of
+    [AndreaCrotti](https://github.com/AndreaCrotti).
 
     The default configuraiton already points to this dir, so to use
     them, just make sure the submodule really was downloaded
@@ -85,8 +72,8 @@ download "git submodules" and find two subdirs under the main 
tree.
 
 2. `yasmate/`
 
-    Points to a github repo of the [yasmate][yasmate] tool, which is
-    dedicated to converting textmate bundles into yasnippet snippets.
+    Points to a github repo of the [yasmate] tool, which is dedicated
+    to converting textmate bundles into yasnippet snippets.
 
     To use these snippets you have to run the tool first, so
     [see its doc][yasmate]), and then point the `yas-snippet-dirs`
@@ -95,6 +82,11 @@ download "git submodules" and find two subdirs under the 
main tree.
     If you have a working ruby environment, you can probably get lucky
     directly with `rake convert-bundles`.
 
+3.  [textmate-to-yas.el]
+
+    This is another textmate bundle converting tool using Elisp
+    instead of Ruby.
+
 Naturally, you can point `yas-snippet-dirs` to good snippet collections out
 there. If you have created snippets for a mode, or multiple modes,
 consider creating a repository to host them, then tell users that it
@@ -136,14 +128,14 @@ $ git clone https://github.com/capitaomorte/yasnippet.git 
yasnippet-bug
 $ cd yasnippet-bug
 $ git log -1 --oneline
 6053db0 Closes #527: Unbreak case where yas-fallback-behaviour is a list
-$ HOME=$PWD emacs -L  # This "sandboxes" your emacs, melpa configuration, etc
+$ HOME=$PWD emacs -L . # This "sandboxes" your emacs, melpa configuration, etc
 
 (require 'yasnippet)
 (yas-global-mode 1)
 
-When I open a foo-mode file I can't expand foo-mode snippets! 
+When I open a foo-mode file I don't see foo-mode under the "YASnippet" menu!
 OR
-I can't get yasnippet to load because frankinbogen!
+When loading yasnippet I see "Error: failed to frobnicate"!
 ```
 
 Using `emacs -Q` or temporarily moving your `.emacs` init file to the side 
@@ -175,4 +167,5 @@ Finally, thank you very much for using YASnippet!
 [forum]: http://groups.google.com/group/smart-snippet
 [melpa]: http://melpa.milkbox.net/
 [yasmate]: http://github.com/capitaomorte/yasmate
+[textmate-to-yas.el]: https://github.com/mattfidler/textmate-to-yas.el
 [yasnippet-snippets]: http://github.com/AndreaCrotti/yasnippet-snippets
diff --git a/packages/yasnippet/doc/doc/.nosearch 
b/packages/yasnippet/doc/.nosearch
similarity index 100%
rename from packages/yasnippet/doc/doc/.nosearch
rename to packages/yasnippet/doc/.nosearch
diff --git a/packages/yasnippet/doc/doc/faq.org b/packages/yasnippet/doc/faq.org
similarity index 100%
rename from packages/yasnippet/doc/doc/faq.org
rename to packages/yasnippet/doc/faq.org
diff --git a/packages/yasnippet/doc/doc/index.org 
b/packages/yasnippet/doc/index.org
similarity index 100%
rename from packages/yasnippet/doc/doc/index.org
rename to packages/yasnippet/doc/index.org
diff --git a/packages/yasnippet/doc/doc/nav-menu.html.inc 
b/packages/yasnippet/doc/nav-menu.html.inc
similarity index 100%
rename from packages/yasnippet/doc/doc/nav-menu.html.inc
rename to packages/yasnippet/doc/nav-menu.html.inc
diff --git a/packages/yasnippet/doc/doc/org-setup.inc 
b/packages/yasnippet/doc/org-setup.inc
similarity index 100%
rename from packages/yasnippet/doc/doc/org-setup.inc
rename to packages/yasnippet/doc/org-setup.inc
diff --git a/packages/yasnippet/doc/doc/snippet-development.org 
b/packages/yasnippet/doc/snippet-development.org
similarity index 100%
rename from packages/yasnippet/doc/doc/snippet-development.org
rename to packages/yasnippet/doc/snippet-development.org
diff --git a/packages/yasnippet/doc/doc/snippet-expansion.org 
b/packages/yasnippet/doc/snippet-expansion.org
similarity index 92%
rename from packages/yasnippet/doc/doc/snippet-expansion.org
rename to packages/yasnippet/doc/snippet-expansion.org
index 876b81c..fdc02cc 100644
--- a/packages/yasnippet/doc/doc/snippet-expansion.org
+++ b/packages/yasnippet/doc/snippet-expansion.org
@@ -102,21 +102,23 @@ prefer.
 
 ** Expanding from emacs-lisp code
 
-Sometimes you might want to expand a snippet directly from you own
-elisp code. You should call
-[[sym:yas-expand-snippet][=yas-expand-snippet=]] instead of
-[[sym:yas-expand][=yas-expand=]] in this case.
+Sometimes you might want to expand a snippet directly from your own
+elisp code. You should call [[sym:yas-expand-snippet][=yas-expand-snippet=]] 
instead of
+[[sym:yas-expand][=yas-expand=]] in this case. 
[[sym:yas-expand-snippet][=yas-expand-snippet=]] takes a string in
+snippet template syntax, if you want to expand an existing snippet you
+can use [[sym:yas-lookup-snippet][=yas-lookup-snippet=]] to find its contents 
by name.
 
 As with expanding from the menubar, the condition system and multiple
-candidates doesn't affect expansion. In fact, expanding from the
-YASnippet menu has the same effect of evaluating the follow code:
+candidates doesn't affect expansion (the condition system does affect
+[[sym:yas-lookup-snippet][=yas-lookup-snippet=]] though). In fact, expanding 
from the YASnippet
+menu has the same effect of evaluating the follow code:
 
 #+BEGIN_SRC emacs-lisp
   (yas-expand-snippet template)
 #+END_SRC
 
-See the internal documentation on 
[[sym:yas-expand-snippet][=yas-expand-snippet=]] for more
-information.
+See the internal documentation on 
[[sym:yas-expand-snippet][=yas-expand-snippet=]] and
+[[sym:yas-lookup-snippet][=yas-lookup-snippet=]] for more information.
 
 * Controlling expansion
 
diff --git a/packages/yasnippet/doc/doc/snippet-menu.org 
b/packages/yasnippet/doc/snippet-menu.org
similarity index 96%
rename from packages/yasnippet/doc/doc/snippet-menu.org
rename to packages/yasnippet/doc/snippet-menu.org
index 46b9b0c..272ea16 100644
--- a/packages/yasnippet/doc/doc/snippet-menu.org
+++ b/packages/yasnippet/doc/snippet-menu.org
@@ -55,13 +55,12 @@ These customizations can also be found in the menu itself, 
under the
 
 The "Indenting" submenu contains options to control the values of
 [[sym:yas-indent-line][=yas-indent-line=]] and 
[[sym:yas-also-auto-indent-first-line][=yas-also-auto-indent-first-line=]]. See
-[[./snippet-development.org][Writing snippets]] .
+[[./snippet-development.org][Writing snippets]].
 
 * Prompting method
 
 The "Prompting method" submenu contains options to control the value of
-[[sym:yas-prompt-functions][=yas-prompt-functions=]]. See 
[[./snippet-expansion.org][Expanding
-snippets]] .
+[[sym:yas-prompt-functions][=yas-prompt-functions=]]. See 
[[./snippet-expansion.org][Expanding snippets]].
 
 * Misc
 
diff --git a/packages/yasnippet/doc/doc/snippet-organization.org 
b/packages/yasnippet/doc/snippet-organization.org
similarity index 83%
rename from packages/yasnippet/doc/doc/snippet-organization.org
rename to packages/yasnippet/doc/snippet-organization.org
index ee55a8e..0f5de52 100644
--- a/packages/yasnippet/doc/doc/snippet-organization.org
+++ b/packages/yasnippet/doc/snippet-organization.org
@@ -48,7 +48,7 @@
                                   '("~/Downloads/interesting-snippets")))
    #+end_src
 
-   Collections appearing earlier in the list shadow snippets with same names
+   Collections appearing earlier in the list override snippets with same names
    appearing in collections later in the list. 
[[sym:yas-new-snippet][=yas-new-snippet=]] always stores
    snippets in the first collection.
 
@@ -112,10 +112,20 @@
 
 ** TODO
 
-* TODO The =.yas-compiled-snippet.el= file
+* The =.yas-compiled-snippet.el= file
 
-** TODO
+   You may compile a top-level snippet directory with the
+   =yas-compile-directory= function, which will create a
+   =.yas-compiled-snippets.el= file under each mode subdirectory,
+   which contains definitions for all snippets in the subdirectory.
+   Compilation helps improve loading time.
+
+   Alternatively, you may compile all directories in the list
+   =yas-snippet-dirs= with the =yas-recompile-all= function.
+
+* The =.yas-skip= file
 
-* TODO The =.yas-skip= file
+  A =.yas-skip= file in a mode's snippet subdirectory tells YASnippet
+  not to load snippets from there.
 
 ** TODO
diff --git a/packages/yasnippet/doc/doc/snippet-reference.org 
b/packages/yasnippet/doc/snippet-reference.org
similarity index 100%
rename from packages/yasnippet/doc/doc/snippet-reference.org
rename to packages/yasnippet/doc/snippet-reference.org
diff --git a/packages/yasnippet/doc/doc/stylesheets/manual.css 
b/packages/yasnippet/doc/stylesheets/manual.css
similarity index 100%
rename from packages/yasnippet/doc/doc/stylesheets/manual.css
rename to packages/yasnippet/doc/stylesheets/manual.css
diff --git a/packages/yasnippet/doc/yas-doc-helper.el 
b/packages/yasnippet/doc/yas-doc-helper.el
index 5bf0d7a..f4cd49b 100755
--- a/packages/yasnippet/doc/yas-doc-helper.el
+++ b/packages/yasnippet/doc/yas-doc-helper.el
@@ -135,7 +135,7 @@
                   (princ yas--version (current-buffer)))))
        (proj-plist
         `(,@(when (fboundp 'org-html-publish-to-html)
-              '(:publishing-function 'org-html-publish-to-html))
+              '(:publishing-function org-html-publish-to-html))
           :base-directory ,dir :publishing-directory ,dir
           :html-preamble
           ,(with-temp-buffer
diff --git a/packages/yasnippet/yasnippet-debug.el 
b/packages/yasnippet/yasnippet-debug.el
index 593d081..b12bcd4 100644
--- a/packages/yasnippet/yasnippet-debug.el
+++ b/packages/yasnippet/yasnippet-debug.el
@@ -46,7 +46,7 @@
                      (yas--snippet-id snippet)
                      (overlay-start (yas--snippet-control-overlay snippet))
                      (overlay-end (yas--snippet-control-overlay snippet))))
-      (princ (format "\tactive field: %d from %s to %s covering \"%s\"\n"
+      (princ (format "\tactive field: %s from %s to %s covering \"%s\"\n"
                      (yas--field-number (yas--snippet-active-field snippet))
                      (marker-position (yas--field-start 
(yas--snippet-active-field snippet)))
                      (marker-position (yas--field-end 
(yas--snippet-active-field snippet)))
@@ -56,7 +56,7 @@
                        (yas--exit-marker (yas--snippet-exit snippet))
                        (yas--exit-next (yas--snippet-exit snippet)))))
       (dolist (field (yas--snippet-fields snippet))
-        (princ (format "\tfield: %d from %s to %s covering \"%s\" next: %s%s\n"
+        (princ (format "\tfield: %s from %s to %s covering \"%s\" next: %s%s\n"
                        (yas--field-number field)
                        (marker-position (yas--field-start field))
                        (marker-position (yas--field-end field))
@@ -77,14 +77,15 @@
                    (point-max)))
     (unless (eq buffer-undo-list t)
       (princ (format "Undpolist has %s elements. First 10 elements follow:\n" 
(length buffer-undo-list)))
-      (let ((first-ten (subseq buffer-undo-list 0 19)))
+      (let ((first-ten (subseq buffer-undo-list 0 (min 19
+                                                       (length 
buffer-undo-list)))))
         (dolist (undo-elem first-ten)
           (princ (format "%2s:  %s\n" (position undo-elem first-ten) 
(truncate-string-to-width (format "%s" undo-elem) 70))))))))
 
 (defun yas--debug-format-fom-concise (fom)
   (when fom
     (cond ((yas--field-p fom)
-           (format "field %d from %d to %d"
+           (format "field %s from %d to %d"
                    (yas--field-number fom)
                    (marker-position (yas--field-start fom))
                    (marker-position (yas--field-end fom))))
diff --git a/packages/yasnippet/yasnippet-tests.el 
b/packages/yasnippet/yasnippet-tests.el
index 2d7a0bc..648e4f3 100644
--- a/packages/yasnippet/yasnippet-tests.el
+++ b/packages/yasnippet/yasnippet-tests.el
@@ -54,7 +54,7 @@
     (yas-expand-snippet "${1:brother} from another $1")
     (should (string= (yas--buffer-contents)
                      "brother from another brother"))
-    (ert-simulate-command `(yas-mock-insert "bla"))
+    (yas-mock-insert "bla")
     (should (string= (yas--buffer-contents)
                      "bla from another bla"))))
 
@@ -64,7 +64,7 @@
     (yas-expand-snippet "${1:brother} from another ${1:$(upcase yas-text)}")
     (should (string= (yas--buffer-contents)
                      "brother from another BROTHER"))
-    (ert-simulate-command `(yas-mock-insert "bla"))
+    (yas-mock-insert "bla")
     (should (string= (yas--buffer-contents)
                      "bla from another BLA"))))
 
@@ -74,7 +74,7 @@
     (let ((snippet "${1:$$(upcase yas-text)}${1:$(concat \"bar\" yas-text)}"))
       (yas-expand-snippet snippet)
       (should (string= (yas--buffer-contents) "bar"))
-      (ert-simulate-command `(yas-mock-insert "foo"))
+      (yas-mock-insert "foo")
       (should (string= (yas--buffer-contents) "FOObarFOO")))))
 
 (ert-deftest nested-placeholders-kill-superfield ()
@@ -83,7 +83,7 @@
     (yas-expand-snippet "brother from ${2:another ${3:mother}}!")
     (should (string= (yas--buffer-contents)
                      "brother from another mother!"))
-    (ert-simulate-command `(yas-mock-insert "bla"))
+    (yas-mock-insert "bla")
     (should (string= (yas--buffer-contents)
                      "brother from bla!"))))
 
@@ -92,7 +92,7 @@
     (yas-minor-mode 1)
     (yas-expand-snippet "brother from ${2:another ${3:mother}}!")
     (ert-simulate-command '(yas-next-field-or-maybe-expand))
-    (ert-simulate-command `(yas-mock-insert "bla"))
+    (yas-mock-insert "bla")
     (should (string= (yas--buffer-contents)
                      "brother from another bla!"))))
 
@@ -102,7 +102,7 @@
     (yas-expand-snippet "<%= f.submit \"${1:Submit}\"${2:$(and (yas-text) \", 
:disable_with => '\")}${2:$1ing...}${2:$(and (yas-text) \"'\")} %>")
     (should (string= (yas--buffer-contents)
                      "<%= f.submit \"Submit\", :disable_with => 'Submiting...' 
%>"))
-    (ert-simulate-command `(yas-mock-insert "Send"))
+    (yas-mock-insert "Send")
     (should (string= (yas--buffer-contents)
                      "<%= f.submit \"Send\", :disable_with => 'Sending...' 
%>"))))
 
@@ -110,7 +110,7 @@
   (with-temp-buffer
     (yas-minor-mode 1)
     (yas-expand-snippet "${1:FOOOOOOO}${2:$1}${3:$2}${4:$3}")
-    (ert-simulate-command `(yas-mock-insert "abc"))
+    (yas-mock-insert "abc")
     (should (string= (yas--buffer-contents) "abcabcabcabc"))))
 
 (ert-deftest delete-numberless-inner-snippet-issue-562 ()
@@ -124,12 +124,21 @@
     (should (looking-at "ble"))
     (should (null (yas--snippets-at-point)))))
 
+(ert-deftest ignore-trailing-whitespace ()
+  (should (equal
+           (with-temp-buffer
+             (insert "# key: foo\n# --\nfoo")
+             (yas--parse-template))
+           (with-temp-buffer
+             (insert "# key: foo \n# --\nfoo")
+             (yas--parse-template)))))
+
 ;; (ert-deftest in-snippet-undo ()
 ;;   (with-temp-buffer
 ;;     (yas-minor-mode 1)
 ;;     (yas-expand-snippet "brother from ${2:another ${3:mother}}!")
 ;;     (ert-simulate-command '(yas-next-field-or-maybe-expand))
-;;     (ert-simulate-command `(yas-mock-insert "bla"))
+;;     (yas-mock-insert "bla")
 ;;     (ert-simulate-command '(undo))
 ;;     (should (string= (yas--buffer-contents)
 ;;                      "brother from another mother!"))))
@@ -214,7 +223,7 @@
           (snippet "if ${1:condition}\n`yas-selected-text`\nelse\n$3\nend"))
       (yas-expand-snippet snippet)
       (yas-next-field)
-      (ert-simulate-command `(yas-mock-insert "bbb"))
+      (yas-mock-insert "bbb")
       (should (string= (yas--buffer-contents) "if 
condition\naaa\nelse\nbbb\nend")))))
 
 (defmacro yas--with-font-locked-temp-buffer (&rest body)
@@ -315,9 +324,9 @@
                                 \"fail\")}"))
       (yas-expand-snippet snippet)
       (should (string= (yas--buffer-contents) "fail"))
-      (ert-simulate-command `(yas-mock-insert "foobaaar"))
+      (yas-mock-insert "foobaaar")
       (should (string= (yas--buffer-contents) "foobaaarfail"))
-      (ert-simulate-command `(yas-mock-insert "baz"))
+      (yas-mock-insert "baz")
       (should (string= (yas--buffer-contents) "foobaaarbazok")))))
 
 
@@ -341,7 +350,7 @@ TODO: correct this bug!"
 
 ;; See issue #497. To understand this test, follow the example of the
 ;; `yas-key-syntaxes' docstring.
-;; 
+;;
 (ert-deftest complicated-yas-key-syntaxes ()
   (with-temp-buffer
     (yas-saving-variables
@@ -446,6 +455,14 @@ TODO: correct this bug!"
           ("lisp-interaction-mode" ("sc" . "brother from another mother"))))
        ,@body))))
 
+(ert-deftest snippet-lookup ()
+  "Test `yas-lookup-snippet'."
+  (yas-with-some-interesting-snippet-dirs
+   (yas-reload-all 'no-jit)
+   (should (equal (yas-lookup-snippet "printf" 'c-mode) "printf($1);"))
+   (should (equal (yas-lookup-snippet "def" 'c-mode) "# define"))
+   (should-not (yas-lookup-snippet "no such snippet" nil 'noerror))
+   (should-not (yas-lookup-snippet "printf" 'emacs-lisp-mode 'noerror))))
 
 (ert-deftest basic-jit-loading ()
   "Test basic loading and expansion of snippets"
@@ -454,7 +471,7 @@ TODO: correct this bug!"
    (yas--basic-jit-loading-1)))
 
 (ert-deftest basic-jit-loading-with-compiled-snippets ()
-  "Test basic loading and expansion of snippets"
+  "Test basic loading and expansion of compiled snippets"
   (yas-with-some-interesting-snippet-dirs
    (yas-reload-all)
    (yas-recompile-all)
@@ -464,6 +481,20 @@ TODO: correct this bug!"
      (yas-reload-all)
      (yas--basic-jit-loading-1))))
 
+(ert-deftest visiting-compiled-snippets ()
+  "Test snippet visiting for compiled snippets."
+  (yas-with-some-interesting-snippet-dirs
+   (yas-recompile-all)
+   (yas-reload-all 'no-jit) ; must be loaded for `yas-lookup-snippet' to work.
+   (yas--with-temporary-redefinitions ((find-file-noselect
+                                        (filename &rest _)
+                                        (throw 'yas-snippet-file filename)))
+     (should (string-suffix-p
+              "cc-mode/def"
+              (catch 'yas-snippet-file
+                (yas--visit-snippet-file-1
+                 (yas--lookup-snippet-1 "def" 'cc-mode))))))))
+
 (ert-deftest loading-with-cyclic-parenthood ()
   "Test loading when cyclic parenthood is setup."
   (yas-saving-variables
@@ -482,15 +513,44 @@ TODO: correct this bug!"
                           yet-another-c-mode
                           and-also-this-one
                           and-that-one
-                          ;; prog-mode doesn't exit in emacs 24.3
+                          ;; prog-mode doesn't exist in emacs 24.3
                           ,@(if (fboundp 'prog-mode)
                                 '(prog-mode))
                           emacs-lisp-mode
                           lisp-interaction-mode))
               (observed (yas--modes-to-activate)))
-         (should (null (cl-set-exclusive-or expected observed)))
-         (should (= (length expected)
-                    (length observed))))))))
+         (should (equal major-mode (car observed)))
+         (should (equal (sort expected #'string<) (sort observed 
#'string<))))))))
+
+(ert-deftest extra-modes-parenthood ()
+  "Test activation of parents of `yas--extra-modes'."
+  (yas-saving-variables
+   (yas-with-snippet-dirs '((".emacs.d/snippets"
+                             ("c-mode"
+                              (".yas-parents" . "cc-mode"))
+                             ("yet-another-c-mode"
+                              (".yas-parents" . "c-mode and-also-this-one 
lisp-interaction-mode"))))
+     (yas-reload-all)
+     (with-temp-buffer
+       (yas-activate-extra-mode 'c-mode)
+       (yas-activate-extra-mode 'yet-another-c-mode)
+       (yas-activate-extra-mode 'and-that-one)
+       (let* ((expected-first `(and-that-one
+                                yet-another-c-mode
+                                c-mode
+                                ,major-mode))
+              (expected-rest `(cc-mode
+                               ;; prog-mode doesn't exist in emacs 24.3
+                               ,@(if (fboundp 'prog-mode)
+                                     '(prog-mode))
+                               emacs-lisp-mode
+                               and-also-this-one
+                               lisp-interaction-mode))
+              (observed (yas--modes-to-activate)))
+         (should (equal expected-first
+                        (cl-subseq observed 0 (length expected-first))))
+         (should (equal (sort expected-rest #'string<)
+                        (sort (cl-subseq observed (length expected-first)) 
#'string<))))))))
 
 (defalias 'yas--phony-c-mode 'c-mode)
 
@@ -700,7 +760,7 @@ TODO: be meaner"
           (should (not (eq (key-binding (yas--read-keybinding "TAB")) 
'yas-expand)))
           (should (eq (key-binding (yas--read-keybinding "SPC")) 
'yas-expand))))
     ;; FIXME: actually should restore to whatever saved values where there.
-    ;; 
+    ;;
     (define-key yas-minor-mode-map [tab] 'yas-expand)
     (define-key yas-minor-mode-map (kbd "TAB") 'yas-expand)
     (define-key yas-minor-mode-map (kbd "SPC") nil)))
@@ -765,10 +825,9 @@ add the snippets associated with the given mode."
                         (yas--buffer-contents))))))
 
 (defun yas-mock-insert (string)
-  (interactive)
-  (do ((i 0 (1+ i)))
-      ((= i (length string)))
-    (insert (aref string i))))
+  (dotimes (i (length string))
+    (let ((last-command-event (aref string i)))
+      (ert-simulate-command '(self-insert-command 1)))))
 
 (defun yas-make-file-or-dirs (ass)
   (let ((file-or-dir-name (car ass))
@@ -819,6 +878,17 @@ add the snippets associated with the given mode."
   ;; FIXME: Why provide this default definition here?!?
   (defalias 'special-mode 'fundamental))
 
+(unless (fboundp 'string-suffix-p)
+  ;; introduced in Emacs 24.4
+  (defun string-suffix-p (suffix string &optional ignore-case)
+    "Return non-nil if SUFFIX is a suffix of STRING.
+If IGNORE-CASE is non-nil, the comparison is done without paying
+attention to case differences."
+    (let ((start-pos (- (length string) (length suffix))))
+      (and (>= start-pos 0)
+           (eq t (compare-strings suffix nil nil
+                                  string start-pos nil ignore-case))))))
+
 ;;; btw to test this in emacs22 mac osx:
 ;;; curl -L -O 
https://github.com/mirrors/emacs/raw/master/lisp/emacs-lisp/ert.el
 ;;; curl -L -O 
https://github.com/mirrors/emacs/raw/master/lisp/emacs-lisp/ert-x.el
diff --git a/packages/yasnippet/yasnippet.el b/packages/yasnippet/yasnippet.el
index 95c96e4..dcec0e2 100644
--- a/packages/yasnippet/yasnippet.el
+++ b/packages/yasnippet/yasnippet.el
@@ -1,8 +1,8 @@
 ;;; yasnippet.el --- Yet another snippet extension for Emacs.
 
 ;; Copyright (C) 2008-2013, 2015 Free Software Foundation, Inc.
-;; Authors: pluskid <address@hidden>,  João Távora <address@hidden>
-;; Maintainer: João Távora <address@hidden>
+;; Authors: pluskid <address@hidden>,  João Távora <address@hidden>, Noam 
Postavsky <address@hidden>
+;; Maintainer: Noam Postavsky <address@hidden>
 ;; Version: 0.8.1
 ;; Package-version: 0.8.0
 ;; X-URL: http://github.com/capitaomorte/yasnippet
@@ -41,7 +41,7 @@
 ;;           stored.  Can also be a list of directories.  In that case,
 ;;           when used for bulk (re)loading of snippets (at startup or
 ;;           via `yas-reload-all'), directories appearing earlier in
-;;           the list shadow other dir's snippets.  Also, the first
+;;           the list override other dir's snippets.  Also, the first
 ;;           directory is taken as the default for storing the user's
 ;;           new snippets.
 ;;
@@ -156,8 +156,11 @@
       (when load-file-name
         (concat (file-name-directory load-file-name) "snippets")))
 
+(defconst yas--default-user-snippets-dir
+  (concat user-emacs-directory "snippets"))
+
 (defcustom yas-snippet-dirs (remove nil
-                                    (list "~/.emacs.d/snippets"
+                                    (list yas--default-user-snippets-dir
                                           'yas-installed-snippets-dir))
   "List of top-level snippet directories.
 
@@ -165,7 +168,7 @@ Each element, a string or a symbol whose value is a string,
 designates a top-level directory where per-mode snippet
 directories can be found.
 
-Elements appearing earlier in the list shadow later elements'
+Elements appearing earlier in the list override later elements'
 snippets.
 
 The first directory is taken as the default for storing snippet's
@@ -213,7 +216,7 @@ If nil, don't use any snippet."
 (defcustom yas-prompt-functions '(yas-x-prompt
                                   yas-dropdown-prompt
                                   yas-completing-prompt
-                                  yas-ido-prompt
+                                  yas-maybe-ido-prompt
                                   yas-no-prompt)
   "Functions to prompt for keys, templates, etc interactively.
 
@@ -459,10 +462,10 @@ Attention: These hooks are not run when exiting 
nested/stacked snippet expansion
   "Hooks to run just before expanding a snippet.")
 
 (defvar yas-buffer-local-condition
-  '(if (and (or (fourth (syntax-ppss))
-                (fifth (syntax-ppss)))
-           this-command
-            (eq this-command 'yas-expand-from-trigger-key))
+  '(if (and (let ((ppss (syntax-ppss)))
+              (or (nth 3 ppss) (nth 4 ppss)))
+            (memq this-command '(yas-expand yas-expand-from-trigger-key
+                                            yas-expand-from-keymap)))
        '(require-snippet-condition . force-in-comment)
      t)
   "Snippet expanding condition.
@@ -725,23 +728,24 @@ defined direct keybindings to the command
                      yas--direct-keymaps))
            yas--tables))
 
-(defun yas--modes-to-activate ()
+(defun yas--modes-to-activate (&optional mode)
   "Compute list of mode symbols that are active for `yas-expand'
 and friends."
-  (let (dfs)
-    (setq dfs (lambda (mode &optional explored)
-                (push mode explored)
-                (cons mode
-                      (loop for neighbour
-                            in (cl-list* (get mode 'derived-mode-parent)
-                                         (ignore-errors (symbol-function mode))
-                                         (gethash mode yas--parents))
-                            when (and neighbour
-                                      (not (memq neighbour explored))
-                                      (symbolp neighbour))
-                            append (funcall dfs neighbour explored)))))
-    (remove-duplicates (append yas--extra-modes
-                               (funcall dfs major-mode)))))
+  (let* ((explored (if mode (list mode) ; Building up list in reverse.
+                     (cons major-mode (reverse yas--extra-modes))))
+         (dfs
+          (lambda (mode)
+            (cl-loop for neighbour
+                     in (cl-list* (get mode 'derived-mode-parent)
+                                  (ignore-errors (symbol-function mode))
+                                  (gethash mode yas--parents))
+                     when (and neighbour
+                               (not (memq neighbour explored))
+                               (symbolp neighbour))
+                     do (push neighbour explored)
+                     (funcall dfs neighbour)))))
+    (mapcar dfs explored)
+    (nreverse explored)))
 
 (defvar yas-minor-mode-hook nil
   "Hook run when `yas-minor-mode' is turned on.")
@@ -912,14 +916,39 @@ Honour `yas-dont-activate', which see."
 
 ;;; Internal structs for template management
 
-(defstruct (yas--template (:constructor yas--make-template))
+(cl-defstruct (yas--template
+               (:constructor yas--make-template)
+               ;; Handles `yas-define-snippets' format, plus the
+               ;; initial TABLE argument.
+               (:constructor
+                yas--define-snippets-2
+                (table
+                 key content
+                 &optional xname condition group
+                 expand-env load-file xkeybinding xuuid save-file
+                 &aux
+                 (name (or xname
+                           ;; A little redundant: we always get a name
+                           ;; from `yas--parse-template' except when
+                           ;; there isn't a file.
+                           (and load-file (file-name-nondirectory load-file))
+                           (and save-file (file-name-nondirectory save-file))
+                           key))
+                 (keybinding (yas--read-keybinding xkeybinding))
+                 (uuid (or xuuid name))
+                 (old (gethash uuid (yas--table-uuidhash table)))
+                 (menu-binding-pair
+                  (and old (yas--template-menu-binding-pair old)))
+                 (perm-group
+                  (and old (yas--template-perm-group old))))))
   "A template for a snippet."
   key
   content
   name
   condition
   expand-env
-  file
+  load-file
+  save-file
   keybinding
   uuid
   menu-binding-pair
@@ -1079,7 +1108,8 @@ keybinding)."
 (defun yas--update-template (table template)
   "Add or update TEMPLATE in TABLE.
 
-Also takes care of adding and updating to the associated menu."
+Also takes care of adding and updating to the associated menu.
+Return TEMPLATE."
   ;; Remove from table by uuid
   ;;
   (yas--remove-template-by-uuid table (yas--template-uuid template))
@@ -1088,7 +1118,8 @@ Also takes care of adding and updating to the associated 
menu."
   (yas--add-template table template)
   ;; Take care of the menu
   ;;
-  (yas--update-template-menu table template))
+  (yas--update-template-menu table template)
+  template)
 
 (defun yas--update-template-menu (table template)
   "Update every menu-related for TEMPLATE."
@@ -1243,7 +1274,8 @@ Returns (TEMPLATES START END). This function respects
                            'again)
                  (setq methods (cdr methods))))
               (t
-               (yas--warning "Warning invalid element %s in 
`yas-key-syntaxes'" method)))
+               (setq methods (cdr methods))
+               (yas--warning "Invalid element `%s' in `yas-key-syntaxes'" 
method)))
         (let ((possible-key (buffer-substring-no-properties (point) original)))
           (save-excursion
             (goto-char original)
@@ -1333,15 +1365,17 @@ return an expression that when evaluated will issue an 
error."
             yas--direct-keymaps))
     table))
 
-(defun yas--get-snippet-tables ()
-  "Get snippet tables for current buffer.
+(defun yas--get-snippet-tables (&optional mode)
+  "Get snippet tables for MODE.
+
+MODE defaults to the current buffer's `major-mode'.
 
 Return a list of `yas--table' objects.  The list of modes to
 consider is returned by `yas--modes-to-activate'"
   (remove nil
           (mapcar #'(lambda (name)
                       (gethash name yas--tables))
-                  (yas--modes-to-activate))))
+                  (yas--modes-to-activate mode))))
 
 (defun yas--menu-keymap-get-create (mode &optional parents)
   "Get or create the menu keymap for MODE and its PARENTS.
@@ -1356,16 +1390,6 @@ them all in `yas--menu-table'"
                     :visible (yas--show-menu-p ',mode)))
     menu-keymap))
 
-
-(defmacro yas--called-interactively-p (&optional kind)
-  "A backward-compatible version of `called-interactively-p'.
-
-Optional KIND is as documented at `called-interactively-p'
-in GNU Emacs 24.1 or higher."
-  (if (string< emacs-version "24.1")
-      '(called-interactively-p)
-    `(called-interactively-p ,kind)))
-
 
 ;;; Template-related and snippet loading functions
 
@@ -1380,7 +1404,7 @@ otherwise we attempt to calculate it from FILE.
 
 Return a snippet-definition, i.e. a list
 
- (KEY TEMPLATE NAME CONDITION GROUP VARS FILE KEYBINDING UUID)
+ (KEY TEMPLATE NAME CONDITION GROUP VARS LOAD-FILE KEYBINDING UUID)
 
 If the buffer contains a line of \"# --\" then the contents above
 this line are ignored. Directives can set most of these with the syntax:
@@ -1417,7 +1441,7 @@ Here's a list of currently recognized directives:
                                                      (point-max)))
                (setq bound (point))
                (goto-char (point-min))
-               (while (re-search-forward "^# *\\([^ ]+?\\) *: *\\(.*\\)$" 
bound t)
+               (while (re-search-forward "^# *\\([^ ]+?\\) *: 
*\\(.*?\\)[[:space:]]*$" bound t)
                  (when (string= "uuid" (match-string-no-properties 1))
                    (setq uuid (match-string-no-properties 2)))
                  (when (string= "type" (match-string-no-properties 1))
@@ -1544,6 +1568,9 @@ Optional PROMPT sets the prompt to use."
 (defun yas-x-prompt (prompt choices &optional display-fn)
   "Display choices in a x-window prompt."
   (when (and window-system choices)
+    ;; Let window position be recalculated to ensure that
+    ;; `posn-at-point' returns non-nil.
+    (redisplay)
     (or
      (x-popup-menu
       (if (fboundp 'posn-at-point)
@@ -1558,11 +1585,13 @@ Optional PROMPT sets the prompt to use."
                             (if display-fn (mapcar display-fn choices) 
choices)))))
      (keyboard-quit))))
 
+(defun yas-maybe-ido-prompt (prompt choices &optional display-fn)
+  (when (bound-and-true-p ido-mode)
+    (yas-ido-prompt prompt choices display-fn)))
+
 (defun yas-ido-prompt (prompt choices &optional display-fn)
-  (when (and (fboundp 'ido-completing-read)
-            (or (>= emacs-major-version 24)
-                ido-mode))
-    (yas-completing-prompt prompt choices display-fn #'ido-completing-read)))
+  (require 'ido)
+  (yas-completing-prompt prompt choices display-fn #'ido-completing-read))
 
 (defun yas-dropdown-prompt (_prompt choices &optional display-fn)
   (when (fboundp 'dropdown-list)
@@ -1596,42 +1625,10 @@ Optional PROMPT sets the prompt to use."
 
 (defun yas--define-snippets-1 (snippet snippet-table)
   "Helper for `yas-define-snippets'."
-  ;; X) Calculate some more defaults on the values returned by
-  ;; `yas--parse-template'.
-  ;;
-  (let* ((file (seventh snippet))
-         (key (car snippet))
-         (name (or (third snippet)
-                   (and file
-                        (file-name-directory file))))
-         (condition (fourth snippet))
-         (group (fifth snippet))
-         (keybinding (yas--read-keybinding (eighth snippet)))
-         (uuid (or (ninth snippet)
-                  name))
-         (template (or (gethash uuid (yas--table-uuidhash snippet-table))
-                       (yas--make-template :uuid uuid
-                                           :table snippet-table))))
-    ;; X) populate the template object
-    ;;
-    (setf (yas--template-key template)        key)
-    (setf (yas--template-content template)    (second snippet))
-    (setf (yas--template-name template)       (or name key))
-    (setf (yas--template-group template)      group)
-    (setf (yas--template-condition template)  condition)
-    (setf (yas--template-expand-env template) (sixth snippet))
-    (setf (yas--template-file template)       (seventh snippet))
-    (setf (yas--template-keybinding template) keybinding)
-
-    ;; X) Update this template in the appropriate table. This step
-    ;;    also will take care of adding the key indicators in the
-    ;;    templates menu entry, if any
-    ;;
-    (yas--update-template snippet-table template)
-    ;; X) Return the template
-    ;;
-    ;;
-    template))
+  ;; Update the appropriate table.  Also takes care of adding the
+  ;; key indicators in the templates menu entry, if any.
+  (yas--update-template
+   snippet-table (apply #'yas--define-snippets-2 snippet-table snippet)))
 
 (defun yas-define-snippets (mode snippets)
   "Define SNIPPETS for MODE.
@@ -1639,7 +1636,7 @@ Optional PROMPT sets the prompt to use."
 SNIPPETS is a list of snippet definitions, each taking the
 following form
 
- (KEY TEMPLATE NAME CONDITION GROUP EXPAND-ENV FILE KEYBINDING UUID)
+ (KEY TEMPLATE NAME CONDITION GROUP EXPAND-ENV LOAD-FILE KEYBINDING UUID 
SAVE-FILE)
 
 Within these, only KEY and TEMPLATE are actually mandatory.
 
@@ -1661,33 +1658,19 @@ file with the same uuid would replace the previous 
snippet.
 You can use `yas--parse-template' to return such lists based on
 the current buffers contents."
   (if yas--creating-compiled-snippets
-      (progn
+      (let ((print-length nil))
         (insert ";;; Snippet definitions:\n;;;\n")
-        (let ((literal-snippets (list))
-              (print-length nil))
-          (dolist (snippet snippets)
-            (let ((key                    (nth 0 snippet))
-                  (template-content       (nth 1 snippet))
-                  (name                   (nth 2 snippet))
-                  (condition              (nth 3 snippet))
-                  (group                  (nth 4 snippet))
-                  (expand-env             (nth 5 snippet))
-                  (file                   nil) ;; omit on purpose
-                  (binding                (nth 7 snippet))
-                  (uuid                   (nth 8 snippet)))
-              (push `(,key
-                      ,template-content
-                      ,name
-                      ,condition
-                      ,group
-                      ,expand-env
-                      ,file
-                      ,binding
-                      ,uuid)
-                    literal-snippets)))
-          (insert (pp-to-string
-                   `(yas-define-snippets ',mode ',literal-snippets)))
-          (insert "\n\n")))
+        (dolist (snippet snippets)
+          ;; Fill in missing elements with nil.
+          (setq snippet (append snippet (make-list (- 10 (length snippet)) 
nil)))
+          ;; Move LOAD-FILE to SAVE-FILE because we will load from the
+          ;; compiled file, not LOAD-FILE.
+          (let ((load-file (nth 6 snippet)))
+            (setcar (nthcdr 6 snippet) nil)
+            (setcar (nthcdr 9 snippet) load-file)))
+        (insert (pp-to-string
+                 `(yas-define-snippets ',mode ',snippets)))
+        (insert "\n\n"))
     ;; Normal case.
     (let ((snippet-table (yas--table-get-create mode))
           (template nil))
@@ -1699,13 +1682,22 @@ the current buffers contents."
 
 ;;; Loading snippets from files
 
+(defun yas--template-get-file (template)
+  "Return TEMPLATE's LOAD-FILE or SAVE-FILE."
+  (or (yas--template-load-file template)
+      (let ((file (yas--template-save-file template)))
+        (when file
+          (yas--message 2 "%s has no load file, use save file, %s, instead."
+                        (yas--template-name template) file))
+        file)))
+
 (defun yas--load-yas-setup-file (file)
   (if (not yas--creating-compiled-snippets)
       ;; Normal case.
-      (load file 'noerror)
+      (load file 'noerror (<= yas-verbosity 2))
     (let ((elfile (concat file ".el")))
       (when (file-exists-p elfile)
-        (insert ";;; .yas-setup.el support file if any:\n;;;\n")
+        (insert ";;; contents of the .yas-setup.el support file:\n;;;\n")
         (insert-file-contents elfile)
         (goto-char (point-max))))))
 
@@ -1753,8 +1745,8 @@ With prefix argument USE-JIT do jit-loading of snippets."
             (funcall fun)))
         ;; Look for buffers that are already in `mode-sym', and so
         ;; need the new snippets immediately...
-        ;; 
-        (when use-jit 
+        ;;
+        (when use-jit
           (cl-loop for buffer in (buffer-list)
                    do (with-current-buffer buffer
                         (when (eq major-mode mode-sym)
@@ -1762,7 +1754,7 @@ With prefix argument USE-JIT do jit-loading of snippets."
                           (push buffer impatient-buffers)))))))
     ;; ...after TOP-LEVEL-DIR has been completely loaded, call
     ;; `yas--load-pending-jits' in these impatient buffers.
-    ;; 
+    ;;
     (cl-loop for buffer in impatient-buffers
              do (with-current-buffer buffer (yas--load-pending-jits))))
   (when interactive
@@ -1781,9 +1773,9 @@ With prefix argument USE-JIT do jit-loading of snippets."
                           (current-time-string)))))
     ;; Normal case.
     (unless (file-exists-p (concat directory "/" ".yas-skip"))
-      (if (and (progn (yas--message 2 "Loading compiled snippets from %s" 
directory) t)
-               (load (expand-file-name ".yas-compiled-snippets" directory) 
'noerror (<= yas-verbosity 3)))
-          (yas--message 2 "Loading snippet files from %s" directory)
+      (unless (and (load (expand-file-name ".yas-compiled-snippets" directory) 
'noerror (<= yas-verbosity 3))
+                   (progn (yas--message 2 "Loaded compiled snippets from %s" 
directory) t))
+        (yas--message 2 "Loading snippet files from %s" directory)
         (yas--load-directory-2 directory mode-sym)))))
 
 (defun yas--load-directory-2 (directory mode-sym)
@@ -1813,16 +1805,18 @@ With prefix argument USE-JIT do jit-loading of 
snippets."
   "Reload the directories listed in `yas-snippet-dirs' or
 prompt the user to select one."
   (let (errors)
-    (if yas-snippet-dirs
-        (dolist (directory (reverse (yas-snippet-dirs)))
-          (cond ((file-directory-p directory)
-                 (yas-load-directory directory (not nojit))
-                 (if nojit
-                     (yas--message 3 "Loaded %s" directory)
-                   (yas--message 3 "Prepared just-in-time loading for %s" 
directory)))
-                (t
-                 (push (yas--message 0 "Check your `yas-snippet-dirs': %s is 
not a directory" directory) errors))))
-      (call-interactively 'yas-load-directory))
+    (if (null yas-snippet-dirs)
+        (call-interactively 'yas-load-directory)
+      (when (member yas--default-user-snippets-dir yas-snippet-dirs)
+        (make-directory yas--default-user-snippets-dir t))
+      (dolist (directory (reverse (yas-snippet-dirs)))
+        (cond ((file-directory-p directory)
+               (yas-load-directory directory (not nojit))
+               (if nojit
+                   (yas--message 3 "Loaded %s" directory)
+                 (yas--message 3 "Prepared just-in-time loading for %s" 
directory)))
+              (t
+               (push (yas--message 0 "Check your `yas-snippet-dirs': %s is not 
a directory" directory) errors)))))
     errors))
 
 (defun yas-reload-all (&optional no-jit interactive)
@@ -1948,7 +1942,7 @@ This works by stubbing a few functions, then calling
   (interactive)
   (message (concat "yasnippet (version "
                    yas--version
-                   ") -- pluskid <address@hidden>/joaotavora 
<address@hidden>")))
+                   ") -- pluskid/joaotavora/npostavs")))
 
 
 ;;; Apropos snippet menu:
@@ -2228,12 +2222,12 @@ Common gateway for `yas-expand-from-trigger-key' and
                 ;; loops when other extensions use mechanisms similar
                 ;; to `yas--keybinding-beyond-yasnippet'. (github #525
                 ;; and #526)
-                ;; 
+                ;;
                 (yas-minor-mode nil)
                 (beyond-yasnippet (yas--keybinding-beyond-yasnippet)))
            (yas--message 4 "Falling back to %s"  beyond-yasnippet)
            (assert (or (null beyond-yasnippet) (commandp beyond-yasnippet)))
-           (setq this-original-command beyond-yasnippet)
+           (setq this-command beyond-yasnippet)
            (when beyond-yasnippet
              (call-interactively beyond-yasnippet))))
         ((and (listp yas-fallback-behavior)
@@ -2305,6 +2299,28 @@ Honours `yas-choose-tables-first', 
`yas-choose-keys-first' and
             (remove-duplicates (mapcan #'yas--table-templates tables)
                                :test #'equal))))
 
+(defun yas--lookup-snippet-1 (name mode)
+  "Get the snippet called NAME in MODE's tables."
+  (let ((yas-choose-tables-first nil)   ; avoid prompts
+        (yas-choose-keys-first nil))
+    (cl-find name (yas--all-templates
+                   (yas--get-snippet-tables mode))
+             :key #'yas--template-name :test #'string=)))
+
+(defun yas-lookup-snippet (name &optional mode noerror)
+  "Get the snippet content for the snippet NAME in MODE's tables.
+
+MODE defaults to the current buffer's `major-mode'.  If NOERROR
+is non-nil, then don't signal an error if there isn't any snippet
+called NAME.
+
+Honours `yas-buffer-local-condition'."
+  (let ((snippet (yas--lookup-snippet-1 name mode)))
+    (cond
+     (snippet (yas--template-content snippet))
+     (noerror nil)
+     (t (error "No snippet named: %s" name)))))
+
 (defun yas-insert-snippet (&optional no-condition)
   "Choose a snippet to expand, pop-up a list of choices according
 to `yas-prompt-functions'.
@@ -2339,7 +2355,6 @@ visited file in `snippet-mode'."
   (interactive)
   (let* ((yas-buffer-local-condition 'always)
          (templates (yas--all-templates (yas--get-snippet-tables)))
-         (yas-prompt-functions '(yas-ido-prompt yas-completing-prompt))
          (template (and templates
                         (or (yas--prompt-for-template templates
                                                      "Choose a snippet 
template to edit: ")
@@ -2351,7 +2366,7 @@ visited file in `snippet-mode'."
 
 (defun yas--visit-snippet-file-1 (template)
   "Helper for `yas-visit-snippet-file'."
-  (let ((file (yas--template-file template)))
+  (let ((file (yas--template-get-file template)))
     (cond ((and file (file-readable-p file))
            (find-file-other-window file)
            (snippet-mode)
@@ -2397,7 +2412,7 @@ where snippets of table might exist."
   (let ((main-dir (replace-regexp-in-string
                    "/+$" ""
                    (or (first (or (yas-snippet-dirs)
-                                  (setq yas-snippet-dirs 
'("~/.emacs.d/snippets")))))))
+                                  (setq yas-snippet-dirs (list 
yas--default-user-snippets-dir)))))))
         (tables (or (and table
                          (list table))
                     (yas--get-snippet-tables))))
@@ -2525,7 +2540,7 @@ When called interactively, prompt for the table name."
    ;;  template which is already loaded and neatly positioned,...
    ;;
    (yas--editing-template
-    (yas--define-snippets-1 (yas--parse-template (yas--template-file 
yas--editing-template))
+    (yas--define-snippets-1 (yas--parse-template (yas--template-load-file 
yas--editing-template))
                            (yas--template-table yas--editing-template)))
    ;; Try to use `yas--guessed-modes'. If we don't have that use the
    ;; value from `yas--compute-major-mode-and-parents'
@@ -2555,29 +2570,27 @@ Don't use this from a Lisp program, call 
`yas-load-snippet-buffer'
 and `kill-buffer' instead."
   (interactive (list (yas--read-table) current-prefix-arg))
   (yas-load-snippet-buffer table t)
-  (when (and (or
-              ;; Only offer to save this if it looks like a library or new
-              ;; snippet (loaded from elisp, from a dir in `yas-snippet-dirs'
-              ;; which is not the first, or from an unwritable file)
-              ;;
-              (not (yas--template-file yas--editing-template))
-              (not (file-writable-p (yas--template-file 
yas--editing-template)))
-              (and (listp yas-snippet-dirs)
-                   (second yas-snippet-dirs)
-                   (not (string-match (expand-file-name (first 
yas-snippet-dirs))
-                                      (yas--template-file 
yas--editing-template)))))
-             (y-or-n-p (yas--format "Looks like a library or new snippet. Save 
to new file? ")))
-    (let* ((option (first (yas--guess-snippet-directories (yas--template-table 
yas--editing-template))))
-           (chosen (and option
-                        (yas--make-directory-maybe option))))
-      (when chosen
-        (let ((default-file-name (or (and (yas--template-file 
yas--editing-template)
-                                          (file-name-nondirectory 
(yas--template-file yas--editing-template)))
-                                     (yas--template-name 
yas--editing-template))))
-          (write-file (concat chosen "/"
-                              (read-from-minibuffer (format "File name to 
create in %s? " chosen)
-                                                    default-file-name)))
-          (setf (yas--template-file yas--editing-template) 
buffer-file-name)))))
+  (let ((file (yas--template-get-file yas--editing-template)))
+    (when (and (or
+                ;; Only offer to save this if it looks like a library or new
+                ;; snippet (loaded from elisp, from a dir in `yas-snippet-dirs'
+                ;; which is not the first, or from an unwritable file)
+                ;;
+                (not file)
+                (not (file-writable-p file))
+                (and (cdr-safe yas-snippet-dirs)
+                     (not (string-prefix-p (expand-file-name (car 
yas-snippet-dirs)) file))))
+               (y-or-n-p (yas--format "Looks like a library or new snippet. 
Save to new file? ")))
+      (let* ((option (first (yas--guess-snippet-directories 
(yas--template-table yas--editing-template))))
+             (chosen (and option
+                          (yas--make-directory-maybe option))))
+        (when chosen
+          (let ((default-file-name (or (and file (file-name-nondirectory file))
+                                       (yas--template-name 
yas--editing-template))))
+            (write-file (concat chosen "/"
+                                (read-from-minibuffer (format "File name to 
create in %s? " chosen)
+                                                      default-file-name)))
+            (setf (yas--template-load-file yas--editing-template) 
buffer-file-name))))))
   (when buffer-file-name
     (save-buffer)
     (quit-window kill)))
@@ -3024,11 +3037,11 @@ through the field's start point"
 
 The most recently-inserted snippets are returned first."
   (sort
-   (remove nil (remove-duplicates (mapcar #'(lambda (ov)
-                                              (overlay-get ov 'yas--snippet))
-                                          (if all-snippets
-                                              (overlays-in (point-min) 
(point-max))
-                                            (nconc (overlays-at (point)) 
(overlays-at (1- (point))))))))
+   (delq nil (delete-dups
+              (mapcar (lambda (ov) (overlay-get ov 'yas--snippet))
+                      (if all-snippets (overlays-in (point-min) (point-max))
+                        (nconc (overlays-at (point))
+                               (overlays-at (1- (point))))))))
    #'(lambda (s1 s2)
        (<= (yas--snippet-id s2) (yas--snippet-id s1)))))
 
@@ -3141,12 +3154,6 @@ Also create some protection overlays"
 (defvar yas--inhibit-overlay-hooks nil
   "Bind this temporarily to non-nil to prevent running 
`yas--on-*-modification'.")
 
-(defmacro yas--inhibit-overlay-hooks (&rest body)
-  "Run BODY with `yas--inhibit-overlay-hooks' set to t."
-  (declare (indent 0))
-  `(let ((yas--inhibit-overlay-hooks t))
-     ,@body))
-
 (defvar yas-snippet-beg nil "Beginning position of the last snippet 
committed.")
 (defvar yas-snippet-end nil "End position of the last snippet committed.")
 
@@ -3166,7 +3173,7 @@ This renders the snippet as ordinary text."
       (setq yas-snippet-end (overlay-end control-overlay))
       (delete-overlay control-overlay))
 
-    (yas--inhibit-overlay-hooks
+    (let ((yas--inhibit-overlay-hooks t))
       (when yas--active-field-overlay
         (delete-overlay yas--active-field-overlay))
       (when yas--field-protection-overlays
@@ -3381,10 +3388,10 @@ Move the overlay, or create it if it does not exit."
 (defun yas--on-field-overlay-modification (overlay after? _beg _end &optional 
_length)
   "Clears the field and updates mirrors, conditionally.
 
-Only clears the field if it hasn't been modified and it point it
-at field start.  This hook doesn't do anything if an undo is in
-progress."
+Only clears the field if it hasn't been modified and point is at
+field start.  This hook does nothing if an undo is in progress."
   (unless (or yas--inhibit-overlay-hooks
+              (not (overlayp yas--active-field-overlay)) ; Avoid Emacs bug 
#21824.
               (yas--undo-in-progress))
     (let* ((field (overlay-get overlay 'yas--field))
            (snippet (overlay-get yas--active-field-overlay 'yas--snippet)))
@@ -3394,11 +3401,9 @@ progress."
                (yas--field-update-display field))
              (yas--update-mirrors snippet))
             (field
-             (when (and (not after?)
+             (when (and (eq this-command 'self-insert-command)
                         (not (yas--field-modified-p field))
-                        (eq (point) (if (markerp (yas--field-start field))
-                                        (marker-position (yas--field-start 
field))
-                                      (yas--field-start field))))
+                        (= (point) (yas--field-start field)))
                (yas--skip-and-clear field))
              (setf (yas--field-modified-p field) t))))))
 
@@ -3411,7 +3416,7 @@ progress."
 ;; As of github #537 this no longer inhibits the command by issuing an
 ;; error: all the snippets at point, including nested snippets, are
 ;; automatically commited and the current command can proceed.
-;; 
+;;
 (defun yas--make-move-field-protection-overlays (snippet field)
   "Place protection overlays surrounding SNIPPET's FIELD.
 
@@ -3425,7 +3430,7 @@ Move the overlays, or create them if they do not exit."
     ;;
     (when (< (buffer-size) end)
       (save-excursion
-        (yas--inhibit-overlay-hooks
+        (let ((yas--inhibit-overlay-hooks t))
           (goto-char (point-max))
           (newline))))
     ;; go on to normal overlay creation/moving
@@ -3541,7 +3546,7 @@ considered when expanding the snippet."
              ;; them mostly to make the undo information
              ;;
              (setq yas--start-column (current-column))
-             (yas--inhibit-overlay-hooks
+             (let ((yas--inhibit-overlay-hooks t))
                (setq snippet
                      (if expand-env
                          (eval `(let* ,expand-env
@@ -3999,11 +4004,10 @@ with their evaluated value into 
`yas--backquote-markers-and-strings'."
         (set-marker marker nil)))))
 
 (defun yas--scan-sexps (from count)
-  (condition-case _
+  (ignore-errors
+    (save-match-data ; `scan-sexps' may modify match data.
       (with-syntax-table (standard-syntax-table)
-        (scan-sexps from count))
-    (error
-     nil)))
+        (scan-sexps from count)))))
 
 (defun yas--make-marker (pos)
   "Create a marker at POS with nil `marker-insertion-type'."
@@ -4035,9 +4039,8 @@ When multiple expressions are found, only the last one 
counts."
                                    ;; after the ":", this will be
                                    ;; caught as a mirror with
                                    ;; transform later.
-                                   (not (save-match-data
-                                          (eq (string-match "$[ \t\n]*("
-                                                            
(match-string-no-properties 2)) 0)))
+                                   (not (string-match-p "\\`\\$[ \t\n]*("
+                                                        
(match-string-no-properties 2)))
                                    ;; allow ${0: some exit text}
                                    ;; (not (and number (zerop number)))
                                    (yas--make-field number
@@ -4225,7 +4228,7 @@ When multiple expressions are found, only the last one 
counts."
                (not (string= reflection (buffer-substring-no-properties 
(yas--mirror-start mirror)
                                                                         
(yas--mirror-end mirror)))))
       (goto-char (yas--mirror-start mirror))
-      (yas--inhibit-overlay-hooks
+      (let ((yas--inhibit-overlay-hooks t))
         (insert reflection))
       (if (> (yas--mirror-end mirror) (point))
           (delete-region (point) (yas--mirror-end mirror))
@@ -4244,7 +4247,7 @@ When multiple expressions are found, only the last one 
counts."
                                                                            
(yas--field-end field)))))
         (setf (yas--field-modified-p field) t)
         (goto-char (yas--field-start field))
-        (yas--inhibit-overlay-hooks
+        (let ((yas--inhibit-overlay-hooks t))
           (insert transformed)
           (if (> (yas--field-end field) (point))
               (delete-region (point) (yas--field-end field))
@@ -4292,7 +4295,7 @@ When multiple expressions are found, only the last one 
counts."
                    (or (and fallback
                             (format "call command `%s'."
                                     (pp-to-string fallback)))
-                       "do nothing (`yas-expand' doesn't shadow\nanything).")))
+                       "do nothing (`yas-expand' doesn't 
override\nanything).")))
                 ((eq yas-fallback-behavior 'return-nil)
                  "do nothing.")
                 (t "defer to `yas-fallback-behavior' (which see)."))))
@@ -4434,6 +4437,7 @@ and return the directory.  Return nil if not found."
 
 (defun yas-initialize ()
   "For backward compatibility, enable `yas-minor-mode' globally."
+  (declare (obsolete "Use (yas-global-mode 1) instead." "0.8"))
   (yas-global-mode 1))
 
 (defvar yas--backported-syms '(;; `defcustom's
diff --git a/packages/ztree/README.md b/packages/ztree/README.md
index f96adb4..dc1907a 100644
--- a/packages/ztree/README.md
+++ b/packages/ztree/README.md
@@ -54,7 +54,9 @@ Then you need to specify the left and right directories to 
compare.
  * `F5` forces the full rescan.
 
 ### Customizations
-By default all files starting with dot (like `.gitignore`) are not shown and 
excluded from the difference status for directories. One can add an additional 
regexps to the list `ztree-diff-filter-list`. 
+By default all files starting with dot (like `.gitignore`) are not shown and 
excluded from the difference status for directories. One can add an additional 
regexps to the list `ztree-diff-filter-list`.
+
+One also could turn on unicode characters to draw the tree with instead of 
normal ASCII-characters. This is controlled by the `ztree-draw-unicode-lines` 
variable.
 
 ### Screenshots
 
@@ -87,3 +89,20 @@ Set the `ztree-dir-move-focus` variable to `t` in order to 
move focus to the oth
 
 ![ztree 
emacsx11](https://github.com/fourier/ztree/raw/screenshots/screenshots/emacs_xterm.png
 "Emacs in xterm with ztree-dir")
 
+
+## Contributions
+You can contribute to **ztree** in one of the following ways.
+- Submit a bug report
+- Submit a feature request
+- Submit a simple pull request (with changes < 15 lines)
+
+### Copyright issues
+Since **ztree** is a part of [GNU ELPA](https://elpa.gnu.org/), it is 
copyrighted by the [Free Software Foundation, Inc.](http://www.fsf.org/). 
Therefore in order to submit nontrivial changes (with total amount of lines > 
15), one needs to to grant the right to include your works in GNU Emacs to the 
FSF.
+
+For this you need to complete 
[this](https://raw.githubusercontent.com/fourier/ztree/contributions/request-assign.txt)
 form, and send it to address@hidden(mailto:address@hidden). The FSF will send 
you the assignment contract that both you and the FSF will sign.
+
+For more information one can read 
[here](http://www.gnu.org/licenses/why-assign.html) to understand why it is 
needed.
+
+As soon as the paperwork is done one can contribute to **ztree** with bigger 
pull requests.
+Note what pull requests without paperwork done will not be accepted, so please 
notify the [maintainer](mailto:address@hidden) if everything is in place.
+
diff --git a/packages/ztree/ztree-diff-model.el 
b/packages/ztree/ztree-diff-model.el
index 7bec461..b4ad75f 100644
--- a/packages/ztree/ztree-diff-model.el
+++ b/packages/ztree/ztree-diff-model.el
@@ -1,10 +1,10 @@
 ;;; ztree-diff-model.el --- diff model for directory trees -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2013-2015  Free Software Foundation, Inc.
+;; Copyright (C) 2013-2016  Free Software Foundation, Inc.
 ;;
-;; Author: Alexey Veretennikov <alexey dot veretennikov at gmail dot com>
+;; Author: Alexey Veretennikov <address@hidden>
 ;; 
-;; Created: 2013-11-1l
+;; Created: 2013-11-11
 ;;
 ;; Keywords: files tools
 ;; URL: https://github.com/fourier/ztree
@@ -31,20 +31,19 @@
 
 ;;; Code:
 (require 'ztree-util)
+(eval-when-compile (require 'cl-lib))
 
-(defvar ztree-diff-model-wait-message nil
-  "Message showing while constructing the diff tree.")
-(make-variable-buffer-local 'ztree-diff-model-wait-message)
-
-(defvar ztree-diff-model-ignore-fun nil
+(defvar-local ztree-diff-model-ignore-fun nil
   "Function which determines if the node should be excluded from comparison.")
-(make-variable-buffer-local 'ztree-diff-model-ignore-fun)
 
-(defun ztree-diff-model-update-wait-message ()
-  "Update the wait mesage with one more '.' progress indication."
-  (when ztree-diff-model-wait-message
-    (setq ztree-diff-model-wait-message (concat ztree-diff-model-wait-message 
"."))
-    (message ztree-diff-model-wait-message)))
+(defvar-local ztree-diff-model-progress-fun nil
+  "Function which should be called whenever the progress indications is 
updated.")
+
+
+(defun ztree-diff-model-update-progress ()
+  "Update the progress."
+  (when ztree-diff-model-progress-fun
+    (funcall ztree-diff-model-progress-fun)))
 
 ;; Create a record ztree-diff-node with defined fields and getters/setters
 ;; here:
@@ -53,8 +52,20 @@
 ;; right-path is the full path of the right side,
 ;; short-name - is the file or directory name
 ;; children - list of nodes - files or directories if the node is a directory
-;; different = {nil, 'new, 'diff} - means comparison status
-(ztree-defrecord ztree-diff-node (parent left-path right-path short-name 
right-short-name children different))
+;; different = {nil, 'same, 'new, 'diff, 'ignore} - means comparison status
+(cl-defstruct (ztree-diff-node
+               (:constructor)
+               (:constructor ztree-diff-node-create
+                (parent left-path right-path
+                        different
+                        &aux
+                        (short-name (ztree-file-short-name
+                                     (or left-path right-path)))
+                        (right-short-name
+                         (if (and left-path right-path)
+                             (ztree-file-short-name right-path)
+                           short-name)))))
+  parent left-path right-path short-name right-short-name children different)
 
 (defun ztree-diff-model-ignore-p (node)
   "Determine if the NODE should be excluded from comparison results."
@@ -63,22 +74,26 @@
 
 (defun ztree-diff-node-to-string (node)
   "Construct the string with contents of the NODE given."
-  (let* ((string-or-nil #'(lambda (x) (if x
-                                          (cond ((stringp x) x)
-                                                ((eq x 'new) "new")
-                                                ((eq x 'diff) "different")
-                                                (t (ztree-diff-node-short-name 
x)))
-                                        "(empty)")))
-         (children (ztree-diff-node-children node))
-         (ch-str ""))
+  (let ((string-or-nil #'(lambda (x) (if x
+                                         (cond ((stringp x) x)
+                                               ((eq x 'new) "new")
+                                               ((eq x 'diff) "different")
+                                               ((eq x 'ignore) "ignored")
+                                               ((eq x 'same) "same")
+                                               (t (ztree-diff-node-short-name 
x)))
+                                       "(empty)")))
+        (children (ztree-diff-node-children node))
+        (ch-str ""))
     (dolist (x children)
-      (setq ch-str (concat ch-str "\n   * " (ztree-diff-node-short-name x))))
+      (setq ch-str (concat ch-str "\n   * " (ztree-diff-node-short-name x)
+                           ": "
+                           (funcall string-or-nil (ztree-diff-node-different 
x)))))
     (concat "Node: " (ztree-diff-node-short-name node)
             "\n"
-            ;; " * Parent: " (let ((parent (ztree-diff-node-parent node)))
-            ;;                 (if parent (ztree-diff-node-short-name parent) 
"nil"))
             " * Parent: " (funcall string-or-nil (ztree-diff-node-parent node))
             "\n"
+            " * Status: " (funcall string-or-nil (ztree-diff-node-different 
node))
+            "\n"
             " * Left path: " (funcall string-or-nil (ztree-diff-node-left-path 
node))
             "\n"
             " * Right path: " (funcall string-or-nil 
(ztree-diff-node-right-path node))
@@ -113,6 +128,7 @@ RIGHT if only on the right side."
     (if (and left right) 'both
       (if left 'left 'right))))
 
+
 (defun ztree-diff-node-equal (node1 node2)
   "Determines if NODE1 and NODE2 are equal."
   (and (string-equal (ztree-diff-node-short-name node1)
@@ -124,7 +140,11 @@ RIGHT if only on the right side."
 
 (defun ztree-diff-untrampify-filename (file)
   "Return FILE as the local file name."
+  ;; FIXME: We shouldn't use internal Tramp functions.
   (require 'tramp)
+  (declare-function tramp-tramp-file-p "tramp" (name))
+  (declare-function tramp-file-name-localname "tramp" (vec))
+  (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault))
   (if (not (tramp-tramp-file-p file))
       file
     (tramp-file-name-localname (tramp-dissect-file-name file))))
@@ -136,11 +156,15 @@ RIGHT if only on the right side."
 (defun ztree-diff-model-files-equal (file1 file2)
   "Compare files FILE1 and FILE2 using external diff.
 Returns t if equal."
+  ;; FIXME: This "untrampification" only works if both file1 and file2 are on
+  ;; the same host.
+  ;; FIXME: We assume that default-directory is also on the same host as
+  ;; file(1|2).
   (let* ((file1-untrampified (ztree-diff-untrampify-filename 
(ztree-diff-modef-quotify-string file1)))
          (file2-untrampified (ztree-diff-untrampify-filename 
(ztree-diff-modef-quotify-string file2)))
-         (diff-command (concat "diff -q" " " file1-untrampified " " 
file2-untrampified))
+         (diff-command (concat diff-command " -q" " " file1-untrampified " " 
file2-untrampified))
          (diff-output (shell-command-to-string diff-command)))
-    (not (> (length diff-output) 2))))
+    (if (<= (length diff-output) 2) 'same 'diff)))
 
 (defun ztree-directory-files (dir)
   "Return the list of full paths of files in a directory DIR.
@@ -151,34 +175,29 @@ Filters out . and .."
                 (directory-files dir 'full)))
 
 (defun ztree-diff-model-partial-rescan (node)
-  "Rescan the NODE."
-  ;; assuming what parent is always exists
-  ;; otherwise the UI shall force the full rescan
-  (let ((parent (ztree-diff-node-parent node))
-        (isdir (ztree-diff-node-is-directory node))
-        (left (ztree-diff-node-left-path node))
-        (right (ztree-diff-node-right-path node)))
-    ;; if node is a directory - traverse
-    (when (and left right
-               (file-exists-p left)
-               (file-exists-p right))
-      (if isdir
-          (let ((traverse (ztree-diff-node-traverse
-                           node
-                           left
-                           right)))
-            (ztree-diff-node-set-different node (car traverse))
-            (ztree-diff-node-set-children node (cdr traverse)))
-        ;; node is a file
-        (ztree-diff-node-set-different
-         node
-         (if (ztree-diff-model-files-equal left right)
-             nil
-           'diff))))))
-
-(defun ztree-diff-model-subtree (parent path side)
+  "Rescan the NODE.
+The node is a either a file or directory with both
+left and right parts existing."
+  ;; if a directory - recreate
+  (if (ztree-diff-node-is-directory node)
+      (ztree-diff-node-recreate node)
+    ;; if a file, change a status
+    (setf (ztree-diff-node-different node)
+          (if (or (ztree-diff-model-ignore-p node) ; if should be ignored
+                  (eql (ztree-diff-node-different node) 'ignore) ; was ignored
+                  (eql (ztree-diff-node-different ; or parent was ignored
+                        (ztree-diff-node-parent node))
+                       'ignore))
+              'ignore
+            (ztree-diff-model-files-equal (ztree-diff-node-left-path node)
+                                          (ztree-diff-node-right-path node)))))
+  ;; update all parents statuses
+  (ztree-diff-node-update-all-parents-diff node))
+
+(defun ztree-diff-model-subtree (parent path side diff)
   "Create a subtree with given PARENT for the given PATH.
-Argument SIDE either 'left or 'right side."
+Argument SIDE either 'left or 'right side.
+Argument DIFF different status to be assigned to all created nodes."
   (let ((files (ztree-directory-files path))
         (result nil))
     (dolist (file files)
@@ -187,35 +206,26 @@ Argument SIDE either 'left or 'right side."
                         parent
                         (when (eq side 'left) file)
                         (when (eq side 'right) file)
-                        (ztree-file-short-name file)
-                        (ztree-file-short-name file)
-                        nil
-                        'new))
-                 (children (ztree-diff-model-subtree node file side)))
-            (ztree-diff-node-set-children node children)
+                        diff))
+                 (children (ztree-diff-model-subtree node file side diff)))
+            (setf (ztree-diff-node-children node) children)
             (push node result))
         (push (ztree-diff-node-create
                parent
                (when (eq side 'left) file)
                (when (eq side 'right) file)
-               (ztree-file-short-name file)
-               (ztree-file-short-name file)
-               nil
-               'new)
+               diff)
               result)))
     result))
 
 (defun ztree-diff-node-update-diff-from-children (node)
   "Set the diff status for the NODE based on its children."
-  (let ((children (ztree-diff-node-children node))
-        (diff nil))
-    (dolist (child children)
-      (unless (ztree-diff-model-ignore-p child)
-        (setq diff
-              (ztree-diff-model-update-diff
-               diff
-               (ztree-diff-node-different child)))))
-    (ztree-diff-node-set-different node diff)))
+  (unless (eql (ztree-diff-node-different node) 'ignore)
+    (let ((diff (cl-reduce #'ztree-diff-model-update-diff
+                           (ztree-diff-node-children node)
+                           :initial-value 'same
+                           :key 'ztree-diff-node-different)))
+      (setf (ztree-diff-node-different node) diff))))
 
 (defun ztree-diff-node-update-all-parents-diff (node)
   "Recursively update all parents diff status for the NODE."
@@ -225,139 +235,159 @@ Argument SIDE either 'left or 'right side."
 
 
 (defun ztree-diff-model-update-diff (old new)
-  "Get the diff status depending if OLD or NEW is not nil."
-  (if new
-      (if (or (not old)
-              (eq old 'new))
-          new
-        old)
-    old))
-
-(defun ztree-diff-node-traverse (parent path1 path2)
-  "Traverse 2 paths creating the list nodes with PARENT defined and diff 
status.
-Function traversing 2 paths PATH1 and PATH2 returning the list where the
-first element is the difference status (nil, 'diff, 'new') and
-the rest is the combined list of nodes."
-  (let ((list1 (ztree-directory-files path1))
-        (list2 (ztree-directory-files path2))
-        (different-dir nil)
-        (result nil))
-    (ztree-diff-model-update-wait-message)
+  "Get the diff status depending if OLD or NEW is not nil.
+If the OLD is 'ignore, do not change anything"
+  ;; if the old whole directory is ignored, ignore children's status
+  (cond ((eql old 'ignore) 'ignore)
+        ;; if the new status is ignored, use old
+        ((eql new 'ignore) old)
+        ;; if the old or new status is different, return different
+        ((or (eql old 'diff)
+             (eql new 'diff)) 'diff)
+        ;; if new is 'new, return new
+        ((eql new 'new) 'new)
+        ;; all other cases return old
+        (t old)))
+
+(defun ztree-diff-node-update-diff-from-parent (node)
+  "Recursively update diff status of all children of NODE.
+This function will traverse through all children recursively
+setting status from the NODE, unless they have an ignore status"
+  (let ((status (ztree-diff-node-different node))
+        (children (ztree-diff-node-children node)))
+    ;; if the parent has ignore status, force all kids this status
+    ;; otherwise only update status when the child status is not ignore
+    (mapc (lambda (child)
+            (when (or (eql status 'ignore)
+                      (not 
+                       (or (eql status 'ignore)
+                           (eql (ztree-diff-node-different child) 'ignore))))
+              (setf (ztree-diff-node-different child) status)
+              (ztree-diff-node-update-diff-from-parent child)))
+            children)))
+        
+    
+
+(defun ztree-diff-model-find-in-files (list shortname is-dir)
+  "Find in LIST of files the file with name SHORTNAME.
+If IS-DIR searching for directories; assume files otherwise"
+  (ztree-find list
+              (lambda (x) (and (string-equal (ztree-file-short-name x)
+                                             shortname)
+                               (eq is-dir (file-directory-p x))))))
+
+
+(defun ztree-diff-model-should-ignore (node)
+  "Determine if the NODE and its children should be ignored.
+If no parent - never ignore;
+if in ignore list - ignore
+if parent has ignored status - ignore"
+  (let ((parent (ztree-diff-node-parent node)))
+    (and parent
+         (or (eql (ztree-diff-node-different parent) 'ignore)
+             (ztree-diff-model-ignore-p node)))))
+
+
+(defun ztree-diff-node-recreate (node)
+  "Traverse 2 paths defined in the NODE updating its children and status."
+  (let* ((list1 (ztree-directory-files (ztree-diff-node-left-path node))) ;; 
left list of liles
+         (list2 (ztree-directory-files (ztree-diff-node-right-path node))) ;; 
right list of files
+         (should-ignore (ztree-diff-model-should-ignore node))
+         ;; status automatically assigned to children of the node
+         (children-status (if should-ignore 'ignore 'new))
+         (children nil))    ;; list of children
+    ;; update waiting status
+    (ztree-diff-model-update-progress)
+    ;; update node status ignore status either inhereted from the
+    ;; parent or the own
+    (when should-ignore
+      (setf (ztree-diff-node-different node) 'ignore))
     ;; first - adding all entries from left directory
     (dolist (file1 list1)
       ;; for every entry in the first directory
       ;; we are creating the node
       (let* ((simple-name (ztree-file-short-name file1))
              (isdir (file-directory-p file1))
-             (children nil)
-             (different nil)
-             ;; create the current node to be set as parent to
-             ;; subdirectories
-             (node (ztree-diff-node-create parent file1 nil simple-name 
simple-name nil nil))
-             ;; 1. find if the file is in the second directory and the type
-             ;;    is the same - i.e. both are directories or both are files
-             (file2 (ztree-find list2
-                                #'(lambda (x) (and (string-equal 
(ztree-file-short-name x)
-                                                                 simple-name)
-                                                   (eq isdir (file-directory-p 
x)))))))
-        ;; 2. if it is not in the second directory, add it as a node
-        (if (not file2)
-            (progn
-              ;; 2.1 if it is a directory, add the whole subtree
-              (when (file-directory-p file1)
-                (setq children (ztree-diff-model-subtree node file1 'left)))
-              ;; 2.2 update the difference status for this entry
-              (setq different 'new))
-          ;; 3. if it is found in second directory and of the same type
-          ;; 3.1 if it is a file
-          (if (not (file-directory-p file1))
-              ;; 3.1.1 set difference status to this entry
-              (setq different (if (ztree-diff-model-files-equal file1 file2) 
nil 'diff))
-            ;; 3.2 if it is the directory
-            ;; 3.2.1 get the result of the directories comparison together 
with status
-            (let ((traverse (ztree-diff-node-traverse node file1 file2)))
-              ;; 3.2.2 update the difference status for whole comparison from
-              ;;       difference result from the 2 subdirectories comparison
-              (setq different (car traverse))
-              ;; 3.2.3 set the children list from the 2 subdirectories 
comparison
-              (setq children (cdr traverse)))))
-        ;; update calculated parameters of the node
-        (ztree-diff-node-set-right-path node file2)
-        (ztree-diff-node-set-children node children)
-        (ztree-diff-node-set-different node different)
-        ;; 2.3 update difference status for the whole comparison
-        ;; depending if the node should participate in overall result
-        (unless (ztree-diff-model-ignore-p node)
-          (setq different-dir (ztree-diff-model-update-diff different-dir 
different)))
-        ;; push the created node to the result list
-        (push node result)))
+             ;; find if the file is in the second directory and the type
+             ;; is the same - i.e. both are directories or both are files
+             (file2 (ztree-diff-model-find-in-files list2 simple-name isdir))
+             ;; create a child. The current node is a parent
+             ;; new by default - will be overriden below if necessary
+             (child
+              (ztree-diff-node-create node file1 file2 children-status)))
+        ;; update child own ignore status
+        (when (ztree-diff-model-should-ignore child)
+          (setf (ztree-diff-node-different child) 'ignore))
+        ;; if exists on a right side with the same type,
+        ;; remove from the list of files on the right side
+        (when file2
+          (setf list2 (cl-delete file2 list2 :test #'string-equal)))
+        (cond
+         ;; when exist just on a left side and is a directory, add all
+         ((and isdir (not file2))
+          (setf (ztree-diff-node-children child)
+                (ztree-diff-model-subtree child
+                                          file1
+                                          'left
+                                          (ztree-diff-node-different child))))
+         ;; if 1) exists on both sides and 2) it is a file
+         ;; and 3) not ignored file
+         ((and file2 (not isdir) (not (eql (ztree-diff-node-different child) 
'ignore)))
+          (setf (ztree-diff-node-different child)
+                (ztree-diff-model-files-equal file1 file2)))
+         ;; if exists on both sides and it is a directory, traverse further
+         ((and file2 isdir)
+          (ztree-diff-node-recreate child)))
+        ;; push the created node to the children list
+        (push child children)))
     ;; second - adding entries from the right directory which are not present
     ;; in the left directory
     (dolist (file2 list2)
       ;; for every entry in the second directory
       ;; we are creating the node
-      (let* ((simple-name (ztree-file-short-name file2))
-             (isdir (file-directory-p file2))
-             (children nil)
-             ;; create the node to be added to the results list
-             (node (ztree-diff-node-create parent nil file2 simple-name 
simple-name nil 'new))
-             ;; 1. find if the file is in the first directory and the type
-             ;;    is the same - i.e. both are directories or both are files
-             (file1 (ztree-find list1
-                                #'(lambda (x) (and (string-equal 
(ztree-file-short-name x)
-                                                                 simple-name)
-                                                   (eq isdir (file-directory-p 
x)))))))
-        ;; if it is not in the first directory, add it as a node
-        (unless file1
+      (let* ((isdir (file-directory-p file2))
+             ;; create the child to be added to the results list
+             (child
+              (ztree-diff-node-create node nil file2 children-status)))
+        ;; update ignore status of the child
+        (when (ztree-diff-model-should-ignore child)
+          (setf (ztree-diff-node-different child) 'ignore))
           ;; if it is a directory, set the whole subtree to children
-          (when (file-directory-p file2)
-            (setq children (ztree-diff-model-subtree node file2 'right)))
-          ;; set calculated children to the node
-          (ztree-diff-node-set-children node children)
-          ;; update the different status for the whole comparison
-          ;; depending if the node should participate in overall result
-          (unless (ztree-diff-model-ignore-p node)
-            (setq different-dir (ztree-diff-model-update-diff different-dir 
'new)))
-          ;; push the created node to the result list
-          (push node result))))
-    ;; result is a pair: difference status and nodes list
-    (cons different-dir result)))
-
-(defun ztree-diff-model-create (dir1 dir2 &optional ignore-p)
-  "Create a node based on DIR1 and DIR2.
-IGNORE-P is the optional filtering function, taking node as
-an argument, which determines if the node should be excluded
-from comparison."
-  (unless (file-directory-p dir1)
-    (error "Path %s is not a directory" dir1))
-  (unless (file-directory-p dir2)
-    (error "Path %s is not a directory" dir2))
-  (setf ztree-diff-model-ignore-fun ignore-p)
-  (setq ztree-diff-model-wait-message (concat "Comparing " dir1 " and " dir2 " 
..."))
-  (let* ((model
-          (ztree-diff-node-create nil dir1 dir2
-                                  (ztree-file-short-name dir1)
-                                  (ztree-file-short-name dir2)
-                                  nil
-                                  nil))
-         (traverse (ztree-diff-node-traverse model dir1 dir2)))
-    (ztree-diff-node-set-children model (cdr traverse))
-    (ztree-diff-node-set-different model (car traverse))
-    (message "Done.")
-    model))
+        (when isdir
+          (setf (ztree-diff-node-children child)
+                (ztree-diff-model-subtree child
+                                          file2
+                                          'right
+                                          (ztree-diff-node-different child))))
+        ;; push the created node to the result list
+        (push child children)))
+    ;; finally set different status based on all children
+    ;; depending if the node should participate in overall result
+    (unless should-ignore
+      (setf (ztree-diff-node-different node)
+            (cl-reduce #'ztree-diff-model-update-diff
+                       children
+                       :initial-value 'same
+                       :key 'ztree-diff-node-different)))
+    ;; and set children
+    (setf (ztree-diff-node-children node) children)))
+
 
 (defun ztree-diff-model-update-node (node)
   "Refresh the NODE."
-  (setq ztree-diff-model-wait-message
-        (concat "Updating " (ztree-diff-node-short-name node) " ..."))
-  (let ((traverse (ztree-diff-node-traverse node
-                                            (ztree-diff-node-left-path node)
-                                            (ztree-diff-node-right-path 
node))))
-    (ztree-diff-node-set-children node (cdr traverse))
-    (ztree-diff-node-set-different node (car traverse))
-    (message "Done.")))
+  (ztree-diff-node-recreate node))
+
+
 
+(defun ztree-diff-model-set-ignore-fun (ignore-p)
+  "Set the buffer-local ignore function to IGNORE-P.
+Ignore function is a function of one argument (ztree-diff-node)
+which returns t if the node should be ignored (like files starting
+with dot etc)."
+  (setf ztree-diff-model-ignore-fun ignore-p))
 
+(defun ztree-diff-model-set-progress-fun (progess-fun)
+  (setf ztree-diff-model-progress-fun progess-fun)) 
 
 (provide 'ztree-diff-model)
 
diff --git a/packages/ztree/ztree-diff.el b/packages/ztree/ztree-diff.el
index ff9b323..ed3d5f9 100644
--- a/packages/ztree/ztree-diff.el
+++ b/packages/ztree/ztree-diff.el
@@ -1,10 +1,10 @@
 ;;; ztree-diff.el --- Text mode diff for directory trees -*- lexical-binding: 
t; -*-
 
-;; Copyright (C) 2013-2015  Free Software Foundation, Inc.
+;; Copyright (C) 2013-2016  Free Software Foundation, Inc.
 ;;
-;; Author: Alexey Veretennikov <alexey dot veretennikov at gmail dot com>
+;; Author: Alexey Veretennikov <address@hidden>
 ;; 
-;; Created: 2013-11-1l
+;; Created: 2013-11-11
 ;;
 ;; Keywords: files tools
 ;; URL: https://github.com/fourier/ztree
@@ -63,29 +63,39 @@ By default all filest starting with dot '.', including . 
and ..")
   :group 'Ztree-diff :group 'font-lock-highlighting-faces)
 (defvar ztreep-diff-model-add-face 'ztreep-diff-model-add-face)
 
+(defface ztreep-diff-model-ignored-face
+  '((((type tty pc) (class color) (min-colors 256)) :foreground "#2f2f2f")
+    (((type tty pc) (class color) (min-colors 8))   :foreground "white")
+    (t                   (:foreground "#7f7f7f" :strike-through t)))
+  "*Face used for non-modified files in Ztree-diff."
+  :group 'Ztree-diff :group 'font-lock-highlighting-faces)
+(defvar ztreep-diff-model-ignored-face 'ztreep-diff-model-ignored-face)
+
 (defface ztreep-diff-model-normal-face
-  '((t                   (:foreground "#7f7f7f")))
+  '((((type tty pc) (class color) (min-colors 8)) :foreground "white")
+    (t                   (:foreground "#7f7f7f")))
   "*Face used for non-modified files in Ztree-diff."
   :group 'Ztree-diff :group 'font-lock-highlighting-faces)
 (defvar ztreep-diff-model-normal-face 'ztreep-diff-model-normal-face)
 
 
-(defvar ztree-diff-filter-list (list ztree-diff-hidden-files-regexp)
+(defvar-local ztree-diff-filter-list (list ztree-diff-hidden-files-regexp)
   "List of regexp file names to filter out.
 By default paths starting with dot (like .git) are ignored")
-(make-variable-buffer-local 'ztree-diff-filter-list)
 
-(defvar ztree-diff-dirs-pair nil
+(defvar-local ztree-diff-dirs-pair nil
   "Pair of the directories stored.  Used to perform the full rescan.")
-(make-variable-buffer-local 'ztree-diff-dirs-pair)
 
-(defvar ztree-diff-show-equal-files t
+(defvar-local ztree-diff-show-equal-files t
   "Show or not equal files/directories on both sides.")
-(make-variable-buffer-local 'ztree-diff-show-equal-files)
 
-(defvar ztree-diff-show-filtered-files nil
+(defvar-local ztree-diff-show-filtered-files nil
   "Show or not files from the filtered list.")
 
+(defvar-local ztree-diff-wait-message nil
+  "Message showing while constructing the diff tree.")
+
+
 ;;;###autoload
 (define-minor-mode ztreediff-mode
   "A minor mode for displaying the difference of the directory trees in text 
mode."
@@ -102,15 +112,17 @@ By default paths starting with dot (like .git) are 
ignored")
     (,(kbd "v") . ztree-diff-view-file)
     (,(kbd "d") . ztree-diff-simple-diff-files)
     (,(kbd "r") . ztree-diff-partial-rescan)
+    (,(kbd "R") . ztree-diff-full-rescan)
     ([f5] . ztree-diff-full-rescan)))
 
 
 (defun ztree-diff-node-face (node)
   "Return the face for the NODE depending on diff status."
   (let ((diff (ztree-diff-node-different node)))
-    (cond ((eq diff 'diff) ztreep-diff-model-diff-face)
+    (cond ((eq diff 'ignore) ztreep-diff-model-ignored-face)
+          ((eq diff 'diff) ztreep-diff-model-diff-face)
           ((eq diff 'new)  ztreep-diff-model-add-face)
-          (t ztreep-diff-model-normal-face))))
+          ((eq diff 'same) ztreep-diff-model-normal-face))))
 
 (defun ztree-diff-insert-buffer-header ()
   "Insert the header to the ztree buffer."
@@ -133,7 +145,11 @@ By default paths starting with dot (like .git) are 
ignored")
   (insert "\n")
   (ztree-insert-with-face " Mismatch file " ztreep-diff-model-diff-face)
   (ztree-insert-with-face "- different from other side" 
ztreep-diff-header-small-face)
+  (insert "\n ")
+  (ztree-insert-with-face "Ignored file" ztreep-diff-model-ignored-face)
+  (ztree-insert-with-face " - ignored from comparison" 
ztreep-diff-header-small-face)
   (insert "\n")
+
   (ztree-insert-with-face "==============" ztreep-diff-header-face)
   (insert "\n"))
 
@@ -170,10 +186,11 @@ By default paths starting with dot (like .git) are 
ignored")
     (if (not parent)
         (when ztree-diff-dirs-pair
           (ztree-diff (car ztree-diff-dirs-pair) (cdr ztree-diff-dirs-pair)))
-      (progn
-        (ztree-diff-model-partial-rescan common)
-        (ztree-diff-node-update-all-parents-diff node)
-        (ztree-refresh-buffer (line-number-at-pos))))))
+      (ztree-diff-update-wait-message
+           (concat "Updating " (ztree-diff-node-short-name common) " ..."))
+      (ztree-diff-model-partial-rescan common)
+      (message "Done")
+      (ztree-refresh-buffer (line-number-at-pos)))))
 
 
 (defun ztree-diff-partial-rescan ()
@@ -217,11 +234,13 @@ Argument NODE node containing paths to files to call a 
diff on."
 2 if left or right present - view left or rigth"
   (let ((left (ztree-diff-node-left-path node))
         (right (ztree-diff-node-right-path node))
+        ;; FIXME: The GNU convention is to only use "path" for lists of
+        ;; directories as in load-path.
         (open-f #'(lambda (path) (if hard (find-file path)
                                   (let ((split-width-threshold nil))
                                     (view-file-other-window path))))))
     (cond ((and left right)
-           (if (not (ztree-diff-node-different node))
+           (if (eql (ztree-diff-node-different node) 'same)
                (funcall open-f left)
              (if hard
                  (ediff left right)
@@ -249,16 +268,17 @@ COPY-TO-RIGHT specifies which side of the NODE to update."
                  (error error-trap))))
       ;; error message if failed
       (if err (message (concat "Error: " (nth 2 err)))
-        (progn              ; otherwise:
-          ;; assuming all went ok when left and right nodes are the same
-          ;; set both as not different
-          (ztree-diff-node-set-different node nil)
-          ;; update left/right paths
-          (if copy-to-right
-              (ztree-diff-node-set-right-path node target-path)
-            (ztree-diff-node-set-left-path node target-path))
-          (ztree-diff-node-update-all-parents-diff node)
-          (ztree-refresh-buffer (line-number-at-pos)))))))
+        ;; otherwise:
+        ;; assuming all went ok when left and right nodes are the same
+        ;; set both as not different if they were not ignored
+        (unless (eq (ztree-diff-node-different node) 'ignore)
+          (setf (ztree-diff-node-different node) 'same))
+        ;; update left/right paths
+        (if copy-to-right
+            (setf (ztree-diff-node-right-path node) target-path)
+          (setf (ztree-diff-node-left-path node) target-path))
+        (ztree-diff-node-update-all-parents-diff node)
+        (ztree-refresh-buffer (line-number-at-pos))))))
 
 
 (defun ztree-diff-copy-dir (node source-path destination-path copy-to-right)
@@ -279,17 +299,23 @@ COPY-TO-RIGHT specifies which side of the NODE to update."
                      nil)
                  (error error-trap))))
       ;; error message if failed
-      (if err (message (concat "Error: " (nth 1 err)))
-        (progn
-          (message target-full-path)
-          (if copy-to-right
-              (ztree-diff-node-set-right-path node
-                                              target-full-path)
-            (ztree-diff-node-set-left-path node
-                                           target-full-path))
-          (ztree-diff-model-update-node node)
-          (ztree-diff-node-update-all-parents-diff node)
-          (ztree-refresh-buffer (line-number-at-pos)))))))
+      (if err
+          (progn
+            (message (concat "Error: " (nth 1 err)))
+            ;; and do rescan of the node
+            (ztree-diff-do-partial-rescan node))
+        ;; if everything is ok, update statuses
+        (message target-full-path)
+        (if copy-to-right
+            (setf (ztree-diff-node-right-path node) target-full-path)
+          (setf (ztree-diff-node-left-path node) target-full-path))
+        (ztree-diff-update-wait-message
+         (concat "Updating " (ztree-diff-node-short-name node) " ..."))
+        ;; TODO: do not rescan the node. Use some logic like in delete
+        (ztree-diff-model-update-node node)
+        (message "Done.")
+        (ztree-diff-node-update-all-parents-diff node)
+        (ztree-refresh-buffer (line-number-at-pos))))))
 
 
 (defun ztree-diff-copy ()
@@ -366,55 +392,67 @@ COPY-TO-RIGHT specifies which side of the NODE to update."
       (let* ((node (car found))
              (side (cdr found))
              (node-side (ztree-diff-node-side node))
-             (delete-from-left t)
-             (remove-path nil)
-             (parent (ztree-diff-node-parent node)))
-        (when parent                    ; do not delete the root node
-          ;; algorithm for determining what to delete similar to copy:
-          ;; 1. if the file is present on both sides, delete
-          ;;    from the side currently selected
-          (setq delete-from-left (if (eq node-side 'both)
-                                     (eq side 'left)
-                                   ;; 2) if one of sides is absent, delete
-                                   ;; from the side where the file is present
-                                   (eq node-side 'left)))
-          (setq remove-path (if delete-from-left
-                                (ztree-diff-node-left-path node)
-                              (ztree-diff-node-right-path node)))
-          (when (yes-or-no-p (format "Delete the file [%s]%s ?"
-                                     (if delete-from-left "LEFT" "RIGHT")
-                                     remove-path))
-            (let* ((delete-command
-                    (if (file-directory-p remove-path)
-                        #'delete-directory
-                      #'delete-file))
-                   (children (ztree-diff-node-children parent))
-                   (err
-                    (condition-case error-trap
-                        (progn
-                          (funcall delete-command remove-path t)
-                          nil)
-                      (error error-trap))))
-              (if err
-                  (progn
-                    (message (concat "Error: " (nth 2 err)))
-                    ;; when error happened while deleting the
-                    ;; directory, rescan the node
-                    ;; and update the parents with a new status
-                    ;; of this node
-                    (when (file-directory-p remove-path)
-                      (ztree-diff-model-partial-rescan node)
-                      (ztree-diff-node-update-all-parents-diff node)))
-                ;; if everything ok 
+             (parent (ztree-diff-node-parent node))
+             ;; algorithm for determining what to delete similar to copy:
+             ;; 1. if the file is present on both sides, delete
+             ;;    from the side currently selected
+             ;; 2. if one of sides is absent, delete
+             ;;    from the side where the file is present
+             (delete-from-left
+              (or (eql node-side 'left)
+                  (and (eql node-side 'both)
+                       (eql side 'left))))
+             (remove-path (if delete-from-left
+                              (ztree-diff-node-left-path node)
+                            (ztree-diff-node-right-path node))))
+        (when (and parent                    ; do not delete the root node
+                   (yes-or-no-p (format "Delete the file [%s]%s ?"
+                                        (if delete-from-left "LEFT" "RIGHT")
+                                        remove-path)))
+          (let* ((delete-command
+                  (if (file-directory-p remove-path)
+                      #'delete-directory
+                    #'delete-file))
+                 (children (ztree-diff-node-children parent))
+                 (err
+                  (condition-case error-trap
+                      (progn
+                        (funcall delete-command remove-path t)
+                        nil)
+                    (error error-trap))))
+            (if err
                 (progn
-                  ;; remove the node from children
-                  (setq children (ztree-filter
-                                  #'(lambda (x) (not (ztree-diff-node-equal x 
node)))
-                                  children))
-                  (ztree-diff-node-set-children parent children))
-                (ztree-diff-node-update-all-parents-diff node)
-                ;;(ztree-diff-model-partial-rescan node)
-                (ztree-refresh-buffer (line-number-at-pos))))))))))
+                  (message (concat "Error: " (nth 2 err)))
+                  ;; when error happened while deleting the
+                  ;; directory, rescan the node
+                  ;; and update the parents with a new status
+                  ;; of this node
+                  (when (file-directory-p remove-path)
+                    (ztree-diff-model-partial-rescan node)))
+              ;; if everything ok
+              ;; if was only on one side
+              ;; remove the node from children
+              (if (or (and (eql node-side 'left)
+                           delete-from-left)
+                      (and (eql node-side 'right)
+                           (not delete-from-left)))
+                  (setf (ztree-diff-node-children parent)
+                        (ztree-filter
+                         (lambda (x) (not (ztree-diff-node-equal x node)))
+                         children))
+                ;; otherwise update only one side
+                (mapc (if delete-from-left
+                          (lambda (x) (setf (ztree-diff-node-left-path x) nil))
+                        (lambda (x) (setf (ztree-diff-node-right-path x) nil)))
+                      (cons node (ztree-diff-node-children node)))
+                ;; and update diff status
+                ;; if was ignored keep the old status
+                (unless (eql (ztree-diff-node-different node) 'ignore)
+                  (setf (ztree-diff-node-different node) 'new))
+                ;; finally update all children statuses
+                (ztree-diff-node-update-diff-from-parent node)))
+            (ztree-diff-node-update-all-parents-diff node)
+            (ztree-refresh-buffer (line-number-at-pos))))))))
 
 
 
@@ -431,44 +469,68 @@ unless it is a parent node."
 
 (defun ztree-node-is-visible (node)
   "Determine if the NODE should be visible."
-  ;; visible then
-  ;; 1) either it is a parent
-  (or (not (ztree-diff-node-parent node))    ; parent is always visible
-      (and
-       ;; 2.1) or it is not in ignore list and 
-       (or ztree-diff-show-filtered-files ; show filtered files regardless
-           (not (ztree-diff-node-ignore-p node)))
-       ;; 2.2) it has different status
-       (or ztree-diff-show-equal-files  ; show equal files regardless
-           (ztree-diff-node-different node)))))
+  (let ((diff (ztree-diff-node-different node)))
+    ;; visible then
+    ;; either it is a root. root have no parent
+    (or (not (ztree-diff-node-parent node))    ; parent is always visible
+        ;; or the files are different or orphan
+        (or (eql diff 'new)
+            (eql diff 'diff))
+        ;; or it is ignored but we show ignored for now
+        (and (eql diff 'ignore)
+             ztree-diff-show-filtered-files) 
+        ;; or they are same but we show same for now
+        (and (eql diff 'same)
+             ztree-diff-show-equal-files))))
 
 (defun ztree-diff-toggle-show-equal-files ()
   "Toggle visibility of the equal files."
   (interactive)
   (setq ztree-diff-show-equal-files (not ztree-diff-show-equal-files))
+  (message (concat (if ztree-diff-show-equal-files "Show" "Hide") " equal 
files"))
   (ztree-refresh-buffer))
 
 (defun ztree-diff-toggle-show-filtered-files ()
   "Toggle visibility of the filtered files."
   (interactive)
   (setq ztree-diff-show-filtered-files (not ztree-diff-show-filtered-files))
+  (message (concat (if ztree-diff-show-filtered-files "Show" "Hide") " 
filtered files"))
   (ztree-refresh-buffer))
 
 
+(defun ztree-diff-update-wait-message (&optional msg)
+  "Update the wait mesage with one more '.' progress indication."
+  (if msg
+      (setq ztree-diff-wait-message msg)
+    (when ztree-diff-wait-message
+      (setq ztree-diff-wait-message (concat ztree-diff-wait-message "."))))
+  (message ztree-diff-wait-message))
+
 ;;;###autoload
 (defun ztree-diff (dir1 dir2)
   "Create an interactive buffer with the directory tree of the path given.
 Argument DIR1 left directory.
 Argument DIR2 right directory."
   (interactive "DLeft directory \nDRight directory ")
-  (let* ((difference (ztree-diff-model-create dir1 dir2 
#'ztree-diff-node-ignore-p))
+  (unless (and dir1 (file-directory-p dir1))
+    (error "Path %s is not a directory" dir1))
+  (unless (file-exists-p dir1)
+    (error "Path %s does not exist" dir1))
+  (unless (and dir2 (file-directory-p dir2))
+    (error "Path %s is not a directory" dir2))
+  (unless (file-exists-p dir2)
+    (error "Path %s does not exist" dir2))
+  (let* ((model
+          (ztree-diff-node-create nil dir1 dir2 nil))
          (buf-name (concat "*"
-                           (ztree-diff-node-short-name difference)
+                           (ztree-diff-node-short-name model)
                            " <--> "
-                           (ztree-diff-node-right-short-name difference)
+                           (ztree-diff-node-right-short-name model)
                            "*")))
+    ;; after this command we are in a new buffer,
+    ;; so all buffer-local vars are valid
     (ztree-view buf-name
-                difference
+                model
                 'ztree-node-is-visible
                 'ztree-diff-insert-buffer-header
                 'ztree-diff-node-short-name-wrapper
@@ -479,11 +541,19 @@ Argument DIR2 right directory."
                 'ztree-diff-node-action
                 'ztree-diff-node-side)
     (ztreediff-mode)
+    (ztree-diff-model-set-ignore-fun #'ztree-diff-node-ignore-p)
+    (ztree-diff-model-set-progress-fun #'ztree-diff-update-wait-message)
     (setq ztree-diff-dirs-pair (cons dir1 dir2))
+    (ztree-diff-update-wait-message (concat "Comparing " dir1 " and " dir2 " 
..."))
+    (ztree-diff-node-recreate model)
+    (message "Done.")
+    
     (ztree-refresh-buffer)))
 
 
 
 
+
+
 (provide 'ztree-diff)
 ;;; ztree-diff.el ends here
diff --git a/packages/ztree/ztree-dir.el b/packages/ztree/ztree-dir.el
index 3dd87b7..d3d3b25 100644
--- a/packages/ztree/ztree-dir.el
+++ b/packages/ztree/ztree-dir.el
@@ -1,10 +1,10 @@
 ;;; ztree-dir.el --- Text mode directory tree -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2013-2015  Free Software Foundation, Inc.
+;; Copyright (C) 2013-2016  Free Software Foundation, Inc.
 ;;
-;; Author: Alexey Veretennikov <alexey dot veretennikov at gmail dot com>
+;; Author: Alexey Veretennikov <address@hidden>
 ;; 
-;; Created: 2013-11-1l
+;; Created: 2013-11-11
 ;;
 ;; Keywords: files tools
 ;; URL: https://github.com/fourier/ztree
@@ -45,6 +45,7 @@
 
 (require 'ztree-util)
 (require 'ztree-view)
+(eval-when-compile (require 'cl-lib))
 
 ;;
 ;; Constants
@@ -60,7 +61,18 @@ By default all filest starting with dot '.', including . and 
..")
 
 (defvar ztree-dir-move-focus nil
   "If set to true moves the focus to opened window when the
-user press RETURN on file ")t
+user press RETURN on file ")
+
+(defvar-local ztree-dir-filter-list (list ztree-hidden-files-regexp)
+  "List of regexp file names to filter out.
+By default paths starting with dot (like .git) are ignored.
+One could add own filters in the following way:
+
+(setq-default ztree-dir-filter-list (cons \"^.*\\.pyc\" ztree-dir-filter-list))
+")
+
+(defvar-local ztree-dir-show-filtered-files nil
+  "Show or not files from the filtered list.")
 
 
 ;;
@@ -76,6 +88,19 @@ user press RETURN on file ")t
 (defvar ztreep-header-face 'ztreep-header-face)
 
 
+(define-minor-mode ztreedir-mode
+  "A minor mode for displaying the directory trees in text mode."
+  ;; initial value
+  nil
+  ;; modeline name
+  " Dir"
+  ;; The minor mode keymap
+  `(
+    (,(kbd "H") . ztree-dir-toggle-show-filtered-files)))
+
+
+
+
 ;;
 ;; File bindings to the directory tree control
 ;;
@@ -91,8 +116,12 @@ user press RETURN on file ")t
 
 (defun ztree-file-not-hidden (filename)
   "Determines if the file with FILENAME should be visible."
-  (not (string-match ztree-hidden-files-regexp
-                     (ztree-file-short-name filename))))
+  (let ((name (ztree-file-short-name filename)))
+    (and (not (or (string= name ".") (string= name "..")))
+         (or 
+          ztree-dir-show-filtered-files 
+          (not (cl-find-if (lambda (rx) (string-match rx name)) 
ztree-dir-filter-list))))))
+
 
 (defun ztree-find-file (node hard)
   "Find the file at NODE.
@@ -107,6 +136,17 @@ Otherwise, the ztree window is used to find the file."
           (t 
            (find-file node)))))
 
+
+(defun ztree-dir-toggle-show-filtered-files ()
+  "Toggle visibility of the filtered files."
+  (interactive)
+  (setq ztree-dir-show-filtered-files (not ztree-dir-show-filtered-files))
+  (message (concat (if ztree-dir-show-filtered-files "Show" "Hide") " filtered 
files"))
+  (ztree-refresh-buffer))
+
+
+
+
 ;;;###autoload
 (defun ztree-dir (path)
   "Create an interactive buffer with the directory tree of the PATH given."
@@ -115,14 +155,16 @@ Otherwise, the ztree window is used to find the file."
     (let ((buf-name (concat "*Directory " path " tree*")))
       (ztree-view buf-name
                   (expand-file-name (substitute-in-file-name path))
-                  'ztree-file-not-hidden
-                  'ztree-insert-buffer-header
-                  'ztree-file-short-name
-                  'file-directory-p
-                  'string-equal
-                  '(lambda (x) (directory-files x 'full))
+                  #'ztree-file-not-hidden
+                  #'ztree-insert-buffer-header
+                  #'ztree-file-short-name
+                  #'file-directory-p
+                  #'string-equal
+                  (lambda (x) (directory-files x 'full))
                   nil                   ; face
-                  'ztree-find-file)))) ; action
+                  #'ztree-find-file)    ; action
+      (ztreedir-mode))))
+
 
 
 (provide 'ztree-dir)
diff --git a/packages/ztree/ztree-util.el b/packages/ztree/ztree-util.el
index 85df444..ec49457 100644
--- a/packages/ztree/ztree-util.el
+++ b/packages/ztree/ztree-util.el
@@ -1,10 +1,10 @@
-;;; ztree-util.el --- Auxulary utilities for the ztree package -*- 
lexical-binding: t; -*-
+;;; ztree-util.el --- Auxiliary utilities for the ztree package -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2013-2015  Free Software Foundation, Inc.
+;; Copyright (C) 2013-2016  Free Software Foundation, Inc.
 ;;
-;; Author: Alexey Veretennikov <alexey dot veretennikov at gmail dot com>
+;; Author: Alexey Veretennikov <address@hidden>
 ;; 
-;; Created: 2013-11-1l
+;; Created: 2013-11-11
 ;;
 ;; Keywords: files tools
 ;; URL: https://github.com/fourier/ztree
@@ -65,68 +65,6 @@ Used since `car-safe' returns nil for atoms"
     (insert text)
     (put-text-property start (point) 'face face)))
 
-
-(defmacro ztree-defrecord (record-name record-fields)
-  "Create a record (structure) and getters/setters.
-
-Record is the following set of functions:
- - Record constructor with name \"RECORD-NAME\"-create and list of
-arguments which will be assigned to RECORD-FIELDS
- - Record getters with names \"record-name\"-\"field\" accepting one
-argument - the record; \"field\" is from \"record-fields\" symbols
- - Record setters with names \"record-name\"-set-\"field\" accepting two
-arguments - the record and the field value
-
-Example:
-\(ztree-defrecord person (name age))
-
-will be expanded to the following functions:
-
-\(defun person-create (name age) (...)
-\(defun person-name (record) (...)
-\(defun person-age (record) (...)
-\(defun person-set-name (record value) (...)
-\(defun person-set-age (record value) (...)
-
-To test expansion one can use GNU Emacs's pp library:
-\(require 'pp)
-\(pp-macroexpand-expression
- '(ztree-defrecord person (name age)))"
-  (let ((ctor-name (intern (concat (symbol-name record-name) "-create")))
-        (rec-var (make-symbol "record")))
-    `(progn
-       ;; constructor with the name "record-name-create"
-       ;; with arguments list "record-fields" expanded
-       (defun ,ctor-name (,@record-fields)
-         (let ((,rec-var))
-           ,@(mapcar #'(lambda (x)
-                         (list 'setq rec-var (list 'plist-put rec-var (list 
'quote x) x)))
-                     record-fields)))
-       ;; getters with names "record-name-field" where the "field"
-       ;; is from record-fields
-       ,@(mapcar #'(lambda (x)
-                     (let ((getter-name (intern (concat (symbol-name 
record-name)
-                                                        "-"
-                                                        (symbol-name x)))))
-                       `(progn
-                          (defun ,getter-name (,rec-var)
-                            (plist-get ,rec-var ',x)
-                            ))))
-                 record-fields)
-       ;; setters wit names "record-name-set-field where the "field"
-       ;; is from record-fields
-       ;; arguments for setters: (record value)
-       ,@(mapcar #'(lambda (x)
-                     (let ((setter-name (intern (concat (symbol-name 
record-name)
-                                                        "-set-"
-                                                        (symbol-name x)))))
-                       `(progn
-                          (defun ,setter-name (,rec-var value)
-                            (setq ,rec-var (plist-put ,rec-var ',x value))
-                            ))))
-                 record-fields))))
-
-
 (provide 'ztree-util)
 
 ;;; ztree-util.el ends here
diff --git a/packages/ztree/ztree-view.el b/packages/ztree/ztree-view.el
index 519097b..3244ccc 100644
--- a/packages/ztree/ztree-view.el
+++ b/packages/ztree/ztree-view.el
@@ -1,10 +1,10 @@
 ;;; ztree-view.el --- Text mode tree view (buffer) -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2013-2015  Free Software Foundation, Inc.
+;; Copyright (C) 2013-2016  Free Software Foundation, Inc.
 ;;
-;; Author: Alexey Veretennikov <alexey dot veretennikov at gmail dot com>
+;; Author: Alexey Veretennikov <address@hidden>
 ;; 
-;; Created: 2013-11-1l
+;; Created: 2013-11-11
 ;;
 ;; Keywords: files tools
 ;; URL: https://github.com/fourier/ztree
@@ -48,78 +48,65 @@
 ;; Globals
 ;;
 
-(defvar ztree-expanded-nodes-list nil
+(defvar ztree-draw-unicode-lines nil
+  "If set forces ztree to draw lines with unicode characters.")
+
+(defvar-local ztree-expanded-nodes-list nil
   "A list of Expanded nodes (i.e. directories) entries.")
-(make-variable-buffer-local 'ztree-expanded-nodes-list)
 
-(defvar ztree-start-node nil
+(defvar-local ztree-start-node nil
   "Start node(i.e. directory) for the window.")
-(make-variable-buffer-local 'ztree-start-node)
 
-(defvar ztree-line-to-node-table nil
+(defvar-local ztree-line-to-node-table nil
   "List of tuples with full node(i.e. file/directory name and the line.")
-(make-variable-buffer-local 'ztree-line-to-node-table)
 
-(defvar ztree-start-line nil
+(defvar-local ztree-start-line nil
   "Index of the start line - the root.")
-(make-variable-buffer-local 'ztree-start-line)
 
-(defvar ztree-parent-lines-array nil
+(defvar-local ztree-parent-lines-array nil
   "Array of parent lines.
 The ith value of the array is the parent line for line i.
 If ith value is i - it is the root line")
-(make-variable-buffer-local 'ztree-parent-lines-array)
 
-(defvar ztree-count-subsequent-bs nil
+(defvar-local ztree-count-subsequent-bs nil
   "Counter for the subsequest BS keys (to identify double BS).
 Used in order to not to use cl package and `lexical-let'")
-(make-variable-buffer-local 'ztree-count-subsequent-bs)
 
-(defvar ztree-line-tree-properties nil
+(defvar-local ztree-line-tree-properties nil
   "Hash with key - line number, value - property ('left, 'right, 'both).
 Used for 2-side trees, to determine if the node exists on left or right
 or both sides")
-(make-variable-buffer-local 'ztree-line-tree-properties)
 
-(defvar ztree-tree-header-fun nil
+(defvar-local ztree-tree-header-fun nil
   "Function inserting the header into the tree buffer.
 MUST inster newline at the end!")
-(make-variable-buffer-local 'ztree-tree-header-fun)
 
-(defvar ztree-node-short-name-fun nil
+(defvar-local ztree-node-short-name-fun nil
   "Function which creates a pretty-printable short string from the node.")
-(make-variable-buffer-local 'ztree-node-short-name-fun)
 
-(defvar ztree-node-is-expandable-fun nil
+(defvar-local ztree-node-is-expandable-fun nil
   "Function which determines if the node is expandable.
 For example if the node is a directory")
-(make-variable-buffer-local 'ztree-node-is-expandable-fun)
 
-(defvar ztree-node-equal-fun nil
+(defvar-local ztree-node-equal-fun nil
   "Function which determines if the 2 nodes are equal.")
-(make-variable-buffer-local 'ztree-node-equal-fun)
 
-(defvar ztree-node-contents-fun nil
+(defvar-local ztree-node-contents-fun nil
   "Function returning list of node contents.")
-(make-variable-buffer-local 'ztree-node-contents-fun)
 
-(defvar ztree-node-side-fun nil
+(defvar-local ztree-node-side-fun nil
   "Function returning position of the node: 'left, 'right or 'both.
 If not defined(by default) - using single screen tree, otherwise
 the buffer is split to 2 trees")
-(make-variable-buffer-local 'ztree-node-side-fun)
 
-(defvar ztree-node-face-fun nil
+(defvar-local ztree-node-face-fun nil
   "Function returning face for the node.")
-(make-variable-buffer-local 'ztree-node-face-fun)
 
-(defvar ztree-node-action-fun nil
+(defvar-local ztree-node-action-fun nil
   "Function called when Enter/Space pressed on the node.")
-(make-variable-buffer-local 'ztree-node-action-fun)
 
-(defvar ztree-node-showp-fun nil
+(defvar-local ztree-node-showp-fun nil
   "Function called to decide if the node should be visible.")
-(make-variable-buffer-local 'ztree-node-showp-fun)
 
 
 ;;
@@ -176,7 +163,9 @@ the buffer is split to 2 trees")
 (define-derived-mode ztree-mode special-mode "Ztree"
   "A major mode for displaying the directory tree in text mode."
   ;; only spaces
-  (setq indent-tabs-mode nil))
+  (setq indent-tabs-mode nil)
+  (setq        buffer-read-only t))
+
 
 (defun ztree-find-node-in-line (line)
   "Return the node for the LINE specified.
@@ -326,11 +315,13 @@ Argument NODE node which contents will be returned."
                             (funcall ztree-node-short-name-fun y)))))
     (cons (sort (ztree-filter
                  #'(lambda (f) (funcall ztree-node-is-expandable-fun f))
-                 nodes) comp)
+                 nodes)
+                comp)
           (sort (ztree-filter
                  #'(lambda (f) (not (funcall ztree-node-is-expandable-fun f)))
-                 nodes) comp))))
-
+                 nodes)
+                comp))))
+                
 
 (defun ztree-draw-char (c x y &optional face)
   "Draw char C at the position (1-based) (X Y).
@@ -341,45 +332,66 @@ Optional argument FACE face to use to draw a character."
     (goto-char (+ x (-(point) 1)))
     (delete-char 1)
     (insert-char c 1)
-    (put-text-property (1- (point)) (point) 'face (if face face 
'ztreep-arrow-face))))
+    (put-text-property (1- (point)) (point) 'font-lock-face (if face face 
'ztreep-arrow-face))))
+
+(defun ztree-vertical-line-char ()
+  "Return the character used to draw vertical line"
+  (if ztree-draw-unicode-lines #x2502 ?\|))
+
+(defun ztree-horizontal-line-char ()
+  "Return the character used to draw vertical line"
+  (if ztree-draw-unicode-lines #x2500 ?\-))
+
+(defun ztree-left-bottom-corner-char ()
+  "Return the character used to draw vertical line"
+  (if ztree-draw-unicode-lines #x2514 ?\`))
+
+(defun ztree-left-intersection-char ()
+  "Return left intersection character.
+It is just vertical bar when unicode disabled"
+  (if ztree-draw-unicode-lines #x251C ?\|))
 
 (defun ztree-draw-vertical-line (y1 y2 x &optional face)
   "Draw a vertical line of '|' characters from Y1 row to Y2 in X column.
 Optional argument FACE face to draw line with."
-  (let ((count (abs (- y1 y2))))
+  (let ((ver-line-char (ztree-vertical-line-char))
+        (count (abs (- y1 y2))))
     (if (> y1 y2)
         (progn
           (dotimes (y count)
-            (ztree-draw-char ?\| x (+ y2 y) face))
-          (ztree-draw-char ?\| x (+ y2 count) face))
+            (ztree-draw-char ver-line-char x (+ y2 y) face))
+          (ztree-draw-char ver-line-char x (+ y2 count) face))
       (progn
         (dotimes (y count)
-          (ztree-draw-char ?\| x (+ y1 y) face))
-        (ztree-draw-char ?\| x (+ y1 count) face)))))
+          (ztree-draw-char ver-line-char x (+ y1 y) face))
+        (ztree-draw-char ver-line-char x (+ y1 count) face)))))
 
 (defun ztree-draw-vertical-rounded-line (y1 y2 x &optional face)
   "Draw a vertical line of '|' characters finishing with '`' character.
 Draws the line from Y1 row to Y2 in X column.
 Optional argument FACE facet to draw the line with."
-  (let ((count (abs (- y1 y2))))
+  (let ((ver-line-char (ztree-vertical-line-char))
+        (corner-char (ztree-left-bottom-corner-char))
+        (count (abs (- y1 y2))))
     (if (> y1 y2)
         (progn
           (dotimes (y count)
-            (ztree-draw-char ?\| x (+ y2 y) face))
-          (ztree-draw-char ?\` x (+ y2 count) face))
+            (ztree-draw-char ver-line-char x (+ y2 y) face))
+          (ztree-draw-char corner-char x (+ y2 count) face))
       (progn
         (dotimes (y count)
-          (ztree-draw-char ?\| x (+ y1 y) face))
-        (ztree-draw-char ?\` x (+ y1 count) face)))))
+          (ztree-draw-char ver-line-char x (+ y1 y) face))
+        (ztree-draw-char corner-char x (+ y1 count) face)))))
 
 
 (defun ztree-draw-horizontal-line (x1 x2 y)
   "Draw the horizontal line from column X1 to X2 in the row Y."
-  (if (> x1 x2)
-      (dotimes (x (1+ (- x1 x2)))
-        (ztree-draw-char ?\- (+ x2 x) y))
-    (dotimes (x (1+ (- x2 x1)))
-      (ztree-draw-char ?\- (+ x1 x) y))))
+  (let ((hor-line-char (ztree-horizontal-line-char)))
+    (if (> x1 x2)
+        (dotimes (x (1+ (- x1 x2)))
+          (ztree-draw-char hor-line-char (+ x2 x) y))
+      (dotimes (x (1+ (- x2 x1)))
+        (ztree-draw-char hor-line-char (+ x1 x) y)))))
 
 
 (defun ztree-draw-tree (tree depth start-offset)
@@ -394,6 +406,8 @@ Argument START-OFFSET column to start drawing from."
            (line-start (+ 3 offset))
            (line-end-leaf (+ 7 offset))
            (line-end-node (+ 4 offset))
+           (corner-char (ztree-left-bottom-corner-char))
+           (intersection-char (ztree-left-intersection-char))
            ;; determine if the line is visible. It is always the case
            ;; for 1-sided trees; however for 2 sided trees
            ;; it depends on which side is the actual element
@@ -415,17 +429,24 @@ Argument START-OFFSET column to start drawing from."
                                           (funcall visible (ztree-car-atom 
x)))))
               (x-offset (+ 2 offset)))
           (when last-child
-            (ztree-draw-vertical-rounded-line (1+ root)
-                                              (ztree-car-atom last-child)
-                                              x-offset)))
-        ;; draw recursively
-        (dolist (child children)
-          (ztree-draw-tree child (1+ depth) start-offset)
-          (let ((end (if (listp child) line-end-node line-end-leaf)))
-            (when (funcall visible (ztree-car-atom child))
-              (ztree-draw-horizontal-line line-start
-                                          end
-                                          (ztree-car-atom child)))))))))
+            (ztree-draw-vertical-line (1+ root)
+                                      (ztree-car-atom last-child)
+                                      x-offset))
+          ;; draw recursively
+          (dolist (child children)
+            (ztree-draw-tree child (1+ depth) start-offset)
+            (let ((end (if (listp child) line-end-node line-end-leaf))
+                  (row (ztree-car-atom child)))
+              (when (funcall visible (ztree-car-atom child))
+                (ztree-draw-char intersection-char (1- line-start) row)
+                (ztree-draw-horizontal-line line-start
+                                            end
+                                            row))))
+          ;; finally draw the corner at the end of vertical line
+          (when last-child
+            (ztree-draw-char corner-char
+                             x-offset
+                             (ztree-car-atom last-child))))))))
 
 (defun ztree-fill-parent-array (tree)
   "Set the root lines array.
@@ -536,29 +557,33 @@ Writes a string with given DEPTH, prefixed with [ ] if 
EXPANDABLE
 and [-] or [+] depending on if it is EXPANDED from the specified OFFSET.
 Optional argument FACE face to write text with."
   (let ((node-sign #'(lambda (exp)
-                       (insert "[" (if exp "-" "+") "]")
-                       (set-text-properties (- (point) 3)
-                                            (point)
-                                            '(face ztreep-expand-sign-face)))))
-    (move-to-column offset t)
+                       (let ((sign (concat "[" (if exp "-" "+") "]")))
+                         (insert (propertize sign 
+                                             'font-lock-face
+                                             ztreep-expand-sign-face)))))
+        ;; face to use. if FACE is not null, use it, otherwise
+        ;; deside from the node type
+        (entry-face (cond (face face)
+                          (expandable 'ztreep-node-face)
+                          (t ztreep-leaf-face))))
+    ;; move-to-column in contrast to insert reuses the last property
+    ;; so need to clear it
+    (let ((start-pos (point)))
+      (move-to-column offset t)
+      (remove-text-properties start-pos (point) '(font-lock-face nil)))
     (delete-region (point) (line-end-position))
+    ;; every indentation level is 4 characters
     (when (> depth 0)
-      (dotimes (i depth)
-        (insert " ")
-        (insert-char ?\s 3)))           ; insert 3 spaces
+      (insert-char ?\s (* 4 depth)))           ; insert 4 spaces
     (when (> (length short-name) 0)
-      (if expandable
-          (progn
-            (funcall node-sign expanded)   ; for expandable nodes insert 
"[+/-]"
-            (insert " ")
-            (put-text-property 0 (length short-name)
-                               'face (if face face 'ztreep-node-face) 
short-name)
-            (insert short-name))
-        (progn
-          (insert "    ")
-          (put-text-property 0 (length short-name)
-                             'face (if face face 'ztreep-leaf-face) short-name)
-          (insert short-name))))))
+      (let ((start-pos (point)))
+        (if expandable
+            (funcall node-sign expanded))   ; for expandable nodes insert 
"[+/-]"
+        ;; indentation for leafs 4 spaces from the node name
+        (insert-char ?\s (- 4 (- (point) start-pos))))
+      (insert (propertize short-name 'font-lock-face entry-face)))))
+
+
 
 (defun ztree-jump-side ()
   "Jump to another side for 2-sided trees."
@@ -584,13 +609,12 @@ Optional argument LINE scroll to the line given."
     ;; used in 2-side tree mode
     (when ztree-node-side-fun
       (setq ztree-line-tree-properties (make-hash-table)))
-    (toggle-read-only)
-    (erase-buffer)
-    (funcall ztree-tree-header-fun)
-    (setq ztree-start-line (line-number-at-pos (point)))
-    (ztree-insert-node-contents ztree-start-node)
-    (scroll-to-line (if line line ztree-start-line))
-    (toggle-read-only)))
+    (let ((inhibit-read-only t))
+      (erase-buffer)
+      (funcall ztree-tree-header-fun)
+      (setq ztree-start-line (line-number-at-pos (point)))
+      (ztree-insert-node-contents ztree-start-node))
+    (scroll-to-line (if line line ztree-start-line))))
 
 
 (defun ztree-view (
@@ -604,7 +628,8 @@ Optional argument LINE scroll to the line given."
                    children-fun
                    face-fun
                    action-fun
-                   &optional node-side-fun
+                   &optional
+                   node-side-fun
                    )
   "Create a ztree view buffer configured with parameters given.
 Argument BUFFER-NAME Name of the buffer created.
diff --git a/packages/ztree/ztree.el b/packages/ztree/ztree.el
index 7dc67f4..300ed85 100644
--- a/packages/ztree/ztree.el
+++ b/packages/ztree/ztree.el
@@ -1,10 +1,11 @@
 ;;; ztree.el --- Text mode directory tree -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2013-2015  Free Software Foundation, Inc.
+;; Copyright (C) 2013-2016  Free Software Foundation, Inc.
 ;;
-;; Author: Alexey Veretennikov <alexey dot veretennikov at gmail dot com>
-;; Created: 2013-11-1l
-;; Version: 1.0.2
+;; Author: Alexey Veretennikov <address@hidden>
+;; Created: 2013-11-11
+;; Version: 1.0.3
+;; Package-Requires: ((cl-lib "0"))
 ;; Keywords: files tools
 ;; URL: https://github.com/fourier/ztree
 ;; Compatibility: GNU Emacs 24.x



reply via email to

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