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

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

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


From: Nicolas Petton
Subject: [elpa] new-website cf17f8b: Merge branch 'master' into new-website
Date: Mon, 19 Sep 2016 14:42:18 +0000 (UTC)

branch: new-website
commit cf17f8baa53416b7de4169c1c9a9039641c4682f
Merge: a50a613 1c1ee85
Author: Nicolas Petton <address@hidden>
Commit: Nicolas Petton <address@hidden>

    Merge branch 'master' into new-website
---
 .gitignore                                         |   30 +-
 GNUmakefile                                        |    6 +-
 README                                             |    2 +-
 admin/archive-contents.el                          |   64 +-
 copyright_exceptions                               |    4 +
 externals-list                                     |    5 +
 packages/ack/pcmpl-ack.el                          |    2 +-
 packages/ada-mode/NEWS                             |   26 +
 packages/ada-mode/README                           |    2 +-
 packages/ada-mode/ada-build.el                     |   18 +-
 packages/ada-mode/ada-fix-error.el                 |    6 +-
 packages/ada-mode/ada-gnat-compile.el              |    2 +-
 packages/ada-mode/ada-gnat-xref.el                 |   14 +-
 packages/ada-mode/ada-grammar-wy.el                | 1339 +++---
 packages/ada-mode/ada-indent-user-options.el       |   18 +-
 packages/ada-mode/ada-mode.el                      |   75 +-
 packages/ada-mode/ada-mode.info                    |  247 +-
 packages/ada-mode/ada-mode.texi                    |  204 +-
 packages/ada-mode/ada-ref-man.el                   |   13 -
 packages/ada-mode/ada-skel.el                      |   31 +-
 packages/ada-mode/ada-wisi.el                      |   63 +-
 packages/ada-mode/dir                              |    2 +-
 packages/ada-mode/gnat-core.el                     |   28 +-
 packages/ada-mode/gpr-grammar-wy.el                |    2 +-
 packages/ada-mode/gpr-mode.info                    |    2 +-
 packages/ada-mode/gpr-query.el                     |   16 +-
 packages/ada-mode/gpr_query.adb                    |  732 +++
 packages/ada-mode/gpr_query.gpr                    |   70 +
 packages/aggressive-indent/aggressive-indent.el    |   54 +-
 packages/ahungry-theme/README.md                   |    5 +
 packages/ahungry-theme/ahungry-theme.el            |   47 +-
 packages/ampc/ampc.el                              |  197 +-
 packages/arbitools/arbitools.el                    |  697 +++
 packages/async/README.md                           |  145 -
 packages/async/async-bytecomp.el                   |   46 +-
 packages/async/async.el                            |   22 +-
 packages/async/dired-async.el                      |  183 +-
 packages/async/smtpmail-async.el                   |    6 +-
 packages/aumix-mode/aumix-mode.el                  |    2 +-
 packages/auto-overlays/auto-overlay-common.el      |    4 +-
 packages/auto-overlays/auto-overlays.el            |   18 +-
 packages/avy/avy.el                                |   12 +-
 packages/beacon/beacon.el                          |   28 +-
 packages/bug-hunter/bug-hunter.el                  |   33 +-
 packages/cl-generic/cl-generic.el                  |   32 +-
 packages/compact-docstrings/.gitignore             |    1 +
 packages/compact-docstrings/Cask                   |    6 +
 packages/compact-docstrings/Makefile               |    6 +
 packages/compact-docstrings/README.rst             |   23 +
 packages/compact-docstrings/compact-docstrings.el  |   92 +
 packages/compact-docstrings/etc/after.py           |   14 +
 packages/compact-docstrings/etc/before.py          |   14 +
 .../etc/compact-docstrings-screenshot.el           |   99 +
 .../compact-docstrings/etc/compact-docstrings.png  |  Bin 0 -> 25863 bytes
 packages/company-math/.dir-locals.el               |    3 +
 packages/company-math/company-math.el              |   54 +-
 packages/company-math/readme.md                    |   10 +-
 packages/company/.travis.yml                       |    3 +-
 packages/company/Makefile                          |    4 +-
 packages/company/NEWS.md                           |   47 +
 packages/company/README.md                         |    2 +-
 packages/company/company-abbrev.el                 |    9 +-
 packages/company/company-bbdb.el                   |   10 +-
 packages/company/company-capf.el                   |   36 +-
 packages/company/company-clang.el                  |   44 +-
 packages/company/company-cmake.el                  |    6 +-
 packages/company/company-css.el                    |   10 +-
 packages/company/company-dabbrev-code.el           |   16 +-
 packages/company/company-dabbrev.el                |  110 +-
 packages/company/company-eclim.el                  |   25 +-
 packages/company/company-elisp.el                  |    8 +-
 packages/company/company-etags.el                  |   31 +-
 packages/company/company-files.el                  |   63 +-
 packages/company/company-gtags.el                  |    7 +-
 packages/company/company-ispell.el                 |   20 +-
 packages/company/company-keywords.el               |   39 +-
 packages/company/company-nxml.el                   |    4 +-
 packages/company/company-oddmuse.el                |    6 +-
 packages/company/company-pysmell.el                |   69 -
 packages/company/company-ropemacs.el               |   72 -
 packages/company/company-semantic.el               |   61 +-
 packages/company/company-template.el               |   65 +-
 packages/company/company-tempo.el                  |   20 +-
 packages/company/company-xcode.el                  |    6 +-
 packages/company/company-yasnippet.el              |   79 +-
 packages/company/company.el                        |  838 ++--
 packages/company/test/async-tests.el               |    4 +-
 packages/company/test/bbdb-tests.el                |   46 +
 packages/company/test/clang-tests.el               |   17 +-
 packages/company/test/core-tests.el                |   25 +-
 packages/company/test/frontends-tests.el           |   99 +-
 packages/company/test/template-tests.el            |   60 +-
 packages/context-coloring/.elpaignore              |   10 +
 packages/context-coloring/.gitignore               |    6 +-
 packages/context-coloring/Cask                     |    3 +-
 packages/context-coloring/Makefile                 |   16 +-
 .../{benchmark => }/context-coloring-benchmark.el  |   27 +-
 .../{test => }/context-coloring-coverage.el        |   10 +-
 ...-coloring.el => context-coloring-emacs-lisp.el} |  703 +--
 .../context-coloring-javascript.el                 |  232 +
 .../{test => }/context-coloring-test.el            |   78 +-
 packages/context-coloring/context-coloring.el      | 1079 +----
 .../{test/fixtures/empty => fixtures/.nosearch}    |    0
 .../fixtures => fixtures/benchmark}/.dir-locals.el |    0
 .../fixtures => fixtures/benchmark}/async-0.9.0.js |    0
 .../fixtures => fixtures/benchmark}/faces.el       |    0
 .../benchmark}/jquery-2.1.1.js                     |    0
 .../fixtures => fixtures/benchmark}/lisp.el        |    0
 .../benchmark}/lodash-2.4.1.js                     |    0
 .../benchmark}/mkdirp-0.5.0.js                     |    0
 .../fixtures => fixtures/benchmark}/simple.el      |    0
 .../fixtures => fixtures/benchmark}/subr.el        |    0
 packages/context-coloring/fixtures/test/README     |    4 +
 .../fixtures => fixtures/test}/block-scopes.js     |    0
 .../{test/fixtures => fixtures/test}/catch.js      |    0
 .../{test/fixtures => fixtures/test}/changed.el    |    0
 .../{test/fixtures => fixtures/test}/comment.el    |    0
 .../test}/comments-and-strings.js                  |    0
 .../{test/fixtures => fixtures/test}/cond.el       |    0
 .../fixtures => fixtures/test}/condition-case.el   |    0
 .../{test/fixtures => fixtures/test}/defadvice.el  |    0
 .../{test/fixtures => fixtures/test}/defun.el      |    0
 .../{test/fixtures => fixtures/test}/dolist.el     |    0
 .../{test/fixtures => fixtures/test}/empty         |    0
 .../fixtures => fixtures/test}/empty-varlist.el    |    0
 .../fixtures => fixtures/test}/function-scopes.js  |    0
 .../{test/fixtures => fixtures/test}/global.js     |    0
 .../{test/fixtures => fixtures/test}/ignored.el    |    0
 .../fixtures => fixtures/test}/initial-level.js    |    0
 .../{test/fixtures => fixtures/test}/iteration.el  |    0
 .../{test/fixtures => fixtures/test}/key-names.js  |    0
 .../{test/fixtures => fixtures/test}/key-values.js |    0
 .../{test/fixtures => fixtures/test}/lambda.el     |    0
 .../{test/fixtures => fixtures/test}/let-star.el   |    0
 .../{test/fixtures => fixtures/test}/let.el        |    0
 .../fixtures => fixtures/test}/macroexp-let2.el    |    0
 .../fixtures => fixtures/test}/property-lookup.js  |    0
 .../{test/fixtures => fixtures/test}/quote.el      |    0
 .../{test/fixtures => fixtures/test}/sexp.el       |    0
 .../{test/fixtures => fixtures/test}/splice.el     |    0
 .../{test/fixtures => fixtures/test}/string.el     |    0
 .../test}/unbalanced-parenthesis.el                |    0
 .../test}/unterminated-comment.js                  |    0
 .../fixtures => fixtures/test}/varlist-spacing.el  |    0
 packages/csv-mode/csv-mode.el                      |   43 +-
 packages/cycle-quotes/cycle-quotes-test.el         |   83 +
 packages/cycle-quotes/cycle-quotes.el              |  145 +
 packages/dbus-codegen/dbus-codegen.el              |    4 +-
 packages/dbus-codegen/tests/dbus-codegen-tests.el  |    7 +-
 packages/debbugs/debbugs-gnu.el                    |  747 ++-
 packages/debbugs/debbugs-org.el                    |  149 +-
 packages/debbugs/debbugs-ug.info                   |  248 +-
 packages/debbugs/debbugs-ug.texi                   |  146 +-
 packages/debbugs/debbugs.el                        |  248 +-
 packages/debbugs/debbugs.info                      |  235 +-
 packages/debbugs/debbugs.texi                      |  223 +-
 packages/delight/COPYING                           |  674 +++
 packages/delight/delight.el                        |  214 +
 packages/dict-tree/dict-tree.el                    |   48 +-
 packages/diff-hl/README.md                         |   10 +
 packages/diff-hl/diff-hl-amend.el                  |    2 +-
 packages/diff-hl/diff-hl-flydiff.el                |    5 +-
 packages/diff-hl/diff-hl.el                        |   13 +-
 packages/diffview/Makefile                         |   13 +
 packages/diffview/README.md                        |   59 +
 packages/diffview/diffview.el                      |  200 +
 packages/diffview/screenshots/diffview-after.png   |  Bin 0 -> 199810 bytes
 packages/diffview/screenshots/diffview-before.png  |  Bin 0 -> 184048 bytes
 packages/djvu/djvu.el                              |    4 +-
 packages/ediprolog/ediprolog.el                    |    4 +-
 packages/el-search/el-search-x.el                  |  114 +
 packages/el-search/el-search.el                    |  647 ++-
 packages/electric-spacing/electric-spacing.el      |    6 +-
 packages/enwc/enwc.el                              |   10 +-
 packages/excorporate/NEWS                          |   41 +
 packages/excorporate/README                        |   20 +
 packages/{ada-mode => excorporate}/dir             |    6 +-
 packages/excorporate/excorporate-calendar.el       |   46 +
 packages/excorporate/excorporate-calfw.el.txt      |  128 +
 packages/excorporate/excorporate-org.el            |  151 +
 packages/excorporate/excorporate.el                |  804 ++++
 packages/excorporate/excorporate.info              |  212 +
 packages/excorporate/excorporate.texi              |  233 +
 .../f90-interface-browser/f90-interface-browser.el |    4 +-
 packages/f90-interface-browser/f90-tests.el        |   10 +-
 packages/fsm/fsm.el                                |    9 +-
 packages/ggtags/ggtags.el                          |    2 +-
 packages/gnome-c-style/gnome-c-snippet.el          |   20 +-
 packages/gnorb/gnorb-bbdb.el                       |   10 +-
 packages/gnorb/gnorb-registry.el                   |    8 +-
 packages/gnorb/gnorb-utils.el                      |    4 +-
 packages/gnugo/gnugo.el                            |    4 +-
 packages/hydra/.elpaignore                         |    6 +
 packages/hydra/hydra-examples.el                   |   11 +-
 packages/hydra/hydra-test.el                       |   22 +-
 packages/hydra/hydra.el                            |   17 +-
 packages/hydra/lv.el                               |    2 +-
 packages/ioccur/ioccur.el                          |   18 +-
 packages/iterators/iterators.el                    |    2 +-
 packages/ivy/.dir-locals.el                        |    5 +
 packages/{swiper => ivy}/.travis.yml               |    0
 packages/ivy/Makefile                              |   16 +
 packages/ivy/README.md                             |   82 +
 packages/{swiper => ivy}/colir.el                  |    6 +-
 packages/ivy/counsel.el                            | 2131 +++++++++
 packages/{swiper => ivy}/doc/Changelog.org         |  570 +++
 packages/ivy/doc/ivy-help.org                      |  138 +
 packages/ivy/doc/ivy-ox.el                         |  193 +
 packages/ivy/doc/ivy.org                           | 1285 +++++
 packages/ivy/doc/ivy.texi                          | 1672 +++++++
 packages/{swiper => ivy}/ivy-hydra.el              |   15 +-
 packages/{swiper => ivy}/ivy-test.el               |   72 +-
 packages/{swiper => ivy}/ivy.el                    | 1561 +++++--
 packages/{swiper => ivy}/swiper.el                 |  336 +-
 packages/javaimp/javaimp-tests.el                  |   23 +
 packages/javaimp/javaimp.el                        | 1224 +++--
 packages/js2-mode/Makefile                         |    9 +-
 packages/js2-mode/NEWS.md                          |   18 +
 packages/js2-mode/README.md                        |    4 +-
 packages/js2-mode/js2-imenu-extras.el              |    2 +-
 packages/js2-mode/js2-mode.el                      | 1055 +++--
 packages/js2-mode/js2-old-indent.el                |  259 +-
 packages/js2-mode/tests/externs.el                 |    9 +-
 packages/js2-mode/tests/indent.el                  |  151 +-
 packages/js2-mode/tests/json-path.el               |   64 +
 packages/js2-mode/tests/parser.el                  |  265 +-
 packages/landmark/landmark.el                      |    6 +-
 packages/lmc/lmc.el                                |   55 +-
 packages/load-relative/load-relative.el            |    4 +-
 .../test/subdir/test-require-list-from-subdir.el   |    4 +-
 packages/loc-changes/loc-changes.el                |   48 +-
 packages/loc-changes/test/Makefile.am              |    2 +-
 packages/math-symbol-lists/.dir-locals.el          |    3 +
 packages/math-symbol-lists/.gitignore              |    2 +-
 packages/math-symbol-lists/math-symbol-lists.el    | 4921 ++++++++++----------
 packages/metar/metar.el                            |   73 +-
 packages/minimap/minimap.el                        |    8 +-
 packages/multishell/multishell-list.el             |    8 +-
 packages/multishell/multishell.el                  |   24 +-
 packages/muse/muse-backlink.el                     |    6 +-
 packages/muse/muse-colors.el                       |    2 +-
 packages/muse/muse-html.el                         |    4 +-
 packages/muse/muse-http.el                         |    2 +-
 packages/muse/muse-ipc.el                          |    2 +-
 packages/muse/muse-mode.el                         |    4 +-
 packages/muse/muse-publish.el                      |   22 +-
 packages/muse/muse-regexps.el                      |    4 +-
 packages/muse/muse.el                              |    8 +-
 packages/myers/myers.el                            |  196 +
 packages/nameless/README.org                       |    2 +-
 packages/nameless/nameless.el                      |   36 +-
 packages/nhexl-mode/nhexl-mode.el                  |   11 +-
 packages/nlinum/nlinum.el                          |   90 +-
 packages/notes-mode/notes-index-mode.el            |   12 +-
 packages/notes-mode/notes-mode.el                  |   60 +-
 packages/notes-mode/notes-url.el                   |   20 +-
 packages/notes-mode/notes-variables.el             |    2 +-
 packages/num3-mode/num3-mode.el                    |    8 +-
 packages/oauth2/oauth2.el                          |   39 +-
 packages/other-frame-window/other-frame-window.el  |    8 +-
 packages/poker/poker.el                            |  399 +-
 packages/realgud/.gitignore                        |   27 +
 packages/realgud/.travis.yml                       |   16 +
 packages/realgud/AUTHORS                           |    1 +
 packages/realgud/COPYING                           |  674 +++
 packages/realgud/Cask                              |   10 +
 packages/realgud/ChangeLog                         | 1764 +++++++
 packages/realgud/INSTALL.md                        |    5 +
 packages/realgud/Makefile.am                       |   68 +
 .../test/fixtures/empty => realgud/NEWS}           |    0
 packages/realgud/README.md                         |  110 +
 packages/realgud/THANKS                            |   17 +
 packages/realgud/autogen.sh                        |    8 +
 packages/realgud/common.mk.in                      |   25 +
 packages/realgud/compute-lispdir.sh                |   46 +
 packages/realgud/configure.ac                      |   88 +
 .../fixtures/empty => realgud/cr_exceptions.txt}   |    0
 packages/realgud/elisp-comp                        |   93 +
 .../test/fixtures/empty => realgud/etc/.nosearch}  |    0
 packages/realgud/etc/realgud-logo-square.png       |  Bin 0 -> 8702 bytes
 packages/realgud/etc/realgud-logo.png              |  Bin 0 -> 10806 bytes
 packages/realgud/etc/realgud-logo.svg              |  106 +
 packages/realgud/etc/realgud.png                   |  Bin 0 -> 100651 bytes
 packages/realgud/etc/screenshot.el                 |  100 +
 packages/realgud/install-from-git.sh               |  102 +
 packages/realgud/realgud-recursive-autoloads.el    | 1300 ++++++
 packages/realgud/realgud.el                        |  209 +
 .../fixtures/empty => realgud/realgud/.nosearch}   |    0
 packages/realgud/realgud/Makefile.am               |    1 +
 packages/realgud/realgud/common/Makefile.am        |    4 +
 packages/realgud/realgud/common/attach.el          |   68 +
 packages/realgud/realgud/common/backtrace-mode.el  |  118 +
 packages/realgud/realgud/common/backtrack-mode.el  |  115 +
 packages/realgud/realgud/common/bp-image-data.el   |  378 ++
 packages/realgud/realgud/common/bp.el              |  231 +
 packages/realgud/realgud/common/buffer/Makefile.am |    3 +
 .../realgud/realgud/common/buffer/backtrace.el     |  480 ++
 packages/realgud/realgud/common/buffer/command.el  |  397 ++
 packages/realgud/realgud/common/buffer/helper.el   |  181 +
 packages/realgud/realgud/common/buffer/info.el     |   64 +
 packages/realgud/realgud/common/buffer/source.el   |  208 +
 packages/realgud/realgud/common/cmds.el            |  429 ++
 packages/realgud/realgud/common/core.el            |  330 ++
 .../realgud/common/custom.el}                      |   24 +-
 packages/realgud/realgud/common/eval.el            |  101 +
 packages/realgud/realgud/common/file.el            |  138 +
 packages/realgud/realgud/common/follow.el          |   50 +
 packages/realgud/realgud/common/fringe-utils.py    |   37 +
 packages/realgud/realgud/common/fringe.el          |  233 +
 packages/realgud/realgud/common/helper.el          |  108 +
 packages/realgud/realgud/common/init.el            |   45 +
 packages/realgud/realgud/common/key.el             |  146 +
 packages/realgud/realgud/common/lang.el            |  111 +
 packages/realgud/realgud/common/loc.el             |  187 +
 packages/realgud/realgud/common/lochist.el         |  146 +
 packages/realgud/realgud/common/menu.el            |  183 +
 packages/realgud/realgud/common/regexp.el          |   76 +
 packages/realgud/realgud/common/reset.el           |   58 +
 packages/realgud/realgud/common/run.el             |  205 +
 packages/realgud/realgud/common/send.el            |  266 ++
 packages/realgud/realgud/common/shortkey.el        |  221 +
 packages/realgud/realgud/common/track-mode.el      |  239 +
 packages/realgud/realgud/common/track.el           |  807 ++++
 packages/realgud/realgud/common/utils.el           |   46 +
 packages/realgud/realgud/common/window.el          |  180 +
 packages/realgud/realgud/debugger/Makefile.am      |    8 +
 .../realgud/realgud/debugger/bashdb/Makefile.am    |    1 +
 packages/realgud/realgud/debugger/bashdb/bashdb.el |   82 +
 packages/realgud/realgud/debugger/bashdb/core.el   |  197 +
 packages/realgud/realgud/debugger/bashdb/init.el   |  109 +
 .../realgud/realgud/debugger/bashdb/track-mode.el  |   73 +
 packages/realgud/realgud/debugger/common.mk        |    3 +
 packages/realgud/realgud/debugger/gdb/Makefile.am  |    1 +
 packages/realgud/realgud/debugger/gdb/core.el      |  223 +
 packages/realgud/realgud/debugger/gdb/gdb.el       |  141 +
 packages/realgud/realgud/debugger/gdb/init.el      |  143 +
 .../realgud/realgud/debugger/gdb/track-mode.el     |   74 +
 packages/realgud/realgud/debugger/gub/Makefile.am  |    1 +
 packages/realgud/realgud/debugger/gub/core.el      |  181 +
 packages/realgud/realgud/debugger/gub/gub.el       |   86 +
 packages/realgud/realgud/debugger/gub/init.el      |  206 +
 .../realgud/realgud/debugger/gub/track-mode.el     |   85 +
 packages/realgud/realgud/debugger/ipdb/Makefile.am |    1 +
 packages/realgud/realgud/debugger/ipdb/core.el     |  255 +
 packages/realgud/realgud/debugger/ipdb/init.el     |  133 +
 packages/realgud/realgud/debugger/ipdb/ipdb.el     |  122 +
 .../realgud/realgud/debugger/ipdb/track-mode.el    |   77 +
 packages/realgud/realgud/debugger/jdb/Makefile.am  |    1 +
 packages/realgud/realgud/debugger/jdb/README       |    2 +
 .../realgud/realgud/debugger/jdb/backtrack-mode.el |   78 +
 packages/realgud/realgud/debugger/jdb/core.el      |  192 +
 packages/realgud/realgud/debugger/jdb/file.el      |  241 +
 packages/realgud/realgud/debugger/jdb/init.el      |  226 +
 packages/realgud/realgud/debugger/jdb/jdb.el       |  104 +
 .../realgud/realgud/debugger/jdb/track-mode.el     |   89 +
 .../realgud/realgud/debugger/kshdb/Makefile.am     |    1 +
 packages/realgud/realgud/debugger/kshdb/core.el    |  175 +
 packages/realgud/realgud/debugger/kshdb/init.el    |  125 +
 packages/realgud/realgud/debugger/kshdb/kshdb.el   |   70 +
 .../realgud/realgud/debugger/kshdb/track-mode.el   |   72 +
 .../realgud/realgud/debugger/nodejs/Makefile.am    |    1 +
 packages/realgud/realgud/debugger/nodejs/core.el   |  166 +
 packages/realgud/realgud/debugger/nodejs/init.el   |  167 +
 packages/realgud/realgud/debugger/nodejs/nodejs.el |   82 +
 .../realgud/realgud/debugger/nodejs/track-mode.el  |   87 +
 packages/realgud/realgud/debugger/pdb/Makefile.am  |    1 +
 packages/realgud/realgud/debugger/pdb/core.el      |  207 +
 packages/realgud/realgud/debugger/pdb/init.el      |  133 +
 packages/realgud/realgud/debugger/pdb/pdb.el       |  108 +
 .../realgud/realgud/debugger/pdb/track-mode.el     |   73 +
 .../realgud/realgud/debugger/perldb/Makefile.am    |    1 +
 packages/realgud/realgud/debugger/perldb/core.el   |  151 +
 packages/realgud/realgud/debugger/perldb/init.el   |  145 +
 packages/realgud/realgud/debugger/perldb/perldb.el |   71 +
 .../realgud/realgud/debugger/perldb/track-mode.el  |   79 +
 .../realgud/realgud/debugger/rdebug/Makefile.am    |    1 +
 packages/realgud/realgud/debugger/rdebug/core.el   |  171 +
 packages/realgud/realgud/debugger/rdebug/init.el   |  143 +
 packages/realgud/realgud/debugger/rdebug/rdebug.el |  123 +
 .../realgud/realgud/debugger/rdebug/track-mode.el  |   70 +
 .../realgud/realgud/debugger/remake/Makefile.am    |    1 +
 packages/realgud/realgud/debugger/remake/core.el   |  259 ++
 packages/realgud/realgud/debugger/remake/init.el   |  154 +
 packages/realgud/realgud/debugger/remake/remake.el |   89 +
 .../realgud/realgud/debugger/remake/track-mode.el  |   69 +
 .../realgud/realgud/debugger/trepan.pl/Makefile.am |    1 +
 .../realgud/debugger/trepan.pl/backtrack-mode.el   |   73 +
 .../realgud/realgud/debugger/trepan.pl/core.el     |  182 +
 .../realgud/realgud/debugger/trepan.pl/init.el     |  280 ++
 .../realgud/debugger/trepan.pl/track-mode.el       |   81 +
 .../realgud/realgud/debugger/trepan.pl/trepanpl.el |   73 +
 .../realgud/realgud/debugger/trepan/Makefile.am    |    1 +
 .../realgud/debugger/trepan/backtrack-mode.el      |   80 +
 packages/realgud/realgud/debugger/trepan/core.el   |  242 +
 packages/realgud/realgud/debugger/trepan/init.el   |  230 +
 .../realgud/realgud/debugger/trepan/track-mode.el  |   94 +
 packages/realgud/realgud/debugger/trepan/trepan.el |   71 +
 .../realgud/realgud/debugger/trepan2/Makefile.am   |    1 +
 packages/realgud/realgud/debugger/trepan2/core.el  |  241 +
 packages/realgud/realgud/debugger/trepan2/init.el  |  110 +
 .../realgud/realgud/debugger/trepan2/track-mode.el |   77 +
 .../realgud/realgud/debugger/trepan2/trepan2.el    |   75 +
 .../realgud/realgud/debugger/trepan3k/Makefile.am  |    1 +
 packages/realgud/realgud/debugger/trepan3k/core.el |  187 +
 packages/realgud/realgud/debugger/trepan3k/init.el |  116 +
 .../realgud/debugger/trepan3k/track-mode.el        |   77 +
 .../realgud/realgud/debugger/trepan3k/trepan3k.el  |   73 +
 .../realgud/realgud/debugger/trepanjs/Makefile.am  |    1 +
 .../realgud/debugger/trepanjs/backtrack-mode.el    |   80 +
 packages/realgud/realgud/debugger/trepanjs/core.el |  167 +
 packages/realgud/realgud/debugger/trepanjs/init.el |  162 +
 .../realgud/debugger/trepanjs/track-mode.el        |   87 +
 .../realgud/realgud/debugger/trepanjs/trepanjs.el  |   84 +
 .../realgud/realgud/debugger/zshdb/Makefile.am     |    1 +
 packages/realgud/realgud/debugger/zshdb/core.el    |  191 +
 packages/realgud/realgud/debugger/zshdb/init.el    |  105 +
 .../realgud/realgud/debugger/zshdb/track-mode.el   |   69 +
 packages/realgud/realgud/debugger/zshdb/zshdb.el   |   88 +
 packages/realgud/realgud/lang/Makefile.am          |    5 +
 packages/realgud/realgud/lang/js.el                |   52 +
 packages/realgud/realgud/lang/perl.el              |   60 +
 packages/realgud/realgud/lang/posix-shell.el       |  150 +
 packages/realgud/realgud/lang/python.el            |  176 +
 packages/realgud/realgud/lang/ruby.el              |  131 +
 packages/realgud/test/.gitignore                   |    5 +
 .../test/fixtures/empty => realgud/test/.nosearch} |    0
 packages/realgud/test/HelloWorld.java              |    6 +
 packages/{loc-changes => realgud}/test/Makefile.am |   16 +-
 packages/realgud/test/bt-helper.el                 |   47 +
 packages/realgud/test/gcd.js                       |   45 +
 packages/realgud/test/gcd.pl                       |   21 +
 packages/realgud/test/gcd.py                       |   41 +
 packages/realgud/test/gcd.rb                       |   19 +
 packages/realgud/test/gcd.sh                       |   25 +
 packages/realgud/test/gdb/bar.sh                   |    2 +
 .../test/fixtures/empty => realgud/test/gdb/baz}   |    0
 .../test/fixtures/empty => realgud/test/gdb/baz.c} |    0
 .../test/fixtures/empty => realgud/test/gdb/foo}   |    0
 .../test/fixtures/empty => realgud/test/gdb/foo.c} |    0
 packages/realgud/test/gdb/test2/bar.sh             |    2 +
 .../empty => realgud/test/gdb/test2/baz.c}         |    0
 packages/realgud/test/make-check-filter.rb         |   24 +
 packages/realgud/test/node_modules/gcd.js/gcd.js   |   47 +
 .../realgud/test/node_modules/gcd.js/package.json  |   12 +
 packages/realgud/test/regexp-helper.el             |   50 +
 packages/realgud/test/test-bashdb.el               |   60 +
 packages/realgud/test/test-bp.el                   |   59 +
 packages/realgud/test/test-bt-pdb.el               |   45 +
 packages/realgud/test/test-bt-rdebug.el            |   47 +
 packages/realgud/test/test-bt-trepan.el            |   49 +
 packages/realgud/test/test-bt-trepan2.el           |   43 +
 packages/realgud/test/test-bt-trepan3k.el          |   43 +
 packages/realgud/test/test-bt-zshdb.el             |   38 +
 packages/realgud/test/test-buf-bt.el               |   27 +
 packages/realgud/test/test-buf-cmd.el              |   57 +
 packages/realgud/test/test-common-helper.el        |   30 +
 packages/realgud/test/test-core.el                 |   98 +
 packages/realgud/test/test-file.el                 |  128 +
 packages/realgud/test/test-gdb-core.el             |   66 +
 packages/realgud/test/test-gdb.el                  |   68 +
 packages/realgud/test/test-gub-core.el             |   22 +
 packages/realgud/test/test-ipdb.el                 |   40 +
 packages/realgud/test/test-jdb.el                  |   18 +
 packages/realgud/test/test-lang.el                 |   65 +
 packages/realgud/test/test-loc-regexp-gub.el       |   63 +
 packages/realgud/test/test-loc-regexp-nodejs.el    |  115 +
 packages/realgud/test/test-loc-regexp-trepan.el    |   83 +
 packages/realgud/test/test-loc-regexp-trepanpl.el  |  128 +
 packages/realgud/test/test-loc.el                  |   63 +
 packages/realgud/test/test-lochist.el              |  114 +
 packages/realgud/test/test-nodejs.el               |   37 +
 packages/realgud/test/test-pdb.el                  |   39 +
 packages/realgud/test/test-perldb.el               |   26 +
 packages/realgud/test/test-rdebug.el               |   45 +
 packages/realgud/test/test-realgud.el              |   31 +
 packages/realgud/test/test-regexp-bashdb.el        |  126 +
 packages/realgud/test/test-regexp-gdb.el           |  112 +
 packages/realgud/test/test-regexp-gub.el           |   65 +
 packages/realgud/test/test-regexp-ipdb.el          |  108 +
 packages/realgud/test/test-regexp-jdb.el           |   78 +
 packages/realgud/test/test-regexp-nodejs.el        |   74 +
 packages/realgud/test/test-regexp-pdb.el           |  107 +
 packages/realgud/test/test-regexp-perldb.el        |  207 +
 packages/realgud/test/test-regexp-rdebug.el        |   50 +
 packages/realgud/test/test-regexp-remake.el        |   69 +
 packages/realgud/test/test-regexp-ruby.el          |   43 +
 packages/realgud/test/test-regexp-trepan.el        |  124 +
 packages/realgud/test/test-regexp-trepan2.el       |  167 +
 packages/realgud/test/test-regexp-trepan3k.el      |  167 +
 packages/realgud/test/test-regexp-trepanjs.el      |   94 +
 packages/realgud/test/test-regexp-trepanpl.el      |  115 +
 packages/realgud/test/test-regexp-zshdb.el         |  118 +
 packages/realgud/test/test-regexp.el               |   79 +
 packages/realgud/test/test-remake-core.el          |   38 +
 packages/realgud/test/test-remake.el               |   37 +
 packages/realgud/test/test-send.el                 |   61 +
 packages/realgud/test/test-shortkey.el             |   40 +
 packages/realgud/test/test-srcbuf.el               |   72 +
 packages/realgud/test/test-track-mode.el           |   66 +
 packages/realgud/test/test-track.el                |  121 +
 packages/realgud/test/test-trepan2.el              |   45 +
 packages/realgud/test/test-trepan3k.el             |   37 +
 packages/realgud/test/test-trepanpl.el             |   50 +
 packages/realgud/test/test-utils.el                |   49 +
 packages/realgud/test/test-zshdb.el                |   60 +
 packages/rich-minority/rich-minority.el            |    4 +-
 packages/rnc-mode/rnc-mode.el                      |    1 +
 packages/scroll-restore/scroll-restore.el          |    6 +-
 packages/sed-mode/sed-mode.el                      |  140 +
 packages/seq/seq-24.el                             |  464 ++
 packages/seq/seq-25.el                             |  498 ++
 packages/seq/seq.el                                |  445 +-
 packages/seq/tests/seq-tests.el                    |   30 +-
 packages/shen-mode/inf-shen.el                     |    4 +-
 packages/sisu-mode/sisu-mode.el                    |  562 ++-
 packages/sm-c-mode/sm-c-mode.el                    |   12 +-
 packages/smart-yank/smart-yank.el                  |  192 +
 packages/sml-mode/sml-mode.el                      |   45 +-
 packages/sotlisp/sotlisp.el                        |   51 +-
 packages/spinner/spinner.el                        |   11 +-
 packages/stream/stream.el                          |  157 +-
 packages/stream/tests/stream-tests.el              |  103 +-
 packages/svg-clock/svg-clock.el                    |    6 +-
 packages/swiper/Makefile                           |   16 -
 packages/swiper/README.md                          |   51 -
 packages/swiper/counsel.el                         | 1301 ------
 packages/swiper/doc/ivy.org                        |  476 --
 packages/swiper/doc/ivy.texi                       |  591 ---
 packages/swiper/doc/style.css                      |  107 -
 packages/systemd/systemctl.el                      |  317 ++
 packages/systemd/systemd-codegen.el                |  258 +
 packages/systemd/systemd-mode.el                   |  200 +
 packages/systemd/systemd.el                        | 4802 +++++++++++++++++++
 packages/temp-buffer-browse/temp-buffer-browse.el  |   37 +-
 packages/test-simple/Carton                        |    4 -
 packages/test-simple/Cask                          |    4 +
 packages/test-simple/Makefile.am                   |    2 +-
 packages/test-simple/README.md                     |   15 +
 packages/test-simple/THANKS                        |    1 +
 .../example/{test-gcd.el => gcd-tests.el}          |    3 +-
 packages/test-simple/test-simple.el                |   86 +-
 packages/test-simple/test/test-basic.el            |    2 +-
 packages/timerfunctions/timerfunctions.el          |   10 +-
 packages/tiny/tiny-test.el                         |    2 +-
 packages/tiny/tiny.el                              |    6 +-
 packages/tramp-theme/README                        |   11 +
 packages/tramp-theme/tramp-theme.el                |  168 +
 packages/transcribe/transcribe.el                  |  342 +-
 packages/trie/trie.el                              |   10 +-
 packages/url-http-ntlm/url-http-ntlm.el            |  316 ++
 packages/validate/validate.el                      |  210 +
 packages/wcheck-mode/wcheck-mode.el                |   14 +-
 packages/web-server/examples/010-current-buffer.el |    4 +-
 packages/web-server/examples/011-org-agenda.el     |    4 +-
 .../web-server/examples/015-auto-mode-server.el    |    8 +-
 packages/web-server/web-server.el                  |    6 +-
 packages/websocket/websocket-functional-test.el    |   68 +-
 packages/websocket/websocket.el                    |   49 +-
 packages/wisi/NEWS                                 |    4 +
 packages/wisi/README                               |    2 +-
 packages/wisi/wisi-compile.el                      |   14 +-
 packages/wisi/wisi-parse.el                        |   14 +-
 packages/wisi/wisi.el                              |    6 +-
 packages/yasnippet/.gitmodules                     |    2 +-
 packages/yasnippet/.travis.yml                     |   36 +-
 packages/yasnippet/NEWS                            |  277 ++
 packages/yasnippet/README.mdown                    |    4 +-
 packages/yasnippet/Rakefile                        |   11 +-
 packages/yasnippet/doc/snippet-development.org     |   70 +-
 packages/yasnippet/doc/snippet-expansion.org       |   13 +
 packages/yasnippet/doc/snippet-organization.org    |    8 +-
 packages/yasnippet/doc/stylesheets/manual.css      |   33 +
 packages/yasnippet/doc/yas-doc-helper.el           |    3 +-
 packages/yasnippet/yasnippet-tests.el              |  122 +-
 packages/yasnippet/yasnippet.el                    |  719 +--
 packages/ztree/ztree-diff-model.el                 |   14 +-
 packages/ztree/ztree-diff.el                       |   10 +-
 packages/ztree/ztree-dir.el                        |   14 +-
 packages/ztree/ztree-util.el                       |    4 +-
 packages/ztree/ztree-view.el                       |   16 +-
 580 files changed, 59047 insertions(+), 13113 deletions(-)

diff --git a/.gitignore b/.gitignore
index 43c9d2b..7f7e600 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,23 +9,25 @@ core
 packages/*/*-autoloads.el
 packages/*/*-pkg.el
 
-# External packages with their own .git tree.
-packages/auctex
-packages/chess
+# External packages with their own .git tree [autogenerated].
+packages/auctex/
+packages/chess/
 packages/dash/
-packages/dismal
-packages/ergoemacs-mode
-packages/exwm
-packages/ntlm
+packages/dismal/
+packages/ergoemacs-mode/
+packages/exwm/
+packages/hyperbole/
+packages/let-alist/
+packages/ntlm/
 packages/omn-mode/
-packages/pabbrev
-packages/python
-packages/rudel
-packages/soap-client
-packages/w3
-packages/xelb
+packages/pabbrev/
+packages/python/
+packages/rudel/
+packages/soap-client/
+packages/w3/
+packages/xelb/
 
 # Testing file
 /archive
 *.log
-*.buildlog
\ No newline at end of file
+*.buildlog
diff --git a/GNUmakefile b/GNUmakefile
index d23d523..7d6d100 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -8,7 +8,7 @@ SITE_DIR=site
 
 .PHONY: archive-tmp changelogs process-archive archive-full org-fetch clean 
all do-it
 
-all: all-in-place
+all: all-in-place .gitignore
 
 CR_EXCEPTIONS=copyright_exceptions
 .PHONY: check_copyrights
@@ -81,6 +81,10 @@ archive-full: archive-tmp org-fetch
        #mkdir -p archive/admin
        #cp admin/* archive/admin/
 
+.gitignore: externals-list
+       $(EMACS) -l $(CURDIR)/admin/archive-contents.el \
+                --eval '(archive-gitignore-externals "$<" "$@")'
+
 # FIXME: Turn it into an `external', which will require adding the notion of
 # "snapshot" packages.
 org-fetch: archive-tmp
diff --git a/README b/README
index 7c5cd36..57d9ca9 100644
--- a/README
+++ b/README
@@ -37,7 +37,7 @@ release the new code.
 ** To add a package: (submission, submit)
 
 Adding a basic package is very simple. There are thorough
-instructional, but the gist is that you:
+instructions below, but the gist of it is that you:
 
 1. Notify address@hidden
 2. Place all files inside `packages/<pkg-name>/'.
diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index f3b4db8..7af9b3c 100755
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -1,6 +1,6 @@
 ;;; archive-contents.el --- Auto-generate an Emacs Lisp package archive.  -*- 
lexical-binding:t -*-
 
-;; Copyright (C) 2011-2015  Free Software Foundation, Inc
+;; Copyright (C) 2011-2016  Free Software Foundation, Inc
 
 ;; Author: Stefan Monnier <address@hidden>
 
@@ -21,7 +21,7 @@
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 (require 'lisp-mnt)
 (require 'package)
 (require 'pcase)
@@ -36,8 +36,8 @@
   (when vers
     (let ((l (version-to-list vers)))
       ;; Signal an error for things like "1.02" which is parsed as "1.2".
-      (assert (equal vers (package-version-join l)) nil
-              "Unsupported version syntax %S" vers)
+      (cl-assert (equal vers (package-version-join l)) nil
+                 "Unsupported version syntax %S" vers)
       l)))
 
 (defun archive--convert-require (elt)
@@ -585,6 +585,14 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
              packages)
     (archive--html-make-index archive-contents)))
 
+(defun archive--pull (dirname)
+  (let ((default-directory (file-name-as-directory
+                            (expand-file-name dirname))))
+    (with-temp-buffer
+      (message "Running git pull in %S" default-directory)
+      (call-process "git" nil t nil "pull")
+      (message "Updated %s:\n%s" dirname (buffer-string)))))
+
 ;;; Maintain external packages.
 
 (defconst archive--elpa-git-url "git://git.sv.gnu.org/emacs/elpa")
@@ -603,10 +611,8 @@ Return non-nil if there's an \"emacs\" repository present."
     (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))))
+      (archive--pull emacs-repo-root)
+      t)))
 
 (defun archive--find-non-trivial-file (dir)
   (catch 'found-important-file
@@ -627,7 +633,13 @@ 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))
+       ((file-symlink-p dir)
+        ;; There are normally no such thing, but the user may elect to
+        ;; add symlinks to other projects.  If so, update them, as if they
+        ;; were "externals".
+        (when (file-directory-p (expand-file-name ".git" dir))
+          (archive--pull dir)))
+       ((or (not (file-directory-p dir)) )
         ;; We only add/remove plain directories in elpa/packages (not
         ;; symlinks).
         nil)
@@ -666,7 +678,7 @@ If WITH-CORE is non-nil, it means we manage :core packages 
as well."
            (let* ((branch (concat "externals/" name))
                   (output
                    (with-temp-buffer
-                     ;; FIXME: Use git-new-workdir!
+                     ;; FIXME: Use `git worktree'!
                      (call-process "git" nil t nil "clone"
                                    "--reference" ".." "--single-branch"
                                    "--branch" branch
@@ -675,13 +687,7 @@ If WITH-CORE is non-nil, it means we manage :core packages 
as well."
              (message "Cloning branch %s:\n%s" name output)))
           ((not (file-directory-p (concat name "/.git")))
            (message "%s is in the way of an external, please remove!" name))
-          (t
-           (let ((default-directory (file-name-as-directory
-                                     (expand-file-name name))))
-             (with-temp-buffer
-               (message "Running git pull in %S" default-directory)
-               (call-process "git" nil t nil "pull")
-               (message "Updated %s:%s" name (buffer-string))))))))
+          (t (archive--pull name)))))
 
 (defun archive--core-package-empty-dest-p (dest)
   "Return non-nil if DEST is an empty variant."
@@ -784,5 +790,29 @@ If WITH-CORE is non-nil, it means we manage :core packages 
as well."
           (_ (message "Unknown external package kind `%S' for %s"
                       kind name)))))))
 
+;;; Manage .gitignore
+
+(defun archive-gitignore-externals (elf gf)
+  (let* ((el (read (find-file-noselect elf)))
+         (exts (delq nil
+                     (mapcar (lambda (x)
+                               (if (eq :external (nth 1 x)) (car x)))
+                             el)))
+         (core (delq nil
+                     (mapcar (lambda (x)
+                               (if (eq :core (nth 1 x)) (car x)))
+                             el))))
+    (with-current-buffer (find-file-noselect gf)
+      (goto-char (point-min))
+      (when (re-search-forward
+             "#.*External.*git.*\n\\(packages/[^*/\n]+/?\n\\)+"
+             nil 'move)
+        (replace-match ""))
+      (insert "# External packages with their own .git tree [autogenerated].\n"
+              (mapconcat (lambda (p) (format "packages/%s/\n" p))
+                         (sort (append exts core) #'string<)
+                         ""))
+      (save-buffer))))
+      
 (provide 'archive-contents)
 ;;; archive-contents.el ends here
diff --git a/copyright_exceptions b/copyright_exceptions
index 45857d0..563cab3 100644
--- a/copyright_exceptions
+++ b/copyright_exceptions
@@ -2,9 +2,11 @@
 ./ada-mode/ada-skel.el:    ("copyright_license"
 ./ada-mode/ada-skel.el:  "--  Copyright (C) " (format-time-string "%Y ") 
user-full-name " All Rights Reserved.\n"
 ./ada-mode/ada-skel.el:  "--  Copyright (C) " (format-time-string "%Y ") 
user-full-name " All Rights Reserved.\n"
+./ada-mode/ada-skel.el:  "--  Copyright (C) " (format-time-string "%Y ") 
user-full-name " All Rights Reserved.\n"
 ./ada-mode/ada-skel.el:  "Example copyright/license skeleton, with automatic 
year and owner, GPLv3."
 ./ada-mode/ada-skel.el:  "Example copyright/license skeleton, with automatic 
year and owner."
 ./ada-mode/ada-skel.el:  "Insert a file header comment, with automatic 
copyright year and prompt for copyright owner/license.
+./ada-mode/ada-skel.el:  "Modified GPLv3 copyright/license skeleton, with 
automatic year and owner."
 ./ada-mode/ada-skel.el:  "{copyright_license}\n"
 ./ada-mode/ada-stmt.el
 ./ada-mode/ada-xref.el
@@ -60,9 +62,11 @@
 ./auctex/style/virtex.el
 ./auctex/tex-fold.el:    ("(C)" ("copyright"))
 ./auctex/tex-info.el:   '("copyright" nil)
+./debbugs/debbugs-gnu.el:        (insert "  Copyright-paperwork-exempt: yes"))
 ./ergoemacs-mode/ergoemacs-advices.el:                         emacs-copyright
 ./ergoemacs-mode/ergoemacs-themes.el:                 ,(lambda () 
emacs-copyright)
 ./gnugo/gnugo.el:    (CP "Copyright"       game  simpletext)
+./hyperbole/hib-doc-id.el:;;  Copyright:        
 ./math-symbol-lists/math-symbol-lists.el:    "columnsep" "columnseprule" 
"columnwidth" "contentsline" "copyright"
 ./muse/htmlize-hack.el
 ./rudel/rudel-loaddefs.el
diff --git a/externals-list b/externals-list
index acf8dbb..00dffd4 100644
--- a/externals-list
+++ b/externals-list
@@ -37,12 +37,15 @@
  ;;FIXME:("cedet"      :external "??")
  ("chess"              :external nil) ;; Was 
https://github.com/jwiegley/emacs-chess.git
  ("coffee-mode"                :subtree 
"https://github.com/defunkt/coffee-mode";)
+ ("compact-docstrings"  :subtree 
"https://github.com/cpitclaudel/compact-docstrings";)
  ("company"            :subtree 
"https://github.com/company-mode/company-mode.git";)
  ("company-math"       :subtree "https://github.com/vspinu/company-math.git";)
  ("context-coloring"   :subtree 
"https://github.com/jacksonrayhamilton/context-coloring.git";)
  ("darkroom"            :subtree 
"https://github.com/capitaomorte/darkroom.git";)
  ("dash"                :external "https://github.com/magnars/dash.el.git";)
  ("dbus-codegen"       :subtree "https://github.com/ueno/dbus-codegen-el.git";)
+ ("delight"            :subtree "http://git.savannah.gnu.org/r/delight.git";)
+ ("diffview"            :subtree "https://github.com/mgalgs/diffview-mode.git";)
  ("diff-hl"            :subtree "https://github.com/dgutov/diff-hl.git";)
  ("dismal"             :external nil)
  ("dts-mode"           :subtree "https://github.com/bgamari/dts-mode.git";)
@@ -55,6 +58,7 @@
  ("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";)
+ ("hyperbole"           :external 
"http://git.savannah.gnu.org/r/hyperbole.git";)
  ("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")
@@ -82,4 +86,5 @@
  ("websocket"          :subtree 
"https://github.com/ahyatt/emacs-websocket.git";)
  ("xelb"               :external "https://github.com/ch11ng/xelb.git";)
  ("yasnippet"          :subtree 
"https://github.com/capitaomorte/yasnippet.git";)
+ ("ztree"              :subtree "https://github.com/fourier/ztree";)
  )
diff --git a/packages/ack/pcmpl-ack.el b/packages/ack/pcmpl-ack.el
index 315eb04..26ddb6e 100644
--- a/packages/ack/pcmpl-ack.el
+++ b/packages/ack/pcmpl-ack.el
@@ -112,7 +112,7 @@
 ;;;###autoload
 (defun pcomplete/ack ()
   "Completion for the `ack' command.
-Start an argument with '-' to complete short options and '--' for
+Start an argument with `-' to complete short options and `--' for
 long options."
   ;; No space after =
   (while t
diff --git a/packages/ada-mode/NEWS b/packages/ada-mode/NEWS
index 960584e..90a0ad4 100644
--- a/packages/ada-mode/NEWS
+++ b/packages/ada-mode/NEWS
@@ -7,6 +7,32 @@ 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.2.0
+
+** GNAT 2016 drops support for 'gnat find'; users must use gpr_query.
+
+** ada-xref-tool now defaults to gpr_query if gpr_query executable is
+   found in PATH.
+
+** source code for compiling gpr_query is installed with the Gnu ELPA
+   package; instructions for compiling and installing it are in
+   ada-mode.info.
+
+** better handling of cross-compile targets.
+
+** Allow trailing label in a sequence_of_statements:
+   loop
+      ...
+      goto Next;
+   <<Next>>
+   end loop;
+
+** Handle package aspects.
+
+** tested with GNAT GPL 2016.
+
+** several bug fixes
+
 * Ada mode 5.1.9
 20 Jan 2016
 
diff --git a/packages/ada-mode/README b/packages/ada-mode/README
old mode 100644
new mode 100755
index df7a48c..03ccda9
--- a/packages/ada-mode/README
+++ b/packages/ada-mode/README
@@ -1,4 +1,4 @@
-Emacs Ada mode version 5.1.9
+Emacs Ada mode version 5.2.0
 
 Ada mode requires Emacs 24.2 or greater
 
diff --git a/packages/ada-mode/ada-build.el b/packages/ada-mode/ada-build.el
index 0553454..6b28042 100644
--- a/packages/ada-mode/ada-build.el
+++ b/packages/ada-mode/ada-build.el
@@ -1,7 +1,7 @@
 ;; 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.
+;; Copyright (C) 1994, 1995, 1997 - 2016  Free Software Foundation, Inc.
 ;;
 ;; Author: Stephen Leake <address@hidden>
 ;; Maintainer: Stephen Leake <address@hidden>
@@ -60,14 +60,14 @@
 (defcustom ada-build-check-cmd
   (concat "${cross_prefix}gnatmake -u -c -gnatc ${gnatmake_opt} 
${full_current} -cargs -I${src_dir} ${comp_opt}")
   "Default command to syntax check a single file.
-Overridden by project variable 'check_cmd'."
+Overridden by project variable `check_cmd'."
   :type 'string)
 
 (defcustom ada-build-make-cmd
   (concat "${cross_prefix}gnatmake -P${gpr_file} -o ${main} ${main} 
${gnatmake_opt} "
          "-cargs -I${src_dir} ${comp_opt} -bargs ${bind_opt} -largs 
${link_opt}")
-  "Default command to compile the application.
-Overridden by project variable 'make_cmd'."
+  "Default command and link to compile the application.
+Overridden by project variable `make_cmd'."
   :type 'string)
 
 ;; FIXME: make this more intelligent to work on Windows cmd shell?
@@ -75,7 +75,7 @@ Overridden by project variable 'make_cmd'."
 ;; runtime.
 (defcustom ada-build-run-cmd "./${main}"
   "Default command to run the application, in a spawned shell.
-Overridden by project variable 'run_cmd'."
+Overridden by project variable `run_cmd'."
   :type 'string)
 
 ;;;; code
@@ -85,11 +85,11 @@ Overridden by project variable 'run_cmd'."
 ${var} is a project variable or environment variable, $var an
 environment variable.
 
-A prefix may be specified with the format '-<prefix>${var}'; then
+A prefix may be specified with the format `-<prefix>${var}'; then
 the value is expanded with the prefix prepended. If the value is
 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'.
+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 current
 buffer file name including the directory and extension."
@@ -153,7 +153,7 @@ buffer file name including the directory and extension."
 (defun ada-build-find-select-prj-file ()
   "Search for a project file in the current directory, parse and select it.
 The file must have the same basename as the project variable
-'main' or the current buffer if 'main' is nil, and extension from
+`main' or the current buffer if `main' is nil, and extension from
 `ada-prj-file-extensions'.  Returns non-nil if a file is
 selected, nil otherwise."
   (let* ((base-file-name (file-name-base
diff --git a/packages/ada-mode/ada-fix-error.el 
b/packages/ada-mode/ada-fix-error.el
index 6ec0fd7..130bb3e 100644
--- a/packages/ada-mode/ada-fix-error.el
+++ b/packages/ada-mode/ada-fix-error.el
@@ -31,7 +31,7 @@
 (require 'compile)
 
 (defcustom ada-fix-sort-context-clause t
-  "*If non-nil, sort context clause when inserting 'with'"
+  "*If non-nil, sort context clause when inserting `with'"
   :type 'boolean
   :group 'ada)
 
@@ -155,7 +155,7 @@ extend a with_clause to include CHILD-NAME  .       "
       )))
 
 (defun ada-fix-add-use-type (type)
-  "Insert 'use type' clause for TYPE at start of declarative part for current 
construct."
+  "Insert `use type' clause for TYPE at start of declarative part for current 
construct."
   (ada-goto-declarative-region-start); leaves point after 'is'
   (newline)
   (insert "use type " type ";")
@@ -164,7 +164,7 @@ extend a with_clause to include CHILD-NAME  .       "
   (indent-according-to-mode))
 
 (defun ada-fix-add-use (package)
-  "Insert 'use' clause for PACKAGE at start of declarative part for current 
construct."
+  "Insert `use' clause for PACKAGE at start of declarative part for current 
construct."
   (ada-goto-declarative-region-start); leaves point after 'is'
   (newline)
   (insert "use " package ";")
diff --git a/packages/ada-mode/ada-gnat-compile.el 
b/packages/ada-mode/ada-gnat-compile.el
old mode 100644
new mode 100755
index ee4b12a..c0d2156
--- a/packages/ada-mode/ada-gnat-compile.el
+++ b/packages/ada-mode/ada-gnat-compile.el
@@ -616,7 +616,7 @@ Prompt user if more than one."
   )
 
 (defun ada-gnat-compile ()
-  "Set Ada mode global vars to use 'gnat' for compiling."
+  "Set Ada mode global vars to use `gnat' for compiling."
   (add-to-list 'ada-prj-file-ext-extra     "gpr")
   (add-to-list 'ada-prj-parser-alist       '("gpr" . gnat-parse-gpr))
   (add-to-list 'ada-select-prj-compiler    '(gnat  . 
ada-gnat-compile-select-prj))
diff --git a/packages/ada-mode/ada-gnat-xref.el 
b/packages/ada-mode/ada-gnat-xref.el
old mode 100644
new mode 100755
index 53553b3..58719a5
--- a/packages/ada-mode/ada-gnat-xref.el
+++ b/packages/ada-mode/ada-gnat-xref.el
@@ -5,7 +5,7 @@
 ;;
 ;; GNAT is provided by AdaCore; see http://libre.adacore.com/
 ;;
-;;; 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>
@@ -44,7 +44,7 @@
 (defconst ada-gnat-file-line-col-regexp "\\(.*\\):\\([0-9]+\\):\\([0-9]+\\)")
 
 (defun ada-gnat-xref-other (identifier file line col)
-  "For `ada-xref-other-function', using 'gnat find', which is Ada-specific."
+  "For `ada-xref-other-function', using `gnat find', which is Ada-specific."
 
   (when (eq ?\" (aref identifier 0))
     ;; gnat find wants the quotes on operators, but the column is after the 
first quote.
@@ -93,7 +93,7 @@
     result))
 
 (defun ada-gnat-xref-parents (identifier file line col)
-  "For `ada-xref-parents-function', using 'gnat find', which is Ada-specific."
+  "For `ada-xref-parents-function', using `gnat find', which is Ada-specific."
 
   (let* ((arg (format "%s:%s:%d:%d" identifier file line col))
         (switches (list
@@ -145,7 +145,9 @@
   ;; is asynchronous, and automatically runs the compilation error
   ;; filter.
 
-  (let* ((cmd (format "gnat find -a -r %s:%s:%d:%d" identifier file line col)))
+  (let* ((cmd (format "%sgnat find -a -r %s:%s:%d:%d"
+                      (or (ada-prj-get 'target) "")
+                      identifier file line col)))
 
     (with-current-buffer (gnat-run-buffer); for default-directory
       (let ((compilation-environment (ada-prj-get 'proc_env))
@@ -208,9 +210,5 @@
 (ada-gnat-xref)
 
 (provide 'ada-gnat-xref)
-(provide 'ada-xref-tool)
-
-(unless (default-value 'ada-xref-tool)
-  (set-default 'ada-xref-tool 'gnat))
 
 ;; end of file
diff --git a/packages/ada-mode/ada-grammar-wy.el 
b/packages/ada-mode/ada-grammar-wy.el
old mode 100644
new mode 100755
index 10cd525..be0c5f7
--- a/packages/ada-mode/ada-grammar-wy.el
+++ b/packages/ada-mode/ada-grammar-wy.el
@@ -891,6 +891,9 @@
         (wisi-statement-action [1 block-start 2 block-middle 4 statement-end])
         (wisi-containing-action 2 3)
         (wisi-motion-action [1 2]))))
+      (goto_label
+       ((LESS_LESS IDENTIFIER GREATER_GREATER )
+        (wisi-face-action [2 font-lock-constant-face])))
       (handled_sequence_of_statements
        ((sequence_of_statements_opt EXCEPTION exception_handler_list_opt )
         (progn
@@ -1020,8 +1023,7 @@
        ((iterator_specification )))
       (label_opt
        (())
-       ((LESS_LESS IDENTIFIER GREATER_GREATER )
-        (wisi-face-action [2 font-lock-constant-face]))
+       ((goto_label ))
        ((IDENTIFIER COLON )))
       (library_item
        ((PRIVATE library_unit_declaration ))
@@ -1177,7 +1179,7 @@
         (wisi-statement-action [1 block-start 3 name 5 block-middle 7 
block-middle
         9 block-end 11 statement-end])
         (wisi-containing-action 1 3)
-        (wisi-containing-action 3 4)
+        (wisi-containing-action 1 4)
         (wisi-containing-action 5 6)
         (wisi-containing-action 7 8)
         (wisi-containing-action 9 10)
@@ -1187,7 +1189,7 @@
         (progn
         (wisi-statement-action [1 block-start 3 name 5 block-middle 7 
block-end 9 statement-end])
         (wisi-containing-action 1 3)
-        (wisi-containing-action 3 4)
+        (wisi-containing-action 1 4)
         (wisi-containing-action 5 6)
         (wisi-containing-action 7 8)
         (wisi-motion-action [1 5 7])
@@ -1214,7 +1216,7 @@
         (progn
         (wisi-statement-action [1 statement-start 2 name 4 block-start 6 
block-middle 8 block-end])
         (wisi-containing-action 1 2)
-        (wisi-containing-action 2 3)
+        (wisi-containing-action 1 3)
         (wisi-containing-action 4 5)
         (wisi-containing-action 6 7)
         (wisi-motion-action [1 4 6 8])
@@ -1223,7 +1225,7 @@
         (progn
         (wisi-statement-action [1 statement-start 2 name 4 block-start 6 
block-end])
         (wisi-containing-action 1 2)
-        (wisi-containing-action 2 3)
+        (wisi-containing-action 1 3)
         (wisi-containing-action 4 5)
         (wisi-motion-action [1 4 6])
         (wisi-face-action [2 font-lock-function-name-face 7 
font-lock-function-name-face]))))
@@ -1545,7 +1547,8 @@
        ((asynchronous_select )))
       (sequence_of_statements
        ((statement ))
-       ((sequence_of_statements statement )))
+       ((sequence_of_statements statement ))
+       ((sequence_of_statements goto_label )))
       (sequence_of_statements_opt
        (())
        ((sequence_of_statements )))
@@ -1927,7 +1930,7 @@
       ((default . error) (IS .  180))
       ((default . error) (DOT .  90) (TICK .  91) (IS . 
(aspect_specification_opt . 0)) (WITH .  109) (LEFT_PAREN .  107))
       ((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) (OR . (pragma . 1)) (THEN . (pragma . 1)) (WHEN . 
(pragma . 1)) (EXCEPTION . (pragma . 1)) (LESS_LESS . (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)) (STRI [...]
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
       ((default . error) (COMMA .  120) (SEMICOLON .  142))
       ((default . error) (DOT .  90) (TICK .  91) (IS . ( 106 
(aspect_specification_opt . 0))) (WITH .  109) (LEFT_PAREN .  107))
@@ -2216,7 +2219,7 @@
       ((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 .  628))
@@ -2233,7 +2236,7 @@
       ((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) (WHEN . (pragma . 0)) (THEN . (pragma . 0)) (OR . 
(pragma . 0)) (ELSIF . (pragma . 0)) (ELSE . (pragma . 0)) (CHARACTER_LITERAL . 
(pragma . 0)) (STRING_LITERAL . (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 . (pragma . 
0)) (CASE . (pragma  [...]
       ((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 .  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))
@@ -2348,43 +2351,43 @@
       ((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 .  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 .  812) (RIGHT_PAREN . 
(parameter_specification . 3)) (SEMICOLON . (parameter_specification . 3)))
+      ((default . error) (COLON_EQUAL .  814) (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) (RETURN .  89) (LEFT_PAREN .  810))
+      ((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 .  810))
       ((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) (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 .  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) (SEMICOLON .  807))
+      ((default . error) (DOT .  90) (TICK .  91) (WITH . 
(formal_package_actual_part . 1)) (SEMICOLON . (formal_package_actual_part . 
1)) (LEFT_PAREN .  805))
+      ((default . error) (SEMICOLON .  804))
       ((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 .  801))
+      ((default . error) (SEMICOLON .  803))
       ((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 .  799) (WITH . (interface_type_definition . 5)) 
(SEMICOLON . (interface_type_definition . 5)))
+      ((default . error) (AND .  801) (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 .  798))
-      ((default . error) (AND .  797) (WITH . (interface_type_definition . 7)) 
(SEMICOLON . (interface_type_definition . 7)))
+      ((default . error) (SEMICOLON .  800))
+      ((default . error) (AND .  799) (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 .  796) (WITH . (interface_type_definition . 6)) 
(SEMICOLON . (interface_type_definition . 6)))
+      ((default . error) (AND .  798) (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 .  795) (WITH . (interface_type_definition . 4)) 
(SEMICOLON . (interface_type_definition . 4)))
-      ((default . error) (RIGHT_PAREN .  794))
+      ((default . error) (AND .  797) (WITH . (interface_type_definition . 4)) 
(SEMICOLON . (interface_type_definition . 4)))
+      ((default . error) (RIGHT_PAREN .  796))
       ((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 .  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) (SEMICOLON . (formal_type_definition . 6)) (WITH . 
(formal_type_definition . 6)) (DIGITS .  795))
+      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  736) 
(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 .  787) (RECORD . 
(abstract_tagged_limited_opt . 2)) (NULL . (abstract_tagged_limited_opt . 2)) 
(PRIVATE . (abstract_tagged_limited_opt . 2)))
+      ((default . error) (LIMITED .  789) (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 .  786))
+      ((default . error) (NULL .  788))
       ((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 .  785))
+      ((default . error) (SEMICOLON . (discriminant_specification_opt . 4)) 
(RIGHT_PAREN . (discriminant_specification_opt . 4)) (COLON_EQUAL .  787))
       ((default . error) (DOT .  90) (TICK .  91) (LEFT_PAREN .  107))
-      ((default . error) (SEMICOLON . (discriminant_specification_opt . 2)) 
(RIGHT_PAREN . (discriminant_specification_opt . 2)) (COLON_EQUAL .  784))
+      ((default . error) (SEMICOLON . (discriminant_specification_opt . 2)) 
(RIGHT_PAREN . (discriminant_specification_opt . 2)) (COLON_EQUAL .  786))
       ((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 [...]
@@ -2398,31 +2401,31 @@
       ((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 .  148) (RECORD .  778))
-      ((default . error) (AT .  777))
+      ((default . error) (LEFT_PAREN .  148) (RECORD .  780))
+      ((default . error) (AT .  779))
       ((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) (DOT .  90) (TICK .  91) (IS . ( 777 
(aspect_specification_opt . 0))) (WITH .  109) (LEFT_PAREN .  107))
+      ((default . error) (IS .  776))
       ((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) (IS . ( 774 (aspect_specification_opt . 0))) (WITH .  
109))
+      ((default . error) (NOT .  731) (IDENTIFIER .  48) (CHARACTER_LITERAL .  
50) (STRING_LITERAL .  49))
+      ((default . error) (SEMICOLON .  772) (IS .  771))
       ((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) (IS . ( 769 (aspect_specification_opt . 0))) (WITH .  
109))
+      ((default . error) (SEMICOLON .  768) (IS .  767))
+      ((default . error) (RENAMES .  766))
+      ((default . error) (RENAMES .  765))
       ((default . error) (ACCESS .  242) (IDENTIFIER .  48) (CHARACTER_LITERAL 
.  50) (STRING_LITERAL .  49))
-      ((default . error) (END .  761))
+      ((default . error) (END .  763))
       ((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) (COLON_EQUAL .  762))
+      ((default . error) (SEMICOLON .  761))
+      ((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 .  759))
+      ((default . error) (SEPARATE .  758) (ABSTRACT .  757))
+      ((default . error) (NULL .  756))
+      ((default . error) (LEFT_PAREN .  754))
+      ((default . error) (WITH . (parameter_profile_opt . 0)) (SEMICOLON . 
(parameter_profile_opt . 0)) (LEFT_PAREN .  752))
+      ((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 [...]
@@ -2431,140 +2434,142 @@
       ((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) (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) (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 .  747))
+      ((default . error) (ELSE .  743) (RIGHT_PAREN . (if_expression . 3)) 
(COMMA . (if_expression . 3)) (ELSIF .  744))
       ((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) (REVERSE .  737) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) 
(ABS .  144) (NOT .  736) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) 
(LEFT_PAREN .  148))
+      ((default . error) (REVERSE .  734) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
+      ((default . error) (NOT .  731) (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) (RIGHT_PAREN . (case_expression . 0)) (COMMA . ( 729 
(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 .  724))
+      ((default . error) (IDENTIFIER .  726))
       ((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) (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) (UNTIL .  720) (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 .  718))
       ((default . error) (LOOP . (iterator_specification_opt . 0)) (IDENTIFIER 
.  408))
-      ((default . error) (IDENTIFIER .  713))
+      ((default . error) (IDENTIFIER .  715))
       ((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) (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 .  712))
+      ((default . error) (SEMICOLON .  710) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((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) (SEMICOLON .  704) (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 .  705) (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 .  693) (TERMINATE .  692) (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 [...]
-      ((default . error) (OR . (compound_statement . 3)) (THEN . 
(compound_statement . 3)) (WHEN . (compound_statement . 3)) (EXCEPTION . 
(compound_statement . 3)) (END . (compound_statement . 3)) (ACCEPT . 
(compound_statement . 3)) (ABORT . (compound_statement . 3)) (BEGIN . 
(compound_statement . 3)) (CASE . (compound_statement . 3)) (DECLARE . 
(compound_statement . 3)) (DELAY . (compound_statement . 3)) (EXIT . 
(compound_statement . 3)) (FOR . (compound_statement . 3)) (GOTO . (compoun 
[...]
-      ((default . error) (OR . (compound_statement . 1)) (THEN . 
(compound_statement . 1)) (WHEN . (compound_statement . 1)) (EXCEPTION . 
(compound_statement . 1)) (END . (compound_statement . 1)) (ACCEPT . 
(compound_statement . 1)) (ABORT . (compound_statement . 1)) (BEGIN . 
(compound_statement . 1)) (CASE . (compound_statement . 1)) (DECLARE . 
(compound_statement . 1)) (DELAY . (compound_statement . 1)) (EXIT . 
(compound_statement . 1)) (FOR . (compound_statement . 1)) (GOTO . (compoun 
[...]
-      ((default . error) (OR . (select_statement . 2)) (THEN . 
(select_statement . 2)) (WHEN . (select_statement . 2)) (EXCEPTION . 
(select_statement . 2)) (END . (select_statement . 2)) (ACCEPT . 
(select_statement . 2)) (ABORT . (select_statement . 2)) (BEGIN . 
(select_statement . 2)) (CASE . (select_statement . 2)) (DECLARE . 
(select_statement . 2)) (DELAY . (select_statement . 2)) (EXIT . 
(select_statement . 2)) (FOR . (select_statement . 2)) (GOTO . 
(select_statement . 2)) (IF . (sel [...]
-      ((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 .  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 .  685))
+      ((default . error) (IDENTIFIER .  690))
+      ((default . error) (COLON .  689))
+      ((default . error) (OR . (compound_statement . 5)) (THEN . 
(compound_statement . 5)) (WHEN . (compound_statement . 5)) (EXCEPTION . 
(compound_statement . 5)) (END . (compound_statement . 5)) (LESS_LESS . 
(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 . (co [...]
+      ((default . error) (OR . (simple_statement . 1)) (THEN . 
(simple_statement . 1)) (WHEN . (simple_statement . 1)) (EXCEPTION . 
(simple_statement . 1)) (END . (simple_statement . 1)) (LESS_LESS . 
(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 [...]
+      ((default . error) (OR . (select_statement . 3)) (THEN . 
(select_statement . 3)) (WHEN . (select_statement . 3)) (EXCEPTION . 
(select_statement . 3)) (END . (select_statement . 3)) (LESS_LESS . 
(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 [...]
+      ((default . error) (OR . (compound_statement . 3)) (THEN . 
(compound_statement . 3)) (WHEN . (compound_statement . 3)) (EXCEPTION . 
(compound_statement . 3)) (END . (compound_statement . 3)) (LESS_LESS . 
(compound_statement . 3)) (ACCEPT . (compound_statement . 3)) (ABORT . 
(compound_statement . 3)) (BEGIN . (compound_statement . 3)) (CASE . 
(compound_statement . 3)) (DECLARE . (compound_statement . 3)) (DELAY . 
(compound_statement . 3)) (EXIT . (compound_statement . 3)) (FOR . (co [...]
+      ((default . error) (OR . (compound_statement . 1)) (THEN . 
(compound_statement . 1)) (WHEN . (compound_statement . 1)) (EXCEPTION . 
(compound_statement . 1)) (END . (compound_statement . 1)) (LESS_LESS . 
(compound_statement . 1)) (ACCEPT . (compound_statement . 1)) (ABORT . 
(compound_statement . 1)) (BEGIN . (compound_statement . 1)) (CASE . 
(compound_statement . 1)) (DECLARE . (compound_statement . 1)) (DELAY . 
(compound_statement . 1)) (EXIT . (compound_statement . 1)) (FOR . (co [...]
+      ((default . error) (OR . (select_statement . 2)) (THEN . 
(select_statement . 2)) (WHEN . (select_statement . 2)) (EXCEPTION . 
(select_statement . 2)) (END . (select_statement . 2)) (LESS_LESS . 
(select_statement . 2)) (ACCEPT . (select_statement . 2)) (ABORT . 
(select_statement . 2)) (BEGIN . (select_statement . 2)) (CASE . 
(select_statement . 2)) (DECLARE . (select_statement . 2)) (DELAY . 
(select_statement . 2)) (EXIT . (select_statement . 2)) (FOR . 
(select_statement . 2)) (GOTO [...]
+      ((default . error) (OR . (simple_statement . 7)) (THEN . 
(simple_statement . 7)) (WHEN . (simple_statement . 7)) (EXCEPTION . 
(simple_statement . 7)) (END . (simple_statement . 7)) (LESS_LESS . 
(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 [...]
+      ((default . error) (OR . (simple_statement . 2)) (THEN . 
(simple_statement . 2)) (WHEN . (simple_statement . 2)) (EXCEPTION . 
(simple_statement . 2)) (END . (simple_statement . 2)) (LESS_LESS . 
(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 [...]
+      ((default . error) (OR . (compound_statement . 4)) (THEN . 
(compound_statement . 4)) (WHEN . (compound_statement . 4)) (EXCEPTION . 
(compound_statement . 4)) (END . (compound_statement . 4)) (LESS_LESS . 
(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 . (co [...]
+      ((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) (END .  688))
+      ((default . error) (OR . (compound_statement . 0)) (THEN . 
(compound_statement . 0)) (WHEN . (compound_statement . 0)) (EXCEPTION . 
(compound_statement . 0)) (END . (compound_statement . 0)) (LESS_LESS . 
(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 . (co [...]
+      ((default . error) (LOOP .  687))
       ((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 .  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 .  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) (OR . (compound_statement . 2)) (THEN . 
(compound_statement . 2)) (WHEN . (compound_statement . 2)) (EXCEPTION . 
(compound_statement . 2)) (END . (compound_statement . 2)) (LESS_LESS . 
(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 . (co [...]
+      ((default . error) (DOT .  90) (SEMICOLON .  684) (TICK .  91) 
(COLON_EQUAL .  683) (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)) (LESS_LESS . 
(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_statemen [...]
+      ((default . error) (OR . (simple_statement . 4)) (THEN . 
(simple_statement . 4)) (WHEN . (simple_statement . 4)) (EXCEPTION . 
(simple_statement . 4)) (END . (simple_statement . 4)) (LESS_LESS . 
(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 [...]
+      ((default . error) (OR . (simple_statement . 9)) (THEN . 
(simple_statement . 9)) (WHEN . (simple_statement . 9)) (EXCEPTION . 
(simple_statement . 9)) (END . (simple_statement . 9)) (LESS_LESS . 
(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 [...]
+      ((default . error) (OR . (simple_statement . 6)) (THEN . 
(simple_statement . 6)) (WHEN . (simple_statement . 6)) (EXCEPTION . 
(simple_statement . 6)) (END . (simple_statement . 6)) (LESS_LESS . 
(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 [...]
+      ((default . error) (OR . (select_statement . 0)) (THEN . 
(select_statement . 0)) (WHEN . (select_statement . 0)) (EXCEPTION . 
(select_statement . 0)) (END . (select_statement . 0)) (LESS_LESS . 
(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 [...]
+      ((default . error) (OR . (compound_statement . 6)) (THEN . 
(compound_statement . 6)) (WHEN . (compound_statement . 6)) (EXCEPTION . 
(compound_statement . 6)) (END . (compound_statement . 6)) (LESS_LESS . 
(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 . (co [...]
+      ((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)) (LESS_LESS .  647) (ACCEPT . (label_opt . 0)) 
(BEGIN . (label_opt . 0)) (CASE . (label_opt . 0)) (DECLARE . (label_opt . 0)) 
(FOR . (label_opt . 0)) (IF . (label_opt . 0) [...]
+      ((default . error) (END . (handled_sequence_of_statements . 1)) 
(EXCEPTION .  680))
+      ((default . error) (OR . (simple_statement . 5)) (THEN . 
(simple_statement . 5)) (WHEN . (simple_statement . 5)) (EXCEPTION . 
(simple_statement . 5)) (END . (simple_statement . 5)) (LESS_LESS . 
(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 [...]
+      ((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)) (LESS_LESS 
. (sequence_of_statements . 0)) (ACCEPT . (sequence_of_statements . 0)) (ABORT 
. (sequence_of_statements . 0)) (BEGIN . (sequence_of_statements . 0)) (CASE . 
(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)) (LESS_LESS . 
(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 [...]
+      ((default . error) (SEMICOLON .  679))
       ((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 .  
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) (END . (exception_handler_list_opt . 0)) (WHEN .  
952))
+      ((default . error) (OR . (sequence_of_statements . 2)) (THEN . 
(sequence_of_statements . 2)) (WHEN . (sequence_of_statements . 2)) 
(CHARACTER_LITERAL . ((sequence_of_statements . 2) (label_opt . 1))) 
(STRING_LITERAL . ((sequence_of_statements . 2) (label_opt . 1))) (IDENTIFIER . 
((sequence_of_statements . 2) (label_opt . 1))) (WHILE . 
((sequence_of_statements . 2) (label_opt . 1))) (SELECT . 
((sequence_of_statements . 2) (label_opt . 1))) (RETURN . 
((sequence_of_statements . 2) (la [...]
+      ((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)) 
(WHILE . (sequence_of_statements . 1)) (SELECT . (sequence_of_statements . 1)) 
(RETURN . (sequence_of_statements . 1)) (REQUEUE . (sequence_of_statements . 
1)) (RAISE . (sequence_of_statements . 1)) (PRAGMA . (se [...]
       ((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) (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)) 
(WHILE . (procedure_call_statement . 0)) (SELECT . (procedure_call_statement . 
0)) (RETURN . (procedure_call_statement  [...]
+      ((default . error) (OR . (statement . 1)) (THEN . (statement . 1)) (WHEN 
. (statement . 1)) (EXCEPTION . (statement . 1)) (END . (statement . 1)) 
(LESS_LESS . (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)) (PRAG [...]
+      ((default . error) (OR . (statement . 0)) (THEN . (statement . 0)) (WHEN 
. (statement . 0)) (EXCEPTION . (statement . 0)) (END . (statement . 0)) 
(LESS_LESS . (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)) (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) (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 .  946))
+      ((default . error) (GREATER_GREATER .  948))
       ((default . error) (LOOP . (iteration_scheme . 0)))
-      ((default . error) (SEMICOLON .  945))
+      ((default . error) (SEMICOLON .  947))
       ((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) (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 .  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) (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 .  942) (OR .  943))
+      ((default . error) (DOT .  90) (SEMICOLON .  684) (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 .  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 .  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) (ELSE . (select_alternative_list_opt . 1)) (END . 
(select_alternative_list_opt . 1)) (OR .  939))
+      ((default . error) (ELSE .  937) (END .  938))
+      ((default . error) (THEN .  936))
+      ((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)) 
(WHILE . (simple_return_statement . 0)) (SELECT . (simple_return_statement . 
0)) (RETURN . (simple_return_statement . 0)) (REQU [...]
+      ((default . error) (COLON .  935) (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 .  934))
+      ((default . error) (DO . (extended_return_object_declaration_opt . 1)) 
(SEMICOLON .  933))
+      ((default . error) (DO .  932))
+      ((default . error) (WITH .  930) (DOT .  90) (TICK .  91) (SEMICOLON .  
931) (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)) 
(WHILE . (raise_statement . 0)) (SELECT . (raise_statement . 0)) (RETURN . 
(raise_statement . 0)) (REQUEUE . (raise_statement . 0)) (RAISE . 
(raise_statement . 0)) (PRAGMA . (raise_statement  [...]
       ((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 .  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 .  925))
-      ((default . error) (THEN .  924))
-      ((default . error) (SEMICOLON .  923))
+      ((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)) (WHILE . (simple_statement . 0)) (SELECT . 
(simple_statement . 0)) (RETURN . (simple_statement . 0)) (REQUEUE . 
(simple_statement . 0)) (RAISE . (simple_statement . 0)) (PRAGMA . (sim [...]
+      ((default . error) (END .  927))
+      ((default . error) (THEN .  926))
+      ((default . error) (SEMICOLON .  925))
       ((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 .  921) (SEMICOLON .  922))
+      ((default . error) (WHEN .  923) (SEMICOLON .  924))
       ((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) (SEMICOLON .  921))
+      ((default . error) (BEGIN .  920))
+      ((default . error) (IS .  919))
+      ((default . error) (END .  918))
+      ((default . error) (DOT .  90) (TICK .  91) (SEMICOLON .  917) 
(LEFT_PAREN .  107))
+      ((default . error) (SEMICOLON . (actual_parameter_part_opt . 0)) (DO . 
(actual_parameter_part_opt . 0)) (LEFT_PAREN . ( 914 (actual_parameter_part_opt 
. 0))))
+      ((default . error) (IS .  913))
+      ((default . error) (IS .  912))
       ((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) (BAR .  286) (EQUAL_GREATER .  910))
+      ((default . error) (NULL .  909))
+      ((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 .  904) (LEFT_PAREN . 
 829))
+      ((default . error) (OF .  908))
       ((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) (NUMERIC_LITERAL .  155) (NULL .  906) (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 .  736) 
(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 . (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) (COMMA . (if_expression . 1)) (RIGHT_PAREN . 
(if_expression . 1)) (ELSE .  900) (ELSIF .  744))
       ((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) (RIGHT_PAREN .  899))
       ((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 .  898))
+      ((default . error) (END .  897))
+      ((default . error) (IDENTIFIER .  235) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  736) 
(NUMERIC_LITERAL .  155) (NULL .  151) (NEW .  149) (LEFT_PAREN .  148))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
       ((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))
@@ -2572,83 +2577,83 @@
       ((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 .  498) (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 .  885))
       ((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 .  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) (DOT .  90) (TICK .  91) (RENAMES .  882) (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 .  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) (PRIVATE . (abstract_tagged_limited_opt . 0)) (NULL . 
(abstract_tagged_limited_opt . 0)) (RECORD . (abstract_tagged_limited_opt . 0)) 
(TAGGED .  869) (RANGE .  867) (MOD .  865) (DIGITS .  862) (DELTA .  861) 
(TASK .  509) (PROTECTED .  505) (SYNCHRONIZED .  507) (INTERFACE .  501) 
(ARRAY .  498) (LEFT_PAREN .  863) (ACCESS . (null_exclusion_opt . 0)) (NOT .  
232) (NEW . ((abstract_limited_opt . 0) (abstract_limited_synchronized_opt . 
0))) (LIMITED .  864) (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) (SEPARATE .  859))
       ((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 .  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) (NEW .  855) (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) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
-      ((default . error) (SEPARATE .  851))
+      ((default . error) (SEPARATE .  853))
       ((default . error) (IS . (aspect_specification_opt . 0)) (WITH .  109))
-      ((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) (NEW .  849) (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 .  848))
+      ((default . error) (SEMICOLON .  847))
       ((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) (IDENTIFIER . (mod_clause_opt . 0)) (AT .  844))
+      ((default . error) (SEMICOLON .  843))
+      ((default . error) (SEMICOLON .  842))
       ((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 .  839))
+      ((default . error) (RIGHT_PAREN .  841))
       ((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 .  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) (ACCESS . (null_exclusion_opt . 1)) (IDENTIFIER .  
837) (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) (RIGHT_PAREN . (discrete_subtype_definition_list . 
0)) (COMMA . (discrete_subtype_definition_list . 0)))
-      ((default . error) (COMMA .  834) (RIGHT_PAREN .  833))
+      ((default . error) (COMMA .  836) (RIGHT_PAREN .  835))
       ((default . error) (RIGHT_PAREN . (index_subtype_definition_list . 0)) 
(COMMA . (index_subtype_definition_list . 0)))
-      ((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) (COMMA .  834) (RIGHT_PAREN .  833))
+      ((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 .  830) (LEFT_PAREN .  829))
+      ((default . error) (BOX .  828))
       ((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 . 
 819) (LEFT_PAREN .  107))
+      ((default . error) (DOT .  90) (TICK .  91) (WITH . 
(and_interface_list_opt . 0)) (SEMICOLON . (and_interface_list_opt . 0)) (AND . 
 821) (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 .  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) (BOX .  820) (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 .  815))
+      ((default . error) (SEMICOLON .  817))
       ((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 .  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) (COLON_EQUAL .  1086) (DOT .  90) (TICK .  91) 
(RIGHT_PAREN . (parameter_specification . 1)) (SEMICOLON . 
(parameter_specification . 1)) (LEFT_PAREN .  107))
       ((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 .  1083))
-      ((default . error) (SEMICOLON .  1082))
-      ((default . error) (RIGHT_PAREN .  1081))
+      ((default . error) (SEMICOLON .  1085))
+      ((default . error) (SEMICOLON .  1084))
+      ((default . error) (RIGHT_PAREN .  1083))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((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) (WITH . ( 1081 (formal_derived_type_definition . 1))) 
(SEMICOLON . (formal_derived_type_definition . 1)))
+      ((default . error) (AND .  1080) (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 .  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) (AND .  1080) (WITH . (interface_type_definition . 
3)) (SEMICOLON . (interface_type_definition . 3)))
+      ((default . error) (AND .  1080) (WITH . (interface_type_definition . 
2)) (SEMICOLON . (interface_type_definition . 2)))
+      ((default . error) (AND .  1080) (WITH . (interface_type_definition . 
0)) (SEMICOLON . (interface_type_definition . 0)))
       ((default . error) (SEMICOLON . (formal_type_definition . 7)) (WITH . 
(formal_type_definition . 7)))
-      ((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) (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 .  1077) (RAISE .  152) (NUMERIC_LITERAL .  155) (NULL .  151) (NEW . 
 149) (LEFT_PAREN .  148))
+      ((default . error) (BOX .  1076) (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) (OF .  1075))
       ((default . error) (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) (OF .  1072))
+      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  736) 
(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)))
@@ -2656,35 +2661,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 .  1068))
-      ((default . error) (IDENTIFIER .  1065))
-      ((default . error) (SEMICOLON .  1064))
+      ((default . error) (MOD .  1070))
+      ((default . error) (IDENTIFIER .  1067))
+      ((default . error) (SEMICOLON .  1066))
       ((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 .  1060) (PRIVATE .  1061))
-      ((default . error) (SEMICOLON .  1059))
-      ((default . error) (IS .  1058))
+      ((default . error) (END .  1062) (PRIVATE .  1063))
+      ((default . error) (SEMICOLON .  1061))
+      ((default . error) (IS .  1060))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
-      ((default . error) (SEMICOLON .  1056))
+      ((default . error) (SEMICOLON .  1058))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (END .  1053) (PRIVATE .  1054))
-      ((default . error) (SEMICOLON .  1052))
-      ((default . error) (SEMICOLON .  1051) (IS .  1050))
+      ((default . error) (END .  1055) (PRIVATE .  1056))
+      ((default . error) (SEMICOLON .  1054))
+      ((default . error) (SEMICOLON .  1053) (IS .  1052))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
-      ((default . error) (SYNCHRONIZED .  563) (TAGGED .  564) (NEW . 
((abstract_limited_opt . 3) (abstract_limited_synchronized_opt . 3))) (LIMITED 
.  1048))
+      ((default . error) (SYNCHRONIZED .  563) (TAGGED .  564) (NEW . 
((abstract_limited_opt . 3) (abstract_limited_synchronized_opt . 3))) (LIMITED 
.  1050))
       ((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) (IDENTIFIER .  1044) (CHARACTER_LITERAL .  1045))
       ((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) (RECORD .  1042))
       ((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) (END . (component_list_opt . 0)) (NULL .  1033) (CASE 
.  1032) (IDENTIFIER .  77) (FOR .  299))
+      ((default . error) (SEMICOLON .  1031) (PRIVATE . 
(abstract_tagged_limited_opt . 4)) (NULL . (abstract_tagged_limited_opt . 4)) 
(RECORD . (abstract_tagged_limited_opt . 4)) (LIMITED .  551))
+      ((default . error) (NEW .  1030))
+      ((default . error) (NEW .  1029))
+      ((default . error) (PRIVATE .  1027) (RECORD .  868) (NULL .  866))
       ((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)))
@@ -2696,130 +2701,130 @@
       ((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) (SEMICOLON .  1022))
+      ((default . error) (NULL .  1021))
+      ((default . error) (COLON_EQUAL .  1019) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109))
       ((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 .  1014))
+      ((default . error) (SEMICOLON .  1013))
       ((default . error) (SEMICOLON .  1012))
       ((default . error) (SEMICOLON .  1011))
-      ((default . error) (SEMICOLON .  1010))
-      ((default . error) (SEMICOLON .  1009))
-      ((default . error) (RIGHT_PAREN .  1008))
+      ((default . error) (RIGHT_PAREN .  1010))
+      ((default . error) (RIGHT_PAREN .  1009))
+      ((default . error) (SEMICOLON .  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) (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) (THEN .  1004))
       ((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) (REVERSE .  1001) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49))
       ((default . error) (IDENTIFIER .  48) (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) (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) (END . (protected_operation_item_list_opt . 0)) 
(ENTRY .  988) (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 .  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 .  
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) (DO . (parameter_profile_opt . 0)) (SEMICOLON . 
(parameter_profile_opt . 0)) (LEFT_PAREN .  810))
+      ((default . error) (OR . (simple_statement . 8)) (THEN . 
(simple_statement . 8)) (WHEN . (simple_statement . 8)) (EXCEPTION . 
(simple_statement . 8)) (END . (simple_statement . 8)) (LESS_LESS . 
(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 [...]
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
718))
+      ((default . error) (WHEN .  982))
+      ((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 .  978))
+      ((default . error) (SEMICOLON .  980))
       ((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 .  975))
+      ((default . error) (OR . (exit_statement . 1)) (THEN . (exit_statement . 
1)) (WHEN . (exit_statement . 1)) (EXCEPTION . (exit_statement . 1)) (END . 
(exit_statement . 1)) (LESS_LESS . (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 [...]
+      ((default . error) (OR . (simple_statement . 3)) (THEN . 
(simple_statement . 3)) (WHEN . (simple_statement . 3)) (EXCEPTION . 
(simple_statement . 3)) (END . (simple_statement . 3)) (LESS_LESS . 
(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 [...]
+      ((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 .  977))
       ((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 .  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) (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) (OR . (raise_statement . 2)) (THEN . (raise_statement 
. 2)) (WHEN . (raise_statement . 2)) (EXCEPTION . (raise_statement . 2)) (END . 
(raise_statement . 2)) (LESS_LESS . (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_stat [...]
+      ((default . error) (ABORT .  975))
+      ((default . error) (OR . (requeue_statement . 1)) (THEN . 
(requeue_statement . 1)) (WHEN . (requeue_statement . 1)) (EXCEPTION . 
(requeue_statement . 1)) (END . (requeue_statement . 1)) (LESS_LESS . 
(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_stateme [...]
+      ((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)) (LESS_LESS . (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)) (D [...]
+      ((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)) (LESS_LESS . (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_ [...]
       ((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) (ABORT .  972))
+      ((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 .  970))
+      ((default . error) (WHEN .  693) (TERMINATE .  692) (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) (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 .  963))
+      ((default . error) (EQUAL_GREATER .  965))
       ((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) (OR . (goto_label . 0)) (THEN . (goto_label . 0)) 
(WHEN . (goto_label . 0)) (LESS_LESS . (goto_label . 0)) (END . (goto_label . 
0)) (EXCEPTION . (goto_label . 0)) (ELSE . (goto_label . 0)) (ELSIF . 
(goto_label . 0)) (CHARACTER_LITERAL . (goto_label . 0)) (STRING_LITERAL . 
(goto_label . 0)) (IDENTIFIER . (goto_label . 0)) (REQUEUE . (goto_label . 0)) 
(RAISE . (goto_label . 0)) (PRAGMA . (goto_label . 0)) (NULL . (goto_label . 
0)) (GOTO . (goto_label . 0)) (EXIT .  [...]
+      ((default . error) (SEMICOLON .  964))
+      ((default . error) (END .  963))
       ((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) (OTHERS .  957) (IDENTIFIER .  958) 
(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 .  
950))
+      ((default . error) (END . (exception_handler_list_opt . 1)) (WHEN .  
952))
       ((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 .  1182) (EQUAL_GREATER . (name . 0)) (BAR . 
(name . 0)) (LEFT_PAREN . (name . 0)) (DOT . (name . 0)) (TICK . (name . 0)))
+      ((default . error) (COLON .  1184) (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 .  1180) (EQUAL_GREATER .  1181))
+      ((default . error) (BAR .  1182) (EQUAL_GREATER .  1183))
       ((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 .  1179))
+      ((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)) (WHILE . 
(assignment_statement . 0)) (SELECT . (assignment_statement . 0)) (RETURN . 
(assignment_statement . 0)) (REQUEUE . (assignment_statement . 0)) [...]
+      ((default . error) (LOOP .  1181))
       ((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 .  1176) (ACCEPT .  630) (DELAY .  635))
+      ((default . error) (TERMINATE .  1178) (ACCEPT .  630) (DELAY .  635))
+      ((default . error) (END .  1177))
+      ((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 .  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 .  1172))
-      ((default . error) (END .  1171))
-      ((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) (SEMICOLON .  1174))
+      ((default . error) (END .  1173))
+      ((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 .  759))
+      ((default . error) (END .  1170))
+      ((default . error) (SEMICOLON .  1169))
+      ((default . error) (SEMICOLON .  1168))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
718))
+      ((default . error) (ELSE .  1162) (END .  1164) (ELSIF .  1163))
+      ((default . error) (SEMICOLON .  1161))
       ((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 .  1158))
+      ((default . error) (END .  1160))
       ((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 .  1155) (WHEN .  980))
-      ((default . error) (SEMICOLON .  1154))
-      ((default . error) (DO .  1152) (SEMICOLON .  1153))
-      ((default . error) (BEGIN .  1151))
-      ((default . error) (IDENTIFIER .  1150))
+      ((default . error) (END .  1157) (WHEN .  982))
+      ((default . error) (SEMICOLON .  1156))
+      ((default . error) (DO .  1154) (SEMICOLON .  1155))
+      ((default . error) (BEGIN .  1153))
+      ((default . error) (IDENTIFIER .  1152))
       ((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 .  986) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(FOR .  299))
-      ((default . error) (END .  1147))
+      ((default . error) (END . (protected_operation_item_list_opt . 1)) 
(ENTRY .  988) (NOT .  4) (OVERRIDING .  5) (FUNCTION . 
(overriding_indicator_opt . 2)) (PROCEDURE . (overriding_indicator_opt . 2)) 
(FOR .  299))
+      ((default . error) (END .  1149))
       ((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) (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) (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 .  904) (LEFT_PAREN . 
 829))
       ((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) (SEMICOLON .  1145))
+      ((default . error) (WITH . (parameter_profile_opt . 0)) (SEMICOLON . 
(parameter_profile_opt . 0)) (LEFT_PAREN .  810))
       ((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 . 0)) (SEMICOLON . 
(paren_expression . 0)))
       ((default . error) (WITH . (paren_expression . 1)) (SEMICOLON . 
(paren_expression . 1)))
@@ -2828,73 +2833,73 @@
       ((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 .  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 .  1142))
+      ((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 .  1136))
+      ((default . error) (SEMICOLON .  1135))
       ((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 .  729) (IDENTIFIER .  48) (CHARACTER_LITERAL .  
50) (STRING_LITERAL .  49))
+      ((default . error) (NOT .  731) (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 .  1125) 
(STRING_LITERAL .  1126))
-      ((default . error) (SEMICOLON .  1124))
+      ((default . error) (IS . (direct_name_opt . 0)) (IDENTIFIER .  1127) 
(STRING_LITERAL .  1128))
+      ((default . error) (SEMICOLON .  1126))
       ((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 .  1030) (IDENTIFIER .  77) (FOR .  299))
-      ((default . error) (END .  1121))
-      ((default . error) (COMMA .  96) (COLON .  1120))
+      ((default . error) (WHEN . (component_list_opt . 1)) (END . 
(component_list_opt . 1)) (CASE .  1032) (IDENTIFIER .  77) (FOR .  299))
+      ((default . error) (END .  1123))
+      ((default . error) (COMMA .  96) (COLON .  1122))
       ((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 .  1119))
+      ((default . error) (DOT_DOT .  1121))
       ((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 .  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) (COMMA .  1120) (RIGHT_PAREN .  1119))
+      ((default . error) (WITH . (real_range_specification_opt . 0)) 
(SEMICOLON . (real_range_specification_opt . 0)) (RANGE .  1116))
+      ((default . error) (DIGITS .  1115) (WITH . 
(real_range_specification_opt . 0)) (SEMICOLON . (real_range_specification_opt 
. 0)) (RANGE .  1116))
       ((default . error) (NEW . ((abstract_limited_synchronized_opt . 1) 
(abstract_limited_opt . 1))))
-      ((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) (SEMICOLON .  1114))
+      ((default . error) (NEW .  1112) (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 .  
716))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
718))
       ((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) (AND .  1080) (WITH .  1109))
       ((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 .  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) (SEMICOLON .  1108))
+      ((default . error) (NEW .  1106) (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 .  
716))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
718))
       ((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) (AND .  1080) (WITH .  1103))
+      ((default . error) (SEMICOLON .  1102))
       ((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 .  1099))
+      ((default . error) (AT .  1101))
       ((default . error) (END . (component_clause_list . 0)) (IDENTIFIER . 
(component_clause_list . 0)))
-      ((default . error) (END .  1097) (IDENTIFIER .  1065))
+      ((default . error) (END .  1099) (IDENTIFIER .  1067))
       ((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 .  1090) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (ACCESS . (null_exclusion_opt 
. 0)) (NOT .  883))
+      ((default . error) (ALIASED .  1092) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (ACCESS . (null_exclusion_opt 
. 0)) (NOT .  885))
       ((default . error) (RIGHT_PAREN . (index_subtype_definition_list . 1)) 
(COMMA . (index_subtype_definition_list . 1)))
-      ((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) (DOT .  90) (RANGE .  1096) (TICK .  91) (LEFT_PAREN 
.  107))
+      ((default . error) (ALIASED .  1092) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (ACCESS . (null_exclusion_opt 
. 0)) (NOT .  885))
       ((default . error) (COMMA . (index_subtype_definition . 0)) (RIGHT_PAREN 
. (index_subtype_definition . 0)))
-      ((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) (NUMERIC_LITERAL .  155) (NULL .  1091) (NEW .  149) 
(IDENTIFIER .  48) (CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (LEFT_PAREN 
.  148))
+      ((default . error) (COMMA .  836) (RIGHT_PAREN .  1090))
       ((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 .  1086))
-      ((default . error) (AND .  1078) (WITH . (and_interface_list_opt . 1)) 
(SEMICOLON . (and_interface_list_opt . 1)))
+      ((default . error) (PRIVATE .  1088))
+      ((default . error) (AND .  1080) (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)))
@@ -2904,52 +2909,52 @@
       ((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)) (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) (ACCESS . (null_exclusion_opt . 0)) (NOT .  885) 
(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 .  1074))
+      ((default . error) (BOX .  1076))
       ((default . error) (WITH . (array_type_definition . 1)) (SEMICOLON . 
(array_type_definition . 1)) (COLON_EQUAL . (array_type_definition . 1)))
-      ((default . error) (SEMICOLON .  1240))
-      ((default . error) (RECORD .  1239))
+      ((default . error) (SEMICOLON .  1242))
+      ((default . error) (RECORD .  1241))
       ((default . error) (IDENTIFIER . (component_clause_list . 1)) (END . 
(component_clause_list . 1)))
       ((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 .  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) (END .  1238))
       ((default . error) (SEMICOLON . (protected_definition . 1)))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (SEMICOLON .  1234))
+      ((default . error) (SEMICOLON .  1236))
       ((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) (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) (END .  1234))
       ((default . error) (SEMICOLON . (task_definition . 1)))
       ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49))
-      ((default . error) (SEMICOLON .  1230))
+      ((default . error) (SEMICOLON .  1232))
       ((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 .  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 .  1042) (CHARACTER_LITERAL .  1043))
+      ((default . error) (IDENTIFIER .  1044) (CHARACTER_LITERAL .  1045))
       ((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) (ALIASED .  1092) (IDENTIFIER .  48) 
(CHARACTER_LITERAL .  50) (STRING_LITERAL .  49) (ACCESS . (null_exclusion_opt 
. 0)) (NOT .  885))
+      ((default . error) (RECORD .  1226))
       ((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 .  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) (IS .  1225))
+      ((default . error) (WITH . (and_interface_list_opt . 0)) (AND .  821))
+      ((default . error) (DOT .  90) (TICK .  91) (AND .  821) (WITH . 
((constraint_opt . 0) (and_interface_list_opt . 0))) (SEMICOLON . 
(constraint_opt . 0)) (RANGE .  904) (LEFT_PAREN .  829))
+      ((default . error) (SEMICOLON .  1220))
       ((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 .  1217))
+      ((default . error) (SEMICOLON .  1219))
       ((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 . [...]
@@ -2961,103 +2966,103 @@
       ((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) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
718))
       ((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 .  
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) (WHEN . (parameter_profile_opt . 0)) (LEFT_PAREN .  
1211))
+      ((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 .  1206))
+      ((default . error) (OR . (block_statement . 1)) (THEN . (block_statement 
. 1)) (WHEN . (block_statement . 1)) (EXCEPTION . (block_statement . 1)) (END . 
(block_statement . 1)) (LESS_LESS . (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_stat [...]
+      ((default . error) (CASE .  1208))
       ((default . error) (WHEN . (case_statement_alternative_list . 1)) (END . 
(case_statement_alternative_list . 1)))
-      ((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) (BAR .  286) (EQUAL_GREATER .  1207))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
718))
+      ((default . error) (OR . (exit_statement . 0)) (THEN . (exit_statement . 
0)) (WHEN . (exit_statement . 0)) (EXCEPTION . (exit_statement . 0)) (END . 
(exit_statement . 0)) (LESS_LESS . (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 [...]
+      ((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) (IF .  1203))
       ((default . error) (END . (elsif_statement_list . 0)) (ELSE . 
(elsif_statement_list . 0)) (ELSIF . (elsif_statement_list . 0)))
-      ((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 .  1196))
-      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (ACCESS . (null_exclusion_opt . 0)) (NOT .  883))
-      ((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 .  1190))
+      ((default . error) (END .  1201) (ELSE .  1200) (ELSIF .  1163))
+      ((default . error) (SEMICOLON .  1199))
+      ((default . error) (OR . (raise_statement . 1)) (THEN . (raise_statement 
. 1)) (WHEN . (raise_statement . 1)) (EXCEPTION . (raise_statement . 1)) (END . 
(raise_statement . 1)) (LESS_LESS . (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_stat [...]
+      ((default . error) (OR . (requeue_statement . 0)) (THEN . 
(requeue_statement . 0)) (WHEN . (requeue_statement . 0)) (EXCEPTION . 
(requeue_statement . 0)) (END . (requeue_statement . 0)) (LESS_LESS . 
(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_stateme [...]
+      ((default . error) (RETURN .  1198))
+      ((default . error) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (ACCESS . (null_exclusion_opt . 0)) (NOT .  885))
+      ((default . error) (END .  1194))
+      ((default . error) (SELECT .  1193))
+      ((default . error) (OR . (selective_accept . 1)) (THEN . 
(selective_accept . 1)) (WHEN . (selective_accept . 1)) (EXCEPTION . 
(selective_accept . 1)) (END . (selective_accept . 1)) (LESS_LESS . 
(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 [...]
+      ((default . error) (SELECT .  1192))
       ((default . error) (END . (delay_alternative . 0)) (OR . 
(delay_alternative . 0)) (ELSE . (delay_alternative . 0)))
-      ((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) (SELECT .  1191))
+      ((default . error) (SEMICOLON .  1190))
+      ((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 .  
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) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
718))
+      ((default . error) (OTHERS .  957) (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 .  957) (IDENTIFIER .  48) (CHARACTER_LITERAL 
.  50) (STRING_LITERAL .  49))
+      ((default . error) (BAR .  1182) (EQUAL_GREATER .  1286))
       ((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 .  1283))
+      ((default . error) (SEMICOLON .  1285))
       ((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 .  1284))
+      ((default . error) (SEMICOLON .  1283))
       ((default . error) (SEMICOLON .  1282))
-      ((default . error) (SEMICOLON .  1281))
-      ((default . error) (SEMICOLON .  1280))
-      ((default . error) (SELECT .  1279))
+      ((default . error) (SELECT .  1281))
       ((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 .  1278))
+      ((default . error) (DO . (extended_return_object_declaration . 1)) 
(SEMICOLON . (extended_return_object_declaration . 1)) (COLON_EQUAL .  1280))
       ((default . error) (DO . (return_subtype_indication . 0)) (SEMICOLON . 
(return_subtype_indication . 0)) (COLON_EQUAL . (return_subtype_indication . 
0)))
-      ((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 .  1275))
+      ((default . error) (SEMICOLON .  1279))
+      ((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)) 
(WHILE . (loop_statement . 1)) (SELECT . (loop_statement . 1)) (RETURN . 
(loop_statement . 1)) (REQUEUE . (loop_statement . 1)) (RAISE . (loop_statement 
. 1)) (PRAGMA . (loop_statement . 1)) (NULL .  [...]
+      ((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 .  1277))
       ((default . error) (ELSIF . (elsif_statement_list . 1)) (ELSE . 
(elsif_statement_list . 1)) (END . (elsif_statement_list . 1)))
-      ((default . error) (SEMICOLON .  1274))
-      ((default . error) (THEN .  1273))
-      ((default . error) (END .  1272))
+      ((default . error) (SEMICOLON .  1276))
+      ((default . error) (THEN .  1275))
+      ((default . error) (END .  1274))
+      ((default . error) (SEMICOLON .  1273))
+      ((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 .  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) (END .  1268))
-      ((default . error) (END .  1267))
-      ((default . error) (FOR .  1266) (IDENTIFIER .  77))
-      ((default . error) (WHEN .  1265))
+      ((default . error) (END .  1270))
+      ((default . error) (END .  1269))
+      ((default . error) (FOR .  1268) (IDENTIFIER .  77))
+      ((default . error) (WHEN .  1267))
       ((default . error) (WHEN . (entry_body_formal_part . 1)))
+      ((default . error) (SEMICOLON .  1266))
+      ((default . error) (SEMICOLON .  1265))
       ((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 .  1259))
+      ((default . error) (WITH .  1261))
       ((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 .  1258))
-      ((default . error) (WHEN .  1255))
+      ((default . error) (WITH .  1260))
+      ((default . error) (WHEN .  1257))
       ((default . error) (SEMICOLON . (record_definition . 0)) (WITH . 
(record_definition . 0)))
-      ((default . error) (COLON_EQUAL .  1253) (SEMICOLON . 
(aspect_specification_opt . 0)) (WITH .  109))
+      ((default . error) (COLON_EQUAL .  1255) (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 .  1252))
-      ((default . error) (WITH . (real_range_specification_opt . 0)) 
(SEMICOLON . (real_range_specification_opt . 0)) (RANGE .  1114))
+      ((default . error) (DOT_DOT .  1254))
+      ((default . error) (WITH . (real_range_specification_opt . 0)) 
(SEMICOLON . (real_range_specification_opt . 0)) (RANGE .  1116))
       ((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 .  1078) (WITH .  1250))
-      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
716))
-      ((default . error) (SEMICOLON .  1248))
+      ((default . error) (AND .  1080) (WITH .  1252))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
718))
+      ((default . error) (SEMICOLON .  1250))
       ((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 .  1078) (WITH .  1247))
-      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
716))
-      ((default . error) (SEMICOLON .  1245))
-      ((default . error) (RANGE .  1244))
+      ((default . error) (AND .  1080) (WITH .  1249))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
718))
+      ((default . error) (SEMICOLON .  1247))
+      ((default . error) (RANGE .  1246))
       ((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 .  902) (LEFT_PAREN .  827))
+      ((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 .  904) (LEFT_PAREN .  829))
       ((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)))
@@ -3068,87 +3073,87 @@
       ((default . error) (WITH . (type_definition . 5)) (SEMICOLON . 
(type_definition . 5)))
       ((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) (SEMICOLON .  1303))
       ((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 .  1300) (WHEN .  1257))
       ((default . error) (END . (variant_list . 0)) (WHEN . (variant_list . 
0)))
-      ((default . error) (PRIVATE .  1297))
-      ((default . error) (RECORD .  866) (NULL .  864))
+      ((default . error) (PRIVATE .  1299))
+      ((default . error) (RECORD .  868) (NULL .  866))
       ((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 .  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) (IDENTIFIER .  1296))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
718))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
718))
+      ((default . error) (OR . (case_statement . 0)) (THEN . (case_statement . 
0)) (WHEN . (case_statement . 0)) (EXCEPTION . (case_statement . 0)) (END . 
(case_statement . 0)) (LESS_LESS . (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 [...]
       ((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 .  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 .  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) (OR . (block_statement . 0)) (THEN . (block_statement 
. 0)) (WHEN . (block_statement . 0)) (EXCEPTION . (block_statement . 0)) (END . 
(block_statement . 0)) (LESS_LESS . (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_stat [...]
+      ((default . error) (IF .  1293))
+      ((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)) (LESS_LESS . (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 . [...]
+      ((default . error) (SEMICOLON .  1291))
+      ((default . error) (END .  1290))
+      ((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)) (LESS_LESS . (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)) (D [...]
       ((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) (SEMICOLON .  1288))
+      ((default . error) (OR . (selective_accept . 0)) (THEN . 
(selective_accept . 0)) (WHEN . (selective_accept . 0)) (EXCEPTION . 
(selective_accept . 0)) (END . (selective_accept . 0)) (LESS_LESS . 
(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 [...]
+      ((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)) (LESS_LESS 
. (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 .  [...]
+      ((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)) (LESS_LESS . 
(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 [...]
+      ((default . error) (OR . (loop_statement . 0)) (THEN . (loop_statement . 
0)) (WHEN . (loop_statement . 0)) (EXCEPTION . (loop_statement . 0)) (END . 
(loop_statement . 0)) (LESS_LESS . (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 [...]
+      ((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) (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)) (WHILE . 
(asynchronous_select . 0)) (SELECT . (asynchronous_select . 0)) (RETURN . 
(asynchronous_select . 0)) (REQUEUE . (asynchronous_select . 0)) (RAISE . (a 
[...]
       ((default . error) (DO . (extended_return_object_declaration . 0)) 
(SEMICOLON . (extended_return_object_declaration . 0)))
-      ((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) (IF .  1321))
+      ((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)) (WHILE . (if_statement . 
1)) (SELECT . (if_statement . 1)) (RETURN . (if_statement . 1)) (REQUEUE . 
(if_statement . 1)) (RAISE . (if_statement . 1)) (PRAGMA . (if_statement . 1)) 
(NULL . (if_statement . 1)) (LOOP .  [...]
       ((default . error) (ELSE . (elsif_statement_item . 0)) (ELSIF . 
(elsif_statement_item . 0)) (END . (elsif_statement_item . 0)))
+      ((default . error) (SEMICOLON .  1320))
+      ((default . error) (SEMICOLON .  1319))
       ((default . error) (SEMICOLON .  1318))
-      ((default . error) (SEMICOLON .  1317))
-      ((default . error) (SEMICOLON .  1316))
-      ((default . error) (IN .  1315))
-      ((default . error) (IS .  1314))
+      ((default . error) (IN .  1317))
+      ((default . error) (IS .  1316))
       ((default . error) (WITH . (derived_type_definition . 0)) (SEMICOLON . 
(derived_type_definition . 0)))
       ((default . error) (SEMICOLON . (aspect_specification_opt . 0)) (WITH .  
109))
-      ((default . error) (CASE .  1312))
+      ((default . error) (CASE .  1314))
       ((default . error) (WHEN . (variant_list . 1)) (END . (variant_list . 
1)))
-      ((default . error) (BAR .  286) (EQUAL_GREATER .  1311))
+      ((default . error) (BAR .  286) (EQUAL_GREATER .  1313))
       ((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 .  1309))
-      ((default . error) (SEMICOLON .  1308))
-      ((default . error) (DOT_DOT .  1307))
+      ((default . error) (SEMICOLON .  1311))
+      ((default . error) (SEMICOLON .  1310))
+      ((default . error) (DOT_DOT .  1309))
       ((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 .  1328))
+      ((default . error) (END . (component_list_opt . 0)) (WHEN . 
(component_list_opt . 0)) (NULL .  1033) (CASE .  1032) (IDENTIFIER .  77) (FOR 
.  299))
       ((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) (SEMICOLON .  1325))
       ((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) (IDENTIFIER .  48) (CHARACTER_LITERAL .  50) 
(STRING_LITERAL .  49) (PLUS .  154) (MINUS .  153) (ABS .  144) (NOT .  736) 
(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 .  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 .  1330))
-      ((default . error) (BEGIN .  1329))
+      ((default . error) (OR . (if_statement . 2)) (THEN . (if_statement . 2)) 
(WHEN . (if_statement . 2)) (EXCEPTION . (if_statement . 2)) (END . 
(if_statement . 2)) (LESS_LESS . (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 . [...]
+      ((default . error) (SEMICOLON .  1322))
+      ((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)) (WHILE . (if_statement . 
0)) (SELECT . (if_statement . 0)) (RETURN . (if_statement . 0)) (REQUEUE . 
(if_statement . 0)) (RAISE . (if_statement . 0)) (PRAGMA . (if_statement . 0)) 
(NULL . (if_statement . 0)) (LOOP .  [...]
+      ((default . error) (RIGHT_PAREN .  1332))
+      ((default . error) (BEGIN .  1331))
       ((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 .  1328))
+      ((default . error) (SEMICOLON .  1330))
       ((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 .  
808))
+      ((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 .  
810))
       ((default . error) (WHEN . (entry_body_formal_part . 0)))
-      ((default . error) (END .  1333))
-      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
716))
-      ((default . error) (SEMICOLON .  1335))
+      ((default . error) (END .  1335))
+      ((default . error) (SEMICOLON . (identifier_opt . 0)) (IDENTIFIER .  
718))
+      ((default . error) (SEMICOLON .  1337))
       ((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))
@@ -3550,9 +3555,9 @@
       nil
       ((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 . 677))
       ((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 [...]
+      ((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)(goto_label . 
658)(handled_sequence_of_statements . 659)(if_statement . 660)(iteration_scheme 
. 661)(label_opt . 662)(loop_statement . 663)(name . 664)(pragma . 
665)(procedure_call_statement . 666)(qualified_expression . 54)(ra [...]
       nil
       ((aspect_specification_opt . 629))
       nil
@@ -3685,21 +3690,21 @@
       ((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))
+      ((null_exclusion_opt . 813))
+      ((formal_part . 93)(parameter_and_result_profile . 812))
+      ((formal_part . 117)(parameter_profile_opt . 811))
       ((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))
+      ((aspect_specification_opt . 809))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 808)(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)(formal_package_actual_part . 804))
+      ((actual_parameter_part . 92)(formal_package_actual_part . 806))
       nil
       nil
       nil
       nil
       nil
-      ((attribute_reference . 51)(name . 800)(qualified_expression . 
54)(selected_component . 55))
+      ((attribute_reference . 51)(name . 802)(qualified_expression . 
54)(selected_component . 55))
       nil
       nil
       nil
@@ -3711,7 +3716,7 @@
       nil
       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))
+      ((aggregate . 157)(attribute_reference . 51)(discrete_subtype_definition 
. 790)(discrete_subtype_definition_list . 791)(factor . 
161)(index_subtype_definition . 792)(index_subtype_definition_list . 793)(name 
. 794)(primary . 166)(qualified_expression . 54)(range . 
740)(selected_component . 55)(simple_expression . 487)(subtype_indication . 
741)(term . 176)(term_list . 177)(unary_adding_operator . 178))
       nil
       nil
       nil
@@ -3726,77 +3731,78 @@
       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))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 
161)(membership_choice . 785)(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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 784)(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 . 783)(term . 176)(term_list . 177)(unary_adding_operator 
. 178))
       nil
       nil
       nil
       nil
-      ((aggregate . 779)(record_rep . 780))
+      ((aggregate . 781)(record_rep . 782))
       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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 778)(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))
+      ((discriminant_part_opt . 775))
+      ((aspect_specification_opt . 728))
+      ((attribute_reference . 51)(name . 732)(qualified_expression . 
54)(selected_component . 55)(subtype_indication . 773))
       nil
-      ((discriminant_part_opt . 768))
-      ((aspect_specification_opt . 725))
+      ((discriminant_part_opt . 770))
+      ((aspect_specification_opt . 727))
       nil
       nil
       nil
-      ((attribute_reference . 51)(name . 762)(qualified_expression . 
54)(selected_component . 55))
+      ((attribute_reference . 51)(name . 764)(qualified_expression . 
54)(selected_component . 55))
       nil
       nil
       nil
       nil
-      ((constant_opt . 758))
+      ((constant_opt . 760))
       nil
       nil
-      ((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))
+      ((paren_expression . 755))
+      ((formal_part . 117)(parameter_profile_opt . 753))
+      ((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)(goto_label . 
658)(handled_sequence_of_statements . 751)(if_statement . 660)(iteration_scheme 
. 661)(label_opt . 662)(loop_statement . 663)(name . 664)(pragma . 
665)(procedure_call_statement . 666)(qualified_expression . 54)(ra [...]
+      ((attribute_reference . 51)(name . 243)(name_opt . 
750)(qualified_expression . 54)(selected_component . 55))
       nil
       nil
       nil
       nil
-      ((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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 749)(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
-      ((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 [...]
+      ((elsif_expression_item . 745)(elsif_expression_list . 746))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 742)(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 
. 738)(factor . 161)(name . 739)(primary . 166)(qualified_expression . 
54)(range . 740)(selected_component . 55)(simple_expression . 
487)(subtype_indication . 741)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((attribute_reference . 51)(name . 735)(qualified_expression . 
54)(selected_component . 55))
+      ((attribute_reference . 51)(name . 732)(qualified_expression . 
54)(selected_component . 55)(subtype_indication . 733))
+      ((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 . 730)(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))
+      ((aspect_specification_opt . 728))
+      ((aspect_specification_opt . 727))
       nil
       nil
-      ((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))
+      ((attribute_reference . 51)(name . 725)(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)(goto_label . 
658)(handled_sequence_of_statements . 724)(if_statement . 660)(iteration_scheme 
. 661)(label_opt . 662)(loop_statement . 663)(name . 664)(pragma . 
665)(procedure_call_statement . 666)(qualified_expression . 54)(ra [...]
+      ((aggregate . 157)(attribute_reference . 51)(expression . 
195)(expression_opt . 723)(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 . 722)(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 . 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))
+      ((identifier_opt . 719))
+      ((iterator_specification . 716)(iterator_specification_opt . 717))
       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 [...]
+      ((aggregate . 157)(attribute_reference . 51)(expression . 
195)(expression_opt . 714)(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)(goto_label . 
658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
       nil
+      ((attribute_reference . 51)(name . 711)(qualified_expression . 
54)(selected_component . 55))
       ((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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 
706)(extended_return_object_declaration . 
707)(extended_return_object_declaration_opt . 708)(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 . 694)(attribute_reference . 51)(delay_alternative . 
695)(delay_statement . 696)(entry_call_alternative . 697)(name . 
698)(procedure_call_statement . 699)(qualified_expression . 
54)(selected_component . 55)(select_alternative . 700)(select_alternative_list 
. 701)(select_alternative_list_opt . 702)(triggering_alternative . 703))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 
195)(expression_opt . 691)(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
@@ -3811,7 +3817,7 @@
       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 [...]
+      ((accept_statement . 649)(assignment_statement . 
650)(asynchronous_select . 651)(attribute_reference . 51)(block_statement . 
652)(case_statement . 653)(compound_statement . 685)(conditional_entry_call . 
654)(delay_statement . 655)(exit_statement . 656)(extended_return_statement . 
657)(if_statement . 660)(iteration_scheme . 661)(loop_statement . 663)(name . 
664)(pragma . 665)(procedure_call_statement . 666)(qualified_expression . 
54)(raise_statement . 667)(requeue_statement . 668)(s [...]
       nil
       ((actual_parameter_part . 92))
       nil
@@ -3820,7 +3826,8 @@
       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 [...]
+      ((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)(goto_label . 
681)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
+      nil
       nil
       nil
       nil
@@ -3828,26 +3835,26 @@
       nil
       nil
       nil
+      ((exception_handler . 953)(exception_handler_list . 
954)(exception_handler_list_opt . 955))
       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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 951)(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))
+      ((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)(goto_label . 
658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
+      ((attribute_reference . 51)(name . 243)(name_opt . 
949)(qualified_expression . 54)(selected_component . 55))
       nil
       nil
       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 [...]
+      ((aggregate . 157)(attribute_reference . 51)(expression . 946)(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)(goto_label . 
658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
       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 [...]
+      ((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)(goto_label . 
658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
       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 [...]
+      ((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)(goto_label . 658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statem [...]
+      ((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)(goto_label . 
658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
       nil
       nil
       nil
@@ -3868,108 +3875,108 @@
       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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 922)(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))
+      ((actual_parameter_part . 915)(actual_parameter_part_opt . 916))
       nil
       nil
-      ((case_expression_alternative . 909))
+      ((case_expression_alternative . 911))
       nil
       nil
-      ((actual_parameter_part . 92)(constraint . 829)(index_constraint . 830))
+      ((actual_parameter_part . 92)(constraint . 831)(index_constraint . 832))
       nil
-      ((attribute_reference . 51)(name . 905)(qualified_expression . 
54)(selected_component . 55))
+      ((attribute_reference . 51)(name . 907)(qualified_expression . 
54)(selected_component . 55))
       ((actual_parameter_part . 92))
       ((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))
+      ((aggregate . 157)(attribute_reference . 51)(discrete_subtype_definition 
. 905)(factor . 161)(name . 739)(primary . 166)(qualified_expression . 
54)(range . 740)(selected_component . 55)(simple_expression . 
487)(subtype_indication . 741)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((actual_parameter_part . 92)(constraint . 829)(index_constraint . 830))
+      ((actual_parameter_part . 92)(constraint . 831)(index_constraint . 832))
       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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 903)(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 . 902)(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))
+      ((elsif_expression_item . 901))
       nil
       nil
       nil
       nil
       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 [...]
+      ((aggregate . 157)(attribute_reference . 51)(discrete_subtype_definition 
. 896)(factor . 161)(identifier_list . 236)(name . 739)(parameter_specification 
. 237)(parameter_specification_list . 238)(primary . 166)(qualified_expression 
. 54)(range . 740)(selected_component . 55)(simple_expression . 
487)(subtype_indication . 741)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aspect_specification_opt . 895))
+      ((aggregate . 157)(attribute_reference . 51)(case_expression . 
158)(conditional_quantified_expression . 893)(expression . 894)(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 . 892))
+      ((aspect_specification_opt . 891))
       ((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 . 730)(null_exclusion_opt . 
517)(qualified_expression . 54)(selected_component . 55)(subtype_indication . 
886))
+      ((access_definition . 886)(array_type_definition . 
887)(attribute_reference . 51)(name . 732)(null_exclusion_opt . 
517)(qualified_expression . 54)(selected_component . 55)(subtype_indication . 
888))
       nil
-      ((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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 884)(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 . 
883)(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 . 517)(record_type_definition . 876)(type_definition . 
877))
+      ((attribute_reference . 51)(name . 881)(qualified_expression . 
54)(selected_component . 55))
+      ((attribute_reference . 51)(name . 880)(qualified_expression . 
54)(selected_component . 55))
+      ((abstract_limited_synchronized_opt . 870)(abstract_limited_opt . 
871)(abstract_tagged_limited_opt . 872)(access_definition . 
873)(array_type_definition . 874)(derived_type_definition . 
875)(enumeration_type_definition . 876)(interface_type_definition . 
877)(null_exclusion_opt . 517)(record_type_definition . 878)(type_definition . 
879))
       nil
       nil
-      ((aspect_specification_opt . 856))
-      ((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 [...]
+      ((aspect_specification_opt . 858))
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 856)(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))
+      ((aspect_specification_opt . 854))
       nil
-      ((aspect_specification_opt . 850))
-      ((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 [...]
+      ((aspect_specification_opt . 852))
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 850)(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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 846)(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 . 845))
       nil
       nil
       nil
       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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 840)(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 . 839)(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 . 838))
       nil
       nil
       nil
       nil
       nil
-      ((actual_parameter_part . 92)(constraint . 829)(index_constraint . 830))
+      ((actual_parameter_part . 92)(constraint . 831)(index_constraint . 832))
       nil
       nil
-      ((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))
+      ((attribute_reference . 51)(interface_list . 827)(name . 
824)(qualified_expression . 54)(selected_component . 55))
+      ((attribute_reference . 51)(interface_list . 826)(name . 
824)(qualified_expression . 54)(selected_component . 55))
+      ((attribute_reference . 51)(interface_list . 825)(name . 
824)(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))
+      ((attribute_reference . 51)(interface_list . 823)(name . 
824)(qualified_expression . 54)(selected_component . 55))
+      ((actual_parameter_part . 92)(and_interface_list_opt . 822))
       nil
       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)(expression . 195)(expression_opt . 196)(factor 
. 161)(if_expres [...]
-      ((aspect_specification_opt . 817))
+      ((aspect_specification_opt . 819))
       nil
-      ((aspect_specification_opt . 816))
+      ((aspect_specification_opt . 818))
       nil
       ((identifier_list . 236)(parameter_specification . 
237)(parameter_specification_list . 238))
       nil
       nil
-      ((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))
+      ((attribute_reference . 51)(name . 816)(qualified_expression . 
54)(selected_component . 55))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 815)(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))
       nil
       nil
       nil
       nil
-      ((attribute_reference . 51)(interface_list . 1080)(name . 
822)(qualified_expression . 54)(selected_component . 55))
+      ((attribute_reference . 51)(interface_list . 1082)(name . 
824)(qualified_expression . 54)(selected_component . 55))
       nil
       nil
       ((actual_parameter_part . 92))
@@ -3977,14 +3984,14 @@
       nil
       nil
       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))
+      ((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 . 
790)(discrete_subtype_definition_ [...]
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
197)(primary . 166)(qualified_expression . 54)(range . 1003)(selected_component 
. 55)(simple_expression . 487)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
       nil
-      ((attribute_reference . 51)(index_subtype_definition . 1071)(name . 
1072)(qualified_expression . 54)(selected_component . 55))
+      ((attribute_reference . 51)(index_subtype_definition . 1073)(name . 
1074)(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))
+      ((aggregate . 157)(attribute_reference . 51)(discrete_subtype_definition 
. 1071)(factor . 161)(name . 739)(primary . 166)(qualified_expression . 
54)(range . 740)(selected_component . 55)(simple_expression . 
487)(subtype_indication . 741)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
       nil
@@ -3993,50 +4000,50 @@
       nil
       nil
       nil
-      ((component_clause . 1066)(component_clause_list . 1067))
+      ((component_clause . 1068)(component_clause_list . 1069))
       nil
       nil
-      ((aspect_specification_opt . 1063))
-      ((attribute_reference . 51)(interface_list . 1062)(name . 
822)(qualified_expression . 54)(selected_component . 55))
+      ((aspect_specification_opt . 1065))
+      ((attribute_reference . 51)(interface_list . 1064)(name . 
824)(qualified_expression . 54)(selected_component . 55))
       nil
       nil
       nil
-      ((aspect_specification_opt . 1057))
+      ((aspect_specification_opt . 1059))
       nil
-      ((attribute_reference . 51)(interface_list . 1055)(name . 
822)(qualified_expression . 54)(selected_component . 55))
+      ((attribute_reference . 51)(interface_list . 1057)(name . 
824)(qualified_expression . 54)(selected_component . 55))
       nil
       nil
       nil
-      ((aspect_specification_opt . 1049))
+      ((aspect_specification_opt . 1051))
       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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1049)(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 . 1048)(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 . 1046)(enumeration_literal_list . 1047))
       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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1043)(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 . 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))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1041)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aspect_clause . 1034)(at_clause . 308)(component_declaration . 
1035)(component_item . 1036)(component_list . 1037)(component_list_opt . 
1038)(enumeration_representation_clause . 315)(identifier_list . 
1039)(record_representation_clause . 339)(variant_part . 1040))
       nil
       nil
       nil
-      ((record_definition . 1026))
+      ((record_definition . 1028))
       nil
       nil
       nil
       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))
+      ((aspect_specification_opt . 1026))
+      ((actual_parameter_part . 92)(aspect_specification_opt . 1025))
+      ((actual_parameter_part . 92)(aspect_specification_opt . 1024))
+      ((attribute_reference . 51)(name . 1023)(qualified_expression . 
54)(selected_component . 55))
       nil
       nil
       nil
+      ((aspect_specification_opt . 1020))
       ((aspect_specification_opt . 1018))
       ((aspect_specification_opt . 1016))
-      ((aspect_specification_opt . 1014))
       nil
       nil
       nil
@@ -4045,53 +4052,53 @@
       nil
       nil
       nil
-      ((attribute_reference . 51)(name . 243)(name_opt . 
1004)(qualified_expression . 54)(selected_component . 55))
+      ((attribute_reference . 51)(name . 243)(name_opt . 
1006)(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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1005)(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 . 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))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
197)(primary . 166)(qualified_expression . 54)(range . 1003)(selected_component 
. 55)(simple_expression . 487)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
-      ((attribute_reference . 51)(name . 998)(qualified_expression . 
54)(selected_component . 55))
+      ((attribute_reference . 51)(name . 1000)(qualified_expression . 
54)(selected_component . 55))
       ((actual_parameter_part . 92))
+      ((attribute_reference . 51)(name . 1002)(qualified_expression . 
54)(selected_component . 55))
       ((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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 999)(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 [...]
+      ((aspect_clause . 989)(at_clause . 308)(entry_body . 
990)(enumeration_representation_clause . 315)(expression_function_declaration . 
991)(function_specification . 16)(null_procedure_declaration . 
992)(overriding_indicator_opt . 993)(procedure_specification . 
32)(protected_operation_item . 994)(protected_operation_item_list . 
995)(protected_operation_item_list_opt . 996)(record_representation_clause . 
339)(subprogram_body . 997)(subprogram_declaration . 998))
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 987)(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
-      ((formal_part . 117)(parameter_profile_opt . 984))
+      ((formal_part . 117)(parameter_profile_opt . 986))
       nil
-      ((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 [...]
+      ((identifier_opt . 985))
+      ((case_statement_alternative . 983)(case_statement_alternative_list . 
984))
+      ((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)(goto_label . 
658)(handled_sequence_of_statements . 981)(if_statement . 660)(iteration_scheme 
. 661)(label_opt . 662)(loop_statement . 663)(name . 664)(pragma . 
665)(procedure_call_statement . 666)(qualified_expression . 54)(ra [...]
       nil
       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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 
195)(expression_opt . 979)(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
-      ((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 [...]
+      ((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)(goto_label . 
658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
       nil
-      ((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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 976)(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)(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 [...]
+      ((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)(goto_label . 
658)(handled_sequence_of_statements . 974)(if_statement . 660)(iteration_scheme 
. 661)(label_opt . 662)(loop_statement . 663)(name . 664)(pragma . 
665)(procedure_call_statement . 666)(qualified_expression . 54)(ra [...]
       nil
       nil
-      ((aliased_opt . 971))
+      ((aliased_opt . 973))
       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 [...]
+      ((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)(goto_label . 
658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
       nil
-      ((accept_statement . 692)(delay_alternative . 693)(delay_statement . 
965)(select_alternative . 967))
+      ((accept_statement . 694)(delay_alternative . 695)(delay_statement . 
967)(select_alternative . 969))
       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 [...]
-      ((delay_alternative . 964)(delay_statement . 965))
+      ((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)(goto_label . 
658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
+      ((delay_alternative . 966)(delay_statement . 967))
       nil
       nil
       nil
@@ -4100,9 +4107,9 @@
       nil
       nil
       nil
-      ((attribute_reference . 51)(exception_choice . 
957)(exception_choice_list . 958)(name . 959)(qualified_expression . 
54)(selected_component . 55))
+      ((attribute_reference . 51)(exception_choice . 
959)(exception_choice_list . 960)(name . 961)(qualified_expression . 
54)(selected_component . 55))
       nil
-      ((exception_handler . 954))
+      ((exception_handler . 956))
       nil
       nil
       nil
@@ -4113,26 +4120,26 @@
       nil
       nil
       nil
-      ((accept_statement . 1177)(delay_alternative . 1178)(delay_statement . 
965))
+      ((accept_statement . 1179)(delay_alternative . 1180)(delay_statement . 
967))
       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 [...]
+      ((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)(goto_label . 
658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
       nil
       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 [...]
-      ((constant_opt . 1169))
+      ((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)(goto_label . 
658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
+      ((constant_opt . 1171))
       nil
       nil
       nil
-      ((identifier_opt . 1165))
-      ((elsif_statement_item . 1163)(elsif_statement_list . 1164))
+      ((identifier_opt . 1167))
+      ((elsif_statement_item . 1165)(elsif_statement_list . 1166))
       nil
       nil
       nil
-      ((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_ [...]
+      ((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 . 1159)(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 . 1156))
+      ((case_statement_alternative . 1158))
       nil
       nil
       nil
@@ -4141,51 +4148,51 @@
       nil
       nil
       nil
-      ((function_specification . 436)(procedure_specification . 
437)(subprogram_specification . 1149))
+      ((function_specification . 436)(procedure_specification . 
437)(subprogram_specification . 1151))
       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 . 1148)(record_representation_clause . 
339)(subprogram_body . 995)(subprogram_declaration . 996))
+      ((aspect_clause . 989)(at_clause . 308)(entry_body . 
990)(enumeration_representation_clause . 315)(expression_function_declaration . 
991)(function_specification . 16)(null_procedure_declaration . 
992)(overriding_indicator_opt . 993)(procedure_specification . 
32)(protected_operation_item . 1150)(record_representation_clause . 
339)(subprogram_body . 997)(subprogram_declaration . 998))
       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)(constraint . 1148)(index_constraint . 832))
+      ((attribute_reference . 51)(name . 1147)(qualified_expression . 
54)(selected_component . 55))
       ((actual_parameter_part . 92))
       nil
-      ((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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1146)(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 . 1144))
       nil
-      ((formal_part . 117)(parameter_profile_opt . 1142))
       nil
       nil
       nil
       nil
       nil
       nil
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1143)(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 . 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 . 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
-      ((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
-      ((attribute_reference . 51)(name . 998)(qualified_expression . 
54)(selected_component . 55))
+      ((attribute_reference . 51)(name . 1000)(qualified_expression . 
54)(selected_component . 55))
       nil
-      ((actual_parameter_part . 92)(aspect_specification_opt . 1135))
+      ((actual_parameter_part . 92)(aspect_specification_opt . 1137))
       nil
       nil
       nil
-      ((aspect_specification_opt . 1131))
+      ((aspect_specification_opt . 1133))
       nil
-      ((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))
+      ((attribute_reference . 51)(name . 1132)(qualified_expression . 
54)(selected_component . 55))
+      ((attribute_reference . 51)(name . 732)(qualified_expression . 
54)(selected_component . 55)(subtype_indication . 1131))
       nil
-      ((direct_name . 1127)(direct_name_opt . 1128))
+      ((direct_name . 1129)(direct_name_opt . 1130))
       nil
       nil
       nil
       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))
+      ((aspect_clause . 1034)(at_clause . 308)(component_declaration . 
1035)(component_item . 1124)(enumeration_representation_clause . 
315)(identifier_list . 1039)(record_representation_clause . 339)(variant_part . 
1125))
       nil
       nil
       nil
@@ -4196,51 +4203,51 @@
       nil
       nil
       nil
-      ((real_range_specification_opt . 1116))
-      ((real_range_specification_opt . 1115))
+      ((real_range_specification_opt . 1118))
+      ((real_range_specification_opt . 1117))
       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 [...]
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 856)(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
-      ((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 [...]
+      ((identifier_opt . 1111))
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 1110)(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 . 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 [...]
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 850)(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 . 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 [...]
+      ((identifier_opt . 1105))
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 1104)(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 . 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))
+      ((component_clause . 1100))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1098)(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 . 1091)(attribute_reference . 
51)(component_definition . 1095)(name . 730)(null_exclusion_opt . 
517)(qualified_expression . 54)(selected_component . 55)(subtype_indication . 
1093))
+      ((access_definition . 1093)(attribute_reference . 
51)(component_definition . 1097)(name . 732)(null_exclusion_opt . 
517)(qualified_expression . 54)(selected_component . 55)(subtype_indication . 
1095))
       nil
       ((actual_parameter_part . 92))
-      ((access_definition . 1091)(attribute_reference . 
51)(component_definition . 1092)(name . 730)(null_exclusion_opt . 
517)(qualified_expression . 54)(selected_component . 55)(subtype_indication . 
1093))
+      ((access_definition . 1093)(attribute_reference . 
51)(component_definition . 1094)(name . 732)(null_exclusion_opt . 
517)(qualified_expression . 54)(selected_component . 55)(subtype_indication . 
1095))
       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))
+      ((attribute_reference . 51)(name . 1089)(qualified_expression . 
54)(selected_component . 55))
       nil
       nil
       nil
       nil
       nil
-      ((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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1087)(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 . 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))
+      ((attribute_reference . 51)(name . 1245)(qualified_expression . 
54)(selected_component . 55))
+      ((access_definition . 1243)(attribute_reference . 51)(name . 
732)(null_exclusion_opt . 517)(qualified_expression . 54)(selected_component . 
55)(subtype_indication . 1244))
       nil
       nil
       nil
@@ -4249,28 +4256,28 @@
       nil
       nil
       nil
-      ((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))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1240)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       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 [...]
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 850)(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 . 1235)(name . 
822)(qualified_expression . 54)(selected_component . 55))
+      ((attribute_reference . 51)(interface_list . 1237)(name . 
824)(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 [...]
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 856)(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 . 1231)(name . 
822)(qualified_expression . 54)(selected_component . 55))
+      ((attribute_reference . 51)(interface_list . 1233)(name . 
824)(qualified_expression . 54)(selected_component . 55))
       nil
       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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1231)(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 . 1230)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       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))
+      ((enumeration_literal . 1229))
+      ((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))
+      ((access_definition . 1093)(attribute_reference . 
51)(component_definition . 1227)(name . 732)(null_exclusion_opt . 
517)(qualified_expression . 54)(selected_component . 55)(subtype_indication . 
1095))
       nil
       nil
       nil
@@ -4279,47 +4286,47 @@
       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))
+      ((and_interface_list_opt . 1224))
+      ((actual_parameter_part . 92)(and_interface_list_opt . 1221)(constraint 
. 1222)(constraint_opt . 1223)(index_constraint . 832))
       nil
       nil
       nil
       nil
       nil
       nil
-      ((aspect_specification_opt . 1216))
+      ((aspect_specification_opt . 1218))
       nil
-      ((aspect_specification_opt . 1215))
+      ((aspect_specification_opt . 1217))
       nil
-      ((aspect_specification_opt . 1214))
-      ((aspect_specification_opt . 1213))
+      ((aspect_specification_opt . 1216))
+      ((aspect_specification_opt . 1215))
       nil
       nil
       ((actual_parameter_part . 92))
       nil
-      ((identifier_opt . 1212))
+      ((identifier_opt . 1214))
       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 [...]
+      ((entry_body_formal_part . 1212)(formal_part . 
117)(parameter_profile_opt . 1213))
+      ((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)(goto_label . 
658)(handled_sequence_of_statements . 1210)(if_statement . 
660)(iteration_scheme . 661)(label_opt . 662)(loop_statement . 663)(name . 
664)(pragma . 665)(procedure_call_statement . 666)(qualified_expression . 54)(r 
[...]
+      ((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)(goto_label . 
658)(handled_sequence_of_statements . 1209)(if_statement . 
660)(iteration_scheme . 661)(label_opt . 662)(loop_statement . 663)(name . 
664)(pragma . 665)(procedure_call_statement . 666)(qualified_expression . 54)(r 
[...]
       nil
       nil
       nil
       nil
       nil
-      ((identifier_opt . 1204))
+      ((identifier_opt . 1206))
       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))
+      ((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)(goto_label . 
658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
+      ((aggregate . 157)(attribute_reference . 51)(expression . 
195)(expression_opt . 1204)(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
-      ((elsif_statement_item . 1200))
+      ((elsif_statement_item . 1202))
       nil
       nil
       nil
       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))
+      ((access_definition . 1195)(attribute_reference . 51)(name . 
732)(null_exclusion_opt . 517)(qualified_expression . 
54)(return_subtype_indication . 1196)(selected_component . 
55)(subtype_indication . 1197))
       nil
       nil
       nil
@@ -4327,12 +4334,12 @@
       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 [...]
+      ((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)(goto_label . 
658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
       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))
+      ((identifier_opt . 1188))
+      ((attribute_reference . 51)(exception_choice . 1187)(name . 
961)(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)(goto_label . 
658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
+      ((attribute_reference . 51)(exception_choice . 
959)(exception_choice_list . 1185)(name . 961)(qualified_expression . 
54)(selected_component . 55))
       nil
       nil
       nil
@@ -4348,14 +4355,14 @@
       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 [...]
+      ((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)(goto_label . 
658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
       nil
       nil
       nil
       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 [...]
+      ((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)(goto_label . 
658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
       nil
       nil
       nil
@@ -4373,68 +4380,68 @@
       nil
       nil
       nil
-      ((variant_list . 1256)(variant . 1257))
+      ((variant_list . 1258)(variant . 1259))
       nil
-      ((aspect_specification_opt . 1254))
+      ((aspect_specification_opt . 1256))
       nil
       nil
       nil
-      ((real_range_specification_opt . 1251))
+      ((real_range_specification_opt . 1253))
       nil
       nil
-      ((identifier_opt . 1249))
+      ((identifier_opt . 1251))
       nil
       nil
       nil
-      ((identifier_opt . 1246))
+      ((identifier_opt . 1248))
       nil
       nil
       nil
       nil
       nil
       nil
-      ((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))
+      ((actual_parameter_part . 92)(constraint . 1148)(index_constraint . 832))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1308)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       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 [...]
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 850)(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 . 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 [...]
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 856)(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 . 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))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1305)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1304)(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 . 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))
+      ((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 . 1302)(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 . 1301))
       nil
       nil
-      ((record_definition . 1296))
+      ((record_definition . 1298))
       nil
       nil
       nil
       nil
       nil
-      ((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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 
195)(expression_opt . 1297)(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 . 1293))
-      ((identifier_opt . 1292))
+      ((identifier_opt . 1295))
+      ((identifier_opt . 1294))
       nil
       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 [...]
+      ((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)(goto_label . 
658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
       nil
       nil
       nil
       nil
-      ((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))
+      ((aggregate . 157)(attribute_reference . 51)(expression . 1289)(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 . 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 [...]
+      ((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)(goto_label . 
658)(if_statement . 660)(iteration_scheme . 661)(label_opt . 
662)(loop_statement . 663)(name . 664)(pragma . 665)(procedure_call_statement . 
666)(qualified_expression . 54)(raise_statement . 667)(requeue_statement [...]
       nil
       nil
       nil
@@ -4447,25 +4454,25 @@
       nil
       nil
       nil
-      ((aspect_specification_opt . 1313))
+      ((aspect_specification_opt . 1315))
       nil
       nil
       nil
       nil
-      ((aspect_specification_opt . 1310))
+      ((aspect_specification_opt . 1312))
       nil
       nil
       nil
       nil
-      ((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))
+      ((aggregate . 157)(attribute_reference . 51)(factor . 161)(name . 
163)(primary . 166)(qualified_expression . 54)(selected_component . 
55)(simple_expression . 1329)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
       nil
-      ((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))
+      ((aspect_clause . 1034)(at_clause . 308)(component_declaration . 
1035)(component_item . 1036)(component_list . 1037)(component_list_opt . 
1327)(enumeration_representation_clause . 315)(identifier_list . 
1039)(record_representation_clause . 339)(variant_part . 1040))
       nil
       nil
-      ((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))
+      ((abstract_subprogram_declaration . 306)(aspect_clause . 307)(at_clause 
. 308)(body . 309)(body_stub . 310)(declaration . 311)(declarations . 
312)(declarative_part_opt . 1324)(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 
. 1323)(factor . 161)(name . 739)(primary . 166)(qualified_expression . 
54)(range . 740)(selected_component . 55)(simple_expression . 
487)(subtype_indication . 741)(term . 176)(term_list . 
177)(unary_adding_operator . 178))
       nil
       nil
       nil
@@ -4479,11 +4486,11 @@
       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)(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))
+      ((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)(goto_label . 
658)(handled_sequence_of_statements . 1334)(if_statement . 
660)(iteration_scheme . 661)(label_opt . 662)(loop_statement . 663)(name . 
664)(pragma . 665)(procedure_call_statement . 666)(qualified_expression . 54)(r 
[...]
+      ((formal_part . 117)(parameter_profile_opt . 1333))
       nil
       nil
-      ((identifier_opt . 1334))
+      ((identifier_opt . 1336))
       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 1be01cd..267ac41 100644
--- a/packages/ada-mode/ada-indent-user-options.el
+++ b/packages/ada-mode/ada-indent-user-options.el
@@ -110,7 +110,7 @@ Example :
 (make-variable-buffer-local 'ada-indent-label)
 
 (defcustom ada-indent-record-rel-type 3
-  "Indentation for 'record' relative to 'type' or 'use'.
+  "Indentation for `record' relative to `type' or `use'.
 
 An example is:
    type A is
@@ -120,9 +120,9 @@ An example is:
 (make-variable-buffer-local 'ada-indent-record-rel-type)
 
 (defcustom ada-indent-renames 2
-  "Indentation for 'renames' relative to the matching subprogram keyword.
+  "Indentation for `renames' relative to the matching subprogram keyword.
 
-For 'renames' of non-subprograms the indentation is
+For `renames' of non-subprograms the indentation is
 `ada-indent-broken' relative to the line containing the matching
 keyword.
 
@@ -149,15 +149,15 @@ Examples:
 (make-variable-buffer-local 'ada-indent-renames)
 
 (defcustom ada-indent-return 0
-  "Indentation for 'return' relative to the matching 'function' keyword.
+  "Indentation for `return' relative to the matching `function' keyword.
 
 If the function has parameters, then if `ada-indent-return' is
 zero or less the indentation is abs `ada-indent-return' relative
 to the open parenthesis; if `ada-indent-return' is one or more,
-indentation is relative to line containing 'function'.
+indentation is relative to line containing `function'.
 
 If the function has no parameters, `ada-indent-broken' is used
-relative to line containing 'function'.
+relative to line containing `function'.
 
 An example is:
    function A (B : Integer)
@@ -178,7 +178,7 @@ An example is:
        (message "WARNING: setting `ada-indent-use' to obsolete 
`ada-use-indent'")
        ada-use-indent)
       ada-indent-broken)
-  "Indentation for the lines in a 'use' statement.
+  "Indentation for the lines in a `use' statement.
 
 An example is:
    use Ada.Text_IO,
@@ -199,7 +199,7 @@ An example is:
        (message "WARNING: setting `ada-indent-when' to obsolete 
`ada-when-indent'")
        ada-when-indent)
       3)
-  "Indentation for 'when' relative to 'exception', 'case', 'or' in select.
+  "Indentation for `when' relative to `exception', `case', `or' in select.
 
 An example is:
    case A is
@@ -220,7 +220,7 @@ An example is:
        (message "WARNING: setting `ada-indent-with' to obsolete 
`ada-with-indent'")
        ada-with-indent)
       ada-indent-broken)
-  "Indentation for the lines in a 'with' context clause.
+  "Indentation for the lines in a `with' context clause.
 
 An example is:
    with Ada.Text_IO,
diff --git a/packages/ada-mode/ada-mode.el b/packages/ada-mode/ada-mode.el
old mode 100644
new mode 100755
index 8fb112a..4399b77
--- a/packages/ada-mode/ada-mode.el
+++ b/packages/ada-mode/ada-mode.el
@@ -6,8 +6,8 @@
 ;; Maintainer: Stephen Leake <address@hidden>
 ;; Keywords: languages
 ;;  ada
-;; Version: 5.1.9
-;; package-requires: ((wisi "1.1.2") (cl-lib "0.4") (emacs "24.2"))
+;; Version: 5.2.0
+;; package-requires: ((wisi "1.1.3") (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.9"))
+  (let ((version-string "5.2.0"))
     ;; must match:
     ;; ada-mode.texi
     ;; README-ada-mode
@@ -201,7 +201,7 @@ identifiers are Mixed_Case."
 
 (defcustom ada-case-exception-file nil
   "Default list of special casing exceptions dictionaries for identifiers.
-Override with 'casing' project variable.
+Override with `casing' project variable.
 
 New exceptions may be added interactively via `ada-case-create-exception'.
 If an exception is defined in multiple files, the first occurence is used.
@@ -219,7 +219,7 @@ preserved when the list is written back to the file."
 (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."
+Indicates how to adjust the case of Ada keywords."
   :type '(choice (const lower-case)
                 (const upper-case))
   ;; We'd like to specify that the value must be a function that takes
@@ -234,7 +234,7 @@ Function to call to adjust the case of Ada keywords."
 (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.
+Indicates how to adjust the case of Ada keywords.
 Called with three args;
 start      - buffer pos of start of identifier
 end        - end of identifier
@@ -415,6 +415,7 @@ Values defined by cross reference packages.")
      ["Show references"               ada-show-references          t]
      ["Show overriding"               ada-show-overriding          t]
      ["Show overridden"               ada-show-overridden          t]
+     ["Goto secondary error"          ada-show-secondary-error     t]
      ["Goto prev position"            ada-goto-previous-pos        t]
      ["Next placeholder"              ada-next-placeholder    t]
      ["Previous placeholder"          ada-prev-placeholder    t]
@@ -597,7 +598,7 @@ Placeholders are defined by the skeleton backend."
   "See the variable `align-region-separate' for more information.")
 
 (defun ada-align ()
-  "If region is active, apply 'align'. If not, attempt to align
+  "If region is active, apply `align'. If not, attempt to align
 current construct."
   (interactive)
   (if (use-region-p)
@@ -636,7 +637,10 @@ Function is called with one optional argument; syntax-ppss 
result.")
 (defun ada-format-paramlist ()
   "Reformat the parameter list point is in."
   (interactive)
-  (ada-goto-open-paren)
+  (condition-case nil
+      (ada-goto-open-paren)
+    (error
+     (user-error "Not in parameter list")))
   (funcall indent-line-function); so new list is indented properly
 
   (let* ((begin (point))
@@ -661,7 +665,7 @@ Function is called with one optional argument; syntax-ppss 
result.")
   "Function to scan a region, return a list of subprogram parameter 
declarations (in inverse declaration order).
 Function is called with two args BEGIN END (the region).
 Each parameter declaration is represented by a list
-'((identifier ...) aliased-p in-p out-p not-null-p access-p constant-p 
protected-p type default)."
+((identifier ...) aliased-p in-p out-p not-null-p access-p constant-p 
protected-p type default)."
   ;; Summary of Ada syntax for a parameter specification:
   ;; ... : [aliased] {[in] | out | in out | [null_exclusion] access [constant 
| protected]} ...
   )
@@ -1169,7 +1173,7 @@ Uses `ada-case-identifier', with exceptions defined in
 
 (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)."
+`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))))
@@ -1357,8 +1361,10 @@ Optional PLIST defaults to `ada-prj-current-project'."
 (defvar ada-prj-default-list nil
   ;; project file parse
   "List of functions to add default project variables. Called
-with one argument; the default project properties list. Function
-should add to the properties list and return it.")
+with one argument; the default project properties
+list. `default-directory' is set to the directory containing the
+project file. Function should add to the properties list and
+return it.")
 
 (defvar ada-prj-default-compiler-alist nil
   ;; project file parse
@@ -1426,14 +1432,16 @@ list. Parser must modify or add to the property list 
and return it.")
   "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: 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))))
+  (setq prj-file (expand-file-name prj-file))
+
+  (unless (file-readable-p prj-file)
+    (error "Project file '%s' is not readable" prj-file))
 
-    (setq prj-file (expand-file-name prj-file))
+  (run-hooks `ada-prj-parse-hook)
 
-    (unless (file-readable-p prj-file)
-      (error "Project file '%s' is not readable" prj-file))
+  (let* ((default-directory (file-name-directory prj-file))
+        (project (ada-prj-default))
+        (parser (cdr (assoc (file-name-extension prj-file) 
ada-prj-parser-alist))))
 
     (if parser
        ;; parser may reference the "current project", so bind that now.
@@ -1893,7 +1901,7 @@ unit name; it should return the Ada name that should be 
found in FILE-NAME.")
 
 (defun ada-ff-special-with ()
   (let ((package-name (match-string 1)))
-    (setq ff-function-name (concat "^package\\s-+" package-name 
"\\([^_]\\|$\\)"))
+    (setq ff-function-name (concat 
"^\\(function\\|procedure\\|package\\)\\s-+" package-name "\\([^_]\\|$\\)"))
     (file-name-nondirectory
      (or
       (ff-get-file-name
@@ -2233,8 +2241,8 @@ Function is called with four arguments:
 - filename containing the identifier (full path)
 - line number containing the identifier
 - column of the start of the identifier
-Returns a list '(file line column) giving the corresponding location.
-'file' may be absolute, or on `compilation-search-path'.  If point is
+Returns a list (FILE LINE COLUMN) giving the corresponding location.
+FILE may be absolute, or on `compilation-search-path'.  If point is
 at the specification, the corresponding location is the body, and vice
 versa.")
 
@@ -2348,8 +2356,8 @@ Called with four arguments:
 - filename containing the identifier
 - line number containing the identifier
 - column of the start of the identifier
-Returns a list '(file line column) giving the corresponding location.
-'file' may be absolute, or on `compilation-search-path'.")
+Returns a list (FILE LINE COLUMN) giving the corresponding location.
+FILE may be absolute, or on `compilation-search-path'.")
 
 (defun ada-show-overridden (other-window)
   "Show the overridden declaration of identifier at point."
@@ -2486,7 +2494,7 @@ 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
+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.")
@@ -2520,7 +2528,7 @@ if on open parenthesis move to matching closing 
parenthesis."
   ;; Supplied by indentation engine
   "Function called with no parameters; it should move to the previous
 keyword in the statement following the one point is in (ie from
-'then' to 'if').  If at the first keyword, move to the previous
+`then' to `if').  If at the first keyword, move to the previous
 keyword in the previous statement or containing statement.")
 
 (defun ada-prev-statement-keyword ()
@@ -2882,11 +2890,18 @@ The paragraph is indented on the first line."
 (unless (featurep 'ada-indent-engine)
   (require 'ada-wisi))
 
-(unless (featurep 'ada-xref-tool)
-  (cl-case ada-xref-tool
-    ((nil gnat) (require 'ada-gnat-xref))
-    (gpr_query (require 'gpr-query))
-    ))
+(cl-case ada-xref-tool
+  (gnat (require 'ada-gnat-xref))
+  (gpr_query (require 'gpr-query))
+  (t
+   (if (locate-file "gpr_query" exec-path '("" ".exe"))
+       (progn
+         (require 'gpr-query)
+         (setq ada-xref-tool 'gpr_query))
+     (require 'ada-gnat-xref)
+     (setq ada-xref-tool 'gnat)))
+  )
+;; FIXME: warn if gnat version >= gpl 2016, fsf 6 and no gpr_query installed
 
 (unless (featurep 'ada-compiler)
   (require 'ada-gnat-compile))
diff --git a/packages/ada-mode/ada-mode.info b/packages/ada-mode/ada-mode.info
index a3f0aaa..48e429a 100644
--- a/packages/ada-mode/ada-mode.info
+++ b/packages/ada-mode/ada-mode.info
@@ -1,7 +1,7 @@
-This is ada-mode.info, produced by makeinfo version 6.0 from
+This is ada-mode.info, produced by makeinfo version 6.1 from
 ada-mode.texi.
 
-Copyright (C) 1999 - 2015 Free Software Foundation, Inc.
+Copyright (C) 1999 - 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,
@@ -22,9 +22,9 @@ END-INFO-DIR-ENTRY
 
 File: ada-mode.info,  Node: Top,  Next: Overview,  Prev: (dir),  Up: (dir)
 
-Ada Mode Version 5.1.9
+Ada Mode Version 5.2.0
 
-   Copyright (C) 1999 - 2015 Free Software Foundation, Inc.
+   Copyright (C) 1999 - 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,
@@ -121,7 +121,6 @@ ada-mode-version'.
 
 * Ada Reference Manual::
 * gpr_query::
-* Upgrading::
 
 
 File: ada-mode.info,  Node: Ada Reference Manual,  Next: gpr_query,  Prev: 
Installation,  Up: Installation
@@ -133,56 +132,74 @@ The ELPA package ada-ref-man includes the Ada Reference 
Manual and
 Annotated Ada Reference Manual in info format.
 
 
-File: ada-mode.info,  Node: gpr_query,  Next: Upgrading,  Prev: Ada Reference 
Manual,  Up: Installation
+File: ada-mode.info,  Node: gpr_query,  Prev: Ada Reference Manual,  Up: 
Installation
 
 2.2 gpr_query
 =============
 
 Ada mode has support for an external cross reference tool 'gpr_query',
-which supports Ada, C, C++, and any other language for which AdaCore gcc
-provides the '-fdump-xref' ('-fdump-xref' is an AdaCore extension).
+which uses compiler-generated information.  In the case of Ada, the
+necessary '.ali' files are automatically generated by the standard
+compilation process.  For other languages, e.g.  C, C++, '.gli' files
+can be generated using the compiler switch '-fdump-xref'.  '-fdump-xref'
+is an AdaCore extension, not available in FSF GCC.
 
-   'gpr_query' requires the 'gnatcoll' library provided by AdaCore,
-distributed with GNAT GPL 2014.
+   'gpr_query' is an Ada program, which is distributed as source and
+must be built.  Its source code is in the Gnu ELPA package.
 
-   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, with GNAT
-GPL bin first in PATH) (note that gnatcoll-gpl-2014-src.tar.gz unzips to
-gnatcoll-1.7w-src):
+   'gpr_query' requires the 'GNATCOLL' library provided by AdaCore,
+distributed with GNAT GPL 2016, and also available at Github
+(<https://github.com/AdaCore/gnatcoll>).  (The 'GNATCOLL' distributed
+with GNAT GPL 2015 does not compile cleanly).  The notes below assume
+that the compiler is installed at '$prefix', e.g.
+'/usr/local/gnat-2016', and that '$prefix/bin' is first on the 'PATH'.
+If you are running Windows, use Cygwin 'bash' to run these commands.
+
+   In general, 'gpr_query' should be compiled with the compiler version
+that is used to generate the user project '.ali' files; the 'ali' file
+format can change with each compiler version.  'gpr_query' creates a
+database of cross reference information; that database must be deleted
+if the compiler version changes, to force a complete rebuild.
+
+2.2.1 Building GNATCOLL if required
+-----------------------------------
+
+'GNATCOLL' may already be installed on your system: if it is,
+'$prefix/lib/gnat' will contain 'gnatcoll' GPR files.  If not, configure
+(assuming the GPL 2016 version) by:
+
+     tar zxf ~/Downloads/gnatcoll-gpl-2016-src.tar.gz
+     cd gnatcoll-gpl-2016-src
+     ./configure --prefix=$prefix
+
+   You should see at least the following lines at the end of the output:
+
+     configure:   Sqlite:                 embedded  (see --with-sqlite)
+     configure:   Projects:               yes
+
+   Then, build and install:
 
-     tar xf ~/Downloads/gnatcoll-gpl-2014-src.tar.gz
-     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
 
-   To build an sqlite3 executable that is compatible with the database
-created by 'gpr_query':
+   If you are debugging 'gpr_query', you may want to build an sqlite3
+executable that is compatible with the database it creates:
 
-     cd gnatcoll-1.7w-src/src/sqlite/amalgamation/
+     cd gnatcoll-gpl-2016-src/src/sqlite/amalgamation/
      gcc -O2 -o sqlite3 shell.c sqlite3.c -ldl -lpthread
 
-
-File: ada-mode.info,  Node: Upgrading,  Prev: gpr_query,  Up: Installation
-
-2.3 Upgrading from previous versions
-====================================
-
-See the file NEWS for more details; here we summarize only important
-user interface changes.
+2.2.2 Building 'gpr_query'
+--------------------------
 
-'from 5.0.1'
-     Nothing to do.
+To build and install 'gpr_query', assuming the 'ada-mode-5.2.0' GNU ELPA
+package is installed:
 
-'from 4.01'
-     There are many user interface and API changes between 4.01 and
-     5.0.1; we only document those that may be hard to diagnose here.
+     cd ~/.emacs.d/elpa/ada-mode-5.2.0
+     gprbuild -p -P gpr_query.gpr
+     gprinstall -P gpr_query.gpr
 
-     'prog-mode-hook' is no longer run by 'ada-mode'; 'ada-mode' is no
-     longer derived from 'prog-mode'.  Use 'ada-mode-hook' instead.
+   'ada-mode' will use 'gpr_query' for cross reference functions if
+'gpr_query' is found in 'PATH'.
 
 
 File: ada-mode.info,  Node: Customization,  Next: Compiling Executing,  Prev: 
Installation,  Up: Top
@@ -276,18 +293,11 @@ is used to index several variables that point to the
 cross-reference-tool-specific functions for corresponding Ada mode
 operations.
 
-   The default cross-reference tool is 'gnatxref', provided by the file
-'ada-gnat-xref.el'.  One other tool is supported: 'gpr_query'.  To use
-it, add the following to '~/.emacs':
-
-     (require 'gpr-query)
-
-   To use 'gpr_query', the Ada code 'gpr_query.adb' must be compiled;
-see *note Installation::.  In addition, non-Ada code must be compiled
-with the AdaCore gcc extension '-fdump-xref'.
+   If 'gpr_query' is found in 'PATH', the default cross-reference tool
+is 'gpr_query'; otherwise it is 'gnatxref'.
 
    To use a cross reference tool other than the above, you must write
-Emacs lisp code that provides the interface to the compiler, and set
+Emacs lisp code that provides the interface to the tool, and set
 'ada-xref-tool' and the indirection variables.
 
    See 'ada-gnat-xref.el' and 'gpr-query.el' for examples.
@@ -304,7 +314,7 @@ customize.
 
    To modify a specific variable, you can directly call the function
 'customize-variable'; just type 'M-x customize-variable <RET>
-VARIABLE-NAME <RET>').
+VARIABLE-NAME <RET>'.
 
    Alternately, you can specify variable settings in the Emacs
 configuration file, '~/.emacs'.  This file is coded in Emacs lisp, and
@@ -336,6 +346,7 @@ 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'
+     Display the current subprogram name in the mode bar.
 '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.
@@ -454,15 +465,12 @@ to switch back to the main to invoke the compiler again.
 this case, 'C-c C-m' will normally be the only command needed; it will
 build the current file, rather than the last-built main.
 
-   There are three ways to change 'main':
+   There are two ways to change 'main':
 
   1. Invoke 'Ada | Set main and Build', which sets 'main' to the current
      file.
 
-  2. Invoke 'Ada | Project | Edit', edit 'main' and 'main', and click
-     '[save]'
-
-  3. Invoke 'Ada | Project | Load', and load a project file that
+  2. Invoke 'Ada | Project | Load', and load a project file that
      specifies 'main'
 
 
@@ -1096,11 +1104,11 @@ the project file.
      Non-nil means automatically change case of preceding word while
      typing.
 
-'case_identifier' [default: 'ada-case-identifier, ada-mixed-case']
-     Function to call to adjust the case of an Ada identifier.
+'case_identifier' [default: 'ada-case-identifier, mixed-case']
+     Indicates how to adjust the case of an Ada identifier.
 
-'case_keyword' [default: 'ada-case-keyword, downcase-word']
-     Function to call to adjust the case of an Ada keyword.
+'case_keyword' [default: 'ada-case-keyword, lower-case']
+     Indicates how to adjust the case of an Ada keyword.
 
 'case_strict' [default: 'ada-case-strict, t']
      If non-nil, 'ada-mixed-case' forces 'Mixed_Case' for identifiers.
@@ -1122,9 +1130,13 @@ the project file.
 'src_dir' [default: '"."']
      A list of directories to search for source files.
 
-'xref_tool' [default: 'ada-xref-tool, gnat-xref']
+'xref_tool' [default: 'ada-xref-tool']
      Cross reference tool for this project.
 
+     If 'gpr_query' is found in 'PATH', 'ada-xref-tool' defaults to
+     ''gpr_query'.  Otherwise, it defaults to ''gnat', which uses 'gnat
+     find'.
+
    The following variables are valid with the GNAT compiler:
 
 'ada_project_path' [default: '""']
@@ -1154,6 +1166,29 @@ the project file.
 'gpr_project_path' [default: '""']
      Same as 'ada_project_path'.
 
+'runtime' [default: 'nil']
+     If set, the name of the runtime, used as the value of the 'RTS'
+     command line option.
+
+'target' [default: 'nil']
+     If set, the name of the cross-compilation target, prepended to the
+     'gnat' executable name.
+
+   The following project variables are used by the 'Ada | Build' menu
+commands:
+
+'check_cmd' [default: 'ada-build-check-cmd']
+     Compiler commannd to syntax check a single file.
+
+'main' [default: basename of current file name]
+     File name of executable to build.
+
+'make_cmd' [default: 'ada-build-make-cmd']
+     Command to compile and link the application.
+
+'run_cmd' [default: 'ada-build-run-cmd']
+     Command to run the application.
+
 
 File: ada-mode.info,  Node: Moving Through Ada Code,  Next: Identifier 
completion,  Prev: Project files,  Up: Top
 
@@ -1731,7 +1766,11 @@ File: ada-mode.info,  Node: Directory structure,  Next: 
Package organization,  P
 
 'build'
      Makefile for building the user guides, publishing to the web page
-     or Gnu ELPA. Test drivers.
+     or Gnu ELPA, and building gpr-query.  The main targets are "all"
+     which builds the ada-mode ELPA packages, and "install" which builds
+     and installs gpr-query.
+
+     Test driver files used by build/Makefile and build/wisi/Makefile.
 
 'build/wisi'
      Makefile for building and testing with the wisi-based parser.
@@ -1742,6 +1781,12 @@ File: ada-mode.info,  Node: Directory structure,  Next: 
Package organization,  P
      variable EMACS_EXE, which defaults to 'emacs'; it can be overridden
      on the make command line or by an environment variable.
 
+     There are two top-level targets in this Makfile; "all" and "one".
+     "all" builds everthing and runs all the tests.  "one" runs one
+     test, which makes it easier to work on one test that is failing.
+
+     All the other targets are used by the top-level targets.
+
 'test'
      All tests for Ada mode, gpr mode, parser.
 
@@ -1904,8 +1949,7 @@ name.
      parse table '*-wy.el'.  That is compiled into an internal structure
      containing the state transitions and executable actions.  The
      actions can be any elisp form; the intent is that they be calls to
-     the action functions provided by 'wisi.el'.  'wisi-compile.el' uses
-     some features provided by 'semantic'.
+     the action functions provided by 'wisi.el'.
 
 'wisi-parse.el'
      Implements the generalized LALR parser.
@@ -2465,45 +2509,44 @@ Tag Table:
 Node: Top945
 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
+Node: Ada Reference Manual4692
+Node: gpr_query4968
+Node: Customization7646
+Node: Non-standard file names8128
+Node: Other compiler9969
+Node: Other cross-reference10548
+Node: Other customization11290
+Node: Compiling Executing14319
+Node: Compile commands15054
+Node: Compiling Examples17705
+Node: No project files18537
+Node: Set compiler options23903
+Node: Set source search path25865
+Node: Use GNAT project file28318
+Node: Use multiple GNAT project files31092
+Node: Use a Makefile33812
+Node: Compiler errors35127
+Node: Project files35944
+Node: Project file overview36971
+Node: Project file variables38515
+Node: Moving Through Ada Code43182
+Node: Identifier completion45881
+Node: Indentation46843
+Node: Statement skeletons51191
+Node: Aligning code52976
+Node: Automatic casing53921
+Node: Comment Handling56625
+Node: Key summary57144
+Node: Developer overview59771
+Node: Directory structure60111
+Node: Package organization64082
+Node: Ada mode64317
+Node: gpr mode66513
+Node: GNAT core66796
+Node: Wisi67630
+Node: OpenToken68530
+Node: ELPA69132
+Node: GNU Free Documentation License69742
+Node: Index94903
 
 End Tag Table
diff --git a/packages/ada-mode/ada-mode.texi b/packages/ada-mode/ada-mode.texi
old mode 100644
new mode 100755
index 71b612f..51c7825
--- a/packages/ada-mode/ada-mode.texi
+++ b/packages/ada-mode/ada-mode.texi
@@ -3,7 +3,7 @@
 @settitle Ada Mode
 
 @copying
-Copyright @copyright{} 1999 - 2015  Free Software Foundation, Inc.
+Copyright @copyright{} 1999 - 2016  Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -26,7 +26,7 @@ developing GNU and promoting software freedom.''
 
 @titlepage
 @sp 10
address@hidden Ada Mode Version 5.1.9
address@hidden Ada Mode Version 5.2.0
 @page
 @vskip 0pt plus 1filll
 @insertcopying
@@ -36,7 +36,7 @@ developing GNU and promoting software freedom.''
 
 @node Top, Overview, (dir), (dir)
 
-Ada Mode Version 5.1.9
+Ada Mode Version 5.2.0
 
 @ifnottex
 @insertcopying
@@ -59,6 +59,7 @@ Ada Mode Version 5.1.9
 * Developer overview::
 * GNU Free Documentation License::
 * Index::
+
 @end menu
 
 @node Overview, Installation, Top, Top
@@ -123,7 +124,6 @@ You may also want to install additional utilities:
 @menu
 * Ada Reference Manual::
 * gpr_query::
-* Upgrading::
 @end menu
 
 @node Ada Reference Manual, gpr_query, Installation, Installation
@@ -131,69 +131,83 @@ You may also want to install additional utilities:
 The ELPA package ada-ref-man includes the Ada Reference Manual and
 Annotated Ada Reference Manual in info format.
 
address@hidden gpr_query, Upgrading, Ada Reference Manual, Installation
address@hidden gpr_query, , Ada Reference Manual, Installation
 @section gpr_query
-Ada mode has support for an external cross reference
-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
-
address@hidden 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
address@hidden/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, with GNAT GPL bin first in PATH) (note that
-gnatcoll-gpl-2014-src.tar.gz unzips to gnatcoll-1.7w-src):
+
+Ada mode has support for an external cross reference tool
address@hidden, which uses compiler-generated information. In the
+case of Ada, the necessary @file{.ali} files are automatically
+generated by the standard compilation process. For other languages,
+e.g. C, C++, @file{.gli} files can be generated using the compiler
+switch @code{-fdump-xref}. @code{-fdump-xref} is an AdaCore extension,
+not available in FSF GCC.
+
address@hidden is an Ada program, which is distributed as source and
+must be built. Its source code is in the Gnu ELPA package.
+
address@hidden requires the @code{GNATCOLL} library provided by
+AdaCore, distributed with GNAT GPL 2016, and also available at Github
+(@url{https://github.com/AdaCore/gnatcoll}). (The @code{GNATCOLL}
+distributed with GNAT GPL 2015 does not compile cleanly). The notes
+below assume that the compiler is installed at @file{$prefix},
+e.g. @file{/usr/local/gnat-2016}, and that @file{$prefix/bin} is first
+on the @code{PATH}. If you are running Windows, use Cygwin @code{bash}
+to run these commands.
+
+In general, @code{gpr_query} should be compiled with the compiler
+version that is used to generate the user project @file{.ali} files;
+the @file{ali} file format can change with each compiler
+version. @code{gpr_query} creates a database of cross reference
+information; that database must be deleted if the compiler version
+changes, to force a complete rebuild.
+
address@hidden Building GNATCOLL if required
+
address@hidden may already be installed on your system: if it is,
address@hidden/lib/gnat} will contain @file{gnatcoll} GPR files. If
+not, configure (assuming the GPL 2016 version) by:
 
 @example
-tar xf ~/Downloads/gnatcoll-gpl-2014-src.tar.gz
-cd gnatcoll-1.7w-src
-./configure --prefix=/usr/gnat-gpl-2014
address@hidden on cygwin, finds cygwin as build type; not a problem
address@hidden make Gnatcoll_Build=Debug
address@hidden sudo make Gnatcoll_Build=Debug install
-make
-sudo make install
-cd ~/.emacs.d/elpa/ada-mode-5.xx/build
-make install
+tar zxf ~/Downloads/gnatcoll-gpl-2016-src.tar.gz
+cd gnatcoll-gpl-2016-src
+./configure --prefix=$prefix
 @end example
 
-To build an sqlite3 executable that is compatible with the database
-created by @code{gpr_query}:
+You should see at least the following lines at the end of the output:
 
 @example
-cd gnatcoll-1.7w-src/src/sqlite/amalgamation/
-gcc -O2 -o sqlite3 shell.c sqlite3.c -ldl -lpthread
+configure:   Sqlite:                 embedded  (see --with-sqlite)
+configure:   Projects:               yes
 @end example
 
address@hidden Upgrading,  , gpr_query, Installation
address@hidden Upgrading from previous versions
+Then, build and install:
+
address@hidden
+make
+sudo make install
address@hidden example
 
-See the file NEWS for more details; here we summarize only important
-user interface changes.
+If you are debugging @file{gpr_query}, you may want to build an
+sqlite3 executable that is compatible with the database it creates:
 
address@hidden @samp
address@hidden from 5.0.1
-    Nothing to do.
address@hidden
+cd gnatcoll-gpl-2016-src/src/sqlite/amalgamation/
+gcc -O2 -o sqlite3 shell.c sqlite3.c -ldl -lpthread
address@hidden example
 
address@hidden from 4.01
-There are many user interface and API changes between 4.01 and 5.0.1;
-we only document those that may be hard to diagnose here.
address@hidden Building @code{gpr_query}
 
address@hidden is no longer run by @code{ada-mode};
address@hidden is no longer derived from @code{prog-mode}. Use
address@hidden instead.
+To build and install @code{gpr_query}, assuming the
address@hidden GNU ELPA package is installed:
 
address@hidden
+cd ~/.emacs.d/elpa/ada-mode-5.2.0
+gprbuild -p -P gpr_query.gpr
+gprinstall -P gpr_query.gpr
address@hidden example
 
address@hidden table
address@hidden will use @code{gpr_query} for cross reference
+functions if @code{gpr_query} is found in @code{PATH}.
 
 @node Customization, Compiling Executing, Installation, Top
 @chapter Customizing Ada mode
@@ -278,20 +292,12 @@ The project variable @code{ada_xref} (default elisp 
variable
 the cross-reference-tool-specific functions for corresponding Ada mode
 operations.
 
-The default cross-reference tool is @file{gnatxref}, provided by the
-file @file{ada-gnat-xref.el}. One other tool is supported:
address@hidden To use it, add the following to @file{~/.emacs}:
-
address@hidden
-(require 'gpr-query)
address@hidden example
-
-To use @file{gpr_query}, the Ada code @file{gpr_query.adb} must be
-compiled; see @ref{Installation}. In addition, non-Ada code must be
-compiled with the AdaCore gcc extension @code{-fdump-xref}.
+If @file{gpr_query} is found in @code{PATH}, the default
+cross-reference tool is @file{gpr_query}; otherwise it is
address@hidden
 
 To use a cross reference tool other than the above, you must write
-Emacs lisp code that provides the interface to the compiler, and set
+Emacs lisp code that provides the interface to the tool, and set
 @code{ada-xref-tool} and the indirection variables.
 
 See @file{ada-gnat-xref.el} and @file{gpr-query.el} for examples.
@@ -305,7 +311,7 @@ on using customize.
 
 To modify a specific variable, you can directly call the function
 @code{customize-variable}; just type @kbd{M-x customize-variable
address@hidden @var{variable-name} @key{RET}}).
address@hidden @var{variable-name} @key{RET}}.
 
 Alternately, you can specify variable settings in the Emacs
 configuration file, @file{~/.emacs}. This file is coded in Emacs lisp,
@@ -339,6 +345,7 @@ 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
+Display the current subprogram name in the mode bar.
 @item 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
@@ -462,7 +469,7 @@ Novices and students typically work on single-file Ada 
projects. In
 this case, @kbd{C-c C-m} will normally be the only command needed; it
 will build the current file, rather than the last-built main.
 
-There are three ways to change @code{main}:
+There are two ways to change @code{main}:
 
 @enumerate
 @item
@@ -470,10 +477,6 @@ Invoke @samp{Ada | Set main and Build}, which sets 
@code{main} to
 the current file.
 
 @item
-Invoke @samp{Ada | Project | Edit}, edit @code{main} and
address@hidden, and click @samp{[save]}
-
address@hidden
 Invoke @samp{Ada | Project | Load}, and load a project file that specifies 
@code{main}
 
 @end enumerate
@@ -1153,11 +1156,11 @@ before any compiler-specific project variable.
 @item @code{auto_case}      [default: @code{ada-auto-case, t}]
 Non-nil means automatically change case of preceding word while typing.
 
address@hidden @code{case_identifier}   [default: @code{ada-case-identifier, 
ada-mixed-case}]
-Function to call to adjust the case of an Ada identifier.
address@hidden @code{case_identifier}   [default: @code{ada-case-identifier, 
mixed-case}]
+Indicates how to adjust the case of an Ada identifier.
 
address@hidden @code{case_keyword}   [default: @code{ada-case-keyword, 
downcase-word}]
-Function to call to adjust the case of an Ada keyword.
address@hidden @code{case_keyword}   [default: @code{ada-case-keyword, 
lower-case}]
+Indicates how to adjust the case of an Ada keyword.
 
 @item @code{case_strict}    [default: @code{ada-case-strict, t}]
 If non-nil, @code{ada-mixed-case} forces @code{Mixed_Case} for identifiers.
@@ -1177,15 +1180,18 @@ Separator character used in compiler search paths.
 @item @code{src_dir}        [default: @code{"."}]
 A list of directories to search for source files.
 
address@hidden @code{xref_tool}      [default: @code{ada-xref-tool, gnat-xref}]
address@hidden @code{xref_tool}      [default: @code{ada-xref-tool}]
 Cross reference tool for this project.
 
+If @code{gpr_query} is found in @code{PATH}, @code{ada-xref-tool}
+defaults to @code{'gpr_query}. Otherwise, it defaults to @code{'gnat},
+which uses @code{gnat find}.
+
 @end table
 
 The following variables are valid with the GNAT compiler:
 
 @table @asis
address@hidden defined in ada-gnat.el ada-gnat-prj-parse-emacs-file; 
alphabetical order
 @item @code{ada_project_path}   [default: @code{""}]
 @c ada-prj-get 'prj_dir, 'proc_env
 A list of directories to search for GNAT project files.
@@ -1215,7 +1221,35 @@ project file.
 @item @code{gpr_project_path}   [default: @code{""}]
 Same as @code{ada_project_path}.
 
address@hidden FIXME: add ada-build project vars
address@hidden @code{runtime} [default: @code{nil}]
address@hidden used in gnat-run-gnat
+If set, the name of the runtime, used as the value of the @code{RTS}
+command line option.
+
address@hidden @code{target} [default: @code{nil}]
address@hidden used in gnat-run-gnat, ada-gnat-xref-all
+If set, the name of the cross-compilation target, prepended to the
address@hidden executable name.
+
+
address@hidden table
+
+The following project variables are used by the @code{Ada | Build}
+menu commands:
+
address@hidden @asis
address@hidden @code{check_cmd} [default: @code{ada-build-check-cmd}]
+Compiler commannd to syntax check a single file.
+
address@hidden @code{main} [default: basename of current file name]
+File name of executable to build.
+
address@hidden @code{make_cmd} [default: @code{ada-build-make-cmd}]
+Command to compile and link the application.
+
address@hidden @code{run_cmd} [default: @code{ada-build-run-cmd}]
+Command to run the application.
+
 @end table
 
 @node Moving Through Ada Code, Identifier completion, Project files, Top
@@ -1842,12 +1876,15 @@ Generated user guide in HTML format.
 @item *.info
 Generated user guide in Emacs info format.
 
-
 @end table
 
 @item build
 Makefile for building the user guides, publishing to the web page or
-Gnu ELPA. Test drivers.
+Gnu ELPA, and building gpr-query. The main targets are ``all'' which
+builds the ada-mode ELPA packages, and ``install'' which builds and
+installs gpr-query.
+
+Test driver files used by build/Makefile and build/wisi/Makefile.
 
 @item build/wisi
 Makefile for building and testing with the wisi-based
@@ -1858,6 +1895,12 @@ The emacs used to byte-compile and run tests is given by 
the 'make'
 variable EMACS_EXE, which defaults to 'emacs'; it can be overridden on
 the make command line or by an environment variable.
 
+There are two top-level targets in this Makfile; ``all'' and
+``one''. ``all'' builds everthing and runs all the tests. ``one'' runs
+one test, which makes it easier to work on one test that is failing.
+
+All the other targets are used by the top-level targets.
+
 @item test
 All tests for Ada mode, gpr mode, parser.
 
@@ -2013,8 +2056,7 @@ compiler. @file{wisi-generate.exe} processes the grammar 
source
 @file{*-wy.el}. That is compiled into an internal structure containing
 the state transitions and executable actions. The actions can be any
 elisp form; the intent is that they be calls to the action functions
-provided by @file{wisi.el}. @file{wisi-compile.el} uses some features
-provided by @code{semantic}.
+provided by @file{wisi.el}.
 
 @item wisi-parse.el
 Implements the generalized LALR parser.
diff --git a/packages/ada-mode/ada-ref-man.el b/packages/ada-mode/ada-ref-man.el
deleted file mode 100644
index 53f60c7..0000000
--- a/packages/ada-mode/ada-ref-man.el
+++ /dev/null
@@ -1,13 +0,0 @@
-;;; ada-ref-man.el --- Ada Reference Manual 2012
-;;
-;;; Copyright (C) 2014  Free Software Foundation, Inc.
-;;
-;; Author: Stephen Leake <address@hidden>
-;; Maintainer: Stephen Leake <address@hidden>
-;; Keywords: languages
-;;  ada
-;; Package-Type: multi
-;; Version: 2012.0
-;; url: http://stephe-leake.org/ada/arm.html
-
-;;; ada-ref-man.el ends here
diff --git a/packages/ada-mode/ada-skel.el b/packages/ada-mode/ada-skel.el
index d8b6a68..4cf2cc5 100644
--- a/packages/ada-mode/ada-skel.el
+++ b/packages/ada-mode/ada-skel.el
@@ -1,6 +1,6 @@
 ;;; ada-skel.el --- Extension to Ada mode for inserting statement skeletons  
-*- lexical-binding:t -*-
 
-;; Copyright (C) 1987, 1993, 1994, 1996-2015  Free Software Foundation, Inc.
+;; Copyright (C) 1987, 1993, 1994, 1996-2016  Free Software Foundation, Inc.
 
 ;; Authors: Stephen Leake <address@hidden>
 
@@ -109,6 +109,34 @@ This could end in a token recognized by `ada-skel-expand'."
 
 )
 
+(define-skeleton ada-skel-modified-gpl
+  "Modified GPLv3 copyright/license skeleton, with automatic year and owner."
+  ()
+  "--  Copyright (C) " (format-time-string "%Y ") user-full-name " All Rights 
Reserved.\n"
+  "--\n"
+  "--  This program is free software; you can redistribute it and/or\n"
+  "--  modify it under terms of the GNU General Public License as\n"
+  "--  published by the Free Software Foundation; either version 3, or (at\n"
+  "--  your option) any later version. This program is distributed in the\n"
+  "--  hope that it will be useful, but WITHOUT ANY WARRANTY; without even\n"
+  "--  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n"
+  "--  PURPOSE. See the GNU General Public License for more details. You\n"
+  "--  should have received a copy of the GNU General Public License\n"
+  "--  distributed with this program; see file COPYING. If not, write to\n"
+  "--  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston,\n"
+  "--  MA 02110-1335, USA.\n"
+  "--\n"
+  "--  As a special exception, if other files instantiate generics from\n"
+  "--  this unit, or you link this unit with other files to produce an\n"
+  "--  executable, this  unit  does not  by itself cause  the resulting\n"
+  "--  executable to be covered by the GNU General Public License. This\n"
+  "--  exception does not however invalidate any other reasons why the\n"
+  "--  executable file  might be covered by the  GNU Public License.\n"
+  "\n"
+  "pragma License (GPL);\n"
+
+)
+
 ;; override ada-mode 4.01 autoloaded functions
 (define-obsolete-function-alias 'ada-header 'ada-skel-header "24.4"
   "Insert a descriptive header at the top of the file.")
@@ -298,6 +326,7 @@ See `ada-find-other-file' to create library level package 
body from spec."
     ("case" . ada-skel-case)
     ("copyright_license"
      ("GPL" . ada-skel-gpl)
+     ("Modified GPL" . ada-skel-modified-gpl)
      ("restricted" . ada-skel-user-restricted))
     ("declare" . ada-skel-declare)
     ("entry" . ada-skel-entry)
diff --git a/packages/ada-mode/ada-wisi.el b/packages/ada-mode/ada-wisi.el
index e076bc0..57fd495 100644
--- a/packages/ada-mode/ada-wisi.el
+++ b/packages/ada-mode/ada-wisi.el
@@ -552,6 +552,9 @@ point must be on CACHE. PREV-TOKEN is the token before the 
one being indented."
 
                 (t
                  (cl-ecase (wisi-cache-nonterm containing)
+
+                   ;; abstract_subprogram_declaration with subprogram_body
+
                    (aggregate
                     ;; test/ada_mode-nominal-child.adb
                     ;; return (Parent_Type_1
@@ -571,6 +574,8 @@ point must be on CACHE. PREV-TOKEN is the token before the 
one being indented."
                     ;; indenting 'when'; containing is 'entry'
                     (+ (current-column) ada-indent-broken))
 
+                   ;; expression_function_declaration with subprogram_body
+
                    (formal_package_declaration
                     ;; test/ada_mode-generic_package.ads
                     ;; with package A_Package_7 is
@@ -579,6 +584,8 @@ point must be on CACHE. PREV-TOKEN is the token before the 
one being indented."
                     (+ (current-column) ada-indent-broken))
 
                    ((full_type_declaration
+
+                     ;; shared code, but out of alphabetical order:
                       protected_type_declaration
                      single_protected_declaration
                      single_task_declaration
@@ -660,6 +667,8 @@ point must be on CACHE. PREV-TOKEN is the token before the 
one being indented."
                     ;; indenting keyword following 'generic'
                     (current-column))
 
+                   ;; null_procedure_declaration with subprogram_body
+
                    (object_declaration
                     (cl-ecase (wisi-cache-token containing)
                       (COLON
@@ -684,6 +693,23 @@ point must be on CACHE. PREV-TOKEN is the token before the 
one being indented."
                        (+ (current-indentation) ada-indent-broken))
                       ))
 
+                    ((package_declaration
+                     package_body)
+                    ;; test/ada_mode-nominal.ads
+                    ;; package Ada_Mode.Nominal
+                    ;; with
+                    ;;   SPARK_Mode => On
+                    ;; is
+                    ;; indenting 'with'
+                    ;;
+                    ;; test/ada_mode-nominal.adb
+                    ;; package body Ada_Mode.Nominal
+                    ;; with
+                    ;;   SPARK_Mode => On
+                    ;; is
+                    (save-excursion
+                       (current-column)))
+
                    (private_extension_declaration
                     (cl-ecase (wisi-cache-token cache)
                       (WITH
@@ -708,6 +734,8 @@ point must be on CACHE. PREV-TOKEN is the token before the 
one being indented."
                     ;; indenting 'with'
                     (current-indentation))
 
+                   ;; protected_type_declaration with full_type_declaration
+
                    (qualified_expression
                     ;; test/ada_mode-nominal-child.ads
                     ;; Child_Obj_5 : constant Child_Type_1 :=
@@ -715,6 +743,9 @@ point must be on CACHE. PREV-TOKEN is the token before the 
one being indented."
                     ;;     (Parent_Element_1 => 1,
                     (ada-wisi-indent-cache ada-indent-broken containing))
 
+                   ;; single_protected_declaration with full_type_declaration
+                   ;; single_task_declaration with full_type_declaration
+
                    (statement
                     (cl-case (wisi-cache-token containing)
                       (label_opt
@@ -730,11 +761,13 @@ point must be on CACHE. PREV-TOKEN is the token before 
the one being indented."
                        (ada-wisi-indent-cache ada-indent-broken cache))
                       ))
 
-                   ((abstract_subprogram_declaration
-                     expression_function_declaration
-                     subprogram_body
+                   ((subprogram_body
                      subprogram_declaration
                      subprogram_specification
+
+                     ;; shared code, but out of alphabetical order:
+                     abstract_subprogram_declaration
+                     expression_function_declaration
                      null_procedure_declaration)
                     (cl-ecase (wisi-cache-token cache)
                       (IS
@@ -765,6 +798,8 @@ point must be on CACHE. PREV-TOKEN is the token before the 
one being indented."
                        (current-column))
                       ))
 
+                   ;; subtype_declaration, task_type_declaration with 
full_type_declaration
+
                    ))))
              )))) ;; end statement-other
 
@@ -1086,6 +1121,13 @@ cached token, return new indentation for point."
                   ;; not indenting keyword following 'generic'
                   (+ (current-column) ada-indent-broken))
 
+                  (paren_expression
+                  ;; test/ada_mode-expression_functions.ads
+                  ;; (for some X of Y =>
+                  ;;    Pred (X));
+                  ;; indenting "Pred"
+                   (+ (current-column) ada-indent))
+
                  (primary
                   ;; test/ada_mode-quantified_expressions.adb
                   ;; if (for some J in 1 .. 10 =>
@@ -1201,6 +1243,14 @@ cached token, return new indentation for point."
                 ;;   Constant_Indexing => Constant_Reference,
                 ;; indenting 'Constant_Indexing'; point is on 'with'
                 (+ (current-indentation) ada-indent-broken))
+
+               (derived_type_definition
+                ;; test/ada_mode-nominal-child.ads
+                ;; type Child_Type_1 is new Parent_Type_1 with
+                ;;   -- comment between 'with' and 'record'
+                ;;    record
+                ;; indenting comment
+                (+ (current-indentation) ada-indent-broken))
                ))
 
             ;; otherwise just hanging
@@ -1294,10 +1344,9 @@ cached token, return new indentation for point."
            indent)
 
           (t
-           (or
-            prev-indent
-            next-indent
-            (floor indent ada-indent)))
+           ;; prev-indent and next-indent are both set here;
+           ;; could add more checks to decide which one to use.
+            prev-indent)
           )
 
          ;; not forcing gnat style
diff --git a/packages/ada-mode/dir b/packages/ada-mode/dir
index 6311731..f6b351a 100644
--- a/packages/ada-mode/dir
+++ b/packages/ada-mode/dir
@@ -5,7 +5,7 @@ The first time you invoke Info you start off looking at this 
node.
 File: dir,     Node: Top       This is the top of the INFO tree
 
   This (the Directory node) gives a menu of major topics.
-  Typing "q" exits, "?" lists all Info commands, "d" returns here,
+  Typing "q" exits, "H" lists all Info commands, "d" returns here,
   "h" gives a primer for first-timers,
   "mEmacs<Return>" visits the Emacs manual, etc.
 
diff --git a/packages/ada-mode/gnat-core.el b/packages/ada-mode/gnat-core.el
index f8d4f31..c9cca70 100644
--- a/packages/ada-mode/gnat-core.el
+++ b/packages/ada-mode/gnat-core.el
@@ -3,7 +3,7 @@
 ;;
 ;; GNAT is provided by AdaCore; see http://libre.adacore.com/
 ;;
-;;; 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>
@@ -68,6 +68,10 @@
     (message "no project file search path set")
     ))
 
+(defun ada-gnat-default-prj (prj)
+  "For `ada-prj-default-list'."
+  (gnat-prj-add-prj-dir default-directory prj))
+
 (defun gnat-prj-parse-emacs-one (name value project)
   "Handle gnat-specific Emacs Ada project file settings.
 Return new PROJECT if NAME recognized, nil otherwise.
@@ -89,7 +93,9 @@ See also `gnat-parse-emacs-final'."
       (setq project
            (plist-put project
                       'gpr_file
-                      (expand-file-name (substitute-in-file-name value))))
+                      (or
+                       (locate-file (substitute-in-file-name value) 
(ada-prj-get 'prj_dir))
+                       (expand-file-name (substitute-in-file-name value)))))
       project)
      )))
 
@@ -109,7 +115,7 @@ See also `gnat-parse-emacs-final'."
 
 (defun gnat-get-paths-1 (src-dirs prj-dirs)
   "Append list of source and project dirs in current gpr project to SRC-DIRS, 
PRJ-DIRS.
-Uses 'gnat list'.  Returns new (SRC-DIRS PRJ-DIRS)."
+Uses `gnat list'.  Returns new (SRC-DIRS PRJ-DIRS)."
   (with-current-buffer (gnat-run-buffer)
     ;; gnat list -v -P can return status 0 or 4; always lists compiler dirs
     ;;
@@ -287,9 +293,16 @@ Assumes current buffer is (gnat-run-buffer)"
   (let* ((project-file-switch
          (when (ada-prj-get 'gpr_file)
            (concat "-P" (file-name-nondirectory (ada-prj-get 'gpr_file)))))
-        (cmd (append (list command) (list project-file-switch) switches-args)))
-
-    (gnat-run "gnat" cmd nil expected-status)
+         (target-gnat (concat (ada-prj-get 'target) "gnat"))
+         ;; gnat list understands --RTS without a fully qualified
+         ;; path, gnat find (in particular) doesn't (but it doesn't
+         ;; need to, it uses the ALI files found via the GPR)
+         (runtime
+          (when (and (ada-prj-get 'runtime) (string= command "list"))
+            (list (concat "--RTS=" (ada-prj-get 'runtime)))))
+        (cmd (append (list command) (list project-file-switch) runtime 
switches-args)))
+
+    (gnat-run target-gnat cmd nil expected-status)
     ))
 
 (defun gnat-run-no-prj (command &optional dir)
@@ -464,6 +477,9 @@ list."
        )
       )))
 
+;;; setup
+(add-to-list 'ada-prj-default-list 'ada-gnat-default-prj)
+
 (provide 'gnat-core)
 
 ;; end of file
diff --git a/packages/ada-mode/gpr-grammar-wy.el 
b/packages/ada-mode/gpr-grammar-wy.el
old mode 100644
new mode 100755
index 1c1381e..342d832
--- a/packages/ada-mode/gpr-grammar-wy.el
+++ b/packages/ada-mode/gpr-grammar-wy.el
@@ -1,4 +1,4 @@
-;;; gpr-grammar-wy.el --- Generated parser support file
+;;; gpr-grammar-wy.el --- Generated parser support file  -*- lexical-binding:t 
-*-
 
 ;; Copyright (C) 2013 - 2015 Free Software Foundation, Inc.
 
diff --git a/packages/ada-mode/gpr-mode.info b/packages/ada-mode/gpr-mode.info
index 48bcae5..5a5fc23 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 6.0 from
+This is gpr-mode.info, produced by makeinfo version 6.1 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
old mode 100644
new mode 100755
index ccb980e..222f2a5
--- a/packages/ada-mode/gpr-query.el
+++ b/packages/ada-mode/gpr-query.el
@@ -3,7 +3,7 @@
 ;; gpr-query supports Ada and any gcc language that supports the
 ;; AdaCore -fdump-xref switch (which includes C, C++).
 ;;
-;; Copyright (C) 2013 - 2015  Free Software Foundation, Inc.
+;; Copyright (C) 2013 - 2016  Free Software Foundation, Inc.
 
 ;; Author: Stephen Leake <address@hidden>
 ;; Maintainer: Stephen Leake <address@hidden>
@@ -195,7 +195,7 @@ Return buffer that holds output."
 
 (defun gpr-query-get-src-dirs (src-dirs)
   "Append list of source dirs in current gpr project to SRC-DIRS.
-Uses 'gpr_query'. Returns new list."
+Uses `gpr_query'. Returns new list."
 
   (with-current-buffer (gpr-query--session-buffer (gpr-query-cached-session))
     (gpr-query-session-send "source_dirs" t)
@@ -210,7 +210,7 @@ Uses 'gpr_query'. Returns new list."
 
 (defun gpr-query-get-prj-dirs (prj-dirs)
   "Append list of project dirs in current gpr project to PRJ-DIRS.
-Uses 'gpr_query'. Returns new list."
+Uses `gpr_query'. Returns new list."
 
   (with-current-buffer (gpr-query--session-buffer (gpr-query-cached-session))
     (gpr-query-session-send "project_path" t)
@@ -432,6 +432,9 @@ Enable mode if ARG is positive."
   "For `ada-xref-refresh-function', using gpr_query."
   (interactive)
   ;; need to kill session to get changed env vars etc
+  ;;
+  ;; sometimes need to delete database, if the compiler version
+  ;; changed; that's beyond the scope of this package.
   (let ((session (gpr-query-cached-session)))
     (gpr-query-kill-session session)
     (gpr-query--start-process session)))
@@ -634,14 +637,9 @@ Enable mode if ARG is positive."
   )
 
 (provide 'gpr-query)
-(provide 'ada-xref-tool)
 
 (add-to-list 'compilation-error-regexp-alist-alist
-            (cons 'gpr-query-ident-file       
gpr-query-ident-file-regexp-alist))
-
-(unless (and (boundp 'ada-xref-tool)
-            (default-value 'ada-xref-tool))
-  (setq ada-xref-tool 'gpr_query))
+            (cons 'gpr-query-ident-file gpr-query-ident-file-regexp-alist))
 
 (ada-gpr-query)
 
diff --git a/packages/ada-mode/gpr_query.adb b/packages/ada-mode/gpr_query.adb
new file mode 100755
index 0000000..3307aaf
--- /dev/null
+++ b/packages/ada-mode/gpr_query.adb
@@ -0,0 +1,732 @@
+--  Abstract :
+--
+--  Support Emacs Ada mode and gpr-query minor mode queries about
+--  GNAT projects and cross reference data
+--
+--  requires gnatcoll 1.7w 20140330, gnat 7.2.1
+--
+--  Copyright (C) 2014-2016 Free Software Foundation All Rights Reserved.
+--
+--  This program is free software; you can redistribute it and/or
+--  modify it under terms of the GNU General Public License as
+--  published by the Free Software Foundation; either version 3, 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
+--  distributed with this program; see file COPYING. If not, write to
+--  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston,
+--  MA 02110-1335, USA.
+
+pragma License (GPL);
+
+with Ada.Characters.Handling;
+with Ada.Command_Line;
+with Ada.Directories;
+with Ada.Environment_Variables;
+with Ada.Exceptions.Traceback;
+with Ada.Strings.Fixed;
+with Ada.Strings.Unbounded;
+with Ada.Text_IO;
+with GNAT.Command_Line;
+with GNAT.Directory_Operations;
+with GNAT.OS_Lib;
+with GNAT.Strings;
+with GNAT.Traceback.Symbolic;
+with GNATCOLL.Arg_Lists;
+with GNATCOLL.Paragraph_Filling;
+with GNATCOLL.Projects;
+with GNATCOLL.SQL.Sqlite;
+with GNATCOLL.Traces; use GNATCOLL.Traces;
+with GNATCOLL.Utils;
+with GNATCOLL.VFS;
+with GNATCOLL.VFS_Utils;
+with GNATCOLL.Xref;
+with Prj;
+procedure Gpr_Query is
+   use GNATCOLL;
+
+   Me : constant GNATCOLL.Traces.Trace_Handle := GNATCOLL.Traces.Create 
("gpr_query");
+
+   Db_Error        : exception;
+   Invalid_Command : exception;
+
+   function "+" (Item : in Ada.Strings.Unbounded.Unbounded_String) return 
String
+     renames Ada.Strings.Unbounded.To_String;
+
+   function "+" (Item : in GNATCOLL.VFS.Filesystem_String) return String
+   is begin
+      return String (Item);
+   end "+";
+
+   procedure Process_Line (Line : String);
+   --  Process a full line of commands.
+   --  Raise Invalid_Command when the command is invalid.
+
+   function Get_Entity (Arg : String) return GNATCOLL.Xref.Entity_Information;
+   --  Return the entity matching the "name:file:line:column" argument
+
+   type My_Xref_Database is new GNATCOLL.Xref.Xref_Database with null record;
+   --  Derived so we can override Image to output full paths
+
+   overriding function Image (Self : My_Xref_Database; File : 
GNATCOLL.VFS.Virtual_File) return String;
+   function Image (Self : GNATCOLL.Xref.Entity_Information) return String;
+   --  Return a display version of the argument
+
+   Xref              : aliased My_Xref_Database;
+   Env               : GNATCOLL.Projects.Project_Environment_Access;
+   Tree              : aliased GNATCOLL.Projects.Project_Tree;
+   Previous_Progress : Natural                          := 0;
+   Progress_Reporter : access procedure (Current, Total : Integer) := null;
+
+   --  Subprogram specs for subprograms used before bodies
+   procedure Check_Arg_Count (Args : in GNATCOLL.Arg_Lists.Arg_List; Expected 
: in Integer);
+   procedure Dump (Curs : in out GNATCOLL.Xref.Entities_Cursor'Class);
+   procedure Dump (Refs : in out GNATCOLL.Xref.References_Cursor'Class);
+   --  Display the results of a query
+
+   procedure Put (Item : GNATCOLL.VFS.File_Array);
+
+   generic
+      with function Compute
+        (Self   : in GNATCOLL.Xref.Xref_Database'Class;
+         Entity : in GNATCOLL.Xref.Entity_Information)
+        return GNATCOLL.Xref.Entity_Information;
+   procedure Process_Command_Single (Args : GNATCOLL.Arg_Lists.Arg_List);
+   --  Get the entity identified by Args, which must contain a single
+   --  argument. Then call Compute, and output the result.
+   --
+   --  Appropriate for queries that return a single entity result.
+
+   procedure Process_Command_Single (Args : GNATCOLL.Arg_Lists.Arg_List)
+   is
+      use GNATCOLL.Arg_Lists;
+      use GNATCOLL.Xref;
+
+      Entity : Entity_Information;
+      Comp   : Entity_Information;
+   begin
+      Check_Arg_Count (Args, 1);
+
+      Entity := Get_Entity (Nth_Arg (Args, 1));
+      Comp := Compute (Xref, Entity);
+      if Comp /= No_Entity then
+         Ada.Text_IO.Put_Line (Image (Comp));
+      end if;
+   end Process_Command_Single;
+
+   generic
+      with procedure Compute
+        (Self   : in     GNATCOLL.Xref.Xref_Database'Class;
+         Entity : in     GNATCOLL.Xref.Entity_Information;
+         Cursor :    out GNATCOLL.Xref.Entities_Cursor'Class);
+   procedure Process_Command_Multiple (Args : GNATCOLL.Arg_Lists.Arg_List);
+
+   procedure Process_Command_Multiple (Args : GNATCOLL.Arg_Lists.Arg_List)
+   is
+      use GNATCOLL.Arg_Lists;
+      use GNATCOLL.Xref;
+
+      Entity      : Entity_Information;
+      Descendants : Recursive_Entities_Cursor;
+
+      --  Apparently a generic formal parameter cannot match a subprogram 
access type, so we need this:
+      procedure Do_Compute
+        (Self   : in     GNATCOLL.Xref.Xref_Database'Class;
+         Entity : in     GNATCOLL.Xref.Entity_Information;
+         Cursor :    out GNATCOLL.Xref.Entities_Cursor'Class)
+      is begin
+         Compute (Self, Entity, Cursor);
+      end Do_Compute;
+   begin
+      Check_Arg_Count (Args, 1);
+
+      Entity := Get_Entity (Nth_Arg (Args, 1));
+
+      Recursive
+        (Self    => Xref'Unchecked_Access,
+         Entity  => Entity,
+         Compute => Do_Compute'Unrestricted_Access,
+         Cursor  => Descendants);
+
+      Dump (Descendants);
+
+   end Process_Command_Multiple;
+
+   --  Command procedures; Args is the command line.
+   --
+   --  Infrastructure commands
+   procedure Process_Help (Args : GNATCOLL.Arg_Lists.Arg_List);
+   procedure Process_Refresh (Args : GNATCOLL.Arg_Lists.Arg_List);
+
+   --  Queries; alphabetical
+   procedure Process_Overridden is new Process_Command_Single 
(GNATCOLL.Xref.Overrides);
+   procedure Process_Overriding is new Process_Command_Multiple 
(GNATCOLL.Xref.Overridden_By);
+   procedure Process_Parent_Types is new Process_Command_Multiple 
(GNATCOLL.Xref.Parent_Types);
+   procedure Process_Project_Path (Args : GNATCOLL.Arg_Lists.Arg_List);
+   procedure Process_Refs (Args : GNATCOLL.Arg_Lists.Arg_List);
+   procedure Process_Source_Dirs (Args : GNATCOLL.Arg_Lists.Arg_List);
+
+   type Command_Descr is record
+      Name    : GNAT.Strings.String_Access;
+      Args    : GNAT.Strings.String_Access;
+      Help    : GNAT.Strings.String_Access;
+      Handler : access procedure (Args : GNATCOLL.Arg_Lists.Arg_List);
+   end record;
+
+   Commands : constant array (Natural range <>) of Command_Descr :=
+     ((new String'("help"),
+       new String'("[command or variable name]"),
+       new String'("Display the list of commands and their syntax."),
+       Process_Help'Access),
+
+      (new String'("refresh"),
+       null,
+       new String'("Refresh the contents of the xref database."),
+       Process_Refresh'Access),
+
+      --  queries
+
+      (new String'("overridden"),
+       new String'("name:file:line:column"),
+       new String'("The entity that is overridden by the parameter"),
+       Process_Overridden'Access),
+
+      (new String'("overriding"),
+       new String'("name:file:line:column"),
+       new String'("The entities that override the parameter"),
+       Process_Overriding'Access),
+
+      (new String'("parent_types"),
+       new String'("name:file:line:column"),
+       new String'("The parent types of the entity."),
+       Process_Parent_Types'Access),
+
+      (new String'("project_path"),
+       null,
+       new String'("The project search path."),
+       Process_Project_Path'Access),
+
+      (new String'("refs"),
+       new String'("name:file:line:column"),
+       new String'("All known references to the entity."),
+       Process_Refs'Access),
+
+      (new String'("source_dirs"),
+       null,
+       new String'("The project source directories, recursively."),
+       Process_Source_Dirs'Access));
+
+   --  Parsed command line info
+   Cmdline              : GNAT.Command_Line.Command_Line_Configuration;
+   Commands_From_Switch : aliased GNAT.Strings.String_Access;
+   DB_Name              : aliased GNAT.Strings.String_Access := new 
String'("gpr_query.db");
+   Force_Refresh        : aliased Boolean;
+   Nightly_DB_Name      : aliased GNAT.Strings.String_Access;
+   Show_Progress        : aliased Boolean;
+   Project_Name         : aliased GNAT.Strings.String_Access;
+   Traces_Config_File   : aliased GNAT.Strings.String_Access;
+   Gpr_Config_File      : aliased GNAT.Strings.String_Access;
+   ALI_Encoding         : aliased GNAT.Strings.String_Access := new 
String'("");
+
+   ----------
+   --  Procedure bodies, alphabetical
+
+   procedure Display_Progress (Current, Total : Integer) is
+      Now : constant Integer := Integer (Float'Floor
+        (Float (Current) / Float (Total) * 100.0));
+   begin
+      if Now /= Previous_Progress then
+         Ada.Text_IO.Put_Line
+           ("completed" & Current'Img
+              & " out of" & Total'Img
+              & " (" & GNATCOLL.Utils.Image (Now, Min_Width => 0) & "%)...");
+         Previous_Progress := Now;
+      end if;
+   end Display_Progress;
+
+   procedure Dump (Curs : in out GNATCOLL.Xref.Entities_Cursor'Class)
+   is
+      use GNATCOLL.Xref;
+   begin
+      while Curs.Has_Element loop
+         Ada.Text_IO.Put_Line (Image (Curs.Element));
+         Curs.Next;
+      end loop;
+   end Dump;
+
+   procedure Dump (Refs : in out GNATCOLL.Xref.References_Cursor'Class)
+   is
+      use GNATCOLL.Xref;
+   begin
+      while Has_Element (Refs) loop
+         declare
+            Ref : constant Entity_Reference := Refs.Element;
+         begin
+            Ada.Text_IO.Put_Line (Xref.Image (Ref) & " (" & (+Ref.Kind) & ")");
+         end;
+         Next (Refs);
+      end loop;
+   end Dump;
+
+   function Get_Entity (Arg : String) return GNATCOLL.Xref.Entity_Information
+   is
+      use GNAT.Directory_Operations;
+      use GNATCOLL.Xref;
+
+      Words  : GNAT.Strings.String_List_Access := GNATCOLL.Utils.Split (Arg, 
On => ':');
+      Ref    : GNATCOLL.Xref.Entity_Reference;
+   begin
+      case Words'Length is
+      when 4         =>
+         Ref := Xref.Get_Entity
+           (Name     => Words (Words'First).all,
+            File     => Format_Pathname
+              (Style => UNIX,
+               Path  => Words (Words'First + 1).all),
+            Project  => GNATCOLL.Projects.No_Project,
+            Line     => Integer'Value (Words (Words'First + 2).all),
+            Column   => Visible_Column
+              (Integer'Value (Words (Words'First + 3).all)));
+
+      when 3 =>
+         Ref := Xref.Get_Entity
+           (Name     => Words (Words'First).all,
+            File     => Format_Pathname
+              (Style => UNIX,
+               Path  => Words (Words'First + 1).all),
+            Project  => GNATCOLL.Projects.No_Project,
+            Line     => Integer'Value (Words (Words'First + 2).all));
+
+      when 2 =>
+         Ref := Xref.Get_Entity
+           (Name     => Words (Words'First).all,
+            File     => Format_Pathname
+              (Style => UNIX,
+               Path  => Words (Words'First + 1).all),
+            Project  => GNATCOLL.Projects.No_Project);
+
+      --  Xref.Get_Entity treats 'File => ""' as searching for pre-defined 
entities such as "Integer".
+
+      when others =>
+         raise Invalid_Command with "Invalid parameter '" & Arg & "', 
expecting name:file:line:column";
+      end case;
+
+      GNAT.Strings.Free (Words);
+
+      if Ref.Entity = GNATCOLL.Xref.No_Entity then
+         Ada.Text_IO.Put_Line ("Error: entity not found '" & Arg & "'");
+
+      elsif GNATCOLL.Xref.Is_Fuzzy_Match (Ref.Entity) then
+         Ada.Text_IO.Put_Line ("warning: fuzzy match for the entity");
+         --  FIXME: gnat-query.el look for this, prompt for reparse?
+      end if;
+
+      return Ref.Entity;
+   end Get_Entity;
+
+   overriding function Image (Self : My_Xref_Database; File : 
GNATCOLL.VFS.Virtual_File) return String
+   is
+      pragma Unreferenced (Self);
+   begin
+      return File.Display_Full_Name;
+   end Image;
+
+   function Image (Self : GNATCOLL.Xref.Entity_Information) return String
+   is
+      use GNATCOLL.Xref;
+   begin
+      if Self = No_Entity then
+         return "Unknown entity";
+      else
+         declare
+            Decl : constant Entity_Declaration := Xref.Declaration (Self);
+         begin
+            if Is_Predefined_Entity (Decl) then
+               return "predefined entity: " & (+Decl.Name);
+            else
+               return Xref.Image (Decl.Location);
+            end if;
+         end;
+      end if;
+   end Image;
+
+   procedure Check_Arg_Count (Args : in GNATCOLL.Arg_Lists.Arg_List; Expected 
: in Integer)
+   is
+      Count : constant Integer := GNATCOLL.Arg_Lists.Args_Length (Args);
+   begin
+      if Count /= Expected then
+         raise Invalid_Command with "Invalid number of arguments" & 
Integer'Image (Count) &
+           "; expecting" & Integer'Image (Expected);
+      end if;
+   end Check_Arg_Count;
+
+   procedure Process_Help (Args : GNATCOLL.Arg_Lists.Arg_List)
+   is
+      use Ada.Text_IO;
+      use GNATCOLL.Arg_Lists;
+      use type GNAT.Strings.String_Access;
+   begin
+      for C in Commands'Range loop
+         if Args_Length (Args) <= 0 -- Empty_Command_Line returns -1
+           or else Nth_Arg (Args, 1) = Commands (C).Name.all
+         then
+            Put ("  " & Commands (C).Name.all);
+            if Commands (C).Args = null then
+               New_Line;
+            else
+               Put_Line (" " & Commands (C).Args.all);
+            end if;
+
+            Put
+              (Ada.Strings.Unbounded.To_String
+                 (GNATCOLL.Paragraph_Filling.Knuth_Fill
+                    (Commands (C).Help.all,
+                     Max_Line_Length => 70,
+                     Line_Prefix     => "      ")));
+         end if;
+      end loop;
+      New_Line;
+      Put_Line ("'exit' to quit");
+   end Process_Help;
+
+   procedure Process_Line (Line : String)
+   is
+      Expr : GNAT.Strings.String_List_Access;
+   begin
+      if Ada.Strings.Fixed.Trim (Line, Ada.Strings.Both) = "" then
+         return;
+      end if;
+
+      Expr := GNATCOLL.Utils.Split (Line, On => ';');
+
+      for C in Expr'Range loop
+         if Ada.Strings.Fixed.Trim (Expr (C).all, Ada.Strings.Both) = "" then
+            null;
+
+         else
+            declare
+               use GNATCOLL.Arg_Lists;
+               List  : constant Arg_List := Parse_String (Expr (C).all, Mode 
=> Separate_Args);
+               Cmd   : constant String   := Ada.Characters.Handling.To_Lower 
(Get_Command (List));
+               Found : Boolean           := False;
+            begin
+               for Co in Commands'Range loop
+                  if Commands (Co).Name.all = Cmd then
+                     Commands (Co).Handler (List);
+                     Found := True;
+                     exit;
+                  end if;
+               end loop;
+
+               if not Found then
+                  raise Invalid_Command with "Invalid command: '" & Cmd & "'";
+               end if;
+            end;
+
+         end if;
+      end loop;
+
+      GNAT.Strings.Free (Expr);
+   end Process_Line;
+
+   procedure Process_Project_Path (Args : GNATCOLL.Arg_Lists.Arg_List)
+   is
+      pragma Unreferenced (Args);
+      Dirs : constant GNATCOLL.VFS.File_Array := 
GNATCOLL.Projects.Predefined_Project_Path (Env.all);
+   begin
+      Put (Dirs);
+   end Process_Project_Path;
+
+   procedure Process_Refresh (Args : GNATCOLL.Arg_Lists.Arg_List)
+   is
+      use type GNATCOLL.Projects.Project_Environment_Access;
+      pragma Unreferenced (Args);
+   begin
+      Xref.Parse_All_LI_Files
+        (Tree                => Tree,
+         Project             => Tree.Root_Project,
+         Parse_Runtime_Files => False, --  True encounters bug in 
gnatcoll.projects; null pointer
+         Show_Progress       => Progress_Reporter,
+         ALI_Encoding        => ALI_Encoding.all,
+         From_DB_Name        => Nightly_DB_Name.all,
+         To_DB_Name          => DB_Name.all,
+         Force_Refresh       => Force_Refresh);
+   end Process_Refresh;
+
+   procedure Process_Refs (Args : GNATCOLL.Arg_Lists.Arg_List)
+   is
+      use GNATCOLL.Arg_Lists;
+   begin
+      Check_Arg_Count (Args, 1);
+
+      declare
+         use GNATCOLL.Xref;
+         Entity  : constant Entity_Information := Get_Entity (Nth_Arg (Args, 
1));
+         Refs    : References_Cursor;
+      begin
+         Xref.References (Entity, Cursor => Refs);
+         Dump (Refs);
+      end;
+   end Process_Refs;
+
+   procedure Process_Source_Dirs (Args : GNATCOLL.Arg_Lists.Arg_List)
+   is
+      pragma Unreferenced (Args);
+      use GNATCOLL.VFS;
+      use GNATCOLL.Projects;
+
+      Dirs : constant File_Array := Source_Dirs
+        (Project   => Tree.Root_Project,
+         Recursive => True) &
+        Predefined_Source_Path (Env.all);
+   begin
+      Put (Dirs);
+   end Process_Source_Dirs;
+
+   procedure Put (Item : GNATCOLL.VFS.File_Array)
+   is
+      use GNATCOLL.VFS;
+   begin
+      for I in Item'Range loop
+         Ada.Text_IO.Put_Line (+Full_Name (Item (I)));
+      end loop;
+   end Put;
+
+begin
+   declare
+      use GNAT.Command_Line;
+   begin
+      Set_Usage
+        (Cmdline,
+         Help => "Query project info and cross-references on source code. See 
ada-mode docs for more help.");
+
+      --  Switch variable alphabetic order
+      Define_Switch
+        (Cmdline,
+         Output      => ALI_Encoding'Access,
+         Long_Switch => "--encoding=",
+         Switch      => "-e=",
+         Help        => "The character encoding used for source and ALI 
files");
+      Define_Switch
+        (Cmdline,
+         Output      => Commands_From_Switch'Access,
+         Switch      => "-c:",
+         Long_Switch => "--command=",
+         Help        => "Execute the commands from ARG, and exit");
+      Define_Switch
+        (Cmdline,
+         Output      => DB_Name'Access,
+         Long_Switch => "--db=",
+         Help        => "Specifies the name of the database (or ':memory:')");
+      Define_Switch
+        (Cmdline,
+         Output      => Force_Refresh'Access,
+         Long_Switch => "--force_refresh",
+         Help        => "Force rebuilding the database.");
+      Define_Switch
+        (Cmdline,
+         Output      => Gpr_Config_File'Access,
+         Long_Switch => "--autoconf=",
+         Help        => "Specify the gpr configuration file (.cgpr)");
+      Define_Switch
+        (Cmdline,
+         Output      => Nightly_DB_Name'Access,
+         Long_Switch => "--nightlydb=",
+         Help        => "Specifies the name of a prebuilt database");
+      Define_Switch
+        (Cmdline,
+         Output      => Project_Name'Access,
+         Switch      => "-P:",
+         Long_Switch => "--project=",
+         Help        => "Load the given project (mandatory)");
+      Define_Switch
+        (Cmdline,
+         Output      => Show_Progress'Access,
+         Long_Switch => "--display_progress",
+         Switch      => "-d",
+         Help        => "Show progress as LI files are parsed");
+      Define_Switch
+        (Cmdline,
+         Output      => Traces_Config_File'Access,
+         Long_Switch => "--tracefile=",
+         Help        => "Specify a traces configuration file");
+
+      Getopt (Cmdline, Callback => null);
+   end;
+
+   if Project_Name.all = "" then
+      Ada.Text_IO.Put_Line ("No project file specified");
+      GNAT.Command_Line.Display_Help (Cmdline);
+      return;
+   end if;
+
+   --  Only trace if user specifies --tracefile
+   if Traces_Config_File.all /= "" and then GNAT.OS_Lib.Is_Regular_File 
(Traces_Config_File.all) then
+      GNATCOLL.Traces.Parse_Config_File
+        (Filename         => Traces_Config_File.all,
+         Force_Activation => False);
+      Trace (Me, "trace enabled");
+
+      --  Prj.* not controlled by Traces
+      Prj.Current_Verbosity := Prj.High;
+   end if;
+
+   GNATCOLL.Projects.Initialize (Env); -- for register_default_language
+
+   if Gpr_Config_File.all /= "" and then GNAT.OS_Lib.Is_Regular_File 
(Gpr_Config_File.all) then
+      Env.Set_Config_File
+        (GNATCOLL.VFS.Create_From_UTF8
+           (GNAT.OS_Lib.Normalize_Pathname
+              (Name => Gpr_Config_File.all,
+               Directory => GNAT.Directory_Operations.Get_Current_Dir)));
+   else
+      --  Apparently Ada language extensions are already registered (sigh)
+
+      Env.Register_Default_Language_Extension
+        (Language_Name       => "C",
+         Default_Spec_Suffix => ".h",
+         Default_Body_Suffix => ".c");
+
+      Env.Register_Default_Language_Extension
+        (Language_Name       => "C++",
+         Default_Spec_Suffix => ".hh",
+         Default_Body_Suffix => ".cpp");
+
+   end if;
+
+   declare
+      use Ada.Environment_Variables;
+      use Ada.Text_IO;
+      use GNATCOLL.VFS;
+      use GNATCOLL.VFS_Utils;
+      use GNAT.Directory_Operations;
+      use type GNAT.Strings.String_Access;
+
+      Gpr_Project_Path : constant String :=
+        (if Exists ("GPR_PROJECT_PATH") then Ada.Directories.Current_Directory 
&
+           GNAT.OS_Lib.Path_Separator &
+           Value ("GPR_PROJECT_PATH")
+         else Ada.Directories.Current_Directory);
+
+      Path : constant Virtual_File := -- must be an absolute file name
+        (if Is_Absolute_Path (+Project_Name.all) then
+           Create_From_UTF8 (Project_Name.all, Normalize => True)
+         else
+           Locate_Regular_File (+Project_Name.all, From_Path 
(+Gpr_Project_Path)));
+   begin
+      if not Path.Is_Regular_File then
+         Put (Project_Name.all & ": not found on path " & Gpr_Project_Path);
+         Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
+         return;
+      end if;
+
+      Trace (Me, "using project file " & (+Path.Full_Name));
+
+      if Show_Progress then
+         Progress_Reporter := Display_Progress'Unrestricted_Access;
+      end if;
+
+      begin
+         --  Recompute_View => True registers all the source files
+         --  (among other things), so we will know that a .[ag]li
+         --  belongs to this project
+         Tree.Load
+           (Path, Env,
+            Errors         => Ada.Text_IO.Put_Line'Access,
+            Recompute_View => True);
+      exception
+      when GNATCOLL.Projects.Invalid_Project =>
+         Ada.Text_IO.Put_Line ("project search path:");
+         Put (GNATCOLL.Projects.Predefined_Project_Path (Env.all));
+         raise GNATCOLL.Projects.Invalid_Project with +Path.Full_Name & ": 
invalid project";
+      end;
+   end;
+
+   if DB_Name.all /= ":memory:" then
+      declare
+         use GNATCOLL.VFS;
+
+         N    : constant String := DB_Name.all;
+         Temp : Virtual_File    := Tree.Root_Project.Object_Dir;
+         Dir2 : Virtual_File;
+      begin
+         GNAT.Strings.Free (DB_Name);
+
+         --  If the project does not have an object directory, create
+         --  the database in the directory containing the project file.
+         if Temp = No_File then
+            Temp := Tree.Root_Project.Project_Path.Dir;
+         end if;
+
+         Temp := Create_From_Base (Base_Dir => Temp.Full_Name.all, Base_Name 
=> +N);
+         Dir2 := Create (Temp.Dir_Name);
+
+         if not Dir2.Is_Directory then
+            Dir2.Make_Dir (Recursive => True);
+         end if;
+
+         DB_Name := new String'(Temp.Display_Full_Name);
+      end;
+   end if;
+
+   declare
+      use type GNAT.Strings.String_Access;
+      Error : GNAT.Strings.String_Access;
+   begin
+      Trace (Me, "using database " & DB_Name.all);
+
+      Setup_DB
+        (Self  => Xref,
+         Tree  => Tree'Unchecked_Access,
+         DB    => GNATCOLL.SQL.Sqlite.Setup (Database => DB_Name.all),
+         Error => Error);
+
+      if Error /= null then
+         --  old db schema
+         raise Db_Error with Error.all;
+      end if;
+   end;
+
+   Process_Refresh (GNATCOLL.Arg_Lists.Empty_Command_Line);
+
+   if Commands_From_Switch.all /= "" then
+      Process_Line (Commands_From_Switch.all);
+      return;
+   end if;
+
+   loop
+      Ada.Text_IO.Put (">>> ");
+      declare
+         Input : constant String := Ada.Text_IO.Get_Line;
+      begin
+         exit when Input = "exit";
+         Process_Line (Input);
+      exception
+      when E : Invalid_Command =>
+         Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Message (E));
+         Process_Help (GNATCOLL.Arg_Lists.Empty_Command_Line);
+      end;
+   end loop;
+
+exception
+when E : GNATCOLL.Projects.Invalid_Project =>
+   Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Message (E));
+   Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
+when E : Db_Error =>
+   Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Message (E));
+   Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
+when E : Invalid_Command =>
+   Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Message (E));
+   Process_Help (GNATCOLL.Arg_Lists.Empty_Command_Line);
+   Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
+when GNAT.Command_Line.Invalid_Switch =>
+   GNAT.Command_Line.Display_Help (Cmdline);
+   Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
+when E : others =>
+   Ada.Text_IO.Put_Line ("Unexpected exception");
+   Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Information (E));
+   Ada.Text_IO.Put_Line (GNAT.Traceback.Symbolic.Symbolic_Traceback 
(Ada.Exceptions.Traceback.Tracebacks (E)));
+   Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
+end Gpr_Query;
diff --git a/packages/ada-mode/gpr_query.gpr b/packages/ada-mode/gpr_query.gpr
new file mode 100755
index 0000000..6e57ee1
--- /dev/null
+++ b/packages/ada-mode/gpr_query.gpr
@@ -0,0 +1,70 @@
+--  Abstract :
+--
+--  build gpr_query
+--
+--  Copyright (C) 2014 Stephen Leake All Rights Reserved.
+--
+--  This program is free software; you can redistribute it and/or
+--  modify it under terms of the GNU General Public License as
+--  published by the Free Software Foundation; either version 3, 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
+--  distributed with this program; see file COPYING. If not, write to
+--  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston,
+--  MA 02110-1335, USA.
+
+with "gnatcoll";
+with "gnatcoll_sqlite";
+with "gnat_util";
+project Gpr_query is
+   for Main use ("gpr_query.adb");
+
+   for Source_Dirs use (".");
+
+   for Object_Dir use "obj";
+
+   for Exec_Dir use ".";
+
+   type Build_Type is ("Debug", "Normal");
+   Build : Build_Type := External ("Gpr_Query_Build", "Normal");
+
+   for Languages use ("Ada");
+
+   package Compiler is
+
+      Common_Switches :=
+        ("-g",
+         "-gnata",  -- assertions
+         "-gnatfoqQ",
+         "-gnatVa", -- validity checks
+         "-gnaty3abcefhiklM120nOprtx",
+         "-gnateE", -- extra info in exceptions
+         "-gnatwaBCeJL",
+         "-fstack-check",
+         "-gnat12");
+
+      case Build is
+         when "Debug" =>
+            for Default_Switches ("Ada") use Common_Switches & ("-O0");
+         when "Normal" =>
+            -- WORKAROUND (GNAT 7.2.1): adding -gnatn here gives errors about 
missing sources in installed gnatcoll.
+            for Default_Switches ("Ada") use Common_Switches & ("-O2");
+      end case;
+   end Compiler;
+
+   package Linker is
+      for Default_Switches ("Ada") use ("-lpthread");
+   end Linker;
+
+   package Binder is
+      for default_switches ("Ada") use ("-E"); -- symbolic traceback
+   end Binder;
+
+   package Install is
+      for Mode use "usage";
+   end Install;
+
+end Gpr_query;
diff --git a/packages/aggressive-indent/aggressive-indent.el 
b/packages/aggressive-indent/aggressive-indent.el
index 67c3af8..3828bf2 100644
--- a/packages/aggressive-indent/aggressive-indent.el
+++ b/packages/aggressive-indent/aggressive-indent.el
@@ -1,10 +1,10 @@
 ;;; aggressive-indent.el --- Minor mode to aggressively keep your code always 
indented  -*- lexical-binding:t -*-
 
-;; Copyright (C) 2014, 2015 Free Software Foundation, Inc
+;; Copyright (C) 2014, 2015, 2016 Free Software Foundation, Inc
 
 ;; Author: Artur Malabarba <address@hidden>
 ;; URL: https://github.com/Malabarba/aggressive-indent-mode
-;; Version: 1.5
+;; Version: 1.8.1
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: indent lisp maint tools
 ;; Prefix: aggressive-indent
@@ -129,6 +129,7 @@ Please include this in your report!"
     haskell-mode
     haskell-interactive-mode
     image-mode
+    inf-ruby-mode
     makefile-mode
     makefile-gmake-mode
     minibuffer-inactive-mode
@@ -190,14 +191,13 @@ change."
     (null (buffer-modified-p))
     (and (boundp 'smerge-mode) smerge-mode)
     (let ((line (thing-at-point 'line)))
-      (when (stringp line)
-        (or (string-match "\\`[[:blank:]]*\n?\\'" line)
-            ;; If the user is starting to type a comment.
-            (and (stringp comment-start)
-                 (string-match (concat "\\`[[:blank:]]*"
-                                       (substring comment-start 0 1)
-                                       "[[:blank:]]*$")
-                               line)))))
+      (and (stringp line)
+           ;; If the user is starting to type a comment.
+           (stringp comment-start)
+           (string-match (concat "\\`[[:blank:]]*"
+                                 (substring comment-start 0 1)
+                                 "[[:blank:]]*$")
+                         line)))
     (let ((sp (syntax-ppss)))
       ;; Comments.
       (or (and (not aggressive-indent-comments-too) (elt sp 4))
@@ -301,8 +301,7 @@ messages.  L and R passed to 
`aggressive-indent-indent-defun'."
 Call `indent-region' between L and R, and then keep indenting
 until nothing more happens."
   (interactive "r")
-  (let ((p (point-marker))
-        was-begining-of-line)
+  (let ((p (point-marker)))
     (set-marker-insertion-type p t)
     (unwind-protect
         (progn
@@ -350,6 +349,23 @@ or messages."
   "List of (left right) limit of regions changed in the last command loop.")
 (make-variable-buffer-local 'aggressive-indent--changed-list)
 
+(defun aggressive-indent--proccess-changed-list-and-indent ()
+  "Indent the regions in `aggressive-indent--changed-list'."
+  (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)))
+    ;; Take the 10 most recent changes.
+    (let ((cell (nthcdr 10 aggressive-indent--changed-list)))
+      (when cell (setcdr cell nil)))
+    ;; (message "----------")
+    (while aggressive-indent--changed-list
+      ;; (message "%S" (car 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--indent-if-changed ()
   "Indent any region that changed in the last command loop."
   (when aggressive-indent--changed-list
@@ -359,15 +375,7 @@ or messages."
                     (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))))))))))
+            (aggressive-indent--proccess-changed-list-and-indent)))))))
 
 (defun aggressive-indent--keep-track-of-changes (l r &rest _)
   "Store the limits (L and R) of each change in the buffer."
@@ -394,15 +402,17 @@ or messages."
                    (memq major-mode '(text-mode fundamental-mode))
                    buffer-read-only))
           (aggressive-indent-mode -1)
-        ;; Should electric indent be ON or OFF?        
+        ;; Should electric indent be ON or OFF?
         (if (or (eq aggressive-indent-dont-electric-modes t)
                 (cl-member-if #'derived-mode-p 
aggressive-indent-dont-electric-modes))
             (aggressive-indent--local-electric nil)
           (aggressive-indent--local-electric t))
         (add-hook 'after-change-functions 
#'aggressive-indent--keep-track-of-changes nil 'local)
+        (add-hook 'before-save-hook 
#'aggressive-indent--proccess-changed-list-and-indent nil 'local)
         (add-hook 'post-command-hook #'aggressive-indent--indent-if-changed 
nil 'local))
     ;; Clean the hooks
     (remove-hook 'after-change-functions 
#'aggressive-indent--keep-track-of-changes 'local)
+    (remove-hook 'before-save-hook 
#'aggressive-indent--proccess-changed-list-and-indent 'local)
     (remove-hook 'post-command-hook #'aggressive-indent--indent-if-changed 
'local)
     (remove-hook 'post-command-hook #'aggressive-indent--softly-indent-defun 
'local)))
 
diff --git a/packages/ahungry-theme/README.md b/packages/ahungry-theme/README.md
index 805f451..0543b09 100644
--- a/packages/ahungry-theme/README.md
+++ b/packages/ahungry-theme/README.md
@@ -17,6 +17,11 @@ Then, make sure to add the following to your ~/.emacs:
 ### Using load-theme
 ```lisp
 (add-to-list 'custom-theme-load-path "~/.emacs.d/color-theme-ahungry/")
+
+;; Only set this if you wish to retain your own font settings
+;; otherwise, leave it out.
+(setq ahungry-theme-font-settings nil)
+
 (load-theme 'ahungry t)
 ```
 the first time you load it, you will need to accept the theme.
diff --git a/packages/ahungry-theme/ahungry-theme.el 
b/packages/ahungry-theme/ahungry-theme.el
index 98deaf0..27d75c3 100644
--- a/packages/ahungry-theme/ahungry-theme.el
+++ b/packages/ahungry-theme/ahungry-theme.el
@@ -5,7 +5,7 @@
 ;; Author: Matthew Carter <address@hidden>
 ;; Maintainer: Matthew Carter <address@hidden>
 ;; URL: https://github.com/ahungry/color-theme-ahungry
-;; Version: 1.1.0
+;; Version: 1.3.0
 ;; Keywords: ahungry palette color theme emacs color-theme deftheme
 ;; Package-Requires: ((emacs "24"))
 
@@ -36,6 +36,15 @@
 
 ;;; News:
 
+;;;; Changes since 1.2.0:
+;; - Few new faces related to helm-grep search results (poor contrast 
previously)
+;; - Merge in GNU Elpa changes (avoid message clobbering in color-theme-mode)
+;; - Add lexical binding to the top of the file
+
+;;;; Changes since 1.1.0:
+;; - New variable ahungry-theme-font-settings to avoid overriding user font 
sizes
+;; - Add info-mode faces
+
 ;;;; Changes since 1.0.12:
 ;; - Add erc/jabber faces to begin with
 
@@ -75,18 +84,29 @@
 (deftheme ahungry
   "Ahungry Theme")
 
+(defvar ahungry-theme-font-settings
+  '(:family "Terminus" :foundry "xos4"
+            :slant normal :weight normal
+            :height 100 :width normal)
+  "If set to nil, will avoid overriding the user font settings.
+Leave this alone to retain defaults.
+
+Default value:
+   (:family \"Terminus\" :foundry \"xos4\"
+            :slant normal :weight normal
+            :height 100 :width normal)")
+
 (let ((mainbg (when (display-graphic-p) "#222222")));; "default")))
   (custom-theme-set-faces
    'ahungry ;; This is the theme name
    `(default ((t (:foreground "#ffffff" :background ,mainbg
-                              :family "Terminus" :foundry "xos4"
-                              :slant normal :weight normal
-                              :height 100 :width normal))))
+                              ,@ahungry-theme-font-settings))))
    '(cursor ((t (:background "#fce94f" :foreground "#ffffff"))))
    '(highlight ((t (:background "brown4" :foreground nil))))
    '(border ((t (:background "#888a85"))))
    '(fringe ((t (:background "#333333"))))
-   '(mode-line ((t (:foreground "#0022ff" :bold t :background "#77ff00"
+   '(error ((t (:foreground "Red1" :bold t))))
+   '(mode-line ((t (:foreground "#0022aa" :bold t :background "#77ff00"
                                 :box (:line-width 1 :color nil :style 
released-button)))))
    '(mode-line-inactive ((t (:foreground "#444444" :background "#66ff33"))))
    '(mode-line-buffer-id ((t (:bold t :foreground "#ffffff" :background 
"#0055ff"))))
@@ -129,8 +149,6 @@
    '(isearch-lazy-highlight-face ((t (:foreground "#2e3436" :background 
"#ff6600"))))
    '(show-paren-match-face ((t (:background "#ff6600" :foreground "#2e3436"))))
    '(show-paren-mismatch-face ((t (:background "#999999" :foreground 
"#ff6600"))))
-   '(info-xref ((t (:foreground "#33ffbb"))))
-   '(info-xref-visited ((t (:foreground "#999999"))))
    '(diary ((t (:bold t :foreground "#ff0000"))))
    '(message-cited-text ((t (:foreground "#ffc800"))))
    '(gnus-cite-1 ((t (:foreground "#999999"))))
@@ -192,7 +210,7 @@
    '(org-level-4 ((t (:bold nil :foreground "#f68585" :height 1.0))))
    '(org-date ((t (:underline t :foreground "#ff0066"))))
    '(org-footnote  ((t (:underline t :foreground "#ff0066"))))
-   '(org-link ((t (:foreground "skyblue2" :background "#2e3436"))))
+   '(org-link ((t (:foreground "#111111" :background "#ff0099"))))
    '(org-special-keyword ((t (:foreground "#cc0033"))))
    '(org-verbatim ((t (:foreground "#cc6600" :underline t :slant italic))))
    '(org-block ((t (:foreground "#999999"))))
@@ -206,6 +224,7 @@
    '(org-agenda-date-weekend ((t (:weight normal :foreground "#005fff"))))
    '(org-agenda-date-today ((t (:weight bold :foreground "#ffc800"))))
    '(org-agenda-done ((t (:weight normal :foreground "#00aa33"))))
+   '(org-agenda-clocking ((t (:background "#333333" :weight bold))))
    '(org-block-begin-line ((t (:foreground "#bbbbbb" :background "#333333"))))
    '(org-block-background ((t (:background "#333333"))))
    '(org-block-end-line ((t (:foreground "#bbbbbb" :background "#333333"))))
@@ -229,6 +248,8 @@
    '(magit-section-highlight ((t (:weight bold))));;:foreground "#ffffff"))))
    '(minibuffer-prompt ((t (:foreground "#0055ff" :bold t))))
    '(web-mode-html-tag-bracket-face ((t (:foreground "#666666"))))
+   '(helm-grep-cmd-line ((t (:foreground "#0022aa"))))
+   '(helm-grep-finish ((t (:foreground "#0022aa"))))
    '(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))))
@@ -240,6 +261,16 @@
    '(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))))
+   '(eshell-prompt ((t (:foreground "#0099ff"))))
+   '(info-menu-header ((t (:foreground "#0099ff" :bold t :underline t))))
+   '(info-header-xref ((t (:foreground "#0099ff"))))
+   '(info-header-node ((t (:foreground "#ff0099" :bold t :italic t))))
+   '(info-menu-star ((t (:foreground "#0099ff" :bold t))))
+   '(info-xref-visited ((t (:foreground "#999999"))))
+   '(info-xref ((t (:foreground "#0099ff"))))
+   '(info-node ((t (:foreground "#ff0099"))))
+   '(info-title-1 ((t (:foreground "yellow" :bold t))))
+   '(info-title-2 ((t (:foreground "#ff0099"))))
    )
   (custom-theme-set-variables
    'ahungry
diff --git a/packages/ampc/ampc.el b/packages/ampc/ampc.el
index 6e9bbd6..0710c70 100644
--- a/packages/ampc/ampc.el
+++ b/packages/ampc/ampc.el
@@ -76,11 +76,11 @@
 ;; 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
+;; ampc offers 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'.
+;; `L'. The search view may be accessed using the `F' key (find).
 
 ;;; *** current playlist view
 ;; The playlist view looks like this:
@@ -161,6 +161,11 @@
 ;; MPD.  To toggle the enabled property of the selected outputs, press `a'
 ;; (ampc-toggle-output-enabled) or `<mouse-3>'.
 
+;;; *** search view
+;; The search view contains the result of the last performed search. You can
+;; start a new search with the `s' key while in the search view or use M-x
+;; ampc-start-search. Use the `a' key to add a song displayed in result list.
+
 ;;; ** 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
@@ -521,7 +526,11 @@ modified."
          (pl-prop '(:properties (("Title" :min 15 :max 40)
                                  ("Artist" :min 15 :max 40)
                                  ("Album" :min 15 :max 40)
-                                 ("Time" :width 6)))))
+                                 ("Time" :width 6))))
+         (search-view '(1.0 search :properties (("Track" :title "#" :width 4)
+                                                ("Title" :min 15 :max 40)
+                                                ("Artist" :min 15 :max 40)
+                                                ("Album" :min 15 :max 40)))))
     `((tagger
        horizontal
        (0.65 files-list
@@ -539,21 +548,21 @@ modified."
        ,(kbd "J")
        horizontal
        (0.4 vertical
-            (6 status)
+            (10 status)
             (1.0 current-playlist ,@pl-prop))
        ,rs_a)
       ("Current playlist view (Genre|Album|Artist)"
        ,(kbd "M")
        horizontal
        (0.4 vertical
-            (6 status)
+            (10 status)
             (1.0 current-playlist ,@pl-prop))
        ,rs_b)
       ("Playlist view (Genre|Artist|Album)"
        ,(kbd "K")
        horizontal
        (0.4 vertical
-            (6 status)
+            (10 status)
             (1.0 vertical
                  (0.4 current-playlist ,@pl-prop)
                  (0.4 playlist ,@pl-prop)
@@ -563,12 +572,19 @@ modified."
        ,(kbd "<")
        horizontal
        (0.4 vertical
-            (6 status)
+            (10 status)
             (1.0 vertical
                  (0.4 current-playlist ,@pl-prop)
                  (0.4 playlist ,@pl-prop)
                  (1.0 playlists)))
        ,rs_b)
+      ("Search view"
+       ,(kbd "F")
+       horizontal
+       (0.4 vertical
+            (10 status)
+            (1.0 current-playlist ,@pl-prop))
+       ,search-view)
       ("Outputs view"
        ,(kbd "L")
        outputs :properties (("outputname" :title "Name" :min 10 :max 30)
@@ -594,6 +610,7 @@ modified."
 
 (defvar ampc-internal-db nil)
 (defvar ampc-status nil)
+(defvar ampc-status-timer nil)
 
 (defvar ampc-tagger-previous-configuration nil)
 (defvar ampc-tagger-version-verified nil)
@@ -602,6 +619,7 @@ modified."
 
 (defconst ampc-tagger-version "0.1")
 (defconst ampc-tagger-tags '(Title Artist Album Comment Genre Year Track))
+(defconst ampc-buffer-name " *ampc*")
 
 ;;; *** mode maps
 (defvar ampc-mode-map
@@ -696,6 +714,16 @@ modified."
     (define-key map (kbd "<mouse-3>") 'ampc-mouse-align-point)
     map))
 
+(defvar ampc-search-mode-map
+  (let ((map (make-sparse-keymap)))
+    (suppress-keymap map)
+    (define-key map (kbd "a") 'ampc-add)
+    (define-key map (kbd "s") 'ampc-start-search)
+    (define-key map (kbd "<down-mouse-3>") 'ampc-mouse-add)
+    (define-key map (kbd "<mouse-3>") 'ampc-mouse-align-point)
+    map)
+  "Key map for search view")
+
 (defvar ampc-outputs-mode-map
   (let ((map (make-sparse-keymap)))
     (suppress-keymap map)
@@ -732,6 +760,10 @@ modified."
     (define-key map (kbd "C-c C-t") 'ampc-tagger-dired)
     map))
 
+(defvar ampc-search-keywords
+  nil
+  "Ampc last performed search")
+
 ;;; **** menu
 (easy-menu-define nil ampc-mode-map nil
   `("ampc"
@@ -952,6 +984,7 @@ modified."
                do (goto-char next)))))
 
 (defmacro ampc-iterate-source-output (delimiter bindings pad-data &rest body)
+  "DELIMITER is the field that delimit command results in mpd response"
   (declare (indent 2) (debug t))
   `(let ((output-buffer (current-buffer))
          (tags (cl-loop for (tag . props) in
@@ -985,8 +1018,14 @@ modified."
 
 (define-derived-mode ampc-tag-song-mode ampc-item-mode "ampc-ts")
 
+(define-derived-mode ampc-search-mode ampc-item-mode "ampc-search")
+
 (define-derived-mode ampc-current-playlist-mode ampc-playlist-mode "ampc-cpl"
-  (ampc-highlight-current-song-mode))
+  (setq font-lock-defaults `(((ampc-find-current-song
+                               (1 'ampc-current-song-mark-face)
+                               (2 'ampc-current-song-marked-face))
+                              . ,(car font-lock-defaults))
+                             . (cdr font-lock-defaults))))
 
 (define-derived-mode ampc-playlist-mode ampc-item-mode "ampc-pl")
 
@@ -1022,7 +1061,9 @@ modified."
   (setf font-lock-defaults '((("^\\(\\*\\)\\(.*\\)$"
                                (1 'ampc-mark-face)
                                (2 'ampc-marked-face))
-                              ("" 0 'ampc-unmarked-face))
+                              ;; FIXME: Why do this?
+                              ;; ("" 0 'ampc-unmarked-face)
+                              )
                              t)))
 
 (define-derived-mode ampc-mode special-mode "ampc"
@@ -1031,19 +1072,6 @@ modified."
   (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."
@@ -1318,6 +1346,8 @@ modified."
     ((current-playlist playlist outputs))
     (playlists
      (ampc-update-playlist))
+    (search
+     (message "Don't know what to do here"))
     ((song tag)
      (cl-loop
       for w in
@@ -1514,6 +1544,10 @@ modified."
                          (ampc-send-command 'currentsong))
                         (playlists
                          (ampc-send-command 'listplaylists))
+                        (search
+                         (when ampc-search-keywords
+                           (ampc-send-command 'search nil "any"
+                                              (ampc-quote 
ampc-search-keywords))))
                         (current-playlist
                          (ampc-send-command 'playlistinfo))))))
     (ampc-send-command 'status)
@@ -1827,7 +1861,8 @@ modified."
     (erase-buffer)
     (funcall (or (plist-get (cadr ampc-type) :filler)
                  (lambda (_)
-                   (insert (ampc-status t) "\n")))
+                   (insert (ampc-status t (window-width (get-buffer-window)))
+                           "\n")))
              ampc-status)
     (ampc-set-dirty nil)))
 
@@ -1974,21 +2009,44 @@ modified."
                 (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-var (append ampc-status-tags
+                                '("Artist" "Title" "file" "Time")))
   (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"))
+                          "song" "playlistlength" "elapsed"))
   (ampc-with-buffer 'current-playlist
-    (when ampc-highlight-current-song-mode
-      (font-lock-fontify-buffer)))
+    (if (fboundp 'font-lock-flush)
+        (font-lock-flush)
+      (with-no-warnings (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-search ()
+  "Uses mpd search result to fill search view"
+  (ampc-fill-skeleton 'search
+    (ampc-iterate-source-output
+        "file"
+        (file)
+      (cl-loop for (tag . tag-regexp) in tags
+               collect (ampc-clean-tag tag (ampc-extract tag-regexp)))
+      `(,file)
+      )))
+
+(defun ampc-start-search ()
+  "Ask mpd to search for songs matching keywords"
+  (interactive)
+  (cl-assert (ampc-in-ampc-p))
+  (let ((search (read-string "Keywords: ")))
+    (setq ampc-search-keywords (unless (string= "" search) search))
+    (when ampc-search-keywords
+      (ampc-send-command 'search nil "any"
+                         (ampc-quote ampc-search-keywords)))))
+
 (defun ampc-handle-command (status)
   (cond
    ((eq status 'error)
@@ -2024,7 +2082,9 @@ modified."
         (listallinfo
          (ampc-handle-listallinfo))
         (outputs
-         (ampc-fill-outputs))))
+         (ampc-fill-outputs))
+        (search
+         (ampc-handle-search))))
     (unless ampc-outstanding-commands
       (ampc-update)))))
 
@@ -2754,7 +2814,71 @@ If ARG is omitted, use the selected entries in the 
current buffer."
   (ampc-with-selection arg
     (ampc-add-impl)))
 
-(defun ampc-status (&optional no-print)
+(defun ampc-restart-status-timer ()
+  (when ampc-status-timer
+    (cancel-timer ampc-status-timer)
+    (setq ampc-status-timer nil))
+  (setq ampc-status-timer
+        (run-at-time
+         nil
+         0.9
+         (lambda ()
+           (when (ampc-on-p)
+             (ampc-send-command 'status))))))
+
+
+(defun ampc-time-to-progress-bar (elapsed total width)
+  "Creates a progess bar like this: |=========>----|
+ELAPSED is the number of seconds represented by '=' signs
+TOTAL is the number of seconds represented by the entire bar
+WIDTH is the max width of the bar. If < 2, 2 characters will be used anyway"
+  (setq width (- width 2)) ;; 2 characters for '||'
+
+  (let ((result "|"))
+    (when (> width 0)
+      (let* ((e (/ (* elapsed width) total)) ;; number of '=' signs
+             (r (- width e))) ;; number of '-' signs
+        (setq result (concat result
+                             (make-string (max 0 (1- e)) ?=)
+                             ">"
+                             (make-string r ?-)))))
+
+    (concat result "|")))
+
+(defun ampc-current-song-time (elapsed total width)
+  "Creates an ASCII representation of elapsed time of the current song.
+ELAPSED is the current time of the song in seconds
+TOTAL is the total time of the song in seconds
+WIDTH is the max desired length of the result"
+  (setq elapsed (truncate elapsed))
+  (when (> elapsed total)
+    (setq elapsed total))
+
+  (let* ((hours (/ elapsed 3600))
+         (minutes (- (/ elapsed 60) (* 60 hours)))
+         (seconds (mod elapsed 60))
+         (result ""))
+    (when (> hours 0)
+      (setq result (format "%d:%s"
+                           hours
+                           (if (< minutes 10)
+                               "0"
+                             "")
+                           )))
+    (setq result (format "%s%d:%s%d"
+                         result
+                         minutes
+                         (if (< seconds 10)
+                             "0"
+                           "")
+                         seconds))
+
+    (concat (ampc-time-to-progress-bar elapsed total
+                                       (1- (- width (length result))))
+            " "
+            result)))
+
+(cl-defun ampc-status (&optional no-print (width 50))
   "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
@@ -2789,6 +2913,13 @@ have enough information yet."
                                    (ampc-clean-tag
                                     'Title
                                     (cdr (assq 'Title ampc-status)))
+                                   "\n"
+                                   (ampc-current-song-time
+                                    (string-to-number (cdr (assq 'elapsed
+                                                                 ampc-status)))
+                                    (string-to-number (cdr (assq 'Time
+                                                                 ampc-status)))
+                                    width)
                                    "\n"))
                          "Volume:    " (cdr (assq 'volume ampc-status)) "\n"
                          "Crossfade: " (cdr (assq 'xfade ampc-status))
@@ -3046,6 +3177,9 @@ ampc is connected to."
     (delete-process ampc-connection))
   (when ampc-working-timer
     (cancel-timer ampc-working-timer))
+  (when ampc-status-timer
+    (cancel-timer ampc-status-timer)
+    (setq ampc-status-timer nil))
   (ampc-suspend nil)
   (setf ampc-connection nil
         ampc-internal-db nil
@@ -3088,7 +3222,7 @@ default to the ones specified in `ampc-default-server'."
   (unless ampc-connection
     (let ((connection (open-network-stream "ampc"
                                            (with-current-buffer
-                                               (get-buffer-create " *ampc*")
+                                               (get-buffer-create 
ampc-buffer-name)
                                              (erase-buffer)
                                              (current-buffer))
                                            host
@@ -3110,7 +3244,8 @@ default to the ones specified in `ampc-default-server'."
   (run-hooks 'ampc-connected-hook)
   (when suspend
     (ampc-suspend))
-  (ampc-filter (process-buffer ampc-connection) nil))
+  (ampc-filter (process-buffer ampc-connection) nil)
+  (ampc-restart-status-timer))
 
 (provide 'ampc)
 
diff --git a/packages/arbitools/arbitools.el b/packages/arbitools/arbitools.el
new file mode 100644
index 0000000..f749bfb
--- /dev/null
+++ b/packages/arbitools/arbitools.el
@@ -0,0 +1,697 @@
+;;; arbitools.el --- Package for chess tournaments administration
+
+;; Copyright 2016 Free Software Foundation, Inc.
+
+;; Author: David Gonzalez Gandara <address@hidden>
+;; Version: 0.71
+;; Package-Requires: ((cl-lib "0.5"))
+
+;; 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:
+;; ---------------------------
+;; Some functions require the arbitools python package, you can install
+;; it by: "pip3 install arbitools"
+;; "pdflatex" is necessary in case you want to get pdfs.
+;;
+;; USAGE:
+;; ---------------------------
+;; arbitools.el is an interface for the python package "arbitools",
+;; designed to manage chess tournament reports.  If you don't install the
+;; python package you can still have the syntax colouring and some native
+;; functions. In the future, all the functions will be translated to ELISP.
+;;
+;; FEATURES:
+;; ----------------------------
+;; - Syntax colouring for the official trf FIDE files.  This facilitates
+;; manual edition of the files.
+;;
+;; - Updating the players ratings. - with python
+;; 
+;; - Adding players to an existing file. - with python
+;;
+;; - Getting standings from a tournament file. -with python
+;; 
+;; - Getting IT3 Tournament report form. - with python
+;;
+;; - Deleting a round. - Native
+;;
+;; - Insert result. - Native
+;;
+;; - Insert player. - Native
+;;
+;; - Get the pairing or results of a round - Native
+;;
+;; - Get the list of the players - Native
+;;
+;; - Delete player. Adjust all rank numbers - Native
+;;
+;; - Adjust points for each player, according to results of rounds - Native
+;;
+;; - Print standings - Native
+;;
+;; TODO:
+;; ---------------------------------
+;;
+;; - Automatically purge all players who didn't play any games.
+;;
+;; - Insert results from a results file created with a pairing program.
+;;   Add the date in the "132" line and the results in the "001" lines.
+;;
+;; - Add empty round. Ask for date create empty space in the players lines.
+;;   Add the date in the "132" line.
+;; 
+;; - Add the rank number and the position automatically when adding players.
+;;
+;; - Add team.
+;;
+;; - Add player to team. Prompt for team and player number.
+;;
+;; - Generate pgn file for a round or the whole tournament.
+;;
+;; - Reorder the ranking
+;;
+;; - Reorder the players list
+;;
+;; You will find more information in www.ourenxadrez.org/arbitools.htm
+
+;;; Code:
+
+(eval-when-compile (require 'cl-lib))
+
+(defun arbitools-prepare-feda ()
+  "Prepare file to FEDA: add carriage return at the end of lines."
+  (interactive)
+  (save-excursion
+    (goto-char (point-min))
+    (while (search-forward "\n" nil t)
+      (replace-match "\r\n"))))
+
+(defun arbitools-update (elolist)
+  "Update the players ratings in a database file based on a elo list file."
+  (interactive "selolist:")
+  ;; FIXME: What if `list' is "foo; bar"?
+  (call-process "arbitools-run.py" nil "Arbitools-output" nil "update" 
buffer-file-name "-l" elolist))
+
+(defun arbitools-add (addfile)
+  "Add players to an existing database file."
+  (interactive "faddfile: ")
+  ;; FIXME: What if `addlist' is "foo; bar"?
+  (call-process "arbitools-add.py" nil "Arbitools-output" nil "-a" addfile 
"-i" buffer-file-name))
+
+(defun arbitools-list-pairing (round)
+  "Get the pairings and/or results of the given round"
+  (interactive "sround: ")
+  (goto-char (point-min))
+  (arbitools-list-players)
+  (save-excursion
+    (re-search-forward "^012" nil t)
+    (let* ((linestring (thing-at-point 'line))
+          (tournamentnamestring (substring linestring 4)))
+      (with-current-buffer "Pairings List"
+        (erase-buffer)
+        (insert (format "%s" tournamentnamestring)))))
+  (with-current-buffer "Pairings List"
+   (insert (format "Pairings for round %s\n\n" round)) )
+  (let* ((paired '()))
+
+    (while (re-search-forward "^001" nil t)
+       (let* ((namestring nil)
+             (linestring (thing-at-point 'line))
+             (playerlinestring nil)
+             (opponentlinestring nil)
+             opponentstring
+             (rankstring (substring linestring 4 8))
+             (opponent (substring linestring (+ 91 (* (- (string-to-number 
round) 1)10 )) 
+                       (+ 95(* (- (string-to-number round) 1)10 ))))
+             (color (substring linestring (+ 96 (* (- (string-to-number round) 
1)10 )) 
+                       (+ 97(* (- (string-to-number round) 1)10 ))))
+             (result (substring linestring (+ 98 (* (- (string-to-number 
round) 1)10 )) 
+                       (+ 99(* (- (string-to-number round) 1)10 )))))
+         (with-current-buffer "Arbitools-output"
+           (insert (format "%s\n" paired))
+           (insert (format "-%s-" rankstring))
+           (insert (format "%s\n" (member "   1" paired))))
+         (unless (or (member rankstring paired) (member opponent paired))
+           (with-current-buffer "List of players"
+               (goto-char (point-min))
+               (re-search-forward (concat "^" (regexp-quote  rankstring)))
+               (setq playerlinestring (thing-at-point 'line))
+               (setq namestring (substring playerlinestring 4 37))
+               (goto-char (point-min))
+               (unless (or (string= opponent "0000") (string= opponent "    "))
+                   (re-search-forward (concat "^" (regexp-quote opponent))))
+               (setq opponentlinestring (thing-at-point 'line))
+               (setq opponentstring (substring opponentlinestring 4 37))
+               (when (or (string= opponent "0000")(string= opponent "    "))
+                 (setq opponentstring "-"))
+               (cl-pushnew rankstring paired :test #'equal))
+           (with-current-buffer "Pairings List"
+             (cond ((string= color "w") ;; TODO: change the ranknumber with 
the name
+                     (cond ((string= result "1")
+                           (insert (format "%s 1-0 %s\n" namestring 
opponentstring)))
+                          ((string= result "0")
+                           (insert (format "%s 0-1 %s\n" namestring 
opponentstring)))
+                          ((string= result "+")
+                           (insert (format "%s + - %s\n" namestring 
opponentstring)))
+                          ((string= result "-")
+                           (insert (format "%s - + %s\n" namestring 
opponentstring)))
+                          ((string= result "=")
+                           (insert (format "%s 1/2 %s\n" namestring 
opponentstring)))))
+                   ((string= color "b")
+                     (cond ((string= result "1")
+                           (insert (format "%s 0-1 %s\n" opponentstring 
namestring)))
+                          ((string= result "0")
+                           (insert (format "%s 1-0 %s\n" opponentstring 
namestring)))
+                          ((string= result "+")
+                           (insert (format "%s - + %s\n" opponentstring 
namestring)))
+                          ((string= result "-")
+                           (insert (format "%s + - %s\n" opponentstring 
namestring)))
+                          ((string= result "=")
+                           (insert (format "%s 1/2 %s\n" opponentstring 
namestring))))))))))))
+
+
+(defun arbitools-standings ()
+  "Get standings and report files from a tournament file."
+  (interactive)
+  ;; (shell-command (concat (expand-file-name "arbitools-standings.py") " -i " 
buffer-file-name))) ;this is to use the actual path
+  (call-process "arbitools-run.py" nil "Arbitools-output" nil "standings" 
buffer-file-name))
+
+(defun arbitools-list-players ()
+  "Put the list of players in two buffers, one in plain text and another in a 
beautiful LaTeX"
+  ;; TODO: the beautiful LaTeX
+  (interactive)
+  (save-excursion
+   (goto-char (point-min))
+   (while (re-search-forward "^001" nil t)
+     (let* ((linestring (thing-at-point 'line))
+           (rankstring (substring linestring 5 8)))
+       
+       (with-current-buffer "List of players"
+         (insert (format " %s " rankstring))))
+
+     (let* ((linestring (thing-at-point 'line))
+           (namestring (substring linestring 14 47)))
+       
+       (with-current-buffer "List of players"
+         (insert (format "%s " namestring))))
+
+     (let* ((linestring (thing-at-point 'line))
+            (elostring (substring linestring 48 52)))
+       
+       (with-current-buffer "List of players"
+         (insert (format "%s\n" elostring))))))
+  (with-current-buffer "List of players"
+    (remove-text-properties (point-min)(point-max) '(face nil))))
+
+(defun arbitools-new-trf ()
+  "Create an empty trf file"
+  (interactive)
+  (generate-new-buffer "New trf")
+  (switch-to-buffer "New trf")
+  (set-buffer "New trf")
+  (arbitools-mode)
+  (insert "012 NAME OF THE TOURNAMENT\n")
+  (insert "022 PLACE\n")
+  (insert "032 FEDERATION\n")
+  (insert "042 STARTING DATE (YYYY/MM/DD)\n")
+  (insert "052 ENDING DATE (YYYY/MM/DD)\n")
+  (insert "062 NUMBER OF PLAYERS\n")
+  (insert "072 NUMBER OF RATED PLAYERS\n")
+  (insert "082 NUMBER OF TEAMS\n")
+  (insert "092 TYPE OF TOURNAMENT\n")
+  (insert "102 CHIEF ARBITER\n")
+  (insert "112 DEPUTY CHIEF ARBITER\n")
+  (insert "122 ALLOTED TIMES PER MOVE/GAME\n")
+  (insert "132 DATES                                                           
                       YY/MM/DD  YY/MM/DD\n")
+  ;; (insert "001  000 GTIT NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN RAT. FED   
0000000000 YYYY/MM/DD 00.0  RNK  0000 C R  0000 C R\n")
+  ;; (insert "013 NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN  0000 0000\n")
+)
+
+ (defun arbitools-number-of-rounds ()
+   "Get the number of rounds in the tournament. It has to be executed in the 
principal buffer."
+   (let* ((numberofrounds 0))
+     (save-excursion
+      (goto-char (point-min))
+      (re-search-forward "^132" nil t)
+        (let* ((linestringrounds (thing-at-point 'line))
+            ;; (actualround " ")
+            (beginning-of-round 91)
+            (end-of-round 99)
+            (continue t))
+                    
+            ;; (with-current-buffer "Arbitools-output" (insert (format 
"rounds: %s" linestringrounds)))
+            ;; (with-current-buffer "Arbitools-output" (insert (format 
"length: %s" (- (length linestringrounds) 4))))
+           ;; For some reason, the length of the string is 4 characters longer 
than the real line
+           (while continue
+             (if (< end-of-round (length linestringrounds))
+                
+               (progn
+                  ;; (setq actualround (substring-no-properties 
linestringrounds beginning-of-round end-of-round))
+                  (setq numberofrounds (+ numberofrounds 1))
+                  (setq beginning-of-round (+ beginning-of-round 10))
+                  (setq end-of-round (+ end-of-round 10)))
+                  
+                  (setq continue nil)))))
+     numberofrounds))
+
+(defun arbitools-calculate-points ()
+  "Automatically calculate the points of each player"
+  (interactive)
+  (save-excursion
+    (let ( (numberofrounds (arbitools-number-of-rounds))
+           (points         0.0)
+           (pointstosum    0.0)
+           (roundcount     1))
+      (goto-char (point-min))
+      (while (re-search-forward "^001" nil t)
+        (setq points 0.0)
+        (setq roundcount 1)
+        (while (<= roundcount numberofrounds)
+          (beginning-of-line)
+         (forward-char (+ 98 (* (- roundcount 1) 10))) ;; go to where the 
result is for each round
+          (cond ((string= (thing-at-point 'symbol) "1") (setq pointstosum 1.0))
+                ((string= (thing-at-point 'symbol) "+") (setq pointstosum 1.0))
+                ((string= (thing-at-point 'symbol) "=") (setq pointstosum 0.5))
+                ((string= (thing-at-point 'symbol) "0") (setq pointstosum 0.0))
+                ((string= (thing-at-point 'symbol) "-") (setq pointstosum 0.0))
+                ((string= (thing-at-point 'symbol) nil) (setq pointstosum 
0.0)))
+          (setq points (+ points pointstosum))
+          (setq roundcount (+ roundcount 1)))
+        (beginning-of-line)
+        (forward-char 84)
+        (forward-char -3)
+        (delete-char 3)
+        (insert-char ?\s (- 3 (length (format "%s" points))))
+        (insert (format "%s" points))))))
+
+(defun arbitools-calculate-standings ()
+  "Write the standings in the Standings buffer"
+  (interactive)
+  (arbitools-calculate-points) ;; make sure the points of each player are 
correct
+  (save-excursion
+    (with-current-buffer "Standings"
+      (erase-buffer))
+    (let ((datachunk ""))
+      (goto-char (point-min))
+      (while (re-search-forward "^001" nil t)
+        (let* ()
+          (beginning-of-line)
+          (forward-char 89) ;; get the POS field
+          (setq datachunk (thing-at-point 'word))
+          (with-current-buffer "Standings"
+            (insert (format "%s" datachunk))
+            (insert-char ?\s (- 3 (length datachunk)))
+            (insert " "))
+          (setq datachunk (substring-no-properties (thing-at-point 'line) 14 
47)) ;; get name
+          (with-current-buffer "Standings"
+            (insert (format "%s " datachunk))
+            (insert-char ?\s (- 33 (length datachunk))))
+          (beginning-of-line)
+          (forward-char 68)
+          (setq datachunk (thing-at-point 'word)) ;; get idfide 
+          (with-current-buffer "Standings"
+            (insert (format "%s " datachunk))
+            (insert-char ?\s (- 10 (length datachunk))))
+          (setq datachunk (substring-no-properties (thing-at-point 'line) 80 
84)) ;; get points
+          (with-current-buffer "Standings"
+            (insert (format "%s " datachunk))
+            (insert-char ?\s (- 4 (length datachunk))))
+          (with-current-buffer "Standings"
+            (insert "\n")
+            (sort-columns 1 49 (- (point-max) 1))))))
+    (let ((newpos 0)
+          (idfide ""))
+      (goto-char (point-min))
+      (while (re-search-forward "^001" nil t)
+        (beginning-of-line)
+        (forward-char 68)
+        (setq idfide (thing-at-point 'word))
+        (with-current-buffer "Standings"
+          (goto-char (point-min))
+          (search-forward idfide nil t)
+          (setq newpos (line-number-at-pos))) ;; the POS is in the beginning 
of the line in Standings
+        (with-current-buffer "Arbitools-output"
+          (insert (format "%s" newpos))
+          (insert "\n"))
+        (beginning-of-line)
+        (forward-char 89) ;; go to POS field
+        (forward-char -3)
+        (delete-char 3)
+        (insert-char ?\s (- 3 (length (format "%s" newpos))))
+        (insert (format "%s" newpos))))))
+
+(defun arbitools-delete-player (player)
+   "Delete a player. Adjust all the rank numbers accordingly."
+   (interactive "splayer: ")
+   (let ((numberofrounds 0)
+         (elo            ""))
+    
+    (save-excursion
+      (goto-char (point-min))
+      (re-search-forward "^132" nil t)
+        (let* ((linestringrounds   (thing-at-point 'line))
+               ;; (actualround        " ")
+               (beginning-of-round 91)
+               (end-of-round       99)
+               (continue           t))
+           (while continue
+             (if (< end-of-round (length linestringrounds))
+               (progn
+                  ;; (setq actualround (substring-no-properties 
linestringrounds beginning-of-round end-of-round))
+                  (setq numberofrounds (+ numberofrounds 1))
+                  (setq beginning-of-round (+ beginning-of-round 10))
+                  (setq end-of-round (+ end-of-round 10)))   
+               (setq continue nil)))))
+    (save-excursion
+     (goto-char (point-min))
+     (while (re-search-forward "^001" nil t)
+       (let* ((linestring (thing-at-point 'line))
+              (rankstring (substring linestring 5 8)))
+         (when (= (string-to-number rankstring) (string-to-number player))
+           (forward-char 1)
+           (delete-char 4)
+           (insert " DEL")
+           (setq elo (substring linestring 48 52))
+           (with-current-buffer "Arbitools-output" (insert (format "%s" elo))))
+         (when (> (string-to-number rankstring)(string-to-number player))
+           (forward-char 1)
+           (delete-char 4)
+           (insert-char ?\s (- 4 (length (format "%s" (- (string-to-number 
rankstring) 1)))))
+           (insert (format "%s" (- (string-to-number rankstring) 1)))
+           (save-excursion
+             (goto-char (point-min))
+             (while (re-search-forward "^001" nil t)
+               (let* ((roundcount          1))
+                  (while (<= roundcount numberofrounds)
+                    (beginning-of-line)
+                    (forward-char (+ 95 (* (- roundcount 1) 10)))
+                    (when (string= (format "%s" (string-to-number rankstring)) 
(thing-at-point 'word))
+                      (forward-char -4) ;; go back to the beginning of the 
opponent's number
+                      (delete-char 4) ;; remove the original opponent's number
+                      (insert-char ?\s (- 4 (length (format "%s" (- 
(string-to-number rankstring) 1)))))
+                      (insert (format "%s" (- (string-to-number rankstring) 
1))))
+                    (setq roundcount (+ roundcount 1))))
+               ;;(condition-case nil ;; TODO: fix teams info
+                 (save-excursion 
+                   (while (re-search-forward "^013" nil t)
+                    (let* ((linestringteam (thing-at-point 'line))
+                          (integrantcount 0)
+                          (members 0))
+
+                        ;; to find the end of the line, the number is length 
-2, for some reason
+                        (setq members (/ (- (- (length linestringteam) 2) 34) 
5)) ;; calculate number of members
+
+                      (while (< integrantcount members)
+                       (beginning-of-line)
+                       (forward-char (+ 40 (* (- integrantcount 1) 5)))
+                       (when (string= (format "%s" (string-to-number 
rankstring)) (thing-at-point 'word))
+                         (forward-char -4)
+                         (delete-char 4)
+                         (insert-char ?\s (- 4 (length (format "%s" (- 
(string-to-number rankstring) 1)))))
+                         (insert (format "%s" (- (string-to-number rankstring) 
1))))
+                       (setq integrantcount (+ integrantcount 1))))))))))))
+             
+     (save-excursion  ;; Actually delete the player's line
+       (goto-char (point-min))
+       (while (re-search-forward "^001  DEL" nil t)
+         (beginning-of-line)
+         (let ((beg (point)))
+           (forward-line 1)
+           (delete-region beg (point)))))
+     ;; TODO delete the rank from teams section
+     ;; TODO change number of players and number of rated players
+     (save-excursion
+       (with-current-buffer "Arbitools-output" (insert (format "%s" elo)))
+       (goto-char (point-min))
+       (re-search-forward "^062 ")
+       (let* ((linestring      (thing-at-point 'line))
+              (numberofplayers (substring linestring 4))) 
+        (delete-char (length numberofplayers))
+        (setq numberofplayers (string-to-number numberofplayers))
+        (setq numberofplayers (- numberofplayers 1))
+        (insert (concat (number-to-string numberofplayers) "\n")))
+       (re-search-forward "^072 ")
+       (let* ((linestring           (thing-at-point 'line))
+              (numberofratedplayers (substring linestring 4))) 
+        (unless (< (length elo) 2) ;; if elo is 0 or nonexistent
+          (delete-char (length numberofratedplayers))
+          (setq numberofratedplayers (string-to-number numberofratedplayers))
+          (setq numberofratedplayers (- numberofratedplayers 1))
+          (insert (concat (number-to-string numberofratedplayers) "\n")))))))
+
+(defun arbitools-delete-round (round)
+   "Delete a round."
+   (interactive "sround: ")
+   (save-excursion
+    (goto-char (point-min))
+    (while (re-search-forward "^001" nil t)
+     (forward-char (+ 88 (* (- (string-to-number round) 1) 10)))
+     (delete-char 8)
+     (insert "        "))))
+
+(defun arbitools-replace-empty ()
+   "Replace non played games with spaces"
+   (interactive)
+   (save-excursion
+    (goto-char (point-min))
+    (while (search-forward "0000 - 0" nil t)
+      (replace-match "        "))))
+
+(defun arbitools-insert-player (sex title name elo fed idfide year)
+   "Insert a player"
+   ;; TODO: automatically insert the player in a team
+   (interactive "ssex: \nstitle: \nsname: \nselo: \nsfed: \nsidfide: \nsyear: 
")
+  (let ((playerlinelength nil)
+        (thislinelength nil)) 
+     (save-excursion
+       (goto-char (point-min))
+       (re-search-forward "^001 ")
+       (let* ((linestring (thing-at-point 'line))) 
+         (setq playerlinelength (length linestring))))
+     (save-excursion
+       (goto-char (point-min))
+       (while (re-search-forward "^001" nil t))
+       (let* ((linestring (thing-at-point 'line))
+              (rankstring (substring linestring 5 8)))
+
+         (forward-line 1)
+         (insert "\n")
+         (forward-char -1)
+         (insert (format "001 "))
+         (insert-char ?\s (- 4 (length (format "%s" (+ (string-to-number 
rankstring) 1)))))
+         (insert (format "%s" (+ (string-to-number rankstring) 1)))
+         (insert (format " %s" sex))
+         (when (= (length sex) 0) (insert " ")) ;; add extra space if the sex 
string is empty
+         (insert-char ?\s (- 3 (length title)))
+         (insert (format "%s " title))
+         (insert (format "%s" name))
+         (insert-char ?\s (- 34 (length name)))
+         (when (= (length elo) 4) (insert (format "%s " elo)))
+         (when (= (length elo) 0) (insert "     ")) ;; add extra space if the 
elo is empty
+         (when (= (length elo) 1) (insert "   0 ")) ;; add extra space if the 
elo is a "0"
+         (insert (format "%s" fed))
+         (when (= (length fed) 0) (insert "   ")) ;; add extra space if fed is 
empty
+         (insert-char ?\s (- 12 (length idfide)))
+         (insert (format "%s " idfide))
+         (insert (format "%s      " year))
+         (when (= (length year) 0) (insert "    ")) ;; TODO: improve this to 
make it support different data formats
+         (insert (format "  0.0 "))
+         (insert-char ?\s (- 4 (length (format "%s" (+ (string-to-number 
rankstring) 1)))))
+         (insert (format "%s" (+ (string-to-number rankstring) 1)))
+         (setq thislinelength (length (thing-at-point 'line)))
+         (insert-char ?\s (- playerlinelength thislinelength)))))   
+  (save-excursion
+    (goto-char (point-min))
+    (re-search-forward "^062 ")
+    (let* ((linestring (thing-at-point 'line))
+           (numberofplayers (substring linestring 4))) 
+      (delete-char (length numberofplayers))
+      (setq numberofplayers (string-to-number numberofplayers))
+      (setq numberofplayers (+ 1 numberofplayers))
+      (insert (concat (number-to-string numberofplayers) "\n")))
+    (re-search-forward "^072 ")
+    (let* ((linestring (thing-at-point 'line))
+        (numberofratedplayers (substring linestring 4))) 
+      (unless (< (length elo) 2)
+        (delete-char (length numberofratedplayers))
+        (setq numberofratedplayers (string-to-number numberofratedplayers))
+        (setq numberofratedplayers (+ 1 numberofratedplayers))
+        (insert (concat (number-to-string numberofratedplayers) "\n"))))))
+
+(defun arbitools-insert-result (round white black result)
+   "Insert a result."
+   (interactive "sround: \nswhite: \nsblack: \nsresult: ")
+   (save-excursion
+     (goto-char (point-min))
+     (while (re-search-forward "^001" nil t)
+       (forward-char 4) ;; rank number
+       (when (string= white (thing-at-point 'word))
+         ;;go to first round taking into account the cursor is in the rank 
number
+         (forward-char (+ 85 (* (- (string-to-number round) 1) 10)))
+         (insert "  ") ;; replace the first positions with spaces
+         (delete-char 2) ;; delete the former characters
+         ;; make room for bigger numbers
+         (cond ((= 2 (length black))
+           (backward-char 1))
+           ((= 3 (length black))
+           (backward-char 2)))
+         (insert (format "%s w %s" black result))
+         (delete-char 5) 
+         ;; adjust when numbers are longer
+         (cond ((= 2 (length black)) (delete-char 1))
+           ((= 3 (length black)) (delete-char 2))))
+       (when (string= black (thing-at-point 'word))
+         ;; go to first round taking into account the cursor is in the rank 
number
+         (forward-char (+ 85 (* (- (string-to-number round) 1) 10)))
+         (insert "  ") ;; replace the first positions with spaces
+         (delete-char 2) ;; delete the former characters
+         ;; make room for bigger numbers
+         (cond ((= 2 (length white)) (backward-char 1))
+           ((= 3 (length white)) (backward-char 2)))
+         (cond ((string= "1" result) (insert (format "%s b 0" white)))
+           ((string= "=" result) (insert (format "%s b =" white)))
+           ((string= "+" result) (insert (format "%s b +" white)))
+           ((string= "-" result) (insert (format "%s b -" white)))
+           ((string= "0" result) (insert (format "%s b 1" white))))
+         (delete-char 5) 
+         ;; adjust when numbers are longer
+         (cond ((= 2 (length white)) (delete-char 1))
+           ((= 3 (length white)) (delete-char 2)))))))
+
+(defun arbitools-it3 ()
+   "Get the IT3 tournament report. You will get a .tex file, and a pdf
+    if you have pdflatex installed."
+   (interactive)
+   (call-process "arbitools-run.py" nil "Arbitools-output" nil "it3" 
buffer-file-name))
+
+;; TODO: New It3 function, usint it3.tex from home directory, replacing the 
data and pdflatex it
+
+(defun arbitools-fedarating ()
+   "Get the FEDA rating admin file."
+   (interactive)
+   (call-process "arbitools-run.py" nil "Arbitools-output" nil "fedarating" 
buffer-file-name))
+
+(defvar arbitools-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map (kbd "C-c i") 'arbitools-it3)
+    (define-key map (kbd "C-c r") 'arbitools-insert-result)
+    (define-key map (kbd "C-c p") 'arbitools-insert-player)
+    map)
+  "Keymap for Arbitools major mode.")
+
+
+(easy-menu-define arbitools-mode-menu arbitools-mode-map
+  "Menu for Arbitools mode"
+  '("Arbitools"
+    ["New Tournament" arbitools-new-trf]
+    "---"
+    ["Insert Player" arbitools-insert-player]
+    ["Delete Player" arbitools-delete-player]
+    ["Insert Result" arbitools-insert-result]
+    ["Delete Round" arbitools-delete-round]
+    "---"
+    ["List Players" arbitools-list-players]
+    ["List Pairings" arbitools-list-pairing]
+    "---"
+    ["Update Elo" arbitools-update]
+    ["Get It3 form Report" arbitools-it3]
+    ["Get FEDA Rating file" arbitools-fedarating]
+    "---"
+    ["Prepare for FEDA" arbitools-prepare-feda]
+    ))
+
+
+(defvar arbitools-highlights
+ '(("^001" . font-lock-function-name-face) ; name of the tournament
+    ("^012.*" . font-lock-comment-face)
+    
("\\(^022\\|^032\\|^042\\|^052\\|^062\\|^072\\|^082\\|^092\\|^102\\|^112\\|^122\\).*"
 . font-lock-constant-face)
+    ("^132.*" . font-lock-warning-face) ;dates
+    ("^013" . font-lock-warning-face) ;teams
+    ("\\(^013.\\{1\\}\\)\\(.\\{31\\}\\)" 2 font-lock-comment-face) ;; teams
+    ;; (" [0-9]\\{6,\\} " . font-lock-variable-name-face) ;FIDE ID
+    ("\\(^001.\\{11\\}\\)\\(.\\{32\\}\\)" 2 font-lock-string-face)  ;; Name of 
the player (by position)
+    ("\\(^001.\\{55\\}\\)\\(.\\{10\\}\\)" 2 font-lock-function-name-face) ;; 
FIDE ID
+    ("\\(^001.\\{88\\}\\)\\(.\\{4\\}\\)" 2 font-lock-comment-face) ;; round 1 
opponent
+    ;; ("\\(^132.\\{88\\}\\)\\(.\\{8\\}\\)" 2 font-lock-string-face) ;; round 
1 date line
+    ("\\(^001.\\{93\\}\\)\\(.\\{1\\}\\)" 2 font-lock-string-face) ;; round 1 
colour
+    ("\\(^001.\\{95\\}\\)\\(.\\{1\\}\\)" 2 font-lock-function-name-face) ;; 
round 1 result
+    ;; rest of rounds
+    ("\\(^001.\\{98\\}\\)\\(.\\{4\\}\\)" 2 font-lock-comment-face)
+    ;; ("\\(^132.\\{98\\}\\)\\(.\\{8\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{103\\}\\)\\(.\\{1\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{105\\}\\)\\(.\\{1\\}\\)" 2 font-lock-function-name-face)
+    ("\\(^001.\\{108\\}\\)\\(.\\{4\\}\\)" 2 font-lock-comment-face)
+    ;; ("\\(^132.\\{108\\}\\)\\(.\\{8\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{113\\}\\)\\(.\\{1\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{115\\}\\)\\(.\\{1\\}\\)" 2 font-lock-function-name-face)
+    ("\\(^001.\\{118\\}\\)\\(.\\{4\\}\\)" 2 font-lock-comment-face)
+    ;; ("\\(^132.\\{118\\}\\)\\(.\\{8\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{123\\}\\)\\(.\\{1\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{125\\}\\)\\(.\\{1\\}\\)" 2 font-lock-function-name-face)
+    ("\\(^001.\\{128\\}\\)\\(.\\{4\\}\\)" 2 font-lock-comment-face)
+    ;; ("\\(^132.\\{128\\}\\)\\(.\\{8\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{133\\}\\)\\(.\\{1\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{135\\}\\)\\(.\\{1\\}\\)" 2 font-lock-function-name-face)
+    ("\\(^001.\\{138\\}\\)\\(.\\{4\\}\\)" 2 font-lock-comment-face)
+    ;; ("\\(^132.\\{138\\}\\)\\(.\\{8\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{143\\}\\)\\(.\\{1\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{145\\}\\)\\(.\\{1\\}\\)" 2 font-lock-function-name-face)
+    ("\\(^001.\\{148\\}\\)\\(.\\{4\\}\\)" 2 font-lock-comment-face)
+    ;; ("\\(^132.\\{148\\}\\)\\(.\\{8\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{153\\}\\)\\(.\\{1\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{155\\}\\)\\(.\\{1\\}\\)" 2 font-lock-function-name-face)
+    ("\\(^001.\\{158\\}\\)\\(.\\{4\\}\\)" 2 font-lock-comment-face)
+    ;; ("\\(^132.\\{158\\}\\)\\(.\\{8\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{163\\}\\)\\(.\\{1\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{165\\}\\)\\(.\\{1\\}\\)" 2 font-lock-function-name-face)
+    ("\\(^001.\\{168\\}\\)\\(.\\{4\\}\\)" 2 font-lock-comment-face)
+    ;; ("\\(^132.\\{168\\}\\)\\(.\\{8\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{173\\}\\)\\(.\\{1\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{175\\}\\)\\(.\\{1\\}\\)" 2 font-lock-function-name-face)
+    ("\\(^001.\\{178\\}\\)\\(.\\{4\\}\\)" 2 font-lock-comment-face)
+    ;; ("\\(^132.\\{178\\}\\)\\(.\\{8\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{183\\}\\)\\(.\\{1\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{185\\}\\)\\(.\\{1\\}\\)" 2 font-lock-function-name-face)
+    ("\\(^001.\\{188\\}\\)\\(.\\{4\\}\\)" 2 font-lock-comment-face)
+    ;; ("\\(^132.\\{188\\}\\)\\(.\\{8\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{193\\}\\)\\(.\\{1\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{195\\}\\)\\(.\\{1\\}\\)" 2 font-lock-function-name-face)
+    ("\\(^001.\\{198\\}\\)\\(.\\{4\\}\\)" 2 font-lock-comment-face)
+    ;; ("\\(^132.\\{198\\}\\)\\(.\\{8\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{203\\}\\)\\(.\\{1\\}\\)" 2 font-lock-string-face)
+    ("\\(^001.\\{205\\}\\)\\(.\\{1\\}\\)" 2 font-lock-function-name-face)))
+
+;;;###autoload
+(define-derived-mode arbitools-mode
+  fundamental-mode
+  "Arbitools"
+  "Major mode for Chess Tournament Management."
+  ;(setq font-lock-defaults '(arbitools-highlights))
+  (use-local-map arbitools-mode-map)
+  (generate-new-buffer "Arbitools-output")
+  (generate-new-buffer "List of players")
+  (generate-new-buffer "Pairings List")
+  (generate-new-buffer "Standings")
+  (column-number-mode)
+  (set (make-local-variable 'font-lock-defaults) '(arbitools-highlights)))
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.trf?\\'" . arbitools-mode))
+
+(provide 'arbitools)
+
+;;; arbitools.el ends here
diff --git a/packages/async/README.md b/packages/async/README.md
deleted file mode 100644
index a5b0866..0000000
--- a/packages/async/README.md
+++ /dev/null
@@ -1,145 +0,0 @@
-<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
index 54313c0..9ee3071 100644
--- a/packages/async/async-bytecomp.el
+++ b/packages/async/async-bytecomp.el
@@ -1,4 +1,4 @@
-;;; async-bytecomp.el --- Async functions to compile elisp files async
+;;; async-bytecomp.el --- Compile elisp files asynchronously -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
 
@@ -51,7 +51,7 @@ 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")
+(defvar async-byte-compile-log-file (expand-file-name "async-bytecomp.log" 
user-emacs-directory))
 
 ;;;###autoload
 (defun async-byte-recompile-directory (directory &optional quiet)
@@ -65,27 +65,27 @@ All *.elc files are systematically deleted before 
proceeding."
   ;; 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))))))
+         (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)
diff --git a/packages/async/async.el b/packages/async/async.el
index 24db2a1..6619fff 100644
--- a/packages/async/async.el
+++ b/packages/async/async.el
@@ -1,10 +1,10 @@
-;;; async.el --- Asynchronous processing in Emacs
+;;; async.el --- Asynchronous processing in Emacs -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <address@hidden>
 ;; Created: 18 Jun 2012
-;; Version: 1.6
+;; Version: 1.9
 
 ;; Keywords: async
 ;; X-URL: https://github.com/jwiegley/emacs-async
@@ -54,14 +54,14 @@ matching EXCLUDE-REGEXP (if present).  It is intended to be 
used
 as follows:
 
     (async-start
-       `(lambda ()
-          (require 'smtpmail)
+       \\=`(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\\)-\")
+            ,(async-inject-variables 
\"\\\\=`\\(smtpmail\\|\\(user-\\)?mail\\)-\")
             (smtpmail-send-it)))
-       'ignore)"
+       \\='ignore)"
   `(setq
     ,@(let (bindings)
         (mapatoms
@@ -95,8 +95,8 @@ as follows:
       (unless async-debug
         (kill-buffer buf)))))
 
-(defun async-when-done (proc &optional change)
-  "Process sentinal used to retrieve the value from the child process."
+(defun async-when-done (proc &optional _change)
+  "Process sentinel 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))
@@ -201,7 +201,7 @@ its FINISH-FUNC is nil."
             (funcall async-callback args))
       (async--transmit-sexp (car args) (list 'quote (cdr args))))))
 
-(defun async-receive (&rest args)
+(defun async-receive ()
   "Send the given messages to the asychronous Emacs PROCESS."
   (async--receive-sexp))
 
@@ -257,14 +257,14 @@ ready.  Example:
                  (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
+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)
+     \\='ignore)
 
 Note: Even when FINISH-FUNC is present, a future is still
 returned except that it yields no value (since the value is
diff --git a/packages/async/dired-async.el b/packages/async/dired-async.el
index ecab9cb..d0de789 100644
--- a/packages/async/dired-async.el
+++ b/packages/async/dired-async.el
@@ -1,4 +1,4 @@
-;;; dired-async.el --- Copy/move/delete asynchronously in dired.
+;;; dired-async.el --- Asynchronous dired actions -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
 
@@ -44,7 +44,6 @@
 
 (eval-when-compile
   (defvar async-callback))
-(defvar dired-async-operation nil)
 
 (defgroup dired-async nil
   "Copy rename files asynchronously from dired."
@@ -72,6 +71,11 @@ Should take same args as `message'."
   "Face used for mode-line message."
   :group 'dired-async)
 
+(defface dired-async-failures
+    '((t (:foreground "red")))
+  "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."
@@ -87,7 +91,7 @@ Should take same args as `message'."
   (unless dired-async--modeline-mode
     (let ((visible-bell t)) (ding))))
 
-(defun dired-async-mode-line-message (text &rest args)
+(defun dired-async-mode-line-message (text face &rest args)
   "Notify end of operation in `mode-line'."
   (message nil)
   (let ((mode-line-format (concat
@@ -95,7 +99,7 @@ Should take same args as `message'."
                                 (if args
                                     (apply #'format text args)
                                     text)
-                                'face 'dired-async-message))))
+                                'face face))))
     (force-mode-line-update)
     (sit-for 3)
     (force-mode-line-update)))
@@ -110,28 +114,49 @@ Should take same args as `message'."
   (interactive)
   (let* ((processes (dired-async-processes))
          (proc (car (last processes))))
-    (delete-process proc)
+    (and proc (delete-process proc))
     (unless (> (length processes) 1)
       (dired-async--modeline-mode -1))))
 
-(defun dired-async-after-file-create (len-flist)
+(defun dired-async-after-file-create (total operation failures skipped)
   "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
+  (when operation
     (if (file-exists-p dired-async-log-file)
         (progn
-          (pop-to-buffer (get-buffer-create "*dired async*"))
-          (erase-buffer)
+          (pop-to-buffer (get-buffer-create dired-log-buffer))
+          (goto-char (point-max))
+          (setq inhibit-read-only t)
           (insert "Error: ")
           (insert-file-contents dired-async-log-file)
+          (special-mode)
+          (shrink-window-if-larger-than-buffer)
           (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))))
+         (lambda ()
+           ;; First send error messages.
+           (cond (failures
+                  (funcall dired-async-message-function
+                           "%s failed for %d of %d file%s -- See *Dired log* 
buffer"
+                           'dired-async-failures
+                           (car operation) (length failures)
+                           total (dired-plural-s total)))
+                 (skipped
+                  (funcall dired-async-message-function
+                           "%s: %d of %d file%s skipped -- See *Dired log* 
buffer"
+                           'dired-async-failures
+                           (car operation) (length skipped) total
+                           (dired-plural-s total))))
+           ;; Finally send the success message.
+           (funcall dired-async-message-function
+                    "Asynchronous %s of %s on %s file%s done"
+                    'dired-async-message
+                    (car operation) (cadr operation)
+                    total (dired-plural-s total)))))))
 
 (defun dired-async-maybe-kill-ftp ()
   "Return a form to kill ftp process in child emacs."
@@ -144,19 +169,16 @@ Should take same args as `message'."
                                        (buffer-name b)) b))))
        (when buf (kill-buffer buf))))))
 
+(defvar overwrite-query)
 (defun dired-async-create-files (file-creator operation fn-list 
name-constructor
-                                 &optional marker-char)
+                                 &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
+  (setq overwrite-query nil)
+  (let ((total (length fn-list))
+        failures async-fn-list skipped callback)
+    (let (to)
       (dolist (from fn-list)
         (setq to (funcall name-constructor from))
         (if (equal to from)
@@ -166,22 +188,16 @@ See `dired-create-files' for the behavior of arguments."
                          (downcase operation) from)))
         (if (not to)
             (setq skipped (cons (dired-make-relative from) skipped))
-            (let* ((overwrite (file-exists-p to))
+            (let* ((overwrite (and (null (eq file-creator 'backup-file))
+                                   (file-exists-p to)))
                    (dired-overwrite-confirmed ; for dired-handle-overwrite
                     (and overwrite
-                         (let ((help-form '(format "\
+                         (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))))
+`!' to overwrite all remaining files with no more questions." ,to)))
+                           (dired-query 'overwrite-query "Overwrite `%s'?" 
to)))))
               ;; Handle the `dired-copy-file' file-creator specially
               ;; When copying a directory to another directory or
               ;; possibly to itself or one of its subdirectories.
@@ -213,58 +229,85 @@ ESC or `q' to not overwrite any of the remaining files,
                            (push (cons from to) async-fn-list))
                       (progn
                         (push (dired-make-relative from) failures)
-                        (dired-log "%s `%s' to `%s' failed"
+                        (dired-log "%s `%s' to `%s' failed\n"
                                    operation from to)))
                   (push (cons from to) async-fn-list)))))
+      ;; When failures have been printed to dired log add the date at bob.
+      (when (or failures skipped) (dired-log t))
+      ;; When async-fn-list is empty that's mean only one file
+      ;; had to be copied and user finally answer NO.
+      ;; In this case async process will never start and callback
+      ;; will have no chance to run, so notify failures here.
+      (unless async-fn-list
+        (cond (failures
+               (funcall dired-async-message-function
+                        "%s failed for %d of %d file%s -- See *Dired log* 
buffer"
+                        'dired-async-failures
+                        operation (length failures)
+                        total (dired-plural-s total)))
+              (skipped
+               (funcall dired-async-message-function
+                        "%s: %d of %d file%s skipped -- See *Dired log* buffer"
+                        'dired-async-failures
+                        operation (length skipped) total
+                        (dired-plural-s total)))))
+      ;; Setup callback.
       (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)
+            (lambda (&optional _ignore)
+               (dired-async-after-file-create
+                total (list operation (length async-fn-list)) failures skipped)
+               (when (string= (downcase operation) "rename")
+                 (cl-loop for (file . to) in async-fn-list
+                          for bf = (get-file-buffer file)
+                          for destp = (file-exists-p to)
+                          do (and bf destp
+                                  (with-current-buffer bf
                                     (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)))))
+                          (let ((dired-recursive-copies (quote always))
+                                (dired-copy-preserve-time
+                                 ,dired-copy-preserve-time))
+                            (setq overwrite-backup-query nil)
+                            ;; Inline `backup-file' as long as it is not
+                            ;; available in emacs.
+                            (defalias 'backup-file
+                                ;; Same feature as "cp --backup=numbered from 
to"
+                                ;; Symlinks are copied as file from source 
unlike
+                                ;; `dired-copy-file' which is same as cp -d.
+                                ;; Directories are omitted.
+                                (lambda (from to ok)
+                                  (cond ((file-directory-p from) (ignore))
+                                        (t (let ((count 0))
+                                             (while (let ((attrs 
(file-attributes to)))
+                                                      (and attrs (null (nth 0 
attrs))))
+                                               (cl-incf count)
+                                               (setq to (concat 
(file-name-sans-versions to)
+                                                                (format 
".~%s~" count)))))
+                                           (condition-case err
+                                               (copy-file from to ok 
dired-copy-preserve-time)
+                                             (file-date-error
+                                              (dired-log "Can't set date on 
%s:\n%s\n" from err)))))))
+                            ;; Now run the FILE-CREATOR function on files.
+                            (cl-loop with fn = (quote ,file-creator)
+                                     for (from . dest) in (quote 
,async-fn-list)
+                                     do (condition-case err
+                                            (funcall fn from dest t)
+                                          (file-error
+                                           (dired-log "%s: %s\n" (car err) 
(cdr err)))
+                                          nil))
+                        (when (get-buffer dired-log-buffer)
+                          (dired-log t)
+                          (with-current-buffer dired-log-buffer
+                           (write-region (point-min) (point-max)
+                                         ,dired-async-log-file))))
                       ,(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)
diff --git a/packages/async/smtpmail-async.el b/packages/async/smtpmail-async.el
index 5ac426d..6fcf287 100644
--- a/packages/async/smtpmail-async.el
+++ b/packages/async/smtpmail-async.el
@@ -1,4 +1,4 @@
-;;; smtpmail-async.el --- Send e-mail with smtpmail.el asynchronously
+;;; smtpmail-async.el --- Send e-mail with smtpmail.el asynchronously -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
 
@@ -65,8 +65,8 @@ It is called just before calling `smtpmail-send-it'.")
             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)))))
+     (lambda (&optional _ignore)
+       (message "Delivering message to %s...done" to)))))
 
 (provide 'smtpmail-async)
 
diff --git a/packages/aumix-mode/aumix-mode.el 
b/packages/aumix-mode/aumix-mode.el
index 8507fb7..6f97746 100644
--- a/packages/aumix-mode/aumix-mode.el
+++ b/packages/aumix-mode/aumix-mode.el
@@ -89,7 +89,7 @@ Only a few aumix options do anything for interactive use.
 \"-d\" can set a mixer device file (default /dev/mixer), for
 example
 
-    (setq aumix-mode-switches '(\"-d\" \"/dev/mixer2\"))"
+    (setq aumix-mode-switches \\='(\"-d\" \"/dev/mixer2\"))"
 
   :type  '(repeat string)
   :group 'aumix-mode)
diff --git a/packages/auto-overlays/auto-overlay-common.el 
b/packages/auto-overlays/auto-overlay-common.el
index 994b20d..e1c539a 100644
--- a/packages/auto-overlays/auto-overlay-common.el
+++ b/packages/auto-overlays/auto-overlay-common.el
@@ -58,7 +58,7 @@ If INACTIVE is non-nil, both active and inactive overlays are
 returned (usually inactive ones are ignored).
 
 Note that this function returns any overlay. If you want to
-restrict it to auto overlays, include '(identity auto-overlay) in
+restrict it to auto overlays, include (identity auto-overlay) in
 PROP-TEST."
   (when (null point) (setq point (point)))
 
@@ -112,7 +112,7 @@ are returned. If INACTIVE is non-nil, both active and 
inactive
 overlays are returned (usually inactive ones are ignored).
 
 Note that this function returns any overlay. If you want to
-restrict it to auto overlays, include '(identity auto-overlay) in
+restrict it to auto overlays, include (identity auto-overlay) in
 PROP-TEST."
 
   ;; make sure prop-test is a list of lists, even if there's only one, and
diff --git a/packages/auto-overlays/auto-overlays.el 
b/packages/auto-overlays/auto-overlays.el
index cfb704d..6febdb4 100644
--- a/packages/auto-overlays/auto-overlays.el
+++ b/packages/auto-overlays/auto-overlays.el
@@ -343,7 +343,7 @@ Comparison is done with 'eq."
 (defun auto-o-position (item list)
   "Find the first occurrence of ITEM in LIST.
 Return the index of the matching item, or nil of not found.
-Comparison is done with 'equal."
+Comparison is done with `equal'."
   (let (el (i 0))
     (catch 'found
       (while (setq el (nth i list))
@@ -406,7 +406,7 @@ DEFINITION should be a list of the form:
   (CLASS @optional :id DEFINITION-ID @rest REGEXP1 REGEXP2 ... )
 
 CLASS is a symbol specifying the auto-overlay class. The standard
-classes are 'word, 'line, 'self, 'flat and 'nested. The :id
+classes are `word', `line', `self', `flat' and `nested'. The :id
 property is optional. It should be a symbol that can be used to
 uniquely identify DEFINITION (see
 `auto-overlay-unload-definition').
@@ -425,8 +425,8 @@ form (NAME . VALUE) where NAME is an overlay property name 
(a
 symbol) and VALUE is its value.
 
 The properties :edge and :id are optional. The :edge property
-EDGE should be one of the symbols 'start or 'end. If it is not
-specified, :edge is assumed to be 'start. The :id property is a
+EDGE should be one of the symbols `start' or `end'. If it is not
+specified, :edge is assumed to be `start'. The :id property is a
 symbol that can be used to uniquely identify REGEXP (see
 `auto-overlay-unload-regexp')."
 
@@ -503,8 +503,8 @@ form (NAME . VALUE) where NAME is an overlay property name 
(a
 symbol) and VALUE is its value.
 
 The properties :edge and :id are optional. The :edge property
-EDGE should be one of the symbols 'start or 'end. If it is not
-specified, :edge is assumed to be 'start. The :id property is a
+EDGE should be one of the symbols `start' or `end'. If it is not
+specified, :edge is assumed to be `start'. The :id property is a
 symbol that can be used to uniquely identify REGEXP (see
 `auto-overlay-unload-regexp')."
 
@@ -1431,13 +1431,13 @@ If START or END are numbers or markers, move that edge 
to the
 buffer location specified by the number or marker and make it
 unmatched.  If START or END are non-nil but neither of the above,
 make that edge unmatched.  If START or END are null, don't change
-that edge. However, if END is null, and START is an 'end overlay,
+that edge. However, if END is null, and START is an `end' overlay,
 match end of OVERLAY rather than start.
 
 If NO-PARSE is non-nil, block re-parsing due to exclusive overlay
 changes. If NO-PROPS is non-nil, block updating of overlay's
 properties. If PROTECT-MATCH is non-nil, don't modify any match
-overlays associated with OVERLAY (i.e. don't modify their 'parent
+overlays associated with OVERLAY (i.e. don't modify their `parent'
 properties)."
 
   (let ((old-start (overlay-start overlay))
@@ -1593,7 +1593,7 @@ properties)."
   "Delete OVERLAY from buffer.
 
 If PROTECT-MATCH is non-nil, don't modify any match overlays
-associated with OVERLAY (i.e. leave their 'parent properties
+associated with OVERLAY (i.e. leave their `parent' properties
 alone). If NO-PARSE is non-nil, block re-parsing due to exclusive
 overlay changes."
 
diff --git a/packages/avy/avy.el b/packages/avy/avy.el
index 45f2120..593dbb0 100644
--- a/packages/avy/avy.el
+++ b/packages/avy/avy.el
@@ -150,10 +150,10 @@ pressed during the dispatch, ACTION is set to replace the 
default
   :type 'boolean)
 
 (defcustom avy-word-punc-regexp "[!-/:address@hidden"
-  "Regexp of punctuation chars that count as word starts for `avy-goto-word-1.
+  "Regexp of punctuation chars that count as word starts for `avy-goto-word-1'.
 When nil, punctuation chars will not be matched.
 
-\"[!-/:address@hidden" will match all printable punctuation chars."
+\"[!-/:address@hidden" will match all printable punctuation chars."
   :type 'regexp)
 
 (defcustom avy-ignored-modes '(image-mode doc-view-mode pdf-view-mode)
@@ -559,14 +559,14 @@ Use OVERLAY-FN to visualize the decision overlay."
   (avy--remove-leading-chars))
 
 (defun avy--next-visible-point ()
-  "Return the next closest point without 'invisible property."
+  "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."
+  "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))))
@@ -1212,8 +1212,8 @@ The window scope is determined by `avy-all-windows' or
 (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
+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'.
diff --git a/packages/beacon/beacon.el b/packages/beacon/beacon.el
index 4226149..9a3edac 100644
--- a/packages/beacon/beacon.el
+++ b/packages/beacon/beacon.el
@@ -5,8 +5,8 @@
 ;; Author: Artur Malabarba <address@hidden>
 ;; URL: https://github.com/Malabarba/beacon
 ;; Keywords: convenience
-;; Version: 1.0
-;; Package-Requires: ((seq "1.11"))
+;; Version: 1.3.1
+;; Package-Requires: ((seq "2.14"))
 
 ;; 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
@@ -166,6 +166,10 @@ predictable ways, when the blink would be more distracting
 than helpful.."
   :type '(repeat symbol))
 
+(defcustom beacon-before-blink-hook nil
+  "Hook run immediately before blinking the beacon."
+  :type 'hook)
+
 
 ;;; Internal variables
 (defvar beacon--window-scrolled nil)
@@ -236,12 +240,14 @@ COLORS applied to each one."
            (seq-filter (lambda (o) (overlay-get o 'beacon))
                        (overlays-at (point))))))
 
-(defun beacon--vanish ()
+(defun beacon--vanish (&rest _)
   "Turn off the beacon."
-  (when (timerp beacon--timer)
-    (cancel-timer beacon--timer))
-  (mapc #'delete-overlay beacon--ovs)
-  (setq beacon--ovs nil))
+  (unless (string-match "\\` \\*\\(temp-buffer\\|Echo Area.*\\)\\*"
+                        (buffer-name))
+    (when (timerp beacon--timer)
+      (cancel-timer beacon--timer))
+    (mapc #'delete-overlay beacon--ovs)
+    (setq beacon--ovs nil)))
 
 
 ;;; Colors
@@ -321,6 +327,7 @@ unconditionally (even if `beacon-mode' is disabled), and 
this can
 be invoked as a user command or called from lisp code."
   (interactive)
   (beacon--vanish)
+  (run-hooks 'beacon-before-blink-hook)
   (beacon--shine)
   (setq beacon--timer
         (run-at-time beacon-blink-delay
@@ -387,6 +394,11 @@ The same is true for DELTA-X and horizonta movement."
   (cond
    ;; Sanity check.
    ((not (markerp beacon--previous-place)))
+   ;; Blink for switching buffers.
+   ((and beacon-blink-when-buffer-changes
+         (not (eq (marker-buffer beacon--previous-place)
+                  (current-buffer))))
+    (beacon-blink-automated))
    ;; Blink for switching windows.
    ((and beacon-blink-when-window-changes
          (not (eq beacon--previous-window (selected-window))))
@@ -443,11 +455,13 @@ unreliable, so just blink immediately."
         (add-hook 'window-scroll-functions #'beacon--window-scroll-function)
         (add-hook 'focus-in-hook #'beacon--blink-on-focus)
         (add-hook 'post-command-hook #'beacon--post-command)
+        (add-hook 'before-change-functions #'beacon--vanish)
         (add-hook 'pre-command-hook #'beacon--record-vars)
         (add-hook 'pre-command-hook #'beacon--vanish))
     (remove-hook 'focus-in-hook #'beacon--blink-on-focus)
     (remove-hook 'window-scroll-functions #'beacon--window-scroll-function)
     (remove-hook 'post-command-hook #'beacon--post-command)
+    (remove-hook 'before-change-functions #'beacon--vanish)
     (remove-hook 'pre-command-hook #'beacon--record-vars)
     (remove-hook 'pre-command-hook #'beacon--vanish)))
 
diff --git a/packages/bug-hunter/bug-hunter.el 
b/packages/bug-hunter/bug-hunter.el
index 6875470..30c2c8e 100644
--- a/packages/bug-hunter/bug-hunter.el
+++ b/packages/bug-hunter/bug-hunter.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba <address@hidden>
 ;; URL: https://github.com/Malabarba/elisp-bug-hunter
-;; Version: 1.1
+;; Version: 1.3.1
 ;; Keywords: lisp
 ;; Package-Requires: ((seq "1.3") (cl-lib "0.5"))
 
@@ -310,7 +310,7 @@ ARGS are passed before \"-l FILE\"."
   "Execute FORMS in the background and test ASSERTION.
 See `bug-hunter' for a description on the ASSERTION.
 
-If ASSERTION is 'interactive, the form is run through
+If ASSERTION is `interactive', the form is run through
 `bug-hunter--run-form-interactively'.  Otherwise, a slightly
 modified version of the form combined with ASSERTION is run
 through `bug-hunter--run-form'."
@@ -431,9 +431,11 @@ link for some examples:
         (if assertion
             (concat "Assertion returned non-nil even on emacs -Q:"
                     bug-hunter--assertion-reminder)
-          "Detected a signaled error even on emacs -Q. I'm sorry, but there
-is something seriously wrong with your Emacs installation.
-There's nothing more I can do here.")
+          "Detected a signaled error even on emacs -Q. This could mean three
+things things:
+1. The problem happens inside `package-initialize'.
+2. You wrote the assertion wrong.
+3. There's something seriously wrong with your Emacs installation.")
         (or assertion "")))
 
      (t
@@ -466,10 +468,17 @@ Wraps them in a progn if necessary to always return a 
single
 form.
 
 The user may decide to not provide input, in which case
-'interactive is returned.  Note, this is different from the user
-typing `RET' at an empty prompt, in which case nil is returned."
-  (pcase (read-char-choice bug-hunter--hunt-type-prompt '(?i ?e ?a))
-    (`?i 'interactive)
+`interactive' is returned.  Note, this is different from the user
+typing RET at an empty prompt, in which case nil is returned."
+  (pcase (read-char-choice (if (display-graphic-p)
+                               bug-hunter--hunt-type-prompt
+                             (replace-regexp-in-string "To bisect 
interactively,.*\n" ""
+                                                       
bug-hunter--hunt-type-prompt))
+                           '(?i ?e ?a))
+    (`?i
+     (unless (display-graphic-p)
+       (user-error "Sorry, but `interactive' bisection needs a graphical 
frame"))
+     'interactive)
     (`?e nil)
     (_
      (require 'simple)
@@ -480,7 +489,11 @@ typing `RET' at an empty prompt, in which case nil is 
returned."
                 (minibuffer-with-setup-hook
                     (lambda ()
                       (add-hook 'completion-at-point-functions
-                                #'elisp-completion-at-point nil t)
+                                (if (fboundp 'elisp-completion-at-point)
+                                    #'elisp-completion-at-point
+                                  (with-no-warnings
+                                    #'lisp-completion-at-point))
+                                nil t)
                       (run-hooks 'eval-expression-minibuffer-setup-hook))
                   (insert
                    (read-from-minibuffer
diff --git a/packages/cl-generic/cl-generic.el 
b/packages/cl-generic/cl-generic.el
index 4b1a377..a40723c 100644
--- a/packages/cl-generic/cl-generic.el
+++ b/packages/cl-generic/cl-generic.el
@@ -1,10 +1,10 @@
 ;;; cl-generic.el --- Forward cl-generic compatibility for Emacs<25
 
-;; Copyright (C) 2015  Free Software Foundation, Inc
+;; Copyright (C) 2015, 2016  Free Software Foundation, Inc
 
 ;; Author: Stefan Monnier <address@hidden>
 ;; vcomment: Emacs-25's version is 1.0 so this has to stay below.
-;; Version: 0.2
+;; Version: 0.3
 
 ;; 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
@@ -84,18 +84,32 @@
   ;; `cl-no-applicable-method' errors.
   (push 'cl-no-applicable-method (get 'no-method-definition 'error-conditions))
 
+  (defalias 'cl-generic-apply #'apply)
+
   (defmacro cl-defmethod (name args &rest body)
     (let ((qualifiers nil))
       (while (not (listp args))
         (push args qualifiers)
         (setq args (pop body)))
-      (let ((arg1 (car args)))
-        (when (eq (car-safe (car (cdr-safe arg1))) 'subclass)
-          ;; There's no exact equivalent to `subclass', but :static
-          ;; provides a superset which should work just as well in practice.
-          (push :static qualifiers)
-          (setf (cadr arg1) (cadr (cadr arg1)))))
       (let ((docstring (if (and (stringp (car body)) (cdr body)) (pop body))))
+        ;; Backward compatibility for `no-next-method' and
+        ;; `no-applicable-method', which have slightly different calling
+        ;; convention than their cl-generic counterpart.
+        (pcase name
+          (`cl-no-next-method
+           (setq name 'no-next-method)
+           (setq args (cddr args)))
+          (`cl-no-applicable-method
+           (setq name 'no-applicable-method)
+           (setq args `(,(nth 1 args) ,(nth 0 args)
+                        ,(make-symbol "_ignore") . ,(nthcdr 2 args)))))
+        (let ((arg1 (car args)))
+          (when (eq (car-safe (car (cdr-safe arg1))) 'subclass)
+            ;; There's no exact equivalent to `subclass', but :static
+            ;; provides a superset which should work just as well in practice.
+            (push :static qualifiers)
+            (setf (cadr arg1) (cadr (cadr arg1)))))
+
         `(defmethod ,name ,@qualifiers ,args
            ,@(if docstring (list docstring))
            ;; We could just alias `cl-call-next-method' to `call-next-method',
@@ -112,7 +126,7 @@
                       ((cl-call-next-method (&rest args)
                                             (apply #'call-next-method args))
                        (cl-next-method-p () (next-method-p)))
-                   ,@body))))))))
+                  ,@body))))))))
 
 (provide 'cl-generic)
 ;;; cl-generic.el ends here
diff --git a/packages/compact-docstrings/.gitignore 
b/packages/compact-docstrings/.gitignore
new file mode 100644
index 0000000..64b1053
--- /dev/null
+++ b/packages/compact-docstrings/.gitignore
@@ -0,0 +1 @@
+/.cask/
diff --git a/packages/compact-docstrings/Cask b/packages/compact-docstrings/Cask
new file mode 100644
index 0000000..9fd0c8c
--- /dev/null
+++ b/packages/compact-docstrings/Cask
@@ -0,0 +1,6 @@
+(source gnu)
+(source melpa)
+
+(package-file "compact-docstrings.el")
+
+(development)
diff --git a/packages/compact-docstrings/Makefile 
b/packages/compact-docstrings/Makefile
new file mode 100644
index 0000000..4677e7f
--- /dev/null
+++ b/packages/compact-docstrings/Makefile
@@ -0,0 +1,6 @@
+EMACS ?= emacs
+CASK = env --unset INSIDE_EMACS EMACS=$(EMACS) cask
+
+screenshot:
+       $(CASK) exec $(EMACS) --debug-init -Q \
+               -L . -l etc/screenshot.el
diff --git a/packages/compact-docstrings/README.rst 
b/packages/compact-docstrings/README.rst
new file mode 100644
index 0000000..7a56b5a
--- /dev/null
+++ b/packages/compact-docstrings/README.rst
@@ -0,0 +1,23 @@
+=============================
+ Compact docstrings in Emacs
+=============================
+
+Shrink blank lines in docstrings and doc comments
+
+.. image:: etc/compact-docstrings.png
+
+Setup
+=====
+
+Enable locally with ``compact-docstrings-mode``::
+
+  (add-hook 'some-mode-hook #'compact-docstrings-mode)
+
+Enable globally (in all programming modes) with 
``global-compact-docstrings-mode``::
+
+  (add-hook 'after-init-hook #'global-compact-docstrings-mode)
+
+Customization
+=============
+
+Enable compaction of all comments and strings by setting 
``compact-docstrings-only-doc-blocks`` to ``nil``.  Change the compact line 
height by customizing ``compact-docstrings-face``.
diff --git a/packages/compact-docstrings/compact-docstrings.el 
b/packages/compact-docstrings/compact-docstrings.el
new file mode 100644
index 0000000..584c9ca
--- /dev/null
+++ b/packages/compact-docstrings/compact-docstrings.el
@@ -0,0 +1,92 @@
+;;; compact-docstrings.el --- Shrink blank lines in docstrings and doc comments
+
+;; Copyright (C) 2016  Free Software Foundation, Inc.
+
+;; Author: Clément Pit-Claudel <address@hidden>
+;; Maintainer: Clément Pit-Claudel <address@hidden>
+;; URL: https://github.com/cpitclaudel/compact-docstrings
+;; Package-Version: 0.1
+;; Keywords: convenience, faces, lisp, maint, c
+
+;; 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:
+
+;; Shrink blank lines in docstrings and doc comments
+;;
+;; Enable locally with `compact-docstrings-mode':
+;;   (add-hook 'some-mode-hook #'compact-docstrings-mode)
+;;
+;; Enable globally (in all programming modes) with
+;;   (add-hook 'after-init-hook #'global-compact-docstrings--mode)
+
+;;; Code:
+
+(defgroup compact-docstrings nil
+  "Shrink empty lines in docstrings and doc comments."
+  :group 'faces)
+
+(defface compact-docstrings-face
+  '((t :height 0.5))
+  "Face applied to blank lines in docstrings."
+  :group 'compact-docstrings)
+
+(defcustom compact-docstrings-only-doc-blocks t
+  "When nil, also shrink blank lines in regular strings and comments."
+  :group 'compact-docstrings
+  :type 'boolean)
+
+(defun compact-docstrings--matcher (bound)
+  "Find blank line in docstring, looking in point .. BOUND."
+  (let ((found nil))
+    (while (and (not found) (re-search-forward "^\\s-*\n" bound t))
+      (let ((syntax (syntax-ppss)))
+        (when (and (or (nth 3 syntax)  ;; In string
+                       (nth 4 syntax)) ;; In comment
+                   (or (not compact-docstrings-only-doc-blocks)
+                       (let ((face (get-text-property (point) 'face)))
+                         (or (eq face 'font-lock-doc-face)
+                             (and (listp face) (memq 'font-lock-doc-face 
face))))))
+          (setq found t))))
+    found))
+
+(defconst compact-docstrings--keywords
+  '((compact-docstrings--matcher 0 'compact-docstrings-face prepend)) 'append)
+
+;;;###autoload
+(define-minor-mode compact-docstrings-mode
+  "Shrink empty lines in docstrings and doc comments."
+  :lighter " compact"
+  (if compact-docstrings-mode
+      (font-lock-add-keywords nil compact-docstrings--keywords 'append)
+    (font-lock-remove-keywords nil compact-docstrings--keywords))
+  (if (fboundp #'font-lock-flush)
+      (font-lock-flush)
+    (with-no-warnings (font-lock-fontify-buffer))))
+
+(defun compact-docstrings--mode-on ()
+  "Turn on `compact-docstrings-mode', if appropriate."
+  (when (derived-mode-p #'prog-mode)
+    (compact-docstrings-mode)))
+
+;;;###autoload
+(defalias 'shrink-docstrings #'compact-docstrings--mode-on)
+
+;;;###autoload
+(define-globalized-minor-mode global-compact-docstrings-mode 
compact-docstrings-mode
+  compact-docstrings--mode-on
+  :init-value nil)
+
+(provide 'compact-docstrings)
+;;; compact-docstrings.el ends here
diff --git a/packages/compact-docstrings/etc/after.py 
b/packages/compact-docstrings/etc/after.py
new file mode 100644
index 0000000..26a7ae2
--- /dev/null
+++ b/packages/compact-docstrings/etc/after.py
@@ -0,0 +1,14 @@
+# With compact docstrings
+def complex(real=0.0, imag=0.0):
+    """Form a complex number.
+
+    Keyword arguments:
+    real -- the real part (default 0.0)
+    imag -- the imaginary part (default 0.0)
+
+    Some more description text, artificially
+    lengthened to make it span two lines.
+
+    Another paragraph.
+    """
+    pass
diff --git a/packages/compact-docstrings/etc/before.py 
b/packages/compact-docstrings/etc/before.py
new file mode 100644
index 0000000..66bebaa
--- /dev/null
+++ b/packages/compact-docstrings/etc/before.py
@@ -0,0 +1,14 @@
+# With regular docstrings
+def complex(real=0.0, imag=0.0):
+    """Form a complex number.
+
+    Keyword arguments:
+    real -- the real part (default 0.0)
+    imag -- the imaginary part (default 0.0)
+
+    Some more description text, artificially
+    lengthened to make it span two lines.
+
+    Another paragraph.
+    """
+    pass
diff --git a/packages/compact-docstrings/etc/compact-docstrings-screenshot.el 
b/packages/compact-docstrings/etc/compact-docstrings-screenshot.el
new file mode 100644
index 0000000..6764b07
--- /dev/null
+++ b/packages/compact-docstrings/etc/compact-docstrings-screenshot.el
@@ -0,0 +1,99 @@
+;;; compact-docstrings-screenshot.el --- Make a screenshot of 
compact-docstrings
+
+;; 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/>.
+
+;;; Commentary:
+
+;; This just makes a screenshot for this package's homepage.
+
+;;; Code:
+
+(defvar cds-fringe-width 6)
+
+(defconst cds-script-dir
+  (file-name-directory (or load-file-name
+                           buffer-file-name)))
+
+(defun cds-cleanup ()
+  (dolist (buffer (buffer-list))
+    (kill-buffer buffer)))
+
+(defun cds-prepare-UI ()
+  "Prepare UI for taking a screenshot."
+  (ido-mode)
+  (tool-bar-mode -1)
+  (menu-bar-mode -1)
+  (scroll-bar-mode -1)
+  (column-number-mode)
+  (fringe-mode (cons cds-fringe-width cds-fringe-width))
+  (blink-cursor-mode -1)
+  (setq-default cursor-type 'bar
+                split-width-threshold 80
+                truncate-partial-width-windows t
+                frame-title-format (format "Compact docstrings @ Emacs %s" 
emacs-version)
+                x-gtk-use-system-tooltips nil)
+  (load-theme 'tango t)
+  ;; (set-face-attribute 'tooltip nil :height 60)
+  (set-face-attribute 'match nil :background "yellow1")
+  (set-face-attribute 'default nil :family "Ubuntu Mono" :height 110)
+  (set-face-attribute 'mode-line nil :foreground "gray60" :background "black")
+  (set-face-attribute 'mode-line-inactive nil :foreground "gray60" :background 
"#404045")
+  (set-face-attribute 'mode-line-buffer-id nil :foreground "#eab700")
+  (set-fontset-font t 'unicode "Ubuntu Mono")
+  (set-frame-size nil 100 13)
+  (redisplay t))
+
+(defun cds-load-package ()
+  "Load package."
+  (package-initialize)
+  (load-library "compact-docstrings"))
+
+(defun cds-load-example ()
+  "Prepare files and layout windows."
+  (find-file "etc/before.py")
+  (setq buffer-name "Regular docstrings")
+  (find-file-other-window "after.py")
+  (setq buffer-name "Compact docstrings")
+  (compact-docstrings-mode))
+
+(defun cds-prepare-screenshot-1 ()
+  "Prepare for taking a screenshot."
+  (cds-prepare-UI)
+  (cds-load-package)
+  (cds-load-example)
+  (message nil))
+
+(defun cds-save-screenshot ()
+  "Save screenshot of current frame."
+  (let ((fname (expand-file-name "compact-docstrings.png" cds-script-dir)))
+    (process-lines "import" "-window" (frame-parameter nil 'outer-window-id)
+                   fname)
+    (process-lines "mogrify" "-strip" "-matte"
+                   "-bordercolor" (face-attribute 'fringe :background)
+                   "-border" (format "0x%d" cds-fringe-width) fname)
+    (process-lines "optipng" "-o3" fname))
+  (kill-emacs))
+
+(defun cds-take-screenshot ()
+  (cds-prepare-screenshot-1)
+  (redisplay t)
+  (run-with-idle-timer 1 nil #'cds-save-screenshot))
+
+(print default-directory)
+(run-with-idle-timer 0 nil #'cds-take-screenshot)
+
+(provide 'compact-docstrings-screenshot)
+;; compact-docstrings-screenshot.el ends here
diff --git a/packages/compact-docstrings/etc/compact-docstrings.png 
b/packages/compact-docstrings/etc/compact-docstrings.png
new file mode 100644
index 0000000..fd86dd3
Binary files /dev/null and 
b/packages/compact-docstrings/etc/compact-docstrings.png differ
diff --git a/packages/company-math/.dir-locals.el 
b/packages/company-math/.dir-locals.el
new file mode 100644
index 0000000..064a938
--- /dev/null
+++ b/packages/company-math/.dir-locals.el
@@ -0,0 +1,3 @@
+
+((emacs-lisp-mode
+  (indent-tabs-mode)))
diff --git a/packages/company-math/company-math.el 
b/packages/company-math/company-math.el
index dc8151f..49d3028 100644
--- a/packages/company-math/company-math.el
+++ b/packages/company-math/company-math.el
@@ -4,7 +4,7 @@
 ;; Author: Vitalie Spinu <address@hidden>
 ;; URL: https://github.com/vspinu/company-math
 ;; Keywords:  Unicode, symbols, completion
-;; Version: 1.0.1
+;; Version: 1.1
 ;; Package-Requires: ((company "0.8.0") (math-symbol-lists "1.0"))
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -54,15 +54,15 @@ When set to special value t, allow on all faces except 
those in
 `company-math-disallow-unicode-symbols-in-faces'."
   :group 'company-math
   :type '(choice (const t)
-                (repeat :tag "Faces" symbol)))
+                 (repeat :tag "Faces" symbol)))
 
-(defcustom company-math-allow-latex-symbols-in-faces '(font-latex-math-face)
+(defcustom company-math-allow-latex-symbols-in-faces '(tex-math 
font-latex-math-face)
   "List of faces to disallow the insertion of latex mathematical symbols.
 When set to special value t, allow on all faces except those in
 `company-math-disallow-latex-symbols-in-faces'."
   :group 'company-math
   :type '(choice (const t)
-                (repeat :tag "Faces" symbol)))
+                 (repeat :tag "Faces" symbol)))
 
 (defcustom company-math-disallow-unicode-symbols-in-faces 
'(font-latex-math-face)
   "List of faces to disallow the insertion of Unicode symbols."
@@ -85,10 +85,10 @@ corresponding unicode symbol."
   (delq nil
         (mapcar
          #'(lambda (el)
-            (let* ((tex (substring (nth 1 el) 1))
-                   (ch (and (nth 2 el) (decode-char 'ucs (nth 2 el))))
-                   (symb (and ch (char-to-string ch))))
-              (propertize tex :symbol symb)))
+             (let* ((tex (substring (nth 1 el) 1))
+                    (ch (and (nth 2 el) (decode-char 'ucs (nth 2 el))))
+                    (symb (and ch (char-to-string ch))))
+               (propertize tex :symbol symb)))
          alist)))
 
 (defconst company-math--symbols
@@ -99,19 +99,19 @@ corresponding unicode symbol."
 
 (defun company-math--prefix (allow-faces disallow-faces)
   (let* ((face (get-text-property (point) 'face))
-        (face (or (car-safe face) face))
-        (insertp (and (not (memq face disallow-faces))
-                      (or (eq t allow-faces)
-                          (memq face allow-faces)))))
+         (face (or (car-safe face) face))
+         (insertp (and (not (memq face disallow-faces))
+                       (or (eq t allow-faces)
+                           (memq face allow-faces)))))
     (when insertp
       (save-excursion
-       (when (looking-back company-math-prefix-regexp (point-at-bol))
-         (match-string 1))))))
+        (when (looking-back company-math-prefix-regexp (point-at-bol))
+          (match-string 1))))))
 
 (defun company-math--substitute-unicode (symbol)
   "Substitute preceding latex command with with SYMBOL."
   (let ((pos (point))
-       (inhibit-point-motion-hooks t))
+        (inhibit-point-motion-hooks t))
     (when (re-search-backward company-math-prefix-regexp)
       (delete-region (match-beginning 0) pos)
       (insert symbol))))
@@ -126,7 +126,7 @@ corresponding unicode symbol."
   (cl-case command
     (interactive (company-begin-backend 'company-latex-commands))
     (prefix (unless (company-in-string-or-comment)
-             (company-math--prefix t '())))
+              (company-math--prefix t '())))
     (candidates (all-completions arg math-symbol-list-latex-commands))
     (sorted t)))
 
@@ -137,25 +137,33 @@ corresponding unicode symbol."
   (cl-case command
     (interactive (company-begin-backend 'company-math-symbols-latex))
     (prefix (unless (company-in-string-or-comment)
-             (company-math--prefix company-math-allow-latex-symbols-in-faces
-                                   
company-math-disallow-latex-symbols-in-faces)))
+              (company-math--prefix company-math-allow-latex-symbols-in-faces
+                                    
company-math-disallow-latex-symbols-in-faces)))
     (annotation (concat " " (get-text-property 0 :symbol arg)))
     (candidates (all-completions arg company-math--symbols))))
 
 ;;;###autoload
 (defun company-math-symbols-unicode (command &optional arg &rest ignored)
-  "Company backend for LaTeX mathematical symbols."
+  "Company backend for insertion of Unicode mathematical symbols.
+See the unicode-math page [1] for a list of fonts that have a
+good support for mathematical symbols.
+
+ [1] 
http://ftp.snt.utwente.nl/pub/software/tex/help/Catalogue/entries/unicode-math.html
+"
   (interactive (list 'interactive))
   (cl-case command
     (interactive (company-begin-backend 'company-math-symbols-unicode))
     (prefix (company-math--prefix company-math-allow-unicode-symbols-in-faces
-                                 
company-math-disallow-unicode-symbols-in-faces))
+                                  
company-math-disallow-unicode-symbols-in-faces))
     (annotation (concat " " (get-text-property 0 :symbol arg)))
-    (candidates (all-completions arg company-math--symbols))
+    ;; Space added to ensure that completions are never typed in full.
+    ;; See https://github.com/company-mode/company-mode/issues/476
+    (candidates (mapcar (lambda (candidate)
+                          (concat candidate " "))
+                        (all-completions arg company-math--symbols)))
     (post-completion (company-math--substitute-unicode
-                     (get-text-property 0 :symbol arg)))))
+                      (get-text-property 0 :symbol arg)))))
 
 
 (provide 'company-math)
-
 ;;; company-math.el ends here
diff --git a/packages/company-math/readme.md b/packages/company-math/readme.md
index cc47194..fa80258 100644
--- a/packages/company-math/readme.md
+++ b/packages/company-math/readme.md
@@ -39,13 +39,19 @@ or locally per emacs mode:
 ;; local configuration for TeX modes
 (defun my-latex-mode-setup ()
   (setq-local company-backends
-              (append '(company-math-symbols-latex company-latex-commands)
+              (append '((company-math-symbols-latex company-latex-commands))
                       company-backends)))
 
-(add-hook 'TeX-mode-hook 'my-latex-mode-setup)
+(add-hook 'tex-mode-hook 'my-latex-mode-setup)
  
 ```
 
+If you are using `AUCTeX` you might need to use `TeX-mode-hook` instead:
+
+```
+(add-hook TeX-mode-hook 'my-latex-mode-setup)
+```
+
 ## Customization ##
 
 Set `company-tooltip-align-annotations` to t in order to allin symbols to the
diff --git a/packages/company/.travis.yml b/packages/company/.travis.yml
index ed76f79..6993df8 100644
--- a/packages/company/.travis.yml
+++ b/packages/company/.travis.yml
@@ -1,6 +1,6 @@
 # https://github.com/rolandwalker/emacs-travis
 
-language: emacs-lisp
+language: generic
 
 env:
   matrix:
@@ -16,6 +16,7 @@ install:
   - if [ "$EMACS" = "emacs-snapshot" ]; then
         sudo add-apt-repository -y ppa:ubuntu-elisp/ppa &&
         sudo apt-get update -qq &&
+        sudo apt-get -qq -f install &&
         sudo apt-get install -qq emacs-snapshot;
     fi
 
diff --git a/packages/company/Makefile b/packages/company/Makefile
index fada444..015f3ac 100644
--- a/packages/company/Makefile
+++ b/packages/company/Makefile
@@ -4,13 +4,13 @@ EMACS=emacs
 
 package: *.el
        @ver=`grep -o "Version: .*" company.el | cut -c 10-`; \
-       tar cjvf company-$$ver.tar.bz2 --mode 644 `git ls-files '*.el' | xargs`
+       tar cjvf company-$$ver.tar.bz2 --mode 644 $$(find . -name \*.el)
 
 elpa: *.el
        @version=`grep -o "Version: .*" company.el | cut -c 10-`; \
        dir=company-$$version; \
        mkdir -p "$$dir"; \
-       cp `git ls-files '*.el' | xargs` company-$$version; \
+       cp $$(find . -name \*.el) company-$$version; \
        echo "(define-package \"company\" \"$$version\" \
        \"Modular in-buffer completion framework\")" \
        > "$$dir"/company-pkg.el; \
diff --git a/packages/company/NEWS.md b/packages/company/NEWS.md
index c7a1afe..758f0be 100644
--- a/packages/company/NEWS.md
+++ b/packages/company/NEWS.md
@@ -1,5 +1,52 @@
 # History of user-visible changes
 
+## 2016-06-23 (0.9.0)
+
+* Group of backends can now contain keyword `:separate`, which makes candidates
+  from different backends sorted separately in the combined list.
+* New frontend `company-pseudo-tooltip-unless-just-one-frontend-with-delay`.
+* New transformer `company-sort-prefer-same-case-prefix`.
+* The value of `company-dabbrev-ignore-buffers` can also be a function.
+* `company-files` has been moved to right after `company-capf` in
+  `company-backends`
+  ([#463](https://github.com/company-mode/company-mode/issues/463)).
+* `company-semantic-insert-arguments`: New option. Like in `company-clang`.
+* `company-semantic-begin-after-member-access`: New option. Similar to the one
+  in `company-clang`.
+* `company-capf` accepts `:company-prefix-length` property value.
+* New face `company-tooltip-annotation-selection`, used for the annotation in
+  the selected tooltip line.
+* `company-clang-objc-templatify` has been renamed to
+  `company-template-objc-templatify`.
+* New user option `company-etags-everywhere`.
+* `company-yasnippet` supports `yas-key-syntaxes` better. But we use them in 
the
+  reverse order, preferring the longest key prefix that matches anything. And 
we
+  only consider trigger key prefixes that are at least as long as the symbol at
+  point, which effectively means skipping the `"w"` element
+  ([#422](https://github.com/company-mode/company-mode/issues/422)).
+* New user option `company-search-regexp-function`.
+* Completion is not started automatically when a keyboard macro is being
+  recorded ([#374](https://github.com/company-mode/company-mode/issues/374)).
+* New command `company-indent-or-complete-common`.
+* Backend command `doc-buffer` now can also return a cons of buffer and window
+  start position.
+* Backend command `ignore-case` has been documented.
+* `company-template-c-like-templatify` does not replace the default argument
+  values with `argN` anymore
+  ([#336](https://github.com/company-mode/company-mode/issues/336)). This
+  affects `company-clang` and all third-party backends that use this function.
+* Likewise for `company-clang-objc-templatify`.
+* `company-template-add-field` calling convention has changed.
+* New user option `company-dabbrev-ignore-invisible`.
+* `company-ropemacs` was removed. `ropemacs` supports completion via
+  `completion-at-point-functions` starting with version 0.8.
+* `company-pysmell` was removed.
+* `company-select-next`, `company-select-previous`,
+  `company-select-next-or-abort`, `company-select-previous-or-abort` and
+  `company-complete-common-or-cycle` accept a numeric argument.
+* The documentation buffer window can be scrolled with the mouse wheel.
+* New command `company-diag`. Use it in bug reports.
+
 ## 2015-02-02 (0.8.10)
 
 * New variable `company-lighter-base`.
diff --git a/packages/company/README.md b/packages/company/README.md
index 4f79bbc..1e0e5e6 100644
--- a/packages/company/README.md
+++ b/packages/company/README.md
@@ -1,4 +1,4 @@
 See the [homepage](http://company-mode.github.com/).
-[![githalytics.com 
alpha](https://cruel-carlota.pagodabox.com/336ef4be2595a7859d52e2c17b7da2b2 
"githalytics.com")](http://githalytics.com/company-mode/company-mode)
 
 [![Build 
Status](https://travis-ci.org/company-mode/company-mode.png?branch=master)](https://travis-ci.org/company-mode/company-mode)
+[![Melpa 
Status](http://melpa.milkbox.net/packages/company-badge.svg)](http://melpa.milkbox.net/#/company)
diff --git a/packages/company/company-abbrev.el 
b/packages/company/company-abbrev.el
index a454aaa..24ec3b7 100644
--- a/packages/company/company-abbrev.el
+++ b/packages/company/company-abbrev.el
@@ -1,6 +1,6 @@
-;;; company-abbrev.el --- company-mode completion back-end for abbrev
+;;; company-abbrev.el --- company-mode completion backend for abbrev
 
-;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2015  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -35,7 +35,7 @@
 
 ;;;###autoload
 (defun company-abbrev (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for abbrev."
+  "`company-mode' completion backend for abbrev."
   (interactive (list 'interactive))
   (cl-case command
     (interactive (company-begin-backend 'company-abbrev
@@ -44,8 +44,7 @@
     (candidates (nconc
                  (delete "" (all-completions arg global-abbrev-table))
                  (delete "" (all-completions arg local-abbrev-table))))
-    (meta (abbrev-expansion arg))
-    (require-match t)))
+    (meta (abbrev-expansion arg))))
 
 (provide 'company-abbrev)
 ;;; company-abbrev.el ends here
diff --git a/packages/company/company-bbdb.el b/packages/company/company-bbdb.el
index 58be84c..872e1fc 100644
--- a/packages/company/company-bbdb.el
+++ b/packages/company/company-bbdb.el
@@ -1,6 +1,6 @@
-;;; company-bbdb.el --- company-mode completion back-end for BBDB in 
message-mode
+;;; company-bbdb.el --- company-mode completion backend for BBDB in 
message-mode
 
-;; Copyright (C) 2013-2014  Free Software Foundation, Inc.
+;; Copyright (C) 2013-2014, 2016  Free Software Foundation, Inc.
 
 ;; Author: Jan Tatarik <address@hidden>
 
@@ -28,7 +28,7 @@
 (declare-function bbdb-search "bbdb-com")
 
 (defgroup company-bbdb nil
-  "Completion back-end for BBDB."
+  "Completion backend for BBDB."
   :group 'company)
 
 (defcustom company-bbdb-modes '(message-mode)
@@ -44,13 +44,13 @@
 
 ;;;###autoload
 (defun company-bbdb (command &optional arg &rest ignore)
-  "`company-mode' completion back-end for BBDB."
+  "`company-mode' completion backend for BBDB."
   (interactive (list 'interactive))
   (cl-case command
     (interactive (company-begin-backend 'company-bbdb))
     (prefix (and (memq major-mode company-bbdb-modes)
                  (featurep 'bbdb-com)
-                 (looking-back "^\\(To\\|Cc\\|Bcc\\): *\\(.*\\)"
+                 (looking-back "^\\(To\\|Cc\\|Bcc\\): *.*? *\\([^,;]*\\)"
                                (line-beginning-position))
                  (match-string-no-properties 2)))
     (candidates (company-bbdb--candidates arg))
diff --git a/packages/company/company-capf.el b/packages/company/company-capf.el
index 4962a26..866fd62 100644
--- a/packages/company/company-capf.el
+++ b/packages/company/company-capf.el
@@ -1,6 +1,6 @@
-;;; company-capf.el --- company-mode completion-at-point-functions back-end 
-*- lexical-binding: t -*-
+;;; company-capf.el --- company-mode completion-at-point-functions backend -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2013-2014  Free Software Foundation, Inc.
+;; Copyright (C) 2013-2016  Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <address@hidden>
 
@@ -48,22 +48,36 @@
               ;; the latter comes later.
               (remove 'tags-completion-at-point-function
                       (default-value 'completion-at-point-functions)))
+             (completion-at-point-functions (company--capf-workaround))
              (data (run-hook-wrapped 'completion-at-point-functions
                                      ;; Ignore misbehaving functions.
                                      #'completion--capf-wrapper 'optimist)))
-    (when (and (consp (cdr data)) (numberp (nth 1 data))) data)))
+    (when (and (consp (cdr data)) (integer-or-marker-p (nth 1 data))) data)))
+
+(declare-function python-shell-get-process "python")
+
+(defun company--capf-workaround ()
+  ;; For http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18067
+  (if (or (not (listp completion-at-point-functions))
+          (not (memq 'python-completion-complete-at-point 
completion-at-point-functions))
+          (python-shell-get-process))
+      completion-at-point-functions
+    (remq 'python-completion-complete-at-point completion-at-point-functions)))
 
 (defun company-capf (command &optional arg &rest _args)
-  "`company-mode' back-end using `completion-at-point-functions'."
+  "`company-mode' backend using `completion-at-point-functions'."
   (interactive (list 'interactive))
   (pcase command
     (`interactive (company-begin-backend 'company-capf))
     (`prefix
      (let ((res (company--capf-data)))
        (when res
-         (if (> (nth 2 res) (point))
-             'stop
-           (buffer-substring-no-properties (nth 1 res) (point))))))
+         (let ((length (plist-get (nthcdr 4 res) :company-prefix-length))
+               (prefix (buffer-substring-no-properties (nth 1 res) (point))))
+           (cond
+            ((> (nth 2 res) (point)) 'stop)
+            (length (cons prefix length))
+            (t prefix))))))
     (`candidates
      (let ((res (company--capf-data)))
        (when res
@@ -95,16 +109,16 @@
            (cdr (assq 'display-sort-function meta))))))
     (`match
      ;; Can't just use 0 when base-size (see above) is non-zero.
-     (let ((start (if (get-text-property 0 'font-lock-face arg)
+     (let ((start (if (get-text-property 0 'face arg)
                       0
-                    (next-single-property-change 0 'font-lock-face arg))))
+                    (next-single-property-change 0 'face arg))))
        (when start
          ;; completions-common-part comes first, but we can't just look for 
this
          ;; value because it can be in a list.
          (or
-          (let ((value (get-text-property start 'font-lock-face arg)))
+          (let ((value (get-text-property start 'face arg)))
             (text-property-not-all start (length arg)
-                                   'font-lock-face value arg))
+                                   'face value arg))
           (length arg)))))
     (`duplicates t)
     (`no-cache t)   ;Not much can be done here, as long as we handle
diff --git a/packages/company/company-clang.el 
b/packages/company/company-clang.el
index e85e865..54d4b9b 100644
--- a/packages/company/company-clang.el
+++ b/packages/company/company-clang.el
@@ -1,6 +1,6 @@
-;;; company-clang.el --- company-mode completion back-end for Clang  -*- 
lexical-binding: t -*-
+;;; company-clang.el --- company-mode completion backend for Clang  -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2009, 2011, 2013-2014  Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2011, 2013-2016  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -30,7 +30,7 @@
 (require 'cl-lib)
 
 (defgroup company-clang nil
-  "Completion back-end for Clang."
+  "Completion backend for Clang."
   :group 'company)
 
 (defcustom company-clang-executable
@@ -144,6 +144,18 @@ or automatically through a custom 
`company-clang-prefix-guesser'."
   (get-text-property 0 'meta candidate))
 
 (defun company-clang--annotation (candidate)
+  (let ((ann (company-clang--annotation-1 candidate)))
+    (if (not (and ann (string-prefix-p "(*)" ann)))
+        ann
+      (with-temp-buffer
+        (insert ann)
+        (search-backward ")")
+        (let ((pt (1+ (point))))
+          (re-search-forward ".\\_>" nil t)
+          (delete-region pt (point)))
+        (buffer-string)))))
+
+(defun company-clang--annotation-1 (candidate)
   (let ((meta (company-clang--meta candidate)))
     (cond
      ((null meta) nil)
@@ -191,9 +203,11 @@ or automatically through a custom 
`company-clang-prefix-guesser'."
         (buf (get-buffer-create "*clang-output*"))
         ;; Looks unnecessary in Emacs 25.1 and later.
         (process-adaptive-read-buffering nil))
-    (with-current-buffer buf (erase-buffer))
     (if (get-buffer-process buf)
         (funcall callback nil)
+      (with-current-buffer buf
+        (erase-buffer)
+        (setq buffer-undo-list t))
       (let ((process (apply #'start-process "company-clang" buf
                             company-clang-executable args)))
         (set-process-sentinel
@@ -275,26 +289,8 @@ or automatically through a custom 
`company-clang-prefix-guesser'."
             ver))
       0)))
 
-(defun company-clang-objc-templatify (selector)
-  (let* ((end (point-marker))
-         (beg (- (point) (length selector) 1))
-         (templ (company-template-declare-template beg end))
-         (cnt 0))
-    (save-excursion
-      (goto-char beg)
-      (catch 'stop
-        (while (search-forward ":" end t)
-          (when (looking-at "([^)]*) ?")
-            (delete-region (match-beginning 0) (match-end 0)))
-          (company-template-add-field templ (point) (format "arg%d" cnt))
-          (if (< (point) end)
-              (insert " ")
-            (throw 'stop t))
-          (cl-incf cnt))))
-    (company-template-move-to-first templ)))
-
 (defun company-clang (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for Clang.
+  "`company-mode' completion backend for Clang.
 Clang is a parser for C and ObjC.  Clang version 1.1 or newer is required.
 
 Additional command line arguments can be specified in
@@ -327,7 +323,7 @@ passed via standard input."
                        (when (and company-clang-insert-arguments anno)
                          (insert anno)
                          (if (string-match "\\`:[^:]" anno)
-                             (company-clang-objc-templatify anno)
+                             (company-template-objc-templatify anno)
                            (company-template-c-like-templatify
                             (concat arg anno))))))))
 
diff --git a/packages/company/company-cmake.el 
b/packages/company/company-cmake.el
index e2962f5..010df32 100644
--- a/packages/company/company-cmake.el
+++ b/packages/company/company-cmake.el
@@ -1,4 +1,4 @@
-;;; company-cmake.el --- company-mode completion back-end for CMake
+;;; company-cmake.el --- company-mode completion backend for CMake
 
 ;; Copyright (C) 2013-2014  Free Software Foundation, Inc.
 
@@ -29,7 +29,7 @@
 (require 'cl-lib)
 
 (defgroup company-cmake nil
-  "Completion back-end for CMake."
+  "Completion backend for CMake."
   :group 'company)
 
 (defcustom company-cmake-executable
@@ -178,7 +178,7 @@ They affect which types of symbols we get completion 
candidates for.")
                                        (point-max))))))
 
 (defun company-cmake (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for CMake.
+  "`company-mode' completion backend for CMake.
 CMake is a cross-platform, open-source make system."
   (interactive (list 'interactive))
   (cl-case command
diff --git a/packages/company/company-css.el b/packages/company/company-css.el
index ec48653..cf8c683 100644
--- a/packages/company/company-css.el
+++ b/packages/company/company-css.el
@@ -1,4 +1,4 @@
-;;; company-css.el --- company-mode completion back-end for css-mode  -*- 
lexical-binding: t -*-
+;;; company-css.el --- company-mode completion backend for css-mode  -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2009, 2011, 2014  Free Software Foundation, Inc.
 
@@ -26,6 +26,8 @@
 (require 'company)
 (require 'cl-lib)
 
+(declare-function web-mode-language-at-pos "web-mode" (&optional pos))
+
 (defconst company-css-property-alist
   ;; see http://www.w3.org/TR/CSS21/propidx.html
   '(("azimuth" angle "left-side" "far-left" "left" "center-left" "center"
@@ -411,11 +413,13 @@ Returns \"\" if no property found, but feasible at this 
position."
 
 ;;;###autoload
 (defun company-css (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for `css-mode'."
+  "`company-mode' completion backend for `css-mode'."
   (interactive (list 'interactive))
   (cl-case command
     (interactive (company-begin-backend 'company-css))
-    (prefix (and (derived-mode-p 'css-mode)
+    (prefix (and (or (derived-mode-p 'css-mode)
+                     (and (derived-mode-p 'web-mode)
+                          (string= (web-mode-language-at-pos) "css")))
                  (or (company-grab company-css-tag-regexp 1)
                      (company-grab company-css-pseudo-regexp 1)
                      (company-grab company-css-property-value-regexp 2)
diff --git a/packages/company/company-dabbrev-code.el 
b/packages/company/company-dabbrev-code.el
index 256b57f..9331087 100644
--- a/packages/company/company-dabbrev-code.el
+++ b/packages/company/company-dabbrev-code.el
@@ -1,4 +1,4 @@
-;;; company-dabbrev-code.el --- dabbrev-like company-mode back-end for code  
-*- lexical-binding: t -*-
+;;; company-dabbrev-code.el --- dabbrev-like company-mode backend for code  
-*- lexical-binding: t -*-
 
 ;; Copyright (C) 2009, 2011, 2014  Free Software Foundation, Inc.
 
@@ -30,7 +30,7 @@
 (require 'cl-lib)
 
 (defgroup company-dabbrev-code nil
-  "dabbrev-like completion back-end for code."
+  "dabbrev-like completion backend for code."
   :group 'company)
 
 (defcustom company-dabbrev-code-modes
@@ -40,10 +40,10 @@
   "Modes that use `company-dabbrev-code'.
 In all these modes (and their derivatives) `company-dabbrev-code' will
 complete only symbols, not text in comments or strings.  In other modes
-`company-dabbrev-code' will pass control to other back-ends
+`company-dabbrev-code' will pass control to other backends
 \(e.g. `company-dabbrev'\).  Value t means complete in all modes."
-  :type '(choice (repeat (symbol :tag "Major mode"))
-                 (const tag "All modes" t)))
+  :type '(choice (repeat :tag "Some modes" (symbol :tag "Major mode"))
+                 (const :tag "All modes" t)))
 
 (defcustom company-dabbrev-code-other-buffers t
   "Determines whether `company-dabbrev-code' should search other buffers.
@@ -69,7 +69,7 @@ also `company-dabbrev-code-time-limit'."
   "Non-nil to ignore case when collecting completion candidates."
   :type 'boolean)
 
-(defsubst company-dabbrev-code--make-regexp (prefix)
+(defun company-dabbrev-code--make-regexp (prefix)
   (concat "\\_<" (if (equal prefix "")
                      "\\([a-zA-Z]\\|\\s_\\)"
                    (regexp-quote prefix))
@@ -77,8 +77,8 @@ also `company-dabbrev-code-time-limit'."
 
 ;;;###autoload
 (defun company-dabbrev-code (command &optional arg &rest ignored)
-  "dabbrev-like `company-mode' back-end for code.
-The back-end looks for all symbols in the current buffer that aren't in
+  "dabbrev-like `company-mode' backend for code.
+The backend looks for all symbols in the current buffer that aren't in
 comments or strings."
   (interactive (list 'interactive))
   (cl-case command
diff --git a/packages/company/company-dabbrev.el 
b/packages/company/company-dabbrev.el
index 7519caf..b1a9def 100644
--- a/packages/company/company-dabbrev.el
+++ b/packages/company/company-dabbrev.el
@@ -1,6 +1,6 @@
-;;; company-dabbrev.el --- dabbrev-like company-mode completion back-end  -*- 
lexical-binding: t -*-
+;;; company-dabbrev.el --- dabbrev-like company-mode completion backend  -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2009, 2011, 2014  Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2011, 2014, 2015, 2016  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -29,7 +29,7 @@
 (require 'cl-lib)
 
 (defgroup company-dabbrev nil
-  "dabbrev-like completion back-end."
+  "dabbrev-like completion backend."
   :group 'company)
 
 (defcustom company-dabbrev-other-buffers 'all
@@ -41,8 +41,11 @@ buffers with the same major mode.  See also 
`company-dabbrev-time-limit'."
                  (const :tag "All" all)))
 
 (defcustom company-dabbrev-ignore-buffers "\\`[ *]"
-  "Regexp matching the names of buffers to ignore."
-  :type 'regexp)
+  "Regexp matching the names of buffers to ignore.
+Or a function that returns non-nil for such buffers."
+  :type '(choice (regexp :tag "Regexp")
+                 (function :tag "Predicate"))
+  :package-version '(company . "0.9.0"))
 
 (defcustom company-dabbrev-time-limit .1
   "Determines how many seconds `company-dabbrev' should look for matches."
@@ -74,46 +77,60 @@ This variable affects both `company-dabbrev' and 
`company-dabbrev-code'."
   :type 'integer
   :package-version '(company . "0.8.3"))
 
-(defmacro company-dabrev--time-limit-while (test start limit &rest body)
+(defcustom company-dabbrev-ignore-invisible nil
+  "Non-nil to skip invisible text."
+  :type 'boolean
+  :package-version '(company . "0.9.0"))
+
+(defmacro company-dabbrev--time-limit-while (test start limit freq &rest body)
   (declare (indent 3) (debug t))
   `(let ((company-time-limit-while-counter 0))
      (catch 'done
        (while ,test
          ,@body
          (and ,limit
-              (eq (cl-incf company-time-limit-while-counter) 25)
+              (= (cl-incf company-time-limit-while-counter) ,freq)
               (setq company-time-limit-while-counter 0)
               (> (float-time (time-since ,start)) ,limit)
               (throw 'done 'company-time-out))))))
 
-(defsubst company-dabbrev--make-regexp (prefix)
-  (concat "\\<" (if (equal prefix "")
-              company-dabbrev-char-regexp
-            (regexp-quote prefix))
-          "\\(" company-dabbrev-char-regexp "\\)*\\>"))
+(defun company-dabbrev--make-regexp ()
+  (concat "\\(?:" company-dabbrev-char-regexp "\\)+"))
 
 (defun company-dabbrev--search-buffer (regexp pos symbols start limit
                                        ignore-comments)
   (save-excursion
-    (let (match)
+    (cl-labels ((maybe-collect-match
+                 ()
+                 (let ((match (match-string-no-properties 0)))
+                   (when (and (>= (length match) 
company-dabbrev-minimum-length)
+                              (not (and company-dabbrev-ignore-invisible
+                                        (invisible-p (match-beginning 0)))))
+                     (push match symbols)))))
       (goto-char (if pos (1- pos) (point-min)))
-      ;; search before pos
-      (company-dabrev--time-limit-while (re-search-backward regexp nil t)
-          start limit
-        (setq match (match-string-no-properties 0))
-        (if (and ignore-comments (company-in-string-or-comment))
-            (goto-char (nth 8 (syntax-ppss)))
-          (when (>= (length match) company-dabbrev-minimum-length)
-            (push match symbols))))
+      ;; Search before pos.
+      (let ((tmp-end (point)))
+        (company-dabbrev--time-limit-while (> tmp-end (point-min))
+            start limit 1
+          (ignore-errors
+            (forward-char -10000))
+          (forward-line 0)
+          (save-excursion
+            ;; Before, we used backward search, but it matches non-greedily, 
and
+            ;; that forced us to use the "beginning/end of word" anchors in
+            ;; `company-dabbrev--make-regexp'.  It's also about 2x slower.
+            (while (re-search-forward regexp tmp-end t)
+              (if (and ignore-comments (save-match-data 
(company-in-string-or-comment)))
+                  (re-search-forward "\\s>\\|\\s!\\|\\s\"" tmp-end t)
+                (maybe-collect-match))))
+          (setq tmp-end (point))))
       (goto-char (or pos (point-min)))
-      ;; search after pos
-      (company-dabrev--time-limit-while (re-search-forward regexp nil t)
-          start limit
-        (setq match (match-string-no-properties 0))
-        (if (and ignore-comments (company-in-string-or-comment))
+      ;; Search after pos.
+      (company-dabbrev--time-limit-while (re-search-forward regexp nil t)
+          start limit 25
+        (if (and ignore-comments (save-match-data 
(company-in-string-or-comment)))
             (re-search-forward "\\s>\\|\\s!\\|\\s\"" nil t)
-          (when (>= (length match) company-dabbrev-minimum-length)
-            (push match symbols))))
+          (maybe-collect-match)))
       symbols)))
 
 (defun company-dabbrev--search (regexp &optional limit other-buffer-modes
@@ -123,29 +140,43 @@ This variable affects both `company-dabbrev' and 
`company-dabbrev-code'."
                                                   ignore-comments)))
     (when other-buffer-modes
       (cl-dolist (buffer (delq (current-buffer) (buffer-list)))
-        (with-current-buffer buffer
-          (when (if (eq other-buffer-modes 'all)
-                    (not (string-match-p company-dabbrev-ignore-buffers
-                                         (buffer-name)))
-                  (apply #'derived-mode-p other-buffer-modes))
-            (setq symbols
-                  (company-dabbrev--search-buffer regexp nil symbols start
-                                                  limit ignore-comments))))
+        (unless (if (stringp company-dabbrev-ignore-buffers)
+                    (string-match-p company-dabbrev-ignore-buffers
+                                    (buffer-name buffer))
+                  (funcall company-dabbrev-ignore-buffers buffer))
+          (with-current-buffer buffer
+            (when (or (eq other-buffer-modes 'all)
+                      (apply #'derived-mode-p other-buffer-modes))
+              (setq symbols
+                    (company-dabbrev--search-buffer regexp nil symbols start
+                                                    limit ignore-comments)))))
         (and limit
              (> (float-time (time-since start)) limit)
              (cl-return))))
     symbols))
 
+(defun company-dabbrev--prefix ()
+  ;; Not in the middle of a word.
+  (unless (looking-at company-dabbrev-char-regexp)
+    ;; Emacs can't do greedy backward-search.
+    (company-grab-line (format "\\(?:^\\| \\)[^ ]*?\\(\\(?:%s\\)*\\)"
+                               company-dabbrev-char-regexp)
+                       1)))
+
+(defun company-dabbrev--filter (prefix candidates)
+  (let ((completion-ignore-case company-dabbrev-ignore-case))
+    (all-completions prefix candidates)))
+
 ;;;###autoload
 (defun company-dabbrev (command &optional arg &rest ignored)
-  "dabbrev-like `company-mode' completion back-end."
+  "dabbrev-like `company-mode' completion backend."
   (interactive (list 'interactive))
   (cl-case command
     (interactive (company-begin-backend 'company-dabbrev))
-    (prefix (company-grab-word))
+    (prefix (company-dabbrev--prefix))
     (candidates
      (let* ((case-fold-search company-dabbrev-ignore-case)
-            (words (company-dabbrev--search (company-dabbrev--make-regexp arg)
+            (words (company-dabbrev--search (company-dabbrev--make-regexp)
                                             company-dabbrev-time-limit
                                             (pcase 
company-dabbrev-other-buffers
                                               (`t (list major-mode))
@@ -153,6 +184,7 @@ This variable affects both `company-dabbrev' and 
`company-dabbrev-code'."
             (downcase-p (if (eq company-dabbrev-downcase 'case-replace)
                             case-replace
                           company-dabbrev-downcase)))
+       (setq words (company-dabbrev--filter arg words))
        (if downcase-p
            (mapcar 'downcase words)
          words)))
diff --git a/packages/company/company-eclim.el 
b/packages/company/company-eclim.el
index 1f1beae..b37f756 100644
--- a/packages/company/company-eclim.el
+++ b/packages/company/company-eclim.el
@@ -1,6 +1,6 @@
-;;; company-eclim.el --- company-mode completion back-end for Eclim
+;;; company-eclim.el --- company-mode completion backend for Eclim
 
-;; Copyright (C) 2009, 2011, 2013  Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2011, 2013, 2015  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -21,10 +21,10 @@
 
 ;;; Commentary:
 ;;
-;; Using `emacs-eclim' together with (or instead of) this back-end is
+;; Using `emacs-eclim' together with (or instead of) this backend is
 ;; recommended, as it allows you to use other Eclim features.
 ;;
-;; The alternative back-end provided by `emacs-eclim' uses `yasnippet'
+;; The alternative backend provided by `emacs-eclim' uses `yasnippet'
 ;; instead of `company-template' to expand function calls, and it supports
 ;; some languages other than Java.
 
@@ -35,7 +35,7 @@
 (require 'cl-lib)
 
 (defgroup company-eclim nil
-  "Completion back-end for Eclim."
+  "Completion backend for Eclim."
   :group 'company)
 
 (defun company-eclim-executable-find ()
@@ -48,7 +48,9 @@
            (cl-return file)))))
 
 (defcustom company-eclim-executable
-  (or (executable-find "eclim") (company-eclim-executable-find))
+  (or (bound-and-true-p eclim-executable)
+      (executable-find "eclim")
+      (company-eclim-executable-find))
   "Location of eclim executable."
   :type 'file)
 
@@ -87,10 +89,11 @@ eclim can only complete correctly when the buffer has been 
saved."
 
 (defun company-eclim--project-dir ()
   (if (eq company-eclim--project-dir 'unknown)
-      (setq company-eclim--project-dir
-            (directory-file-name
-             (expand-file-name
-              (locate-dominating-file buffer-file-name ".project"))))
+      (let ((dir (locate-dominating-file buffer-file-name ".project")))
+        (when dir
+          (setq company-eclim--project-dir
+                (directory-file-name
+                 (expand-file-name dir)))))
     company-eclim--project-dir))
 
 (defun company-eclim--project-name ()
@@ -153,7 +156,7 @@ eclim can only complete correctly when the buffer has been 
saved."
       prefix)))
 
 (defun company-eclim (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for Eclim.
+  "`company-mode' completion backend for Eclim.
 Eclim provides access to Eclipse Java IDE features for other editors.
 
 Eclim version 1.7.13 or newer (?) is required.
diff --git a/packages/company/company-elisp.el 
b/packages/company/company-elisp.el
index 5efd8d0..40354d5 100644
--- a/packages/company/company-elisp.el
+++ b/packages/company/company-elisp.el
@@ -1,4 +1,4 @@
-;;; company-elisp.el --- company-mode completion back-end for Emacs Lisp -*- 
lexical-binding: t -*-
+;;; company-elisp.el --- company-mode completion backend for Emacs Lisp -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2009, 2011-2013  Free Software Foundation, Inc.
 
@@ -31,12 +31,12 @@
 (require 'find-func)
 
 (defgroup company-elisp nil
-  "Completion back-end for Emacs Lisp."
+  "Completion backend for Emacs Lisp."
   :group 'company)
 
 (defcustom company-elisp-detect-function-context t
   "If enabled, offer Lisp functions only in appropriate contexts.
-Functions are offered for completion only after ' and \(."
+Functions are offered for completion only after \\=' and \(."
   :type '(choice (const :tag "Off" nil)
                  (const :tag "On" t)))
 
@@ -193,7 +193,7 @@ first in the candidates list."
 
 ;;;###autoload
 (defun company-elisp (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for Emacs Lisp."
+  "`company-mode' completion backend for Emacs Lisp."
   (interactive (list 'interactive))
   (cl-case command
     (interactive (company-begin-backend 'company-elisp))
diff --git a/packages/company/company-etags.el 
b/packages/company/company-etags.el
index 1c01c91..ef53213 100644
--- a/packages/company/company-etags.el
+++ b/packages/company/company-etags.el
@@ -1,4 +1,4 @@
-;;; company-etags.el --- company-mode completion back-end for etags
+;;; company-etags.el --- company-mode completion backend for etags
 
 ;; Copyright (C) 2009-2011, 2014  Free Software Foundation, Inc.
 
@@ -30,7 +30,7 @@
 (require 'etags)
 
 (defgroup company-etags nil
-  "Completion back-end for etags."
+  "Completion backend for etags."
   :group 'company)
 
 (defcustom company-etags-use-main-table-list t
@@ -45,17 +45,28 @@ buffer automatically."
   :type 'boolean
   :package-version '(company . "0.7.3"))
 
+(defcustom company-etags-everywhere nil
+  "Non-nil to offer completions in comments and strings.
+Set it to t or to a list of major modes."
+  :type '(choice (const :tag "Off" nil)
+                 (const :tag "Any supported mode" t)
+                 (repeat :tag "Some major modes"
+                         (symbol :tag "Major mode")))
+  :package-version '(company . "0.9.0"))
+
 (defvar company-etags-modes '(prog-mode c-mode objc-mode c++-mode java-mode
                               jde-mode pascal-mode perl-mode python-mode))
 
 (defvar-local company-etags-buffer-table 'unknown)
 
 (defun company-etags-find-table ()
-  (let ((file (locate-dominating-file (or buffer-file-name
-                                          default-directory)
-                                      "TAGS")))
+  (let ((file (expand-file-name
+               "TAGS"
+               (locate-dominating-file (or buffer-file-name
+                                           default-directory)
+                                       "TAGS"))))
     (when (and file (file-regular-p file))
-      (list (expand-file-name file)))))
+      (list file))))
 
 (defun company-etags-buffer-table ()
   (or (and company-etags-use-main-table-list tags-table-list)
@@ -74,12 +85,14 @@ buffer automatically."
 
 ;;;###autoload
 (defun company-etags (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for etags."
+  "`company-mode' completion backend for etags."
   (interactive (list 'interactive))
   (cl-case command
     (interactive (company-begin-backend 'company-etags))
-    (prefix (and (apply 'derived-mode-p company-etags-modes)
-                 (not (company-in-string-or-comment))
+    (prefix (and (apply #'derived-mode-p company-etags-modes)
+                 (or (eq t company-etags-everywhere)
+                     (apply #'derived-mode-p company-etags-everywhere)
+                     (not (company-in-string-or-comment)))
                  (company-etags-buffer-table)
                  (or (company-grab-symbol) 'stop)))
     (candidates (company-etags--candidates arg))
diff --git a/packages/company/company-files.el 
b/packages/company/company-files.el
index 7cfc500..c19d3d6 100644
--- a/packages/company/company-files.el
+++ b/packages/company/company-files.el
@@ -1,6 +1,6 @@
-;;; company-files.el --- company-mode completion back-end for file paths
+;;; company-files.el --- company-mode completion backend for file paths
 
-;; Copyright (C) 2009-2011, 2014  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2014-2015  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -30,9 +30,12 @@
 
 (defun company-files--directory-files (dir prefix)
   (ignore-errors
-    (if (equal prefix "")
-        (directory-files dir nil "\\`[^.]\\|\\`.[^.]")
-      (file-name-all-completions prefix dir))))
+    ;; Don't use directory-files. It produces directories without trailing /.
+    (let ((comp (sort (file-name-all-completions prefix dir)
+                      (lambda (s1 s2) (string-lessp (downcase s1) (downcase 
s2))))))
+      (if (equal prefix "")
+          (delete "../" (delete "./" comp))
+        comp))))
 
 (defvar company-files--regexps
   (let* ((root (if (eq system-type 'windows-nt)
@@ -50,35 +53,47 @@
     (and (cl-dolist (regexp company-files--regexps)
            (when (setq file (company-grab-line regexp 1))
              (cl-return file)))
+         (company-files--connected-p file)
          (setq dir (file-name-directory file))
          (not (string-match "//" dir))
          (file-exists-p dir)
-         (file-name-all-completions (file-name-nondirectory file) dir)
          file)))
 
+(defun company-files--connected-p (file)
+  (or (not (file-remote-p file))
+      (file-remote-p file nil t)))
+
+(defun company-files--trailing-slash-p (file)
+  ;; `file-directory-p' is very expensive on remotes. We are relying on
+  ;; `file-name-all-completions' returning directories with trailing / instead.
+  (let ((len (length file)))
+    (and (> len 0) (eq (aref file (1- len)) ?/))))
+
 (defvar company-files--completion-cache nil)
 
 (defun company-files--complete (prefix)
   (let* ((dir (file-name-directory prefix))
-         (key (list (file-name-nondirectory prefix)
+         (file (file-name-nondirectory prefix))
+         (key (list file
                     (expand-file-name dir)
                     (nth 5 (file-attributes dir))))
-         (file (file-name-nondirectory prefix))
-         (completion-ignore-case read-file-name-completion-ignore-case)
-         candidates directories)
+         (completion-ignore-case read-file-name-completion-ignore-case))
     (unless (company-file--keys-match-p key (car 
company-files--completion-cache))
-      (dolist (file (company-files--directory-files dir file))
-        (setq file (concat dir file))
-        (push file candidates)
-        (when (file-directory-p file)
-          (push file directories)))
-      (dolist (directory (reverse directories))
-        ;; Add one level of children.
-        (dolist (child (company-files--directory-files directory ""))
-          (push (concat directory
-                        (unless (eq (aref directory (1- (length directory))) 
?/) "/")
-                        child) candidates)))
-      (setq company-files--completion-cache (cons key (nreverse candidates))))
+      (let* ((candidates (mapcar (lambda (f) (concat dir f))
+                                 (company-files--directory-files dir file)))
+             (directories (unless (file-remote-p dir)
+                            (cl-remove-if-not (lambda (f)
+                                                (and 
(company-files--trailing-slash-p f)
+                                                     (not (file-remote-p f))
+                                                     
(company-files--connected-p f)))
+                                              candidates)))
+             (children (and directories
+                            (cl-mapcan (lambda (d)
+                                         (mapcar (lambda (c) (concat d c))
+                                                 
(company-files--directory-files d "")))
+                                       directories))))
+        (setq company-files--completion-cache
+              (cons key (append candidates children)))))
     (all-completions prefix
                      (cdr company-files--completion-cache))))
 
@@ -88,7 +103,7 @@
 
 ;;;###autoload
 (defun company-files (command &optional arg &rest ignored)
-  "`company-mode' completion back-end existing file names.
+  "`company-mode' completion backend existing file names.
 Completions works for proper absolute and relative files paths.
 File paths with spaces are only supported inside strings."
   (interactive (list 'interactive))
@@ -98,6 +113,8 @@ File paths with spaces are only supported inside strings."
     (candidates (company-files--complete arg))
     (location (cons (dired-noselect
                      (file-name-directory (directory-file-name arg))) 1))
+    (post-completion (when (company-files--trailing-slash-p arg)
+                       (delete-char -1)))
     (sorted t)
     (no-cache t)))
 
diff --git a/packages/company/company-gtags.el 
b/packages/company/company-gtags.el
index aaa22b9..5050783 100644
--- a/packages/company/company-gtags.el
+++ b/packages/company/company-gtags.el
@@ -1,4 +1,4 @@
-;;; company-gtags.el --- company-mode completion back-end for GNU Global
+;;; company-gtags.el --- company-mode completion backend for GNU Global
 
 ;; Copyright (C) 2009-2011, 2014  Free Software Foundation, Inc.
 
@@ -26,10 +26,11 @@
 ;;; Code:
 
 (require 'company)
+(require 'company-template)
 (require 'cl-lib)
 
 (defgroup company-gtags nil
-  "Completion back-end for GNU Global."
+  "Completion backend for GNU Global."
   :group 'company)
 
 (defcustom company-gtags-executable
@@ -90,7 +91,7 @@ completion."
 
 ;;;###autoload
 (defun company-gtags (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for GNU Global."
+  "`company-mode' completion backend for GNU Global."
   (interactive (list 'interactive))
   (cl-case command
     (interactive (company-begin-backend 'company-gtags))
diff --git a/packages/company/company-ispell.el 
b/packages/company/company-ispell.el
index 4ce8dfc..c275bbe 100644
--- a/packages/company/company-ispell.el
+++ b/packages/company/company-ispell.el
@@ -1,6 +1,6 @@
-;;; company-ispell.el --- company-mode completion back-end using Ispell
+;;; company-ispell.el --- company-mode completion backend using Ispell
 
-;; Copyright (C) 2009-2011, 2013-2015  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2013-2016  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -30,7 +30,7 @@
 (require 'ispell)
 
 (defgroup company-ispell nil
-  "Completion back-end using Ispell."
+  "Completion backend using Ispell."
   :group 'company)
 
 (defcustom company-ispell-dictionary nil
@@ -41,11 +41,16 @@ If nil, use `ispell-complete-word-dict'."
 
 (defvar company-ispell-available 'unknown)
 
+(defalias 'company-ispell--lookup-words
+  (if (fboundp 'ispell-lookup-words)
+      'ispell-lookup-words
+    'lookup-words))
+
 (defun company-ispell-available ()
   (when (eq company-ispell-available 'unknown)
     (condition-case err
         (progn
-          (lookup-words "WHATEVER")
+          (company-ispell--lookup-words "WHATEVER")
           (setq company-ispell-available t))
       (error
        (message "Company: ispell-look-command not found")
@@ -54,15 +59,16 @@ If nil, use `ispell-complete-word-dict'."
 
 ;;;###autoload
 (defun company-ispell (command &optional arg &rest ignored)
-  "`company-mode' completion back-end using Ispell."
+  "`company-mode' completion backend using Ispell."
   (interactive (list 'interactive))
   (cl-case command
     (interactive (company-begin-backend 'company-ispell))
     (prefix (when (company-ispell-available)
               (company-grab-word)))
     (candidates
-     (let ((words (lookup-words arg (or company-ispell-dictionary
-                                        ispell-complete-word-dict)))
+     (let ((words (company-ispell--lookup-words
+                   arg
+                   (or company-ispell-dictionary ispell-complete-word-dict)))
            (completion-ignore-case t))
        (if (string= arg "")
            ;; Small optimization.
diff --git a/packages/company/company-keywords.el 
b/packages/company/company-keywords.el
index f426c06..e59eaa2 100644
--- a/packages/company/company-keywords.el
+++ b/packages/company/company-keywords.el
@@ -1,6 +1,6 @@
-;;; company-keywords.el --- A company back-end for programming language 
keywords
+;;; company-keywords.el --- A company backend for programming language keywords
 
-;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2016  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -35,13 +35,16 @@
 (defvar company-keywords-alist
   ;; Please contribute corrections or additions.
   `((c++-mode
-     "asm" "auto" "bool" "break" "case" "catch" "char" "class" "const"
-     "const_cast" "continue" "default" "delete" "do" "double" "dynamic_cast"
-     "else" "enum" "explicit" "export" "extern" "false" "float" "for" "friend"
-     "goto" "if" "inline" "int" "long" "mutable" "namespace" "new"
-     "operator" "private" "protected" "public" "register" "reinterpret_cast"
-     "return" "short" "signed" "sizeof" "static" "static_cast" "struct" 
"switch"
-     "template" "this" "throw" "true" "try" "typedef" "typeid" "typename"
+     "alignas" "alignof" "asm" "auto" "bool" "break" "case" "catch" "char"
+     "char16_t" "char32_t" "class" "const" "const_cast" "constexpr" "continue"
+     "decltype" "default" "delete" "do" "double" "dynamic_cast" "else" "enum"
+     "explicit" "export" "extern" "false" "final" "float" "for" "friend"
+     "goto" "if" "inline" "int" "long" "mutable" "namespace" "new" "noexcept"
+     "nullptr" "operator" "override"
+     "private" "protected" "public" "register" "reinterpret_cast"
+     "return" "short" "signed" "sizeof" "static" "static_assert"
+     "static_cast" "struct" "switch" "template" "this" "thread_local"
+     "throw" "true" "try" "typedef" "typeid" "typename"
      "union" "unsigned" "using" "virtual" "void" "volatile" "wchar_t" "while")
     (c-mode
      "auto" "break" "case" "char" "const" "continue" "default" "do"
@@ -207,17 +210,31 @@
      "do" "else" "elsif"  "end" "ensure" "false" "for" "if" "in" "module"
      "next" "nil" "not" "or" "redo" "rescue" "retry" "return" "self" "super"
      "then" "true" "undef" "unless" "until" "when" "while" "yield")
+    (scala-mode
+     "abstract" "case" "catch" "class" "def" "do" "else" "extends" "false"
+     "final" "finally" "for" "forSome" "if" "implicit" "import" "lazy" "match"
+     "new" "null" "object" "override" "package" "private" "protected"
+     "return" "sealed" "super" "this" "throw" "trait" "true" "try" "type" "val"
+     "var" "while" "with" "yield")
+    (julia-mode
+     "abstract" "break" "case" "catch" "const" "continue" "do" "else" "elseif"
+     "end" "eval" "export" "false" "finally" "for" "function" "global" "if"
+     "ifelse" "immutable" "import" "importall" "in" "let" "macro" "module"
+     "otherwise" "quote" "return" "switch" "throw" "true" "try" "type"
+     "typealias" "using" "while"
+     )
     ;; aliases
     (js2-mode . javascript-mode)
     (espresso-mode . javascript-mode)
     (js-mode . javascript-mode)
     (cperl-mode . perl-mode)
-    (jde-mode . java-mode))
+    (jde-mode . java-mode)
+    (ess-julia-mode . julia-mode))
   "Alist mapping major-modes to sorted keywords for `company-keywords'.")
 
 ;;;###autoload
 (defun company-keywords (command &optional arg &rest ignored)
-  "`company-mode' back-end for programming language keywords."
+  "`company-mode' backend for programming language keywords."
   (interactive (list 'interactive))
   (cl-case command
     (interactive (company-begin-backend 'company-keywords))
diff --git a/packages/company/company-nxml.el b/packages/company/company-nxml.el
index 70e1c09..9c180e9 100644
--- a/packages/company/company-nxml.el
+++ b/packages/company/company-nxml.el
@@ -1,4 +1,4 @@
-;;; company-nxml.el --- company-mode completion back-end for nxml-mode
+;;; company-nxml.el --- company-mode completion backend for nxml-mode
 
 ;; Copyright (C) 2009-2011, 2013  Free Software Foundation, Inc.
 
@@ -121,7 +121,7 @@
 
 ;;;###autoload
 (defun company-nxml (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for `nxml-mode'."
+  "`company-mode' completion backend for `nxml-mode'."
   (interactive (list 'interactive))
   (cl-case command
     (interactive (company-begin-backend 'company-nxml))
diff --git a/packages/company/company-oddmuse.el 
b/packages/company/company-oddmuse.el
index aa30f2a..1b68950 100644
--- a/packages/company/company-oddmuse.el
+++ b/packages/company/company-oddmuse.el
@@ -1,4 +1,4 @@
-;;; company-oddmuse.el --- company-mode completion back-end for oddmuse-mode
+;;; company-oddmuse.el --- company-mode completion backend for oddmuse-mode
 
 ;; Copyright (C) 2009-2011, 2014  Free Software Foundation, Inc.
 
@@ -27,7 +27,7 @@
 
 (require 'company)
 (require 'cl-lib)
-(eval-when-compile (require 'yaooddmuse nil t))
+(eval-when-compile (require 'yaoddmuse nil t))
 (eval-when-compile (require 'oddmuse nil t))
 
 (defvar company-oddmuse-link-regexp
@@ -42,7 +42,7 @@
 
 ;;;###autoload
 (defun company-oddmuse (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for `oddmuse-mode'."
+  "`company-mode' completion backend for `oddmuse-mode'."
   (interactive (list 'interactive))
   (cl-case command
     (interactive (company-begin-backend 'company-oddmuse))
diff --git a/packages/company/company-pysmell.el 
b/packages/company/company-pysmell.el
deleted file mode 100644
index 8a69e76..0000000
--- a/packages/company/company-pysmell.el
+++ /dev/null
@@ -1,69 +0,0 @@
-;;; company-pysmell.el --- company-mode completion back-end for pysmell.el
-
-;; Copyright (C) 2009-2011, 2013-2014  Free Software Foundation, Inc.
-
-;; Author: Nikolaj Schumacher
-
-;; 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:
-;;
-;; The main problem with using this backend is installing Pysmell.
-;; I couldn't manage to do that. --Dmitry
-
-;;; Code:
-
-(if t (require 'pysmell))               ;Don't load during compilation.
-(require 'company)
-(require 'cl-lib)
-
-(defvar-local company-pysmell--available-p 'unknown)
-
-(defun company-pysmell--available-p ()
-  (if (eq company-pysmell--available-p 'unknown)
-      (setq company-pysmell--available-p
-            (locate-dominating-file buffer-file-name "PYSMELLTAGS"))
-    company-pysmell--available-p))
-
-(defun company-pysmell--grab-symbol ()
-  (let ((symbol (company-grab-symbol)))
-    (when symbol
-      (cons symbol
-            (save-excursion
-              (let ((pos (point)))
-                (goto-char (- (point) (length symbol)))
-                (while (eq (char-before) ?.)
-                  (goto-char (1- (point)))
-                  (skip-syntax-backward "w_"))
-                (- pos (point))))))))
-
-;;;###autoload
-(defun company-pysmell (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for pysmell.
-This requires pysmell.el and pymacs.el."
-  (interactive (list 'interactive))
-  (cl-case command
-    (interactive (company-begin-backend 'company-pysmell))
-    (prefix (and (derived-mode-p 'python-mode)
-                 buffer-file-name
-                 (not (company-in-string-or-comment))
-                 (company-pysmell--available-p)
-                 (company-pysmell--grab-symbol)))
-    (candidates (delete "" (pysmell-get-all-completions)))))
-
-(provide 'company-pysmell)
-;;; company-pysmell.el ends here
diff --git a/packages/company/company-ropemacs.el 
b/packages/company/company-ropemacs.el
deleted file mode 100644
index 4fc3813..0000000
--- a/packages/company/company-ropemacs.el
+++ /dev/null
@@ -1,72 +0,0 @@
-;;; company-ropemacs.el --- company-mode completion back-end for ropemacs
-
-;; Copyright (C) 2009-2011, 2013-2014  Free Software Foundation, Inc.
-
-;; Author: Nikolaj Schumacher
-
-;; 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:
-;;
-
-;;; Code:
-
-(require 'cl-lib)
-
-(defun company-ropemacs--grab-symbol ()
-  (let ((symbol (company-grab-symbol)))
-    (when symbol
-      (cons symbol
-            (save-excursion
-              (let ((pos (point)))
-                (goto-char (- (point) (length symbol)))
-                (while (eq (char-before) ?.)
-                  (goto-char (1- (point)))
-                  (skip-syntax-backward "w_"))
-                (- pos (point))))))))
-
-(defun company-ropemacs-doc-buffer (candidate)
-  "Return buffer with docstring of CANDIDATE if it is available."
-  (let ((doc (company-with-candidate-inserted candidate (rope-get-doc))))
-    (when doc
-      (company-doc-buffer doc))))
-
-(defun company-ropemacs-location (candidate)
-  "Return location of CANDIDATE in cons form (FILE . LINE) if it is available."
-  (let ((location (company-with-candidate-inserted candidate
-                    (rope-definition-location))))
-    (when location
-      (cons (elt location 0) (elt location 1)))))
-
-(defun company-ropemacs (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for ropemacs.
-
-Depends on third-party code: Pymacs (both Python and Emacs packages),
-rope, ropemacs and ropemode.  Requires `ropemacs-mode' to be on."
-  (interactive (list 'interactive))
-  (cl-case command
-    (interactive (company-begin-backend 'company-ropemacs))
-    (prefix (and (bound-and-true-p ropemacs-mode)
-                 (not (company-in-string-or-comment))
-                 (company-ropemacs--grab-symbol)))
-    (candidates (mapcar (lambda (element) (concat arg element))
-                        (rope-completions)))
-    (doc-buffer (company-ropemacs-doc-buffer arg))
-    (location (company-ropemacs-location arg))))
-
-(provide 'company-ropemacs)
-;;; company-ropemacs.el ends here
diff --git a/packages/company/company-semantic.el 
b/packages/company/company-semantic.el
index a1c7d16..8b13b72 100644
--- a/packages/company/company-semantic.el
+++ b/packages/company/company-semantic.el
@@ -1,6 +1,6 @@
-;;; company-semantic.el --- company-mode completion back-end using Semantic
+;;; company-semantic.el --- company-mode completion backend using Semantic
 
-;; Copyright (C) 2009-2011, 2013  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2013-2016  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -26,6 +26,7 @@
 ;;; Code:
 
 (require 'company)
+(require 'company-template)
 (require 'cl-lib)
 
 (defvar semantic-idle-summary-function)
@@ -38,15 +39,30 @@
 (declare-function semantic-tag-start "semantic/tag")
 (declare-function semantic-tag-buffer "semantic/tag")
 (declare-function semantic-active-p "semantic")
+(declare-function semantic-format-tag-prototype "semantic/format")
 
 (defgroup company-semantic nil
-  "Completion back-end using Semantic."
+  "Completion backend using Semantic."
   :group 'company)
 
 (defcustom company-semantic-metadata-function 'company-semantic-summary-and-doc
   "The function turning a semantic tag into doc information."
   :type 'function)
 
+(defcustom company-semantic-begin-after-member-access t
+  "When non-nil, automatic completion will start whenever the current
+symbol is preceded by \".\", \"->\" or \"::\", ignoring
+`company-minimum-prefix-length'.
+
+If `company-begin-commands' is a list, it should include `c-electric-lt-gt'
+and `c-electric-colon', for automatic completion right after \">\" and
+\":\".")
+
+(defcustom company-semantic-insert-arguments t
+  "When non-nil, insert function arguments as a template after completion."
+  :type 'boolean
+  :package-version '(company . "0.9.0"))
+
 (defvar company-semantic-modes '(c-mode c++-mode jde-mode java-mode))
 
 (defvar-local company-semantic--current-tags nil
@@ -89,7 +105,7 @@
     (let ((completion-ignore-case nil)
           (context (semantic-analyze-current-context)))
       (setq company-semantic--current-tags
-            (semantic-analyze-possible-completions context))
+            (semantic-analyze-possible-completions context 'no-unique))
       (all-completions prefix company-semantic--current-tags))))
 
 (defun company-semantic-completions-raw (prefix)
@@ -100,33 +116,21 @@
   (delete "" (mapcar 'semantic-tag-name company-semantic--current-tags)))
 
 (defun company-semantic-annotation (argument tags)
-  (let* ((tag (assoc argument tags))
+  (let* ((tag (assq argument tags))
          (kind (when tag (elt tag 1))))
     (cl-case kind
       (function (let* ((prototype (semantic-format-tag-prototype tag nil nil))
                        (par-pos (string-match "(" prototype)))
                   (when par-pos (substring prototype par-pos)))))))
 
-(defun company-semantic--pre-prefix-length (prefix-length)
-  "Sum up the length of all chained symbols before POS.
-Symbols are chained by \".\" or \"->\"."
-  (save-excursion
-    (let ((pos (point)))
-      (goto-char (- (point) prefix-length))
-      (while (looking-back "->\\|\\.")
-        (goto-char (match-beginning 0))
-        (skip-syntax-backward "w_"))
-      (- pos (point)))))
-
-(defun company-semantic--grab ()
-  "Grab the semantic prefix, but return everything before -> or . as length."
-  (let ((symbol (company-grab-symbol)))
-    (when symbol
-      (cons symbol (company-semantic--pre-prefix-length (length symbol))))))
+(defun company-semantic--prefix ()
+  (if company-semantic-begin-after-member-access
+      (company-grab-symbol-cons "\\.\\|->\\|::" 2)
+    (company-grab-symbol)))
 
 ;;;###autoload
 (defun company-semantic (command &optional arg &rest ignored)
-  "`company-mode' completion back-end using CEDET Semantic."
+  "`company-mode' completion backend using CEDET Semantic."
   (interactive (list 'interactive))
   (cl-case command
     (interactive (company-begin-backend 'company-semantic))
@@ -134,9 +138,9 @@ Symbols are chained by \".\" or \"->\"."
                  (semantic-active-p)
                  (memq major-mode company-semantic-modes)
                  (not (company-in-string-or-comment))
-                 (or (company-semantic--grab) 'stop)))
+                 (or (company-semantic--prefix) 'stop)))
     (candidates (if (and (equal arg "")
-                         (not (looking-back "->\\|\\.")))
+                         (not (looking-back "->\\|\\." (- (point) 2))))
                     (company-semantic-completions-raw arg)
                   (company-semantic-completions arg)))
     (meta (funcall company-semantic-metadata-function
@@ -147,10 +151,17 @@ Symbols are chained by \".\" or \"->\"."
                  (assoc arg company-semantic--current-tags)))
     ;; Because "" is an empty context and doesn't return local variables.
     (no-cache (equal arg ""))
+    (duplicates t)
     (location (let ((tag (assoc arg company-semantic--current-tags)))
                 (when (buffer-live-p (semantic-tag-buffer tag))
                   (cons (semantic-tag-buffer tag)
-                        (semantic-tag-start tag)))))))
+                        (semantic-tag-start tag)))))
+    (post-completion (let ((anno (company-semantic-annotation
+                                  arg company-semantic--current-tags)))
+                       (when (and company-semantic-insert-arguments anno)
+                         (insert anno)
+                         (company-template-c-like-templatify (concat arg 
anno)))
+                       ))))
 
 (provide 'company-semantic)
 ;;; company-semantic.el ends here
diff --git a/packages/company/company-template.el 
b/packages/company/company-template.el
index 21ae011..053429d 100644
--- a/packages/company/company-template.el
+++ b/packages/company/company-template.el
@@ -1,6 +1,6 @@
-;;; company-template.el
+;;; company-template.el --- utility library for template expansion
 
-;; Copyright (C) 2009, 2010, 2014 Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2010, 2014-2016 Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -93,16 +93,14 @@
         (delq templ company-template--buffer-templates))
   (delete-overlay templ))
 
-(defun company-template-add-field (templ pos text &optional display)
-  "Add new field to template TEMPL at POS, inserting TEXT.
+(defun company-template-add-field (templ beg end &optional display)
+  "Add new field to template TEMPL spanning from BEG to END.
 When DISPLAY is non-nil, set the respective property on the overlay.
 Leave point at the end of the field."
   (cl-assert templ)
-  (goto-char pos)
-  (insert text)
-  (when (> (point) (overlay-end templ))
-    (move-overlay templ (overlay-start templ) (point)))
-  (let ((ov (make-overlay pos (+ pos (length text))))
+  (when (> end (overlay-end templ))
+    (move-overlay templ (overlay-start templ) end))
+  (let ((ov (make-overlay beg end))
         (siblings (overlay-get templ 'company-template-fields)))
     ;; (overlay-put ov 'evaporate t)
     (overlay-put ov 'intangible t)
@@ -149,7 +147,6 @@ Leave point at the end of the field."
 (defun company-template-c-like-templatify (call)
   (let* ((end (point-marker))
          (beg (- (point) (length call)))
-         (cnt 0)
          (templ (company-template-declare-template beg end))
          paren-open paren-close)
     (with-syntax-table (make-syntax-table (syntax-table))
@@ -167,29 +164,51 @@ Leave point at the end of the field."
           (forward-char 1)
           (backward-sexp)
           (forward-char)
-          (setq cnt (company-template--c-like-args templ angle-close
-                                                   cnt))))
+          (company-template--c-like-args templ angle-close)))
+      (when (looking-back "\\((\\*)\\)(" (line-beginning-position))
+        (delete-region (match-beginning 1) (match-end 1)))
       (when paren-open
         (goto-char paren-open)
-        (company-template--c-like-args templ paren-close cnt)))
+        (company-template--c-like-args templ paren-close)))
     (if (overlay-get templ 'company-template-fields)
         (company-template-move-to-first templ)
       (company-template-remove-template templ)
       (goto-char end))))
 
-(defun company-template--c-like-args (templ end counter)
+(defun company-template--c-like-args (templ end)
   (let ((last-pos (point)))
     (while (re-search-forward "\\([^,]+\\),?" end 'move)
       (when (zerop (car (parse-partial-sexp last-pos (point))))
-        (let ((sig (buffer-substring-no-properties last-pos (match-end 1))))
-          (save-excursion
-            (company-template-add-field templ last-pos
-                                        (format "arg%d" counter) sig)
-            (delete-region (point) (+ (point) (length sig))))
-          (skip-chars-forward " ")
-          (setq last-pos (point))
-          (cl-incf counter)))))
-  counter)
+        (company-template-add-field templ last-pos (match-end 1))
+        (skip-chars-forward " ")
+        (setq last-pos (point))))))
+
+;; objc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defun company-template-objc-templatify (selector)
+  (let* ((end (point-marker))
+         (beg (- (point) (length selector) 1))
+         (templ (company-template-declare-template beg end))
+         (cnt 0))
+    (save-excursion
+      (goto-char beg)
+      (catch 'stop
+        (while (search-forward ":" end t)
+          (if (looking-at "\\(([^)]*)\\) ?")
+              (company-template-add-field templ (point) (match-end 1))
+            ;; Not sure which conditions this case manifests under, but
+            ;; apparently it did before, when I wrote the first test for this
+            ;; function.  FIXME: Revisit it.
+            (company-template-add-field templ (point)
+                                        (progn
+                                          (insert (format "arg%d" cnt))
+                                          (point)))
+            (when (< (point) end)
+              (insert " "))
+            (cl-incf cnt))
+          (when (>= (point) end)
+            (throw 'stop t)))))
+    (company-template-move-to-first templ)))
 
 (provide 'company-template)
 ;;; company-template.el ends here
diff --git a/packages/company/company-tempo.el 
b/packages/company/company-tempo.el
index ac91988..cba42c3 100644
--- a/packages/company/company-tempo.el
+++ b/packages/company/company-tempo.el
@@ -1,6 +1,6 @@
-;;; company-tempo.el --- company-mode completion back-end for tempo
+;;; company-tempo.el --- company-mode completion backend for tempo
 
-;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2015  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -29,6 +29,15 @@
 (require 'cl-lib)
 (require 'tempo)
 
+(defgroup company-tempo nil
+  "Tempo completion backend."
+  :group 'company)
+
+(defcustom company-tempo-expand nil
+  "Whether to expand a tempo tag after completion."
+  :type '(choice (const :tag "Off" nil)
+                 (const :tag "On" t)))
+
 (defsubst company-tempo-lookup (match)
   (cdr (assoc match (tempo-build-collection))))
 
@@ -48,15 +57,14 @@
 
 ;;;###autoload
 (defun company-tempo (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for tempo."
+  "`company-mode' completion backend for tempo."
   (interactive (list 'interactive))
   (cl-case command
-    (interactive (company-begin-backend 'company-tempo
-                                        'company-tempo-insert))
+    (interactive (company-begin-backend 'company-tempo))
     (prefix (or (car (tempo-find-match-string tempo-match-finder)) ""))
     (candidates (all-completions arg (tempo-build-collection)))
     (meta (company-tempo-meta arg))
-    (require-match t)
+    (post-completion (when company-tempo-expand (company-tempo-insert arg)))
     (sorted t)))
 
 (provide 'company-tempo)
diff --git a/packages/company/company-xcode.el 
b/packages/company/company-xcode.el
index c7a6f80..56da198 100644
--- a/packages/company/company-xcode.el
+++ b/packages/company/company-xcode.el
@@ -1,4 +1,4 @@
-;;; company-xcode.el --- company-mode completion back-end for Xcode projects
+;;; company-xcode.el --- company-mode completion backend for Xcode projects
 
 ;; Copyright (C) 2009-2011, 2014  Free Software Foundation, Inc.
 
@@ -29,7 +29,7 @@
 (require 'cl-lib)
 
 (defgroup company-xcode nil
-  "Completion back-end for Xcode projects."
+  "Completion backend for Xcode projects."
   :group 'company)
 
 (defcustom company-xcode-xcodeindex-executable (executable-find "xcodeindex")
@@ -106,7 +106,7 @@ valid in most contexts."
                         company-xcode-tags))))))
 ;;;###autoload
 (defun company-xcode (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for Xcode projects."
+  "`company-mode' completion backend for Xcode projects."
   (interactive (list 'interactive))
   (cl-case command
     (interactive (company-begin-backend 'company-xcode))
diff --git a/packages/company/company-yasnippet.el 
b/packages/company/company-yasnippet.el
index f0a7c38..5c88017 100644
--- a/packages/company/company-yasnippet.el
+++ b/packages/company/company-yasnippet.el
@@ -1,6 +1,6 @@
-;;; company-yasnippet.el --- company-mode completion back-end for Yasnippet
+;;; company-yasnippet.el --- company-mode completion backend for Yasnippet
 
-;; Copyright (C) 2014  Free Software Foundation, Inc.
+;; Copyright (C) 2014, 2015  Free Software Foundation, Inc.
 
 ;; Author: Dmitry Gutov
 
@@ -33,8 +33,47 @@
 (declare-function yas-expand-snippet "yasnippet")
 (declare-function yas--template-content "yasnippet")
 (declare-function yas--template-expand-env "yasnippet")
+(declare-function yas--warning "yasnippet")
+
+(defun company-yasnippet--key-prefixes ()
+  ;; Mostly copied from `yas--templates-for-key-at-point'.
+  (defvar yas-key-syntaxes)
+  (save-excursion
+    (let ((original (point))
+          (methods yas-key-syntaxes)
+          prefixes
+          method)
+      (while methods
+        (unless (eq method (car methods))
+          (goto-char original))
+        (setq method (car methods))
+        (cond ((stringp method)
+               (skip-syntax-backward method)
+               (setq methods (cdr methods)))
+              ((functionp method)
+               (unless (eq (funcall method original)
+                           'again)
+                 (setq methods (cdr methods))))
+              (t
+               (setq methods (cdr methods))
+               (yas--warning "Invalid element `%s' in `yas-key-syntaxes'" 
method)))
+        (let ((prefix (buffer-substring-no-properties (point) original)))
+          (unless (equal prefix (car prefixes))
+            (push prefix prefixes))))
+      prefixes)))
 
 (defun company-yasnippet--candidates (prefix)
+  ;; Process the prefixes in reverse: unlike Yasnippet, we look for prefix
+  ;; matches, so the longest prefix with any matches should be the most useful.
+  (cl-loop with tables = (yas--get-snippet-tables)
+           for key-prefix in (company-yasnippet--key-prefixes)
+           ;; Only consider keys at least as long as the symbol at point.
+           when (>= (length key-prefix) (length prefix))
+           thereis (company-yasnippet--completions-for-prefix prefix
+                                                              key-prefix
+                                                              tables)))
+
+(defun company-yasnippet--completions-for-prefix (prefix key-prefix tables)
   (cl-mapcan
    (lambda (table)
      (let ((keyhash (yas--table-hash table))
@@ -43,42 +82,44 @@
          (maphash
           (lambda (key value)
             (when (and (stringp key)
-                       (string-prefix-p prefix key))
+                       (string-prefix-p key-prefix key))
               (maphash
                (lambda (name template)
                  (push
                   (propertize key
                               'yas-annotation name
-                              'yas-template template)
+                              'yas-template template
+                              'yas-prefix-offset (- (length key-prefix)
+                                                    (length prefix)))
                   res))
                value)))
           keyhash))
        res))
-   (yas--get-snippet-tables)))
+   tables))
 
 ;;;###autoload
 (defun company-yasnippet (command &optional arg &rest ignore)
-  "`company-mode' back-end for `yasnippet'.
+  "`company-mode' backend for `yasnippet'.
 
-This back-end should be used with care, because as long as there are
-snippets defined for the current major mode, this back-end will always
-shadow back-ends that come after it.  Recommended usages:
+This backend should be used with care, because as long as there are
+snippets defined for the current major mode, this backend will always
+shadow backends that come after it.  Recommended usages:
 
-* In a buffer-local value of `company-backends', grouped with a back-end or
+* In a buffer-local value of `company-backends', grouped with a backend or
   several that provide actual text completions.
 
-  (add-hook 'js-mode-hook
+  (add-hook \\='js-mode-hook
             (lambda ()
-              (set (make-local-variable 'company-backends)
-                   '((company-dabbrev-code company-yasnippet)))))
+              (set (make-local-variable \\='company-backends)
+                   \\='((company-dabbrev-code company-yasnippet)))))
 
-* After keyword `:with', grouped with other back-ends.
+* After keyword `:with', grouped with other backends.
 
-  (push '(company-semantic :with company-yasnippet) company-backends)
+  (push \\='(company-semantic :with company-yasnippet) company-backends)
 
 * Not in `company-backends', just bound to a key.
 
-  (global-set-key (kbd \"C-c y\") 'company-yasnippet)
+  (global-set-key (kbd \"C-c y\") \\='company-yasnippet)
 "
   (interactive (list 'interactive))
   (cl-case command
@@ -93,10 +134,12 @@ shadow back-ends that come after it.  Recommended usages:
       (unless company-tooltip-align-annotations " -> ")
       (get-text-property 0 'yas-annotation arg)))
     (candidates (company-yasnippet--candidates arg))
+    (no-cache t)
     (post-completion
-     (let ((template (get-text-property 0 'yas-template arg)))
+     (let ((template (get-text-property 0 'yas-template arg))
+           (prefix-offset (get-text-property 0 'yas-prefix-offset arg)))
        (yas-expand-snippet (yas--template-content template)
-                           (- (point) (length arg))
+                           (- (point) (length arg) prefix-offset)
                            (point)
                            (yas--template-expand-env template))))))
 
diff --git a/packages/company/company.el b/packages/company/company.el
index ce0b5a4..a2908af 100644
--- a/packages/company/company.el
+++ b/packages/company/company.el
@@ -1,11 +1,11 @@
 ;;; company.el --- Modular text completion framework  -*- lexical-binding: t 
-*-
 
-;; Copyright (C) 2009-2015  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2016  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 ;; Maintainer: Dmitry Gutov <address@hidden>
 ;; URL: http://company-mode.github.io/
-;; Version: 0.8.12
+;; Version: 0.9.0
 ;; Keywords: abbrev, convenience, matching
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 
@@ -26,37 +26,32 @@
 
 ;;; Commentary:
 ;;
-;; Company is a modular completion mechanism.  Modules for retrieving 
completion
-;; candidates are called back-ends, modules for displaying them are front-ends.
+;; Company is a modular completion framework.  Modules for retrieving 
completion
+;; candidates are called backends, modules for displaying them are frontends.
 ;;
-;; Company comes with many back-ends, e.g. `company-elisp'.  These are
+;; Company comes with many backends, e.g. `company-etags'.  These are
 ;; distributed in separate files and can be used individually.
 ;;
-;; Place company.el and the back-ends you want to use in a directory and add 
the
-;; following to your .emacs:
-;; (add-to-list 'load-path "/path/to/company")
-;; (autoload 'company-mode "company" nil t)
+;; Enable `company-mode' in all buffers with M-x global-company-mode.  For
+;; further information look at the documentation for `company-mode' (C-h f
+;; company-mode RET).
 ;;
-;; Enable company-mode with M-x company-mode.  For further information look at
-;; the documentation for `company-mode' (C-h f company-mode RET)
-;;
-;; If you want to start a specific back-end, call it interactively or use
+;; If you want to start a specific backend, call it interactively or use
 ;; `company-begin-backend'.  For example:
 ;; M-x company-abbrev will prompt for and insert an abbrev.
 ;;
-;; To write your own back-end, look at the documentation for 
`company-backends'.
+;; To write your own backend, look at the documentation for `company-backends'.
 ;; Here is a simple example completing "foo":
 ;;
 ;; (defun company-my-backend (command &optional arg &rest ignored)
 ;;   (pcase command
-;;     (`prefix (when (looking-back "foo\\>")
-;;               (match-string 0)))
+;;     (`prefix (company-grab-symbol))
 ;;     (`candidates (list "foobar" "foobaz" "foobarbaz"))
 ;;     (`meta (format "This value is named %s" arg))))
 ;;
-;; Sometimes it is a good idea to mix several back-ends together, for example 
to
-;; enrich gtags with dabbrev-code results (to emulate local variables).
-;; To do this, add a list with both back-ends as an element in 
company-backends.
+;; Sometimes it is a good idea to mix several backends together, for example to
+;; enrich gtags with dabbrev-code results (to emulate local variables).  To do
+;; this, add a list with both backends as an element in `company-backends'.
 ;;
 ;;; Change Log:
 ;;
@@ -66,6 +61,7 @@
 
 (require 'cl-lib)
 (require 'newcomment)
+(require 'pcase)
 
 ;; FIXME: Use `user-error'.
 (add-to-list 'debug-ignored-errors "^.* frontend cannot be used twice$")
@@ -74,7 +70,7 @@
 (add-to-list 'debug-ignored-errors "^Company not ")
 (add-to-list 'debug-ignored-errors "^No candidate number ")
 (add-to-list 'debug-ignored-errors "^Cannot complete at point$")
-(add-to-list 'debug-ignored-errors "^No other back-end$")
+(add-to-list 'debug-ignored-errors "^No other backend$")
 
 ;;; Compatibility
 (eval-and-compile
@@ -104,8 +100,7 @@ buffer-local wherever it is set."
   "Face used for the tooltip.")
 
 (defface company-tooltip-selection
-  '((default :inherit company-tooltip)
-    (((class color) (min-colors 88) (background light))
+  '((((class color) (min-colors 88) (background light))
      (:background "light blue"))
     (((class color) (min-colors 88) (background dark))
      (:background "orange1"))
@@ -121,28 +116,26 @@ buffer-local wherever it is set."
   "Face used for the tooltip item under the mouse.")
 
 (defface company-tooltip-common
-  '((default :inherit company-tooltip)
-    (((background light))
+  '((((background light))
      :foreground "darkred")
     (((background dark))
      :foreground "red"))
   "Face used for the common completion in the tooltip.")
 
 (defface company-tooltip-common-selection
-  '((default :inherit company-tooltip-selection)
-    (((background light))
-     :foreground "darkred")
-    (((background dark))
-     :foreground "red"))
+  '((default :inherit company-tooltip-common))
   "Face used for the selected common completion in the tooltip.")
 
 (defface company-tooltip-annotation
-  '((default :inherit company-tooltip)
-    (((background light))
+  '((((background light))
      :foreground "firebrick4")
     (((background dark))
      :foreground "red4"))
-  "Face used for the annotation in the tooltip.")
+  "Face used for the completion annotation in the tooltip.")
+
+(defface company-tooltip-annotation-selection
+  '((default :inherit company-tooltip-annotation))
+  "Face used for the selected completion annotation in the tooltip.")
 
 (defface company-scrollbar-fg
   '((((background light))
@@ -152,8 +145,7 @@ buffer-local wherever it is set."
   "Face used for the tooltip scrollbar thumb.")
 
 (defface company-scrollbar-bg
-  '((default :inherit company-tooltip)
-    (((background light))
+  '((((background light))
      :background "wheat")
     (((background dark))
      :background "gold"))
@@ -161,7 +153,7 @@ buffer-local wherever it is set."
 
 (defface company-preview
   '((((background light))
-     :inherit company-tooltip-selection)
+     :inherit (company-tooltip-selection company-tooltip))
     (((background dark))
      :background "blue4"
      :foreground "wheat"))
@@ -169,7 +161,7 @@ buffer-local wherever it is set."
 
 (defface company-preview-common
   '((((background light))
-     :inherit company-tooltip-selection)
+     :inherit company-tooltip-common-selection)
     (((background dark))
      :inherit company-preview
      :foreground "red"))
@@ -194,9 +186,13 @@ buffer-local wherever it is set."
 (defun company-frontends-set (variable value)
   ;; Uniquify.
   (let ((value (delete-dups (copy-sequence value))))
-    (and (memq 'company-pseudo-tooltip-unless-just-one-frontend value)
-         (memq 'company-pseudo-tooltip-frontend value)
-         (error "Pseudo tooltip frontend cannot be used twice"))
+    (and (or (and (memq 'company-pseudo-tooltip-unless-just-one-frontend value)
+                  (memq 'company-pseudo-tooltip-frontend value))
+             (and (memq 
'company-pseudo-tooltip-unless-just-one-frontend-with-delay value)
+                  (memq 'company-pseudo-tooltip-frontend value))
+             (and (memq 
'company-pseudo-tooltip-unless-just-one-frontend-with-delay value)
+                  (memq 'company-pseudo-tooltip-unless-just-one-frontend 
value)))
+         (error "Pseudo tooltip frontend cannot be used more than once"))
     (and (memq 'company-preview-if-just-one-frontend value)
          (memq 'company-preview-frontend value)
          (error "Preview frontend cannot be used twice"))
@@ -212,8 +208,8 @@ buffer-local wherever it is set."
 (defcustom company-frontends '(company-pseudo-tooltip-unless-just-one-frontend
                                company-preview-if-just-one-frontend
                                company-echo-metadata-frontend)
-  "The list of active front-ends (visualizations).
-Each front-end is a function that takes one argument.  It is called with
+  "The list of active frontends (visualizations).
+Each frontend is a function that takes one argument.  It is called with
 one of the following arguments:
 
 `show': When the visualization should start.
@@ -241,6 +237,8 @@ The visualized data is stored in `company-prefix', 
`company-candidates',
                                 company-pseudo-tooltip-frontend)
                          (const :tag "pseudo tooltip, multiple only"
                                 
company-pseudo-tooltip-unless-just-one-frontend)
+                         (const :tag "pseudo tooltip, multiple only, delayed"
+                                
company-pseudo-tooltip-unless-just-one-frontend-with-delay)
                          (const :tag "preview" company-preview-frontend)
                          (const :tag "preview, unique only"
                                 company-preview-if-just-one-frontend)
@@ -300,8 +298,6 @@ This doesn't include the margins and the scroll bar."
     (company-keywords . "Programming language keywords")
     (company-nxml . "nxml")
     (company-oddmuse . "Oddmuse")
-    (company-pysmell . "PySmell")
-    (company-ropemacs . "ropemacs")
     (company-semantic . "Semantic")
     (company-tempo . "Tempo templates")
     (company-xcode . "Xcode")))
@@ -315,37 +311,39 @@ This doesn't include the margins and the scroll bar."
                         (assq backend company-safe-backends))
                 (cl-return t))))))
 
-(defcustom company-backends `(,@(unless (version< "24.3.50" emacs-version)
+(defcustom company-backends `(,@(unless (version< "24.3.51" emacs-version)
                                   (list 'company-elisp))
                               company-bbdb
                               company-nxml company-css
                               company-eclim company-semantic company-clang
-                              company-xcode company-ropemacs company-cmake
+                              company-xcode company-cmake
                               company-capf
+                              company-files
                               (company-dabbrev-code company-gtags company-etags
                                company-keywords)
-                              company-oddmuse company-files company-dabbrev)
-  "The list of active back-ends (completion engines).
+                              company-oddmuse company-dabbrev)
+  "The list of active backends (completion engines).
 
-Only one back-end is used at a time.  The choice depends on the order of
+Only one backend is used at a time.  The choice depends on the order of
 the items in this list, and on the values they return in response to the
-`prefix' command (see below).  But a back-end can also be a \"grouped\"
+`prefix' command (see below).  But a backend can also be a \"grouped\"
 one (see below).
 
-`company-begin-backend' can be used to start a specific back-end,
-`company-other-backend' will skip to the next matching back-end in the list.
+`company-begin-backend' can be used to start a specific backend,
+`company-other-backend' will skip to the next matching backend in the list.
 
-Each back-end is a function that takes a variable number of arguments.
-The first argument is the command requested from the back-end.  It is one
+Each backend is a function that takes a variable number of arguments.
+The first argument is the command requested from the backend.  It is one
 of the following:
 
-`prefix': The back-end should return the text to be completed.  It must be
+`prefix': The backend should return the text to be completed.  It must be
 text immediately before point.  Returning nil from this command passes
-control to the next back-end.  The function should return `stop' if it
+control to the next backend.  The function should return `stop' if it
 should complete but cannot (e.g. if it is in the middle of a string).
-Instead of a string, the back-end may return a cons where car is the prefix
-and cdr is used in `company-minimum-prefix-length' test.  It must be either
-number or t, and in the latter case the test automatically succeeds.
+Instead of a string, the backend may return a cons (PREFIX . LENGTH)
+where LENGTH is a number used in place of PREFIX's length when
+comparing against `company-minimum-prefix-length'.  LENGTH can also
+be just t, and in the latter case the test automatically succeeds.
 
 `candidates': The second argument is the prefix to be completed.  The
 return value should be a list of candidates that match the prefix.
@@ -355,7 +353,8 @@ prefix, but match it in some backend-defined way).  
Backends that use this
 feature must disable cache (return t to `no-cache') and might also want to
 respond to `match'.
 
-Optional commands:
+Optional commands
+=================
 
 `sorted': Return t here to indicate that the candidates are sorted and will
 not need to be sorted again.
@@ -364,16 +363,23 @@ not need to be sorted again.
 from the list.
 
 `no-cache': Usually company doesn't ask for candidates again as completion
-progresses, unless the back-end returns t for this command.  The second
+progresses, unless the backend returns t for this command.  The second
 argument is the latest prefix.
 
+`ignore-case': Return t here if the backend returns case-insensitive
+matches.  This value is used to determine the longest common prefix (as
+used in `company-complete-common'), and to filter completions when fetching
+them from cache.
+
 `meta': The second argument is a completion candidate.  Return a (short)
 documentation string for it.
 
 `doc-buffer': The second argument is a completion candidate.  Return a
-buffer with documentation for it.  Preferably use `company-doc-buffer',
+buffer with documentation for it.  Preferably use `company-doc-buffer'.  If
+not all buffer contents pertain to this candidate, return a cons of buffer
+and window start position.
 
-`location': The second argument is a completion candidate.  Return the cons
+`location': The second argument is a completion candidate.  Return a cons
 of buffer and buffer location, or of file and line number where the
 completion candidate was defined.
 
@@ -390,56 +396,62 @@ will be used when rendering the popup.  This command only 
makes sense for
 backends that provide non-prefix completion.
 
 `require-match': If this returns t, the user is not allowed to enter
-anything not offered as a candidate.  Use with care!  The default value nil
-gives the user that choice with `company-require-match'.  Return value
-`never' overrides that option the other way around.
+anything not offered as a candidate.  Please don't use that value in normal
+backends.  The default value nil gives the user that choice with
+`company-require-match'.  Return value `never' overrides that option the
+other way around.
 
-`init': Called once for each buffer. The back-end can check for external
+`init': Called once for each buffer. The backend can check for external
 programs and files and load any required libraries.  Raising an error here
-will show up in message log once, and the back-end will not be used for
+will show up in message log once, and the backend will not be used for
 completion.
 
 `post-completion': Called after a completion candidate has been inserted
 into the buffer.  The second argument is the candidate.  Can be used to
 modify it, e.g. to expand a snippet.
 
-The back-end should return nil for all commands it does not support or
+The backend should return nil for all commands it does not support or
 does not know about.  It should also be callable interactively and use
 `company-begin-backend' to start itself in that case.
 
-Grouped back-ends:
+Grouped backends
+================
 
-An element of `company-backends' can also itself be a list of back-ends,
-then it's considered to be a \"grouped\" back-end.
+An element of `company-backends' can also be a list of backends.  The
+completions from backends in such groups are merged, but only from those
+backends which return the same `prefix'.
 
-When possible, commands taking a candidate as an argument are dispatched to
-the back-end it came from.  In other cases, the first non-nil value among
-all the back-ends is returned.
+If a backend command takes a candidate as an argument (e.g. `meta'), the
+call is dispatched to the backend the candidate came from.  In other
+cases (except for `duplicates' and `sorted'), the first non-nil value among
+all the backends is returned.
 
-The latter is the case for the `prefix' command.  But if the group contains
-the keyword `:with', the back-ends after it are ignored for this command.
+The group can also contain keywords.  Currently, `:with' and `:separate'
+keywords are defined.  If the group contains keyword `:with', the backends
+listed after this keyword are ignored for the purpose of the `prefix'
+command.  If the group contains keyword `:separate', the candidates that
+come from different backends are sorted separately in the combined list.
 
-The completions from back-ends in a group are merged (but only from those
-that return the same `prefix').
-
-Asynchronous back-ends:
+Asynchronous backends
+=====================
 
 The return value of each command can also be a cons (:async . FETCHER)
 where FETCHER is a function of one argument, CALLBACK.  When the data
 arrives, FETCHER must call CALLBACK and pass it the appropriate return
-value, as described above.
+value, as described above.  That call must happen in the same buffer as
+where completion was initiated.
 
 True asynchronous operation is only supported for command `candidates', and
 only during idle completion.  Other commands will block the user interface,
-even if the back-end uses the asynchronous calling convention."
+even if the backend uses the asynchronous calling convention."
   :type `(repeat
           (choice
-           :tag "Back-end"
+           :tag "backend"
            ,@(mapcar (lambda (b) `(const :tag ,(cdr b) ,(car b)))
                      company-safe-backends)
            (symbol :tag "User defined")
-           (repeat :tag "Merged Back-ends"
-                   (choice :tag "Back-end"
+           (repeat :tag "Merged backends"
+                   (choice :tag "backend"
                            ,@(mapcar (lambda (b)
                                        `(const :tag ,(cdr b) ,(car b)))
                                      company-safe-backends)
@@ -457,8 +469,10 @@ without duplicates."
   :type '(choice
           (const :tag "None" nil)
           (const :tag "Sort by occurrence" (company-sort-by-occurrence))
-          (const :tag "Sort by back-end importance"
+          (const :tag "Sort by backend importance"
                  (company-sort-by-backend-importance))
+          (const :tag "Prefer case sensitive prefix"
+                 (company-sort-prefer-same-case-prefix))
           (repeat :tag "User defined" (function))))
 
 (defcustom company-completion-started-hook nil
@@ -478,7 +492,7 @@ aborted manually."
 The hook is called with the selected candidate as an argument.
 
 If you indend to use it to post-process candidates from a specific
-back-end, consider using the `post-completion' command instead."
+backend, consider using the `post-completion' command instead."
   :type 'hook)
 
 (defcustom company-minimum-prefix-length 3
@@ -496,7 +510,7 @@ prefix it was started from."
   "If enabled, disallow non-matching input.
 This can be a function do determine if a match is required.
 
-This can be overridden by the back-end, if it returns t or `never' to
+This can be overridden by the backend, if it returns t or `never' to
 `require-match'.  `company-auto-complete' also takes precedence over this."
   :type '(choice (const :tag "Off" nil)
                  (function :tag "Predicate function")
@@ -551,6 +565,13 @@ happens.  The value of nil means no idle completion."
                  (const :tag "immediate (0)" 0)
                  (number :tag "seconds")))
 
+(defcustom company-tooltip-idle-delay .5
+  "The idle delay in seconds until tooltip is shown when using
+`company-pseudo-tooltip-unless-just-one-frontend-with-delay'."
+  :type '(choice (const :tag "never (nil)" nil)
+                 (const :tag "immediate (0)" 0)
+                 (number :tag "seconds")))
+
 (defcustom company-begin-commands '(self-insert-command
                                     org-self-insert-command
                                     orgtbl-self-insert-command
@@ -651,7 +672,7 @@ asynchronous call into synchronous.")
       (error
        (put backend 'company-init 'failed)
        (unless (memq backend company--disabled-backends)
-         (message "Company back-end '%s' could not be initialized:\n%s"
+         (message "Company backend '%s' could not be initialized:\n%s"
                   backend (error-message-string err)))
        (cl-pushnew backend company--disabled-backends)
        nil)))
@@ -668,7 +689,7 @@ asynchronous call into synchronous.")
   :package-version '(company . "0.8.10"))
 
 (defvar company-lighter '(" "
-                          (company-backend
+                          (company-candidates
                            (:eval
                             (if (consp company-backend)
                                 (company--group-lighter (nth company-selection
@@ -699,9 +720,12 @@ Completions can be searched with 
`company-search-candidates' or
 inactive, as well.
 
 The completion data is retrieved using `company-backends' and displayed
-using `company-frontends'.  If you want to start a specific back-end, call
+using `company-frontends'.  If you want to start a specific backend, call
 it interactively or use `company-begin-backend'.
 
+By default, the completions list is sorted alphabetically, unless the
+backend chooses otherwise, or `company-transformers' changes it later.
+
 regular keymap (`company-mode-map'):
 
 \\{company-mode-map}
@@ -797,7 +821,9 @@ means that `company-mode' is always turned on except in 
`message-mode' buffers."
   (let ((col (car (posn-col-row posn)))
         ;; `posn-col-row' doesn't work well with lines of different height.
         ;; `posn-actual-col-row' doesn't handle multiple-width characters.
-        (row (cdr (posn-actual-col-row posn))))
+        (row (cdr (or (posn-actual-col-row posn)
+                      ;; When position is non-visible for some reason.
+                      (posn-col-row posn)))))
     (when (and header-line-format (version< emacs-version "24.3.93.3"))
       ;; http://debbugs.gnu.org/18384
       (cl-decf row))
@@ -818,9 +844,16 @@ means that `company-mode' is always turned on except in 
`message-mode' buffers."
     (or (match-string-no-properties (or expression 0)) "")))
 
 (defun company-grab-line (regexp &optional expression)
-  (company-grab regexp expression (point-at-bol)))
+  "Return a match string for REGEXP if it matches text before point.
+If EXPRESSION is non-nil, return the match string for the respective
+parenthesized expression in REGEXP.
+Matching is limited to the current line."
+  (let ((inhibit-field-text-motion t))
+    (company-grab regexp expression (point-at-bol))))
 
 (defun company-grab-symbol ()
+  "If point is at the end of a symbol, return it.
+Otherwise, if point is not inside a symbol, return an empty string."
   (if (looking-at "\\_>")
       (buffer-substring (point) (save-excursion (skip-syntax-backward "w_")
                                                 (point)))
@@ -828,6 +861,8 @@ means that `company-mode' is always turned on except in 
`message-mode' buffers."
       "")))
 
 (defun company-grab-word ()
+  "If point is at the end of a word, return it.
+Otherwise, if point is not inside a symbol, return an empty string."
   (if (looking-at "\\>")
       (buffer-substring (point) (save-excursion (skip-syntax-backward "w")
                                                 (point)))
@@ -835,6 +870,9 @@ means that `company-mode' is always turned on except in 
`message-mode' buffers."
       "")))
 
 (defun company-grab-symbol-cons (idle-begin-after-re &optional max-len)
+  "Return a string SYMBOL or a cons (SYMBOL . t).
+SYMBOL is as returned by `company-grab-symbol'.  If the text before point
+matches IDLE-BEGIN-AFTER-RE, return it wrapped in a cons."
   (let ((symbol (company-grab-symbol)))
     (when symbol
       (save-excursion
@@ -846,6 +884,7 @@ means that `company-mode' is always turned on except in 
`message-mode' buffers."
           symbol)))))
 
 (defun company-in-string-or-comment ()
+  "Return non-nil if point is within a string or comment."
   (let ((ppss (syntax-ppss)))
     (or (car (setq ppss (nthcdr 3 ppss)))
         (car (setq ppss (cdr ppss)))
@@ -864,7 +903,7 @@ means that `company-mode' is always turned on except in 
`message-mode' buffers."
                  (lambda (result) (setq res result)))
         (while (eq res 'trash)
           (if (> (- (time-to-seconds) start) company-async-timeout)
-              (error "Company: Back-end %s async timeout with args %s"
+              (error "Company: backend %s async timeout with args %s"
                      backend args)
             (sleep-for company-async-wait)))
         res))))
@@ -874,23 +913,26 @@ means that `company-mode' is always turned on except in 
`message-mode' buffers."
       (if (functionp company-backend)
           (apply company-backend args)
         (apply #'company--multi-backend-adapter company-backend args))
-    (error (error "Company: Back-end %s error \"%s\" with args %s"
+    (error (error "Company: backend %s error \"%s\" with args %s"
                   company-backend (error-message-string err) args))))
 
 (defun company--multi-backend-adapter (backends command &rest args)
   (let ((backends (cl-loop for b in backends
                            when (not (and (symbolp b)
                                           (eq 'failed (get b 'company-init))))
-                           collect b)))
-    (setq backends
-          (if (eq command 'prefix)
-              (butlast backends (length (member :with backends)))
-            (delq :with backends)))
+                           collect b))
+        (separate (memq :separate backends)))
+
+    (when (eq command 'prefix)
+      (setq backends (butlast backends (length (member :with backends)))))
+
+    (setq backends (cl-delete-if #'keywordp backends))
+
     (pcase command
       (`candidates
-       (company--multi-backend-adapter-candidates backends (car args)))
-      (`sorted nil)
-      (`duplicates t)
+       (company--multi-backend-adapter-candidates backends (car args) 
separate))
+      (`sorted separate)
+      (`duplicates (not separate))
       ((or `prefix `ignore-case `no-cache `require-match)
        (let (value)
          (cl-dolist (backend backends)
@@ -904,26 +946,35 @@ means that `company-mode' is always turned on except in 
`message-mode' buffers."
                               (car backends))))
              (apply backend command args))))))))
 
-(defun company--multi-backend-adapter-candidates (backends prefix)
-  (let ((pairs (cl-loop for backend in (cdr backends)
+(defun company--multi-backend-adapter-candidates (backends prefix separate)
+  (let ((pairs (cl-loop for backend in backends
                         when (equal (company--prefix-str
                                      (funcall backend 'prefix))
                                     prefix)
                         collect (cons (funcall backend 'candidates prefix)
-                                      (let ((b backend))
-                                        (lambda (candidates)
-                                          (mapcar
-                                           (lambda (str)
-                                             (propertize str 'company-backend 
b))
-                                           candidates)))))))
-    (when (equal (company--prefix-str (funcall (car backends) 'prefix)) prefix)
-      ;; Small perf optimization: don't tag the candidates received
-      ;; from the first backend in the group.
-      (push (cons (funcall (car backends) 'candidates prefix)
-                  'identity)
-            pairs))
+                                      (company--multi-candidates-mapper
+                                       backend
+                                       separate
+                                       ;; Small perf optimization: don't tag 
the
+                                       ;; candidates received from the first
+                                       ;; backend in the group.
+                                       (not (eq backend (car backends))))))))
     (company--merge-async pairs (lambda (values) (apply #'append values)))))
 
+(defun company--multi-candidates-mapper (backend separate tag)
+  (lambda (candidates)
+    (when separate
+      (let ((company-backend backend))
+        (setq candidates
+              (company--preprocess-candidates candidates))))
+    (when tag
+      (setq candidates
+            (mapcar
+             (lambda (str)
+               (propertize str 'company-backend backend))
+             candidates)))
+    candidates))
+
 (defun company--merge-async (pairs merger)
   (let ((async (cl-loop for pair in pairs
                         thereis
@@ -990,22 +1041,24 @@ Controlled by `company-auto-complete'.")
 (defvar-local company-point nil)
 
 (defvar company-timer nil)
+(defvar company-tooltip-timer nil)
 
 (defsubst company-strip-prefix (str)
   (substring str (length company-prefix)))
 
 (defun company--insert-candidate (candidate)
-  (setq candidate (substring-no-properties candidate))
-  ;; XXX: Return value we check here is subject to change.
-  (if (eq (company-call-backend 'ignore-case) 'keep-prefix)
-      (insert (company-strip-prefix candidate))
-    (unless (equal company-prefix candidate)
-      (delete-region (- (point) (length company-prefix)) (point))
-      (insert candidate))))
+  (when (> (length candidate) 0)
+    (setq candidate (substring-no-properties candidate))
+    ;; XXX: Return value we check here is subject to change.
+    (if (eq (company-call-backend 'ignore-case) 'keep-prefix)
+        (insert (company-strip-prefix candidate))
+      (unless (equal company-prefix candidate)
+        (delete-region (- (point) (length company-prefix)) (point))
+        (insert candidate)))))
 
 (defmacro company-with-candidate-inserted (candidate &rest body)
   "Evaluate BODY with CANDIDATE temporarily inserted.
-This is a tool for back-ends that need candidates inserted before they
+This is a tool for backends that need candidates inserted before they
 can retrieve meta-data for them."
   (declare (indent 1))
   `(let ((inhibit-modification-hooks t)
@@ -1053,7 +1106,7 @@ can retrieve meta-data for them."
   (dolist (frontend company-frontends)
     (condition-case-unless-debug err
         (funcall frontend command)
-      (error (error "Company: Front-end %s error \"%s\" on command %s"
+      (error (error "Company: frontend %s error \"%s\" on command %s"
                     frontend (error-message-string err) command)))))
 
 (defun company-set-selection (selection &optional force-update)
@@ -1068,7 +1121,8 @@ can retrieve meta-data for them."
 
 (defun company--group-lighter (candidate base)
   (let ((backend (or (get-text-property 0 'company-backend candidate)
-                     (car company-backend))))
+                     (cl-some (lambda (x) (and (not (keywordp x)) x))
+                              company-backend))))
     (when (and backend (symbolp backend))
       (let ((name (replace-regexp-in-string "company-\\|-company" ""
                                             (symbol-name backend))))
@@ -1138,10 +1192,11 @@ can retrieve meta-data for them."
         t))))
 
 (defun company--fetch-candidates (prefix)
-  (let ((c (if company--manual-action
-               (company-call-backend 'candidates prefix)
-             (company-call-backend-raw 'candidates prefix)))
-        res)
+  (let* ((non-essential (not (company-explicit-action-p)))
+         (c (if company--manual-action
+                (company-call-backend 'candidates prefix)
+              (company-call-backend-raw 'candidates prefix)))
+         res)
     (if (not (eq (car c) :async))
         c
       (let ((buf (current-buffer))
@@ -1160,7 +1215,11 @@ can retrieve meta-data for them."
                    company-candidates-cache
                    (list (cons prefix
                                (company--preprocess-candidates candidates))))
-             (company-idle-begin buf win tick pt)))))
+             (unwind-protect
+                 (company-idle-begin buf win tick pt)
+               (unless company-candidates
+                 (setq company-backend nil
+                       company-candidates-cache nil)))))))
       ;; FIXME: Relying on the fact that the callers
       ;; will interpret nil as "do nothing" is shaky.
       ;; A throw-catch would be one possible improvement.
@@ -1168,6 +1227,7 @@ can retrieve meta-data for them."
           (progn (setq res 'done) nil)))))
 
 (defun company--preprocess-candidates (candidates)
+  (cl-assert (cl-every #'stringp candidates))
   (unless (company-call-backend 'sorted)
     (setq candidates (sort candidates 'string<)))
   (when (company-call-backend 'duplicates)
@@ -1281,8 +1341,8 @@ Keywords and function definition names are ignored."
 (defun company-sort-by-backend-importance (candidates)
   "Sort CANDIDATES as two priority groups.
 If `company-backend' is a function, do nothing.  If it's a list, move
-candidates from back-ends before keyword `:with' to the front.  Candidates
-from the rest of the back-ends in the group, if any, will be left at the end."
+candidates from backends before keyword `:with' to the front.  Candidates
+from the rest of the backends in the group, if any, will be left at the end."
   (if (functionp company-backend)
       candidates
     (let ((low-priority (cdr (memq :with company-backend))))
@@ -1296,6 +1356,16 @@ from the rest of the back-ends in the group, if any, 
will be left at the end."
                  (let ((b1 (get-text-property 0 'company-backend c1)))
                    (or (not b1) (not (memq b1 low-priority)))))))))))
 
+(defun company-sort-prefer-same-case-prefix (candidates)
+  "Prefer CANDIDATES with the exact same prefix.
+If a backend returns case insensitive matches, candidates with the an exact
+prefix match (same case) will be prioritized."
+  (cl-loop for candidate in candidates
+           if (string-prefix-p company-prefix candidate)
+           collect candidate into same-case
+           else collect candidate into other-case
+           finally return (append same-case other-case)))
+
 (defun company-idle-begin (buf win tick pos)
   (and (eq buf (current-buffer))
        (eq win (selected-window))
@@ -1320,6 +1390,7 @@ from the rest of the back-ends in the group, if any, will 
be left at the end."
                   (company-cancel))
            (quit (company-cancel))))))
 
+;;;###autoload
 (defun company-manual-begin ()
   (interactive)
   (company-assert-enabled)
@@ -1346,7 +1417,7 @@ from the rest of the back-ends in the group, if any, will 
be left at the end."
       (when (ignore-errors (company-begin-backend backend))
         (cl-return t))))
   (unless company-candidates
-    (error "No other back-end")))
+    (error "No other backend")))
 
 (defun company-require-match-p ()
   (let ((backend-value (company-call-backend 'require-match)))
@@ -1461,10 +1532,14 @@ from the rest of the back-ends in the group, if any, 
will be left at the end."
           (setq company-prefix (company--prefix-str prefix)
                 company-backend backend
                 c (company-calculate-candidates company-prefix))
-          ;; t means complete/unique.  We don't start, so no hooks.
           (if (not (consp c))
-              (when company--manual-action
-                (message "No completion found"))
+              (progn
+                (when company--manual-action
+                  (message "No completion found"))
+                (when (eq c t)
+                  ;; t means complete/unique.
+                  ;; Run the hooks anyway, to e.g. clear the cache.
+                  (company-cancel 'unique)))
             (when company--manual-action
               (setq company--manual-prefix prefix))
             (company-update-candidates c)
@@ -1485,14 +1560,8 @@ from the rest of the back-ends in the group, if any, 
will be left at the end."
     (company-call-frontends 'update)))
 
 (defun company-cancel (&optional result)
-  (unwind-protect
-      (when company-prefix
-        (if (stringp result)
-            (progn
-              (company-call-backend 'pre-completion result)
-              (run-hook-with-args 'company-completion-finished-hook result)
-              (company-call-backend 'post-completion result))
-          (run-hook-with-args 'company-completion-cancelled-hook result)))
+  (let ((prefix company-prefix)
+        (backend company-backend))
     (setq company-backend nil
           company-prefix nil
           company-candidates nil
@@ -1508,9 +1577,19 @@ from the rest of the back-ends in the group, if any, 
will be left at the end."
           company-point nil)
     (when company-timer
       (cancel-timer company-timer))
+    (company-echo-cancel t)
     (company-search-mode 0)
     (company-call-frontends 'hide)
-    (company-enable-overriding-keymap nil))
+    (company-enable-overriding-keymap nil)
+    (when prefix
+      ;; FIXME: RESULT can also be e.g. `unique'.  We should call
+      ;; `company-completion-finished-hook' in that case, with right argument.
+      (if (stringp result)
+          (let ((company-backend backend))
+            (company-call-backend 'pre-completion result)
+            (run-hook-with-args 'company-completion-finished-hook result)
+            (company-call-backend 'post-completion result))
+        (run-hook-with-args 'company-completion-cancelled-hook result))))
   ;; Make return value explicit.
   nil)
 
@@ -1526,6 +1605,7 @@ from the rest of the back-ends in the group, if any, will 
be left at the end."
   (and (symbolp command) (get command 'company-keep)))
 
 (defun company-pre-command ()
+  (company--electric-restore-window-configuration)
   (unless (company-keep this-command)
     (condition-case-unless-debug err
         (when company-candidates
@@ -1538,10 +1618,12 @@ from the rest of the back-ends in the group, if any, 
will be left at the end."
   (when company-timer
     (cancel-timer company-timer)
     (setq company-timer nil))
+  (company-echo-cancel t)
   (company-uninstall-map))
 
 (defun company-post-command ()
-  (when (null this-command)
+  (when (and company-candidates
+             (null this-command))
     ;; Happens when the user presses `C-g' while inside
     ;; `flyspell-post-command-hook', for example.
     ;; Or any other `post-command-hook' function that can call `sit-for',
@@ -1557,6 +1639,7 @@ from the rest of the back-ends in the group, if any, will 
be left at the end."
           (if company-candidates
               (company-call-frontends 'post-command)
             (and (numberp company-idle-delay)
+                 (not defining-kbd-macro)
                  (company--should-begin)
                  (setq company-timer
                        (run-with-timer company-idle-delay nil
@@ -1586,6 +1669,19 @@ from the rest of the back-ends in the group, if any, 
will be left at the end."
 
 ;;; search 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+(defcustom company-search-regexp-function #'regexp-quote
+  "Function to construct the search regexp from input.
+It's called with one argument, the current search input.  It must return
+either a regexp without groups, or one where groups don't intersect and
+each one wraps a part of the input string."
+  :type '(choice
+          (const :tag "Exact match" regexp-quote)
+          (const :tag "Words separated with spaces" 
company-search-words-regexp)
+          (const :tag "Words separated with spaces, in any order"
+                 company-search-words-in-any-order-regexp)
+          (const :tag "All characters in given order, with anything in between"
+                 company-search-flex-regexp)))
+
 (defvar-local company-search-string "")
 
 (defvar company-search-lighter '(" "
@@ -1601,11 +1697,42 @@ from the rest of the back-ends in the group, if any, 
will be left at the end."
 
 (defvar-local company--search-old-changed nil)
 
+(defun company-search-words-regexp (input)
+  (mapconcat (lambda (word) (format "\\(%s\\)" (regexp-quote word)))
+             (split-string input " +" t) ".*"))
+
+(defun company-search-words-in-any-order-regexp (input)
+  (let* ((words (mapcar (lambda (word) (format "\\(%s\\)" (regexp-quote word)))
+                        (split-string input " +" t)))
+         (permutations (company--permutations words)))
+    (mapconcat (lambda (words)
+                 (mapconcat #'identity words ".*"))
+               permutations
+               "\\|")))
+
+(defun company-search-flex-regexp (input)
+  (if (zerop (length input))
+      ""
+    (concat (regexp-quote (string (aref input 0)))
+            (mapconcat (lambda (c)
+                         (concat "[^" (string c) "]*"
+                                 (regexp-quote (string c))))
+                       (substring input 1) ""))))
+
+(defun company--permutations (lst)
+  (if (not lst)
+      '(nil)
+    (cl-mapcan
+     (lambda (e)
+       (mapcar (lambda (perm) (cons e perm))
+               (company--permutations (cl-remove e lst :count 1))))
+     lst)))
+
 (defun company--search (text lines)
-  (let ((quoted (regexp-quote text))
+  (let ((re (funcall company-search-regexp-function text))
         (i 0))
     (cl-dolist (line lines)
-      (when (string-match quoted line (length company-prefix))
+      (when (string-match-p re line (length company-prefix))
         (cl-return i))
       (cl-incf i))))
 
@@ -1623,11 +1750,12 @@ from the rest of the back-ends in the group, if any, 
will be left at the end."
       (company--search-update-predicate ss))
     (company--search-update-string ss)))
 
-(defun company--search-update-predicate (&optional ss)
-  (let* ((company-candidates-predicate
-          (and (not (string= ss ""))
+(defun company--search-update-predicate (ss)
+  (let* ((re (funcall company-search-regexp-function ss))
+         (company-candidates-predicate
+          (and (not (string= re ""))
                company-search-filtering
-               (lambda (candidate) (string-match ss candidate))))
+               (lambda (candidate) (string-match re candidate))))
          (cc (company-calculate-candidates company-prefix)))
     (unless cc (error "No match"))
     (company-update-candidates cc)))
@@ -1782,6 +1910,9 @@ Don't start this directly, use 
`company-search-candidates' or
 
 Regular characters are appended to the search string.
 
+Customize `company-search-regexp-function' to change how the input
+is interpreted when searching.
+
 The command `company-search-toggle-filtering' 
(\\[company-search-toggle-filtering])
 uses the search string to filter the completion candidates."
   (interactive)
@@ -1805,33 +1936,40 @@ followed by `company-search-toggle-filtering'."
 
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defun company-select-next ()
-  "Select the next candidate in the list."
-  (interactive)
-  (when (company-manual-begin)
-    (company-set-selection (1+ company-selection))))
+(defun company-select-next (&optional arg)
+  "Select the next candidate in the list.
 
-(defun company-select-previous ()
-  "Select the previous candidate in the list."
-  (interactive)
+With ARG, move by that many elements."
+  (interactive "p")
   (when (company-manual-begin)
-    (company-set-selection (1- company-selection))))
+    (company-set-selection (+ (or arg 1) company-selection))))
+
+(defun company-select-previous (&optional arg)
+  "Select the previous candidate in the list.
+
+With ARG, move by that many elements."
+  (interactive "p")
+  (company-select-next (if arg (- arg) -1)))
 
-(defun company-select-next-or-abort ()
+(defun company-select-next-or-abort (&optional arg)
   "Select the next candidate if more than one, else abort
-and invoke the normal binding."
-  (interactive)
+and invoke the normal binding.
+
+With ARG, move by that many elements."
+  (interactive "p")
   (if (> company-candidates-length 1)
-      (company-select-next)
+      (company-select-next arg)
     (company-abort)
     (company--unread-last-input)))
 
-(defun company-select-previous-or-abort ()
+(defun company-select-previous-or-abort (&optional arg)
   "Select the previous candidate if more than one, else abort
-and invoke the normal binding."
-  (interactive)
+and invoke the normal binding.
+
+With ARG, move by that many elements."
+  (interactive "p")
   (if (> company-candidates-length 1)
-      (company-select-previous)
+      (company-select-previous arg)
     (company-abort)
     (company--unread-last-input)))
 
@@ -1916,19 +2054,45 @@ and invoke the normal binding."
     (if (and (not (cdr company-candidates))
              (equal company-common (car company-candidates)))
         (company-complete-selection)
-      (when company-common
-        (company--insert-candidate company-common)))))
+      (company--insert-candidate company-common))))
 
-(defun company-complete-common-or-cycle ()
-  "Insert the common part of all candidates, or select the next one."
-  (interactive)
+(defun company-complete-common-or-cycle (&optional arg)
+  "Insert the common part of all candidates, or select the next one.
+
+With ARG, move by that many elements."
+  (interactive "p")
   (when (company-manual-begin)
     (let ((tick (buffer-chars-modified-tick)))
       (call-interactively 'company-complete-common)
       (when (eq tick (buffer-chars-modified-tick))
-        (let ((company-selection-wrap-around t))
+        (let ((company-selection-wrap-around t)
+              (current-prefix-arg arg))
           (call-interactively 'company-select-next))))))
 
+(defun company-indent-or-complete-common ()
+  "Indent the current line or region, or complete the common part."
+  (interactive)
+  (cond
+   ((use-region-p)
+    (indent-region (region-beginning) (region-end)))
+   ((let ((old-point (point))
+          (old-tick (buffer-chars-modified-tick))
+          (tab-always-indent t))
+      (call-interactively #'indent-for-tab-command)
+      (when (and (eq old-point (point))
+                 (eq old-tick (buffer-chars-modified-tick)))
+        (company-complete-common))))))
+
+(defun company-select-next-if-tooltip-visible-or-complete-selection ()
+  "Insert selection if appropriate, or select the next candidate.
+Insert selection if only preview is showing or only one candidate,
+otherwise select the next candidate."
+  (interactive)
+  (if (and (company-tooltip-visible-p) (> company-candidates-length 1))
+      (call-interactively 'company-select-next)
+    (call-interactively 'company-complete-selection)))
+
+;;;###autoload
 (defun company-complete ()
   "Insert the common part of all candidates or the current selection.
 The first time this is called, the common part is inserted, the second
@@ -1944,7 +2108,7 @@ inserted."
 
 (defun company-complete-number (n)
   "Insert the Nth candidate visible in the tooltip.
-To show the number next to the candidates in some back-ends, enable
+To show the number next to the candidates in some backends, enable
 `company-show-numbers'.  When called interactively, uses the last typed
 character, stripping the modifiers.  That character must be a digit."
   (interactive
@@ -2014,25 +2178,30 @@ character, stripping the modifiers.  That character 
must be a digit."
         (insert string)))
     (current-buffer)))
 
+(defvar company--electric-saved-window-configuration nil)
+
 (defvar company--electric-commands
-  '(scroll-other-window scroll-other-window-down)
+  '(scroll-other-window scroll-other-window-down mwheel-scroll)
   "List of Commands that won't break out of electric commands.")
 
+(defun company--electric-restore-window-configuration ()
+  "Restore window configuration (after electric commands)."
+  (when (and company--electric-saved-window-configuration
+             (not (memq this-command company--electric-commands)))
+    (set-window-configuration company--electric-saved-window-configuration)
+    (setq company--electric-saved-window-configuration nil)))
+
 (defmacro company--electric-do (&rest body)
   (declare (indent 0) (debug t))
   `(when (company-manual-begin)
-     (save-window-excursion
-       (let ((height (window-height))
-             (row (company--row))
-             cmd)
-         ,@body
-         (and (< (window-height) height)
-              (< (- (window-height) row 2) company-tooltip-limit)
-              (recenter (- (window-height) row 2)))
-         (while (memq (setq cmd (key-binding (vector (list (read-event)))))
-                      company--electric-commands)
-           (call-interactively cmd))
-         (company--unread-last-input)))))
+     (cl-assert (null company--electric-saved-window-configuration))
+     (setq company--electric-saved-window-configuration 
(current-window-configuration))
+     (let ((height (window-height))
+           (row (company--row)))
+       ,@body
+       (and (< (window-height) height)
+            (< (- (window-height) row 2) company-tooltip-limit)
+            (recenter (- (window-height) row 2))))))
 
 (defun company--unread-last-input ()
   (when last-input-event
@@ -2042,32 +2211,39 @@ character, stripping the modifiers.  That character 
must be a digit."
 (defun company-show-doc-buffer ()
   "Temporarily show the documentation buffer for the selection."
   (interactive)
-  (company--electric-do
-    (let* ((selected (nth company-selection company-candidates))
-           (doc-buffer (or (company-call-backend 'doc-buffer selected)
-                           (error "No documentation available"))))
-      (with-current-buffer doc-buffer
-        (goto-char (point-min)))
-      (display-buffer doc-buffer t))))
+  (let (other-window-scroll-buffer)
+    (company--electric-do
+      (let* ((selected (nth company-selection company-candidates))
+             (doc-buffer (or (company-call-backend 'doc-buffer selected)
+                             (error "No documentation available")))
+             start)
+        (when (consp doc-buffer)
+          (setq start (cdr doc-buffer)
+                doc-buffer (car doc-buffer)))
+        (setq other-window-scroll-buffer (get-buffer doc-buffer))
+        (let ((win (display-buffer doc-buffer t)))
+          (set-window-start win (if start start (point-min))))))))
 (put 'company-show-doc-buffer 'company-keep t)
 
 (defun company-show-location ()
   "Temporarily display a buffer showing the selected candidate in context."
   (interactive)
-  (company--electric-do
-    (let* ((selected (nth company-selection company-candidates))
-           (location (company-call-backend 'location selected))
-           (pos (or (cdr location) (error "No location available")))
-           (buffer (or (and (bufferp (car location)) (car location))
-                       (find-file-noselect (car location) t))))
-      (with-selected-window (display-buffer buffer t)
-        (save-restriction
-          (widen)
-          (if (bufferp (car location))
-              (goto-char pos)
-            (goto-char (point-min))
-            (forward-line (1- pos))))
-        (set-window-start nil (point))))))
+  (let (other-window-scroll-buffer)
+    (company--electric-do
+      (let* ((selected (nth company-selection company-candidates))
+             (location (company-call-backend 'location selected))
+             (pos (or (cdr location) (error "No location available")))
+             (buffer (or (and (bufferp (car location)) (car location))
+                         (find-file-noselect (car location) t))))
+        (setq other-window-scroll-buffer (get-buffer buffer))
+        (with-selected-window (display-buffer buffer t)
+          (save-restriction
+            (widen)
+            (if (bufferp (car location))
+                (goto-char pos)
+              (goto-char (point-min))
+              (forward-line (1- pos))))
+          (set-window-start nil (point)))))))
 (put 'company-show-location 'company-keep t)
 
 ;;; package functions 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -2081,7 +2257,7 @@ character, stripping the modifiers.  That character must 
be a digit."
 
 (defun company-begin-backend (backend &optional callback)
   "Start a completion at point using BACKEND."
-  (interactive (let ((val (completing-read "Company back-end: "
+  (interactive (let ((val (completing-read "Company backend: "
                                            obarray
                                            'functionp nil "company-")))
                  (when val
@@ -2105,7 +2281,7 @@ It defaults to 0.
 CALLBACK is a function called with the selected result if the user
 successfully completes the input.
 
-Example: \(company-begin-with '\(\"foo\" \"foobar\" \"foobarbaz\"\)\)"
+Example: \(company-begin-with \\='\(\"foo\" \"foobar\" \"foobarbaz\"\)\)"
   (let ((begin-marker (copy-marker (point) t)))
     (company-begin-backend
      (lambda (command &optional arg &rest ignored)
@@ -2119,18 +2295,62 @@ Example: \(company-begin-with '\(\"foo\" \"foobar\" 
\"foobarbaz\"\)\)"
           require-match)))
      callback)))
 
+(declare-function find-library-name "find-func")
+(declare-function lm-version "lisp-mnt")
+
 (defun company-version (&optional show-version)
   "Get the Company version as string.
 
 If SHOW-VERSION is non-nil, show the version in the echo area."
   (interactive (list t))
   (with-temp-buffer
+    (require 'find-func)
     (insert-file-contents (find-library-name "company"))
     (require 'lisp-mnt)
     (if show-version
         (message "Company version: %s" (lm-version))
       (lm-version))))
 
+(defun company-diag ()
+  "Pop a buffer with information about completions at point."
+  (interactive)
+  (let* ((bb company-backends)
+         backend
+         (prefix (cl-loop for b in bb
+                          thereis (let ((company-backend b))
+                                    (setq backend b)
+                                    (company-call-backend 'prefix))))
+         cc annotations)
+    (when (stringp prefix)
+      (let ((company-backend backend))
+        (setq cc (company-call-backend 'candidates prefix)
+              annotations
+              (mapcar
+               (lambda (c) (cons c (company-call-backend 'annotation c)))
+               cc))))
+    (pop-to-buffer (get-buffer-create "*company-diag*"))
+    (setq buffer-read-only nil)
+    (erase-buffer)
+    (insert (format "Emacs %s (%s) of %s on %s"
+                    emacs-version system-configuration
+                    (format-time-string "%Y-%m-%d" emacs-build-time)
+                    emacs-build-system))
+    (insert "\nCompany " (company-version) "\n\n")
+    (insert "company-backends: " (pp-to-string bb))
+    (insert "\n")
+    (insert "Used backend: " (pp-to-string backend))
+    (insert "\n")
+    (insert "Prefix: " (pp-to-string prefix))
+    (insert "\n")
+    (insert (message  "Completions:"))
+    (unless cc (insert " none"))
+    (save-excursion
+      (dolist (c annotations)
+        (insert "\n  " (prin1-to-string (car c)))
+        (when (cdr c)
+          (insert " " (prin1-to-string (cdr c))))))
+    (special-mode)))
+
 ;;; pseudo-tooltip 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (defvar-local company-pseudo-tooltip-overlay nil)
@@ -2188,6 +2408,8 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
                      (if company-common
                          (string-width company-common)
                        0)))
+         (_ (setq value (company--pre-render value)
+                  annotation (and annotation (company--pre-render annotation 
t))))
          (ann-ralign company-tooltip-align-annotations)
          (ann-truncate (< width
                           (+ (length value) (length annotation)
@@ -2214,38 +2436,62 @@ If SHOW-VERSION is non-nil, show the version in the 
echo area."
     (setq common (+ (min common width) margin))
     (setq width (+ width margin (length right)))
 
-    (add-text-properties 0 width '(face company-tooltip
-                                   mouse-face company-tooltip-mouse)
-                         line)
-    (add-text-properties margin common
-                         '(face company-tooltip-common
-                           mouse-face company-tooltip-mouse)
-                         line)
+    (font-lock-append-text-property 0 width 'mouse-face
+                                    'company-tooltip-mouse
+                                    line)
     (when (< ann-start ann-end)
-      (add-text-properties ann-start ann-end
-                           '(face company-tooltip-annotation
-                             mouse-face company-tooltip-mouse)
-                           line))
+      (font-lock-append-text-property ann-start ann-end 'face
+                                      (if selected
+                                          'company-tooltip-annotation-selection
+                                        'company-tooltip-annotation)
+                                      line))
+    (font-lock-prepend-text-property margin common 'face
+                                     (if selected
+                                         'company-tooltip-common-selection
+                                       'company-tooltip-common)
+                                     line)
     (when selected
-      (if (and (not (string= company-search-string ""))
-               (string-match (regexp-quote company-search-string) value
-                             (length company-prefix)))
-          (let ((beg (+ margin (match-beginning 0)))
-                (end (+ margin (match-end 0)))
-                (width (- width (length right))))
-            (when (< beg width)
-              (add-text-properties beg (min end width)
-                                   '(face company-tooltip-search)
-                                   line)))
-        (add-text-properties 0 width '(face company-tooltip-selection
-                                       mouse-face company-tooltip-selection)
-                             line)
-        (add-text-properties margin common
-                             '(face company-tooltip-common-selection
-                               mouse-face company-tooltip-selection)
-                             line)))
+      (if (let ((re (funcall company-search-regexp-function
+                             company-search-string)))
+            (and (not (string= re ""))
+                 (string-match re value (length company-prefix))))
+          (pcase-dolist (`(,mbeg . ,mend) (company--search-chunks))
+            (let ((beg (+ margin mbeg))
+                  (end (+ margin mend))
+                  (width (- width (length right))))
+              (when (< beg width)
+                (font-lock-prepend-text-property beg (min end width)
+                                                 'face 'company-tooltip-search
+                                                 line))))
+        (font-lock-append-text-property 0 width 'face
+                                        'company-tooltip-selection
+                                        line)))
+    (font-lock-append-text-property 0 width 'face
+                                    'company-tooltip
+                                    line)
     line))
 
+(defun company--search-chunks ()
+  (let ((md (match-data t))
+        res)
+    (if (<= (length md) 2)
+        (push (cons (nth 0 md) (nth 1 md)) res)
+      (while (setq md (nthcdr 2 md))
+        (when (car md)
+          (push (cons (car md) (cadr md)) res))))
+    res))
+
+(defun company--pre-render (str &optional annotation-p)
+  (or (company-call-backend 'pre-render str annotation-p)
+      (progn
+        (when (or (text-property-not-all 0 (length str) 'face nil str)
+                  (text-property-not-all 0 (length str) 'mouse-face nil str))
+          (setq str (copy-sequence str))
+          (remove-text-properties 0 (length str)
+                                  '(face nil font-lock-face nil mouse-face nil)
+                                  str))
+        str)))
+
 (defun company--clean-string (str)
   (replace-regexp-in-string
    "\\([^[:graph:] ]\\)\\|\\(\ufeff\\)\\|[[:multibyte:]]"
@@ -2273,7 +2519,7 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
     (while (and (not (eobp)) ; http://debbugs.gnu.org/19553
                 (> (setq lines-moved (vertical-motion 1)) 0)
                 (<= (point) end))
-      (let ((bound (min end (1- (point)))))
+      (let ((bound (min end (point))))
         ;; A visual line can contain several physical lines (e.g. with 
outline's
         ;; folding overlay).  Take only the first one.
         (push (buffer-substring beg
@@ -2321,8 +2567,12 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
                     (or (cdr margins) 0)))))
     (when (and word-wrap
                (version< emacs-version "24.4.51.5"))
-      ;; http://debbugs.gnu.org/18384
+      ;; http://debbugs.gnu.org/19300
       (cl-decf ww))
+    ;; whitespace-mode with newline-mark
+    (when (and buffer-display-table
+               (aref buffer-display-table ?\n))
+      (cl-decf ww (1- (length (aref buffer-display-table ?\n)))))
     ww))
 
 (defun company--replacement-string (lines old column nl &optional align-top)
@@ -2357,8 +2607,7 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
                     (company--offset-line (pop lines) offset))
             new))
 
-    (let ((str (concat (when nl " ")
-                       "\n"
+    (let ((str (concat (when nl " \n")
                        (mapconcat 'identity (nreverse new) "\n")
                        "\n")))
       (font-lock-append-text-property 0 (length str) 'face 'default str)
@@ -2510,7 +2759,7 @@ Returns a negative number if the tooltip should be 
displayed above point."
              (end (save-excursion
                     (move-to-window-line (+ row (abs height)))
                     (point)))
-             (ov (make-overlay (if nl beg (1- beg)) end nil t))
+             (ov (make-overlay beg end nil t))
              (args (list (mapcar 'company-plainify
                                  (company-buffer-lines beg end))
                          column nl above)))
@@ -2551,7 +2800,9 @@ Returns a negative number if the tooltip should be 
displayed above point."
 (defun company-pseudo-tooltip-hide-temporarily ()
   (when (overlayp company-pseudo-tooltip-overlay)
     (overlay-put company-pseudo-tooltip-overlay 'invisible nil)
-    (overlay-put company-pseudo-tooltip-overlay 'after-string nil)))
+    (overlay-put company-pseudo-tooltip-overlay 'line-prefix nil)
+    (overlay-put company-pseudo-tooltip-overlay 'after-string nil)
+    (overlay-put company-pseudo-tooltip-overlay 'display nil)))
 
 (defun company-pseudo-tooltip-unhide ()
   (when company-pseudo-tooltip-overlay
@@ -2559,12 +2810,15 @@ Returns a negative number if the tooltip should be 
displayed above point."
            (disp (overlay-get ov 'company-display)))
       ;; Beat outline's folding overlays, at least.
       (overlay-put ov 'priority 1)
-      ;; `display' could be better (http://debbugs.gnu.org/18285), but it
-      ;; doesn't work when the overlay is empty, which is what happens at eob.
-      ;; It also seems to interact badly with `cursor'.
-      ;; We deal with priorities by having the overlay start before the 
newline.
-      (overlay-put ov 'after-string disp)
-      (overlay-put ov 'invisible t)
+      ;; No (extra) prefix for the first line.
+      (overlay-put ov 'line-prefix "")
+      ;; `display' is better
+      ;; (http://debbugs.gnu.org/18285, http://debbugs.gnu.org/20847),
+      ;; but it doesn't work on 0-length overlays.
+      (if (< (overlay-start ov) (overlay-end ov))
+          (overlay-put ov 'display disp)
+        (overlay-put ov 'after-string disp)
+        (overlay-put ov 'invisible t))
       (overlay-put ov 'window (selected-window)))))
 
 (defun company-pseudo-tooltip-guard ()
@@ -2579,7 +2833,7 @@ Returns a negative number if the tooltip should be 
displayed above point."
         (when (>= overhang 0) overhang))))))
 
 (defun company-pseudo-tooltip-frontend (command)
-  "`company-mode' front-end similar to a tooltip but based on overlays."
+  "`company-mode' frontend similar to a tooltip but based on overlays."
   (cl-case command
     (pre-command (company-pseudo-tooltip-hide-temporarily))
     (post-command
@@ -2608,6 +2862,30 @@ Returns a negative number if the tooltip should be 
displayed above point."
                (company--show-inline-p))
     (company-pseudo-tooltip-frontend command)))
 
+(defun company-pseudo-tooltip-unless-just-one-frontend-with-delay (command)
+  "`compandy-pseudo-tooltip-frontend', but shown after a delay.
+Delay is determined by `company-tooltip-idle-delay'."
+  (cl-case command
+    (pre-command
+     (company-pseudo-tooltip-unless-just-one-frontend command)
+     (when company-tooltip-timer
+       (cancel-timer company-tooltip-timer)
+       (setq company-tooltip-timer nil)))
+    (post-command
+     (if (or company-tooltip-timer
+             (overlayp company-pseudo-tooltip-overlay))
+         (if (not (memq 'company-preview-frontend company-frontends))
+             (company-pseudo-tooltip-unless-just-one-frontend command)
+           (company-preview-frontend 'pre-command)
+           (company-pseudo-tooltip-unless-just-one-frontend command)
+           (company-preview-frontend 'post-command))
+       (setq company-tooltip-timer
+             (run-with-timer company-tooltip-idle-delay nil
+                             
'company-pseudo-tooltip-unless-just-one-frontend-with-delay
+                             'post-command))))
+    (t
+     (company-pseudo-tooltip-unless-just-one-frontend command))))
+
 ;;; overlay 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (defvar-local company-preview-overlay nil)
@@ -2616,17 +2894,22 @@ Returns a negative number if the tooltip should be 
displayed above point."
   (company-preview-hide)
 
   (let ((completion (nth company-selection company-candidates)))
-    (setq completion (propertize completion 'face 'company-preview))
-    (add-text-properties 0 (length company-common)
-                         '(face company-preview-common) completion)
+    (setq completion (copy-sequence (company--pre-render completion)))
+    (font-lock-append-text-property 0 (length completion)
+                                    'face 'company-preview
+                                    completion)
+    (font-lock-prepend-text-property 0 (length company-common)
+                                     'face 'company-preview-common
+                                     completion)
 
     ;; Add search string
-    (and company-search-string
-         (string-match (regexp-quote company-search-string) completion)
-         (add-text-properties (match-beginning 0)
-                              (match-end 0)
-                              '(face company-preview-search)
-                              completion))
+    (and (string-match (funcall company-search-regexp-function
+                                company-search-string)
+                       completion)
+         (pcase-dolist (`(,mbeg . ,mend) (company--search-chunks))
+           (font-lock-prepend-text-property mbeg mend
+                                            'face 'company-preview-search
+                                            completion)))
 
     (setq completion (company-strip-prefix completion))
 
@@ -2659,7 +2942,7 @@ Returns a negative number if the tooltip should be 
displayed above point."
     (setq company-preview-overlay nil)))
 
 (defun company-preview-frontend (command)
-  "`company-mode' front-end showing the selection as if it had been inserted."
+  "`company-mode' frontend showing the selection as if it had been inserted."
   (pcase command
     (`pre-command (company-preview-hide))
     (`post-command (company-preview-show-at-point (point)))
@@ -2677,6 +2960,11 @@ Returns a negative number if the tooltip should be 
displayed above point."
        (or (eq (company-call-backend 'ignore-case) 'keep-prefix)
            (string-prefix-p company-prefix company-common))))
 
+(defun company-tooltip-visible-p ()
+  "Returns whether the tooltip is visible."
+  (when (overlayp company-pseudo-tooltip-overlay)
+    (not (overlay-get company-pseudo-tooltip-overlay 'invisible))))
+
 ;;; echo 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (defvar-local company-echo-last-msg nil)
@@ -2694,13 +2982,19 @@ Returns a negative number if the tooltip should be 
displayed above point."
       (message ""))))
 
 (defun company-echo-show-soon (&optional getter)
+  (company-echo-cancel)
+  (setq company-echo-timer (run-with-timer 0 nil 'company-echo-show getter)))
+
+(defun company-echo-cancel (&optional unset)
   (when company-echo-timer
     (cancel-timer company-echo-timer))
-  (setq company-echo-timer (run-with-timer 0 nil 'company-echo-show getter)))
+  (when unset
+    (setq company-echo-timer nil)))
 
-(defsubst company-echo-show-when-idle (&optional getter)
-  (when (sit-for company-echo-delay)
-    (company-echo-show getter)))
+(defun company-echo-show-when-idle (&optional getter)
+  (company-echo-cancel)
+  (setq company-echo-timer
+        (run-with-idle-timer company-echo-delay nil 'company-echo-show 
getter)))
 
 (defun company-echo-format ()
 
@@ -2763,19 +3057,19 @@ Returns a negative number if the tooltip should be 
displayed above point."
     (company-echo-show)))
 
 (defun company-echo-frontend (command)
-  "`company-mode' front-end showing the candidates in the echo area."
+  "`company-mode' frontend showing the candidates in the echo area."
   (pcase command
     (`post-command (company-echo-show-soon 'company-echo-format))
     (`hide (company-echo-hide))))
 
 (defun company-echo-strip-common-frontend (command)
-  "`company-mode' front-end showing the candidates in the echo area."
+  "`company-mode' frontend showing the candidates in the echo area."
   (pcase command
     (`post-command (company-echo-show-soon 'company-echo-strip-common-format))
     (`hide (company-echo-hide))))
 
 (defun company-echo-metadata-frontend (command)
-  "`company-mode' front-end showing the documentation in the echo area."
+  "`company-mode' frontend showing the documentation in the echo area."
   (pcase command
     (`post-command (company-echo-show-when-idle 'company-fetch-metadata))
     (`hide (company-echo-hide))))
diff --git a/packages/company/test/async-tests.el 
b/packages/company/test/async-tests.el
index c548898..48ebdfb 100644
--- a/packages/company/test/async-tests.el
+++ b/packages/company/test/async-tests.el
@@ -83,7 +83,9 @@
       (should (null company-candidates))
       (insert "a")
       (sleep-for 0.1)
-      (should (null company-candidates)))))
+      (should (null company-candidates))
+      (should (null company-candidates-cache))
+      (should (null company-backend)))))
 
 (ert-deftest company-idle-begin-async-allows-immediate-callbacks ()
   (with-temp-buffer
diff --git a/packages/company/test/bbdb-tests.el 
b/packages/company/test/bbdb-tests.el
new file mode 100644
index 0000000..b1f21b9
--- /dev/null
+++ b/packages/company/test/bbdb-tests.el
@@ -0,0 +1,46 @@
+;;; bbdb-tests.el --- company-mode tests  -*- lexical-binding: t -*-
+
+;; Copyright (C) 2016  Free Software Foundation, Inc.
+
+;; Author: Dmitry Gutov
+
+;; 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/>.
+
+(require 'company-tests)
+(require 'company-bbdb)
+
+(provide 'bbdb-com)
+
+(ert-deftest company-bbdb-prefix-looks-in-header-value ()
+  (with-temp-buffer
+    (insert "To: J")
+    (setq-local major-mode 'message-mode)
+    (should (equal (company-bbdb 'prefix)
+                   "J"))))
+
+(ert-deftest company-bbdb-prefix-includes-space ()
+  (with-temp-buffer
+    (insert "To: John Sm")
+    (setq-local major-mode 'message-mode)
+    (should (equal (company-bbdb 'prefix)
+                   "John Sm"))))
+
+(ert-deftest company-bbdb-prefix-begins-after-comma-or-semi ()
+  (with-temp-buffer
+    (insert "To: John Smythe <address@hidden>, Jess C")
+    (setq-local major-mode 'message-mode)
+    (should (equal (company-bbdb 'prefix)
+                   "Jess C"))))
diff --git a/packages/company/test/clang-tests.el 
b/packages/company/test/clang-tests.el
index 09ba114..2b8b105 100644
--- a/packages/company/test/clang-tests.el
+++ b/packages/company/test/clang-tests.el
@@ -22,15 +22,6 @@
 (require 'company-tests)
 (require 'company-clang)
 
-(ert-deftest company-clang-objc-templatify ()
-  (with-temp-buffer
-    (let ((text "createBookWithTitle:andAuthor:"))
-      (insert text)
-      (company-clang-objc-templatify text)
-      (should (equal "createBookWithTitle:arg0 andAuthor:arg1" 
(buffer-string)))
-      (should (looking-at "arg0"))
-      (should (null (overlay-get (company-template-field-at) 'display))))))
-
 (ert-deftest company-clang-simple-annotation ()
   (let ((str (propertize
               "foo" 'meta
@@ -44,3 +35,11 @@
               "shared_ptr<_Tp> make_shared<typename _Tp>(_Args &&__args...)")))
     (should (equal (company-clang 'annotation str)
                    "<typename _Tp>(_Args &&__args...)"))))
+
+(ert-deftest company-clang-func-ptr-annotation ()
+  (let ((str (propertize "foo" 'meta "void (*)(int) foo")))
+    (should (equal (company-clang 'annotation str) "(*)(int)"))))
+
+(ert-deftest company-clang-null-annotation ()
+  (let ((str "char"))
+    (should (null (company-clang 'annotation str)))))
diff --git a/packages/company/test/core-tests.el 
b/packages/company/test/core-tests.el
index 13e547e..89543b0 100644
--- a/packages/company/test/core-tests.el
+++ b/packages/company/test/core-tests.el
@@ -1,6 +1,6 @@
 ;;; core-tests.el --- company-mode tests  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2015  Free Software Foundation, Inc.
+;; Copyright (C) 2015, 2016  Free Software Foundation, Inc.
 
 ;; Author: Dmitry Gutov
 
@@ -153,6 +153,26 @@
       (should (equal '("abb" "abc" "abd" "acc" "acd")
                      (company-call-backend 'candidates "a"))))))
 
+(ert-deftest company-multi-backend-handles-keyword-separate ()
+  (let ((one (lambda (command &optional _)
+               (cl-case command
+                 (prefix "a")
+                 (candidates '("aa" "ca" "ba")))))
+        (two (lambda (command &optional _)
+               (cl-case command
+                 (prefix "a")
+                 (candidates '("bb" "ab")))))
+        (tri (lambda (command &optional _)
+               (cl-case command
+                 (prefix "a")
+                 (sorted t)
+                 (candidates '("cc" "bc" "ac"))))))
+    (let ((company-backend (list one two tri :separate)))
+      (should (company-call-backend 'sorted))
+      (should-not (company-call-backend 'duplicates))
+      (should (equal '("aa" "ba" "ca" "ab" "bb" "cc" "bc" "ac")
+                     (company-call-backend 'candidates "a"))))))
+
 (ert-deftest company-begin-backend-failure-doesnt-break-company-backends ()
   (with-temp-buffer
     (insert "a")
@@ -399,6 +419,9 @@
       (and (ert-equal-including-properties (car list1) (car list2))
            (ct-equal-including-properties (cdr list1) (cdr list2)))))
 
+(ert-deftest company-strips-duplicates-returns-nil ()
+  (should (null (company--preprocess-candidates nil))))
+
 (ert-deftest company-strips-duplicates-within-groups ()
   (let* ((kvs '(("a" . "b")
                 ("a" . nil)
diff --git a/packages/company/test/frontends-tests.el 
b/packages/company/test/frontends-tests.el
index 613856e..7b8ee61 100644
--- a/packages/company/test/frontends-tests.el
+++ b/packages/company/test/frontends-tests.el
@@ -1,6 +1,6 @@
 ;;; frontends-tests.el --- company-mode tests  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2015  Free Software Foundation, Inc.
+;; Copyright (C) 2015, 2016  Free Software Foundation, Inc.
 
 ;; Author: Dmitry Gutov
 
@@ -31,12 +31,12 @@
       (let ((company-frontends '(company-pseudo-tooltip-frontend))
             (company-begin-commands '(self-insert-command))
             (company-backends
-             (list (lambda (c &optional _)
+             (list (lambda (c &rest _)
                      (cl-case c (prefix "") (candidates '("a" "b" "c")))))))
         (let (this-command)
           (company-call 'complete))
         (company-call 'open-line 1)
-        (should (eq 1 (overlay-start company-pseudo-tooltip-overlay)))))))
+        (should (eq 2 (overlay-start company-pseudo-tooltip-overlay)))))))
 
 (ert-deftest company-pseudo-tooltip-show ()
   :tags '(interactive)
@@ -57,7 +57,7 @@
         (should (eq (overlay-get ov 'company-height) company-tooltip-limit))
         (should (eq (overlay-get ov 'company-column) col))
         (should (string= (overlay-get ov 'company-display)
-                         "\n  123 \nc 45  c\nddd\n")))))))
+                         "  123 \nc 45  c\nddd\n")))))))
 
 (ert-deftest company-pseudo-tooltip-edit-updates-width ()
   :tags '(interactive)
@@ -84,7 +84,8 @@
       (set-window-buffer nil (current-buffer))
       (save-excursion (insert "\n"))
       (let ((company-candidates-length 1)
-            (company-candidates '("123")))
+            (company-candidates '("123"))
+            (company-backend #'ignore))
         (company-preview-show-at-point (point))
         (let* ((ov company-preview-overlay)
                (str (overlay-get ov 'after-string)))
@@ -109,7 +110,7 @@
           ;; With margins.
           (should (eq (overlay-get ov 'company-width) 8))
           (should (string= (overlay-get ov 'company-display)
-                           "\n 123(4) \n 45     \n")))))))
+                           " 123(4) \n 45     \n")))))))
 
 (ert-deftest company-pseudo-tooltip-show-with-annotations-right-aligned ()
   :tags '(interactive)
@@ -130,7 +131,7 @@
           ;; With margins.
           (should (eq (overlay-get ov 'company-width) 13))
           (should (string= (overlay-get ov 'company-display)
-                           "\n 123     (4) \n 45          \n 67 (891011) 
\n")))))))
+                           " 123     (4) \n 45          \n 67 (891011) 
\n")))))))
 
 (ert-deftest company-create-lines-shows-numbers ()
   (let ((company-show-numbers t)
@@ -149,7 +150,7 @@
          (company-candidates (mapcar #'car data))
          (company-candidates-length 4)
          (company-tooltip-margin 1)
-         (company-backend (lambda (cmd &optional arg)
+         (company-backend (lambda (cmd &optional arg &rest _)
                             (when (eq cmd 'annotation)
                               (cdr (assoc arg data)))))
          company-tooltip-align-annotations)
@@ -189,12 +190,15 @@
       (should (equal (list (format " %s " (make-string (- ww 2) ?1))
                            (format " %s " (make-string (- ww 2) ?1)))
                      res))
-      (should (eq 'company-tooltip-common-selection
-                    (get-text-property (- ww 2) 'face
-                                       (car res))))
-      (should (eq 'company-tooltip-selection
-                  (get-text-property (1- ww) 'face
-                                     (car res))))
+      (should (equal '(company-tooltip-common-selection
+                       company-tooltip-selection
+                       company-tooltip)
+                     (get-text-property (- ww 2) 'face
+                                        (car res))))
+      (should (equal '(company-tooltip-selection
+                       company-tooltip)
+                     (get-text-property (1- ww) 'face
+                                        (car res))))
       )))
 
 (ert-deftest company-create-lines-clears-out-non-printables ()
@@ -224,7 +228,7 @@
          (alist '(("a" . " ︸") ("b" . " ︸︸")))
          (company-candidates (mapcar #'car alist))
          (company-candidates-length 2)
-         (company-backend (lambda (c &optional a)
+         (company-backend (lambda (c &optional a &rest _)
                             (when (eq c 'annotation)
                               (assoc-default a alist)))))
     (should (equal '(" a ︸   "
@@ -238,7 +242,7 @@
                                "MIRAI発売2カ月"))
          (company-candidates-length 2)
          (company-prefix "MIRAI発")
-         (company-backend (lambda (c &optional _arg)
+         (company-backend (lambda (c &rest _)
                             (pcase c
                               (`ignore-case 'keep-prefix)))))
     (should (equal '(" MIRAI発売1カ月 "
@@ -249,21 +253,54 @@
   (let ((company-search-string "foo")
         (company-backend #'ignore)
         (company-prefix ""))
-    (should (equal-including-properties
+    (should (ert-equal-including-properties
              (company-fill-propertize "barfoo" nil 6 t nil nil)
              #("barfoo"
-               0 3 (face company-tooltip mouse-face company-tooltip-mouse)
-               3 6 (face company-tooltip-search mouse-face 
company-tooltip-mouse))))
-    (should (equal-including-properties
+               0 3 (face (company-tooltip) mouse-face (company-tooltip-mouse))
+               3 6 (face (company-tooltip-search company-tooltip) mouse-face 
(company-tooltip-mouse)))))
+    (should (ert-equal-including-properties
              (company-fill-propertize "barfoo" nil 5 t "" " ")
              #("barfo "
-               0 3 (face company-tooltip mouse-face company-tooltip-mouse)
-               3 5 (face company-tooltip-search mouse-face 
company-tooltip-mouse)
-               5 6 (face company-tooltip mouse-face company-tooltip-mouse))))
-    (should (equal-including-properties
+               0 3 (face (company-tooltip) mouse-face (company-tooltip-mouse))
+               3 5 (face (company-tooltip-search company-tooltip) mouse-face 
(company-tooltip-mouse))
+               5 6 (face (company-tooltip) mouse-face 
(company-tooltip-mouse)))))
+    (should (ert-equal-including-properties
              (company-fill-propertize "barfoo" nil 3 t " " " ")
              #(" bar "
-               0 5 (face company-tooltip mouse-face company-tooltip-mouse))))))
+               0 5 (face (company-tooltip) mouse-face 
(company-tooltip-mouse)))))))
+
+(ert-deftest company-fill-propertize-overrides-face-property ()
+  (let ((company-backend #'ignore)
+        (company-prefix "")
+        (str1 (propertize "str1" 'face 'foo))
+        (str2 (propertize "str2" 'face 'foo)))
+    (should (ert-equal-including-properties
+             (company-fill-propertize str1 str2 8 nil nil nil)
+             #("str1str2"
+               0 4 (face (company-tooltip) mouse-face (company-tooltip-mouse))
+               4 8 (face (company-tooltip-annotation company-tooltip)
+                         mouse-face (company-tooltip-mouse)))))))
+
+(ert-deftest company-fill-propertize-delegates-to-pre-render ()
+  (let ((company-backend
+         (lambda (command &rest args)
+           (pcase command
+             (`pre-render
+              (propertize (car args)
+                          'face (if (cadr args)
+                                    'annotation
+                                  'value))))))
+        (company-prefix "")
+        (str1 (propertize "str1" 'foo 'bar))
+        (str2 (propertize "str2" 'foo 'bar)))
+    (let ((res (company-fill-propertize str1 str2 8 nil nil nil)))
+      ;; Could use `ert-equal-including-properties' as well.
+      (should (eq (get-text-property 0 'foo res) 'bar))
+      (should (eq (get-text-property 4 'foo res) 'bar))
+      (should (equal (get-text-property 0 'face res)
+                     '(value company-tooltip)))
+      (should (equal (get-text-property 4 'face res)
+                     '(annotation company-tooltip-annotation 
company-tooltip))))))
 
 (ert-deftest company-column-with-composition ()
   :tags '(interactive)
@@ -299,7 +336,7 @@
     (insert (propertize "a" 'display "bbb\nccc\ndddd\n"))
     (insert "eee\nfff\nggg")
     (should (equal (company-buffer-lines (point-min) (point-max))
-                   '("" "" "" "eee" "fff" "ggg")))))
+                   '("a" "" "" "eee" "fff" "ggg")))))
 
 (ert-deftest company-buffer-lines-with-multiline-after-string-at-eob ()
   :tags '(interactive)
@@ -310,6 +347,16 @@
     (should (equal (company-buffer-lines (point-min) (point-max))
                    '("a" "b" "c")))))
 
+(ert-deftest company-buffer-lines-with-line-wrapping ()
+  :tags '(interactive)
+  (with-temp-buffer
+    (let ((ww (company--window-width)))
+      (insert (make-string (* 3 ww) ?a))
+      (should (equal (company-buffer-lines (point-min) (point-max))
+                     (list (make-string ww ?a)
+                           (make-string ww ?a)
+                           (make-string ww ?a)))))))
+
 (ert-deftest company-modify-line ()
   (let ((str "-*-foobar"))
     (should (equal-including-properties
diff --git a/packages/company/test/template-tests.el 
b/packages/company/test/template-tests.el
index 09548c4..da746bd 100644
--- a/packages/company/test/template-tests.el
+++ b/packages/company/test/template-tests.el
@@ -22,6 +22,13 @@
 (require 'company-tests)
 (require 'company-template)
 
+(defun company-template-field-assert-text (str &optional pos)
+  (let ((field (company-template-field-at pos)))
+    (should (equal (buffer-substring-no-properties
+                    (overlay-start field)
+                    (overlay-end field))
+                   str))))
+
 (ert-deftest company-template-removed-after-the-last-jump ()
   (with-temp-buffer
     (insert "{ }")
@@ -29,8 +36,8 @@
     (let ((tpl (company-template-declare-template (point) (1- (point-max)))))
       (save-excursion
         (dotimes (_ 2)
-          (insert " ")
-          (company-template-add-field tpl (point) "foo")))
+          (insert " foo")
+          (company-template-add-field tpl (- (point) 3) (point))))
       (company-call 'template-forward-field)
       (should (= 3 (point)))
       (company-call 'template-forward-field)
@@ -46,8 +53,8 @@
     (goto-char 2)
     (let ((tpl (company-template-declare-template (point) (1- (point-max)))))
       (save-excursion
-        (insert " ")
-        (company-template-add-field tpl (point) "bar"))
+        (insert " bar")
+        (company-template-add-field tpl (- (point) 3) (point)))
       (company-call 'template-move-to-first tpl)
       (should (= 3 (point)))
       (dolist (c (string-to-list "tee"))
@@ -64,28 +71,49 @@
     (let ((text "foo(int a, short b)"))
       (insert text)
       (company-template-c-like-templatify text)
-      (should (equal "foo(arg0, arg1)" (buffer-string)))
-      (should (looking-at "arg0"))
-      (should (equal "int a"
-                     (overlay-get (company-template-field-at) 'display))))))
+      (should (equal "foo(int a, short b)" (buffer-string)))
+      (company-template-field-assert-text "int a"))))
 
 (ert-deftest company-template-c-like-templatify-trims-after-closing-paren ()
   (with-temp-buffer
     (let ((text "foo(int a, short b)!@ #1334 a"))
       (insert text)
       (company-template-c-like-templatify text)
-      (should (equal "foo(arg0, arg1)" (buffer-string)))
-      (should (looking-at "arg0")))))
+      (should (equal "foo(int a, short b)" (buffer-string)))
+      (company-template-field-assert-text "int a"))))
 
 (ert-deftest company-template-c-like-templatify-generics ()
   (with-temp-buffer
     (let ((text "foo<TKey, TValue>(int i, Dict<TKey, TValue>, long l)"))
       (insert text)
       (company-template-c-like-templatify text)
-      (should (equal "foo<arg0, arg1>(arg2, arg3, arg4)" (buffer-string)))
-      (should (looking-at "arg0"))
-      (should (equal "TKey" (overlay-get (company-template-field-at) 
'display)))
-      (search-forward "arg3")
+      (should (equal (buffer-string) text))
+      (company-template-field-assert-text "TKey")
+      (search-forward "Dict")
       (forward-char -1)
-      (should (equal "Dict<TKey, TValue>"
-                     (overlay-get (company-template-field-at) 'display))))))
+      (company-template-field-assert-text "Dict<TKey, TValue>"))))
+
+(ert-deftest company-template-c-like-func-ptr ()
+  (with-temp-buffer
+    (let ((text "foo(*)(int)"))
+      (insert text)
+      (company-template-c-like-templatify text)
+      (should (equal (buffer-string) "foo(int)"))
+      (company-template-field-assert-text "int"))))
+
+(ert-deftest company-clang-objc-templatify-empty-args ()
+  (with-temp-buffer
+    (let ((text "createBookWithTitle:andAuthor:"))
+      (insert text)
+      (company-template-objc-templatify text)
+      (should (equal "createBookWithTitle:arg0 andAuthor:arg1" 
(buffer-string)))
+      (should (looking-at "arg0"))
+      (should (null (overlay-get (company-template-field-at) 'display))))))
+
+(ert-deftest company-template-objc-templatify ()
+  (with-temp-buffer
+    (let ((text "createBookWithTitle:(NSString) andAuthor:(id)"))
+      (insert text)
+      (company-template-objc-templatify text)
+      (should (equal (buffer-string) text))
+      (company-template-field-assert-text "(NSString)"))))
diff --git a/packages/context-coloring/.elpaignore 
b/packages/context-coloring/.elpaignore
new file mode 100644
index 0000000..bad5d87
--- /dev/null
+++ b/packages/context-coloring/.elpaignore
@@ -0,0 +1,10 @@
+.elpaignore
+.gitignore
+.travis.yml
+Cask
+context-coloring-benchmark.el
+context-coloring-coverage.el
+context-coloring-test.el
+fixtures
+Makefile
+screenshot.png
diff --git a/packages/context-coloring/.gitignore 
b/packages/context-coloring/.gitignore
index a269508..b9fedca 100644
--- a/packages/context-coloring/.gitignore
+++ b/packages/context-coloring/.gitignore
@@ -1,4 +1,6 @@
+*-autoloads.el
+*-pkg.el
 *.elc
 .cask/
-/benchmark/logs/
-/test/coverage/
+/benchmark/
+/coverage/
diff --git a/packages/context-coloring/Cask b/packages/context-coloring/Cask
index b1535a9..55ff4c5 100644
--- a/packages/context-coloring/Cask
+++ b/packages/context-coloring/Cask
@@ -2,7 +2,6 @@
 
 (package-file "context-coloring.el")
 
-(depends-on "js2-mode")
-
 (development
+ (depends-on "js2-mode")
  (depends-on "undercover"))
diff --git a/packages/context-coloring/Makefile 
b/packages/context-coloring/Makefile
index f729409..4519b70 100644
--- a/packages/context-coloring/Makefile
+++ b/packages/context-coloring/Makefile
@@ -1,6 +1,10 @@
 EMACS = emacs
 CASK = EMACS=${EMACS} cask
 DEPENDENCIES = .cask/
+SOURCE_FILES = \
+       context-coloring.el \
+       context-coloring-javascript.el \
+       context-coloring-emacs-lisp.el
 
 all: uncompile compile test
 
@@ -8,13 +12,13 @@ bench: ${DEPENDENCIES}
        ${CASK} exec ${EMACS} -Q \
        -L . \
        -l context-coloring \
-       -l benchmark/context-coloring-benchmark.el \
+       -l context-coloring-benchmark \
        -f context-coloring-benchmark-run
 
 compile: ${DEPENDENCIES}
        ${CASK} exec ${EMACS} -Q -batch \
        -L . \
-       -f batch-byte-compile *.el
+       -f batch-byte-compile ${SOURCE_FILES}
 
 uncompile:
        rm -f *.elc
@@ -29,18 +33,18 @@ test: ${DEPENDENCIES}
        ${CASK} exec ${EMACS} -Q -batch \
        -L . \
        -l ert \
-       -l test/context-coloring-coverage.el \
+       -l context-coloring-coverage \
        -f context-coloring-coverage-ci-init \
-       -l test/context-coloring-test.el \
+       -l context-coloring-test \
        -f ert-run-tests-batch-and-exit
 
 cover: ${DEPENDENCIES}
        ${CASK} exec ${EMACS} -Q -batch \
        -L . \
        -l ert \
-       -l test/context-coloring-coverage.el \
+       -l context-coloring-coverage \
        -f context-coloring-coverage-local-init \
-       -l test/context-coloring-test.el \
+       -l context-coloring-test \
        -f ert-run-tests-batch-and-exit
 
 .PHONY: all bench compile uncompile clean test cover
diff --git a/packages/context-coloring/benchmark/context-coloring-benchmark.el 
b/packages/context-coloring/context-coloring-benchmark.el
similarity index 91%
rename from packages/context-coloring/benchmark/context-coloring-benchmark.el
rename to packages/context-coloring/context-coloring-benchmark.el
index c627249..0c38e85 100644
--- a/packages/context-coloring/benchmark/context-coloring-benchmark.el
+++ b/packages/context-coloring/context-coloring-benchmark.el
@@ -1,6 +1,6 @@
-;;; context-coloring-benchmark.el --- Benchmarks for context coloring  -*- 
lexical-binding: t; -*-
+;;; context-coloring-benchmark.el --- Benchmarks for context coloring  -*- 
lexical-binding: t; no-byte-compile: t; -*-
 
-;; Copyright (C) 2014-2015  Free Software Foundation, Inc.
+;; Copyright (C) 2014-2016  Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -26,8 +26,9 @@
 ;;; Code:
 
 (require 'context-coloring)
+(require 'context-coloring-javascript)
+(require 'context-coloring-emacs-lisp)
 (require 'elp)
-(require 'js2-mode)
 
 
 (defconst context-coloring-benchmark-path
@@ -45,7 +46,7 @@
                        (elp-results)
                        (buffer-substring-no-properties (point-min) 
(point-max)))
                    (kill-buffer))))
-    (make-directory (context-coloring-benchmark-resolve-path "./logs") t)
+    (make-directory (context-coloring-benchmark-resolve-path "./benchmark") t)
     (append-to-file
      (with-temp-buffer
        (goto-char (point-min))
@@ -73,7 +74,7 @@
 (defun context-coloring-benchmark (title fixtures)
   "Execute a benchmark titled TITLE against FIXTURES."
   (let ((result-file (context-coloring-benchmark-resolve-path
-                      (format "./logs/results-%s-%s.log"
+                      (format "./benchmark/results-%s-%s.log"
                               title (format-time-string "%s")))))
     (mapc
      (lambda (path)
@@ -119,10 +120,10 @@
      fixtures)))
 
 (defconst context-coloring-benchmark-javascript-fixtures
-  '("./fixtures/jquery-2.1.1.js"
-    "./fixtures/lodash-2.4.1.js"
-    "./fixtures/async-0.9.0.js"
-    "./fixtures/mkdirp-0.5.0.js")
+  '("./fixtures/benchmark/jquery-2.1.1.js"
+    "./fixtures/benchmark/lodash-2.4.1.js"
+    "./fixtures/benchmark/async-0.9.0.js"
+    "./fixtures/benchmark/mkdirp-0.5.0.js")
   "Arbitrary JavaScript files for performance scrutiny.")
 
 (defun context-coloring-benchmark-js2-mode-run ()
@@ -139,10 +140,10 @@
   (remove-hook 'js2-mode-hook #'context-coloring-mode))
 
 (defconst context-coloring-benchmark-emacs-lisp-fixtures
-  '("./fixtures/lisp.el"
-    "./fixtures/faces.el"
-    "./fixtures/subr.el"
-    "./fixtures/simple.el")
+  '("./fixtures/benchmark/lisp.el"
+    "./fixtures/benchmark/faces.el"
+    "./fixtures/benchmark/subr.el"
+    "./fixtures/benchmark/simple.el")
   "Arbitrary Emacs Lisp files for performance scrutiny.")
 
 (defun context-coloring-benchmark-emacs-lisp-mode-run ()
diff --git a/packages/context-coloring/test/context-coloring-coverage.el 
b/packages/context-coloring/context-coloring-coverage.el
similarity index 96%
rename from packages/context-coloring/test/context-coloring-coverage.el
rename to packages/context-coloring/context-coloring-coverage.el
index 107908c..c63dc6b 100644
--- a/packages/context-coloring/test/context-coloring-coverage.el
+++ b/packages/context-coloring/context-coloring-coverage.el
@@ -1,6 +1,6 @@
-;;; context-coloring-coverage.el --- Test coverage for context coloring  -*- 
lexical-binding: t; -*-
+;;; context-coloring-coverage.el --- Test coverage for context coloring  -*- 
lexical-binding: t; no-byte-compile: t; -*-
 
-;; Copyright (C) 2014-2015  Free Software Foundation, Inc.
+;; Copyright (C) 2014-2016  Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -111,14 +111,14 @@
    (mapcar
     #'context-coloring-coverage-format-source-file
     (cdr (assq 'source_files coverage-data)))
-   "\n"))
+   "\n\n"))
 
 (defun context-coloring-coverage-local-init ()
   "Initialize test coverage for local viewing."
   (make-directory context-coloring-coverage-output-directory t)
   (setq undercover-force-coverage t)
   (setenv "COVERALLS_REPO_TOKEN" "noop")
-  (undercover "context-coloring.el"
+  (undercover "*.el"
               (:report-file context-coloring-coverage-output-file)
               (:send-report nil))
   (add-hook
@@ -147,7 +147,7 @@
 
 (defun context-coloring-coverage-ci-init ()
   "Initialize test coverage for continuous integration."
-  (undercover "context-coloring.el")
+  (undercover "*.el")
   (require 'context-coloring))
 
 (provide 'context-coloring-coverage)
diff --git a/packages/context-coloring/context-coloring.el 
b/packages/context-coloring/context-coloring-emacs-lisp.el
similarity index 53%
copy from packages/context-coloring/context-coloring.el
copy to packages/context-coloring/context-coloring-emacs-lisp.el
index 983315e..05caa5a 100644
--- a/packages/context-coloring/context-coloring.el
+++ b/packages/context-coloring/context-coloring-emacs-lisp.el
@@ -1,12 +1,6 @@
-;;; context-coloring.el --- Highlight by scope  -*- lexical-binding: t; -*-
+;;; context-coloring-emacs-lisp.el --- Emacs Lisp support  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2014-2015  Free Software Foundation, Inc.
-
-;; Author: Jackson Ray Hamilton <address@hidden>
-;; Version: 7.2.0
-;; Keywords: convenience faces tools
-;; Package-Requires: ((emacs "24.3") (js2-mode "20150713"))
-;; URL: https://github.com/jacksonrayhamilton/context-coloring
+;; Copyright (C) 2014-2016  Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -25,470 +19,11 @@
 
 ;;; Commentary:
 
-;; Highlights code by scope.  Top-level scopes are one color, second-level
-;; scopes are another color, and so on.  Variables retain the color of the 
scope
-;; in which they are defined.  A variable defined in an outer scope referenced
-;; by an inner scope is colored the same as the outer scope.
-
-;; By default, comments and strings are still highlighted syntactically.
+;; Add Emacs Lisp context coloring support.
 
 ;;; Code:
 
-(require 'js2-mode)
-
-
-;;; Utilities
-
-(defun context-coloring-join (strings delimiter)
-  "Join a list of STRINGS with the string DELIMITER."
-  (mapconcat #'identity strings delimiter))
-
-
-;;; Faces
-
-(defun context-coloring-defface (level light dark tty)
-  "Define a face for LEVEL with LIGHT, DARK and TTY colors."
-  (let ((face (intern (format "context-coloring-level-%s-face" level)))
-        (doc (format "Context coloring face, level %s." level)))
-    (custom-declare-face
-     face
-     `((((type tty)) (:foreground ,tty))
-       (((background light)) (:foreground ,light))
-       (((background dark)) (:foreground ,dark)))
-     doc
-     :group 'context-coloring)))
-
-;; Provide some default colors based off Emacs's defaults.
-(context-coloring-defface 0 "#000000" "#ffffff" nil)
-(context-coloring-defface 1 "#008b8b" "#00ffff" "yellow")
-(context-coloring-defface 2 "#0000ff" "#87cefa" "green")
-(context-coloring-defface 3 "#483d8b" "#b0c4de" "cyan")
-(context-coloring-defface 4 "#a020f0" "#eedd82" "blue")
-(context-coloring-defface 5 "#a0522d" "#98fb98" "magenta")
-(context-coloring-defface 6 "#228b22" "#7fffd4" "red")
-(context-coloring-defface 7 "#3f3f3f" "#cdcdcd" nil)
-
-(defconst context-coloring-default-maximum-face 7
-  "Maximum face when there are no custom faces.")
-
-;; Create placeholder faces for users and theme authors.
-(dotimes (level 18)
-  (let* ((level (+ level 8))
-         (face (intern (format "context-coloring-level-%s-face" level)))
-         (doc (format "Context coloring face, level %s." level)))
-    (custom-declare-face face nil doc :group 'context-coloring)))
-
-(defvar-local context-coloring-maximum-face nil
-  "Dynamic index of the highest face available for coloring.")
-
-(defsubst context-coloring-level-face (level)
-  "Return symbol for face with LEVEL."
-  ;; `concat' is faster than `format' here.
-  (intern-soft
-   (concat "context-coloring-level-" (number-to-string level) "-face")))
-
-(defsubst context-coloring-bounded-level-face (level)
-  "Return symbol for face with LEVEL, bounded by the maximum."
-  (context-coloring-level-face (min level context-coloring-maximum-face)))
-
-(defconst context-coloring-level-face-regexp
-  "context-coloring-level-\\([[:digit:]]+\\)-face"
-  "Extract a level from a face.")
-
-(defun context-coloring-theme-highest-level (theme)
-  "Return the highest coloring level for THEME, or -1."
-  (let* ((settings (get theme 'theme-settings))
-         (tail settings)
-         face-string
-         number
-         (found -1))
-    (while tail
-      (and (eq (nth 0 (car tail)) 'theme-face)
-           (setq face-string (symbol-name (nth 1 (car tail))))
-           (string-match
-            context-coloring-level-face-regexp
-            face-string)
-           (setq number (string-to-number
-                         (substring face-string
-                                    (match-beginning 1)
-                                    (match-end 1))))
-           (> number found)
-           (setq found number))
-      (setq tail (cdr tail)))
-    found))
-
-(defun context-coloring-update-maximum-face ()
-  "Save the highest possible face for the current theme."
-  (let ((themes (append custom-enabled-themes '(user)))
-        (continue t)
-        theme
-        highest-level)
-    (while continue
-      (setq theme (car themes))
-      (setq themes (cdr themes))
-      (setq highest-level (context-coloring-theme-highest-level theme))
-      (setq continue (and themes (= highest-level -1))))
-    (setq context-coloring-maximum-face
-          (cond
-           ((= highest-level -1)
-            context-coloring-default-maximum-face)
-           (t
-            highest-level)))))
-
-
-;;; Change detection
-
-(defvar-local context-coloring-changed-p nil
-  "Indication that the buffer has changed recently, which implies
-that it should be colored again by
-`context-coloring-maybe-colorize-idle-timer' if that timer is
-being used.")
-
-(defvar-local context-coloring-changed-start nil
-  "Beginning of last text that changed.")
-
-(defvar-local context-coloring-changed-end nil
-  "End of last text that changed.")
-
-(defvar-local context-coloring-changed-length nil
-  "Length of last text that changed.")
-
-(defun context-coloring-change-function (start end length)
-  "Register a change so that a buffer can be colorized soon.
-
-START, END and LENGTH are recorded for later use."
-  ;; Tokenization is obsolete if there was a change.
-  (setq context-coloring-changed-start start)
-  (setq context-coloring-changed-end end)
-  (setq context-coloring-changed-length length)
-  (setq context-coloring-changed-p t))
-
-(defun context-coloring-maybe-colorize-with-buffer (buffer)
-  "Color BUFFER and if it has changed."
-  (when (and (eq buffer (current-buffer))
-             context-coloring-changed-p)
-    (context-coloring-colorize-with-buffer buffer)
-    (setq context-coloring-changed-p nil)
-    (setq context-coloring-changed-start nil)
-    (setq context-coloring-changed-end nil)
-    (setq context-coloring-changed-length nil)))
-
-(defvar-local context-coloring-maybe-colorize-idle-timer nil
-  "The currently-running idle timer for conditional coloring.")
-
-(defvar-local context-coloring-colorize-idle-timer nil
-  "The currently-running idle timer for unconditional coloring.")
-
-(defcustom context-coloring-default-delay 0.25
-  "Default delay between a buffer update and colorization.
-
-Increase this if your machine is high-performing.  Decrease it if
-it ain't."
-  :type 'float
-  :group 'context-coloring)
-
-(make-obsolete-variable
- 'context-coloring-delay
- 'context-coloring-default-delay
- "6.4.0")
-
-(defun context-coloring-cancel-timer (timer)
-  "Cancel TIMER."
-  (when timer
-    (cancel-timer timer)))
-
-(defun context-coloring-schedule-coloring (time)
-  "Schedule coloring to occur once after Emacs is idle for TIME."
-  (context-coloring-cancel-timer context-coloring-colorize-idle-timer)
-  (setq context-coloring-colorize-idle-timer
-        (run-with-idle-timer
-         time
-         nil
-         #'context-coloring-colorize-with-buffer
-         (current-buffer))))
-
-(defun context-coloring-setup-idle-change-detection ()
-  "Setup idle change detection."
-  (let ((dispatch (context-coloring-get-current-dispatch)))
-    (add-hook
-     'after-change-functions #'context-coloring-change-function nil t)
-    (add-hook
-     'kill-buffer-hook #'context-coloring-teardown-idle-change-detection nil t)
-    (setq context-coloring-maybe-colorize-idle-timer
-          (run-with-idle-timer
-           (or (plist-get dispatch :delay) context-coloring-default-delay)
-           t
-           #'context-coloring-maybe-colorize-with-buffer
-           (current-buffer)))))
-
-(defun context-coloring-teardown-idle-change-detection ()
-  "Teardown idle change detection."
-  (dolist (timer (list context-coloring-colorize-idle-timer
-                       context-coloring-maybe-colorize-idle-timer))
-    (context-coloring-cancel-timer timer))
-  (remove-hook
-   'kill-buffer-hook #'context-coloring-teardown-idle-change-detection t)
-  (remove-hook
-   'after-change-functions #'context-coloring-change-function t))
-
-
-;;; Colorization utilities
-
-(defsubst context-coloring-colorize-region (start end level)
-  "Color from START (inclusive) to END (exclusive) with LEVEL."
-  (add-text-properties
-   start
-   end
-   `(face ,(context-coloring-bounded-level-face level))))
-
-(make-obsolete-variable
- 'context-coloring-comments-and-strings
- "use `context-coloring-syntactic-comments' and
- `context-coloring-syntactic-strings' instead."
- "6.1.0")
-
-(defcustom context-coloring-syntactic-comments t
-  "If non-nil, also color comments using `font-lock'."
-  :type 'boolean
-  :group 'context-coloring)
-
-(defcustom context-coloring-syntactic-strings t
-  "If non-nil, also color strings using `font-lock'."
-  :type 'boolean
-  :group 'context-coloring)
-
-(defun context-coloring-font-lock-syntactic-comment-function (state)
-  "Color a comment according to STATE."
-  (if (nth 3 state) nil font-lock-comment-face))
-
-(defun context-coloring-font-lock-syntactic-string-function (state)
-  "Color a string according to STATE."
-  (if (nth 3 state) font-lock-string-face nil))
-
-(defsubst context-coloring-colorize-comments-and-strings (&optional min max)
-  "Maybe color comments and strings in buffer from MIN to MAX.
-MIN defaults to beginning of buffer.  MAX defaults to end."
-  (when (or context-coloring-syntactic-comments
-            context-coloring-syntactic-strings)
-    (let ((min (or min (point-min)))
-          (max (or max (point-max)))
-          (font-lock-syntactic-face-function
-           (cond
-            ((and context-coloring-syntactic-comments
-                  (not context-coloring-syntactic-strings))
-             #'context-coloring-font-lock-syntactic-comment-function)
-            ((and context-coloring-syntactic-strings
-                  (not context-coloring-syntactic-comments))
-             #'context-coloring-font-lock-syntactic-string-function)
-            (t
-             font-lock-syntactic-face-function))))
-      (save-excursion
-        (font-lock-fontify-syntactically-region min max)
-        ;; TODO: Make configurable at the dispatch level.
-        (when (eq major-mode 'emacs-lisp-mode)
-          (font-lock-fontify-keywords-region min max))))))
-
-(defcustom context-coloring-initial-level 0
-  "Scope level at which to start coloring.
-
-If top-level variables and functions do not become global, but
-are scoped to a file (as in Node.js), set this to `1'."
-  :type 'integer
-  :safe #'integerp
-  :group 'context-coloring)
-
-
-;;; JavaScript colorization
-
-(defvar-local context-coloring-js2-scope-level-hash-table nil
-  "Associate `js2-scope' structures and with their scope
-  levels.")
-
-(defcustom context-coloring-javascript-block-scopes nil
-  "If non-nil, also color block scopes in the scope hierarchy in JavaScript.
-
-The block-scoped `let' and `const' are introduced in ES6.  Enable
-this for ES6 code; disable it elsewhere."
-  :type 'boolean
-  :safe #'booleanp
-  :group 'context-coloring)
-
-(make-obsolete-variable
- 'context-coloring-js-block-scopes
- 'context-coloring-javascript-block-scopes
- "7.0.0")
-
-(defsubst context-coloring-js2-scope-level (scope initial)
-  "Return the level of SCOPE, starting from INITIAL."
-  (cond ((gethash scope context-coloring-js2-scope-level-hash-table))
-        (t
-         (let ((level initial)
-               (current-scope scope)
-               enclosing-scope)
-           (while (and current-scope
-                       (js2-node-parent current-scope)
-                       (setq enclosing-scope
-                             (js2-node-get-enclosing-scope current-scope)))
-             (when (or context-coloring-javascript-block-scopes
-                       (let ((type (js2-scope-type current-scope)))
-                         (or (= type js2-SCRIPT)
-                             (= type js2-FUNCTION)
-                             (= type js2-CATCH))))
-               (setq level (+ level 1)))
-             (setq current-scope enclosing-scope))
-           (puthash scope level 
context-coloring-js2-scope-level-hash-table)))))
-
-(defsubst context-coloring-js2-local-name-node-p (node)
-  "Determine if NODE represents a local variable."
-  (and (js2-name-node-p node)
-       (let ((parent (js2-node-parent node)))
-         (not (or (and (js2-object-prop-node-p parent)
-                       (eq node (js2-object-prop-node-left parent)))
-                  (and (js2-prop-get-node-p parent)
-                       ;; For nested property lookup, the node on the left is a
-                       ;; `js2-prop-get-node', so this always works.
-                       (eq node (js2-prop-get-node-right parent))))))))
-
-(defvar-local context-coloring-point-max nil
-  "Cached value of `point-max'.")
-
-(defsubst context-coloring-js2-colorize-node (node level)
-  "Color NODE with the color for LEVEL."
-  (let ((start (js2-node-abs-pos node)))
-    (context-coloring-colorize-region
-     start
-     (min
-      ;; End
-      (+ start (js2-node-len node))
-      ;; Somes nodes (like the ast when there is an unterminated multiline
-      ;; comment) will stretch to the value of `point-max'.
-      context-coloring-point-max)
-     level)))
-
-(defun context-coloring-js2-colorize-ast ()
-  "Color the buffer using the `js2-mode' abstract syntax tree."
-  ;; Reset the hash table; the old one could be obsolete.
-  (setq context-coloring-js2-scope-level-hash-table (make-hash-table :test 
#'eq))
-  (setq context-coloring-point-max (point-max))
-  (with-silent-modifications
-    (js2-visit-ast
-     js2-mode-ast
-     (lambda (node end-p)
-       (when (null end-p)
-         (cond
-          ((js2-scope-p node)
-           (context-coloring-js2-colorize-node
-            node
-            (context-coloring-js2-scope-level node 
context-coloring-initial-level)))
-          ((context-coloring-js2-local-name-node-p node)
-           (let* ((enclosing-scope (js2-node-get-enclosing-scope node))
-                  (defining-scope (js2-get-defining-scope
-                                   enclosing-scope
-                                   (js2-name-node-name node))))
-             ;; The tree seems to be walked lexically, so an entire scope will
-             ;; be colored, including its name nodes, before they are reached.
-             ;; Coloring the nodes defined in that scope would be redundant, so
-             ;; don't do it.
-             (when (not (eq defining-scope enclosing-scope))
-               (context-coloring-js2-colorize-node
-                node
-                ;; Use `0' as an initial level so global variables are always 
at
-                ;; the highest level (even if `context-coloring-initial-level'
-                ;; specifies an initial level for the rest of the code).
-                (context-coloring-js2-scope-level defining-scope 0))))))
-         ;; The `t' indicates to search children.
-         t)))
-    (context-coloring-colorize-comments-and-strings)))
-
-(defconst context-coloring-node-comment-regexp
-  (concat
-   ;; Ensure the "//" or "/*" comment starts with the directive.
-   "\\(//[[:space:]]*\\|/\\*[[:space:]]*\\)"
-   ;; Support multiple directive formats.
-   "\\("
-   ;; JSLint and JSHint support a JSON-like format.
-   "\\(jslint\\|jshint\\)[[:space:]].*?node:[[:space:]]*true"
-   "\\|"
-   ;; ESLint just specifies the option name.
-   "eslint-env[[:space:]].*?node"
-   "\\)")
-  "Match a comment body hinting at a Node.js program.")
-
-;; TODO: Add ES6 module detection.
-(defun context-coloring-js2-top-level-local-p ()
-  "Guess whether top-level variables are local.
-For instance, the current file could be a Node.js program."
-  (or
-   ;; A shebang is a pretty obvious giveaway.
-   (string-equal
-    "node"
-    (save-excursion
-      (goto-char (point-min))
-      (when (looking-at auto-mode-interpreter-regexp)
-        (match-string 2))))
-   ;; Otherwise, perform static analysis.
-   (progn
-     (setq context-coloring-js2-scope-level-hash-table (make-hash-table :test 
#'eq))
-     (catch 'node-program-p
-       (js2-visit-ast
-        js2-mode-ast
-        (lambda (node end-p)
-          (when (null end-p)
-            (when
-                (cond
-                 ;; Infer based on inline linter configuration.
-                 ((js2-comment-node-p node)
-                  (string-match-p
-                   context-coloring-node-comment-regexp
-                   (js2-node-string node)))
-                 ;; Infer based on the prescence of certain variables.
-                 ((and (js2-name-node-p node)
-                       (let ((parent (js2-node-parent node)))
-                         (not (and (js2-object-prop-node-p parent)
-                                   (eq node (js2-object-prop-node-left 
parent))))))
-                  (let ((name (js2-name-node-name node))
-                        (parent (js2-node-parent node)))
-                    (and
-                     (cond
-                      ;; Check whether this is "exports.something" or
-                      ;; "module.exports".
-                      ((js2-prop-get-node-p parent)
-                       (and
-                        (eq node (js2-prop-get-node-left parent))
-                        (or (string-equal name "exports")
-                            (let* ((property (js2-prop-get-node-right parent))
-                                   (property-name (js2-name-node-name 
property)))
-                              (and (string-equal name "module")
-                                   (string-equal property-name "exports"))))))
-                      ;; Check whether it's a "require('module')" call.
-                      ((js2-call-node-p parent)
-                       (or (string-equal name "require"))))
-                     (let* ((enclosing-scope (js2-node-get-enclosing-scope 
node))
-                            (defining-scope (js2-get-defining-scope
-                                             enclosing-scope name)))
-                       ;; The variable also must be global.
-                       (null defining-scope))))))
-              (throw 'node-program-p t))
-            ;; The `t' indicates to search children.
-            t)))
-       ;; Default to returning nil from the catch body.
-       nil))))
-
-(defcustom context-coloring-javascript-detect-top-level-scope t
-  "If non-nil, detect when to use file-level scope."
-  :type 'boolean
-  :group 'context-coloring)
-
-(defun context-coloring-js2-colorize ()
-  "Color the buffer using the `js2-mode'."
-  (cond
-   ;; Increase the initial level if we should.
-   ((and context-coloring-javascript-detect-top-level-scope
-         (context-coloring-js2-top-level-local-p))
-    (let ((context-coloring-initial-level 1))
-      (context-coloring-js2-colorize-ast)))
-   (t
-    (context-coloring-js2-colorize-ast))))
+(require 'context-coloring)
 
 
 ;;; Emacs Lisp colorization
@@ -520,11 +55,16 @@ For instance, the current file could be a Node.js program."
   "Move forward through whitespace and comments."
   (while (forward-comment 1)))
 
+(defsubst context-coloring-elisp-colorize-comments-and-strings
+  (&optional min max)
+  "Color comments and strings from MIN to MAX."
+  (context-coloring-colorize-comments-and-strings min max t))
+
 (defsubst context-coloring-elisp-forward-sws ()
   "Move through whitespace and comments, coloring comments."
   (let ((start (point)))
     (context-coloring-forward-sws)
-    (context-coloring-colorize-comments-and-strings start (point))))
+    (context-coloring-elisp-colorize-comments-and-strings start (point))))
 
 (defsubst context-coloring-elisp-forward-sexp ()
   "Skip/ignore missing sexps, coloring comments and strings."
@@ -563,9 +103,6 @@ For instance, the current file could be a Node.js program."
   (or (= syntax-code context-coloring-WORD-CODE)
       (= syntax-code context-coloring-SYMBOL-CODE)))
 
-(defvar context-coloring-parse-interruptable-p t
-  "Set this to nil to force parse to continue until finished.")
-
 (defconst context-coloring-elisp-sexps-per-pause 350
   "Pause after this many iterations to check for user input.
 If user input is pending, stop the parse.  This makes for a
@@ -583,7 +120,7 @@ second.")
         (1+ context-coloring-elisp-sexp-count))
   (when (and (zerop (% context-coloring-elisp-sexp-count
                        context-coloring-elisp-sexps-per-pause))
-             context-coloring-parse-interruptable-p
+             context-coloring-interruptable-p
              (input-pending-p))
     (throw 'interrupted t)))
 
@@ -1074,7 +611,7 @@ It could be a quoted or backquoted expression."
   (context-coloring-elisp-increment-sexp-count)
   (let ((start (point)))
     (forward-sexp)
-    (context-coloring-colorize-comments-and-strings start (point))))
+    (context-coloring-elisp-colorize-comments-and-strings start (point))))
 
 ;; Elisp has whitespace, words, symbols, open/close parenthesis, expression
 ;; prefix, string quote, comment starters/enders and escape syntax classes 
only.
@@ -1151,6 +688,7 @@ It could be a quoted or backquoted expression."
         ;; unbalanced.  Just swallow them.  (`progn' for test coverage.)
         (scan-error (progn))))))
 
+;;;###autoload
 (defun context-coloring-elisp-colorize ()
   "Color the current Emacs Lisp buffer."
   (interactive)
@@ -1159,7 +697,7 @@ It could be a quoted or backquoted expression."
      (cond
       ;; Just colorize the changed region.
       (context-coloring-changed-p
-       (let* ( ;; Prevent `beginning-of-defun' from making poor assumptions.
+       (let* (;; Prevent `beginning-of-defun' from making poor assumptions.
               (open-paren-in-column-0-is-defun-start nil)
               ;; Seek the beginning and end of the previous and next
               ;; offscreen defuns, so just enough is colored.
@@ -1184,6 +722,15 @@ It could be a quoted or backquoted expression."
       (t
        (context-coloring-elisp-colorize-region-initially (point-min) 
(point-max)))))))
 
+;;;###autoload
+(puthash
+ 'emacs-lisp
+ (list :modes '(emacs-lisp-mode lisp-interaction-mode)
+       :colorizer #'context-coloring-elisp-colorize
+       :setup #'context-coloring-setup-idle-change-detection
+       :teardown #'context-coloring-teardown-idle-change-detection)
+ context-coloring-dispatch-hash-table)
+
 
 ;;; eval-expression colorization
 
@@ -1191,6 +738,7 @@ It could be a quoted or backquoted expression."
   "Determine expression start in `eval-expression'."
   (string-match "\\`Eval: " (buffer-string)))
 
+;;;###autoload
 (defun context-coloring-eval-expression-colorize ()
   "Color the `eval-expression' minibuffer prompt as elisp."
   (interactive)
@@ -1202,207 +750,24 @@ It could be a quoted or backquoted expression."
         (1+ (match-end 0)))
       (point-max)))))
 
-
-;;; Dispatch
-
-(defvar context-coloring-dispatch-hash-table (make-hash-table :test #'eq)
-  "Map dispatch strategy names to their property lists.")
-
-(defvar context-coloring-mode-hash-table (make-hash-table :test #'eq)
-  "Map major mode names to dispatch property lists.")
-
-(defvar context-coloring-dispatch-predicates '()
-  "Functions which may return a dispatch.")
-
-(defun context-coloring-get-current-dispatch ()
-  "Return the first dispatch appropriate for the current state."
-  (let ((predicates context-coloring-dispatch-predicates)
-        (parent major-mode)
-        dispatch)
-    ;; Maybe a predicate will be satisfied and return a dispatch.
-    (while (and predicates
-                (not (setq dispatch (funcall (pop predicates))))))
-    ;; If not, maybe a major mode (or a derivative) will define a dispatch.
-    (when (not dispatch)
-      (while (and parent
-                  (not (setq dispatch (gethash parent 
context-coloring-mode-hash-table)))
-                  (setq parent (get parent 'derived-mode-parent)))))
-    dispatch))
-
-(defun context-coloring-define-dispatch (symbol &rest properties)
-  "Define a new dispatch named SYMBOL with PROPERTIES.
-
-A \"dispatch\" is a property list describing a strategy for
-coloring a buffer.
-
-PROPERTIES must include one of `:modes' or `:predicate', and a
-`:colorizer'.
-
-`:modes' - List of major modes this dispatch is valid for.
-
-`:predicate' - Function that determines if the dispatch is valid
-for any given state.
-
-`:colorizer' - Function that parses and colors the buffer.
-
-`:delay' - Delay between buffer update and colorization, to
-override `context-coloring-default-delay'.
-
-`:setup' - Arbitrary code to set up this dispatch when
-`context-coloring-mode' is enabled.
-
-`:teardown' - Arbitrary code to tear down this dispatch when
-`context-coloring-mode' is disabled."
-  (let ((modes (plist-get properties :modes))
-        (predicate (plist-get properties :predicate))
-        (colorizer (plist-get properties :colorizer)))
-    (when (null (or modes predicate))
-      (error "No mode or predicate defined for dispatch"))
-    (when (not colorizer)
-      (error "No colorizer defined for dispatch"))
-    (puthash symbol properties context-coloring-dispatch-hash-table)
-    (dolist (mode modes)
-      (puthash mode properties context-coloring-mode-hash-table))
-    (when predicate
-      (push (lambda ()
-              (when (funcall predicate)
-                properties)) context-coloring-dispatch-predicates))))
-
-(defun context-coloring-dispatch ()
-  "Determine how to color the current buffer, and color it."
-  (let* ((dispatch (context-coloring-get-current-dispatch))
-         (colorizer (plist-get dispatch :colorizer)))
-    (catch 'interrupted
-      (funcall colorizer))))
-
-
-;;; Colorization
-
-(defun context-coloring-colorize ()
-  "Color the current buffer by function context."
-  (interactive)
-  (context-coloring-update-maximum-face)
-  (context-coloring-dispatch))
-
-(defun context-coloring-colorize-with-buffer (buffer)
-  "Color BUFFER."
-  ;; Don't select deleted buffers.
-  (when (get-buffer buffer)
-    (with-current-buffer buffer
-      (context-coloring-colorize))))
-
-
-;;; Built-in dispatches
-
-(context-coloring-define-dispatch
- 'javascript
- :modes '(js2-mode)
- :colorizer #'context-coloring-js2-colorize
- :setup
- (lambda ()
-   (add-hook 'js2-post-parse-callbacks #'context-coloring-colorize nil t))
- :teardown
- (lambda ()
-   (remove-hook 'js2-post-parse-callbacks #'context-coloring-colorize t)))
-
-(context-coloring-define-dispatch
- 'emacs-lisp
- :modes '(emacs-lisp-mode)
- :colorizer #'context-coloring-elisp-colorize
- :delay 0.016 ;; Thanks to lazy colorization this can be 60 frames per second.
- :setup #'context-coloring-setup-idle-change-detection
- :teardown #'context-coloring-teardown-idle-change-detection)
-
 ;; `eval-expression-minibuffer-setup-hook' is not available in Emacs 24.3, so
 ;; the backwards-compatible recommendation is to use `minibuffer-setup-hook' 
and
 ;; rely on this predicate instead.
+;;;###autoload
 (defun context-coloring-eval-expression-predicate ()
   "Non-nil if the minibuffer is for `eval-expression'."
   ;; Kinda better than checking `this-command', because `this-command' changes.
   (context-coloring-eval-expression-match))
 
-(context-coloring-define-dispatch
- 'eval-expression
- :predicate #'context-coloring-eval-expression-predicate
- :colorizer #'context-coloring-eval-expression-colorize
- :delay 0.016
- :setup #'context-coloring-setup-idle-change-detection
- :teardown #'context-coloring-teardown-idle-change-detection)
-
-(defvar context-coloring-ignore-unavailable-predicates
-  (list
-   #'minibufferp)
-  "Cases when \"unavailable\" messages are silenced.
-Necessary in editing states where coloring is only sometimes
-permissible.")
-
-(defun context-coloring-ignore-unavailable-message-p ()
-  "Determine if the unavailable message should be silenced."
-  (let ((predicates context-coloring-ignore-unavailable-predicates)
-        (ignore-p nil))
-    (while (and predicates
-                (not ignore-p))
-      (setq ignore-p (funcall (pop predicates))))
-    ignore-p))
-
-
-;;; Minor mode
-
 ;;;###autoload
-(define-minor-mode context-coloring-mode
-  "Toggle contextual code coloring.
-With a prefix argument ARG, enable Context Coloring mode if ARG
-is positive, and disable it otherwise.  If called from Lisp,
-enable the mode if ARG is omitted or nil.
-
-Context Coloring mode is a buffer-local minor mode.  When
-enabled, code is colored by scope.  Scopes are colored
-hierarchically.  Variables referenced from nested scopes retain
-the color of their defining scopes.  Certain syntax, like
-comments and strings, is still colored with `font-lock'.
-
-The entire buffer is colored initially.  Changes to the buffer
-trigger recoloring.
-
-Define your own colors by customizing faces like
-`context-coloring-level-N-face', where N is a number starting
-from 0.  If no face is found on a custom theme nor the `user'
-theme, the defaults are used.
-
-New language / major mode support can be added with
-`context-coloring-define-dispatch', which see.
-
-Feature inspired by Douglas Crockford."
-  nil " Context" nil
-  (cond
-   (context-coloring-mode
-    ;; Font lock is incompatible with this mode; the converse is also true.
-    (font-lock-mode 0)
-    (jit-lock-mode nil)
-    ;; ...but we do use font-lock functions here.
-    (font-lock-set-defaults)
-    ;; Safely change the value of this function as necessary.
-    (make-local-variable 'font-lock-syntactic-face-function)
-    (let ((dispatch (context-coloring-get-current-dispatch)))
-      (cond
-       (dispatch
-        (let ((setup (plist-get dispatch :setup)))
-          (when setup
-            (funcall setup))
-          ;; Colorize once initially.
-          (let ((context-coloring-parse-interruptable-p nil))
-            (context-coloring-colorize))))
-       ((not (context-coloring-ignore-unavailable-message-p))
-        (message "Context coloring is unavailable here")))))
-   (t
-    (let ((dispatch (context-coloring-get-current-dispatch)))
-      (when dispatch
-        (let ((teardown (plist-get dispatch :teardown)))
-          (when teardown
-            (funcall teardown)))))
-    (font-lock-mode)
-    (jit-lock-mode t))))
+(puthash
+ 'eval-expression
+ (list :predicate #'context-coloring-eval-expression-predicate
+       :colorizer #'context-coloring-eval-expression-colorize
+       :setup #'context-coloring-setup-idle-change-detection
+       :teardown #'context-coloring-teardown-idle-change-detection)
+ context-coloring-dispatch-hash-table)
 
-(provide 'context-coloring)
+(provide 'context-coloring-emacs-lisp)
 
-;;; context-coloring.el ends here
+;;; context-coloring-emacs-lisp.el ends here
diff --git a/packages/context-coloring/context-coloring-javascript.el 
b/packages/context-coloring/context-coloring-javascript.el
new file mode 100644
index 0000000..d145184
--- /dev/null
+++ b/packages/context-coloring/context-coloring-javascript.el
@@ -0,0 +1,232 @@
+;;; context-coloring-javascript.el --- JavaScript support  -*- 
lexical-binding: t; -*-
+
+;; Copyright (C) 2014-2016  Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; 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:
+
+;; Add JavaScript context coloring support with js2-mode.
+
+;;; Code:
+
+(require 'context-coloring)
+(require 'js2-mode)
+
+
+;;; JavaScript colorization
+
+(defvar-local context-coloring-js2-scope-level-hash-table nil
+  "Associate `js2-scope' structures and with their scope
+  levels.")
+
+(defcustom context-coloring-javascript-block-scopes nil
+  "If non-nil, also color block scopes in the scope hierarchy in JavaScript.
+
+The block-scoped `let' and `const' are introduced in ES6.  Enable
+this for ES6 code; disable it elsewhere."
+  :type 'boolean
+  :safe #'booleanp
+  :group 'context-coloring)
+
+(defsubst context-coloring-js2-scope-level (scope initial)
+  "Return the level of SCOPE, starting from INITIAL."
+  (cond ((gethash scope context-coloring-js2-scope-level-hash-table))
+        (t
+         (let ((level initial)
+               (current-scope scope)
+               enclosing-scope)
+           (while (and current-scope
+                       (js2-node-parent current-scope)
+                       (setq enclosing-scope
+                             (js2-node-get-enclosing-scope current-scope)))
+             (when (or context-coloring-javascript-block-scopes
+                       (let ((type (js2-scope-type current-scope)))
+                         (or (= type js2-SCRIPT)
+                             (= type js2-FUNCTION)
+                             (= type js2-CATCH))))
+               (setq level (+ level 1)))
+             (setq current-scope enclosing-scope))
+           (puthash scope level 
context-coloring-js2-scope-level-hash-table)))))
+
+(defsubst context-coloring-js2-local-name-node-p (node)
+  "Determine if NODE represents a local variable."
+  (and (js2-name-node-p node)
+       (let ((parent (js2-node-parent node)))
+         (not (or (and (js2-object-prop-node-p parent)
+                       (eq node (js2-object-prop-node-left parent)))
+                  (and (js2-prop-get-node-p parent)
+                       ;; For nested property lookup, the node on the left is a
+                       ;; `js2-prop-get-node', so this always works.
+                       (eq node (js2-prop-get-node-right parent))))))))
+
+(defvar-local context-coloring-point-max nil
+  "Cached value of `point-max'.")
+
+(defsubst context-coloring-js2-colorize-node (node level)
+  "Color NODE with the color for LEVEL."
+  (let ((start (js2-node-abs-pos node)))
+    (context-coloring-colorize-region
+     start
+     (min
+      ;; End
+      (+ start (js2-node-len node))
+      ;; Somes nodes (like the ast when there is an unterminated multiline
+      ;; comment) will stretch to the value of `point-max'.
+      context-coloring-point-max)
+     level)))
+
+(defun context-coloring-js2-colorize-ast ()
+  "Color the buffer using the `js2-mode' abstract syntax tree."
+  ;; Reset the hash table; the old one could be obsolete.
+  (setq context-coloring-js2-scope-level-hash-table (make-hash-table :test 
#'eq))
+  (setq context-coloring-point-max (point-max))
+  (with-silent-modifications
+    (js2-visit-ast
+     js2-mode-ast
+     (lambda (node end-p)
+       (when (null end-p)
+         (cond
+          ((js2-scope-p node)
+           (context-coloring-js2-colorize-node
+            node
+            (context-coloring-js2-scope-level node 
context-coloring-initial-level)))
+          ((context-coloring-js2-local-name-node-p node)
+           (let* ((enclosing-scope (js2-node-get-enclosing-scope node))
+                  (defining-scope (js2-get-defining-scope
+                                   enclosing-scope
+                                   (js2-name-node-name node))))
+             ;; The tree seems to be walked lexically, so an entire scope will
+             ;; be colored, including its name nodes, before they are reached.
+             ;; Coloring the nodes defined in that scope would be redundant, so
+             ;; don't do it.
+             (when (not (eq defining-scope enclosing-scope))
+               (context-coloring-js2-colorize-node
+                node
+                ;; Use `0' as an initial level so global variables are always 
at
+                ;; the highest level (even if `context-coloring-initial-level'
+                ;; specifies an initial level for the rest of the code).
+                (context-coloring-js2-scope-level defining-scope 0))))))
+         ;; The `t' indicates to search children.
+         t)))
+    (context-coloring-colorize-comments-and-strings)))
+
+(defconst context-coloring-node-comment-regexp
+  (concat
+   ;; Ensure the "//" or "/*" comment starts with the directive.
+   "\\(//[[:space:]]*\\|/\\*[[:space:]]*\\)"
+   ;; Support multiple directive formats.
+   "\\("
+   ;; JSLint and JSHint support a JSON-like format.
+   "\\(jslint\\|jshint\\)[[:space:]].*?node:[[:space:]]*true"
+   "\\|"
+   ;; ESLint just specifies the option name.
+   "eslint-env[[:space:]].*?node"
+   "\\)")
+  "Match a comment body hinting at a Node.js program.")
+
+(defun context-coloring-js2-top-level-local-p ()
+  "Guess whether top-level variables are local.
+For instance, the current file could be a Node.js program."
+  (or
+   ;; A shebang is a pretty obvious giveaway.
+   (string-equal
+    "node"
+    (save-excursion
+      (goto-char (point-min))
+      (when (looking-at auto-mode-interpreter-regexp)
+        (match-string 2))))
+   ;; Otherwise, perform static analysis.
+   (progn
+     (setq context-coloring-js2-scope-level-hash-table (make-hash-table :test 
#'eq))
+     (catch 'node-program-p
+       (js2-visit-ast
+        js2-mode-ast
+        (lambda (node end-p)
+          (when (null end-p)
+            (when
+                (cond
+                 ;; Infer based on inline linter configuration.
+                 ((js2-comment-node-p node)
+                  (string-match-p
+                   context-coloring-node-comment-regexp
+                   (js2-node-string node)))
+                 ;; Infer based on the prescence of certain variables.
+                 ((and (js2-name-node-p node)
+                       (let ((parent (js2-node-parent node)))
+                         (not (and (js2-object-prop-node-p parent)
+                                   (eq node (js2-object-prop-node-left 
parent))))))
+                  (let ((name (js2-name-node-name node))
+                        (parent (js2-node-parent node)))
+                    (and
+                     (cond
+                      ;; Check whether this is "exports.something" or
+                      ;; "module.exports".
+                      ((js2-prop-get-node-p parent)
+                       (and
+                        (eq node (js2-prop-get-node-left parent))
+                        (or (string-equal name "exports")
+                            (let* ((property (js2-prop-get-node-right parent))
+                                   (property-name (js2-name-node-name 
property)))
+                              (and (string-equal name "module")
+                                   (string-equal property-name "exports"))))))
+                      ;; Check whether it's a "require('module')" call.
+                      ((js2-call-node-p parent)
+                       (or (string-equal name "require"))))
+                     (let* ((enclosing-scope (js2-node-get-enclosing-scope 
node))
+                            (defining-scope (js2-get-defining-scope
+                                             enclosing-scope name)))
+                       ;; The variable also must be global.
+                       (null defining-scope))))))
+              (throw 'node-program-p t))
+            ;; The `t' indicates to search children.
+            t)))
+       ;; Default to returning nil from the catch body.
+       nil))))
+
+(defcustom context-coloring-javascript-detect-top-level-scope t
+  "If non-nil, detect when to use file-level scope."
+  :type 'boolean
+  :group 'context-coloring)
+
+;;;###autoload
+(defun context-coloring-js2-colorize ()
+  "Color the buffer using the `js2-mode'."
+  (cond
+   ;; Increase the initial level if we should.
+   ((and context-coloring-javascript-detect-top-level-scope
+         (context-coloring-js2-top-level-local-p))
+    (let ((context-coloring-initial-level 1))
+      (context-coloring-js2-colorize-ast)))
+   (t
+    (context-coloring-js2-colorize-ast))))
+
+;;;###autoload
+(puthash
+ 'javascript
+ (list :modes '(js2-mode js2-jsx-mode)
+       :colorizer #'context-coloring-js2-colorize
+       :setup
+       (lambda ()
+         (add-hook 'js2-post-parse-callbacks #'context-coloring-colorize nil 
t))
+       :teardown
+       (lambda ()
+         (remove-hook 'js2-post-parse-callbacks #'context-coloring-colorize 
t)))
+ context-coloring-dispatch-hash-table)
+
+(provide 'context-coloring-javascript)
+
+;;; context-coloring-javascript.el ends here
diff --git a/packages/context-coloring/test/context-coloring-test.el 
b/packages/context-coloring/context-coloring-test.el
similarity index 93%
rename from packages/context-coloring/test/context-coloring-test.el
rename to packages/context-coloring/context-coloring-test.el
index c57dce2..1655496 100644
--- a/packages/context-coloring/test/context-coloring-test.el
+++ b/packages/context-coloring/context-coloring-test.el
@@ -1,6 +1,6 @@
-;;; context-coloring-test.el --- Tests for context coloring  -*- 
lexical-binding: t; -*-
+;;; context-coloring-test.el --- Tests for context coloring  -*- 
lexical-binding: t; no-byte-compile: t; -*-
 
-;; Copyright (C) 2014-2015  Free Software Foundation, Inc.
+;; Copyright (C) 2014-2016  Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -27,8 +27,9 @@
 
 (require 'cl-lib)
 (require 'context-coloring)
+(require 'context-coloring-javascript)
+(require 'context-coloring-emacs-lisp)
 (require 'ert)
-(require 'js2-mode)
 
 
 ;;; Test running utilities
@@ -90,9 +91,9 @@ signaled."
                                                   (name)
                                                   (t "generic"))) name)))
              (fixture (cond
-                       (fixture (format "./fixtures/%s" fixture))
-                       (,no-fixture "./fixtures/empty")
-                       (t (format ,(format "./fixtures/%%s.%s" extension) 
name)))))
+                       (fixture (format "./fixtures/test/%s" fixture))
+                       (,no-fixture "./fixtures/test/empty")
+                       (t (format ,(format "./fixtures/test/%%s.%s" extension) 
name)))))
          ,@`((let ((enable-context-coloring-mode 
,enable-context-coloring-mode))
                `(ert-deftest ,test-name ()
                   (context-coloring-test-with-fixture
@@ -111,8 +112,13 @@ signaled."
   :mode #'fundamental-mode
   :no-fixture t)
 
+(defun context-coloring-test-js2-mode ()
+  "Enable js2-mode and parse synchronously."
+  (js2-mode)
+  (js2-reparse))
+
 (context-coloring-test-define-deftest javascript
-  :mode #'js2-mode
+  :mode #'context-coloring-test-js2-mode
   :extension "js"
   :enable-context-coloring-mode t
   :before-each (lambda ()
@@ -225,10 +231,10 @@ signaled."
 
 (context-coloring-test-deftest mode-startup
   (lambda ()
-    (context-coloring-define-dispatch
+    (puthash
      'mode-startup
-     :modes '(context-coloring-test-mode-startup-mode)
-     :colorizer #'ignore)
+     (list :modes '(context-coloring-test-mode-startup-mode))
+     context-coloring-dispatch-hash-table)
     (context-coloring-test-mode-startup-mode)
     (context-coloring-test-assert-causes-coloring
      (context-coloring-mode)))
@@ -239,12 +245,12 @@ signaled."
 
 (context-coloring-test-deftest change-detection
   (lambda ()
-    (context-coloring-define-dispatch
+    (puthash
      'idle-change
-     :modes '(context-coloring-test-change-detection-mode)
-     :colorizer #'ignore
-     :setup #'context-coloring-setup-idle-change-detection
-     :teardown #'context-coloring-teardown-idle-change-detection)
+     (list :modes '(context-coloring-test-change-detection-mode)
+           :setup #'context-coloring-setup-idle-change-detection
+           :teardown #'context-coloring-teardown-idle-change-detection)
+     context-coloring-dispatch-hash-table)
     (context-coloring-test-change-detection-mode)
     (context-coloring-mode)
     (context-coloring-test-assert-causes-coloring
@@ -262,14 +268,6 @@ signaled."
      "Context coloring is unavailable here"
      "*Messages*")))
 
-(context-coloring-test-deftest derived-mode
-  (lambda ()
-    (lisp-interaction-mode)
-    (context-coloring-mode)
-    (context-coloring-test-assert-not-message
-     "Context coloring is unavailable here"
-     "*Messages*")))
-
 (context-coloring-test-deftest unavailable-message-ignored
   (lambda ()
     (minibuffer-with-setup-hook
@@ -283,33 +281,17 @@ signaled."
         [?\C-u]
         [?\M-!])))))
 
-(context-coloring-test-define-derived-mode define-dispatch-error)
-
-(context-coloring-test-deftest define-dispatch-error
-  (lambda ()
-    (context-coloring-test-assert-error
-     (lambda ()
-       (context-coloring-define-dispatch
-        'define-dispatch-no-modes))
-     "No mode or predicate defined for dispatch")
-    (context-coloring-test-assert-error
-     (lambda ()
-       (context-coloring-define-dispatch
-        'define-dispatch-no-strategy
-        :modes '(context-coloring-test-define-dispatch-error-mode)))
-     "No colorizer defined for dispatch")))
-
 (context-coloring-test-define-derived-mode disable-mode)
 
 (context-coloring-test-deftest disable-mode
   (lambda ()
     (let (torn-down)
-      (context-coloring-define-dispatch
+      (puthash
        'disable-mode
-       :modes '(context-coloring-test-disable-mode-mode)
-       :colorizer #'ignore
-       :teardown (lambda ()
-                   (setq torn-down t)))
+       (list :modes '(context-coloring-test-disable-mode-mode)
+             :teardown (lambda ()
+                         (setq torn-down t)))
+       context-coloring-dispatch-hash-table)
       (context-coloring-test-disable-mode-mode)
       (context-coloring-mode)
       (context-coloring-mode -1)
@@ -335,10 +317,10 @@ signaled."
     (custom-set-faces
      '(context-coloring-level-0-face ((t :foreground "#aaaaaa"))))
     (enable-theme 'context-coloring-test-custom-theme)
-    (context-coloring-define-dispatch
+    (puthash
      'theme
-     :modes '(context-coloring-test-custom-theme-mode)
-     :colorizer #'ignore)
+     (list :modes '(context-coloring-test-custom-theme-mode))
+     context-coloring-dispatch-hash-table)
     (context-coloring-test-custom-theme-mode)
     (context-coloring-colorize)
     (context-coloring-test-assert-maximum-face 1)
@@ -899,7 +881,7 @@ nnnn nn")))
           ;; the minibuffer's contents.  The contents are implicitly submitted,
           ;; so we have to ignore the errors in the arbitrary test subject 
code.
           (insert "(ignore-errors (let (a) (message a free)))")
-          (context-coloring-colorize)
+          (context-coloring-mode)
           (context-coloring-test-assert-coloring "
 xxxx: 0000000-000000 1111 111 11111111 1 0000110"))
       ;; Simulate user input because `call-interactively' is blocking and
diff --git a/packages/context-coloring/context-coloring.el 
b/packages/context-coloring/context-coloring.el
index 983315e..06830fd 100644
--- a/packages/context-coloring/context-coloring.el
+++ b/packages/context-coloring/context-coloring.el
@@ -1,11 +1,11 @@
 ;;; context-coloring.el --- Highlight by scope  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2014-2015  Free Software Foundation, Inc.
+;; Copyright (C) 2014-2016  Free Software Foundation, Inc.
 
 ;; Author: Jackson Ray Hamilton <address@hidden>
-;; Version: 7.2.0
+;; Version: 8.0.1
 ;; Keywords: convenience faces tools
-;; Package-Requires: ((emacs "24.3") (js2-mode "20150713"))
+;; Package-Requires: ((emacs "24.3"))
 ;; URL: https://github.com/jacksonrayhamilton/context-coloring
 
 ;; This file is part of GNU Emacs.
@@ -34,8 +34,6 @@
 
 ;;; Code:
 
-(require 'js2-mode)
-
 
 ;;; Utilities
 
@@ -187,11 +185,6 @@ it ain't."
   :type 'float
   :group 'context-coloring)
 
-(make-obsolete-variable
- 'context-coloring-delay
- 'context-coloring-default-delay
- "6.4.0")
-
 (defun context-coloring-cancel-timer (timer)
   "Cancel TIMER."
   (when timer
@@ -241,12 +234,6 @@ it ain't."
    end
    `(face ,(context-coloring-bounded-level-face level))))
 
-(make-obsolete-variable
- 'context-coloring-comments-and-strings
- "use `context-coloring-syntactic-comments' and
- `context-coloring-syntactic-strings' instead."
- "6.1.0")
-
 (defcustom context-coloring-syntactic-comments t
   "If non-nil, also color comments using `font-lock'."
   :type 'boolean
@@ -265,9 +252,10 @@ it ain't."
   "Color a string according to STATE."
   (if (nth 3 state) font-lock-string-face nil))
 
-(defsubst context-coloring-colorize-comments-and-strings (&optional min max)
+(defsubst context-coloring-colorize-comments-and-strings (&optional min max 
keywords-p)
   "Maybe color comments and strings in buffer from MIN to MAX.
-MIN defaults to beginning of buffer.  MAX defaults to end."
+MIN defaults to beginning of buffer.  MAX defaults to end.  If
+KEYWORDS-P is non-nil, also color keywords from MIN to MAX."
   (when (or context-coloring-syntactic-comments
             context-coloring-syntactic-strings)
     (let ((min (or min (point-min)))
@@ -284,959 +272,30 @@ MIN defaults to beginning of buffer.  MAX defaults to 
end."
              font-lock-syntactic-face-function))))
       (save-excursion
         (font-lock-fontify-syntactically-region min max)
-        ;; TODO: Make configurable at the dispatch level.
-        (when (eq major-mode 'emacs-lisp-mode)
+        (when keywords-p
           (font-lock-fontify-keywords-region min max))))))
 
 (defcustom context-coloring-initial-level 0
   "Scope level at which to start coloring.
 
 If top-level variables and functions do not become global, but
-are scoped to a file (as in Node.js), set this to `1'."
+are scoped to a file (as in Node.js), set this to 1."
   :type 'integer
   :safe #'integerp
   :group 'context-coloring)
 
 
-;;; JavaScript colorization
-
-(defvar-local context-coloring-js2-scope-level-hash-table nil
-  "Associate `js2-scope' structures and with their scope
-  levels.")
-
-(defcustom context-coloring-javascript-block-scopes nil
-  "If non-nil, also color block scopes in the scope hierarchy in JavaScript.
-
-The block-scoped `let' and `const' are introduced in ES6.  Enable
-this for ES6 code; disable it elsewhere."
-  :type 'boolean
-  :safe #'booleanp
-  :group 'context-coloring)
-
-(make-obsolete-variable
- 'context-coloring-js-block-scopes
- 'context-coloring-javascript-block-scopes
- "7.0.0")
-
-(defsubst context-coloring-js2-scope-level (scope initial)
-  "Return the level of SCOPE, starting from INITIAL."
-  (cond ((gethash scope context-coloring-js2-scope-level-hash-table))
-        (t
-         (let ((level initial)
-               (current-scope scope)
-               enclosing-scope)
-           (while (and current-scope
-                       (js2-node-parent current-scope)
-                       (setq enclosing-scope
-                             (js2-node-get-enclosing-scope current-scope)))
-             (when (or context-coloring-javascript-block-scopes
-                       (let ((type (js2-scope-type current-scope)))
-                         (or (= type js2-SCRIPT)
-                             (= type js2-FUNCTION)
-                             (= type js2-CATCH))))
-               (setq level (+ level 1)))
-             (setq current-scope enclosing-scope))
-           (puthash scope level 
context-coloring-js2-scope-level-hash-table)))))
-
-(defsubst context-coloring-js2-local-name-node-p (node)
-  "Determine if NODE represents a local variable."
-  (and (js2-name-node-p node)
-       (let ((parent (js2-node-parent node)))
-         (not (or (and (js2-object-prop-node-p parent)
-                       (eq node (js2-object-prop-node-left parent)))
-                  (and (js2-prop-get-node-p parent)
-                       ;; For nested property lookup, the node on the left is a
-                       ;; `js2-prop-get-node', so this always works.
-                       (eq node (js2-prop-get-node-right parent))))))))
-
-(defvar-local context-coloring-point-max nil
-  "Cached value of `point-max'.")
-
-(defsubst context-coloring-js2-colorize-node (node level)
-  "Color NODE with the color for LEVEL."
-  (let ((start (js2-node-abs-pos node)))
-    (context-coloring-colorize-region
-     start
-     (min
-      ;; End
-      (+ start (js2-node-len node))
-      ;; Somes nodes (like the ast when there is an unterminated multiline
-      ;; comment) will stretch to the value of `point-max'.
-      context-coloring-point-max)
-     level)))
-
-(defun context-coloring-js2-colorize-ast ()
-  "Color the buffer using the `js2-mode' abstract syntax tree."
-  ;; Reset the hash table; the old one could be obsolete.
-  (setq context-coloring-js2-scope-level-hash-table (make-hash-table :test 
#'eq))
-  (setq context-coloring-point-max (point-max))
-  (with-silent-modifications
-    (js2-visit-ast
-     js2-mode-ast
-     (lambda (node end-p)
-       (when (null end-p)
-         (cond
-          ((js2-scope-p node)
-           (context-coloring-js2-colorize-node
-            node
-            (context-coloring-js2-scope-level node 
context-coloring-initial-level)))
-          ((context-coloring-js2-local-name-node-p node)
-           (let* ((enclosing-scope (js2-node-get-enclosing-scope node))
-                  (defining-scope (js2-get-defining-scope
-                                   enclosing-scope
-                                   (js2-name-node-name node))))
-             ;; The tree seems to be walked lexically, so an entire scope will
-             ;; be colored, including its name nodes, before they are reached.
-             ;; Coloring the nodes defined in that scope would be redundant, so
-             ;; don't do it.
-             (when (not (eq defining-scope enclosing-scope))
-               (context-coloring-js2-colorize-node
-                node
-                ;; Use `0' as an initial level so global variables are always 
at
-                ;; the highest level (even if `context-coloring-initial-level'
-                ;; specifies an initial level for the rest of the code).
-                (context-coloring-js2-scope-level defining-scope 0))))))
-         ;; The `t' indicates to search children.
-         t)))
-    (context-coloring-colorize-comments-and-strings)))
-
-(defconst context-coloring-node-comment-regexp
-  (concat
-   ;; Ensure the "//" or "/*" comment starts with the directive.
-   "\\(//[[:space:]]*\\|/\\*[[:space:]]*\\)"
-   ;; Support multiple directive formats.
-   "\\("
-   ;; JSLint and JSHint support a JSON-like format.
-   "\\(jslint\\|jshint\\)[[:space:]].*?node:[[:space:]]*true"
-   "\\|"
-   ;; ESLint just specifies the option name.
-   "eslint-env[[:space:]].*?node"
-   "\\)")
-  "Match a comment body hinting at a Node.js program.")
-
-;; TODO: Add ES6 module detection.
-(defun context-coloring-js2-top-level-local-p ()
-  "Guess whether top-level variables are local.
-For instance, the current file could be a Node.js program."
-  (or
-   ;; A shebang is a pretty obvious giveaway.
-   (string-equal
-    "node"
-    (save-excursion
-      (goto-char (point-min))
-      (when (looking-at auto-mode-interpreter-regexp)
-        (match-string 2))))
-   ;; Otherwise, perform static analysis.
-   (progn
-     (setq context-coloring-js2-scope-level-hash-table (make-hash-table :test 
#'eq))
-     (catch 'node-program-p
-       (js2-visit-ast
-        js2-mode-ast
-        (lambda (node end-p)
-          (when (null end-p)
-            (when
-                (cond
-                 ;; Infer based on inline linter configuration.
-                 ((js2-comment-node-p node)
-                  (string-match-p
-                   context-coloring-node-comment-regexp
-                   (js2-node-string node)))
-                 ;; Infer based on the prescence of certain variables.
-                 ((and (js2-name-node-p node)
-                       (let ((parent (js2-node-parent node)))
-                         (not (and (js2-object-prop-node-p parent)
-                                   (eq node (js2-object-prop-node-left 
parent))))))
-                  (let ((name (js2-name-node-name node))
-                        (parent (js2-node-parent node)))
-                    (and
-                     (cond
-                      ;; Check whether this is "exports.something" or
-                      ;; "module.exports".
-                      ((js2-prop-get-node-p parent)
-                       (and
-                        (eq node (js2-prop-get-node-left parent))
-                        (or (string-equal name "exports")
-                            (let* ((property (js2-prop-get-node-right parent))
-                                   (property-name (js2-name-node-name 
property)))
-                              (and (string-equal name "module")
-                                   (string-equal property-name "exports"))))))
-                      ;; Check whether it's a "require('module')" call.
-                      ((js2-call-node-p parent)
-                       (or (string-equal name "require"))))
-                     (let* ((enclosing-scope (js2-node-get-enclosing-scope 
node))
-                            (defining-scope (js2-get-defining-scope
-                                             enclosing-scope name)))
-                       ;; The variable also must be global.
-                       (null defining-scope))))))
-              (throw 'node-program-p t))
-            ;; The `t' indicates to search children.
-            t)))
-       ;; Default to returning nil from the catch body.
-       nil))))
-
-(defcustom context-coloring-javascript-detect-top-level-scope t
-  "If non-nil, detect when to use file-level scope."
-  :type 'boolean
-  :group 'context-coloring)
-
-(defun context-coloring-js2-colorize ()
-  "Color the buffer using the `js2-mode'."
-  (cond
-   ;; Increase the initial level if we should.
-   ((and context-coloring-javascript-detect-top-level-scope
-         (context-coloring-js2-top-level-local-p))
-    (let ((context-coloring-initial-level 1))
-      (context-coloring-js2-colorize-ast)))
-   (t
-    (context-coloring-js2-colorize-ast))))
-
-
-;;; 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)))
-
-(defsubst context-coloring-elisp-forward-sws ()
-  "Move through whitespace and comments, coloring comments."
-  (let ((start (point)))
-    (context-coloring-forward-sws)
-    (context-coloring-colorize-comments-and-strings start (point))))
-
-(defsubst context-coloring-elisp-forward-sexp ()
-  "Skip/ignore missing sexps, coloring comments and strings."
-  (let ((start (point)))
-    (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-exact-regexp (word)
-  "Create a regexp matching exactly WORD."
-  (concat "\\`" (regexp-quote word) "\\'"))
-
-(defsubst context-coloring-exact-or-regexp (words)
-  "Create a regexp matching any exact word in WORDS."
-  (context-coloring-join
-   (mapcar #'context-coloring-exact-regexp words) "\\|"))
-
-(defconst context-coloring-elisp-ignored-word-regexp
-  (context-coloring-join (list "\\`[-+]?[0-9]"
-                               "\\`[&:].+"
-                               (context-coloring-exact-or-regexp
-                                '("t" "nil" "." "?")))
-                         "\\|")
-  "Match symbols that can't be bound as variables.")
-
-(defsubst context-coloring-elisp-identifier-p (syntax-code)
-  "Check if SYNTAX-CODE is an elisp identifier constituent."
-  (or (= syntax-code context-coloring-WORD-CODE)
-      (= syntax-code context-coloring-SYMBOL-CODE)))
-
-(defvar context-coloring-parse-interruptable-p t
-  "Set this to nil to force parse to continue until finished.")
-
-(defconst context-coloring-elisp-sexps-per-pause 350
-  "Pause after this many iterations to check for user input.
-If user input is pending, stop the parse.  This makes for a
-smoother user experience for large files.
-
-This number should trigger pausing at about 60 frames per
-second.")
-
-(defvar context-coloring-elisp-sexp-count 0
-  "Current number of sexps leading up to the next pause.")
-
-(defsubst context-coloring-elisp-increment-sexp-count ()
-  "Maybe check if the user interrupted the current parse."
-  (setq context-coloring-elisp-sexp-count
-        (1+ context-coloring-elisp-sexp-count))
-  (when (and (zerop (% context-coloring-elisp-sexp-count
-                       context-coloring-elisp-sexps-per-pause))
-             context-coloring-parse-interruptable-p
-             (input-pending-p))
-    (throw 'interrupted t)))
-
-(defvar context-coloring-elisp-scope-stack '()
-  "List of scopes in the current parse.")
-
-(defsubst context-coloring-elisp-make-scope (level)
-  "Make a scope object for LEVEL."
-  (list
-   :level level
-   :variables '()))
-
-(defsubst context-coloring-elisp-scope-get-level (scope)
-  "Get the level of SCOPE object."
-  (plist-get scope :level))
-
-(defsubst context-coloring-elisp-scope-add-variable (scope variable)
-  "Add to SCOPE a VARIABLE."
-  (plist-put scope :variables (cons variable (plist-get scope :variables))))
-
-(defsubst context-coloring-elisp-scope-has-variable (scope variable)
-  "Check if SCOPE has VARIABLE."
-  (member variable (plist-get scope :variables)))
-
-(defsubst context-coloring-elisp-get-variable-level (variable)
-  "Return the level of VARIABLE, or 0 if it isn't found."
-  (let* ((scope-stack context-coloring-elisp-scope-stack)
-         scope
-         level)
-    (while (and scope-stack (not level))
-      (setq scope (car scope-stack))
-      (cond
-       ((context-coloring-elisp-scope-has-variable scope variable)
-        (setq level (context-coloring-elisp-scope-get-level scope)))
-       (t
-        (setq scope-stack (cdr scope-stack)))))
-    ;; Assume a global variable.
-    (or level 0)))
-
-(defsubst context-coloring-elisp-get-current-scope-level ()
-  "Get the nesting level of the current scope."
-  (cond
-   ((car context-coloring-elisp-scope-stack)
-    (context-coloring-elisp-scope-get-level (car 
context-coloring-elisp-scope-stack)))
-   (t
-    0)))
-
-(defsubst context-coloring-elisp-push-scope ()
-  "Add a new scope to the bottom of the scope chain."
-  (push (context-coloring-elisp-make-scope
-         (1+ (context-coloring-elisp-get-current-scope-level)))
-        context-coloring-elisp-scope-stack))
-
-(defsubst context-coloring-elisp-pop-scope ()
-  "Remove the scope on the bottom of the scope chain."
-  (pop context-coloring-elisp-scope-stack))
-
-(defsubst context-coloring-elisp-add-variable (variable)
-  "Add VARIABLE to the current scope."
-  (context-coloring-elisp-scope-add-variable
-   (car context-coloring-elisp-scope-stack)
-   variable))
-
-(defsubst context-coloring-elisp-parse-bindable (callback)
-  "Parse the symbol at point.
-If the symbol can be bound, invoke CALLBACK with it."
-  (let* ((arg-string (buffer-substring-no-properties
-                      (point)
-                      (progn (context-coloring-elisp-forward-sexp)
-                             (point)))))
-    (when (not (string-match-p
-                context-coloring-elisp-ignored-word-regexp
-                arg-string))
-      (funcall callback arg-string))))
-
-(defun context-coloring-elisp-parse-let-varlist (type)
-  "Parse the list of variable initializers at point.
-If TYPE is `let', all the variables are bound after all their
-initializers are parsed; if TYPE is `let*', each variable is
-bound immediately after its own initializer is parsed."
-  (let ((varlist '())
-        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
-       ((= syntax-code context-coloring-OPEN-PARENTHESIS-CODE)
-        (forward-char)
-        (context-coloring-elisp-forward-sws)
-        (setq syntax-code (context-coloring-get-syntax-code))
-        (when (context-coloring-elisp-identifier-p syntax-code)
-          (context-coloring-elisp-parse-bindable
-           (lambda (var)
-             (push var varlist)))
-          (context-coloring-elisp-forward-sws)
-          (setq syntax-code (context-coloring-get-syntax-code))
-          (when (/= syntax-code context-coloring-CLOSE-PARENTHESIS-CODE)
-            (context-coloring-elisp-colorize-sexp)))
-        (context-coloring-elisp-forward-sws)
-        ;; Skip past the closing parenthesis.
-        (forward-char))
-       ((context-coloring-elisp-identifier-p syntax-code)
-        (context-coloring-elisp-parse-bindable
-         (lambda (var)
-           (push var varlist))))
-       (t
-        ;; Ignore artifacts.
-        (context-coloring-elisp-forward-sexp)))
-      (when (eq type 'let*)
-        (context-coloring-elisp-add-variable (pop varlist)))
-      (context-coloring-elisp-forward-sws))
-    (when (eq type 'let)
-      (while varlist
-        (context-coloring-elisp-add-variable (pop varlist))))
-    ;; Exit.
-    (forward-char)))
-
-(defun context-coloring-elisp-parse-arglist ()
-  "Parse the list of function arguments at point."
-  (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
-       ((context-coloring-elisp-identifier-p syntax-code)
-        (context-coloring-elisp-parse-bindable
-         (lambda (arg)
-           (context-coloring-elisp-add-variable arg))))
-       (t
-        ;; Ignore artifacts.
-        (context-coloring-elisp-forward-sexp)))
-      (context-coloring-elisp-forward-sws))
-    ;; Exit.
-    (forward-char)))
-
-(defun context-coloring-elisp-skip-callee-name ()
-  "Skip past the opening parenthesis and name of a function."
-  ;; Enter.
-  (forward-char)
-  (context-coloring-elisp-forward-sws)
-  ;; Skip past the function name.
-  (forward-sexp)
-  (context-coloring-elisp-forward-sws))
-
-(defun context-coloring-elisp-colorize-scope (callback)
-  "Color the whole scope at point with its one color.
-Handle a header in CALLBACK."
-  (let ((start (point))
-        (end (progn (forward-sexp)
-                    (point))))
-    (context-coloring-elisp-push-scope)
-    ;; Splash the whole thing in one color.
-    (context-coloring-colorize-region
-     start
-     end
-     (context-coloring-elisp-get-current-scope-level))
-    ;; Even if the parse is interrupted, this region should still be colored
-    ;; syntactically.
-    (context-coloring-elisp-colorize-comments-and-strings-in-region
-     start
-     end)
-    (goto-char start)
-    (context-coloring-elisp-skip-callee-name)
-    (funcall callback)
-    (context-coloring-elisp-colorize-region (point) (1- end))
-    ;; Exit.
-    (forward-char)
-    (context-coloring-elisp-pop-scope)))
-
-(defun context-coloring-elisp-parse-header (callback)
-  "Parse a function header at point with CALLBACK."
-  (when (= (context-coloring-get-syntax-code) 
context-coloring-OPEN-PARENTHESIS-CODE)
-    (funcall callback)))
-
-(defun context-coloring-elisp-colorize-defun-like (callback)
-  "Color the defun-like function at point.
-Parse the header with CALLBACK."
-  (context-coloring-elisp-colorize-scope
-   (lambda ()
-     (when (context-coloring-elisp-identifier-p 
(context-coloring-get-syntax-code))
-       ;; Color the defun's name with the top-level color.
-       (context-coloring-colorize-region
-        (point)
-        (progn (forward-sexp)
-               (point))
-        0)
-       (context-coloring-elisp-forward-sws)
-       (context-coloring-elisp-parse-header callback)))))
-
-(defun context-coloring-elisp-colorize-defun ()
-  "Color the `defun' at point."
-  (context-coloring-elisp-colorize-defun-like
-   'context-coloring-elisp-parse-arglist))
-
-(defun context-coloring-elisp-colorize-defadvice ()
-  "Color the `defadvice' at point."
-  (context-coloring-elisp-colorize-defun-like
-   (lambda ()
-     (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
-          ((= syntax-code context-coloring-OPEN-PARENTHESIS-CODE)
-           (context-coloring-elisp-parse-arglist))
-          (t
-           ;; Ignore artifacts.
-           (context-coloring-elisp-forward-sexp)))
-         (context-coloring-elisp-forward-sws))))))
-
-(defun context-coloring-elisp-colorize-lambda-like (callback)
-  "Color the lambda-like function at point.
-Parsing the header with CALLBACK."
-  (context-coloring-elisp-colorize-scope
-   (lambda ()
-     (context-coloring-elisp-parse-header callback))))
-
-(defun context-coloring-elisp-colorize-lambda ()
-  "Color the `lambda' at point."
-  (context-coloring-elisp-colorize-lambda-like
-   'context-coloring-elisp-parse-arglist))
-
-(defun context-coloring-elisp-colorize-let ()
-  "Color the `let' at point."
-  (context-coloring-elisp-colorize-lambda-like
-   (lambda ()
-     (context-coloring-elisp-parse-let-varlist 'let))))
-
-(defun context-coloring-elisp-colorize-let* ()
-  "Color the `let*' at point."
-  (context-coloring-elisp-colorize-lambda-like
-   (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)
-    (context-coloring-elisp-skip-callee-name)
-    (while (/= (setq syntax-code (context-coloring-get-syntax-code))
-               context-coloring-CLOSE-PARENTHESIS-CODE)
-      (cond
-       ((= syntax-code context-coloring-OPEN-PARENTHESIS-CODE)
-        ;; Colorize inside the parens.
-        (let ((start (point)))
-          (forward-sexp)
-          (context-coloring-elisp-colorize-region
-           (1+ start) (1- (point)))
-          ;; Exit.
-          (forward-char)))
-       (t
-        ;; Ignore artifacts.
-        (context-coloring-elisp-forward-sexp)))
-      (context-coloring-elisp-forward-sws))
-    ;; Exit.
-    (forward-char)))
-
-(defun context-coloring-elisp-colorize-condition-case ()
-  "Color the `condition-case' at point."
-  (let (syntax-code
-        variable
-        case-pos
-        case-end)
-    (context-coloring-elisp-colorize-scope
-     (lambda ()
-       (setq syntax-code (context-coloring-get-syntax-code))
-       ;; Gracefully ignore missing variables.
-       (when (context-coloring-elisp-identifier-p syntax-code)
-         (context-coloring-elisp-parse-bindable
-          (lambda (parsed-variable)
-            (setq variable parsed-variable)))
-         (context-coloring-elisp-forward-sws))
-       (context-coloring-elisp-colorize-sexp)
-       (context-coloring-elisp-forward-sws)
-       ;; Parse the handlers with the error variable in scope.
-       (when variable
-         (context-coloring-elisp-add-variable variable))
-       (while (/= (setq syntax-code (context-coloring-get-syntax-code))
-                  context-coloring-CLOSE-PARENTHESIS-CODE)
-         (cond
-          ((= syntax-code context-coloring-OPEN-PARENTHESIS-CODE)
-           (setq case-pos (point))
-           (context-coloring-elisp-forward-sexp)
-           (setq case-end (point))
-           (goto-char case-pos)
-           ;; Enter.
-           (forward-char)
-           (context-coloring-elisp-forward-sws)
-           (setq syntax-code (context-coloring-get-syntax-code))
-           (when (/= syntax-code context-coloring-CLOSE-PARENTHESIS-CODE)
-             ;; Skip the condition name(s).
-             (context-coloring-elisp-forward-sexp)
-             ;; Color the remaining portion of the handler.
-             (context-coloring-elisp-colorize-region
-              (point)
-              (1- case-end)))
-           ;; Exit.
-           (forward-char))
-          (t
-           ;; Ignore artifacts.
-           (context-coloring-elisp-forward-sexp)))
-         (context-coloring-elisp-forward-sws))))))
-
-(defun context-coloring-elisp-colorize-dolist ()
-  "Color the `dolist' at point."
-  (let (syntax-code
-        (index 0))
-    (context-coloring-elisp-colorize-scope
-     (lambda ()
-       (setq syntax-code (context-coloring-get-syntax-code))
-       (when (= syntax-code context-coloring-OPEN-PARENTHESIS-CODE)
-         (forward-char)
-         (context-coloring-elisp-forward-sws)
-         (while (/= (setq syntax-code (context-coloring-get-syntax-code))
-                    context-coloring-CLOSE-PARENTHESIS-CODE)
-           (cond
-            ((and
-              (or (= index 0) (= index 2))
-              (context-coloring-elisp-identifier-p syntax-code))
-             ;; Add the first or third name to the scope.
-             (context-coloring-elisp-parse-bindable
-              (lambda (variable)
-                (context-coloring-elisp-add-variable variable))))
-            (t
-             ;; Color artifacts.
-             (context-coloring-elisp-colorize-sexp)))
-           (context-coloring-elisp-forward-sws)
-           (setq index (1+ index)))
-         ;; Exit.
-         (forward-char))))))
-
-(defun context-coloring-elisp-colorize-quote ()
-  "Color the `quote' at point."
-  (let* ((start (point))
-         (end (progn (forward-sexp)
-                     (point))))
-    (context-coloring-colorize-region
-     start
-     end
-     (context-coloring-elisp-get-current-scope-level))
-    (context-coloring-elisp-colorize-comments-and-strings-in-region start 
end)))
-
-(defvar context-coloring-elisp-callee-dispatch-hash-table
-  (let ((table (make-hash-table :test 'equal)))
-    (dolist (callee '("defun" "defun*" "defsubst" "defmacro" "cl-defun" 
"cl-defsubst" "cl-defmacro"))
-      (puthash callee #'context-coloring-elisp-colorize-defun table))
-    (dolist (callee '("condition-case" "condition-case-unless-debug"))
-      (puthash callee #'context-coloring-elisp-colorize-condition-case table))
-    (dolist (callee '("dolist" "dotimes"))
-      (puthash callee #'context-coloring-elisp-colorize-dolist 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)
-    (puthash "quote" #'context-coloring-elisp-colorize-quote table)
-    (puthash "backquote" #'context-coloring-elisp-colorize-backquote table)
-    table)
-  "Map function names to their coloring functions.")
-
-(defun context-coloring-elisp-colorize-parenthesized-sexp ()
-  "Color the sexp enclosed by parenthesis at point."
-  (context-coloring-elisp-increment-sexp-count)
-  (let* ((start (point))
-         (end (progn (forward-sexp)
-                     (point)))
-         (syntax-code (progn (goto-char start)
-                             (forward-char)
-                             ;; Coloring is unnecessary here, it'll happen
-                             ;; presently.
-                             (context-coloring-forward-sws)
-                             (context-coloring-get-syntax-code)))
-         dispatch-function)
-    ;; Figure out if the sexp is a special form.
-    (cond
-     ((and (context-coloring-elisp-identifier-p syntax-code)
-           (setq dispatch-function (gethash
-                                    (buffer-substring-no-properties
-                                     (point)
-                                     (progn (forward-sexp)
-                                            (point)))
-                                    
context-coloring-elisp-callee-dispatch-hash-table)))
-      (goto-char start)
-      (funcall dispatch-function))
-     ;; Not a special form; just colorize the remaining region.
-     (t
-      (context-coloring-colorize-region
-       start
-       end
-       (context-coloring-elisp-get-current-scope-level))
-      (context-coloring-elisp-colorize-region (point) (1- end))
-      (forward-char)))))
-
-(defun context-coloring-elisp-colorize-symbol ()
-  "Color the symbol at point."
-  (context-coloring-elisp-increment-sexp-count)
-  (let* ((symbol-pos (point))
-         (symbol-end (progn (forward-sexp)
-                            (point)))
-         (symbol-string (buffer-substring-no-properties
-                         symbol-pos
-                         symbol-end)))
-    (cond
-     ((string-match-p context-coloring-elisp-ignored-word-regexp 
symbol-string))
-     (t
-      (context-coloring-colorize-region
-       symbol-pos
-       symbol-end
-       (context-coloring-elisp-get-variable-level
-        symbol-string))))))
-
-(defun context-coloring-elisp-colorize-backquote-form ()
-  "Color the backquote form at point."
-  (let ((start (point))
-        (end (progn (forward-sexp)
-                    (point)))
-        char)
-    (goto-char start)
-    (while (> end (progn (forward-char)
-                         (point)))
-      (setq char (char-after))
-      (when (= char context-coloring-COMMA-CHAR)
-        (forward-char)
-        (when (= (char-after) context-coloring-AT-CHAR)
-          ;; If we don't do this "@" could be interpreted as a symbol.
-          (forward-char))
-        (context-coloring-elisp-forward-sws)
-        (context-coloring-elisp-colorize-sexp)))
-    ;; We could probably do this as part of the above loop but it'd be
-    ;; repetitive.
-    (context-coloring-elisp-colorize-comments-and-strings-in-region
-     start end)))
-
-(defun context-coloring-elisp-colorize-backquote ()
-  "Color the `backquote' at point."
-  (context-coloring-elisp-skip-callee-name)
-  (context-coloring-elisp-colorize-backquote-form)
-  ;; Exit.
-  (forward-char))
-
-(defun context-coloring-elisp-colorize-expression-prefix ()
-  "Color the expression prefix and expression at point.
-It could be a quoted or backquoted expression."
-  (context-coloring-elisp-increment-sexp-count)
-  (cond
-   ((/= (char-after) context-coloring-BACKTICK-CHAR)
-    (context-coloring-elisp-forward-sexp))
-   (t
-    (context-coloring-elisp-colorize-backquote-form))))
-
-(defun context-coloring-elisp-colorize-comment ()
-  "Color the comment at point."
-  (context-coloring-elisp-increment-sexp-count)
-  (context-coloring-elisp-forward-sws))
-
-(defun context-coloring-elisp-colorize-string ()
-  "Color the string at point."
-  (context-coloring-elisp-increment-sexp-count)
-  (let ((start (point)))
-    (forward-sexp)
-    (context-coloring-colorize-comments-and-strings start (point))))
-
-;; Elisp has whitespace, words, symbols, open/close parenthesis, expression
-;; prefix, string quote, comment starters/enders and escape syntax classes 
only.
-
-(defun context-coloring-elisp-colorize-sexp ()
-  "Color the sexp at point."
-  (let ((syntax-code (context-coloring-get-syntax-code)))
-    (cond
-     ((= syntax-code context-coloring-OPEN-PARENTHESIS-CODE)
-      (context-coloring-elisp-colorize-parenthesized-sexp))
-     ((context-coloring-elisp-identifier-p syntax-code)
-      (context-coloring-elisp-colorize-symbol))
-     ((= syntax-code context-coloring-EXPRESSION-PREFIX-CODE)
-      (context-coloring-elisp-colorize-expression-prefix))
-     ((= syntax-code context-coloring-STRING-QUOTE-CODE)
-      (context-coloring-elisp-colorize-string))
-     ((= syntax-code context-coloring-ESCAPE-CODE)
-      (forward-char 2)))))
-
-(defun context-coloring-elisp-colorize-comments-and-strings-in-region (start 
end)
-  "Color comments and strings between START and END."
-  (let (syntax-code)
-    (goto-char start)
-    (while (> end (progn (skip-syntax-forward "^\"<\\" end)
-                         (point)))
-      (setq syntax-code (context-coloring-get-syntax-code))
-      (cond
-       ((= syntax-code context-coloring-STRING-QUOTE-CODE)
-        (context-coloring-elisp-colorize-string))
-       ((= syntax-code context-coloring-COMMENT-START-CODE)
-        (context-coloring-elisp-colorize-comment))
-       ((= syntax-code context-coloring-ESCAPE-CODE)
-        (forward-char 2))))))
-
-(defun context-coloring-elisp-colorize-region (start end)
-  "Color everything between START and END."
-  (let (syntax-code)
-    (goto-char start)
-    (while (> end (progn (skip-syntax-forward "^w_('\"<\\" end)
-                         (point)))
-      (setq syntax-code (context-coloring-get-syntax-code))
-      (cond
-       ((= syntax-code context-coloring-OPEN-PARENTHESIS-CODE)
-        (context-coloring-elisp-colorize-parenthesized-sexp))
-       ((context-coloring-elisp-identifier-p syntax-code)
-        (context-coloring-elisp-colorize-symbol))
-       ((= syntax-code context-coloring-EXPRESSION-PREFIX-CODE)
-        (context-coloring-elisp-colorize-expression-prefix))
-       ((= syntax-code context-coloring-STRING-QUOTE-CODE)
-        (context-coloring-elisp-colorize-string))
-       ((= syntax-code context-coloring-COMMENT-START-CODE)
-        (context-coloring-elisp-colorize-comment))
-       ((= syntax-code context-coloring-ESCAPE-CODE)
-        (forward-char 2))))))
-
-(defun context-coloring-elisp-colorize-region-initially (start end)
-  "Begin coloring everything between START and END."
-  (setq context-coloring-elisp-sexp-count 0)
-  (setq context-coloring-elisp-scope-stack '())
-  (let ((inhibit-point-motion-hooks t)
-        (case-fold-search nil)
-        ;; This is a recursive-descent parser, so give it a big stack.
-        (max-lisp-eval-depth (max max-lisp-eval-depth 3000))
-        (max-specpdl-size (max max-specpdl-size 3000)))
-    (context-coloring-elisp-colorize-region start end)))
-
-(defun context-coloring-elisp-colorize-guard (callback)
-  "Silently color in CALLBACK."
-  (with-silent-modifications
-    (save-excursion
-      (condition-case nil
-          (funcall callback)
-        ;; Scan errors can happen virtually anywhere if parenthesis are
-        ;; unbalanced.  Just swallow them.  (`progn' for test coverage.)
-        (scan-error (progn))))))
-
-(defun context-coloring-elisp-colorize ()
-  "Color the current Emacs Lisp buffer."
-  (interactive)
-  (context-coloring-elisp-colorize-guard
-   (lambda ()
-     (cond
-      ;; Just colorize the changed region.
-      (context-coloring-changed-p
-       (let* ( ;; Prevent `beginning-of-defun' from making poor assumptions.
-              (open-paren-in-column-0-is-defun-start nil)
-              ;; Seek the beginning and end of the previous and next
-              ;; offscreen defuns, so just enough is colored.
-              (start (progn (goto-char context-coloring-changed-start)
-                            (while (and (< (point-min) (point))
-                                        (pos-visible-in-window-p))
-                              (end-of-line 0))
-                            (beginning-of-defun)
-                            (point)))
-              (end (progn (goto-char context-coloring-changed-end)
-                          (while (and (> (point-max) (point))
-                                      (pos-visible-in-window-p))
-                            (forward-line 1))
-                          (end-of-defun)
-                          (point))))
-         (context-coloring-elisp-colorize-region-initially start end)
-         ;; Fast coloring is nice, but if the code is not well-formed
-         ;; (e.g. an unclosed string literal is parsed at any time) then
-         ;; there could be leftover incorrectly-colored code offscreen.  So
-         ;; do a clean sweep as soon as appropriate.
-         (context-coloring-schedule-coloring context-coloring-default-delay)))
-      (t
-       (context-coloring-elisp-colorize-region-initially (point-min) 
(point-max)))))))
-
-
-;;; eval-expression colorization
-
-(defun context-coloring-eval-expression-match ()
-  "Determine expression start in `eval-expression'."
-  (string-match "\\`Eval: " (buffer-string)))
-
-(defun context-coloring-eval-expression-colorize ()
-  "Color the `eval-expression' minibuffer prompt as elisp."
-  (interactive)
-  (context-coloring-elisp-colorize-guard
-   (lambda ()
-     (context-coloring-elisp-colorize-region-initially
-      (progn
-        (context-coloring-eval-expression-match)
-        (1+ (match-end 0)))
-      (point-max)))))
-
-
 ;;; Dispatch
 
+;;;###autoload
 (defvar context-coloring-dispatch-hash-table (make-hash-table :test #'eq)
-  "Map dispatch strategy names to their property lists.")
-
-(defvar context-coloring-mode-hash-table (make-hash-table :test #'eq)
-  "Map major mode names to dispatch property lists.")
-
-(defvar context-coloring-dispatch-predicates '()
-  "Functions which may return a dispatch.")
-
-(defun context-coloring-get-current-dispatch ()
-  "Return the first dispatch appropriate for the current state."
-  (let ((predicates context-coloring-dispatch-predicates)
-        (parent major-mode)
-        dispatch)
-    ;; Maybe a predicate will be satisfied and return a dispatch.
-    (while (and predicates
-                (not (setq dispatch (funcall (pop predicates))))))
-    ;; If not, maybe a major mode (or a derivative) will define a dispatch.
-    (when (not dispatch)
-      (while (and parent
-                  (not (setq dispatch (gethash parent 
context-coloring-mode-hash-table)))
-                  (setq parent (get parent 'derived-mode-parent)))))
-    dispatch))
-
-(defun context-coloring-define-dispatch (symbol &rest properties)
-  "Define a new dispatch named SYMBOL with PROPERTIES.
+  "Map dispatch strategy names to their property lists.
 
 A \"dispatch\" is a property list describing a strategy for
 coloring a buffer.
 
-PROPERTIES must include one of `:modes' or `:predicate', and a
-`:colorizer'.
+Its properties must include one of `:modes' or `:predicate', and
+a `:colorizer'.
 
 `:modes' - List of major modes this dispatch is valid for.
 
@@ -1252,28 +311,48 @@ override `context-coloring-default-delay'.
 `context-coloring-mode' is enabled.
 
 `:teardown' - Arbitrary code to tear down this dispatch when
-`context-coloring-mode' is disabled."
-  (let ((modes (plist-get properties :modes))
-        (predicate (plist-get properties :predicate))
-        (colorizer (plist-get properties :colorizer)))
-    (when (null (or modes predicate))
-      (error "No mode or predicate defined for dispatch"))
-    (when (not colorizer)
-      (error "No colorizer defined for dispatch"))
-    (puthash symbol properties context-coloring-dispatch-hash-table)
-    (dolist (mode modes)
-      (puthash mode properties context-coloring-mode-hash-table))
-    (when predicate
-      (push (lambda ()
-              (when (funcall predicate)
-                properties)) context-coloring-dispatch-predicates))))
+`context-coloring-mode' is disabled.")
+
+(defun context-coloring-find-dispatch (predicate)
+  "Find the first dispatch satisfying PREDICATE."
+  (let (found)
+    (maphash
+     (lambda (_ dispatch)
+       (when (and (not found)
+                  (funcall predicate dispatch))
+         (setq found dispatch)))
+     context-coloring-dispatch-hash-table)
+    found))
+
+(defun context-coloring-get-current-dispatch ()
+  "Return the first dispatch appropriate for the current state."
+  (cond
+   ;; Maybe a predicate will be satisfied.
+   ((context-coloring-find-dispatch
+     (lambda (dispatch)
+       (let ((predicate (plist-get dispatch :predicate)))
+         (and predicate (funcall predicate))))))
+   ;; If not, maybe a major mode (or a derivative) will.
+   ((context-coloring-find-dispatch
+     (lambda (dispatch)
+       (let ((modes (plist-get dispatch :modes))
+             match)
+         (while (and modes (not match))
+           (setq match (eq (pop modes) major-mode)))
+         match))))))
+
+(defun context-coloring-before-colorize ()
+  "Set up environment for colorization."
+  (context-coloring-update-maximum-face))
 
 (defun context-coloring-dispatch ()
   "Determine how to color the current buffer, and color it."
   (let* ((dispatch (context-coloring-get-current-dispatch))
          (colorizer (plist-get dispatch :colorizer)))
-    (catch 'interrupted
-      (funcall colorizer))))
+    (context-coloring-before-colorize)
+    (when colorizer
+      (catch 'interrupted
+        (funcall colorizer)))))
 
 
 ;;; Colorization
@@ -1281,7 +360,6 @@ override `context-coloring-default-delay'.
 (defun context-coloring-colorize ()
   "Color the current buffer by function context."
   (interactive)
-  (context-coloring-update-maximum-face)
   (context-coloring-dispatch))
 
 (defun context-coloring-colorize-with-buffer (buffer)
@@ -1292,42 +370,7 @@ override `context-coloring-default-delay'.
       (context-coloring-colorize))))
 
 
-;;; Built-in dispatches
-
-(context-coloring-define-dispatch
- 'javascript
- :modes '(js2-mode)
- :colorizer #'context-coloring-js2-colorize
- :setup
- (lambda ()
-   (add-hook 'js2-post-parse-callbacks #'context-coloring-colorize nil t))
- :teardown
- (lambda ()
-   (remove-hook 'js2-post-parse-callbacks #'context-coloring-colorize t)))
-
-(context-coloring-define-dispatch
- 'emacs-lisp
- :modes '(emacs-lisp-mode)
- :colorizer #'context-coloring-elisp-colorize
- :delay 0.016 ;; Thanks to lazy colorization this can be 60 frames per second.
- :setup #'context-coloring-setup-idle-change-detection
- :teardown #'context-coloring-teardown-idle-change-detection)
-
-;; `eval-expression-minibuffer-setup-hook' is not available in Emacs 24.3, so
-;; the backwards-compatible recommendation is to use `minibuffer-setup-hook' 
and
-;; rely on this predicate instead.
-(defun context-coloring-eval-expression-predicate ()
-  "Non-nil if the minibuffer is for `eval-expression'."
-  ;; Kinda better than checking `this-command', because `this-command' changes.
-  (context-coloring-eval-expression-match))
-
-(context-coloring-define-dispatch
- 'eval-expression
- :predicate #'context-coloring-eval-expression-predicate
- :colorizer #'context-coloring-eval-expression-colorize
- :delay 0.016
- :setup #'context-coloring-setup-idle-change-detection
- :teardown #'context-coloring-teardown-idle-change-detection)
+;;; Minor mode
 
 (defvar context-coloring-ignore-unavailable-predicates
   (list
@@ -1345,8 +388,8 @@ permissible.")
       (setq ignore-p (funcall (pop predicates))))
     ignore-p))
 
-
-;;; Minor mode
+(defvar context-coloring-interruptable-p t
+  "When non-nil, coloring may be interrupted by user input.")
 
 ;;;###autoload
 (define-minor-mode context-coloring-mode
@@ -1376,21 +419,20 @@ Feature inspired by Douglas Crockford."
   nil " Context" nil
   (cond
    (context-coloring-mode
-    ;; Font lock is incompatible with this mode; the converse is also true.
-    (font-lock-mode 0)
-    (jit-lock-mode nil)
-    ;; ...but we do use font-lock functions here.
-    (font-lock-set-defaults)
-    ;; Safely change the value of this function as necessary.
-    (make-local-variable 'font-lock-syntactic-face-function)
     (let ((dispatch (context-coloring-get-current-dispatch)))
       (cond
        (dispatch
+        ;; Font lock is incompatible with this mode; the converse is also true.
+        (font-lock-mode 0)
+        ;; ...but we do use font-lock functions here.
+        (font-lock-set-defaults)
+        ;; Safely change the value of this function as necessary.
+        (make-local-variable 'font-lock-syntactic-face-function)
         (let ((setup (plist-get dispatch :setup)))
           (when setup
             (funcall setup))
           ;; Colorize once initially.
-          (let ((context-coloring-parse-interruptable-p nil))
+          (let ((context-coloring-interruptable-p nil))
             (context-coloring-colorize))))
        ((not (context-coloring-ignore-unavailable-message-p))
         (message "Context coloring is unavailable here")))))
@@ -1400,8 +442,7 @@ Feature inspired by Douglas Crockford."
         (let ((teardown (plist-get dispatch :teardown)))
           (when teardown
             (funcall teardown)))))
-    (font-lock-mode)
-    (jit-lock-mode t))))
+    (turn-on-font-lock-if-desired))))
 
 (provide 'context-coloring)
 
diff --git a/packages/context-coloring/test/fixtures/empty 
b/packages/context-coloring/fixtures/.nosearch
similarity index 100%
copy from packages/context-coloring/test/fixtures/empty
copy to packages/context-coloring/fixtures/.nosearch
diff --git a/packages/context-coloring/benchmark/fixtures/.dir-locals.el 
b/packages/context-coloring/fixtures/benchmark/.dir-locals.el
similarity index 100%
rename from packages/context-coloring/benchmark/fixtures/.dir-locals.el
rename to packages/context-coloring/fixtures/benchmark/.dir-locals.el
diff --git a/packages/context-coloring/benchmark/fixtures/async-0.9.0.js 
b/packages/context-coloring/fixtures/benchmark/async-0.9.0.js
similarity index 100%
rename from packages/context-coloring/benchmark/fixtures/async-0.9.0.js
rename to packages/context-coloring/fixtures/benchmark/async-0.9.0.js
diff --git a/packages/context-coloring/benchmark/fixtures/faces.el 
b/packages/context-coloring/fixtures/benchmark/faces.el
similarity index 100%
rename from packages/context-coloring/benchmark/fixtures/faces.el
rename to packages/context-coloring/fixtures/benchmark/faces.el
diff --git a/packages/context-coloring/benchmark/fixtures/jquery-2.1.1.js 
b/packages/context-coloring/fixtures/benchmark/jquery-2.1.1.js
similarity index 100%
rename from packages/context-coloring/benchmark/fixtures/jquery-2.1.1.js
rename to packages/context-coloring/fixtures/benchmark/jquery-2.1.1.js
diff --git a/packages/context-coloring/benchmark/fixtures/lisp.el 
b/packages/context-coloring/fixtures/benchmark/lisp.el
similarity index 100%
rename from packages/context-coloring/benchmark/fixtures/lisp.el
rename to packages/context-coloring/fixtures/benchmark/lisp.el
diff --git a/packages/context-coloring/benchmark/fixtures/lodash-2.4.1.js 
b/packages/context-coloring/fixtures/benchmark/lodash-2.4.1.js
similarity index 100%
rename from packages/context-coloring/benchmark/fixtures/lodash-2.4.1.js
rename to packages/context-coloring/fixtures/benchmark/lodash-2.4.1.js
diff --git a/packages/context-coloring/benchmark/fixtures/mkdirp-0.5.0.js 
b/packages/context-coloring/fixtures/benchmark/mkdirp-0.5.0.js
similarity index 100%
rename from packages/context-coloring/benchmark/fixtures/mkdirp-0.5.0.js
rename to packages/context-coloring/fixtures/benchmark/mkdirp-0.5.0.js
diff --git a/packages/context-coloring/benchmark/fixtures/simple.el 
b/packages/context-coloring/fixtures/benchmark/simple.el
similarity index 100%
rename from packages/context-coloring/benchmark/fixtures/simple.el
rename to packages/context-coloring/fixtures/benchmark/simple.el
diff --git a/packages/context-coloring/benchmark/fixtures/subr.el 
b/packages/context-coloring/fixtures/benchmark/subr.el
similarity index 100%
rename from packages/context-coloring/benchmark/fixtures/subr.el
rename to packages/context-coloring/fixtures/benchmark/subr.el
diff --git a/packages/context-coloring/fixtures/test/README 
b/packages/context-coloring/fixtures/test/README
new file mode 100644
index 0000000..65f3434
--- /dev/null
+++ b/packages/context-coloring/fixtures/test/README
@@ -0,0 +1,4 @@
+Files in this directory contain text which is matched against some data in
+context-coloring-test.el.  No change can be performed on one without
+matching changes to the other (not even adding/removing whitespace or
+comments).
diff --git a/packages/context-coloring/test/fixtures/block-scopes.js 
b/packages/context-coloring/fixtures/test/block-scopes.js
similarity index 100%
rename from packages/context-coloring/test/fixtures/block-scopes.js
rename to packages/context-coloring/fixtures/test/block-scopes.js
diff --git a/packages/context-coloring/test/fixtures/catch.js 
b/packages/context-coloring/fixtures/test/catch.js
similarity index 100%
rename from packages/context-coloring/test/fixtures/catch.js
rename to packages/context-coloring/fixtures/test/catch.js
diff --git a/packages/context-coloring/test/fixtures/changed.el 
b/packages/context-coloring/fixtures/test/changed.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/changed.el
rename to packages/context-coloring/fixtures/test/changed.el
diff --git a/packages/context-coloring/test/fixtures/comment.el 
b/packages/context-coloring/fixtures/test/comment.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/comment.el
rename to packages/context-coloring/fixtures/test/comment.el
diff --git a/packages/context-coloring/test/fixtures/comments-and-strings.js 
b/packages/context-coloring/fixtures/test/comments-and-strings.js
similarity index 100%
rename from packages/context-coloring/test/fixtures/comments-and-strings.js
rename to packages/context-coloring/fixtures/test/comments-and-strings.js
diff --git a/packages/context-coloring/test/fixtures/cond.el 
b/packages/context-coloring/fixtures/test/cond.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/cond.el
rename to packages/context-coloring/fixtures/test/cond.el
diff --git a/packages/context-coloring/test/fixtures/condition-case.el 
b/packages/context-coloring/fixtures/test/condition-case.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/condition-case.el
rename to packages/context-coloring/fixtures/test/condition-case.el
diff --git a/packages/context-coloring/test/fixtures/defadvice.el 
b/packages/context-coloring/fixtures/test/defadvice.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/defadvice.el
rename to packages/context-coloring/fixtures/test/defadvice.el
diff --git a/packages/context-coloring/test/fixtures/defun.el 
b/packages/context-coloring/fixtures/test/defun.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/defun.el
rename to packages/context-coloring/fixtures/test/defun.el
diff --git a/packages/context-coloring/test/fixtures/dolist.el 
b/packages/context-coloring/fixtures/test/dolist.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/dolist.el
rename to packages/context-coloring/fixtures/test/dolist.el
diff --git a/packages/context-coloring/test/fixtures/empty 
b/packages/context-coloring/fixtures/test/empty
similarity index 100%
copy from packages/context-coloring/test/fixtures/empty
copy to packages/context-coloring/fixtures/test/empty
diff --git a/packages/context-coloring/test/fixtures/empty-varlist.el 
b/packages/context-coloring/fixtures/test/empty-varlist.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/empty-varlist.el
rename to packages/context-coloring/fixtures/test/empty-varlist.el
diff --git a/packages/context-coloring/test/fixtures/function-scopes.js 
b/packages/context-coloring/fixtures/test/function-scopes.js
similarity index 100%
rename from packages/context-coloring/test/fixtures/function-scopes.js
rename to packages/context-coloring/fixtures/test/function-scopes.js
diff --git a/packages/context-coloring/test/fixtures/global.js 
b/packages/context-coloring/fixtures/test/global.js
similarity index 100%
rename from packages/context-coloring/test/fixtures/global.js
rename to packages/context-coloring/fixtures/test/global.js
diff --git a/packages/context-coloring/test/fixtures/ignored.el 
b/packages/context-coloring/fixtures/test/ignored.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/ignored.el
rename to packages/context-coloring/fixtures/test/ignored.el
diff --git a/packages/context-coloring/test/fixtures/initial-level.js 
b/packages/context-coloring/fixtures/test/initial-level.js
similarity index 100%
rename from packages/context-coloring/test/fixtures/initial-level.js
rename to packages/context-coloring/fixtures/test/initial-level.js
diff --git a/packages/context-coloring/test/fixtures/iteration.el 
b/packages/context-coloring/fixtures/test/iteration.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/iteration.el
rename to packages/context-coloring/fixtures/test/iteration.el
diff --git a/packages/context-coloring/test/fixtures/key-names.js 
b/packages/context-coloring/fixtures/test/key-names.js
similarity index 100%
rename from packages/context-coloring/test/fixtures/key-names.js
rename to packages/context-coloring/fixtures/test/key-names.js
diff --git a/packages/context-coloring/test/fixtures/key-values.js 
b/packages/context-coloring/fixtures/test/key-values.js
similarity index 100%
rename from packages/context-coloring/test/fixtures/key-values.js
rename to packages/context-coloring/fixtures/test/key-values.js
diff --git a/packages/context-coloring/test/fixtures/lambda.el 
b/packages/context-coloring/fixtures/test/lambda.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/lambda.el
rename to packages/context-coloring/fixtures/test/lambda.el
diff --git a/packages/context-coloring/test/fixtures/let-star.el 
b/packages/context-coloring/fixtures/test/let-star.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/let-star.el
rename to packages/context-coloring/fixtures/test/let-star.el
diff --git a/packages/context-coloring/test/fixtures/let.el 
b/packages/context-coloring/fixtures/test/let.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/let.el
rename to packages/context-coloring/fixtures/test/let.el
diff --git a/packages/context-coloring/test/fixtures/macroexp-let2.el 
b/packages/context-coloring/fixtures/test/macroexp-let2.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/macroexp-let2.el
rename to packages/context-coloring/fixtures/test/macroexp-let2.el
diff --git a/packages/context-coloring/test/fixtures/property-lookup.js 
b/packages/context-coloring/fixtures/test/property-lookup.js
similarity index 100%
rename from packages/context-coloring/test/fixtures/property-lookup.js
rename to packages/context-coloring/fixtures/test/property-lookup.js
diff --git a/packages/context-coloring/test/fixtures/quote.el 
b/packages/context-coloring/fixtures/test/quote.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/quote.el
rename to packages/context-coloring/fixtures/test/quote.el
diff --git a/packages/context-coloring/test/fixtures/sexp.el 
b/packages/context-coloring/fixtures/test/sexp.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/sexp.el
rename to packages/context-coloring/fixtures/test/sexp.el
diff --git a/packages/context-coloring/test/fixtures/splice.el 
b/packages/context-coloring/fixtures/test/splice.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/splice.el
rename to packages/context-coloring/fixtures/test/splice.el
diff --git a/packages/context-coloring/test/fixtures/string.el 
b/packages/context-coloring/fixtures/test/string.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/string.el
rename to packages/context-coloring/fixtures/test/string.el
diff --git a/packages/context-coloring/test/fixtures/unbalanced-parenthesis.el 
b/packages/context-coloring/fixtures/test/unbalanced-parenthesis.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/unbalanced-parenthesis.el
rename to packages/context-coloring/fixtures/test/unbalanced-parenthesis.el
diff --git a/packages/context-coloring/test/fixtures/unterminated-comment.js 
b/packages/context-coloring/fixtures/test/unterminated-comment.js
similarity index 100%
rename from packages/context-coloring/test/fixtures/unterminated-comment.js
rename to packages/context-coloring/fixtures/test/unterminated-comment.js
diff --git a/packages/context-coloring/test/fixtures/varlist-spacing.el 
b/packages/context-coloring/fixtures/test/varlist-spacing.el
similarity index 100%
rename from packages/context-coloring/test/fixtures/varlist-spacing.el
rename to packages/context-coloring/fixtures/test/varlist-spacing.el
diff --git a/packages/csv-mode/csv-mode.el b/packages/csv-mode/csv-mode.el
index 1e20f8c..5a78995 100644
--- a/packages/csv-mode/csv-mode.el
+++ b/packages/csv-mode/csv-mode.el
@@ -1,11 +1,10 @@
 ;;; csv-mode.el --- Major mode for editing comma/char separated values  -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2003, 2004, 2012, 2013, 2014, 2015  Free Software Foundation, 
Inc
+;; Copyright (C) 2003, 2004, 2012-2016  Free Software Foundation, Inc
 
-;; Author: Francis J. Wright <F.J.Wright at qmul.ac.uk>
+;; Author: "Francis J. Wright" <address@hidden>
 ;; Time-stamp: <23 August 2004>
-;; URL: http://centaur.maths.qmul.ac.uk/Emacs/
-;; Version: 1.5
+;; Version: 1.6
 ;; Keywords: convenience
 
 ;; This package is free software; you can redistribute it and/or modify
@@ -162,7 +161,7 @@ All must be different from the field quote characters, 
`csv-field-quotes'."
 
 (defcustom csv-field-quotes '("\"")
   "Field quotes: a list of *single-character* strings.
-For example: (\"\\\"\"), the default, or (\"\\\"\" \"'\" \"`\").
+For example: (\"\\\"\"), the default, or (\"\\\"\" \"\\='\" \"\\=`\").
 A field can be delimited by a pair of any of these characters.
 All must be different from the field separators, `csv-separators'."
   :type '(repeat string)
@@ -220,7 +219,7 @@ Changing this variable does not affect any existing CSV 
mode buffer."
         (set-default 'csv-comment-start value)))
 
 (defcustom csv-align-style 'left
-  "Aligned field style: one of 'left, 'centre, 'right or 'auto.
+  "Aligned field style: one of `left', `centre', `right' or `auto'.
 Alignment style used by `csv-align-fields'.
 Auto-alignment means left align text and right align numbers."
   :type '(choice (const left) (const centre)
@@ -448,8 +447,8 @@ Assumes point is at beginning of line."
 (defun csv-interactive-args (&optional type)
   "Get arg or field(s) and region interactively, offering sensible defaults.
 Signal an error if the buffer is read-only.
-If TYPE is noarg then return a list `(beg end)'.
-Otherwise, return a list `(arg beg end)', where arg is:
+If TYPE is noarg then return a list (beg end).
+Otherwise, return a list (arg beg end), where arg is:
   the raw prefix argument by default\;
   a single field index if TYPE is single\;
   a list of field indices or index ranges if TYPE is multiple.
@@ -958,6 +957,16 @@ The fields yanked are those last killed by 
`csv-kill-fields'."
 ;;;  Aligning fields
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+(defun csv--make-overlay (beg end &optional buffer front-advance rear-advance 
props)
+  (let ((o (make-overlay beg end buffer front-advance rear-advance)))
+    (overlay-put o 'csv t)
+    (while props
+      (overlay-put o (pop props) (pop props)))
+    o))
+
+(defun csv--delete-overlay (o)
+  (and (overlay-get o 'csv) (delete-overlay o)))
+
 (defun csv--column-widths ()
   (let ((widths '()))
     ;; Construct list of column widths:
@@ -1069,9 +1078,8 @@ If there is no selected region, default to the whole 
buffer."
                       ;; in Emacs 21.3, neighbouring overlays
                       ;; conflict, so use the following only
                       ;; with hard alignment:
-                      (let ((ol (make-overlay (point) (1+ (point)) nil t)))
-                        (overlay-put ol 'invisible t)
-                        (overlay-put ol 'evaporate t))
+                     (csv--make-overlay (point) (1+ (point)) nil t nil
+                                        '(invisible t evaporate t))
                       (forward-char)))  ; skip separator
 
                    ;; Soft alignment...
@@ -1084,10 +1092,9 @@ If there is no selected region, default to the whole 
buffer."
                         (when (> left-padding 0)
                           ;; Display spaces before first field
                           ;; by overlaying first character:
-                          (overlay-put
-                           (make-overlay beg (1+ beg))
-                           'before-string
-                           (make-string left-padding ?\ )))
+                         (csv--make-overlay
+                          beg (1+ beg) nil nil nil
+                          `(before-string ,(make-string left-padding ?\ ))))
                       ;; Display separator as spaces:
                       (with-silent-modifications
                         (put-text-property
@@ -1098,7 +1105,7 @@ If there is no selected region, default to the whole 
buffer."
                     (setq column (+ column column-width align-padding)))
 
                    (t ;; Do not hide separators...
-                    (let ((overlay (make-overlay beg (point) nil nil t)))
+                    (let ((overlay (csv--make-overlay beg (point) nil nil t)))
                       (when (> left-padding 0) ; Pad on the left.
                         ;; Display spaces before field:
                         (overlay-put overlay 'before-string
@@ -1128,7 +1135,7 @@ If there is no selected region, default to the whole 
buffer."
                          (list (region-beginning) (region-end))
                        (list (point-min) (point-max)))))
   ;; Remove any soft alignment:
-  (mapc 'delete-overlay        (overlays-in beg end))
+  (mapc #'csv--delete-overlay (overlays-in beg end))
   (with-silent-modifications
     (remove-list-of-text-properties beg end '(display)))
   (when hard
@@ -1179,7 +1186,7 @@ When called non-interactively, BEG and END specify region 
to process."
            rows columns)
        ;; Remove soft alignment if necessary:
        (when align
-         (mapc 'delete-overlay align)
+         (mapc 'csv--delete-overlay align)
          (setq align t))
        (while (not (eobp))
          (if (csv-not-looking-at-record)
diff --git a/packages/cycle-quotes/cycle-quotes-test.el 
b/packages/cycle-quotes/cycle-quotes-test.el
new file mode 100644
index 0000000..777bd82
--- /dev/null
+++ b/packages/cycle-quotes/cycle-quotes-test.el
@@ -0,0 +1,83 @@
+;;; cycle-quotes-test.el --- Tests for cycle-quotes.el  -*- lexical-binding: 
t; -*-
+
+;; Copyright (C) 2015-2016  Free Software Foundation, Inc.
+
+;; Author: Simen Heggestøyl <address@hidden>
+
+;; 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:
+
+;;; Code:
+
+(require 'cycle-quotes)
+(require 'ert)
+;; For testing triple quotes
+(require 'python)
+
+(ert-deftest test-cycle-quotes--set-quote-chars ()
+  (with-temp-buffer
+    (let ((st (make-syntax-table)))
+      (set-syntax-table st)
+      (modify-syntax-entry ?a "\"")
+      (modify-syntax-entry ?b "\"")
+      (cycle-quotes--set-quote-chars)
+      (should (= (length cycle-quotes--quote-chars) 3))
+      (should (memq ?a cycle-quotes--quote-chars))
+      (should (memq ?b cycle-quotes--quote-chars))
+      (should (memq ?\" cycle-quotes--quote-chars)))))
+
+(ert-deftest test-cycle-quotes--next-quote-char ()
+  (let ((cycle-quotes--quote-chars '(?a)))
+    (should (= (cycle-quotes--next-quote-char ?a) ?a)))
+  (let ((cycle-quotes--quote-chars '(?a ?b)))
+    (should (= (cycle-quotes--next-quote-char ?a) ?b)))
+  (let ((cycle-quotes--quote-chars '(?a ?b ?c)))
+    (should (= (cycle-quotes--next-quote-char ?c) ?a))))
+
+(ert-deftest test-cycle-quotes--fix-escapes ()
+  (with-temp-buffer
+    (insert "b\\baabc\\b")
+    (cycle-quotes--fix-escapes (point-min) (point-max) ?a ?b)
+    (should (equal (buffer-string) "bb\\a\\abcb"))))
+
+(ert-deftest test-cycle-quotes ()
+  (with-temp-buffer
+    (let ((st (make-syntax-table)))
+      (set-syntax-table st)
+      (modify-syntax-entry ?' "\"")
+      (modify-syntax-entry ?` "\"")
+      (insert "\"Hi, it's me!\"")
+      (goto-char 5)
+      (cycle-quotes)
+      (should (equal (buffer-string) "`Hi, it's me!`"))
+      (cycle-quotes)
+      (should (equal (buffer-string) "'Hi, it\\'s me!'"))
+      (cycle-quotes)
+      (should (equal (buffer-string) "\"Hi, it's me!\"")))))
+
+(ert-deftest test-cycle-quotes-triple-quotes ()
+  (with-temp-buffer
+    (python-mode)
+    (insert "'''Triple quotes, as found in Python.'''")
+    (goto-char 5)
+    (cycle-quotes)
+    (should (equal (buffer-string)
+                   "\"\"\"Triple quotes, as found in Python.\"\"\""))
+    (cycle-quotes)
+    (should (equal (buffer-string)
+                   "'''Triple quotes, as found in Python.'''"))))
+
+(provide 'cycle-quotes-test)
+;;; cycle-quotes-test.el ends here
diff --git a/packages/cycle-quotes/cycle-quotes.el 
b/packages/cycle-quotes/cycle-quotes.el
new file mode 100644
index 0000000..53de8ac
--- /dev/null
+++ b/packages/cycle-quotes/cycle-quotes.el
@@ -0,0 +1,145 @@
+;;; cycle-quotes.el --- Cycle between quote styles  -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2015-2016  Free Software Foundation, Inc.
+
+;; Author: Simen Heggestøyl <address@hidden>
+;; Keywords: convenience
+;; Version: 0.1
+
+;; 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 provides the `cycle-quotes' command to cycle between
+;; different string quote styles. For instance, in JavaScript, there's
+;; three string quote characters: ", ` and '.  In a JavaScript buffer,
+;; with point located someplace within the string, `cycle-quotes' will
+;; cycle between the following quote styles each time it's called:
+;;
+;;    --> "Hi, it's me!" --> `Hi, it's me!` --> 'Hi, it\'s me!' --
+;;   |                                                            |
+;;    ------------------------------------------------------------
+;;
+;; As seen in the above example, `cycle-quotes' tries to escape and
+;; unescape quote characters intelligently.
+
+;;; Code:
+
+(defvar-local cycle-quotes--quote-chars '()
+  "A list of string quote characters for the current mode.
+Set the first time `cycle-quotes' is called in a buffer.")
+
+(defvar-local cycle-quotes--quote-chars-mode nil
+  "The latest mode that the quote char list was last computed for.
+If this is different from the current mode, the quote chars need
+to be recomputed.")
+
+(defun cycle-quotes--set-quote-chars ()
+  "Set the quote chars for the current syntax table."
+  (let ((syntax-table (syntax-table)))
+    (while syntax-table
+      (map-char-table
+       (lambda (char-code-or-range syntax)
+         (when (equal (syntax-class syntax) 7)
+           (if (consp char-code-or-range)
+               (let ((from (car char-code-or-range))
+                     (to (cdr char-code-or-range)))
+                 (dolist (char-code (number-sequence from to))
+                   (add-to-list 'cycle-quotes--quote-chars char-code)))
+             (add-to-list
+              'cycle-quotes--quote-chars char-code-or-range))))
+       syntax-table)
+      (setq syntax-table (char-table-parent syntax-table)))
+    (setq-local cycle-quotes--quote-chars-mode major-mode)))
+
+(defun cycle-quotes--next-quote-char (char)
+  "Return quote char after CHAR."
+  (let ((list-from-char (member char cycle-quotes--quote-chars)))
+    (when list-from-char
+      (if (= (length list-from-char) 1)
+          (car cycle-quotes--quote-chars)
+        (cadr list-from-char)))))
+
+(defun cycle-quotes--fix-escapes (beg end escape-char unescape-char)
+  "Fix character escapes between BEG and END.
+Instances of ESCAPE-CHAR will be escaped by `\\', while instances
+where UNESCAPE-CHAR are escaped by `\\' will have their escape
+character removed."
+  (let ((escape-string (string escape-char))
+        (unescape-string (string unescape-char)))
+    (save-excursion
+      (goto-char end)
+      (while (search-backward (concat "\\" unescape-string) beg t)
+        (replace-match unescape-string nil t)))
+    (save-excursion
+      (goto-char end)
+      (while (search-backward escape-string beg t)
+        (replace-match (concat "\\" escape-string) nil t)
+        (forward-char -1)))))
+
+;;;###autoload
+(defun cycle-quotes ()
+  "Cycle between string quote styles."
+  (interactive)
+  (unless (eq major-mode cycle-quotes--quote-chars-mode)
+    (cycle-quotes--set-quote-chars))
+  (if (< (length cycle-quotes--quote-chars) 2)
+      (message "The current mode has no alternative quote syntax")
+    (let ((quote-char (nth 3 (syntax-ppss))))
+      (if (not quote-char)
+          (message "Not inside a string")
+        (let ((inside-generic-string (eq quote-char t))
+              ;; Can't use `save-excursion', because the marker will get
+              ;; deleted if point is at the beginning of the string.
+              (start-pos (point)))
+          (when inside-generic-string
+            (skip-syntax-backward "^|")
+            (forward-char -1)
+            (setq quote-char (char-after)))
+          (let ((new-quote-char
+                 (cycle-quotes--next-quote-char
+                  (if inside-generic-string
+                      (char-after)
+                    quote-char))))
+            (unless inside-generic-string
+              (search-backward-regexp
+               (concat "\\([^\\]" (string quote-char) "\\)\\|"
+                       "^" (string quote-char)))
+              (when (match-beginning 1)
+                (forward-char)))
+            (let ((repeat
+                   ;; Handle multiple quotes, such as Python's triple
+                   ;; quotes.
+                   (save-excursion
+                     (search-forward-regexp
+                      (format "%c+" quote-char))
+                     (- (match-end 0) (match-beginning 0)))))
+              (save-excursion
+                (let ((beg (point)))
+                  (forward-sexp)
+                  ;; `forward-sexp' fails to jump to the matching quote
+                  ;; in some modes, for instance `js2-mode'.
+                  (skip-syntax-backward "^\"|")
+                  (cycle-quotes--fix-escapes
+                   (+ beg 1) (+ (point) 1) new-quote-char quote-char))
+                (delete-char (- repeat))
+                (dotimes (_ repeat)
+                  (insert new-quote-char)))
+              (delete-char repeat)
+              (dotimes (_ repeat)
+                (insert new-quote-char))))
+          (goto-char start-pos))))))
+
+(provide 'cycle-quotes)
+;;; cycle-quotes.el ends here
diff --git a/packages/dbus-codegen/dbus-codegen.el 
b/packages/dbus-codegen/dbus-codegen.el
index 5f60dd1..049d379 100644
--- a/packages/dbus-codegen/dbus-codegen.el
+++ b/packages/dbus-codegen/dbus-codegen.el
@@ -626,7 +626,7 @@ XML is either a string which defines the interface of the 
D-Bus
 proxy, or a Lisp form which returns a string.  The format of the
 string must comply with the standard D-Bus introspection data
 format as described in:
-`http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format>'.
+`http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format'.
 
 INTERFACE is a name of interface which is represented by this
 proxy.
@@ -828,7 +828,7 @@ XML is either a string which defines the interface of the 
D-Bus
 skeleton, or a Lisp form which returns a string.  The format of the
 string must comply with the standard D-Bus introspection data
 format as described in:
-`http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format>'.
+`http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format'.
 
 INTERFACE is a name of interface which is represented by this
 skeleton.
diff --git a/packages/dbus-codegen/tests/dbus-codegen-tests.el 
b/packages/dbus-codegen/tests/dbus-codegen-tests.el
index 2303976..6184c46 100644
--- a/packages/dbus-codegen/tests/dbus-codegen-tests.el
+++ b/packages/dbus-codegen/tests/dbus-codegen-tests.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2015 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -58,7 +58,8 @@
                  '(:array (:dict-entry :string :int32))
                  '(("a" . 1) ("b" . 2) ("c" . 3))))))
 
-(defconst dbus-codegen-tests-introspection-data "\
+(eval-when-compile
+  (defconst dbus-codegen-tests-introspection-data "\
 <node>
   <interface name='org.gtk.GDBus.PeerTestInterface'>
     <method name='HelloPeer'>
@@ -79,7 +80,7 @@
                   value='false'/>
     </property>
   </interface>
-</node>")
+</node>"))
 
 (ert-deftest dbus-codegen-define-proxy ()
   (dbus-codegen-define-proxy test-proxy
diff --git a/packages/debbugs/debbugs-gnu.el b/packages/debbugs/debbugs-gnu.el
index 50487fc..4a69f2b 100644
--- a/packages/debbugs/debbugs-gnu.el
+++ b/packages/debbugs/debbugs-gnu.el
@@ -1,4 +1,4 @@
-;;; debbugs-gnu.el --- interface for the GNU bug tracker
+;;; debbugs-gnu.el --- interface for the GNU bug tracker  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 2011-2016 Free Software Foundation, Inc.
 
@@ -141,18 +141,18 @@
 (require 'debbugs)
 (require 'tabulated-list)
 (require 'add-log)
-(require 'subr-x)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'subr-x))
+(eval-when-compile (require 'cl-lib))
 
 (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-fetch-field "gnus-util")
 (autoload 'gnus-read-ephemeral-emacs-bug-group "gnus-group")
 (autoload 'gnus-summary-article-header "gnus-sum")
 (autoload 'gnus-summary-select-article "gnus-sum")
 (autoload 'gnus-summary-show-article "gnus-sum")
-(autoload 'gnus-with-article-buffer "gnus-art")
 (autoload 'log-edit-insert-changelog "log-edit")
 (autoload 'mail-header-subject "nnheader")
 (autoload 'message-goto-body "message")
@@ -186,11 +186,8 @@
   :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.
+  "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
@@ -204,16 +201,36 @@
              (const "tagged"))
   :version "24.1")
 
+(defcustom debbugs-gnu-send-mail-function nil
+  "A function to send control messages from debbugs.
+If nil, the value of `send-mail-function' is used instead."
+  :type '(radio (const :tag "Use `send-mail-function'" nil)
+               (function-item message-send-mail-with-sendmail)
+               (function-item message-smtpmail-send-it)
+               (function-item mailclient-send-it)
+               (function-item smtpmail-send-it)
+               (function-item feedmail-send-it)
+               (function-item :tag "Use Mailclient package"
+                              message-send-mail-with-mailclient)
+               (function :tag "Other function"))
+  :version "25.1")
+
+(defcustom debbugs-gnu-suppress-closed t
+  "If non-nil, don't show closed bugs."
+  :group 'debbugs-gnu
+  :type 'boolean
+  :version "25.1")
+
 (defconst debbugs-gnu-all-severities
   (mapcar 'cadr (cdr (get 'debbugs-gnu-default-severities 'custom-type)))
-  "*List of all possible severities.")
+  "List of all possible severities.")
 
 (defcustom debbugs-gnu-default-packages '("emacs")
-  "*The list of packages to be searched for."
+  "The list of packages to be searched for."
   ;; <http://debbugs.gnu.org/Packages.html>
   ;; <http://debbugs.gnu.org/cgi/pkgindex.cgi>
   :group 'debbugs-gnu
-  :type '(set (const "adns")
+  :type `(set (const "adns")
              (const "auctex")
              (const "automake")
              (const "cc-mode")
@@ -229,23 +246,29 @@
              (const "guile")
              (const "guix")
              (const "gzip")
+             (const "hyperbole")
              (const "idutils")
              (const "libtool")
              (const "mh-e")
+             (const "oo-browser")
              (const "org-mode")
              (const "parted")
              (const "sed")
+             (const ,(propertize
+                     "test"
+                     'face 'debbugs-gnu-done
+                     'help-echo "This is a pseudo-package for test."))
              (const "vc-dwim")
              (const "woodchuck"))
-  :version "25.1")
+  :version "25.2")
 
 (defconst debbugs-gnu-all-packages
   (mapcar 'cadr (cdr (get 'debbugs-gnu-default-packages 'custom-type)))
-  "*List of all possible package names.")
+  "List of all possible package names.")
 
 (defcustom debbugs-gnu-default-suppress-bugs
   '((pending . "done"))
-  "*A list of specs for bugs to be suppressed.
+  "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 REGEXP a regular
 expression matching the corresponding value, a string.  Showing
@@ -255,12 +278,12 @@ suppressed bugs is toggled by 
`debbugs-gnu-toggle-suppress'."
   :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."
+  "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))
+  :type '(radio (function-item :tag "Use Gnus" gnus)
+               (function-item :tag "Use Rmail" rmail))
   :version "25.1")
 
 (defface debbugs-gnu-archived '((t (:inverse-video t)))
@@ -276,7 +299,7 @@ If this is 'rmail, use Rmail instead."
   "Face for reports that are pending.")
 
 (defface debbugs-gnu-stale '((t (:foreground "orange")))
-  "Face for reports that have not been touched for a week.")
+  "Face for reports that have not been touched for two weeks.")
 
 (defface debbugs-gnu-done '((t (:foreground "DarkGrey")))
   "Face for closed bug reports.")
@@ -317,6 +340,22 @@ a date, value is the cons cell \(BEFORE . AFTER\).")
 The specification which bugs shall be suppressed is taken from
   `debbugs-gnu-default-suppress-bugs'.")
 
+(defcustom debbugs-gnu-emacs-current-release "25.2"
+  "The current Emacs relase developped for."
+  :group 'debbugs-gnu
+  :type '(choice (const "24.5")
+                (const "25.1")
+                (const "25.2"))
+  :version "25.1")
+
+(defconst debbugs-gnu-emacs-blocking-reports
+  '(("24.5" . 19758)
+    ("25.1" . 19759)
+    ("25.2" . 21966))
+  "The IDs of the Emacs report used to track blocking bug reports.
+It is a list of cons cells, each one containing the Emacs
+version (a string) and the bug report number (a number).")
+
 (defun debbugs-gnu-calendar-read (prompt acceptable &optional initial-contents)
   "Return a string read from the minibuffer.
 Derived from `calendar-read'."
@@ -355,7 +394,10 @@ marked as \"client-side filter\"."
            (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))
+       (setq debbugs-gnu-current-suppress
+             (if (not debbugs-gnu-suppress-closed)
+                 nil
+               (null phrase)))
 
        ;; The other queries.
        (catch :finished
@@ -363,13 +405,28 @@ marked as \"client-side filter\"."
            (setq key (completing-read
                       "Enter attribute: "
                       (if phrase
-                          '("severity" "package" "tags" "submitter" "date"
-                            "subject" "status")
-                        '("severity" "package" "archive" "src" "tag"
-                          "owner" "submitter" "maint" "correspondent"
-                          "date" "log_modified" "last_modified"
-                          "found_date" "fixed_date" "unarchived"
-                          "subject" "done" "forwarded" "msgid" "summary"))
+                          (append
+                           '("severity" "package" "tags"
+                             "author" "date" "subject")
+                            ;; Client-side filters.
+                           (mapcar
+                            (lambda (key)
+                              (propertize
+                               key 'face 'debbugs-gnu-done
+                               'help-echo "Client-side filter"))
+                            '("status")))
+                        (append
+                         '("severity" "package" "archive" "src" "status" "tag"
+                           "owner" "submitter" "maint" "correspondent")
+                         ;; Client-side filters.
+                         (mapcar
+                          (lambda (key)
+                            (propertize
+                             key 'face 'debbugs-gnu-done
+                             'help-echo "Client-side filter"))
+                          '("date" "log_modified" "last_modified"
+                            "found_date" "fixed_date" "unarchived"
+                            "subject" "done" "forwarded" "msgid" "summary"))))
                       nil t))
            (cond
             ;; Server-side queries.
@@ -397,21 +454,29 @@ marked as \"client-side filter\"."
                (add-to-list
                 'debbugs-gnu-current-query (cons (intern key) val1))))
 
-            ((member key '("owner" "submitter" "maint" "correspondent"))
+            ((member
+              key '("author" "owner" "submitter" "maint" "correspondent"))
              (setq val1 (read-string "Enter email address: "))
              (when (not (zerop (length val1)))
                (add-to-list
-                'debbugs-gnu-current-query (cons (intern key) val1))))
+                'debbugs-gnu-current-query
+                (cons (intern (if (equal key "author") "@author" key)) val1))))
 
+            ;; Client-side filters.
             ((equal key "status")
              (setq
               val1
-              (completing-read "Enter status: " '("done" "forwarded" "open")))
+              (completing-read
+               (format "Enter status%s: "
+                       (if (null phrase) "" " (client-side filter)"))
+               '("open" "forwarded" "done") nil t))
              (when (not (zerop (length val1)))
-               (add-to-list
-                'debbugs-gnu-current-query (cons (intern key) val1))))
+                (if (null phrase)
+                    (add-to-list
+                     'debbugs-gnu-current-query (cons (intern key) val1))
+                  (add-to-list
+                   'debbugs-gnu-current-filter (cons 'pending val1)))))
 
-            ;; Client-side filters.
             ((member key '("date" "log_modified" "last_modified"
                            "found_date" "fixed_date" "unarchived"))
              (setq val1
@@ -448,14 +513,17 @@ marked as \"client-side filter\"."
                (add-to-list
                 (if phrase
                     'debbugs-gnu-current-query 'debbugs-gnu-current-filter)
-                (cons (intern key) (cons val1 val2)))))
+                (cons (intern
+                       (if (and phrase (equal key "date")) "@cdate" key))
+                      (cons val1 val2)))))
 
+            ;; "subject", "done", "forwarded", "msgid", "summary".
             ((not (zerop (length key)))
              (setq val1
                    (funcall
                     (if phrase 'read-string 'read-regexp)
-                    (format "Enter %s%s"
-                            key (if phrase ": " " (client-side filter)"))))
+                    (format "Enter %s%s: "
+                            key (if phrase "" " (client-side filter)"))))
              (when (not (zerop (length val1)))
                (add-to-list
                 (if phrase
@@ -469,6 +537,13 @@ marked as \"client-side filter\"."
        (debbugs-gnu severities packages archivedp))))
 
 ;;;###autoload
+(defun debbugs-gnu-patches ()
+  "List the bug reports that have been marked as containing a patch."
+  (interactive)
+  (setq debbugs-gnu-current-suppress t)
+  (debbugs-gnu nil debbugs-gnu-default-packages nil nil "patch"))
+
+;;;###autoload
 (defun debbugs-gnu (severities &optional packages archivedp suppress tags)
   "List all outstanding bugs."
   (interactive
@@ -492,49 +567,52 @@ marked as \"client-side filter\"."
       (when (member "tagged" severities)
        (split-string (read-string "User tag(s): ") "," t)))))
 
-  ;; Initialize variables.
-  (when (and (file-exists-p debbugs-gnu-persistency-file)
-            (not debbugs-gnu-local-tags))
-    (with-temp-buffer
-      (insert-file-contents debbugs-gnu-persistency-file)
-      (eval (read (current-buffer)))))
-  ;; 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))))
-
-  ;; 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))
+  (unwind-protect
+      (progn
+       ;; Initialize variables.
+       (when (and (file-exists-p debbugs-gnu-persistency-file)
+                  (not debbugs-gnu-local-tags))
+         (with-temp-buffer
+           (insert-file-contents debbugs-gnu-persistency-file)
+           (eval (read (current-buffer)))))
+       ;; Per default, we suppress retrieved unwanted bugs.
+       (when (and (called-interactively-p 'any)
+                  debbugs-gnu-suppress-closed)
+         (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))))
+
+       ;; 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 bug numbers from debbugs.gnu.org according search criteria."
   (let* ((debbugs-port "gnu.org")
         (bugs (assoc 'bugs query))
-        (tags (assoc 'tag query))
+        (tags (and (member '(severity . "tagged") query) (assoc 'tag query)))
         (local-tags (and (member '(severity . "tagged") query) (not tags)))
         (phrase (assoc 'phrase query))
         args)
@@ -551,8 +629,9 @@ marked as \"client-side filter\"."
                   (cond
                    ((eq (car elt) 'phrase)
                     (list (list :phrase (cdr elt))))
-                   ((eq (car elt) 'date)
-                    (list (list :date (cddr elt) (cadr elt)
+                   ((memq (car elt) '(date @cdate))
+                    (list (list (intern (concat ":" (symbol-name (car elt))))
+                                (cddr elt) (cadr elt)
                                 :operator "NUMBT")))
                    (t
                     (list (list (intern (concat ":" (symbol-name (car elt))))
@@ -578,10 +657,19 @@ marked as \"client-side filter\"."
      ;; 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)
-       (buffer-name "*Emacs Bugs*"))
+(defun debbugs-gnu-show-reports (&optional offline)
+  "Show bug reports.
+If OFFLINE is non-nil, the query is not sent to the server.  Bugs
+are taken from the cache instead."
+  (let* ((inhibit-read-only t)
+        string
+        (buffer-name
+         (cond
+          ((setq string (cdr (assq 'phrase debbugs-gnu-current-query)))
+           (format "*%S Bugs*" string))
+          ((setq string (cdr (assq 'package debbugs-gnu-current-query)))
+           (format "*%s Bugs*" (capitalize string)))
+          (t "*Bugs*"))))
     ;; The tabulated mode sets several local variables.  We must get
     ;; rid of them.
     (when (get-buffer buffer-name)
@@ -591,8 +679,16 @@ marked as \"client-side filter\"."
 
     ;; Print bug reports.
     (dolist (status
-            (apply 'debbugs-get-status
-                   (debbugs-gnu-get-bugs debbugs-gnu-local-query)))
+            (let ((debbugs-cache-expiry (if offline nil debbugs-cache-expiry))
+                  ids)
+              (apply 'debbugs-get-status
+                     (if offline
+                         (progn
+                           (maphash (lambda (key _elem)
+                                      (push key ids))
+                                    debbugs-cache-data)
+                           (sort ids '<))
+                       (debbugs-gnu-get-bugs debbugs-gnu-local-query)))))
       (let* ((id (cdr (assq 'id status)))
             (words
              (mapconcat
@@ -614,7 +710,10 @@ marked as \"client-side filter\"."
             merged)
        (unless (equal (cdr (assq 'pending status)) "pending")
          (setq words (concat words "," (cdr (assq 'pending status)))))
-       (let ((packages (delete "emacs" (cdr (assq 'package status)))))
+       (let ((packages (cdr (assq 'package status))))
+         (dolist (elt packages)
+           (when (member elt debbugs-gnu-default-packages)
+             (setq packages (delete elt packages))))
          (when packages
            (setq words (concat words "," (mapconcat 'identity packages ",")))))
        (when (setq merged (cdr (assq 'mergedwith status)))
@@ -655,8 +754,11 @@ marked as \"client-side filter\"."
                'debbugs-gnu-done)
               ((member "pending" (cdr (assq 'keywords status)))
                'debbugs-gnu-pending)
-              ((= (cdr (assq 'date status))
-                  (cdr (assq 'log_modified status)))
+              ;; For some new bugs `date' and `log_modified' may
+              ;; differ in 1 second.
+              ((< (abs (- (cdr (assq 'date status))
+                          (cdr (assq 'log_modified status))))
+                  3)
                'debbugs-gnu-new)
               ((< (- (float-time)
                      (cdr (assq 'log_modified status)))
@@ -704,7 +806,8 @@ Used instead of `tabulated-list-print-entry'."
        (submitter        (aref cols 2))
        (submitter-length (nth 1 (aref tabulated-list-format 2)))
        (title            (aref cols 3))
-       (title-length     (nth 1 (aref tabulated-list-format 3))))
+       ;; (title-length     (nth 1 (aref tabulated-list-format 3)))
+        )
     (when (and
           ;; We may have a narrowing in effect.
           (or (not debbugs-gnu-limit)
@@ -766,6 +869,11 @@ Used instead of `tabulated-list-print-entry'."
       ;; Package "emacs" has been selected.
       (member '(package . "emacs") debbugs-gnu-local-query)))
 
+(defun debbugs-gnu-manual ()
+  "Display the Debbugs manual in Info mode."
+  (interactive)
+  (info "debbugs-ug"))
+
 (defconst debbugs-gnu-bug-triage-file
   (expand-file-name "../admin/notes/bug-triage" data-directory)
   "The \"bug-triage\" file.")
@@ -839,12 +947,16 @@ Used instead of `tabulated-list-print-entry'."
 
     (define-key-after menu-map [debbugs-gnu-separator2]
       '(menu-item "--") 'debbugs-gnu-bugs)
+    (define-key-after menu-map [debbugs-gnu-manual]
+      '(menu-item "Debbugs Manual" debbugs-gnu-manual
+                 :help "Show Debbugs Manual")
+      'debbugs-gnu-separator2)
     (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)
+      'debbugs-gnu-manual)
     map))
 
 (defun debbugs-gnu-rescan ()
@@ -878,7 +990,7 @@ The following commands are available:
        debbugs-gnu-current-suppress)
   (setq tabulated-list-format [("Id"         5 debbugs-gnu-sort-id)
                               ("State"     20 debbugs-gnu-sort-state)
-                              ("Submitter" 25 t)
+                              ("Submitter" 25 debbugs-gnu-sort-submitter)
                               ("Title"     10 debbugs-gnu-sort-title)])
   (setq tabulated-list-sort-key (cons "Id" nil))
   (setq tabulated-list-printer 'debbugs-gnu-print-entry)
@@ -894,8 +1006,8 @@ The following commands are available:
   '((debbugs-gnu-new . 1)
     (debbugs-gnu-stale . 2)
     (debbugs-gnu-handled . 3)
-    (debbugs-gnu-done . 4)
-    (debbugs-gnu-pending . 5)))
+    (debbugs-gnu-pending . 4)
+    (debbugs-gnu-done . 5)))
 
 (defun debbugs-gnu-get-state-preference (face-string)
   (or (cdr (assq (get-text-property 0 'face face-string)
@@ -920,12 +1032,12 @@ The following commands are available:
        (id2 (cdr (assq 'id (car s2))))
        (age2 (debbugs-gnu-get-state-preference (aref (nth 1 s2) 1))))
     (cond
-     ;; Tagged bugs go to the end.
-     ((and (not (memq id1 debbugs-gnu-local-tags))
-          (memq id2 debbugs-gnu-local-tags))
-      t)
+     ;; Tagged bugs go to the beginning.
      ((and (memq id1 debbugs-gnu-local-tags)
           (not (memq id2 debbugs-gnu-local-tags)))
+      t)
+     ((and (not (memq id1 debbugs-gnu-local-tags))
+          (memq id2 debbugs-gnu-local-tags))
       nil)
      ;; Then, we check the age of the bugs.
      ((< age1 age2)
@@ -938,13 +1050,58 @@ The following commands are available:
       t)
      (t nil))))
 
+(defun debbugs-gnu-sort-submitter (s1 s2)
+  (let ((address1
+        (mail-header-parse-address
+         (decode-coding-string
+          (or (cdr (assq 'originator (car s1))) "") 'utf-8)))
+       (address2
+        (mail-header-parse-address
+         (decode-coding-string
+          (or (cdr (assq 'originator (car s2))) "") 'utf-8))))
+    (cond
+     ;; Bugs I'm the originator of go to the beginning.
+     ((and (string-equal user-mail-address (car address1))
+          (not (string-equal (car address1) (car address2))))
+      t)
+     ((and (string-equal user-mail-address (car address2))
+          (not (string-equal (car address1) (car address2))))
+      nil)
+     ;; Then, we check the originator.  Prefer the name over the address.
+     (t (if (functionp 'string-collate-lessp)
+           (funcall 'string-collate-lessp
+                    (or (cdr address1) (car address1) "")
+                    (or (cdr address2) (car address2) "")
+                    nil t)
+         (string-lessp
+          (downcase (or (cdr address1) (car address1) ""))
+          (downcase (or (cdr address2) (car address2) ""))))))))
+
 (defun debbugs-gnu-sort-title (s1 s2)
-  (let ((owner (if (cdr (assq 'owner (car s1)))
-                  (car (mail-header-parse-address
-                        (decode-coding-string (cdr (assq 'owner (car s1)))
-                                              'utf-8))))))
-    (and (stringp owner)
-        (string-equal owner user-mail-address))))
+  (let ((owner1
+        (car (mail-header-parse-address
+              (decode-coding-string
+               (or (cdr (assq 'owner (car s1))) "") 'utf-8))))
+       (subject1
+        (decode-coding-string (or (cdr (assq 'subject (car s1))) "") 'utf-8))
+       (owner2
+        (car (mail-header-parse-address
+              (decode-coding-string
+               (or (cdr (assq 'owner (car s2))) "") 'utf-8))))
+       (subject2
+        (decode-coding-string (or (cdr (assq 'subject (car s2))) "") 'utf-8)))
+    (cond
+     ;; Bugs I'm the owner of go to the beginning.
+     ((and (string-equal user-mail-address owner1)
+          (not (string-equal owner1 owner2)))
+      t)
+     ((and (string-equal user-mail-address owner2)
+          (not (string-equal owner1 owner2)))
+      nil)
+     ;; Then, we check the title.
+     (t (if (functionp 'string-collate-lessp)
+            (funcall 'string-collate-lessp subject1 subject2 nil t)
+          (string-lessp (downcase subject1) (downcase subject2)))))))
 
 (defun debbugs-gnu-toggle-sort ()
   "Toggle sorting by age and by state."
@@ -987,12 +1144,24 @@ 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)))))
+(defun debbugs-gnu-show-all-blocking-reports (&optional release)
+  "Narrow the display to just the reports that are blocking an Emacs release."
+  (interactive
+   (list
+    (if current-prefix-arg
+       (completing-read
+        "Emacs release: "
+        (mapcar 'identity debbugs-gnu-emacs-blocking-reports)
+        nil t debbugs-gnu-emacs-current-release)
+      debbugs-gnu-emacs-current-release)))
+
+  (let ((blockers
+        (cdr
+         (assq
+          'blockedby
+          (car
+           (debbugs-get-status
+            (cdr (assoc release debbugs-gnu-emacs-blocking-reports)))))))
        (id (debbugs-gnu-current-id t))
        (inhibit-read-only t)
        status)
@@ -1224,6 +1393,62 @@ MERGED is the list of bugs merged with this one."
           (re-search-forward "#\\([0-9]+\\)" nil t)))
      (string-to-number (match-string 1)))))
 
+(defun debbugs-gnu-proper-bug-number (id)
+  "Check that ID is a number string and in the range of existing bugs."
+  (and (string-match "^[1-9][0-9]*$" id)
+       (<= (string-to-number id) (car (debbugs-newest-bugs 1)))))
+
+(defvar debbugs-gnu-completion-table
+  (completion-table-dynamic
+   (lambda (string)
+     (let* ((split (split-string string "-"))
+           (from (and (cdr split) (car split)))
+           (to (or (car (cdr split)) (car split))))
+       (cond
+       ((> (length split) 2) nil)
+       ((and (or (zerop (length from)) (debbugs-gnu-proper-bug-number from))
+             (string-equal to ""))
+        (mapcar
+         (lambda (x) (concat string x))
+         (cons (unless from "-") '("1" "2" "3" "4" "5" "6" "7" "8" "9"))))
+       ((and (or (zerop (length from)) (debbugs-gnu-proper-bug-number from))
+             (debbugs-gnu-proper-bug-number to))
+        (mapcar
+         (lambda (x)
+           (and (debbugs-gnu-proper-bug-number (concat to x))
+                (concat string x)))
+         '("" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9")))))))
+  "Dynamic completion table for reading bug numbers.")
+
+(defun debbugs-gnu-expand-bug-number-list (bug-number-list)
+  "Expand BUG-NUMBER-LIST to a list of singe bug numbers.
+BUG-NUMBER-LIST is a list of bug numbers or bug number ranges, as
+returned by `debbugs-gnu-bugs'."
+  (let (result)
+    (dolist (elt bug-number-list result)
+      (let* ((split (split-string elt "-"))
+            (from (and (cdr split) (car split)))
+            (to (or (car (cdr split)) (car split))))
+       (setq
+        result
+        (cond
+         ((or (> (length split) 2)
+              (zerop (length to)))
+          (user-error "Wrong bug number or range %s" elt))
+         ((null from)
+          (cons to result))
+         ((string-equal from "")
+          (append
+           (mapcar
+            'number-to-string
+            (debbugs-newest-bugs (string-to-number to)))
+           result))
+         (t (append
+             (mapcar
+              'number-to-string
+              (number-sequence (string-to-number from) (string-to-number to)))
+             result))))))))
+
 (defun debbugs-gnu-send-control-message (message &optional reverse)
   "Send a control message for the current bug report.
 You can set the severity or add a tag, or close the report.  If
@@ -1245,15 +1470,18 @@ removed instead."
            "reassign"
            "retitle"
            "patch" "wontfix" "moreinfo" "unreproducible" "fixed" "notabug"
-           "pending" "help" "security" "confirmed"
+           "pending" "help" "security" "confirmed" "easy"
            "usertag")
          nil t)
         current-prefix-arg))
-  (let* ((id (or debbugs-gnu-bug-number        ; Set on group entry.
-                (debbugs-gnu-guess-current-id)
-                (debbugs-gnu-current-id)))
+  (let* ((id (or (debbugs-gnu-current-id t)
+                debbugs-gnu-bug-number ; Set on group entry.
+                (debbugs-gnu-guess-current-id)))
+        (status (debbugs-gnu-current-status))
         (version
-         (when (member message '("close" "done"))
+         (when (and
+                (member message '("close" "done"))
+                (member "emacs" (cdr (assq 'package status))))
            (read-string
             "Version: "
             (cond
@@ -1269,8 +1497,7 @@ removed instead."
               (format "%s.%s"
                       (match-string 1 emacs-version)
                       (match-string 2 emacs-version)))
-             (t emacs-version)))))
-        (status (debbugs-gnu-current-status)))
+             (t emacs-version))))))
     (with-temp-buffer
       (insert "To: address@hidden"
              "From: " (message-make-from) "\n"
@@ -1281,19 +1508,28 @@ removed instead."
               ((member message '("unarchive" "unmerge" "reopen" "noowner"))
                (format "%s %d\n" message id))
               ((member message '("merge" "forcemerge"))
-               (format "%s %d %s\n" message id
-                       (read-string "Merge with bug #: ")))
+               (format
+                "%s %d %s\n" message id
+                (mapconcat
+                 'identity
+                 (debbugs-gnu-expand-bug-number-list
+                  (completing-read-multiple
+                   (format "%s with bug(s) #: " (capitalize message))
+                   debbugs-gnu-completion-table))
+                 " ")))
               ((member message '("block" "unblock"))
                (format
                 "%s %d by %s\n" message id
                 (mapconcat
                  'identity
-                 (completing-read-multiple
-                  (format "%s with bug(s) #: " (capitalize message))
-                  (if (equal message "unblock")
-                      (mapcar 'number-to-string
-                              (cdr (assq 'blockedby status))))
-                  nil (and (equal message "unblock") status))
+                 (debbugs-gnu-expand-bug-number-list
+                  (completing-read-multiple
+                   (format "%s with bug(s) #: " (capitalize message))
+                   (if (equal message "unblock")
+                       (mapcar 'number-to-string
+                               (cdr (assq 'blockedby status)))
+                     debbugs-gnu-completion-table)
+                   nil (and (equal message "unblock") status)))
                  " ")))
               ((equal message "owner")
                (format "owner %d !\n" id))
@@ -1302,9 +1538,9 @@ removed instead."
               ((equal message "reassign")
                (format "reassign %d %s\n" id (read-string "Package(s): ")))
               ((equal message "close")
-               (format "close %d %s\n" id version))
+               (format "close %d %s\n" id (or version "")))
               ((equal message "done")
-               (format "tags %d fixed\nclose %d %s\n" id id version))
+               (format "tags %d fixed\nclose %d %s\n" id id (or version "")))
               ((member message '("donenotabug" "donewontfix"
                                  "doneunreproducible"))
                (format "tags %d %s\nclose %d\n" id (substring message 4) id))
@@ -1326,7 +1562,7 @@ removed instead."
                (format "tags %d%s %s\n"
                        id (if reverse " -" "")
                        message))))
-      (funcall send-mail-function)
+      (funcall (or debbugs-gnu-send-mail-function send-mail-function))
       (remhash id debbugs-cache-data)
       (message-goto-body)
       (message "Control message sent:\n%s"
@@ -1421,12 +1657,23 @@ The following commands are available:
   (let ((args (get-text-property (line-beginning-position) 
'tabulated-list-id)))
     (when args (apply 'debbugs-gnu args))))
 
+(defcustom debbugs-gnu-default-bug-number-list "-10"
+  "The default value used in interactive call of `debbugs-gnu-bugs'.
+It must be a string, containing a comma separated list of bugs or bug ranges."
+  :group 'debbugs-gnu
+  :type 'string
+  :version "25.2")
+
 ;;;###autoload
 (defun debbugs-gnu-bugs (&rest bugs)
   "List all BUGS, a list of bug numbers."
   (interactive
-   (mapcar 'string-to-number
-          (completing-read-multiple "Bug numbers: " nil 'natnump)))
+   (mapcar
+    'string-to-number
+    (debbugs-gnu-expand-bug-number-list
+     (or
+      (completing-read-multiple "Bug numbers: " debbugs-gnu-completion-table)
+      (split-string debbugs-gnu-default-bug-number-list "," t)))))
   (dolist (elt bugs)
     (unless (natnump elt) (signal 'wrong-type-argument (list 'natnump elt))))
   (add-to-list 'debbugs-gnu-current-query (cons 'bugs bugs))
@@ -1434,11 +1681,33 @@ The following commands are available:
   (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.")
+(defcustom debbugs-gnu-trunk-directory "~/src/emacs/trunk/"
+  "The directory where the main source tree lives."
+  :group 'debbugs-gnu
+  :type 'directory
+  :version "25.2")
 
-(defvar debbugs-gnu-branch-directory "~/src/emacs/emacs-25/"
-  "The directory where the previous source tree lives.")
+(defcustom debbugs-gnu-branch-directory "~/src/emacs/emacs-25/"
+  "The directory where the previous source tree lives."
+  :group 'debbugs-gnu
+  :type 'directory
+  :version "25.2")
+
+(defvar debbugs-gnu-current-directory nil
+  "The current source tree directory.")
+
+(defun debbugs-gnu-init-current-directory (&optional branch)
+"Initialize `debbugs-gnu-current-directory'."
+  (setq debbugs-gnu-current-directory
+       (or debbugs-gnu-current-directory
+           (if branch
+               debbugs-gnu-branch-directory
+             debbugs-gnu-trunk-directory)))
+  (unless (file-directory-p debbugs-gnu-current-directory)
+    (setq debbugs-gnu-current-directory
+         (read-file-name
+          "Emacs repository location: "
+          debbugs-gnu-current-directory nil t nil 'file-directory-p))))
 
 (defun debbugs-gnu-apply-patch (&optional branch)
   "Apply the patch from the current message.
@@ -1447,11 +1716,9 @@ If given a prefix, patch in the branch directory 
instead."
   (add-hook 'emacs-lisp-mode-hook 'debbugs-gnu-lisp-mode)
   (add-hook 'diff-mode-hook 'debbugs-gnu-diff-mode)
   (add-hook 'change-log-mode-hook 'debbugs-gnu-change-mode)
-  (let ((rej "/tmp/debbugs-gnu.rej")
+  (debbugs-gnu-init-current-directory branch)
+  (let ((rej (expand-file-name "debbugs-gnu.rej" temporary-file-directory))
        (output-buffer (get-buffer-create "*debbugs patch*"))
-       (dir (if branch
-                debbugs-gnu-branch-directory
-              debbugs-gnu-trunk-directory))
        (patch-buffers nil))
     (when (file-exists-p rej)
       (delete-file rej))
@@ -1460,9 +1727,10 @@ If given a prefix, patch in the branch directory 
instead."
     (gnus-summary-select-article nil t)
     ;; The patches are either in MIME attachements or the main article
     ;; buffer.  Determine which.
-    (gnus-with-article-buffer
+    (with-current-buffer gnus-article-buffer
       (dolist (handle (mapcar 'cdr (gnus-article-mime-handles)))
-       (when (string-match "diff\\|patch" (mm-handle-media-type handle))
+       (when
+           (string-match "diff\\|patch\\|plain" (mm-handle-media-type handle))
          (push (cons (mm-handle-encoding handle)
                      (mm-handle-buffer handle))
                patch-buffers))))
@@ -1471,18 +1739,19 @@ If given a prefix, patch in the branch directory 
instead."
       (article-decode-charset)
       (push (cons nil gnus-article-buffer) patch-buffers))
     (dolist (elem patch-buffers)
-      (with-temp-buffer
+      (with-current-buffer (generate-new-buffer "*debbugs input patch*")
        (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)
+       (debbugs-gnu-fix-patch debbugs-gnu-current-directory)
        (call-process-region (point-min) (point-max)
                             "patch" nil output-buffer nil
                             "-r" rej "--no-backup-if-mismatch"
                             "-l" "-f"
-                            "-d" (expand-file-name dir)
+                            "-d" (expand-file-name
+                                  debbugs-gnu-current-directory)
                             "-p1")))
     (set-buffer output-buffer)
     (when (file-exists-p rej)
@@ -1492,8 +1761,10 @@ If given a prefix, patch in the branch directory 
instead."
     (save-some-buffers t)
     (require 'compile)
     (mapc 'kill-process compilation-in-progress)
-    (compile (format "cd %s; make -k" (expand-file-name "lisp" dir)))
-    (vc-dir dir)
+    (compile
+     (format
+      "cd %s; make -k" (expand-file-name "lisp" 
debbugs-gnu-current-directory)))
+    (vc-dir debbugs-gnu-current-directory)
     (vc-dir-hide-up-to-date)
     (goto-char (point-min))
     (sit-for 1)
@@ -1514,6 +1785,7 @@ If given a prefix, patch in the branch directory instead."
     (goto-char (point-min))))
 
 (defun debbugs-gnu-fix-patch (dir)
+  (require 'diff-mode)
   (setq dir (directory-file-name (expand-file-name dir)))
   (goto-char (point-min))
   (while (re-search-forward diff-file-header-re nil t)
@@ -1546,10 +1818,11 @@ If given a prefix, patch in the branch directory 
instead."
 (defun debbugs-gnu-find-contributor (string)
   "Search through ChangeLogs to find contributors."
   (interactive "sContributor match: ")
+  (debbugs-gnu-init-current-directory)
   (let ((found 0)
        (match (concat "^[0-9].*" string)))
     (dolist (file (directory-files-recursively
-                  debbugs-gnu-trunk-directory "ChangeLog\\(.[0-9]+\\)?$"))
+                  debbugs-gnu-current-directory "ChangeLog\\(.[0-9]+\\)?$"))
       (with-temp-buffer
        (when (file-exists-p file)
          (insert-file-contents file))
@@ -1560,18 +1833,52 @@ If given a prefix, patch in the branch directory 
instead."
     (message "%s is a contributor %d times" string found)
     found))
 
+(defvar debbugs-gnu-patch-subject nil)
+
 (defun debbugs-gnu-insert-changelog ()
   "Add a ChangeLog from a recently applied patch from a third party."
   (interactive)
-  (let (from subject)
-    (gnus-with-article-buffer
+  (let (from subject patch-subject changelog
+            patch-from)
+    (with-current-buffer gnus-article-buffer
       (widen)
       (goto-char (point-min))
-      (setq from (mail-extract-address-components (gnus-fetch-field "from"))
-           subject (gnus-fetch-field "subject")))
+      (setq from (gnus-fetch-field "from")
+           subject (gnus-fetch-field "subject"))
+      ;; If it's a patch formatted the right way, extract that data.
+      (dolist (handle (mapcar 'cdr (gnus-article-mime-handles)))
+       (when (string-match "diff\\|patch\\|plain"
+                           (mm-handle-media-type handle))
+         (with-temp-buffer
+           (insert-buffer-substring (mm-handle-buffer handle))
+           (cond ((eq (mm-handle-encoding handle) 'base64)
+                  (base64-decode-region (point-min) (point-max)))
+                 ((eq (mm-handle-encoding handle) 'quoted-printable)
+                  (quoted-printable-decode-region (point-min) (point-max))))
+           (setq patch-subject
+                 (or (gnus-fetch-field "subject") patch-subject))
+           (setq patch-from
+                 (or (gnus-fetch-field "from") patch-from))
+           (goto-char (point-min))
+           (when (re-search-forward "^[*] " nil t)
+             (let ((start (match-beginning 0)))
+               (while (and (not (eobp))
+                           (not (looking-at "---")))
+                 (forward-line 1))
+               (setq changelog (buffer-substring
+                                start (line-end-position 0)))))))))
+    (setq from (mail-extract-address-components (or patch-from from)))
     (let ((add-log-full-name (car from))
          (add-log-mailing-address (cadr from)))
       (add-change-log-entry-other-window)
+      (when patch-subject
+       (setq-local debbugs-gnu-patch-subject patch-subject))
+      (when changelog
+       (delete-region (line-beginning-position) (point-max))
+       (save-restriction
+         (narrow-to-region (point) (point))
+         (insert changelog)
+         (indent-region (point-min) (point-max))))
       (let ((point (point)))
        (when (string-match "\\(bug#[0-9]+\\)" subject)
          (insert " (" (match-string 1 subject) ")."))
@@ -1587,7 +1894,9 @@ If given a prefix, patch in the branch directory instead."
                          (cadr from))))))
          (goto-char (point-max))
          (end-of-line)
-         (insert "  (tiny change"))
+         (when changelog
+           (insert "\n\n"))
+         (insert "  Copyright-paperwork-exempt: yes"))
        (goto-char point)))))
 
 (defvar debbugs-gnu-lisp-mode-map
@@ -1629,35 +1938,129 @@ If given a prefix, patch in the branch directory 
instead."
 (defun debbugs-gnu-change-checkin ()
   "Prepare checking in the current changes."
   (interactive)
+  (debbugs-gnu-init-current-directory)
   (save-some-buffers t)
-   (when (get-buffer "*vc-dir*")
-     (kill-buffer (get-buffer "*vc-dir*")))
-   (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))
-   (beginning-of-line)
-   (while (search-forward "edited" nil t)
-     (vc-dir-mark)
-     (beginning-of-line))
-   (vc-diff nil)
-   (vc-next-action nil)
-   (log-edit-insert-changelog t)
-   (delete-other-windows)
-   (split-window)
-   (other-window 1)
-   (switch-to-buffer "*vc-diff*")
-   (other-window 1))
+  (when (get-buffer "*vc-dir*")
+    (kill-buffer (get-buffer "*vc-dir*")))
+  (let ((patch-subject debbugs-gnu-patch-subject))
+    (vc-dir debbugs-gnu-current-directory)
+    (goto-char (point-min))
+    (while (not (search-forward "edited" nil t))
+      (sit-for 0.01))
+    (beginning-of-line)
+    (while (search-forward "edited" nil t)
+      (vc-dir-mark)
+      (beginning-of-line))
+    (vc-diff nil)
+    (vc-next-action nil)
+    (delete-region (point-min) (point-max))
+    (log-edit-insert-changelog t)
+    (delete-other-windows)
+    (split-window)
+    (other-window 1)
+    (switch-to-buffer "*vc-diff*")
+    (other-window 1)
+    (when patch-subject
+      (insert "Summary: "
+             (replace-regexp-in-string "^ *\\[PATCH\\] *" "" patch-subject)
+             "\n"))))
+
+(defun debbugs-gnu-save-cache ()
+  "Save the bugs cache to a file."
+  (interactive)
+  (unless debbugs-cache-data
+    (error "No data to cache"))
+  (unless (file-exists-p "~/.emacs.d/debbugs-cache")
+    (make-directory "~/.emacs.d/debbugs-cache" t))
+  (let ((coding-system-for-write 'utf-8))
+    (with-temp-file "~/.emacs.d/debbugs-cache/list"
+      (prin1 debbugs-cache-data (current-buffer)))))
 
 (provide 'debbugs-gnu)
 
 ;;; TODO:
 
-;; * Another random thought - is it possible to implement some local
-;;   cache, so only changed bugs are fetched?  Glenn Morris.
+;; * Extend SOAP interface to get all bugs modified in a given timeframe.
+
+;; * Add debbugs commands to commit messages.
+;;   It'd be nice if the language would be something along the lines of
+;;
+;;   bug#45 done
+;;   bug#45 tags 25.1 fixed
+;;
+;;   That is, that you could drop arbitrary debbugs commands into
+;;   commit messages.
+
+;; * The bug tracker should be aware of repositories, branches,
+;;   commits, contributors, and ticket links or mentions in commit
+;;   messages.
+;;
+;;   For me personally, if I can *see* the specific code that fixes a
+;;   ticket inside the ticket as a commit, and click my way to the
+;;   wider commit and then diff from before that commit against
+;;   today's state of that code, I've built a mental map of the code
+;;   that would otherwise take me a lot of work. That's one common
+;;   workflow. Another is to view several commits that fix a single
+;;   ticket in one place. So it's not revolutionary, just simpler and
+;;   more straightforward for the user.
+;;
+;;   Being able to close a bug just by mentioning it in a certain way
+;;   in the commit message and pushing that commit is also handy. You
+;;   don't have to switch to the bug discussion and duplicate that
+;;   info there manually.
+
+;; * Contributors should be able to tag and notify each other.
+;;
+;;   You mean to (re)assign bugs to particular persons and things like that?
+
+;;   Yes, plus ping someone or a team specifically: "hey, maybe the
+;;   @gnus team should look at this" in a comment.
+
+;; * Markdown should be well supported.
+
+;; * Inline code comments should be easy, and linked to a commit (so
+;;   an updated commit can resolve the comment). This is just the
+;;   essential stuff.
+
+;;   Rebase or amend+force push would update a branch destructively,
+;;   which in a pull request context should show you that a comment
+;;   was for a commit that's no longer in the branch. Furthermore some
+;;   trackers allow you to mark a comment as resolved (e.g. Github
+;;   recently added reactions, which can be used as ad-hoc markup).
+;;
+;;   Even if you don't rebase, but just push a new commit to the
+;;   branch upon review, IIRC both Github and Gitlab can see that the
+;;   changes that started a particular discussion are no longer there
+;;   (and collapse the comment sub-thread a no longer relevant, while
+;;   allowing the user to expand it again if they so wish).
+;;
+;;   I think I'm starting to see what you mean.  You're talking about
+;;   a tight integration where a pull-request is also itself an issue,
+;;   so the comments can be directly on the patch itself.  As opposed
+;;   to having issues and pull-request be two separate things that can
+;;   refer to each other via an indirection.
+;;
+;;   So this is particularly useful/meaningful when reviewing a
+;;   proposed patch from another developer, rather than when
+;;   interacting with an end-user trying to track down some bugs
+;;   here's experiencing (which is the kind of use-case I've had in
+;;   mind when working on BugIt).
+;;
+;;   But indeed, the two use-cases would best be served by the same
+;;   tool since after the bug is tracked a patch might show up to fix
+;;   it, after which a review process will come up.
+;;
+;;   And on the more basic level, compared to flat discussions in
+;;   mailing lists, having separate subthread for each part of the
+;;   patch the reviewer commented on, is great. You can have
+;;   discussion sub-threads in the mailing list too, but people never
+;;   split their emails in pieces that small.
+;;
+;; * The next link in the chain are CI/CD hooks. You can set up a
+;;   Github repo, for instance, to build every pull request before the
+;;   reviewer ever looks, which saves a lot of time with compiled
+;;   languages. It will run tests and so on, but most important is
+;;   that it keeps the context inside the pull request, you don't have
+;;   to go elsewhere.
 
 ;;; debbugs-gnu.el ends here
diff --git a/packages/debbugs/debbugs-org.el b/packages/debbugs/debbugs-org.el
index a95672d..c413d11 100644
--- a/packages/debbugs/debbugs-org.el
+++ b/packages/debbugs/debbugs-org.el
@@ -1,4 +1,4 @@
-;;; debbugs-org.el --- Org-mode interface for the GNU bug tracker
+;;; debbugs-org.el --- Org-mode interface for the GNU bug tracker  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
 
@@ -100,7 +100,7 @@
 
 (require 'debbugs-gnu)
 (require 'org)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 
 ;; Buffer-local variables.
 (defvar debbugs-gnu-local-query)
@@ -109,7 +109,7 @@
 (defconst debbugs-org-severity-priority
   (let ((priority ?A))
     (mapcar
-     (lambda (x) (prog1 (cons x (char-to-string priority)) (incf priority)))
+     (lambda (x) (prog1 (cons x (char-to-string priority)) (cl-incf priority)))
      debbugs-gnu-all-severities))
   "Mapping of debbugs severities to TODO priorities.")
 
@@ -134,119 +134,28 @@ This could be a temporary buffer, or a buffer linked 
with a file.")
 Search arguments are requested interactively.  The \"search
 phrase\" is used for full text search in the bugs database.
 Further key-value pairs are requested until an empty key is
-returned."
+returned.  If a key cannot be queried by a SOAP request, it is
+marked as \"client-side filter\"."
   (interactive)
+  (cl-letf (((symbol-function 'debbugs-gnu-show-reports)
+            #'debbugs-org-show-reports))
+    (call-interactively 'debbugs-gnu-search)))
 
-  (unwind-protect
-      ;; Check for the phrase.
-      (let ((phrase (read-string debbugs-gnu-phrase-prompt))
-            key val1 severities packages)
-
-       (add-to-list 'debbugs-gnu-current-query (cons 'phrase phrase))
-
-       ;; The other queries.
-       (catch :finished
-         (while t
-           (setq key (completing-read
-                      "Enter attribute: "
-                      '("severity" "package" "tags" "submitter" "author"
-                        "subject" "status")
-                      nil t))
-           (cond
-            ;; Server-side queries.
-            ((equal key "severity")
-             (setq
-              severities
-              (completing-read-multiple
-               "Enter severities: " debbugs-gnu-all-severities nil t
-               (mapconcat 'identity debbugs-gnu-default-severities ","))))
-
-            ((equal key "package")
-             (setq
-              packages
-              (completing-read-multiple
-               "Enter packages: " debbugs-gnu-all-packages nil t
-               (mapconcat 'identity debbugs-gnu-default-packages ","))))
-
-            ((member key '("tags" "subject"))
-             (setq val1 (read-string (format "Enter %s: " key)))
-             (when (not (zerop (length val1)))
-               (add-to-list
-                'debbugs-gnu-current-query (cons (intern key) val1))))
-
-            ((member key '("submitter" "author"))
-             (when (equal key "author") (setq key "@author"))
-             (setq val1 (read-string "Enter email address: "))
-             (when (not (zerop (length val1)))
-               (add-to-list
-                'debbugs-gnu-current-query (cons (intern key) val1))))
-
-            ((equal key "status")
-             (setq
-              val1
-              (completing-read "Enter status: " '("done" "forwarded" "open")))
-             (when (not (zerop (length val1)))
-               (add-to-list
-                'debbugs-gnu-current-query (cons (intern key) val1))))
-
-            ;; The End.
-            (t (throw :finished nil)))))
-
-       ;; Do the search.
-       (debbugs-org severities packages))))
+;;;###autoload
+(defun debbugs-org-patches ()
+  "List the bug reports that have been marked as containing a patch."
+  (interactive)
+  (cl-letf (((symbol-function 'debbugs-gnu-show-reports)
+            #'debbugs-org-show-reports))
+    (call-interactively 'debbugs-gnu-patches)))
 
 ;;;###autoload
-(defun debbugs-org (severities &optional packages archivedp suppress tags)
+(defun debbugs-org ()
   "List all outstanding bugs."
-  (interactive
-   (let (severities archivedp)
-     (list
-      (setq severities
-           (completing-read-multiple
-            "Severities: " debbugs-gnu-all-severities nil t
-            (mapconcat 'identity debbugs-gnu-default-severities ",")))
-      ;; The next parameters are asked only when there is a prefix.
-      (if current-prefix-arg
-         (completing-read-multiple
-          "Packages: " debbugs-gnu-all-packages nil t
-          (mapconcat 'identity debbugs-gnu-default-packages ","))
-       debbugs-gnu-default-packages)
-      (when current-prefix-arg
-       (setq archivedp (y-or-n-p "Show archived bugs?")))
-      (when (and current-prefix-arg (not archivedp))
-       (y-or-n-p "Suppress unwanted bugs?"))
-      ;; This one must be asked for severity "tagged".
-      (when (member "tagged" severities)
-       (split-string (read-string "User tag(s): ") "," t)))))
-
-  ;; Initialize variables.
-  (when (and (file-exists-p debbugs-gnu-persistency-file)
-            (not debbugs-gnu-local-tags))
-    (with-temp-buffer
-      (insert-file-contents debbugs-gnu-persistency-file)
-      (eval (read (current-buffer)))))
-
-  ;; Add queries.
-  (dolist (severity (if (consp severities) severities (list severities)))
-    (when (not (zerop (length severity)))
-      (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
-    (add-to-list 'debbugs-gnu-current-query '(archive . "1")))
-  (when suppress
-    (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))))
-
-  ;; Show result.
-  (debbugs-org-show-reports)
-
-  ;; Reset query.
-  (setq debbugs-gnu-current-query nil))
+  (interactive)
+  (cl-letf (((symbol-function 'debbugs-gnu-show-reports)
+            #'debbugs-org-show-reports))
+    (call-interactively 'debbugs-gnu)))
 
 (defun debbugs-org-show-reports ()
   "Show bug reports as retrieved via `debbugs-gnu-current-query'."
@@ -288,10 +197,10 @@ returned."
 
        ;; Handle tags.
        (when (string-match "^\\([0-9.]+\\); \\(.+\\)$" subject)
-         (let ((x (match-string 1 subject))) (pushnew x tags :test #'equal))
+         (let ((x (match-string 1 subject))) (cl-pushnew x tags :test #'equal))
          (setq subject (match-string 2 subject)))
        (when archived
-          (pushnew "ARCHIVE" tags :test #'equal))
+          (cl-pushnew "ARCHIVE" tags :test #'equal))
        (setq tags
              (mapcar
               ;; Replace all invalid TAG characters by "_".
@@ -405,19 +314,15 @@ the corresponding buffer (e.g. by closing Emacs)."
   (debbugs-org-regenerate-status))
 
 ;;;###autoload
-(defun debbugs-org-bugs (&rest bugs)
+(defun debbugs-org-bugs ()
   "List all BUGS, a list of bug numbers."
-  (interactive
-   (mapcar 'string-to-number
-          (completing-read-multiple "Bug numbers: " nil 'natnump)))
-  (dolist (elt bugs)
-    (unless (natnump elt) (signal 'wrong-type-argument (list 'natnump elt))))
-  (add-to-list 'debbugs-gnu-current-query (cons 'bugs bugs))
-  (debbugs-org nil))
+  (interactive)
+  (cl-letf (((symbol-function 'debbugs-gnu-show-reports)
+            #'debbugs-org-show-reports))
+    (call-interactively 'debbugs-gnu-bugs)))
 
 ;; TODO
 
-;; - Refactor it in order to avoid code duplication with debbugs-gnu.el.
 ;; - Make headline customizable.
 ;; - Sort according to different TODO properties.
 
diff --git a/packages/debbugs/debbugs-ug.info b/packages/debbugs/debbugs-ug.info
index 422aa98..0d4ad7d 100644
--- a/packages/debbugs/debbugs-ug.info
+++ b/packages/debbugs/debbugs-ug.info
@@ -1,4 +1,4 @@
-This is debbugs-ug.info, produced by makeinfo version 6.0 from
+This is debbugs-ug.info, produced by makeinfo version 6.1 from
 debbugs-ug.texi.
 
 Copyright (C) 2015-2016 Free Software Foundation, Inc.
@@ -51,7 +51,7 @@ Org Mode: (org)Top.).  As backend they use the 'debbugs' 
Emacs library
 
 * Retrieving Bugs::             How to retrieve bugs.
 * Searching Bugs::              How to search in the debbugs database.
-* Layout::                      How the results are presented.
+* Presenting Bugs::             How the results are presented.
 * Minor Mode::                  How to use browse bug URLs.
 
 * Command Index::               Debbugs commands.
@@ -105,8 +105,8 @@ prefix.
      SUPPRESS shall also distinct between 'nil' and non-'nil'.  When
      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
+     configured in the user option 'debbugs-gnu-suppress-bugs'.  Per
+     default, bugs marked as '"done"' are suppressed from being
      retrieved.
 
      When SEVERITIES contains the severity '"tagged"', TAGS is
@@ -122,42 +122,66 @@ prefix.
      minibuffer, lists must be entered comma-separated.
 
      Default values for interactive use could be configured in the
-     customer options 'debbugs-gnu-default-severities' and
+     user options 'debbugs-gnu-default-severities' and
      'debbugs-gnu-default-packages'.
 
-     *note Layout:: for the presentation of the results.
+     *note Presenting Bugs:: 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.
+     must be entered as comma-separated list of bugs or bug ranges.
 
-     *note Layout:: for the presentation of the results.
+     A bug range has either the form '12345-21345' or '-123'.  In the
+     former case, all bugs from 12345 until 21345 are presented, and
+     in the latter case the last 123 bugs are shown, counting from the
+     highest bug number in the repository.
+
+     A default value for interactive use could be configured in the
+     user option 'debbugs-gnu-default-bug-number-list'.
+
+     *note Presenting Bugs:: for the presentation of the results.
+
+ -- Command: debbugs-gnu-patches
+ -- Command: debbugs-org-patches
+
+     The commands 'debbugs-gnu-patches' and 'debbugs-org-patches' show
+     all unarchived bugs of the packages declared in
+     'debbugs-gnu-default-packages', and tagged with '"patch"'.  This
+     is useful for bug triages.
+
+     *note Presenting Bugs:: for the presentation of the results.
 
 
-File: debbugs-ug.info,  Node: Searching Bugs,  Next: Layout,  Prev: Retrieving 
Bugs,  Up: Top
+File: debbugs-ug.info,  Node: Searching Bugs,  Next: Presenting Bugs,  Prev: 
Retrieving Bugs,  Up: Top
 
-2 Searching in the Debbugs Database.
-************************************
+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 text search in the database in the
+messages submitted to the bugs.  It uses a HyperEstraier based search
+engine
 (http://fallabs.com/hyperestraier/uguide-en.html#searchcond)(1).
 
+   The search engine uses an index over the bug database.  This index
+is refreshed once a day only; search hits do not include recent
+changes of the same day.
+
  -- Command: debbugs-gnu-search
  -- Command: debbugs-org-search
 
      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.
+     '"search phrase"' for the 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.  Only complete words, contained in a
+     message body, are searched for.
 
      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"
+     "[BW] euro" matches words which begin with "euro".  "[EW] sphere"
      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)
@@ -182,8 +206,8 @@ uses a HyperEstraier based search engine
      'tags'
           A comma-separated list of defined user tags.
 
-     'submitter'
-          The email address of the bug submitter.
+     'author'
+          The email address of a message originator.
 
      'date'
           A time period the bug has been in which the bug has been
@@ -193,8 +217,8 @@ uses a HyperEstraier based search engine
           Word(s) the subject of the bug report contains.
 
      'status'
-          The status of the bug report.  Valid values are "done",
-          "forwarded" and "open".
+          The status of the bug report.  Valid values are "open",
+          "forwarded" and "done".
 
      It is also possible to apply these commands with an empty search
      phrase.  In this case, the GNU Debbugs server is searched only
@@ -214,10 +238,11 @@ uses a HyperEstraier based search engine
           this is the same as the status mentioned above.
 
      'owner'
+     'submitter'
      'maint'
      'correspondent'
-          The email address of the bug's owner, maintainer, or
-          correspondent (somebody who has participated in bug
+          The email address of the bug's owner, submitter, maintainer,
+          or correspondent (somebody who has participated in bug
           messages).
 
      'log_modified'
@@ -247,7 +272,9 @@ uses a HyperEstraier based search engine
      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.
+     after the attribute name.  Note, that client side filters perform
+     badly, because they could be applied only after all bugs have
+     been downloaded.
 
    ---------- Footnotes ----------
 
@@ -258,10 +285,10 @@ Debbugs server only.
 are not supported.
 
 
-File: debbugs-ug.info,  Node: Layout,  Next: Minor Mode,  Prev: Searching 
Bugs,  Up: Top
+File: debbugs-ug.info,  Node: Presenting Bugs,  Next: Minor Mode,  Prev: 
Searching Bugs,  Up: Top
 
-3 Layout
-********
+3 Presenting Bugs
+*****************
 
 The commands described in the previous chapters generate (a) report
 buffer(s) applicable for navigation.  'debbugs-gnu-*' return a
@@ -273,9 +300,10 @@ tabulated list, and 'debbugs-org-*' return a list of TODO 
items in
 * Tabulated Lists::             Tabulated Lists.
 * TODO Items::                  TODO Items.
 * Control Messages::            Control Messages.
+* Applying Patches::            Applying Patches in the Emacs Repository.
 
 
-File: debbugs-ug.info,  Node: Tabulated Lists,  Next: TODO Items,  Up: Layout
+File: debbugs-ug.info,  Node: Tabulated Lists,  Next: TODO Items,  Up: 
Presenting Bugs
 
 3.1 Tabulated Lists
 ===================
@@ -312,11 +340,16 @@ This enables the following key strokes:
                
 '/'            'debbugs-gnu-narrow-to-status'
                Narrow the list of bugs to the bugs that match the
-               given regex in 'State', 'Submitter' or 'Title'.
+               given regex in 'State', 'Submitter' or 'Title'.  With
+               a prefix argument 'C-u', the list of bugs is narrowed
+               to a match in 'State' only.
                
 'R'            'debbugs-gnu-show-all-blocking-reports'
                Narrow the list of bug reports to the ones that are
-               blocking the current release.
+               blocking the current Emacs release, as specified in
+               'debbugs-gnu-emacs-current-release'.  With a prefix
+               argument 'C-u', the current Emacs release is read from
+               the minibuffer.
                
 'w'            'debbugs-gnu-widen'
                Restore the full list again after narrowing.
@@ -345,6 +378,9 @@ This enables the following key strokes:
                *note Control Messages::.
                
 
+   The user option 'debbugs-gnu-suppress-closed' controls, whether
+closed bugs are shown in the initial list.
+
    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
@@ -352,7 +388,7 @@ 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
+File: debbugs-ug.info,  Node: TODO Items,  Next: Control Messages,  Prev: 
Tabulated Lists,  Up: Presenting Bugs
 
 3.2 TODO Items
 ==============
@@ -384,7 +420,7 @@ This enables the following key strokes:
 'Messages' which opens a GNUS ephemeral group for that bug.
 
 
-File: debbugs-ug.info,  Node: Control Messages,  Prev: TODO Items,  Up: Layout
+File: debbugs-ug.info,  Node: Control Messages,  Next: Applying Patches,  
Prev: TODO Items,  Up: Presenting Bugs
 
 3.3 Control Messages
 ====================
@@ -413,9 +449,11 @@ The strings show the exact format of the control messages.
 'close'
      "close 12345 25.1"
 
-     The second argument, the Emacs version, is read interactively.
+     The second argument, the Emacs version, is read interactively if
+     the bugs belongs to the '"emacs"' package.
 
 'confirmed'
+'easy'
 'fixed'
 'help'
 'moreinfo'
@@ -425,10 +463,15 @@ The strings show the exact format of the control messages.
 'security'
 'unreproducible'
 'wontfix'
-     "tags 12345 confirmed|fixed|help|moreinfo|notabug"
+     "tags 12345 confirmed|easy|fixed|help|moreinfo|notabug"
 
      "tags 12345 patch|pending|security|unreproducible|wontfix"
 
+     If the command invoking the control message has been prefixed
+     with 'C-u', the respective tag is removed from the bug, like
+
+     "tags 12345 -confirmed"
+
 'done'
 'donenotabug'
 'doneunreproducible'
@@ -437,13 +480,14 @@ The strings show the exact format of the control messages.
      "close 12345 25.1"
 
      The second argument in the close message, the Emacs version, is
-     read interactively.
+     read interactively if the bugs belongs to the '"emacs"' package.
 
 'forcemerge'
 'merge'
      "forcemerge|merge 12345 54321"
 
-     The second bug number is read interactively.
+     The second bug number is read interactively.  It could be also a
+     list of comma-separated bug numbers.
 
 'invalid'
      "tags 12345 notabug"
@@ -489,8 +533,43 @@ The strings show the exact format of the control messages.
      The username, read interactively, is either a package name or an
      email address.  The tag to be set is also read interactively.
 
+   How the control messages are sent is controlled by the
+'debbugs-gnu-send-mail-function' variable.  If it is 'nil' (the
+default value), the value of 'send-mail-function' is used.  This could
+be inconvenient, for example when an external interactive mail client
+is configured.
+
+
+File: debbugs-ug.info,  Node: Applying Patches,  Prev: Control Messages,  Up: 
Presenting Bugs
+
+3.4 Applying Patches in the Emacs Repository
+============================================
+
+Several bugs carry a proposed patch in one of their messages.
+Usually, those bugs are marked with the with '"patch"' tag.  *note
+Retrieving Bugs:: how to show such bugs.
+
+   If a GNUS ephemeral group for such a bug is opened, it is possible
+to apply the patch directly to the Emacs repository.  Move the cursor
+to the message containing a patch, and hit 'M-m'.  It determines
+whether one or several patches are in the MIME attachments or just
+included in the message, applies them, runs 'make -k' in the 'lisp'
+subdirectory, and shows a '*vc-dir*' buffer of the Emacs repository
+with the changed file(s).
+
+   The Emacs repository is determined via the user options
+'debbugs-gnu-trunk-directory' or 'debbugs-gnu-branch-directory'.  The
+latter one is used, when the patch is applied with the prefixed
+command 'C-u M-m'.  If the predefined directory does not point to an
+existing path, it is read from the minibuffer.
+
+   A further 'M-m' in the corresponding '*vc-diff*' buffer opens the
+modified file.  Here you can apply 'M-m' the next time.  This creates
+a ChangeLog entry with all needed information.  A final 'M-m' in the
+'ChangeLog' buffer commits the patch via '*vc-log*'.
+
 
-File: debbugs-ug.info,  Node: Minor Mode,  Next: Command Index,  Prev: Layout, 
 Up: Top
+File: debbugs-ug.info,  Node: Minor Mode,  Next: Command Index,  Prev: 
Presenting Bugs,  Up: Top
 
 4 Minor Mode
 ************
@@ -503,9 +582,9 @@ 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 user
+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>
@@ -524,10 +603,12 @@ Command Index
 * 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-gnu-patches:                   Retrieving Bugs.    (line 86)
+* debbugs-gnu-search:                    Searching Bugs.     (line 15)
 * debbugs-org:                           Retrieving Bugs.    (line 17)
 * debbugs-org-bugs:                      Retrieving Bugs.    (line 70)
-* debbugs-org-search:                    Searching Bugs.     (line 11)
+* debbugs-org-patches:                   Retrieving Bugs.    (line 87)
+* debbugs-org-search:                    Searching Bugs.     (line 16)
 
 
 File: debbugs-ug.info,  Node: Variable Index,  Next: Key Index,  Prev: Command 
Index,  Up: Top
@@ -538,13 +619,19 @@ Variable Index
 [index]
 * Menu:
 
-* 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)
+* 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-branch-directory:          Applying Patches.  (line  18)
+* debbugs-gnu-default-bug-number-list:   Retrieving Bugs.   (line  81)
+* 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  79)
+* debbugs-gnu-send-mail-function:        Control Messages.  (line 114)
+* debbugs-gnu-suppress-closed:           Tabulated Lists.   (line  76)
+* debbugs-gnu-trunk-directory:           Applying Patches.  (line  18)
+* debbugs-org-severity-priority:         TODO Items.        (line  10)
 
 
 File: debbugs-ug.info,  Node: Key Index,  Prev: Variable Index,  Up: Top
@@ -555,40 +642,43 @@ Key Index
 [index]
 * Menu:
 
-* '/':                                   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)
+* /:                                     Tabulated Lists.    (line 36)
+* B:                                     Tabulated Lists.    (line 57)
+* b:                                     Tabulated Lists.    (line 58)
+* C:                                     Tabulated Lists.    (line 71)
+* 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 52)
+* M-m:                                   Applying Patches.   (line 10)
+* <mouse-1>:                             Tabulated Lists.    (line 30)
+* <mouse-2>:                             Tabulated Lists.    (line 31)
+* R:                                     Tabulated Lists.    (line 42)
+* <RET>:                                 Tabulated Lists.    (line 29)
+* <RET> <1>:                             Tabulated Lists.    (line 79)
+* s:                                     Tabulated Lists.    (line 62)
+* t:                                     Tabulated Lists.    (line 65)
+* <TAB>:                                 TODO Items.         (line 16)
+* w:                                     Tabulated Lists.    (line 49)
+* x:                                     Tabulated Lists.    (line 68)
 
 
 
 Tag Table:
 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
+Node: Searching Bugs6868
+Ref: Searching Bugs-Footnote-111181
+Ref: Searching Bugs-Footnote-211269
+Node: Presenting Bugs11360
+Node: Tabulated Lists11936
+Node: TODO Items15611
+Node: Control Messages16667
+Node: Applying Patches19709
+Node: Minor Mode21075
+Node: Command Index22019
+Node: Variable Index22808
+Node: Key Index23882
 
 End Tag Table
diff --git a/packages/debbugs/debbugs-ug.texi b/packages/debbugs/debbugs-ug.texi
index 553e19b..e63923a 100644
--- a/packages/debbugs/debbugs-ug.texi
+++ b/packages/debbugs/debbugs-ug.texi
@@ -62,7 +62,7 @@ Programmer's Manual, debbugs}).
 @menu
 * Retrieving Bugs::             How to retrieve bugs.
 * Searching Bugs::              How to search in the debbugs database.
-* Layout::                      How the results are presented.
+* Presenting Bugs::             How the results are presented.
 * Minor Mode::                  How to use browse bug URLs.
 
 * Command Index::               Debbugs commands.
@@ -117,7 +117,7 @@ archived bugs on the GNU Debbugs server.
 @var{suppress} shall also distinct between @code{nil} and
 address@hidden  When address@hidden, closed bugs are suppressed from
 being retrieved from the Debbugs server.  Which bugs are regarded as
-suppressed is configured in the customer option
+suppressed is configured in the user option
 @code{debbugs-gnu-suppress-bugs}.  Per default, bugs marked as
 @code{"done"} are suppressed from being retrieved.
 
@@ -135,11 +135,11 @@ minibuffer, lists must be entered comma-separated.
 
 @vindex debbugs-gnu-default-severities
 @vindex debbugs-gnu-default-packages
-Default values for interactive use could be configured in the customer
+Default values for interactive use could be configured in the user
 options @code{debbugs-gnu-default-severities} and
 @code{debbugs-gnu-default-packages}.
 
address@hidden for the presentation of the results.
address@hidden Bugs} for the presentation of the results.
 
 @end deffn
 
@@ -149,34 +149,61 @@ options @code{debbugs-gnu-default-severities} and
 
 The commands @code{debbugs-gnu-bugs} and @code{debbugs-org-bugs} show
 bugs specified by their bug number.  Interactively, the bug numbers
-must be entered as comma-separated list.
+must be entered as comma-separated list of bugs or bug ranges.
 
address@hidden for the presentation of the results.
+A bug range has either the form @samp{12345-21345} or @samp{-123}.  In
+the former case, all bugs from 12345 until 21345 are presented, and in
+the latter case the last 123 bugs are shown, counting from the highest
+bug number in the repository.
+
address@hidden debbugs-gnu-default-bug-number-list
+A default value for interactive use could be configured in the user
+option @code{debbugs-gnu-default-bug-number-list}.
+
address@hidden Bugs} for the presentation of the results.
+
address@hidden deffn
+
+
address@hidden  {Command} debbugs-gnu-patches
address@hidden {Command} debbugs-org-patches
+
+The commands @code{debbugs-gnu-patches} and @code{debbugs-org-patches}
+show all unarchived bugs of the packages declared in
address@hidden, and tagged with @code{"patch"}.
+This is useful for bug triages.
+
address@hidden Bugs} for the presentation of the results.
 
 @end deffn
 
 
 @node Searching Bugs
address@hidden Searching in the Debbugs Database.
address@hidden Searching in the Debbugs Database
 
-The GNU Debbugs server allows full text search in the database.  It
-uses a
+The GNU Debbugs server allows text search in the database in the
+messages submitted to the bugs.  It uses a
 @uref{http://fallabs.com/hyperestraier/uguide-en.html#searchcond,
 HyperEstraier based search address@hidden has been added to the
 Debbugs/SOAP backend of the GNU Debbugs server only.}.
 
+The search engine uses an index over the bug database.  This index is
+refreshed once a day only; search hits do not include recent changes
+of the same day.
+
 @deffn  {Command} debbugs-gnu-search
 @deffnx {Command} debbugs-org-search
 
 These both commands are completely interactive.  They ask for a
address@hidden"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.
address@hidden"search phrase"} for the text search.  It is just a string which
+contains the words to be searched for, combined by operators like AND,
+ANDNOT and address@hidden  If there is no operator between the words, AND is
+used by default.  Only complete words, contained in a message body,
+are searched for.
 
 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
+matches words which begin with "euro".  "[EW] sphere" 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"address@hidden forms, as
@@ -202,8 +229,8 @@ server, @xref{Retrieving Bugs}.
 @item tags
 A comma-separated list of defined user tags.
 
address@hidden submitter
-The email address of the bug submitter.
address@hidden author
+The email address of a message originator.
 
 @item date
 A time period the bug has been in which the bug has been submitted or
@@ -213,8 +240,8 @@ modified.
 Word(s) the subject of the bug report contains.
 
 @item status
-The status of the bug report.  Valid values are "done", "forwarded"
-and "open".
+The status of the bug report.  Valid values are "open", "forwarded"
+and "done".
 @end table
 
 It is also possible to apply these commands with an empty search
@@ -234,10 +261,11 @@ An arbitrary string the bug is annotated with.  Usually, 
this is the
 same as the status mentioned above.
 
 @item  owner
address@hidden submitter
 @itemx maint
 @itemx correspondent
-The email address of the bug's owner, maintainer, or correspondent
-(somebody who has participated in bug messages).
+The email address of the bug's owner, submitter, maintainer, or
+correspondent (somebody who has participated in bug messages).
 
 @item  log_modified
 @itemx last_modified
@@ -265,11 +293,13 @@ 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.
+Note, that client side filters perform badly, because they could be
+applied only after all bugs have been downloaded.
 @end deffn
 
 
address@hidden Layout
address@hidden Layout
address@hidden Presenting Bugs
address@hidden Presenting Bugs
 
 The commands described in the previous chapters generate (a) report
 buffer(s) applicable for navigation.  @code{debbugs-gnu-*} return a
@@ -280,6 +310,7 @@ in @code{org-mode}.
 * Tabulated Lists::             Tabulated Lists.
 * TODO Items::                  TODO Items.
 * Control Messages::            Control Messages.
+* Applying Patches::            Applying Patches in the Emacs Repository.
 @end menu
 
 
@@ -333,14 +364,18 @@ Show all bug attributes.
 @kbd{/} @tab
 @code{debbugs-gnu-narrow-to-status} @*
 Narrow the list of bugs to the bugs that match the given regex in
address@hidden, @code{Submitter} or @code{Title}.
address@hidden, @code{Submitter} or @code{Title}.  With a prefix
+argument @kbd{C-u}, the list of bugs is narrowed to a match in
address@hidden only.
 
 @item
 @kindex @kbd{R}
 @kbd{R} @tab
 @code{debbugs-gnu-show-all-blocking-reports} @*
 Narrow the list of bug reports to the ones that are blocking the
-current release.
+current Emacs release, as specified in
+`debbugs-gnu-emacs-current-release'.  With a prefix argument
address@hidden, the current Emacs release is read from the minibuffer.
 
 @item
 @kindex @kbd{w}
@@ -391,7 +426,12 @@ Send a control message for this bug, @ref{Control 
Messages}.
 
 @end multitable
 
address@hidden debbugs-gnu-suppress-closed
+The user option @code{debbugs-gnu-suppress-closed} controls, whether
+closed bugs are shown in the initial list.
+
 @vindex debbugs-gnu-mail-backend
address@hidden @address@hidden
 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
@@ -407,6 +447,7 @@ 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}.
 
address@hidden debbugs-org-severity-priority
 Bug severities are mapped onto org severities, see
 @code{debbugs-org-severity-priority}.
 
@@ -473,9 +514,11 @@ of comma-separated bug numbers.
 @item close
 "close 12345 25.1"
 
-The second argument, the Emacs version, is read interactively.
+The second argument, the Emacs version, is read interactively if the
+bugs belongs to the @code{"emacs"} package.
 
 @item confirmed
address@hidden easy
 @itemx fixed
 @itemx help
 @itemx moreinfo
@@ -485,10 +528,15 @@ The second argument, the Emacs version, is read 
interactively.
 @itemx security
 @itemx unreproducible
 @itemx wontfix
-"tags 12345 confirmed|fixed|help|moreinfo|notabug"
+"tags 12345 confirmed|easy|fixed|help|moreinfo|notabug"
 
 "tags 12345 patch|pending|security|unreproducible|wontfix"
 
+If the command invoking the control message has been prefixed with
address@hidden, the respective tag is removed from the bug, like
+
+"tags 12345 -confirmed"
+
 @item done
 @itemx donenotabug
 @itemx doneunreproducible
@@ -497,13 +545,14 @@ The second argument, the Emacs version, is read 
interactively.
 "close 12345 25.1"
 
 The second argument in the close message, the Emacs version, is read
-interactively.
+interactively if the bugs belongs to the @code{"emacs"} package.
 
 @item forcemerge
 @itemx merge
 "forcemerge|merge 12345 54321"
 
-The second bug number is read interactively.
+The second bug number is read interactively.  It could be also a list
+of comma-separated bug numbers.
 
 @item invalid
 "tags 12345 notabug" @*
@@ -550,6 +599,45 @@ The username, read interactively, is either a package name 
or an email
 address.  The tag to be set is also read interactively.
 @end table
 
address@hidden debbugs-gnu-send-mail-function
+How the control messages are sent is controlled by the
address@hidden variable.  If it is @code{nil}
+(the default value), the value of @code{send-mail-function} is used.
+This could be inconvenient, for example when an external interactive
+mail client is configured.
+
+
address@hidden Applying Patches
address@hidden Applying Patches in the Emacs Repository
+
+Several bugs carry a proposed patch in one of their messages.
+Usually, those bugs are marked with the with @code{"patch"} tag.
address@hidden Bugs} how to show such bugs.
+
address@hidden @kbd{M-m}
+If a GNUS ephemeral group for such a bug is opened, it is possible to
+apply the patch directly to the Emacs repository.  Move the cursor to
+the message containing a patch, and hit @kbd{M-m}.  It determines
+whether one or several patches are in the MIME attachments or just
+included in the message, applies them, runs @command{make -k} in the
address@hidden subdirectory, and shows a @samp{*vc-dir*} buffer of the
+Emacs repository with the changed file(s).
+
address@hidden debbugs-gnu-trunk-directory
address@hidden debbugs-gnu-branch-directory
+The Emacs repository is determined via the user options
address@hidden or
address@hidden  The latter one is used, when the
+patch is applied with the prefixed command @kbd{C-u M-m}.  If the
+predefined directory does not point to an existing path, it is read
+from the minibuffer.
+
+A further @kbd{M-m} in the corresponding @samp{*vc-diff*} buffer opens
+the modified file.  Here you can apply @kbd{M-m} the next time.  This
+creates a ChangeLog entry with all needed information.  A final
address@hidden in the @samp{ChangeLog} buffer commits the patch via
address@hidden
+
 
 @node Minor Mode
 @chapter Minor Mode
@@ -565,7 +653,7 @@ The reference to such bugs have a specialized format,
 This package adds a new minor mode @code{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 @code{debbugs-browse-function} controls, whether
+user option @code{debbugs-browse-function} controls, whether
 @code{debbugs-gnu-bugs} or @code{debbugs-org-bugs} is called.
 
 This minor mode is applicable for all URLs, not only bug references.
diff --git a/packages/debbugs/debbugs.el b/packages/debbugs/debbugs.el
index f145280..cf1e643 100644
--- a/packages/debbugs/debbugs.el
+++ b/packages/debbugs/debbugs.el
@@ -1,12 +1,12 @@
-;;; debbugs.el --- SOAP library to access debbugs servers
+;;; debbugs.el --- SOAP library to access debbugs servers  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 2011-2016 Free Software Foundation, Inc.
 
 ;; Author: Michael Albinus <address@hidden>
 ;; Keywords: comm, hypermedia
 ;; Package: debbugs
-;; Version: 0.9
-;; Package-Requires: ((async "1.6"))
+;; Version: 0.10
+;; Package-Requires: ((soap-client "3.1.1") (cl-lib "0.5"))
 
 ;; This file is not part of GNU Emacs.
 
@@ -35,11 +35,7 @@
 
 ;(setq soap-debug t message-log-max t)
 (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")
+(eval-when-compile (require 'cl-lib))
 
 (defgroup debbugs nil
   "Debbugs library"
@@ -112,7 +108,7 @@ This corresponds to the Debbugs server to be accessed, 
either
 
 (defcustom debbugs-cache-expiry (* 60 60)
   "How many seconds debbugs query results are cached.
-`t' or 0 disables caching, `nil' disables expiring."
+t or 0 disables caching, nil disables expiring."
   :group 'debbugs
   :type '(choice (const :tag "Always" t)
                 (const :tag "Never" nil)
@@ -122,29 +118,13 @@ This corresponds to the Debbugs server to be accessed, 
either
   "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)))))
+  "Invoke the SOAP connection asynchronously."
+  (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))
 
 (defun debbugs-get-bugs (&rest query)
   "Return a list of bug numbers which match QUERY.
@@ -201,8 +181,8 @@ Valid keywords are:
   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 \"open\".
+  :status -- Status of bug.  Valid values are \"open\",
+  \"forwarded\" and \"done\".
 
   :archive -- A keyword to filter for bugs which are already
   archived, or not.  Valid values are \"0\" (not archived),
@@ -228,7 +208,7 @@ patch:
       (unless (and (keywordp kw) (stringp val))
        (error "Wrong query: %s %s" kw val))
       (setq key (substring (symbol-name kw) 1))
-      (case kw
+      (cl-case kw
        ((:package :severity :tag :src :affects)
         ;; Value shall be one word.
         (if (string-match "\\`\\S-+\\'" val)
@@ -245,8 +225,8 @@ patch:
               (setq vec (vconcat vec (list key val))))
           (error "Wrong %s: %s" key val)))
        (:status
-        ;; Possible values: "done", "forwarded" and "open"
-        (if (string-match "\\`\\(done\\|forwarded\\|open\\)\\'" val)
+        ;; Possible values: "open", "forwarded" and "done".
+        (if (string-match "\\`\\(open\\|forwarded\\|done\\)\\'" val)
             (setq vec (vconcat vec (list key val)))
           (error "Wrong %s: %s" key val)))
        (:archive
@@ -262,7 +242,66 @@ patch:
 
 (defun debbugs-newest-bugs (amount)
   "Return the list of bug numbers, according to AMOUNT (a number) latest bugs."
-  (sort (car (soap-invoke debbugs-wsdl debbugs-port "newest_bugs" amount)) '<))
+  (if (= amount 1)
+      ;; We cache it as bug "0" in `debbugs-cache-data'.
+      (let ((status (gethash 0 debbugs-cache-data)))
+       (unless (and
+                status
+                (or
+                 (null debbugs-cache-expiry)
+                 (and
+                  (natnump debbugs-cache-expiry)
+                  (> (cdr (assoc 'cache_time status))
+                     (- (float-time) debbugs-cache-expiry)))))
+         ;; Due to `debbugs-gnu-completion-table', this function
+         ;; could be called in rapid sequence.  We cache temporarily
+         ;; the value nil, therefore.
+         (when (natnump debbugs-cache-expiry)
+           (puthash
+            0
+            (list (cons 'cache_time (1+ (- (float-time) debbugs-cache-expiry)))
+                  (list 'newest_bug))
+            debbugs-cache-data))
+         ;; Compute the value.
+         (setq
+          status
+          (list
+           (cons 'cache_time (float-time))
+           (cons 'newest_bug
+                 (caar
+                  (soap-invoke
+                   debbugs-wsdl debbugs-port "newest_bugs" amount)))))
+
+         ;; Cache it.
+         (when (or (null debbugs-cache-expiry) (natnump debbugs-cache-expiry))
+           (puthash 0 status debbugs-cache-data)))
+
+       ;; Return the value, as list.
+       (list (cdr (assoc 'newest_bug status))))
+
+    (sort
+     (car (soap-invoke debbugs-wsdl debbugs-port "newest_bugs" amount)) '<)))
+
+(defun debbugs-convert-soap-value-to-string (string-value)
+  "If STRING-VALUE is unibyte, decode its contents as a UTF-8 string.
+If STRING-VALUE is a multibyte string, then `soap-client'
+received an xsd:string for this value, and will have decoded it
+already.
+
+If STRING-VALUE is a unibyte string, then `soap-client' received
+an xsd:base64Binary, and ran `base64-decode-string' on it to
+produce a unibyte string of bytes.
+
+For some reason, the Debbugs server code base64-encodes strings
+that contain UTF-8 characters, and returns them as
+xsd:base64Binary, instead of just returning them as xsd:string.
+Therefore, when STRING-VALUE is a unibyte string, we assume its
+bytes represent a UTF-8 string and decode them accordingly."
+  (if (stringp string-value)
+      (if (not (multibyte-string-p string-value))
+         (decode-coding-string string-value 'utf-8)
+       string-value)
+    (error "Invalid string value")))
 
 (defun debbugs-get-status (&rest bug-numbers)
   "Return a list of status entries for the bugs identified by BUG-NUMBERS.
@@ -278,10 +317,11 @@ Every returned entry is an association list with the 
following attributes:
   \"normal\", \"minor\" or \"wishlist\".
 
   `tags': The status of the bug report, a list of strings.  This
-  can be \"fixed\", \"notabug\", \"wontfix\", \"unreproducible\",
-  \"moreinfo\" or \"patch\".
+  can be \"confirmed\", \"fixed\", \"pending\", \"notabug\",
+  \"wontfix\", \"unreproducible\", \"moreinfo\", \"security\" or
+  \"patch\".
 
-  `pending': The string \"pending\", \"forwarded\" or \"done\".
+  `pending': The string \"pending\", \"forwarded\", \"fixed\" or \"done\".
 
   `subject': Subject/Title of the bugreport.
 
@@ -302,7 +342,7 @@ Every returned entry is an association list with the 
following attributes:
 
   `done': The email address of the worker who has closed the bug (if done).
 
-  `archived': `t' if the bug is archived, `nil' otherwise.
+  `archived': t if the bug is archived, nil otherwise.
 
   `unarchived': The date the bug has been unarchived, if ever.
 
@@ -324,12 +364,16 @@ Every returned entry is an association list with the 
following attributes:
 
   `summary': Arbitrary text.
 
+  `cache_time': This is not an attribute located at the debbugs
+   server, but an internal value of the debbugs.el package itself.
+
 Example:
 
   \(debbugs-get-status 10)
 
   => ;; Attributes with empty values are not shown
-     \(\(\(bug_num . 10)
+     \(\(\(cache_time . 1469716026.4981334)
+       \(bug_num . 10)
        \(source . \"unknown\")
        \(date . 1203606305.0)
        \(msgid . \"<address@hidden>\")
@@ -358,7 +402,7 @@ Example:
                      (and
                       (natnump debbugs-cache-expiry)
                       (> (cdr (assoc 'cache_time status))
-                         (- (float-time)) debbugs-cache-expiry))))
+                         (- (float-time) debbugs-cache-expiry)))))
                    (progn
                      (setq cached-bugs (append cached-bugs (list status)))
                      nil)
@@ -379,7 +423,7 @@ Example:
                  (debbugs-soap-invoke-async
                   "get_status"
                   (apply
-                   'vector
+                   #'vector
                    (butlast
                     bug-ids (- (length bug-ids)
                                debbugs-max-hits-per-request))))))
@@ -389,14 +433,8 @@ Example:
                                 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)))))))
+         (while (buffer-live-p res)
+           (accept-process-output (get-buffer-process res) 0.1)))))
 
     (append
      cached-bugs
@@ -420,7 +458,13 @@ Example:
            (setq y (assoc attribute (cdr (assoc 'value x))))
            (when (stringp (cdr y))
              (setcdr y (mapcar
-                        'string-to-number (split-string (cdr y) " " t)))))
+                        #'string-to-number (split-string (cdr y) " " t)))))
+         ;; "subject", "originator", "owner" and "summary" may be an
+         ;; xsd:base64Binary value containing a UTF-8-encoded string.
+         (dolist (attribute '(subject originator owner summary))
+           (setq y (assoc attribute (cdr (assoc 'value x))))
+           (when (stringp (cdr y))
+             (setcdr y (debbugs-convert-soap-value-to-string (cdr y)))))
          ;; "package" is a string, containing comma separated
          ;; package names.  "keywords" and "tags" are strings,
          ;; containing blank separated package names.
@@ -429,11 +473,11 @@ Example:
            (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))
+         (if (or (null debbugs-cache-expiry) (natnump debbugs-cache-expiry))
              (puthash
               (cdr (assoc 'key x))
               ;; Put also a time stamp.
-              (cons (cons 'cache_time (floor (float-time)))
+              (cons (cons 'cache_time (float-time))
                     (cdr (assoc 'value x)))
               debbugs-cache-data)
            ;; Don't cache.
@@ -480,7 +524,7 @@ Example:
       (unless (and (keywordp kw) (stringp val))
        (error "Wrong query: %s %s" kw val))
       (setq key (substring (symbol-name kw) 1))
-      (case kw
+      (cl-case kw
        ((:user)
         ;; Value shall be one word.  Extract email address, if existing.
         (if (string-match "\\`\\S-+\\'" val)
@@ -489,12 +533,12 @@ Example:
                 (setq val user-mail-address))
               (when (string-match "<\\(.+\\)>" val)
                 (setq val (match-string 1 val)))
-              (pushnew val user :test #'equal))
+              (cl-pushnew val user :test #'equal))
           (error "Wrong %s: %s" key val)))
        ((:tag)
         ;; Value shall be one word.
         (if (string-match "\\`\\S-+\\'" val)
-            (pushnew val tags :test #'equal)
+            (cl-pushnew val tags :test #'equal)
           (error "Wrong %s: %s" key val)))
        (t (error "Unknown key: %s" kw))))
 
@@ -528,7 +572,7 @@ Every message is an association list with the following 
attributes:
 
   `body': The message body.
 
-  `attachments' A list of possible attachments, or `nil'.  Not
+  `attachments' A list of possible attachments, or nil.  Not
   implemented yet server side."
   (car (soap-invoke debbugs-wsdl debbugs-port "get_bug_log" bug-number)))
 
@@ -536,7 +580,7 @@ Every message is an association list with the following 
attributes:
   "Return the result of a full text search according to QUERY.
 
 QUERY is a sequence of lists of keyword-value pairs where the
-values are strings or numbers, i.e. :KEYWORD \"VALUE\" [:KEYWORD
+values are strings or numbers, i.e. :KEYWORD VALUE [:KEYWORD
 VALUE]*
 
 Every sublist of the QUERY forms a hyperestraier condition.  A
@@ -556,25 +600,26 @@ 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 all
-  possible hits are returned.
+  possible hits are returned according to the default maximum of
+  the debbugs server.  There is also an absolute maximum how many
+  hits are returned by the debbugs server, which cannot be
+  overwritten my any larger :max number.
 
   There must be exactly one such condition.
 
-\[ATTRIBUTE VALUE+ :operation OPERATION :order ORDER\]
+\[ATTRIBUTE VALUE+ :operator OPERATOR :order ORDER\]
 
   ATTRIBUTE is one of the following keywords:
 
-  :status --  Status of bug.  Valid values are \"done\",
-  \"forwarded\" and \"open\".
-
   :subject, :@title -- The subject of a message or the title of
   the bug, a string.
 
-  :date, :@cdate -- The submission or modification dates of a
-  message, a number.
+  :date, :@cdate -- The submission date of the bug or the
+  modification date of a message, a number.
 
-  :submitter, :@author -- The email address of the submitter of a
-  bug or the author of a message belonging to this bug, a string.
+  :@author -- The email address of the author of a message
+  belonging to this bug, a string.  It may be different than
+  the email of the person submitting the bug.
   The special email address \"me\" is used as pattern, replaced
   with `user-mail-address'.
 
@@ -606,8 +651,8 @@ The following conditions are possible:
   \"NUMBT\" \(is between the two numbers).  In the last case,
   there must be two values for ATTRIBUTE.
 
-  If an operator is leaded by \"!\", the meaning is inverted.  If
-  a string operator is leaded by \"I\", the case of the value is
+  If an operator is led by \"!\", the meaning is inverted.  If a
+  string operator is led by \"I\", the case of the value is
   ignored.
 
   The optional :order can be specified only in one condition.  It
@@ -633,9 +678,9 @@ same attributes as in the conditions.  Additional 
attributes are
 Examples:
 
   \(debbugs-search-est
-    '\(:phrase \"armstrong AND debbugs\" :skip 10 :max 2)
-    '\(:severity \"normal\" :operator \"STRINC\")
-    '\(:date :order \"NUMA\"))
+    \\='\(:phrase \"armstrong AND debbugs\" :skip 10 :max 2)
+    \\='\(:severity \"normal\" :operator \"STRINC\")
+    \\='\(:date :order \"NUMA\"))
 
   => \(\(\(msg_num . 21)
        \(date . 1229208302)
@@ -651,16 +696,16 @@ Examples:
 
   ;; Show all messages from me between 2011-08-01 and 2011-08-31.
   \(debbugs-search-est
-    '\(:max 20)
-    '\(:@author \"me\" :operator \"ISTRINC\")
-    `\(:date
+    \\='\(:max 20)
+    \\='\(:@author \"me\" :operator \"ISTRINC\")
+    \\=`\(:date
       ,\(floor \(float-time \(encode-time 0 0 0  1 8 2011)))
       ,\(floor \(float-time \(encode-time 0 0 0 31 8 2011)))
       :operator \"NUMBT\"))"
 
   (let ((phrase (assoc :phrase query))
        args result)
-    (if (and phrase (not (member :skip phrase)) (not (member :skip phrase)))
+    (if (and phrase (not (member :skip phrase)) (not (member :max phrase)))
        ;; We loop, until we have all results.
        (let ((skip 0)
              (query (delete phrase query))
@@ -668,7 +713,7 @@ Examples:
          (while skip
            (setq result1
                  (apply
-                  'debbugs-search-est
+                  #'debbugs-search-est
                   (append
                    (list
                     (append
@@ -682,6 +727,9 @@ Examples:
 
       ;; Compile search arguments.
       (dolist (elt query)
+        ;; FIXME: `vec' is used in an O(N²) way.  It should be a list instead,
+        ;; on which we push elements, and we only convert it to a vector at
+        ;; the end.
        (let (vec kw key val
                  phrase-cond attr-cond)
 
@@ -720,8 +768,9 @@ Examples:
 
              ;; Attribute condition.
              ((:submitter :@author)
-              ;; It shouldn't happen in a phrase condition.
-              (if phrase-cond
+              ;; It shouldn't happen.
+              (if (or (and (eq kw :submitter) phrase-cond)
+                      (and (eq kw :@author) attr-cond))
                   (error "Wrong keyword: %s" kw))
               (if (not (stringp (car elt)))
                   (setq vec (vconcat vec (list key "")))
@@ -736,7 +785,8 @@ Examples:
                     (unless (member x val)
                       (setq val (append val (list x))))))
                 (setq vec
-                      (vconcat vec (list key (mapconcat 'identity val " "))))))
+                      (vconcat
+                       vec (list key (mapconcat #'identity val " "))))))
 
              (:status
               ;; It shouldn't happen in a phrase condition.
@@ -745,15 +795,16 @@ Examples:
               (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)))
+                ;; Possible values: "open", "forwarded" and "done".
+                (while (and (stringp (car elt))
+                            (string-match
+                             "\\`\\(open\\|forwarded\\|done\\)\\'" (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 " "))))))
+                      (vconcat
+                       vec (list key (mapconcat #'identity val " "))))))
 
              ((:subject :package :tags :severity :@title)
               ;; It shouldn't happen in a phrase condition.
@@ -768,7 +819,8 @@ Examples:
                     (unless (member x val)
                       (setq val (append val (list x))))))
                 (setq vec
-                      (vconcat vec (list key (mapconcat 'identity val " "))))))
+                      (vconcat
+                       vec (list key (mapconcat #'identity val " "))))))
 
              ((:date :@cdate)
               ;; It shouldn't happen in a phrase condition.
@@ -784,7 +836,8 @@ Examples:
                       (setq val (append val (list x))))))
                 (setq vec
                       (vconcat
-                       vec (list key (mapconcat 'number-to-string val " "))))))
+                       vec
+                       (list key (mapconcat #'number-to-string val " "))))))
 
              ((:operator :order)
               ;; It shouldn't happen in a phrase condition.
@@ -817,7 +870,7 @@ BUG-OR-MESSAGE must be list element returned by either
 Example: Return the originator of last submitted bug.
 
 \(debbugs-get-attribute
-  \(car \(apply 'debbugs-get-status \(debbugs-newest-bugs 1))) 'originator)"
+  \(car \(apply #\\='debbugs-get-status \(debbugs-newest-bugs 1))) 
\\='originator)"
   (cdr (assoc attribute bug-or-message)))
 
 (defun debbugs-get-message-numbers (messages)
@@ -834,11 +887,11 @@ 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'.
+If there is no message with MESSAGE-NUMBER, the function returns nil.
 
 Example: Return the first message of last submitted bug.
 
-\(let \(\(messages \(apply 'debbugs-get-bug-log \(debbugs-newest-bugs 1))))
+\(let \(\(messages \(apply #\\='debbugs-get-bug-log \(debbugs-newest-bugs 1))))
   \(debbugs-get-message messages
                       \(car \(debbugs-get-message-numbers messages))))"
   (while (and messages
@@ -865,8 +918,8 @@ following symbols:
    either symbol depends on actual Debbugs server configuration.
    For gnu.org, use the former; for debian.org - the latter.
 
-FILENAME, if non-`nil', is the name of file to store mbox.  If
-FILENAME is `nil', the downloaded mbox is inserted into the
+FILENAME, if non-nil, is the name of file to store mbox.  If
+FILENAME is nil, the downloaded mbox is inserted into the
 current buffer."
   (let (url (mt "") bn)
     (unless (setq url (plist-get
@@ -888,9 +941,4 @@ current buffer."
 
 ;;; TODO:
 
-;; * SOAP interface extensions (wishlist).
-;;   - Server-side sorting.
-;;   - Regexp and/or wildcards search.
-;;   - Returning message attachments.
-
 ;;; debbugs.el ends here
diff --git a/packages/debbugs/debbugs.info b/packages/debbugs/debbugs.info
index b05bf77..d401541 100644
--- a/packages/debbugs/debbugs.info
+++ b/packages/debbugs/debbugs.info
@@ -1,4 +1,4 @@
-This is debbugs.info, produced by makeinfo version 6.0 from
+This is debbugs.info, produced by makeinfo version 6.1 from
 debbugs.texi.
 
 Copyright (C) 2011-2016 Free Software Foundation, Inc.
@@ -64,6 +64,7 @@ projects is described in *note Debbugs User Guide: 
(debbugs-ug)Top.
 * Configuration::               Configuring 'debbugs'.
 * Requesting bug numbers::      How to request bug report numbers.
 * Requesting bugs statuses::    How to request the status of bug reports.
+* Searching bugs::              How to search for bugs.
 * Requesting messages::         How to get messages from bug reports.
 * Requesting user tags::        How to request tags set by users.
 
@@ -215,13 +216,15 @@ Debbugs server the list of bug numbers that match a 
user's query.
           '"confirmed"', '"ipv6"', '"lfs"', '"fixed-in-experimental"',
           '"fixed-upstream"', '"l10n"', '"etch"', '"etch-ignore"',
           '"lenny"', '"lenny-ignore"', '"squeeze"',
-          '"squeeze-ignore"', '"wheezy"', '"wheezy-ignore"'.  The
+          '"squeeze-ignore"', '"wheezy"', '"wheezy-ignore"',
+          '"jessie"', '"jessie-ignore"', '"stretch"',
+          '"stretch-ignore"', '"buster"', '"buster-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"',
-          '"help"', '"security"', '"confirmed"'.  See
+          '"help"', '"security"', '"confirmed"', '"easy"'.  See
           <http://debbugs.gnu.org/Developer.html#tags> for the actual
           list of tags.
 
@@ -256,8 +259,8 @@ Debbugs server the list of bug numbers that match a user's 
query.
           do not necessary belong to this package.
 
      ':status'
-          Status of bug.  Valid values are '"done"', '"forwarded"' and
-          '"open"'.
+          Status of bug.  Valid values are '"open"', '"forwarded"' and
+          '"done"'.
 
      ':archive'
           A keyword to filter for bugs which are already archived, or
@@ -285,10 +288,11 @@ Debbugs server the list of bug numbers that match a 
user's query.
 
           (let ((debbugs-port "debian.org"))
             (debbugs-newest-bugs 6))
+
           => (633152 633153 633154 633155 633156 633157)
 
 
-File: debbugs.info,  Node: Requesting bugs statuses,  Next: Requesting 
messages,  Prev: Requesting bug numbers,  Up: Top
+File: debbugs.info,  Node: Requesting bugs statuses,  Next: Searching bugs,  
Prev: Requesting bug numbers,  Up: Top
 
 4 Requesting bugs statuses
 **************************
@@ -320,7 +324,8 @@ and various aspects of relationship with other bug reports.
           (*note Requesting bug numbers::).
 
      'pending'
-          The string '"pending"', '"forwarded"' or '"done"'.
+          The string '"pending"', '"forwarded"', '"fixed"' or
+          '"done"'.
 
      'subject'
           Subject/Title of the bugreport.
@@ -385,23 +390,28 @@ and various aspects of relationship with other bug 
reports.
      'summary'
           Arbitrary text.
 
+     'cache_time'
+          This is not an attribute located at the debbugs server, but
+          an internal value of the debbugs.el package itself.
+
      Example.  Get the status of bug number #10 from GNU BTS:
 
           (let ((debbugs-port "gnu.org"))
             (debbugs-get-status 10))
-          =>
-          (((source . "unknown") (found_versions) (done) (blocks)
-            (date . 1203606305.0) (fixed) (fixed_versions) (mergedwith)
-            (found) (unarchived) (blockedby) (keywords) (summary)
-            (msgid . "<address@hidden>") (id . 10)
-            (forwarded) (severity . "wishlist")
-            (owner . "Magnus Henoch <address@hidden>")
-            (log_modified . 1310061242.0) (location . "db-h")
-            (subject . "url-gw should support HTTP CONNECT proxies")
-            (originator . "Magnus Henoch <address@hidden>")
-            (last_modified . 1310061242.0) (pending . "pending") (affects)
-            (archived) (tags) (fixed_date) (package "emacs") (found_date)
-            (bug_num . 10)))
+
+          => (((cache_time . 1469716026.4981334)
+               (source . "unknown") (found_versions) (done) (blocks)
+               (date . 1203606305.0) (fixed) (fixed_versions) (mergedwith)
+               (found) (unarchived) (blockedby) (keywords) (summary)
+               (msgid . "<address@hidden>") (id . 10)
+               (forwarded) (severity . "wishlist")
+               (owner . "Magnus Henoch <address@hidden>")
+               (log_modified . 1310061242.0) (location . "db-h")
+               (subject . "url-gw should support HTTP CONNECT proxies")
+               (originator . "Magnus Henoch <address@hidden>")
+               (last_modified . 1310061242.0) (pending . "pending") (affects)
+               (archived) (tags) (fixed_date) (package "emacs") (found_date)
+               (bug_num . 10)))
 
  -- Function: debbugs-get-attribute bug-or-message attribute
      General accessor that returns the value of key ATTRIBUTE.
@@ -415,12 +425,175 @@ and various aspects of relationship with other bug 
reports.
             (debbugs-get-attribute
              (car (apply 'debbugs-get-status (debbugs-newest-bugs 1)))
              'originator))
+
           => "Jack Daniels <address@hidden>"
 
 
-File: debbugs.info,  Node: Requesting messages,  Next: Requesting user tags,  
Prev: Requesting bugs statuses,  Up: Top
+File: debbugs.info,  Node: Searching bugs,  Next: Requesting messages,  Prev: 
Requesting bugs statuses,  Up: Top
+
+5 Searching bugs
+****************
+
+The Debbugs servers include an hyperestraier search engine, which
+allows to search inside the bug database.  This is enabled only for
+the GNU port of the BTS, and also only the GNU port offers a
+Debbugs/SOAP interface for access.
+
+   The search engine uses an index over the bug database.  This index
+is refreshed once a day only; search hits do not include recent
+changes of the same day.
+
+ -- Function: debbugs-search-est &rest query
+     Return the result of a full text search according to QUERY.
+
+     QUERY is a sequence of lists of keyword-value pairs where the
+     values are strings or numbers, i.e. :KEYWORD VALUE [:KEYWORD
+     VALUE]*
+
+     Every sublist of the QUERY forms a hyperestraier condition.  A
+     detailed description of hyperestraier conditions can be found at
+     <http://fallabs.com/hyperestraier/uguide-en.html#searchcond>.
+
+     The following conditions are possible:
+
+          (:phrase SEARCH-PHRASE :skip NUMBER :max NUMBER)
+
+          The string SEARCH-PHRASE forms the search on the database.
+          It contains 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.  The phrase keyword and value
+          can also be omitted, this is useful in combination with
+          other conditions.
+
+          ':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 all possible hits are returned according to the default
+          maximum of the debbugs server.  There is also an absolute
+          maximum how many hits are returned by the debbugs server,
+          which cannot be overwritten my any larger ':max' number.
+
+          There must be exactly one such condition.
+
+          (ATTRIBUTE VALUE+ :operator OPERATOR :order ORDER)
+
+          ATTRIBUTE is one of the following keywords:
+
+          ':subject'
+          ':@title'
+               The subject of a message or the title of the bug, a
+               string.
+
+          ':date'
+          ':@cdate'
+               The submission date of the bug or the modification date
+               of a message, a number.
+
+          ':@author'
+               The email address of the author of a message belonging
+               to this bug, a string.  It may be different than the
+               email of the person submitting the bug.  The special
+               email address '"me"' is used as pattern, replaced with
+               'user-mail-address'.
+
+          ':package'
+               The value is the name of the package a bug belongs to,
+               like '"emacs"', '"coreutils"', '"gnus"', or '"tramp"'.
+
+          ':tags'
+               An arbitrary string the bug is annotated with.
+
+          ':severity'
+               This is the severity of the bug.  The exact set of
+               allowed values depends on the Debbugs port.  Examples
+               are '"normal"', '"minor"', '"wishlist"' etc.
+
+          ':operator' defines the comparison operator to be applied to
+          ATTRIBUTE.  For string attributes this could be '"STREQ"'
+          (is equal to the string), '"STRNE"' (is not equal to the
+          string), '"STRINC"' (includes the string), '"STRBW"' (begins
+          with the string), '"STREW"' (ends with the string),
+          '"STRAND"' (includes all tokens in the string), '"STROR"'
+          (includes at least one token in the string), '"STROREQ"' (is
+          equal to at least one token in the string) or '"STRRX"'
+          (matches regular expressions of the string).  For operators
+          with tokens, several values for ATTRIBUTE shall be used.
+
+          Numbers can be compared by the operators '"NUMEQ"' (is equal
+          to the number), '"NUMNE"' (is not equal to the number),
+          '"NUMGT"' (is greater than the number), '"NUMGE"' (is
+          greater than or equal to the number), '"NUMLT"' (is less
+          than the number), '"NUMLE"' (is less than or equal to the
+          number) or '"NUMBT"' (is between the two numbers).  In the
+          last case, there must be two values for ATTRIBUTE.
+
+          If an operator is led by '"!"', the meaning is inverted.  If
+          a string operator is led by '"I"', the case of the value is
+          ignored.
+
+          The optional ':order' can be specified only in one
+          condition.  It means, that ATTRIBUTE is used for sorting the
+          results.  The following order operators exist: '"STRA"'
+          (ascending by string), '"STRD"' (descending by string),
+          '"NUMA"' (ascending by number) or '"NUMD"' (descending by
+          number).
+
+          A special case is an ':order', where there is no
+          corresponding attribute value and no operator.  In this
+          case, ATTRIBUTE is not used for the search.
+
+          The result of the QUERY is a list of association lists with
+          the same attributes as in the conditions.  Additional
+          attributes are
+
+          'id'
+               The bug number.
+
+          'msg_num'
+               The number of the message inside the bug log.
+
+          'snippet'
+               The surrounding text found by the search.  For the
+               syntax of the snippet, consult the hyperestraier user
+               guide.
+
+     Example.  Get two messages containing words "armstrong" and
+     "debbugs" from GNU BTS. Skip the first 10 hits:
 
-5 Requesting messages
+          (let ((debbugs-port "gnu.org"))
+            (debbugs-search-est
+              '(:phrase "armstrong AND debbugs" :skip 10 :max 2)
+              '(:severity "normal" :operator "STRINC")
+              '(:date :order "NUMA")))
+
+          => ((("msg_num" . 21)
+               ("date" . 1229208302)
+               ("@author" . "Glenn Morris <address@hidden>")
+               ("@title" . "Re: bug#1567: Mailing an archived bug")
+               ("id" . 1567)
+               ("severity" . "normal")
+               ("@cdate" . "Wed, 17 Dec 2008 14:34:50 -0500")
+               ("snippet" . "...")
+               ("subject" . "Mailing an archived bug")
+               ("package" . "debbugs.gnu.org"))
+           ...)
+
+     Example.  Show all messages for package "emacs" on GNU BTS
+     between 2011-08-21 and 2011-08-31.
+
+          (let ((debbugs-port "gnu.org"))
+            (debbugs-search-est
+             '(:max 500)
+             '(:package "emacs" :operator "STREQ")
+             `(:@cdate
+               ,(floor (float-time (encode-time 0 0 0 21 8 2011)))
+               ,(floor (float-time (encode-time 0 0 0 31 8 2011)))
+               :operator "NUMBT")))
+
+
+File: debbugs.info,  Node: Requesting messages,  Next: Requesting user tags,  
Prev: Searching bugs,  Up: Top
+
+6 Requesting messages
 *********************
 
  -- Function: debbugs-get-bug-log bug-number
@@ -448,6 +621,7 @@ File: debbugs.info,  Node: Requesting messages,  Next: 
Requesting user tags,  Pr
 
           (let ((debbugs-port "debian.org"))
              (debbugs-get-message-numbers (debbugs-get-bug-log 456789)))
+
           => (5 10 12)
 
  -- Function: debbugs-get-message messages message-number
@@ -499,7 +673,7 @@ File: debbugs.info,  Node: Requesting messages,  Next: 
Requesting user tags,  Pr
 
 File: debbugs.info,  Node: Requesting user tags,  Prev: Requesting messages,  
Up: Top
 
-6 Requesting user tags
+7 Requesting user tags
 **********************
 
 A user tag is a string, a user has assigned to one or several bugs.
@@ -534,6 +708,7 @@ also package names as user identification.
 
           (let ((debbugs-port "gnu.org"))
             (debbugs-get-usertag :user "emacs"))
+
           => ("www" "solaris" "ls-lisp" "cygwin")
 
      Get all bugs tagged by package '"emacs"' with '"www"' or
@@ -541,17 +716,19 @@ also package names as user identification.
 
           (let ((debbugs-port "gnu.org"))
             (debbugs-get-usertag :user "emacs" :tag "www" :tag "cygwin"))
+
           => (807 1223 5637)
 
 
 
 Tag Table:
 Node: Top1094
-Node: Installation3179
-Node: Configuration4278
-Node: Requesting bug numbers6629
-Node: Requesting bugs statuses11883
-Node: Requesting messages15934
-Node: Requesting user tags18949
+Node: Installation3235
+Node: Configuration4334
+Node: Requesting bug numbers6685
+Node: Requesting bugs statuses12065
+Node: Searching bugs16357
+Node: Requesting messages23163
+Node: Requesting user tags26169
 
 End Tag Table
diff --git a/packages/debbugs/debbugs.texi b/packages/debbugs/debbugs.texi
index 0a627d6..6671bf2 100644
--- a/packages/debbugs/debbugs.texi
+++ b/packages/debbugs/debbugs.texi
@@ -73,6 +73,7 @@ is described in @ref{Top, Debbugs User Guide, , debbugs-ug}.
 * Configuration::               Configuring @code{debbugs}.
 * Requesting bug numbers::      How to request bug report numbers.
 * Requesting bugs statuses::    How to request the status of bug reports.
+* Searching bugs::              How to search for bugs.
 * Requesting messages::         How to get messages from bug reports.
 * Requesting user tags::        How to request tags set by users.
 @end menu
@@ -223,16 +224,19 @@ Debian port: @code{"patch"}, @code{"wontfix"}, 
@code{"moreinfo"},
 @code{"upstream"}, @code{"pending"}, @code{"sarge"},
 @code{"sarge-ignore"}, @code{"experimental"}, @code{"d-i"},
 @code{"confirmed"}, @code{"ipv6"}, @code{"lfs"},
address@hidden"fixed-in-experimental"}, @code{"fixed-upstream"}, @code{"l10n"},
address@hidden"etch"}, @code{"etch-ignore"}, @code{"lenny"},
address@hidden"fixed-in-experimental"}, @code{"fixed-upstream"},
address@hidden"l10n"}, @code{"etch"}, @code{"etch-ignore"}, @code{"lenny"},
 @code{"lenny-ignore"}, @code{"squeeze"}, @code{"squeeze-ignore"},
address@hidden"wheezy"}, @code{"wheezy-ignore"}. The actual list of tags can be
-found on @uref{http://www.debian.org/Bugs/Developer#tags}.
address@hidden"wheezy"}, @code{"wheezy-ignore"}, @code{"jessie"},
address@hidden"jessie-ignore"}, @code{"stretch"}, @code{"stretch-ignore"},
address@hidden"buster"}, @code{"buster-ignore"}. The actual list of tags can
+be found on @uref{http://www.debian.org/Bugs/Developer#tags}.
 
 GNU port: @code{"fixed"}, @code{"notabug"}, @code{"wontfix"},
 @code{"unreproducible"}, @code{"moreinfo"}, @code{"patch"},
address@hidden"pending"}, @code{"help"}, @code{"security"}, @code{"confirmed"}.
-See @url{http://debbugs.gnu.org/Developer.html#tags} for the actual list
address@hidden"pending"}, @code{"help"}, @code{"security"},
address@hidden"confirmed"}, @code{"easy"}.  See
address@hidden://debbugs.gnu.org/Developer.html#tags} for the actual list
 of tags.
 
 @item :owner
@@ -263,8 +267,8 @@ with the given name.  The bugs are chosen by the value of 
field
 belong to this package.
 
 @item :status
-Status of bug.  Valid values are @code{"done"}, @code{"forwarded"} and
address@hidden"open"}.
+Status of bug.  Valid values are @code{"open"}, @code{"forwarded"} and
address@hidden"done"}.
 
 @item :archive
 A keyword to filter for bugs which are already archived, or not.  Valid
@@ -296,6 +300,7 @@ Example.  Get the latest six bug report numbers from Debian 
BTS:
 @example
 (let ((debbugs-port "debian.org"))
   (debbugs-newest-bugs 6))
+
 @result{} (633152 633153 633154 633155 633156 633157)
 @end example
 @end defun
@@ -331,7 +336,8 @@ same as for @code{:tags} in @code{debbugs-get-bugs} 
(@pxref{Requesting
 bug numbers}).
 
 @item pending
-The string @code{"pending"}, @code{"forwarded"} or @code{"done"}.
+The string @code{"pending"}, @code{"forwarded"}, @code{"fixed"} or
address@hidden"done"}.
 
 @item subject
 Subject/Title of the bugreport.
@@ -392,6 +398,10 @@ A list of package names.
 
 @item summary
 Arbitrary text.
+
address@hidden cache_time
+This is not an attribute located at the debbugs server, but an
+internal value of the debbugs.el package itself.
 @end table
 
 Example.  Get the status of bug number #10 from GNU BTS:
@@ -399,19 +409,20 @@ Example.  Get the status of bug number #10 from GNU BTS:
 @example
 (let ((debbugs-port "gnu.org"))
   (debbugs-get-status 10))
address@hidden
-(((source . "unknown") (found_versions) (done) (blocks)
-  (date . 1203606305.0) (fixed) (fixed_versions) (mergedwith)
-  (found) (unarchived) (blockedby) (keywords) (summary)
-  (msgid . "<87zltuz7eh.fsf@@freemail.hu>") (id . 10)
-  (forwarded) (severity . "wishlist")
-  (owner . "Magnus Henoch <*****@@freemail.hu>")
-  (log_modified . 1310061242.0) (location . "db-h")
-  (subject . "url-gw should support HTTP CONNECT proxies")
-  (originator . "Magnus Henoch <*****@@freemail.hu>")
-  (last_modified . 1310061242.0) (pending . "pending") (affects)
-  (archived) (tags) (fixed_date) (package "emacs") (found_date)
-  (bug_num . 10)))
+
address@hidden (((cache_time . 1469716026.4981334)
+     (source . "unknown") (found_versions) (done) (blocks)
+     (date . 1203606305.0) (fixed) (fixed_versions) (mergedwith)
+     (found) (unarchived) (blockedby) (keywords) (summary)
+     (msgid . "<87zltuz7eh.fsf@@freemail.hu>") (id . 10)
+     (forwarded) (severity . "wishlist")
+     (owner . "Magnus Henoch <*****@@freemail.hu>")
+     (log_modified . 1310061242.0) (location . "db-h")
+     (subject . "url-gw should support HTTP CONNECT proxies")
+     (originator . "Magnus Henoch <*****@@freemail.hu>")
+     (last_modified . 1310061242.0) (pending . "pending") (affects)
+     (archived) (tags) (fixed_date) (package "emacs") (found_date)
+     (bug_num . 10)))
 @end example
 @end defun
 
@@ -428,10 +439,175 @@ Example.  Return the originator of the last submitted 
bug report:
   (debbugs-get-attribute
    (car (apply 'debbugs-get-status (debbugs-newest-bugs 1)))
    'originator))
+
 @result{} "Jack Daniels <jack@@daniels.com>"
 @end example
 @end defun
 
address@hidden Searching bugs
address@hidden Searching bugs
+
+The Debbugs servers include an hyperestraier search engine, which
+allows to search inside the bug database.  This is enabled only for
+the GNU port of the BTS, and also only the GNU port offers a
+Debbugs/SOAP interface for access.
+
+The search engine uses an index over the bug database.  This index is
+refreshed once a day only; search hits do not include recent changes
+of the same day.
+
address@hidden debbugs-search-est &rest query
+Return the result of a full text search according to @var{query}.
+
address@hidden is a sequence of lists of keyword-value pairs where the
+values are strings or numbers, i.e.@: @var{:keyword} @var{value}
address@hidden:keyword} @var{value}]*
+
+Every sublist of the @var{query} forms a hyperestraier condition.  A
+detailed description of hyperestraier conditions can be found at
address@hidden://fallabs.com/hyperestraier/uguide-en.html#searchcond}.
+
+The following conditions are possible:
+
address@hidden @w{}
address@hidden (:phrase @var{search-phrase} :skip @var{number} :max 
@var{number})
+
+The string @var{search-phrase} forms the search on the database.  It
+contains 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.  The phrase keyword and value can also be omitted, this is
+useful in combination with other conditions.
+
address@hidden:skip} and @code{: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 all possible hits
+are returned according to the default maximum of the debbugs server.
+There is also an absolute maximum how many hits are returned by the
+debbugs server, which cannot be overwritten my any larger @code{:max}
+number.
+
+There must be exactly one such condition.
+
address@hidden (@var{attribute} @var{value}+ :operator @var{operator} :order 
@var{order})
+
address@hidden is one of the following keywords:
+
address@hidden @code
address@hidden :subject
address@hidden :@@title
+The subject of a message or the title of the bug, a string.
+
address@hidden :date
address@hidden :@@cdate
+The submission date of the bug or the modification date of a message,
+a number.
+
address@hidden :@@author
+The email address of the author of a message belonging to this bug, a
+string.  It may be different than the email of the person submitting
+the bug.  The special email address @code{"me"} is used as pattern,
+replaced with @code{user-mail-address}.
+
address@hidden :package
+The value is the name of the package a bug belongs to, like
address@hidden"emacs"}, @code{"coreutils"}, @code{"gnus"}, or @code{"tramp"}.
+
address@hidden :tags
+An arbitrary string the bug is annotated with.
+
address@hidden :severity
+This is the severity of the bug.  The exact set of allowed values
+depends on the Debbugs port.  Examples are @code{"normal"},
address@hidden"minor"}, @code{"wishlist"} etc.
address@hidden table
+
address@hidden:operator} defines the comparison operator to be applied to
address@hidden  For string attributes this could be @code{"STREQ"}
+(is equal to the string), @code{"STRNE"} (is not equal to the string),
address@hidden"STRINC"} (includes the string), @code{"STRBW"} (begins with the
+string), @code{"STREW"} (ends with the string), @code{"STRAND"}
+(includes all tokens in the string), @code{"STROR"} (includes at least
+one token in the string), @code{"STROREQ"} (is equal to at least one
+token in the string) or @code{"STRRX"} (matches regular expressions of
+the string).  For operators with tokens, several values for
address@hidden shall be used.
+
+Numbers can be compared by the operators @code{"NUMEQ"} (is equal to
+the number), @code{"NUMNE"} (is not equal to the number),
address@hidden"NUMGT"} (is greater than the number), @code{"NUMGE"} (is
+greater than or equal to the number), @code{"NUMLT"} (is less than the
+number), @code{"NUMLE"} (is less than or equal to the number) or
address@hidden"NUMBT"} (is between the two numbers).  In the last case, there
+must be two values for @var{attribute}.
+
+If an operator is led by @code{"!"}, the meaning is inverted.  If a
+string operator is led by @code{"I"}, the case of the value is
+ignored.
+
+The optional @code{:order} can be specified only in one condition.  It
+means, that @var{attribute} is used for sorting the results.  The
+following order operators exist: @code{"STRA"} (ascending by string),
address@hidden"STRD"} (descending by string), @code{"NUMA"} (ascending by
+number) or @code{"NUMD"} (descending by number).
+
+A special case is an @code{:order}, where there is no corresponding
+attribute value and no operator.  In this case, @var{attribute} is
+not used for the search.
+
+The result of the @var{query} is a list of association lists with the
+same attributes as in the conditions.  Additional attributes are
+
address@hidden @code
address@hidden id
+The bug number.
+
address@hidden msg_num
+The number of the message inside the bug log.
+
address@hidden snippet
+The surrounding text found by the search.  For the syntax of the
+snippet, consult the hyperestraier user guide.
address@hidden table
address@hidden itemize
+
+Example.  Get two messages containing words "armstrong" and "debbugs"
+from GNU BTS.  Skip the first 10 hits:
+
address@hidden
+(let ((debbugs-port "gnu.org"))
+  (debbugs-search-est
+    '(:phrase "armstrong AND debbugs" :skip 10 :max 2)
+    '(:severity "normal" :operator "STRINC")
+    '(:date :order "NUMA")))
+
address@hidden ((("msg_num" . 21)
+     ("date" . 1229208302)
+     ("@@author" . "Glenn Morris <*****@@gnu.org>")
+     ("@@title" . "Re: bug#1567: Mailing an archived bug")
+     ("id" . 1567)
+     ("severity" . "normal")
+     ("@@cdate" . "Wed, 17 Dec 2008 14:34:50 -0500")
+     ("snippet" . "@dots{}")
+     ("subject" . "Mailing an archived bug")
+     ("package" . "debbugs.gnu.org"))
+ @dots{})
address@hidden example
+
+Example.  Show all messages for package "emacs" on GNU BTS between
+2011-08-21 and 2011-08-31.
+
address@hidden
+(let ((debbugs-port "gnu.org"))
+  (debbugs-search-est
+   '(:max 500)
+   '(:package "emacs" :operator "STREQ")
+   `(:@@cdate
+     ,(floor (float-time (encode-time 0 0 0 21 8 2011)))
+     ,(floor (float-time (encode-time 0 0 0 31 8 2011)))
+     :operator "NUMBT")))
address@hidden example
address@hidden defun
+
 @node Requesting messages
 @chapter Requesting messages
 
@@ -464,6 +640,7 @@ BTS:
 @example
 (let ((debbugs-port "debian.org"))
    (debbugs-get-message-numbers (debbugs-get-bug-log 456789)))
+
 @result{} (5 10 12)
 @end example
 @end defun
@@ -558,6 +735,7 @@ Example.  Get all user tags for the package @code{"emacs"}:
 @example
 (let ((debbugs-port "gnu.org"))
   (debbugs-get-usertag :user "emacs"))
+
 @result{} ("www" "solaris" "ls-lisp" "cygwin")
 @end example
 
@@ -567,6 +745,7 @@ Get all bugs tagged by package @code{"emacs"} with 
@code{"www"} or
 @example
 (let ((debbugs-port "gnu.org"))
   (debbugs-get-usertag :user "emacs" :tag "www" :tag "cygwin"))
+
 @result{} (807 1223 5637)
 @end example
 @end defun
diff --git a/packages/delight/COPYING b/packages/delight/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/packages/delight/COPYING
@@ -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/delight/delight.el b/packages/delight/delight.el
new file mode 100644
index 0000000..11b3d90
--- /dev/null
+++ b/packages/delight/delight.el
@@ -0,0 +1,214 @@
+;;; delight.el --- A dimmer switch for your lighter text.
+;;
+;; Copyright (C) 2013, 2014, 2016 Free Software Foundation, Inc.
+
+;; Author: Phil Sainty <address@hidden>
+;; Maintainer: Phil Sainty <address@hidden>
+;; URL: https://savannah.nongnu.org/projects/delight
+;; Keywords: convenience
+;; Created: 25 Jun 2013
+;; Version: 1.5
+
+;; 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:
+;;
+;; Enables you to customise the mode names displayed in the mode line.
+;;
+;; For major modes, the buffer-local `mode-name' variable is modified.
+;; For minor modes, the associated value in `minor-mode-alist' is set.
+;;
+;; Example usage:
+;;
+;; (require 'delight)
+;;
+;; (delight 'abbrev-mode " Abv" "abbrev")
+;;
+;; (delight '((abbrev-mode " Abv" "abbrev")
+;;            (smart-tab-mode " \\t" "smart-tab")
+;;            (eldoc-mode nil "eldoc")
+;;            (rainbow-mode)
+;;            (overwrite-mode " Ov" t)
+;;            (emacs-lisp-mode "Elisp" :major)))
+;;
+;; The first argument is the mode symbol.
+;;
+;; The second argument is the replacement name to use in the mode line
+;; (or nil to hide it).
+;;
+;; The third argument is either the keyword :major for major modes or,
+;; for minor modes, the library which defines the mode. This is passed
+;; to ‘eval-after-load’ and so should be either the name (as a string)
+;; of the library file which defines the mode, or the feature (symbol)
+;; provided by that library. If this argument is nil, the mode symbol
+;; will be passed as the feature. If this argument is either t or 'emacs
+;; then it is assumed that the mode is already loaded (you can use this
+;; with standard minor modes that are pre-loaded by default when Emacs
+;; starts).
+;;
+;; To determine which library defines a mode, use e.g.: C-h f
+;; eldoc-mode RET. The name of the library is displayed in the first
+;; paragraph, with an “.el” suffix (in this example it displays
+;; “eldoc.el”, and therefore we could use the value “eldoc” for the
+;; library).
+;;
+;; Important note:
+;;
+;; Although strings are common, any mode-line construct is permitted
+;; as the value (for both minor and major modes); so before you
+;; override a value you should check the existing one, as you may
+;; want to replicate any structural elements in your replacement
+;; if it turns out not to be a simple string.
+;;
+;; For major modes, M-: mode-name
+;; For minor modes, M-: (cadr (assq 'MODE minor-mode-alist))
+;; for the minor MODE in question.
+;;
+;; Conversely, you may incorporate additional mode-line constructs in
+;; your replacement values, if you so wish. e.g.:
+;;
+;; (delight 'emacs-lisp-mode
+;;          '("Elisp" (lexical-binding ":Lex" ":Dyn"))
+;;          :major)
+;;
+;; See `mode-line-format' for information about mode-line constructs,
+;; and M-: (info "(elisp) Mode Line Format") for further details.
+;;
+;; Also bear in mind that some modes may dynamically update these
+;; values themselves (for instance dired-mode updates mode-name if
+;; you change the sorting criteria) in which cases this library may
+;; prove inadequate.
+
+;;; Change Log:
+;;
+;; 1.05 (2016-03-01) Support FILE value t, meaning that the minor MODE
+;;       in question is guaranteed to already be loaded.
+;; 1.04 (2016-02-28) Respect `inhibit-mode-name-delight' when already set.
+;; 1.03 (2014-05-30) Added support for `mode-line-mode-menu'.
+;; 1.02 (2014-05-04) Bug fix for missing 'cl requirement for
+;;       destructuring-bind macro.
+;; 1.01 (2014-05-04) Allow the keyword :major as the FILE argument for
+;;       major modes, to avoid also processing them as minor modes.
+;; 1.00 (2013-06-25) Initial release.
+
+;;; Code:
+
+(eval-when-compile
+  (require 'cl))
+
+(defvar delighted-modes ()
+  "List of specs for modifying the display of mode names in the mode line.
+
+See `delight'.")
+
+;;;###autoload
+(defun delight (spec &optional value file)
+  "Modify the lighter value displayed in the mode line for the given mode SPEC
+if and when the mode is loaded.
+
+SPEC can be either a mode symbol, or a list containing multiple elements of
+the form (MODE VALUE FILE). In the latter case the two optional arguments are
+omitted, as they are instead specified for each element of the list.
+
+For minor modes, VALUE is the replacement lighter value (or nil to disable)
+to set in the `minor-mode-alist' variable. For major modes VALUE is the
+replacement buffer-local `mode-name' value to use when a buffer changes to
+that mode.
+
+In both cases VALUE is commonly a string, but may in fact contain any valid
+mode-line construct. For details see the `mode-line-format' variable, and
+Info node `(elisp) Mode Line Format'.
+
+The FILE argument is passed through to `eval-after-load'. If FILE is nil then
+the mode symbol is passed as the required feature. If FILE is t then it is
+assumed that the mode is already loaded. (Note that you can also use 'emacs
+for this purpose). These FILE options are relevant to minor modes only.
+
+For major modes you should specify the keyword :major as the value of FILE,
+to prevent the mode being treated as a minor mode."
+  (add-hook 'after-change-major-mode-hook 'delight-major-mode)
+  (let ((glum (if (consp spec) spec (list (list spec value file)))))
+    (while glum
+      (destructuring-bind (mode &optional value file) (pop glum)
+        (assq-delete-all mode delighted-modes)
+        (add-to-list 'delighted-modes (list mode value file))
+        (unless (eq file :major)
+          (eval-after-load (if (eq file t) 'emacs (or file mode))
+            `(let ((minor-delight (assq ',mode minor-mode-alist)))
+               (when minor-delight
+                 (setcar (cdr minor-delight) ',value)
+                 (delight-mode-line-mode-menu ',mode ',value)))))))))
+
+(defun delight-mode-line-mode-menu (mode value)
+  "Delight `mode-line-mode-menu' (the \"Toggle minor modes\" menu)
+so that the Lighter text displayed in the menu matches that displayed in
+the mode line (when such menu items exist).
+
+The expected naming scheme for the menu items is: \"Friendly name (Lighter)\"
+e.g.: \"Highlight changes (Chg)\".
+
+We replace the \"Lighter\" portion of that with our delighted VALUE, for the
+specified MODE, unless VALUE is empty/nil, in which case we remove the text
+and parentheses altogether.
+
+If the delighted VALUE is not a string and not nil, we do nothing."
+  (when (string-or-null-p value)
+    (let* ((menu-keymap mode-line-mode-menu)
+           (menu-item (assq mode (cdr menu-keymap))))
+      (when menu-item
+        ;; Lighter text is typically prefixed with a space to separate
+        ;; it from the preceding lighter. We need to trim that space.
+        (let* ((trimmed-value (if (and value (string-match "\\`\\s-+" value))
+                                  (replace-match "" t t value)
+                                value))
+               (wrapped-value (if (> (length trimmed-value) 0)
+                                  (concat " (" trimmed-value ")")
+                                ""))
+               (menu-def (cdr menu-item))
+               (label (cadr menu-def))
+               (new-label (and (stringp label)
+                               (or (string-match "\\s-+(.+?)\\s-*\\'" label)
+                                   (string-match "\\s-*\\'" label))
+                               (replace-match wrapped-value t t label))))
+          (when new-label
+            ;; Pure storage is used for the default menu items, so we
+            ;; cannot modify those objects directly.
+            (setq menu-def (copy-sequence menu-def))
+            (setf (cadr menu-def) new-label)
+            (define-key menu-keymap (vector mode) menu-def)))))))
+
+(defun delight-major-mode ()
+  "Delight the 'pretty name' of the current buffer's major mode
+when displayed in the mode-line.
+
+When `mode-name' is displayed in other contexts (such as in the
+`describe-mode' help buffer), its original value will be used."
+  (let ((major-delight (assq major-mode delighted-modes)))
+    (when major-delight
+      (setq mode-name `(inhibit-mode-name-delight
+                        ,mode-name ;; glum
+                        ,(cadr major-delight)))))) ;; delighted
+
+(defvar inhibit-mode-name-delight)
+
+(defadvice format-mode-line (around delighted-modes-are-glum activate)
+  "Delighted modes should exhibit their original `mode-name' when
+`format-mode-line' is called. See `delight-major-mode'."
+  (let ((inhibit-mode-name-delight (if (boundp 'inhibit-mode-name-delight)
+                                       inhibit-mode-name-delight
+                                     t)))
+    ad-do-it))
+
+(provide 'delight)
+;;; delight.el ends here
diff --git a/packages/dict-tree/dict-tree.el b/packages/dict-tree/dict-tree.el
index 2ba3bdb..a21fcc4 100644
--- a/packages/dict-tree/dict-tree.el
+++ b/packages/dict-tree/dict-tree.el
@@ -537,20 +537,20 @@ defaults to \"lexical\" comparison of the keys, ignoring 
the data
 \(which is not very useful, since an unranked `dictree-complete'
 query already does this much more efficiently\).
 
-CACHE-POLICY should be a symbol ('time, 'length, or 'both), which
-determines which query operations are cached. The 'time setting
+CACHE-POLICY should be a symbol (`time', `length', or `both'), which
+determines which query operations are cached. The `time' setting
 caches queries that take longer (in seconds) than the
-corresponding CACHE-THRESHOLD value. The 'length setting caches
+corresponding CACHE-THRESHOLD value. The `length' setting caches
 lookups of key sequences that are longer than
 LOOKUP-CACHE-THRESHOLD value (since those are likely to be the
 slower ones), and caches completions of prefixes that are shorter
 than the corresponding CACHE-THRESHOLD (since those are likely to
-be the slower ones in that case). The setting 'both requires both
+be the slower ones in that case). The setting `both' requires both
 conditions to be satisfied simultaneously. In this case,
 CACHE-THRESHOLD must be a plist with properties :time and :length
 specifying the corresponding cache thresholds.
 
-CACHE-UPDATE-POLICY should be a symbol ('synchronize or 'delete),
+CACHE-UPDATE-POLICY should be a symbol (`synchronize' or `delete'),
 which determines how the caches are updated when data is inserted
 or deleted. The former updates tainted cache entries, which makes
 queries faster but insertion and deletion slower, whereas the
@@ -1615,13 +1615,13 @@ set. (See also `dictree-member-p' for testing existence 
alone.)"
 for side-effects only.
 
 FUNCTION will be passed two arguments: a key of type
-TYPE ('string, 'vector, or 'list, defaulting to 'vector) from the
+TYPE (`string', `vector', or `list', defaulting to `vector') from the
 dictionary, and the data associated with that key. The dictionary
 entries will be traversed in \"lexical\" order, i.e. the order
 defined by the dictionary's comparison function (cf.
 `dictree-create').
 
-If TYPE is 'string, it must be possible to apply the function
+If TYPE is `string', it must be possible to apply the function
 `string' to the elements of sequences stored in DICT.
 
 FUNCTION is applied in ascending order, or descending order if
@@ -1676,9 +1676,9 @@ and combine the results using COMBINATOR.
 FUNCTION should take two arguments: a key sequence from the
 dictionary and its associated data.
 
-Optional argument TYPE (one of the symbols vector, lisp or
-string; defaults to vector) sets the type of sequence passed to
-FUNCTION. If TYPE is 'string, it must be possible to apply the
+Optional argument TYPE (one of the symbols `vector', `lisp' or
+`string'; defaults to `vector') sets the type of sequence passed to
+FUNCTION. If TYPE is `string', it must be possible to apply the
 function `string' to the individual elements of key sequences
 stored in DICT.
 
@@ -1725,9 +1725,9 @@ and make a list of the results.
 FUNCTION should take two arguments: a key sequence from the
 dictionary and its associated data.
 
-Optional argument TYPE (one of the symbols vector, lisp or
-string; defaults to vector) sets the type of sequence passed to
-FUNCTION. If TYPE is 'string, it must be possible to apply the
+Optional argument TYPE (one of the symbols `vector', `lisp' or
+`string'; defaults to `vector') sets the type of sequence passed to
+FUNCTION. If TYPE is `string', it must be possible to apply the
 function `string' to the individual elements of key sequences
 stored in DICT.
 
@@ -1740,7 +1740,7 @@ Note that if you don't care about the order in which 
FUNCTION is
 applied, just that the resulting list is in the correct order,
 then
 
-  (trie-mapf function 'cons trie type (not reverse))
+  (trie-mapf function \\='cons trie type (not reverse))
 
 is more efficient.
 
@@ -2268,7 +2268,7 @@ results, and doesn't count towards MAXNUM.
 
 RESULTFUN defines a function used to process results before
 adding them to the final result list. If specified, it should
-accept two arguments: a key and its associated data. It's return
+accept two arguments: a key and its associated data. Its return
 value is what gets added to the final result list, instead of the
 default key-data cons cell."
   ;; run completion query
@@ -2403,7 +2403,7 @@ default key-data cons cell."
 ;;                    Persistent storage
 
 (defun dictree-save (dict &optional compilation)
-  "Save dictionary DICT to it's associated file.
+  "Save dictionary DICT to its associated file.
 Use `dictree-write' to save to a different file.
 
 Optional argument COMPILATION determines whether to save the
@@ -2450,9 +2450,9 @@ preference to the uncomplied version, as it loads
 faster. However, only the uncompiled version is portable between
 different Emacs versions.
 
-If optional argument COMPILATION is the symbol 'compiled, only
+If optional argument COMPILATION is the symbol `compiled', only
 the compiled version will be created, whereas if it is the symbol
-'uncompiled, only the uncompiled version will be created.
+`uncompiled', only the uncompiled version will be created.
 
 Interactively, DICT and FILENAME are read from the mini-buffer,
 and OVERWRITE is the prefix argument."
@@ -3169,15 +3169,15 @@ appended to the end of it. Otherwise, a new buffer will 
be
 created. If BUFFER is omitted, the current buffer is used.
 
 TYPE determines the type of sequence to use to represent the
-keys, and should be one of 'string, 'vector or 'list. The default
-is 'vector.
+keys, and should be one of `string', `vector' or `list'. The default
+is `vector'.
 
 Note that if the data does not have a read syntax, the dumped
 data can not be used to recreate the dictionary using
 `dictree-populate-from-file'.
 
 Interactively, DICT and BUFFER are read from the mini-buffer,
-TYPE is always 'string."
+TYPE is always `string'."
   (interactive (list (read-dict "Dictionary: ")
                     (read-buffer
                      "Buffer to dump to (defaults to current): "
@@ -3240,15 +3240,15 @@ as that used by `dictree-populate-from-file'. Prompts 
to overwrite
 FILENAME if it already exists, unless OVERWRITE is non-nil.
 
 TYPE determines the type of sequence to use to represent the
-keys, and should be one of 'string, 'vector or 'list. The default
-is 'vector.
+keys, and should be one of `string', `vector' or `list'. The default
+is `vector'.
 
 Note that if the data does not have a read syntax and no , the dumped
 data can not be used to recreate the dictionary using
 `dictree-populate-from-file'.
 
 Interactively, DICT and FILE are read from the mini-buffer,
-OVERWRITE is the prefix argument, and TYPE is always 'string."
+OVERWRITE is the prefix argument, and TYPE is always `string'."
   (interactive (list (read-dict "Dictionary: ")
                     (read-file-name "File to dump to: " nil "")))
   (when (and (called-interactively-p 'any) (symbolp dict))
diff --git a/packages/diff-hl/README.md b/packages/diff-hl/README.md
index b8bbe3a..725466b 100644
--- a/packages/diff-hl/README.md
+++ b/packages/diff-hl/README.md
@@ -52,6 +52,16 @@ Notes
   it's only accurate when the buffer is in saved state. Check out
   `diff-hl-flydiff-mode`, it aims to handle unsaved buffers as well.
 
+* To use an
+  [alternative diff 
algorithm](http://stackoverflow.com/questions/32365271/whats-the-difference-between-git-diff-patience-and-git-diff-histogram)
+  with Git, add a corresponding argument to `vc-git-diff-switches`,
+  e.g. `(setq vc-git-diff-switches '("--histogram"))`. Using the
+  `diff.algorithm` option doesn't work
+  [because](http://article.gmane.org/gmane.comp.version-control.git/294622)
+  `vc-git-diff` calls `git diff-index`. `diff-hl-flydiff-mode` does
+  not support alternative algorithms, because it uses the external
+  `diff` program.
+
 * We conflict with other modes when they put indicators on the fringe,
   such as [Flycheck](https://github.com/flycheck/flycheck). This is
   rarely a significant problem, since if you're using such a mode,
diff --git a/packages/diff-hl/diff-hl-amend.el 
b/packages/diff-hl/diff-hl-amend.el
index defb3f4..e39656d 100644
--- a/packages/diff-hl/diff-hl-amend.el
+++ b/packages/diff-hl/diff-hl-amend.el
@@ -31,7 +31,7 @@
 (define-minor-mode diff-hl-amend-mode
   "Show changes against the second-last revision in `diff-hl-mode'.
 Most useful with backends that support rewriting local commits,
-and most importantly, 'amending' the most recent one.
+and most importantly, \"amending\" the most recent one.
 Currently only supports Git, Mercurial and Bazaar."
   :lighter " Amend"
   (if diff-hl-amend-mode
diff --git a/packages/diff-hl/diff-hl-flydiff.el 
b/packages/diff-hl/diff-hl-flydiff.el
index 94dbbd7..7f0c6c7 100644
--- a/packages/diff-hl/diff-hl-flydiff.el
+++ b/packages/diff-hl/diff-hl-flydiff.el
@@ -39,7 +39,7 @@
   :type 'number)
 
 (defvar diff-hl-flydiff-modified-tick 0)
-(defvar diff-hl-flydiff-timer)
+(defvar diff-hl-flydiff-timer nil)
 (make-variable-buffer-local 'diff-hl-flydiff-modified-tick)
 
 (defun diff-hl-flydiff/vc-git--symbolic-ref (file)
@@ -167,6 +167,7 @@ This requires the external program `diff' to be in your 
`exec-path'."
     (advice-remove 'diff-hl-modified-p #'diff-hl-flydiff/modified-p)
     (advice-remove 'diff-hl-changes-buffer #'diff-hl-flydiff-buffer-with-head)
 
-    (cancel-timer diff-hl-flydiff-timer)))
+    (and diff-hl-flydiff-timer
+         (cancel-timer diff-hl-flydiff-timer))))
 
 (provide 'diff-hl-flydiff)
diff --git a/packages/diff-hl/diff-hl.el b/packages/diff-hl/diff-hl.el
index 2aaabd4..6650818 100644
--- a/packages/diff-hl/diff-hl.el
+++ b/packages/diff-hl/diff-hl.el
@@ -5,7 +5,7 @@
 ;; Author:   Dmitry Gutov <address@hidden>
 ;; URL:      https://github.com/dgutov/diff-hl
 ;; Keywords: vc, diff
-;; Version:  1.8.3
+;; Version:  1.8.4
 ;; Package-Requires: ((cl-lib "0.2"))
 
 ;; This file is part of GNU Emacs.
@@ -209,7 +209,16 @@
 (defvar vc-svn-diff-switches)
 
 (defmacro diff-hl-with-diff-switches (body)
-  `(let ((vc-git-diff-switches nil)
+  `(let ((vc-git-diff-switches
+          ;; https://github.com/dgutov/diff-hl/issues/67
+          (cons "-U0"
+                ;; https://github.com/dgutov/diff-hl/issues/9
+                (and (boundp 'vc-git-diff-switches)
+                     (listp vc-git-diff-switches)
+                     (cl-remove-if-not
+                      (lambda (arg)
+                        (member arg '("--histogram" "--patience" "--minimal")))
+                      vc-git-diff-switches))))
          (vc-hg-diff-switches nil)
          (vc-svn-diff-switches nil)
          (vc-diff-switches '("-U0"))
diff --git a/packages/diffview/Makefile b/packages/diffview/Makefile
new file mode 100644
index 0000000..a422376
--- /dev/null
+++ b/packages/diffview/Makefile
@@ -0,0 +1,13 @@
+README.md: make-readme-markdown.el diffview.el
+       emacs --script $< < diffview.el >$@
+
+ifeq ($(LOCAL),1)
+make-readme-markdown.el:
+       cp -v ../make-readme-markdown/make-readme-markdown.el .
+else
+make-readme-markdown.el:
+       wget -q -O $@ 
https://raw.github.com/mgalgs/make-readme-markdown/master/make-readme-markdown.el
+endif
+
+.INTERMEDIATE: make-readme-markdown.el
+.PHONY: README.md
diff --git a/packages/diffview/README.md b/packages/diffview/README.md
new file mode 100644
index 0000000..d64002d
--- /dev/null
+++ b/packages/diffview/README.md
@@ -0,0 +1,59 @@
+## diffview.el
+*View diffs in side-by-side format*
+
+---
+[![License 
GPLv3](https://img.shields.io/badge/license-GPL_v3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.html)
+[![MELPA](http://melpa.org/packages/diffview-badge.svg)](http://melpa.org/#/diffview)
+[![MELPA 
Stable](http://stable.melpa.org/packages/diffview-badge.svg)](http://stable.melpa.org/#/diffview)
+
+Render a unified diff (top/bottom) in an easy-to-comprehend side-by-side
+format.  This comes in handy for reading patches from mailing lists (or
+from whencever you might acquire them).
+
+### Installation
+
+
+    M-x package-install diffview
+
+### Usage
+
+
+The following functions are provided for launching a side-by-side diff:
+
+* `diffview-current` : View the current diff buffer side-by-side
+* `diffview-region` : View the current diff region side-by-side
+* `diffview-message` : View the current email message (which presumably
+   contains a patch) side-by-side
+
+
+### Screenshots
+
+
+Before:
+<img 
src="https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-before.png";>
+
+After:
+<img 
src="https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-after.png";>
+
+### Function Documentation
+
+
+#### `(diffview-current)`
+
+Show current diff buffer in a side-by-side view.
+
+#### `(diffview-region)`
+
+Show current diff region in a side-by-side view.
+
+#### `(diffview-message)`
+
+Show `message-mode` buffer in a side-by-side view.
+
+This is useful for reading patches from mailing lists.
+
+-----
+<div style="padding-top:15px;color: #d0d0d0;">
+Markdown README file generated by
+<a 
href="https://github.com/mgalgs/make-readme-markdown";>make-readme-markdown.el</a>
+</div>
diff --git a/packages/diffview/diffview.el b/packages/diffview/diffview.el
new file mode 100644
index 0000000..a684b05
--- /dev/null
+++ b/packages/diffview/diffview.el
@@ -0,0 +1,200 @@
+;;; diffview.el --- View diffs in side-by-side format
+
+;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
+
+;; Author: Mitchel Humpherys <address@hidden>
+;; Maintainer: Mitchel Humpherys <address@hidden>
+;; Keywords: convenience, diff
+;; Version: 1.0
+;; URL: https://github.com/mgalgs/diffview-mode
+
+;; 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:
+;;
+;; Render a unified diff (top/bottom) in an easy-to-comprehend side-by-side
+;; format.  This comes in handy for reading patches from mailing lists (or
+;; from whencever you might acquire them).
+;;
+;;; Installation:
+;;
+;;     M-x package-install diffview
+;;
+;;; Usage:
+;;
+;; The following functions are provided for launching a side-by-side diff:
+;;
+;; o `diffview-current' : View the current diff buffer side-by-side
+;; o `diffview-region' : View the current diff region side-by-side
+;; o `diffview-message' : View the current email message (which presumably
+;;    contains a patch) side-by-side
+;;
+;;
+;;; Screenshots:
+;;
+;; Before:
+;; 
https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-before.png
+;;
+;; After:
+;; 
https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-after.png
+;;
+;;; Code:
+
+(require 'message)
+
+(defun diffview--print-all-lines-to-buffer (lines buffer-name)
+  "Prints each line in `LINES' to a buffer named `BUFFER-NAME'."
+  (let ((old-temp-buffer (get-buffer buffer-name)))
+    ;; (with-output-to-temp-buffer buffer-name
+    (when old-temp-buffer
+      (kill-buffer old-temp-buffer))
+    (with-current-buffer (get-buffer-create buffer-name)
+      (erase-buffer)
+      (dolist (line lines)
+       (insert line "\n")))))
+
+(defvar diffview--minus-bufname "*side-by-side-1*")
+(defvar diffview--plus-bufname "*side-by-side-2*")
+(defvar diffview--saved-wincfg nil)
+(defvar diffview--regexp-is-plus-line "^\\+\\([^+]\\{1\\}\\|$\\)"
+  "A + followed by one non + or the end of the line.")
+(defvar diffview--regexp-is-minus-line "^-\\([^-]\\{1\\}\\|$\\)"
+  "A - followed by one non - or the end of the line.")
+
+(defun diffview--view-string (input-string)
+  "Displays `INPUT-STRING' (a diff) in a side-by-side view."
+  (setq diffview--saved-wincfg (current-window-configuration))
+  (delete-other-windows)
+  (let (plus-lines
+       minus-lines
+       tmp-line
+       (current-state 'in-common)
+       (last-state 'in-common)
+       (current-lines-in-plus 0)
+       (current-lines-in-minus 0)
+       (total-lines 0)
+       (all-lines (split-string input-string "\n")))
+    (dolist (line all-lines)
+      (cond
+       ((string-match diffview--regexp-is-plus-line line)
+       (push line plus-lines)
+       (setq current-state 'in-plus)
+       (setq current-lines-in-plus (1+ current-lines-in-plus)))
+       ((string-match diffview--regexp-is-minus-line line)
+       (push line minus-lines)
+       (setq current-state 'in-minus)
+       (setq current-lines-in-minus (1+ current-lines-in-minus)))
+       ;; everything else must be common
+       (t
+       (push line plus-lines)
+       (push line minus-lines)
+       (setq current-state 'in-common)))
+
+      (setq total-lines (1+ total-lines))
+
+      ;; Process hunk state transitions
+      (when (not (equal current-state last-state))
+       ;; there's been a state change
+       (when (equal current-state 'in-common)
+         ;; we're transitioning out the +/- part of a hunk. We would
+         ;; like both sides to have the same number lines for this
+         ;; hunk, so we might need to fill one side or the other with
+         ;; empty lines.
+         (cond
+          ((> current-lines-in-plus current-lines-in-minus)
+           ;; need to fill minus
+           (setq tmp-line (pop minus-lines))
+           (dotimes (i (- current-lines-in-plus current-lines-in-minus))
+             (push "" minus-lines))
+           (push tmp-line minus-lines))
+          ((< current-lines-in-plus current-lines-in-minus)
+           ;; need to fill plus
+           (setq tmp-line (pop plus-lines))
+           (dotimes (i (- current-lines-in-minus current-lines-in-plus))
+             (push "" plus-lines))
+           (push tmp-line plus-lines)))
+
+         (setq current-lines-in-plus  0
+               current-lines-in-minus 0)))
+
+      (setq last-state current-state))
+
+    (diffview--print-all-lines-to-buffer (reverse minus-lines) 
diffview--minus-bufname)
+    (diffview--print-all-lines-to-buffer (reverse plus-lines) 
diffview--plus-bufname)
+
+    (switch-to-buffer diffview--minus-bufname nil t)
+    (goto-char (point-min))
+    (diffview-mode)
+
+    (split-window-right)
+    (other-window 1)
+
+    (switch-to-buffer diffview--plus-bufname nil t)
+    (goto-char (point-min))
+    (diffview-mode)
+
+    (scroll-all-mode)))
+
+;;;###autoload
+(defun diffview-current ()
+  "Show current diff buffer in a side-by-side view."
+  (interactive)
+  (diffview--view-string (buffer-string)))
+
+;;;###autoload
+(defun diffview-region ()
+  "Show current diff region in a side-by-side view."
+  (interactive)
+  (diffview--view-string (buffer-substring (point) (mark))))
+
+;;;###autoload
+(defun diffview-message ()
+  "Show `message-mode' buffer in a side-by-side view.
+
+This is useful for reading patches from mailing lists."
+  (interactive)
+  (let (beg end)
+    (save-excursion
+      (message-goto-body)
+      (search-forward-regexp "^---$")
+      (setq beg (1+ (point)))
+      (search-forward-regexp "^-- $")
+      (setq end (1+ (point)))
+      (diffview--view-string (buffer-substring beg end)))))
+
+(defvar diffview-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map (kbd "q") 'diffview--quit)
+    map))
+
+;; You probably don't want to invoke `diffview-mode' directly.  Just use
+;; one of the autoload functions above.
+(define-derived-mode diffview-mode special-mode "Diffview"
+  "Mode for viewing diffs side-by-side"
+  (setq font-lock-defaults '(diff-font-lock-keywords t nil nil nil 
(font-lock-multiline . nil))))
+
+(defun diffview--quit ()
+  "Quit diffview and clean up diffview buffers."
+  (interactive)
+  (delete-other-windows)
+  (scroll-all-mode 0)
+  (let ((plusbuf (get-buffer diffview--plus-bufname))
+       (minusbuf (get-buffer diffview--minus-bufname)))
+    (if plusbuf (kill-buffer plusbuf))
+    (if minusbuf (kill-buffer minusbuf)))
+  (set-window-configuration diffview--saved-wincfg))
+
+(provide 'diffview)
+;;; diffview.el ends here
+;;
diff --git a/packages/diffview/screenshots/diffview-after.png 
b/packages/diffview/screenshots/diffview-after.png
new file mode 100644
index 0000000..a59d9b5
Binary files /dev/null and b/packages/diffview/screenshots/diffview-after.png 
differ
diff --git a/packages/diffview/screenshots/diffview-before.png 
b/packages/diffview/screenshots/diffview-before.png
new file mode 100644
index 0000000..b33fca7
Binary files /dev/null and b/packages/diffview/screenshots/diffview-before.png 
differ
diff --git a/packages/djvu/djvu.el b/packages/djvu/djvu.el
index a5816ef..eb1c4fa 100644
--- a/packages/djvu/djvu.el
+++ b/packages/djvu/djvu.el
@@ -155,8 +155,8 @@ This is a list with four elements (READ TEXT ANNOT 
OUTLINE).")
 
 (defvar djvu-resolve-url nil
   "Flag for resolving internal URLs.
-If 'long replace short page numbers by long FileIDs.
-If 'short replace long FileIDs by short page numbers.
+If `long' replace short page numbers by long FileIDs.
+If `short' replace long FileIDs by short page numbers.
 If nil do nothing.")
 
 (defvar djvu-image-size 1024
diff --git a/packages/ediprolog/ediprolog.el b/packages/ediprolog/ediprolog.el
index 6818052..448a157 100644
--- a/packages/ediprolog/ediprolog.el
+++ b/packages/ediprolog/ediprolog.el
@@ -101,7 +101,7 @@
 
 (defcustom ediprolog-program-switches nil
   "List of switches passed to the Prolog process. Example:
-'(\"-G128M\" \"-O\")"
+(\"-G128M\" \"-O\")"
   :group 'ediprolog
   :type '(repeat string))
 
@@ -246,7 +246,7 @@ default Prolog prompt.")
       (erase-buffer)
       (insert str)
       (goto-char (point-min))
-      ;; remove normal consult status lines, which start with "%" 
+      ;; remove normal consult status lines, which start with "%"
       (while (re-search-forward "^[\t ]*%.*\n" nil t)
         (delete-region (match-beginning 0) (match-end 0))))
     (setq str (buffer-string)))
diff --git a/packages/el-search/el-search-x.el 
b/packages/el-search/el-search-x.el
new file mode 100644
index 0000000..7c050cf
--- /dev/null
+++ b/packages/el-search/el-search-x.el
@@ -0,0 +1,114 @@
+;;; el-search-x.el --- Additional pattern definitions for el-search    -*- 
lexical-binding: t -*-
+
+;; Copyright (C) 2016 Free Software Foundation, Inc
+
+;; Author: Michael Heerdegen <address@hidden>
+;; Maintainer: Michael Heerdegen <address@hidden>
+;; Created: 2016_08_03
+;; Keywords: lisp
+
+
+;; 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:
+
+;; This file contains additional definitions of el-search patterns.
+;; You can just `require' this file, but doing so is not mandatory for
+;; using el-search.
+
+
+;;; Code:
+
+(require 'el-search)
+
+
+;;;; `change', `changed'
+
+(defvar diff-hl-reference-revision)
+(declare-function diff-hl-changes "diff-hl")
+(defvar-local el-search--cached-changes nil)
+
+(defun el-search--changes-from-diff-hl (revision)
+  "Return a list of changed regions (as conses of positions) since REVISION.
+Use variable `el-search--cached-changes' for caching."
+  (if (and (consp el-search--cached-changes)
+           (equal (car el-search--cached-changes)
+                  (list revision (visited-file-modtime))))
+      (cdr el-search--cached-changes)
+    (when (buffer-modified-p)
+      (error "Buffer is modified - please save"))
+    (require 'diff-hl)
+    ;; `diff-hl-changes' returns line numbers.  We must convert them into 
positions.
+    (save-restriction
+      (widen)
+      (save-excursion
+        (let ((diff-hl-reference-revision revision)
+              (current-line-nbr 1) change-beg)
+          (goto-char 1)
+          (cdr (setq el-search--cached-changes
+                     (cons (list revision (visited-file-modtime))
+                           (delq nil (mapcar (pcase-lambda (`(,start-line 
,nbr-lines ,kind))
+                                               (if (eq kind 'delete) nil
+                                                 (forward-line (- start-line 
current-line-nbr))
+                                                 (setq change-beg (point))
+                                                 (forward-line (1- nbr-lines))
+                                                 (setq current-line-nbr (+ 
start-line nbr-lines -1))
+                                                 (cons (copy-marker change-beg)
+                                                       (copy-marker 
(line-end-position)))))
+                                             (diff-hl-changes)))))))))))
+
+(defun el-search--change-p (posn &optional revision)
+  ;; Non-nil when sexp after POSN is part of a change
+  (save-restriction
+    (widen)
+    (let ((changes (el-search--changes-from-diff-hl revision))
+          (sexp-end (scan-sexps posn 1)))
+      (while (and changes (< (cdar changes) sexp-end))
+        (pop changes))
+      (and changes
+           (<= (caar changes) posn)))))
+
+(defun el-search--changed-p (posn &optional revision)
+  ;; Non-nil when sexp after POSN contains a change
+  (when (buffer-modified-p)
+    (error "Buffer is modified - please save"))
+  (save-restriction
+    (widen)
+    (let ((changes (el-search--changes-from-diff-hl revision)))
+      (while (and changes (<= (cdar changes) posn))
+        (pop changes))
+      (and changes
+           (< (caar changes) (scan-sexps posn 1))))))
+
+(el-search-defpattern change (&optional revision)
+  "Matches the object if its text is part of a file change.
+
+Requires library \"diff-hl\".  REVISION defaults to the file's
+repository's HEAD commit."
+  `(guard (el-search--change-p (point) ,revision)))
+
+(el-search-defpattern changed (&optional revision)
+  "Matches the object if its text contains a file change.
+
+Requires library \"diff-hl\".  REVISION defaults to the file's
+repository's HEAD commit."
+  `(guard (el-search--changed-p (point) ,revision)))
+
+
+(provide 'el-search-x)
+
+;;; el-search-x.el ends here
diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index 00b1b15..c10a284 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -1,13 +1,13 @@
 ;;; el-search.el --- Expression based incremental search for emacs-lisp-mode 
-*- lexical-binding: t -*-
 
-;; Copyright (C) 2015 Free Software Foundation, Inc
+;; Copyright (C) 2015, 2016 Free Software Foundation, Inc
 
 ;; Author: Michael Heerdegen <address@hidden>
 ;; Maintainer: Michael Heerdegen <address@hidden>
 ;; Created: 29 Jul 2015
 ;; Keywords: lisp
 ;; Compatibility: GNU Emacs 25
-;; Version: 0.1.3
+;; Version: 0.2.3
 ;; Package-Requires: ((emacs "25"))
 
 
@@ -65,7 +65,7 @@
 ;;   `(defvar ,_)
 ;;
 ;; you search for all defvar forms that don't specify an init value.
-;; 
+;;
 ;; The following will search for defvar forms with a docstring whose
 ;; first line is longer than 70 characters:
 ;;
@@ -114,6 +114,9 @@
 ;; effect is limited to this package.  See C-h f `el-search-pattern'
 ;; for a list of predefined additional pattern forms.
 ;;
+;; Some additional pattern definitions can be found in the file
+;; "el-search-x.el".
+;;
 ;;
 ;; Replacing
 ;; =========
@@ -162,8 +165,12 @@
 ;;    (define-key isearch-mode-map [(control ?S)] 
#'el-search-search-from-isearch)
 ;;    (define-key isearch-mode-map [(control ?%)] 
#'el-search-replace-from-isearch)
 ;;
+;;    (define-key el-search-read-expression-map [(control ?S)] 
#'exit-minibuffer)
+;;
 ;; The bindings in `isearch-mode-map' let you conveniently switch to
-;; elisp searching from isearch.
+;; "el-search" searching from isearch.  The binding in
+;; `el-search-read-expression-map' allows you to hit C-S twice to
+;; start a search for the last search pattern.
 ;;
 ;;
 ;; Bugs, Known Limitations
@@ -185,6 +192,8 @@
 ;;
 ;; the comment will be lost.
 ;;
+;; FIXME: when we have resumable sessions, pause and warn about this case.
+;;
 ;;
 ;;  Acknowledgments
 ;;  ===============
@@ -194,18 +203,18 @@
 ;;
 ;; TODO:
 ;;
-;; - 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.
-;;
-;; - detect infloops when replacing automatically (e.g. for 1 -> '(1))
-;;
 ;; - implement backward searching
 ;;
+;; - Make `el-search-pattern' accept an &optional limit, at least for
+;;   the non-interactive use case?
+;;
 ;; - improve docstrings
 ;;
+;; - Make it work in comments, too? (-> `parse-sexp-ignore-comments').
+;;   Related: should the pattern `symbol' also match strings that
+;;   contain matches for a symbol so that it's possible to replace
+;;   also occurrences of a symbol in docstrings?
+;;
 ;; - handle more reader syntaxes, e.g. #n, #n#
 ;;
 ;; - Implement sessions; add multi-file support based on iterators.  A
@@ -213,6 +222,14 @@
 ;;   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.
+;;
+;; - Make `el-search--format-replacement' work non-heuristically.
+;;   Idea: When replacing, for every variable V bound by the search
+;;   pattern that directly corresponds to some text T, provide some
+;;   "match data" V -> T.  Use this when formatting the replacement.
+;;   Maybe use a special marker to "paste" in expressions, like (paste
+;;   V), whereby the `paste' flag lands in the replacement and can be
+;;   replaced textually afterwards.
 
 
 
@@ -236,12 +253,9 @@
   :group 'lisp)
 
 (defcustom el-search-this-expression-identifier 'exp
-  "Identifier referring to the current expression in pattern input.
+  "Identifier ID 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 pattern actually used will be (and ID PATTERN).
 The default value is `exp'."
   :type 'symbol)
 
@@ -253,14 +267,52 @@ The default value is `exp'."
                                  (t                   (:background 
"DarkSlateGray1")))
   "Face for highlighting the other matches.")
 
+(defcustom el-search-smart-case-fold-search t
+  "Whether to use smart case folding in pattern matching.
+When an \"el-search\" pattern involves regexp matching (like for
+\"string\" or \"source\") and this option is non-nil,
+case-fold-search will be temporarily bound to t if the according
+regexp contains any upper case letter, and nil else.  This is
+done independently for every single matching operation.
+
+If nil, the value of `case-fold-search' is decisive."
+  :type 'boolean)
+
+(defcustom el-search-use-sloppy-strings nil
+  "Whether to allow the usage of \"sloppy strings\".
+When this option is turned on, for faster typing you are allowed
+to specify symbols instead of strings as arguments to an
+\"el-search\" pattern type that would otherwise accept only
+strings, and their names will be used as input (with other words,
+this spares you to type the string delimiters in many cases).
+
+For example,
+
+  \(source ^cl\)
+
+is then equivalent to
+
+  \(source \"^cl\"\)
+
+When this option is off, the first form would just signal an
+error."
+  :type 'boolean)
+
 
 ;;;; Helpers
 
-(defun el-search--print (expr)
-  (let ((print-quoted t)
-        (print-length nil)
+(defun el-search--smart-string-match-p (regexp string)
+  "`string-match-p' taking `el-search-smart-case-fold-search' into account."
+  (let ((case-fold-search (if el-search-smart-case-fold-search
+                              (not (let ((case-fold-search nil))
+                                     (string-match-p "[[:upper:]]" regexp)))
+                            case-fold-search)))
+    (string-match-p regexp string)))
+
+(defun el-search--pp-to-string (expr)
+  (let ((print-length nil)
         (print-level nil))
-    (prin1-to-string expr)))
+    (pp-to-string expr)))
 
 (defvar el-search-read-expression-map
   (let ((map (make-sparse-keymap)))
@@ -268,18 +320,20 @@ The default value is `exp'."
     (define-key map [(control ?g)] #'abort-recursive-edit)
     (define-key map [up]   nil)
     (define-key map [down] nil)
-    (define-key map [(control meta backspace)] #'backward-kill-sexp)
-    (define-key map [(control ?S)] #'exit-minibuffer)
+    (define-key map [(control ?j)] #'newline)
     map)
   "Map for reading input with `el-search-read-expression'.")
 
 (defun el-search--setup-minibuffer ()
+  (let ((inhibit-read-only t))
+    (put-text-property 1 (minibuffer-prompt-end) 'font-lock-face 
'minibuffer-prompt))
   (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 (minibuffer-prompt-end))
+  (when (looking-at ".*\n")
+    (indent-sexp))
   (goto-char (point-max))
   (when-let ((this-sexp (with-current-buffer (window-buffer 
(minibuffer-selected-window))
                           (thing-at-point 'sexp))))
@@ -296,28 +350,54 @@ The default value is `exp'."
     (read-from-minibuffer prompt initial-contents 
el-search-read-expression-map read
                           (or hist 'read-expression-history) default)))
 
+(defvar el-search-history '()
+  "List of search input strings.")
+
+(defvar el-search-query-replace-history '()
+  "List of input strings from `el-search-query-replace'.")
+
 (defvar el-search--initial-mb-contents nil)
 
-(defun el-search--read-pattern (prompt &optional default read)
+(defun el-search--pushnew-to-history (input histvar)
+  (let ((hist-head (car (symbol-value histvar))))
+    (unless (or (string-match-p "\\`\\'" input)
+                (and (stringp hist-head)
+                     (or (string= input hist-head)
+                         (ignore-errors (equal (read input) (read 
hist-head))))))
+      (push (if (string-match-p "\\`.+\n" input)
+                (with-temp-buffer
+                  (emacs-lisp-mode)
+                  (insert "\n" input)
+                  (indent-region 1 (point))
+                  (buffer-string))
+              input)
+            (symbol-value histvar)))))
+
+(defun el-search--read-pattern (prompt &optional default histvar)
+  (cl-callf or histvar 'el-search-history)
   (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))))
+                prompt el-search--initial-mb-contents histvar default)))
+    (el-search--pushnew-to-history input histvar)
+    (if (not (string= input "")) input (car (symbol-value histvar)))))
 
 (defun el-search--end-of-sexp ()
   ;;Point must be at sexp beginning
   (or (scan-sexps (point) 1) (point-max)))
 
 (defun el-search--ensure-sexp-start ()
-  "Move point to the beginning of the next sexp if necessary.
-Don't move if already at beginning of a sexp.
-Point must not be inside a string or comment."
+  "Move point to the next sexp beginning position.
+Don't move if already at beginning of a sexp.  Point must not be
+inside a string or comment.  `read' the expression at that point
+and return it."
+  ;; This doesn't catch end-of-buffer to keep the return value non-ambiguous
   (let ((not-done t) res)
     (while not-done
       (let ((stop-here nil)
             (looking-at-from-back (lambda (regexp n)
-                                    (save-excursion
-                                      (backward-char n)
-                                      (looking-at regexp)))))
+                                    (and (<= n (- (point) (point-min)))
+                                         (save-excursion
+                                           (backward-char n)
+                                           (looking-at regexp))))))
         (while (not stop-here)
           (cond
            ((eobp) (signal 'end-of-buffer nil))
@@ -343,40 +423,58 @@ Point must not be inside a string or comment."
 (defvar el-search--pcase-macros '()
   "List of additional \"el-search\" pcase macros.")
 
-(defun el-search--make-docstring ()
+(defun el-search--make-docstring (name)
   ;; code mainly from `pcase--make-docstring'
-  (let* ((main (documentation (symbol-function 'el-search-pattern) 'raw))
+  (let* ((main (documentation (symbol-function name) '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."))))
+         (unless (string-match-p "\\`-\\|--" (symbol-name symbol)) ;let's 
consider these "internal"
+           (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))
+(put 'el-search-pattern 'function-documentation '(el-search--make-docstring 
'el-search-pattern))
 
 (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\"."
+of the definitions is limited to \"el-search\".
+
+\(fn NAME ARGLIST &optional DOCSTRING &rest BODY)"
   (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)
+(defun el-search--macroexpand-1 (pattern)
+  "Expand \"el-search\" PATTERN.
+This is like `pcase--macroexpand', but expands only patterns
+defined with `el-search-defpattern' and performs only one
+expansion step.
+
+Return PATTERN if this pattern type was not defined with
+`el-search-defpattern'."
+  (if-let ((expander (alist-get (car-safe pattern) el-search--pcase-macros)))
+      (apply expander (cdr pattern))
+    pattern))
+
+(defun el-search--macroexpand (pattern)
+  "Like `pcase--macroexpand' but also expanding \"el-search\" patterns."
+  (eval `(el-search--with-additional-pcase-macros (pcase--macroexpand 
',pattern))))
+
+(defun el-search--matcher (pattern &optional result)
   (eval ;use `eval' to allow for user defined pattern types at run time
    (let ((expression (make-symbol "expression")))
      `(el-search--with-additional-pcase-macros
@@ -385,7 +483,7 @@ of the definitions is limited to \"el-search\"."
              (pcase--dontwarn-upats (cons '_ pcase--dontwarn-upats)))
          (byte-compile (lambda (,expression)
                          (pcase ,expression
-                           (,pattern ,@(or body (list t)))
+                           (,pattern ,(or result t))
                            (_        nil)))))))))
 
 (defun el-search--match-p (matcher expression)
@@ -444,67 +542,135 @@ of the definitions is limited to \"el-search\"."
     match-beg))
 
 (defun el-search--search-pattern (pattern &optional noerror)
-  "Search elisp buffer with `pcase' PATTERN.
+  "Search for el-search PATTERN in current buffer.
 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)
-  ;; 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-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))))
-
-(defun el-search--create-read-map (&optional pos)
-  (let ((mapping '()))
-    (el-search--do-subsexps
-     (or pos (point))
-     (lambda (sexp _) (push (cons (read sexp) sexp) mapping))
-     (lambda () (nreverse mapping))
-     (save-excursion (thing-at-point--end-of-sexp) (point)))))
-
-(defun el-search--repair-replacement-layout (printed mapping)
-  (with-temp-buffer
-    (insert printed)
-    (el-search--do-subsexps
-     (point-min)
-     (lambda (sexp sexp-end)
-       (when-let ((old (cdr (assoc (read sexp) mapping))))
-         (delete-region (point) sexp-end)
-         (when (string-match-p "\n" old)
-           (unless (looking-back "^[[:space:]]*" (line-beginning-position))
-             (insert "\n"))
-           (unless (looking-at "[[:space:]\)]*$")
-             (insert "\n")
-             (backward-char)))
-         (save-excursion (insert old))))
-     (lambda () (buffer-substring (point-min) (point-max))))))
+(defun el-search--replace-hunk (region to-insert)
+  "Replace the text in REGION in current buffer with string TO-INSERT.
+Add line breaks before and after TO-INSERT when appropriate and
+reindent."
+  (atomic-change-group
+    (let* ((inhibit-message t)
+           (opoint (point))
+           (original-text (prog1 (apply #'buffer-substring-no-properties 
region)
+                            (goto-char (car region))
+                            (apply #'delete-region region)))
+           ;; care about other sexps in this line
+           (sexp-before-us (not (looking-back "\(\\|^\\s-*" 
(line-beginning-position))))
+           (sexp-after-us  (not (looking-at "\\s-*[;\)]\\|$")))
+           (insert-newline-before
+            (or
+             (and (string-match-p "\n" to-insert)
+                  (not (string-match-p "\n" original-text))
+                  (or (and sexp-before-us sexp-after-us)
+                      (looking-back
+                       (rx (or (syntax word) (syntax symbol))
+                           (+ blank)
+                           (or (syntax word) (syntax symbol))
+                           (* any))
+                       (line-beginning-position))))
+             ;; (and sexp-before-us
+             ;;      (> (+ (apply #'max (mapcar #'length (split-string 
to-insert "\n")))
+             ;;            (- (point) (line-beginning-position)))
+             ;;         fill-column))
+             ))
+           (insert-newline-after (and insert-newline-before sexp-after-us)))
+      (when insert-newline-before
+        (when (looking-back "\\s-+" (line-beginning-position))
+          (delete-region (match-beginning 0) (match-end 0)))
+        (insert "\n"))
+      (insert to-insert)
+      (when insert-newline-after
+        (insert "\n"))
+      (indent-region opoint (1+ (point))))))
+
+(defun el-search--format-replacement (replacement original replace-expr-input 
splice)
+  ;; Return a printed representation of REPLACEMENT.  Try to reuse the
+  ;; layout of subexpressions shared with the original (replaced)
+  ;; expression and the replace expression.
+  (if (and splice (not (listp replacement)))
+      (error "Expression to splice in is an atom")
+    (let ((orig-buffer (generate-new-buffer "orig-expr")))
+      (with-current-buffer orig-buffer
+        (emacs-lisp-mode)
+        (insert original)
+        (when replace-expr-input (insert "\n\n" replace-expr-input)))
+      (unwind-protect
+          (with-temp-buffer
+            (emacs-lisp-mode)
+            (insert (if splice
+                        (mapconcat #'el-search--pp-to-string replacement " ")
+                      (el-search--pp-to-string replacement)))
+            (goto-char 1)
+            (let (start this-sexp end orig-match-start orig-match-end done)
+              (while (and (< (point) (point-max))
+                          (condition-case nil
+                              (progn
+                                (setq start (point)
+                                      this-sexp (read (current-buffer))
+                                      end   (point))
+                                t)
+                            (end-of-buffer nil)))
+                (setq done nil orig-match-start nil)
+                (with-current-buffer orig-buffer
+                  (goto-char 1)
+                  (if (el-search--search-pattern `',this-sexp t)
+                      (setq orig-match-start (point)
+                            orig-match-end (progn (forward-sexp) (point)))
+                    (setq done t)))
+                ;; find out whether we have a sequence of equal expressions
+                (while (and (not done)
+                            (condition-case nil
+                                (progn (setq this-sexp (read 
(current-buffer))) t)
+                              ((invalid-read-syntax end-of-buffer end-of-file) 
nil)))
+                  (if (with-current-buffer orig-buffer
+                        (condition-case nil
+                            (if (not (equal this-sexp (read (current-buffer))))
+                                nil
+                              (setq orig-match-end (point))
+                              t)
+                          ((invalid-read-syntax end-of-buffer end-of-file) 
nil)))
+                      (setq end (point))
+                    (setq done t)))
+                ;; FIXME: there could be another occurrence of THIS-SEXP in 
ORIG-BUFFER with more
+                ;; subsequent equal expressions after it
+                (if orig-match-start
+                    (el-search--replace-hunk
+                     (list start end)
+                     (with-current-buffer orig-buffer
+                       (buffer-substring-no-properties orig-match-start 
orig-match-end)))
+                  (goto-char start)
+                  (el-search--skip-expression nil t))
+                (condition-case nil
+                    (el-search--ensure-sexp-start)
+                  (end-of-buffer (goto-char (point-max))))))
+            (goto-char 1)
+            (forward-sexp (if splice (length replacement) 1))
+            (let ((result (buffer-substring 1 (point))))
+              (if (equal replacement (read (if splice (format "(%s)" result) 
result)))
+                  result
+                (error "Error in `el-search--format-replacement' - please make 
a bug report"))))
+        (kill-buffer orig-buffer)))))
 
 (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."
+Raise an error if not.  The string arguments TYPE and optional
+MESSAGE are used to construct the error message."
   (mapc (lambda (arg)
           (unless (funcall predicate arg)
-            (error (concat "Pattern `%S': "
+            (error (concat "Pattern `%s': "
                            (or message (format "argument doesn't fulfill %S" 
predicate))
                            ": %S")
                    type arg)))
         args))
 
+(defvar el-search-current-pattern nil)
+
+(defvar el-search-success nil)
+
 
 ;;;; Additional pattern type definitions
 
@@ -557,24 +723,25 @@ matches the list (1 2 3 4 5 6 7 8 9) and binds `x' to (4 
5 6)."
               (app ,(apply-partially #'el-search--split
                                      (el-search--matcher pattern)
                                      (el-search--matcher (car more-patterns)))
-                   (,'\` ((,'\, ,pattern)
-                          (,'\, ,(car more-patterns)))))))
+                   `(,,pattern ,,(car more-patterns)))))
        (t `(append ,pattern (append ,@more-patterns)))))))
 
+(defun el-search--stringish-p (thing)
+  (or (stringp thing) (and el-search-use-sloppy-strings (symbolp thing))))
+
 (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--check-pattern-args "string" regexps #'el-search--stringish-p
+                                 "Argument not a string")
+  `(and (pred stringp)
+        ,@(mapcar (lambda (thing) `(pred (el-search--smart-string-match-p
+                                     ,(if (symbolp thing) (symbol-name thing) 
thing))))
+                  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)
+  (el-search--check-pattern-args "symbol" regexps #'el-search--stringish-p
+                                 "Argument not a string")
   `(and (pred symbolp)
         (app symbol-name (string ,@regexps))))
 
@@ -603,7 +770,7 @@ of any kind matched by all PATTERNs are also matched.
    ((null (cdr patterns))
     (let ((pattern (car patterns)))
       `(app ,(apply-partially #'el-search--contains-p (el-search--matcher 
pattern))
-            (,'\`  (t (,'\, ,pattern))))))
+            `(t ,,pattern))))
    (t `(and ,@(mapcar (lambda (pattern) `(contains ,pattern)) patterns)))))
 
 (el-search-defpattern not (pattern)
@@ -614,7 +781,7 @@ of any kind matched by all PATTERNs are also matched.
 (defun el-search--match-symbol-file (regexp symbol)
   (when-let ((symbol-file (and (symbolp symbol)
                                (symbol-file symbol))))
-    (string-match-p
+    (el-search--smart-string-match-p
      (if (symbolp regexp) (concat "\\`" (symbol-name regexp) "\\'") regexp)
      (file-name-sans-extension (file-name-nondirectory symbol-file)))))
 
@@ -631,8 +798,9 @@ 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)))
+  (el-search--check-pattern-args "source" (list regexp) 
#'el-search--stringish-p
+                                 "Argument not a string")
+  `(pred (el-search--match-symbol-file ,(if (symbolp regexp) (symbol-name 
regexp) regexp))))
 
 (defun el-search--match-key-sequence (keys expr)
   (when-let ((expr-keys (pcase expr
@@ -662,17 +830,18 @@ matches any of these expressions:
     [(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)))
+  (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)))
+(defun el-search--transform-nontrivial-lpat (expr)
+  (pcase expr
+    ((and (pred symbolp) (let symbol-name (symbol-name expr)))
+     `(or (symbol ,symbol-name)
+          `',(symbol  ,symbol-name)
+          `#',(symbol ,symbol-name)))
+    ((pred stringp) `(string ,expr))
+    (_ expr)))
 
 (el-search-defpattern l (&rest lpats)
   "Alternative pattern type for matching lists.
@@ -717,10 +886,40 @@ could use this pattern:
                     ('_ '`(,_))
                     ('_? '(or '() `(,_))) ;FIXME: useful - document? or should 
we provide a (? PAT)
                                           ;thing?
-                    (_ `(,'\` ((,'\, ,(el-search--s elt)))))))
+                    (_ ``(,,(el-search--transform-nontrivial-lpat elt)))))
                 lpats)
              ,@(if match-end '() '(_)))))
 
+(el-search-defpattern char-prop (property)
+  "Matches the object if completely covered with PROPERTY.
+This pattern matches the object if its representation in the
+search buffer is completely covered with the character property
+PROPERTY.
+
+This pattern always tests the complete expression in the search
+buffer, it is not possible to test subexpressions calculated in
+the search pattern."
+  `(guard (and (get-char-property (point) ',property)
+               ,(macroexp-let2 nil limit '(scan-sexps (point) 1)
+                  `(= (next-single-char-property-change
+                       (point) ',property nil ,limit)
+                      ,limit)))))
+
+(el-search-defpattern includes-prop (property)
+  "Matches the object if partly covered with PROPERTY.
+This pattern matches the object if its representation in the
+search buffer is partly covered with the character property
+PROPERTY.
+
+This pattern always tests the complete expression in the search
+buffer, it is not possible to test subexpressions calculated in
+the search pattern."
+  `(guard (or (get-char-property (point) ',property)
+              ,(macroexp-let2 nil limit '(scan-sexps (point) 1)
+                 `(not (= (next-single-char-property-change
+                           (point) ',property nil ,limit)
+                          ,limit))))))
+
 
 ;;;; Highlighting
 
@@ -796,20 +995,20 @@ could use this pattern:
 
 ;;;; Core functions
 
-(defvar el-search-history '()
-  "List of input strings.")
-
-(defvar el-search-success nil)
-(defvar el-search-current-pattern nil)
-
 ;;;###autoload
-(defun el-search-pattern (pattern)
+(defun el-search-pattern (pattern &optional no-error)
   "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.
 
+Use `emacs-lisp-mode' for reading input.  Some keys in the
+minibuffer have a special binding: to make it possible to edit
+multi line input, C-j inserts a newline, and up and down move the
+cursor vertically - see `el-search-read-expression-map' for more
+details.
+
 
 Additional `pcase' pattern types to be used with this command can
 be defined with `el-search-defpattern'.
@@ -818,34 +1017,38 @@ 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)
-                                                       t)))
+                       (let* ((input (el-search--read-pattern "Find pcase 
pattern: "
+                                                              (car 
el-search-history)))
+                              (pattern (read input)))
                          ;; A very common mistake: input "foo" instead of 
"'foo"
                          (when (and (symbolp pattern)
                                     (not (eq pattern '_))
                                     (or (not (boundp pattern))
                                         (not (eq (symbol-value pattern) 
pattern))))
                            (error "Please don't forget the quote when 
searching for a symbol"))
+                         ;; Make input available also in query-replace history
+                         (el-search--pushnew-to-history input 
'el-search-query-replace-history)
+                         ;; and wrap the PATTERN
                          (el-search--wrap-pattern pattern)))))
-  (setq this-command 'el-search-pattern) ;in case we come from isearch
-  (setq el-search-current-pattern pattern)
-  (let ((opoint (point)))
-    (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")
-                           (goto-char opoint)
-                           (el-search-hl-remove)
-                           (ding)
-                           nil))
-      (setq el-search-success t)
-      (el-search-hl-sexp)
-      (unless (eq this-command last-command)
-        (el-search-hl-other-matches pattern)))))
+  (if (not (called-interactively-p 'any))
+      (el-search--search-pattern pattern no-error)
+    (setq this-command 'el-search-pattern) ;in case we come from isearch
+    (setq el-search-current-pattern pattern)
+    (let ((opoint (point)))
+      (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")
+                             (goto-char opoint)
+                             (el-search-hl-remove)
+                             (ding)
+                             nil))
+        (setq el-search-success t)
+        (el-search-hl-sexp)
+        (unless (eq this-command last-command)
+          (el-search-hl-other-matches pattern))))))
 
 (defvar el-search-search-and-replace-help-string
   "\
@@ -863,10 +1066,11 @@ s         Toggle splicing mode.  When splicing mode is
 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)
+(defun el-search--search-and-replace-pattern (pattern replacement &optional 
splice to-input-string)
   (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)))
+        (get-replacement (el-search--matcher pattern replacement))
+        (skip-matches-in-replacement 'ask))
     (unwind-protect
         (while (and (not done) (el-search--search-pattern pattern t))
           (setq opoint (point))
@@ -874,37 +1078,39 @@ Hit any key to proceed."
             (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))
+          (let* ((region (list (point) (el-search--end-of-sexp)))
+                 (original-text (apply #'buffer-substring-no-properties 
region))
+                 (expr      (read original-text))
                  (replaced-this nil)
                  (new-expr  (funcall get-replacement expr))
                  (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)))))
+                  (lambda () (el-search--format-replacement new-expr 
original-text to-input-string splice)))
                  (to-insert (funcall get-replacement-string))
-                 (do-replace (lambda ()
-                               (atomic-change-group
-                                 (apply #'delete-region region)
-                                 (let ((inhibit-message t)
-                                       (opoint (point)))
-                                   (insert to-insert)
-                                   (indent-region opoint (point))
-                                   (el-search-hl-sexp (list opoint (point)))
-                                   (goto-char opoint)))
-                               (cl-incf nbr-replaced)
-                               (setq replaced-this t))))
+                 (replacement-contains-another-match
+                  (with-temp-buffer
+                    (emacs-lisp-mode)
+                    (insert to-insert)
+                    (goto-char 1)
+                    (el-search--skip-expression new-expr)
+                    (condition-case nil
+                        (progn (el-search--ensure-sexp-start)
+                               (el-search--search-pattern pattern t))
+                      (end-of-buffer nil))))
+                 (do-replace
+                  (lambda ()
+                    (save-excursion
+                      (save-restriction
+                        (widen)
+                        (el-search--replace-hunk (list (point) 
(el-search--end-of-sexp)) to-insert)))
+                    (el-search--ensure-sexp-start) ;skip potentially newly 
added whitespace
+                    (el-search-hl-sexp (list opoint (point)))
+                    (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]  (? for 
help)"
-                                                       '(?\ ?! ?q ?n ??))
+                                                       '(?\ ?! ?q ?\C-g ?n ??))
                                    (read-char-choice
                                     (concat "Replace this occurrence"
                                             (if (or (string-match-p "\n" 
to-insert)
@@ -913,7 +1119,7 @@ Hit any key to proceed."
                                             "? "
                                             (if splice "{splice} " "")
                                             "[y SPC r ! s q]  (? for help)" )
-                                    '(?y ?n ?r ?\ ?! ?q ?s ??)))
+                                    '(?y ?n ?r ?\ ?! ?q ?\C-g ?s ??)))
                             (?r (funcall do-replace)
                                 nil)
                             (?y (funcall do-replace)
@@ -928,11 +1134,31 @@ Hit any key to proceed."
                             (?s (cl-callf not splice)
                                 (setq to-insert (funcall 
get-replacement-string))
                                 nil)
-                            (?q (setq done t)
-                                t)
+                            ((or ?q ?\C-g)
+                             (setq done t)
+                             t)
                             (?? (ignore (read-char 
el-search-search-and-replace-help-string))
                                 nil)))))
-            (unless (or done (eobp)) (el-search--skip-expression nil t)))))
+            (unless (or done (eobp))
+              (cond
+               ((not (and replaced-this replacement-contains-another-match))
+                (el-search--skip-expression nil t))
+               ((eq skip-matches-in-replacement 'ask)
+                (if (setq skip-matches-in-replacement
+                          (yes-or-no-p "Match in replacement - always skip? "))
+                    (forward-sexp)
+                  (el-search--skip-expression nil t)
+                  (when replace-all
+                    (setq replace-all nil)
+                    (message "Falling back to interactive mode")
+                    (sit-for 3.))))
+               (skip-matches-in-replacement (forward-sexp))
+               (t
+                (el-search--skip-expression nil t)
+                (message "Replacement contains another match%s"
+                         (if replace-all " - falling back to interactive mode" 
""))
+                (setq replace-all nil)
+                (sit-for 2.)))))))
     (el-search-hl-remove)
     (goto-char opoint)
     (message "Replaced %d matches%s"
@@ -940,24 +1166,75 @@ Hit any key to proceed."
              (if (zerop nbr-skipped)  ""
                (format "   (%d skipped)" nbr-skipped)))))
 
-(defun el-search-query-replace-read-args ()
+(defun el-search-query-replace--read-args ()
   (barf-if-buffer-read-only)
-  (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)
-            (el-search--create-read-map 1)))))
+  (let ((from-input (let ((el-search--initial-mb-contents
+                           (or el-search--initial-mb-contents
+                               (and (eq last-command 'el-search-pattern)
+                                    (car el-search-history)))))
+                      (el-search--read-pattern "Query replace pattern: " nil
+                                               
'el-search-query-replace-history)))
+        from to)
+    (with-temp-buffer
+      (emacs-lisp-mode)
+      (insert from-input)
+      (goto-char 1)
+      (forward-sexp)
+      (skip-chars-forward " \t\n")
+      ;; FIXME: maybe more sanity tests here...
+      (if (not (looking-at "->"))
+          (setq from from-input
+                to (let ((el-search--initial-mb-contents nil))
+                     (el-search--read-pattern "Replace with result of 
evaluation of: " from)))
+        (delete-char 2)
+        (goto-char 1)
+        (forward-sexp)
+        (setq from (buffer-substring 1 (point)))
+        (skip-chars-forward " \t\n")
+        (setq to (buffer-substring (point) (progn (forward-sexp) (point))))))
+    (unless (and el-search-query-replace-history
+                 (not (string= from from-input))
+                 (string= from-input (car el-search-query-replace-history)))
+      (push (with-temp-buffer
+              (emacs-lisp-mode)
+              (insert (let ((newline-in-from (string-match-p "\n" from))
+                            (newline-in-to   (string-match-p "\n" to)))
+                        (format "%s%s%s ->%s%s"
+                                (if (and (or newline-in-from newline-in-to)
+                                         (not (string-match-p "\\`\n" from))) 
"\n" "")
+                                (if     newline-in-from                       
"\n" "" ) from
+                                (if (and (or newline-in-from newline-in-to)
+                                         (not (string-match-p "\\`\n" to)))   
"\n" " ") to)))
+              (indent-region 1 (point-max))
+              (buffer-string))
+            el-search-query-replace-history))
+    (el-search--pushnew-to-history from 'el-search-history)
+    (list (el-search--wrap-pattern (read from)) (read to) to)))
 
 ;;;###autoload
-(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))
+(defun el-search-query-replace (from-pattern to-expr &optional textual-to)
+  "Replace some matches of \"el-search\" pattern FROM-PATTERN.
+
+TO-EXPR is an Elisp expression that is evaluated repeatedly for
+each match with bindings created in FROM-PATTERN in effect to
+produce a replacement expression.  Operate from point
+to (point-max).
+
+As each match is found, the user must type a character saying
+what to do with it.  For directions, type ? at that time.
+
+As an alternative to enter FROM-PATTERN and TO-EXPR separately,
+you can also give an input of the form
+
+   FROM-PATTERN -> TO-EXPR
+
+to the first prompt and specify both expressions at once.  This
+format is also used for history entries."
+  (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)
+  (setq el-search-current-pattern from-pattern)
   (barf-if-buffer-read-only)
-  (el-search-search-and-replace-pattern from to mapping))
+  (el-search--search-and-replace-pattern from-pattern to-expr nil textual-to))
 
 (defun el-search--take-over-from-isearch (&optional goto-left-end)
   (let ((other-end (and goto-left-end isearch-other-end))
diff --git a/packages/electric-spacing/electric-spacing.el 
b/packages/electric-spacing/electric-spacing.el
index 8ae509a..14e8ce0 100644
--- a/packages/electric-spacing/electric-spacing.el
+++ b/packages/electric-spacing/electric-spacing.el
@@ -42,7 +42,7 @@
 ;;; electric-spacing minor mode
 
 (defcustom electric-spacing-double-space-docs t
-  "Enable double spacing of . in document lines - e,g, type '.' => get '.  '."
+  "Enable double spacing of . in document lines - e.g., type `.' => get `.  '."
   :type 'boolean
   :group 'electricity)
 
@@ -86,8 +86,8 @@ positive, and disable it otherwise.  If called from Lisp, 
enable
 the mode if ARG is omitted or nil.
 
 This is a local minor mode.  When enabled, typing an operator automatically
-inserts surrounding spaces.  e.g., `=' becomes ` = ',`+=' becomes ` += '.  This
-is very handy for many programming languages."
+inserts surrounding spaces.  e.g., `=' becomes ` = ', `+=' becomes ` += '.
+This is very handy for many programming languages."
   :global nil
   :group 'electricity
   :lighter " _+_")
diff --git a/packages/enwc/enwc.el b/packages/enwc/enwc.el
index ab48a19..d982f16 100644
--- a/packages/enwc/enwc.el
+++ b/packages/enwc/enwc.el
@@ -1,8 +1,8 @@
 ;;; enwc.el --- The Emacs Network Client
 
-;; Copyright (C) 2012,2013 Free Software Foundation, Inc.
+;; Copyright (C) 2012,2013,2016 Free Software Foundation, Inc.
 
-;; Author: Ian Dunn
+;; Author: Ian Dunn <address@hidden>
 ;; Keywords: enwc, network, wicd, manager, nm
 ;; Version: 1.0
 
@@ -37,7 +37,7 @@
 ;;
 ;; (require 'enwc-setup)
 ;; (enwc-setup)
-;; 
+;;
 ;; to your .emacs file.
 
 (require 'dbus)
@@ -283,7 +283,7 @@ from a previous scan."
 
 (defun enwc-get-current-nw-id ()
   "Gets the id of the current network id,
-or `nil' if there isn't one."
+or nil if there isn't one."
   (funcall enwc-get-current-nw-id-func enwc-using-wired))
 
 (defun enwc-check-connecting-p ()
@@ -641,7 +641,7 @@ the ENWC buffer if necessary, and scans and displays the 
networks."
        (goto-char 0)
        (forward-line))
     (enwc-scan-internal)))
-  
+
 (defun enwc-find-network (essid &optional networks)
   "Checks through NETWORKS for the network with essid ESSID,
 and returns the network identifier.  Uses `enwc-last-scan' if
diff --git a/packages/excorporate/NEWS b/packages/excorporate/NEWS
new file mode 100644
index 0000000..4bb3a9c
--- /dev/null
+++ b/packages/excorporate/NEWS
@@ -0,0 +1,41 @@
+GNU Emacs Excorporate NEWS -- history of user-visible changes.
+
+* Excorporate 0.7.5
+
+Released 2016-06-16
+
+** Interoperate with `save-some-buffers'
+
+* Excorporate 0.7.4
+
+Released 2016-06-15
+
+** Interoperate with `org-startup-with-latex-preview'
+
+* Excorporate 0.7.3
+
+Released 2016-04-01
+
+** Bind q to quit-window in Org mode backend
+
+* Excorporate 0.7.2
+
+Released 2016-03-16
+
+** Support Office 365 and Exchange 2010_SP1
+
+* Excorporate 0.7.1
+
+Released 2016-02-26
+
+** Add Info manual
+
+* Excorporate 0.7.0
+
+Released 2016-02-21
+
+** First release in GNU ELPA
+
+Local variables:
+mode: outline
+end:
diff --git a/packages/excorporate/README b/packages/excorporate/README
new file mode 100644
index 0000000..7389a88
--- /dev/null
+++ b/packages/excorporate/README
@@ -0,0 +1,20 @@
+Excorporate provides Exchange integration for Emacs.
+
+To create a connection to a web service:
+
+M-x excorporate
+
+Excorporate will prompt for an email address that it will use to
+automatically discover settings.  Then it will prompt you for your
+credentials two or three times depending on the server configuration.
+
+You should see a message indicating that the connection is ready
+either in the minibuffer or in the *Messages* buffer.
+
+Finally, run M-x calendar, and press 'e' to show today's meetings.
+
+If autodiscovery fails, customize `excorporate-configuration' to skip
+autodiscovery.
+
+For further information including connection troubleshooting, see the
+Excorporate Info node at C-h i d m Excorporate.
diff --git a/packages/ada-mode/dir b/packages/excorporate/dir
similarity index 69%
copy from packages/ada-mode/dir
copy to packages/excorporate/dir
index 6311731..c0433c3 100644
--- a/packages/ada-mode/dir
+++ b/packages/excorporate/dir
@@ -14,7 +14,5 @@ File: dir,    Node: Top       This is the top of the INFO tree
 
 * Menu:
 
-Emacs editing modes
-* Ada mode: (ada-mode).         Emacs mode for editing and navigating Ada code.
-* gpr mode: (gpr-mode).         Emacs mode for editing and navigating gpr 
-                                  files (gnat project files).
+Emacs
+* Excorporate: (excorporate).  Exchange Web Services integration for Emacs.
diff --git a/packages/excorporate/excorporate-calendar.el 
b/packages/excorporate/excorporate-calendar.el
new file mode 100644
index 0000000..506ac72
--- /dev/null
+++ b/packages/excorporate/excorporate-calendar.el
@@ -0,0 +1,46 @@
+;;; excorporate-calendar.el --- Exchange for calendar -*- lexical-binding: t 
-*-
+
+;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
+
+;; Author: Thomas Fitzsimmons <address@hidden>
+;; Keywords: calendar
+
+;; 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:
+
+;; Add a calendar keybinding for Excorporate.  Default to the
+;; excorporate-org interface.
+
+;;; Code:
+
+(require 'calendar)
+
+(defcustom excorporate-calendar-show-day-function 'exco-org-show-day
+  "A function to be called by pressing `e' in Calendar."
+  :type 'function
+  :group 'excorporate)
+
+(defun exco-calendar-show-day ()
+  "Show meetings for the selected date."
+  (interactive)
+  (apply excorporate-calendar-show-day-function (calendar-cursor-to-date t)))
+
+;; I arrogantly claim "e" for now, but irresponsibly reserve the right
+;; to change it later.
+(define-key calendar-mode-map "e" #'exco-calendar-show-day)
+
+(provide 'excorporate-calendar)
+
+;;; excorporate-calendar.el ends here
diff --git a/packages/excorporate/excorporate-calfw.el.txt 
b/packages/excorporate/excorporate-calfw.el.txt
new file mode 100644
index 0000000..11bdfe8
--- /dev/null
+++ b/packages/excorporate/excorporate-calfw.el.txt
@@ -0,0 +1,128 @@
+;;; excorporate-calfw.el --- Exchange calendar view   -*- lexical-binding: t 
-*-
+
+;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
+
+;; Author: Thomas Fitzsimmons <address@hidden>
+;; Keywords: calendar
+
+;; 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:
+
+;; Use the Calfw calendar framework to display daily meetings.
+
+;; To use this handler, set excorporate-calendar-show-day to
+;; exco-calfw-show-day using `customize-variable'.
+
+;; This Excorporate handler requires the Calfw package, which is not
+;; included in GNU ELPA because not all Calfw contributors have
+;; copyright assignment papers on file with the FSF.
+
+;;; Code:
+
+(require 'calfw)
+(require 'excorporate)
+
+(defvar excorporate-calfw-buffer-name "*Excorporate*"
+  "The buffer into which Calfw output is inserted.")
+
+(defun exco-calfw-initialize-buffer (month day year)
+  "Set up an initial blank Calfw buffer for date MONTH DAY YEAR."
+  (with-current-buffer (get-buffer-create excorporate-calfw-buffer-name)
+    (display-buffer (current-buffer))
+    (let ((status-source (make-cfw:source :name "Updating..."
+                                         :data (lambda (_b _e) nil))))
+      (cfw:create-calendar-component-buffer
+       :date (cfw:date month day year) :view 'day
+       :contents-sources (list status-source)
+       :buffer (current-buffer)))))
+
+(defun exco-calfw-add-meeting (subject start end location
+                                      main-invitees optional-invitees)
+  "Add a scheduled meeting to the event list.
+SUBJECT is a string, the subject of the meeting.  START is the
+meeting start time in Emacs internal date time format, and END is
+the end of the meeting in the same format.  LOCATION is a string
+representing the location.  MAIN-INVITEES and OPTIONAL-INVITEES
+are the requested participants."
+  (let ((start-list (decode-time start))
+       (end-list (decode-time end)))
+    (make-cfw:event :title (concat
+                           (format "\n\t%s" subject)
+                           (format "\n\tLocation: %s" location)
+                           (when main-invitees
+                             (format "\n\tInvitees: %s"
+                                     (mapconcat 'identity
+                                                main-invitees "; ")))
+                           (when optional-invitees
+                             (format "\n\tOptional: %s"
+                                     (mapconcat 'identity
+                                                optional-invitees "; "))))
+                   :start-date  (list (elt start-list 4)
+                                      (elt start-list 3)
+                                      (elt start-list 5))
+                   :start-time  (list (elt start-list 2)
+                                      (elt start-list 1))
+                   :end-date    (list (elt end-list 4)
+                                      (elt end-list 3)
+                                      (elt end-list 5))
+                   :end-time    (list (elt end-list 2)
+                                      (elt end-list 1)))))
+
+(defun exco-calfw-add-meetings (identifier response)
+  "Add the connection IDENTIFIER's meetings from RESPONSE."
+  (let ((event-list (exco-calendar-item-iterate response
+                                               #'exco-calfw-add-meeting)))
+    (with-current-buffer (get-buffer-create excorporate-calfw-buffer-name)
+      (declare (special cfw:component))
+      (let* ((new-source (make-cfw:source
+                         :name (format "%S (as of %s)"
+                                       identifier
+                                       (format-time-string "%F %H:%M"))
+                         :data (lambda (_b _e)
+                                 event-list)))
+            (sources (cfw:cp-get-contents-sources cfw:component))
+            (new-sources (append sources (list new-source))))
+       (cfw:cp-set-contents-sources cfw:component new-sources)))))
+
+(defun exco-calfw-finalize-buffer ()
+  "Finalize the Calfw widget after retrievals have completed."
+  (with-current-buffer (get-buffer-create excorporate-calfw-buffer-name)
+    (declare (special cfw:component))
+    (let ((sources (cfw:cp-get-contents-sources cfw:component))
+         (status-source (make-cfw:source :name "Done."
+                                         :data (lambda (_b _e) nil))))
+      (cfw:cp-set-contents-sources cfw:component
+                                  (cons status-source (cdr sources))))
+    (cfw:cp-add-selection-change-hook cfw:component
+                                     (lambda ()
+                                       (apply #'exco-calfw-show-day
+                                              (cfw:cursor-to-nearest-date))))
+    (cfw:refresh-calendar-buffer nil)))
+
+;;;###autoload
+(defun exco-calfw-show-day (month day year)
+  "Show meetings for the date specified by MONTH DAY YEAR."
+  (exco-connection-iterate
+   (lambda ()
+     (exco-calfw-initialize-buffer month day year))
+   (lambda (identifier callback)
+     (exco-get-meetings-for-day identifier month day year
+                               callback))
+   #'exco-calfw-add-meetings
+   #'exco-calfw-finalize-buffer))
+
+(provide 'excorporate-calfw)
+
+;;; excorporate-calfw.el ends here
diff --git a/packages/excorporate/excorporate-org.el 
b/packages/excorporate/excorporate-org.el
new file mode 100644
index 0000000..2266161
--- /dev/null
+++ b/packages/excorporate/excorporate-org.el
@@ -0,0 +1,151 @@
+;;; excorporate-org.el --- Exchange Org Mode view     -*- lexical-binding: t 
-*-
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Thomas Fitzsimmons <address@hidden>
+;; Keywords: calendar
+
+;; 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:
+
+;; Use the Org Mode to display daily meetings.
+
+;;; Code:
+
+(require 'org)
+(require 'excorporate)
+
+(defvar excorporate-org-buffer-name "*Excorporate*"
+  "The buffer into which Org Mode output is inserted.")
+
+(defun exco-org-initialize-buffer ()
+  "Add initial text to the destination buffer."
+  (with-current-buffer (get-buffer-create excorporate-org-buffer-name)
+      (setq buffer-read-only t)
+      ;; Some Org mode configurations need `buffer-file-name' to be
+      ;; non-nil, or they'll make `org-mode' error out, for example
+      ;; `org-startup-with-latex-preview'.  Set `buffer-file-name' to
+      ;; something non-nil temporarily during initialization.  Don't
+      ;; leave it set or `save-some-buffers' will always prompt about
+      ;; *Excorporate*.
+      (let ((buffer-file-name excorporate-org-buffer-name))
+       (org-mode))
+      (use-local-map (copy-keymap org-mode-map))
+      (local-set-key "q" 'quit-window)
+      (display-buffer (current-buffer))
+      (let ((inhibit-read-only t))
+       (delete-region (point-min) (point-max))
+       (goto-char 1)
+       (insert "# Updated...\n"))))
+
+(defun exco-org-format-headline (identifier)
+  "Format an Org headline using IDENTIFIER."
+  (format "* Calendar (%s)\n" identifier))
+
+(defun exco-org-insert-meeting-headline (subject start-time end-time)
+  "Insert and schedule a meeting.
+SUBJECT is the meeting's subject, START-TIME and END-TIME are the
+meeting's start and end times in the same format as is returned
+by `current-time'."
+  (let* ((now (current-time))
+        (keyword (if (time-less-p now end-time)
+                     "TODO"
+                   "DONE")))
+    (insert (format "** %s %s\n" keyword subject))
+    (org-schedule nil (format-time-string "<%Y-%m-%d %a %H:%M>"
+                                         start-time))
+    (forward-line -1)
+    (end-of-line)
+    (insert  "--" (format-time-string "<%Y-%m-%d %a %H:%M>" end-time))
+    (forward-line)
+    (org-insert-time-stamp (current-time) t t "+ Retrieved " "\n")))
+
+(defun exco-org-insert-invitees (invitees)
+  "Parse and insert a list of invitees, INVITEES."
+  (dolist (invitee invitees)
+    (insert (format "  + %s\n" invitee))))
+
+(defun exco-org-insert-headline (identifier month day year)
+  "Insert Org headline for IDENTIFIER on date MONTH DAY YEAR."
+  (with-current-buffer (get-buffer-create excorporate-org-buffer-name)
+    (let ((inhibit-read-only t))
+      (insert (exco-org-format-headline identifier))
+      (org-insert-time-stamp (encode-time 0 0 0 day month year)
+                            nil t "  + Date " "\n"))))
+
+(defun exco-org-insert-meeting (subject start end location
+                                       main-invitees optional-invitees)
+  "Insert a scheduled meeting.
+SUBJECT is a string, the subject of the meeting.  START is the
+meeting start time in Emacs internal date time format, and END is
+the end of the meeting in the same format.  LOCATION is a string
+representing the location.  MAIN-INVITEES and OPTIONAL-INVITEES
+are the requested participants."
+  (exco-org-insert-meeting-headline subject start end)
+  (insert (format "+ Duration: %d minutes\n"
+                 (round (/ (float-time (time-subtract end start)) 60.0))))
+  (insert (format "+ Location: %s\n" location))
+  (when main-invitees
+    (insert "+ Invitees:\n")
+    (exco-org-insert-invitees main-invitees))
+  (when optional-invitees
+    (insert "+ Optional invitees:\n")
+    (exco-org-insert-invitees optional-invitees)))
+
+(defun exco-org-insert-meetings (identifier response)
+  "Insert the connection IDENTIFIER's meetings from RESPONSE."
+  (with-current-buffer (get-buffer-create excorporate-org-buffer-name)
+    (let ((inhibit-read-only t)
+         (name-regexp (concat "\\" (exco-org-format-headline identifier))))
+      (goto-char 1)
+      (end-of-line)
+      (insert (format "%s..." identifier))
+      (goto-char (point-max))
+      (re-search-backward name-regexp nil)
+      (forward-line 2)
+      (org-insert-time-stamp (current-time) t t "  + Last checked " "\n")
+      (exco-calendar-item-iterate response #'exco-org-insert-meeting)
+      (re-search-backward name-regexp nil)
+      (if (save-excursion (org-goto-first-child))
+         (org-sort-entries t ?s)
+       (forward-line 3)
+       (insert "`♘")))))
+
+(defun exco-org-finalize-buffer ()
+  "Finalize text in buffer after all connections have responded."
+  (with-current-buffer (get-buffer-create excorporate-org-buffer-name)
+    ;; Sort top-level entries alphabetically.
+    (let ((inhibit-read-only t))
+      (goto-char (point-min))
+      (end-of-line)
+      (insert "done.")
+      (org-sort-entries t ?a))))
+
+;;;###autoload
+(defun exco-org-show-day (month day year)
+  "Show meetings for the date specified by MONTH DAY YEAR."
+  (exco-connection-iterate #'exco-org-initialize-buffer
+                          (lambda (identifier callback)
+                            (exco-org-insert-headline identifier
+                                                      month day year)
+                            (exco-get-meetings-for-day identifier
+                                                       month day year
+                                                       callback))
+                          #'exco-org-insert-meetings
+                          #'exco-org-finalize-buffer))
+
+(provide 'excorporate-org)
+
+;;; excorporate-org.el ends here
diff --git a/packages/excorporate/excorporate.el 
b/packages/excorporate/excorporate.el
new file mode 100644
index 0000000..9f9f504
--- /dev/null
+++ b/packages/excorporate/excorporate.el
@@ -0,0 +1,804 @@
+;;; excorporate.el --- Exchange integration           -*- lexical-binding: t 
-*-
+
+;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
+
+;; Author: Thomas Fitzsimmons <address@hidden>
+;; Maintainer: Thomas Fitzsimmons <address@hidden>
+;; Created: 2014-09-19
+;; Version: 0.7.5
+;; Keywords: calendar
+;; Homepage: https://www.fitzsim.org/blog/
+;; Package-Requires: ((emacs "24.1") (fsm "0.2") (soap-client "3.1.1") 
(url-http-ntlm "2.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:
+
+;; Excorporate provides Exchange integration for Emacs.
+
+;; To create a connection to a web service:
+
+;; M-x excorporate
+
+;; Excorporate will prompt for an email address that it will use to
+;; automatically discover settings.  Then it will connect to two or
+;; three separate hosts: the autodiscovery host, the web service host
+;; or load balancer, and the actual server if there is a load
+;; balancer.  Therefore you may be prompted for your credentials two
+;; or three times.
+
+;; You should see a message indicating that the connection is ready
+;; either in the minibuffer or failing that in the *Messages* buffer.
+
+;; Finally, run M-x calendar, and press 'e' to show today's meetings.
+
+;; Please try autodiscovery first and report issues not yet listed
+;; below.  When autodiscovery works it is very convenient; the goal is
+;; to make it work for as many users as possible.
+
+;; If autodiscovery fails, customize `excorporate-configuration' to
+;; skip autodiscovery.
+
+;; Autodiscovery will fail if:
+
+;; - Excorporate is accessing the server through a proxy (Emacs
+;;   bug#10).
+
+;; - The server is not configured to support autodiscovery.
+
+;; - The email address is at a different domain than the server, e.g.,
+;;   address@hidden, autodiscover.domain2.com.
+
+;; - Authentication is Kerberos/GSSAPI.
+
+;; Excorporate does know about the special case where the mail address
+;; is at a subdomain, e.g., address@hidden, and the server is at
+;; the main domain, e.g., autodiscover.domain.com.  Autodiscovery will
+;; work in that case.
+
+;; Excorporate must be loaded before any other package that requires
+;; `soap-client'.  The version of `soap-client' that Excorporate
+;; bundles is backward compatible.
+
+;; Acknowledgments:
+
+;; Alexandru Harsanyi <address@hidden> provided help and
+;; guidance on how to extend soap-client.el's WSDL and XSD handling,
+;; enabling support for the full Exchange Web Services API.
+
+;; Alex Luccisano <address@hidden> tested early versions of
+;; this library against a corporate installation of Exchange.
+
+;; Jon Miller <address@hidden> tested against Exchange 2013.  He
+;; also tracked down and reported a bad interaction with other
+;; packages that require soap-client.
+
+;; Nicolas Lamirault <address@hidden> tested the
+;; autodiscovery feature.
+
+;; Trey Jackson <address@hidden> confirmed autodiscovery worked
+;; for him.
+
+;; Joakim Verona <address@hidden> tested autodiscovery in a
+;; Kerberos/GSSAPI environment.
+
+;; Wilfred Hughes <address@hidden> tested on Exchange 2007 and
+;; suggested documentation improvements.
+
+;; Erik Hetzner <address@hidden> tested on Office 365 and helped debug
+;; Office 365 support.
+
+;;; Code:
+
+;; Implementation-visible functions and variables.
+
+;; Add NTLM authorization scheme.
+(require 'url-http-ntlm)
+(require 'soap-client)
+(require 'fsm)
+(require 'excorporate-calendar)
+
+(defconst exco--autodiscovery-templates
+  '("https://%s/autodiscover/autodiscover.svc";
+    "https://autodiscover.%s/autodiscover/autodiscover.svc";)
+  "Autodiscovery URL templates.
+URL templates to be formatted with a domain name, then searched
+for autodiscovery files.")
+
+(defvar exco--connections nil
+  "A hash table of finite state machines.
+The key is the identifier passed to `exco-connect'.  Each finite
+state machine represents a service connection.")
+
+(defvar exco--connection-identifiers nil
+  "An ordered list of connection identifiers.")
+
+(defun exco--parse-xml-in-current-buffer ()
+  "Decode and parse the XML contents of the current buffer."
+  (let ((mime-part (mm-dissect-buffer t t)))
+    (unless mime-part
+      (error "Failed to decode response from server"))
+    (unless (equal (car (mm-handle-type mime-part)) "text/xml")
+      (error "Server response is not an XML document"))
+    (with-temp-buffer
+      (mm-insert-part mime-part)
+      (prog1
+         (car (xml-parse-region (point-min) (point-max)))
+       (kill-buffer)
+       (mm-destroy-part mime-part)))))
+
+(defun exco--bind-wsdl (wsdl service-url port-name target-namespace
+                            binding-name)
+  "Create a WSDL binding.
+Create a binding port for WSDL from SERVICE-URL, PORT-NAME,
+TARGET-NAMESPACE and BINDING-NAME."
+  (let* ((namespace (soap-wsdl-find-namespace target-namespace wsdl))
+        (port (make-soap-port
+               :name port-name
+               :binding (cons target-namespace binding-name)
+               :service-url service-url)))
+    (soap-namespace-put port namespace)
+    (push port (soap-wsdl-ports wsdl))
+    (soap-resolve-references port wsdl)
+    wsdl))
+
+(defun exco--handle-url-error (url status)
+  "Handle an error that occurred when retrieving URL.
+The details of the error are in STATUS, in the same format as the
+argument to a `url-retrieve' callback.  Return non-nil to retry,
+nil to continue."
+  (if (eq (cl-third (plist-get status :error)) 500)
+      ;; The server reported an internal server error.  Try to recover
+      ;; by re-requesting the target URL and its most recent redirect.
+      ;; I'm not sure what conditions cause the server to get into
+      ;; this state -- it might be because the server has stale
+      ;; knowledge of old keepalive connections -- but this should
+      ;; recover it.  We need to disable ntlm in
+      ;; url-registered-auth-schemes so that it doesn't prevent
+      ;; setting keepalives to nil.
+      (let ((url-registered-auth-schemes nil)
+           (url-http-attempt-keepalives nil)
+           (redirect (plist-get status :redirect)))
+       (fsm-debug-output "exco--fsm received 500 error for %s" url)
+       (url-debug 'excorporate "Attempting 500 recovery")
+       (ignore-errors
+         ;; Emacs's url-retrieve does not respect the values of
+         ;; url-http-attempt-keepalives and
+         ;; url-registered-auth-schemes in asynchronous contexts.
+         ;; Unless url.el is eventually changed to do so, the
+         ;; following requests must be synchronous so that they run
+         ;; entirely within url-http-attempt-keepalives's dynamic
+         ;; extent.  These calls block the main event loop,
+         ;; unfortunately, but only in this rare error recovery
+         ;; scenario.
+         (url-retrieve-synchronously url)
+         (when redirect (url-retrieve-synchronously redirect)))
+       (url-debug 'excorporate "Done 500 recovery attempt")
+       ;; Retry.
+       t)
+    ;; We received some other error, which just
+    ;; means we should try the next URL.
+    (fsm-debug-output "exco--fsm didn't find %s" url)
+    ;; Don't retry.
+    nil))
+
+(defun exco--retrieve-next-import (fsm state-data return-for next-state)
+  "Retrieve the next XML schema import.
+FSM is the finite state machine, STATE-DATA is FSM's state data,
+and RETURN-FOR is one of :enter or :event to indicate what return
+type the calling function expects.  NEXT-STATE is the next state
+the FSM should transition to on success."
+  (let* ((url (plist-get state-data :service-url))
+        (xml (plist-get state-data :service-xml))
+        (wsdl (plist-get state-data :service-wsdl))
+        (imports (soap-wsdl-xmlschema-imports wsdl))
+        (next-state (if imports :parsing-service-wsdl next-state)))
+    (when imports
+      (let ((import-url (url-expand-file-name (pop imports) url)))
+       (let ((url-request-method "GET")
+             (url-package-name "soap-client.el")
+             (url-package-version "1.0")
+             (url-mime-charset-string "utf-8;q=1, iso-8859-1;q=0.5")
+             (url-http-attempt-keepalives t))
+         (url-retrieve
+          import-url
+          (lambda (status)
+            (let ((data-buffer (current-buffer)))
+              (unwind-protect
+                  (progn
+                    (url-debug 'excorporate "Processing import %s" status)
+                    (if (eq (car status) :error)
+                        ;; There is an error.  It may be recoverable
+                        ;; if it's HTTP 500 (internal server error).
+                        (if (and (exco--handle-url-error import-url status)
+                                 ;; Only retry once.
+                                 (not (plist-get state-data :retrying)))
+                            ;; We should retry.  Don't save the
+                            ;; popped urls list to state-data, so
+                            ;; that this :try-next-url will
+                            ;; re-attempt to retrieve the same car as
+                            ;; before.  Set the retry flag.
+                            (progn
+                              (plist-put state-data :retrying t))
+                          ;; Save the popped urls list so that the next url
+                          ;; is attempted, and clear the retry flag.
+                          (plist-put state-data :retrying nil)
+                          (setf (soap-wsdl-xmlschema-imports wsdl) imports)
+                          (plist-put state-data :failure-message
+                                     (format "Failed to retrieve %s"
+                                             import-url))
+                          (fsm-send fsm :unrecoverable-error))
+                      ;; Success, parse WSDL.
+                      (plist-put state-data :retrying nil)
+                      (setf (soap-wsdl-xmlschema-imports wsdl) imports)
+                      (soap-with-local-xmlns xml
+                        (soap-wsdl-add-namespace
+                         (soap-parse-schema (soap-parse-server-response) wsdl)
+                         wsdl))
+                      (plist-put state-data :service-wsdl wsdl)))
+                (and (buffer-live-p data-buffer)
+                     (kill-buffer data-buffer))))
+            (fsm-send fsm t))))))
+    (if (eq return-for :enter)
+       (list state-data nil)
+      (list next-state state-data nil))))
+
+(define-state-machine exco--fsm :start
+  ((identifier)
+   "Start an Excorporate finite state machine."
+   (if (stringp identifier)
+       (let ((domain (cadr (split-string identifier "@"))))
+        (unless (and domain (not (equal domain "")))
+          (error "Invalid domain for address %s" identifier))
+        (list :retrieving-autodiscovery-xml
+              (list
+               ;; State machine data.
+               ;; Unique finite state machine identifier.  Either mail-address
+               ;; or (mail-address . service-url).  The latter allows multiple
+               ;; state machines to operate on the same service URL.  Login
+               ;; credentials are handled separately by auth-source and url,
+               ;; so these should be the only two identifier types needed here.
+               :identifier identifier
+               ;; User data.
+               :mail-address identifier
+               ;; Error recovery data.
+               :retrying nil
+               ;; Autodiscovery data.
+               :autodiscovery-urls
+               (append (mapcar (lambda (template)
+                                 (format template domain))
+                               exco--autodiscovery-templates)
+                       ;; Handle the address@hidden =>
+                       ;; autodiscover.domain.com case reported by a
+                       ;; user.  Only try one extra level.
+                       (let ((domain-parts (split-string domain "\\.")))
+                         (when (> (length domain-parts) 2)
+                           (mapcar (lambda (template)
+                                     (format template
+                                             (mapconcat
+                                              'identity
+                                              (cdr domain-parts) ".")))
+                                   exco--autodiscovery-templates))))
+               ;; Service data.
+               :service-url nil
+               :service-xml nil
+               :service-wsdl nil
+               ;; State data.
+               :next-state-after-success nil
+               :failure-message nil
+               :server-version nil)
+              ;; No timeout.
+              nil))
+     ;; Go directly to :retrieving-service-xml, skipping autodiscovery.
+     (list :retrieving-service-xml
+          (list
+           :identifier identifier
+           :mail-address (car identifier)
+           :retrying nil
+           :autodiscovery-urls nil
+           ;; Use service-url field from identifier.
+           :service-url (cdr identifier)
+           :service-xml nil
+           :service-wsdl nil
+           :next-state-after-success nil
+           :failure-message nil
+           :server-version nil)
+          ;; No timeout.
+          nil))))
+
+(define-state exco--fsm :retrieving-autodiscovery-xml
+  (fsm state-data event _callback)
+  (cl-case event
+    (:try-next-url
+     (let ((urls (plist-get state-data :autodiscovery-urls)))
+       (if urls
+          (let ((url (pop urls)))
+            (fsm-debug-output "exco--fsm will probe %s" url)
+            (condition-case nil
+                (url-retrieve
+                 url
+                 (lambda (status)
+                   (let ((data-buffer (current-buffer)))
+                     (unwind-protect
+                         (progn
+                           (url-debug 'excorporate
+                            "Processing status: %s" status)
+                           (if (eq (car status) :error)
+                               (progn
+                                 (if (and
+                                      (exco--handle-url-error url status)
+                                      ;; Only retry once.
+                                      (not (plist-get state-data :retrying)))
+                                     ;; We should retry.  Don't save the popped
+                                     ;; urls list to state-data, so that this
+                                     ;; :try-next-url will re-attempt to
+                                     ;; retrieve the same car as before.  Set
+                                     ;; the retry flag.
+                                     (plist-put state-data :retrying t)
+                                   ;; Save the popped urls list so that the
+                                   ;; next url is attempted, and clear the
+                                   ;; retry flag.
+                                   (plist-put state-data :retrying nil)
+                                   (plist-put state-data
+                                              :autodiscovery-urls urls))
+                                 ;; Try next or retry.
+                                 (fsm-send fsm :try-next-url))
+                             ;; Success, save URL and parse returned XML.
+                             (message
+                              "Excorporate: Found autodiscovery URL for %S: %s"
+                              (plist-get state-data :identifier) url)
+                             (plist-put state-data :retrying nil)
+                             (plist-put state-data :service-url url)
+                             (plist-put state-data :service-xml
+                                        (exco--parse-xml-in-current-buffer))
+                             (fsm-send fsm :success))
+                           (url-debug 'excorporate "Done processing status"))
+                       (and (buffer-live-p data-buffer)
+                            (kill-buffer data-buffer))))))
+              (error
+               (fsm-debug-output "exco--fsm connection refused for %s" url)
+               (plist-put state-data :retrying nil)
+               (plist-put state-data :autodiscovery-urls urls)
+               (fsm-send fsm :try-next-url)))
+            (list :retrieving-autodiscovery-xml state-data nil))
+        (plist-put state-data :failure-message
+                   "Autodiscovery ran out of URLs to try")
+        (list :shutting-down-on-error state-data nil))))
+    (:success
+     (plist-put state-data :next-state-after-success :retrieving-service-xml)
+     (list :parsing-service-wsdl state-data nil))))
+
+(define-enter-state exco--fsm :shutting-down-on-error
+  (_fsm state-data)
+  (let ((failure-message (plist-get state-data :failure-message)))
+    (exco-disconnect (plist-get state-data :identifier))
+    (message "Excorporate: %s" failure-message)
+    (url-debug 'excorporate "Failed: %s" failure-message)
+    (fsm-debug-output "exco--fsm failed: %s" failure-message))
+  (list state-data nil))
+
+(define-state exco--fsm :shutting-down-on-error
+  (_fsm state-data _event _callback)
+  (list :shutting-down-on-error state-data nil))
+
+(define-enter-state exco--fsm :retrieving-service-xml
+  (fsm state-data)
+  (when (stringp (plist-get state-data :identifier))
+    (let* ((xml (plist-get state-data :service-xml))
+          (unbound-wsdl (plist-get state-data :service-wsdl))
+          (wsdl
+           (progn
+             ;; Skip soap-parse-wsdl-phase-fetch-schema to avoid
+             ;; synchronous URL fetches.
+             (soap-parse-wsdl-phase-finish-parsing xml unbound-wsdl)
+             (exco--bind-wsdl
+              (soap-wsdl-resolve-references unbound-wsdl)
+              (plist-get state-data :service-url)
+              "AutodiscoverServicePort"
+              "http://schemas.microsoft.com/exchange/2010/Autodiscover";
+              "DefaultBinding_Autodiscover"))))
+      (soap-invoke-async
+       (lambda (response)
+        (let ((result-url
+               (exco-extract-value '(Response
+                                     UserResponses
+                                     UserResponse
+                                     UserSettings
+                                     UserSetting
+                                     Value)
+                                   response)))
+          (if result-url
+              (progn
+                (plist-put state-data :service-url result-url)
+                (message "Excorporate: Found service URL for %S: %s"
+                         (plist-get state-data :identifier)
+                         (plist-get state-data :service-url)))
+            ;; No result.  Check for error.
+            (let ((error-message
+                   (exco-extract-value '(Response
+                                         UserResponses
+                                         UserResponse
+                                         ErrorMessage)
+                                       response)))
+              (if error-message
+                  (message "Excorporate: %s" error-message)
+                (message "Excorporate: Failed to find service URL"))))
+          (fsm-send fsm :retrieve-xml)))
+       nil
+       wsdl
+       "AutodiscoverServicePort"
+       "GetUserSettings"
+       `((RequestedServerVersion . "Exchange2010")
+        (Request
+         (Users
+          (User
+           (Mailbox . ,(plist-get state-data :mail-address))))
+         (RequestedSettings
+          (Setting . "InternalEwsUrl")))))))
+  (list state-data nil))
+
+(define-state exco--fsm :retrieving-service-xml
+  (fsm state-data event _callback)
+  (cl-case event
+    (:unrecoverable-error
+     (list :shutting-down-on-error state-data nil))
+    (:retrieve-xml
+     (let* ((service-url (plist-get state-data :service-url))
+           (wsdl-url (replace-regexp-in-string "/[^/]*$" "/Services.wsdl"
+                                               service-url)))
+       (url-retrieve wsdl-url
+                    (lambda (status)
+                      (let ((data-buffer (current-buffer)))
+                        (unwind-protect
+                            (if (eq (car status) :error)
+                                (progn
+                                  (plist-put state-data :failure-message
+                                             (format "Failed to retrieve %s"
+                                                     wsdl-url))
+                                  (fsm-send fsm :unrecoverable-error))
+                              (plist-put state-data
+                                         :service-xml
+                                         (exco--parse-xml-in-current-buffer))
+                              (fsm-send fsm :success))
+                          (and (buffer-live-p data-buffer)
+                               (kill-buffer data-buffer)))))))
+     (list :retrieving-service-xml state-data nil))
+    (:success
+     (plist-put state-data :next-state-after-success :retrieving-data)
+     (list :parsing-service-wsdl state-data nil))))
+
+(define-enter-state exco--fsm :parsing-service-wsdl
+  (fsm state-data)
+  (let* ((url (plist-get state-data :service-url))
+        (xml (plist-get state-data :service-xml))
+        (next-state (plist-get state-data :next-state-after-success))
+        (wsdl (soap-make-wsdl url)))
+    (soap-parse-wsdl-phase-validate-node xml)
+    ;; Skip soap-parse-wsdl-phase-fetch-imports to avoid synchronous
+    ;; fetches of import URLs.
+    (soap-parse-wsdl-phase-parse-schema xml wsdl)
+    (plist-put state-data :service-wsdl wsdl)
+    (exco--retrieve-next-import fsm state-data :enter next-state)))
+
+(define-state exco--fsm :parsing-service-wsdl
+  (fsm state-data event _callback)
+  (if (eq event :unrecoverable-error)
+      (list :shutting-down-on-error state-data nil)
+    (let ((next-state (plist-get state-data :next-state-after-success)))
+      (exco--retrieve-next-import fsm state-data :event next-state))))
+
+(defun exco--get-server-version (wsdl)
+  "Extract server version from WSDL."
+  (let ((warning-message "Excorporate: Failed to determine server version")
+       (namespace "http://schemas.microsoft.com/exchange/services/2006/types";)
+       (name "RequestServerVersion")
+       (found-version nil))
+    (unwind-protect
+       (setq found-version
+             (catch 'found
+               (dolist (attribute
+                        (soap-xs-type-attributes
+                         (soap-xs-element-type (soap-wsdl-get
+                                                `(,namespace . ,name)
+                                                wsdl 'soap-xs-element-p))))
+                 (when (equal (soap-xs-attribute-name attribute) "Version")
+                   (throw 'found (car (soap-xs-simple-type-enumeration
+                                       (soap-xs-attribute-type attribute))))))
+               (warn warning-message)
+               nil))
+      (if found-version
+         found-version
+       (warn warning-message)
+       nil))))
+
+(define-enter-state exco--fsm :retrieving-data
+  (_fsm state-data)
+  (let ((wsdl (plist-get state-data :service-wsdl))
+       (identifier (plist-get state-data :identifier)))
+    ;; Skip soap-parse-wsdl-phase-fetch-schema to avoid synchronous
+    ;; URL fetches.
+    (soap-parse-wsdl-phase-finish-parsing (plist-get state-data :service-xml)
+                                         wsdl)
+    (exco--bind-wsdl
+     (soap-wsdl-resolve-references wsdl)
+     (plist-get state-data :service-url)
+     "ExchangeServicePort"
+     "http://schemas.microsoft.com/exchange/services/2006/messages";
+     "ExchangeServiceBinding")
+    (plist-put state-data :server-version (exco--get-server-version wsdl))
+    (fsm-debug-output "exco--fsm %s server version is %s"
+                     identifier (exco-server-version identifier))
+    (message "Excorporate: Connection %S is ready" identifier))
+  (list state-data nil))
+
+(define-state exco--fsm :retrieving-data
+  (_fsm state-data event _callback)
+  (let* ((identifier (plist-get state-data :identifier))
+        (wsdl (plist-get state-data :service-wsdl))
+        (name (pop event))
+        (arguments (pop event))
+        (callback (pop event)))
+    (apply #'soap-invoke-async
+          (lambda (response)
+            (funcall callback identifier response))
+          nil
+          wsdl
+          "ExchangeServicePort"
+          name
+          arguments))
+  (list :retrieving-data state-data nil))
+
+(defun exco--ensure-connection ()
+  "Ensure at least one connection exists or throw an error."
+  (unless exco--connection-identifiers
+    (error "Excorporate: No connections exist.  Run M-x excorporate")))
+
+(defmacro exco--with-fsm (identifier &rest body)
+  "With `fsm' set to IDENTIFIER, run BODY.
+Run BODY with `fsm' set to the finite state machine specified by
+IDENTIFIER."
+  (declare (indent 1) (debug t))
+  `(progn
+     (exco--ensure-connection)
+     (let ((fsm (gethash ,identifier exco--connections)))
+       (unless fsm
+        (error "Excorporate: Connection %S does not exist" ,identifier))
+       ,@body)))
+
+;; Developer-visible functions and variables.
+
+(defun exco-api-version ()
+  "Return the Excorporate API version.
+Return a non-negative integer representing the current
+Excorporate application programming interface version.  Version 0
+is subject to change."
+  0)
+
+(defun exco-connect (identifier)
+  "Connect or reconnect to a web service.
+IDENTIFIER is the mail address to use for autodiscovery or a
+pair (mail-address . service-url)."
+  (if (stringp identifier)
+      (message "Excorporate: Starting autodiscovery for %S"
+              identifier))
+  (let ((fsm (start-exco--fsm identifier)))
+    (unless exco--connections
+      (setq exco--connections (make-hash-table :test 'equal)))
+    (when (gethash identifier exco--connections)
+      (exco-disconnect identifier))
+    (puthash identifier fsm exco--connections)
+    (push identifier exco--connection-identifiers)
+    (if (stringp identifier)
+       (fsm-send fsm :try-next-url)
+      (fsm-send fsm :retrieve-xml))
+    nil))
+
+(defun exco-operate (identifier name arguments callback)
+  "Execute a service operation asynchronously.
+IDENTIFIER is the connection identifier.  Execute operation NAME
+with ARGUMENTS then call CALLBACK with two arguments, IDENTIFIER
+and the server's response."
+  (exco--with-fsm identifier
+    (fsm-send fsm (list name arguments callback)))
+  nil)
+
+(defun exco-server-version (identifier)
+  "Return the server version for connection IDENTIFIER, as a string.
+Examples are \"Exchange2010\", \"Exchange2010_SP1\",
+\"Exchange2013\"."
+  (exco--with-fsm identifier
+    (plist-get (fsm-get-state-data fsm) :server-version)))
+
+(defun exco-disconnect (identifier)
+  "Disconnect from a web service.
+IDENTIFIER is the mail address used to look up the connection."
+  (exco--with-fsm identifier
+    (setq exco--connection-identifiers
+         (delete identifier exco--connection-identifiers))
+    (remhash identifier exco--connections))
+  nil)
+
+(defun exco-extract-value (path result)
+  "Extract the value at PATH from RESULT.
+PATH is an ordered list of node names."
+  (let ((values (nreverse (car result))))
+    (dolist (path-element path)
+      (setq values (assoc path-element values)))
+    (cdr values)))
+
+(defun exco-calendar-item-iterate (response callback)
+  "Iterate through calendar items in RESPONSE, calling CALLBACK on each.
+Returns a list of results from callback.  CALLBACK takes arguments:
+SUBJECT, a string, the subject of the meeting.
+START, the start date and time in Emacs internal representation.
+END, the start date and time in Emacs internal representation.
+LOCATION, the location of the meeting.
+MAIN-INVITEES, a list of strings representing required participants.
+OPTIONAL-INVITEES, a list of strings representing optional participants."
+  (let ((result-list '()))
+    (dolist (calendar-item (exco-extract-value '(ResponseMessages
+                                                FindItemResponseMessage
+                                                RootFolder
+                                                Items)
+                                              response))
+      (let* ((subject (cdr (assoc 'Subject calendar-item)))
+            (start (cdr (assoc 'Start calendar-item)))
+            (start-internal (apply #'encode-time
+                                   (soap-decode-date-time
+                                    start 'dateTime)))
+            (end (cdr (assoc 'End calendar-item)))
+            (end-internal (apply #'encode-time
+                                 (soap-decode-date-time
+                                  end 'dateTime)))
+            (location (cdr (assoc 'Location calendar-item)))
+            (to-invitees (cdr (assoc 'DisplayTo calendar-item)))
+            (main-invitees (when to-invitees
+                             (mapcar 'org-trim
+                                     (split-string to-invitees ";"))))
+            (cc-invitees (cdr (assoc 'DisplayCc calendar-item)))
+            (optional-invitees (when cc-invitees
+                                 (mapcar 'org-trim
+                                         (split-string cc-invitees ";")))))
+       (push (funcall callback subject start-internal end-internal
+                      location main-invitees optional-invitees)
+             result-list)))
+    (nreverse result-list)))
+
+;; Date-time utility functions.
+(defun exco-extend-timezone (date-time-string)
+  "Add a colon to the timezone in DATE-TIME-STRING.
+DATE-TIME-STRING must be formatted as if returned by
+`format-time-string' with FORMAT-STRING \"%FT%T%z\".  Web
+services require the ISO8601 extended format of timezone, which
+includes the colon."
+  (concat
+   (substring date-time-string 0 22) ":" (substring date-time-string 22)))
+
+(defun exco-format-date-time (time-internal)
+  "Convert TIME-INTERNAL to an XSD compatible date-time string."
+  (exco-extend-timezone
+   (format-time-string "%FT%T%z" time-internal)))
+
+;; Use month day year order to be compatible with
+;; calendar-cursor-to-date.  I wish I could instead use the ISO 8601
+;; ordering, year month day.
+(defun exco-get-meetings-for-day (identifier month day year callback)
+  "Return the meetings for the specified day.
+IDENTIFIER is the connection identifier.  MONTH, DAY and YEAR are
+the meeting month, day and year.  Call CALLBACK with two
+arguments, IDENTIFIER and the server's response."
+  (let* ((start-of-day-time-internal
+         (apply #'encode-time `(0 0 0 ,day ,month ,year)))
+        (start-of-day-date-time
+         (exco-format-date-time start-of-day-time-internal))
+        (start-of-next-day-date-time
+         (exco-extend-timezone
+          (format-time-string "%FT00:00:00%z"
+                              (time-add start-of-day-time-internal
+                                        (seconds-to-time 86400))))))
+    (exco-operate
+     identifier
+     "FindItem"
+     `(;; Main arguments.
+       (;; RequestVersion is usually overridden by a fixed value in
+       ;; the WSDL (the RequestServerVersion element); provide the
+       ;; maximally-compatible Exchange2007 if the fixed value isn't
+       ;; present.
+       (RequestVersion (Version . "Exchange2007"))
+       (Traversal . "Shallow")
+       (ItemShape
+        (BaseShape . "AllProperties"))
+       ;; To aid productivity, excorporate-calfw automatically prunes your
+       ;; meetings to a maximum of 100 per day.
+       (CalendarView (MaxEntriesReturned . "100")
+                     (StartDate . ,start-of-day-date-time)
+                     (EndDate . ,start-of-next-day-date-time))
+       (ParentFolderIds
+        (DistinguishedFolderId (Id . "calendar"))))
+       ;; Empty arguments.
+       ,@(let* ((wsdl (exco--with-fsm identifier
+                                     (plist-get (fsm-get-state-data fsm)
+                                                :service-wsdl)))
+               (arity (soap-operation-arity wsdl
+                                           "ExchangeServicePort"
+                                           "FindItem")))
+          (make-list (- arity 1) nil)))
+     callback)))
+
+(defun exco-connection-iterate (initialize-function
+                               per-connection-function
+                               per-connection-callback
+                               finalize-function)
+  "Iterate Excorporate connections.
+Call INITIALIZE-FUNCTION once before iterating.
+Call PER-CONNECTION-FUNCTION for each connection.
+Pass PER-CONNECTION-CALLBACK to PER-CONNECTION-FUNCTION.
+Call FINALIZE-FUNCTION after all operations have responded."
+  (exco--ensure-connection)
+  (funcall initialize-function)
+  (let ((responses 0)
+       (connection-count (length exco--connection-identifiers)))
+    (dolist (identifier exco--connection-identifiers)
+      (funcall per-connection-function identifier
+              (lambda (&rest arguments)
+                (setq responses (1+ responses))
+                (apply per-connection-callback arguments)
+                (when (equal responses connection-count)
+                  (funcall finalize-function)))))))
+
+;; User-visible functions and variables.
+(defgroup excorporate nil
+  "Exchange support."
+  :version "25.1"
+  :group 'comm
+  :group 'calendar)
+
+;; Name the excorporate-configuration variable vaguely.  It is currently a
+;; MAIL-ADDRESS string, a pair (MAIL-ADDRESS . SERVICE-URL), or nil.  In the
+;; future it could allow a list of strings and pairs.
+(defcustom excorporate-configuration nil
+  "Excorporate configuration.
+The mail address to use for autodiscovery."
+  :type '(choice
+         (const
+          :tag "Prompt for Exchange mail address to use for autodiscovery" nil)
+         (string :tag "Exchange mail address to use for autodiscovery")
+         (cons :tag "Skip autodiscovery"
+               (string :tag "Exchange mail address (e.g., address@hidden)")
+               (string :tag "Exchange Web Services URL\
+ (e.g., https://mail.gnu.org/ews/exchange.asmx)"))))
+
+;;;###autoload
+(defun excorporate ()
+  "Start Excorporate.
+Prompt for a mail address to use for autodiscovery, with an
+initial suggestion of `user-mail-address'.  However, if
+`excorporate-configuration' is non-nil, `excorporate' will use
+that without prompting."
+  (interactive)
+  (cond
+   ((eq excorporate-configuration nil)
+    (exco-connect (completing-read "Exchange mail address: "
+                                  (list user-mail-address)
+                                  nil nil user-mail-address)))
+   ((stringp excorporate-configuration)
+    (exco-connect excorporate-configuration))
+   ((null (consp (cdr excorporate-configuration)))
+    (exco-connect excorporate-configuration))
+   (t
+    (error "Excorporate: Invalid configuration"))))
+
+(provide 'excorporate)
+
+;;; excorporate.el ends here
diff --git a/packages/excorporate/excorporate.info 
b/packages/excorporate/excorporate.info
new file mode 100644
index 0000000..fdab71d
--- /dev/null
+++ b/packages/excorporate/excorporate.info
@@ -0,0 +1,212 @@
+This is excorporate.info, produced by makeinfo version 6.0 from
+excorporate.texi.
+
+Copyright (C) 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.
+
+     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.
+
+     All Emacs Lisp code contained in this document may be used,
+     distributed, and modified without restriction.
+INFO-DIR-SECTION Emacs
+START-INFO-DIR-ENTRY
+* Excorporate: (excorporate).  Exchange Web Services integration for Emacs.
+END-INFO-DIR-ENTRY
+
+
+File: excorporate.info,  Node: Top,  Next: Installation,  Up: (dir)
+
+Excorporate Manual
+******************
+
+Excorporate provides Exchange Web Services (EWS) support for Emacs.
+
+   If the Exchange server you access is configured to provide EWS
+support, then there's a 76% chance that Excorporate will enable you to
+retrieve your calendar entries from the comfort of Emacs.
+
+   The 24% failure rate is because accessing - in particular,
+authenticating against - an Exchange server can be challenging.
+
+   Known to fail are Kerberos/GSSAPI authentication and accessing the
+server through a proxy
+(<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=10>).
+
+   Patches are welcome to enable more of these access scenarios.
+
+* Menu:
+
+* Installation::                Getting and installing 'excorporate'.
+* Configuration::               Configuring 'excorporate'.
+* Usage::                       Using 'excorporate'.
+* Troubleshooting::             Debugging why a connection failed
+* Reporting Bugs::              Reporting bugs
+
+
+File: excorporate.info,  Node: Installation,  Next: Configuration,  Prev: Top, 
 Up: Top
+
+1 Installation
+**************
+
+Excorporate works on Emacs versions >= 24.1.
+
+Install 'excorporate' from the GNU ELPA repository:
+
+   'M-x package-install RET excorporate'
+
+
+File: excorporate.info,  Node: Configuration,  Next: Usage,  Prev: 
Installation,  Up: Top
+
+2 Configuration
+***************
+
+Ideally you won't need to configure Excorporate at all.  On friendly
+Exchange setups, Excorporate can discover the EWS URL automatically.
+
+First try:
+
+   'M-x excorporate'
+
+which will prompt you for the Exchange account email address.  Follow
+the prompts and if all goes well, you'll see a message in the minibuffer
+or in *Messages* saying that the connection is ready.
+
+If autodiscovery runs out of URLs to try, then customize
+'excorporate-configuration':
+
+   'M-x customize-variable RET excorporate-configuration'
+
+From the value menu select "Skip autodiscovery".  This allows you to
+enter the Exchange account email address and the EWS URL directly.  The
+EWS URL is of the form 'https://mail.gnu.org/ews/exchange.asmx'.
+
+After saving the configuration, try 'M-x excorporate' again.
+
+If that doesn't work, then you're probably out of luck, or you'll have
+to start a troubleshooting deep dive (*note Troubleshooting::).
+
+
+File: excorporate.info,  Node: Usage,  Next: Troubleshooting,  Prev: 
Configuration,  Up: Top
+
+3 Usage
+*******
+
+Excorporate binds 'e' in '*Calendar*' buffers.  Open the calendar with:
+
+   'M-x calendar'
+
+move the cursor to the date you want to see meetings for, and press 'e'.
+This will show the meetings in a temporary read-only Org Mode buffer
+named '*Excorporate*'.
+
+
+File: excorporate.info,  Node: Troubleshooting,  Next: Reporting Bugs,  Prev: 
Usage,  Up: Top
+
+4 Troubleshooting
+*****************
+
+First, you'll want to double-check that the Exchange server you're
+trying to access provides EWS support.  If it doesn't, Excorporate can't
+do anything for you.  Before asking your Exchange administrator, check
+intranet wikis and so forth; other users of non-standard clients may
+have already found the EWS URL. This is called the "EWS endpoint".  I
+can be as simple as something like:
+
+   'https://mail.gnu.org/ews/exchange.asmx'
+
+First you need to make sure you can access the endpoint.
+
+For Exchange Web Services (EWS) which Excorporate uses, you'll have to
+determine the EWS endpoint for your Exchange account, call it 'ews-url'.
+It is usually something like:
+
+   https://<mail host name>/ews/exchange.asmx
+
+Excorporate calculates the WSDL URL, call it 'wsdl-url', by replacing
+the endpoint's last path element with "Services.wsdl":
+
+   https://<mail host name>/ews/Services.wsdl
+
+Before even attempting Excorporate, you have to make these succeed:
+
+     (with-current-buffer
+      (url-retrieve-synchronously ews-url)
+      (buffer-string))
+
+When this works, you'll see web page text in *Messages*, containing a
+message about having created a service.
+
+     (with-current-buffer
+      (url-retrieve-synchronously wsdl-url)
+      (buffer-string))
+
+When this works, it will show a bunch of WSDL (XML) in *Messages*.
+
+Debug the above URL retrievals with (setq url-debug t), and with this
+patch:
+
+     diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
+     index d49e527..0f1c8ae 100644
+     --- a/lisp/url/url-http.el
+     +++ b/lisp/url/url-http.el
+     @ -869,6 +869,7 @ url-http-parse-headers
+            (url-handle-content-transfer-encoding))
+          (url-http-debug "Finished parsing HTTP headers: %S" success)
+          (widen)
+     +    (url-http-debug "Response: %s" (buffer-string))
+          (goto-char (point-min))
+          success))
+
+
+(Beware that HTTP responses are out-of-order with this patch.)
+
+Once you're sure the above steps are working, try 'M-x excorporate'.
+
+The buffer '*fsm-debug*' shows 'excorporate' state transitions and
+should provide details of where things went wrong.
+
+Also check '*Messages*' for anything obvious.
+
+If you suspect something wrong with accessing the EWS URL, try setting
+'url-debug' to t and retry 'M-x excorporate', then check the
+'*URL-DEBUG*' buffer for output.
+
+If you suspect NTLM authentication is failing, as a long shot, you might
+try setting 'ntlm-compatibility-level' to 0 and retrying 'M-x
+excorporate'.
+
+Excorporate's dependencies implement the tricky elements of asynchronous
+Exchange access: a state machine ('fsm'), TLS negotiation ('gnutls'),
+NTLM authentication ('ntlm' and 'url-http-ntlm') and SOAP communication
+('soap-client').
+
+
+File: excorporate.info,  Node: Reporting Bugs,  Prev: Troubleshooting,  Up: Top
+
+5 Reporting Bugs
+****************
+
+To report a bug, use 'M-x report-emacs-bug', and put Excorporate
+somewhere in the subject.
+
+
+
+Tag Table:
+Node: Top1103
+Node: Installation2124
+Node: Configuration2387
+Node: Usage3435
+Node: Troubleshooting3806
+Node: Reporting Bugs6649
+
+End Tag Table
diff --git a/packages/excorporate/excorporate.texi 
b/packages/excorporate/excorporate.texi
new file mode 100644
index 0000000..99cb9d1
--- /dev/null
+++ b/packages/excorporate/excorporate.texi
@@ -0,0 +1,233 @@
+\input texinfo
address@hidden excorporate.info
address@hidden Excorporate Manual
+
address@hidden Emacs
address@hidden
+* Excorporate: (excorporate).  Exchange Web Services integration for Emacs.
address@hidden direntry
+
address@hidden
+Copyright @copyright{} 2016 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.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.
+
+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.
+
+All Emacs Lisp code contained in this document may be used, distributed,
+and modified without restriction.
address@hidden quotation
address@hidden copying
+
address@hidden
address@hidden Excorporate Manual
address@hidden Thomas Fitzsimmons
address@hidden
address@hidden
address@hidden titlepage
+
address@hidden
+
address@hidden Top
address@hidden Excorporate Manual
+
+Excorporate provides Exchange Web Services (EWS) support for Emacs.
+
+If the Exchange server you access is configured to provide EWS
+support, then there's a 76% chance that Excorporate will enable you to
+retrieve your calendar entries from the comfort of Emacs.
+
+The 24% failure rate is because accessing -- in particular,
+authenticating against -- an Exchange server can be challenging.
+
+Known to fail are Kerberos/GSSAPI authentication and accessing the
+server through a proxy
+(@uref{https://debbugs.gnu.org/cgi/bugreport.cgi?bug=10}).
+
+Patches are welcome to enable more of these access scenarios.
+
address@hidden
+* Installation::                Getting and installing @code{excorporate}.
+* Configuration::               Configuring @code{excorporate}.
+* Usage::                       Using @code{excorporate}.
+* Troubleshooting::             Debugging why a connection failed
+* Reporting Bugs::              Reporting bugs
address@hidden menu
+
address@hidden Installation
address@hidden Installation
+
+Excorporate works on Emacs versions >= 24.1.
+
address@hidden
+Install @code{excorporate} from the GNU ELPA repository:
+
address@hidden package-install RET excorporate}
+
address@hidden Configuration
address@hidden Configuration
+
address@hidden
+Ideally you won't need to configure Excorporate at all.  On friendly
+Exchange setups, Excorporate can discover the EWS URL automatically.
+
address@hidden
+First try:
+
address@hidden excorporate}
+
address@hidden
+which will prompt you for the Exchange account email address.  Follow
+the prompts and if all goes well, you'll see a message in the
+minibuffer or in *Messages* saying that the connection is ready.
+
address@hidden
+If autodiscovery runs out of URLs to try, then customize
address@hidden:
+
address@hidden customize-variable RET excorporate-configuration}
+
address@hidden
+From the value menu select ``Skip autodiscovery''.  This allows you to
+enter the Exchange account email address and the EWS URL directly.
+The EWS URL is of the form
address@hidden://mail.gnu.org/ews/exchange.asmx}.
+
address@hidden
+After saving the configuration, try @code{M-x excorporate} again.
+
address@hidden
+If that doesn't work, then you're probably out of luck, or you'll have
+to start a troubleshooting deep dive (@pxref{Troubleshooting}).
+
address@hidden Usage
address@hidden Usage
+
address@hidden
+Excorporate binds `e' in @code{*Calendar*} buffers.  Open the calendar
+with:
+
address@hidden calendar}
+
address@hidden
+move the cursor to the date you want to see meetings for, and press
+`e'.  This will show the meetings in a temporary read-only Org Mode
+buffer named @code{*Excorporate*}.
+
address@hidden Troubleshooting
address@hidden Troubleshooting
+
address@hidden
+First, you'll want to double-check that the Exchange server you're
+trying to access provides EWS support.  If it doesn't, Excorporate
+can't do anything for you.  Before asking your Exchange administrator,
+check intranet wikis and so forth; other users of non-standard clients
+may have already found the EWS URL.  This is called the ``EWS
+endpoint''.  I can be as simple as something like:
+
address@hidden://mail.gnu.org/ews/exchange.asmx}
+
address@hidden
+First you need to make sure you can access the endpoint.
+
address@hidden
+For Exchange Web Services (EWS) which Excorporate uses, you'll have to
+determine the EWS endpoint for your Exchange account, call it
address@hidden  It is usually something like:
+
+   https://<mail host name>/ews/exchange.asmx
+
address@hidden
+Excorporate calculates the WSDL URL, call it @code{wsdl-url}, by
+replacing the endpoint's last path element with ``Services.wsdl'':
+
+   https://<mail host name>/ews/Services.wsdl
+
address@hidden
+Before even attempting Excorporate, you have to make these succeed:
+
address@hidden
+(with-current-buffer
+ (url-retrieve-synchronously ews-url)
+ (buffer-string))
address@hidden example
+
address@hidden
+When this works, you'll see web page text in *Messages*, containing a
+message about having created a service.
+
address@hidden
+(with-current-buffer
+ (url-retrieve-synchronously wsdl-url)
+ (buffer-string))
address@hidden example
+
address@hidden
+When this works, it will show a bunch of WSDL (XML) in *Messages*.
+
address@hidden
+Debug the above URL retrievals with (setq url-debug t), and with this
+patch:
+
address@hidden
+diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
+index d49e527..0f1c8ae 100644
+--- a/lisp/url/url-http.el
++++ b/lisp/url/url-http.el
+@@ -869,6 +869,7 @@ url-http-parse-headers
+       (url-handle-content-transfer-encoding))
+     (url-http-debug "Finished parsing HTTP headers: %S" success)
+     (widen)
++    (url-http-debug "Response: %s" (buffer-string))
+     (goto-char (point-min))
+     success))
+
address@hidden example
+
address@hidden
+(Beware that HTTP responses are out-of-order with this patch.)
+
address@hidden
+Once you're sure the above steps are working, try @code{M-x
+excorporate}.
+
address@hidden
+The buffer @code{*fsm-debug*} shows @code{excorporate} state
+transitions and should provide details of where things went wrong.
+
address@hidden
+Also check @code{*Messages*} for anything obvious.
+
address@hidden
+If you suspect something wrong with accessing the EWS URL, try setting
address@hidden to t and retry @code{M-x excorporate}, then check the
address@hidden buffer for output.
+
address@hidden
+If you suspect NTLM authentication is failing, as a long shot, you
+might try setting @code{ntlm-compatibility-level} to 0 and retrying
address@hidden excorporate}.
+
address@hidden
+Excorporate's dependencies implement the tricky elements of
+asynchronous Exchange access: a state machine (@code{fsm}), TLS
+negotiation (@code{gnutls}), NTLM authentication (@code{ntlm} and
address@hidden) and SOAP communication (@code{soap-client}).
+
address@hidden Reporting Bugs
address@hidden Reporting Bugs
+
address@hidden
+To report a bug, use @code{M-x report-emacs-bug}, and put Excorporate
+somewhere in the subject.
+
address@hidden
diff --git a/packages/f90-interface-browser/f90-interface-browser.el 
b/packages/f90-interface-browser/f90-interface-browser.el
index 8113a8b..1b69061 100644
--- a/packages/f90-interface-browser/f90-interface-browser.el
+++ b/packages/f90-interface-browser/f90-interface-browser.el
@@ -243,7 +243,7 @@ If NAME is like type(TYPENAME) return TYPENAME, otherwise 
just NAME."
 
 Recurse over all (non-hidden) directories below DIR and parse
 interfaces found within them using `f90-parse-interfaces-in-dir',
-a directory is considered hidden if it's name doesn't start with
+a directory is considered hidden if its name doesn't start with
 an alphanumeric character."
   (interactive "DParse files in tree: ")
   (let (dirs
@@ -664,7 +664,7 @@ see `f90-insert-fluidity-refcount'."
 (defun f90-insert-fluidity-refcount (file fname)
   "Insert a Fluidity reference count template for FILE.
 
-If FNAME matches \\\\`Reference_count_.*\\\\.F90 then this file
+If FNAME matches \\\\=`Reference_count_\\([^\\.]+\\)\\.F90 then this file
 needs a reference count interface, so insert one."
   (when (string-match "\\`Reference_count_\\([^\\.]+\\)\\.F90" fname)
     (insert-file-contents-literally
diff --git a/packages/f90-interface-browser/f90-tests.el 
b/packages/f90-interface-browser/f90-tests.el
index 74c0dee..5f221a6 100644
--- a/packages/f90-interface-browser/f90-tests.el
+++ b/packages/f90-interface-browser/f90-tests.el
@@ -28,7 +28,7 @@
 (defvar *test-running-tests* nil)
 (defmacro deftest (name parameters &rest body)
   "Define a test function. Within a test function we can call
-   other test functions or use 'check' to run individual test
+   other test functions or use `check' to run individual test
    cases."
   `(prog1 ',name
      (setf (gethash ',name *test-tests*)
@@ -37,7 +37,7 @@
                ,@body)))))
 
 (defmacro test-check (&rest forms)
-  "Run each expression in 'forms' as a test case."
+  "Run each expression in FORMS as a test case."
   `(test-combine-results
     ,@(cl-loop for (expr res) in forms
                collect `(test-report-result (equal (condition-case _
@@ -47,14 +47,14 @@
                                             ',expr ',res))))
 
 (defmacro test-combine-results (&rest forms)
-  "Combine the results (as booleans) of evaluating 'forms' in order."
+  "Combine the results (as booleans) of evaluating FORMS in order."
   (let ((result (make-symbol "result")))
     `(let ((,result t))
        ,@(cl-loop for f in forms collect `(unless ,f (setf ,result nil)))
        ,result)))
 
 (defun test-report-result (result res req)
-  "Report the results of a single test case. Called by 'check'."
+  "Report the results of a single test case. Called by `check'."
   (if result
       (insert (format "%s ... %S: %S\n"
                      (propertize "pass"
@@ -112,7 +112,7 @@
    ((f90-split-arglist "foo, dimension(1, size(a, b))")
     ("foo" "dimension(1, size(a, b))"))
    ((f90-parse-names-list "a=1, B=>null()") ("a" "b"))))
-   
+
 (deftest all ()
   (test-combine-results
    (test-run-test 'type-modifiers)
diff --git a/packages/fsm/fsm.el b/packages/fsm/fsm.el
index 42dda15..4ea57c0 100644
--- a/packages/fsm/fsm.el
+++ b/packages/fsm/fsm.el
@@ -4,7 +4,7 @@
 
 ;; Author: Magnus Henoch <address@hidden>
 ;; Maintainer: Thomas Fitzsimmons <address@hidden>
-;; Version: 0.2
+;; Version: 0.2.1
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: extensions
 
@@ -186,9 +186,10 @@ arguments.
               (put fsm :name ',name)
               (put fsm :state nil)
               (put fsm :state-data nil)
-              (put fsm :sleep ,(or sleep (lambda (secs)
-                                           (accept-process-output
-                                            nil secs))))
+              (put fsm :sleep ,(or sleep '(lambda (secs)
+                                            (accept-process-output
+                                             nil secs))))
+
               (put fsm :deferred nil)
               (fsm-update fsm state state-data timeout)
               fsm)))))))
diff --git a/packages/ggtags/ggtags.el b/packages/ggtags/ggtags.el
index 08fb4c8..aefe3af 100644
--- a/packages/ggtags/ggtags.el
+++ b/packages/ggtags/ggtags.el
@@ -334,7 +334,7 @@ Nil means using the value of `completing-read-function'."
 
 (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 to nil to disable tag highlighting."
   :set (lambda (sym value)
          (when (fboundp 'ggtags-setup-highlight-tag-at-point)
            (ggtags-setup-highlight-tag-at-point value))
diff --git a/packages/gnome-c-style/gnome-c-snippet.el 
b/packages/gnome-c-style/gnome-c-snippet.el
index 95c5f6d..469ccf6 100644
--- a/packages/gnome-c-style/gnome-c-snippet.el
+++ b/packages/gnome-c-style/gnome-c-snippet.el
@@ -436,7 +436,7 @@ G_DEFINE_" (if abstract "ABSTRACT_" "") "TYPE" (if code 
"WITH_CODE" "") " (" (gn
                                            t))
 
 (defun gnome-c-snippet-insert-constructor (package class)
-  "Insert 'constructor' vfunc of GObjectClass for PACKAGE and 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 "\
@@ -463,7 +463,7 @@ GObjectConstructParam *construct_properties)\n")
     (indent-region body-start (point))))
 
 (defun gnome-c-snippet-insert-set_property (package class)
-  "Insert 'set_property' vfunc of GObjectClass for PACKAGE and 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 "\
@@ -496,7 +496,7 @@ GParamSpec *pspec)\n")
     (indent-region body-start (point))))
 
 (defun gnome-c-snippet-insert-get_property (package class)
-  "Insert 'get_property' vfunc of GObjectClass for PACKAGE and 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 "\
@@ -529,7 +529,7 @@ GParamSpec *pspec)\n")
     (indent-region body-start (point))))
 
 (defun gnome-c-snippet-insert-dispose (package class)
-  "Insert 'dispose' vfunc of GObjectClass for PACKAGE and CLASS."
+  "Insert `dispose' vfunc of GObjectClass for PACKAGE and CLASS."
   (interactive (gnome-c-snippet--read-package-and-class nil))
   (let (body-start)
     (insert "\
@@ -546,7 +546,7 @@ static void
     (indent-region body-start (point))))
 
 (defun gnome-c-snippet-insert-finalize (package class)
-  "Insert 'finalize' vfunc of GObjectClass for PACKAGE and CLASS."
+  "Insert `finalize' vfunc of GObjectClass for PACKAGE and CLASS."
   (interactive (gnome-c-snippet--read-package-and-class nil))
   (let (body-start)
     (insert "\
@@ -563,7 +563,7 @@ static void
     (indent-region body-start (point))))
 
 (defun gnome-c-snippet-insert-dispatch_properties_changed (package class)
-  "Insert 'dispatch_properties_changed vfunc of GObjectClass for
+  "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)
@@ -591,7 +591,7 @@ GParamSpec **pspecs)\n")
     (indent-region body-start (point))))
 
 (defun gnome-c-snippet-insert-notify (package class)
-  "Insert 'notify' vfunc of GObjectClass for PACKAGE and 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 "\
@@ -616,7 +616,7 @@ GParamSpec *pspec)\n")
     (indent-region body-start (point))))
 
 (defun gnome-c-snippet-insert-constructed (package class)
-  "Insert 'constructed' vfunc of GObjectClass for PACKAGE and CLASS."
+  "Insert `constructed' vfunc of GObjectClass for PACKAGE and CLASS."
   (interactive (gnome-c-snippet--read-package-and-class nil))
   (let (body-start)
     (insert "\
@@ -633,7 +633,7 @@ static void
     (indent-region body-start (point))))
 
 (defun gnome-c-snippet-insert-class-init (package class)
-  "Insert '_class_init' function for PACKAGE and CLASS."
+  "Insert `_class_init' function for PACKAGE and CLASS."
   (interactive (gnome-c-snippet--read-package-and-class nil))
   (insert "\
 static void
@@ -643,7 +643,7 @@ static void
 "))
 
 (defun gnome-c-snippet-insert-init (package class)
-  "Insert '_init' function for PACKAGE and CLASS."
+  "Insert `_init' function for PACKAGE and CLASS."
   (interactive (gnome-c-snippet--read-package-and-class nil))
   (insert "\
 static void
diff --git a/packages/gnorb/gnorb-bbdb.el b/packages/gnorb/gnorb-bbdb.el
index 306ea01..6603a5e 100644
--- a/packages/gnorb/gnorb-bbdb.el
+++ b/packages/gnorb/gnorb-bbdb.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2014  Free Software Foundation, Inc.
 
 ;; Author: Eric Abrahamsen <address@hidden>
-;; Keywords: 
+;; 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
@@ -20,7 +20,7 @@
 
 ;;; Commentary:
 
-;; 
+;;
 
 ;;; Code:
 
@@ -66,7 +66,7 @@ Setting it to the symbol seen will collect the messages most
 recently opened and viewed. The symbol received means gnorb will
 collect the most recent messages by Date header.
 
-In other words, if this variable is set to 'received, and a
+In other words, if this variable is set to `received', and a
 record's messages field is already full of recently-received
 messages, opening a five-year-old message (for instance) from
 this record will not push a link to the message into the field."
@@ -89,9 +89,9 @@ mentioned in the docstring of `format-time-string', which 
see."
 (defcustom gnorb-bbdb-message-link-format-one "%:count"
   "How a single message is formatted in the list of recent messages.
 This format string is used in single-line display -- note that by
-default, no user-created xfields are displayed in the 'one-line
+default, no user-created xfields are displayed in the `one-line'
 layout found in `bbdb-layout-alist'. If you want this field to
-appear there, put its name in the \"order\" list of the 'one-line
+appear there, put its name in the \"order\" list of the `one-line'
 layout.
 
 Available information for each message includes the subject, the
diff --git a/packages/gnorb/gnorb-registry.el b/packages/gnorb/gnorb-registry.el
index 9220565..565e54e 100644
--- a/packages/gnorb/gnorb-registry.el
+++ b/packages/gnorb/gnorb-registry.el
@@ -80,7 +80,7 @@ sent. Save the relevant Org ids in the 'gnorb-ids key."
 
 (defun gnorb-registry-capture ()
   "When capturing from a Gnus message, add our new Org heading id
-to the message's registry entry, under the 'gnorb-ids key."
+to the message's registry entry, under the `gnorb-ids' key."
   (when (and (with-current-buffer
                 (org-capture-get :original-buffer)
               (memq major-mode '(gnus-summary-mode gnus-article-mode)))
@@ -139,7 +139,7 @@ even for headings that appear to no longer exist."
 (defun gnorb-delete-association (msg-id org-id)
   "Disassociate a message and a headline.
 
-This removes an Org heading's ORG-ID from the 'gnorb-ids key of
+This removes an Org heading's ORG-ID from the `gnorb-ids' key of
 the MSG-ID."
   (let ((org-ids (gnus-registry-get-id-key msg-id 'gnorb-ids)))
     (when (member org-id org-ids)
@@ -194,12 +194,12 @@ archived headings as well."
             deleted-count)))
 
 (defun gnorb-registry-org-id-search (id)
-  "Find all messages that have the org ID in their 'gnorb-ids
+  "Find all messages that have the org ID in their `gnorb-ids'
 key."
   (registry-search gnus-registry-db :member `((gnorb-ids ,id))))
 
 (defun gnorb-registry-tracked-messages ()
-  "Return all message-ids that have non-empty 'gnorb-ids keys."
+  "Return all message-ids that have non-empty `gnorb-ids' keys."
   (registry-search gnus-registry-db :regex `((gnorb-ids ".+"))))
 
 (defun gnorb-registry-tracked-headings ()
diff --git a/packages/gnorb/gnorb-utils.el b/packages/gnorb/gnorb-utils.el
index 4d473f1..dcf2898 100644
--- a/packages/gnorb/gnorb-utils.el
+++ b/packages/gnorb/gnorb-utils.el
@@ -359,8 +359,8 @@ If the KW argument is true, add the TODO keyword into the 
path."
 (defun gnorb-scan-links (bound &rest types)
   "Scan from point to BOUND looking for links of type in TYPES.
 
-TYPES is a list of symbols, possible values include 'bbdb, 'mail,
-and 'gnus."
+TYPES is a list of symbols, possible values include `bbdb', `mail',
+and `gnus'."
   ;; this function could be refactored somewhat -- lots of code
   ;; repetition. It also should be a little faster for when we're
   ;; scanning for gnus links only, that's a little slow. We should
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index c25cee3..097f859 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -301,7 +301,7 @@ you may never really understand to any degree of personal 
satisfaction\".
  :diamond -- the part of the subprocess name after \"gnugo\", may be \"\"
 
  :game-over -- nil until game over at which time its value is set to
-               the alist `((live GROUP ...) (dead GROUP ...))'
+               the alist ((live GROUP ...) (dead GROUP ...))
 
  :sgf-collection -- after a `loadsgf' command, entire parse tree of file,
                     a simple list of one or more gametrees, updated in
@@ -826,7 +826,7 @@ when you are sure the command cannot fail."
 Optional arg RSEL controls side effects and return value.
 If nil, display the history in the echo area as \"(N moves)\"
 followed by the space-separated list of moves.  When called
-interactively with a prefix arg (i.e., RSEL is `(4)'), display
+interactively with a prefix arg (i.e., RSEL is (4)), display
 similarly, but suffix with the mover (either \":B\" or \":W\").
 RSEL may also be a symbol that selects what to return:
  car  -- the most-recent move
diff --git a/packages/hydra/.elpaignore b/packages/hydra/.elpaignore
new file mode 100644
index 0000000..a6b1577
--- /dev/null
+++ b/packages/hydra/.elpaignore
@@ -0,0 +1,6 @@
+targets/
+.travis.yml
+.dir-locals.el
+Makefile
+README.md
+hydra-test.el
diff --git a/packages/hydra/hydra-examples.el b/packages/hydra/hydra-examples.el
index 1468f3f..9264feb 100644
--- a/packages/hydra/hydra-examples.el
+++ b/packages/hydra/hydra-examples.el
@@ -260,6 +260,7 @@ _v_ariable       _u_ser-option
 ;; (global-set-key (kbd "C-c h") 'hydra-apropos/body)
 
 ;;** Example 11: rectangle-mark-mode
+(require 'rect)
 (defhydra hydra-rectangle (:body-pre (rectangle-mark-mode 1)
                            :color pink
                            :post (deactivate-mark))
@@ -270,10 +271,10 @@ _h_   _l_   _o_k        _y_ank
 ^^^^        _e_xchange  _u_ndo
 ^^^^        ^ ^         _p_aste
 "
-  ("h" backward-char nil)
-  ("l" forward-char nil)
-  ("k" previous-line nil)
-  ("j" next-line nil)
+  ("h" rectangle-backward-char nil)
+  ("l" rectangle-forward-char nil)
+  ("k" rectangle-previous-line nil)
+  ("j" rectangle-next-line nil)
   ("e" hydra-ex-point-mark nil)
   ("n" copy-rectangle-as-kill nil)
   ("d" delete-rectangle nil)
@@ -329,7 +330,7 @@ _h_   _l_   _o_k        _y_ank
   "Exchange point and mark."
   (interactive)
   (if rectangle-mark-mode
-      (exchange-point-and-mark)
+      (rectangle-exchange-point-and-mark)
     (let ((mk (mark)))
       (rectangle-mark-mode 1)
       (goto-char mk))))
diff --git a/packages/hydra/hydra-test.el b/packages/hydra/hydra-test.el
index a40a0ca..a988a25 100644
--- a/packages/hydra/hydra-test.el
+++ b/packages/hydra/hydra-test.el
@@ -336,7 +336,7 @@ The body can be accessed via `hydra-error/body'."
 \"t\":    `toggle-truncate-lines',
 \"f\":    `auto-fill-mode',
 \"a\":    `abbrev-mode',
-\"q\":    `nil'
+\"q\":    nil
 
 The body can be accessed via `hydra-toggle/body'.
 
@@ -358,7 +358,7 @@ Call the head: `toggle-truncate-lines'."
 \"t\":    `toggle-truncate-lines',
 \"f\":    `auto-fill-mode',
 \"a\":    `abbrev-mode',
-\"q\":    `nil'
+\"q\":    nil
 
 The body can be accessed via `hydra-toggle/body'.
 
@@ -379,7 +379,7 @@ Call the head: `auto-fill-mode'."
 \"t\":    `toggle-truncate-lines',
 \"f\":    `auto-fill-mode',
 \"a\":    `abbrev-mode',
-\"q\":    `nil'
+\"q\":    nil
 
 The body can be accessed via `hydra-toggle/body'.
 
@@ -400,11 +400,11 @@ Call the head: `abbrev-mode'."
 \"t\":    `toggle-truncate-lines',
 \"f\":    `auto-fill-mode',
 \"a\":    `abbrev-mode',
-\"q\":    `nil'
+\"q\":    nil
 
 The body can be accessed via `hydra-toggle/body'.
 
-Call the head: `nil'."
+Call the head: nil."
         (interactive)
         (hydra-default-pre)
         (hydra-keyboard-quit)
@@ -416,7 +416,7 @@ Call the head: `nil'."
 \"t\":    `toggle-truncate-lines',
 \"f\":    `auto-fill-mode',
 \"a\":    `abbrev-mode',
-\"q\":    `nil'
+\"q\":    nil
 
 The body can be accessed via `hydra-toggle/body'."
         (interactive)
@@ -510,7 +510,7 @@ The body can be accessed via `hydra-toggle/body'."
 
 \"j\":    `next-line',
 \"k\":    `previous-line',
-\"q\":    `nil'
+\"q\":    nil
 
 The body can be accessed via `hydra-vi/body'.
 
@@ -547,7 +547,7 @@ Call the head: `next-line'."
 
 \"j\":    `next-line',
 \"k\":    `previous-line',
-\"q\":    `nil'
+\"q\":    nil
 
 The body can be accessed via `hydra-vi/body'.
 
@@ -584,11 +584,11 @@ Call the head: `previous-line'."
 
 \"j\":    `next-line',
 \"k\":    `previous-line',
-\"q\":    `nil'
+\"q\":    nil
 
 The body can be accessed via `hydra-vi/body'.
 
-Call the head: `nil'."
+Call the head: nil."
         (interactive)
         (hydra-default-pre)
         (set-cursor-color "#e52b50")
@@ -600,7 +600,7 @@ Call the head: `nil'."
 
 \"j\":    `next-line',
 \"k\":    `previous-line',
-\"q\":    `nil'
+\"q\":    nil
 
 The body can be accessed via `hydra-vi/body'."
         (interactive)
diff --git a/packages/hydra/hydra.el b/packages/hydra/hydra.el
index 1516c85..8c6ce7f 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.4
+;; Version: 0.13.5
 ;; Keywords: bindings
 ;; Package-Requires: ((cl-lib "0.5"))
 
@@ -141,11 +141,12 @@ warn: keep KEYMAP and issue a warning instead of running 
the command."
   "Disable the current Hydra."
   (setq hydra-deactivate nil)
   (remove-hook 'pre-command-hook 'hydra--clearfun)
-  (if (fboundp 'remove-function)
-      (remove-function input-method-function #'hydra--imf)
-    (when hydra--input-method-function
-      (setq input-method-function hydra--input-method-function)
-      (setq hydra--input-method-function nil)))
+  (unless hydra--ignore
+    (if (fboundp 'remove-function)
+        (remove-function input-method-function #'hydra--imf)
+      (when hydra--input-method-function
+        (setq input-method-function hydra--input-method-function)
+        (setq hydra--input-method-function nil))))
   (dolist (frame (frame-list))
     (with-selected-frame frame
       (when overriding-terminal-local-map
@@ -585,7 +586,7 @@ The expressions can be auto-expanded according to NAME."
         offset)
     (while (setq start
                  (string-match
-                  "\\(?:%\\( 
?-?[0-9]*s?\\)\\(`[a-z-A-Z/0-9]+\\|(\\)\\)\\|\\(?:_\\( 
?-?[0-9]*?\\)\\(\\[\\|]\\|[-[:alnum:] ~.,;:/|?<>address@hidden&]+?\\)_\\)"
+                  "\\(?:%\\( 
?-?[0-9]*s?\\)\\(`[a-z-A-Z/0-9]+\\|(\\)\\)\\|\\(?:_\\( 
?-?[0-9]*?\\)\\(\\[\\|]\\|[-[:alnum:] ~.,;:/|?<>address@hidden&^]+?\\)_\\)"
                   docstring start))
       (cond ((eq ?_ (aref (match-string 0 docstring) 0))
              (let* ((key (match-string 4 docstring))
@@ -600,7 +601,7 @@ The expressions can be auto-expanded according to NAME."
                              hydra-key-format-spec
                              (concat "%" (match-string 3 docstring) "s"))
                             t nil docstring)))
-                 (error "Unrecognized key: _%s_" key))))
+                 (warn "Unrecognized key: _%s_" key))))
 
             (t
              (let* ((varp (if (eq ?` (aref (match-string 2 docstring) 0)) 1 0))
diff --git a/packages/hydra/lv.el b/packages/hydra/lv.el
index 8d6192f..23d2c30 100644
--- a/packages/hydra/lv.el
+++ b/packages/hydra/lv.el
@@ -98,7 +98,7 @@ Only the background color is significant."
           (insert
            (propertize "__" 'face 'lv-separator 'display '(space :height (1)))
            (propertize "\n" 'face 'lv-separator 'line-height t)))
-        (setq-local window-min-height n-lines)
+        (set (make-local-variable 'window-min-height) n-lines)
         (setq truncate-lines (> n-lines 1))
         (let ((window-resize-pixelwise t)
               (window-size-fixed nil))
diff --git a/packages/ioccur/ioccur.el b/packages/ioccur/ioccur.el
index aa2b23d..e917e04 100644
--- a/packages/ioccur/ioccur.el
+++ b/packages/ioccur/ioccur.el
@@ -11,12 +11,12 @@
 ;; modify it under the terms of the GNU General Public License as
 ;; published by the Free Software Foundation; either version 3, 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/>.
 
@@ -141,12 +141,12 @@ it slow down the start of ioccur at first time on large 
buffers."
   :type 'boolean)
 
 (defcustom ioccur-case-fold-search 'smart
-  "Add 'smart' option to `case-fold-search'.
+  "Add smart option to `case-fold-search'.
 When smart is enabled, Ignore case in the search strings
 if pattern contains no uppercase characters.
 Otherwise, with a nil or t value, the behavior is same as
 `case-fold-search'.
-Default value is smart, other possible values are nil and t."
+Default value is `smart', other possible values are nil and t."
   :group 'ioccur
   :type 'symbol)
 
@@ -343,7 +343,7 @@ If ALL is non--nil highlight the whole string STR."
         (if all
             (add-text-properties
              (point) (point-at-eol)
-             '(face ioccur-match-face))  
+             '(face ioccur-match-face))
             (while (and (funcall ioccur-search-function ioccur-pattern nil t)
                         ;; Don't try to highlight line with a length <= 0.
                         (> (- (match-end 0) (match-beginning 0)) 0))
@@ -758,7 +758,7 @@ START-POINT is the point where we start searching in 
buffer."
                                           cur-str
                                           (propertize "|" 'face 
'ioccur-cursor))))
                          (substring str (1+ real-index)))))))
-      
+
       ;; Start incremental loop.
       (while (let ((char (ioccur-read-char-or-event
                           (concat prompt (set-cursor ioccur-pattern index)))))
@@ -797,7 +797,7 @@ START-POINT is the point where we start searching in 
buffer."
                  ((right ?\C-z)                 ; Persistent action.
                   (ioccur-jump-without-quit) t)
                  ((?\C- )                       ; Persistent action save mark.
-                  (ioccur-jump-without-quit t) t)                 
+                  (ioccur-jump-without-quit t) t)
                  ((left ?\C-j)                  ; Jump and kill search buffer.
                   (setq ioccur-exit-and-quit-p t) nil)
                  ((next ?\C-v)                  ; Scroll down.
@@ -992,7 +992,7 @@ Special NOTE for terms:
   tab/S-tab are bound to history.
   C-d/u are for following in other buffer.
   Use C-t to Scroll up.
- 
+
 When you quit incremental search with RET, see `ioccur-mode'
 for commands provided in the `ioccur-buffer'."
   (interactive "P")
@@ -1108,7 +1108,7 @@ of matched line in `ioccur-current-buffer'."
             (make-overlay (point-at-bol) (1+ (point-at-eol)))))
   (overlay-put ioccur-match-overlay 'face 'ioccur-match-overlay-face))
 
-            
+
 (provide 'ioccur)
 
 ;;; ioccur.el ends here
diff --git a/packages/iterators/iterators.el b/packages/iterators/iterators.el
index d9cb96b..b10e671 100644
--- a/packages/iterators/iterators.el
+++ b/packages/iterators/iterators.el
@@ -206,7 +206,7 @@ elements s_1, s_2, ... of the iterator returned by
 
 as long as i_n exists.
 
-Example: (iterator-scan #'* 1 (iterator-number-range 1))
+Example: (iterator-scan #\\='* 1 (iterator-number-range 1))
 returns an iterator of the factorials."
   (let ((res init))
     (iterator--cons
diff --git a/packages/ivy/.dir-locals.el b/packages/ivy/.dir-locals.el
new file mode 100644
index 0000000..3bcda92
--- /dev/null
+++ b/packages/ivy/.dir-locals.el
@@ -0,0 +1,5 @@
+;;; Directory Local Variables
+;;; For more information see (info "(emacs) Directory Variables")
+
+((emacs-lisp-mode
+  (indent-tabs-mode . nil)))
diff --git a/packages/swiper/.travis.yml b/packages/ivy/.travis.yml
similarity index 100%
rename from packages/swiper/.travis.yml
rename to packages/ivy/.travis.yml
diff --git a/packages/ivy/Makefile b/packages/ivy/Makefile
new file mode 100644
index 0000000..c362e30
--- /dev/null
+++ b/packages/ivy/Makefile
@@ -0,0 +1,16 @@
+emacs ?= emacs
+
+LOAD = -l colir.el -l ivy.el -l swiper.el -l counsel.el
+
+.PHONY: all compile clean
+
+all: test
+
+test:
+       $(emacs) -batch $(LOAD) -l ivy-test.el -f ert-run-tests-batch-and-exit
+
+compile:
+       $(emacs) -batch --eval "(progn (add-to-list 'load-path 
default-directory) (mapc #'byte-compile-file '(\"ivy.el\" \"swiper.el\" 
\"counsel.el\")))"
+
+clean:
+       rm -f *.elc
diff --git a/packages/ivy/README.md b/packages/ivy/README.md
new file mode 100644
index 0000000..3348189
--- /dev/null
+++ b/packages/ivy/README.md
@@ -0,0 +1,82 @@
+[![Build 
Status](https://travis-ci.org/abo-abo/swiper.svg?branch=master)](https://travis-ci.org/abo-abo/swiper)
 
[![MELPA](https://melpa.org/packages/swiper-badge.svg)](https://melpa.org/#/swiper)
+
+## Swiper
+
+Package for GNU Emacs that shows an overview during regex searching.
+
+![swiper.png](http://oremacs.com/download/swiper.png)
+
+The package uses the `ivy` back end for the overview, see also
+[swiper-helm](https://github.com/abo-abo/swiper-helm).
+
+## Screenshots
+
+![ivy-swiper-1.png](http://oremacs.com/download/ivy-swiper-1.png)
+
+There's also a ten minute [video 
demo](https://www.youtube.com/watch?v=VvnJQpTFVDc).
+
+## Ivy
+
+Ivy is a generic completion mechanism for Emacs. While it operates
+similarly to other completion schemes such as `icomplete-mode`, Ivy
+aims to be more efficient, smaller, simpler, and smoother to use yet
+highly customizable.
+
+To try Ivy, just call <kbd>M-x</kbd> `ivy-mode`. This will enable
+generic Ivy completion, including specific completion for file and
+buffer names.
+
+## Installation
+
+Install the `swiper` package from MELPA / GNU ELPA.
+
+## Documentation
+
+### Manual
+The manual is available as [HTML](http://oremacs.com/swiper/).
+
+After installing from MELPA, the manual is also available through the `(ivy)` 
Info node.
+
+The source file for the Info page is
+[here](https://github.com/abo-abo/swiper/blob/master/doc/ivy.org).
+
+### Wiki
+Ivy and Swiper wiki is here: [the 
wiki](https://github.com/abo-abo/swiper/wiki).
+
+### Small config example
+```elisp
+(ivy-mode 1)
+(setq ivy-use-virtual-buffers t)
+(global-set-key "\C-s" 'swiper)
+(global-set-key (kbd "C-c C-r") '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)
+(define-key read-expression-map (kbd "C-r") 'counsel-expression-history)
+```
+
+## Contributing
+
+### Copyright Assignment
+
+Swiper is subject to the same [copyright 
assignment](http://www.gnu.org/prep/maintain/html_node/Copyright-Papers.html) 
policy as Emacs itself, org-mode, CEDET and other packages in [GNU 
ELPA](http://elpa.gnu.org/packages/). Any [legally 
significant](http://www.gnu.org/prep/maintain/html_node/Legally-Significant.html#Legally-Significant)
 contributions can only be accepted after the author has completed their 
paperwork. Please see [the request 
form](http://git.savannah.gnu.org/cgit/gnulib. [...]
+
+The copyright assignment isn't a big deal, it just says that the copyright for 
your submitted changes to Emacs belongs to the FSF. This assignment works for 
all projects related to Emacs. To obtain it, you need to send one email, then 
send one letter (if you live in the US, it's digital), and wait for some time 
(in my case, I had to wait for one month).
+
+### Style
+
+The basic code style guide is to use `(setq indent-tabs-mode nil)`. It is 
provided for you in 
[.dir-locals.el](https://github.com/abo-abo/swiper/blob/master/.dir-locals.el), 
please obey it.
+
+Before submitting the change, run `make compile` and `make test` to make sure 
that it doesn't introduce new compile warnings or test failures. Also run 
<kbd>M-x</kbd> `checkdoc` to see that your changes obey the documentation 
guidelines.
+
+Use your own judgment for the commit messages, I recommend a verbose style 
using `magit-commit-add-log`.
diff --git a/packages/swiper/colir.el b/packages/ivy/colir.el
similarity index 97%
rename from packages/swiper/colir.el
rename to packages/ivy/colir.el
index e11ef7d..792033f 100644
--- a/packages/swiper/colir.el
+++ b/packages/ivy/colir.el
@@ -77,11 +77,11 @@ Optional argument OBJECT is the string or buffer containing 
the text.
 See also `font-lock-append-text-property'."
   (let (next prev)
     (while (/= start end)
-      (setq next (next-single-property-change start 'face object end)
-            prev (get-text-property start 'face object))
+      (setq next (next-single-property-change start 'face object end))
+      (setq prev (get-text-property start 'face object))
       (when (listp prev)
         (setq prev (cl-find-if #'atom prev)))
-      (if prev
+      (if (facep prev)
           (let ((background-prev (face-background prev)))
             (progn
               (put-text-property
diff --git a/packages/ivy/counsel.el b/packages/ivy/counsel.el
new file mode 100644
index 0000000..50f5f15
--- /dev/null
+++ b/packages/ivy/counsel.el
@@ -0,0 +1,2131 @@
+;;; counsel.el --- Various completion functions using Ivy -*- lexical-binding: 
t -*-
+
+;; Copyright (C) 2015  Free Software Foundation, Inc.
+
+;; Author: Oleh Krehel <address@hidden>
+;; URL: https://github.com/abo-abo/swiper
+;; Version: 0.8.0
+;; Package-Requires: ((emacs "24.1") (swiper "0.8.0"))
+;; Keywords: completion, matching
+
+;; This file is part of GNU Emacs.
+
+;; This file 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, 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.
+
+;; For a full copy of the GNU General Public License
+;; see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;
+;; Just call one of the interactive functions in this file to complete
+;; the corresponding thing using `ivy'.
+;;
+;; Currently available: Elisp symbols, Clojure symbols, Git files.
+
+;;; Code:
+
+(require 'swiper)
+(require 'etags)
+(require 'esh-util)
+
+;;* Utility
+(defun counsel-more-chars (n)
+  "Return two fake candidates prompting for at least N input."
+  (list ""
+        (format "%d chars more" (- n (length ivy-text)))))
+
+(defun counsel-unquote-regex-parens (str)
+  (let ((start 0)
+        ms)
+    (while (setq start (string-match "\\\\)\\|\\\\(\\|[()]" str start))
+      (setq ms (match-string-no-properties 0 str))
+      (cond ((equal ms "\\(")
+             (setq str (replace-match "(" nil t str))
+             (setq start (+ start 1)))
+            ((equal ms "\\)")
+             (setq str (replace-match ")" nil t str))
+             (setq start (+ start 1)))
+            ((equal ms "(")
+             (setq str (replace-match "\\(" nil t str))
+             (setq start (+ start 2)))
+            ((equal ms ")")
+             (setq str (replace-match "\\)" nil t str))
+             (setq start (+ start 2)))
+            (t
+             (error "unexpected"))))
+    str))
+
+(defun counsel-directory-parent (dir)
+  "Return the directory parent of directory DIR."
+  (concat (file-name-nondirectory
+           (directory-file-name dir)) "/"))
+
+(defun counsel-string-compose (prefix str)
+  "Make PREFIX the display prefix of STR though text properties."
+  (let ((str (copy-sequence str)))
+    (put-text-property
+     0 1 'display
+     (concat prefix (substring str 0 1))
+     str)
+    str))
+
+;;* Async Utility
+(defvar counsel--async-time nil
+  "Store the time when a new process was started.
+Or the time of the last minibuffer update.")
+
+(defvar counsel--async-start nil
+  "Store the time when a new process was started.
+Or the time of the last minibuffer update.")
+
+(defvar counsel--async-duration nil
+  "Store the time in seconds between starting a process and
+  receiving all candidates.")
+
+(defvar counsel--async-exit-code-plist nil
+  "Associates exit codes with reasons.")
+
+(defun counsel-set-async-exit-code (cmd number str)
+  "For CMD, associate NUMBER exit code with STR."
+  (let ((plist (plist-get counsel--async-exit-code-plist cmd)))
+    (setq counsel--async-exit-code-plist
+          (plist-put
+           counsel--async-exit-code-plist
+           cmd
+           (plist-put plist number str)))))
+
+(defvar counsel-async-split-string-re "\n"
+  "Store the regexp for splitting shell command output.")
+
+(defun counsel--async-command (cmd &optional process-sentinel process-filter)
+  (let* ((counsel--process " *counsel*")
+         (proc (get-process counsel--process))
+         (buff (get-buffer counsel--process)))
+    (when proc
+      (delete-process proc))
+    (when buff
+      (kill-buffer buff))
+    (setq proc (start-process-shell-command
+                counsel--process
+                counsel--process
+                cmd))
+    (setq counsel--async-start
+          (setq counsel--async-time (current-time)))
+    (set-process-sentinel proc (or process-sentinel #'counsel--async-sentinel))
+    (set-process-filter proc (or process-filter #'counsel--async-filter))))
+
+(defvar counsel-grep-last-line nil)
+
+(defun counsel--async-sentinel (process event)
+  (let ((cands
+         (cond ((string= event "finished\n")
+                (with-current-buffer (process-buffer process)
+                  (split-string
+                   (buffer-string)
+                   counsel-async-split-string-re
+                   t)))
+               ((string-match "exited abnormally with code \\([0-9]+\\)\n" 
event)
+                (let* ((exit-code-plist (plist-get 
counsel--async-exit-code-plist
+                                                   (ivy-state-caller 
ivy-last)))
+                       (exit-num (read (match-string 1 event)))
+                       (exit-code (plist-get exit-code-plist exit-num)))
+                  (list
+                   (or exit-code
+                       (format "error code %d" exit-num))))))))
+    (cond ((string= event "finished\n")
+           (ivy--set-candidates
+            (ivy--sort-maybe
+             cands))
+           (setq counsel-grep-last-line nil)
+           (when counsel--async-start
+             (setq counsel--async-duration
+                   (time-to-seconds (time-since counsel--async-start))))
+           (let ((re (funcall ivy--regex-function ivy-text)))
+             (unless (stringp re)
+               (setq re (caar re)))
+             (if (null ivy--old-cands)
+                 (unless (setq ivy--index (ivy--preselect-index
+                                           (ivy-state-preselect ivy-last)
+                                           ivy--all-candidates))
+                   (ivy--recompute-index
+                    ivy-text re ivy--all-candidates))
+               (ivy--recompute-index
+                ivy-text re ivy--all-candidates)))
+           (setq ivy--old-cands ivy--all-candidates)
+           (if (null ivy--all-candidates)
+               (ivy--insert-minibuffer "")
+             (ivy--exhibit)))
+          ((string-match "exited abnormally with code \\([0-9]+\\)\n" event)
+           (setq ivy--all-candidates cands)
+           (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--set-candidates
+         (split-string
+          (buffer-string)
+          counsel-async-split-string-re
+          t)))
+      (let ((ivy--prompt (format
+                          (concat "%d++ " (ivy-state-prompt ivy-last))
+                          size)))
+        (ivy--insert-minibuffer
+         (ivy--format ivy--all-candidates)))
+      (setq counsel--async-time (current-time)))))
+
+(defcustom counsel-prompt-function 'counsel-prompt-function-default
+  "A function to return a full prompt string from a basic prompt string."
+  :type
+  '(choice
+    (const :tag "Plain" counsel-prompt-function-default)
+    (const :tag "Directory" counsel-prompt-function-dir)
+    (function :tag "Custom"))
+  :group 'ivy)
+
+(defun counsel-prompt-function-default (prompt)
+  "Return PROMPT appended with a semicolon."
+  (format "%s: " prompt))
+
+(defun counsel-delete-process ()
+  (let ((process (get-process " *counsel*")))
+    (when process
+      (delete-process process))))
+
+;;* Completion at point
+;;** `counsel-el'
+;;;###autoload
+(defun counsel-el ()
+  "Elisp completion at point."
+  (interactive)
+  (let* ((bnd (unless (and (looking-at ")")
+                           (eq (char-before) ?\())
+                (bounds-of-thing-at-point
+                 'symbol)))
+         (str (if bnd
+                  (buffer-substring-no-properties
+                   (car bnd)
+                   (cdr bnd))
+                ""))
+         (ivy-height 7)
+         (funp (eq (char-before (car bnd)) ?\())
+         symbol-names)
+    (if bnd
+        (progn
+          (setq ivy-completion-beg
+                (move-marker (make-marker) (car bnd)))
+          (setq ivy-completion-end
+                (move-marker (make-marker) (cdr bnd))))
+      (setq ivy-completion-beg nil)
+      (setq ivy-completion-end nil))
+    (if (string= str "")
+        (mapatoms
+         (lambda (x)
+           (when (symbolp x)
+             (push (symbol-name x) symbol-names))))
+      (setq symbol-names
+            (all-completions str obarray
+                             (and funp
+                                  (lambda (x)
+                                    (or (functionp x)
+                                        (macrop x)
+                                        (special-form-p x)))))))
+    (ivy-read "Symbol name: " symbol-names
+              :predicate (and funp #'functionp)
+              :initial-input str
+              :action #'ivy-completion-in-region-action)))
+
+;;** `counsel-cl'
+(declare-function slime-symbol-start-pos "ext:slime")
+(declare-function slime-symbol-end-pos "ext:slime")
+(declare-function slime-contextual-completions "ext:slime-c-p-c")
+
+;;;###autoload
+(defun counsel-cl ()
+  "Common Lisp completion at point."
+  (interactive)
+  (setq ivy-completion-beg (slime-symbol-start-pos))
+  (setq ivy-completion-end (slime-symbol-end-pos))
+  (ivy-read "Symbol name: "
+            (car (slime-contextual-completions
+                  ivy-completion-beg
+                  ivy-completion-end))
+            :action #'ivy-completion-in-region-action))
+
+;;** `counsel-jedi'
+(declare-function deferred:sync! "ext:deferred")
+(declare-function jedi:complete-request "ext:jedi-core")
+(declare-function jedi:ac-direct-matches "ext:jedi")
+
+(defun counsel-jedi ()
+  "Python completion at point."
+  (interactive)
+  (let ((bnd (bounds-of-thing-at-point 'symbol)))
+    (if bnd
+        (progn
+          (setq ivy-completion-beg (car bnd))
+          (setq ivy-completion-end (cdr bnd)))
+      (setq ivy-completion-beg nil)
+      (setq ivy-completion-end nil)))
+  (deferred:sync!
+      (jedi:complete-request))
+  (ivy-read "Symbol name: " (jedi:ac-direct-matches)
+            :action #'counsel--py-action))
+
+(defun counsel--py-action (symbol)
+  "Insert SYMBOL, erasing the previous one."
+  (when (stringp symbol)
+    (with-ivy-window
+      (when ivy-completion-beg
+        (delete-region
+         ivy-completion-beg
+         ivy-completion-end))
+      (setq ivy-completion-beg
+            (move-marker (make-marker) (point)))
+      (insert symbol)
+      (setq ivy-completion-end
+            (move-marker (make-marker) (point)))
+      (when (equal (get-text-property 0 'symbol symbol) "f")
+        (insert "()")
+        (setq ivy-completion-end
+              (move-marker (make-marker) (point)))
+        (backward-char 1)))))
+
+;;** `counsel-clj'
+(declare-function cider-sync-request:complete "ext:cider-client")
+(defun counsel--generic (completion-fn)
+  "Complete thing at point with COMPLETION-FN."
+  (let* ((bnd (or (bounds-of-thing-at-point 'symbol)
+                  (cons (point) (point))))
+         (str (buffer-substring-no-properties
+               (car bnd) (cdr bnd)))
+         (candidates (funcall completion-fn str))
+         (ivy-height 7)
+         (res (ivy-read (format "pattern (%s): " str)
+                        candidates)))
+    (when (stringp res)
+      (when bnd
+        (delete-region (car bnd) (cdr bnd)))
+      (insert res))))
+
+;;;###autoload
+(defun counsel-clj ()
+  "Clojure completion at point."
+  (interactive)
+  (counsel--generic
+   (lambda (str)
+     (mapcar
+      #'cl-caddr
+      (cider-sync-request:complete str ":same")))))
+
+;;** `counsel-unicode-char'
+(defvar counsel-unicode-char-history nil
+  "History for `counsel-unicode-char'.")
+
+;;;###autoload
+(defun counsel-unicode-char ()
+  "Insert a Unicode character at point."
+  (interactive)
+  (let ((minibuffer-allow-text-properties t))
+    (setq ivy-completion-beg (point))
+    (setq ivy-completion-end (point))
+    (ivy-read "Unicode name: "
+              (mapcar (lambda (x)
+                        (propertize
+                         (format "% -6X% -60s%c" (cdr x) (car x) (cdr x))
+                         'result (cdr x)))
+                      (ucs-names))
+              :action (lambda (char)
+                        (with-ivy-window
+                          (delete-region ivy-completion-beg ivy-completion-end)
+                          (setq ivy-completion-beg (point))
+                          (insert-char (get-text-property 0 'result char))
+                          (setq ivy-completion-end (point))))
+              :history 'counsel-unicode-char-history)))
+
+;;* Elisp symbols
+;;** `counsel-describe-variable'
+(defvar counsel-describe-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map (kbd "C-.") #'counsel-find-symbol)
+    (define-key map (kbd "C-,") #'counsel--info-lookup-symbol)
+    map))
+
+(ivy-set-actions
+ 'counsel-describe-variable
+ '(("i" counsel-info-lookup-symbol "info")
+   ("d" counsel--find-symbol "definition")))
+
+(defvar counsel-describe-symbol-history nil
+  "History for `counsel-describe-variable' and `counsel-describe-function'.")
+
+(defun counsel-find-symbol ()
+  "Jump to the definition of the current symbol."
+  (interactive)
+  (ivy-exit-with-action #'counsel--find-symbol))
+
+(defun counsel--info-lookup-symbol ()
+  "Lookup the current symbol in the info docs."
+  (interactive)
+  (ivy-exit-with-action #'counsel-info-lookup-symbol))
+
+(defun counsel--find-symbol (x)
+  "Find symbol definition that corresponds to string X."
+  (with-ivy-window
+    (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 ((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)))
+                 (find-library
+                  (prin1-to-string sym)))
+                (t
+                 (error "Couldn't fild definition of %s"
+                        sym))))))))
+
+(define-obsolete-function-alias 'counsel-symbol-at-point
+    'ivy-thing-at-point "0.7.0")
+
+(defun counsel-variable-list ()
+  "Return the list of all currently bound variables."
+  (let (cands)
+    (mapatoms
+     (lambda (vv)
+       (when (or (get vv 'variable-documentation)
+                 (and (boundp vv) (not (keywordp vv))))
+         (push (symbol-name vv) cands))))
+    cands))
+
+;;;###autoload
+(defun counsel-describe-variable ()
+  "Forward to `describe-variable'."
+  (interactive)
+  (let ((enable-recursive-minibuffers t))
+    (ivy-read
+     "Describe variable: "
+     (counsel-variable-list)
+     :keymap counsel-describe-map
+     :preselect (ivy-thing-at-point)
+     :history 'counsel-describe-symbol-history
+     :require-match t
+     :sort t
+     :action (lambda (x)
+               (describe-variable
+                (intern x)))
+     :caller 'counsel-describe-variable)))
+
+;;** `counsel-describe-function'
+(ivy-set-actions
+ 'counsel-describe-function
+ '(("i" counsel-info-lookup-symbol "info")
+   ("d" counsel--find-symbol "definition")))
+
+;;;###autoload
+(defun counsel-describe-function ()
+  "Forward to `describe-function'."
+  (interactive)
+  (let ((enable-recursive-minibuffers t))
+    (ivy-read "Describe function: "
+              (let (cands)
+                (mapatoms
+                 (lambda (x)
+                   (when (fboundp x)
+                     (push (symbol-name x) cands))))
+                cands)
+              :keymap counsel-describe-map
+              :preselect (ivy-thing-at-point)
+              :history 'counsel-describe-symbol-history
+              :require-match t
+              :sort t
+              :action (lambda (x)
+                        (describe-function
+                         (intern x)))
+              :caller 'counsel-describe-function)))
+
+;;** `counsel-info-lookup-symbol'
+(defvar info-lookup-mode)
+(declare-function info-lookup->completions "info-look")
+(declare-function info-lookup->mode-value "info-look")
+(declare-function info-lookup-select-mode "info-look")
+(declare-function info-lookup-change-mode "info-look")
+(declare-function info-lookup "info-look")
+
+;;;###autoload
+(defun counsel-info-lookup-symbol (symbol &optional mode)
+  "Forward to (`info-describe-symbol' SYMBOL MODE) with ivy completion."
+  (interactive
+   (progn
+     (require 'info-look)
+     (let* ((topic 'symbol)
+            (mode (cond (current-prefix-arg
+                         (info-lookup-change-mode topic))
+                        ((info-lookup->mode-value
+                          topic (info-lookup-select-mode))
+                         info-lookup-mode)
+                        ((info-lookup-change-mode topic))))
+            (completions (info-lookup->completions topic mode))
+            (enable-recursive-minibuffers t)
+            (value (ivy-read
+                    "Describe symbol: "
+                    (mapcar #'car completions)
+                    :sort t)))
+       (list value info-lookup-mode))))
+  (require 'info-look)
+  (info-lookup 'symbol symbol mode))
+
+;;** `counsel-M-x'
+(ivy-set-actions
+ 'counsel-M-x
+ '(("d" counsel--find-symbol "definition")
+   ("h" (lambda (x) (describe-function (intern x))) "help")))
+
+(ivy-set-display-transformer
+ 'counsel-M-x
+ 'counsel-M-x-transformer)
+
+(defun counsel-M-x-transformer (cmd)
+  "Return CMD appended with the corresponding binding in the current window."
+  (let ((binding (substitute-command-keys (format "\\[%s]" cmd))))
+    (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)))))
+
+(defvar smex-initialized-p)
+(defvar smex-ido-cache)
+(declare-function smex-initialize "ext:smex")
+(declare-function smex-detect-new-commands "ext:smex")
+(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'.
+Optional INITIAL-INPUT is the initial input in the minibuffer."
+  (interactive)
+  (unless initial-input
+    (setq initial-input (cdr (assoc this-command
+                                    ivy-initial-inputs-alist))))
+  (let* ((cands obarray)
+         (pred 'commandp)
+         (sort t))
+    (when (require 'smex nil 'noerror)
+      (unless smex-initialized-p
+        (smex-initialize))
+      (smex-detect-new-commands)
+      (smex-update)
+      (setq cands smex-ido-cache)
+      (setq pred nil)
+      (setq sort nil))
+    (ivy-read (counsel--M-x-prompt) cands
+              :predicate pred
+              :require-match t
+              :history 'extended-command-history
+              :action
+              (lambda (cmd)
+                (when (featurep 'smex)
+                  (smex-rank (intern cmd)))
+                (let ((prefix-arg current-prefix-arg)
+                      (this-command (intern cmd)))
+                  (command-execute (intern cmd) 'record)))
+              :sort sort
+              :keymap counsel-describe-map
+              :initial-input initial-input
+              :caller 'counsel-M-x)))
+
+;;** `counsel-load-library'
+;;;###autoload
+(defun counsel-load-library ()
+  "Load a selected the Emacs Lisp library.
+The libraries are offered from `load-path'."
+  (interactive)
+  (let ((dirs load-path)
+        (suffix (concat (regexp-opt '(".el" ".el.gz") t) "\\'"))
+        (cands (make-hash-table :test #'equal))
+        short-name
+        old-val
+        dir-parent
+        res)
+    (dolist (dir dirs)
+      (when (file-directory-p dir)
+        (dolist (file (file-name-all-completions "" dir))
+          (when (string-match suffix file)
+            (unless (string-match "pkg.elc?$" file)
+              (setq short-name (substring file 0 (match-beginning 0)))
+              (if (setq old-val (gethash short-name cands))
+                  (progn
+                    ;; assume going up directory once will resolve name clash
+                    (setq dir-parent (counsel-directory-parent (cdr old-val)))
+                    (puthash short-name
+                             (cons
+                              (counsel-string-compose dir-parent (car old-val))
+                              (cdr old-val))
+                             cands)
+                    (setq dir-parent (counsel-directory-parent dir))
+                    (puthash (concat dir-parent short-name)
+                             (cons
+                              (propertize
+                               (counsel-string-compose
+                                dir-parent short-name)
+                               'full-name (expand-file-name file dir))
+                              dir)
+                             cands))
+                (puthash short-name
+                         (cons (propertize
+                                short-name
+                                'full-name (expand-file-name file dir))
+                               dir) cands)))))))
+    (maphash (lambda (_k v) (push (car v) res)) cands)
+    (ivy-read "Load library: " (nreverse res)
+              :action (lambda (x)
+                        (load-library
+                         (get-text-property 0 'full-name x)))
+              :keymap counsel-describe-map)))
+
+;;** `counsel-load-theme'
+(declare-function powerline-reset "ext:powerline")
+
+(defun counsel-load-theme-action (x)
+  "Disable current themes and load theme X."
+  (condition-case nil
+      (progn
+        (mapc #'disable-theme custom-enabled-themes)
+        (load-theme (intern x))
+        (when (fboundp 'powerline-reset)
+          (powerline-reset)))
+    (error "Problem loading theme %s" x)))
+
+;;;###autoload
+(defun counsel-load-theme ()
+  "Forward to `load-theme'.
+Usable with `ivy-resume', `ivy-next-line-and-call' and
+`ivy-previous-line-and-call'."
+  (interactive)
+  (ivy-read "Load custom theme: "
+            (mapcar 'symbol-name
+                    (custom-available-themes))
+            :action #'counsel-load-theme-action
+            :caller 'counsel-load-theme))
+
+;;** `counsel-descbinds'
+(ivy-set-actions
+ 'counsel-descbinds
+ '(("d" counsel-descbinds-action-find "definition")
+   ("i" counsel-descbinds-action-info "info")))
+
+(defvar counsel-descbinds-history nil
+  "History for `counsel-descbinds'.")
+
+(defun counsel--descbinds-cands (&optional prefix buffer)
+  (let ((buffer (or buffer (current-buffer)))
+        (re-exclude (regexp-opt
+                     '("<vertical-line>" "<bottom-divider>" "<right-divider>"
+                       "<mode-line>" "<C-down-mouse-2>" "<left-fringe>"
+                       "<right-fringe>" "<header-line>"
+                       "<vertical-scroll-bar>" "<horizontal-scroll-bar>")))
+        res)
+    (with-temp-buffer
+      (let ((indent-tabs-mode t))
+        (describe-buffer-bindings buffer prefix))
+      (goto-char (point-min))
+      ;; Skip the "Key translations" section
+      (re-search-forward "")
+      (forward-char 1)
+      (while (not (eobp))
+        (when (looking-at "^\\([^\t\n]+\\)\t+\\(.*\\)$")
+          (let ((key (match-string 1))
+                (fun (match-string 2))
+                cmd)
+            (unless (or (member fun '("??" "self-insert-command"))
+                        (string-match re-exclude key)
+                        (not (or (commandp (setq cmd (intern-soft fun)))
+                                 (member fun '("Prefix Command")))))
+              (push
+               (cons (format
+                      "%-15s %s"
+                      (propertize key 'face 'font-lock-builtin-face)
+                      fun)
+                     (cons key cmd))
+               res))))
+        (forward-line 1)))
+    (nreverse res)))
+
+(defun counsel-descbinds-action-describe (x)
+  (let ((cmd (cdr x)))
+    (describe-function cmd)))
+
+(defun counsel-descbinds-action-find (x)
+  (let ((cmd (cdr x)))
+    (counsel--find-symbol (symbol-name cmd))))
+
+(defun counsel-descbinds-action-info (x)
+  (let ((cmd (cdr x)))
+    (counsel-info-lookup-symbol (symbol-name cmd))))
+
+;;;###autoload
+(defun counsel-descbinds (&optional prefix buffer)
+  "Show a list of all defined keys, and their definitions.
+Describe the selected candidate."
+  (interactive)
+  (ivy-read "Bindings: " (counsel--descbinds-cands prefix buffer)
+            :action #'counsel-descbinds-action-describe
+            :history 'counsel-descbinds-history
+            :caller 'counsel-descbinds))
+;;* Git
+;;** `counsel-git'
+(defvar counsel--git-dir nil
+  "Store the base git directory.")
+
+(ivy-set-actions
+ 'counsel-git
+ '(("j"
+    find-file-other-window
+    "other")))
+
+;;;###autoload
+(defun counsel-git ()
+  "Find file in the current Git repository."
+  (interactive)
+  (setq counsel--git-dir (expand-file-name
+                          (locate-dominating-file
+                           default-directory ".git")))
+  (let* ((default-directory counsel--git-dir)
+         (cands (split-string
+                 (shell-command-to-string
+                  "git ls-files --full-name --")
+                 "\n"
+                 t)))
+    (ivy-read (funcall counsel-prompt-function "Find file")
+              cands
+              :action #'counsel-git-action)))
+
+(defun counsel-git-action (x)
+  (with-ivy-window
+    (let ((default-directory counsel--git-dir))
+      (find-file x))))
+
+;;** `counsel-git-grep'
+(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)
+    (define-key map (kbd "C-c C-m") 'counsel-git-grep-switch-cmd)
+    map))
+
+(ivy-set-occur 'counsel-git-grep 'counsel-git-grep-occur)
+(ivy-set-display-transformer 'counsel-git-grep 'counsel-git-grep-transformer)
+
+(defvar counsel-git-grep-cmd "git --no-pager grep --full-name -n --no-color -i 
-e %S"
+  "Store the command for `counsel-git-grep'.")
+
+(defvar counsel--git-grep-dir nil
+  "Store the base git directory.")
+
+(defvar counsel--git-grep-count nil
+  "Store the line count in current repository.")
+
+(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.")
+
+(defun counsel-prompt-function-dir (prompt)
+  "Return PROMPT appended with the parent directory."
+  (let ((directory counsel--git-grep-dir))
+    (format "%s [%s]: "
+            prompt
+            (let ((dir-list (eshell-split-path directory)))
+              (if (> (length dir-list) 3)
+                  (apply #'concat
+                         (append '("...")
+                                 (cl-subseq dir-list (- (length dir-list) 3))))
+                directory)))))
+
+(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 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)
+        (counsel--gg-candidates (ivy--regex string))
+        nil))))
+
+(defun counsel-git-grep-action (x)
+  (when (string-match "\\`\\(.*?\\):\\([0-9]+\\):\\(.*\\)\\'" x)
+    (with-ivy-window
+      (let ((file-name (match-string-no-properties 1 x))
+            (line-number (match-string-no-properties 2 x)))
+        (find-file (expand-file-name file-name counsel--git-grep-dir))
+        (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-git-grep-matcher (regexp candidates)
+  (or (and (equal regexp ivy--old-re)
+           ivy--old-cands)
+      (prog1
+          (setq ivy--old-cands
+                (cl-remove-if-not
+                 (lambda (x)
+                   (ignore-errors
+                     (when (string-match "^[^:]+:[^:]+:" x)
+                       (setq x (substring x (match-end 0)))
+                       (if (stringp regexp)
+                           (string-match regexp x)
+                         (let ((res t))
+                           (dolist (re regexp)
+                             (setq res
+                                   (and res
+                                        (ignore-errors
+                                          (if (cdr re)
+                                              (string-match (car re) x)
+                                            (not (string-match (car re) 
x)))))))
+                           res)))))
+                 candidates))
+        (setq ivy--old-re regexp))))
+
+(defun counsel-git-grep-transformer (str)
+  "Higlight file and line number in STR."
+  (when (string-match "\\`\\([^:]+\\):\\([^:]+\\):" str)
+    (set-text-properties (match-beginning 1)
+                         (match-end 1)
+                         '(face compilation-info)
+                         str)
+    (set-text-properties (match-beginning 2)
+                         (match-end 2)
+                         '(face compilation-line-number)
+                         str))
+  str)
+
+;;;###autoload
+(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 "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)
+      (error "Not in a git repository")
+    (setq counsel--git-grep-count (counsel--gg-count "" t))
+    (ivy-read
+     (funcall counsel-prompt-function "git grep")
+     'counsel-git-grep-function
+     :initial-input initial-input
+     :matcher #'counsel-git-grep-matcher
+     :dynamic-collection (> counsel--git-grep-count 20000)
+     :keymap counsel-git-grep-map
+     :action #'counsel-git-grep-action
+     :unwind #'swiper--cleanup
+     :history 'counsel-git-grep-history
+     :caller 'counsel-git-grep)))
+
+(defun counsel-git-grep-switch-cmd ()
+  "Set `counsel-git-grep-cmd' to a different value."
+  (interactive)
+  (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))
+  (unless (ivy-state-dynamic-collection ivy-last)
+    (setq ivy--all-candidates
+          (all-completions "" 'counsel-git-grep-function))))
+
+(defvar counsel-gg-state nil
+  "The current state of candidates / count sync.")
+
+(defun counsel--gg-candidates (regex)
+  "Return git grep candidates for REGEX."
+  (setq counsel-gg-state -2)
+  (counsel--gg-count regex)
+  (let* ((default-directory counsel--git-grep-dir)
+         (counsel-gg-process " *counsel-gg*")
+         (proc (get-process counsel-gg-process))
+         (buff (get-buffer counsel-gg-process)))
+    (when proc
+      (delete-process proc))
+    (when buff
+      (kill-buffer buff))
+    (setq proc (start-process-shell-command
+                counsel-gg-process
+                counsel-gg-process
+                (concat
+                 (format counsel-git-grep-cmd regex)
+                 " | head -n 200")))
+    (set-process-sentinel
+     proc
+     #'counsel--gg-sentinel)))
+
+(defun counsel--gg-sentinel (process event)
+  (if (string= event "finished\n")
+      (progn
+        (with-current-buffer (process-buffer process)
+          (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)))
+    (if (string= event "exited abnormally with code 1\n")
+        (progn
+          (setq ivy--all-candidates '("Error"))
+          (setq ivy--old-cands ivy--all-candidates)
+          (ivy--exhibit)))))
+
+(defun counsel--gg-count (regex &optional no-async)
+  "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
+         (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))
+      (let ((proc (get-process counsel-ggc-process))
+            (buff (get-buffer counsel-ggc-process)))
+        (when proc
+          (delete-process proc))
+        (when buff
+          (kill-buffer buff))
+        (setq proc (start-process-shell-command
+                    counsel-ggc-process
+                    counsel-ggc-process
+                    cmd))
+        (set-process-sentinel
+         proc
+         #'(lambda (process event)
+             (when (string= event "finished\n")
+               (with-current-buffer (process-buffer process)
+                 (setq ivy--full-length (string-to-number (buffer-string))))
+               (when (= 0 (cl-incf counsel-gg-state))
+                 (ivy--exhibit)))))))))
+
+(defun counsel-git-grep-occur ()
+  "Generate a custom occur buffer for `counsel-git-grep'.
+When REVERT is non-nil, regenerate the current *ivy-occur* buffer."
+  (unless (eq major-mode 'ivy-occur-grep-mode)
+    (ivy-occur-grep-mode)
+    (setq default-directory counsel--git-grep-dir))
+  (let ((cands (split-string
+                (shell-command-to-string
+                 (format counsel-git-grep-cmd
+                         (setq ivy--old-re (ivy--regex ivy-text t))))
+                "\n"
+                t)))
+    ;; 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 cands)))
+    (ivy--occur-insert-lines
+     (mapcar
+      (lambda (cand) (concat "./" cand))
+      cands))))
+
+(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
+    (counsel-git-grep-action ivy--current)
+    (recenter-top-bottom)))
+
+;;** `counsel-git-stash'
+(defun counsel-git-stash-kill-action (x)
+  (when (string-match "\\([^:]+\\):" x)
+    (kill-new (message (format "git stash apply %s" (match-string 1 x))))))
+
+;;;###autoload
+(defun counsel-git-stash ()
+  "Search through all available git stashes."
+  (interactive)
+  (let ((dir (locate-dominating-file default-directory ".git")))
+    (if (null dir)
+        (error "Not in a git repository")
+      (let ((cands (split-string (shell-command-to-string
+                                  "IFS=$'\n'
+for i in `git stash list --format=\"%gd\"`; do
+    git stash show -p $i | grep -H --label=\"$i\" \"$1\"
+done") "\n" t)))
+        (ivy-read "git stash: " cands
+                  :action 'counsel-git-stash-kill-action
+                  :caller 'counsel-git-stash)))))
+;;** `counsel-git-log'
+(defun counsel-git-log-function (input)
+  (if (< (length input) 3)
+      (counsel-more-chars 3)
+    ;; `counsel--yank-pop-format-function' uses this
+    (setq ivy--old-re (funcall ivy--regex-function input))
+    (counsel--async-command
+     ;; "git log --grep" likes to have groups quoted e.g. \(foo\).
+     ;; But it doesn't like the non-greedy ".*?".
+     (format "GIT_PAGER=cat git log --grep '%s'"
+             (replace-regexp-in-string
+              "\\.\\*\\?" ".*"
+              ivy--old-re)))
+    nil))
+
+(defun counsel-git-log-action (x)
+  (message "%S" (kill-new x)))
+
+(defcustom counsel-yank-pop-truncate-radius 2
+  "When non-nil, truncate the display of long strings."
+  :type 'integer
+  :group 'ivy)
+
+;;;###autoload
+(defun counsel-git-log ()
+  "Call the \"git log --grep\" shell command."
+  (interactive)
+  (let ((counsel-async-split-string-re "\ncommit ")
+        (counsel-yank-pop-truncate-radius 5)
+        (ivy-format-function #'counsel--yank-pop-format-function)
+        (ivy-height 4))
+    (ivy-read "Grep log: " #'counsel-git-log-function
+              :dynamic-collection t
+              :action #'counsel-git-log-action
+              :unwind #'counsel-delete-process
+              :caller 'counsel-git-log)))
+
+;;* File
+;;** `counsel-find-file'
+(defvar counsel-find-file-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map (kbd "C-DEL") 'counsel-up-directory)
+    (define-key map (kbd "C-<backspace>") 'counsel-up-directory)
+    map))
+
+(add-to-list 'ivy-ffap-url-functions 'counsel-github-url-p)
+(add-to-list 'ivy-ffap-url-functions 'counsel-emacs-url-p)
+(ivy-set-actions
+ 'counsel-find-file
+ '(("f" find-file-other-window "other window")))
+
+(defcustom counsel-find-file-at-point nil
+  "When non-nil, add file-at-point to the list of candidates."
+  :type 'boolean
+  :group 'ivy)
+
+(defcustom counsel-find-file-ignore-regexp nil
+  "A regexp of files to ignore while in `counsel-find-file'.
+These files are un-ignored if `ivy-text' matches them.  The
+common way to show all files is to start `ivy-text' with a dot.
+
+Example value: \"\\(?:\\`[#.]\\)\\|\\(?:[#~]\\'\\)\". This will hide
+temporary and lock files.
+\\<ivy-minibuffer-map>
+Choosing the dotfiles option, \"\\`\\.\", might be convenient,
+since you can still access the dotfiles if your input starts with
+a dot. The generic way to toggle ignored files is \\[ivy-toggle-ignore],
+but the leading dot is a lot faster."
+  :group 'ivy
+  :type '(choice
+          (const :tag "None" nil)
+          (const :tag "Dotfiles" "\\`\\.")
+          (regexp :tag "Regex")))
+
+(defun counsel--find-file-matcher (regexp candidates)
+  "Return REGEXP-matching CANDIDATES.
+Skip some dotfiles unless `ivy-text' requires them."
+  (let ((res (ivy--re-filter regexp candidates)))
+    (if (or (null ivy-use-ignore)
+            (null counsel-find-file-ignore-regexp)
+            (string-match "\\`\\." ivy-text))
+        res
+      (or (cl-remove-if
+           (lambda (x)
+             (and
+              (string-match counsel-find-file-ignore-regexp x)
+              (not (member x ivy-extra-directories))))
+           res)
+          res))))
+
+(declare-function ffap-guesser "ffap")
+
+;;;###autoload
+(defun counsel-find-file (&optional initial-input)
+  "Forward to `find-file'.
+When INITIAL-INPUT is non-nil, use it in the minibuffer during completion."
+  (interactive)
+  (ivy-read "Find file: " 'read-file-name-internal
+            :matcher #'counsel--find-file-matcher
+            :initial-input initial-input
+            :action
+            (lambda (x)
+              (with-ivy-window
+                (find-file (expand-file-name x ivy--directory))))
+            :preselect (when counsel-find-file-at-point
+                         (require 'ffap)
+                         (let ((f (ffap-guesser)))
+                           (when f (expand-file-name f))))
+            :require-match 'confirm-after-completion
+            :history 'file-name-history
+            :keymap counsel-find-file-map
+            :caller 'counsel-find-file))
+
+(defun counsel-up-directory ()
+  "Go to the parent directory preselecting the current one."
+  (interactive)
+  (let ((dir-file-name
+         (directory-file-name (expand-file-name ivy--directory))))
+    (ivy--cd (file-name-directory dir-file-name))
+    (setf (ivy-state-preselect ivy-last)
+          (file-name-as-directory (file-name-nondirectory dir-file-name)))))
+
+(defun counsel-at-git-issue-p ()
+  "Whe point is at an issue in a Git-versioned file, return the issue string."
+  (and (looking-at "#[0-9]+")
+       (or
+        (eq (vc-backend (buffer-file-name)) 'Git)
+        (memq major-mode '(magit-commit-mode)))
+       (match-string-no-properties 0)))
+
+(defun counsel-github-url-p ()
+  "Return a Github issue URL at point."
+  (let ((url (counsel-at-git-issue-p)))
+    (when url
+      (let ((origin (shell-command-to-string
+                     "git remote get-url origin"))
+            user repo)
+        (cond ((string-match "address@hidden:\\([^/]+\\)/\\(.*\\)\\.git$"
+                             origin)
+               (setq user (match-string 1 origin))
+               (setq repo (match-string 2 origin)))
+              ((string-match "\\`https://github.com/\\([^/]+\\)/\\(.*\\)$"
+                             origin)
+               (setq user (match-string 1 origin))
+               (setq repo (match-string 2 origin))))
+        (when user
+          (setq url (format "https://github.com/%s/%s/issues/%s";
+                            user repo (substring url 1))))))))
+
+(defun counsel-emacs-url-p ()
+  "Return a Debbugs issue URL at point."
+  (let ((url (counsel-at-git-issue-p)))
+    (when url
+      (let ((origin (shell-command-to-string
+                     "git remote get-url origin")))
+        (when (string-match "git.sv.gnu.org:/srv/git/emacs.git" origin)
+          (format "http://debbugs.gnu.org/cgi/bugreport.cgi?bug=%s";
+                  (substring url 1)))))))
+
+;;** `counsel-locate'
+(defcustom counsel-locate-options nil
+  "Command line options for `locate'."
+  :group 'ivy
+  :type '(repeat string))
+
+(make-obsolete-variable 'counsel-locate-options 'counsel-locate-cmd "0.7.0")
+
+(defcustom counsel-locate-cmd (cond ((eq system-type 'darwin)
+                                     'counsel-locate-cmd-noregex)
+                                    ((and (eq system-type 'windows-nt)
+                                          (executable-find "es.exe"))
+                                     'counsel-locate-cmd-es)
+                                    (t
+                                     'counsel-locate-cmd-default))
+  "The function for producing a locate command string from the input.
+
+The function takes a string - the current input, and returns a
+string - the full shell command to run."
+  :group 'ivy
+  :type '(choice
+          (const :tag "Default" counsel-locate-cmd-default)
+          (const :tag "No regex" counsel-locate-cmd-noregex)
+          (const :tag "mdfind" counsel-locate-cmd-mdfind)
+          (const :tag "everything" counsel-locate-cmd-es)))
+
+(ivy-set-actions
+ 'counsel-locate
+ '(("x" counsel-locate-action-extern "xdg-open")
+   ("d" counsel-locate-action-dired "dired")))
+
+(counsel-set-async-exit-code 'counsel-locate 1 "Nothing found")
+
+(defvar counsel-locate-history nil
+  "History for `counsel-locate'.")
+
+(defun counsel-locate-action-extern (x)
+  "Use xdg-open shell command on X."
+  (call-process shell-file-name nil
+                nil nil
+                shell-command-switch
+                (format "%s %s"
+                        (if (eq system-type 'darwin)
+                            "open"
+                          "xdg-open")
+                        (shell-quote-argument x))))
+
+(declare-function dired-jump "dired-x")
+
+(defun counsel-locate-action-dired (x)
+  "Use `dired-jump' on X."
+  (dired-jump nil x))
+
+(defun counsel-locate-cmd-default (input)
+  "Return a shell command based on INPUT."
+  (format "locate -i --regex '%s'"
+          (counsel-unquote-regex-parens
+           (ivy--regex input))))
+
+(defun counsel-locate-cmd-noregex (input)
+  "Return a shell command based on INPUT."
+  (format "locate -i '%s'" input))
+
+(defun counsel-locate-cmd-mdfind (input)
+  "Return a shell command based on INPUT."
+  (format "mdfind -name '%s'" input))
+
+(defun counsel-locate-cmd-es (input)
+  "Return a shell command based on INPUT."
+  (format "es.exe -i -r %s"
+          (counsel-unquote-regex-parens
+           (ivy--regex input t))))
+
+(defun counsel-locate-function (input)
+  (if (< (length input) 3)
+      (counsel-more-chars 3)
+    (counsel--async-command
+     (funcall counsel-locate-cmd input))
+    '("" "working...")))
+
+;;;###autoload
+(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)
+                      (with-ivy-window
+                        (when file
+                          (find-file file))))
+            :unwind #'counsel-delete-process
+            :caller 'counsel-locate))
+
+;;* Grep
+;;** `counsel-ag'
+(defvar counsel-ag-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))
+
+(defcustom counsel-ag-base-command "ag --nocolor --nogroup %s -- ."
+  "Format string to use in `cousel-ag-function' to construct the
+command. %S will be replaced by the regex string. The default is
+\"ag --nocolor --nogroup %s -- .\"."
+  :type 'string
+  :group 'ivy)
+
+(counsel-set-async-exit-code 'counsel-ag 1 "No matches found")
+(ivy-set-occur 'counsel-ag 'counsel-ag-occur)
+(ivy-set-display-transformer 'counsel-ag 'counsel-git-grep-transformer)
+
+(defun counsel-ag-function (string)
+  "Grep in the current directory for STRING."
+  (if (< (length string) 3)
+      (counsel-more-chars 3)
+    (let ((default-directory counsel--git-grep-dir)
+          (regex (counsel-unquote-regex-parens
+                  (setq ivy--old-re
+                        (ivy--regex string)))))
+      (counsel--async-command
+       (format counsel-ag-base-command (shell-quote-argument regex)))
+      nil)))
+
+;;;###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
+   (list nil
+         (when current-prefix-arg
+           (read-directory-name (concat
+                                 (car (split-string counsel-ag-base-command))
+                                 " in directory: ")))))
+  (setq counsel--git-grep-dir (or initial-directory default-directory))
+  (ivy-read (funcall counsel-prompt-function
+                     (car (split-string counsel-ag-base-command)))
+            'counsel-ag-function
+            :initial-input initial-input
+            :dynamic-collection t
+            :keymap counsel-ag-map
+            :history 'counsel-git-grep-history
+            :action #'counsel-git-grep-action
+            :unwind (lambda ()
+                      (counsel-delete-process)
+                      (swiper--cleanup))
+            :caller 'counsel-ag))
+
+(defun counsel-ag-occur ()
+  "Generate a custom occur buffer for `counsel-ag'."
+  (unless (eq major-mode 'ivy-occur-grep-mode)
+    (ivy-occur-grep-mode))
+  (setq default-directory counsel--git-grep-dir)
+  (let* ((regex (counsel-unquote-regex-parens
+                 (setq ivy--old-re
+                       (ivy--regex
+                        (progn (string-match "\"\\(.*\\)\"" (buffer-name))
+                               (match-string 1 (buffer-name)))))))
+         (cands (split-string
+                 (shell-command-to-string
+                  (format counsel-ag-base-command (shell-quote-argument 
regex)))
+                 "\n"
+                 t)))
+    ;; 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 cands)))
+    (ivy--occur-insert-lines
+     (mapcar
+      (lambda (cand) (concat "./" cand))
+      cands))))
+
+;;** `counsel-pt'
+(defcustom counsel-pt-base-command "pt --nocolor --nogroup -e %s -- ."
+  "Used to in place of `counsel-ag-base-command' to search with
+pt using `counsel-ag'."
+  :type 'string
+  :group 'ivy)
+
+;;;###autoload
+(defun counsel-pt ()
+  "Grep for a string in the current directory using pt.
+This uses `counsel-ag' with `counsel-pt-base-command' replacing
+`counsel-ag-base-command'."
+  (interactive)
+  (let ((counsel-ag-base-command counsel-pt-base-command))
+    (call-interactively 'counsel-ag)))
+
+;;** `counsel-grep'
+(defcustom counsel-grep-base-command "grep -nE \"%s\" %s"
+  "Format string to use in `cousel-grep-function' to construct
+the command."
+  :type 'string
+  :group 'ivy)
+
+(defun counsel-grep-function (string)
+  "Grep in the current directory for STRING."
+  (if (< (length string) 2)
+      (counsel-more-chars 2)
+    (let ((regex (counsel-unquote-regex-parens
+                  (setq ivy--old-re
+                        (ivy--regex string)))))
+      (counsel--async-command
+       (format counsel-grep-base-command regex counsel--git-grep-dir))
+      nil)))
+
+(defun counsel-grep-action (x)
+  (with-ivy-window
+    (swiper--cleanup)
+    (let ((default-directory (file-name-directory counsel--git-grep-dir))
+          file-name line-number)
+      (when (cond ((string-match "\\`\\([0-9]+\\):\\(.*\\)\\'" x)
+                   (setq file-name counsel--git-grep-dir)
+                   (setq line-number (match-string-no-properties 1 x)))
+                  ((string-match "\\`\\([^:]+\\):\\([0-9]+\\):\\(.*\\)\\'" x)
+                   (setq file-name (match-string-no-properties 1 x))
+                   (setq line-number (match-string-no-properties 2 x)))
+                  (t nil))
+        (find-file file-name)
+        (setq line-number (string-to-number line-number))
+        (if (null counsel-grep-last-line)
+            (progn
+              (goto-char (point-min))
+              (forward-line (1- (setq counsel-grep-last-line line-number))))
+          (forward-line (- line-number counsel-grep-last-line))
+          (setq counsel-grep-last-line line-number))
+        (re-search-forward (ivy--regex ivy-text t) (line-end-position) t)
+        (if (eq ivy-exit 'done)
+            (swiper--ensure-visible)
+          (isearch-range-invisible (line-beginning-position)
+                                   (line-end-position))
+          (swiper--add-overlays (ivy--regex ivy-text)))))))
+
+(defun counsel-grep-occur ()
+  "Generate a custom occur buffer for `counsel-grep'."
+  (unless (eq major-mode 'ivy-occur-grep-mode)
+    (ivy-occur-grep-mode))
+  (let ((cands
+         (split-string
+          (shell-command-to-string
+           (format counsel-grep-base-command
+                   (counsel-unquote-regex-parens
+                    (setq ivy--old-re
+                          (ivy--regex
+                           (progn (string-match "\"\\(.*\\)\"" (buffer-name))
+                                  (match-string 1 (buffer-name))) t)))
+                   counsel--git-grep-dir))
+          "\n" t))
+        (file (file-name-nondirectory counsel--git-grep-dir)))
+    ;; 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 cands)))
+    (ivy--occur-insert-lines
+     (mapcar
+      (lambda (cand) (concat "./" file ":" cand))
+      cands))))
+
+(ivy-set-occur 'counsel-grep 'counsel-grep-occur)
+(counsel-set-async-exit-code 'counsel-grep 1 "")
+
+;;;###autoload
+(defun counsel-grep ()
+  "Grep for a string in the current file."
+  (interactive)
+  (setq counsel-grep-last-line nil)
+  (setq counsel--git-grep-dir (buffer-file-name))
+  (let ((init-point (point))
+        res)
+    (unwind-protect
+         (setq res (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))
+      (unless res
+        (goto-char init-point)))))
+
+;;** `counsel-grep-or-swiper'
+(defcustom counsel-grep-swiper-limit 300000
+  "When the buffer is larger than this, use `counsel-grep' instead of 
`swiper'."
+  :type 'integer
+  :group 'ivy)
+
+;;;###autoload
+(defun counsel-grep-or-swiper ()
+  "Call `swiper' for small buffers and `counsel-grep' for large ones."
+  (interactive)
+  (if (and (buffer-file-name)
+           (not (buffer-narrowed-p))
+           (not (ignore-errors
+                  (file-remote-p (buffer-file-name))))
+           (> (buffer-size)
+              (if (eq major-mode 'org-mode)
+                  (/ counsel-grep-swiper-limit 4)
+                counsel-grep-swiper-limit)))
+      (progn
+        (save-buffer)
+        (counsel-grep))
+    (swiper--ivy (swiper--candidates))))
+
+;;** `counsel-recoll'
+(defun counsel-recoll-function (string)
+  "Grep in the current directory for STRING."
+  (if (< (length string) 3)
+      (counsel-more-chars 3)
+    (counsel--async-command
+     (format "recoll -t -b '%s'" string))
+    nil))
+
+;; This command uses the recollq command line tool that comes together
+;; with the recoll (the document indexing database) source:
+;;     http://www.lesbonscomptes.com/recoll/download.html
+;; You need to build it yourself (together with recoll):
+;;     cd ./query && make && sudo cp recollq /usr/local/bin
+;; You can try the GUI version of recoll with:
+;;     sudo apt-get install recoll
+;; Unfortunately, that does not install recollq.
+(defun counsel-recoll (&optional initial-input)
+  "Search for a string in the recoll database.
+You'll be given a list of files that match.
+Selecting a file will launch `swiper' for that file.
+INITIAL-INPUT can be given as the initial minibuffer input."
+  (interactive)
+  (ivy-read "recoll: " 'counsel-recoll-function
+            :initial-input initial-input
+            :dynamic-collection t
+            :history 'counsel-git-grep-history
+            :action (lambda (x)
+                      (when (string-match "file://\\(.*\\)\\'" x)
+                        (let ((file-name (match-string 1 x)))
+                          (find-file file-name)
+                          (unless (string-match "pdf$" x)
+                            (swiper ivy-text)))))
+            :unwind #'counsel-delete-process
+            :caller 'counsel-recoll))
+;;* Misc Emacs
+;;** `counsel-org-tag'
+(defvar counsel-org-tags nil
+  "Store the current list of tags.")
+
+(defvar org-outline-regexp)
+(defvar org-indent-mode)
+(defvar org-indent-indentation-per-level)
+(defvar org-tags-column)
+(declare-function org-get-tags-string "org")
+(declare-function org-move-to-column "org-compat")
+
+(defun counsel-org-change-tags (tags)
+  (let ((current (org-get-tags-string))
+        (col (current-column))
+        level)
+    ;; Insert new tags at the correct column
+    (beginning-of-line 1)
+    (setq level (or (and (looking-at org-outline-regexp)
+                         (- (match-end 0) (point) 1))
+                    1))
+    (cond
+      ((and (equal current "") (equal tags "")))
+      ((re-search-forward
+        (concat "\\([ \t]*" (regexp-quote current) "\\)[ \t]*$")
+        (point-at-eol) t)
+       (if (equal tags "")
+           (delete-region
+            (match-beginning 0)
+            (match-end 0))
+         (goto-char (match-beginning 0))
+         (let* ((c0 (current-column))
+                ;; compute offset for the case of org-indent-mode active
+                (di (if (bound-and-true-p org-indent-mode)
+                        (* (1- org-indent-indentation-per-level) (1- level))
+                      0))
+                (p0 (if (equal (char-before) ?*) (1+ (point)) (point)))
+                (tc (+ org-tags-column (if (> org-tags-column 0) (- di) di)))
+                (c1 (max (1+ c0) (if (> tc 0) tc (- (- tc) (string-width 
tags)))))
+                (rpl (concat (make-string (max 0 (- c1 c0)) ?\ ) tags)))
+           (replace-match rpl t t)
+           (and c0 indent-tabs-mode (tabify p0 (point)))
+           tags)))
+      (t (error "Tags alignment failed")))
+    (org-move-to-column col)))
+
+(defun counsel-org--set-tags ()
+  (counsel-org-change-tags
+   (if counsel-org-tags
+       (format ":%s:"
+               (mapconcat #'identity counsel-org-tags ":"))
+     "")))
+
+(defvar org-agenda-bulk-marked-entries)
+
+(declare-function org-get-at-bol "org")
+(declare-function org-agenda-error "org-agenda")
+
+(defun counsel-org-tag-action (x)
+  (if (member x counsel-org-tags)
+      (progn
+        (setq counsel-org-tags (delete x counsel-org-tags)))
+    (unless (equal x "")
+      (setq counsel-org-tags (append counsel-org-tags (list x)))
+      (unless (member x ivy--all-candidates)
+        (setq ivy--all-candidates (append ivy--all-candidates (list x))))))
+  (let ((prompt (counsel-org-tag-prompt)))
+    (setf (ivy-state-prompt ivy-last) prompt)
+    (setq ivy--prompt (concat "%-4d " prompt)))
+  (cond ((memq this-command '(ivy-done
+                              ivy-alt-done
+                              ivy-immediate-done))
+         (if (eq major-mode 'org-agenda-mode)
+             (if (null org-agenda-bulk-marked-entries)
+                 (let ((hdmarker (or (org-get-at-bol 'org-hd-marker)
+                                     (org-agenda-error))))
+                   (with-current-buffer (marker-buffer hdmarker)
+                     (goto-char hdmarker)
+                     (counsel-org--set-tags)))
+               (let ((add-tags (copy-sequence counsel-org-tags)))
+                 (dolist (m org-agenda-bulk-marked-entries)
+                   (with-current-buffer (marker-buffer m)
+                     (save-excursion
+                       (goto-char m)
+                       (setq counsel-org-tags
+                             (delete-dups
+                              (append (split-string (org-get-tags-string) ":" 
t)
+                                      add-tags)))
+                       (counsel-org--set-tags))))))
+           (counsel-org--set-tags)))
+        ((eq this-command 'ivy-call)
+         (delete-minibuffer-contents))))
+
+(defun counsel-org-tag-prompt ()
+  (format "Tags (%s): "
+          (mapconcat #'identity counsel-org-tags ", ")))
+
+(defvar org-setting-tags)
+(defvar org-last-tags-completion-table)
+(defvar org-tag-persistent-alist)
+(defvar org-tag-alist)
+(defvar org-complete-tags-always-offer-all-agenda-tags)
+
+(declare-function org-at-heading-p "org")
+(declare-function org-back-to-heading "org")
+(declare-function org-get-buffer-tags "org")
+(declare-function org-global-tags-completion-table "org")
+(declare-function org-agenda-files "org")
+(declare-function org-agenda-set-tags "org-agenda")
+
+;;;###autoload
+(defun counsel-org-tag ()
+  "Add or remove tags in org-mode."
+  (interactive)
+  (save-excursion
+    (if (eq major-mode 'org-agenda-mode)
+        (if org-agenda-bulk-marked-entries
+            (setq counsel-org-tags nil)
+          (let ((hdmarker (or (org-get-at-bol 'org-hd-marker)
+                              (org-agenda-error))))
+            (with-current-buffer (marker-buffer hdmarker)
+              (goto-char hdmarker)
+              (setq counsel-org-tags
+                    (split-string (org-get-tags-string) ":" t)))))
+      (unless (org-at-heading-p)
+        (org-back-to-heading t))
+      (setq counsel-org-tags (split-string (org-get-tags-string) ":" t)))
+    (let ((org-setting-tags t)
+          (org-last-tags-completion-table
+           (append org-tag-persistent-alist
+                   (or org-tag-alist (org-get-buffer-tags))
+                   (and
+                    (or org-complete-tags-always-offer-all-agenda-tags
+                        (eq major-mode 'org-agenda-mode))
+                    (org-global-tags-completion-table
+                     (org-agenda-files))))))
+      (ivy-read (counsel-org-tag-prompt)
+                (lambda (str &rest _unused)
+                  (delete-dups
+                   (all-completions str 'org-tags-completion-function)))
+                :history 'org-tags-history
+                :action 'counsel-org-tag-action
+                :caller 'counsel-org-tag))))
+
+;;;###autoload
+(defun counsel-org-tag-agenda ()
+  "Set tags for the current agenda item."
+  (interactive)
+  (let ((store (symbol-function 'org-set-tags)))
+    (unwind-protect
+         (progn
+           (fset 'org-set-tags
+                 (symbol-function 'counsel-org-tag))
+           (org-agenda-set-tags nil nil))
+      (fset 'org-set-tags store))))
+
+;;** `counsel-tmm'
+(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)))))
+
+(defvar tmm-table-undef)
+
+;;;###autoload
+(defun counsel-tmm ()
+  "Text-mode emulation of looking and choosing from a menubar."
+  (interactive)
+  (require 'tmm)
+  (run-hooks 'menu-bar-update-hook)
+  (setq tmm-table-undef nil)
+  (counsel-tmm-prompt (tmm-get-keybind [menu-bar])))
+
+;;** `counsel-yank-pop'
+(defun counsel--yank-pop-truncate (str)
+  (condition-case nil
+      (let* ((lines (split-string str "\n" t))
+             (n (length lines))
+             (first-match (cl-position-if
+                           (lambda (s) (string-match ivy--old-re s))
+                           lines))
+             (beg (max 0 (- first-match
+                            counsel-yank-pop-truncate-radius)))
+             (end (min n (+ first-match
+                            counsel-yank-pop-truncate-radius
+                            1)))
+             (seq (cl-subseq lines beg end)))
+        (if (null first-match)
+            (error "Could not match %s" str)
+          (when (> beg 0)
+            (setcar seq (concat "[...] " (car seq))))
+          (when (< end n)
+            (setcar (last seq)
+                    (concat (car (last seq)) " [...]")))
+          (mapconcat #'identity seq "\n")))
+    (error str)))
+
+(defun counsel--yank-pop-format-function (cand-pairs)
+  (ivy--format-function-generic
+   (lambda (str)
+     (mapconcat
+      (lambda (s)
+        (ivy--add-face s 'ivy-current-match))
+      (split-string
+       (counsel--yank-pop-truncate str) "\n" t)
+      "\n"))
+   (lambda (str)
+     (counsel--yank-pop-truncate str))
+   cand-pairs
+   "\n"))
+
+(defun counsel-yank-pop-action (s)
+  "Insert S into the buffer, overwriting the previous yank."
+  (with-ivy-window
+    (delete-region ivy-completion-beg
+                   ivy-completion-end)
+    (insert (substring-no-properties s))
+    (setq ivy-completion-end (point))))
+
+;;;###autoload
+(defun counsel-yank-pop ()
+  "Ivy replacement for `yank-pop'."
+  (interactive)
+  (if (eq last-command 'yank)
+      (progn
+        (setq ivy-completion-end (point))
+        (setq ivy-completion-beg
+              (save-excursion
+                (search-backward (car kill-ring))
+                (point))))
+    (setq ivy-completion-beg (point))
+    (setq ivy-completion-end (point)))
+  (let ((candidates (cl-remove-if
+                     (lambda (s)
+                       (or (< (length s) 3)
+                           (string-match "\\`[\n[:blank:]]+\\'" s)))
+                     (delete-dups kill-ring))))
+    (let ((ivy-format-function #'counsel--yank-pop-format-function)
+          (ivy-height 5))
+      (ivy-read "kill-ring: " candidates
+                :action 'counsel-yank-pop-action
+                :caller 'counsel-yank-pop))))
+
+;;** `counsel-imenu'
+(defvar imenu-auto-rescan)
+(declare-function imenu--subalist-p "imenu")
+(declare-function imenu--make-index-alist "imenu")
+
+(defun counsel-imenu-get-candidates-from (alist &optional prefix)
+  "Create a list of (key . value) from ALIST.
+PREFIX is used to create the key."
+  (cl-mapcan (lambda (elm)
+               (if (imenu--subalist-p elm)
+                   (counsel-imenu-get-candidates-from
+                    (cl-loop for (e . v) in (cdr elm) collect
+                         (cons e (if (integerp v) (copy-marker v) v)))
+                    ;; pass the prefix to next recursive call
+                    (concat prefix (if prefix ".") (car elm)))
+                 (let ((key (concat prefix (if prefix ".") (car elm))))
+                   (list (cons key
+                               ;; create a imenu candidate here
+                               (cons key (if (overlayp (cdr elm))
+                                             (overlay-start (cdr elm))
+                                           (cdr elm))))))))
+             alist))
+
+;;;###autoload
+(defun counsel-imenu ()
+  "Jump to a buffer position indexed by imenu."
+  (interactive)
+  (unless (featurep 'imenu)
+    (require 'imenu nil t))
+  (let* ((imenu-auto-rescan t)
+         (items (imenu--make-index-alist t))
+         (items (delete (assoc "*Rescan*" items) items)))
+    (ivy-read "imenu items:" (counsel-imenu-get-candidates-from items)
+              :preselect (thing-at-point 'symbol)
+              :require-match t
+              :action (lambda (candidate)
+                        (with-ivy-window
+                          ;; In org-mode, (imenu candidate) will expand child 
node
+                          ;; after jump to the candidate position
+                          (imenu candidate)))
+              :caller 'counsel-imenu)))
+
+;;** `counsel-list-processes'
+(defun counsel-list-processes-action-delete (x)
+  (delete-process x)
+  (setf (ivy-state-collection ivy-last)
+        (setq ivy--all-candidates
+              (delete x ivy--all-candidates))))
+
+(defun counsel-list-processes-action-switch (x)
+  (let* ((proc (get-process x))
+         (buf (and proc (process-buffer proc))))
+    (if buf
+        (switch-to-buffer buf)
+      (message "Process %s doesn't have a buffer" x))))
+
+;;;###autoload
+(defun counsel-list-processes ()
+  "Offer completion for `process-list'
+The default action deletes the selected process.
+An extra action allows to switch to the process buffer."
+  (interactive)
+  (list-processes--refresh)
+  (ivy-read "Process: " (mapcar #'process-name (process-list))
+            :require-match t
+            :action
+            '(1
+              ("o" counsel-list-processes-action-delete "kill")
+              ("s" counsel-list-processes-action-switch "switch"))
+            :caller 'counsel-list-processes))
+
+;;** `counsel-ace-link'
+(defun counsel-ace-link ()
+  "Use Ivy completion for `ace-link'."
+  (interactive)
+  (let (collection action)
+    (cond ((eq major-mode 'Info-mode)
+           (setq collection 'ace-link--info-collect)
+           (setq action 'ace-link--info-action))
+          ((eq major-mode 'help-mode)
+           (setq collection 'ace-link--help-collect)
+           (setq action 'ace-link--help-action))
+          ((eq major-mode 'woman-mode)
+           (setq collection 'ace-link--woman-collect)
+           (setq action 'ace-link--woman-action))
+          ((eq major-mode 'eww-mode)
+           (setq collection 'ace-link--eww-collect)
+           (setq action 'ace-link--eww-action))
+          ((eq major-mode 'compilation-mode)
+           (setq collection 'ace-link--eww-collect)
+           (setq action 'ace-link--compilation-action))
+          ((eq major-mode 'org-mode)
+           (setq collection 'ace-link--org-collect)
+           (setq action 'ace-link--org-action)))
+    (if (null collection)
+        (error "%S is not supported" major-mode)
+      (ivy-read "Ace-Link: " (funcall collection)
+                :action action
+                :require-match t
+                :caller 'counsel-ace-link))))
+;;** `counsel-expression-history'
+;;;###autoload
+(defun counsel-expression-history ()
+  "Select an element of `read-expression-history'.
+And insert it into the minibuffer. Useful during
+`eval-expression'"
+  (interactive)
+  (let ((enable-recursive-minibuffers t))
+    (ivy-read "Expr: " (delete-dups read-expression-history)
+              :action #'insert)))
+
+;;** `counsel-esh-history'
+(defun counsel--browse-history (elements)
+  "Use Ivy to navigate through ELEMENTS."
+  (setq ivy-completion-beg (point))
+  (setq ivy-completion-end (point))
+  (ivy-read "Symbol name: "
+            (delete-dups
+             (ring-elements elements))
+            :action #'ivy-completion-in-region-action))
+
+(defvar eshell-history-ring)
+
+;;;###autoload
+(defun counsel-esh-history ()
+  "Browse Eshell history."
+  (interactive)
+  (require 'em-hist)
+  (counsel--browse-history eshell-history-ring))
+
+(defvar comint-input-ring)
+
+;;;###autoload
+(defun counsel-shell-history ()
+  "Browse shell history."
+  (interactive)
+  (require 'comint)
+  (counsel--browse-history comint-input-ring))
+
+;;* Misc OS
+;;** `counsel-rhythmbox'
+(defvar helm-rhythmbox-library)
+(declare-function helm-rhythmbox-load-library "ext:helm-rhythmbox")
+(declare-function dbus-call-method "dbus")
+(declare-function dbus-get-property "dbus")
+(declare-function helm-rhythmbox-song-uri "ext:helm-rhythmbox")
+(declare-function helm-rhythmbox-candidates "ext:helm-rhythmbox")
+
+(defun counsel-rhythmbox-enqueue-song (song)
+  "Let Rhythmbox enqueue SONG."
+  (let ((service "org.gnome.Rhythmbox3")
+        (path "/org/gnome/Rhythmbox3/PlayQueue")
+        (interface "org.gnome.Rhythmbox3.PlayQueue"))
+    (dbus-call-method :session service path interface
+                      "AddToQueue" (helm-rhythmbox-song-uri song))))
+
+(defvar counsel-rhythmbox-history nil
+  "History for `counsel-rhythmbox'.")
+
+(defun counsel-rhythmbox-current-song ()
+  "Return the currently playing song title."
+  (ignore-errors
+    (let* ((entry (dbus-get-property
+                   :session
+                   "org.mpris.MediaPlayer2.rhythmbox"
+                   "/org/mpris/MediaPlayer2"
+                   "org.mpris.MediaPlayer2.Player"
+                   "Metadata"))
+           (artist (caar (cadr (assoc "xesam:artist" entry))))
+           (album (cl-caadr (assoc "xesam:album" entry)))
+           (title (cl-caadr (assoc "xesam:title" entry))))
+      (format "%s - %s - %s" artist album title))))
+
+;;;###autoload
+(defun counsel-rhythmbox ()
+  "Choose a song from the Rhythmbox library to play or enqueue."
+  (interactive)
+  (unless (require 'helm-rhythmbox nil t)
+    (error "Please install `helm-rhythmbox'"))
+  (unless helm-rhythmbox-library
+    (helm-rhythmbox-load-library)
+    (while (null helm-rhythmbox-library)
+      (sit-for 0.1)))
+  (ivy-read "Rhythmbox: "
+            (helm-rhythmbox-candidates)
+            :history 'counsel-rhythmbox-history
+            :preselect (counsel-rhythmbox-current-song)
+            :action
+            '(1
+              ("p" helm-rhythmbox-play-song "Play song")
+              ("e" counsel-rhythmbox-enqueue-song "Enqueue song"))
+            :caller 'counsel-rhythmbox))
+;;** `counsel-linux-app'
+(defvar counsel-linux-apps-alist nil
+  "List of data located in /usr/share/applications.")
+
+(defvar counsel-linux-apps-faulty nil
+  "List of faulty data located in /usr/share/applications.")
+
+(defun counsel-linux-apps-list ()
+  (let ((files
+         (delete
+          ".." (delete
+                "." (file-expand-wildcards 
"/usr/share/applications/*.desktop")))))
+    (dolist (file (cl-set-difference files (append (mapcar 'car 
counsel-linux-apps-alist)
+                                                   counsel-linux-apps-faulty)
+                                     :test 'equal))
+      (with-temp-buffer
+        (insert-file-contents (expand-file-name file 
"/usr/share/applications"))
+        (let (name comment exec)
+          (goto-char (point-min))
+          (if (re-search-forward "^Name *= *\\(.*\\)$" nil t)
+              (setq name (match-string 1))
+            (error "File %s has no Name" file))
+          (goto-char (point-min))
+          (when (re-search-forward "^Comment *= *\\(.*\\)$" nil t)
+            (setq comment (match-string 1)))
+          (goto-char (point-min))
+          (when (re-search-forward "^Exec *= *\\(.*\\)$" nil t)
+            (setq exec (match-string 1)))
+          (if (and exec (not (equal exec "")))
+              (add-to-list
+               'counsel-linux-apps-alist
+               (cons (format "% -45s: %s%s"
+                             (propertize exec 'face 'font-lock-builtin-face)
+                             name
+                             (if comment
+                                 (concat " - " comment)
+                               ""))
+                     file))
+            (add-to-list 'counsel-linux-apps-faulty file))))))
+  counsel-linux-apps-alist)
+
+(defun counsel-linux-app-action-default (desktop-shortcut)
+  "Launch DESKTOP-SHORTCUT."
+  (call-process-shell-command
+   (format "gtk-launch %s" (file-name-nondirectory desktop-shortcut))))
+
+(defun counsel-linux-app-action-file (desktop-shortcut)
+  "Launch DESKTOP-SHORTCUT with a selected file."
+  (let* ((entry (rassoc desktop-shortcut counsel-linux-apps-alist))
+         (short-name (and entry
+                          (string-match "\\([^ ]*\\) " (car entry))
+                          (match-string 1 (car entry))))
+         (file (and short-name
+                    (read-file-name
+                     (format "Run %s on: " short-name)))))
+    (if file
+        (call-process-shell-command
+         (format "gtk-launch %s %s"
+                 (file-name-nondirectory desktop-shortcut)
+                 file))
+      (user-error "cancelled"))))
+
+(ivy-set-actions
+ 'counsel-linux-app
+ '(("f" counsel-linux-app-action-file "run on a file")))
+
+;;;###autoload
+(defun counsel-linux-app ()
+  "Launch a Linux desktop application, similar to Alt-<F2>."
+  (interactive)
+  (ivy-read "Run a command: " (counsel-linux-apps-list)
+            :action #'counsel-linux-app-action-default
+            :caller 'counsel-linux-app))
+
+;;** `counsel-mode'
+(defvar counsel-mode-map
+  (let ((map (make-sparse-keymap)))
+    (dolist (binding
+              '((execute-extended-command . counsel-M-x)
+                (describe-bindings . counsel-descbinds)
+                (describe-function . counsel-describe-function)
+                (describe-variable . counsel-describe-variable)
+                (find-file . counsel-find-file)
+                (imenu . counsel-imenu)
+                (load-library . counsel-load-library)
+                (load-theme . counsel-load-theme)
+                (yank-pop . counsel-yank-pop)))
+      (define-key map (vector 'remap (car binding)) (cdr binding)))
+    map)
+  "Map for `counsel-mode'. Remaps built-in functions to counsel
+replacements.")
+
+(defcustom counsel-mode-override-describe-bindings nil
+  "Whether to override `describe-bindings' when `counsel-mode' is
+active."
+  :group 'ivy
+  :type 'boolean)
+
+;;;###autoload
+(define-minor-mode counsel-mode
+  "Toggle Counsel mode on or off.
+Turn Counsel mode on if ARG is positive, off otherwise. Counsel
+mode remaps built-in emacs functions that have counsel
+replacements. "
+  :group 'ivy
+  :global t
+  :keymap counsel-mode-map
+  :lighter " counsel"
+  (if counsel-mode
+      (when (and (fboundp 'advice-add)
+                 counsel-mode-override-describe-bindings)
+        (advice-add #'describe-bindings :override #'counsel-descbinds))
+    (when (fboundp 'advice-remove)
+      (advice-remove #'describe-bindings #'counsel-descbinds))))
+
+(provide 'counsel)
+
+;;; counsel.el ends here
diff --git a/packages/swiper/doc/Changelog.org b/packages/ivy/doc/Changelog.org
similarity index 53%
rename from packages/swiper/doc/Changelog.org
rename to packages/ivy/doc/Changelog.org
index 21076de..df721d3 100644
--- a/packages/swiper/doc/Changelog.org
+++ b/packages/ivy/doc/Changelog.org
@@ -614,3 +614,573 @@ 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]].
+
+* 0.8.0
+** Package rename
+Due to popular demand, =swiper-0.7.0= is succeeded by =ivy-0.8.0= in GNU
+ELPA. The contents of the package don't change, only the name. Make
+sure to remove the =~/.emacs.d/elpa/swiper-0.7.0= directory if you
+have it and ~M-x~ =package-install ivy=.
+** Documentation
+HTML documentation is available at http://oremacs.com/swiper/.
+
+Texinfo documentation is in doc/ivy.texi.
+
+The HTML file shouldn't be in this repository to avoid bloat, instead
+it's in the gh-pages branch at
+https://github.com/abo-abo/swiper/tree/gh-pages.
+** Fixes
+*** ivy-read
+**** Fix recursive minibuffer exit with ~C-g~
+Make it so e.g. ~C-h f C-h v C-g~ goes back to the =describe-function= 
selection.
+**** Ensure the return result
+In some cases, =read-from-minibuffer= will return the whole minibuffer
+contents (i.e. all available candidates). Return =ivy--current= instead.
+**** Properly support matching ignoring order
+See [[https://github.com/abo-abo/swiper/issues/296][#296]] and 
[[https://github.com/abo-abo/swiper/issues/329][#329]].
+**** Insert intermediate candidates during async completions
+See [[https://github.com/abo-abo/swiper/issues/340][#340]].
+**** Initialize =ivy-last= to empty state
+See [[https://github.com/abo-abo/swiper/issues/352][#352]].
+**** Fix extra actions for =completing-read=
+See [[https://github.com/abo-abo/swiper/issues/337][#337]].
+**** Support a list of symbols as collection
+See [[https://github.com/abo-abo/swiper/issues/375][#375]].
+**** Define =setq-local= and =defvar-local= unless defined
+With this commit, Ivy works on emacs-24.2.
+See [[https://github.com/abo-abo/swiper/issues/415][#415]].
+**** Make ~M-o~ not modify the action
+See [[https://github.com/abo-abo/swiper/issues/454][#454]].
+**** Make sure user keybindings are respected
+See [[https://github.com/abo-abo/swiper/issues/466][#466]].
+**** Fix =read-file-name= with a specified dir
+See [[https://github.com/abo-abo/swiper/issues/475][#475]].
+**** Don't highlight the match in the file part
+See [[https://github.com/abo-abo/swiper/issues/483][#483]].
+**** Add a few tests for alists
+*** ivy-occur
+**** Fix =default-directory=
+This way, =next-error= etc will work properly.
+*** ivy--resize-minibuffer-to-fit
+**** Fix for small delta
+See [[https://github.com/abo-abo/swiper/issues/339][#339]].
+**** Check =frame-root-window-p=
+See [[https://github.com/abo-abo/swiper/issues/380][#380]].
+*** ivy-completing-read
+**** Use =completing-read-default= for tmm
+See [[https://github.com/abo-abo/swiper/issues/316][#316]].
+*** ivy--regex-plus
+**** Recognize ! at the beginning of the str
+See [[https://github.com/abo-abo/swiper/issues/318][#318]].
+**** Prettify a bit
+See [[https://github.com/abo-abo/swiper/issues/344][#344]].
+**** Don't consider =\\(?...\)= a group
+See [[https://github.com/abo-abo/swiper/issues/393][#393]].
+*** ivy--get-window
+**** Always return a valid window
+Even if =state= is invalid.
+*** ivy--recompute-index
+**** Update =cl-position= logic
+See [[https://github.com/abo-abo/swiper/issues/207][#207]].
+*** ivy-reverse-i-search
+**** Fix due to recursive update
+See [[https://github.com/abo-abo/swiper/issues/323][#323]].
+*** ivy--reset-state
+**** Don't null =initial-input=
+This is specifically for ='read-file-name-internal= collection.  The
+input needs to be set to nil for e.g. =rgrep=, which supplies the
+*absolute* path as =initial-input=, resulting in a mess.
+
+For now, don't set input to nil if =:action= was passed to =ivy-read=.
+See [[https://github.com/abo-abo/swiper/issues/336][#336]].
+**** Don't deactivate region
+See [[https://github.com/abo-abo/swiper/issues/377][#377]].
+*** ivy-completion-in-region
+**** Use =completion-all-completions=
+See [[https://github.com/abo-abo/swiper/issues/341][#341]].
+**** Optimize for 1 candidate
+When there's only one candidate, call the action immediately.
+**** Add feedback for 1 candidate
+When the sole completion is the same as the input, notify the user.
+See [[https://github.com/abo-abo/swiper/issues/350][#350]].
+**** Bind =completion-ignore-case=
+It's convenient to have it the same value as =case-fold-search=.
+*** ivy-read-action
+**** Give enough minibuffer space
+See [[https://github.com/abo-abo/swiper/issues/402][#402]].
+**** Allow to customize the action hint formatter
+See [[https://github.com/abo-abo/swiper/issues/469][#469]].
+*** ivy-count-format
+**** Fix for nil value
+See [[https://github.com/abo-abo/swiper/issues/349][#349]].
+*** ivy-switch-buffer
+**** Don't fall back to =switch-to-buffer=
+See [[https://github.com/abo-abo/swiper/issues/410][#410]].
+*** ivy-next-history-element
+**** No "\\_<" for dynamic-collection
+"\\_<" regex is Emacs-specific and should only be done if
+=:dynamic-collection= is nil.  It is nil for =counsel-git-grep= with
+repositories < 20000 lines, but non-nil for larger ones.
+
+Fixes [[https://github.com/abo-abo/swiper/issues/409][#409]].
+*** ivy-occur-press
+**** Pulse no longer
+Repeated pulses within a short time span resulted in horrible window
+flickering.
+*** ivy-resume
+**** Add a guard against null =:action=
+*** ivy-avy
+**** Make ~C-g~ cancel gracefully
+See abo-abo/avy[[https://github.com/abo-abo/swiper/issues/140][#140]].
+*** ivy-dispatching-done
+Allow to exit with no candidates.
+*** swiper
+**** Improve for multiple occurrences on one line
+See [[https://github.com/abo-abo/swiper/issues/314][#314]].
+**** Fix "backward" search
+When none of the previous candidates after the point match the current
+input, instead of returning 0, return the index of the last matching
+candidate.  This is a good choice, because that candidate is the
+closest to the point of the initial search start.
+
+See [[https://github.com/abo-abo/swiper/issues/319][#319]].
+**** Return point
+See [[https://github.com/abo-abo/swiper/issues/370][#370]].
+**** Update =regexp-search-ring=
+See [[https://github.com/abo-abo/swiper/issues/89][#89]].
+**** Always remove '(field) text property
+Allows to search better in modes for shell interaction.
+*** swiper-font-lock-ensure
+**** Add modes
+Add bongo-library-mode, bongo-playlist-mode, sauron-mode.
+
+See [[https://github.com/abo-abo/swiper/issues/19][#19]].
+**** Don't fail when font-lock is off
+See [[https://github.com/abo-abo/swiper/issues/400][#400]].
+*** swiper--multi-candidates
+**** Add check for =make-string=
+See [[https://github.com/abo-abo/swiper/issues/481][#481]].
+*** counsel--async-sentinel
+**** Fix issue with =ivy--regex-ignore-order=
+See [[https://github.com/abo-abo/swiper/issues/342][#342]].
+**** Re-display when no cands
+**** Recognize error codes other than 1
+See [[https://github.com/abo-abo/swiper/issues/394][#394]].
+*** consel-git
+**** Fix window selection.
+Use =with-ivy-window=, so that each new file chosen with e.g. ~C-M-n~ is
+selected in the same window.
+*** counsel-recoll
+**** Add =:unwind=
+See [[https://github.com/abo-abo/swiper/issues/403][#403]].
+*** compilation warnings
+See [[https://github.com/abo-abo/swiper/issues/324][#324]].
+** New Features
+*** ivy-read
+**** Use =flx= for highlighting fuzzy matches
+See [[https://github.com/abo-abo/swiper/issues/207][#207]].
+**** Simplify the signature for =:dynamic-collection= functions
+When given =:dynamic-collection=, assume the collection function only
+needs one argument - the string input.
+**** Modify ~M-n~ prediction when region is active
+When the region is active and ~M-n~ is called, insert the region
+contents into the minibuffer and deactivate the region. The region
+deactivation is done for =swiper=, to make it easier to search for
+multiple words or a subword.
+**** Allow to compose collections
+***** Example 1: async collection
+Stack =recentf= on top of =counsel-locate=:
+
+#+begin_src elisp
+(defun small-test ()
+  (cl-subseq recentf-list 0 10))
+
+(ivy-set-sources
+ 'counsel-locate
+ '((small-test)
+   (original-source)))
+#+end_src
+
+Here, (original-source) represents the async candidates of
+=counsel-locate=. All extra sources are static - each function is called
+once to generate a list of strings, which will be filtered later.
+
+The order matters, so you can have e.g.:
+
+#+begin_src elisp
+(ivy-set-sources
+ 'counsel-locate
+ '((original-source)
+   (small-test)))
+#+end_src
+
+See [[https://github.com/abo-abo/swiper/issues/373][#373]].
+***** Example 2: sync collection
+#+begin_src elisp
+(defun my-extra-source ()
+  (append
+   (when (eq 'Git (vc-backend (buffer-file-name)))
+     (list "git1" "git2" "git3"))
+   (when (file-exists-p "doc/Changelog.org")
+     (list (propertize "doc/Changelog.org" 'face '(:background "red"))))))
+
+(defun my-find-file ()
+  (interactive)
+  (ivy-read "Find file: " 'read-file-name-internal
+            :action (lambda (x)
+                      (with-ivy-window
+                        (find-file (expand-file-name x ivy--directory))))
+            :require-match 'confirm-after-completion
+            :history 'file-name-history
+            :caller 'my-find-file))
+
+(ivy-set-sources
+ 'my-find-file
+ '((my-extra-source)
+   (original-source)))
+#+end_src
+
+The function =my-find-file= knows nothing about the extra source, it's
+only purpose is to introduce a =:caller= to attach things to, as to not
+to mess up e.g. =counsel-find-file=.
+
+The function =my-extra-source= gets called once in =ivy-read= via
+=ivy--reset-state=. It takes no args and returns a list of strings,
+possibly empty.
+**** Improve documentation UI
+Bind ~C-h m~ to =ivy-help=.
+
+=ivy-help-file= is a new defvar pointing to the ivy-help.org file.
+
+Bind ~D~ in =hydra-ivy= to go to hydra's definition.
+
+See [[https://github.com/abo-abo/swiper/issues/376][#376]] and 
[[https://github.com/abo-abo/swiper/issues/379][#379]].
+**** Add ignore pattern toggling
+~C-c C-a~ is bound to =ivy-toggle-ignore= - a new command to toggle ignore
+patterns (user-configured filtering). If the ignore patterns are
+enabled and there are zero candidates after ignoring, display the ones
+that match the current text. This feature currently works for
+=ivy-switch-buffer= and =counsel-find-file=.
+
+See [[https://github.com/abo-abo/swiper/issues/369][#369]].
+*** ivy-mode
+**** Set =completion-in-region-function=
+See [[https://github.com/abo-abo/swiper/issues/331][#331]].
+**** Improve ~M-n~ for ='read-file-name-internal=
+*** ivy-set-occur
+Allows to customize =ivy-occur= per-command.
+**** =ivy-switch-buffer=
+Add custom occur.
+See [[https://github.com/abo-abo/swiper/issues/438][#438]] and 
[[https://github.com/abo-abo/swiper/issues/440][#440]].
+*** ivy-occur-mode
+**** New commands on ~j~, ~k~, ~c~
+(ivy-occur-toggle-calling): New command bound to ~c~.
+(ivy-occur-next-line): New command bound to ~j~.
+(ivy-occur-previous-line): New command bound to ~k~.
+
+This makes =ivy-occur= much more convenient, instead of ~gjgjgjg~, just
+~cjjj~. Especially good for commands that change the contents of the
+other window, like =describe-function= or =counsel-git-grep=.
+
+Example:
+
+- ~C-h f~ (=describe-funtion=)
+- =run= (=self-insert-command=)
+- ~C-c C-o~ (=ivy-occur=); ~C-o u~ also works.
+- ~cjjjjkkkk~
+**** New command =ivy-occur-revert-buffer= on ~g~
+Does what e.g. =revert-buffer= does for *Help* buffers.
+
+Has special handling for =counsel-git-grep=, =counsel-ag= and
+=counsel-grep=: will run the shell command once more and reflect the
+updates in files.
+
+Move =ivy-occur-press= from ~g~ to ~f~.
+**** Improve the feedback for ~j~ and ~k~
+The overlays will be more responsive now.
+*** ivy-re-builders-alist
+**** Allow =this-command= to be a key
+Example:
+#+begin_src elisp
+(defun asdf ()
+  (interactive)
+  (completing-read "prompt: " '("abc" "abcd" "def")))
+
+(global-set-key (kbd "C-c t") 'asdf)
+
+(setq ivy-re-builders-alist
+      '(
+        (asdf . ivy--regex-fuzzy)
+        (t . ivy--regex-plus)))
+#+end_src
+This is useful for commands that you didn't write. For new commands
+that you write, consider using =ivy-read= and =:caller=.
+
+See [[https://github.com/abo-abo/swiper/issues/330][#330]].
+*** ivy-set-actions
+**** Call with =t= to affect all commands
+Example:
+
+#+begin_src elisp
+(ivy-set-actions
+ t
+ '(("i" insert "insert")))
+#+end_src
+
+Now an "insert" action will be available for all =ivy-read= sessions
+when pressing ~M-o~.
+
+See [[https://github.com/abo-abo/swiper/issues/337][#337]].
+*** ivy-faces
+New defcustom group.
+See [[https://github.com/abo-abo/swiper/issues/389][#389]].
+*** ivy-flx-limit
+New variable. Configure when =flx= is used.
+See [[https://github.com/abo-abo/swiper/issues/207][#207]].
+*** ivy-ignore-buffers
+New defcustom. See [[https://github.com/abo-abo/swiper/issues/366][#366]].
+*** ivy-inhibit-action
+New variable. See [[https://github.com/abo-abo/swiper/issues/363][#363]].
+*** ivy-do-completion-in-region
+New defcustom. See [[https://github.com/abo-abo/swiper/issues/367][#367]].
+*** ivy-fixed-height-minibuffer
+New defcustom.
+
+When non nil, fix the height of the minibuffer during ivy completion
+at =ivy-height=. This effectively sets the minimum height at this level
+and tries to ensure that it does not change depending on the number of
+candidates.
+
+See [[https://github.com/abo-abo/swiper/issues/353][#353]].
+*** ivy-set-display-transformer
+New API function.
+
+Now used by =switch-to-buffer= and =read-file-name=.
+
+See [[https://github.com/abo-abo/swiper/issues/399][#399]].
+*** ivy-ignore-buffers
+New defcustom similar to =ido-ignore-buffers=.
+
+See [[https://github.com/abo-abo/swiper/issues/382][#382]].
+*** ivy-add-newline-after-prompt
+New defcustom.
+
+See [[https://github.com/abo-abo/swiper/issues/451][#451]].
+*** ivy-switch-buffer
+**** Add virtual views
+=ivy-views= variable stores pre-defined views. Allows to set a window
+configuration with many buffers from =ivy-switch-buffer=.
+
+How to use: just set =ivy-views= appropriately. An example value is
+provided (but nulled, so that it's empty initially).
+*** ivy-use-ignore-default
+New defcustom
+
+See [[https://github.com/abo-abo/swiper/issues/477][#477]].
+*** swiper
+**** Improve =swiper-query-replace=
+To replace a symbol with a similar symbol,
+
+1. Press ~C-s M-n~ for =swiper= and select the symbol at point as input.
+2. Press ~M-q~ for =swiper-query-replace=
+3. Press ~M-n~ to yank the symbol to replace.
+4. Edit the replacement and ~RET~.
+
+Here step-3 was modified to yank e.g. "symbol" instead of
+"\_<symbol\_>" previously.
+
+*** swiper-font-lock-exclude
+New variable for major modes that misbehave with =font-lock-ensure=.
+See [[https://github.com/abo-abo/swiper/issues/346][#346]].
+*** swiper-all
+**** New auto-updates position
+See [[https://github.com/abo-abo/swiper/issues/401][#401]].
+*** counsel-mode
+A minor-mode that remaps built-in functions that have counsel
+replacements available.
+
+See [[https://github.com/abo-abo/swiper/issues/414][#414]].
+**** Allow use of describe-prefix-bindings
+See [[https://github.com/abo-abo/swiper/issues/441][#441]].
+*** counsel-find-file
+**** Add =initial-input=
+See [[https://github.com/abo-abo/swiper/issues/336][#336]].
+**** Change tramp prompt from "Find File: " to "address@hidden: "
+**** Bind =counsel-up-directory= to ~C-DEL~
+New function that moves up to the parent directory and at the same
+time preselects the current directory. This is useful for moving up
+and down a file tree quickly.
+
+See [[https://github.com/abo-abo/swiper/issues/343][#343]].
+**** Customize =M-n= action
+This feature allows to quickly visit Github issues from either
+=magit-commit-mode= or from a version-controlled file. The point has to
+be at the "#" char in e.g. 
"[[https://github.com/abo-abo/swiper/issues/123][#123]]";, that represents an 
issue.
+
+It's possible to customize =ivy-ffap-url-functions= to do a similar
+thing for places other than Github.
+
+The ~C-x C-f M-n~ key binding will work better with =counsel-find-file=,
+for plain =find-file= it will open a =dired= buffer in addition to opening
+the URL.
+**** Can un-ignore dotfiles with a leading dot input
+When =ivy-text= starts with a dot, don't use
+=counsel-find-file-ignore-regexp=. The generic way to do this is with
+~C-c C-a~ (=ivy-toggle-ignore=), but this is faster and more convenient.
+
+See [[https://github.com/abo-abo/swiper/issues/408][#408]].
+**** Bind ~M-o f~ to =find-file-other-window=
+**** Correctly expand file name at point
+See [[https://github.com/abo-abo/swiper/issues/430][#430]].
+**** Add display transformer
+See [[https://github.com/abo-abo/swiper/issues/458][#458]].
+**** Add magic slash that changes the directory
+Update to the behavior: the slash ("/") will enter a directory even if
+its name isn't completely typed out if either:
+
+1. It's the only candidate.
+2. The candidate index isn't 0, i.e. "C-n" has been typed at least once.
+3. The input isn't "/".
+
+The above rules still allow to keep the old behavior with "//" moving
+to root and "/ssh:" opening tramp.
+
+This is an experimental feature, please report if it breaks someone's
+workflow.
+
+See [[https://github.com/abo-abo/swiper/issues/321][#321]] and 
[[https://github.com/abo-abo/swiper/issues/480][#480]].
+*** counsel-git-grep
+**** Bind ~C-c C-m~ to =counsel-git-grep-switch-cmd=
+The initial command always runs on all files.
+
+To run only on *.el files, ~C-c C-m~ followed by ~M-i~ =-- *.el=.
+To run on *.c and *.h files, ~C-c C-m~ followed by ~M-i~ =-- *.c *.h=.
+To switch to all files again, ~C-c C-m~ and select the appropriate
+entry.
+
+See [[https://github.com/abo-abo/swiper/issues/420][#420]].
+*** counsel-locate
+**** counsel-locate-cmd
+New defcustom that replaces =counsel-locate-options=.
+
+See [[https://github.com/abo-abo/swiper/issues/385][#385]].
+**** counsel-locate-cmd-mdfind
+New function.
+See [[https://github.com/abo-abo/swiper/issues/390][#390]].
+**** counsel-locate-cmd-es
+New function.
+See [[https://github.com/abo-abo/swiper/issues/426][#426]].
+*** counsel-yank-pop
+**** Truncate during display
+During the completion, only the context around the match will be shown.
+By default, the context is +2 lines above and +2 lines below the match.
+It can be adjusted with =counsel-yank-pop-truncate-radius=.
+Additionally, =ivy-height= is temporarily bound to 5 during completion.
+This way, the maximum minibuffer height should be 1+4*5=21 lines.
+
+See [[https://github.com/abo-abo/swiper/issues/315][#315]].
+*** counsel-unicode-char
+Display hex codes in left column.
+*** counsel-rhythmbox
+**** Preselect the current song
+*** counsel-ag
+**** =counsel-ag-base-command=
+Allows the command run by =counsel-ag-function= to be customized. There
+are several reasons to allow this: The vimgrep option is a recent
+addition; on windows it's more convenient to use pt; and the user
+might want to customize ignored files.
+
+Standard value:
+#+begin_src elisp
+(setq counsel-ag-base-command "ag --nocolor --nogroup %s -- .")
+#+end_src
+
+See [[https://github.com/abo-abo/swiper/issues/335][#335]].
+**** Add dir prompt for ~C-u~
+See [[https://github.com/abo-abo/swiper/issues/429][#429]].
+**** Add =counsel-ag-map=
+See [[https://github.com/abo-abo/swiper/issues/462][#462]].
+*** counsel-async-split-string-re
+New defcustom.
+*** counsel--async-cmd
+**** Add optional exit-code table
+This argument can be used to associate exit codes with the underlying
+reason. Used in counsel-ag-function to signal that an exit code of 1
+means that no matches were found.
+
+See [[https://github.com/abo-abo/swiper/issues/421][#421]].
+*** counsel-prompt-function
+New defcustom
+
+See [[https://github.com/abo-abo/swiper/issues/424][#424]] and 
[[https://github.com/abo-abo/swiper/issues/425][#425]].
+*** counsel-grep
+**** Reveal outlines
+Just like =swiper=.
+**** Should pick candidates closest to point
+Fixes the algorithm selecting the first matching candidate in case
+there are 0 matching candidates following point. Now the last matching
+candidate will be selected, resulting in less scrolling.
+**** Speed up x40 times
+The default shell command will not use =--ignore-case= switch for
+=grep=. It's a bit less convenient, but results in a huge speed-up.
+*** counsel-M-x
+**** Add help action
+Bound to ~M-o h~ by default.
+
+See [[https://github.com/abo-abo/swiper/issues/452][#452]].
+** New Commands
+*** =counsel-tmm=
+Completion for the menu bar items. For example:
+
+=counsel-tmm= -> =Options= -> =Set Default Font...=.
+
+Thanks to completion, the latter stages of the chain would look like: =op= 
~RET~ =set= ~RET~.
+*** =counsel-imenu=
+Jump to a buffer position indexed by imenu.
+*** =counsel-decbinds=
+Show a list of all defined keys, and their definitions. Describe the
+selected candidate.
+See [[https://github.com/abo-abo/swiper/issues/332][#332]].
+*** =counsel-list-processes=
+Offer completion for =process-list=
+
+The default action deletes the selected process.  An extra action
+allows to switch to the process buffer.
+
+See [[https://github.com/abo-abo/swiper/issues/357][#357]] and 
[[https://github.com/abo-abo/swiper/issues/398][#398]].
+*** =ivy-switch-buffer-other-window=
+Remap =switch-to-buffer-other-window= to =ivy-switch-buffer-other-window= for 
=ivy-mode=.
+
+See [[https://github.com/abo-abo/swiper/issues/361][#361]].
+*** =counsel-git-stash=
+Search through all available git stashes.
+
+See [[https://github.com/abo-abo/swiper/issues/374][#374]].
+*** =counsel-git-log=
+Call the =git log --grep= shell command and search through the output.
+*** =counsel-pt=
+Grep for a string in the current directory using pt.
+
+See [[https://github.com/abo-abo/swiper/issues/434][#434]].
+*** =counsel-linux-app=
+Launch a Linux desktop application, similar to Alt-<F2>.
+
+See [[https://github.com/abo-abo/swiper/issues/446][#446]].
+*** =counsel-ace-link=
+Ivy completion for =ace-link=.
+*** =counsel-esh-history=
+Browse Eshell history.
+
+See [[https://github.com/abo-abo/swiper/issues/459][#459]].
+*** =counsel-shell-history=
+Browse shell history.
+*** =counsel-grep-or-swiper=
+New command: automatically use =swiper= for smaller buffers and
+=counsel-grep= for larger buffers.
+
+Adjust with:
+#+begin_src elisp
+(setq counsel-grep-swiper-limit 300000)
+#+end_src
+
+By default, the splitting predicate is 300K bytes in a file.
diff --git a/packages/ivy/doc/ivy-help.org b/packages/ivy/doc/ivy-help.org
new file mode 100644
index 0000000..989c0e4
--- /dev/null
+++ b/packages/ivy/doc/ivy-help.org
@@ -0,0 +1,138 @@
+* Ivy Generic Help
+
+=ivy= is an Emacs incremental completion framework.
+
+- Narrow the list by typing some pattern,
+- Multiple patterns are allowed by separating with a space,
+- Select with ~C-n~ and ~C-p~, choose with ~RET~.
+
+** Help
+
+- ~C-h m~ :: Pop to this generic help buffer.
+
+** Basic Operations
+*** Key bindings for navigation
+
+- ~C-n~ (=ivy-next-line=) :: next candidate.
+- ~C-p~ (=ivy-previous-line=) :: previous candidate.
+- ~C-v~ (=ivy-scroll-up-command=) :: next page.
+- ~M-v~ (=ivy-scroll-down-command=) :: previous page.
+- ~M-<~ (=ivy-beginning-of-buffer=) :: first candidate.
+- ~M->~ (=ivy-end-of-buffer=) :: last candidate.
+
+*** Key bindings for single selection
+
+When selecting a candidate, an action is called on it. You can think
+of an action as a function that takes the selected candidate as an
+argument and does something with it.
+
+Ivy can offer several actions from which to choose. This can be
+independently composed with whether you want to end completion when
+the action is called. Depending on this, the short term is either
+"calling an action" or "exiting with action".
+
+~C-m~ or ~RET~ (=ivy-done=) - exit with the current action.
+
+~M-o~ (=ivy-dispatching-done=) - select an action and exit with it.
+
+~C-j~ (=ivy-alt-done=) - when the candidate is a directory, enter
+it. Otherwise, exit with the current action.
+
+~TAB~ (=ivy-partial-or-done=) - attempt partial completion, extending
+the current input as much as possible. ~TAB TAB~ is the same as ~C-j~.
+
+~C-M-j~ (=ivy-immediate-done=) - exit with the current action, calling
+it on the /current input/ instead of the current candidate. This is
+useful especially when creating new files or directories - often the
+input will match an existing file, which you don't want to select.
+
+~C-'~ (=ivy-avy=) - select a candidate from the current page with avy
+and exit with the current action.
+
+** Advanced Operations
+*** Key bindings for multiple selection
+
+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 ~C-m~ (=ivy-done=).
+
+~C-M-n~ (=ivy-next-line-and-call=) combines ~C-n~ and ~C-M-m~.
+
+~C-M-p~ (=ivy-previous-line-and-call=) combines ~C-p~ and ~C-M-m~.
+
+~C-M-o~ (=ivy-dispatching-call=) is a non-exiting version of ~M-o~
+(=ivy-dispatching-done=).
+
+*** Key bindings that alter the minibuffer input
+
+~M-n~ (=ivy-next-history-element=) select the next history element or
+symbol/URL at point.
+
+~M-p~ (=ivy-previous-history-element=) select the previous history
+element.
+
+~C-r~ (=ivy-reverse-i-search=) start a recursive completion session to
+select a history element.
+
+~M-i~ (=ivy-insert-current=) insert 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=) insert the sub-word at point into the
+minibuffer.
+
+~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.
+
+*** Other key bindings
+
+~M-w~ (=ivy-kill-ring-save=) copies the selected candidates to the
+kill ring; when the region is active, copies the active region.
+
+*** 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$*=.
+
+*** Global key bindings
+
+=ivy-resume= recalls the state of the completion session just before
+its last exit. Useful after an accidental ~C-m~ (=ivy-done=).
+Recommended global binding: ~C-c C-r~.
+
+*** Hydra in the minibuffer
+
+~C-o~ (=hydra-ivy/body=) invokes Hydra menus with key shortcuts.
+
+When in Hydra, ~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. Besides certain shorter keys, Hydra shows useful info
+such as case folding and the current action.
+
+Additionally, here are the keys that are otherwise not bound:
+
+- ~<~ and ~>~ adjust the height of the minibuffer.
+- ~c~ (=ivy-toggle-calling=) - toggle calling the current action each
+  time a different candidate is selected.
+- ~m~ (=ivy-toggle-fuzzy=) - toggle regex matcher.
+- ~w~ and ~s~ scroll the actions list.
+
+Minibuffer editing is disabled when Hydra is active.
diff --git a/packages/ivy/doc/ivy-ox.el b/packages/ivy/doc/ivy-ox.el
new file mode 100644
index 0000000..cb69c7f
--- /dev/null
+++ b/packages/ivy/doc/ivy-ox.el
@@ -0,0 +1,193 @@
+;;; ivy-ox.el --- org-export settings for Ivy
+
+;; Copyright (C) 2015  Free Software Foundation, Inc.
+
+;; Author: Oleh Krehel
+
+;; This file is part of GNU Emacs.
+
+;; This file 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, 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.
+
+;; For a full copy of the GNU General Public License
+;; see <http://www.gnu.org/licenses/>.
+
+;;* ox-texinfo
+(require 'ox-texinfo)
+(org-export-define-backend 'texinfo
+  '((bold . org-texinfo-bold)
+    (center-block . org-texinfo-center-block)
+    (clock . org-texinfo-clock)
+    (code . org-texinfo-kbd)
+    (drawer . org-texinfo-drawer)
+    (dynamic-block . org-texinfo-dynamic-block)
+    (entity . org-texinfo-entity)
+    (example-block . org-texinfo-example-block)
+    (export-block . org-texinfo-export-block)
+    (export-snippet . org-texinfo-export-snippet)
+    (fixed-width . org-texinfo-fixed-width)
+    (footnote-definition . org-texinfo-footnote-definition)
+    (footnote-reference . org-texinfo-footnote-reference)
+    (headline . org-texinfo-headline)
+    (inline-src-block . org-texinfo-inline-src-block)
+    (inlinetask . org-texinfo-inlinetask)
+    (italic . org-texinfo-italic)
+    (item . org-texinfo-item)
+    (keyword . org-texinfo-keyword)
+    (line-break . org-texinfo-line-break)
+    (link . org-texinfo-link)
+    (node-property . org-texinfo-node-property)
+    (paragraph . org-texinfo-paragraph)
+    (plain-list . org-texinfo-plain-list)
+    (plain-text . org-texinfo-plain-text)
+    (planning . org-texinfo-planning)
+    (property-drawer . org-texinfo-property-drawer)
+    (quote-block . org-texinfo-quote-block)
+    (radio-target . org-texinfo-radio-target)
+    (section . org-texinfo-section)
+    (special-block . org-texinfo-special-block)
+    (src-block . org-texinfo-src-block)
+    (statistics-cookie . org-texinfo-statistics-cookie)
+    (subscript . org-texinfo-subscript)
+    (superscript . org-texinfo-superscript)
+    (table . org-texinfo-table)
+    (table-cell . org-texinfo-table-cell)
+    (table-row . org-texinfo-table-row)
+    (target . org-texinfo-target)
+    (template . org-texinfo-template)
+    (timestamp . org-texinfo-timestamp)
+    (verbatim . org-texinfo-code)
+    (verse-block . org-texinfo-verse-block))
+  :filters-alist
+  '((:filter-headline . org-texinfo--filter-section-blank-lines)
+    (:filter-parse-tree . org-texinfo--normalize-headlines)
+    (:filter-section . org-texinfo--filter-section-blank-lines))
+  :menu-entry
+  '(?i "Export to Texinfo"
+    ((?t "As TEXI file" org-texinfo-export-to-texinfo)
+     (?i "As INFO file" org-texinfo-export-to-info)
+     (?o "As INFO file and open"
+      (lambda (a s v b)
+        (if a (org-texinfo-export-to-info t s v b)
+          (org-open-file (org-texinfo-export-to-info nil s v b)))))))
+  :options-alist
+  '((:texinfo-filename "TEXINFO_FILENAME" nil nil t)
+    (:texinfo-class "TEXINFO_CLASS" nil org-texinfo-default-class t)
+    (:texinfo-header "TEXINFO_HEADER" nil nil newline)
+    (:texinfo-post-header "TEXINFO_POST_HEADER" nil nil newline)
+    (:subtitle "SUBTITLE" nil nil parse)
+    (:subauthor "SUBAUTHOR" nil nil newline)
+    (:texinfo-dircat "TEXINFO_DIR_CATEGORY" nil nil t)
+    (:texinfo-dirtitle "TEXINFO_DIR_TITLE" nil nil t)
+    (:texinfo-dirdesc "TEXINFO_DIR_DESC" nil nil t)
+    (:texinfo-printed-title "TEXINFO_PRINTED_TITLE" nil nil t)
+    ;; Other variables.
+    (:texinfo-classes nil nil org-texinfo-classes)
+    (:texinfo-format-headline-function nil nil 
org-texinfo-format-headline-function)
+    (:texinfo-node-description-column nil nil 
org-texinfo-node-description-column)
+    (:texinfo-active-timestamp-format nil nil 
org-texinfo-active-timestamp-format)
+    (:texinfo-inactive-timestamp-format nil nil 
org-texinfo-inactive-timestamp-format)
+    (:texinfo-diary-timestamp-format nil nil 
org-texinfo-diary-timestamp-format)
+    (:texinfo-link-with-unknown-path-format nil nil 
org-texinfo-link-with-unknown-path-format)
+    (:texinfo-tables-verbatim nil nil org-texinfo-tables-verbatim)
+    (:texinfo-table-scientific-notation nil nil 
org-texinfo-table-scientific-notation)
+    (:texinfo-def-table-markup nil nil org-texinfo-def-table-markup)
+    (:texinfo-text-markup-alist nil nil org-texinfo-text-markup-alist)
+    (:texinfo-format-drawer-function nil nil 
org-texinfo-format-drawer-function)
+    (:texinfo-format-inlinetask-function nil nil 
org-texinfo-format-inlinetask-function)))
+
+(defun org-texinfo-kbd (code _contents _info)
+  "Transcode a CODE object from Org to Texinfo."
+  (format "@kbd{%s}" (org-element-property :value code)))
+
+(defun org-texinfo-plain-list (plain-list contents info)
+  "Transcode a PLAIN-LIST element from Org to Texinfo.
+CONTENTS is the contents of the list.  INFO is a plist holding
+contextual information."
+  (let* ((attr (org-export-read-attribute :attr_texinfo plain-list))
+         (indic (or (plist-get attr :indic)
+                    (plist-get info :texinfo-def-table-markup)))
+         (table-type (plist-get attr :table-type))
+         (type (org-element-property :type plain-list))
+         (list-type (cond
+                      ((eq type 'ordered) "enumerate")
+                      ((eq type 'unordered) "itemize")
+                      ((member table-type '("ftable" "vtable")) table-type)
+                      (t "table"))))
+    (if (equal list-type "table")
+        (mapconcat (lambda (s)
+                     (cond ((string-match "\\`User Option @code{\\(.*\\)}$" s)
+                            (format "@defopt address@hidden defopt\n"
+                                    (match-string-no-properties 1 s)
+                                    (string-trim
+                                     (substring s (1+ (match-end 1))))))
+                           ((string-match "\\(.*\\)$" s)
+                            (let* ((line (match-string 1 s))
+                                   (body (string-trim
+                                          (substring s (1+ (match-end 1)))))
+                                   (symbol-index
+                                    (if (string-match 
"@code{\\(\\(?:ivy\\|swiper\\|counsel\\)-[^}]+\\)}" line)
+                                        (format "@vindex %s\n" (match-string 1 
line))
+                                      ""))
+                                   (key-index
+                                    (apply #'concat
+                                           (mapcar
+                                            (lambda (s)
+                                              (format "@kindex %s\n" s))
+                                            (iox-extract-kbd line)))))
+                              (format "@subsubheading address@hidden@end 
indentedblock"
+                                      line
+                                      (concat symbol-index
+                                              key-index)
+                                      body)))
+                           (t
+                            (concat "@subsubheading " s))))
+                   (split-string (substring-no-properties contents) 
"address@hidden " t)
+                   "\n")
+      (format "@address@hidden %s"
+              (if (eq type 'descriptive) (concat list-type " " indic) 
list-type)
+              contents
+              list-type))))
+
+(defun iox-extract-kbd (str)
+  (let ((start 0)
+        res)
+    (while (string-match "@kbd{\\([^}]+\\)}" str start)
+      (setq start (match-end 0))
+      (push (match-string 1 str) res))
+    (nreverse res)))
+
+;;* ox-html
+(require 'ox-html)
+(setq org-html-validation-link nil)
+(setq org-html-postamble nil)
+(setq org-html-text-markup-alist
+      '((bold . "<b>%s</b>")
+        (code . "<kbd>%s</kbd>")
+        (italic . "<i>%s</i>")
+        (strike-through . "<del>%s</del>")
+        (underline . "<span class=\"underline\">%s</span>")
+        (verbatim . "<code>%s</code>")))
+(setq org-html-style-default nil)
+
+(defvar ivy-info-dir (file-name-directory
+                      (or load-file-name
+                          (buffer-file-name))))
+
+(defun info-ivy ()
+  (interactive)
+  (let ((buf (get-buffer "*info*")))
+    (when buf
+      (kill-buffer buf)))
+  (Info-find-node
+   (expand-file-name "ivy.info" ivy-info-dir)
+   "Top"))
+
+(provide 'ivy-ox)
diff --git a/packages/ivy/doc/ivy.org b/packages/ivy/doc/ivy.org
new file mode 100644
index 0000000..8c0f357
--- /dev/null
+++ b/packages/ivy/doc/ivy.org
@@ -0,0 +1,1285 @@
+#+TITLE: Ivy User Manual
+#+AUTHOR: Oleh Krehel
+#+EMAIL: address@hidden
+#+LANGUAGE: en
+
+#+TEXINFO_DIR_CATEGORY: Emacs
+#+TEXINFO_DIR_TITLE: Ivy: (ivy).
+#+TEXINFO_DIR_DESC: Using Ivy for completion.
+#+SETUPFILE: ~/git/org-html-themes/setup/theme-readtheorg.setup
+#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="kbd-style.css"/>
+#+OPTIONS: H:6 num:6 toc:4
+#+STARTUP: indent
+* Setup                                                                        
       :noexport:
+#+BEGIN_SRC elisp :exports results :results silent
+(add-to-list 'load-path default-directory)
+(require 'ivy-ox)
+#+END_SRC
+* Writing this manual                                                          
       :noexport:
+To highlight a section without introducing a new subheading use
+definition lists. The definition list "owns" the subsequent text if
+the text is indented by 5 spaces. Use ~C-q~ to indent the
+paragraphs. Start new paragraphs with 5 spaces indented. To separate
+definition lists from regular lists, use two newlines.
+
+A typical definition list:
+#+BEGIN_EXAMPLE
+- ~C-M-j~ (=ivy-immediate-done=) ::
+#+END_EXAMPLE
+The code and kbd part is recognized and added as address@hidden and
address@hidden respectively.
+
+Use definition lists to declare a address@hidden section for =defcustom=
+or =defvar=. For proper Texinfo export, use this form:
+
+#+BEGIN_EXAMPLE
+User Option =ivy-wrap= ::
+#+END_EXAMPLE
+
+Set =CUSTOM_ID= property to name each heading. For example, =worf='s
+~C-u L~. This will result in consistent HTML node names.
+
+Keep one empty line before each source block for proper Texinfo
+exports.
+* Copying
+:PROPERTIES:
+:COPYING:  t
+:CUSTOM_ID: copying
+:END:
+#+TEXINFO: @ifnottex
+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, =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.
+#+TEXINFO: @end ifnottex
+
+Copyright (C) 2015 Free Software Foundation, Inc.
+
+#+BEGIN_QUOTE
+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.''
+#+END_QUOTE
+
+#+HTML: <a 
href="https://github.com/abo-abo/swiper/blob/master/doc/ivy.org";>This manual 
source</a>
+* Introduction
+:PROPERTIES:
+:CUSTOM_ID: introduction
+:END:
+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.
+
+- Minimalism ::
+     Uncluttered minibuffer is minimalism. Ivy shows the completion
+     defaults, the number of matches, and 10 candidate matches below
+     the input line. Customize =ivy-height= to adjust the number of
+     candidate matches displayed in the minibuffer.
+
+- 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 =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.
+
+- 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 =->=, 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.
+
+- Discoverability ::
+     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
+:PROPERTIES:
+:CUSTOM_ID: installation
+:END:
+
+Install Ivy automatically through Emacs's package manager, or manually
+from Ivy's development repository.
+
+Emacs 24.3.1 is the oldest version to run Ivy. Emacs 24.5.1 is the
+oldest version that runs Ivy with fancy faces display.
+
+** Installing from Emacs Package Manager
+:PROPERTIES:
+:CUSTOM_ID: installing-from-emacs-package-manager
+:END:
+
+~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
+:PROPERTIES:
+:CUSTOM_ID: installing-from-the-git-repository
+:END:
+
+- 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 with:
+
+     #+begin_src sh
+     cd ~/git && git clone https://github.com/abo-abo/swiper
+     cd swiper && make compile
+     #+end_src
+
+     Second, add these lines to the Emacs init file:
+
+     #+begin_src elisp
+     (add-to-list 'load-path "~/git/swiper/")
+     (require 'ivy)
+     #+end_src
+
+     Then, update the code with:
+
+     #+begin_src sh
+     git pull
+     make
+     #+end_src
+
+* Getting started
+:PROPERTIES:
+:CUSTOM_ID: getting-started
+:END:
+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
+:PROPERTIES:
+:CUSTOM_ID: basic-customization
+:END:
+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-count-format "(%d/%d) ")
+#+end_src
+
+If you want, you can go without any customizations at all. The above
+settings are the most bang for the buck in terms of customization.  So
+users that typically don't like customize a lot are advised to look at
+these settings first.
+
+For more advanced customizations, refer to =M-x describe-variable=
+documentation.
+
+* Key bindings
+:PROPERTIES:
+:CUSTOM_ID: key-bindings
+:END:
+** Global key bindings
+:PROPERTIES:
+:CUSTOM_ID: global-key-bindings
+:END:
+The recommended key bindings are:
+
+- Ivy-based interface to standard commands ::
+
+     #+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
+
+- Ivy-based interface to shell and system tools ::
+
+     #+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
+
+- Ivy-resume and other commands ::
+
+     =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
+:PROPERTIES:
+:CUSTOM_ID: minibuffer-key-bindings
+:END:
+
+#+VINDEX: ivy-minibuffer-map
+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 key bindings through the =keymap=
+argument to =ivy-read=. These keys, also active in the minibuffer, are
+described under their respective commands.
+
+A key feature of =ivy-minibuffer-map= is its full editing capability
+where the familiar ~C-a~, ~C-f~, ~M-d~, ~M-DEL~, ~M-b~, ~M-w~, ~C-k~,
+~C-y~ key bindings work the same as in =fundamental-mode=.
+
+*** Key bindings for navigation
+:PROPERTIES:
+:CUSTOM_ID: key-bindings-for-navigation
+:END:
+
+- ~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
+
+
+- User Option =ivy-wrap= ::
+     Specifies the wrap-around behavior for ~C-n~ and ~C-p~. When
+     =ivy-wrap= is set to =t=, =ivy-next-line= and =ivy-previous-line=
+     will cycle past the last and the first candidates respectively.
+
+     Warp-around behavior is off by default.
+
+- User Option =ivy-height= ::
+     Use this option to adjust the minibuffer height, which also
+     affects scroll size when using ~C-v~ and ~M-v~ key bindings.
+
+     =ivy-height= is 10 lines by default.
+
+*** Key bindings for single selection, action, then exit minibuffer
+:PROPERTIES:
+:CUSTOM_ID: key-bindings-for-single-selection-action-then-exit-minibuffer
+:END:
+
+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 then exits the minibuffer.
+
+- ~M-o~ (=ivy-dispatching-done=) ::
+     Presents valid actions from which to choose. When only one action
+     is available, there is no difference between ~M-o~ and ~C-m~.
+
+- ~C-j~ (=ivy-alt-done=) ::
+     When completing file names, selects the current directory
+     candidate and starts a new completion session there. Otherwise,
+     it is the same as =ivy-done=.
+
+- ~TAB~ (=ivy-partial-or-done=) ::
+     Attempts partial completion, extending current input as much as
+     possible. ~TAB TAB~ is the same as ~C-j~ (=ivy-alt-done=).
+
+     Example ERT test:
+
+     #+begin_src elisp
+     (should
+      (equal (ivy-with
+              '(progn
+                (ivy-read "Test: " '("can do" "can't, sorry" "other"))
+                ivy-text)
+              "c <tab>")
+             "can"))
+     #+end_src
+
+- ~C-M-j~ (=ivy-immediate-done=) ::
+     Exits with /the current input/ instead of /the current candidate/
+     (like other commands).
+
+     This is useful e.g. when you call =find-file= to create a new
+     file, but the desired name matches an existing file. In that
+     case, using ~C-j~ would select that existing file, which isn't
+     what you want - use this command instead.
+
+- ~C-'~ (=ivy-avy=) ::
+     Uses avy to select one of the candidates on the current candidate
+     page.  This can often be faster than multiple ~C-n~ or ~C-p~
+     keystrokes followed by ~C-m~.
+
+*** Key bindings for multiple selections and actions, keep minibuffer open
+:PROPERTIES:
+:CUSTOM_ID: 
key-bindings-for-multiple-selections-and-actions-keep-minibuffer-open
+:END:
+
+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 ~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.
+
+- ~C-M-o~ (=ivy-dispatching-call=) ::
+     Is the non-exiting version of ~M-o~ (=ivy-dispatching-done=).
+
+     For example, during the =counsel-rhythmbox= completion, press
+     ~C-M-o e~ to en-queue the selected candidate, followed by ~C-n
+     C-m~ to play the next candidate - the current action reverts to
+     the default one after ~C-M-o~.
+
+- ~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~.
+
+     Similar to the above except it moves through the list in the
+     other direction.
+
+- =ivy-resume= ::
+     Recalls the state of the completion session just before its last
+     exit.
+
+     Useful after an accidental ~C-m~ (=ivy-done=).
+
+*** Key bindings that alter the minibuffer input
+:PROPERTIES:
+:CUSTOM_ID: key-bindings-that-alter-the-minibuffer-input
+:END:
+
+- ~M-n~ (=ivy-next-history-element=) ::
+     Cycles forward 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-p~ (=ivy-previous-history-element=) ::
+     Cycles forward through the Ivy command history.
+
+- ~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 the sub-word at point into the 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=) ::
+     Starts a recursive completion session through the command's
+     history.
+
+     This works just like ~C-r~ at the 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
+:PROPERTIES:
+:CUSTOM_ID: other-key-bindings
+:END:
+
+- ~M-w~ (=ivy-kill-ring-save=) ::
+     Copies selected candidates to the kill ring.
+
+     Copies the region if the region is active.
+
+*** Hydra in the minibuffer
+:PROPERTIES:
+:CUSTOM_ID: hydra-in-the-minibuffer
+:END:
+
+- ~C-o~ (=hydra-ivy/body=) ::
+     Invokes the hydra menu with short key bindings.
+
+When Hydra is active, minibuffer editing is disabled and menus
+display short aliases:
+
+| Short | Normal    | Command name              |
+|-------+-----------+---------------------------|
+| ~o~   | ~C-g~     | =keyboard-escape-quit=    |
+| ~j~   | ~C-n~     | =ivy-next-line=           |
+| ~k~   | ~C-p~     | =ivy-previous-line=       |
+| ~h~   | ~M-<~     | =ivy-beginning-of-buffer= |
+| ~l~   | ~M->~     | =ivy-end-of-buffer=       |
+| ~d~   | ~C-m~     | =ivy-done=                |
+| ~f~   | ~C-j~     | =ivy-alt-done=            |
+| ~g~   | ~C-M-m~   | =ivy-call=                |
+| ~u~   | ~C-c C-o~ | =ivy-occur=               |
+
+Hydra reduces key strokes, for example: ~C-n C-n C-n C-n~ is ~C-o
+jjjj~ in Hydra.
+
+Hydra menu offers these additioanl bindings:
+
+- ~c~ (=ivy-toggle-calling=) ::
+     Toggle calling the action after each candidate change. It
+     modifies ~j~ to ~jg~, ~k~ to ~kg~ etc.
+
+- ~m~ (=ivy-toggle-fuzzy=) ::
+     Toggle the current regexp matcher.
+
+- ~>~ (=ivy-minibuffer-grow=) ::
+     Increase =ivy-height= for the current minibuffer.
+
+- ~<~ (=ivy-minibuffer-shrink=) ::
+     Decrease =ivy-height= for the current minibuffer.
+
+- ~w~ (=ivy-prev-action=) ::
+     Select the previous action.
+
+- ~s~ (=ivy-next-action=) ::
+     Select the next action.
+
+- ~a~ (=ivy-read-action=) ::
+     Use a menu to select an action.
+
+- ~C~ (=ivy-toggle-case-fold=) ::
+     Toggle case folding (match both upper and lower case
+     characters for lower case input).
+
+*** Saving the current completion session to a buffer
+:PROPERTIES:
+:CUSTOM_ID: saving-the-current-completion-session-to-a-buffer
+:END:
+
+- ~C-c C-o~ (=ivy-occur=) ::
+     Saves the current candidates to a new buffer and exits
+     completion.
+
+The new buffer is read-only and has a few useful bindings defined.
+
+- ~RET~ or ~j~ (=ivy-occur-press=) ::
+     Call the current action on the selected candidate.
+
+- ~mouse-1~ (=ivy-occur-click=) ::
+     Call the current action on the selected candidate.
+
+- ~j~ (=next-line=) ::
+     Move to next line.
+
+- ~k~ (=previous-line=) ::
+     Move to previous line.
+
+- ~a~ (=ivy-occur-read-action=) ::
+     Read an action and make it current for this buffer.
+
+- ~o~ (=ivy-occur-dispatch=) ::
+     Read an action and call it on the selected candidate.
+
+- ~q~ (=quit-window=) ::
+     Bury the current buffer.
+
+
+Ivy has no limit on the number of active buffers like these.
+
+Ivy takes care of naming buffers uniquely by constructing descriptive
+names. For example: =*ivy-occur counsel-describe-variable
+"function$*=.
+
+* Completion Styles
+:PROPERTIES:
+:CUSTOM_ID: completion-styles
+:END:
+
+Ivy's completion functions rely on a regex builder - a function that
+transforms a string input to a string regex. All current candidates
+simply have to match this regex. Each collection can be assigned its
+own regex builder by customizing =ivy-re-builders-alist=.
+
+The keys of this alist are collection names, and the values are one of
+the following:
+- =ivy--regex=
+- =ivy--regex-plus=
+- =ivy--regex-ignore-order=
+- =ivy--regex-fuzzy=
+- =regexp-quote=
+
+A catch-all key, =t=, applies to all collections that don't have their
+own key.
+
+The default is:
+
+#+begin_src elisp
+(setq ivy-re-builders-alist
+      '((t . ivy--regex-plus)))
+#+end_src
+
+This example shows a custom regex builder assigned to file name
+completion:
+
+#+begin_src elisp
+(setq ivy-re-builders-alist
+      '((read-file-name-internal . ivy--regex-fuzzy)
+        (t . ivy--regex-plus)))
+#+end_src
+
+Here, =read-file-name-internal= is a function that is passed as the
+second argument to =completing-read= for file name completion.
+
+The regex builder resolves as follows (in order of priority):
+1. =re-builder= argument passed to =ivy-read=.
+2. =collection= argument passed to =ivy-read= is a function and has an
+   entry on =ivy-re-builders-alist=.
+3. =caller= argument passed to =ivy-read= has an entry on
+   =ivy-re-builders-alist=.
+4. =this-command= has an entry on =ivy-re-builders-alist=.
+5. =t= has an entry on =ivy-re-builders-alist=.
+6. =ivy--regex=.
+
+** ivy--regex-plus
+:PROPERTIES:
+:CUSTOM_ID: ivy--regex-plus
+:END:
+
+=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 valid regex syntax. If the string is ="for example"=, it is
+transformed into
+
+#+begin_src elisp
+"\\(for\\).*\\(example\\)"
+#+end_src
+
+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. To match a literal white space, use an extra space. So 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.
+
+Since Ivy treats minibuffer input as a regexp, the standard regexp
+identifiers work: ="^"=, ="$"=, ="\b"= or ="[a-z]"=. The exceptions
+are spaces, which translate to =".*"=, and ="!"= that signal the
+beginning of a negation group.
+
+** ivy--regex-ignore-order
+:PROPERTIES:
+:CUSTOM_ID: ivy--regex-ignore-order
+:END:
+
+=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"=.
+
+** ivy--regex-fuzzy
+:PROPERTIES:
+:CUSTOM_ID: ivy--regex-fuzzy
+:END:
+
+=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.
+
+~C-o m~ toggles the current regexp builder.
+
+
+* Customization
+:PROPERTIES:
+:CUSTOM_ID: customization
+:END:
+** Faces
+:PROPERTIES:
+:CUSTOM_ID: faces
+:END:
+- =ivy-current-match= ::
+     Highlights the currently selected candidate.
+- =ivy-minibuffer-match-face-1= ::
+     Highlights the background of the match.
+- =ivy-minibuffer-match-face-2= ::
+     Highlights the first (modulo 3) matched group.
+- =ivy-minibuffer-match-face-3= ::
+     Highlights the second (modulo 3) matched group.
+- =ivy-minibuffer-match-face-4= ::
+     Highlights the third (modulo 3) matched group.
+- =ivy-confirm-face= ::
+     Highlights the "(confirm)" part of the prompt.
+
+     When =confirm-nonexistent-file-or-buffer= set to =t=, then
+     confirming non-existent files in =ivy-mode= requires an
+     additional ~RET~.
+
+     The confirmation prompt will use this face.
+
+     For example:
+
+     #+begin_src elisp
+     (setq confirm-nonexistent-file-or-buffer t)
+     #+end_src
+
+     Then call =find-file=, enter "eldorado" and press ~RET~ - the
+     prompt will be appended with "(confirm)". Press ~RET~ once more
+     to confirm, or any key to continue the completion.
+- =ivy-match-required-face= ::
+     Highlights the "(match required)" part of the prompt.
+
+     When completions have to match available candidates and cannot
+     take random input, the "(match required)" prompt signals this
+     constraint.
+
+     For example, call =describe-variable=, enter "waldo" and press
+     ~RET~ - "(match required)" is prompted.
+     Press any key for the prompt to disappear.
+- =ivy-subdir= ::
+     Highlights directories when completing file names.
+- =ivy-remote= ::
+     Highlights remote files when completing file names.
+- =ivy-virtual= ::
+     Highlights virtual buffers when completing buffer names.
+
+     Virtual buffers correspond to bookmarks and recent files list,
+     =recentf=.
+
+     Enable virtual buffers with:
+
+     #+begin_src elisp
+     (setq ivy-use-virtual-buffers t)
+     #+end_src
+** Defcustoms
+:PROPERTIES:
+:CUSTOM_ID: defcustoms
+:END:
+- User Option =ivy-count-format= ::
+     A string that specifies display of number of candidates and
+     current candidate, if one exists.
+
+     The number of matching candidates by default is shown as a right-
+     padded integer value.
+
+     To disable showing the number of candidates:
+
+     #+begin_src elisp
+     (setq ivy-count-format "")
+     #+end_src
+
+     To also display the current candidate:
+
+     #+begin_src elisp
+     (setq ivy-count-format "(%d/%d) ")
+     #+end_src
+
+     The =format=-style switches this variable uses are described
+     in the =format= documentation.
+
+- User Option =ivy-display-style= ::
+     Specifies highlighting candidates in the minibuffer.
+
+     The default setting is ='fancy= and valid only in Emacs versions
+     24.5 or newer.
+
+     Set =ivy-display-style= to =nil= for a plain minibuffer.
+
+- User Option =ivy-on-del-error-function= ::
+     Specify what when ~DEL~ (=ivy-backward-delete-char=) throws.
+
+     The default behavior is to quit the completion after ~DEL~ -- a
+     handy key to invoke after mistakenly triggering a completion.
+
+** Actions
+:PROPERTIES:
+:CUSTOM_ID: actions
+:END:
+*** What are actions?
+:PROPERTIES:
+:CUSTOM_ID: what-are-actions
+:END:
+An action is a function that is called after you select a candidate
+during completion. This function takes a single string argument, which
+is the selected candidate.
+
+- Window context when calling an action ::
+     Currently, the action is executed in the minibuffer window
+     context. This means e.g. that if you call =insert= the text will
+     be inserted into the minibuffer.
+
+     If you want to execute the action in the initial window from
+     which the completion started, use the =with-ivy-window= wrapper
+     macro.
+
+     #+begin_src elisp
+     (defun ivy-insert-action (x)
+       (with-ivy-window
+         (insert x)))
+     #+end_src
+
+*** How can different actions be called?
+:PROPERTIES:
+:CUSTOM_ID: how-can-different-actions-be-called
+:END:
+- ~C-m~ (=ivy-done=) calls the current action.
+- ~M-o~ (=ivy-dispatching-done=) presents available actions for
+  selection, calls it after selection, and then exits.
+- ~C-M-o~ (=ivy-dispatching-call=) presents available actions for
+  selection, calls it after selection, and then does not exit.
+
+*** How to modify the actions list?
+:PROPERTIES:
+:CUSTOM_ID: how-to-modify-the-actions-list
+:END:
+Currently, you can append any amount of your own actions to the
+default list of actions. This can be done either for a specific
+command, or for all commands at once.
+
+Usually, the command has only one default action. The convention is to
+use single letters when selecting a command, and the letter ~o~ is
+designated for the default command. This way, ~M-o o~ should be always
+equivalent to ~C-m~.
+
+*** Example - add two actions to each command
+:PROPERTIES:
+:CUSTOM_ID: example---add-two-actions-to-each-command
+:END:
+The first action inserts the current candidate into the Ivy window -
+the window from which =ivy-read= was called.
+
+The second action copies the current candidate to the kill ring.
+
+#+begin_src elisp
+(defun ivy-yank-action (x)
+  (kill-new x))
+
+(defun ivy-copy-to-buffer-action (x)
+  (with-ivy-window
+    (insert x)))
+
+(ivy-set-actions
+ t
+ '(("i" ivy-copy-to-buffer-action "insert")
+   ("y" ivy-yank-action "yank")))
+#+end_src
+
+Then in any completion session, ~M-o y~ invokes =ivy-yank-action=, and
+~M-o i~ invokes =ivy-copy-to-buffer-action=.
+
+**** How to undo adding the two actions
+:PROPERTIES:
+:CUSTOM_ID: how-to-undo-adding-the-two-actions
+:END:
+Since =ivy-set-actions= modifies the internal dictionary with new
+data, set the extra actions list to =nil= by assigning =nil= value to
+the =t= key as follows:
+
+#+begin_src elisp
+(ivy-set-actions t nil)
+#+end_src
+
+**** How to add actions to a specific command
+:PROPERTIES:
+:CUSTOM_ID: how-to-add-actions-to-a-specific-command
+:END:
+Use the command name as the key:
+
+#+begin_src elisp
+(ivy-set-actions
+ 'swiper
+ '(("i" ivy-copy-to-buffer-action "insert")
+   ("y" ivy-yank-action "yank")))
+#+end_src
+
+*** Example - define a new command with several actions
+:PROPERTIES:
+:CUSTOM_ID: example---define-a-new-command-with-several-actions
+:END:
+#+begin_src elisp
+(defun my-action-1 (x)
+  (message "action-1: %s" x))
+
+(defun my-action-2 (x)
+  (message "action-2: %s" x))
+
+(defun my-action-3 (x)
+  (message "action-3: %s" x))
+
+(defun my-command-with-3-actions ()
+  (interactive)
+  (ivy-read "test: " '("foo" "bar" "baz")
+            :action '(1
+                      ("o" my-action-1 "action 1")
+                      ("j" my-action-2 "action 2")
+                      ("k" my-action-3 "action 3"))))
+#+end_src
+
+The number 1 above is the index of the default action. Each
+action has its own string description for easy selection.
+
+**** Test the above function with =ivy-occur=
+:PROPERTIES:
+:CUSTOM_ID: test-the-above-function-with-ivy-occur
+:END:
+To examine each action with each candidate in a key-efficient way, try:
+
+- Call =my-command-with-3-actions=
+- Press ~C-c C-o~ to close the completion window and move to an
+  ivy-occur buffer
+- Press ~kkk~ to move to the first candidate, since the point is most
+  likely at the end of the buffer
+- Press ~oo~ to call the first action
+- Press ~oj~ and ~ok~ to call the second and the third actions
+- Press ~j~ to move to the next candidate
+- Press ~oo~, ~oj~, ~ok~
+- Press ~j~ to move to the next candidate
+- and so on...
+
+** Packages
+:PROPERTIES:
+:CUSTOM_ID: packages
+:END:
+- =org-mode= ::
+     =org-mode= versions 8.3.3 or later obey
+     =completing-read-function= (which =ivy-mode= sets). Try refiling
+     headings with similar names to appreciate =ivy-mode=.
+- =magit= ::
+     Magit requries this setting for ivy completion:
+
+     #+begin_src elisp
+     (setq magit-completing-read-function 'ivy-completing-read)
+     #+end_src
+- =find-file-in-project= ::
+     It uses ivy by default if Ivy is installed.
+- =projectile= ::
+     Projectile requires this seeting for ivy completion:
+
+     #+begin_src elisp
+     (setq projectile-completion-system 'ivy)
+     #+end_src
+- =helm-make= ::
+     Helm-make requires this seeting for ivy completion.
+
+     #+begin_src elisp
+     (setq helm-make-completion-method 'ivy)
+     #+end_src
+
+* Commands
+:PROPERTIES:
+:CUSTOM_ID: commands
+:END:
+** File Name Completion
+:PROPERTIES:
+:CUSTOM_ID: file-name-completion
+:END:
+Since file name completion is ubiquitious, Ivy provides extra
+bindings that work here:
+
+
+- ~C-j~ (=ivy-alt-done=) ::
+     On a directory, restarts completion from that directory.
+
+     On a file or =./=, exit completion with the selected candidate.
+- ~DEL~ (=ivy-backward-delete-char=) ::
+     Restart the completion in the parent directory if current input
+     is empty.
+- ~//~ (=self-insert-command=) ::
+     Switch to the root directory.
+- ~~~ (=self-insert-command=) ::
+     Switch to the home directory.
+- ~/~ (=self-insert-command=) ::
+     If the current input matches an existing directory name exactly,
+     switch the completion to that directory.
+- ~M-q~ (=ivy-toggle-regexp-quote=) ::
+     Toggle between input as regexp or not.
+
+     Switch to matching literally since file names include =.=, which
+     is for matching any char in regexp mode.
+
+- User Option =ivy-extra-directories= ::
+     Decide if you want to see =../= and =./= during file name
+     completion.
+
+     Reason to remove: =../= is the same as ~DEL~.
+
+     Reason not to remove: navigate anywhere with only ~C-n~, ~C-p~
+     and ~C-j~.
+
+     Likewise, =./= can be removed.
+
+- Using TRAMP ::
+     From any directory, with the empty input, inputting =/ssh:= and
+     pressing ~C-j~ (or ~RET~, which is the same thing) completes for
+     host and user names.
+
+     For =/ssh:address@hidden input, completes the domain name.
+
+     ~C-i~ works in a similar way to the default completion.
+
+- History ::
+     File history works the same with ~M-p~, ~M-n~, and ~C-r~, but
+     uses a custom code for file name completion that cycles through
+     files previously opened. It also works with TRAMP files.
+
+** Buffer Name Completion
+:PROPERTIES:
+:CUSTOM_ID: buffer-name-completion
+:END:
+- User Option =ivy-use-virtual-buffers= ::
+     When non-nil, add =recentf-mode= and bookmarks to
+     =ivy-switch-buffer= completion candidates.
+
+     Adding this to Emacs init file:
+
+     #+begin_src elisp
+     (setq ivy-use-virtual-buffers t)
+     #+end_src
+     will add additional virual buffers to the buffers list for recent
+     files. Selecting such virtual buffers, which are highlighted with
+     =ivy-virtual= face, will open the corresponding file.
+
+** Counsel commands
+:PROPERTIES:
+:CUSTOM_ID: counsel-commands
+:END:
+The main advantages of =counsel-= functions over their basic
+equivalents in =ivy-mode= are:
+
+1. Multi-actions and non-exiting actions work.
+2. =ivy-resume= can resume the last completion session.
+3. Customize =ivy-set-actions=, =ivy-re-builders-alist=.
+4. Customize individual keymaps, such as =counsel-describe-map=,
+   =counsel-git-grep-map=, or =counsel-find-file-map=, instead of
+   customizing =ivy-minibuffer-map= that applies to all completion
+   sessions.
+* API
+:PROPERTIES:
+:CUSTOM_ID: api
+:END:
+The main (and only) entry point is the =ivy-read= function. It takes
+two required arguments and many optional arguments that can be passed
+by a key. The optional =:action= argument is highly recommended for
+features such as multi-actions, non-exiting actions, =ivy-occur= and
+=ivy-resume=.
+
+** Required arguments for =ivy-read=
+:PROPERTIES:
+:CUSTOM_ID: required-arguments-for-ivy-read
+:END:
+- =prompt= ::
+     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. To use a literal =%= character, escape it as
+     =%%=. See also =ivy-count-format=.
+
+- =collection= ::
+     Either a list of strings, a function, an alist or a hash table.
+
+     If a function, then it has to be compatible with
+     =all-completions=.
+
+** Optional arguments for =ivy-read=
+:PROPERTIES:
+:CUSTOM_ID: optional-arguments-for-ivy-read
+:END:
+- =predicate= ::
+     Is a function to filter the initial collection. It has to be
+     compatible with =all-completions=. Tip: most of the time, it's
+     simpler to just apply this filter to the =collection= argument
+     itself, e.g. =(cl-remove-if-not predicate collection)=.
+- =require-match= ::
+     When set to a non-nil value, input must match one of the
+     candidates. Custom input is not accepted.
+- =initial-input= ::
+     This string argument is included for compatibility with
+     =completing-read=, which inserts it into the minibuffer.
+
+     It's recommended to use the =preselect= argument instead of this.
+- =history= ::
+     Name of the symbol to store history. See =completing-read=.
+- =preselect= ::
+     When set to a string value, select the first candidate matching
+     this value.
+
+     When set to an integer value, select the candidate with that
+     index value.
+
+     Every time the input becomes empty, the item corresponding to to
+     =preselect= is selected.
+- =keymap= ::
+     A keymap to be composed with =ivy-minibuffer-map=. This keymap
+     has priority over =ivy-minibuffer-map= and can be modified at any
+     later stage.
+- =update-fn= ::
+     Is the function called each time the current candidate changes.
+     This function takes no arguments and is called in the
+     minibuffer's =post-command-hook=. See =swiper= for an example
+     usage.
+- =sort= ::
+     When non-nil, use =ivy-sort-functions-alist= to sort the
+     collection as long as the collection is not larger than
+     =ivy-sort-max-size=.
+- =action= ::
+     Is the function to call after selection. It takes a string
+     argument.
+- =unwind= ::
+     Is the function to call before exiting completion. It takes no
+     arguments. This function is called even if the completion is
+     interrupted with ~C-g~. See =swiper= for an example usage.
+- =re-builder= ::
+     Is a function that takes a string and returns a valid regex. See
+     =Completion Styles= for details.
+- =matcher= ::
+     Is a function that takes a regex string and a list of strings and
+     returns a list of strings matching the regex. Any ordinary Emacs
+     matching function will suffice, yet finely tuned mathing
+     functions can be used. See =counsel-find-file= for an example
+     usage.
+- =dynamic-collection= ::
+     When non-nil, =collection= will be used to dynamically generate
+     the candidates each time the input changes, instead of being used
+     once statically with =all-completions= to generate a list of
+     strings. See =counsel-locate= for an example usage.
+- =caller= ::
+     Is a symbol that uniquely identifies the function that called
+     =ivy-read=, which may be useful for further customizations.
+** Example - =counsel-describe-function=
+:PROPERTIES:
+:CUSTOM_ID: example---counsel-describe-function
+:END:
+This is a typical example of a function with a non-async collection,
+which is a collection where all the strings in the collection are
+known prior to any input from the user.
+
+Only the first two arguments (along with =action=) are essential - the
+rest of the arguments are for fine-tuning, and could be omitted.
+
+The =action= argument could also be omitted - but then =ivy-read=
+would do nothing except returning the string result, which you could
+later use yourself. However, it's recommended that you use the
+=action= argument.
+
+#+begin_src elisp
+(defun counsel-describe-function ()
+  "Forward to `describe-function'."
+  (interactive)
+  (ivy-read "Describe function: "
+            (let (cands)
+              (mapatoms
+               (lambda (x)
+                 (when (fboundp x)
+                   (push (symbol-name x) cands))))
+              cands)
+            :keymap counsel-describe-map
+            :preselect (counsel-symbol-at-point)
+            :history 'counsel-describe-symbol-history
+            :require-match t
+            :sort t
+            :action (lambda (x)
+                      (describe-function
+                       (intern x)))
+            :caller 'counsel-describe-function))
+#+end_src
+
+Here are the interesting features of the above function, in the order that 
they appear:
+
+- The =prompt= argument is a simple string ending in ": ".
+- The =collection= argument evaluates to a (large) list of strings.
+- The =keymap= argument is for a custom keymap to supplement 
=ivy-minibuffer-map=.
+- The =preselect= is provided by =counsel-symbol-at-point=, which
+  returns a symbol near the point. Ivy then selects the first
+  candidate from the collection that matches this symbol. To select
+  this pre-selected candidate, a ~RET~ will suffice. No further user
+  input is necessary.
+- The =history= argument is for keeping the history of this command
+  separate from the common history in =ivy-history=.
+- The =require-match= is set to =t= since it doesn't make sense to
+  call =describe-function= on an un-interned symbol.
+- The =sort= argument is set to =t= so choosing between similar
+  candidates becomes easier. Sometimes, the collection size will
+  exceed =ivy-sort-max-size=, which is 30000 by default. In that case
+  the sorting will not happen to avoid delays.
+
+  Adjust this variable to choose between sorting time and completion
+  start-up time.
+- The =action= argument calls =describe-function= on the interned
+  selected candidate.
+- The =caller= argument identifies this completion session. This is
+  important, since with the collection being a list of strings and not
+  a function name, the only other way for =ivy-read= to identify
+  "who's calling" and to apply the appropriate customizations is to
+  examine =this-command=. But =this-command= would be modified if
+  another command called =counsel-describe-function=.
+** Example - =counsel-locate=
+:PROPERTIES:
+:CUSTOM_ID: example---counsel-locate
+:END:
+This is a typical example of a function with an async collection.
+Since the collection function cannot pre-compute all the locatable
+files in memory within reasonable limits (time or memory), it relies
+on user input to filter the universe of possible candidates to a
+manageable size while also continuing to search asynchronously for
+possible candidates. Both the filtering and searching continues with
+each character change of the input with rapid updates to the
+collection presented without idle waiting times. This live update will
+continue as long as there are likely candidates. Eventually updates to
+the minibuffer will stop after user input, filtering, and searching
+have exhausted looking for possible candidates.
+
+Async collections suit long-running shell commands, such as =locate=.
+With each new input, a new process starts while the old process is
+killed. The collection is refreshed anew with each new process.
+Meanwhile the user can provide more input characters (for further
+narrowing) or select a candidate from the visible collection.
+
+#+begin_src elisp
+(defun counsel-locate-function (str)
+  (if (< (length str) 3)
+      (counsel-more-chars 3)
+    (counsel--async-command
+     (format "locate %s '%s'"
+             (mapconcat #'identity counsel-locate-options " ")
+             (counsel-unquote-regex-parens
+              (ivy--regex str))))
+    '("" "working...")))
+
+;;;###autoload
+(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)
+                      (with-ivy-window
+                        (when file
+                          (find-file file))))
+            :unwind #'counsel-delete-process
+            :caller 'counsel-locate))
+#+end_src
+
+Here are the interesting features of the above functions, in the order
+that they appear:
+
+- =counsel-locate-function= takes a string argument and returns a list
+  of strings. Note that it's not compatible with =all-completions=,
+  but since we're not using that here, might as well use one argument
+  instead of three.
+- =counsel-more-chars= is a simple function that returns e.g.
+  ='("2 chars more")= asking the user for more input.
+- =counsel--async-command= is a very easy API simplification that
+  takes a single string argument suitable for
+  =shell-command-to-string=. So you could prototype your function as
+  non-async using =shell-command-to-string= and =split-string= to
+  produce a collection, then decide that you want async and simply swap in
+  =counsel--async-command=.
+- =counsel-locate= is an interactive function with an optional =initial-input=.
+- =#'counsel-locate-function= is passed as the =collection= argument.
+- =dynamic-collection= is set to t, since this is an async collection.
+- =action= argument uses =with-ivy-window= wrapper, since we want to open the
+  selected file in the same window from which =counsel-locate= was
+  called.
+- =unwind= argument is set to =#'counsel-delete-process=: when we press ~C-g~
+  we want to kill the running process created by
+  =counsel--async-command=.
+- =caller= argument identifies this command for easier customization.
+
+* Variable Index
+:PROPERTIES:
+:INDEX:    vr
+:CUSTOM_ID: variable-index
+:END:
+
+* Keystroke Index
+:PROPERTIES:
+:CUSTOM_ID: key-index
+:INDEX:    ky
+:END:
diff --git a/packages/ivy/doc/ivy.texi b/packages/ivy/doc/ivy.texi
new file mode 100644
index 0000000..64afd6b
--- /dev/null
+++ b/packages/ivy/doc/ivy.texi
@@ -0,0 +1,1672 @@
+\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.
address@hidden ifnottex
+
+Copyright (C) 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::
+* Customization::
+* Commands::
+* API::
+* Variable Index::
+* Keystroke 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 the 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::
+
+Customization
+
+* Faces::
+* Defcustoms::
+* Actions::
+* Packages::
+
+Actions
+
+* What are actions?::
+* How can different actions be called?::
+* How to modify the actions list?::
+* Example - add two actions to each command::
+* Example - define a new command with several actions::
+
+Example - add two actions to each command
+
+* How to undo adding the two actions::
+* How to add actions to a specific command::
+
+Example - define a new command with several actions
+
+* Test the above function with @code{ivy-occur}::
+Commands
+
+* File Name Completion::
+* Buffer Name Completion::
+* Counsel commands::
+
+API
+
+* Required arguments for @code{ivy-read}::
+* Optional arguments for @code{ivy-read}::
+* Example - @code{counsel-describe-function}::
+* Example - @code{counsel-locate}::
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
address@hidden
+Uncluttered minibuffer is minimalism. Ivy shows the completion
+defaults, the number of matches, and 10 candidate matches below
+the input line. Customize @code{ivy-height} to adjust the number of
+candidate matches displayed in the minibuffer.
address@hidden indentedblock
address@hidden Simplicity
address@hidden
+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 @code{minibuffer-complete-word}. Ivy's code
+uses easy-to-examine global variables; avoids needless
+complications with branch-introducing custom macros.
address@hidden indentedblock
address@hidden Customizability
address@hidden
+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 @code{ivy-current-match} face. Or take the
+customization of actions, say after the candidate function is
+selected. @kbd{RET} uses @code{counsel-describe-function} 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 indentedblock
address@hidden Discoverability
address@hidden
+Ivy displays easily discoverable commands through the hydra
+facility.  @kbd{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 @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 indentedblock
+
address@hidden Installation
address@hidden Installation
+
+Install Ivy automatically through Emacs's package manager, or manually
+from Ivy's development repository.
+
+Emacs 24.3.1 is the oldest version to run Ivy. Emacs 24.5.1 is the
+oldest version that runs Ivy with fancy faces display.
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
+
address@hidden Why install from Git?
address@hidden
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 indentedblock
+
+
address@hidden Configuration steps
address@hidden
+First clone the Swiper repository with:
+
address@hidden
+     cd ~/git && git clone https://github.com/abo-abo/swiper
+     cd swiper && make compile
address@hidden example
+
+Second, add these lines to the Emacs init file:
+
address@hidden
+     (add-to-list 'load-path "~/git/swiper/")
+     (require 'ivy)
address@hidden lisp
+
+Then, update the code with:
+
address@hidden
+     git pull
+     make
address@hidden example
address@hidden indentedblock
+
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-count-format "(%d/%d) ")
address@hidden lisp
+
+If you want, you can go without any customizations at all. The above
+settings are the most bang for the buck in terms of customization.  So
+users that typically don't like customize a lot are advised to look at
+these settings first.
+
+For more advanced 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
+
+The recommended key bindings are:
+
address@hidden Ivy-based interface to standard commands
address@hidden
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 indentedblock
address@hidden Ivy-based interface to shell and system tools
address@hidden
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 indentedblock
address@hidden Ivy-resume and other commands
address@hidden
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 indentedblock
+
address@hidden Minibuffer key bindings
address@hidden Minibuffer key bindings
+
address@hidden ivy-minibuffer-map
+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 key bindings through the 
@code{keymap}
+argument to @code{ivy-read}. These keys, also active in the minibuffer, are
+described under their respective commands.
+
+A key feature of @code{ivy-minibuffer-map} is its full editing capability
+where the familiar @kbd{C-a}, @kbd{C-f}, @kbd{M-d}, @kbd{M-DEL}, @kbd{M-b}, 
@kbd{M-w}, @kbd{C-k},
address@hidden key bindings work the same as in @code{fundamental-mode}.
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 the 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
+Specifies the wrap-around behavior for @kbd{C-n} and @kbd{C-p}. When
address@hidden is set to @code{t}, @code{ivy-next-line} and 
@code{ivy-previous-line}
+will cycle past the last and the first candidates respectively.
+
+Warp-around behavior is off by default.
address@hidden defopt
+
address@hidden ivy-height
+Use this option to adjust the minibuffer height, which also
+affects scroll size when using @kbd{C-v} and @kbd{M-v} key bindings.
+
address@hidden is 10 lines by default.
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 @kbd{C-m} or @kbd{RET} (@code{ivy-done})
address@hidden ivy-done
address@hidden C-m
address@hidden RET
address@hidden
+Calls the default action and then exits the minibuffer.
address@hidden indentedblock
address@hidden @kbd{M-o} (@code{ivy-dispatching-done})
address@hidden ivy-dispatching-done
address@hidden M-o
address@hidden
+Presents valid actions from which to choose. When only one action
+is available, there is no difference between @kbd{M-o} and @kbd{C-m}.
address@hidden indentedblock
address@hidden @kbd{C-j} (@code{ivy-alt-done})
address@hidden ivy-alt-done
address@hidden C-j
address@hidden
+When completing file names, selects the current directory
+candidate and starts a new completion session there. Otherwise,
+it is the same as @code{ivy-done}.
address@hidden indentedblock
address@hidden @kbd{TAB} (@code{ivy-partial-or-done})
address@hidden ivy-partial-or-done
address@hidden TAB
address@hidden
+Attempts partial completion, extending current input as much as
+possible. @kbd{TAB TAB} is the same as @kbd{C-j} (@code{ivy-alt-done}).
+
+Example ERT test:
+
address@hidden
+     (should
+      (equal (ivy-with
+              '(progn
+                (ivy-read "Test: " '("can do" "can't, sorry" "other"))
+                ivy-text)
+              "c <tab>")
+             "can"))
address@hidden lisp
address@hidden indentedblock
address@hidden @kbd{C-M-j} (@code{ivy-immediate-done})
address@hidden ivy-immediate-done
address@hidden C-M-j
address@hidden
+Exits with @emph{the current input} instead of @emph{the current candidate}
+(like other commands).
+
+This is useful e.g. when you call @code{find-file} to create a new
+file, but the desired name matches an existing file. In that
+case, using @kbd{C-j} would select that existing file, which isn't
+what you want - use this command instead.
address@hidden indentedblock
address@hidden @kbd{C-'} (@code{ivy-avy})
address@hidden ivy-avy
address@hidden C-'
address@hidden
+Uses avy to select one of the candidates on the current candidate
+page.  This can often be faster than multiple @kbd{C-n} or @kbd{C-p}
+keystrokes followed by @kbd{C-m}.
address@hidden indentedblock
+
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 @kbd{C-M-m} (@code{ivy-call})
address@hidden ivy-call
address@hidden C-M-m
address@hidden
+Is the non-exiting version of @kbd{C-m} (@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
address@hidden, function descriptions can be invoked quickly in
+succession.
address@hidden indentedblock
address@hidden @kbd{C-M-o} (@code{ivy-dispatching-call})
address@hidden ivy-dispatching-call
address@hidden C-M-o
address@hidden
+Is the non-exiting version of @kbd{M-o} (@code{ivy-dispatching-done}).
+
+For example, during the @code{counsel-rhythmbox} completion, press
address@hidden e} to en-queue the selected candidate, followed by @kbd{C-n
+     C-m} to play the next candidate - the current action reverts to
+the default one after @kbd{C-M-o}.
address@hidden indentedblock
address@hidden @kbd{C-M-n} (@code{ivy-next-line-and-call})
address@hidden ivy-next-line-and-call
address@hidden C-M-n
address@hidden
+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
address@hidden, @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 indentedblock
address@hidden @kbd{C-M-p} (@code{ivy-previous-line-and-call})
address@hidden ivy-previous-line-and-call
address@hidden C-M-p
address@hidden
+Combines @kbd{C-p} and @kbd{C-M-m}.
+
+Similar to the above except it moves through the list in the
+other direction.
address@hidden indentedblock
address@hidden @code{ivy-resume}
address@hidden ivy-resume
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 indentedblock
+
address@hidden Key bindings that alter the minibuffer input
address@hidden Key bindings that alter the minibuffer input
+
address@hidden @kbd{M-n} (@code{ivy-next-history-element})
address@hidden ivy-next-history-element
address@hidden M-n
address@hidden
+Cycles forward 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 indentedblock
address@hidden @kbd{M-p} (@code{ivy-previous-history-element})
address@hidden ivy-previous-history-element
address@hidden M-p
address@hidden
+Cycles forward through the Ivy command history.
address@hidden indentedblock
address@hidden @kbd{M-i} (@code{ivy-insert-current})
address@hidden ivy-insert-current
address@hidden M-i
address@hidden
+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 indentedblock
address@hidden @kbd{M-j} (@code{ivy-yank-word})
address@hidden ivy-yank-word
address@hidden M-j
address@hidden
+Inserts the sub-word at point into the minibuffer.
+
+This is similar to @kbd{C-s C-w} with @code{isearch}. Ivy reserves @kbd{C-w}
+for @code{kill-region}.
address@hidden indentedblock
address@hidden @kbd{S-SPC} (@code{ivy-restrict-to-matches})
address@hidden ivy-restrict-to-matches
address@hidden S-SPC
address@hidden
+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 indentedblock
address@hidden @kbd{C-r} (@code{ivy-reverse-i-search})
address@hidden ivy-reverse-i-search
address@hidden C-r
address@hidden
+Starts a recursive completion session through the command's
+history.
+
+This works just like @kbd{C-r} at the bash command prompt, where the
+completion candidates are the history items. Upon completion, the
+selected candidate string is inserted into the minibuffer.
address@hidden indentedblock
+
address@hidden Other key bindings
address@hidden Other key bindings
+
address@hidden @kbd{M-w} (@code{ivy-kill-ring-save})
address@hidden ivy-kill-ring-save
address@hidden M-w
address@hidden
+Copies selected candidates to the kill ring.
+
+Copies the region if the region is active.
address@hidden indentedblock
+
address@hidden Hydra in the minibuffer
address@hidden Hydra in the minibuffer
+
address@hidden @kbd{C-o} (@code{hydra-ivy/body})
address@hidden C-o
address@hidden
+Invokes the hydra menu with short key bindings.
address@hidden indentedblock
+
+When Hydra is active, minibuffer editing is disabled and menus
+display short aliases:
+
address@hidden {aaaaa} {aaaaaaaaa} {aaaaaaaaaaaaaaaaaaaaaaaaa}
address@hidden Short
address@hidden Normal
address@hidden Command name
address@hidden @kbd{o}
address@hidden @kbd{C-g}
address@hidden @code{keyboard-escape-quit}
address@hidden @kbd{j}
address@hidden @kbd{C-n}
address@hidden @code{ivy-next-line}
address@hidden @kbd{k}
address@hidden @kbd{C-p}
address@hidden @code{ivy-previous-line}
address@hidden @kbd{h}
address@hidden @kbd{M-<}
address@hidden @code{ivy-beginning-of-buffer}
address@hidden @kbd{l}
address@hidden @kbd{M->}
address@hidden @code{ivy-end-of-buffer}
address@hidden @kbd{d}
address@hidden @kbd{C-m}
address@hidden @code{ivy-done}
address@hidden @kbd{f}
address@hidden @kbd{C-j}
address@hidden @code{ivy-alt-done}
address@hidden @kbd{g}
address@hidden @kbd{C-M-m}
address@hidden @code{ivy-call}
address@hidden @kbd{u}
address@hidden @kbd{C-c C-o}
address@hidden @code{ivy-occur}
address@hidden multitable
+
+Hydra reduces key strokes, for example: @kbd{C-n C-n C-n C-n} is @kbd{C-o
+jjjj} in Hydra.
+
+Hydra menu offers these additioanl bindings:
+
address@hidden @kbd{c} (@code{ivy-toggle-calling})
address@hidden ivy-toggle-calling
address@hidden c
address@hidden
+Toggle calling the action after each candidate change. It
+modifies @kbd{j} to @kbd{jg}, @kbd{k} to @kbd{kg} etc.
address@hidden indentedblock
address@hidden @kbd{m} (@code{ivy-toggle-fuzzy})
address@hidden ivy-toggle-fuzzy
address@hidden m
address@hidden
+Toggle the current regexp matcher.
address@hidden indentedblock
address@hidden @kbd{>} (@code{ivy-minibuffer-grow})
address@hidden ivy-minibuffer-grow
address@hidden >
address@hidden
+Increase @code{ivy-height} for the current minibuffer.
address@hidden indentedblock
address@hidden @kbd{<} (@code{ivy-minibuffer-shrink})
address@hidden ivy-minibuffer-shrink
address@hidden <
address@hidden
+Decrease @code{ivy-height} for the current minibuffer.
address@hidden indentedblock
address@hidden @kbd{w} (@code{ivy-prev-action})
address@hidden ivy-prev-action
address@hidden w
address@hidden
+Select the previous action.
address@hidden indentedblock
address@hidden @kbd{s} (@code{ivy-next-action})
address@hidden ivy-next-action
address@hidden s
address@hidden
+Select the next action.
address@hidden indentedblock
address@hidden @kbd{a} (@code{ivy-read-action})
address@hidden ivy-read-action
address@hidden a
address@hidden
+Use a menu to select an action.
address@hidden indentedblock
address@hidden @kbd{C} (@code{ivy-toggle-case-fold})
address@hidden ivy-toggle-case-fold
address@hidden C
address@hidden
+Toggle case folding (match both upper and lower case
+characters for lower case input).
address@hidden indentedblock
+
address@hidden Saving the current completion session to a buffer
address@hidden Saving the current completion session to a buffer
+
address@hidden @kbd{C-c C-o} (@code{ivy-occur})
address@hidden ivy-occur
address@hidden C-c C-o
address@hidden
+Saves the current candidates to a new buffer and exits
+completion.
address@hidden indentedblock
+
+The new buffer is read-only and has a few useful bindings defined.
+
address@hidden @kbd{RET} or @kbd{j} (@code{ivy-occur-press})
address@hidden ivy-occur-press
address@hidden RET
address@hidden j
address@hidden
+Call the current action on the selected candidate.
address@hidden indentedblock
address@hidden @kbd{mouse-1} (@code{ivy-occur-click})
address@hidden ivy-occur-click
address@hidden mouse-1
address@hidden
+Call the current action on the selected candidate.
address@hidden indentedblock
address@hidden @kbd{j} (@code{next-line})
address@hidden j
address@hidden
+Move to next line.
address@hidden indentedblock
address@hidden @kbd{k} (@code{previous-line})
address@hidden k
address@hidden
+Move to previous line.
address@hidden indentedblock
address@hidden @kbd{a} (@code{ivy-occur-read-action})
address@hidden ivy-occur-read-action
address@hidden a
address@hidden
+Read an action and make it current for this buffer.
address@hidden indentedblock
address@hidden @kbd{o} (@code{ivy-occur-dispatch})
address@hidden ivy-occur-dispatch
address@hidden o
address@hidden
+Read an action and call it on the selected candidate.
address@hidden indentedblock
address@hidden @kbd{q} (@code{quit-window})
address@hidden q
address@hidden
+Bury the current buffer.
address@hidden indentedblock
+
+
+Ivy has no limit on the number of active buffers like these.
+
+Ivy takes care of naming buffers uniquely by constructing 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 a regex builder - a function that
+transforms a string input to a string regex. All current candidates
+simply have to match this regex. Each collection can be assigned its
+own regex builder by customizing @code{ivy-re-builders-alist}.
+
+The keys of this alist are collection names, and the values are one of
+the following:
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden itemize
+
+A catch-all key, @code{t}, applies to all collections that don't have their
+own key.
+
+The default is:
+
address@hidden
+(setq ivy-re-builders-alist
+      '((t . ivy--regex-plus)))
address@hidden lisp
+
+This example shows a custom regex builder assigned to file name
+completion:
+
address@hidden
+(setq ivy-re-builders-alist
+      '((read-file-name-internal . ivy--regex-fuzzy)
+        (t . ivy--regex-plus)))
address@hidden lisp
+
+Here, @code{read-file-name-internal} is a function that is passed as the
+second argument to @code{completing-read} for file name completion.
+
+The regex builder resolves as follows (in order of priority):
address@hidden
address@hidden
address@hidden argument passed to @code{ivy-read}.
address@hidden
address@hidden argument passed to @code{ivy-read} is a function and has an
+entry on @code{ivy-re-builders-alist}.
address@hidden
address@hidden argument passed to @code{ivy-read} has an entry on
address@hidden
address@hidden
address@hidden has an entry on @code{ivy-re-builders-alist}.
address@hidden
address@hidden has an entry on @code{ivy-re-builders-alist}.
address@hidden
address@hidden
address@hidden enumerate
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 valid regex syntax. If the string is @code{"for example"}, it is
+transformed into
+
address@hidden
+"\\(for\\).*\\(example\\)"
address@hidden lisp
+
+which in regex terminology matches @code{"for"} followed by a wild card and
+then @code{"example"}. Note how Ivy uses the space character to build wild
+cards. To match a literal white space, use an extra space. So 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 @code{"!"}.
+For example, @code{"define key ! ivy quit"} first selects everything
+matching @code{"define.*key"}, then removes everything matching @code{"ivy"},
+and finally removes everything matching @code{"quit"}. What remains is the
+final result set of the negation regexp.
+
+Since Ivy treats minibuffer input as a regexp, the standard regexp
+identifiers work: @code{"^"}, @code{"$"}, @code{"\b"} or @code{"[a-z]"}. The 
exceptions
+are spaces, which translate to @code{".*"}, and @code{"!"} 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
address@hidden"for example"} will match @code{"example test for"}.
+
address@hidden ivy--regex-fuzzy
address@hidden ivy--regex-fuzzy
+
address@hidden splits each character with a wild card. Searching
+for @code{"for"} returns all @code{"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 m} toggles the current regexp builder.
+
address@hidden Customization
address@hidden Customization
+
address@hidden
+* Faces::
+* Defcustoms::
+* Actions::
+* Packages::
address@hidden menu
+
address@hidden Faces
address@hidden Faces
+
address@hidden @code{ivy-current-match}
address@hidden ivy-current-match
address@hidden
+Highlights the currently selected candidate.
address@hidden indentedblock
address@hidden @code{ivy-minibuffer-match-face-1}
address@hidden ivy-minibuffer-match-face-1
address@hidden
+Highlights the background of the match.
address@hidden indentedblock
address@hidden @code{ivy-minibuffer-match-face-2}
address@hidden ivy-minibuffer-match-face-2
address@hidden
+Highlights the first (modulo 3) matched group.
address@hidden indentedblock
address@hidden @code{ivy-minibuffer-match-face-3}
address@hidden ivy-minibuffer-match-face-3
address@hidden
+Highlights the second (modulo 3) matched group.
address@hidden indentedblock
address@hidden @code{ivy-minibuffer-match-face-4}
address@hidden ivy-minibuffer-match-face-4
address@hidden
+Highlights the third (modulo 3) matched group.
address@hidden indentedblock
address@hidden @code{ivy-confirm-face}
address@hidden ivy-confirm-face
address@hidden
+Highlights the "(confirm)" part of the prompt.
+
+When @code{confirm-nonexistent-file-or-buffer} set to @code{t}, then
+confirming non-existent files in @code{ivy-mode} requires an
+additional @kbd{RET}.
+
+The confirmation prompt will use this face.
+
+For example:
+
address@hidden
+     (setq confirm-nonexistent-file-or-buffer t)
address@hidden lisp
+
+Then call @code{find-file}, enter "eldorado" and press @kbd{RET} - the
+prompt will be appended with "(confirm)". Press @kbd{RET} once more
+to confirm, or any key to continue the completion.
address@hidden indentedblock
address@hidden @code{ivy-match-required-face}
address@hidden ivy-match-required-face
address@hidden
+Highlights the "(match required)" part of the prompt.
+
+When completions have to match available candidates and cannot
+take random input, the "(match required)" prompt signals this
+constraint.
+
+For example, call @code{describe-variable}, enter "waldo" and press
address@hidden - "(match required)" is prompted.
+Press any key for the prompt to disappear.
address@hidden indentedblock
address@hidden @code{ivy-subdir}
address@hidden ivy-subdir
address@hidden
+Highlights directories when completing file names.
address@hidden indentedblock
address@hidden @code{ivy-remote}
address@hidden ivy-remote
address@hidden
+Highlights remote files when completing file names.
address@hidden indentedblock
address@hidden @code{ivy-virtual}
address@hidden ivy-virtual
address@hidden
+Highlights virtual buffers when completing buffer names.
+
+Virtual buffers correspond to bookmarks and recent files list,
address@hidden
+
+Enable virtual buffers with:
+
address@hidden
+     (setq ivy-use-virtual-buffers t)
address@hidden lisp
address@hidden indentedblock
+
address@hidden Defcustoms
address@hidden Defcustoms
+
address@hidden ivy-count-format
+A string that specifies display of number of candidates and
+current candidate, if one exists.
+
+The number of matching candidates by default is shown as a right-
+padded integer value.
+
+To disable showing the number of candidates:
+
address@hidden
+     (setq ivy-count-format "")
address@hidden lisp
+
+To also display the current candidate:
+
address@hidden
+     (setq ivy-count-format "(%d/%d) ")
address@hidden lisp
+
+The @code{format}-style switches this variable uses are described
+in the @code{format} documentation.
address@hidden defopt
+
address@hidden ivy-display-style
+Specifies highlighting candidates in the minibuffer.
+
+The default setting is @code{'fancy} and valid only in Emacs versions
+24.5 or newer.
+
+Set @code{ivy-display-style} to @code{nil} for a plain minibuffer.
address@hidden defopt
+
address@hidden ivy-on-del-error-function
+Specify what when @kbd{DEL} (@code{ivy-backward-delete-char}) throws.
+
+The default behavior is to quit the completion after @kbd{DEL} -- a
+handy key to invoke after mistakenly triggering a completion.
address@hidden defopt
+
address@hidden Actions
address@hidden Actions
+
address@hidden
+* What are actions?::
+* How can different actions be called?::
+* How to modify the actions list?::
+* Example - add two actions to each command::
+* Example - define a new command with several actions::
address@hidden menu
+
address@hidden What are actions?
address@hidden What are actions?
+
+An action is a function that is called after you select a candidate
+during completion. This function takes a single string argument, which
+is the selected candidate.
+
address@hidden Window context when calling an action
address@hidden
+Currently, the action is executed in the minibuffer window
+context. This means e.g. that if you call @code{insert} the text will
+be inserted into the minibuffer.
+
+If you want to execute the action in the initial window from
+which the completion started, use the @code{with-ivy-window} wrapper
+macro.
+
address@hidden
+     (defun ivy-insert-action (x)
+       (with-ivy-window
+         (insert x)))
address@hidden lisp
address@hidden indentedblock
+
address@hidden How can different actions be called?
address@hidden How can different actions be called?
+
address@hidden
address@hidden
address@hidden (@code{ivy-done}) calls the current action.
address@hidden
address@hidden (@code{ivy-dispatching-done}) presents available actions for
+selection, calls it after selection, and then exits.
address@hidden
address@hidden (@code{ivy-dispatching-call}) presents available actions for
+selection, calls it after selection, and then does not exit.
address@hidden itemize
+
address@hidden How to modify the actions list?
address@hidden How to modify the actions list?
+
+Currently, you can append any amount of your own actions to the
+default list of actions. This can be done either for a specific
+command, or for all commands at once.
+
+Usually, the command has only one default action. The convention is to
+use single letters when selecting a command, and the letter @kbd{o} is
+designated for the default command. This way, @kbd{M-o o} should be always
+equivalent to @kbd{C-m}.
+
address@hidden Example - add two actions to each command
address@hidden Example - add two actions to each command
+
+The first action inserts the current candidate into the Ivy window -
+the window from which @code{ivy-read} was called.
+
+The second action copies the current candidate to the kill ring.
+
address@hidden
+(defun ivy-yank-action (x)
+  (kill-new x))
+
+(defun ivy-copy-to-buffer-action (x)
+  (with-ivy-window
+    (insert x)))
+
+(ivy-set-actions
+ t
+ '(("i" ivy-copy-to-buffer-action "insert")
+   ("y" ivy-yank-action "yank")))
address@hidden lisp
+
+Then in any completion session, @kbd{M-o y} invokes @code{ivy-yank-action}, and
address@hidden i} invokes @code{ivy-copy-to-buffer-action}.
address@hidden
+* How to undo adding the two actions::
+* How to add actions to a specific command::
address@hidden menu
+
address@hidden How to undo adding the two actions
address@hidden How to undo adding the two actions
+
+Since @code{ivy-set-actions} modifies the internal dictionary with new
+data, set the extra actions list to @code{nil} by assigning @code{nil} value to
+the @code{t} key as follows:
+
address@hidden
+(ivy-set-actions t nil)
address@hidden lisp
+
address@hidden How to add actions to a specific command
address@hidden How to add actions to a specific command
+
+Use the command name as the key:
+
address@hidden
+(ivy-set-actions
+ 'swiper
+ '(("i" ivy-copy-to-buffer-action "insert")
+   ("y" ivy-yank-action "yank")))
address@hidden lisp
+
address@hidden Example - define a new command with several actions
address@hidden Example - define a new command with several actions
+
address@hidden
+(defun my-action-1 (x)
+  (message "action-1: %s" x))
+
+(defun my-action-2 (x)
+  (message "action-2: %s" x))
+
+(defun my-action-3 (x)
+  (message "action-3: %s" x))
+
+(defun my-command-with-3-actions ()
+  (interactive)
+  (ivy-read "test: " '("foo" "bar" "baz")
+            :action '(1
+                      ("o" my-action-1 "action 1")
+                      ("j" my-action-2 "action 2")
+                      ("k" my-action-3 "action 3"))))
address@hidden lisp
+
+The number 1 above is the index of the default action. Each
+action has its own string description for easy selection.
address@hidden
+* Test the above function with @code{ivy-occur}::
address@hidden menu
+
address@hidden Test the above function with @code{ivy-occur}
address@hidden Test the above function with @code{ivy-occur}
+
+To examine each action with each candidate in a key-efficient way, try:
+
address@hidden
address@hidden
+Call @code{my-command-with-3-actions}
address@hidden
+Press @kbd{C-c C-o} to close the completion window and move to an
+ivy-occur buffer
address@hidden
+Press @kbd{kkk} to move to the first candidate, since the point is most
+likely at the end of the buffer
address@hidden
+Press @kbd{oo} to call the first action
address@hidden
+Press @kbd{oj} and @kbd{ok} to call the second and the third actions
address@hidden
+Press @kbd{j} to move to the next candidate
address@hidden
+Press @kbd{oo}, @kbd{oj}, @kbd{ok}
address@hidden
+Press @kbd{j} to move to the next candidate
address@hidden
+and so address@hidden
address@hidden itemize
+
address@hidden Packages
address@hidden Packages
+
address@hidden @code{org-mode}
address@hidden
address@hidden versions 8.3.3 or later obey
address@hidden (which @code{ivy-mode} sets). Try refiling
+headings with similar names to appreciate @code{ivy-mode}.
address@hidden indentedblock
address@hidden @code{magit}
address@hidden
+Magit requries this setting for ivy completion:
+
address@hidden
+     (setq magit-completing-read-function 'ivy-completing-read)
address@hidden lisp
address@hidden indentedblock
address@hidden @code{find-file-in-project}
address@hidden
+It uses ivy by default if Ivy is installed.
address@hidden indentedblock
address@hidden @code{projectile}
address@hidden
+Projectile requires this seeting for ivy completion:
+
address@hidden
+     (setq projectile-completion-system 'ivy)
address@hidden lisp
address@hidden indentedblock
address@hidden @code{helm-make}
address@hidden
+Helm-make requires this seeting for ivy completion.
+
address@hidden
+     (setq helm-make-completion-method 'ivy)
address@hidden lisp
address@hidden indentedblock
+
address@hidden Commands
address@hidden Commands
+
address@hidden
+* File Name Completion::
+* Buffer Name Completion::
+* Counsel commands::
address@hidden menu
+
address@hidden File Name Completion
address@hidden File Name Completion
+
+Since file name completion is ubiquitious, Ivy provides extra
+bindings that work here:
+
+
address@hidden @kbd{C-j} (@code{ivy-alt-done})
address@hidden ivy-alt-done
address@hidden C-j
address@hidden
+On a directory, restarts completion from that directory.
+
+On a file or @code{./}, exit completion with the selected candidate.
address@hidden indentedblock
address@hidden @kbd{DEL} (@code{ivy-backward-delete-char})
address@hidden ivy-backward-delete-char
address@hidden DEL
address@hidden
+Restart the completion in the parent directory if current input
+is empty.
address@hidden indentedblock
address@hidden @kbd{//} (@code{self-insert-command})
address@hidden //
address@hidden
+Switch to the root directory.
address@hidden indentedblock
address@hidden @kbd{~} (@code{self-insert-command})
address@hidden ~
address@hidden
+Switch to the home directory.
address@hidden indentedblock
address@hidden @kbd{/} (@code{self-insert-command})
address@hidden /
address@hidden
+If the current input matches an existing directory name exactly,
+switch the completion to that directory.
address@hidden indentedblock
address@hidden @kbd{M-q} (@code{ivy-toggle-regexp-quote})
address@hidden ivy-toggle-regexp-quote
address@hidden M-q
address@hidden
+Toggle between input as regexp or not.
+
+Switch to matching literally since file names include @code{.}, which
+is for matching any char in regexp mode.
address@hidden indentedblock
address@hidden ivy-extra-directories
+Decide if you want to see @code{../} and @code{./} during file name
+completion.
+
+Reason to remove: @code{../} is the same as @kbd{DEL}.
+
+Reason not to remove: navigate anywhere with only @kbd{C-n}, @kbd{C-p}
+and @kbd{C-j}.
+
+Likewise, @code{./} can be removed.
address@hidden defopt
+
address@hidden Using TRAMP
address@hidden
+From any directory, with the empty input, inputting @code{/ssh:} and
+pressing @kbd{C-j} (or @kbd{RET}, which is the same thing) completes for
+host and user names.
+
+For @code{/ssh:user@@} input, completes the domain name.
+
address@hidden works in a similar way to the default completion.
address@hidden indentedblock
address@hidden History
address@hidden
+File history works the same with @kbd{M-p}, @kbd{M-n}, and @kbd{C-r}, but
+uses a custom code for file name completion that cycles through
+files previously opened. It also works with TRAMP files.
address@hidden indentedblock
+
address@hidden Buffer Name Completion
address@hidden Buffer Name Completion
+
address@hidden ivy-use-virtual-buffers
+When non-nil, add @code{recentf-mode} and bookmarks to
address@hidden completion candidates.
+
+Adding this to Emacs init file:
+
address@hidden
+     (setq ivy-use-virtual-buffers t)
address@hidden lisp
+will add additional virual buffers to the buffers list for recent
+files. Selecting such virtual buffers, which are highlighted with
address@hidden face, will open the corresponding file.
address@hidden defopt
+
address@hidden Counsel commands
address@hidden Counsel commands
+
+The main advantages of @code{counsel-} functions over their basic
+equivalents in @code{ivy-mode} are:
+
address@hidden
address@hidden
+Multi-actions and non-exiting actions work.
address@hidden
address@hidden can resume the last completion session.
address@hidden
+Customize @code{ivy-set-actions}, @code{ivy-re-builders-alist}.
address@hidden
+Customize individual keymaps, such as @code{counsel-describe-map},
address@hidden, or @code{counsel-find-file-map}, instead of
+customizing @code{ivy-minibuffer-map} that applies to all completion
+sessions.
address@hidden enumerate
+
address@hidden API
address@hidden API
+
+The main (and only) entry point is the @code{ivy-read} function. It takes
+two required arguments and many optional arguments that can be passed
+by a key. The optional @code{:action} argument is highly recommended for
+features such as multi-actions, non-exiting actions, @code{ivy-occur} and
address@hidden
address@hidden
+* Required arguments for @code{ivy-read}::
+* Optional arguments for @code{ivy-read}::
+* Example - @code{counsel-describe-function}::
+* Example - @code{counsel-locate}::
address@hidden menu
+
address@hidden Required arguments for @code{ivy-read}
address@hidden Required arguments for @code{ivy-read}
+
address@hidden @code{prompt}
address@hidden
+A format string normally ending in a colon and a space.
+
address@hidden anywhere in the string is replaced by the current number of
+matching candidates. To use a literal @code{%} character, escape it as
address@hidden See also @code{ivy-count-format}.
address@hidden indentedblock
address@hidden @code{collection}
address@hidden
+Either a list of strings, a function, an alist or a hash table.
+
+If a function, then it has to be compatible with
address@hidden
address@hidden indentedblock
+
address@hidden Optional arguments for @code{ivy-read}
address@hidden Optional arguments for @code{ivy-read}
+
address@hidden @code{predicate}
address@hidden
+Is a function to filter the initial collection. It has to be
+compatible with @code{all-completions}. Tip: most of the time, it's
+simpler to just apply this filter to the @code{collection} argument
+itself, e.g. @code{(cl-remove-if-not predicate collection)}.
address@hidden indentedblock
address@hidden @code{require-match}
address@hidden
+When set to a non-nil value, input must match one of the
+candidates. Custom input is not accepted.
address@hidden indentedblock
address@hidden @code{initial-input}
address@hidden
+This string argument is included for compatibility with
address@hidden, which inserts it into the minibuffer.
+
+It's recommended to use the @code{preselect} argument instead of this.
address@hidden indentedblock
address@hidden @code{history}
address@hidden
+Name of the symbol to store history. See @code{completing-read}.
address@hidden indentedblock
address@hidden @code{preselect}
address@hidden
+When set to a string value, select the first candidate matching
+this value.
+
+When set to an integer value, select the candidate with that
+index value.
+
+Every time the input becomes empty, the item corresponding to to
address@hidden is selected.
address@hidden indentedblock
address@hidden @code{keymap}
address@hidden
+A keymap to be composed with @code{ivy-minibuffer-map}. This keymap
+has priority over @code{ivy-minibuffer-map} and can be modified at any
+later stage.
address@hidden indentedblock
address@hidden @code{update-fn}
address@hidden
+Is the function called each time the current candidate changes.
+This function takes no arguments and is called in the
+minibuffer's @code{post-command-hook}. See @code{swiper} for an example
+usage.
address@hidden indentedblock
address@hidden @code{sort}
address@hidden
+When non-nil, use @code{ivy-sort-functions-alist} to sort the
+collection as long as the collection is not larger than
address@hidden
address@hidden indentedblock
address@hidden @code{action}
address@hidden
+Is the function to call after selection. It takes a string
+argument.
address@hidden indentedblock
address@hidden @code{unwind}
address@hidden
+Is the function to call before exiting completion. It takes no
+arguments. This function is called even if the completion is
+interrupted with @kbd{C-g}. See @code{swiper} for an example usage.
address@hidden indentedblock
address@hidden @code{re-builder}
address@hidden
+Is a function that takes a string and returns a valid regex. See
address@hidden Styles} for details.
address@hidden indentedblock
address@hidden @code{matcher}
address@hidden
+Is a function that takes a regex string and a list of strings and
+returns a list of strings matching the regex. Any ordinary Emacs
+matching function will suffice, yet finely tuned mathing
+functions can be used. See @code{counsel-find-file} for an example
+usage.
address@hidden indentedblock
address@hidden @code{dynamic-collection}
address@hidden
+When non-nil, @code{collection} will be used to dynamically generate
+the candidates each time the input changes, instead of being used
+once statically with @code{all-completions} to generate a list of
+strings. See @code{counsel-locate} for an example usage.
address@hidden indentedblock
address@hidden @code{caller}
address@hidden
+Is a symbol that uniquely identifies the function that called
address@hidden, which may be useful for further customizations.
address@hidden indentedblock
+
address@hidden Example - @code{counsel-describe-function}
address@hidden Example - @code{counsel-describe-function}
+
+This is a typical example of a function with a non-async collection,
+which is a collection where all the strings in the collection are
+known prior to any input from the user.
+
+Only the first two arguments (along with @code{action}) are essential - the
+rest of the arguments are for fine-tuning, and could be omitted.
+
+The @code{action} argument could also be omitted - but then @code{ivy-read}
+would do nothing except returning the string result, which you could
+later use yourself. However, it's recommended that you use the
address@hidden argument.
+
address@hidden
+(defun counsel-describe-function ()
+  "Forward to `describe-function'."
+  (interactive)
+  (ivy-read "Describe function: "
+            (let (cands)
+              (mapatoms
+               (lambda (x)
+                 (when (fboundp x)
+                   (push (symbol-name x) cands))))
+              cands)
+            :keymap counsel-describe-map
+            :preselect (counsel-symbol-at-point)
+            :history 'counsel-describe-symbol-history
+            :require-match t
+            :sort t
+            :action (lambda (x)
+                      (describe-function
+                       (intern x)))
+            :caller 'counsel-describe-function))
address@hidden lisp
+
+Here are the interesting features of the above function, in the order that 
they appear:
+
address@hidden
address@hidden
+The @code{prompt} argument is a simple string ending in ": ".
address@hidden
+The @code{collection} argument evaluates to a (large) list of strings.
address@hidden
+The @code{keymap} argument is for a custom keymap to supplement 
@code{ivy-minibuffer-map}.
address@hidden
+The @code{preselect} is provided by @code{counsel-symbol-at-point}, which
+returns a symbol near the point. Ivy then selects the first
+candidate from the collection that matches this symbol. To select
+this pre-selected candidate, a @kbd{RET} will suffice. No further user
+input is necessary.
address@hidden
+The @code{history} argument is for keeping the history of this command
+separate from the common history in @code{ivy-history}.
address@hidden
+The @code{require-match} is set to @code{t} since it doesn't make sense to
+call @code{describe-function} on an un-interned symbol.
address@hidden
+The @code{sort} argument is set to @code{t} so choosing between similar
+candidates becomes easier. Sometimes, the collection size will
+exceed @code{ivy-sort-max-size}, which is 30000 by default. In that case
+the sorting will not happen to avoid delays.
+
+Adjust this variable to choose between sorting time and completion
+start-up time.
address@hidden
+The @code{action} argument calls @code{describe-function} on the interned
+selected candidate.
address@hidden
+The @code{caller} argument identifies this completion session. This is
+important, since with the collection being a list of strings and not
+a function name, the only other way for @code{ivy-read} to identify
+"who's calling" and to apply the appropriate customizations is to
+examine @code{this-command}. But @code{this-command} would be modified if
+another command called @code{counsel-describe-function}.
address@hidden itemize
+
address@hidden Example - @code{counsel-locate}
address@hidden Example - @code{counsel-locate}
+
+This is a typical example of a function with an async collection.
+Since the collection function cannot pre-compute all the locatable
+files in memory within reasonable limits (time or memory), it relies
+on user input to filter the universe of possible candidates to a
+manageable size while also continuing to search asynchronously for
+possible candidates. Both the filtering and searching continues with
+each character change of the input with rapid updates to the
+collection presented without idle waiting times. This live update will
+continue as long as there are likely candidates. Eventually updates to
+the minibuffer will stop after user input, filtering, and searching
+have exhausted looking for possible candidates.
+
+Async collections suit long-running shell commands, such as @code{locate}.
+With each new input, a new process starts while the old process is
+killed. The collection is refreshed anew with each new process.
+Meanwhile the user can provide more input characters (for further
+narrowing) or select a candidate from the visible collection.
+
address@hidden
+(defun counsel-locate-function (str)
+  (if (< (length str) 3)
+      (counsel-more-chars 3)
+    (counsel--async-command
+     (format "locate %s '%s'"
+             (mapconcat #'identity counsel-locate-options " ")
+             (counsel-unquote-regex-parens
+              (ivy--regex str))))
+    '("" "working...")))
+
+;;;###autoload
+(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)
+                      (with-ivy-window
+                        (when file
+                          (find-file file))))
+            :unwind #'counsel-delete-process
+            :caller 'counsel-locate))
address@hidden lisp
+
+Here are the interesting features of the above functions, in the order
+that they appear:
+
address@hidden
address@hidden
address@hidden takes a string argument and returns a list
+of strings. Note that it's not compatible with @code{all-completions},
+but since we're not using that here, might as well use one argument
+instead of three.
address@hidden
address@hidden is a simple function that returns e.g.
address@hidden'("2 chars more")} asking the user for more input.
address@hidden
address@hidden is a very easy API simplification that
+takes a single string argument suitable for
address@hidden So you could prototype your function as
+non-async using @code{shell-command-to-string} and @code{split-string} to
+produce a collection, then decide that you want async and simply swap in
address@hidden
address@hidden
address@hidden is an interactive function with an optional @code{initial-input}.
address@hidden
address@hidden'counsel-locate-function} is passed as the @code{collection} 
argument.
address@hidden
address@hidden is set to t, since this is an async collection.
address@hidden
address@hidden argument uses @code{with-ivy-window} wrapper, since we want to 
open the
+selected file in the same window from which @code{counsel-locate} was
+called.
address@hidden
address@hidden argument is set to @code{#'counsel-delete-process}: when we 
press @kbd{C-g}
+we want to kill the running process created by
address@hidden
address@hidden
address@hidden argument identifies this command for easier customization.
address@hidden itemize
+
address@hidden Variable Index
address@hidden Variable Index
+
address@hidden vr
+
address@hidden Keystroke Index
address@hidden Keystroke Index
+
address@hidden ky
+
address@hidden
diff --git a/packages/swiper/ivy-hydra.el b/packages/ivy/ivy-hydra.el
similarity index 78%
rename from packages/swiper/ivy-hydra.el
rename to packages/ivy/ivy-hydra.el
index 63755da..44f8754 100644
--- a/packages/swiper/ivy-hydra.el
+++ b/packages/ivy/ivy-hydra.el
@@ -53,11 +53,11 @@
 (defhydra hydra-ivy (:hint nil
                      :color pink)
   "
-^^^^^^          ^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
+^ ^ ^ ^ ^ ^ | ^Call^      ^ ^  | ^Cancel^ | ^Options^ | Action _w_/_s_/_a_: 
%-14s(ivy-action-name)
+^-^-^-^-^-^-+-^-^---------^-^--+-^-^------+-^-^-------+-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------------------------
+^ ^ _k_ ^ ^ | _f_ollow occ_u_r | _i_nsert | _c_: calling %-5s(if ivy-calling 
\"on\" \"off\") _C_ase-fold: %-10`ivy-case-fold-search
+_h_ ^+^ _l_ | _d_one      ^ ^  | _o_ops   | _m_: matcher 
%-5s(ivy--matcher-desc)^^^^^^^^^^^^ _t_runcate: %-11`truncate-lines
+^ ^ _j_ ^ ^ | _g_o        ^ ^  | ^ ^      | _<_/_>_: 
shrink/grow^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _D_efinition of this menu
 "
   ;; arrows
   ("h" ivy-beginning-of-buffer)
@@ -83,7 +83,10 @@ _h_ ^+^ _l_     _d_one      ^ ^  _o_ops   _m_: matcher 
%-5s(ivy--matcher-desc)^^
   ("a" ivy-read-action)
   ("t" (setq truncate-lines (not truncate-lines)))
   ("C" ivy-toggle-case-fold)
-  ("u" ivy-occur :exit t))
+  ("u" ivy-occur :exit t)
+  ("D" (ivy-exit-with-action
+        (lambda (_) (find-function 'hydra-ivy/body)))
+       :exit t))
 
 (provide 'ivy-hydra)
 
diff --git a/packages/swiper/ivy-test.el b/packages/ivy/ivy-test.el
similarity index 65%
rename from packages/swiper/ivy-test.el
rename to packages/ivy/ivy-test.el
index ec5857d..40dae48 100644
--- a/packages/swiper/ivy-test.el
+++ b/packages/ivy/ivy-test.el
@@ -20,7 +20,12 @@
 ;; see <http://www.gnu.org/licenses/>.
 
 (require 'ert)
+
+;; useful for #'ivy-read-remap. It must arrive before (require 'ivy)
+(define-key global-map (kbd "<S-right>") #'end-of-buffer)
+
 (require 'ivy)
+(require 'counsel)
 
 (defvar ivy-expr nil
   "Holds a test expression to evaluate with `ivy-eval'.")
@@ -74,10 +79,34 @@
                      "a C-n <tab> C-m")
            "aaac"))
   (should (equal
+           (ivy-with '(ivy-read "test" '(("foo" . "bar")))
+                     "asdf C-m")
+           "asdf"))
+  (should (equal
+           (ivy-with
+            '(with-output-to-string
+              (ivy-read "test" '(("foo" . "bar"))
+               :action (lambda (x) (prin1 x))))
+            "f C-m")
+           "\"bar\""))
+  (should (equal
+           (ivy-with
+            '(with-output-to-string
+              (ivy-read "test" '(("foo" . "bar"))
+               :action (lambda (x) (prin1 x))))
+            "asdf C-m")
+           "\"asdf\""))
+  (should (equal
            (ivy-with '(ivy-read "pattern: " '("can do" "can" "can't do"))
                      "can C-m")
            "can")))
 
+(ert-deftest ivy-read-remap ()
+  (should (equal
+           (ivy-with '(ivy-read "pattern: " '("blue" "yellow" "red"))
+                  "<S-right> C-m")
+           "red")))
+
 (ert-deftest swiper--re-builder ()
   (setq swiper--width 4)
   (should (string= (swiper--re-builder "^")
@@ -96,8 +125,15 @@
                  '("Who are" "the Brittons?")))
   (should (equal (ivy--split "We're  all  Britons and   I   am your   king.")
                  '("We're all Britons"
-                  "and  I  am"
-                   "your  king."))))
+                   "and  I  am"
+                   "your  king.")))
+  (should (equal (ivy--split "^[^ ]") '("^[^ ]")))
+  (should (equal (ivy--split "^[^ ] bar") '("^[^ ]" "bar"))))
+
+(ert-deftest ivy--regex ()
+  (should (equal (ivy--regex
+                  "\\(?:interactive\\|swiper\\) \\(?:list\\|symbol\\)")
+                 
"\\(\\(?:interactive\\|swiper\\)\\).*?\\(\\(?:list\\|symbol\\)\\)")))
 
 (ert-deftest ivy--regex-fuzzy ()
   (should (string= (ivy--regex-fuzzy "tmux")
@@ -113,9 +149,31 @@
   (should (string= (ivy--regex-fuzzy "$")
                    "$")))
 
+(ert-deftest ivy--regex-ignore-order ()
+  (should (equal (ivy--regex-ignore-order "tmux")
+                 '(("tmux" . t))))
+  (should (equal (ivy--regex-ignore-order "^tmux")
+                 '(("^tmux" . t))))
+  (should (equal (ivy--regex-ignore-order "^tmux$")
+                 '(("^tmux$" . t))))
+  (should (equal (ivy--regex-ignore-order "")
+                 ""))
+  (should (equal (ivy--regex-ignore-order "^")
+                 '(("^" . t))))
+  (should (equal (ivy--regex-ignore-order "$")
+                 '(("$" . t))))
+  (should (equal (ivy--regex-ignore-order "one two")
+                 '(("one" . t) ("two" . t))))
+  (should (equal (ivy--regex-ignore-order "one two !three")
+                 '(("one" . t) ("two" . t) ("three"))))
+  (should (equal (ivy--regex-ignore-order "one two !three four")
+                 '(("one" . t) ("two" . t) ("three") ("four"))))
+  (should (equal (ivy--regex-ignore-order "!three four")
+                 '(("" . t) (("three") ("four"))))))
+
 (ert-deftest ivy--format ()
   (should (string= (let ((ivy--index 10)
-                         (ivy-format-function (lambda (x) (mapconcat (lambda 
(y) (car y)) x "\n")))
+                         (ivy-format-function (lambda (x) (mapconcat 
#'identity x "\n")))
                          (cands '("NAME"
                                   "SYNOPSIS"
                                   "DESCRIPTION"
@@ -138,3 +196,11 @@
                  '("the" "The")))
   (should (equal (ivy--filter "The" '("foo" "the" "The"))
                  '("The"))))
+
+(ert-deftest counsel-unquote-regex-parens ()
+  (should (equal (counsel-unquote-regex-parens
+                  (ivy--regex "foo bar"))
+                 "(foo).*?(bar)"))
+  (should (equal (counsel-unquote-regex-parens
+                  (ivy--regex "(foo bar"))
+                 "(\\(foo).*?(bar)")))
diff --git a/packages/swiper/ivy.el b/packages/ivy/ivy.el
similarity index 61%
rename from packages/swiper/ivy.el
rename to packages/ivy/ivy.el
index 5127582..7a49c24 100644
--- a/packages/swiper/ivy.el
+++ b/packages/ivy/ivy.el
@@ -4,6 +4,7 @@
 
 ;; Author: Oleh Krehel <address@hidden>
 ;; URL: https://github.com/abo-abo/swiper
+;; Version: 0.8.0
 ;; Package-Requires: ((emacs "24.1"))
 ;; Keywords: matching
 
@@ -46,7 +47,8 @@
 
 (defgroup ivy-faces nil
   "Font-lock faces for `ivy'."
-  :group 'ivy)
+  :group 'ivy
+  :group 'faces)
 
 (defface ivy-current-match
   '((((class color) (background light))
@@ -67,21 +69,21 @@
      :background "#e99ce8" :weight bold)
     (((class color) (background dark))
      :background "#777777" :weight bold))
-  "Face for `ivy' minibuffer matches modulo 1.")
+  "Face for `ivy' minibuffer matches numbered 1 modulo 3.")
 
 (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.")
+  "Face for `ivy' minibuffer matches numbered 2 modulo 3.")
 
 (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.")
+  "Face for `ivy' minibuffer matches numbered 3 modulo 3.")
 
 (defface ivy-confirm-face
   '((t :foreground "ForestGreen" :inherit minibuffer-prompt))
@@ -91,24 +93,28 @@
   '((t :foreground "red" :inherit minibuffer-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)))
+  '((t :inherit dired-directory))
   "Face used by Ivy for highlighting subdirs in the alternatives.")
 
 (defface ivy-modified-buffer
-  '((t :inherit 'default))
+  '((t :inherit default))
   "Face used by Ivy for highlighting modified file visiting buffers.")
 
 (defface ivy-remote
-  '((t (:foreground "#110099")))
+  '((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.")
 
+(defface ivy-action
+  '((t :inherit font-lock-builtin-face))
+  "Face used by Ivy for displaying keys in `ivy-read-action'.")
+
+(setcdr (assoc load-file-name custom-current-group-alist) 'ivy)
+
 (defcustom ivy-height 10
   "Number of lines for the minibuffer window."
   :type 'integer)
@@ -123,6 +129,10 @@ Set this to \"(%d/%d) \" to display both the index and the 
count."
           (const :tag "Count matches and show current match" "(%d/%d) ")
           string))
 
+(defcustom ivy-add-newline-after-prompt nil
+  "When non-nil, add a newline after the `ivy-read' prompt."
+  :type 'boolean)
+
 (defcustom ivy-wrap nil
   "When non-nil, wrap around after the first and the last candidate."
   :type 'boolean)
@@ -167,6 +177,48 @@ Only \"./\" and \"../\" apply here. They appear in reverse 
order."
   (setq ivy--actions-list
         (plist-put ivy--actions-list cmd actions)))
 
+(defvar ivy--display-transformers-list nil
+  "A list of str->str transformers per command.")
+
+(defun ivy-set-display-transformer (cmd transformer)
+  "Set CMD a displayed candidate TRANSFORMER.
+
+It's a lambda that takes a string one of the candidates in the
+collection and returns a string for display, the same candidate
+plus some extra information.
+
+This lambda is called only on the `ivy-height' candidates that
+are about to be displayed, not on the whole collection."
+  (setq ivy--display-transformers-list
+        (plist-put ivy--display-transformers-list cmd transformer)))
+
+(defvar ivy--sources-list nil
+  "A list of extra sources per command.")
+
+(defun ivy-set-sources (cmd sources)
+  "Attach to CMD a list of extra SOURCES.
+
+Each static source is a function that takes no argument and
+returns a list of strings.
+
+The (original-source) determines the position of the original
+dynamic source.
+
+Extra dynamic sources aren't supported yet.
+
+Example:
+
+    (defun small-recentf ()
+      (cl-subseq recentf-list 0 20))
+
+    (ivy-set-sources
+     \\='counsel-locate
+     \\='((small-recentf)
+       (original-source)))
+"
+  (setq ivy--sources-list
+        (plist-put ivy--sources-list cmd sources)))
+
 ;;* Keymap
 (require 'delsel)
 (defvar ivy-minibuffer-map
@@ -176,25 +228,23 @@ Only \"./\" and \"../\" apply here. They appear in 
reverse order."
     (define-key map (kbd "C-j") 'ivy-alt-done)
     (define-key map (kbd "C-M-j") 'ivy-immediate-done)
     (define-key map (kbd "TAB") 'ivy-partial-or-done)
-    (define-key map (kbd "C-n") 'ivy-next-line)
-    (define-key map (kbd "C-p") 'ivy-previous-line)
-    (define-key map (kbd "<down>") 'ivy-next-line)
-    (define-key map (kbd "<up>") 'ivy-previous-line)
+    (define-key map [remap next-line] 'ivy-next-line)
+    (define-key map [remap previous-line] 'ivy-previous-line)
     (define-key map (kbd "C-s") 'ivy-next-line-or-history)
     (define-key map (kbd "C-r") 'ivy-reverse-i-search)
     (define-key map (kbd "SPC") 'self-insert-command)
-    (define-key map (kbd "DEL") 'ivy-backward-delete-char)
-    (define-key map (kbd "M-DEL") 'ivy-backward-kill-word)
-    (define-key map (kbd "C-d") 'ivy-delete-char)
-    (define-key map (kbd "C-f") 'ivy-forward-char)
-    (define-key map (kbd "M-d") 'ivy-kill-word)
-    (define-key map (kbd "M-<") 'ivy-beginning-of-buffer)
-    (define-key map (kbd "M->") 'ivy-end-of-buffer)
+    (define-key map [remap delete-backward-char] 'ivy-backward-delete-char)
+    (define-key map [remap backward-kill-word] 'ivy-backward-kill-word)
+    (define-key map [remap delete-char] 'ivy-delete-char)
+    (define-key map [remap forward-char] 'ivy-forward-char)
+    (define-key map [remap kill-word] 'ivy-kill-word)
+    (define-key map [remap beginning-of-buffer] 'ivy-beginning-of-buffer)
+    (define-key map [remap end-of-buffer] 'ivy-end-of-buffer)
     (define-key map (kbd "M-n") 'ivy-next-history-element)
     (define-key map (kbd "M-p") 'ivy-previous-history-element)
     (define-key map (kbd "C-g") 'minibuffer-keyboard-quit)
-    (define-key map (kbd "C-v") 'ivy-scroll-up-command)
-    (define-key map (kbd "M-v") 'ivy-scroll-down-command)
+    (define-key map [remap scroll-up-command] 'ivy-scroll-up-command)
+    (define-key map [remap scroll-down-command] 'ivy-scroll-down-command)
     (define-key map (kbd "C-M-n") 'ivy-next-line-and-call)
     (define-key map (kbd "C-M-p") 'ivy-previous-line-and-call)
     (define-key map (kbd "M-q") 'ivy-toggle-regexp-quote)
@@ -203,19 +253,24 @@ Only \"./\" and \"../\" apply here. They appear in 
reverse order."
     (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 [remap kill-line] '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 [remap kill-ring-save] '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)
+    (define-key map (kbd "C-c C-a") 'ivy-toggle-ignore)
+    (define-key map [remap describe-mode] 'ivy-help)
     map)
   "Keymap used in the minibuffer.")
 (autoload 'hydra-ivy/body "ivy-hydra" "" t)
 
 (defvar ivy-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map [remap switch-to-buffer] 'ivy-switch-buffer)
+    (define-key map [remap switch-to-buffer]
+      'ivy-switch-buffer)
+    (define-key map [remap switch-to-buffer-other-window]
+      'ivy-switch-buffer-other-window)
     map)
   "Keymap for `ivy-mode'.")
 
@@ -236,9 +291,11 @@ Only \"./\" and \"../\" apply here. They appear in reverse 
order."
   matcher
   ;; When this is non-nil, call it for each input change to get new candidates
   dynamic-collection
+  ;; A lambda that transforms candidates only for display
+  display-transformer-fn
   caller)
 
-(defvar ivy-last nil
+(defvar ivy-last (make-ivy-state)
   "The last parameters passed to `ivy-read'.
 
 This should eventually become a stack so that you could use
@@ -247,6 +304,22 @@ This should eventually become a stack so that you could use
 (defsubst ivy-set-action (action)
   (setf (ivy-state-action ivy-last) action))
 
+(defun ivy-thing-at-point ()
+  "Return a string that corresponds to the current thing at point."
+  (or
+   (thing-at-point 'url)
+   (and (eq (ivy-state-collection ivy-last) 'read-file-name-internal)
+        (ffap-file-at-point))
+   (let (s)
+     (cond ((stringp (setq s (thing-at-point 'symbol)))
+            (if (string-match "\\`[`']?\\(.*?\\)'?\\'" s)
+                (match-string 1 s)
+              s))
+           ((looking-at "(+\\(\\(?:\\sw\\|\\s_\\)+\\)\\_>")
+            (match-string-no-properties 1))
+           (t
+            "")))))
+
 (defvar ivy-history nil
   "History list of candidates entered in the minibuffer.
 
@@ -269,12 +342,36 @@ of `history-length'.")
   "Store the index of the current candidate.")
 
 (defvar ivy-exit nil
-  "Store 'done if the completion was successfully selected.
+  "Store `done' if the completion was successfully selected.
 Otherwise, store nil.")
 
 (defvar ivy--all-candidates nil
   "Store the candidates passed to `ivy-read'.")
 
+(defvar ivy--extra-candidates '((original-source))
+  "Store candidates added by the extra sources.
+
+This is an internal-use alist. Each key is a function name, or
+original-source (which represents where the current dynamic
+candidates should go).
+
+Each value is an evaluation of the function, in case of static
+sources. These values will subsequently be filtered on `ivy-text'.
+
+This variable is set by `ivy-read' and used by `ivy--set-candidates'.")
+
+(defcustom ivy-use-ignore-default t
+  "The default policy for user-configured candidate filtering."
+  :type '(choice
+          (const :tag "Ignore ignored always" always)
+          (const :tag "Ignore ignored when others exist" t)
+          (const :tag "Don't ignore" nil)))
+
+(defvar ivy-use-ignore t
+  "Store policy for user-configured candidate filtering.
+This may be changed dynamically by `ivy-toggle-ignore'.
+Use `ivy-use-ignore-default' for a permanent configuration.")
+
 (defvar ivy--default nil
   "Default initial input.")
 
@@ -308,6 +405,18 @@ When non-nil, it should contain at least one %d.")
 
 (defvar Info-current-file)
 
+(eval-and-compile
+  (unless (fboundp 'defvar-local)
+    (defmacro defvar-local (var val &optional docstring)
+      "Define VAR as a buffer-local variable with default value VAL."
+      (declare (debug defvar) (doc-string 3))
+      (list 'progn (list 'defvar var val docstring)
+            (list 'make-variable-buffer-local (list 'quote var)))))
+  (unless (fboundp 'setq-local)
+    (defmacro setq-local (var val)
+      "Set variable VAR to value VAL in current buffer."
+      (list 'set (list 'make-local-variable (list 'quote var)) val))))
+
 (defmacro ivy-quit-and-run (&rest body)
   "Quit the minibuffer and run BODY afterwards."
   `(progn
@@ -349,7 +458,10 @@ When non-nil, it should contain at least one %d.")
   "Exit the minibuffer with the selected candidate."
   (interactive)
   (delete-minibuffer-contents)
-  (cond ((> ivy--length 0)
+  (cond ((or (> ivy--length 0)
+             ;; the action from `ivy-dispatching-done' may not need a
+             ;; candidate at all
+             (eq this-command 'ivy-dispatching-done))
          (ivy--done ivy--current))
         ((memq (ivy-state-collection ivy-last)
                '(read-file-name-internal internal-complete-buffer))
@@ -367,30 +479,48 @@ When non-nil, it should contain at least one %d.")
          (insert ivy-text)
          (ivy--exhibit))))
 
+(defvar ivy-read-action-format-function 'ivy-read-action-format-default
+  "Function used to transform the actions list into a docstring.")
+
+(defun ivy-read-action-format-default (actions)
+  "Create a docstring from ACTIONS.
+
+ACTIONS is a list. Each list item is a list of 3 items:
+key (a string), cmd and doc (a string)."
+  (format "%s\n%s\n"
+          (if (eq this-command 'ivy-read-action)
+              "Select action: "
+            ivy--current)
+          (mapconcat
+           (lambda (x)
+             (format "%s: %s"
+                     (propertize
+                      (car x)
+                      'face 'ivy-action)
+                     (nth 2 x)))
+           actions
+           "\n")))
+
 (defun ivy-read-action ()
-  "Change the action to one of the available ones."
+  "Change the action to one of the available ones.
+
+Return nil for `minibuffer-keyboard-quit' or wrong key during the
+selection, non-nil otherwise."
   (interactive)
   (let ((actions (ivy-state-action ivy-last)))
-    (unless (null (ivy--actionp actions))
-      (let* ((hint (concat ivy--current
-                           "\n"
-                           (mapconcat
-                            (lambda (x)
-                              (format "%s: %s"
-                                      (propertize
-                                       (car x)
-                                       'face 'font-lock-builtin-face)
-                                      (nth 2 x)))
-                            (cdr actions)
-                            "\n")
-                           "\n"))
+    (if (null (ivy--actionp actions))
+        t
+      (let* ((hint (funcall ivy-read-action-format-function (cdr actions)))
+             (resize-mini-windows 'grow-only)
              (key (string (read-key hint)))
              (action-idx (cl-position-if
                           (lambda (x) (equal (car x) key))
                           (cdr actions))))
-        (cond ((string= key ""))
+        (cond ((string= key "")
+               nil)
               ((null action-idx)
-               (error "%s is not bound" key))
+               (message "%s is not bound" key)
+               nil)
               (t
                (message "")
                (setcar actions (1+ action-idx))
@@ -399,8 +529,8 @@ When non-nil, it should contain at least one %d.")
 (defun ivy-dispatching-done ()
   "Select one of the available actions and call `ivy-done'."
   (interactive)
-  (ivy-read-action)
-  (ivy-done))
+  (when (ivy-read-action)
+    (ivy-done)))
 
 (defun ivy-dispatching-call ()
   "Select one of the available actions and call `ivy-call'."
@@ -432,8 +562,7 @@ When ARG is t, exit with current text, ignoring the 
candidates."
         (ivy--directory
          (ivy--directory-done))
         ((eq (ivy-state-collection ivy-last) 'Info-read-node-name-1)
-         (if (or (equal ivy--current "(./)")
-                 (equal ivy--current "(../)"))
+         (if (member ivy--current '("(./)" "(../)"))
              (ivy-quit-and-run
               (ivy-read "Go to file: " 'read-file-name-internal
                         :action (lambda (x)
@@ -452,23 +581,10 @@ When ARG is t, exit with current text, ignoring the 
candidates."
        (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)))))))
+      ((and
+        (> ivy--length 0)
+        (not (string= ivy--current "./"))
+        (setq dir (ivy-expand-file-if-directory ivy--current)))
        (ivy--cd dir)
        (ivy--exhibit))
       ((or (and (equal ivy--directory "/")
@@ -500,7 +616,7 @@ When ARG is t, exit with current text, ignoring the 
candidates."
          (setq res (cl-delete-duplicates res :test #'equal))
          (let* ((old-ivy-last ivy-last)
                 (enable-recursive-minibuffers t)
-                (host (ivy-read "Find File: "
+                (host (ivy-read "address@hidden: "
                                 (mapcar #'ivy-build-tramp-name res)
                                 :initial-input rest)))
            (setq ivy-last old-ivy-last)
@@ -510,6 +626,18 @@ When ARG is t, exit with current text, ignoring the 
candidates."
       (t
        (ivy-done)))))
 
+(defun ivy-expand-file-if-directory (file-name)
+  "Expand FILE-NAME as directory.
+When this directory doesn't exist, return nil."
+  (when (stringp file-name)
+    (let ((full-name
+           ;; Ignore host name must not match method "ssh"
+           (ignore-errors
+             (file-name-as-directory
+              (expand-file-name file-name ivy--directory)))))
+      (when (and full-name (file-directory-p full-name))
+        full-name))))
+
 (defcustom ivy-tab-space nil
   "When non-nil, `ivy-partial-or-done' should insert a space."
   :type 'boolean)
@@ -522,13 +650,12 @@ If the text hasn't changed as a result, forward to 
`ivy-alt-done'."
            (or (and (equal ivy--directory "/")
                     (string-match "\\`[^/]+:.*\\'" ivy-text))
                (string-match "\\`/" ivy-text)))
-      (let ((default-directory ivy--directory))
+      (let ((default-directory ivy--directory)
+            dir)
         (minibuffer-complete)
         (setq ivy-text (ivy--input))
-        (when (file-directory-p
-               (expand-file-name ivy-text ivy--directory))
-          (ivy--cd (file-name-as-directory
-                    (expand-file-name ivy-text ivy--directory)))))
+        (when (setq dir (ivy-expand-file-if-directory ivy-text))
+          (ivy--cd dir)))
     (or (ivy-partial)
         (when (or (eq this-command last-command)
                   (eq ivy--length 1))
@@ -576,30 +703,32 @@ If the text hasn't changed as a result, forward to 
`ivy-alt-done'."
 (defun ivy-resume ()
   "Resume the last completion session."
   (interactive)
-  (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
+  (if (null (ivy-state-action ivy-last))
+      (user-error "The last session isn't compatible with `ivy-resume'")
+    (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-local ivy-calling nil
   "When non-nil, call the current action when `ivy--index' changes.")
 
 (defun ivy-set-index (index)
@@ -660,9 +789,9 @@ If the text hasn't changed as a result, forward to 
`ivy-alt-done'."
   "Move cursor vertically down ARG candidates.
 If the input is empty, select the previous history element instead."
   (interactive "p")
-  (when (string= ivy-text "")
-    (ivy-previous-history-element 1))
-  (ivy-next-line arg))
+  (if (string= ivy-text "")
+      (ivy-previous-history-element 1)
+    (ivy-next-line arg)))
 
 (defun ivy-previous-line (&optional arg)
   "Move cursor vertically up ARG candidates."
@@ -689,6 +818,16 @@ If the input is empty, select the previous history element 
instead."
   (when (setq ivy-calling (not ivy-calling))
     (ivy-call)))
 
+(defun ivy-toggle-ignore ()
+  "Toggle user-configured candidate filtering."
+  (interactive)
+  (setq ivy-use-ignore
+        (if ivy-use-ignore
+            nil
+          (or ivy-use-ignore-default t)))
+  ;; invalidate cache
+  (setq ivy--old-cands nil))
+
 (defun ivy--get-action (state)
   "Get the action function from STATE."
   (let ((action (ivy-state-action state)))
@@ -699,12 +838,14 @@ If the input is empty, select the previous history 
element instead."
 
 (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)))))
+  (if (ivy-state-p state)
+      (let ((window (ivy-state-window state)))
+        (if (window-live-p window)
+            window
+          (if (= (length (window-list)) 1)
+              (selected-window)
+            (next-window))))
+    (selected-window)))
 
 (defun ivy--actionp (x)
   "Return non-nil when X is a list of actions."
@@ -736,24 +877,36 @@ If the input is empty, select the previous history 
element instead."
                 (nth 2 (nth (car action) action)))
       "[1/1] default")))
 
+(defvar ivy-inhibit-action nil
+  "When non-nil, `ivy-call' does nothing.
+
+Example use:
+
+    (let* ((ivy-inhibit-action t)
+          (str (counsel-locate \"lispy.el\")))
+     ;; do whatever with str - the corresponding file will not be opened
+     )")
+
 (defun ivy-call ()
   "Call the current action without exiting completion."
   (interactive)
-  (let ((action (ivy--get-action ivy-last)))
-    (when action
-      (let* ((collection (ivy-state-collection ivy-last))
-             (x (if (and (consp collection)
-                         (consp (car collection)))
-                    (cdr (assoc ivy--current collection))
-                  (if (equal ivy--current "")
-                      ivy-text
-                    ivy--current))))
-        (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))))))))
+  (unless ivy-inhibit-action
+    (let ((action (ivy--get-action ivy-last)))
+      (when action
+        (let* ((collection (ivy-state-collection ivy-last))
+               (x (cond ((and (consp collection)
+                              (consp (car collection))
+                              (cdr (assoc ivy--current collection))))
+                        ((equal ivy--current "")
+                         ivy-text)
+                        (t
+                         ivy--current))))
+          (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.
@@ -782,18 +935,42 @@ Call the permanent action if possible."
 (defun ivy-next-history-element (arg)
   "Forward to `next-history-element' with ARG."
   (interactive "p")
-  (next-history-element arg)
+  (if (and (= minibuffer-history-position 0)
+           (equal ivy-text ""))
+      (progn
+        (insert ivy--default)
+        (when (and (with-ivy-window (derived-mode-p 'prog-mode))
+                   (eq (ivy-state-caller ivy-last) 'swiper)
+                   (not (file-exists-p ivy--default))
+                   (not (ffap-url-p ivy--default))
+                   (not (ivy-state-dynamic-collection ivy-last))
+                   (> (point) (minibuffer-prompt-end)))
+          (undo-boundary)
+          (insert "\\_>")
+          (goto-char (minibuffer-prompt-end))
+          (insert "\\_<")
+          (forward-char (+ 2 (length ivy--default)))))
+    (next-history-element arg))
   (ivy--cd-maybe)
   (move-end-of-line 1)
   (ivy--maybe-scroll-history))
 
+(defvar ivy-ffap-url-functions nil
+  "List of functions that check if the point is on a URL.")
+
 (defun ivy--cd-maybe ()
   "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 (ivy--input))
           url)
-      (if (setq url (ffap-url-p input))
+      (if (setq url (or (ffap-url-p input)
+                        (with-ivy-window
+                          (cl-reduce
+                           (lambda (a b)
+                             (or a (funcall b)))
+                           ivy-ffap-url-functions
+                           :initial-value nil))))
           (ivy-exit-with-action
            (lambda (_)
              (funcall ffap-url-fetcher url)))
@@ -937,9 +1114,10 @@ On error (read-only), call `ivy-on-del-error-function'."
             (avy--process
              (nreverse candidates)
              (avy--style-fn avy-style)))))
-    (ivy-set-index (- (line-number-at-pos candidate) 2))
-    (ivy--exhibit)
-    (ivy-done)))
+    (when (numberp candidate)
+      (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.
@@ -972,12 +1150,13 @@ See also `ivy-sort-max-size'."
   :type
   '(alist
     :key-type (choice
-               (const :tag "All other functions" t)
-               (symbol :tag "Function"))
+               (const :tag "Fall-through" t)
+               (symbol :tag "Collection"))
     :value-type (choice
-                 (const :tag "plain sort" string-lessp)
-                 (const :tag "file sort" ivy-sort-file-function-default)
-                 (const :tag "no sort" nil)))
+                 (const :tag "Plain sort" string-lessp)
+                 (const :tag "File sort" ivy-sort-file-function-default)
+                 (const :tag "No sort" nil)
+                 (function :tag "Custom function")))
   :group 'ivy)
 
 (defvar ivy-index-functions-alist
@@ -994,11 +1173,18 @@ selected.")
 (defvar ivy-re-builders-alist
   '((t . ivy--regex-plus))
   "An alist of regex building functions for each collection function.
-Each function should take a string and return a valid regex or a
-regex sequence (see below).
 
-The entry associated with t is used for all fall-through cases.
-Possible choices: `ivy--regex', `regexp-quote', `ivy--regex-plus'.
+Each key is (in order of priority):
+1. The actual collection function, e.g. `read-file-name-internal'.
+2. The symbol passed by :caller into `ivy-read'.
+3. `this-command'.
+4. t.
+
+Each value is a function that should take a string and return a
+valid regex or a regex sequence (see below).
+
+Possible choices: `ivy--regex', `regexp-quote',
+`ivy--regex-plus', `ivy--regex-fuzzy'.
 
 If a function returns a list, it should format like this:
 '((\"matching-regexp\" . t) (\"non-matching-regexp\") ...).
@@ -1043,11 +1229,17 @@ Directories come first."
         (push dir seq))
       seq)))
 
+(defvar ivy-recursive-restore t
+  "When non-nil, restore the above state when exiting the minibuffer.
+This variable is let-bound to nil by functions that take care of
+the restoring themselves.")
+
 ;;** 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 
caller)
+                    &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 format string, normally ending in a colon and a
@@ -1086,15 +1278,41 @@ 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)))
+  (let ((extra-actions (delete-dups
+                        (append (plist-get ivy--actions-list t)
+                                (plist-get ivy--actions-list this-command)
+                                (plist-get ivy--actions-list caller)))))
     (when extra-actions
       (setq action
-            (if (functionp action)
-                `(1
-                  ("o" ,action "default")
-                  ,@extra-actions)
-              (delete-dups (append action extra-actions))))))
-  (let ((recursive-ivy-last (and (active-minibuffer-window) ivy-last)))
+            (cond ((functionp action)
+                   `(1
+                     ("o" ,action "default")
+                     ,@extra-actions))
+                  ((null action)
+                   `(1
+                     ("o" identity "default")
+                     ,@extra-actions))
+                  (t
+                   (delete-dups (append action extra-actions)))))))
+  (let ((extra-sources (plist-get ivy--sources-list caller)))
+    (if extra-sources
+        (progn
+          (setq ivy--extra-candidates nil)
+          (dolist (source extra-sources)
+            (cond ((equal source '(original-source))
+                   (setq ivy--extra-candidates
+                         (cons source ivy--extra-candidates)))
+                  ((null (cdr source))
+                   (setq ivy--extra-candidates
+                         (cons
+                          (list (car source) (funcall (car source)))
+                          ivy--extra-candidates))))))
+      (setq ivy--extra-candidates '((original-source)))))
+  (let ((recursive-ivy-last (and (active-minibuffer-window) ivy-last))
+        (transformer-fn
+         (plist-get ivy--display-transformers-list
+                    (or caller (and (functionp collection)
+                                    collection)))))
     (setq ivy-last
           (make-ivy-state
            :prompt prompt
@@ -1114,39 +1332,44 @@ customizations apply to the current completion session."
            :re-builder re-builder
            :matcher matcher
            :dynamic-collection dynamic-collection
+           :display-transformer-fn transformer-fn
            :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)))
+             (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))))
+                 (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))))))))
+                 ivy--current))
           (remove-hook 'post-command-hook #'ivy--exhibit)
           (when (setq unwind (ivy-state-unwind ivy-last))
-            (funcall unwind)))
+            (funcall unwind))
+          (unless (eq ivy-exit 'done)
+            (when recursive-ivy-last
+              (ivy--reset-state (setq ivy-last recursive-ivy-last)))))
       (ivy-call)
-      (when recursive-ivy-last
+      (when (and recursive-ivy-last
+                 ivy-recursive-restore)
         (ivy--reset-state (setq ivy-last recursive-ivy-last))))))
 
 (defun ivy--reset-state (state)
@@ -1174,6 +1397,7 @@ This is useful for recursive `ivy-read'."
                    (cdr (assoc collection ivy-re-builders-alist)))
               (and caller
                    (cdr (assoc caller ivy-re-builders-alist)))
+              (cdr (assoc this-command ivy-re-builders-alist))
               (cdr (assoc t ivy-re-builders-alist))
               'ivy--regex))
     (setq ivy--subexps 0)
@@ -1182,6 +1406,7 @@ This is useful for recursive `ivy-read'."
     (setq ivy--full-length nil)
     (setq ivy-text "")
     (setq ivy-calling nil)
+    (setq ivy-use-ignore ivy-use-ignore-default)
     (let (coll sort-fn)
       (cond ((eq collection 'Info-read-node-name-1)
              (if (equal Info-current-file "dir")
@@ -1192,7 +1417,11 @@ This is useful for recursive `ivy-read'."
                                 :test #'equal)))
                (setq coll (all-completions "" collection predicate))))
             ((eq collection 'read-file-name-internal)
-             (setq ivy--directory default-directory)
+             (if (and initial-input (file-directory-p initial-input))
+                 (progn
+                   (setq ivy--directory initial-input)
+                   (setq initial-input nil))
+               (setq ivy--directory default-directory))
              (require 'dired)
              (when preselect
                (let ((preselect-directory (file-name-directory preselect)))
@@ -1209,14 +1438,19 @@ This is useful for recursive `ivy-read'."
                            (equal initial-input default-directory)
                            (equal initial-input ""))
                  (setq coll (cons initial-input coll)))
-               (setq initial-input nil)))
+               (unless (and (ivy-state-action ivy-last)
+                            (not (equal (ivy--get-action ivy-last) 'identity)))
+                 (setq initial-input nil))))
             ((eq collection 'internal-complete-buffer)
-             (setq coll (ivy--buffer-list "" ivy-use-virtual-buffers)))
+             (setq coll (ivy--buffer-list "" ivy-use-virtual-buffers 
predicate)))
+            (dynamic-collection
+             (setq coll (funcall collection ivy-text)))
             ((or (functionp collection)
                  (byte-code-function-p collection)
                  (vectorp collection)
                  (and (consp collection) (listp (car collection)))
-                 (hash-table-p collection))
+                 (hash-table-p collection)
+                 (and (listp collection) (symbolp (car collection))))
              (setq coll (all-completions "" collection predicate)))
             (t
              (setq coll collection)))
@@ -1230,6 +1464,7 @@ This is useful for recursive `ivy-read'."
             (if (and (setq sort-fn (cdr (assoc t ivy-sort-functions-alist)))
                      (<= (length coll) ivy-sort-max-size))
                 (setq coll (cl-sort (copy-sequence coll) sort-fn))))))
+      (setq coll (ivy--set-candidates coll))
       (when preselect
         (unless (or (and require-match
                          (not (eq collection 'internal-complete-buffer)))
@@ -1260,10 +1495,12 @@ This is useful for recursive `ivy-read'."
                                   coll)))
                           0))))
     (setq ivy-exit nil)
-    (setq ivy--default (or
-                        (thing-at-point 'url)
-                        (thing-at-point 'symbol)
-                        ""))
+    (setq ivy--default
+          (if (region-active-p)
+              (buffer-substring
+               (region-beginning)
+               (region-end))
+            (ivy-thing-at-point)))
     (setq ivy--prompt
           (cond ((string-match "%.*d" prompt)
                  prompt)
@@ -1286,7 +1523,7 @@ This is useful for recursive `ivy-read'."
                 (ivy--directory
                  prompt)
                 (t
-                 nil)))
+                 prompt)))
     (setf (ivy-state-initial-input ivy-last) initial-input)))
 
 ;;;###autoload
@@ -1298,11 +1535,11 @@ This is useful for recursive `ivy-read'."
 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.
+PROMPT is a string that normally ends in a colon and a space.
+COLLECTION is either a list of strings, an alist, an obarray, or a hash table.
 PREDICATE limits completion to a subset of COLLECTION.
-REQUIRE-MATCH is specified with a boolean value.  See `completing-read'.
-INITIAL-INPUT is a string that can be inserted into the minibuffer initially.
+REQUIRE-MATCH is a boolean value.  See `completing-read'.
+INITIAL-INPUT is a string inserted into the minibuffer initially.
 HISTORY is a list of previously selected inputs.
 DEF is the default value.
 INHERIT-INPUT-METHOD is currently ignored."
@@ -1332,11 +1569,85 @@ INHERIT-INPUT-METHOD is currently ignored."
               :history history
               :keymap nil
               :sort
-              (let ((sort (assoc this-command ivy-sort-functions-alist)))
+              (let ((sort (or (assoc this-command ivy-sort-functions-alist)
+                              (assoc t ivy-sort-functions-alist))))
                 (if sort
                     (cdr sort)
                   t)))))
 
+(defvar ivy-completion-beg nil
+  "Completion bounds start.")
+
+(defvar ivy-completion-end nil
+  "Completion bounds end.")
+
+(defun ivy-completion-in-region-action (str)
+  "Insert STR, erasing the previous one.
+The previous string is between `ivy-completion-beg' and `ivy-completion-end'."
+  (when (stringp str)
+    (with-ivy-window
+      (when ivy-completion-beg
+        (delete-region
+         ivy-completion-beg
+         ivy-completion-end))
+      (setq ivy-completion-beg
+            (move-marker (make-marker) (point)))
+      (insert str)
+      (setq ivy-completion-end
+            (move-marker (make-marker) (point))))))
+
+(defun ivy-completion-common-length (str)
+  "Return the length of the first `completions-common-part' face in STR."
+  (let ((pos 0)
+        (len (length str)))
+    (while (and (<= pos len)
+                (let ((prop (get-text-property pos 'face str)))
+                  (not (eq 'completions-common-part
+                           (if (listp prop) (car prop) prop)))))
+      (setq pos (1+ pos)))
+    (if (< pos len)
+        (or (next-single-property-change pos 'face str) len)
+      0)))
+
+(defun ivy-completion-in-region (start end collection &optional predicate)
+  "An Ivy function suitable for `completion-in-region-function'."
+  (let* ((enable-recursive-minibuffers t)
+         (str (buffer-substring-no-properties start end))
+         (completion-ignore-case case-fold-search)
+         (comps
+          (completion-all-completions str collection predicate (- end start))))
+    (if (null comps)
+        (message "No matches")
+      (nconc comps nil)
+      (setq ivy-completion-beg (- end (ivy-completion-common-length (car 
comps))))
+      (setq ivy-completion-end end)
+      (if (null (cdr comps))
+          (if (string= str (car comps))
+              (message "Sole match")
+            (setf (ivy-state-window ivy-last) (selected-window))
+            (ivy-completion-in-region-action
+             (substring-no-properties
+              (car comps))))
+        (let* ((w (1+ (floor (log (length comps) 10))))
+               (ivy-count-format (if (string= ivy-count-format "")
+                                     ivy-count-format
+                                   (format "%%-%dd " w)))
+               (prompt (format "(%s): " str)))
+          (and
+           (ivy-read (if (string= ivy-count-format "")
+                         prompt
+                       (replace-regexp-in-string "%" "%%" prompt))
+                     ;; remove 'completions-first-difference face
+                     (mapcar #'substring-no-properties comps)
+                     :predicate predicate
+                     :action #'ivy-completion-in-region-action
+                     :require-match t)
+           t))))))
+
+(defcustom ivy-do-completion-in-region t
+  "When non-nil `ivy-mode' will set `completion-in-region-function'."
+  :type 'boolean)
+
 ;;;###autoload
 (define-minor-mode ivy-mode
   "Toggle Ivy mode on or off.
@@ -1354,8 +1665,12 @@ Minibuffer bindings:
   :keymap ivy-mode-map
   :lighter " ivy"
   (if ivy-mode
-      (setq completing-read-function 'ivy-completing-read)
-    (setq completing-read-function 'completing-read-default)))
+      (progn
+        (setq completing-read-function 'ivy-completing-read)
+        (when ivy-do-completion-in-region
+          (setq completion-in-region-function 'ivy-completion-in-region)))
+    (setq completing-read-function 'completing-read-default)
+    (setq completion-in-region-function 'completion--in-region)))
 
 (defun ivy--preselect-index (preselect candidates)
   "Return the index of PRESELECT in CANDIDATES."
@@ -1363,7 +1678,7 @@ Minibuffer bindings:
          preselect)
         ((cl-position preselect candidates :test #'equal))
         ((stringp preselect)
-         (let ((re (regexp-quote preselect)))
+         (let ((re preselect))
            (cl-position-if
             (lambda (x)
               (string-match re x))
@@ -1386,19 +1701,27 @@ This allows to \"quote\" N spaces by inputting N+1 
spaces."
         match-len)
     (while (and (string-match " +" str start1)
                 (< start1 len))
-      (setq match-len (- (match-end 0) (match-beginning 0)))
-      (if (= match-len 1)
+      (if (and (> (match-beginning 0) 2)
+               (string= "[^" (substring
+                              str
+                              (- (match-beginning 0) 2)
+                              (match-beginning 0))))
           (progn
-            (when start0
-              (setq start1 start0)
-              (setq start0 nil))
-            (push (substring str start1 (match-beginning 0)) res)
-            (setq start1 (match-end 0)))
-        (setq str (replace-match
-                   (make-string (1- match-len) ?\ )
-                   nil nil str))
-        (setq start0 (or start0 start1))
-        (setq start1 (1- (match-end 0)))))
+            (setq start1 (match-end 0))
+            (setq start0 0))
+        (setq match-len (- (match-end 0) (match-beginning 0)))
+        (if (= match-len 1)
+            (progn
+              (when start0
+                (setq start1 start0)
+                (setq start0 nil))
+              (push (substring str start1 (match-beginning 0)) res)
+              (setq start1 (match-end 0)))
+          (setq str (replace-match
+                     (make-string (1- match-len) ?\ )
+                     nil nil str))
+          (setq start0 (or start0 start1))
+          (setq start1 (1- (match-end 0))))))
     (if start0
         (push (substring str start0) res)
       (setq s (substring str start1))
@@ -1426,7 +1749,7 @@ When GREEDY is non-nil, join words in a greedy way."
                          (setq ivy--subexps (length subs))
                          (mapconcat
                           (lambda (x)
-                            (if (string-match "\\`\\\\(.*\\\\)\\'" x)
+                            (if (string-match "\\`\\\\([^?].*\\\\)\\'" x)
                                 x
                               (format "\\(%s\\)" x)))
                           subs
@@ -1435,32 +1758,36 @@ When GREEDY is non-nil, join words in a greedy way."
                             ".*?")))))
                     ivy--regex-hash)))))
 
-(defun ivy--regex-ignore-order (str)
+(defun ivy--regex-ignore-order--part (str &optional discard)
   "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.
-"
+Ignore the order of each group."
   (let* ((subs (split-string str " +" t))
          (len (length subs)))
     (cl-case len
-      (1
-       (setq ivy--subexps 0)
-       (car subs))
+      (0
+       "")
       (t
-       (setq ivy--subexps len)
-       (let ((all (mapconcat #'identity subs "\\|")))
-         (mapconcat
-          (lambda (x)
-            (if (string-match "\\`\\\\(.*\\\\)\\'" x)
-                x
-              (format "\\(%s\\)" x)))
-          (make-list len all)
-          ".*?"))))))
+       (mapcar (lambda (x) (cons x (not discard)))
+               subs)))))
+
+(defun ivy--regex-ignore-order (str)
+  "Re-build regex from STR by splitting at spaces.
+Ignore the order of each group. Everything before \"!\" should
+match. Everything after \"!\" should not match."
+  (let ((parts (split-string str "!" t)))
+    (cl-case (length parts)
+      (0
+       "")
+      (1
+       (if (string= (substring str 0 1) "!")
+           (list (cons "" t)
+                 (ivy--regex-ignore-order--part (car parts) t))
+         (ivy--regex-ignore-order--part (car parts))))
+      (2
+       (append
+        (ivy--regex-ignore-order--part (car parts))
+        (ivy--regex-ignore-order--part (cadr parts) t)))
+      (t (error "Unexpected: use only one !")))))
 
 (defun ivy--regex-plus (str)
   "Build a regex sequence from STR.
@@ -1471,13 +1798,14 @@ match. Everything after \"!\" should not match."
       (0
        "")
       (1
-       (ivy--regex (car parts)))
+       (if (string= (substring str 0 1) "!")
+           (list (cons "" t)
+                 (list (ivy--regex (car parts))))
+         (ivy--regex (car parts))))
       (2
-       (let ((res
-              (mapcar #'list
-                      (split-string (cadr parts) " " t))))
-         (cons (cons (ivy--regex (car parts)) t)
-               res)))
+       (cons
+        (cons (ivy--regex (car parts)) t)
+        (mapcar #'list (split-string (cadr parts) " " t))))
       (t (error "Unexpected: use only one !")))))
 
 (defun ivy--regex-fuzzy (str)
@@ -1494,6 +1822,14 @@ Insert .* between each char."
         (setq ivy--subexps (length (match-string 2 str))))
     str))
 
+(defcustom ivy-fixed-height-minibuffer nil
+  "When non nil, fix the height of the minibuffer during ivy
+completion at `ivy-height'. This effectively sets the minimum
+height at this level and tries to ensure that it does not change
+depending on the number of candidates."
+  :group 'ivy
+  :type 'boolean)
+
 ;;** Rest
 (defun ivy--minibuffer-setup ()
   "Setup ivy completion in the minibuffer."
@@ -1501,9 +1837,12 @@ Insert .* between each char."
   (set (make-local-variable 'minibuffer-default-add-function)
        (lambda ()
          (list ivy--default)))
+  (set (make-local-variable 'inhibit-field-text-motion) nil)
   (when (display-graphic-p)
     (setq truncate-lines t))
   (setq-local max-mini-window-height ivy-height)
+  (when ivy-fixed-height-minibuffer
+    (set-window-text-height (selected-window) ivy-height))
   (add-hook 'post-command-hook #'ivy--exhibit nil t)
   ;; show completions with empty input
   (ivy--exhibit))
@@ -1525,7 +1864,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)
@@ -1566,6 +1905,8 @@ Insert .* between each char."
                  (window-width))
               (setq n-str (concat n-str "\n" d-str))
             (setq n-str (concat n-str d-str)))
+          (when ivy-add-newline-after-prompt
+            (setq n-str (concat n-str "\n")))
           (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))))
@@ -1608,6 +1949,28 @@ Insert .* between each char."
             (cl-sort (copy-sequence collection) sort-fn)
           collection)))))
 
+(defun ivy--magic-file-slash ()
+  (cond ((member ivy-text ivy--all-candidates)
+         (ivy--cd (expand-file-name ivy-text ivy--directory)))
+        ((string-match "//\\'" ivy-text)
+         (if (and default-directory
+                  (string-match "\\`[[:alpha:]]:/" default-directory))
+             (ivy--cd (match-string 0 default-directory))
+           (ivy--cd "/")))
+        ((string-match "[[:alpha:]]:/\\'" ivy-text)
+         (let ((drive-root (match-string 0 ivy-text)))
+           (when (file-exists-p drive-root)
+             (ivy--cd drive-root))))
+        ((and (or (> ivy--index 0)
+                  (= ivy--length 1)
+                  (not (string= ivy-text "/")))
+              (let ((default-directory ivy--directory))
+                (and
+                 (not (equal ivy--current ""))
+                 (file-directory-p ivy--current)
+                 (file-exists-p ivy--current))))
+         (ivy--cd (expand-file-name ivy--current ivy--directory)))))
+
 (defun ivy--exhibit ()
   "Insert Ivy completions display.
 Should be run via minibuffer `post-command-hook'."
@@ -1630,17 +1993,7 @@ Should be run via minibuffer `post-command-hook'."
              (ivy--format ivy--all-candidates))))
       (cond (ivy--directory
              (if (string-match "/\\'" ivy-text)
-                 (if (member ivy-text ivy--all-candidates)
-                     (ivy--cd (expand-file-name ivy-text ivy--directory))
-                   (when (string-match "//\\'" ivy-text)
-                     (if (and default-directory
-                              (string-match "\\`[[:alpha:]]:/" 
default-directory))
-                         (ivy--cd (match-string 0 default-directory))
-                       (ivy--cd "/")))
-                   (when (string-match "[[:alpha:]]:/$" ivy-text)
-                     (let ((drive-root (match-string 0 ivy-text)))
-                       (when (file-exists-p drive-root)
-                         (ivy--cd drive-root)))))
+                 (ivy--magic-file-slash)
                (if (string-match "\\`~\\'" ivy-text)
                    (ivy--cd (expand-file-name "~/")))))
             ((eq (ivy-state-collection ivy-last) 'internal-complete-buffer)
@@ -1681,16 +2034,20 @@ Should be run via minibuffer `post-command-hook'."
 
 (defun ivy--resize-minibuffer-to-fit ()
   "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)))
+  (unless (frame-root-window-p (minibuffer-window))
+    (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)
+              ;; Note: the size increment needs to be at least 
frame-char-height,
+              ;; otherwise resizing won't do anything.
+              (let ((delta (max (- text-height body-height) 
(frame-char-height))))
+                (window-resize nil delta 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 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))))))
+            (window-resize nil (- text-height body-height) nil t)))))))
 
 (declare-function colir-blend-face-background "ext:colir")
 
@@ -1738,6 +2095,25 @@ You can toggle this to make `case-fold-search' nil 
regardless of input."
   ;; reset cache so that the candidate list updates
   (setq ivy--old-re nil))
 
+(defun ivy--re-filter (re candidates)
+  "Return all RE matching CANDIDATES.
+RE is a list of cons cells, with a regexp car and a boolean cdr.
+When the cdr is t, the car must match.
+Otherwise, the car must not match."
+  (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))
+
 (defun ivy--filter (name candidates)
   "Return all items that match NAME in CANDIDATES.
 CANDIDATES are assumed to be static."
@@ -1752,15 +2128,15 @@ CANDIDATES are assumed to be static."
               (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)
+                      (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)
@@ -1770,36 +2146,51 @@ CANDIDATES are assumed to be static."
                           (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--re-filter re candidates)))))
         (ivy--recompute-index name re-str cands)
-        (setq ivy--old-re (if cands re-str ""))
+        (setq ivy--old-re
+              (if (eq ivy--regex-function 'ivy--regex-ignore-order)
+                  re
+                (if cands
+                    re-str
+                  "")))
         (setq ivy--old-cands (ivy--sort name cands))))))
 
+(defun ivy--set-candidates (x)
+  "Update `ivy--all-candidates' with X."
+  (let (res)
+    (dolist (source ivy--extra-candidates)
+      (if (equal source '(original-source))
+          (if (null res)
+              (setq res x)
+            (setq res (append x res)))
+        (setq ivy--old-re nil)
+        (setq res (append
+                   (ivy--filter ivy-text (cadr source))
+                   res))))
+    (setq ivy--all-candidates res)))
+
 (defcustom ivy-sort-matches-functions-alist '((t . nil))
-  "An alist of functions used to sort the matching candidates.
+  "An alist of functions for sorting 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.
+Unlike `ivy-sort-functions-alist', which is used to sort the
+whole collection only once, this alist of functions are used to
+sort only matching candidates after each change in input.
 
-The alist KEY is a collection function or t to match previously
-not matched collection functions.
+The alist KEY is either a collection function or t to match
+previously unmatched collection functions.
 
 The alist VAL is a sorting function with the signature of
-`ivy--prefix-sort'.")
+`ivy--prefix-sort'."
+  :type '(alist
+          :key-type (choice
+                     (const :tag "Fall-through" t)
+                     (symbol :tag "Collection"))
+          :value-type
+          (choice
+           (const :tag "Don't sort" nil)
+           (const :tag "Put prefix matches ahead" 'ivy--prefix-sort)
+           (function :tag "Custom sort function"))))
 
 (defun ivy--sort-files-by-date (_name candidates)
   "Re-soft CANDIDATES according to file modification date."
@@ -1850,10 +2241,10 @@ Prefix matches to NAME are put ahead of the list."
     (unless (eq this-command 'ivy-resume)
       (setq ivy--index
             (or
-             (cl-position (if (and (> (length re-str) 0)
-                                   (eq ?^ (aref re-str 0)))
-                              (substring re-str 1)
-                            re-str) cands
+             (cl-position (if (and (> (length name) 0)
+                                   (eq ?^ (aref name 0)))
+                              (substring name 1)
+                            name) cands
                             :test #'equal)
              (and ivy--directory
                   (cl-position
@@ -1863,7 +2254,7 @@ Prefix matches to NAME are put ahead of the list."
                   (not (and (require 'flx nil 'noerror)
                             (eq ivy--regex-function 'ivy--regex-fuzzy)
                             (< (length cands) 200)))
-
+                  ivy--old-cands
                   (cl-position (nth ivy--index ivy--old-cands)
                                cands))
              (funcall func re-str cands))))
@@ -1884,7 +2275,9 @@ Prefix matches to NAME are put ahead of the list."
           (while (and tail (null idx))
             ;; Compare with eq to handle equal duplicates in cands
             (setq idx (cl-position (pop tail) cands)))
-          (or idx 0))
+          (or
+           idx
+           (1- (length cands))))
       (if ivy--old-cands
           ivy--index
         ;; already in ivy-state-buffer
@@ -1898,25 +2291,55 @@ Prefix matches to NAME are put ahead of the list."
           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)))
+  (if (null ivy--old-cands)
+      (let ((ln (with-ivy-window
+                  (line-number-at-pos))))
+        (or
+         ;; closest to current line going forwards
+         (cl-position-if (lambda (x)
+                           (>= (string-to-number x) ln))
+                         cands)
+         ;; closest to current line going backwards
+         (1- (length 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)
 
+(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."
+  :type '(repeat :tag "Faces"
+          (choice
+           (const ivy-minibuffer-match-face-1)
+           (const ivy-minibuffer-match-face-2)
+           (const ivy-minibuffer-match-face-3)
+           (const ivy-minibuffer-match-face-4)
+           (face :tag "Other face"))))
+
+(defvar ivy-flx-limit 200
+  "Used to conditionally turn off flx sorting.
+
+When the amount of matching candidates exceeds this limit, then
+no sorting is done.")
+
 (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))
+               (< (length cands) ivy-flx-limit))
           (let* ((flx-name (if (string-match "^\\^" name)
                                (substring name 1)
                              name))
@@ -1924,15 +2347,28 @@ Prefix matches to NAME are put ahead of the list."
                   (delq nil
                         (mapcar
                          (lambda (x)
-                           (let ((score (car (flx-score x flx-name 
ivy--flx-cache))))
+                           (let ((score (flx-score x flx-name ivy--flx-cache)))
                              (and score
                                   (cons score x))))
                          cands))))
             (if cands-with-score
-                (mapcar #'cdr
+                (mapcar (lambda (x)
+                          (let ((str (copy-sequence (cdr x)))
+                                (i 0)
+                                (last-j -2))
+                            (dolist (j (cdar x))
+                              (unless (eq j (1+ last-j))
+                                (cl-incf i))
+                              (setq last-j j)
+                              (ivy-add-face-text-property
+                               j (1+ j)
+                               (nth (1+ (mod (+ i 2) (1- (length 
ivy-minibuffer-faces))))
+                                    ivy-minibuffer-faces)
+                               str))
+                            str))
                         (sort cands-with-score
                               (lambda (x y)
-                                (> (car x) (car y)))))
+                                (> (caar x) (caar y)))))
               cands))
         cands)
     (error
@@ -1953,91 +2389,107 @@ This string is inserted into the minibuffer."
                                     (- (length str) 3))) "...")
     str))
 
-(defun ivy--format-function-generic (selected-fn other-fn cand-pairs separator)
+(defun ivy--format-function-generic (selected-fn other-fn strs separator)
   "Transform CAND-PAIRS into a string for minibuffer.
-SELECTED-FN and OTHER-FN each take two string arguments.
+SELECTED-FN and OTHER-FN each take one string argument.
 SEPARATOR is used to join the candidates."
   (let ((i -1))
     (mapconcat
-     (lambda (pair)
-       (let ((str (car pair))
-             (extra (cdr pair))
-             (curr (eq (cl-incf i) ivy--index)))
+     (lambda (str)
+       (let ((curr (eq (cl-incf i) ivy--index)))
          (if curr
-             (funcall selected-fn str extra)
-           (funcall other-fn str extra))))
-     cand-pairs
+             (funcall selected-fn str)
+           (funcall other-fn str))))
+     strs
      separator)))
 
-(defun ivy-format-function-default (cand-pairs)
+(defun ivy-format-function-default (cands)
   "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
+   (lambda (str)
+     (ivy--add-face str 'ivy-current-match))
+   #'identity
+   cands
    "\n"))
 
-(defun ivy-format-function-arrow (cand-pairs)
+(defun ivy-format-function-arrow (cands)
   "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
+   (lambda (str)
+     (concat "> " (ivy--add-face str 'ivy-current-match)))
+   (lambda (str)
+     (concat "  " str))
+   cands
    "\n"))
 
-(defun ivy-format-function-line (cand-pairs)
+(defun ivy-format-function-line (cands)
   "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
+   (lambda (str)
+     (ivy--add-face (concat str "\n") 'ivy-current-match))
+   (lambda (str)
+     (concat str "\n"))
+   cands
    ""))
 
-(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-add-face-text-property (start end face str)
+  (if (fboundp 'add-face-text-property)
+      (add-face-text-property
+       start end face nil str)
+    (font-lock-append-text-property
+     start end 'face face str)))
 
 (defun ivy--format-minibuffer-line (str)
-  (let ((start 0)
+  (let ((start
+         (if (and (memq (ivy-state-caller ivy-last)
+                        '(counsel-git-grep counsel-ag counsel-pt))
+                  (string-match "^[^:]+:[^:]+:" str))
+             (match-end 0)
+           0))
         (str (copy-sequence str)))
-    (when (eq ivy-display-style 'fancy)
-      (unless ivy--old-re
-        (setq ivy--old-re (funcall ivy--regex-function ivy-text)))
-      (while (and (string-match ivy--old-re str start)
-                  (> (- (match-end 0) (match-beginning 0)) 0))
-        (setq start (match-end 0))
-        (let ((i 0))
-          (while (<= i ivy--subexps)
-            (let ((face
-                   (cond ((zerop ivy--subexps)
-                          (cadr ivy-minibuffer-faces))
-                         ((zerop i)
-                          (car ivy-minibuffer-faces))
-                         (t
-                          (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)
-                   (match-end i)
-                   face
-                   nil
-                   str)
-                (font-lock-append-text-property
-                 (match-beginning i)
-                 (match-end i)
-                 'face
-                 face
-                 str)))
-            (cl-incf i)))))
+    (cond ((eq ivy--regex-function 'ivy--regex-ignore-order)
+           (when (consp ivy--old-re)
+             (let ((i 1))
+               (dolist (re ivy--old-re)
+                 (when (string-match (car re) str)
+                   (ivy-add-face-text-property
+                    (match-beginning 0) (match-end 0)
+                    (nth (1+ (mod (+ i 2) (1- (length ivy-minibuffer-faces))))
+                         ivy-minibuffer-faces)
+                    str))
+                 (cl-incf i)))))
+          ((and (eq ivy-display-style 'fancy)
+                (not (eq ivy--regex-function 'ivy--regex-fuzzy)))
+           (unless ivy--old-re
+             (setq ivy--old-re (funcall ivy--regex-function ivy-text)))
+           (ignore-errors
+             (while (and (string-match ivy--old-re str start)
+                         (> (- (match-end 0) (match-beginning 0)) 0))
+               (setq start (match-end 0))
+               (let ((i 0))
+                 (while (<= i ivy--subexps)
+                   (let ((face
+                          (cond ((zerop ivy--subexps)
+                                 (cadr ivy-minibuffer-faces))
+                                ((zerop i)
+                                 (car ivy-minibuffer-faces))
+                                (t
+                                 (nth (1+ (mod (+ i 2) (1- (length 
ivy-minibuffer-faces))))
+                                      ivy-minibuffer-faces)))))
+                     (ivy-add-face-text-property
+                      (match-beginning i) (match-end i)
+                      face str))
+                   (cl-incf i)))))))
+    str))
+
+(ivy-set-display-transformer
+ 'counsel-find-file 'ivy-read-file-transformer)
+(ivy-set-display-transformer
+ 'read-file-name-internal 'ivy-read-file-transformer)
+
+(defun ivy-read-file-transformer (str)
+  (if (string-match-p "/\\'" str)
+      (propertize str 'face 'ivy-subdir)
     str))
 
 (defun ivy--format (cands)
@@ -2053,28 +2505,17 @@ CANDS is a list of strings."
            (end (min (+ start (1- ivy-height)) ivy--length))
            (start (max 0 (min start (- end (1- ivy-height)))))
            (cands (cl-subseq cands start end))
-           (index (- ivy--index start)))
-      (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))))
+           (index (- ivy--index start))
+           transformer-fn)
       (setq ivy--current (copy-sequence (nth index cands)))
+      (when (setq transformer-fn (ivy-state-display-transformer-fn ivy-last))
+        (with-ivy-window
+          (setq cands (mapcar transformer-fn cands))))
       (let* ((ivy--index index)
-             (cand-pairs (mapcar
-                          (lambda (cand)
-                            (cons (ivy--format-minibuffer-line cand) nil)) 
cands))
-             (res (concat "\n" (funcall ivy-format-function cand-pairs))))
+             (cands (mapcar
+                     #'ivy--format-minibuffer-line
+                     cands))
+             (res (concat "\n" (funcall ivy-format-function cands))))
         (put-text-property 0 (length res) 'read-only nil res)
         res))))
 
@@ -2124,7 +2565,11 @@ CANDS is a list of strings."
       (setq ivy--virtual-buffers (nreverse virtual-buffers))
       (mapcar #'car ivy--virtual-buffers))))
 
-(defun ivy--buffer-list (str &optional virtual)
+(defcustom ivy-ignore-buffers '("\\` ")
+  "List of regexps or functions matching buffer names to ignore."
+  :type '(repeat (choice regexp function)))
+
+(defun ivy--buffer-list (str &optional virtual predicate)
   "Return the buffers that match STR.
 When VIRTUAL is non-nil, add virtual buffers."
   (delete-dups
@@ -2136,10 +2581,73 @@ When VIRTUAL is non-nil, add virtual buffers."
               (abbreviate-file-name default-directory)))
            (propertize x 'face 'ivy-remote)
          x))
-     (all-completions str 'internal-complete-buffer))
+     (all-completions str 'internal-complete-buffer predicate))
     (and virtual
          (ivy--virtual-buffers)))))
 
+(defvar ivy-views (and nil
+                       `(("ivy + *scratch* {}"
+                          (vert
+                           (file ,(expand-file-name "ivy.el"))
+                           (buffer "*scratch*")))
+                         ("swiper + *scratch* {}"
+                          (horz
+                           (file ,(expand-file-name "swiper.el"))
+                           (buffer "*scratch*")))))
+  "Store window configurations selectable by `ivy-switch-buffer'.
+
+The default value is given as an example.
+
+Each element is a list of (NAME TREE). NAME is a string, it's
+recommended to end it with a distinctive snippet e.g. \"{}\" so
+that it's easy to distinguish the window configurations.
+
+TREE is a nested list with the following valid cars:
+- vert: split the window vertically
+- horz: split the window horizontally
+- file: open the specified file
+- buffer: open the specified buffer
+
+TREE can be nested multiple times to have mulitple window splits.")
+
+(defun ivy-source-views ()
+  (mapcar #'car ivy-views))
+
+(ivy-set-sources
+ 'ivy-switch-buffer
+ '((original-source)
+   (ivy-source-views)))
+
+(defun ivy-set-view-recur (view)
+  (cond ((eq (car view) 'vert)
+         (let ((wnd1 (selected-window))
+               (wnd2 (split-window-vertically)))
+           (with-selected-window wnd1
+             (ivy-set-view-recur (nth 1 view)))
+           (with-selected-window wnd2
+             (ivy-set-view-recur (nth 2 view)))))
+        ((eq (car view) 'horz)
+         (let ((wnd1 (selected-window))
+               (wnd2 (split-window-horizontally)))
+           (with-selected-window wnd1
+             (ivy-set-view-recur (nth 1 view)))
+           (with-selected-window wnd2
+             (ivy-set-view-recur (nth 2 view)))))
+        ((eq (car view) 'file)
+         (let* ((name (cadr view))
+                (virtual (assoc name ivy--virtual-buffers))
+                buffer)
+           (cond ((setq buffer (get-buffer name))
+                  (switch-to-buffer buffer nil 'force-same-window))
+                 (virtual
+                  (find-file (cdr virtual)))
+                 ((file-exists-p name)
+                  (find-file name)))))
+        ((eq (car view) 'buffer)
+         (switch-to-buffer (cadr view)))
+        ((eq (car view) 'sexp)
+         (eval (cadr view)))))
+
 (defun ivy--switch-buffer-action (buffer)
   "Switch to BUFFER.
 BUFFER may be a string or nil."
@@ -2147,12 +2655,17 @@ BUFFER may be a string or nil."
     (if (zerop (length buffer))
         (switch-to-buffer
          ivy-text nil 'force-same-window)
-      (let ((virtual (assoc buffer ivy--virtual-buffers)))
-        (if (and virtual
-                 (not (get-buffer buffer)))
-            (find-file (cdr virtual))
-          (switch-to-buffer
-           buffer nil 'force-same-window))))))
+      (let ((virtual (assoc buffer ivy--virtual-buffers))
+            (view (assoc buffer ivy-views)))
+        (cond ((and virtual
+                    (not (get-buffer buffer)))
+               (find-file (cdr virtual)))
+              (view
+               (delete-other-windows)
+               (ivy-set-view-recur (cadr view)))
+              (t
+               (switch-to-buffer
+                buffer nil 'force-same-window)))))))
 
 (defun ivy--switch-buffer-other-window-action (buffer)
   "Switch to BUFFER in other window.
@@ -2187,17 +2700,66 @@ BUFFER may be a string or nil."
     ivy--rename-buffer-action
     "rename")))
 
+(defun ivy--switch-buffer-matcher (regexp candidates)
+  "Return REGEXP-matching CANDIDATES.
+Skip buffers that match `ivy-ignore-buffers'."
+  (let ((res (ivy--re-filter regexp candidates)))
+    (if (or (null ivy-use-ignore)
+            (null ivy-ignore-buffers))
+        res
+      (or (cl-remove-if
+           (lambda (buf)
+             (cl-find-if
+              (lambda (f-or-r)
+                (if (functionp f-or-r)
+                    (funcall f-or-r buf)
+                  (string-match-p f-or-r buf)))
+              ivy-ignore-buffers))
+           res)
+          (and (eq ivy-use-ignore t)
+               res)))))
+
+(ivy-set-display-transformer
+ 'ivy-switch-buffer 'ivy-switch-buffer-transformer)
+(ivy-set-display-transformer
+ 'internal-complete-buffer 'ivy-switch-buffer-transformer)
+
+(defun ivy-switch-buffer-transformer (str)
+  (let ((b (get-buffer str)))
+    (if (and b
+             (buffer-file-name b)
+             (buffer-modified-p b))
+        (propertize str 'face 'ivy-modified-buffer)
+      str)))
+
+(defun ivy-switch-buffer-occur ()
+  "Occur function for `ivy-switch-buffer' that uses `ibuffer'."
+  (let* ((cand-regexp
+          (concat "\\(" (mapconcat #'regexp-quote ivy--old-cands "\\|") "\\)"))
+         (new-qualifier `((name . ,cand-regexp))))
+    (ibuffer nil (buffer-name) new-qualifier)))
+
 ;;;###autoload
 (defun ivy-switch-buffer ()
   "Switch to another buffer."
   (interactive)
-  (if (not ivy-mode)
-      (call-interactively 'switch-to-buffer)
-    (let ((this-command 'ivy-switch-buffer))
-      (ivy-read "Switch to buffer: " 'internal-complete-buffer
-                :preselect (buffer-name (other-buffer (current-buffer)))
-                :action #'ivy--switch-buffer-action
-                :keymap ivy-switch-buffer-map))))
+  (let ((this-command 'ivy-switch-buffer))
+    (ivy-read "Switch to buffer: " 'internal-complete-buffer
+              :matcher #'ivy--switch-buffer-matcher
+              :preselect (buffer-name (other-buffer (current-buffer)))
+              :action #'ivy--switch-buffer-action
+              :keymap ivy-switch-buffer-map
+              :caller 'ivy-switch-buffer)))
+
+;;;###autoload
+(defun ivy-switch-buffer-other-window ()
+  "Switch to another buffer in another window."
+  (interactive)
+  (ivy-read "Switch to buffer in other window: " 'internal-complete-buffer
+            :preselect (buffer-name (other-buffer (current-buffer)))
+            :action #'ivy--switch-buffer-other-window-action
+            :keymap ivy-switch-buffer-map
+            :caller 'ivy-switch-buffer-other-window))
 
 ;;;###autoload
 (defun ivy-recentf ()
@@ -2207,7 +2769,8 @@ BUFFER may be a string or nil."
             :action
             (lambda (f)
               (with-ivy-window
-                (find-file f)))))
+                (find-file f)))
+            :caller 'ivy-recentf))
 
 (defun ivy-yank-word ()
   "Pull next word from buffer into search string."
@@ -2259,7 +2822,8 @@ The selected history element will be inserted into the 
minibuffer."
   (interactive)
   (let ((enable-recursive-minibuffers t)
         (history (symbol-value (ivy-state-history ivy-last)))
-        (old-last ivy-last))
+        (old-last ivy-last)
+        (ivy-recursive-restore nil))
     (ivy-read "Reverse-i-search: "
               history
               :action (lambda (x)
@@ -2286,17 +2850,45 @@ buffer would modify `ivy-last'.")
   (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 "j") 'ivy-occur-next-line)
+    (define-key map (kbd "k") 'ivy-occur-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 "f") 'ivy-occur-press)
+    (define-key map (kbd "g") 'ivy-occur-revert-buffer)
     (define-key map (kbd "a") 'ivy-occur-read-action)
     (define-key map (kbd "o") 'ivy-occur-dispatch)
+    (define-key map (kbd "c") 'ivy-occur-toggle-calling)
     (define-key map (kbd "q") 'quit-window)
     map)
   "Keymap for Ivy Occur mode.")
 
+(defun ivy-occur-toggle-calling ()
+  "Toggle `ivy-calling'."
+  (interactive)
+  (if (setq ivy-calling (not ivy-calling))
+      (progn
+        (setq mode-name "Ivy-Occur [calling]")
+        (ivy-occur-press))
+    (setq mode-name "Ivy-Occur"))
+  (force-mode-line-update))
+
+(defun ivy-occur-next-line (&optional arg)
+  "Move the cursor down ARG lines.
+When `ivy-calling' isn't nil, call `ivy-occur-press'."
+  (interactive "p")
+  (forward-line arg)
+  (when ivy-calling
+    (ivy-occur-press)))
+
+(defun ivy-occur-previous-line (&optional arg)
+  "Move the cursor up ARG lines.
+When `ivy-calling' isn't nil, call `ivy-occur-press'."
+  (interactive "p")
+  (forward-line (- arg))
+  (when ivy-calling
+    (ivy-occur-press)))
+
 (define-derived-mode ivy-occur-mode fundamental-mode "Ivy-Occur"
   "Major mode for output from \\[ivy-occur].
 
@@ -2313,7 +2905,26 @@ buffer would modify `ivy-last'.")
 
 \\{ivy-occur-grep-mode-map}")
 
-(defvar counsel-git-grep-cmd)
+(defvar ivy--occurs-list nil
+  "A list of custom occur generators per command.")
+
+(defun ivy-set-occur (cmd occur)
+  "Assign CMD a custom OCCUR function."
+  (setq ivy--occurs-list
+        (plist-put ivy--occurs-list cmd occur)))
+
+(ivy-set-occur 'ivy-switch-buffer 'ivy-switch-buffer-occur)
+(ivy-set-occur 'ivy-switch-buffer-other-window 'ivy-switch-buffer-occur)
+
+(defun ivy--occur-insert-lines (cands)
+  (dolist (str cands)
+    (add-text-properties
+     0 (length str)
+     `(mouse-face
+       highlight
+       help-echo "mouse-1: call ivy-action")
+     str)
+    (insert str "\n")))
 
 (defun ivy-occur ()
   "Stop completion and put the current matches into a new buffer.
@@ -2325,49 +2936,57 @@ 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)))))
+  (if (not (window-minibuffer-p))
+      (user-error "No completion session is active")
+    (let* ((caller (ivy-state-caller ivy-last))
+           (occur-fn (plist-get ivy--occurs-list caller))
+           (buffer
+            (generate-new-buffer
+             (format "*ivy-occur%s \"%s\"*"
+                     (if caller
+                         (concat " " (prin1-to-string caller))
+                       "")
+                     ivy-text))))
+      (with-current-buffer buffer
+        (let ((inhibit-read-only t))
+          (erase-buffer)
+          (if occur-fn
+              (funcall occur-fn)
+            (ivy-occur-mode)
+            (insert (format "%d candidates:\n" (length ivy--old-cands)))
+            (ivy--occur-insert-lines
+             (mapcar
+              (lambda (cand) (concat "    " cand))
+              ivy--old-cands))))
+        (setf (ivy-state-text ivy-last) ivy-text)
+        (setq ivy-occur-last ivy-last)
+        (setq-local ivy--directory ivy--directory))
+      (ivy-exit-with-action
+       `(lambda (_) (pop-to-buffer ,buffer))))))
+
+(defun ivy-occur-revert-buffer ()
+  "Refresh the buffer making it up-to date with the collection.
+
+Currently only works for `swiper'. In that specific case, the
+*ivy-occur* buffer becomes nearly useless as the orignal buffer
+is updated, since the line numbers no longer match.
+
+Calling this function is as if you called `ivy-occur' on the
+updated original buffer."
+  (interactive)
+  (let ((caller (ivy-state-caller ivy-occur-last))
+        (ivy-last ivy-occur-last))
+    (cond ((eq caller 'swiper)
+           (let ((buffer (ivy-state-buffer ivy-occur-last)))
+             (unless (buffer-live-p buffer)
+               (error "buffer was killed"))
+             (let ((inhibit-read-only t))
+               (erase-buffer)
+               (funcall (plist-get ivy--occurs-list caller) t))))
+          ((memq caller '(counsel-git-grep counsel-grep counsel-ag))
+           (let ((inhibit-read-only t))
+             (erase-buffer)
+             (funcall (plist-get ivy--occurs-list caller)))))))
 
 (declare-function wgrep-change-to-wgrep-mode "ext:wgrep")
 
@@ -2407,13 +3026,27 @@ EVENT gives the mouse position."
       (goto-char pos)
       (ivy-occur-press))))
 
+(declare-function swiper--cleanup "swiper")
+(declare-function swiper--add-overlays "swiper")
+(defvar ivy-occur-timer nil)
+(defvar counsel-grep-last-line)
+
 (defun ivy-occur-press ()
   "Execute action for the current candidate."
   (interactive)
-  (require 'pulse)
   (when (save-excursion
           (beginning-of-line)
           (looking-at "\\(?:./\\|    \\)\\(.*\\)$"))
+    (when (memq (ivy-state-caller ivy-occur-last)
+                '(swiper counsel-git-grep counsel-grep counsel-ag
+                  counsel-describe-function counsel-describe-variable))
+      (let ((window (ivy-state-window ivy-occur-last)))
+        (when (or (null (window-live-p window))
+                  (equal window (selected-window)))
+          (save-selected-window
+            (setf (ivy-state-window ivy-occur-last)
+                  (display-buffer (ivy-state-buffer ivy-occur-last)
+                                  'display-buffer-pop-up-window))))))
     (let* ((ivy-last ivy-occur-last)
            (ivy-text (ivy-state-text ivy-last))
            (str (buffer-substring
@@ -2423,13 +3056,14 @@ EVENT gives the mouse position."
            (action (ivy--get-action ivy-last))
            (ivy-exit 'done))
       (with-ivy-window
+        (setq counsel-grep-last-line nil)
         (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))
+                  '(swiper counsel-git-grep counsel-grep))
             (with-current-buffer (window-buffer (selected-window))
               (swiper--cleanup)
               (swiper--add-overlays
@@ -2437,8 +3071,37 @@ EVENT gives the mouse position."
                (line-beginning-position)
                (line-end-position)
                (selected-window))
-              (run-at-time 0.5 nil 'swiper--cleanup))
-          (pulse-momentary-highlight-one-line (point)))))))
+              (when (timerp ivy-occur-timer)
+                (cancel-timer ivy-occur-timer))
+              (setq ivy-occur-timer (run-at-time 1.0 nil 
'swiper--cleanup))))))))
+
+(defvar ivy-help-file (let ((default-directory
+                             (if load-file-name
+                                 (file-name-directory load-file-name)
+                               default-directory)))
+                        (if (file-exists-p "ivy-help.org")
+                            (expand-file-name "ivy-help.org")
+                          (if (file-exists-p "doc/ivy-help.org")
+                              (expand-file-name "doc/ivy-help.org"))))
+  "The file for `ivy-help'.")
+
+(defun ivy-help ()
+  "Help for `ivy'."
+  (interactive)
+  (let ((buf (get-buffer "*Ivy Help*")))
+    (unless buf
+      (setq buf (get-buffer-create "*Ivy Help*"))
+      (with-current-buffer buf
+        (insert-file-contents ivy-help-file)
+        (org-mode)
+        (view-mode)
+        (goto-char (point-min))))
+    (if (eq this-command 'ivy-help)
+        (switch-to-buffer buf)
+      (with-ivy-window
+        (pop-to-buffer buf)))
+    (view-mode)
+    (goto-char (point-min))))
 
 (provide 'ivy)
 
diff --git a/packages/swiper/swiper.el b/packages/ivy/swiper.el
similarity index 69%
rename from packages/swiper/swiper.el
rename to packages/ivy/swiper.el
index d9bf724..7c99a13 100644
--- a/packages/swiper/swiper.el
+++ b/packages/ivy/swiper.el
@@ -4,8 +4,8 @@
 
 ;; Author: Oleh Krehel <address@hidden>
 ;; URL: https://github.com/abo-abo/swiper
-;; Version: 0.7.0
-;; Package-Requires: ((emacs "24.1"))
+;; Version: 0.8.0
+;; Package-Requires: ((emacs "24.1") (ivy "0.8.0"))
 ;; Keywords: matching
 
 ;; This file is part of GNU Emacs.
@@ -61,18 +61,6 @@
   '((t (:inherit isearch-fail)))
   "Face for `swiper' 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)))
   "Face for current `swiper' line.")
@@ -81,7 +69,9 @@
                           swiper-match-face-2
                           swiper-match-face-3
                           swiper-match-face-4)
-  "List of `swiper' faces for group matches.")
+  "List of `swiper' faces for group matches."
+  :group 'ivy-faces
+  :type 'list)
 
 (defcustom swiper-min-highlight 2
   "Only highlight matches for regexps at least this long."
@@ -104,7 +94,13 @@
       (user-error "Should only be called in the minibuffer through 
`swiper-map'")
     (let* ((enable-recursive-minibuffers t)
            (from (ivy--regex ivy-text))
-           (to (query-replace-read-to from "Query replace" t)))
+           (to (minibuffer-with-setup-hook
+                   (lambda ()
+                     (setq minibuffer-default
+                           (if (string-match "\\`\\\\_<\\(.*\\)\\\\_>\\'" 
ivy-text)
+                               (match-string 1 ivy-text)
+                             ivy-text)))
+                 (read-from-minibuffer (format "Query replace %s with: " 
from)))))
       (swiper--cleanup)
       (ivy-exit-with-action
        (lambda (_)
@@ -153,17 +149,17 @@
                                 (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))
+                           (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
@@ -177,11 +173,13 @@
 (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 ()
+  "Create a fake cursor for each `swiper' candidate."
   (interactive)
   (unless (require 'multiple-cursors nil t)
     (error "multiple-cursors isn't installed"))
+  (unless (window-minibuffer-p)
+    (error "Call me only from `swiper'"))
   (let ((cands (nreverse ivy--old-cands)))
     (unless (string= ivy-text "")
       (ivy-exit-with-action
@@ -199,37 +197,49 @@
   (with-ivy-window
     (recenter-top-bottom arg)))
 
+(defvar swiper-font-lock-exclude
+  '(package-menu-mode
+    gnus-summary-mode
+    gnus-article-mode
+    gnus-group-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
+    help-mode
+    debbugs-gnu-mode
+    occur-mode
+    occur-edit-mode
+    bongo-mode
+    bongo-library-mode
+    bongo-playlist-mode
+    eww-mode
+    twittering-mode
+    vc-dir-mode
+    rcirc-mode
+    sauron-mode
+    w3m-mode)
+  "List of major-modes that are incompatible with font-lock-ensure.")
+
+(defun swiper-font-lock-ensure-p ()
+  "Return non-nil if we should font-lock-ensure."
+  (or (derived-mode-p 'magit-mode)
+              (bound-and-true-p magit-blame-mode)
+              (memq major-mode swiper-font-lock-exclude)))
+
 (defun swiper-font-lock-ensure ()
   "Ensure the entired buffer is highlighted."
-  (unless (or (derived-mode-p 'magit-mode)
-              (bound-and-true-p magit-blame-mode)
-              (memq major-mode '(package-menu-mode
-                                 gnus-summary-mode
-                                 gnus-article-mode
-                                 gnus-group-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
-                                 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)
+  (unless (swiper-font-lock-ensure-p)
+    (unless (or (> (buffer-size) 100000) (null font-lock-mode))
       (if (fboundp 'font-lock-ensure)
           (font-lock-ensure)
         (with-no-warnings (font-lock-fontify-buffer))))))
@@ -238,7 +248,7 @@
   "Store the current candidates format spec.")
 
 (defvar swiper--width nil
-  "Store the amount of digits needed for the longest line nubmer.")
+  "Store the number of digits needed for the longest line nubmer.")
 
 (defvar swiper-use-visual-line nil
   "When non-nil, use `line-move' instead of `forward-line'.")
@@ -248,9 +258,8 @@
 (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."
+NUMBERS-WIDTH, when specified, is used for width spec of line
+numbers; replaces calculating the width from buffer line count."
   (if (and visual-line-mode
            ;; super-slow otherwise
            (< (buffer-size) 20000))
@@ -293,8 +302,7 @@ count."
                            (buffer-substring
                             (point)
                             (line-end-position)))))))
-              (when (eq major-mode 'twittering-mode)
-                (remove-text-properties 0 (length str) '(field) str))
+              (remove-text-properties 0 (length str) '(field) str)
               (put-text-property 0 1 'display
                                  (format swiper--format-spec
                                          (cl-incf line-number))
@@ -311,35 +319,89 @@ count."
   "`isearch' with an overview.
 When non-nil, INITIAL-INPUT is the initial search pattern."
   (interactive)
-  (swiper--ivy initial-input))
+  (swiper--ivy (swiper--candidates) initial-input))
+
+(declare-function string-trim-right "subr-x")
+
+(defun swiper-occur (&optional revert)
+  "Generate a custom occur buffer for `swiper'.
+When REVERT is non-nil, regenerate the current *ivy-occur* buffer."
+  (let* ((buffer (ivy-state-buffer ivy-last))
+         (fname (propertize
+                 (with-ivy-window
+                   (if (buffer-file-name buffer)
+                       (file-name-nondirectory
+                        (buffer-file-name buffer))
+                     (buffer-name buffer)))
+                 'face
+                 'compilation-info))
+         (cands (mapcar
+                 (lambda (s)
+                   (format "%s:%s:%s"
+                           fname
+                           (propertize
+                            (string-trim-right
+                             (get-text-property 0 'display s))
+                            'face 'compilation-line-number)
+                           (substring s 1)))
+                 (if (null revert)
+                     ivy--old-cands
+                   (setq ivy--old-re nil)
+                   (let ((ivy--regex-function 'swiper--re-builder))
+                     (ivy--filter
+                      (progn (string-match "\"\\(.*\\)\"" (buffer-name))
+                             (match-string 1 (buffer-name)))
+                      (with-current-buffer buffer
+                        (swiper--candidates))))))))
+    (unless (eq major-mode 'ivy-occur-grep-mode)
+      (ivy-occur-grep-mode)
+      (font-lock-mode -1))
+    (insert (format "-*- mode:grep; default-directory: %S -*-\n\n\n"
+                    default-directory))
+    (insert (format "%d candidates:\n" (length cands)))
+    (ivy--occur-insert-lines
+     (mapcar
+      (lambda (cand) (concat "./" cand))
+      cands))
+    (goto-char (point-min))
+    (forward-line 4)))
+
+(ivy-set-occur 'swiper 'swiper-occur)
 
 (declare-function evil-jumper--set-jump "ext:evil-jumper")
 
+(defvar swiper--current-line nil)
+(defvar swiper--current-match-start nil)
+
 (defun swiper--init ()
   "Perform initialization common to both completion methods."
+  (setq swiper--current-line nil)
+  (setq swiper--current-match-start nil)
   (setq swiper--opoint (point))
   (when (bound-and-true-p evil-jumper-mode)
     (evil-jumper--set-jump)))
 
 (defun swiper--re-builder (str)
   "Transform STR into a swiper regex.
-This is the regex used in the minibuffer, since the candidates
-there have line numbers. In the buffer, `ivy--regex' should be used."
-  (cond
-    ((equal str "")
-     "")
-    ((equal str "^")
-     (setq ivy--subexps 0)
-     ".")
-    ((string-match "^\\^" str)
-     (setq ivy--old-re "")
-     (let ((re (ivy--regex-plus (substring str 1))))
-       (if (zerop ivy--subexps)
-           (prog1 (format "^ ?\\(%s\\)" re)
-             (setq ivy--subexps 1))
-         (format "^ %s" re))))
-    (t
-     (ivy--regex-plus str))))
+This is the regex used in the minibuffer where candidates have
+line numbers. For the buffer, use `ivy--regex' instead."
+  (replace-regexp-in-string
+   "\t" "    "
+   (cond
+     ((equal str "")
+      "")
+     ((equal str "^")
+      (setq ivy--subexps 0)
+      ".")
+     ((string-match "^\\^" str)
+      (setq ivy--old-re "")
+      (let ((re (ivy--regex-plus (substring str 1))))
+        (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'.")
@@ -347,15 +409,14 @@ there have line numbers. In the buffer, `ivy--regex' 
should be used."
 (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'.
+(defun swiper--ivy (candidates &optional initial-input)
+  "Select one of CANDIDATES and move there.
 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
+  (let ((preselect
          (if swiper-use-visual-line
              (count-screen-lines
               (point-min)
@@ -364,20 +425,22 @@ When non-nil, INITIAL-INPUT is the initial search 
pattern."
         (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
-                :action #'swiper--action
-                :re-builder #'swiper--re-builder
-                :history 'swiper-history
-                :caller 'swiper))
+         (and
+          (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))
+          (point))
       (unless res
         (goto-char swiper--opoint)))))
 
@@ -410,7 +473,7 @@ Matched candidates should have `swiper-invocation-face'."
 
 (defun swiper--ensure-visible ()
   "Remove overlays hiding point."
-  (let ((overlays (overlays-at (point)))
+  (let ((overlays (overlays-at (1- (point))))
         ov expose)
     (while (setq ov (pop overlays))
       (if (and (invisible-p (overlay-get ov 'invisible))
@@ -433,24 +496,33 @@ Matched candidates should have `swiper-invocation-face'."
   (with-ivy-window
     (swiper--cleanup)
     (when (> (length ivy--current) 0)
-      (let* ((re (funcall ivy--regex-function ivy-text))
+      (let* ((re (replace-regexp-in-string
+                  "    " "\t"
+                  (funcall ivy--regex-function ivy-text)))
              (re (if (stringp re) re (caar re)))
              (str (get-text-property 0 'display ivy--current))
              (num (if (string-match "^[0-9]+" str)
                       (string-to-number (match-string 0 str))
                     0)))
         (unless (eq this-command 'ivy-yank-word)
-          (goto-char (point-min))
           (when (cl-plusp num)
-            (goto-char (point-min))
-            (if swiper-use-visual-line
-                (line-move (1- num))
-              (forward-line (1- num)))
+            (unless (if swiper--current-line
+                        (eq swiper--current-line num)
+                      (eq (line-number-at-pos) 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))
+              (if (eq swiper--current-line num)
+                  (when swiper--current-match-start
+                    (goto-char swiper--current-match-start))
+                (setq swiper--current-line num))
+              (when (re-search-forward re (line-end-position) t)
+                (setq swiper--current-match-start (match-beginning 0))))
             (isearch-range-invisible (line-beginning-position)
                                      (line-end-position))
             (unless (and (>= (point) (window-start))
@@ -511,25 +583,32 @@ WND, when specified is the window."
 
 (defun swiper--action (x)
   "Goto line X."
-  (if (null x)
-      (user-error "No candidates")
-    (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")))))))
+  (let ((ln (1- (read (or (get-text-property 0 'display x)
+                          (and (string-match ":\\([0-9]+\\):.*\\'" x)
+                               (match-string-no-properties 1 x))))))
+        (re (ivy--regex ivy-text)))
+    (if (null x)
+        (user-error "No candidates")
+      (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)
+                 ln)
+        (re-search-forward re (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"))))
+        (add-to-history
+         'regexp-search-ring
+         re
+         regexp-search-ring-max)))))
 
 ;; (define-key isearch-mode-map (kbd "C-o") 'swiper-from-isearch)
 (defun swiper-from-isearch ()
@@ -573,6 +652,8 @@ Run `swiper' for those buffers."
                          (buffer-list)))
             :action 'swiper-multi-action-2
             :unwind #'swiper--cleanup
+            :update-fn (lambda ()
+                         (swiper-multi-action-2 ivy--current))
             :caller 'swiper-multi))
 
 (defun swiper--multi-candidates (buffers)
@@ -596,7 +677,8 @@ Run `swiper' for those buffers."
                      (1- len) len 'display
                      (concat
                       (make-string
-                       (- ww (string-width s) (length (buffer-name)) 3)
+                       (max 0
+                            (- ww (string-width s) (length (buffer-name)) 3))
                        ?\ )
                       (buffer-name))
                      s)
diff --git a/packages/javaimp/javaimp-tests.el 
b/packages/javaimp/javaimp-tests.el
new file mode 100644
index 0000000..cd8acb2
--- /dev/null
+++ b/packages/javaimp/javaimp-tests.el
@@ -0,0 +1,23 @@
+;;; javaimp-tests.el --- javaimp module tests  -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2016  Free Software Foundation, Inc.
+
+;; Author: Filipp Gunbin <address@hidden>
+;; Maintainer: Filipp Gunbin <address@hidden>
+
+(require 'ert)
+(require 'javaimp)
+
+(ert-deftest javaimp-test--maven-xml-extract-projects--project ()
+  (with-temp-buffer
+    (insert "<project/>")
+    (let ((projects (javaimp--maven-xml-extract-projects
+                    (xml-parse-region (point-min) (point-max)))))
+      (should (eql (length projects) 1)))))
+
+(ert-deftest javaimp-test--maven-xml-extract-projects--projects ()
+  (with-temp-buffer
+    (insert "<projects><project/><project/></projects>")
+    (let ((projects (javaimp--maven-xml-extract-projects
+                    (xml-parse-region (point-min) (point-max)))))
+      (should (eql (length projects) 2)))))
diff --git a/packages/javaimp/javaimp.el b/packages/javaimp/javaimp.el
index df402ce..d1c6865 100644
--- a/packages/javaimp/javaimp.el
+++ b/packages/javaimp/javaimp.el
@@ -1,6 +1,6 @@
 ;;; javaimp.el --- Add and reorder Java import statements in Maven projects  
-*- lexical-binding: t; -*-
 
-;; Copyright (C) 2014, 2015  Free Software Foundation, Inc.
+;; Copyright (C) 2014, 2015, 2016  Free Software Foundation, Inc.
 
 ;; Author: Filipp Gunbin <address@hidden>
 ;; Maintainer: Filipp Gunbin <address@hidden>
@@ -11,103 +11,83 @@
 
 ;; Allows to manage Java import statements in Maven projects.
 ;;
-;;   Quick start: customize `javaimp-import-group-alist', `javaimp-jdk-home'
-;; and call `javaimp-maven-visit-root', then in a Java buffer visiting a
-;; file under that module or one of its submodules call
-;; `javaimp-organize-imports' or `javaimp-add-import'.  `javaimp-add-import'
-;; will provide you a helpful completion, and the default value (the one
-;; you'll get if you hit `M-n' in the minibuffer) is the symbol under point,
-;; so usually it's enough to hit `M-n', then add some starting letters of a
-;; package and hit `TAB'.  The module does not add all needed imports
-;; automatically!  It only helps you to quickly add imports when stepping
-;; through compilation errors.
+;;   Quick start:
+;;
+;; - customize `javaimp-import-group-alist'
+;; - call `javaimp-maven-visit-project', giving it the top-level project
+;; directory where pom.xml resides
+;;
+;; Then in a Java buffer visiting a file under that project or one of its
+;; submodules call `javaimp-organize-imports' or `javaimp-add-import'.
+;;
+;; This module does not add all needed imports automatically!  It only helps
+;; you to quickly add imports when stepping through compilation errors.
+;;
+;;   Some details:
 ;;
 ;; If Maven failed, you can see its output in the buffer named by
 ;; `javaimp-debug-buf-name' (default is "*javaimp-debug*").
 ;;
 ;; Contents of jar files and Maven project structures (pom.xml) are cached,
-;; so usually only first command should take a considerable amount of time
-;; to complete.  When it is detected that a particular jar or pom.xml file's
-;; timestamp changed, it is re-read and cache is updated.
-;;
-;; Details on variables.
-;; 
-;;   `javaimp-import-group-alist' defines the order of import statement
-;; groups.  By default java.* and javax.* imports are assigned an order of
-;; 10, which is low, so it puts those imports at the beginning.  Your
-;; project's imports typically should come after, so the sample config below
-;; sets 80 for them.
-;; 
-;;  `javaimp-jdk-home' is a path for JDK.  It is used to scan JDK jars.
-;; Usually you will need to set this.
+;; so usually only the first command should take a considerable amount of
+;; time to complete.  If a module's pom.xml or any of its parents' pom.xml
+;; (within visited tree) was modified after information was loaded, `mvn
+;; dependency:build-classpath' is re-run on the current module.  If a jar
+;; file was changed, its contents are re-read.
 ;;
-;;  `javaimp-additional-source-dirs' is a list specifying directories where
-;; additional (e.g. generated) source files reside.  Each directory is a
-;; relative path from ${project.build.directory} project property value.
-;; 
-;;  `javaimp-mvn-program' defines path of the `mvn' program.  Use if it's
-;; not on `exec-path'.
+;; Currently inner classes are filtered out from completion alternatives.
+;; You can always import top-level class and use qualified name.
 ;;
-;;  `javaimp-cygpath-program' defines path of the `cygpath' program (applies
-;; to Cygwin only, of course).  Use if it's not on `exec-path'.
 ;;
-;;  `javaimp-jar-program' defines path of the `jar' program.  Use if it's
-;; not on `exec-path'.
-;;  
-;; Details on commands.
+;;   Example of initialization:
 ;;
-;;   `javaimp-maven-visit-root' is the first command you should issue to
-;; use this module.  It reads the pom structure recursively and records
-;; which files belong to which module.  Maven help:effective-pom command is
-;; used to do that.
+;; (require 'javaimp)
 ;;
-;;   `javaimp-organize-imports' groups import statement and writes those
-;; group according to the value of `javaimp-import-group-alist'.  Imports
-;; which are not matched by any regexp in that variable are assigned a
-;; default order defined by `javaimp-import-default-order' (50 by default).
+;; (add-to-list 'javaimp-import-group-alist
+;;   '("\\`\\(my\\.company\\.\\|my\\.company2\\.\\)" . 80))
 ;;
-;; Sample setup (put this into your .emacs):
-;; 
-;; (require 'javaimp)
-;; 
-;; (add-to-list 'javaimp-import-group-alist 
'("\\`\\(ru\\.yota\\.\\|tv\\.okko\\.\\)" . 80))
-;; 
-;; (setq javaimp-jdk-home (getenv "JAVA_HOME"))
-;; (setq javaimp-include-current-project-classes t)
 ;; (setq javaimp-additional-source-dirs '("generated-sources/thrift"))
-;; 
+;;
 ;; (add-hook 'java-mode-hook
 ;;       (lambda ()
 ;;         (local-set-key "\C-ci" 'javaimp-add-import)
 ;;         (local-set-key "\C-co" 'javaimp-organize-imports)))
-;; 
-;; 
+;;
+;;
 ;; TODO:
-;; 
-;; Support adding static imports by giving a prefix argument to
-;; `javaimp-add-import'.
-;;  
-;; Use functions `cygwin-convert-file-name-from-windows' and
+;;
+;; - use functions `cygwin-convert-file-name-from-windows' and
 ;; `cygwin-convert-file-name-to-windows' when they are available instead of
-;; calling `cygpath'.  See
-;; https://cygwin.com/ml/cygwin/2013-03/msg00228.html.
-
+;; calling `cygpath'.  See https://cygwin.com/ml/cygwin/2013-03/msg00228.html
+;;
+;; - save/restore state, on restore check if a root exists and delete it if
+;; not
+;;
+;; - `javaimp-add-import': without prefix arg narrow alternatives by local 
name;
+;; with prefix arg include all classes in alternatives
+;;
+;; - :type for defcustom
 
 ;;; Code:
 
+(require 'cl-lib)
+(require 'seq)
+(require 'xml)
+
 
-;;; User options
+;; User options
 
 (defgroup javaimp ()
-  "Add and reorder Java import statements in Maven projects.")
+  "Add and reorder Java import statements in Maven projects"
+  :group 'c)
 
 (defcustom javaimp-import-group-alist '(("\\`javax?\\." . 10))
   "Specifies how to group classes and how to order resulting
 groups in the imports list.
 
-Each element should be of the form `(CLASSNAME-REGEXP . ORDER)'
-where `CLASSNAME-REGEXP' is a regexp matching the fully qualified
-class name.
+Each element should be of the form (CLASSNAME-REGEXP . ORDER)
+where CLASSNAME-REGEXP is a regexp matching the fully qualified
+class name.  Lowest-order groups are placed earlier.
 
 The order of classes which were not matched is defined by
 `javaimp-import-default-order'.")
@@ -116,8 +96,10 @@ The order of classes which were not matched is defined by
   "Defines the order of classes which were not matched by
 `javaimp-import-group-alist'")
 
-(defcustom javaimp-jdk-home nil
-  "Path to the JDK")
+(defcustom javaimp-java-home (getenv "JAVA_HOME")
+  "Path to the JDK.  Directory jre/lib underneath this path is
+searched for JDK libraries.  By default, it is initialized from
+the JAVA_HOME environment variable.")
 
 (defcustom javaimp-additional-source-dirs nil
   "List of directories where additional (e.g. generated)
@@ -137,607 +119,623 @@ Custom values set in plugin configuration in pom.xml 
are not
 supported yet.")
 
 (defcustom javaimp-mvn-program "mvn"
-  "Path to the `mvn' program")
+  "Path to the `mvn' program.  Customize it if the program is not
+on `exec-path'.")
 
-(defcustom javaimp-cygpath-program "cygpath"
-  "Path to the `cygpath' program")
+(defcustom javaimp-cygpath-program
+  (if (eq system-type 'cygwin) "cygpath")
+  "Path to the `cygpath' program (Cygwin only).  Customize it if
+the program is not on `exec-path'.")
 
 (defcustom javaimp-jar-program "jar"
-  "Path to the `jar' program")
-
-(defcustom javaimp-include-current-project-classes t
-  "If non-nil, current project's classes are included into completion
-alternatives.
+  "Path to the `jar' program used to read contents of jar files.
+Customize it if the program is not on `exec-path'.")
 
-Only top-level classes are included.")
+(defcustom javaimp-include-current-module-classes t
+  "If non-nil, current module's classes are included into
+completion alternatives.  `javaimp-add-import' will find all java
+files in the current project and add their fully-qualified names
+to the completion alternatives list.")
 
 
-;;; Variables and constants
+;; Variables and constants
 
-(defvar javaimp-maven-root-modules nil
-  "Loaded root Maven modules")
+(defvar javaimp-project-forest nil
+  "Visited projects")
 
-(defvar javaimp-jar-classes-cache nil
-  "Jar classes cache")
+(defvar javaimp-cached-jars nil
+  "Alist of cached jars.  Each element is of the form (FILE
+  . CACHED-JAR).")
 
 (defconst javaimp-debug-buf-name "*javaimp-debug*")
 
+;; Structs
+
+(cl-defstruct javaimp-node
+  parent children contents)
+
+(cl-defstruct javaimp-module
+  id parent-id
+  file
+  final-name
+  packaging
+  source-dir test-source-dir build-dir
+  modules
+  dep-jars
+  load-ts)
+
+(cl-defstruct javaimp-id
+  group artifact version)
+
+(cl-defstruct javaimp-cached-jar
+  file read-ts classes)
+
 
-;;; Dealing with XML
+;; Utilities
 
-(defun javaimp-xml-child-list (xml-tree child-name)
+(defun javaimp--xml-children (xml-tree child-name)
   "Returns list of children of XML-TREE filtered by CHILD-NAME"
-  (let (result)
-    (dolist (child (cddr xml-tree) result)
-      (when (and (listp child)
-                (eq (car child) child-name))
-       (push child result)))))
+  (seq-filter (lambda (child)
+               (and (consp child)
+                    (eq (car child) child-name)))
+             (cddr xml-tree)))
 
-(defun javaimp-xml-child (name el)
+(defun javaimp--xml-child (name el)
   "Returns a child of EL named by symbol NAME"
   (assq name (cddr el)))
 
-(defun javaimp-xml-first-child (el)
+(defun javaimp--xml-first-child (el)
   "Returns a first child of EL"
   (car (cddr el)))
 
-
-;; A module is represented as a list of the form `(ARTIFACT POM-FILE
-;; SOURCE-DIR TEST-SOURCE-DIR BUILD-DIR POM-FILE-MOD-TS PARENT PARENT-TS)'.
-
-(defsubst javaimp-make-mod (artifact pom-file source-dir
-                                    test-source-dir build-dir
-                                    pom-file-mod-ts jars-list
-                                    parent parent-ts)
-  (list artifact pom-file source-dir test-source-dir build-dir
-       pom-file-mod-ts jars-list parent parent-ts))
-
-(defsubst javaimp-get-mod-artifact (module)
-  (nth 0 module))
-
-(defsubst javaimp-get-mod-pom-file (module)
-  (nth 1 module))
-
-(defsubst javaimp-get-mod-source-dir (module)
-  (nth 2 module))
-
-(defsubst javaimp-get-mod-test-source-dir (module)
-  (nth 3 module))
-
-(defsubst javaimp-get-mod-build-dir (module)
-  (nth 4 module))
-
-(defsubst javaimp-get-mod-pom-mod-ts (module)
-  (nth 5 module))
-(defsubst javaimp-set-mod-pom-mod-ts (module value)
-  (setcar (nthcdr 5 module) value))
-
-(defsubst javaimp-get-mod-pom-deps (module)
-  (nth 6 module))
-(defsubst javaimp-set-mod-pom-deps (module value)
-  (setcar (nthcdr 6 module) value))
-
-(defsubst javaimp-get-mod-parent (module)
-  (nth 7 module))
-(defsubst javaimp-set-mod-parent (module value)
-  (setcar (nthcdr 7 module) value))
+(defun javaimp--get-file-ts (file)
+  (nth 5 (file-attributes file)))
 
-(defsubst javaimp-get-mod-parent-ts (module)
-  (nth 8 module))
-(defsubst javaimp-set-mod-parent-ts (module value)
-  (setcar (nthcdr 8 module) value))
+(defun javaimp--get-jdk-jars ()
+  (and javaimp-java-home
+       (file-accessible-directory-p javaimp-java-home)
+       (let ((lib-dir
+             (concat (file-name-as-directory javaimp-java-home)
+                     (file-name-as-directory "jre")
+                     (file-name-as-directory "lib"))))
+        (directory-files lib-dir t "\\.jar\\'"))))
+
+(defun javaimp-cygpath-convert-maybe (path &optional mode is-really-path)
+  "On Cygwin, converts PATH using cygpath according to MODE and
+IS-REALLY-PATH.  If MODE is `unix' (the default), adds -u switch.
+If MODE is `windows', adds -m switch.  If `is-really-path' is
+non-nil, adds `-p' switch.  On other systems, PATH is returned
+unchanged."
+  (if (eq system-type 'cygwin)
+      (progn
+       (unless mode (setq mode 'unix))
+       (let (args)
+         (push (cond ((eq mode 'unix) "-u")
+                     ((eq mode 'windows) "-m")
+                     (t (error "Invalid mode: %s" mode)))
+               args)
+         (and is-really-path (push "-p" args))
+         (push path args)
+         (car (apply #'process-lines javaimp-cygpath-program args))))
+    path))
 
 
-;; An artifact is represented as a list: (GROUP-ID ARTIFACT-ID VERSION).
-
-;; FIXME: use cl-defstruct!
-
-(defun javaimp-make-artifact (group-id artifact-id version)
-  (list group-id artifact-id version))
-
-(defun javaimp-artifact-group-id (artifact)
-  (car artifact))
-
-(defun javaimp-artifact-artifact-id (artifact)
-  (cadr artifact))
-
-(defun javaimp-artifact-version (artifact)
-  (nth 2 artifact))
-
-(defun javaimp-artifact-to-string (artifact)
-  (format "%s:%s:%s"
-         (javaimp-artifact-artifact-id artifact)
-         (javaimp-artifact-group-id artifact)
-         (javaimp-artifact-version artifact))) ;FIXME: `artifact' is not a 
function!
-
-(defun javaimp-parse-artifact (artifact)
-  (apply #'javaimp-make-artifact (split-string artifact ":")))
+;; Project loading
 
+;;;###autoload
+(defun javaimp-maven-visit-project (path)
+  "Loads a project and its submodules.  PATH should point to a
+directory containing pom.xml.
+
+Calls `mvn help:effective-pom' on the pom.xml in the PATH, reads
+project structure from the output and records which files belong
+to which modules and other module information.
+
+After being processed by this command, the module tree becomes
+known to javaimp and `javaimp-add-import' maybe called inside any
+module file."
+  (interactive "DVisit maven project in directory: ")
+  (let ((file (expand-file-name
+              (concat (file-name-as-directory path) "pom.xml"))))
+    (unless (file-readable-p file)
+      (error "Cannot read file: %s" file))
+    ;; delete previous loaded tree, if any
+    (setq javaimp-project-forest
+         (seq-remove (lambda (tree)
+                       (equal (javaimp-module-file (javaimp-node-contents 
tree))
+                              file))
+                     javaimp-project-forest))
+    (message "Loading file %s..." file)
+    (let* ((xml-tree
+           (javaimp--maven-call file "help:effective-pom"
+                                #'javaimp--maven-xml-effective-pom-handler))
+          (projects (javaimp--maven-xml-extract-projects xml-tree))
+          (modules (mapcar #'javaimp--maven-xml-parse-project projects))
+          ;; first module is always root
+          (tree (javaimp--maven-build-tree (car modules) nil modules file)))
+      (if tree
+         (push tree javaimp-project-forest)))
+    (message "Loaded tree for %s" file)))
 
 
-;; A jar is represented as follows: `(JAR-PATH JAR-MOD-TS . CLASSES-LIST).
-
-(defsubst javaimp-make-jar (jar-path jar-mod-ts classes-list)
-  (cons jar-path (cons jar-mod-ts classes-list)))
-
-(defsubst javaimp-get-jar-path (jar)
-  (car jar))
-
-(defsubst javaimp-get-jar-mod-ts (jar)
-  (cadr jar))
-
-(defsubst javaimp-set-jar-mod-ts (jar value)
-  (setcar (cdr jar) value))
-
-(defsubst javaimp-get-jar-classes-list (jar)
-  (cddr jar))
-
-(defsubst javaimp-set-jar-classes-list (jar value)
-  (setcdr (cdr jar) value))
+;; Maven XML routines
+
+(defun javaimp--maven-xml-effective-pom-handler ()
+  (let ((start
+        (save-excursion
+          (progn
+            (goto-char (point-min))
+            (re-search-forward "<\\?xml\\|<projects?")
+            (match-beginning 0))))
+       (end
+        (save-excursion
+          (progn
+            (goto-char (point-min))
+            (re-search-forward "<\\(projects?\\)")
+            ;; corresponding close tag is the end of parse region
+            (search-forward (concat "</" (match-string 1) ">"))
+            (match-end 0)))))
+    (xml-parse-region start end)))
+
+(defun javaimp--maven-xml-extract-projects (xml-tree)
+  "Analyzes result of `mvn help:effective-pom' and returns list
+of <project> elements"
+  (let ((project (assq 'project xml-tree))
+       (projects (assq 'projects xml-tree)))
+    (cond (project
+          (list project))
+         (projects
+          (javaimp--xml-children projects 'project))
+         (t
+          (error "Neither <project> nor <projects> was found in pom")))))
+
+(defun javaimp--maven-xml-parse-project (project)
+  (let ((build-elt (javaimp--xml-child 'build project)))
+    (make-javaimp-module
+     :id (javaimp--maven-xml-extract-id project)
+     :parent-id (javaimp--maven-xml-extract-id (javaimp--xml-child 'parent 
project))
+     ;; <project> element does not contain pom file path (we set :file slot 
later)
+     :file nil
+     :final-name (javaimp--xml-first-child
+                 (javaimp--xml-child 'finalName build-elt))
+     :packaging (javaimp--xml-first-child
+                (javaimp--xml-child 'packaging project))
+     :source-dir (file-name-as-directory
+                 (javaimp-cygpath-convert-maybe
+                  (javaimp--xml-first-child
+                   (javaimp--xml-child 'sourceDirectory build-elt))))
+     :test-source-dir (file-name-as-directory
+                      (javaimp-cygpath-convert-maybe
+                       (javaimp--xml-first-child
+                        (javaimp--xml-child 'testSourceDirectory build-elt))))
+     :build-dir (file-name-as-directory
+                (javaimp-cygpath-convert-maybe
+                 (javaimp--xml-first-child (javaimp--xml-child 'directory 
build-elt))))
+     :modules (mapcar (lambda (module-elt)
+                       (javaimp--xml-first-child module-elt))
+                     (javaimp--xml-children (javaimp--xml-child 'modules 
project) 'module))
+     :dep-jars nil                   ; dep-jars is initialized lazily on demand
+     :load-ts (current-time))))
+
+(defun javaimp--maven-xml-extract-id (elt)
+  (make-javaimp-id
+   :group (javaimp--xml-first-child (javaimp--xml-child 'groupId elt))
+   :artifact (javaimp--xml-first-child (javaimp--xml-child 'artifactId elt))
+   :version (javaimp--xml-first-child (javaimp--xml-child 'version elt))))
+
+(defun javaimp--maven-xml-file-matches (file id parent-id)
+  (let* ((xml-tree (with-temp-buffer
+                    (insert-file-contents file)
+                    (xml-parse-region (point-min) (point-max))))
+        (project-elt (assq 'project xml-tree))
+        (tested-id (javaimp--maven-xml-extract-id project-elt))
+        (tested-parent-id (javaimp--maven-xml-extract-id (assq 'parent 
project-elt))))
+    ;; seems that the only mandatory component in tested ids is artifact, while
+    ;; group and version may be inherited and thus not presented in pom.xml
+    (let ((test (if (or (null (javaimp-id-group tested-id))
+                       (null (javaimp-id-version tested-id))
+                       (null (javaimp-id-group tested-parent-id))
+                       (null (javaimp-id-version tested-parent-id)))
+                   (progn
+                     (message "File %s contains incomplete id, using lax 
match" file)
+                     (lambda (first second)
+                       (equal (javaimp-id-artifact first) (javaimp-id-artifact 
second))))
+                 #'equal)))
+      (and (funcall test tested-id id)
+          (funcall test tested-parent-id parent-id)))))
 
 
-;;; Loading maven projects tree
+;; Maven routines
 
-;;;###autoload
-(defun javaimp-maven-visit-root (path)
-  "Loads all modules starting from root module identified by
-PATH.  PATH should point to a directory."
-  (interactive "DVisit maven root project: ")
-  (let ((root-pom (expand-file-name
-                  (concat (file-name-as-directory path) "pom.xml")))
-       modules existing-module)
-    (unless (file-readable-p root-pom)
-      (error "Cannot read root pom: %s" root-pom))
-    (setq modules (javaimp-maven-load-module-tree root-pom))
-    ;; if a root module with such path is already loaded, replace its
-    ;; modules
-    (setq existing-module (assoc root-pom javaimp-maven-root-modules))
-    (if existing-module
-       (setcdr existing-module modules)
-      (push (cons root-pom modules) javaimp-maven-root-modules))
-    (message "Loaded modules for %s" path)))
-
-(defun javaimp-get-projects (xml-tree)
-  (cond ((assq 'projects xml-tree)
-        (javaimp-xml-child-list (assq 'projects xml-tree) 'project))
-       ((assq 'project xml-tree)
-        (list (assq 'project xml-tree)))
-       (t
-        (error "Cannot find projects in mvn output"))))
-
-(defun javaimp-maven-load-module-tree (pom)
-  "Returns an alist of all Maven modules in a hierarchy starting
-with POM"
-  (message "Loading root pom %s..." pom)
-  (javaimp-call-mvn
-   pom "help:effective-pom"
-   (lambda ()
-     (let (xml-start-pos xml-end-pos)
-       ;; find where we should start parsing XML
-       (goto-char (point-min))
-       (re-search-forward "<\\?xml\\|<projects?")
-       (setq xml-start-pos (match-beginning 0))
-       ;; determine the start tag
-       (goto-char (point-min))
-       (re-search-forward "<\\(projects?\\)")
-       ;; find closing tag which is also the end of the region to parse
-       (search-forward (concat "</" (match-string 1) ">"))
-       (setq xml-end-pos (match-end 0))
-       ;; parse
-       (let ((artifact-pomfile-alist
-             (javaimp-build-artifact-pomfile-alist (list pom)))
-            (children (javaimp-get-projects
-                       (xml-parse-region xml-start-pos xml-end-pos))))
-        (javaimp-maven-build-children children artifact-pomfile-alist))))))
-
-(defun javaimp-make-artifact-from-xml (node)
-  (javaimp-make-artifact
-   (javaimp-xml-first-child (javaimp-xml-child 'groupId node))
-   (javaimp-xml-first-child (javaimp-xml-child 'artifactId node))
-   (javaimp-xml-first-child (javaimp-xml-child 'version node))))
-
-(defun javaimp-get-pom-file-path-lax (artifact artifact-pomfile-alist)
-  (assoc-default
-   artifact artifact-pomfile-alist
-   (lambda (tested target)
-     (or (equal target tested)
-        (equal (javaimp-artifact-artifact-id target)
-               (javaimp-artifact-artifact-id tested))))))
-
-(defun javaimp-maven-build-children (projects artifact-pomfile-alist)
-  (let (result)
-    (dolist (proj projects result)
-      (let* ((artifact (javaimp-make-artifact-from-xml proj))
-            (pom-file-path (javaimp-get-pom-file-path-lax
-                            artifact artifact-pomfile-alist))
-            (build (javaimp-xml-child 'build proj))
-            (source-dir (javaimp-xml-first-child
-                         (javaimp-xml-child 'sourceDirectory build))) 
-            (test-source-dir (javaimp-xml-first-child
-                              (javaimp-xml-child 'testSourceDirectory
-                                                 build)))
-            (build-dir (javaimp-xml-first-child
-                        (javaimp-xml-child 'directory build)))
-            (parent (javaimp-make-artifact-from-xml
-                     (javaimp-xml-child 'parent proj))))
-       (push (javaimp-make-mod 
-              artifact
-              pom-file-path
-              (file-name-as-directory
-               (if (eq system-type 'cygwin) 
-                   (car (process-lines javaimp-cygpath-program "-u"
-                                       source-dir))
-                 source-dir))
-              (file-name-as-directory
-               (if (eq system-type 'cygwin) 
-                   (car (process-lines javaimp-cygpath-program "-u" 
-                                       test-source-dir))
-                 test-source-dir))
-              (file-name-as-directory
-               (if (eq system-type 'cygwin) 
-                   (car (process-lines javaimp-cygpath-program "-u" 
-                                       build-dir))
-                 build-dir))
-              nil nil parent nil)
-             result)))))
-
-(defun javaimp-build-artifact-pomfile-alist (pom-file-list)
-  "Recursively builds an alist where each element is of the
-form (\"ARTIFACT\" . \"POM-FILE-PATH\"). This is needed because
-there is no pom file path in the output of `mvn
-help:effective-pom'.  Each pom file path in POM-FILE-LIST should
-be in platform's default format."
-  (when pom-file-list
-    (let ((pom-file (car pom-file-list))
-         xml-tree project)
-      (message "Saving artifact id -> pom file mapping for %s" pom-file)
-      (with-temp-buffer
-       (insert-file-contents pom-file)
-       (setq xml-tree (xml-parse-region (point-min) (point-max))))
-      (setq project (if (assq 'top xml-tree)
-                       (assq 'project (cddr (assq 'top xml-tree)))
-                     (assq 'project xml-tree)))
-      (cons
-       ;; this pom
-       (cons (javaimp-make-artifact-from-xml project) pom-file)
-       (append
-       ;; submodules
-       (javaimp-build-artifact-pomfile-alist
-        (mapcar (lambda (submodule)
-                  (expand-file-name
-                   (concat
-                    ;; this pom's path
-                    (file-name-directory pom-file)
-                    ;; relative submodule directory
-                    (file-name-as-directory
-                     (let ((submodule-path (car (cddr submodule))))
-                       (if (eq system-type 'cygwin)
-                           (car (process-lines javaimp-cygpath-program "-u" 
-                                               submodule-path))
-                         submodule-path)))
-                    ;; well-known file name
-                    "pom.xml")))
-                (javaimp-xml-child-list (assq 'modules (cddr project)) 
'module)))
-       ;; rest items
-       (javaimp-build-artifact-pomfile-alist (cdr pom-file-list)))))))
-
-(defun javaimp-call-mvn (pom-file target handler)
+(defun javaimp--maven-call (pom-file target handler)
   "Runs Maven target TARGET on POM-FILE, then calls HANDLER in
 the temporary buffer and returns its result"
   (message "Calling \"mvn %s\" on pom: %s" target pom-file)
   (with-temp-buffer
-    (let* ((pom-file (if (eq system-type 'cygwin) 
-                        (car (process-lines javaimp-cygpath-program 
-                                            "-m" pom-file))
-                      pom-file))
+    (let* ((pom-file (javaimp-cygpath-convert-maybe pom-file))
           (status
-           ;; FIXME on GNU/Linux Maven strangely outputs ^M chars. Check
-           ;; also jar output with the same var binding below.
-           (let ((coding-system-for-read (when (eq system-type 'cygwin) 
'utf-8-dos)))
+           ;; TODO check 
 in Maven output on Gnu/Linux
+           (let ((coding-system-for-read
+                  (if (eq system-type 'cygwin) 'utf-8-dos)))
              (process-file javaimp-mvn-program nil t nil "-f" pom-file 
target)))
-          (output-buf (current-buffer)))
+          (buf (current-buffer)))
       (with-current-buffer (get-buffer-create javaimp-debug-buf-name)
        (erase-buffer)
-       (insert-buffer-substring output-buf))
-      (unless (and (numberp status) (= status 0))
-       (error "Maven target \"%s\" failed with status \"%s\""
-              target status))
+       (insert-buffer-substring buf))
+      (or (and (numberp status) (= status 0))
+         (error "Maven target \"%s\" failed with status \"%s\"" target status))
+      (goto-char (point-min))
       (funcall handler))))
 
+(defun javaimp--maven-build-tree (this parent-node all file)
+  (message "Building tree for module: %s" (javaimp-module-id this))
+  (let ((children
+        ;; reliable way to find children is to look for modules with "this" as
+        ;; the parent
+        (seq-filter (lambda (m) (equal (javaimp-module-parent-id m)
+                                       (javaimp-module-id this)))
+                             all)))
+    (if (and (null children)
+            (equal (javaimp-module-packaging this) "pom"))
+       (progn (message "Skipping empty aggregate module: %s" 
(javaimp-module-id this))
+              nil)
+      ;; filepath was not set before, but now we know it
+      (setf (javaimp-module-file this) file)
+      ;; node
+      (let* ((this-node (make-javaimp-node
+                       :parent parent-node
+                       :children nil
+                       :contents this))
+            ;; recursively build child nodes
+            (child-nodes
+             (mapcar (lambda (child)
+                       (let ((child-file
+                              ;; !! this is hack
+                              (javaimp--maven-get-submodule-file
+                               child file (javaimp-module-modules this))))
+                         (javaimp--maven-build-tree
+                          child this-node all child-file)))
+                     children)))
+       (setf (javaimp-node-children this-node) child-nodes)
+       this-node))))
+
+(defun javaimp--maven-get-submodule-file (submodule parent-file 
rel-paths-from-parent)
+  ;; Seems that the only reliable way to match a module parsed from <project>
+  ;; element with module relative path taken from <modules> is to visit pom and
+  ;; check that id and parent-id matches
+  (let* ((parent-dir (file-name-directory parent-file))
+        (files (mapcar (lambda (rel-path)
+                         (concat parent-dir
+                                 (file-name-as-directory rel-path)
+                                 "pom.xml"))
+                       rel-paths-from-parent)))
+    (or (seq-find
+        (lambda (file)
+          (javaimp--maven-xml-file-matches
+           file (javaimp-module-id submodule) (javaimp-module-parent-id 
submodule)))
+        files)
+       (error "Cannot find file for module: %s" (javaimp-module-id 
submodule)))))
+
 
-;;; Reading and caching dependencies
-
-(defun javaimp-maven-fetch-module-deps (module)
-  "Returns list of dependency jars for MODULE"
-  (javaimp-call-mvn
-   (javaimp-get-mod-pom-file module) "dependency:build-classpath"
-   (lambda ()
-     (let (deps-line)
-       (goto-char (point-min))
-       (search-forward "Dependencies classpath:")
-       (forward-line 1)
-       (setq deps-line (thing-at-point 'line))
-       (when (eq system-type 'cygwin)
-        (setq deps-line (car (process-lines javaimp-cygpath-program 
-                                            "-up" 
-                                            deps-line))))
-       (split-string deps-line (concat "[" path-separator "\n" "]+") t)))))
-
-(defun javaimp-get-file-ts (file)
-  (nth 5 (file-attributes file)))
+;;; Loading dep-jars
+
+(defun javaimp--maven-update-module-maybe (node)
+  (let ((module (javaimp-node-contents node))
+       need-update)
+    ;; check if deps are initialized
+    (or (javaimp-module-dep-jars module)
+       (progn (message "Loading dependencies: %s" (javaimp-module-id module))
+              (setq need-update t)))
+    ;; check if any pom up to the top one has changed
+    (let ((tmp node))
+      (while (and tmp
+                 (not need-update))
+       (let ((checked (javaimp-node-contents tmp)))
+         (if (> (float-time (javaimp--get-file-ts (javaimp-module-file 
checked)))
+                (float-time (javaimp-module-load-ts module)))
+             (progn
+               (message "Reloading %s (pom changed)" (javaimp-module-id 
checked))
+               (setq need-update t))))
+       (setq tmp (javaimp-node-parent tmp))))
+    (when need-update
+      (let* ((new-dep-jars (javaimp--maven-fetch-dep-jars module))
+            (new-load-ts (current-time)))
+       (setf (javaimp-module-dep-jars module) new-dep-jars)
+       (setf (javaimp-module-load-ts module) new-load-ts)))))
+
+(defun javaimp--maven-fetch-dep-jars (module)
+  (let* ((path (javaimp--maven-call (javaimp-module-file module)
+                                   "dependency:build-classpath"
+                                   #'javaimp--maven-build-classpath-handler))
+        (converted-path (javaimp-cygpath-convert-maybe path 'unix t))
+        (path-separator-regex (concat "[" path-separator "\n" "]+")))
+    (split-string converted-path path-separator-regex t)))
+
+(defun javaimp--maven-build-classpath-handler ()
+  (goto-char (point-min))
+  (search-forward "Dependencies classpath:")
+  (forward-line 1)
+  (thing-at-point 'line))
 
-(defun javaimp-any-file-ts-updated (files)
-  (if (null files)
-      nil
-    (let ((curr-ts (javaimp-get-file-ts (car (car files))))
-         (last-ts (cdr (car files))))
-      (or (null last-ts)               ; reading for the first time?
-         (not (equal (float-time curr-ts) (float-time last-ts)))
-         (javaimp-any-file-ts-updated (cdr files))))))
-
-(defun javaimp-get-dep-jars-cached (module parent)
-  "Returns a list of dependency jar file paths for a MODULE.
-Both MODULE and PARENT poms are checked for updates because
-PARENT pom may have some versions which are inherited by the
-MODULE."
-  (when (javaimp-any-file-ts-updated
-        (remq nil (list (cons (javaimp-get-mod-pom-file module)
-                              (javaimp-get-mod-pom-mod-ts module))
-                        (when parent
-                          (cons
-                           (javaimp-get-mod-pom-file parent)
-                           ;; here we check the saved parent ts because it
-                           ;; matters what version we had when we were
-                           ;; reloading this pom the last time
-                           (javaimp-get-mod-parent-ts module))))))
-    ;; (re-)fetch dependencies
-    (javaimp-set-mod-pom-deps
-     module (javaimp-maven-fetch-module-deps module))
-    ;; update timestamps
-    (javaimp-set-mod-pom-mod-ts
-     module (javaimp-get-file-ts (javaimp-get-mod-pom-file module)))
-    (when parent
-      (javaimp-set-mod-parent-ts
-       module (javaimp-get-file-ts (javaimp-get-mod-pom-file parent)))))
-  (javaimp-get-mod-pom-deps module))
-
-(defun javaimp-get-jdk-jars ()
-  "Returns list of jars from the jre/lib subdirectory of the JDK
-directory"
-  (when javaimp-jdk-home
-    (directory-files (concat (file-name-as-directory javaimp-jdk-home)
-                            (file-name-as-directory "jre/lib"))
-                    t "\\.jar$")))
-
-(defun javaimp-get-jar-classes-cached (jar)
-  (let ((current-jar-mod-ts
-        (nth 5 (file-attributes (javaimp-get-jar-path jar)))))
-    (unless (equal (float-time (javaimp-get-jar-mod-ts jar))
-                  (float-time current-jar-mod-ts))
-      (javaimp-set-jar-classes-list jar (javaimp-fetch-jar-classes jar))
-      (javaimp-set-jar-mod-ts jar current-jar-mod-ts))
-    (javaimp-get-jar-classes-list jar)))
-
-(defun javaimp-fetch-jar-classes (jar)
-  (let ((jar-file (javaimp-get-jar-path jar))
-       result)
-    (message "Reading classes in jar: %s" jar-file)
-    (with-temp-buffer
-      (let ((jar-file (if (eq system-type 'cygwin) 
-                         (car (process-lines javaimp-cygpath-program 
-                                             "-m" jar-file))
-                       jar-file))
-           (coding-system-for-read (when (eq system-type 'cygwin) 'utf-8-dos)))
-       (process-file javaimp-jar-program nil t nil "-tf" jar-file))
+
+;; Working with jar classes
+
+(defun javaimp--get-jar-classes (file)
+  (let ((cached (cdr (assoc file javaimp-cached-jars))))
+    (cond ((null cached)
+          ;; create, load & put into cache
+          (setq cached
+                (make-javaimp-cached-jar
+                 :file file
+                 :read-ts (javaimp--get-file-ts file)
+                 :classes (javaimp--fetch-jar-classes file)))
+          (push (cons file cached) javaimp-cached-jars))
+         ((> (float-time (javaimp--get-file-ts (javaimp-cached-jar-file 
cached)))
+             (float-time (javaimp-cached-jar-read-ts cached)))
+          ;; reload
+          (setf (javaimp-cached-jar-classes cached) 
(javaimp--fetch-jar-classes file))
+          ;; update read-ts
+          (setf (javaimp-cached-jar-read-ts cached) (current-time))))
+    ;; return from cached
+    (javaimp-cached-jar-classes cached)))
+
+(defun javaimp--fetch-jar-classes (file)
+  (message "Reading classes in file: %s" file)
+  (with-temp-buffer
+    (let ((coding-system-for-read (and (eq system-type 'cygwin) 'utf-8-dos)))
+      ;; on cygwin, "jar" is a windows program, so file path needs to be
+      ;; converted appropriately.
+      (process-file javaimp-jar-program nil t nil
+                   ;; `jar' accepts commands/options as a single string
+                   "tf" (javaimp-cygpath-convert-maybe file 'windows))
       (goto-char (point-min))
-      (while (re-search-forward "^\\(.+\\)\\.class$" nil t)
-       (push (replace-regexp-in-string "[/$]" "." (match-string 1))
-             result))
-      result)))
-
-(defun javaimp-collect-jar-classes (jar-paths)
-  (let (result jar)
-    (dolist (jar-path jar-paths result)
-      (setq jar (assoc jar-path javaimp-jar-classes-cache))
-      (unless jar
-       (setq jar (javaimp-make-jar jar-path nil nil))
-       (push jar javaimp-jar-classes-cache))
-      (setq result (append (javaimp-get-jar-classes-cached jar) result)))))
-
-(defun javaimp-get-module-from-root (roots predicate)
-  (if (null roots)
-      nil
-    (let ((result (javaimp-get-module (cdr (car roots)) predicate)))
-      (or result
-         (javaimp-get-module-from-root (cdr roots) predicate)))))
-
-(defun javaimp-get-module (modules predicate)
-  (cond ((null modules)
-        nil)
-       ((funcall predicate (car modules))
-        (car modules))
-       (t
-        (javaimp-get-module (cdr modules) predicate))))
+      (while (search-forward "/" nil t)
+       (replace-match "."))
+      (goto-char (point-min))
+      (let (result)
+       (while (re-search-forward "\\(^[[:alnum:]._]+\\)\\.class$" nil t)
+         (push (match-string 1) result))
+       result))))
 
-(defun javaimp-get-module-by-file (file)
-  (javaimp-get-module-from-root
-   javaimp-maven-root-modules
-   (lambda (mod)
-     (or (string-prefix-p (javaimp-get-mod-source-dir mod) file)
-        (string-prefix-p (javaimp-get-mod-test-source-dir mod) file)))))
+
+;; Tree search routines
+
+(defun javaimp--find-node (predicate)
+  (javaimp--find-node-in-forest javaimp-project-forest predicate))
+
+(defun javaimp--select-nodes (predicate)
+  (javaimp--select-nodes-from-forest javaimp-project-forest predicate))
+
+(defun javaimp--find-node-in-forest (forest predicate)
+  (catch 'found
+    (dolist (tree forest)
+      (javaimp--find-node-in-tree tree predicate))))
+
+(defun javaimp--find-node-in-tree (tree predicate)
+  (if tree
+      (progn (if (funcall predicate (javaimp-node-contents tree))
+                (throw 'found tree))
+            (dolist (child (javaimp-node-children tree))
+              (javaimp--find-node-in-tree child predicate)))))
+
+(defun javaimp--select-nodes-from-forest (forest predicate)
+  (apply #'seq-concatenate 'list
+        (mapcar (lambda (tree)
+                  (javaimp--select-nodes-from-tree tree predicate))
+                forest)))
+
+(defun javaimp--select-nodes-from-tree (tree predicate)
+  (if tree
+      (append (if (funcall predicate (javaimp-node-contents tree))
+                 (list tree))
+             (apply #'seq-concatenate 'list
+                    (mapcar (lambda (child)
+                              (javaimp--select-nodes-from-tree child 
predicate))
+                            (javaimp-node-children tree))))))
+
+
+;; Some API functions
+
+;; do not expose tree structure, return only modules
+
+(defun javaimp-find-module (predicate)
+  (let ((node (javaimp--find-node predicate)))
+    (and node
+        (javaimp-node-contents node))))
 
-(defun javaimp-get-module-by-artifact (artifact)
-  (javaimp-get-module-from-root
-   javaimp-maven-root-modules
-   (lambda (mod)
-     (equal (javaimp-get-mod-artifact mod) artifact))))
+(defun javaimp-select-modules (predicate)
+  (mapcar #'javaimp-node-contents
+         (javaimp--select-nodes predicate)))
 
 
-;;; Adding and organizing imports
+;;; Adding imports
 
 ;;;###autoload
 (defun javaimp-add-import (classname)
-  "Imports CLASSNAME in the current file.  Interactively,
-performs class name completion based on the current module's
-dependencies, JDK jars and top-level classes in the current
-module."
+  "Imports classname in the current file.  Interactively,
+asks for a class to import, adds import statement and calls
+`javaimp-organize-imports'.  Import statements are not
+duplicated.  Completion alternatives are constructed based on
+this module's dependencies' classes, JDK classes and top-level
+classes in the current module."
   (interactive
-   (let* ((file (expand-file-name
-                (or buffer-file-name
-                    (error "Buffer is not visiting a file!"))))
-         (module (or (javaimp-get-module-by-file file)
-                     (error "Cannot determine module for file: %s" file)))
-         (parent (javaimp-get-module-by-artifact
-                  (javaimp-get-mod-parent module))))
-     (list (completing-read
-           "Import: "
-           (append
-            (javaimp-collect-jar-classes
-             (append (javaimp-get-dep-jars-cached module parent)
-                     (javaimp-get-jdk-jars)))
-            (and javaimp-include-current-project-classes
-                 (javaimp-get-module-classes module)))
-           nil t nil nil (symbol-name (symbol-at-point))))))
-  (javaimp-organize-imports classname))
-
-(defun javaimp-get-module-classes (module)
-  "Scans current project and returns a list of top-level classes in both the
-source directory and test source directory"
-  (let ((src-dir (javaimp-get-mod-source-dir module))
-       (test-src-dir (javaimp-get-mod-test-source-dir module))
-       (build-dir (javaimp-get-mod-build-dir module)))
-    (append
-     (and javaimp-additional-source-dirs
-         (seq-mapcat
+   (progn
+     (barf-if-buffer-read-only)
+     (let* ((file (expand-file-name
+                  (or buffer-file-name
+                      (error "Buffer is not visiting a file!"))))
+           (node (or (javaimp--find-node
+                      (lambda (m)
+                        (or (string-prefix-p (javaimp-module-source-dir m) 
file)
+                            (string-prefix-p (javaimp-module-test-source-dir 
m) file))))
+                     (error "Cannot find module by file: %s" file))))
+       (javaimp--maven-update-module-maybe node)
+       (let ((module (javaimp-node-contents node)))
+        (list (completing-read
+               "Import: "
+               (append
+                ;; we're not caching full list of classes coming from module
+                ;; dependencies because jars may change and we need to reload
+                ;; them
+                (let ((jars (append (javaimp-module-dep-jars module)
+                                    (javaimp--get-jdk-jars))))
+                  (apply #'seq-concatenate 'list
+                         (mapcar #'javaimp--get-jar-classes jars)))
+                (and javaimp-include-current-module-classes
+                     (javaimp--get-module-classes module)))
+               nil t nil nil (symbol-name (symbol-at-point))))))))
+  (javaimp-organize-imports (cons classname 'ordinary)))
+
+(defun javaimp--get-module-classes (module)
+  "Returns list of top-level classes in current module"
+  (append
+   (let ((build-dir (javaimp-module-build-dir module)))
+     ;; additional source dirs
+     (and (seq-mapcat
           (lambda (rel-dir)
-            (let ((dir (file-name-as-directory (concat build-dir rel-dir))))
+            (let ((dir (concat build-dir (file-name-as-directory rel-dir))))
               (and (file-accessible-directory-p dir)
-                   (javaimp-get-directory-classes dir nil))))
-          javaimp-additional-source-dirs))
-     (and (file-accessible-directory-p test-src-dir)
-         (javaimp-get-directory-classes test-src-dir nil))
-     (and (file-accessible-directory-p src-dir)
-         (javaimp-get-directory-classes src-dir nil)))))
-
-(defun javaimp-get-directory-classes (dir prefix)
-  "Returns the list of classes found in the directory DIR.  PREFIX is the
-initial package prefix."
-  (let (result)
-    ;; traverse subdirectories
-    (dolist (file (directory-files-and-attributes dir nil nil t))
-      (if (and (eq (cadr file) t)
-              (not (or (string= (car file) ".")
-                       (string= (car file) ".."))))
-         (setq result
-               (append (javaimp-get-directory-classes 
-                        (concat dir (file-name-as-directory (car file)))
-                        (concat prefix (car file) "."))
-                       result))))
-    ;; add .java files in the current directory
-    (dolist (file (directory-files-and-attributes dir nil "\\.java\\'" t))
-      (unless (cadr file)
-       (push (concat prefix (file-name-sans-extension (car file))) result)))
-    result))
-
-(defun javaimp-add-to-import-groups (new-class groups)
-  "Subroutine of `javaimp-organize-imports'"
-  (let* ((order (or (assoc-default new-class javaimp-import-group-alist
-                                  'string-match)
-                   javaimp-import-default-order))
-        (group (assoc order groups)))
-    (if group
-       (progn
-         ;; add only if this class is not already there
-         (unless (member new-class (cdr group))
-           (setcdr group (cons new-class (cdr group))))
-         groups)
-      (cons (cons order (list new-class)) groups))))
-
-(defun javaimp-insert-import-groups (groups static-p)
-  "Inserts all imports in GROUPS.  Non-nil STATIC-P means that
-  all imports are static."
-  (when groups
-    (dolist (group (sort groups (lambda (g1 g2)
-                                 (< (car g1) (car g2)))))
-      (dolist (class (sort (cdr group) 'string<))
-       (insert (concat "import " (when static-p "static ") class ";\n")))
-      (insert ?\n))
-    ;; remove newline after the last group
-    (delete-char -1)))
+                   (javaimp--get-directory-classes dir nil))))
+          javaimp-additional-source-dirs)))
+   ;; source dir
+   (let ((dir (javaimp-module-source-dir module)))
+     (and (file-accessible-directory-p dir)
+         (javaimp--get-directory-classes dir nil)))
+   ;; test source dir
+   (let ((dir (javaimp-module-test-source-dir module)))
+     (and (file-accessible-directory-p dir)
+         (javaimp--get-directory-classes dir nil)))))
+
+(defun javaimp--get-directory-classes (dir prefix)
+  (append
+   ;; .java files in current directory
+   (mapcar (lambda (file)
+            (concat prefix (file-name-sans-extension (car file))))
+          (seq-filter (lambda (file) (null (cadr file))) ;only files
+                      (directory-files-and-attributes dir nil "\\.java\\'" t)))
+   ;; descend into subdirectories
+   (apply #'seq-concatenate 'list
+         (mapcar (lambda (subdir)
+                   (let ((name (car subdir)))
+                     (javaimp--get-directory-classes
+                      (concat dir (file-name-as-directory name)) (concat 
prefix name "."))))
+                 (seq-filter (lambda (file)
+                               (and (eq (cadr file) t) ;only directories
+                                    (null (member (car file) '("." "..")))))
+                             (directory-files-and-attributes dir nil nil 
t))))))
+
+
+;; Organizing imports
 
 ;;;###autoload
-(defun javaimp-organize-imports (&rest new-classes)
-  "Groups and orders import statements in the current buffer.  Groups are
-formed and ordered according to `javaimp-import-group-alist'.  Classes within a
-single group are ordered in a lexicographic order. Optional NEW-CLASSES
-argument is a list of additional classes to import."
+(defun javaimp-organize-imports (&rest new-imports)
+  "Groups import statements according to the value of
+`javaimp-import-group-alist' (which see) and prints resulting
+groups leaving one blank line between groups.
+
+If the file already contains some import statements, this command
+rewrites them, starting with the same place.  Else, if the the
+file contains package directive, this command inserts one blank
+line below and then imports.  Otherwise, imports are inserted at
+the beginning of buffer.
+
+Classes within a single group are ordered in a lexicographic
+order.  Imports not matched by any regexp in `javaimp-import-group-alist'
+are assigned a default order defined by
+`javaimp-import-default-order'.
+
+NEW-IMPORTS is a list of additional imports; each element should
+be of the form (CLASS . TYPE), where CLASS is a string and TYPE
+is `ordinary' or `static'.  Interactively, NEW-IMPORTS is nil."
   (interactive)
   (barf-if-buffer-read-only)
   (save-excursion
-    (let (import-groups static-import-groups old-imports-start)
-      ;; existing imports
-      (goto-char (point-min))
-      (while (re-search-forward
-             "^\\s-*import\\s-+\\(static\\s-+\\)?\\([._[:word:]]+\\)"
-             nil t)
-       (if (null (match-string 1))
-           (setq import-groups
-                 (javaimp-add-to-import-groups (match-string 2)
-                                               import-groups))
-         (setq static-import-groups
-               (javaimp-add-to-import-groups (match-string 2)
-                                             static-import-groups)))
-       (beginning-of-line)
-       (unless old-imports-start (setq old-imports-start (point)))
-       (delete-region (point) (line-beginning-position 2))
-       ;; delete whatever was between import statements
-       (when (/= (point) old-imports-start)
-         (delete-region old-imports-start (point))))
-      ;; new imports
-      (dolist (class new-classes)
-       (setq import-groups (javaimp-add-to-import-groups class import-groups)))
-      ;; insert all
-      (if (or import-groups static-import-groups)
+    (goto-char (point-min))
+    (let* ((old-data (javaimp--parse-imports))
+          (first (car old-data))
+          (last (cadr old-data))
+          (all-imports (append new-imports (cddr old-data))))
+      (if all-imports
          (progn
-           ;; prepare the position
-           (cond (old-imports-start
-                  ;; when there were any imports, do not touch blank lines
-                  ;; before imports
-                  (goto-char old-imports-start))
-                 ((re-search-forward "^\\s-*package\\s-" nil t)
-                  ;; when there is a package statement, insert one or two
-                  ;; blank lines after it
-                  (when (= (forward-line) 1) (insert ?\n)) ;; last line?
-                  (insert ?\n))
-                 (t
-                  ;; otherwise, start at the bob, insert one empty line
-                  ;; after point
-                  (goto-char (point-min))
-                  (insert ?\n)
-                  (backward-char)))
-           (javaimp-insert-import-groups import-groups nil)
-           (and import-groups static-import-groups (insert ?\n))
-           (javaimp-insert-import-groups static-import-groups t))
-       (message "Nothing to organize")))))
-
-;;;###autoload
-(defun javaimp-invalidate-jar-classes-cache ()
-  "Resets jar classes cache (debugging only)"
-  (interactive)
-  (setq javaimp-jar-classes-cache nil))
-
-;;;###autoload
-(defun javaimp-forget-all-visited-modules ()
-  "Resets `javaimp-maven-root-modules' (debugging only)"
-  (interactive)
-  (setq javaimp-maven-root-modules nil))
-
-;;;###autoload
-(defun javaimp-reset ()
-  "Resets all data (debugging only)"
-  (interactive)
-  (javaimp-forget-all-visited-modules)
-  (javaimp-invalidate-jar-classes-cache))
+           ;; delete old imports, if any
+           (if first
+               (progn
+                 (goto-char last)
+                 (forward-line)
+                 (delete-region first (point))))
+           (javaimp--prepare-for-insertion first)
+           (setq all-imports
+                 (cl-delete-duplicates
+                   all-imports
+                   :test (lambda (first second)
+                           (equal (car first) (car second)))))
+           ;; assign order
+           (let ((with-order
+                  (mapcar
+                   (lambda (import)
+                     (let ((order (or (assoc-default (car import)
+                                                     javaimp-import-group-alist
+                                                     'string-match)
+                                      javaimp-import-default-order)))
+                       (cons import order)))
+                   all-imports)))
+             (setq with-order
+                   (sort with-order
+                         (lambda (first second)
+                           ;; sort by order, name
+                           (if (= (cdr first) (cdr second))
+                               (string< (caar first) (caar second))
+                             (< (cdr first) (cdr second))))))
+             (javaimp--insert-imports with-order)))
+      (message "Nothing to organize!")))))
+
+(defun javaimp--parse-imports ()
+  (let (first last list)
+    (while (re-search-forward 
"^\\s-*import\\s-+\\(static\\s-+\\)?\\([._[:word:]]+\\)" nil t)
+      (push (cons (match-string 2) (if (match-string 1) 'static 'ordinary)) 
list)
+      (setq last (line-beginning-position))
+      (or first (setq first last)))
+    (cons first (cons last list))))
+
+(defun javaimp--prepare-for-insertion (start)
+  (cond (start
+        ;; if there were any imports, we start inserting at the same place
+        (goto-char start))
+       ((re-search-forward "^\\s-*package\\s-" nil t)
+        ;; if there's a package directive, insert one blank line below and
+        ;; leave point after it
+        (end-of-line)
+        (if (eobp)
+            (insert ?\n)
+          (forward-line))
+        ;; then insert one blank line and we're done
+        (insert ?\n))
+       (t
+        ;; otherwise, just go to bob
+        (goto-char (point-min)))))
+
+(defun javaimp--insert-imports (imports)
+  (let ((static (seq-filter (lambda (elt)
+                             (eq (cdar elt) 'static))
+                           imports))
+       (ordinary (seq-filter (lambda (elt)
+                               (eq (cdar elt) 'ordinary))
+                             imports)))
+    (javaimp--insert-import-group "import static %s;" static)
+    (and static ordinary (insert ?\n))
+    (javaimp--insert-import-group "import %s;" ordinary)))
+
+(defun javaimp--insert-import-group (pattern imports)
+  (let (last-order)
+    (dolist (import imports)
+      ;; if adjacent imports have different order value, insert a newline
+      ;; between them
+      (let ((order (cdr import)))
+       (and last-order
+            (/= order last-order)
+            (insert ?\n))
+       (insert (format pattern (caar import)) ?\n)
+       (setq last-order order)))))
 
 (provide 'javaimp)
 
diff --git a/packages/js2-mode/Makefile b/packages/js2-mode/Makefile
index 08b1e48..7777a67 100644
--- a/packages/js2-mode/Makefile
+++ b/packages/js2-mode/Makefile
@@ -10,17 +10,14 @@ SRCS = js2-mode.el js2-imenu-extras.el
 OBJS = $(SRCS:.el=.elc)
 
 %.elc: %.el
-       ${EMACS} $(BATCHFLAGS) -f batch-byte-compile $^
+       ${EMACS} $(BATCHFLAGS) -L . -f batch-byte-compile $^
 
 all: $(OBJS)
 
 clean:
        -rm -f $(OBJS)
 
-# custom build (require loads)
-js2-imenu-extras.elc: js2-mode.elc
-       ${EMACS} $(BATCHFLAGS) -l ./js2-mode.elc -f batch-byte-compile $*.el
-
 test:
        ${EMACS} $(BATCHFLAGS) -L . -l js2-mode.el -l js2-old-indent.el -l 
tests/parser.el\
-         -l tests/indent.el -l tests/externs.el -f ert-run-tests-batch-and-exit
+         -l tests/indent.el -l tests/externs.el -l tests/json-path.el \
+         -l tests/navigation.el -f ert-run-tests-batch-and-exit
diff --git a/packages/js2-mode/NEWS.md b/packages/js2-mode/NEWS.md
index 2984e91..87e9d72 100644
--- a/packages/js2-mode/NEWS.md
+++ b/packages/js2-mode/NEWS.md
@@ -1,5 +1,23 @@
 # History of user-visible changes
 
+## 2016-06-23
+
+* New variable `js2-mode-assume-strict`, for use with ES6 modules.
+* Support for JSDoc @callback, @func and @method tags.
+* Object properties are highlighted using a different face:
+  `js2-object-property`, which has no color by default.
+* Experimental support for object rest/spread ECMAScript proposal.
+* `js2-getter-setter-node` is renamed to `js2-method-node`, together with
+  its related functions.  It already handles generator methods, and we
+  added support for async methods (see below), so the old name would get
+  more confusing.
+* Support for default parameters in destructuring.  It should work for both
+  objects and arrays, in both literals and function arguments.
+* New mode: `js2-jsx-mode`, deriving from `js2-mode`.  Supports indentation of
+  JSXElement expressions wrapped within parentheses or as function arguments.
+  Indentation is customizable via `sgml-attribute-offset`.
+* Experimental support for async/await ECMAScript proposal.
+
 ## 20150909
 
 * `js2-mode` now derives from `js-mode`. That means the former
diff --git a/packages/js2-mode/README.md b/packages/js2-mode/README.md
index b0ee444..cbce9c3 100644
--- a/packages/js2-mode/README.md
+++ b/packages/js2-mode/README.md
@@ -1,4 +1,4 @@
-About [![Build 
Status](https://travis-ci.org/mooz/js2-mode.png?branch=master)](https://travis-ci.org/mooz/js2-mode)
+About [![Build 
Status](https://travis-ci.org/mooz/js2-mode.svg?branch=master)](https://travis-ci.org/mooz/js2-mode)
 
[![MELPA](https://melpa.org/packages/js2-mode-badge.svg)](https://melpa.org/#/js2-mode)
 ======
 
 Improved JavaScript editing mode for GNU Emacs ([description 
here](http://elpa.gnu.org/packages/js2-mode.html)).
@@ -12,7 +12,7 @@ The stable versions are hosted at [GNU 
ELPA](http://elpa.gnu.org/)
 (<kbd>M-x list-packages</kbd>).
 
 You can also install the latest development version from
-[Melpa](http://melpa.milkbox.net/#installing).
+[MELPA](https://melpa.org/#/getting-started).
 
 Emacs 22 and 23
 ===============
diff --git a/packages/js2-mode/js2-imenu-extras.el 
b/packages/js2-mode/js2-imenu-extras.el
index dfdedc8..81c6d08 100644
--- a/packages/js2-mode/js2-imenu-extras.el
+++ b/packages/js2-mode/js2-imenu-extras.el
@@ -270,7 +270,7 @@ For example, for code
   {rules: {password: {required: function() {}}}}
 
 when NODE is the inner `js2-object-prop-mode',
-it returns `(\"rules\" \"password\")'."
+it returns (\"rules\" \"password\")."
   (let (rlt (n node))
     (while (setq n (js2-imenu-parent-prop-node n))
       (push (js2-prop-node-name (js2-object-prop-node-left n)) rlt))
diff --git a/packages/js2-mode/js2-mode.el b/packages/js2-mode/js2-mode.el
index 2d6f336..5ccfbcc 100644
--- a/packages/js2-mode/js2-mode.el
+++ b/packages/js2-mode/js2-mode.el
@@ -1,13 +1,13 @@
 ;;; js2-mode.el --- Improved JavaScript editing mode
 
-;; Copyright (C) 2009, 2011-2015  Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2011-2016  Free Software Foundation, Inc.
 
 ;; Author: Steve Yegge <address@hidden>
 ;;         mooz <address@hidden>
 ;;         Dmitry Gutov <address@hidden>
 ;; URL:  https://github.com/mooz/js2-mode/
 ;;       http://code.google.com/p/js2-mode/
-;; Version: 20150909
+;; Version: 20160623
 ;; Keywords: languages, javascript
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 
@@ -60,6 +60,12 @@
 
 ;;   (add-to-list 'interpreter-mode-alist '("node" . js2-mode))
 
+;; Support for JSX is available via the derived mode `js2-jsx-mode'.  If you
+;; also want JSX support, use that mode instead:
+
+;;   (add-to-list 'auto-mode-alist '("\\.jsx?\\'" . js2-jsx-mode))
+;;   (add-to-list 'interpreter-mode-alist '("node" . js2-jsx-mode))
+
 ;; To customize how it works:
 ;;   M-x customize-group RET js2-mode RET
 
@@ -95,6 +101,7 @@
       (require 'js2-old-indent)
     (defvaralias 'js2-basic-offset 'js-indent-level nil)
     (defalias 'js2-proper-indentation 'js--proper-indentation)
+    (defalias 'js2-jsx-indent-line 'js-jsx-indent-line)
     (defalias 'js2-indent-line 'js-indent-line)
     (defalias 'js2-re-search-forward 'js--re-search-forward)))
 
@@ -192,7 +199,7 @@ Set `js2-include-rhino-externs' to t to include them.")
   (mapcar 'symbol-name
           '(__dirname __filename Buffer clearInterval clearTimeout require
             console exports global module process setInterval setTimeout
-            querystring))
+            querystring setImmediate clearImmediate))
   "Node.js externs.
 Set `js2-include-node-externs' to t to include them.")
 
@@ -260,7 +267,7 @@ If `js2-dynamic-idle-timer-adjust' is 0 or negative,
 
 (defcustom js2-concat-multiline-strings t
   "When non-nil, `js2-line-break' in mid-string will make it a
-string concatenation. When `eol', the '+' will be inserted at the
+string concatenation. When `eol', the `+' will be inserted at the
 end of the line, otherwise, at the beginning of the next line."
   :type '(choice (const t) (const eol) (const nil))
   :group 'js2-mode)
@@ -270,6 +277,11 @@ end of the line, otherwise, at the beginning of the next 
line."
   :type 'boolean
   :group 'js2-mode)
 
+(defcustom js2-mode-assume-strict nil
+  "Non-nil to start files in strict mode automatically."
+  :type 'boolean
+  :group 'js2-mode)
+
 (defcustom js2-mode-show-strict-warnings t
   "Non-nil to emit Ecma strict-mode warnings.
 Some of the warnings can be individually disabled by other flags,
@@ -308,10 +320,10 @@ interferes with type inference (in systems that support 
it.)"
   :group 'js2-mode)
 
 (defcustom js2-strict-cond-assign-warning t
-  "Non-nil to warn about expressions like if (a = b).
-This often should have been '==' instead of '='.  If the warning
+  "Non-nil to warn about usage like `if (a = b)'.
+This often should have been `==' instead of `='.  If the warning
 is enabled, you can suppress it on a per-expression basis by
-parenthesizing the expression, e.g. if ((a = b)) ..."
+parenthesizing the expression, e.g., `if ((a = b)) ...'."
   :type 'boolean
   :group 'js2-mode)
 
@@ -385,7 +397,7 @@ setting `allowMemberExprAsFunctionName'.  The experimental 
syntax is:
 
   function <member-expr> ( [ arg-list ] ) { <body> }
 
-Where member-expr is a non-parenthesized 'member expression', which
+Where member-expr is a non-parenthesized `member expression', which
 is anything at the grammar level of a new-expression or lower, meaning
 any expression that does not involve infix or unary operators.
 
@@ -610,7 +622,9 @@ which doesn't seem particularly useful, but Rhino permits 
it."
 (defvar js2-NO_SUBS_TEMPLATE 167) ; template literal without substitutions
 (defvar js2-TAGGED_TEMPLATE 168)  ; tagged template literal
 
-(defconst js2-num-tokens (1+ js2-TAGGED_TEMPLATE))
+(defvar js2-AWAIT 169)  ; await (pseudo keyword)
+
+(defconst js2-num-tokens (1+ js2-AWAIT))
 
 (defconst js2-debug-print-trees nil)
 
@@ -668,6 +682,7 @@ List of chars built up while scanning various tokens.")
   (string "")
   number
   number-base
+  number-legacy-octal-p
   regexp-flags
   comment-type
   follows-eol-p)
@@ -1018,6 +1033,11 @@ in large files.")
   "Face used to highlight function name in calls."
   :group 'js2-mode)
 
+(defface js2-object-property
+  '((t :inherit default))
+  "Face used to highlight named property in object literal."
+  :group 'js2-mode)
+
 (defface js2-instance-member
   '((t :foreground "DarkOrchid"))
   "Face used to highlight instance variables in javascript.
@@ -1061,6 +1081,7 @@ Not currently used."
   "Face used to highlight undeclared variable identifiers.")
 
 (defcustom js2-init-hook nil
+  ;; FIXME: We don't really need this anymore.
   "List of functions to be called after `js2-mode' or
 `js2-minor-mode' has initialized all variables, before parsing
 the buffer for the first time."
@@ -1350,6 +1371,9 @@ the correct number of ARGS must be provided."
 (js2-msg "msg.yield.parenthesized"
          "yield expression must be parenthesized.")
 
+(js2-msg "msg.bad.await"
+         "await must be in async functions.")
+
 ;; NativeGlobal
 (js2-msg "msg.cant.call.indirect"
           "Function '%s' must be called directly, and not by way of a "
@@ -1437,7 +1461,7 @@ the correct number of ARGS must be provided."
          "Compilation produced %s syntax errors.")
 
 (js2-msg "msg.var.redecl"
-         "TypeError: redeclaration of var %s.")
+         "Redeclaration of var %s.")
 
 (js2-msg "msg.const.redecl"
          "TypeError: redeclaration of const %s.")
@@ -1712,6 +1736,9 @@ the correct number of ARGS must be provided."
 (js2-msg "msg.destruct.assign.no.init"
          "Missing = in destructuring declaration")
 
+(js2-msg "msg.init.no.destruct"
+         "Binding initializer not in destructuring assignment")
+
 (js2-msg "msg.no.octal.strict"
          "Octal numbers prohibited in strict mode.")
 
@@ -2530,7 +2557,10 @@ so many of its properties will be nil.
       (js2-print-from-clause from))
      (exports-list
       (js2-print-named-imports exports-list)))
-    (insert ";\n")))
+    (unless (or (and default (not (js2-assign-node-p default)))
+                (and declaration (or (js2-function-node-p declaration)
+                                     (js2-class-node-p declaration))))
+      (insert ";\n"))))
 
 (cl-defstruct (js2-while-node
                (:include js2-loop-node)
@@ -2717,7 +2747,7 @@ It contains a local-name node which is the name of the 
value in the
 current scope, and extern-name which is the name of the value in the
 imported or exported scope. By default these are the same, but if the
 name is aliased as in {foo as bar}, it would have an extern-name node
-containing 'foo' and a local-name node containing 'bar'."
+containing `foo' and a local-name node containing `bar'."
   local-name ; js2-name-node with the variable name in this scope
   extern-name)   ; js2-name-node with the value name in the exporting module
 
@@ -2735,8 +2765,8 @@ different, visit the extern-name."
       (js2-visit-ast extern-name v))))
 
 (defun js2-print-extern-binding (n _i)
-  "Print a representation of a single extern binding. E.g. 'foo' or
-'foo as bar'."
+  "Print a representation of a single extern binding. E.g. `foo' or
+`foo as bar'."
   (let ((local-name (js2-export-binding-node-local-name n))
         (extern-name (js2-export-binding-node-extern-name n)))
     (insert (js2-name-node-name extern-name))
@@ -2864,9 +2894,9 @@ local context."
                                                                   len
                                                                   name)))
   "AST node for a complete namespace import.
-E.g. the '* as lib' expression in:
+E.g. the `* as lib' expression in:
 
-import * as lib from 'src/lib'
+import * as lib from \\='src/lib\\='
 
 It contains a single name node referring to the bound name."
   name) ; js2-name-node of the bound name.
@@ -2886,7 +2916,7 @@ It contains a single name node referring to the bound 
name."
                                                              module-id
                                                              metadata-p)))
   "AST node for the from clause in an import or export statement.
-E.g. from 'my/module'. It can refere to either an external module, or to the
+E.g. from \\='my/module\\='. It can refere to either an external module, or to 
the
 modules metadata itself."
   module-id ; string containing the module specifier.
   metadata-p) ; true if this clause refers to the module's metadata
@@ -3195,7 +3225,7 @@ NODE is a `js2-labels-node'.  LABEL is an identifier."
                                                        len label target)))
   "AST node for a break statement.
 The label field is a `js2-name-node', possibly nil, for the named label
-if provided.  E.g. in 'break foo', it represents 'foo'.  The target field
+if provided.  E.g. in `break foo', it represents `foo'.  The target field
 is the target of the break - a label node or enclosing loop/switch statement.")
 
 (put 'cl-struct-js2-break-node 'js2-visitor 'js2-visit-jump-node)
@@ -3241,6 +3271,7 @@ a `js2-label-node' or the innermost enclosing loop.")
                                                           params rest-p
                                                           body
                                                           generator-type
+                                                          async
                                                           lp rp)))
   "AST node for a function declaration.
 The `params' field is a Lisp list of nodes.  Each node is either a simple
@@ -3257,6 +3288,7 @@ The `params' field is a Lisp list of nodes.  Each node is 
either a simple
   ignore-dynamic   ; ignore value of the dynamic-scope flag (interpreter only)
   needs-activation ; t if we need an activation object for this frame
   generator-type   ; STAR, LEGACY, COMPREHENSION or nil
+  async            ; t if the function is defined as `async function`
   member-expr)     ; nonstandard Ecma extension from Rhino
 
 (put 'cl-struct-js2-function-node 'js2-visitor 'js2-visit-function-node)
@@ -3270,7 +3302,7 @@ The `params' field is a Lisp list of nodes.  Each node is 
either a simple
 
 (defun js2-print-function-node (n i)
   (let* ((pad (js2-make-pad i))
-         (getter (js2-node-get-prop n 'GETTER_SETTER))
+         (method (js2-node-get-prop n 'METHOD_TYPE))
          (name (or (js2-function-node-name n)
                    (js2-function-node-member-expr n)))
          (params (js2-function-node-params n))
@@ -3278,8 +3310,10 @@ The `params' field is a Lisp list of nodes.  Each node 
is either a simple
          (rest-p (js2-function-node-rest-p n))
          (body (js2-function-node-body n))
          (expr (not (eq (js2-function-node-form n) 'FUNCTION_STATEMENT))))
-    (unless (or getter arrow)
-      (insert pad "function")
+    (unless method
+      (insert pad)
+      (when (js2-function-node-async n) (insert "async "))
+      (unless arrow (insert "function"))
       (when (eq (js2-function-node-generator-type n) 'STAR)
         (insert "*")))
     (when name
@@ -3450,6 +3484,8 @@ The type field inherited from `js2-node' holds the 
operator."
                (cons js2-TYPEOF "typeof")
                (cons js2-INSTANCEOF "instanceof")
                (cons js2-DELPROP "delete")
+               (cons js2-AWAIT "await")
+               (cons js2-VOID "void")
                (cons js2-COMMA ",")
                (cons js2-COLON ":")
                (cons js2-OR "||")
@@ -3530,7 +3566,7 @@ The type field holds the actual assignment operator.")
                                                        len operand)))
   "AST node type for unary operator nodes.
 The type field can be NOT, BITNOT, POS, NEG, INC, DEC,
-TYPEOF, DELPROP or TRIPLEDOT.  For INC or DEC, a 'postfix node
+TYPEOF, DELPROP, TRIPLEDOT or AWAIT.  For INC or DEC, a 'postfix node
 property is added if the operator follows the operand."
   operand)  ; a `js2-node' expression
 
@@ -3550,7 +3586,9 @@ property is added if the operator follows the operand."
     (unless postfix
       (insert op))
     (if (or (= tt js2-TYPEOF)
-            (= tt js2-DELPROP))
+            (= tt js2-DELPROP)
+            (= tt js2-AWAIT)
+            (= tt js2-VOID))
         (insert " "))
     (js2-print-ast (js2-unary-node-operand n) 0)
     (when postfix
@@ -3686,11 +3724,14 @@ Returns 0 if NODE is nil or its identifier field is 
nil."
                                                         (num-value 
(js2-token-number
                                                                     
(js2-current-token)))
                                                         (num-base 
(js2-token-number-base
-                                                                   
(js2-current-token))))))
+                                                                   
(js2-current-token)))
+                                                        (legacy-octal-p 
(js2-token-number-legacy-octal-p
+                                                                         
(js2-current-token))))))
   "AST node for a number literal."
   value      ; the original string, e.g. "6.02e23"
   num-value  ; the parsed number value
-  num-base)  ; the number's base
+  num-base  ; the number's base
+  legacy-octal-p)  ; whether the number is a legacy octal (0123 instead of 
0o123)
 
 (put 'cl-struct-js2-number-node 'js2-visitor 'js2-visit-none)
 (put 'cl-struct-js2-number-node 'js2-printer 'js2-print-number-node)
@@ -3810,9 +3851,32 @@ You can tell the quote type by looking at the first 
character."
       (insert ",")))
   (insert "]"))
 
-(cl-defstruct (js2-class-node
+(cl-defstruct (js2-object-node
                (:include js2-node)
                (:constructor nil)
+               (:constructor make-js2-object-node (&key (type js2-OBJECTLIT)
+                                                        (pos js2-ts-cursor)
+                                                        len
+                                                        elems)))
+  "AST node for an object literal expression.
+`elems' is a list of `js2-object-prop-node'."
+  elems)
+
+(put 'cl-struct-js2-object-node 'js2-visitor 'js2-visit-object-node)
+(put 'cl-struct-js2-object-node 'js2-printer 'js2-print-object-node)
+
+(defun js2-visit-object-node (n v)
+  (dolist (e (js2-object-node-elems n))
+    (js2-visit-ast e v)))
+
+(defun js2-print-object-node (n i)
+  (insert (js2-make-pad i) "{")
+  (js2-print-list (js2-object-node-elems n))
+  (insert "}"))
+
+(cl-defstruct (js2-class-node
+               (:include js2-object-node)
+               (:constructor nil)
                (:constructor make-js2-class-node (&key (type js2-CLASS)
                                                        (pos js2-ts-cursor)
                                                        (form 'CLASS_STATEMENT)
@@ -3824,7 +3888,7 @@ optional `js2-expr-node'"
   form             ; CLASS_{STATEMENT|EXPRESSION}
   name             ; class name (a `js2-node-name', or nil if anonymous)
   extends          ; class heritage (a `js2-expr-node', or nil if none)
-  elems)
+  )
 
 (put 'cl-struct-js2-class-node 'js2-visitor 'js2-visit-class-node)
 (put 'cl-struct-js2-class-node 'js2-printer 'js2-print-class-node)
@@ -3856,28 +3920,29 @@ optional `js2-expr-node'"
         (js2-print-ast elem (1+ i))))
     (insert "\n" pad "}")))
 
-(cl-defstruct (js2-object-node
+(cl-defstruct (js2-computed-prop-name-node
                (:include js2-node)
                (:constructor nil)
-               (:constructor make-js2-object-node (&key (type js2-OBJECTLIT)
-                                                        (pos js2-ts-cursor)
-                                                        len
-                                                        elems)))
-  "AST node for an object literal expression.
-`elems' is a list of `js2-object-prop-node'."
-  elems)
+               (:constructor make-js2-computed-prop-name-node
+                             (&key
+                              (type js2-LB)
+                              expr
+                              (pos (js2-current-token-beg))
+                              (len (- js2-ts-cursor
+                                      (js2-current-token-beg))))))
+  "AST node for a `ComputedPropertyName'."
+  expr)
 
-(put 'cl-struct-js2-object-node 'js2-visitor 'js2-visit-object-node)
-(put 'cl-struct-js2-object-node 'js2-printer 'js2-print-object-node)
+(put 'cl-struct-js2-computed-prop-name-node 'js2-visitor 
'js2-visit-computed-prop-name-node)
+(put 'cl-struct-js2-computed-prop-name-node 'js2-printer 
'js2-print-computed-prop-name-node)
 
-(defun js2-visit-object-node (n v)
-  (dolist (e (js2-object-node-elems n))
-    (js2-visit-ast e v)))
+(defun js2-visit-computed-prop-name-node (n v)
+  (js2-visit-ast (js2-computed-prop-name-node-expr n) v))
 
-(defun js2-print-object-node (n i)
-  (insert (js2-make-pad i) "{")
-  (js2-print-list (js2-object-node-elems n))
-  (insert "}"))
+(defun js2-print-computed-prop-name-node (n i)
+  (insert (js2-make-pad i) "[")
+  (js2-print-ast (js2-computed-prop-name-node-expr n) 0)
+  (insert "]"))
 
 (cl-defstruct (js2-object-prop-node
                (:include js2-infix-node)
@@ -3898,53 +3963,41 @@ both fields have the same value.")
 
 (defun js2-print-object-prop-node (n i)
   (let* ((left (js2-object-prop-node-left n))
-         (right (js2-object-prop-node-right n))
-         (computed (not (or (js2-string-node-p left)
-                            (js2-number-node-p left)
-                            (js2-name-node-p left)))))
-    (insert (js2-make-pad i))
-    (if computed
-        (insert "["))
-    (js2-print-ast left 0)
-    (if computed
-        (insert "]"))
+         (right (js2-object-prop-node-right n)))
+    (js2-print-ast left i)
     (if (not (js2-node-get-prop n 'SHORTHAND))
         (progn
           (insert ": ")
           (js2-print-ast right 0)))))
 
-(cl-defstruct (js2-getter-setter-node
+(cl-defstruct (js2-method-node
                (:include js2-infix-node)
                (:constructor nil)
-               (:constructor make-js2-getter-setter-node (&key type ; GET, 
SET, or FUNCTION
-                                                               (pos 
js2-ts-cursor)
-                                                               len left 
right)))
-  "AST node for a getter/setter property in an object literal.
-The `left' field is the `js2-name-node' naming the getter/setter prop.
+               (:constructor make-js2-method-node (&key (pos js2-ts-cursor)
+                                                        len left right)))
+  "AST node for a method in an object literal or a class body.
+The `left' field is the `js2-name-node' naming the method.
 The `right' field is always an anonymous `js2-function-node' with a node
-property `GETTER_SETTER' set to js2-GET, js2-SET, or js2-FUNCTION. ")
+property `METHOD_TYPE' set to 'GET or 'SET. ")
 
-(put 'cl-struct-js2-getter-setter-node 'js2-visitor 'js2-visit-infix-node)
-(put 'cl-struct-js2-getter-setter-node 'js2-printer 'js2-print-getter-setter)
+(put 'cl-struct-js2-method-node 'js2-visitor 'js2-visit-infix-node)
+(put 'cl-struct-js2-method-node 'js2-printer 'js2-print-method)
 
-(defun js2-print-getter-setter (n i)
+(defun js2-print-method (n i)
   (let* ((pad (js2-make-pad i))
-         (left (js2-getter-setter-node-left n))
-         (right (js2-getter-setter-node-right n))
-         (computed (not (or (js2-string-node-p left)
-                            (js2-number-node-p left)
-                            (js2-name-node-p left)))))
+         (left (js2-method-node-left n))
+         (right (js2-method-node-right n))
+         (type (js2-node-get-prop right 'METHOD_TYPE)))
     (insert pad)
-    (if (/= (js2-node-type n) js2-FUNCTION)
-        (insert (if (= (js2-node-type n) js2-GET) "get " "set ")))
+    (when type
+      (insert (cdr (assoc type '((GET . "get ")
+                                 (SET . "set ")
+                                 (ASYNC . "async ")
+                                 (FUNCTION . ""))))))
     (when (and (js2-function-node-p right)
                (eq 'STAR (js2-function-node-generator-type right)))
       (insert "*"))
-    (when computed
-      (insert "["))
     (js2-print-ast left 0)
-    (when computed
-      (insert "]"))
     (js2-print-ast right 0)))
 
 (cl-defstruct (js2-prop-get-node
@@ -4251,7 +4304,7 @@ no explicit target, which is valid in certain expression 
contexts such as
 
   company..employee.(@id < 100)
 
-in this case, the @id is a `js2-xml-ref' that is part of an infix '<'
+in this case, the @id is a `js2-xml-ref' that is part of an infix `<'
 expression whose parent is a `js2-xml-dot-query-node'."
   namespace
   at-pos
@@ -4273,7 +4326,7 @@ expression whose parent is a `js2-xml-dot-query-node'."
   "AST node for an E4X XML [expr] property-ref expression.
 The JavaScript syntax is an optional @, an optional ns::, and a name.
 
-  [ '@' ] [ name '::' ] name
+  [ `@' ] [ name `::' ] name
 
 Examples include name, ns::name, ns::*, *::name, *::*, @attr, @ns::attr,
 @ns::*, @*::attr, @*::*, and @*.
@@ -4312,7 +4365,7 @@ expression."
   "AST node for an E4X XML [expr] member-ref expression.
 Syntax:
 
- [ '@' ] [ name '::' ] '[' expr ']'
+ [ `@' ] [ name `::' ] `[' expr `]'
 
 Examples include ns::[expr], @ns::[expr], @[expr], *::[expr] and @*::[expr].
 
@@ -4483,7 +4536,7 @@ For a simple name, the kids list has exactly one node, a 
`js2-name-node'."
                                                       (pos js2-ts-cursor)
                                                       len name value
                                                       eq-pos quote-type)))
-  "AST node representing a foo='bar' XML attribute value.  Not yet used."
+  "AST node representing a foo=\\='bar\\=' XML attribute value.  Not yet used."
   name   ; a `js2-xml-name-node'
   value  ; a `js2-xml-name-node'
   eq-pos ; buffer position of "=" sign
@@ -5106,6 +5159,8 @@ You should use `js2-print-tree' instead of this function."
           (or (js2-node-has-side-effects expr)
               (when (js2-string-node-p expr)
                 (member (js2-string-node-value expr) '("use strict" "use 
asm"))))))
+       ((= tt js2-AWAIT)
+        (js2-node-has-side-effects (js2-unary-node-operand node)))
        ((= tt js2-COMMA)
         (js2-node-has-side-effects (js2-infix-node-right node)))
        ((or (= tt js2-AND)
@@ -5419,7 +5474,7 @@ Returns logical OR of END_* flags"
 
 (defun js2-always-defined-boolean-p (node)
   "Check if NODE always evaluates to true or false in boolean context.
-Returns 'ALWAYS_TRUE, 'ALWAYS_FALSE, or nil if it's neither always true
+Returns `ALWAYS_TRUE', `ALWAYS_FALSE', or nil if it's neither always true
 nor always false."
   (let ((tt (js2-node-type node))
         num)
@@ -5474,7 +5529,7 @@ Signals an error if it's not a recognized token."
         (error "Invalid token: %s" code)))))
 
 (defsubst js2-tt-sym (tok)
-  "Return symbol for TOK given its code, e.g. 'js2-LP for code 86."
+  "Return symbol for TOK given its code, e.g. `js2-LP' for code 86."
   (intern (js2-tt-name tok)))
 
 (defconst js2-token-codes
@@ -5489,7 +5544,7 @@ Signals an error if it's not a recognized token."
   "Hashtable mapping token type symbols to their bytecodes.")
 
 (defsubst js2-tt-code (sym)
-  "Return code for token symbol SYM, e.g. 86 for 'js2-LP."
+  "Return code for token symbol SYM, e.g. 86 for `js2-LP'."
   (or (gethash sym js2-token-codes)
       (error "Invalid token symbol: %s " sym)))  ; signal code bug
 
@@ -5543,7 +5598,7 @@ Also updates `js2-ts-hit-eof' and `js2-ts-line-start' as 
needed."
 
 (defun js2-read-unicode-escape ()
   "Read a \\uNNNN sequence from the input.
-Assumes the ?\ and ?u have already been read.
+Assumes the ?\\ and ?u have already been read.
 Returns the unicode character, or nil if it wasn't a valid character.
 Doesn't change the values of any scanner variables."
   ;; I really wish I knew a better way to do this, but I can't
@@ -5735,7 +5790,7 @@ The values are default faces to use for highlighting the 
keywords.")
              do
              (puthash (symbol-name k) 'js2-RESERVED table))
     table)
-  "JavaScript reserved words by name, mapped to 'js2-RESERVED.")
+  "JavaScript reserved words by name, mapped to `js2-RESERVED'.")
 
 (defun js2-collect-string (buf)
   "Convert BUF, a list of chars, to a string.
@@ -5746,7 +5801,7 @@ Reverses BUF before converting."
 
 (defun js2-string-to-keyword (s)
   "Return token for S, a string, if S is a keyword or reserved word.
-Returns a symbol such as 'js2-BREAK, or nil if not keyword/reserved."
+Returns a symbol such as `js2-BREAK', or nil if not keyword/reserved."
   (or (gethash s js2-keyword-names)
       (gethash s js2-reserved-word-names)))
 
@@ -5855,7 +5910,7 @@ its relevant fields and puts it into `js2-ti-tokens'."
   (let (identifier-start
         is-unicode-escape-start c
         contains-escape escape-val str result base
-        look-for-slash continue tt
+        look-for-slash continue tt legacy-octal
         (token (js2-new-token 0)))
     (setq
      tt
@@ -5977,6 +6032,7 @@ its relevant fields and puts it into `js2-ti-tokens'."
               ((and (or (eq c ?o) (eq c ?O))
                     (>= js2-language-version 200))
                (setq base 8)
+               (setq legacy-octal nil)
                (setq c (js2-get-char)))
               ((js2-digit-p c)
                (setq base 'maybe-8))
@@ -6014,7 +6070,8 @@ its relevant fields and puts it into `js2-ti-tokens'."
                (js2-add-to-string c)
                (setq c (js2-get-char)))
              (when (eq base 'maybe-8)
-               (setq base 8))))
+               (setq base 8
+                     legacy-octal t))))
            (when (and (eq base 10) (memq c '(?. ?e ?E)))
              (when (eq c ?.)
                (cl-loop do
@@ -6036,7 +6093,8 @@ its relevant fields and puts it into `js2-ti-tokens'."
            (js2-unget-char)
            (let ((str (js2-set-string-from-buffer token)))
              (setf (js2-token-number token) (js2-string-to-number str base)
-                   (js2-token-number-base token) base))
+                   (js2-token-number-base token) base
+                   (js2-token-number-legacy-octal-p token) (and (= base 8) 
legacy-octal)))
            (throw 'return js2-NUMBER))
          ;; is it a string?
          (when (or (memq c '(?\" ?\'))
@@ -6753,6 +6811,8 @@ Shown at or above `js2-highlight-level' 3.")
                 (prop
                  (if (string-match js2-ecma-object-props prop-name)
                      'font-lock-constant-face))))))
+        (when (and (not face) target (not call-p) prop-name)
+          (setq face 'js2-object-property))
         (when face
           (let ((pos (+ (js2-node-pos parent)  ; absolute
                         (js2-node-pos prop)))) ; relative
@@ -6852,15 +6912,18 @@ of a simple name.  Called before EXPR has a parent 
node."
            '("alias"
              "augments"
              "borrows"
+             "callback"
              "bug"
              "base"
              "config"
              "default"
              "define"
              "exception"
+             "func"
              "function"
              "member"
              "memberOf"
+             "method"
              "name"
              "namespace"
              "since"
@@ -6891,6 +6954,7 @@ of a simple name.  Called before EXPR has a parent node."
              "export"
              "fileoverview"
              "final"
+             "func"
              "function"
              "hidden"
              "ignore"
@@ -6899,6 +6963,7 @@ of a simple name.  Called before EXPR has a parent node."
              "inner"
              "interface"
              "license"
+             "method"
              "noalias"
              "noshadow"
              "notypecheck"
@@ -7199,11 +7264,12 @@ are ignored."
                js2-additional-externs)))
 
 (defun js2-get-jslint-globals ()
+  (js2-reparse)
   (cl-loop for node in (js2-ast-root-comments js2-mode-ast)
            when (and (eq 'block (js2-comment-node-format node))
                      (save-excursion
                        (goto-char (js2-node-abs-pos node))
-                       (looking-at "/\\*global ")))
+                       (looking-at "/\\* *global ")))
            append (js2-get-jslint-globals-in
                    (match-end 0)
                    (js2-node-abs-end node))))
@@ -7361,7 +7427,7 @@ When passed arguments of wrong type, does nothing."
           (js2-record-object-literal node qname (js2-node-pos node)))))))))
 
 (defun js2-compute-nested-prop-get (node)
-  "If NODE is of form foo.bar, foo['bar'], or any nested combination, return
+  "If NODE is of form foo.bar, foo[\\='bar\\='], or any nested combination, 
return
 component nodes as a list.  Otherwise return nil.  Element-gets are treated
 as property-gets if the index expression is a string, or a positive integer."
   (let (left right head)
@@ -7395,22 +7461,23 @@ We do a depth-first traversal of NODE.  For any 
functions we find,
 we append the property name to QNAME, then call `js2-record-imenu-entry'."
   (let (right)
     (dolist (e (js2-object-node-elems node))  ; e is a `js2-object-prop-node'
-      (let ((left (js2-infix-node-left e))
-            ;; Element positions are relative to the parent position.
-            (pos (+ pos (js2-node-pos e))))
-        (cond
-         ;; foo: function() {...}
-         ((js2-function-node-p (setq right (js2-infix-node-right e)))
-          (when (js2-prop-node-name left)
-            ;; As a policy decision, we record the position of the property,
-            ;; not the position of the `function' keyword, since the property
-            ;; is effectively the name of the function.
-            (js2-record-imenu-entry right (append qname (list left)) pos)))
-         ;; foo: {object-literal} -- add foo to qname, offset position, and 
recurse
-         ((js2-object-node-p right)
-          (js2-record-object-literal right
-                                     (append qname (list (js2-infix-node-left 
e)))
-                                     (+ pos (js2-node-pos right)))))))))
+      (when (js2-infix-node-p e)
+        (let ((left (js2-infix-node-left e))
+              ;; Element positions are relative to the parent position.
+              (pos (+ pos (js2-node-pos e))))
+          (cond
+           ;; foo: function() {...}
+           ((js2-function-node-p (setq right (js2-infix-node-right e)))
+            (when (js2-prop-node-name left)
+              ;; As a policy decision, we record the position of the property,
+              ;; not the position of the `function' keyword, since the property
+              ;; is effectively the name of the function.
+              (js2-record-imenu-entry right (append qname (list left)) pos)))
+           ;; foo: {object-literal} -- add foo to qname, offset position, and 
recurse
+           ((js2-object-node-p right)
+            (js2-record-object-literal right
+                                       (append qname (list 
(js2-infix-node-left e)))
+                                       (+ pos (js2-node-pos right))))))))))
 
 (defun js2-node-top-level-decl-p (node)
   "Return t if NODE's name is defined in the top-level scope.
@@ -7452,7 +7519,7 @@ For instance, processing a nested scope requires a parent 
function node."
   (let (result fn parent-qname p elem)
     (dolist (entry js2-imenu-recorder)
       ;; function node goes first
-      (cl-destructuring-bind (current-fn &rest (&whole chain head &rest)) entry
+      (cl-destructuring-bind (current-fn &rest (&whole chain head &rest _)) 
entry
         ;; Examine head's defining scope:
         ;; Pre-processed chain, or top-level/external, keep as-is.
         (if (or (stringp head) (js2-node-top-level-decl-p head))
@@ -7572,19 +7639,19 @@ Recurses through nodes, and for each one whose second 
element is a list,
 appends the list's flattened elements to the current element.  Also
 changes the tails into conses.  For instance, this pre-flattened trie
 
-'(a ((b 20)
+ (a ((b 20)
      (c ((d 30)
          (e 40)))))
 
 becomes
 
-'(a (b . 20)
+ (a (b . 20)
     (c (d . 30)
        (e . 40)))
 
 Note that the root of the trie has no key, just a list of chains.
 This is also true for the value of any key with multiple children,
-e.g. key 'c' in the example above."
+e.g. key `c' in the example above."
   (cond
    ((listp (car trie))
     (mapcar #'js2-flatten-trie trie))
@@ -7676,14 +7743,67 @@ Returns nil and consumes nothing if MATCH is not the 
next token."
 (defun js2-match-contextual-kwd (name)
   "Consume and return t if next token is `js2-NAME', and its
 string is NAME.  Returns nil and keeps current token otherwise."
-  (if (or (/= (js2-get-token) js2-NAME)
-          (not (string= (js2-current-token-string) name)))
-      (progn
-        (js2-unget-token)
-        nil)
+  (if (js2-contextual-kwd-p (progn (js2-get-token)
+                                   (js2-current-token))
+                            name)
+      (progn (js2-record-face 'font-lock-keyword-face) t)
+    (js2-unget-token)
+    nil))
+
+(defun js2-contextual-kwd-p (token name)
+  "Return t if TOKEN is `js2-NAME', and its string is NAME."
+  (and (= (js2-token-type token) js2-NAME)
+       (string= (js2-token-string token) name)))
+
+(defun js2-match-async-function ()
+  (when (and (js2-contextual-kwd-p (js2-current-token) "async")
+             (= (js2-peek-token) js2-FUNCTION))
     (js2-record-face 'font-lock-keyword-face)
+    (js2-get-token)
     t))
 
+(defun js2-match-async-arrow-function ()
+  (and (js2-contextual-kwd-p (js2-current-token) "async")
+       (/= (js2-peek-token) js2-FUNCTION)))
+
+(defsubst js2-inside-function ()
+  (cl-plusp js2-nesting-of-function))
+
+(defsubst js2-inside-async-function ()
+  (and (js2-inside-function)
+       (js2-function-node-async js2-current-script-or-fn)))
+
+(defun js2-parse-await-maybe (tt)
+  "Parse \"await\" as an AwaitExpression, if it is one."
+  (and (= tt js2-NAME)
+       (js2-contextual-kwd-p (js2-current-token) "await")
+       ;; Per the proposal, AwaitExpression consists of "await"
+       ;; followed by a UnaryExpression.  So look ahead for one.
+       (let ((ts-state (make-js2-ts-state))
+             (recorded-identifiers js2-recorded-identifiers)
+             (parsed-errors js2-parsed-errors)
+             (current-token (js2-current-token))
+             (beg (js2-current-token-beg))
+             (end (js2-current-token-end))
+             pn)
+         (js2-get-token)
+         (setq pn (js2-make-unary js2-AWAIT 'js2-parse-unary-expr))
+         (if (= (js2-node-type (js2-unary-node-operand pn)) js2-ERROR)
+             ;; The parse failed, so pretend like nothing happened and restore
+             ;; the previous parsing state.
+             (progn
+               (js2-ts-seek ts-state)
+               (setq js2-recorded-identifiers recorded-identifiers
+                     js2-parsed-errors parsed-errors)
+               ;; And ensure the caller knows about the failure.
+               nil)
+           ;; The parse was successful, so process and return the "await".
+           (js2-record-face 'font-lock-keyword-face current-token)
+           (unless (js2-inside-async-function)
+             (js2-report-error "msg.bad.await" nil
+                               beg (- end beg)))
+           pn))))
+
 (defun js2-get-prop-name-token ()
   (js2-get-token (and (>= js2-language-version 170) 'KEYWORD_IS_NAME)))
 
@@ -7734,9 +7854,6 @@ Returns t on match, nil if no match."
       (js2-unget-token))
     nil))
 
-(defsubst js2-inside-function ()
-  (cl-plusp js2-nesting-of-function))
-
 (defun js2-set-requires-activation ()
   (if (js2-function-node-p js2-current-script-or-fn)
       (setf (js2-function-node-needs-activation js2-current-script-or-fn) t)))
@@ -7816,11 +7933,11 @@ The returned AST root node is given some additional 
properties:
              so the value is not necessarily reliable.
 
 An optional callback CB can be specified to report parsing
-progress.  If `(functionp CB)' returns t, it will be called with
+progress.  If (functionp CB) returns t, it will be called with
 the current line number once before parsing begins, then again
 each time the lexer reaches a new line number.
 
-CB can also be a list of the form `(symbol cb ...)' to specify
+CB can also be a list of the form (symbol cb ...) to specify
 multiple callbacks with different criteria.  Each symbol is a
 criterion keyword, and the following element is the callback to
 call
@@ -7876,7 +7993,7 @@ Scanner should be initialized."
           js2-nesting-of-function 0
           js2-labeled-stmt nil
           js2-recorded-identifiers nil  ; for js2-highlight
-          js2-in-use-strict-directive nil)
+          js2-in-use-strict-directive js2-mode-assume-strict)
     (while (/= (setq tt (js2-get-token)) js2-EOF)
       (if (= tt js2-FUNCTION)
           (progn
@@ -7987,16 +8104,34 @@ declared; probably to check them for errors."
         (list node)))
      ((js2-object-node-p node)
       (dolist (elem (js2-object-node-elems node))
-        (when (js2-object-prop-node-p elem)
-          (push (js2-define-destruct-symbols
-                 ;; In abbreviated destructuring {a, b}, right == left.
-                 (js2-object-prop-node-right elem)
-                 decl-type face ignore-not-in-block)
-                name-nodes)))
+        (let ((subexpr (cond
+                        ((and (js2-infix-node-p elem)
+                              (= js2-ASSIGN (js2-infix-node-type elem)))
+                         ;; Destructuring with default argument.
+                         (js2-infix-node-left elem))
+                        ((and (js2-infix-node-p elem)
+                              (= js2-COLON (js2-infix-node-type elem)))
+                         ;; In regular destructuring {a: aa, b: bb},
+                         ;; the var is on the right.  In abbreviated
+                         ;; destructuring {a, b}, right == left.
+                         (js2-infix-node-right elem))
+                        ((and (js2-unary-node-p elem)
+                              (= js2-TRIPLEDOT (js2-unary-node-type elem)))
+                         ;; Destructuring with spread.
+                         (js2-unary-node-operand elem)))))
+          (when subexpr
+            (push (js2-define-destruct-symbols
+                   subexpr decl-type face ignore-not-in-block)
+                  name-nodes))))
       (apply #'append (nreverse name-nodes)))
      ((js2-array-node-p node)
       (dolist (elem (js2-array-node-elems node))
         (when elem
+          (setq elem (cond ((js2-infix-node-p elem) ;; default (=)
+                            (js2-infix-node-left elem))
+                           ((js2-unary-node-p elem) ;; rest (...)
+                            (js2-unary-node-operand elem))
+                           (t elem)))
           (push (js2-define-destruct-symbols
                  elem decl-type face ignore-not-in-block)
                 name-nodes)))
@@ -8053,8 +8188,7 @@ represented by FN-NODE at POS."
                        new-param-name-nodes (js2-define-destruct-symbols
                                              param js2-LP 'js2-function-param))
                  (js2-check-strict-function-params param-name-nodes 
new-param-name-nodes)
-                 (setq param-name-nodes (append param-name-nodes 
new-param-name-nodes))
-                 (push param params))
+                 (setq param-name-nodes (append param-name-nodes 
new-param-name-nodes)))
                 ;; variable name
                 (t
                  (when (and (>= js2-language-version 200)
@@ -8068,22 +8202,23 @@ represented by FN-NODE at POS."
                  (setq param (js2-create-name-node))
                  (js2-define-symbol js2-LP (js2-current-token-string) param)
                  (js2-check-strict-function-params param-name-nodes (list 
param))
-                 (setq param-name-nodes (append param-name-nodes (list param)))
-                 ;; default parameter value
-                 (when (and (>= js2-language-version 200)
-                            (js2-match-token js2-ASSIGN))
-                   (cl-assert (not paren-free-arrow))
-                   (let* ((pos (js2-node-pos param))
-                          (tt (js2-current-token-type))
-                          (op-pos (- (js2-current-token-beg) pos))
-                          (left param)
-                          (right (js2-parse-assign-expr))
-                          (len (- (js2-node-end right) pos)))
-                     (setq param (make-js2-assign-node
-                                  :type tt :pos pos :len len :op-pos op-pos
-                                  :left left :right right))
-                     (js2-node-add-children param left right)))
-                 (push param params)))
+                 (setq param-name-nodes (append param-name-nodes (list 
param)))))
+               ;; default parameter value
+               (when (and (not rest-param-at)
+                          (>= js2-language-version 200)
+                          (js2-match-token js2-ASSIGN))
+                 (cl-assert (not paren-free-arrow))
+                 (let* ((pos (js2-node-pos param))
+                        (tt (js2-current-token-type))
+                        (op-pos (- (js2-current-token-beg) pos))
+                        (left param)
+                        (right (js2-parse-assign-expr))
+                        (len (- (js2-node-end right) pos)))
+                   (setq param (make-js2-assign-node
+                                :type tt :pos pos :len len :op-pos op-pos
+                                :left left :right right))
+                   (js2-node-add-children param left right)))
+               (push param params)
                (when (and rest-param-at (> (length params) (1+ rest-param-at)))
                  (js2-report-error "msg.param.after.rest" nil
                                    (js2-node-pos param) (js2-node-len param)))
@@ -8116,7 +8251,7 @@ Last token scanned is the close-curly for the function 
body."
                                   (js2-name-node-name name) pos end)
         (js2-add-strict-warning "msg.anon.no.return.value" nil pos end)))))
 
-(defun js2-parse-function-stmt ()
+(defun js2-parse-function-stmt (&optional async-p)
   (let ((pos (js2-current-token-beg))
         (star-p (js2-match-token js2-MUL)))
     (js2-must-match-name "msg.unnamed.function.stmt")
@@ -8124,28 +8259,31 @@ Last token scanned is the close-curly for the function 
body."
           pn member-expr)
       (cond
        ((js2-match-token js2-LP)
-        (js2-parse-function 'FUNCTION_STATEMENT pos star-p name))
+        (js2-parse-function 'FUNCTION_STATEMENT pos star-p async-p name))
        (js2-allow-member-expr-as-function-name
         (setq member-expr (js2-parse-member-expr-tail nil name))
         (js2-parse-highlight-member-expr-fn-name member-expr)
         (js2-must-match js2-LP "msg.no.paren.parms")
-        (setf pn (js2-parse-function 'FUNCTION_STATEMENT pos star-p)
+        (setf pn (js2-parse-function 'FUNCTION_STATEMENT pos star-p async-p)
               (js2-function-node-member-expr pn) member-expr)
         pn)
        (t
         (js2-report-error "msg.no.paren.parms")
         (make-js2-error-node))))))
 
-(defun js2-parse-function-expr ()
+(defun js2-parse-async-function-stmt ()
+  (js2-parse-function-stmt t))
+
+(defun js2-parse-function-expr (&optional async-p)
   (let ((pos (js2-current-token-beg))
         (star-p (js2-match-token js2-MUL))
         name)
     (when (js2-match-token js2-NAME)
       (setq name (js2-create-name-node t)))
     (js2-must-match js2-LP "msg.no.paren.parms")
-    (js2-parse-function 'FUNCTION_EXPRESSION pos star-p name)))
+    (js2-parse-function 'FUNCTION_EXPRESSION pos star-p async-p name)))
 
-(defun js2-parse-function-internal (function-type pos star-p &optional name)
+(defun js2-parse-function-internal (function-type pos star-p &optional async-p 
name)
   (let (fn-node lp)
     (if (= (js2-current-token-type) js2-LP) ; eventually matched LP?
         (setq lp (js2-current-token-beg)))
@@ -8153,7 +8291,8 @@ Last token scanned is the close-curly for the function 
body."
                                           :name name
                                           :form function-type
                                           :lp (if lp (- lp pos))
-                                          :generator-type (and star-p 'STAR)))
+                                          :generator-type (and star-p 'STAR)
+                                          :async async-p))
     (when name
       (js2-set-face (js2-node-pos name) (js2-node-end name)
                     'font-lock-function-name-face 'record)
@@ -8208,7 +8347,7 @@ Last token scanned is the close-curly for the function 
body."
     (setf (js2-scope-parent-scope fn-node) js2-current-scope)
     fn-node))
 
-(defun js2-parse-function (function-type pos star-p &optional name)
+(defun js2-parse-function (function-type pos star-p &optional async-p name)
   "Function parser.  FUNCTION-TYPE is a symbol, POS is the
 beginning of the first token (function keyword, unless it's an
 arrow function), NAME is js2-name-node."
@@ -8224,7 +8363,7 @@ arrow function), NAME is js2-name-node."
       (setq ts-state (make-js2-ts-state))
       (setq continue (catch 'reparse
                        (setq fn-node (js2-parse-function-internal
-                                      function-type pos star-p name))
+                                      function-type pos star-p async-p name))
                        ;; Don't continue.
                        nil))
       (when continue
@@ -8334,9 +8473,12 @@ node are given relative start positions and correct 
lengths."
 (defun js2-statement-helper ()
   (let* ((tt (js2-get-token))
          (first-tt tt)
+         (async-stmt (js2-match-async-function))
          (parser (if (= tt js2-ERROR)
                      #'js2-parse-semi
-                   (aref js2-parsers tt)))
+                   (if async-stmt
+                       #'js2-parse-async-function-stmt
+                     (aref js2-parsers tt))))
          pn)
     ;; If the statement is set, then it's been told its label by now.
     (and js2-labeled-stmt
@@ -8345,7 +8487,8 @@ node are given relative start positions and correct 
lengths."
     (setq pn (funcall parser))
     ;; Don't do auto semi insertion for certain statement types.
     (unless (or (memq first-tt js2-no-semi-insertion)
-                (js2-labeled-stmt-node-p pn))
+                (js2-labeled-stmt-node-p pn)
+                async-stmt)
       (js2-auto-insert-semicolon pn))
     pn))
 
@@ -8441,11 +8584,11 @@ Return value is a list (EXPR LP RP), with absolute 
paren positions."
   "Parse the bindings in an import statement.
 This can take many forms:
 
-ImportedDefaultBinding -> 'foo'
-NameSpaceImport -> '* as lib'
-NamedImports -> '{foo as bar, bang}'
-ImportedDefaultBinding , NameSpaceImport -> 'foo, * as lib'
-ImportedDefaultBinding , NamedImports -> 'foo, {bar, baz as bif}'
+ImportedDefaultBinding -> `foo'
+NameSpaceImport -> `* as lib'
+NamedImports -> `{foo as bar, bang}'
+ImportedDefaultBinding , NameSpaceImport -> `foo, * as lib'
+ImportedDefaultBinding , NamedImports -> `foo, {bar, baz as bif}'
 
 Try to match namespace imports and named imports first because nothing can
 come after them. If it is an imported default binding, then it could have named
@@ -8474,7 +8617,7 @@ imports or a namespace import that follows it.
               (js2-define-symbol
                js2-LET (js2-name-node-name name-node) name-node t))))))
      ((= (js2-peek-token) js2-NAME)
-      (let ((binding (js2-maybe-parse-export-binding)))
+      (let ((binding (js2-maybe-parse-export-binding t)))
         (let ((node-name (js2-export-binding-node-local-name binding)))
           (js2-define-symbol js2-LET (js2-name-node-name node-name) node-name 
t))
         (setf (js2-import-clause-node-default-binding clause) binding)
@@ -8504,53 +8647,51 @@ imports or a namespace import that follows it.
     clause))
 
 (defun js2-parse-namespace-import ()
-  "Parse a namespace import expression such as  '* as bar'.
+  "Parse a namespace import expression such as `* as bar'.
 The current token must be js2-MUL."
   (let ((beg (js2-current-token-beg)))
-    (when (js2-must-match js2-NAME "msg.syntax")
-        (if (equal "as" (js2-current-token-string))
-            (when (js2-must-match-prop-name "msg.syntax")
-              (let ((node (make-js2-namespace-import-node
-                           :pos beg
-                           :len (- (js2-current-token-end) beg)
-                           :name (make-js2-name-node
-                                  :pos (js2-current-token-beg)
-                                  :len (js2-current-token-end)
-                                  :name (js2-current-token-string)))))
-                (js2-node-add-children node (js2-namespace-import-node-name 
node))
-                node))
-          (js2-unget-token)
-          (js2-report-error "msg.syntax")))))
+    (if (js2-match-contextual-kwd "as")
+        (when (js2-must-match-prop-name "msg.syntax")
+          (let ((node (make-js2-namespace-import-node
+                       :pos beg
+                       :len (- (js2-current-token-end) beg)
+                       :name (make-js2-name-node
+                              :pos (js2-current-token-beg)
+                              :len (js2-current-token-end)
+                              :name (js2-current-token-string)))))
+            (js2-node-add-children node (js2-namespace-import-node-name node))
+            node))
+      (js2-unget-token)
+      (js2-report-error "msg.syntax"))))
 
 
 (defun js2-parse-from-clause ()
-  "Parse the from clause in an import or export statement. E.g. from 'src/lib'"
-  (when (js2-must-match-name "msg.mod.from.after.import.spec.set")
-    (let ((beg (js2-current-token-beg)))
-      (if (equal "from" (js2-current-token-string))
-          (cond
-           ((js2-match-token js2-STRING)
-            (make-js2-from-clause-node
-             :pos beg
-             :len (- (js2-current-token-end) beg)
-             :module-id (js2-current-token-string)
-             :metadata-p nil))
-           ((js2-match-token js2-THIS)
-            (when (js2-must-match-name "msg.mod.spec.after.from")
-              (if (equal "module" (js2-current-token-string))
-                  (make-js2-from-clause-node
-                   :pos beg
-                   :len (- (js2-current-token-end) beg)
-                   :module-id "this"
-                   :metadata-p t)
-                (js2-unget-token)
-                (js2-unget-token)
-                (js2-report-error "msg.mod.spec.after.from")
-                nil)))
-           (t (js2-report-error "msg.mod.spec.after.from") nil))
-        (js2-unget-token)
-        (js2-report-error "msg.mod.from.after.import.spec.set")
-        nil))))
+  "Parse the from clause in an import or export statement.
+E.g., \"from \\='src/lib\\='\"."
+  (if (js2-match-contextual-kwd "from")
+      (let ((beg (js2-current-token-beg)))
+        (cond
+         ((js2-match-token js2-STRING)
+          (make-js2-from-clause-node
+           :pos beg
+           :len (- (js2-current-token-end) beg)
+           :module-id (js2-current-token-string)
+           :metadata-p nil))
+         ((js2-match-token js2-THIS)
+          (when (js2-must-match-name "msg.mod.spec.after.from")
+            (if (equal "module" (js2-current-token-string))
+                (make-js2-from-clause-node
+                 :pos beg
+                 :len (- (js2-current-token-end) beg)
+                 :module-id "this"
+                 :metadata-p t)
+              (js2-unget-token)
+              (js2-unget-token)
+              (js2-report-error "msg.mod.spec.after.from")
+              nil)))
+         (t (js2-report-error "msg.mod.spec.after.from") nil)))
+    (js2-report-error "msg.mod.from.after.import.spec.set")
+    nil))
 
 (defun js2-parse-export-bindings (&optional import-p)
   "Parse a list of export binding expressions such as {}, {foo, bar}, and
@@ -8558,7 +8699,7 @@ The current token must be js2-MUL."
 js2-LC. Return a lisp list of js2-export-binding-node"
   (let ((bindings (list)))
     (while
-        (let ((binding (js2-maybe-parse-export-binding)))
+        (let ((binding (js2-maybe-parse-export-binding import-p)))
           (when binding
             (push binding bindings))
           (js2-match-token js2-COMMA)))
@@ -8567,10 +8708,10 @@ js2-LC. Return a lisp list of js2-export-binding-node"
                                    "msg.mod.rc.after.export.spec.list"))
       (reverse bindings))))
 
-(defun js2-maybe-parse-export-binding ()
+(defun js2-maybe-parse-export-binding (&optional import-p)
   "Attempt to parse a binding expression found inside an import/export 
statement.
-This can take the form of either as single js2-NAME token as in 'foo' or as in 
a
-rebinding expression 'bar as foo'. If it matches, it will return an instance of
+This can take the form of either as single js2-NAME token as in `foo' or as in 
a
+rebinding expression `bar as foo'. If it matches, it will return an instance of
 js2-export-binding-node and consume all the tokens. If it does not match, it
 consumes no tokens."
   (let ((extern-name (when (js2-match-prop-name) (js2-current-token-string)))
@@ -8579,45 +8720,49 @@ consumes no tokens."
         (is-reserved-name (or (= (js2-current-token-type) js2-RESERVED)
                               (aref js2-kwd-tokens (js2-current-token-type)))))
     (if extern-name
-        (let ((as (and (js2-match-token js2-NAME) (js2-current-token-string))))
-          (if (and as (equal "as" (js2-current-token-string)))
-              (let ((name
-                     (or
-                      (and (js2-match-token js2-DEFAULT) "default")
-                      (and (js2-match-token js2-NAME) 
(js2-current-token-string)))))
-                (if name
-                    (let ((node (make-js2-export-binding-node
-                                 :pos beg
-                                 :len (- (js2-current-token-end) beg)
-                                 :local-name (make-js2-name-node
-                                              :name name
-                                              :pos (js2-current-token-beg)
-                                              :len (js2-current-token-len))
-                                 :extern-name (make-js2-name-node
-                                               :name extern-name
-                                               :pos beg
-                                               :len extern-name-len))))
-                      (js2-node-add-children
-                       node
-                       (js2-export-binding-node-local-name node)
-                       (js2-export-binding-node-extern-name node))
-                      node)
-                  (js2-unget-token)
-                  nil))
-            (when as (js2-unget-token))
-            (let* ((name-node (make-js2-name-node
-                              :name (js2-current-token-string)
-                              :pos (js2-current-token-beg)
-                              :len (js2-current-token-len)))
-                  (node (make-js2-export-binding-node
-                         :pos (js2-current-token-beg)
-                         :len (js2-current-token-len)
-                         :local-name name-node
-                         :extern-name name-node)))
-              (when is-reserved-name
-                (js2-report-error "msg.mod.as.after.reserved.word" 
extern-name))
-              (js2-node-add-children node name-node)
-              node)))
+        (if (js2-match-contextual-kwd "as")
+            (let ((name
+                   (or
+                    (and (js2-match-token js2-DEFAULT) "default")
+                    (and (js2-match-token js2-NAME) 
(js2-current-token-string)))))
+              (if name
+                  (let ((node (make-js2-export-binding-node
+                               :pos beg
+                               :len (- (js2-current-token-end) beg)
+                               :local-name (make-js2-name-node
+                                            :name name
+                                            :pos (js2-current-token-beg)
+                                            :len (js2-current-token-len))
+                               :extern-name (make-js2-name-node
+                                             :name extern-name
+                                             :pos beg
+                                             :len extern-name-len))))
+                    (js2-node-add-children
+                     node
+                     (js2-export-binding-node-local-name node)
+                     (js2-export-binding-node-extern-name node))
+                    (if import-p
+                        (js2-set-face (js2-current-token-beg) 
(js2-current-token-end)
+                                      'font-lock-variable-name-face 'record))
+                    node)
+                (js2-unget-token)
+                nil))
+          (let* ((name-node (make-js2-name-node
+                             :name (js2-current-token-string)
+                             :pos (js2-current-token-beg)
+                             :len (js2-current-token-len)))
+                 (node (make-js2-export-binding-node
+                        :pos (js2-current-token-beg)
+                        :len (js2-current-token-len)
+                        :local-name name-node
+                        :extern-name name-node)))
+            (when is-reserved-name
+              (js2-report-error "msg.mod.as.after.reserved.word" extern-name))
+            (js2-node-add-children node name-node)
+            (if import-p
+                (js2-set-face (js2-current-token-beg) (js2-current-token-end)
+                              'font-lock-variable-name-face 'record))
+            node))
       nil)))
 
 (defun js2-parse-switch ()
@@ -8725,7 +8870,7 @@ consumes no tokens."
 
 (defun js2-parse-export ()
   "Parse an export statement.
-The Last matched token must be js2-EXPORT. Currently, the 'default' and 'expr'
+The Last matched token must be js2-EXPORT. Currently, the `default' and `expr'
 expressions should only be either hoistable expressions (function or generator)
 or assignment expressions, but there is no checking to enforce that and so it
 will parse without error a small subset of
@@ -8745,27 +8890,45 @@ invalid export statements."
       (when exports-list
         (dolist (export exports-list)
           (push export children)))
-      (when (js2-match-token js2-NAME)
-        (if (equal "from" (js2-current-token-string))
-            (progn
-              (js2-unget-token)
-              (setq from-clause (js2-parse-from-clause)))
-          (js2-unget-token))))
+      (when (js2-match-contextual-kwd "from")
+        (js2-unget-token)
+        (setq from-clause (js2-parse-from-clause))))
      ((js2-match-token js2-DEFAULT)
-      (setq default (js2-parse-expr)))
+      (setq default (cond ((js2-match-token js2-CLASS)
+                           (js2-parse-class-stmt))
+                          ((js2-match-token js2-NAME)
+                           (if (js2-match-async-function)
+                               (js2-parse-async-function-stmt)
+                             (js2-unget-token)
+                             (js2-parse-expr)))
+                          ((js2-match-token js2-FUNCTION)
+                           (js2-parse-function-stmt))
+                          (t (js2-parse-expr)))))
      ((or (js2-match-token js2-VAR) (js2-match-token js2-CONST) 
(js2-match-token js2-LET))
       (setq declaration (js2-parse-variables (js2-current-token-type) 
(js2-current-token-beg))))
+     ((js2-match-token js2-CLASS)
+      (setq declaration (js2-parse-class-stmt)))
+     ((js2-match-token js2-NAME)
+      (setq declaration
+            (if (js2-match-async-function)
+                (js2-parse-async-function-stmt)
+              (js2-unget-token)
+              (js2-parse-expr))))
+     ((js2-match-token js2-FUNCTION)
+      (setq declaration (js2-parse-function-stmt)))
      (t
       (setq declaration (js2-parse-expr))))
     (when from-clause
       (push from-clause children))
     (when declaration
       (push declaration children)
-      (when (not (js2-function-node-p declaration))
+      (when (not (or (js2-function-node-p declaration)
+                     (js2-class-node-p declaration)))
         (js2-auto-insert-semicolon declaration)))
     (when default
       (push default children)
-      (when (not (js2-function-node-p default))
+      (when (not (or (js2-function-node-p default)
+                     (js2-class-node-p default)))
         (js2-auto-insert-semicolon default)))
     (let ((node (make-js2-export-node
                   :pos beg
@@ -8810,7 +8973,7 @@ Last matched token must be js2-FOR."
              ((= tt js2-SEMI)
               (js2-unget-token)
               (setq init (make-js2-empty-expr-node)))
-             ((or (= tt js2-VAR) (= tt js2-LET))
+             ((or (= tt js2-VAR) (= tt js2-LET) (= tt js2-CONST))
               (setq init (js2-parse-variables tt (js2-current-token-beg))))
              (t
               (js2-unget-token)
@@ -9331,10 +9494,10 @@ expression and return it wrapped in a 
`js2-expr-stmt-node'."
 
 (defun js2-parse-variables (decl-type pos)
   "Parse a comma-separated list of variable declarations.
-Could be a 'var', 'const' or 'let' expression, possibly in a for-loop 
initializer.
+Could be a `var', `const' or `let' expression, possibly in a for-loop 
initializer.
 
 DECL-TYPE is a token value: either VAR, CONST, or LET depending on context.
-For 'var' or 'const', the keyword should be the token last scanned.
+For `var' or `const', the keyword should be the token last scanned.
 
 POS is the position where the node should start. It's sometimes the
 var/const/let keyword, and other times the beginning of the first token
@@ -9448,16 +9611,10 @@ If NODE is non-nil, it is the AST node associated with 
the symbol."
          (pos (if node (js2-node-abs-pos node)))
          (len (if node (js2-node-len node))))
     (cond
-     ((and symbol ; already defined
-           (or (if js2-in-use-strict-directive
-                   ;; two const-bound vars in this block have same name
-                   (and (= sdt js2-CONST)
-                        (eq defining-scope js2-current-scope))
-                 (or (= sdt js2-CONST)          ; old version is const
-                     (= decl-type js2-CONST)))  ; new version is const
-               ;; two let-bound vars in this block have same name
-               (and (= sdt js2-LET)
-                    (eq defining-scope js2-current-scope))))
+     ((and symbol ; already defined in this block
+           (or (= sdt js2-LET)
+               (= sdt js2-CONST))
+           (eq defining-scope js2-current-scope))
       (js2-report-error
        (cond
         ((= sdt js2-CONST) "msg.const.redecl")
@@ -9467,9 +9624,7 @@ If NODE is non-nil, it is the AST node associated with 
the symbol."
         (t "msg.parm.redecl"))
        name pos len))
      ((or (= decl-type js2-LET)
-          ;; strict mode const is scoped to the current LexicalEnvironment
-          (and js2-in-use-strict-directive
-               (= decl-type js2-CONST)))
+          (= decl-type js2-CONST))
       (if (and (= decl-type js2-LET)
                (not ignore-not-in-block)
                (or (= (js2-node-type js2-current-scope) js2-IF)
@@ -9477,10 +9632,7 @@ If NODE is non-nil, it is the AST node associated with 
the symbol."
           (js2-report-error "msg.let.decl.not.in.block")
         (js2-define-new-symbol decl-type name node)))
      ((or (= decl-type js2-VAR)
-          (= decl-type js2-FUNCTION)
-          ;; sloppy mode const is scoped to the current VariableEnvironment
-          (and (not js2-in-use-strict-directive)
-               (= decl-type js2-CONST)))
+          (= decl-type js2-FUNCTION))
       (if symbol
           (if (and js2-strict-var-redeclaration-warning (= sdt js2-VAR))
               (js2-add-strict-warning "msg.var.redecl" name)
@@ -9548,9 +9700,20 @@ If NODE is non-nil, it is the AST node associated with 
the symbol."
   (let ((tt (js2-get-token))
         (pos (js2-current-token-beg))
         pn left right op-pos
-        ts-state recorded-identifiers parsed-errors)
+        ts-state recorded-identifiers parsed-errors
+        async-p)
     (if (= tt js2-YIELD)
         (js2-parse-return-or-yield tt t)
+      ;; TODO(mooz): Bit confusing.
+      ;; If we meet `async` token and it's not part of `async
+      ;; function`, then this `async` is for a succeeding async arrow
+      ;; function.
+      ;; Since arrow function parsing doesn't rely on neither
+      ;; `js2-parse-function-stmt' nor `js2-parse-function-expr' that
+      ;; interpret `async` token, we trash `async` and just remember
+      ;; we met `async` keyword to `async-p'.
+      (when (js2-match-async-arrow-function)
+        (setq async-p t))
       ;; Save the tokenizer state in case we find an arrow function
       ;; and have to rewind.
       (setq ts-state (make-js2-ts-state)
@@ -9584,9 +9747,12 @@ If NODE is non-nil, it is the AST node associated with 
the symbol."
        ((and (= tt js2-ARROW)
              (>= js2-language-version 200))
         (js2-ts-seek ts-state)
+        (when async-p
+          (js2-record-face 'font-lock-keyword-face)
+          (js2-get-token))
         (setq js2-recorded-identifiers recorded-identifiers
               js2-parsed-errors parsed-errors)
-        (setq pn (js2-parse-function 'FUNCTION_ARROW (js2-current-token-beg) 
nil)))
+        (setq pn (js2-parse-function 'FUNCTION_ARROW (js2-current-token-beg) 
nil async-p)))
        (t
         (js2-unget-token)))
       pn)))
@@ -9616,7 +9782,7 @@ If NODE is non-nil, it is the AST node associated with 
the symbol."
       (js2-node-add-children pn test-expr if-true if-false))
     pn))
 
-(defun js2-make-binary (type left parser)
+(defun js2-make-binary (type left parser &optional no-get)
   "Helper for constructing a binary-operator AST node.
 LEFT is the left-side-expression, already parsed, and the
 binary operator should have just been matched.
@@ -9627,7 +9793,7 @@ FIXME: The latter option is unused?"
          (op-pos (- (js2-current-token-beg) pos))
          (right (if (js2-node-p parser)
                     parser
-                  (js2-get-token)
+                  (unless no-get (js2-get-token))
                   (funcall parser)))
          (pn (make-js2-infix-node :type type
                                   :pos pos
@@ -9816,6 +9982,7 @@ to parse the operand (for prefix operators)."
      ((= tt js2-DELPROP)
       (js2-get-token)
       (js2-make-unary js2-DELPROP 'js2-parse-unary-expr))
+     ((js2-parse-await-maybe tt))
      ((= tt js2-ERROR)
       (js2-get-token)
       (make-js2-error-node))  ; try to continue
@@ -9968,9 +10135,9 @@ Returns an expression tree that includes PN, the parent 
node."
         (setq pn (js2-parse-tagged-template pn (make-js2-string-node :type 
tt))))
        (t
         (js2-unget-token)
-        (setq continue nil))))
-    (if (>= js2-highlight-level 2)
-        (js2-parse-highlight-member-expr-node pn))
+        (setq continue nil)))
+      (if (>= js2-highlight-level 2)
+          (js2-parse-highlight-member-expr-node pn)))
     pn))
 
 (defun js2-parse-tagged-template (tag-node tpl-node)
@@ -10106,7 +10273,7 @@ This includes expressions of the forms:
   @*         @*::attr      @*::*
   @[expr]    @*::[expr]    @ns::[expr]
 
-Called if we peeked an '@' token."
+Called if we peeked an `@' token."
   (let ((tt (js2-get-prop-name-token))
         (at-pos (js2-current-token-beg)))
     (cond
@@ -10127,11 +10294,11 @@ Called if we peeked an '@' token."
 (defun js2-parse-property-name (at-pos s member-type-flags)
   "Check if :: follows name in which case it becomes qualified name.
 
-AT-POS is a natural number if we just read an '@' token, else nil.
-S is the name or string that was matched:  an identifier, 'throw' or '*'.
-MEMBER-TYPE-FLAGS is a bit set tracking whether we're a '.' or '..' child.
+AT-POS is a natural number if we just read an `@' token, else nil.
+S is the name or string that was matched:  an identifier, `throw' or `*'.
+MEMBER-TYPE-FLAGS is a bit set tracking whether we're a `.' or `..' child.
 
-Returns a `js2-xml-ref-node' if it's an attribute access, a child of a '..'
+Returns a `js2-xml-ref-node' if it's an attribute access, a child of a `..'
 operator, or the name is followed by ::.  For a plain name, returns a
 `js2-name-node'.  Returns a `js2-error-node' for malformed XML expressions."
   (let ((pos (or at-pos (js2-current-token-beg)))
@@ -10205,6 +10372,8 @@ array-literals, array comprehensions and regular 
expressions."
       (js2-parse-class-expr))
      ((= tt js2-FUNCTION)
       (js2-parse-function-expr))
+     ((js2-match-async-function)
+      (js2-parse-function-expr t))
      ((= tt js2-LB)
       (js2-parse-array-comp-or-literal))
      ((= tt js2-LC)
@@ -10221,7 +10390,8 @@ array-literals, array comprehensions and regular 
expressions."
      ((= tt js2-NUMBER)
       (setq node (make-js2-number-node))
       (when (and js2-in-use-strict-directive
-                 (= (js2-number-node-num-base node) 8))
+                 (= (js2-number-node-num-base node) 8)
+                 (js2-number-node-legacy-octal-p node))
         (js2-report-error "msg.no.octal.strict"))
       node)
      ((or (= tt js2-STRING) (= tt js2-NO_SUBS_TEMPLATE))
@@ -10320,19 +10490,13 @@ array-literals, array comprehensions and regular 
expressions."
 
 (defun js2-parse-array-literal (pos)
   (let ((after-lb-or-comma t)
-        after-comma tt elems pn
+        after-comma tt elems pn was-rest
         (continue t))
     (unless js2-is-in-destructuring
       (js2-push-scope (make-js2-scope))) ; for the legacy array comp
     (while continue
       (setq tt (js2-get-token))
       (cond
-       ;; comma
-       ((= tt js2-COMMA)
-        (setq after-comma (js2-current-token-end))
-        (if (not after-lb-or-comma)
-            (setq after-lb-or-comma t)
-          (push nil elems)))
        ;; end of array
        ((or (= tt js2-RB)
             (= tt js2-EOF))  ; prevent infinite loop
@@ -10346,21 +10510,18 @@ array-literals, array comprehensions and regular 
expressions."
                                       :len (- js2-ts-cursor pos)
                                       :elems (nreverse elems)))
         (apply #'js2-node-add-children pn (js2-array-node-elems pn)))
-       ;; destructuring binding
-       (js2-is-in-destructuring
-        (push (if (or (= tt js2-LC)
-                      (= tt js2-LB)
-                      (= tt js2-NAME))
-                  ;; [a, b, c] | {a, b, c} | {a:x, b:y, c:z} | a
-                  (js2-parse-destruct-primary-expr)
-                ;; invalid pattern
-                (js2-report-error "msg.bad.var")
-                (make-js2-error-node))
-              elems)
-        (setq after-lb-or-comma nil
-              after-comma nil))
+       ;; anything after rest element (...foo)
+       (was-rest
+        (js2-report-error "msg.param.after.rest"))
+       ;; comma
+       ((= tt js2-COMMA)
+        (setq after-comma (js2-current-token-end))
+        (if (not after-lb-or-comma)
+            (setq after-lb-or-comma t)
+          (push nil elems)))
        ;; array comp
        ((and (>= js2-language-version 170)
+             (not js2-is-in-destructuring)
              (= tt js2-FOR)          ; check for array comprehension
              (not after-lb-or-comma) ; "for" can't follow a comma
              elems                   ; must have at least 1 element
@@ -10374,9 +10535,12 @@ array-literals, array comprehensions and regular 
expressions."
           (js2-report-error "msg.no.bracket.arg"))
         (if (and (= tt js2-TRIPLEDOT)
                  (>= js2-language-version 200))
-            ;; spread operator
-            (push (js2-make-unary tt 'js2-parse-assign-expr)
-                  elems)
+            ;; rest/spread operator
+            (progn
+              (push (js2-make-unary tt 'js2-parse-assign-expr)
+                    elems)
+              (if js2-is-in-destructuring
+                  (setq was-rest t)))
           (js2-unget-token)
           (push (js2-parse-assign-expr) elems))
         (setq after-lb-or-comma nil
@@ -10389,7 +10553,7 @@ array-literals, array comprehensions and regular 
expressions."
   "Parse a legacy array comprehension (JavaScript 1.7).
 EXPR is the first expression after the opening left-bracket.
 POS is the beginning of the LB token preceding EXPR.
-We should have just parsed the 'for' keyword before calling this function."
+We should have just parsed the `for' keyword before calling this function."
   (let ((current-scope js2-current-scope)
         loops first filter result)
     (unwind-protect
@@ -10426,7 +10590,7 @@ We should have just parsed the 'for' keyword before 
calling this function."
 (defun js2-parse-array-comp (pos)
   "Parse an ES6 array comprehension.
 POS is the beginning of the LB token.
-We should have just parsed the 'for' keyword before calling this function."
+We should have just parsed the `for' keyword before calling this function."
   (let ((pn (js2-parse-comprehension pos 'ARRAY)))
     (js2-must-match js2-RB "msg.no.bracket.arg" pos)
     pn))
@@ -10467,9 +10631,9 @@ We should have just parsed the 'for' keyword before 
calling this function."
     result))
 
 (defun js2-parse-comp-loop (pn &optional only-of-p)
-  "Parse a 'for [each] (foo [in|of] bar)' expression in an Array comprehension.
+  "Parse a `for [each] (foo [in|of] bar)' expression in an Array comprehension.
 The current token should be the initial FOR.
-If ONLY-OF-P is non-nil, only the 'for (foo of bar)' form is allowed."
+If ONLY-OF-P is non-nil, only the `for (foo of bar)' form is allowed."
   (let ((pos (js2-comp-loop-node-pos pn))
         tt iter obj foreach-p forof-p in-pos each-pos lp rp)
     (when (and (not only-of-p) (js2-match-token js2-NAME))
@@ -10526,6 +10690,7 @@ If ONLY-OF-P is non-nil, only the 'for (foo of bar)' 
form is allowed."
     (js2-set-face (js2-node-pos name) (js2-node-end name)
                   'font-lock-function-name-face 'record)
     (let ((node (js2-parse-class pos 'CLASS_STATEMENT name)))
+      (js2-record-imenu-functions node name)
       (js2-define-symbol js2-FUNCTION
                          (js2-name-node-name name)
                          node)
@@ -10570,17 +10735,22 @@ If ONLY-OF-P is non-nil, only the 'for (foo of bar)' 
form is allowed."
 
 (defun js2-property-key-string (property-node)
   "Return the key of PROPERTY-NODE (a `js2-object-prop-node' or
-`js2-getter-setter-node') as a string, or nil if it can't be
+`js2-method-node') as a string, or nil if it can't be
 represented as a string (e.g., the key is computed by an
 expression)."
-  (let ((key (js2-infix-node-left property-node)))
-    (cond
-     ((js2-name-node-p key)
-      (js2-name-node-name key))
-     ((js2-string-node-p key)
-      (js2-string-node-value key))
-     ((js2-number-node-p key)
-      (js2-number-node-value key)))))
+  (cond
+   ((js2-unary-node-p property-node) nil) ;; {...foo}
+   (t
+    (let ((key (js2-infix-node-left property-node)))
+      (when (js2-computed-prop-name-node-p key)
+        (setq key (js2-computed-prop-name-node-expr key)))
+      (cond
+       ((js2-name-node-p key)
+        (js2-name-node-name key))
+       ((js2-string-node-p key)
+        (js2-string-node-value key))
+       ((js2-number-node-p key)
+        (js2-number-node-value key)))))))
 
 (defun js2-parse-object-literal-elems (&optional class-p)
   (let ((pos (js2-current-token-beg))
@@ -10605,21 +10775,26 @@ expression)."
                  (= js2-MUL tt))
         (setq previous-token (js2-current-token)
               tt (js2-get-prop-name-token)))
-      ;; Handle 'get' or 'set' keywords
+      ;; Handle getter, setter and async methods
       (let ((prop (js2-current-token-string)))
         (when (and (>= js2-language-version 200)
                    (= js2-NAME tt)
-                   (or (string= prop "get")
-                       (string= prop "set"))
+                   (member prop '("get" "set" "async"))
                    (member (js2-peek-token)
                            (list js2-NAME js2-STRING js2-NUMBER js2-LB)))
           (setq previous-token (js2-current-token)
                 tt (js2-get-prop-name-token))))
       (cond
-       ;; Found a property (of any sort)
+       ;; Rest/spread (...expr)
+       ((and (>= js2-language-version 200)
+             (not class-p) (not static) (not previous-token)
+             (= js2-TRIPLEDOT tt))
+        (setq after-comma nil
+              elem (js2-make-unary js2-TRIPLEDOT 'js2-parse-assign-expr)))
+       ;; Found a key/value property (of any sort)
        ((member tt (list js2-NAME js2-STRING js2-NUMBER js2-LB))
         (setq after-comma nil
-              elem (js2-parse-named-prop tt pos previous-token))
+              elem (js2-parse-named-prop tt previous-token))
         (if (and (null elem)
                  (not js2-recover-from-parse-errors))
             (setq continue nil)))
@@ -10631,6 +10806,10 @@ expression)."
         (if after-comma
             (js2-parse-warn-trailing-comma "msg.extra.trailing.comma"
                                            pos elems after-comma)))
+       ;; Skip semicolons in a class body
+       ((and class-p
+             (= tt js2-SEMI))
+        nil)
        (t
         (js2-report-error "msg.bad.prop")
         (unless js2-recover-from-parse-errors
@@ -10654,7 +10833,16 @@ expression)."
                     (lambda (previous-elem)
                       (and (setq previous-elem-key-string
                                  (js2-property-key-string previous-elem))
-                           (string= previous-elem-key-string elem-key-string)))
+                           ;; Check if the property is a duplicate.
+                           (string= previous-elem-key-string elem-key-string)
+                           ;; But make an exception for getter / setter pairs.
+                           (not (and (js2-method-node-p elem)
+                                     (js2-method-node-p previous-elem)
+                                     (let ((type (js2-node-get-prop 
(js2-method-node-right elem) 'METHOD_TYPE))
+                                           (previous-type (js2-node-get-prop 
(js2-method-node-right previous-elem) 'METHOD_TYPE)))
+                                       (and (member type '(GET SET))
+                                            (member previous-type '(GET SET))
+                                            (not (eq type previous-type))))))))
                     elems))
           (js2-report-error "msg.dup.obj.lit.prop.strict"
                             elem-key-string
@@ -10665,44 +10853,34 @@ expression)."
     (js2-must-match js2-RC "msg.no.brace.prop")
     (nreverse elems)))
 
-(defun js2-parse-named-prop (tt pos previous-token)
+(defun js2-parse-named-prop (tt previous-token)
   "Parse a name, string, or getter/setter object property.
 When `js2-is-in-destructuring' is t, forms like {a, b, c} will be permitted."
-  (let ((key (cond
-              ;; Literal string keys: {'foo': 'bar'}
-              ((= tt js2-STRING)
-               (make-js2-string-node))
-              ;; Handle computed keys: {[Symbol.iterator]: ...}, *[1+2]() 
{...}},
-              ;; {[foo + bar]() { ... }}, {[get ['x' + 1]() {...}}
-              ((and (= tt js2-LB)
-                    (>= js2-language-version 200))
-               (prog1 (js2-parse-expr)
-                 (js2-must-match js2-RB "msg.missing.computed.rb")))
-              ;; Numeric keys: {12: 'foo'}, {10.7: 'bar'}
-              ((= tt js2-NUMBER)
-               (make-js2-number-node))
-              ;; Unquoted names: {foo: 12}
-              ((= tt js2-NAME)
-               (js2-create-name-node))
-              ;; Anything else is an error
-              (t (js2-report-error "msg.bad.prop"))))
+  (let ((key (js2-parse-prop-name tt))
         (prop (and previous-token (js2-token-string previous-token)))
         (property-type (when previous-token
                              (if (= (js2-token-type previous-token) js2-MUL)
                                  "*"
-                               (js2-token-string previous-token)))))
-    (when (or (string= prop "get")
-              (string= prop "set"))
+                               (js2-token-string previous-token))))
+        pos)
+    (when (member prop '("get" "set" "async"))
+      (setq pos (js2-token-beg previous-token))
       (js2-set-face (js2-token-beg previous-token)
                     (js2-token-end previous-token)
-                    'font-lock-keyword-face 'record))  ; get/set
+                    'font-lock-keyword-face 'record))  ; get/set/async
     (cond
      ;; method definition: {f() {...}}
      ((and (= (js2-peek-token) js2-LP)
            (>= js2-language-version 200))
       (when (js2-name-node-p key)  ; highlight function name properties
         (js2-record-face 'font-lock-function-name-face))
-      (js2-parse-getter-setter-prop pos key property-type))
+      (js2-parse-method-prop pos key property-type))
+     ;; binding element with initializer
+     ((and (= (js2-peek-token) js2-ASSIGN)
+           (>= js2-language-version 200))
+      (if (not js2-is-in-destructuring)
+          (js2-report-error "msg.init.no.destruct"))
+      (js2-parse-initialized-binding key))
      ;; regular prop
      (t
       (let ((beg (js2-current-token-beg))
@@ -10717,10 +10895,38 @@ When `js2-is-in-destructuring' is t, forms like {a, 
b, c} will be permitted."
                       (if (js2-function-node-p
                            (js2-object-prop-node-right expr))
                           'font-lock-function-name-face
-                        'font-lock-variable-name-face)
+                        'js2-object-property)
                       'record)
         expr)))))
 
+(defun js2-parse-initialized-binding (name)
+  "Parse a `SingleNameBinding' with initializer.
+
+`name' is the `BindingIdentifier'."
+  (when (js2-match-token js2-ASSIGN)
+    (js2-make-binary js2-ASSIGN name 'js2-parse-assign-expr t)))
+
+(defun js2-parse-prop-name (tt)
+  (cond
+   ;; Literal string keys: {'foo': 'bar'}
+   ((= tt js2-STRING)
+    (make-js2-string-node))
+   ;; Handle computed keys: {[Symbol.iterator]: ...}, *[1+2]() {...}},
+   ;; {[foo + bar]() { ... }}, {[get ['x' + 1]() {...}}
+   ((and (= tt js2-LB)
+         (>= js2-language-version 200))
+    (make-js2-computed-prop-name-node
+     :expr (prog1 (js2-parse-assign-expr)
+             (js2-must-match js2-RB "msg.missing.computed.rb"))))
+   ;; Numeric keys: {12: 'foo'}, {10.7: 'bar'}
+   ((= tt js2-NUMBER)
+    (make-js2-number-node))
+   ;; Unquoted names: {foo: 12}
+   ((= tt js2-NAME)
+    (js2-create-name-node))
+   ;; Anything else is an error
+   (t (js2-report-error "msg.bad.prop"))))
+
 (defun js2-parse-plain-property (prop)
   "Parse a non-getter/setter property in an object literal.
 PROP is the node representing the property: a number, name,
@@ -10762,11 +10968,12 @@ string or expression."
       (js2-node-add-children result prop expr)
       result))))
 
-(defun js2-parse-getter-setter-prop (pos prop type-string)
-  "Parse getter or setter property in an object literal.
+(defun js2-parse-method-prop (pos prop type-string)
+  "Parse method property in an object literal or a class body.
 JavaScript syntax is:
 
-  { get foo() {...}, set foo(x) {...} }
+  { foo(...) {...}, get foo() {...}, set foo(x) {...}, *foo(...) {...},
+    async foo(...) {...} }
 
 and expression closure style is also supported
 
@@ -10775,26 +10982,24 @@ and expression closure style is also supported
 POS is the start position of the `get' or `set' keyword.
 PROP is the `js2-name-node' representing the property name.
 TYPE-STRING is a string `get', `set', `*', or nil, indicating a found keyword."
-  (let ((type (cond
-               ((string= "get" type-string) js2-GET)
-               ((string= "set" type-string) js2-SET)
-               (t js2-FUNCTION)))
-        result end
-        (fn (js2-parse-function-expr)))
-    ;; it has to be an anonymous function, as we already parsed the name
-    (if (/= (js2-node-type fn) js2-FUNCTION)
-        (js2-report-error "msg.bad.prop")
-      (if (cl-plusp (length (js2-function-name fn)))
-          (js2-report-error "msg.bad.prop")))
-    (js2-node-set-prop fn 'GETTER_SETTER type)  ; for codegen
-    (when (string= type-string "*")
-      (setf (js2-function-node-generator-type fn) 'STAR))
+  (let* ((type (or (cdr (assoc type-string '(("get" . GET)
+                                             ("set" . SET)
+                                             ("async" . ASYNC))))
+                   'FUNCTION))
+         result end
+         (pos (js2-current-token-beg))
+         (_ (js2-must-match js2-LP "msg.no.paren.parms"))
+         (fn (js2-parse-function 'FUNCTION_EXPRESSION pos
+                                 (string= type-string "*")
+                                 (eq type 'ASYNC)
+                                 nil)))
+    (js2-node-set-prop fn 'METHOD_TYPE type)  ; for codegen
+    (unless pos (setq pos (js2-node-pos prop)))
     (setq end (js2-node-end fn)
-          result (make-js2-getter-setter-node :type type
-                                              :pos pos
-                                              :len (- end pos)
-                                              :left prop
-                                              :right fn))
+          result (make-js2-method-node :pos pos
+                                       :len (- end pos)
+                                       :left prop
+                                       :right fn))
     (js2-node-add-children result prop fn)
     result))
 
@@ -10815,6 +11020,68 @@ And, if CHECK-ACTIVATION-P is non-nil, use the value 
of TOKEN."
         (js2-check-activation-name s (or token js2-NAME)))
     name))
 
+;;; Use AST to extract semantic information
+
+(defun js2-get-element-index-from-array-node (elem array-node &optional 
hardcoded-array-index)
+  "Get index of ELEM from ARRAY-NODE or 0 and return it as string."
+  (let ((idx 0) elems (rlt hardcoded-array-index))
+    (setq elems (js2-array-node-elems array-node))
+    (if (and elem (not hardcoded-array-index))
+        (setq rlt (catch 'nth-elt
+                    (dolist (x elems)
+                      ;; We know the ELEM does belong to ARRAY-NODE,
+                      (if (eq elem x) (throw 'nth-elt idx))
+                      (setq idx (1+ idx)))
+                    0)))
+    (format "[%s]" rlt)))
+
+(defun js2-print-json-path (&optional hardcoded-array-index)
+  "Print the path to the JSON value under point, and save it in the kill ring.
+If HARDCODED-ARRAY-INDEX provided, array index in JSON path is replaced with 
it."
+  (interactive "P")
+  (js2-reparse)
+  (let (previous-node current-node
+        key-name
+        rlt)
+
+    ;; The `js2-node-at-point' starts scanning from AST root node.
+    ;; So there is no way to optimize it.
+    (setq current-node (js2-node-at-point))
+
+    (while (not (js2-ast-root-p current-node))
+      (cond
+       ;; JSON property node
+       ((js2-object-prop-node-p current-node)
+        (setq key-name (js2-prop-node-name (js2-object-prop-node-left 
current-node)))
+        (if rlt (setq rlt (concat "." key-name rlt))
+          (setq rlt (concat "." key-name))))
+
+       ;; Array node
+       ((or (js2-array-node-p current-node))
+        (setq rlt (concat (js2-get-element-index-from-array-node previous-node
+                                                                 current-node
+                                                                 
hardcoded-array-index)
+                          rlt)))
+
+       ;; Other nodes are ignored
+       (t))
+
+      ;; current node is archived
+      (setq previous-node current-node)
+      ;; Get parent node and continue the loop
+      (setq current-node (js2-node-parent current-node)))
+
+    (cond
+     (rlt
+      ;; Clean the final result
+      (setq rlt (replace-regexp-in-string "^\\." "" rlt))
+      (kill-new rlt)
+      (message "%s => kill-ring" rlt))
+     (t
+      (message "No JSON path found!")))
+
+    rlt))
+
 ;;; Indentation support (bouncing)
 
 ;; In recent-enough Emacs, we reuse the indentation code from
@@ -11310,7 +11577,23 @@ Selecting an error will jump it to the corresponding 
source-buffer error.
 
   (run-hooks 'js2-init-hook)
 
-  (js2-reparse))
+  (let ((js2-idle-timer-delay 0))
+    ;; Schedule parsing for after when the mode hooks run.
+    (js2-mode-reset-timer)))
+
+;; We may eventually want js2-jsx-mode to derive from js-jsx-mode, but that'd 
be
+;; a bit more complicated and it doesn't net us much yet.
+;;;###autoload
+(define-derived-mode js2-jsx-mode js2-mode "JSX-IDE"
+  "Major mode for editing JSX code.
+
+To customize the indentation for this mode, set the SGML offset
+variables (`sgml-basic-offset' et al) locally, like so:
+
+  (defun set-jsx-indentation ()
+    (setq-local sgml-basic-offset js2-basic-offset))
+  (add-hook \\='js2-jsx-mode-hook #\\='set-jsx-indentation)"
+  (set (make-local-variable 'indent-line-function) #'js2-jsx-indent-line))
 
 (defun js2-mode-exit ()
   "Exit `js2-mode' and clean up."
@@ -11647,10 +11930,7 @@ PARSE-STATUS is as documented in `parse-partial-sexp'."
             (insert "\n")
             (indent-to col)
             (insert "*/"))))
-     ((and single
-           (save-excursion
-              (and (zerop (forward-line 1))
-                   (looking-at "\\s-*//"))))
+     (single
       (indent-to col)
       (insert "// ")))
     ;; Don't need to extend the comment after all.
@@ -12297,7 +12577,10 @@ it marks the next defun after the ones already marked."
 (defun js2-jump-to-definition (&optional arg)
   "Jump to the definition of an object's property, variable or function."
   (interactive "P")
-  (ring-insert find-tag-marker-ring (point-marker))
+  (if (eval-when-compile (fboundp 'xref-push-marker-stack))
+      (xref-push-marker-stack)
+    (ring-insert find-tag-marker-ring (point-marker)))
+  (js2-reparse)
   (let* ((node (js2-node-at-point))
          (parent (js2-node-parent node))
          (names (if (js2-prop-get-node-p parent)
@@ -12355,7 +12638,7 @@ it marks the next defun after the ones already marked."
 (defun js2-search-object-for-prop (object prop-names)
   "Return node in OBJECT that matches PROP-NAMES or nil.
 PROP-NAMES is a list of values representing a path to a value in OBJECT.
-i.e. ('name' 'value') = {name : { value: 3}}"
+i.e. (\\='name\\=' \\='value\\=') = {name : { value: 3}}"
   (let (node
         (temp-object object)
         (temp t) ;temporay node
diff --git a/packages/js2-mode/js2-old-indent.el 
b/packages/js2-mode/js2-old-indent.el
index efc9053..0b0ed3a 100644
--- a/packages/js2-mode/js2-old-indent.el
+++ b/packages/js2-mode/js2-old-indent.el
@@ -54,6 +54,8 @@
 
 ;;; Code:
 
+(require 'sgml-mode)
+
 (defvar js2-language-version)
 
 (declare-function js2-mark-safe-local "js2-mode")
@@ -129,13 +131,13 @@ switch statement body are indented one additional level."
 followed by an opening brace.")
 
 (defconst js2-indent-operator-re
-  (concat "[-+*/%<>&^|?:.]\\([^-+*/]\\|$\\)\\|!?=\\|"
-          (regexp-opt '("in" "instanceof") 'words))
+  (concat "[-+*/%<>&^|?:.]\\([^-+*/.]\\|$\\)\\|!?=\\|"
+          (regexp-opt '("in" "instanceof") 'symbols))
   "Regular expression matching operators that affect indentation
 of continued expressions.")
 
 (defconst js2-declaration-keyword-re
-  (regexp-opt '("var" "let" "const") 'words)
+  (regexp-opt '("var" "let" "const") 'symbols)
   "Regular expression matching variable declaration keywords.")
 
 (defun js2-re-search-forward-inner (regexp &optional bound count)
@@ -215,30 +217,38 @@ and comments have been removed."
 
 (defun js2-looking-at-operator-p ()
   "Return non-nil if text after point is a non-comma operator."
+  (defvar js2-mode-identifier-re)
   (and (looking-at js2-indent-operator-re)
-       (or (not (looking-at ":"))
+       (or (not (eq (char-after) ?:))
            (save-excursion
              (and (js2-re-search-backward "[?:{]\\|\\_<case\\_>" nil t)
-                  (looking-at "?"))))))
+                  (eq (char-after) ??))))
+       (not (and
+             (eq (char-after) ?*)
+             ;; Generator method (possibly using computed property).
+             (looking-at (concat "\\* *\\(?:\\[\\|"
+                                 js2-mode-identifier-re
+                                 " *(\\)"))
+             (save-excursion
+               (js2-backward-sws)
+               ;; We might misindent some expressions that would
+               ;; return NaN anyway.  Shouldn't be a problem.
+               (memq (char-before) '(?, ?} ?{)))))))
 
 (defun js2-continued-expression-p ()
   "Return non-nil if the current line continues an expression."
   (save-excursion
     (back-to-indentation)
-    (or (js2-looking-at-operator-p)
-        (when (catch 'found
-                (while (and (re-search-backward "\n" nil t)
-                            (let ((state (syntax-ppss)))
-                              (when (nth 4 state)
-                                (goto-char (nth 8 state))) ;; skip comments
-                              (skip-chars-backward " \t")
-                              (if (bolp)
-                                  t
-                                (throw 'found t))))))
-          (backward-char)
-          (when (js2-looking-at-operator-p)
-            (backward-char)
-            (not (looking-at "\\*\\|\\+\\+\\|--\\|/[/*]")))))))
+    (if (js2-looking-at-operator-p)
+        (or (not (memq (char-after) '(?- ?+)))
+            (progn
+              (forward-comment (- (point)))
+              (not (memq (char-before) '(?, ?\[ ?\()))))
+      (forward-comment (- (point)))
+      (or (bobp) (backward-char))
+      (when (js2-looking-at-operator-p)
+        (backward-char)
+        (not (looking-at "\\*\\|\\+\\+\\|--\\|/[/*]"))))))
 
 (defun js2-end-of-do-while-loop-p ()
   "Return non-nil if word after point is `while' of a do-while
@@ -431,7 +441,7 @@ indentation is aligned to that column."
         (goto-char bracket)
         (cond
          ((looking-at "[({[][ \t]*\\(/[/*]\\|$\\)")
-          (when (save-excursion (skip-chars-backward " \t)")
+          (when (save-excursion (skip-chars-backward " \t\n)")
                                 (looking-at ")"))
             (backward-list))
           (back-to-indentation)
@@ -484,6 +494,215 @@ indentation is aligned to that column."
       (when (cl-plusp offset)
         (forward-char offset)))))
 
+;;; JSX Indentation
+
+;; The following JSX indentation code is copied basically verbatim from js.el 
at
+;; 958da7f, except that the prefixes on the functions/variables are changed.
+
+(defsubst js2--jsx-find-before-tag ()
+  "Find where JSX starts.
+
+Assume JSX appears in the following instances:
+- Inside parentheses, when returned or as the first argument
+  to a function, and after a newline
+- When assigned to variables or object properties, but only
+  on a single line
+- As the N+1th argument to a function
+
+This is an optimized version of (re-search-backward \"[(,]\n\"
+nil t), except set point to the end of the match.  This logic
+executes up to the number of lines in the file, so it should be
+really fast to reduce that impact."
+  (let (pos)
+    (while (and (> (point) (point-min))
+                (not (progn
+                       (end-of-line 0)
+                       (when (or (eq (char-before) 40)   ; (
+                                 (eq (char-before) 44))  ; ,
+                         (setq pos (1- (point))))))))
+    pos))
+
+(defconst js2--jsx-end-tag-re
+  (concat "</" sgml-name-re ">\\|/>")
+  "Find the end of a JSX element.")
+
+(defconst js2--jsx-after-tag-re "[),]"
+  "Find where JSX ends.
+This complements the assumption of where JSX appears from
+`js--jsx-before-tag-re', which see.")
+
+(defun js2--jsx-indented-element-p ()
+  "Determine if/how the current line should be indented as JSX.
+
+Return `first' for the first JSXElement on its own line.
+Return `nth' for subsequent lines of the first JSXElement.
+Return `expression' for an embedded JS expression.
+Return `after' for anything after the last JSXElement.
+Return nil for non-JSX lines.
+
+Currently, JSX indentation supports the following styles:
+
+- Single-line elements (indented like normal JS):
+
+  var element = <div></div>;
+
+- Multi-line elements (enclosed in parentheses):
+
+  function () {
+    return (
+      <div>
+        <div></div>
+      </div>
+    );
+ }
+
+- Function arguments:
+
+  React.render(
+    <div></div>,
+    document.querySelector(\\='.root\\=')
+  );"
+  (let ((current-pos (point))
+        (current-line (line-number-at-pos))
+        last-pos
+        before-tag-pos before-tag-line
+        tag-start-pos tag-start-line
+        tag-end-pos tag-end-line
+        after-tag-line
+        parens paren type)
+    (save-excursion
+      (and
+       ;; Determine if we're inside a jsx element
+       (progn
+         (end-of-line)
+         (while (and (not tag-start-pos)
+                     (setq last-pos (js2--jsx-find-before-tag)))
+           (while (forward-comment 1))
+           (when (= (char-after) 60) ; <
+             (setq before-tag-pos last-pos
+                   tag-start-pos (point)))
+           (goto-char last-pos))
+         tag-start-pos)
+       (progn
+         (setq before-tag-line (line-number-at-pos before-tag-pos)
+               tag-start-line (line-number-at-pos tag-start-pos))
+         (and
+          ;; A "before" line which also starts an element begins with js, so
+          ;; indent it like js
+          (> current-line before-tag-line)
+          ;; Only indent the jsx lines like jsx
+          (>= current-line tag-start-line)))
+       (cond
+        ;; Analyze bounds if there are any
+        ((progn
+           (while (and (not tag-end-pos)
+                       (setq last-pos (re-search-forward js2--jsx-end-tag-re 
nil t)))
+             (while (forward-comment 1))
+             (when (looking-at js2--jsx-after-tag-re)
+               (setq tag-end-pos last-pos)))
+           tag-end-pos)
+         (setq tag-end-line (line-number-at-pos tag-end-pos)
+               after-tag-line (line-number-at-pos after-tag-line))
+         (or (and
+              ;; Ensure we're actually within the bounds of the jsx
+              (<= current-line tag-end-line)
+              ;; An "after" line which does not end an element begins with
+              ;; js, so indent it like js
+              (<= current-line after-tag-line))
+             (and
+              ;; Handle another case where there could be e.g. comments after
+              ;; the element
+              (> current-line tag-end-line)
+              (< current-line after-tag-line)
+              (setq type 'after))))
+        ;; They may not be any bounds (yet)
+        (t))
+       ;; Check if we're inside an embedded multi-line js expression
+       (cond
+        ((not type)
+         (goto-char current-pos)
+         (end-of-line)
+         (setq parens (nth 9 (syntax-ppss)))
+         (while (and parens (not type))
+           (setq paren (car parens))
+           (cond
+            ((and (>= paren tag-start-pos)
+                  ;; Curly bracket indicates the start of an embedded 
expression
+                  (= (char-after paren) 123) ; {
+                  ;; The first line of the expression is indented like sgml
+                  (> current-line (line-number-at-pos paren))
+                  ;; Check if within a closing curly bracket (if any)
+                  ;; (exclusive, as the closing bracket is indented like sgml)
+                  (cond
+                   ((progn
+                      (goto-char paren)
+                      (ignore-errors (let (forward-sexp-function)
+                                       (forward-sexp))))
+                    (< current-line (line-number-at-pos)))
+                   (t)))
+             ;; Indicate this guy will be indented specially
+             (setq type 'expression))
+            (t (setq parens (cdr parens)))))
+         t)
+        (t))
+       (cond
+        (type)
+        ;; Indent the first jsx thing like js so we can indent future jsx 
things
+        ;; like sgml relative to the first thing
+        ((= current-line tag-start-line) 'first)
+        ('nth))))))
+
+(defmacro js2--as-sgml (&rest body)
+  "Execute BODY as if in sgml-mode."
+  `(with-syntax-table sgml-mode-syntax-table
+     (let (forward-sexp-function
+           parse-sexp-lookup-properties)
+       ,@body)))
+
+(defun js2--expression-in-sgml-indent-line ()
+  "Indent the current line as JavaScript or SGML (whichever is farther)."
+  (let* (indent-col
+         (savep (point))
+         ;; Don't whine about errors/warnings when we're indenting.
+         ;; This has to be set before calling parse-partial-sexp below.
+         (inhibit-point-motion-hooks t)
+         (parse-status (save-excursion
+                         (syntax-ppss (point-at-bol)))))
+    ;; Don't touch multiline strings.
+    (unless (nth 3 parse-status)
+      (setq indent-col (save-excursion
+                         (back-to-indentation)
+                         (if (>= (point) savep) (setq savep nil))
+                         (js2--as-sgml (sgml-calculate-indent))))
+      (if (null indent-col)
+          'noindent
+        ;; Use whichever indentation column is greater, such that the sgml
+        ;; column is effectively a minimum
+        (setq indent-col (max (js2-proper-indentation parse-status)
+                              (+ indent-col js2-basic-offset)))
+        (if savep
+            (save-excursion (indent-line-to indent-col))
+          (indent-line-to indent-col))))))
+
+(defun js2-jsx-indent-line ()
+  "Indent the current line as JSX (with SGML offsets).
+i.e., customize JSX element indentation with `sgml-basic-offset'
+et al."
+  (interactive)
+  (let ((indentation-type (js2--jsx-indented-element-p)))
+    (cond
+     ((eq indentation-type 'expression)
+      (js2--expression-in-sgml-indent-line))
+     ((or (eq indentation-type 'first)
+          (eq indentation-type 'after))
+      ;; Don't treat this first thing as a continued expression (often a "<" or
+      ;; ">" causes this misinterpretation)
+      (cl-letf (((symbol-function #'js2-continued-expression-p) 'ignore))
+        (js2-indent-line)))
+     ((eq indentation-type 'nth)
+      (js2--as-sgml (sgml-indent-line)))
+     (t (js2-indent-line)))))
+
 (provide 'js2-old-indent)
 
 ;;; js2-old-indent.el ends here
diff --git a/packages/js2-mode/tests/externs.el 
b/packages/js2-mode/tests/externs.el
index 40957f6..75b93cd 100644
--- a/packages/js2-mode/tests/externs.el
+++ b/packages/js2-mode/tests/externs.el
@@ -1,6 +1,6 @@
 ;;; tests/externs.el --- Some tests for js2-mode.
 
-;; Copyright (C) 2009, 2011-2013  Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2011-2014, 2016  Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -42,6 +42,13 @@
     (should (equal (js2-get-jslint-globals)
                    '("quux" "tee" "$")))))
 
+(ert-deftest js2-finds-jslint-globals-with-space ()
+  (with-temp-buffer
+    (insert "/* global foo, bar:false, baz:true")
+    (js2-mode)
+    (should (equal (js2-get-jslint-globals)
+                   '("foo" "bar" "baz")))))
+
 ;;;TODO
 ;; ensure that any symbols bound with the import syntax are added to the 
extern list
 ;; ensure that any symbols bound with the export syntax exist in the file scope
diff --git a/packages/js2-mode/tests/indent.el 
b/packages/js2-mode/tests/indent.el
index 27b6c5a..0fabe95 100644
--- a/packages/js2-mode/tests/indent.el
+++ b/packages/js2-mode/tests/indent.el
@@ -1,6 +1,6 @@
 ;;; tests/indent.el --- Some tests for js2-mode.
 
-;; Copyright (C) 2009, 2011-2013  Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2011-2016  Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -31,14 +31,16 @@
        (if keep-indent
            s
          (replace-regexp-in-string "^ *" "" s)))
-      (js2-mode)
+      (js2-jsx-mode)
+      (js2-reparse) ; solely for js2-jsx-self-closing, for some reason
       (indent-region (point-min) (point-max))
       (should (string= s (buffer-substring-no-properties
                           (point-min) (point)))))))
 
 (cl-defmacro js2-deftest-indent (name content &key bind keep-indent)
   `(ert-deftest ,(intern (format "js2-%s" name)) ()
-     (let ,(append '((js2-basic-offset 2)
+     (let ,(append '(indent-tabs-mode
+                     (js2-basic-offset 2)
                      (js2-pretty-multiline-declarations t)
                      (inhibit-point-motion-hooks t))
                    bind)
@@ -140,3 +142,146 @@
   |  ,
   |  bar = 8;"
   :bind ((js2-pretty-multiline-declarations 'dynamic)))
+
+(js2-deftest-indent indent-generator-method
+  "class A {
+  |  * x() {
+  |    return 1
+  |      * a(2);
+  |  }
+  |}")
+
+(js2-deftest-indent indent-generator-computed-method
+  "class A {
+  |  *[Symbol.iterator]() {
+  |    yield 'Foo';
+  |    yield 'Bar';
+  |  }
+  |}")
+
+(js2-deftest-indent case-inside-switch
+  "switch(true) {
+  |case 'true':
+  |  return 1;
+  |}")
+
+(js2-deftest-indent case-inside-switch-with-extra-indent
+  "switch(true) {
+  |  case 'true':
+  |    return 1;
+  |}"
+  :bind ((js2-indent-switch-body t)))
+
+(js2-deftest-indent case-inside-switch-with-extra-indent-curly-after-newline
+  "switch(true)
+  |{
+  |  case 'true':
+  |    return 1;
+  |}"
+  :bind ((js2-indent-switch-body t)))
+
+(js2-deftest-indent continued-expression-vs-unary-minus
+  "var arr = [
+  |  -1, 2,
+  |  -3, 4 +
+  |    -5
+  |];")
+
+(js2-deftest-indent spread-inside-array
+  "var z = [
+  |  ...iterableObj,
+  |  4,
+  |  5
+  |]")
+
+(js2-deftest-indent jsx-one-line
+  "var foo = <div></div>;")
+
+(js2-deftest-indent jsx-children-parentheses
+  "return (
+  |  <div>
+  |  </div>
+  |  <div>
+  |    <div></div>
+  |    <div>
+  |      <div></div>
+  |    </div>
+  |  </div>
+  |);")
+
+(js2-deftest-indent jsx-children-unclosed
+  "return (
+  |  <div>
+  |    <div>")
+
+(js2-deftest-indent jsx-argument
+  "React.render(
+  |  <div>
+  |    <div></div>
+  |  </div>,
+  |  {
+  |    a: 1
+  |  },
+  |  <div>
+  |    <div></div>
+  |  </div>
+  |);")
+
+(js2-deftest-indent jsx-leading-comment
+  "return (
+  |  // Sneaky!
+  |  <div></div>
+  |);")
+
+(js2-deftest-indent jsx-trailing-comment
+  "return (
+  |  <div></div>
+  |  // Sneaky!
+  |);")
+
+(js2-deftest-indent jsx-self-closing
+  ;; This ensures we know the bounds of a self-closing element
+  "React.render(
+  |  <input
+  |     />,
+  |  {
+  |    a: 1
+  |  }
+  |);"
+  :bind ((sgml-attribute-offset 1))) ; Emacs 24.5 -> 25 compat
+
+(js2-deftest-indent jsx-embedded-js-content
+  "return (
+  |  <div>
+  |    {array.map(function () {
+  |      return {
+  |        a: 1
+  |      };
+  |    })}
+  |  </div>
+  |);")
+
+(js2-deftest-indent jsx-embedded-js-unclosed
+  "return (
+  |  <div>
+  |    {array.map(function () {
+  |      return {
+  |        a: 1")
+
+(js2-deftest-indent jsx-embedded-js-attribute
+  "return (
+  |  <div attribute={array.map(function () {
+  |         return {
+  |           a: 1
+  |         };
+  |
+  |         return {
+  |           a: 1
+  |         };
+  |
+  |         return {
+  |           a: 1
+  |         };
+  |       })}>
+  |  </div>
+  |);")
diff --git a/packages/js2-mode/tests/json-path.el 
b/packages/js2-mode/tests/json-path.el
new file mode 100644
index 0000000..70aecef
--- /dev/null
+++ b/packages/js2-mode/tests/json-path.el
@@ -0,0 +1,64 @@
+;;; tests/json-path.el --- Test of using js2-mode AST to print JSON path.
+
+;; Copyright (C) 2015  Free Software Foundation, Inc.
+
+;; 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 'ert)
+(require 'js2-mode)
+
+(ert-deftest js2-json-path-with-actual-array-index ()
+  (with-temp-buffer
+    (insert "var a = { hello: [1, 2, [1,3,3,4, { world: { hell: { yes: [1,2, 
'test'] } } }]] };")
+    (js2-mode)
+    (goto-char 0)
+    (search-forward "test")
+    (should (string= (js2-print-json-path) "hello[2][4].world.hell.yes[2]"))))
+
+(ert-deftest js2-json-path-pure-arrays ()
+  (with-temp-buffer
+    (insert "var a = [5, 1, 4, [ 4, [1, 2, [1, 3.9, 4, [1, 2, 'test',3]]]], 9, 
9];")
+    (js2-mode)
+    (goto-char 0)
+    (search-forward "test")
+    (should (string= (js2-print-json-path) "[3][1][2][3][2]"))))
+
+(ert-deftest js2-json-path-key-is-numeric ()
+  (with-temp-buffer
+    (insert "var b = {hello: {3 : {world: {2: 'test'}}}};")
+    (js2-mode)
+    (goto-char 0)
+    (search-forward "test")
+    (should (string= (js2-print-json-path) "hello.3.world.2"))))
+
+(ert-deftest js2-json-path-not-found ()
+  (with-temp-buffer
+    (insert "console.log('test');")
+    (js2-mode)
+    (goto-char 0)
+    (search-forward "test")
+    (should (eq (js2-print-json-path) nil))))
+
+(ert-deftest js2-json-path-with-array-index-hardcoded ()
+  (with-temp-buffer
+    (insert "var a = { hello: [1, 2, [1,3,3,4, { world: { hell: { yes: [1,2, 
'test'] } } }]] };")
+    (js2-mode)
+    (goto-char 0)
+    (search-forward "test")
+    (should (string= (js2-print-json-path 1) "hello[1][1].world.hell.yes[1]"))
+    (should (string= (js2-print-json-path 0) 
"hello[0][0].world.hell.yes[0]"))))
diff --git a/packages/js2-mode/tests/parser.el 
b/packages/js2-mode/tests/parser.el
index dc8c001..b4aa683 100644
--- a/packages/js2-mode/tests/parser.el
+++ b/packages/js2-mode/tests/parser.el
@@ -1,6 +1,6 @@
 ;;; tests/parser.el --- Some tests for js2-mode.
 
-;; Copyright (C) 2009, 2011-2013  Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2011-2016  Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -35,14 +35,18 @@
              ,@body)
          (fundamental-mode)))))
 
+(defun js2-mode--and-parse ()
+  (js2-mode)
+  (js2-reparse))
+
 (defun js2-test-string-to-ast (s)
   (insert s)
-  (js2-mode)
+  (js2-mode--and-parse)
   (should (null js2-mode-buffer-dirty-p))
   js2-mode-ast)
 
 (cl-defun js2-test-parse-string (code-string &key syntax-error errors-count
-                                             reference)
+                                             reference warnings-count)
   (ert-with-test-buffer (:name 'origin)
     (let ((ast (js2-test-string-to-ast code-string)))
       (if syntax-error
@@ -57,10 +61,13 @@
           (skip-chars-backward " \t\n")
           (should (string= (or reference code-string)
                            (buffer-substring-no-properties
-                            (point-min) (point)))))))))
+                            (point-min) (point)))))
+        (when warnings-count
+          (should (= warnings-count
+                     (length (js2-ast-root-warnings ast)))))))))
 
 (cl-defmacro js2-deftest-parse (name code-string &key bind syntax-error 
errors-count
-                                     reference)
+                                     reference warnings-count)
   "Parse CODE-STRING.  If SYNTAX-ERROR is nil, print syntax tree
 with `js2-print-tree' and assert the result to be equal to
 REFERENCE, if present, or the original string.  If SYNTAX-ERROR
@@ -73,6 +80,7 @@ the test."
        (js2-test-parse-string ,code-string
                               :syntax-error ,syntax-error
                               :errors-count ,errors-count
+                              :warnings-count ,warnings-count
                               :reference ,reference))))
 
 ;;; Basics
@@ -126,6 +134,9 @@ the test."
 (js2-deftest-parse let-expression-statement
   "let (x = 42) x;")
 
+(js2-deftest-parse void
+  "void 0;")
+
 ;;; Callers of `js2-valid-prop-name-token'
 
 (js2-deftest-parse parse-property-access-when-not-keyword
@@ -158,6 +169,12 @@ the test."
 (js2-deftest-parse parse-for-of
   "for (var a of []) {\n}")
 
+(js2-deftest-parse of-can-be-name
+  "void of;")
+
+(js2-deftest-parse of-can-be-object-name
+  "of.z;")
+
 (js2-deftest-parse of-can-be-var-name
   "var of = 3;")
 
@@ -167,16 +184,49 @@ the test."
 ;;; Destructuring binding
 
 (js2-deftest-parse destruct-in-declaration
-  "var {a, b} = {a: 1, b: 2};")
+  "var {a, b} = {a: 1, b: 2};"
+  :warnings-count 0)
 
 (js2-deftest-parse destruct-in-arguments
-  "function f({a: aa, b: bb}) {\n}")
+  "function f({a: aa, b: bb}) {\n}"
+  :warnings-count 0)
 
 (js2-deftest-parse destruct-in-array-comp-loop
   "[a + b for ([a, b] in [[0, 1], [1, 2]])];")
 
 (js2-deftest-parse destruct-in-catch-clause
-  "try {\n} catch ({a, b}) {\n  a + b;\n}")
+  "try {\n} catch ({a, b}) {\n  a + b;\n}"
+  :warnings-count 0)
+
+(js2-deftest-parse destruct-with-initializer-in-object
+  "var {a, b = 2, c} = {};\nb;"
+  :warnings-count 0)
+
+(js2-deftest-parse destruct-with-initializer-in-array
+  "var [a, b = 2, c] = [];\nb;"
+  :warnings-count 0)
+
+(js2-deftest-parse destruct-non-name-target-is-error
+  "var {1=1} = {};" :syntax-error "1" :errors-count 1)
+
+(js2-deftest-parse destruct-with-initializer-in-function-params
+  "function f({a, b = 1, c}, [d, e = 1, f]) {\n}")
+
+(js2-deftest-parse destruct-with-default-in-function-params
+  "function f({x = 1, y = 2} = {}, [x, y] = [1, 2]) {\n}")
+
+(js2-deftest-parse destruct-name-conflict-is-error-in-object
+  "\"use strict\";\nvar {a=1,a=2} = {};" :syntax-error "a" :errors-count 1)
+
+(js2-deftest destruct-name-conflict-is-warning-in-array "\"use strict\";\nvar 
[a=1,a=2] = [];"
+  (js2-mode--and-parse)
+  (should (equal '("msg.var.redecl" "a")
+                 (caar js2-parsed-warnings))))
+
+(js2-deftest initializer-outside-destruct-is-error "({a=1});"
+  (js2-mode--and-parse)
+  (should (equal "msg.init.no.destruct"
+                 (car (caar js2-parsed-errors)))))
 
 ;;; Object literals
 
@@ -189,6 +239,11 @@ the test."
 (js2-deftest-parse object-literal-method
   "var x = {f(y) {  return y;\n}};")
 
+(js2-deftest object-literal-method-own-name-in-scope "({f(){f();}});"
+  (js2-mode--and-parse)
+  (should (equal '("msg.undeclared.variable" "f")
+                 (caar js2-parsed-warnings))))
+
 (js2-deftest-parse object-literal-getter-method
   "var x = {get f() {  return 42;\n}};")
 
@@ -205,7 +260,7 @@ the test."
   "var x = {get [foo + bar]() {  return 42;\n}};")
 
 (js2-deftest-parse object-literal-generator
-  "var x = {*foo() {  yield 42;\n}};")
+  "var x = {*foo() {  yield* 42;\n}};")
 
 (js2-deftest-parse object-literal-computed-generator-key
   "var x = {*[foo + bar]() {  yield 42;\n}};")
@@ -213,11 +268,11 @@ the test."
 ;;; Function definition
 
 (js2-deftest function-redeclaring-var "var gen = 3; function gen() {};"
-  (js2-mode)
+  (js2-mode--and-parse)
   (should (= (length (js2-ast-root-warnings js2-mode-ast)) 1)))
 
 (js2-deftest function-expression-var-same-name "var gen = function gen() {};"
-  (js2-mode)
+  (js2-mode--and-parse)
   (should (null (js2-ast-root-warnings js2-mode-ast))))
 
 ;;; Function parameters
@@ -290,14 +345,29 @@ the test."
   "'use strict';\nvar number = 0644;"
   :syntax-error "0644" :errors-count 1)
 
+(js2-deftest-parse function-strict-octal-allow-0o
+  "'use strict';\n0o644;" :reference "'use strict';\n420;")
+
 (js2-deftest-parse function-strict-duplicate-keys
   "'use strict';\nvar object = {a: 1, a: 2, 'a': 3, ['a']: 4, 1: 5, '1': 6, [1 
+ 1]: 7};"
   :syntax-error "a" :errors-count 4) ; "a" has 3 dupes, "1" has 1 dupe.
 
-;; errors... or lackthereof.
+(js2-deftest-parse function-strict-duplicate-getter
+  "'use strict';\nvar a = {get x() {}, get x() {}};"
+  :syntax-error "x" :errors-count 1)
+
+(js2-deftest-parse function-strict-duplicate-setter
+  "'use strict';\nvar a = {set x() {}, set x() {}};"
+  :syntax-error "x" :errors-count 1)
+
+;;; Lack of errors in strict mode
+
 (js2-deftest-parse function-strict-const-scope
   "'use strict';\nconst a;\nif (1) {\n  const a;\n}")
 
+(js2-deftest-parse function-strict-no-getter-setter-duplicate
+  "'use strict';\nvar a = {get x() {}, set x() {}};")
+
 ;;; Spread operator
 
 (js2-deftest-parse spread-in-array-literal
@@ -306,6 +376,26 @@ the test."
 (js2-deftest-parse spread-in-function-call
   "f(3, ...[t(2), t(3)], 42, ...[t(4)]);")
 
+(js2-deftest-parse rest-in-array-destructure
+  "let [x, y, z, ...w] = [1, ...a, ...b, c];")
+
+(js2-deftest-parse comma-after-rest-in-array
+  "let [...x,] = [1, 2, 3];"
+  :syntax-error "," :errors-count 1)
+
+(js2-deftest-parse elem-after-rest-in-array
+  "let [...x, y] = [1, 2, 3];"
+  :syntax-error "," :errors-count 2)
+
+(js2-deftest-parse array-destructure-expr-default
+  "let [[x] = [3]] = y;")
+
+(js2-deftest-parse spread-in-object-literal
+  "f({x, y, ...z});")
+
+(js2-deftest-parse rest-in-object-literal
+  "const {x, y, ...z} = f();")
+
 ;;; Arrow functions
 
 (js2-deftest-parse arrow-function-with-empty-args-and-no-curlies
@@ -344,7 +434,7 @@ the test."
 
 (js2-deftest no-label-node-inside-expr "x = y:"
   (let (js2-parse-interruptable-p)
-    (js2-mode))
+    (js2-mode--and-parse))
   (let ((assignment (js2-expr-stmt-node-expr (car (js2-scope-kids 
js2-mode-ast)))))
     (should (js2-name-node-p (js2-assign-node-right assignment)))))
 
@@ -387,6 +477,79 @@ the test."
 (js2-deftest-parse parse-generator-comp-with-yield-inside-function-is-ok
   "(for (x of []) function*() {  yield x;\n});")
 
+;;; Async
+
+(js2-deftest-parse async-function-statement
+  "async function foo() {\n}")
+
+(js2-deftest-parse async-function-statement-inside-block
+  "if (true) {\n  async function foo() {\n  }\n}")
+
+(js2-deftest-parse async-function-expression-statements-are-verboten
+  "async function() {}" :syntax-error "(")
+
+(js2-deftest-parse async-named-function-expression
+  "a = async function b() {};")
+
+(js2-deftest-parse async-arrow-function-expression
+  "a = async (b) => {  b;\n};")
+
+(js2-deftest-parse async-method-in-object-literal
+  "({async f() {}});")
+
+(js2-deftest-parse async-method-in-class-body
+  "class C {\n  async foo() {}\n}")
+
+(js2-deftest-parse static-async-method-in-class-body
+  "class C {\n  static async foo() {}\n}")
+
+(js2-deftest-parse async-method-allow-await
+  "({async f() {  await x;\n}});")
+
+;;; Await
+
+(js2-deftest-parse await-is-ok "async function foo() {\n  await bar();\n}")
+
+(js2-deftest-parse await-inside-assignment-is-ok
+                   "async function foo() {\n  var result = await bar();\n}")
+
+(js2-deftest-parse await-inside-array-is-ok
+                   "async function foo() {\n  var results = [await bar(), 
await baz()];\n}")
+
+(js2-deftest-parse await-inside-non-async-function-is-not-ok
+                   "function foo() {\n  await bar();\n}"
+                   :syntax-error "await")
+
+(js2-deftest-parse await-inside-non-async-arrow-function-is-not-ok
+                   "a = () => {  await bar();\n}"
+                   :syntax-error "await")
+
+;;; 'async' and 'await' are contextual keywords
+
+(js2-deftest-parse async-can-be-name
+  "void async;")
+
+(js2-deftest-parse async-can-be-object-name
+  "async.z;")
+
+(js2-deftest-parse async-can-be-var-name
+  "var async = 3;")
+
+(js2-deftest-parse async-can-be-function-name
+  "function async() {\n}")
+
+(js2-deftest-parse await-can-be-name
+  "void await;")
+
+(js2-deftest-parse await-can-be-object-name
+  "await.z;")
+
+(js2-deftest-parse await-can-be-var-name
+  "var await = 3;")
+
+(js2-deftest-parse await-can-be-function-name
+  "function await() {\n}")
+
 ;;; Numbers
 
 (js2-deftest-parse decimal-starting-with-zero "081;" :reference "81;")
@@ -639,7 +802,7 @@ the test."
     (should export-node)
     (should (js2-var-decl-node-p (js2-export-node-declaration export-node)))))
 
-(js2-deftest export-class-declaration "export class Foo {};"
+(js2-deftest export-class-declaration "export class Foo {}"
   (js2-init-scanner)
   (js2-push-scope (make-js2-scope :pos 0))
   (should (js2-match-token js2-EXPORT))
@@ -647,7 +810,7 @@ the test."
     (should export-node)
     (should (js2-class-node-p (js2-export-node-declaration export-node)))))
 
-(js2-deftest export-function-declaration "export default function doStuff() 
{};"
+(js2-deftest export-function-declaration "export default function doStuff() {}"
   (js2-init-scanner)
   (js2-push-scope (make-js2-scope :pos 0))
   (should (js2-match-token js2-EXPORT))
@@ -655,7 +818,7 @@ the test."
     (should export-node)
     (should (js2-export-node-default export-node))))
 
-(js2-deftest export-generator-declaration "export default function* one() {};"
+(js2-deftest export-generator-declaration "export default function* one() {}"
   (js2-init-scanner)
   (js2-push-scope (make-js2-scope :pos 0))
   (should (js2-match-token js2-EXPORT))
@@ -672,24 +835,43 @@ the test."
     (should (js2-export-node-default export-node))))
 
 (js2-deftest export-function-no-semicolon "export default function foo() {}"
-  (js2-mode)
+  (js2-mode--and-parse)
   (should (equal nil js2-parsed-warnings)))
 (js2-deftest export-default-function-no-semicolon "export function foo() {}"
-  (js2-mode)
+  (js2-mode--and-parse)
   (should (equal nil js2-parsed-warnings)))
 (js2-deftest export-anything-else-does-require-a-semicolon "export var obj = 
{}"
-  (js2-mode)
+  (js2-mode--and-parse)
   (should (not (equal nil js2-parsed-warnings))))
 
+(js2-deftest export-default-async-function-no-semicolon "export default async 
function foo() {}"
+  (js2-mode--and-parse)
+  (should (equal nil js2-parsed-warnings)))
+(js2-deftest export-async-function-no-semicolon "export async function foo() 
{}"
+  (js2-mode--and-parse)
+  (should (equal nil js2-parsed-warnings)))
+
 (js2-deftest-parse parse-export-rexport "export * from 'other/lib';")
 (js2-deftest-parse parse-export-export-named-list "export {foo, bar as bang};")
 (js2-deftest-parse parse-re-export-named-list "export {foo, bar as bang} from 
'other/lib';")
 (js2-deftest-parse parse-export-const-declaration "export const PI = Math.PI;")
 (js2-deftest-parse parse-export-let-declaration "export let foo = [1];")
-(js2-deftest-parse parse-export-function-declaration "export default function 
doStuff() {};")
-(js2-deftest-parse parse-export-generator-declaration "export default 
function* one() {};")
+(js2-deftest-parse parse-export-function-declaration "export default function 
doStuff() {\n}")
+(js2-deftest-parse parse-export-generator-declaration "export default 
function* one() {\n}")
 (js2-deftest-parse parse-export-assignment-expression "export default a = b;")
 
+(js2-deftest-parse parse-export-function-declaration-no-semi
+  "export function f() {\n}")
+
+(js2-deftest-parse parse-export-class-declaration-no-semi
+  "export class C {\n}")
+
+(js2-deftest-parse parse-export-async-function-allow-await
+  "export async function f() {\n  await f();\n}")
+
+(js2-deftest-parse parse-export-default-async-function-allow-await
+  "export default async function f() {\n  await f();\n}")
+
 ;;; Strings
 
 (js2-deftest-parse string-literal
@@ -749,10 +931,13 @@ the test."
 (js2-deftest-parse parse-class-keywordlike-method
   "class C {\n  delete() {}\n  if() {}\n}")
 
+(js2-deftest-parse parse-harmony-class-allow-semicolon-element
+  "class Foo {;}" :reference "class Foo {\n}")
+
 ;;; Scopes
 
 (js2-deftest ast-symbol-table-includes-fn-node "function foo() {}"
-  (js2-mode)
+  (js2-mode--and-parse)
   (let ((entry (js2-scope-get-symbol js2-mode-ast 'foo)))
     (should (= (js2-symbol-decl-type entry) js2-FUNCTION))
     (should (equal (js2-symbol-name entry) "foo"))
@@ -762,7 +947,7 @@ the test."
   function bar() {}
   var x;
 }"
-  (js2-mode)
+  (js2-mode--and-parse)
   (let* ((scope (js2-node-at-point (point-min)))
          (fn-entry (js2-scope-get-symbol scope 'bar))
          (var-entry (js2-scope-get-symbol scope 'x)))
@@ -780,36 +965,26 @@ the test."
     (should (funcall predicate (js2-get-defining-scope scope variable)))))
 
 (js2-deftest for-node-is-declaration-scope "for (let i = 0; i; ++i) {};"
-  (js2-mode)
+  (js2-mode--and-parse)
   (js2-test-scope-of-nth-variable-satisifies-predicate "i" 0 #'js2-for-node-p))
 
-(js2-deftest const-scope-sloppy-script "{const a;} a;"
-  (js2-mode)
-  (js2-test-scope-of-nth-variable-satisifies-predicate "a" 0 
#'js2-script-node-p)
-  (js2-test-scope-of-nth-variable-satisifies-predicate "a" 1 
#'js2-script-node-p))
-
-(js2-deftest const-scope-strict-script "'use strict'; { const a; } a;"
-  (js2-mode)
+(js2-deftest const-scope-inside-script "{ const a; } a;"
+  (js2-mode--and-parse)
   (js2-test-scope-of-nth-variable-satisifies-predicate "a" 0 
#'js2-block-node-p)
   (js2-test-scope-of-nth-variable-satisifies-predicate "a" 1 #'null))
 
-(js2-deftest const-scope-sloppy-function "function f() { { const a; } a; }"
-  (js2-mode)
-  (js2-test-scope-of-nth-variable-satisifies-predicate "a" 0 
#'js2-function-node-p)
-  (js2-test-scope-of-nth-variable-satisifies-predicate "a" 1 
#'js2-function-node-p))
-
-(js2-deftest const-scope-strict-function "function f() { 'use strict'; { const 
a; } a; }"
-  (js2-mode)
+(js2-deftest const-scope-inside-function "function f() { { const a; } a; }"
+  (js2-mode--and-parse)
   (js2-test-scope-of-nth-variable-satisifies-predicate "a" 0 
#'js2-block-node-p)
   (js2-test-scope-of-nth-variable-satisifies-predicate "a" 1 #'null))
 
 (js2-deftest array-comp-is-result-scope "[x * 2 for (x in y)];"
-  (js2-mode)
+  (js2-mode--and-parse)
   (js2-test-scope-of-nth-variable-satisifies-predicate "x" 0 
#'js2-comp-loop-node-p))
 
 (js2-deftest array-comp-has-parent-scope
              "var a,b=[for (i of [[1,2]]) for (j of i) j * a];"
-  (js2-mode)
+  (js2-mode--and-parse)
   (search-forward "for")
   (forward-char -3)
   (let ((node (js2-node-at-point)))
@@ -879,23 +1054,23 @@ the test."
 ;;; Error handling
 
 (js2-deftest for-node-with-error-len "for "
-  (js2-mode)
+  (js2-mode--and-parse)
   (let ((node (js2-node-at-point (point-min))))
     (should (= (js2-node-len (js2-node-parent node)) 4))))
 
 (js2-deftest function-without-parens-error "function b {}"
   ;; Should finish the parse.
-  (js2-mode))
+  (js2-mode--and-parse))
 
 ;;; Comments
 
 (js2-deftest comment-node-length "//"
-  (js2-mode)
+  (js2-mode--and-parse)
   (let ((node (js2-node-at-point (point-min))))
     (should (= (js2-node-len node) 2))))
 
 (js2-deftest comment-node-length-newline "//\n"
-  (js2-mode)
+  (js2-mode--and-parse)
   (let ((node (js2-node-at-point (point-min))))
     (should (= (js2-node-len node) 3))))
 
@@ -934,7 +1109,7 @@ the test."
          (insert ,buffer-contents))
        (unwind-protect
            (progn
-             (js2-mode)
+             (js2-mode--and-parse)
              (should (equal ,summary (js2--variables-summary
                                       (js2--classify-variables)))))
          (fundamental-mode)))))
diff --git a/packages/landmark/landmark.el b/packages/landmark/landmark.el
index f3b5b8c..9b48901 100644
--- a/packages/landmark/landmark.el
+++ b/packages/landmark/landmark.el
@@ -1,11 +1,11 @@
 ;;; landmark.el --- Neural-network robot that learns landmarks  -*- 
lexical-binding:t -*-
 
-;; Copyright (C) 1996-1997, 2000-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1997, 2000-2016 Free Software Foundation, Inc.
 
 ;; Author: Terrence Brannon (was: <address@hidden>)
 ;; Created: December 16, 1996 - first release to usenet
 ;; Keywords: games, neural network, adaptive search, chemotaxis
-;; Maintainer: No maintainer - help wanted.
+;; Maintainer: address@hidden
 ;; Version: 1.0
 
 ;; This file is part of GNU Emacs.
@@ -864,7 +864,7 @@ If the game is finished, this command requests for another 
game."
   (move-to-column (+ landmark-x-offset (* landmark-square-width (1- x)))))
 
 (defun landmark-plot-square (square value)
-  "Draw 'X', 'O' or '.' on SQUARE depending on VALUE, leave point there."
+  "Draw `X', `O' or `.' on SQUARE depending on VALUE, leave point there."
   (or (= value 1)
       (landmark-goto-square square))
   (let ((inhibit-read-only t))
diff --git a/packages/lmc/lmc.el b/packages/lmc/lmc.el
index b8c8ee0..ac7c52c 100644
--- a/packages/lmc/lmc.el
+++ b/packages/lmc/lmc.el
@@ -1,9 +1,10 @@
 ;;; lmc.el --- Little Man Computer in Elisp  -*- lexical-binding:t -*-
 
-;; Copyright (C) 2011, 2013, 2014  Free Software Foundation, Inc.
+;; Copyright (C) 2011, 2013, 2014, 2016  Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <address@hidden>
-;; Version: 1.3
+;; Version: 1.4
+;; Package-Requires ((emacs "24") (cl-lib "0.5"))
 
 ;; 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
@@ -61,7 +62,7 @@
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 (require 'hexl)
 
 (defgroup lmc ()
@@ -162,7 +163,7 @@ Also, when nil, evaluation is interrupted when the user 
hits a key.")
                  (car (rassq pos labels)) cmd))
          (t (setq pos cmd))))
        ((and cmd (symbolp cmd))
-        ;; (assert (symbolp cmd))
+        ;; (cl-assert (symbolp cmd))
         (if (assq cmd labels)
             (error "Duplicate label %S" cmd)
           (push (cons cmd pos) labels)))))
@@ -192,7 +193,7 @@ Also, when nil, evaluation is interrupted when the user 
hits a key.")
           (dotimes (_ (- cmd (length words)))
             (funcall newword 0)))
          ((and cmd (symbolp cmd))
-          (assert (eq (cdr (assq cmd labels)) (length words)))
+          (cl-assert (eq (cdr (assq cmd labels)) (length words)))
           (setq ll cmd))
          (t (error "Invalid instruction %S" cmd))))
       (nreverse words))))
@@ -200,7 +201,7 @@ Also, when nil, evaluation is interrupted when the user 
hits a key.")
 ;; (defvar lmc-label-width 8)
 
 (defun lmc--load-word (word addr)
-  (assert (bolp))
+  (cl-assert (bolp))
   (insert (propertize (format " %02d:\t" addr)
                       'read-only t
                       'front-sticky t
@@ -310,8 +311,8 @@ Also, when nil, evaluation is interrupted when the user 
hits a key.")
         (when (integerp (nth 1 code))
           (let* ((addr (nth 1 code))
                  (label (lmc-get-label addr)))
-            (pushnew (lmc-point->addr)
-                     (cdr (aref lmc-label-table addr)))
+            (cl-pushnew (lmc-point->addr)
+                        (cdr (aref lmc-label-table addr)))
             (when label
               (setf (nth 1 code) label))))
         (put-text-property
@@ -569,36 +570,36 @@ Also, when nil, evaluation is interrupted when the user 
hits a key.")
   (interactive)
   (let* ((inst (lmc-get-word lmc-pc 'fix))
          (code (lmc-disassemble-word inst)))
-    (case (car code)
-      (HLT (if (lmc-stopped-p)
+    (pcase (car code)
+      (`HLT (if (lmc-stopped-p)
                (error "Already halted")
              (setq lmc--stopped (lmc--state))
              (force-mode-line-update)
              (message "Done.")))
-      (IN (setq lmc-acc (mod (read-number "Enter a number: ") 1000))
-          (incf lmc-pc))
-      (OUT (message "Output: %03d" lmc-acc)
+      (`IN (setq lmc-acc (mod (read-number "Enter a number: ") 1000))
+          (cl-incf lmc-pc))
+      (`OUT (message "Output: %03d" lmc-acc)
            (push (format "%03d" lmc-acc) lmc-output)
-           (incf lmc-pc))
-      (LDA (setq lmc-acc (lmc-get-word (nth 1 code)))
-           (incf lmc-pc))
-      (STO (lmc-store-word (nth 1 code) lmc-acc)
-           (incf lmc-pc))
-      (ADD (setq lmc-acc (mod (+ lmc-acc (lmc-get-word (nth 1 code)))
+           (cl-incf lmc-pc))
+      (`LDA (setq lmc-acc (lmc-get-word (nth 1 code)))
+           (cl-incf lmc-pc))
+      (`STO (lmc-store-word (nth 1 code) lmc-acc)
+           (cl-incf lmc-pc))
+      (`ADD (setq lmc-acc (mod (+ lmc-acc (lmc-get-word (nth 1 code)))
                               1000))
-           (incf lmc-pc))
-      (SUB (setq lmc-acc (mod (- lmc-acc (lmc-get-word (nth 1 code)))
+           (cl-incf lmc-pc))
+      (`SUB (setq lmc-acc (mod (- lmc-acc (lmc-get-word (nth 1 code)))
                               1000))
-           (incf lmc-pc))
-      (BR (setq lmc-pc (nth 1 code)))
-      (BRZ (setq lmc-pc (if (zerop lmc-acc)
+           (cl-incf lmc-pc))
+      (`BR (setq lmc-pc (nth 1 code)))
+      (`BRZ (setq lmc-pc (if (zerop lmc-acc)
                             (nth 1 code)
                           (1+ lmc-pc))))
-      (BRP (setq lmc-pc (if (< lmc-acc 500)
+      (`BRP (setq lmc-pc (if (< lmc-acc 500)
                             (nth 1 code)
                           (1+ lmc-pc))))
-      ((nil) (error "Invalid instruction %S" inst))
-      (t (error "%S not implemented" code))))
+      (`nil (error "Invalid instruction %S" inst))
+      (_ (error "%S not implemented" code))))
   (lmc-update-pc))
 
 (defun lmc-run ()
diff --git a/packages/load-relative/load-relative.el 
b/packages/load-relative/load-relative.el
index 2c96135..0605f17 100644
--- a/packages/load-relative/load-relative.el
+++ b/packages/load-relative/load-relative.el
@@ -291,11 +291,11 @@ strings, each string being the relative name of file you 
want to run."
   "Call `provide' with the feature's symbol name made from
 source-code's file basename sans extension.  For example if you
 write (provide-me) inside file ~/lisp/foo.el, this is the same as
-writing: (provide 'foo).
+writing: (provide \\='foo).
 
 With a prefix, that prefix is prepended to the `provide' So in
 the previous example, if you write (provide-me \"bar-\") this is the
-same as writing (provide 'bar-foo)."
+same as writing (provide \\='bar-foo)."
   `(provide (intern (concat ,prefix (file-name-sans-extension
                                      (file-name-nondirectory (__FILE__)))))))
 
diff --git 
a/packages/load-relative/test/subdir/test-require-list-from-subdir.el 
b/packages/load-relative/test/subdir/test-require-list-from-subdir.el
index 880b4f3..cf4a91f 100644
--- a/packages/load-relative/test/subdir/test-require-list-from-subdir.el
+++ b/packages/load-relative/test/subdir/test-require-list-from-subdir.el
@@ -1,4 +1,6 @@
-;; Copyright (C) 2015 Free Software Foundation, Inc
+;; Can't find the "test-unit" package, so: -*- no-byte-compile:t -*-
+
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
 
 ;; Author: Rocky Bernstein <address@hidden>
 
diff --git a/packages/loc-changes/loc-changes.el 
b/packages/loc-changes/loc-changes.el
index a269c0a..4e3660b 100644
--- a/packages/loc-changes/loc-changes.el
+++ b/packages/loc-changes/loc-changes.el
@@ -1,6 +1,6 @@
 ;;; loc-changes.el --- keep track of positions even after buffer changes
 
-;; Copyright (C) 2015 Free Software Foundation, Inc
+;; Copyright (C) 2015, 2016 Free Software Foundation, Inc
 
 ;; Author: Rocky Bernstein <address@hidden>
 ;; Version: 1.2
@@ -35,17 +35,19 @@
 
 ;;; Code:
 
+(eval-when-compile (require 'cl))
+
 (make-variable-buffer-local 'loc-changes-alist)
 (defvar loc-changes-alist '()
   "A buffer-local association-list (alist) of line numbers and
-their corresponding markers in the buffer. The 'key' is the line number; the 
value
-the marker"
-  )
+their corresponding markers in the buffer. The key is the line
+number; the a list of value the marker and the initial 10
+characters after that mark" )
 
 (defun loc-changes:follow-mark(event)
   (interactive "e")
   (let* ((pos (posn-point (event-end event)))
-        (mark (get-text-property pos 'mark)))
+        (mark (car (get-text-property pos 'mark))))
     (switch-to-buffer-other-window  (marker-buffer mark))
     (goto-char (marker-position mark))
     ))
@@ -68,17 +70,17 @@ internal buffer called *Describe*."
     (dolist (assoc alist)
          (put-text-property
           (insert-text-button
-           (format "line %d: %s\n" (car assoc) (cdr assoc))
+           (format "line %d: %s" (car assoc) (cadr assoc))
            'action 'loc-changes:follow-mark
            'help-echo "mouse-2: go to this location")
           (point)
           'mark (cdr assoc)
            )
+         (insert (format ":\t%s\n" (cl-caddr assoc)))
          )
     (setq buffer-read-only 't)
     ))
 
-;;;###autoload
 (defun loc-changes-goto-line (line-number &optional column-number)
   "Position `point' at LINE-NUMBER of the current buffer. If
 COLUMN-NUMBER is given, position `point' at that column just
@@ -87,7 +89,7 @@ the line starts at column 0, so the column number display 
will be one less
 than COLUMN-NUMBER. For example COLUMN-NUMBER 1 will set before the first
 column on the line and show 0.
 
-The Emacs `goto-line' docstring says it is the wrong to use that
+The Emacs `goto-line' docstring says it is wrong to use that
 function in a Lisp program. So here is something that I proclaim
 is okay to use in a Lisp program."
   (interactive
@@ -155,9 +157,9 @@ is okay to use in a Lisp program."
   "Add an element `loc-changes-alist'. The car will be POS and a
 marker for it will be created at the point."
   (setq loc-changes-alist
-       (cons (cons pos (point-marker)) loc-changes-alist)))
+       (cons (cons pos (list (point-marker) (buffer-substring (point) 
(point-at-eol))))
+                   loc-changes-alist)))
 
-;;;###autoload
 (defun loc-changes-add-and-goto (line-number &optional opt-buffer)
   "Add a marker at LINE-NUMBER and record LINE-NUMBER and its
 marker association in `loc-changes-alist'."
@@ -194,7 +196,6 @@ marker association in `loc-changes-alist'."
       ))
   )
 
-;;;###autoload
 (defun loc-changes-clear-buffer (&optional opt-buffer)
   "Remove all location-tracking associations in BUFFER."
   (interactive "bbuffer: ")
@@ -205,7 +206,6 @@ marker association in `loc-changes-alist'."
       ))
   )
 
-;;;###autoload
 (defun loc-changes-reset-position (&optional opt-buffer no-insert)
   "Update `loc-changes-alist' so that the line number of point is
 used to when aline number is requested.
@@ -223,7 +223,8 @@ so that its positions are will be reflected."
          )
       (with-current-buffer buffer
        (if elt
-           (setcdr elt (point))
+           (setcdr elt
+                   (list (point-marker) (buffer-substring (point) 
(point-at-eol))))
          (unless no-insert
            (loc-changes-add-elt line-number)
            )
@@ -232,23 +233,24 @@ so that its positions are will be reflected."
     ))
 
 
-(defun loc-changes-goto (position &optional opt-buffer no-update)
-  "Go to the position inside BUFFER taking into account the
-previous location marks. Normally if the position hasn't been
-seen before, we will add a new mark for this position. However if
+(defun loc-changes-goto (line-number &optional opt-buffer no-update)
+  "Go to the LINE-NUMBER inside OPT-BUFFER taking into account the
+previous line-number marks. Normally if the line-number hasn't been
+seen before, we will add a new mark for this line-number. However if
 NO-UPDATE is set, no mark is added."
-  (unless (wholenump position)
+  ;;; FIXME: opt-buffer is not used
+  (unless (wholenump line-number)
     (error "Expecting line-number parameter `%s' to be a whole number"
-          position))
-  (let ((elt (assq position loc-changes-alist)))
+          line-number))
+  (let ((elt (assq line-number loc-changes-alist)))
     (if elt
-       (let ((marker (cdr elt)))
+       (let ((marker (cadr elt)))
          (unless (markerp marker)
            (error "Internal error: loc-changes-alist is not a marker"))
          (goto-char (marker-position marker)))
       (if no-update
-         (loc-changes-goto-line position)
-       (loc-changes-add-and-goto position))
+         (loc-changes-goto-line line-number)
+       (loc-changes-add-and-goto line-number))
       )
     )
   )
diff --git a/packages/loc-changes/test/Makefile.am 
b/packages/loc-changes/test/Makefile.am
index 48f7f72..2d6a227 100644
--- a/packages/loc-changes/test/Makefile.am
+++ b/packages/loc-changes/test/Makefile.am
@@ -49,7 +49,7 @@ check: $(CHECK_FILES)
 
 #: Run all tests via el-get
 check-elget:
-       (cd $(top_srcdir)/test && $(EMACS) --batch --no-site-file --no-splash 
--load ./install-pkgs.el --load test-basic.el)
+       (cd $(top_srcdir)/test && $(EMACS) --batch --no-site-file --no-splash 
--load ../el-get-install.el --load test-basic.el)
 
 #: Run all tests with minimum verbosity
 check-short:
diff --git a/packages/math-symbol-lists/.dir-locals.el 
b/packages/math-symbol-lists/.dir-locals.el
new file mode 100644
index 0000000..064a938
--- /dev/null
+++ b/packages/math-symbol-lists/.dir-locals.el
@@ -0,0 +1,3 @@
+
+((emacs-lisp-mode
+  (indent-tabs-mode)))
diff --git a/packages/math-symbol-lists/.gitignore 
b/packages/math-symbol-lists/.gitignore
index 9b4291b..10facf0 100644
--- a/packages/math-symbol-lists/.gitignore
+++ b/packages/math-symbol-lists/.gitignore
@@ -1,5 +1,5 @@
 # Compiled
 *.elc
-
 # Packaging
 .cask
+data/
\ No newline at end of file
diff --git a/packages/math-symbol-lists/math-symbol-lists.el 
b/packages/math-symbol-lists/math-symbol-lists.el
index 414742a..4502c9c 100644
--- a/packages/math-symbol-lists/math-symbol-lists.el
+++ b/packages/math-symbol-lists/math-symbol-lists.el
@@ -4,7 +4,7 @@
 ;; Author: Vitalie Spinu <address@hidden>
 ;; URL: https://github.com/vspinu/math-symbol-lists
 ;; Keywords: Unicode, symbols, mathematics
-;; Version: 1.0
+;; Version: 1.1
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
@@ -560,2449 +560,2447 @@
     ("AMS/Special"     "\\substack")
     ("AMS/Special"     "\\subarray")
     ("AMS/Special"     "\\sideset"))
-  "List of basic mathematical symbols.")
+  "List of basic mathematical symbols.
+Processed from `LaTeX-math-default' in AucTeX/latex.el. This list
+contains a mapping of standard LaTeX math commands to unicode
+characters. See also `math-symbol-list-extended'.")
 
 (defconst math-symbol-list-extended
-  '(("punct"   "\\exclam"      #X21)
-    ("ord"     "\\octothorpe"  #X23)
-    ("ord"     "\\mathdollar"  #X24)
-    ("ord"     "\\percent"     #X25)
-    ("ord"     "\\ampersand"   #X26)
-    ("open"    "\\lparen"      #X28)
-    ("close"   "\\rparen"      #X29)
-    ("bin"     "\\plus"        #X2B)
-    ("punct"   "\\comma"       #X2C)
-    ("alpha"   "\\period"      #X2E)
-    ("ord"     "\\mathslash"   #X2F)
-    ("punct"   "\\mathcolon"   #X3A)
-    ("punct"   "\\semicolon"   #X3B)
-    ("rel"     "\\less"        #X3C)
-    ("rel"     "\\equal"       #X3D)
-    ("rel"     "\\greater"     #X3E)
-    ("ord"     "\\question"    #X3F)
-    ("ord"     "\\atsign"      #X40)
-    ("open"    "\\lbrack"      #X5B)
-    ("ord"     "\\backslash"   #X5C)
-    ("close"   "\\rbrack"      #X5D)
-    ("open"    "\\lbrace"      #X7B)
-    ("close"   "\\rbrace"      #X7D)
-    ("ord"     "\\sterling"    #XA3)
-    ("ord"     "\\yen" #XA5)
-    ("ord"     "\\neg" #XAC)
-    ("bin"     "\\pm"  #XB1)
-    ("bin"     "\\cdotp"       #XB7)
-    ("bin"     "\\times"       #XD7)
-    ("alpha"   "\\matheth"     #XF0)
-    ("bin"     "\\div" #XF7)
-    ("ord"     "\\Zbar"        #X1B5)
-    ("accent"  "\\grave"       #X300)
-    ("accent"  "\\acute"       #X301)
-    ("accent"  "\\hat" #X302)
-    ("accent"  "\\tilde"       #X303)
-    ("accent"  "\\bar" #X304)
-    ("accent"  "\\overbar"     #X305)
-    ("accent"  "\\breve"       #X306)
-    ("accent"  "\\dot" #X307)
-    ("accent"  "\\ddot"        #X308)
-    ("accent"  "\\ovhook"      #X309)
-    ("accent"  "\\ocirc"       #X30A)
-    ("accent"  "\\check"       #X30C)
-    ("accent"  "\\candra"      #X310)
-    ("accent"  "\\oturnedcomma"        #X312)
-    ("accent"  "\\ocommatopright"      #X315)
-    ("accent"  "\\droang"      #X31A)
-    ("accent"  "\\wideutilde"  #X330)
-    ("accent"  "\\underbar"    #X331)
-    ("accent"  "\\not" #X338)
-    ("alpha"   "\\upAlpha"     #X391)
-    ("alpha"   "\\upBeta"      #X392)
-    ("alpha"   "\\upGamma"     #X393)
-    ("alpha"   "\\upDelta"     #X394)
-    ("alpha"   "\\upEpsilon"   #X395)
-    ("alpha"   "\\upZeta"      #X396)
-    ("alpha"   "\\upEta"       #X397)
-    ("alpha"   "\\upTheta"     #X398)
-    ("alpha"   "\\upIota"      #X399)
-    ("alpha"   "\\upKappa"     #X39A)
-    ("alpha"   "\\upLambda"    #X39B)
-    ("alpha"   "\\upMu"        #X39C)
-    ("alpha"   "\\upNu"        #X39D)
-    ("alpha"   "\\upXi"        #X39E)
-    ("alpha"   "\\upOmicron"   #X39F)
-    ("alpha"   "\\upPi"        #X3A0)
-    ("alpha"   "\\upRho"       #X3A1)
-    ("alpha"   "\\upSigma"     #X3A3)
-    ("alpha"   "\\upTau"       #X3A4)
-    ("alpha"   "\\upUpsilon"   #X3A5)
-    ("alpha"   "\\upPhi"       #X3A6)
-    ("alpha"   "\\upChi"       #X3A7)
-    ("alpha"   "\\upPsi"       #X3A8)
-    ("alpha"   "\\upOmega"     #X3A9)
-    ("alpha"   "\\upalpha"     #X3B1)
-    ("alpha"   "\\upbeta"      #X3B2)
-    ("alpha"   "\\upgamma"     #X3B3)
-    ("alpha"   "\\updelta"     #X3B4)
-    ("alpha"   "\\upepsilon"   #X3B5)
-    ("alpha"   "\\upzeta"      #X3B6)
-    ("alpha"   "\\upeta"       #X3B7)
-    ("alpha"   "\\uptheta"     #X3B8)
-    ("alpha"   "\\upiota"      #X3B9)
-    ("alpha"   "\\upkappa"     #X3BA)
-    ("alpha"   "\\uplambda"    #X3BB)
-    ("alpha"   "\\upmu"        #X3BC)
-    ("alpha"   "\\upnu"        #X3BD)
-    ("alpha"   "\\upxi"        #X3BE)
-    ("alpha"   "\\upomicron"   #X3BF)
-    ("alpha"   "\\uppi"        #X3C0)
-    ("alpha"   "\\uprho"       #X3C1)
-    ("alpha"   "\\upvarsigma"  #X3C2)
-    ("alpha"   "\\upsigma"     #X3C3)
-    ("alpha"   "\\uptau"       #X3C4)
-    ("alpha"   "\\upupsilon"   #X3C5)
-    ("alpha"   "\\upvarphi"    #X3C6)
-    ("alpha"   "\\upchi"       #X3C7)
-    ("alpha"   "\\uppsi"       #X3C8)
-    ("alpha"   "\\upomega"     #X3C9)
-    ("alpha"   "\\upvarbeta"   #X3D0)
-    ("alpha"   "\\upvartheta"  #X3D1)
-    ("alpha"   "\\upUpsilon"   #X3D2)
-    ("alpha"   "\\upphi"       #X3D5)
-    ("alpha"   "\\upvarpi"     #X3D6)
-    ("ord"     "\\upoldKoppa"  #X3D8)
-    ("ord"     "\\upoldkoppa"  #X3D9)
-    ("alpha"   "\\upStigma"    #X3DA)
-    ("alpha"   "\\upstigma"    #X3DB)
-    ("alpha"   "\\upDigamma"   #X3DC)
-    ("alpha"   "\\updigamma"   #X3DD)
-    ("alpha"   "\\upKoppa"     #X3DE)
-    ("alpha"   "\\upkoppa"     #X3DF)
-    ("alpha"   "\\upSampi"     #X3E0)
-    ("alpha"   "\\upsampi"     #X3E1)
-    ("alpha"   "\\upvarkappa"  #X3F0)
-    ("alpha"   "\\upvarrho"    #X3F1)
-    ("alpha"   "\\upvarTheta"  #X3F4)
-    ("alpha"   "\\upvarepsilon"        #X3F5)
-    ("ord"     "\\upbackepsilon"       #X3F6)
-    ("ord"     "\\horizbar"    #X2015)
-    ("fence"   "\\Vert"        #X2016)
-    ("ord"     "\\twolowline"  #X2017)
-    ("bin"     "\\dagger"      #X2020)
-    ("bin"     "\\ddagger"     #X2021)
-    ("bin"     "\\smblkcircle" #X2022)
-    ("ord"     "\\enleadertwodots"     #X2025)
-    ("ord"     "\\unicodeellipsis"     #X2026)
-    ("ord"     "\\prime"       #X2032)
-    ("ord"     "\\dprime"      #X2033)
-    ("ord"     "\\trprime"     #X2034)
-    ("ord"     "\\backprime"   #X2035)
-    ("ord"     "\\backdprime"  #X2036)
-    ("ord"     "\\backtrprime" #X2037)
-    ("ord"     "\\caretinsert" #X2038)
-    ("ord"     "\\Exclam"      #X203C)
-    ("bin"     "\\tieconcat"   #X2040)
-    ("ord"     "\\hyphenbullet"        #X2043)
-    ("bin"     "\\fracslash"   #X2044)
-    ("ord"     "\\Question"    #X2047)
-    ("rel"     "\\closure"     #X2050)
-    ("ord"     "\\qprime"      #X2057)
-    ("ord"     "\\euro"        #X20AC)
-    ("accent"  "\\leftharpoonaccent"   #X20D0)
-    ("accent"  "\\rightharpoonaccent"  #X20D1)
-    ("accent"  "\\vertoverlay" #X20D2)
-    ("accent"  "\\overleftarrow"       #X20D6)
-    ("accent"  "\\vec" #X20D7)
-    ("accent"  "\\dddot"       #X20DB)
-    ("accent"  "\\ddddot"      #X20DC)
-    ("ord"     "\\enclosecircle"       #X20DD)
-    ("ord"     "\\enclosesquare"       #X20DE)
-    ("ord"     "\\enclosediamond"      #X20DF)
-    ("accent"  "\\overleftrightarrow"  #X20E1)
-    ("ord"     "\\enclosetriangle"     #X20E4)
-    ("accent"  "\\annuity"     #X20E7)
-    ("accent"  "\\threeunderdot"       #X20E8)
-    ("accent"  "\\widebridgeabove"     #X20E9)
-    ("accent"  "\\underrightharpoondown"       #X20EC)
-    ("accent"  "\\underleftharpoondown"        #X20ED)
-    ("accent"  "\\underleftarrow"      #X20EE)
-    ("accent"  "\\underrightarrow"     #X20EF)
-    ("accent"  "\\asteraccent" #X20F0)
-    ("alpha"   "\\BbbC"        #X2102)
-    ("ord"     "\\Eulerconst"  #X2107)
-    ("alpha"   "\\mscrg"       #X210A)
-    ("alpha"   "\\mscrH"       #X210B)
-    ("alpha"   "\\mfrakH"      #X210C)
-    ("alpha"   "\\BbbH"        #X210D)
-    ("ord"     "\\Planckconst" #X210E)
-    ("alpha"   "\\hslash"      #X210F)
-    ("alpha"   "\\mscrI"       #X2110)
-    ("alpha"   "\\Im"  #X2111)
-    ("alpha"   "\\mscrL"       #X2112)
-    ("alpha"   "\\ell" #X2113)
-    ("alpha"   "\\BbbN"        #X2115)
-    ("alpha"   "\\wp"  #X2118)
-    ("alpha"   "\\BbbP"        #X2119)
-    ("alpha"   "\\BbbQ"        #X211A)
-    ("alpha"   "\\mscrR"       #X211B)
-    ("alpha"   "\\Re"  #X211C)
-    ("alpha"   "\\BbbR"        #X211D)
-    ("alpha"   "\\BbbZ"        #X2124)
-    ("ord"     "\\mho" #X2127)
-    ("alpha"   "\\mfrakZ"      #X2128)
-    ("alpha"   "\\turnediota"  #X2129)
-    ("alpha"   "\\Angstrom"    #X212B)
-    ("alpha"   "\\mscrB"       #X212C)
-    ("alpha"   "\\mfrakC"      #X212D)
-    ("alpha"   "\\mscre"       #X212F)
-    ("alpha"   "\\mscrE"       #X2130)
-    ("alpha"   "\\mscrF"       #X2131)
-    ("ord"     "\\Finv"        #X2132)
-    ("alpha"   "\\mscrM"       #X2133)
-    ("alpha"   "\\mscro"       #X2134)
-    ("alpha"   "\\aleph"       #X2135)
-    ("alpha"   "\\beth"        #X2136)
-    ("alpha"   "\\gimel"       #X2137)
-    ("alpha"   "\\daleth"      #X2138)
-    ("ord"     "\\Bbbpi"       #X213C)
-    ("alpha"   "\\Bbbgamma"    #X213D)
-    ("alpha"   "\\BbbGamma"    #X213E)
-    ("alpha"   "\\BbbPi"       #X213F)
-    ("op"      "\\Bbbsum"      #X2140)
-    ("ord"     "\\Game"        #X2141)
-    ("ord"     "\\sansLturned" #X2142)
-    ("ord"     "\\sansLmirrored"       #X2143)
-    ("ord"     "\\Yup" #X2144)
-    ("ord"     "\\mitBbbD"     #X2145)
-    ("ord"     "\\mitBbbd"     #X2146)
-    ("ord"     "\\mitBbbe"     #X2147)
-    ("ord"     "\\mitBbbi"     #X2148)
-    ("ord"     "\\mitBbbj"     #X2149)
-    ("ord"     "\\PropertyLine"        #X214A)
-    ("bin"     "\\upand"       #X214B)
-    ("rel"     "\\leftarrow"   #X2190)
-    ("rel"     "\\uparrow"     #X2191)
-    ("rel"     "\\rightarrow"  #X2192)
-    ("rel"     "\\downarrow"   #X2193)
-    ("rel"     "\\leftrightarrow"      #X2194)
-    ("rel"     "\\updownarrow" #X2195)
-    ("rel"     "\\nwarrow"     #X2196)
-    ("rel"     "\\nearrow"     #X2197)
-    ("rel"     "\\searrow"     #X2198)
-    ("rel"     "\\swarrow"     #X2199)
-    ("rel"     "\\nleftarrow"  #X219A)
-    ("rel"     "\\nrightarrow" #X219B)
-    ("rel"     "\\leftwavearrow"       #X219C)
-    ("rel"     "\\rightwavearrow"      #X219D)
-    ("rel"     "\\twoheadleftarrow"    #X219E)
-    ("rel"     "\\twoheaduparrow"      #X219F)
-    ("rel"     "\\twoheadrightarrow"   #X21A0)
-    ("rel"     "\\twoheaddownarrow"    #X21A1)
-    ("rel"     "\\leftarrowtail"       #X21A2)
-    ("rel"     "\\rightarrowtail"      #X21A3)
-    ("rel"     "\\mapsfrom"    #X21A4)
-    ("rel"     "\\mapsup"      #X21A5)
-    ("rel"     "\\mapsto"      #X21A6)
-    ("rel"     "\\mapsdown"    #X21A7)
-    ("ord"     "\\updownarrowbar"      #X21A8)
-    ("rel"     "\\hookleftarrow"       #X21A9)
-    ("rel"     "\\hookrightarrow"      #X21AA)
-    ("rel"     "\\looparrowleft"       #X21AB)
-    ("rel"     "\\looparrowright"      #X21AC)
-    ("rel"     "\\leftrightsquigarrow" #X21AD)
-    ("rel"     "\\nleftrightarrow"     #X21AE)
-    ("rel"     "\\downzigzagarrow"     #X21AF)
-    ("rel"     "\\Lsh" #X21B0)
-    ("rel"     "\\Rsh" #X21B1)
-    ("rel"     "\\Ldsh"        #X21B2)
-    ("rel"     "\\Rdsh"        #X21B3)
-    ("ord"     "\\linefeed"    #X21B4)
-    ("ord"     "\\carriagereturn"      #X21B5)
-    ("rel"     "\\curvearrowleft"      #X21B6)
-    ("rel"     "\\curvearrowright"     #X21B7)
-    ("ord"     "\\barovernorthwestarrow"       #X21B8)
-    ("ord"     "\\barleftarrowrightarrowbar"   #X21B9)
-    ("ord"     "\\acwopencirclearrow"  #X21BA)
-    ("ord"     "\\cwopencirclearrow"   #X21BB)
-    ("rel"     "\\leftharpoonup"       #X21BC)
-    ("rel"     "\\leftharpoondown"     #X21BD)
-    ("rel"     "\\upharpoonright"      #X21BE)
-    ("rel"     "\\upharpoonleft"       #X21BF)
-    ("rel"     "\\rightharpoonup"      #X21C0)
-    ("rel"     "\\rightharpoondown"    #X21C1)
-    ("rel"     "\\downharpoonright"    #X21C2)
-    ("rel"     "\\downharpoonleft"     #X21C3)
-    ("rel"     "\\rightleftarrows"     #X21C4)
-    ("rel"     "\\updownarrows"        #X21C5)
-    ("rel"     "\\leftrightarrows"     #X21C6)
-    ("rel"     "\\leftleftarrows"      #X21C7)
-    ("rel"     "\\upuparrows"  #X21C8)
-    ("rel"     "\\rightrightarrows"    #X21C9)
-    ("rel"     "\\downdownarrows"      #X21CA)
-    ("rel"     "\\leftrightharpoons"   #X21CB)
-    ("rel"     "\\rightleftharpoons"   #X21CC)
-    ("rel"     "\\nLeftarrow"  #X21CD)
-    ("rel"     "\\nLeftrightarrow"     #X21CE)
-    ("rel"     "\\nRightarrow" #X21CF)
-    ("rel"     "\\Leftarrow"   #X21D0)
-    ("rel"     "\\Uparrow"     #X21D1)
-    ("rel"     "\\Rightarrow"  #X21D2)
-    ("rel"     "\\Downarrow"   #X21D3)
-    ("rel"     "\\Leftrightarrow"      #X21D4)
-    ("rel"     "\\Updownarrow" #X21D5)
-    ("rel"     "\\Nwarrow"     #X21D6)
-    ("rel"     "\\Nearrow"     #X21D7)
-    ("rel"     "\\Searrow"     #X21D8)
-    ("rel"     "\\Swarrow"     #X21D9)
-    ("rel"     "\\Lleftarrow"  #X21DA)
-    ("rel"     "\\Rrightarrow" #X21DB)
-    ("rel"     "\\leftsquigarrow"      #X21DC)
-    ("rel"     "\\rightsquigarrow"     #X21DD)
-    ("ord"     "\\nHuparrow"   #X21DE)
-    ("ord"     "\\nHdownarrow" #X21DF)
-    ("ord"     "\\leftdasharrow"       #X21E0)
-    ("ord"     "\\updasharrow" #X21E1)
-    ("ord"     "\\rightdasharrow"      #X21E2)
-    ("ord"     "\\downdasharrow"       #X21E3)
-    ("rel"     "\\barleftarrow"        #X21E4)
-    ("rel"     "\\rightarrowbar"       #X21E5)
-    ("ord"     "\\leftwhitearrow"      #X21E6)
-    ("ord"     "\\upwhitearrow"        #X21E7)
-    ("ord"     "\\rightwhitearrow"     #X21E8)
-    ("ord"     "\\downwhitearrow"      #X21E9)
-    ("ord"     "\\whitearrowupfrombar" #X21EA)
-    ("rel"     "\\circleonrightarrow"  #X21F4)
-    ("rel"     "\\downuparrows"        #X21F5)
-    ("rel"     "\\rightthreearrows"    #X21F6)
-    ("rel"     "\\nvleftarrow" #X21F7)
-    ("rel"     "\\nvrightarrow"        #X21F8)
-    ("rel"     "\\nvleftrightarrow"    #X21F9)
-    ("rel"     "\\nVleftarrow" #X21FA)
-    ("rel"     "\\nVrightarrow"        #X21FB)
-    ("rel"     "\\nVleftrightarrow"    #X21FC)
-    ("rel"     "\\leftarrowtriangle"   #X21FD)
-    ("rel"     "\\rightarrowtriangle"  #X21FE)
-    ("rel"     "\\leftrightarrowtriangle"      #X21FF)
-    ("ord"     "\\forall"      #X2200)
-    ("ord"     "\\complement"  #X2201)
-    ("ord"     "\\partial"     #X2202)
-    ("ord"     "\\exists"      #X2203)
-    ("ord"     "\\nexists"     #X2204)
-    ("ord"     "\\varnothing"  #X2205)
-    ("ord"     "\\increment"   #X2206)
-    ("ord"     "\\nabla"       #X2207)
-    ("rel"     "\\in"  #X2208)
-    ("rel"     "\\notin"       #X2209)
-    ("rel"     "\\smallin"     #X220A)
-    ("rel"     "\\ni"  #X220B)
-    ("rel"     "\\nni" #X220C)
-    ("rel"     "\\smallni"     #X220D)
-    ("ord"     "\\QED" #X220E)
-    ("op"      "\\prod"        #X220F)
-    ("op"      "\\coprod"      #X2210)
-    ("op"      "\\sum" #X2211)
-    ("bin"     "\\minus"       #X2212)
-    ("bin"     "\\mp"  #X2213)
-    ("bin"     "\\dotplus"     #X2214)
-    ("bin"     "\\divslash"    #X2215)
-    ("bin"     "\\smallsetminus"       #X2216)
-    ("bin"     "\\ast" #X2217)
-    ("bin"     "\\vysmwhtcircle"       #X2218)
-    ("bin"     "\\vysmblkcircle"       #X2219)
-    ("open"    "\\sqrt"        #X221A)
-    ("open"    "\\cuberoot"    #X221B)
-    ("open"    "\\fourthroot"  #X221C)
-    ("rel"     "\\propto"      #X221D)
-    ("ord"     "\\infty"       #X221E)
-    ("ord"     "\\rightangle"  #X221F)
-    ("ord"     "\\angle"       #X2220)
-    ("ord"     "\\measuredangle"       #X2221)
-    ("ord"     "\\sphericalangle"      #X2222)
-    ("rel"     "\\mid" #X2223)
-    ("rel"     "\\nmid"        #X2224)
-    ("rel"     "\\parallel"    #X2225)
-    ("rel"     "\\nparallel"   #X2226)
-    ("bin"     "\\wedge"       #X2227)
-    ("bin"     "\\vee" #X2228)
-    ("bin"     "\\cap" #X2229)
-    ("bin"     "\\cup" #X222A)
-    ("op"      "\\int" #X222B)
-    ("op"      "\\iint"        #X222C)
-    ("op"      "\\iiint"       #X222D)
-    ("op"      "\\oint"        #X222E)
-    ("op"      "\\oiint"       #X222F)
-    ("op"      "\\oiiint"      #X2230)
-    ("op"      "\\intclockwise"        #X2231)
-    ("op"      "\\varointclockwise"    #X2232)
-    ("op"      "\\ointctrclockwise"    #X2233)
-    ("ord"     "\\therefore"   #X2234)
-    ("ord"     "\\because"     #X2235)
-    ("rel"     "\\mathratio"   #X2236)
-    ("rel"     "\\Colon"       #X2237)
-    ("bin"     "\\dotminus"    #X2238)
-    ("rel"     "\\dashcolon"   #X2239)
-    ("rel"     "\\dotsminusdots"       #X223A)
-    ("rel"     "\\kernelcontraction"   #X223B)
-    ("rel"     "\\sim" #X223C)
-    ("rel"     "\\backsim"     #X223D)
-    ("bin"     "\\invlazys"    #X223E)
-    ("ord"     "\\sinewave"    #X223F)
-    ("bin"     "\\wr"  #X2240)
-    ("rel"     "\\nsim"        #X2241)
-    ("rel"     "\\eqsim"       #X2242)
-    ("rel"     "\\simeq"       #X2243)
-    ("rel"     "\\nsime"       #X2244)
-    ("rel"     "\\cong"        #X2245)
-    ("rel"     "\\simneqq"     #X2246)
-    ("rel"     "\\ncong"       #X2247)
-    ("rel"     "\\approx"      #X2248)
-    ("rel"     "\\napprox"     #X2249)
-    ("rel"     "\\approxeq"    #X224A)
-    ("rel"     "\\approxident" #X224B)
-    ("rel"     "\\backcong"    #X224C)
-    ("rel"     "\\asymp"       #X224D)
-    ("rel"     "\\Bumpeq"      #X224E)
-    ("rel"     "\\bumpeq"      #X224F)
-    ("rel"     "\\doteq"       #X2250)
-    ("rel"     "\\Doteq"       #X2251)
-    ("rel"     "\\fallingdotseq"       #X2252)
-    ("rel"     "\\risingdotseq"        #X2253)
-    ("rel"     "\\coloneq"     #X2254)
-    ("rel"     "\\eqcolon"     #X2255)
-    ("rel"     "\\eqcirc"      #X2256)
-    ("rel"     "\\circeq"      #X2257)
-    ("rel"     "\\arceq"       #X2258)
-    ("rel"     "\\wedgeq"      #X2259)
-    ("rel"     "\\veeeq"       #X225A)
-    ("rel"     "\\stareq"      #X225B)
-    ("rel"     "\\triangleq"   #X225C)
-    ("rel"     "\\eqdef"       #X225D)
-    ("rel"     "\\measeq"      #X225E)
-    ("rel"     "\\questeq"     #X225F)
-    ("rel"     "\\ne"  #X2260)
-    ("rel"     "\\equiv"       #X2261)
-    ("rel"     "\\nequiv"      #X2262)
-    ("rel"     "\\Equiv"       #X2263)
-    ("rel"     "\\leq" #X2264)
-    ("rel"     "\\geq" #X2265)
-    ("rel"     "\\leqq"        #X2266)
-    ("rel"     "\\geqq"        #X2267)
-    ("rel"     "\\lneqq"       #X2268)
-    ("rel"     "\\gneqq"       #X2269)
-    ("rel"     "\\ll"  #X226A)
-    ("rel"     "\\gg"  #X226B)
-    ("rel"     "\\between"     #X226C)
-    ("rel"     "\\nasymp"      #X226D)
-    ("rel"     "\\nless"       #X226E)
-    ("rel"     "\\ngtr"        #X226F)
-    ("rel"     "\\nleq"        #X2270)
-    ("rel"     "\\ngeq"        #X2271)
-    ("rel"     "\\lesssim"     #X2272)
-    ("rel"     "\\gtrsim"      #X2273)
-    ("rel"     "\\nlesssim"    #X2274)
-    ("rel"     "\\ngtrsim"     #X2275)
-    ("rel"     "\\lessgtr"     #X2276)
-    ("rel"     "\\gtrless"     #X2277)
-    ("rel"     "\\nlessgtr"    #X2278)
-    ("rel"     "\\ngtrless"    #X2279)
-    ("rel"     "\\prec"        #X227A)
-    ("rel"     "\\succ"        #X227B)
-    ("rel"     "\\preccurlyeq" #X227C)
-    ("rel"     "\\succcurlyeq" #X227D)
-    ("rel"     "\\precsim"     #X227E)
-    ("rel"     "\\succsim"     #X227F)
-    ("rel"     "\\nprec"       #X2280)
-    ("rel"     "\\nsucc"       #X2281)
-    ("rel"     "\\subset"      #X2282)
-    ("rel"     "\\supset"      #X2283)
-    ("rel"     "\\nsubset"     #X2284)
-    ("rel"     "\\nsupset"     #X2285)
-    ("rel"     "\\subseteq"    #X2286)
-    ("rel"     "\\supseteq"    #X2287)
-    ("rel"     "\\nsubseteq"   #X2288)
-    ("rel"     "\\nsupseteq"   #X2289)
-    ("rel"     "\\subsetneq"   #X228A)
-    ("rel"     "\\supsetneq"   #X228B)
-    ("bin"     "\\cupleftarrow"        #X228C)
-    ("bin"     "\\cupdot"      #X228D)
-    ("bin"     "\\uplus"       #X228E)
-    ("rel"     "\\sqsubset"    #X228F)
-    ("rel"     "\\sqsupset"    #X2290)
-    ("rel"     "\\sqsubseteq"  #X2291)
-    ("rel"     "\\sqsupseteq"  #X2292)
-    ("bin"     "\\sqcap"       #X2293)
-    ("bin"     "\\sqcup"       #X2294)
-    ("bin"     "\\oplus"       #X2295)
-    ("bin"     "\\ominus"      #X2296)
-    ("bin"     "\\otimes"      #X2297)
-    ("bin"     "\\oslash"      #X2298)
-    ("bin"     "\\odot"        #X2299)
-    ("bin"     "\\circledcirc" #X229A)
-    ("bin"     "\\circledast"  #X229B)
-    ("bin"     "\\circledequal"        #X229C)
-    ("bin"     "\\circleddash" #X229D)
-    ("bin"     "\\boxplus"     #X229E)
-    ("bin"     "\\boxminus"    #X229F)
-    ("bin"     "\\boxtimes"    #X22A0)
-    ("bin"     "\\boxdot"      #X22A1)
-    ("rel"     "\\vdash"       #X22A2)
-    ("rel"     "\\dashv"       #X22A3)
-    ("ord"     "\\top" #X22A4)
-    ("ord"     "\\bot" #X22A5)
-    ("rel"     "\\assert"      #X22A6)
-    ("rel"     "\\models"      #X22A7)
-    ("rel"     "\\vDash"       #X22A8)
-    ("rel"     "\\Vdash"       #X22A9)
-    ("rel"     "\\Vvdash"      #X22AA)
-    ("rel"     "\\VDash"       #X22AB)
-    ("rel"     "\\nvdash"      #X22AC)
-    ("rel"     "\\nvDash"      #X22AD)
-    ("rel"     "\\nVdash"      #X22AE)
-    ("rel"     "\\nVDash"      #X22AF)
-    ("rel"     "\\prurel"      #X22B0)
-    ("rel"     "\\scurel"      #X22B1)
-    ("rel"     "\\vartriangleleft"     #X22B2)
-    ("rel"     "\\vartriangleright"    #X22B3)
-    ("rel"     "\\trianglelefteq"      #X22B4)
-    ("rel"     "\\trianglerighteq"     #X22B5)
-    ("rel"     "\\origof"      #X22B6)
-    ("rel"     "\\imageof"     #X22B7)
-    ("rel"     "\\multimap"    #X22B8)
-    ("ord"     "\\hermitmatrix"        #X22B9)
-    ("bin"     "\\intercal"    #X22BA)
-    ("bin"     "\\veebar"      #X22BB)
-    ("bin"     "\\barwedge"    #X22BC)
-    ("bin"     "\\barvee"      #X22BD)
-    ("ord"     "\\measuredrightangle"  #X22BE)
-    ("ord"     "\\varlrtriangle"       #X22BF)
-    ("op"      "\\bigwedge"    #X22C0)
-    ("op"      "\\bigvee"      #X22C1)
-    ("op"      "\\bigcap"      #X22C2)
-    ("op"      "\\bigcup"      #X22C3)
-    ("bin"     "\\smwhtdiamond"        #X22C4)
-    ("bin"     "\\cdot"        #X22C5)
-    ("bin"     "\\star"        #X22C6)
-    ("bin"     "\\divideontimes"       #X22C7)
-    ("rel"     "\\bowtie"      #X22C8)
-    ("bin"     "\\ltimes"      #X22C9)
-    ("bin"     "\\rtimes"      #X22CA)
-    ("bin"     "\\leftthreetimes"      #X22CB)
-    ("bin"     "\\rightthreetimes"     #X22CC)
-    ("rel"     "\\backsimeq"   #X22CD)
-    ("bin"     "\\curlyvee"    #X22CE)
-    ("bin"     "\\curlywedge"  #X22CF)
-    ("rel"     "\\Subset"      #X22D0)
-    ("rel"     "\\Supset"      #X22D1)
-    ("bin"     "\\Cap" #X22D2)
-    ("bin"     "\\Cup" #X22D3)
-    ("rel"     "\\pitchfork"   #X22D4)
-    ("rel"     "\\equalparallel"       #X22D5)
-    ("rel"     "\\lessdot"     #X22D6)
-    ("rel"     "\\gtrdot"      #X22D7)
-    ("rel"     "\\lll" #X22D8)
-    ("rel"     "\\ggg" #X22D9)
-    ("rel"     "\\lesseqgtr"   #X22DA)
-    ("rel"     "\\gtreqless"   #X22DB)
-    ("rel"     "\\eqless"      #X22DC)
-    ("rel"     "\\eqgtr"       #X22DD)
-    ("rel"     "\\curlyeqprec" #X22DE)
-    ("rel"     "\\curlyeqsucc" #X22DF)
-    ("rel"     "\\npreccurlyeq"        #X22E0)
-    ("rel"     "\\nsucccurlyeq"        #X22E1)
-    ("rel"     "\\nsqsubseteq" #X22E2)
-    ("rel"     "\\nsqsupseteq" #X22E3)
-    ("rel"     "\\sqsubsetneq" #X22E4)
-    ("rel"     "\\sqsupsetneq" #X22E5)
-    ("rel"     "\\lnsim"       #X22E6)
-    ("rel"     "\\gnsim"       #X22E7)
-    ("rel"     "\\precnsim"    #X22E8)
-    ("rel"     "\\succnsim"    #X22E9)
-    ("rel"     "\\ntriangleleft"       #X22EA)
-    ("rel"     "\\ntriangleright"      #X22EB)
-    ("rel"     "\\ntrianglelefteq"     #X22EC)
-    ("rel"     "\\ntrianglerighteq"    #X22ED)
-    ("rel"     "\\vdots"       #X22EE)
-    ("ord"     "\\unicodecdots"        #X22EF)
-    ("rel"     "\\adots"       #X22F0)
-    ("rel"     "\\ddots"       #X22F1)
-    ("rel"     "\\disin"       #X22F2)
-    ("rel"     "\\varisins"    #X22F3)
-    ("rel"     "\\isins"       #X22F4)
-    ("rel"     "\\isindot"     #X22F5)
-    ("rel"     "\\varisinobar" #X22F6)
-    ("rel"     "\\isinobar"    #X22F7)
-    ("rel"     "\\isinvb"      #X22F8)
-    ("rel"     "\\isinE"       #X22F9)
-    ("rel"     "\\nisd"        #X22FA)
-    ("rel"     "\\varnis"      #X22FB)
-    ("rel"     "\\nis" #X22FC)
-    ("rel"     "\\varniobar"   #X22FD)
-    ("rel"     "\\niobar"      #X22FE)
-    ("rel"     "\\bagmember"   #X22FF)
-    ("ord"     "\\diameter"    #X2300)
-    ("ord"     "\\house"       #X2302)
-    ("bin"     "\\varbarwedge" #X2305)
-    ("bin"     "\\vardoublebarwedge"   #X2306)
-    ("open"    "\\lceil"       #X2308)
-    ("close"   "\\rceil"       #X2309)
-    ("open"    "\\lfloor"      #X230A)
-    ("close"   "\\rfloor"      #X230B)
-    ("ord"     "\\invnot"      #X2310)
-    ("ord"     "\\sqlozenge"   #X2311)
-    ("ord"     "\\profline"    #X2312)
-    ("ord"     "\\profsurf"    #X2313)
-    ("ord"     "\\viewdata"    #X2317)
-    ("ord"     "\\turnednot"   #X2319)
-    ("open"    "\\ulcorner"    #X231C)
-    ("close"   "\\urcorner"    #X231D)
-    ("open"    "\\llcorner"    #X231E)
-    ("close"   "\\lrcorner"    #X231F)
-    ("ord"     "\\inttop"      #X2320)
-    ("ord"     "\\intbottom"   #X2321)
-    ("rel"     "\\frown"       #X2322)
-    ("rel"     "\\smile"       #X2323)
-    ("ord"     "\\varhexagonlrbonds"   #X232C)
-    ("ord"     "\\conictaper"  #X2332)
-    ("ord"     "\\topbot"      #X2336)
-    ("bin"     "\\obar"        #X233D)
-    ("rel"     "\\APLnotslash" #X233F)
-    ("ord"     "\\APLnotbackslash"     #X2340)
-    ("ord"     "\\APLboxupcaret"       #X2353)
-    ("ord"     "\\APLboxquestion"      #X2370)
-    ("ord"     "\\rangledownzigzagarrow"       #X237C)
-    ("ord"     "\\hexagon"     #X2394)
-    ("ord"     "\\lparenuend"  #X239B)
-    ("ord"     "\\lparenextender"      #X239C)
-    ("ord"     "\\lparenlend"  #X239D)
-    ("ord"     "\\rparenuend"  #X239E)
-    ("ord"     "\\rparenextender"      #X239F)
-    ("ord"     "\\rparenlend"  #X23A0)
-    ("ord"     "\\lbrackuend"  #X23A1)
-    ("ord"     "\\lbrackextender"      #X23A2)
-    ("ord"     "\\lbracklend"  #X23A3)
-    ("ord"     "\\rbrackuend"  #X23A4)
-    ("ord"     "\\rbrackextender"      #X23A5)
-    ("ord"     "\\rbracklend"  #X23A6)
-    ("ord"     "\\lbraceuend"  #X23A7)
-    ("ord"     "\\lbracemid"   #X23A8)
-    ("ord"     "\\lbracelend"  #X23A9)
-    ("ord"     "\\vbraceextender"      #X23AA)
-    ("ord"     "\\rbraceuend"  #X23AB)
-    ("ord"     "\\rbracemid"   #X23AC)
-    ("ord"     "\\rbracelend"  #X23AD)
-    ("ord"     "\\intextender" #X23AE)
-    ("ord"     "\\harrowextender"      #X23AF)
-    ("ord"     "\\lmoustache"  #X23B0)
-    ("ord"     "\\rmoustache"  #X23B1)
-    ("ord"     "\\sumtop"      #X23B2)
-    ("ord"     "\\sumbottom"   #X23B3)
-    ("over"    "\\overbracket" #X23B4)
-    ("under"   "\\underbracket"        #X23B5)
-    ("ord"     "\\bbrktbrk"    #X23B6)
-    ("ord"     "\\sqrtbottom"  #X23B7)
-    ("ord"     "\\lvboxline"   #X23B8)
-    ("ord"     "\\rvboxline"   #X23B9)
-    ("ord"     "\\varcarriagereturn"   #X23CE)
-    ("over"    "\\overparen"   #X23DC)
-    ("under"   "\\underparen"  #X23DD)
-    ("over"    "\\overbrace"   #X23DE)
-    ("under"   "\\underbrace"  #X23DF)
-    ("ord"     "\\obrbrak"     #X23E0)
-    ("ord"     "\\ubrbrak"     #X23E1)
-    ("ord"     "\\trapezium"   #X23E2)
-    ("ord"     "\\benzenr"     #X23E3)
-    ("ord"     "\\strns"       #X23E4)
-    ("ord"     "\\fltns"       #X23E5)
-    ("ord"     "\\accurrent"   #X23E6)
-    ("ord"     "\\elinters"    #X23E7)
-    ("ord"     "\\bdtriplevdash"       #X2506)
-    ("ord"     "\\blockuphalf" #X2580)
-    ("ord"     "\\blocklowhalf"        #X2584)
-    ("ord"     "\\blockfull"   #X2588)
-    ("ord"     "\\blocklefthalf"       #X258C)
-    ("ord"     "\\blockrighthalf"      #X2590)
-    ("ord"     "\\blockqtrshaded"      #X2591)
-    ("ord"     "\\blockhalfshaded"     #X2592)
-    ("ord"     "\\blockthreeqtrshaded" #X2593)
-    ("ord"     "\\mdlgblksquare"       #X25A0)
-    ("ord"     "\\mdlgwhtsquare"       #X25A1)
-    ("ord"     "\\squoval"     #X25A2)
-    ("ord"     "\\blackinwhitesquare"  #X25A3)
-    ("ord"     "\\squarehfill" #X25A4)
-    ("ord"     "\\squarevfill" #X25A5)
-    ("ord"     "\\squarehvfill"        #X25A6)
-    ("ord"     "\\squarenwsefill"      #X25A7)
-    ("ord"     "\\squareneswfill"      #X25A8)
-    ("ord"     "\\squarecrossfill"     #X25A9)
-    ("ord"     "\\smblksquare" #X25AA)
-    ("ord"     "\\smwhtsquare" #X25AB)
-    ("ord"     "\\hrectangleblack"     #X25AC)
-    ("ord"     "\\hrectangle"  #X25AD)
-    ("ord"     "\\vrectangleblack"     #X25AE)
-    ("ord"     "\\vrectangle"  #X25AF)
-    ("ord"     "\\parallelogramblack"  #X25B0)
-    ("ord"     "\\parallelogram"       #X25B1)
-    ("ord"     "\\bigblacktriangleup"  #X25B2)
-    ("bin"     "\\bigtriangleup"       #X25B3)
-    ("ord"     "\\blacktriangle"       #X25B4)
-    ("rel"     "\\vartriangle" #X25B5)
-    ("ord"     "\\blacktriangleright"  #X25B6)
-    ("bin"     "\\triangleright"       #X25B7)
-    ("ord"     "\\smallblacktriangleright "    #X25B8)
-    ("ord"     "\\smalltriangleright"  #X25B9)
-    ("ord"     "\\blackpointerright"   #X25BA)
-    ("ord"     "\\whitepointerright"   #X25BB)
-    ("ord"     "\\bigblacktriangledown"        #X25BC)
-    ("ord"     "\\bigtriangledown"     #X25BD)
-    ("ord"     "\\blacktriangledown"   #X25BE)
-    ("ord"     "\\triangledown"        #X25BF)
-    ("ord"     "\\blacktriangleleft"   #X25C0)
-    ("bin"     "\\triangleleft"        #X25C1)
-    ("ord"     "\\smallblacktriangleleft"      #X25C2)
-    ("ord"     "\\smalltriangleleft"   #X25C3)
-    ("ord"     "\\blackpointerleft"    #X25C4)
-    ("ord"     "\\whitepointerleft"    #X25C5)
-    ("ord"     "\\mdlgblkdiamond"      #X25C6)
-    ("ord"     "\\mdlgwhtdiamond"      #X25C7)
-    ("ord"     "\\blackinwhitediamond" #X25C8)
-    ("ord"     "\\fisheye"     #X25C9)
-    ("ord"     "\\mdlgwhtlozenge"      #X25CA)
-    ("bin"     "\\mdlgwhtcircle"       #X25CB)
-    ("ord"     "\\dottedcircle"        #X25CC)
-    ("ord"     "\\circlevertfill"      #X25CD)
-    ("ord"     "\\bullseye"    #X25CE)
-    ("ord"     "\\mdlgblkcircle"       #X25CF)
-    ("ord"     "\\circlelefthalfblack" #X25D0)
-    ("ord"     "\\circlerighthalfblack"        #X25D1)
-    ("ord"     "\\circlebottomhalfblack"       #X25D2)
-    ("ord"     "\\circletophalfblack"  #X25D3)
-    ("ord"     "\\circleurquadblack"   #X25D4)
-    ("ord"     "\\blackcircleulquadwhite"      #X25D5)
-    ("ord"     "\\blacklefthalfcircle" #X25D6)
-    ("ord"     "\\blackrighthalfcircle"        #X25D7)
-    ("ord"     "\\inversebullet"       #X25D8)
-    ("ord"     "\\inversewhitecircle"  #X25D9)
-    ("ord"     "\\invwhiteupperhalfcircle "    #X25DA)
-    ("ord"     "\\invwhitelowerhalfcircle "    #X25DB)
-    ("ord"     "\\ularc"       #X25DC)
-    ("ord"     "\\urarc"       #X25DD)
-    ("ord"     "\\lrarc"       #X25DE)
-    ("ord"     "\\llarc"       #X25DF)
-    ("ord"     "\\topsemicircle"       #X25E0)
-    ("ord"     "\\botsemicircle"       #X25E1)
-    ("ord"     "\\lrblacktriangle"     #X25E2)
-    ("ord"     "\\llblacktriangle"     #X25E3)
-    ("ord"     "\\ulblacktriangle"     #X25E4)
-    ("ord"     "\\urblacktriangle"     #X25E5)
-    ("ord"     "\\smwhtcircle" #X25E6)
-    ("ord"     "\\squareleftblack"     #X25E7)
-    ("ord"     "\\squarerightblack"    #X25E8)
-    ("ord"     "\\squareulblack"       #X25E9)
-    ("ord"     "\\squarelrblack"       #X25EA)
-    ("bin"     "\\boxbar"      #X25EB)
-    ("ord"     "\\trianglecdot"        #X25EC)
-    ("ord"     "\\triangleleftblack"   #X25ED)
-    ("ord"     "\\trianglerightblack"  #X25EE)
-    ("ord"     "\\lgwhtcircle" #X25EF)
-    ("ord"     "\\squareulquad"        #X25F0)
-    ("ord"     "\\squarellquad"        #X25F1)
-    ("ord"     "\\squarelrquad"        #X25F2)
-    ("ord"     "\\squareurquad"        #X25F3)
-    ("ord"     "\\circleulquad"        #X25F4)
-    ("ord"     "\\circlellquad"        #X25F5)
-    ("ord"     "\\circlelrquad"        #X25F6)
-    ("ord"     "\\circleurquad"        #X25F7)
-    ("ord"     "\\ultriangle"  #X25F8)
-    ("ord"     "\\urtriangle"  #X25F9)
-    ("ord"     "\\lltriangle"  #X25FA)
-    ("ord"     "\\mdwhtsquare" #X25FB)
-    ("ord"     "\\mdblksquare" #X25FC)
-    ("ord"     "\\mdsmwhtsquare"       #X25FD)
-    ("ord"     "\\mdsmblksquare"       #X25FE)
-    ("ord"     "\\lrtriangle"  #X25FF)
-    ("ord"     "\\bigstar"     #X2605)
-    ("ord"     "\\bigwhitestar"        #X2606)
-    ("ord"     "\\astrosun"    #X2609)
-    ("ord"     "\\danger"      #X2621)
-    ("ord"     "\\blacksmiley" #X263B)
-    ("ord"     "\\sun" #X263C)
-    ("ord"     "\\rightmoon"   #X263D)
-    ("ord"     "\\leftmoon"    #X263E)
-    ("ord"     "\\female"      #X2640)
-    ("ord"     "\\male"        #X2642)
-    ("ord"     "\\spadesuit"   #X2660)
-    ("ord"     "\\heartsuit"   #X2661)
-    ("ord"     "\\diamondsuit" #X2662)
-    ("ord"     "\\clubsuit"    #X2663)
-    ("ord"     "\\varspadesuit"        #X2664)
-    ("ord"     "\\varheartsuit"        #X2665)
-    ("ord"     "\\vardiamondsuit"      #X2666)
-    ("ord"     "\\varclubsuit" #X2667)
-    ("ord"     "\\quarternote" #X2669)
-    ("ord"     "\\eighthnote"  #X266A)
-    ("ord"     "\\twonotes"    #X266B)
-    ("ord"     "\\flat"        #X266D)
-    ("ord"     "\\natural"     #X266E)
-    ("ord"     "\\sharp"       #X266F)
-    ("ord"     "\\acidfree"    #X267E)
-    ("ord"     "\\dicei"       #X2680)
-    ("ord"     "\\diceii"      #X2681)
-    ("ord"     "\\diceiii"     #X2682)
-    ("ord"     "\\diceiv"      #X2683)
-    ("ord"     "\\dicev"       #X2684)
-    ("ord"     "\\dicevi"      #X2685)
-    ("ord"     "\\circledrightdot"     #X2686)
-    ("ord"     "\\circledtwodots"      #X2687)
-    ("ord"     "\\blackcircledrightdot"        #X2688)
-    ("ord"     "\\blackcircledtwodots" #X2689)
-    ("ord"     "\\Hermaphrodite"       #X26A5)
-    ("ord"     "\\mdwhtcircle" #X26AA)
-    ("ord"     "\\mdblkcircle" #X26AB)
-    ("ord"     "\\mdsmwhtcircle"       #X26AC)
-    ("ord"     "\\neuter"      #X26B2)
-    ("ord"     "\\checkmark"   #X2713)
-    ("ord"     "\\maltese"     #X2720)
-    ("ord"     "\\circledstar" #X272A)
-    ("ord"     "\\varstar"     #X2736)
-    ("ord"     "\\dingasterisk"        #X273D)
-    ("open"    "\\lbrbrak"     #X2772)
-    ("close"   "\\rbrbrak"     #X2773)
-    ("ord"     "\\draftingarrow"       #X279B)
-    ("ord"     "\\threedangle" #X27C0)
-    ("ord"     "\\whiteinwhitetriangle"        #X27C1)
-    ("rel"     "\\perp"        #X27C2)
-    ("ord"     "\\subsetcirc"  #X27C3)
-    ("ord"     "\\supsetcirc"  #X27C4)
-    ("open"    "\\lbag"        #X27C5)
-    ("close"   "\\rbag"        #X27C6)
-    ("bin"     "\\veedot"      #X27C7)
-    ("rel"     "\\bsolhsub"    #X27C8)
-    ("rel"     "\\suphsol"     #X27C9)
-    ("open"    "\\longdivision"        #X27CC)
-    ("ord"     "\\diamondcdot" #X27D0)
-    ("bin"     "\\wedgedot"    #X27D1)
-    ("rel"     "\\upin"        #X27D2)
-    ("rel"     "\\pullback"    #X27D3)
-    ("rel"     "\\pushout"     #X27D4)
-    ("op"      "\\leftouterjoin"       #X27D5)
-    ("op"      "\\rightouterjoin"      #X27D6)
-    ("op"      "\\fullouterjoin"       #X27D7)
-    ("op"      "\\bigbot"      #X27D8)
-    ("op"      "\\bigtop"      #X27D9)
-    ("rel"     "\\DashVDash"   #X27DA)
-    ("rel"     "\\dashVdash"   #X27DB)
-    ("rel"     "\\multimapinv" #X27DC)
-    ("rel"     "\\vlongdash"   #X27DD)
-    ("rel"     "\\longdashv"   #X27DE)
-    ("rel"     "\\cirbot"      #X27DF)
-    ("bin"     "\\lozengeminus"        #X27E0)
-    ("bin"     "\\concavediamond"      #X27E1)
-    ("bin"     "\\concavediamondtickleft"      #X27E2)
-    ("bin"     "\\concavediamondtickright "    #X27E3)
-    ("bin"     "\\whitesquaretickleft" #X27E4)
-    ("bin"     "\\whitesquaretickright"        #X27E5)
-    ("open"    "\\lBrack"      #X27E6)
-    ("close"   "\\rBrack"      #X27E7)
-    ("open"    "\\langle"      #X27E8)
-    ("close"   "\\rangle"      #X27E9)
-    ("open"    "\\lAngle"      #X27EA)
-    ("close"   "\\rAngle"      #X27EB)
-    ("open"    "\\Lbrbrak"     #X27EC)
-    ("close"   "\\Rbrbrak"     #X27ED)
-    ("rel"     "\\UUparrow"    #X27F0)
-    ("rel"     "\\DDownarrow"  #X27F1)
-    ("rel"     "\\acwgapcirclearrow"   #X27F2)
-    ("rel"     "\\cwgapcirclearrow"    #X27F3)
-    ("rel"     "\\rightarrowonoplus"   #X27F4)
-    ("rel"     "\\longleftarrow"       #X27F5)
-    ("rel"     "\\longrightarrow"      #X27F6)
-    ("rel"     "\\longleftrightarrow"  #X27F7)
-    ("rel"     "\\Longleftarrow"       #X27F8)
-    ("rel"     "\\Longrightarrow"      #X27F9)
-    ("rel"     "\\Longleftrightarrow"  #X27FA)
-    ("rel"     "\\longmapsfrom"        #X27FB)
-    ("rel"     "\\longmapsto"  #X27FC)
-    ("rel"     "\\Longmapsfrom"        #X27FD)
-    ("rel"     "\\Longmapsto"  #X27FE)
-    ("rel"     "\\longrightsquigarrow" #X27FF)
-    ("rel"     "\\nvtwoheadrightarrow" #X2900)
-    ("rel"     "\\nVtwoheadrightarrow" #X2901)
-    ("rel"     "\\nvLeftarrow" #X2902)
-    ("rel"     "\\nvRightarrow"        #X2903)
-    ("rel"     "\\nvLeftrightarrow"    #X2904)
-    ("rel"     "\\twoheadmapsto"       #X2905)
-    ("rel"     "\\Mapsfrom"    #X2906)
-    ("rel"     "\\Mapsto"      #X2907)
-    ("rel"     "\\downarrowbarred"     #X2908)
-    ("rel"     "\\uparrowbarred"       #X2909)
-    ("rel"     "\\Uuparrow"    #X290A)
-    ("rel"     "\\Ddownarrow"  #X290B)
-    ("rel"     "\\leftbkarrow" #X290C)
-    ("rel"     "\\rightbkarrow"        #X290D)
-    ("rel"     "\\leftdbkarrow"        #X290E)
-    ("rel"     "\\dbkarow"     #X290F)
-    ("rel"     "\\drbkarow"    #X2910)
-    ("rel"     "\\rightdotarrow"       #X2911)
-    ("rel"     "\\baruparrow"  #X2912)
-    ("rel"     "\\downarrowbar"        #X2913)
-    ("rel"     "\\nvrightarrowtail"    #X2914)
-    ("rel"     "\\nVrightarrowtail"    #X2915)
-    ("rel"     "\\twoheadrightarrowtail"       #X2916)
-    ("rel"     "\\nvtwoheadrightarrowtail "    #X2917)
-    ("rel"     "\\nVtwoheadrightarrowtail "    #X2918)
-    ("rel"     "\\lefttail"    #X2919)
-    ("rel"     "\\righttail"   #X291A)
-    ("rel"     "\\leftdbltail" #X291B)
-    ("rel"     "\\rightdbltail"        #X291C)
-    ("rel"     "\\diamondleftarrow"    #X291D)
-    ("rel"     "\\rightarrowdiamond"   #X291E)
-    ("rel"     "\\diamondleftarrowbar" #X291F)
-    ("rel"     "\\barrightarrowdiamond"        #X2920)
-    ("rel"     "\\nwsearrow"   #X2921)
-    ("rel"     "\\neswarrow"   #X2922)
-    ("rel"     "\\hknwarrow"   #X2923)
-    ("rel"     "\\hknearrow"   #X2924)
-    ("rel"     "\\hksearow"    #X2925)
-    ("rel"     "\\hkswarow"    #X2926)
-    ("rel"     "\\tona"        #X2927)
-    ("rel"     "\\toea"        #X2928)
-    ("rel"     "\\tosa"        #X2929)
-    ("rel"     "\\towa"        #X292A)
-    ("ord"     "\\rdiagovfdiag"        #X292B)
-    ("ord"     "\\fdiagovrdiag"        #X292C)
-    ("ord"     "\\seovnearrow" #X292D)
-    ("ord"     "\\neovsearrow" #X292E)
-    ("ord"     "\\fdiagovnearrow"      #X292F)
-    ("ord"     "\\rdiagovsearrow"      #X2930)
-    ("ord"     "\\neovnwarrow" #X2931)
-    ("ord"     "\\nwovnearrow" #X2932)
-    ("rel"     "\\rightcurvedarrow"    #X2933)
-    ("ord"     "\\uprightcurvearrow"   #X2934)
-    ("ord"     "\\downrightcurvedarrow"        #X2935)
-    ("rel"     "\\leftdowncurvedarrow" #X2936)
-    ("rel"     "\\rightdowncurvedarrow"        #X2937)
-    ("rel"     "\\cwrightarcarrow"     #X2938)
-    ("rel"     "\\acwleftarcarrow"     #X2939)
-    ("rel"     "\\acwoverarcarrow"     #X293A)
-    ("rel"     "\\acwunderarcarrow"    #X293B)
-    ("rel"     "\\curvearrowrightminus"        #X293C)
-    ("rel"     "\\curvearrowleftplus"  #X293D)
-    ("rel"     "\\cwundercurvearrow"   #X293E)
-    ("rel"     "\\ccwundercurvearrow"  #X293F)
-    ("rel"     "\\acwcirclearrow"      #X2940)
-    ("rel"     "\\cwcirclearrow"       #X2941)
-    ("rel"     "\\rightarrowshortleftarrow"    #X2942)
-    ("rel"     "\\leftarrowshortrightarrow"    #X2943)
-    ("rel"     "\\shortrightarrowleftarrow"    #X2944)
-    ("rel"     "\\rightarrowplus"      #X2945)
-    ("rel"     "\\leftarrowplus"       #X2946)
-    ("rel"     "\\rightarrowx" #X2947)
-    ("rel"     "\\leftrightarrowcircle"        #X2948)
-    ("rel"     "\\twoheaduparrowcircle"        #X2949)
-    ("rel"     "\\leftrightharpoonupdown"      #X294A)
-    ("rel"     "\\leftrightharpoondownup"      #X294B)
-    ("rel"     "\\updownharpoonrightleft"      #X294C)
-    ("rel"     "\\updownharpoonleftright"      #X294D)
-    ("rel"     "\\leftrightharpoonupup"        #X294E)
-    ("rel"     "\\updownharpoonrightright "    #X294F)
-    ("rel"     "\\leftrightharpoondowndown"    #X2950)
-    ("rel"     "\\updownharpoonleftleft"       #X2951)
-    ("rel"     "\\barleftharpoonup"    #X2952)
-    ("rel"     "\\rightharpoonupbar"   #X2953)
-    ("rel"     "\\barupharpoonright"   #X2954)
-    ("rel"     "\\downharpoonrightbar" #X2955)
-    ("rel"     "\\barleftharpoondown"  #X2956)
-    ("rel"     "\\rightharpoondownbar" #X2957)
-    ("rel"     "\\barupharpoonleft"    #X2958)
-    ("rel"     "\\downharpoonleftbar"  #X2959)
-    ("rel"     "\\leftharpoonupbar"    #X295A)
-    ("rel"     "\\barrightharpoonup"   #X295B)
-    ("rel"     "\\upharpoonrightbar"   #X295C)
-    ("rel"     "\\bardownharpoonright" #X295D)
-    ("rel"     "\\leftharpoondownbar"  #X295E)
-    ("rel"     "\\barrightharpoondown" #X295F)
-    ("rel"     "\\upharpoonleftbar"    #X2960)
-    ("rel"     "\\bardownharpoonleft"  #X2961)
-    ("rel"     "\\leftharpoonsupdown"  #X2962)
-    ("rel"     "\\upharpoonsleftright" #X2963)
-    ("rel"     "\\rightharpoonsupdown" #X2964)
-    ("rel"     "\\downharpoonsleftright"       #X2965)
-    ("rel"     "\\leftrightharpoonsup" #X2966)
-    ("rel"     "\\leftrightharpoonsdown"       #X2967)
-    ("rel"     "\\rightleftharpoonsup" #X2968)
-    ("rel"     "\\rightleftharpoonsdown"       #X2969)
-    ("rel"     "\\leftharpoonupdash"   #X296A)
-    ("rel"     "\\dashleftharpoondown" #X296B)
-    ("rel"     "\\rightharpoonupdash"  #X296C)
-    ("rel"     "\\dashrightharpoondown"        #X296D)
-    ("rel"     "\\updownharpoonsleftright "    #X296E)
-    ("rel"     "\\downupharpoonsleftright "    #X296F)
-    ("rel"     "\\rightimply"  #X2970)
-    ("rel"     "\\equalrightarrow"     #X2971)
-    ("rel"     "\\similarrightarrow"   #X2972)
-    ("rel"     "\\leftarrowsimilar"    #X2973)
-    ("rel"     "\\rightarrowsimilar"   #X2974)
-    ("rel"     "\\rightarrowapprox"    #X2975)
-    ("rel"     "\\ltlarr"      #X2976)
-    ("rel"     "\\leftarrowless"       #X2977)
-    ("rel"     "\\gtrarr"      #X2978)
-    ("rel"     "\\subrarr"     #X2979)
-    ("rel"     "\\leftarrowsubset"     #X297A)
-    ("rel"     "\\suplarr"     #X297B)
-    ("rel"     "\\leftfishtail"        #X297C)
-    ("rel"     "\\rightfishtail"       #X297D)
-    ("rel"     "\\upfishtail"  #X297E)
-    ("rel"     "\\downfishtail"        #X297F)
-    ("fence"   "\\Vvert"       #X2980)
-    ("ord"     "\\mdsmblkcircle"       #X2981)
-    ("bin"     "\\typecolon"   #X2982)
-    ("open"    "\\lBrace"      #X2983)
-    ("close"   "\\rBrace"      #X2984)
-    ("open"    "\\lParen"      #X2985)
-    ("close"   "\\rParen"      #X2986)
-    ("open"    "\\llparenthesis"       #X2987)
-    ("close"   "\\rrparenthesis"       #X2988)
-    ("open"    "\\llangle"     #X2989)
-    ("close"   "\\rrangle"     #X298A)
-    ("open"    "\\lbrackubar"  #X298B)
-    ("close"   "\\rbrackubar"  #X298C)
-    ("open"    "\\lbrackultick"        #X298D)
-    ("close"   "\\rbracklrtick"        #X298E)
-    ("open"    "\\lbracklltick"        #X298F)
-    ("close"   "\\rbrackurtick"        #X2990)
-    ("open"    "\\langledot"   #X2991)
-    ("close"   "\\rangledot"   #X2992)
-    ("open"    "\\lparenless"  #X2993)
-    ("close"   "\\rparengtr"   #X2994)
-    ("open"    "\\Lparengtr"   #X2995)
-    ("close"   "\\Rparenless"  #X2996)
-    ("open"    "\\lblkbrbrak"  #X2997)
-    ("close"   "\\rblkbrbrak"  #X2998)
-    ("ord"     "\\fourvdots"   #X2999)
-    ("ord"     "\\vzigzag"     #X299A)
-    ("ord"     "\\measuredangleleft"   #X299B)
-    ("ord"     "\\rightanglesqr"       #X299C)
-    ("ord"     "\\rightanglemdot"      #X299D)
-    ("ord"     "\\angles"      #X299E)
-    ("ord"     "\\angdnr"      #X299F)
-    ("ord"     "\\gtlpar"      #X29A0)
-    ("ord"     "\\sphericalangleup"    #X29A1)
-    ("ord"     "\\turnangle"   #X29A2)
-    ("ord"     "\\revangle"    #X29A3)
-    ("ord"     "\\angleubar"   #X29A4)
-    ("ord"     "\\revangleubar"        #X29A5)
-    ("ord"     "\\wideangledown"       #X29A6)
-    ("ord"     "\\wideangleup" #X29A7)
-    ("ord"     "\\measanglerutone"     #X29A8)
-    ("ord"     "\\measanglelutonw"     #X29A9)
-    ("ord"     "\\measanglerdtose"     #X29AA)
-    ("ord"     "\\measangleldtosw"     #X29AB)
-    ("ord"     "\\measangleurtone"     #X29AC)
-    ("ord"     "\\measangleultonw"     #X29AD)
-    ("ord"     "\\measangledrtose"     #X29AE)
-    ("ord"     "\\measangledltosw"     #X29AF)
-    ("ord"     "\\revemptyset" #X29B0)
-    ("ord"     "\\emptysetobar"        #X29B1)
-    ("ord"     "\\emptysetocirc"       #X29B2)
-    ("ord"     "\\emptysetoarr"        #X29B3)
-    ("ord"     "\\emptysetoarrl"       #X29B4)
-    ("bin"     "\\circlehbar"  #X29B5)
-    ("bin"     "\\circledvert" #X29B6)
-    ("bin"     "\\circledparallel"     #X29B7)
-    ("bin"     "\\obslash"     #X29B8)
-    ("bin"     "\\operp"       #X29B9)
-    ("ord"     "\\obot"        #X29BA)
-    ("ord"     "\\olcross"     #X29BB)
-    ("ord"     "\\odotslashdot"        #X29BC)
-    ("ord"     "\\uparrowoncircle"     #X29BD)
-    ("ord"     "\\circledwhitebullet"  #X29BE)
-    ("ord"     "\\circledbullet"       #X29BF)
-    ("bin"     "\\olessthan"   #X29C0)
-    ("bin"     "\\ogreaterthan"        #X29C1)
-    ("ord"     "\\cirscir"     #X29C2)
-    ("ord"     "\\cirE"        #X29C3)
-    ("bin"     "\\boxdiag"     #X29C4)
-    ("bin"     "\\boxbslash"   #X29C5)
-    ("bin"     "\\boxast"      #X29C6)
-    ("bin"     "\\boxcircle"   #X29C7)
-    ("bin"     "\\boxbox"      #X29C8)
-    ("ord"     "\\boxonbox"    #X29C9)
-    ("ord"     "\\triangleodot"        #X29CA)
-    ("ord"     "\\triangleubar"        #X29CB)
-    ("ord"     "\\triangles"   #X29CC)
-    ("bin"     "\\triangleserifs"      #X29CD)
-    ("rel"     "\\rtriltri"    #X29CE)
-    ("rel"     "\\ltrivb"      #X29CF)
-    ("rel"     "\\vbrtri"      #X29D0)
-    ("rel"     "\\lfbowtie"    #X29D1)
-    ("rel"     "\\rfbowtie"    #X29D2)
-    ("rel"     "\\fbowtie"     #X29D3)
-    ("rel"     "\\lftimes"     #X29D4)
-    ("rel"     "\\rftimes"     #X29D5)
-    ("bin"     "\\hourglass"   #X29D6)
-    ("bin"     "\\blackhourglass"      #X29D7)
-    ("open"    "\\lvzigzag"    #X29D8)
-    ("close"   "\\rvzigzag"    #X29D9)
-    ("open"    "\\Lvzigzag"    #X29DA)
-    ("close"   "\\Rvzigzag"    #X29DB)
-    ("ord"     "\\iinfin"      #X29DC)
-    ("ord"     "\\tieinfty"    #X29DD)
-    ("ord"     "\\nvinfty"     #X29DE)
-    ("rel"     "\\dualmap"     #X29DF)
-    ("ord"     "\\laplac"      #X29E0)
-    ("rel"     "\\lrtriangleeq"        #X29E1)
-    ("bin"     "\\shuffle"     #X29E2)
-    ("rel"     "\\eparsl"      #X29E3)
-    ("rel"     "\\smeparsl"    #X29E4)
-    ("rel"     "\\eqvparsl"    #X29E5)
-    ("rel"     "\\gleichstark" #X29E6)
-    ("ord"     "\\thermod"     #X29E7)
-    ("ord"     "\\downtriangleleftblack"       #X29E8)
-    ("ord"     "\\downtrianglerightblack"      #X29E9)
-    ("ord"     "\\blackdiamonddownarrow"       #X29EA)
-    ("bin"     "\\mdlgblklozenge"      #X29EB)
-    ("ord"     "\\circledownarrow"     #X29EC)
-    ("ord"     "\\blackcircledownarrow"        #X29ED)
-    ("ord"     "\\errbarsquare"        #X29EE)
-    ("ord"     "\\errbarblacksquare"   #X29EF)
-    ("ord"     "\\errbardiamond"       #X29F0)
-    ("ord"     "\\errbarblackdiamond"  #X29F1)
-    ("ord"     "\\errbarcircle"        #X29F2)
-    ("ord"     "\\errbarblackcircle"   #X29F3)
-    ("rel"     "\\ruledelayed" #X29F4)
-    ("bin"     "\\setminus"    #X29F5)
-    ("bin"     "\\dsol"        #X29F6)
-    ("bin"     "\\rsolbar"     #X29F7)
-    ("op"      "\\xsol"        #X29F8)
-    ("op"      "\\xbsol"       #X29F9)
-    ("bin"     "\\doubleplus"  #X29FA)
-    ("bin"     "\\tripleplus"  #X29FB)
-    ("open"    "\\lcurvyangle" #X29FC)
-    ("close"   "\\rcurvyangle" #X29FD)
-    ("bin"     "\\tplus"       #X29FE)
-    ("bin"     "\\tminus"      #X29FF)
-    ("op"      "\\bigodot"     #X2A00)
-    ("op"      "\\bigoplus"    #X2A01)
-    ("op"      "\\bigotimes"   #X2A02)
-    ("op"      "\\bigcupdot"   #X2A03)
-    ("op"      "\\biguplus"    #X2A04)
-    ("op"      "\\bigsqcap"    #X2A05)
-    ("op"      "\\bigsqcup"    #X2A06)
-    ("op"      "\\conjquant"   #X2A07)
-    ("op"      "\\disjquant"   #X2A08)
-    ("op"      "\\bigtimes"    #X2A09)
-    ("ord"     "\\modtwosum"   #X2A0A)
-    ("op"      "\\sumint"      #X2A0B)
-    ("op"      "\\iiiint"      #X2A0C)
-    ("op"      "\\intbar"      #X2A0D)
-    ("op"      "\\intBar"      #X2A0E)
-    ("op"      "\\fint"        #X2A0F)
-    ("op"      "\\cirfnint"    #X2A10)
-    ("op"      "\\awint"       #X2A11)
-    ("op"      "\\rppolint"    #X2A12)
-    ("op"      "\\scpolint"    #X2A13)
-    ("op"      "\\npolint"     #X2A14)
-    ("op"      "\\pointint"    #X2A15)
-    ("op"      "\\sqint"       #X2A16)
-    ("op"      "\\intlarhk"    #X2A17)
-    ("op"      "\\intx"        #X2A18)
-    ("op"      "\\intcap"      #X2A19)
-    ("op"      "\\intcup"      #X2A1A)
-    ("op"      "\\upint"       #X2A1B)
-    ("op"      "\\lowint"      #X2A1C)
-    ("op"      "\\Join"        #X2A1D)
-    ("op"      "\\bigtriangleleft"     #X2A1E)
-    ("op"      "\\zcmp"        #X2A1F)
-    ("op"      "\\zpipe"       #X2A20)
-    ("op"      "\\zproject"    #X2A21)
-    ("bin"     "\\ringplus"    #X2A22)
-    ("bin"     "\\plushat"     #X2A23)
-    ("bin"     "\\simplus"     #X2A24)
-    ("bin"     "\\plusdot"     #X2A25)
-    ("bin"     "\\plussim"     #X2A26)
-    ("bin"     "\\plussubtwo"  #X2A27)
-    ("bin"     "\\plustrif"    #X2A28)
-    ("bin"     "\\commaminus"  #X2A29)
-    ("bin"     "\\minusdot"    #X2A2A)
-    ("bin"     "\\minusfdots"  #X2A2B)
-    ("bin"     "\\minusrdots"  #X2A2C)
-    ("bin"     "\\opluslhrim"  #X2A2D)
-    ("bin"     "\\oplusrhrim"  #X2A2E)
-    ("bin"     "\\vectimes"    #X2A2F)
-    ("bin"     "\\dottimes"    #X2A30)
-    ("bin"     "\\timesbar"    #X2A31)
-    ("bin"     "\\btimes"      #X2A32)
-    ("bin"     "\\smashtimes"  #X2A33)
-    ("bin"     "\\otimeslhrim" #X2A34)
-    ("bin"     "\\otimesrhrim" #X2A35)
-    ("bin"     "\\otimeshat"   #X2A36)
-    ("bin"     "\\Otimes"      #X2A37)
-    ("bin"     "\\odiv"        #X2A38)
-    ("bin"     "\\triangleplus"        #X2A39)
-    ("bin"     "\\triangleminus"       #X2A3A)
-    ("bin"     "\\triangletimes"       #X2A3B)
-    ("bin"     "\\intprod"     #X2A3C)
-    ("bin"     "\\intprodr"    #X2A3D)
-    ("bin"     "\\fcmp"        #X2A3E)
-    ("bin"     "\\amalg"       #X2A3F)
-    ("bin"     "\\capdot"      #X2A40)
-    ("bin"     "\\uminus"      #X2A41)
-    ("bin"     "\\barcup"      #X2A42)
-    ("bin"     "\\barcap"      #X2A43)
-    ("bin"     "\\capwedge"    #X2A44)
-    ("bin"     "\\cupvee"      #X2A45)
-    ("bin"     "\\cupovercap"  #X2A46)
-    ("bin"     "\\capovercup"  #X2A47)
-    ("bin"     "\\cupbarcap"   #X2A48)
-    ("bin"     "\\capbarcup"   #X2A49)
-    ("bin"     "\\twocups"     #X2A4A)
-    ("bin"     "\\twocaps"     #X2A4B)
-    ("bin"     "\\closedvarcup"        #X2A4C)
-    ("bin"     "\\closedvarcap"        #X2A4D)
-    ("bin"     "\\Sqcap"       #X2A4E)
-    ("bin"     "\\Sqcup"       #X2A4F)
-    ("bin"     "\\closedvarcupsmashprod"       #X2A50)
-    ("bin"     "\\wedgeodot"   #X2A51)
-    ("bin"     "\\veeodot"     #X2A52)
-    ("bin"     "\\Wedge"       #X2A53)
-    ("bin"     "\\Vee" #X2A54)
-    ("bin"     "\\wedgeonwedge"        #X2A55)
-    ("bin"     "\\veeonvee"    #X2A56)
-    ("bin"     "\\bigslopedvee"        #X2A57)
-    ("bin"     "\\bigslopedwedge"      #X2A58)
-    ("rel"     "\\veeonwedge"  #X2A59)
-    ("bin"     "\\wedgemidvert"        #X2A5A)
-    ("bin"     "\\veemidvert"  #X2A5B)
-    ("bin"     "\\midbarwedge" #X2A5C)
-    ("bin"     "\\midbarvee"   #X2A5D)
-    ("bin"     "\\doublebarwedge"      #X2A5E)
-    ("bin"     "\\wedgebar"    #X2A5F)
-    ("bin"     "\\wedgedoublebar"      #X2A60)
-    ("bin"     "\\varveebar"   #X2A61)
-    ("bin"     "\\doublebarvee"        #X2A62)
-    ("bin"     "\\veedoublebar"        #X2A63)
-    ("bin"     "\\dsub"        #X2A64)
-    ("bin"     "\\rsub"        #X2A65)
-    ("rel"     "\\eqdot"       #X2A66)
-    ("rel"     "\\dotequiv"    #X2A67)
-    ("rel"     "\\equivVert"   #X2A68)
-    ("rel"     "\\equivVvert"  #X2A69)
-    ("rel"     "\\dotsim"      #X2A6A)
-    ("rel"     "\\simrdots"    #X2A6B)
-    ("rel"     "\\simminussim" #X2A6C)
-    ("rel"     "\\congdot"     #X2A6D)
-    ("rel"     "\\asteq"       #X2A6E)
-    ("rel"     "\\hatapprox"   #X2A6F)
-    ("rel"     "\\approxeqq"   #X2A70)
-    ("bin"     "\\eqqplus"     #X2A71)
-    ("bin"     "\\pluseqq"     #X2A72)
-    ("rel"     "\\eqqsim"      #X2A73)
-    ("rel"     "\\Coloneq"     #X2A74)
-    ("rel"     "\\eqeq"        #X2A75)
-    ("rel"     "\\eqeqeq"      #X2A76)
-    ("rel"     "\\ddotseq"     #X2A77)
-    ("rel"     "\\equivDD"     #X2A78)
-    ("rel"     "\\ltcir"       #X2A79)
-    ("rel"     "\\gtcir"       #X2A7A)
-    ("rel"     "\\ltquest"     #X2A7B)
-    ("rel"     "\\gtquest"     #X2A7C)
-    ("rel"     "\\leqslant"    #X2A7D)
-    ("rel"     "\\geqslant"    #X2A7E)
-    ("rel"     "\\lesdot"      #X2A7F)
-    ("rel"     "\\gesdot"      #X2A80)
-    ("rel"     "\\lesdoto"     #X2A81)
-    ("rel"     "\\gesdoto"     #X2A82)
-    ("rel"     "\\lesdotor"    #X2A83)
-    ("rel"     "\\gesdotol"    #X2A84)
-    ("rel"     "\\lessapprox"  #X2A85)
-    ("rel"     "\\gtrapprox"   #X2A86)
-    ("rel"     "\\lneq"        #X2A87)
-    ("rel"     "\\gneq"        #X2A88)
-    ("rel"     "\\lnapprox"    #X2A89)
-    ("rel"     "\\gnapprox"    #X2A8A)
-    ("rel"     "\\lesseqqgtr"  #X2A8B)
-    ("rel"     "\\gtreqqless"  #X2A8C)
-    ("rel"     "\\lsime"       #X2A8D)
-    ("rel"     "\\gsime"       #X2A8E)
-    ("rel"     "\\lsimg"       #X2A8F)
-    ("rel"     "\\gsiml"       #X2A90)
-    ("rel"     "\\lgE" #X2A91)
-    ("rel"     "\\glE" #X2A92)
-    ("rel"     "\\lesges"      #X2A93)
-    ("rel"     "\\gesles"      #X2A94)
-    ("rel"     "\\eqslantless" #X2A95)
-    ("rel"     "\\eqslantgtr"  #X2A96)
-    ("rel"     "\\elsdot"      #X2A97)
-    ("rel"     "\\egsdot"      #X2A98)
-    ("rel"     "\\eqqless"     #X2A99)
-    ("rel"     "\\eqqgtr"      #X2A9A)
-    ("rel"     "\\eqqslantless"        #X2A9B)
-    ("rel"     "\\eqqslantgtr" #X2A9C)
-    ("rel"     "\\simless"     #X2A9D)
-    ("rel"     "\\simgtr"      #X2A9E)
-    ("rel"     "\\simlE"       #X2A9F)
-    ("rel"     "\\simgE"       #X2AA0)
-    ("rel"     "\\Lt"  #X2AA1)
-    ("rel"     "\\Gt"  #X2AA2)
-    ("rel"     "\\partialmeetcontraction"      #X2AA3)
-    ("rel"     "\\glj" #X2AA4)
-    ("rel"     "\\gla" #X2AA5)
-    ("rel"     "\\ltcc"        #X2AA6)
-    ("rel"     "\\gtcc"        #X2AA7)
-    ("rel"     "\\lescc"       #X2AA8)
-    ("rel"     "\\gescc"       #X2AA9)
-    ("rel"     "\\smt" #X2AAA)
-    ("rel"     "\\lat" #X2AAB)
-    ("rel"     "\\smte"        #X2AAC)
-    ("rel"     "\\late"        #X2AAD)
-    ("rel"     "\\bumpeqq"     #X2AAE)
-    ("rel"     "\\preceq"      #X2AAF)
-    ("rel"     "\\succeq"      #X2AB0)
-    ("rel"     "\\precneq"     #X2AB1)
-    ("rel"     "\\succneq"     #X2AB2)
-    ("rel"     "\\preceqq"     #X2AB3)
-    ("rel"     "\\succeqq"     #X2AB4)
-    ("rel"     "\\precneqq"    #X2AB5)
-    ("rel"     "\\succneqq"    #X2AB6)
-    ("rel"     "\\precapprox"  #X2AB7)
-    ("rel"     "\\succapprox"  #X2AB8)
-    ("rel"     "\\precnapprox" #X2AB9)
-    ("rel"     "\\succnapprox" #X2ABA)
-    ("rel"     "\\Prec"        #X2ABB)
-    ("rel"     "\\Succ"        #X2ABC)
-    ("rel"     "\\subsetdot"   #X2ABD)
-    ("rel"     "\\supsetdot"   #X2ABE)
-    ("rel"     "\\subsetplus"  #X2ABF)
-    ("rel"     "\\supsetplus"  #X2AC0)
-    ("rel"     "\\submult"     #X2AC1)
-    ("rel"     "\\supmult"     #X2AC2)
-    ("rel"     "\\subedot"     #X2AC3)
-    ("rel"     "\\supedot"     #X2AC4)
-    ("rel"     "\\subseteqq"   #X2AC5)
-    ("rel"     "\\supseteqq"   #X2AC6)
-    ("rel"     "\\subsim"      #X2AC7)
-    ("rel"     "\\supsim"      #X2AC8)
-    ("rel"     "\\subsetapprox"        #X2AC9)
-    ("rel"     "\\supsetapprox"        #X2ACA)
-    ("rel"     "\\subsetneqq"  #X2ACB)
-    ("rel"     "\\supsetneqq"  #X2ACC)
-    ("rel"     "\\lsqhook"     #X2ACD)
-    ("rel"     "\\rsqhook"     #X2ACE)
-    ("rel"     "\\csub"        #X2ACF)
-    ("rel"     "\\csup"        #X2AD0)
-    ("rel"     "\\csube"       #X2AD1)
-    ("rel"     "\\csupe"       #X2AD2)
-    ("rel"     "\\subsup"      #X2AD3)
-    ("rel"     "\\supsub"      #X2AD4)
-    ("rel"     "\\subsub"      #X2AD5)
-    ("rel"     "\\supsup"      #X2AD6)
-    ("rel"     "\\suphsub"     #X2AD7)
-    ("rel"     "\\supdsub"     #X2AD8)
-    ("rel"     "\\forkv"       #X2AD9)
-    ("rel"     "\\topfork"     #X2ADA)
-    ("rel"     "\\mlcp"        #X2ADB)
-    ("rel"     "\\forks"       #X2ADC)
-    ("rel"     "\\forksnot"    #X2ADD)
-    ("rel"     "\\shortlefttack"       #X2ADE)
-    ("rel"     "\\shortdowntack"       #X2ADF)
-    ("rel"     "\\shortuptack" #X2AE0)
-    ("ord"     "\\perps"       #X2AE1)
-    ("rel"     "\\vDdash"      #X2AE2)
-    ("rel"     "\\dashV"       #X2AE3)
-    ("rel"     "\\Dashv"       #X2AE4)
-    ("rel"     "\\DashV"       #X2AE5)
-    ("rel"     "\\varVdash"    #X2AE6)
-    ("rel"     "\\Barv"        #X2AE7)
-    ("rel"     "\\vBar"        #X2AE8)
-    ("rel"     "\\vBarv"       #X2AE9)
-    ("rel"     "\\barV"        #X2AEA)
-    ("rel"     "\\Vbar"        #X2AEB)
-    ("rel"     "\\Not" #X2AEC)
-    ("rel"     "\\bNot"        #X2AED)
-    ("rel"     "\\revnmid"     #X2AEE)
-    ("rel"     "\\cirmid"      #X2AEF)
-    ("rel"     "\\midcir"      #X2AF0)
-    ("ord"     "\\topcir"      #X2AF1)
-    ("rel"     "\\nhpar"       #X2AF2)
-    ("rel"     "\\parsim"      #X2AF3)
-    ("bin"     "\\interleave"  #X2AF4)
-    ("bin"     "\\nhVvert"     #X2AF5)
-    ("bin"     "\\threedotcolon"       #X2AF6)
-    ("rel"     "\\lllnest"     #X2AF7)
-    ("rel"     "\\gggnest"     #X2AF8)
-    ("rel"     "\\leqqslant"   #X2AF9)
-    ("rel"     "\\geqqslant"   #X2AFA)
-    ("bin"     "\\trslash"     #X2AFB)
-    ("op"      "\\biginterleave"       #X2AFC)
-    ("bin"     "\\sslash"      #X2AFD)
-    ("bin"     "\\talloblong"  #X2AFE)
-    ("op"      "\\bigtalloblong"       #X2AFF)
-    ("ord"     "\\squaretopblack"      #X2B12)
-    ("ord"     "\\squarebotblack"      #X2B13)
-    ("ord"     "\\squareurblack"       #X2B14)
-    ("ord"     "\\squarellblack"       #X2B15)
-    ("ord"     "\\diamondleftblack"    #X2B16)
-    ("ord"     "\\diamondrightblack"   #X2B17)
-    ("ord"     "\\diamondtopblack"     #X2B18)
-    ("ord"     "\\diamondbotblack"     #X2B19)
-    ("ord"     "\\dottedsquare"        #X2B1A)
-    ("ord"     "\\lgblksquare" #X2B1B)
-    ("ord"     "\\lgwhtsquare" #X2B1C)
-    ("ord"     "\\vysmblksquare"       #X2B1D)
-    ("ord"     "\\vysmwhtsquare"       #X2B1E)
-    ("ord"     "\\pentagonblack"       #X2B1F)
-    ("ord"     "\\pentagon"    #X2B20)
-    ("ord"     "\\varhexagon"  #X2B21)
-    ("ord"     "\\varhexagonblack"     #X2B22)
-    ("ord"     "\\hexagonblack"        #X2B23)
-    ("ord"     "\\lgblkcircle" #X2B24)
-    ("ord"     "\\mdblkdiamond"        #X2B25)
-    ("ord"     "\\mdwhtdiamond"        #X2B26)
-    ("ord"     "\\mdblklozenge"        #X2B27)
-    ("ord"     "\\mdwhtlozenge"        #X2B28)
-    ("ord"     "\\smblkdiamond"        #X2B29)
-    ("ord"     "\\smblklozenge"        #X2B2A)
-    ("ord"     "\\smwhtlozenge"        #X2B2B)
-    ("ord"     "\\blkhorzoval" #X2B2C)
-    ("ord"     "\\whthorzoval" #X2B2D)
-    ("ord"     "\\blkvertoval" #X2B2E)
-    ("ord"     "\\whtvertoval" #X2B2F)
-    ("rel"     "\\circleonleftarrow"   #X2B30)
-    ("rel"     "\\leftthreearrows"     #X2B31)
-    ("rel"     "\\leftarrowonoplus"    #X2B32)
-    ("rel"     "\\longleftsquigarrow"  #X2B33)
-    ("rel"     "\\nvtwoheadleftarrow"  #X2B34)
-    ("rel"     "\\nVtwoheadleftarrow"  #X2B35)
-    ("rel"     "\\twoheadmapsfrom"     #X2B36)
-    ("rel"     "\\twoheadleftdbkarrow" #X2B37)
-    ("rel"     "\\leftdotarrow"        #X2B38)
-    ("rel"     "\\nvleftarrowtail"     #X2B39)
-    ("rel"     "\\nVleftarrowtail"     #X2B3A)
-    ("rel"     "\\twoheadleftarrowtail"        #X2B3B)
-    ("rel"     "\\nvtwoheadleftarrowtail"      #X2B3C)
-    ("rel"     "\\nVtwoheadleftarrowtail"      #X2B3D)
-    ("rel"     "\\leftarrowx"  #X2B3E)
-    ("rel"     "\\leftcurvedarrow"     #X2B3F)
-    ("rel"     "\\equalleftarrow"      #X2B40)
-    ("rel"     "\\bsimilarleftarrow"   #X2B41)
-    ("rel"     "\\leftarrowbackapprox" #X2B42)
-    ("rel"     "\\rightarrowgtr"       #X2B43)
-    ("rel"     "\\rightarrowsupset"    #X2B44)
-    ("rel"     "\\LLeftarrow"  #X2B45)
-    ("rel"     "\\RRightarrow" #X2B46)
-    ("rel"     "\\bsimilarrightarrow"  #X2B47)
-    ("rel"     "\\rightarrowbackapprox"        #X2B48)
-    ("rel"     "\\similarleftarrow"    #X2B49)
-    ("rel"     "\\leftarrowapprox"     #X2B4A)
-    ("rel"     "\\leftarrowbsimilar"   #X2B4B)
-    ("rel"     "\\rightarrowbsimilar"  #X2B4C)
-    ("ord"     "\\medwhitestar"        #X2B50)
-    ("ord"     "\\medblackstar"        #X2B51)
-    ("ord"     "\\smwhitestar" #X2B52)
-    ("ord"     "\\rightpentagonblack"  #X2B53)
-    ("ord"     "\\rightpentagon"       #X2B54)
-    ("ord"     "\\postalmark"  #X3012)
-    ("open"    "\\lbrbrak"     #X3014)
-    ("close"   "\\rbrbrak"     #X3015)
-    ("open"    "\\Lbrbrak"     #X3018)
-    ("close"   "\\Rbrbrak"     #X3019)
-    ("ord"     "\\hzigzag"     #X3030)
-    ("alpha"   "\\mbfA"        #X1D400)
-    ("alpha"   "\\mbfB"        #X1D401)
-    ("alpha"   "\\mbfC"        #X1D402)
-    ("alpha"   "\\mbfD"        #X1D403)
-    ("alpha"   "\\mbfE"        #X1D404)
-    ("alpha"   "\\mbfF"        #X1D405)
-    ("alpha"   "\\mbfG"        #X1D406)
-    ("alpha"   "\\mbfH"        #X1D407)
-    ("alpha"   "\\mbfI"        #X1D408)
-    ("alpha"   "\\mbfJ"        #X1D409)
-    ("alpha"   "\\mbfK"        #X1D40A)
-    ("alpha"   "\\mbfL"        #X1D40B)
-    ("alpha"   "\\mbfM"        #X1D40C)
-    ("alpha"   "\\mbfN"        #X1D40D)
-    ("alpha"   "\\mbfO"        #X1D40E)
-    ("alpha"   "\\mbfP"        #X1D40F)
-    ("alpha"   "\\mbfQ"        #X1D410)
-    ("alpha"   "\\mbfR"        #X1D411)
-    ("alpha"   "\\mbfS"        #X1D412)
-    ("alpha"   "\\mbfT"        #X1D413)
-    ("alpha"   "\\mbfU"        #X1D414)
-    ("alpha"   "\\mbfV"        #X1D415)
-    ("alpha"   "\\mbfW"        #X1D416)
-    ("alpha"   "\\mbfX"        #X1D417)
-    ("alpha"   "\\mbfY"        #X1D418)
-    ("alpha"   "\\mbfZ"        #X1D419)
-    ("alpha"   "\\mbfa"        #X1D41A)
-    ("alpha"   "\\mbfb"        #X1D41B)
-    ("alpha"   "\\mbfc"        #X1D41C)
-    ("alpha"   "\\mbfd"        #X1D41D)
-    ("alpha"   "\\mbfe"        #X1D41E)
-    ("alpha"   "\\mbff"        #X1D41F)
-    ("alpha"   "\\mbfg"        #X1D420)
-    ("alpha"   "\\mbfh"        #X1D421)
-    ("alpha"   "\\mbfi"        #X1D422)
-    ("alpha"   "\\mbfj"        #X1D423)
-    ("alpha"   "\\mbfk"        #X1D424)
-    ("alpha"   "\\mbfl"        #X1D425)
-    ("alpha"   "\\mbfm"        #X1D426)
-    ("alpha"   "\\mbfn"        #X1D427)
-    ("alpha"   "\\mbfo"        #X1D428)
-    ("alpha"   "\\mbfp"        #X1D429)
-    ("alpha"   "\\mbfq"        #X1D42A)
-    ("alpha"   "\\mbfr"        #X1D42B)
-    ("alpha"   "\\mbfs"        #X1D42C)
-    ("alpha"   "\\mbft"        #X1D42D)
-    ("alpha"   "\\mbfu"        #X1D42E)
-    ("alpha"   "\\mbfv"        #X1D42F)
-    ("alpha"   "\\mbfw"        #X1D430)
-    ("alpha"   "\\mbfx"        #X1D431)
-    ("alpha"   "\\mbfy"        #X1D432)
-    ("alpha"   "\\mbfz"        #X1D433)
-    ("alpha"   "\\mitA"        #X1D434)
-    ("alpha"   "\\mitB"        #X1D435)
-    ("alpha"   "\\mitC"        #X1D436)
-    ("alpha"   "\\mitD"        #X1D437)
-    ("alpha"   "\\mitE"        #X1D438)
-    ("alpha"   "\\mitF"        #X1D439)
-    ("alpha"   "\\mitG"        #X1D43A)
-    ("alpha"   "\\mitH"        #X1D43B)
-    ("alpha"   "\\mitI"        #X1D43C)
-    ("alpha"   "\\mitJ"        #X1D43D)
-    ("alpha"   "\\mitK"        #X1D43E)
-    ("alpha"   "\\mitL"        #X1D43F)
-    ("alpha"   "\\mitM"        #X1D440)
-    ("alpha"   "\\mitN"        #X1D441)
-    ("alpha"   "\\mitO"        #X1D442)
-    ("alpha"   "\\mitP"        #X1D443)
-    ("alpha"   "\\mitQ"        #X1D444)
-    ("alpha"   "\\mitR"        #X1D445)
-    ("alpha"   "\\mitS"        #X1D446)
-    ("alpha"   "\\mitT"        #X1D447)
-    ("alpha"   "\\mitU"        #X1D448)
-    ("alpha"   "\\mitV"        #X1D449)
-    ("alpha"   "\\mitW"        #X1D44A)
-    ("alpha"   "\\mitX"        #X1D44B)
-    ("alpha"   "\\mitY"        #X1D44C)
-    ("alpha"   "\\mitZ"        #X1D44D)
-    ("alpha"   "\\mita"        #X1D44E)
-    ("alpha"   "\\mitb"        #X1D44F)
-    ("alpha"   "\\mitc"        #X1D450)
-    ("alpha"   "\\mitd"        #X1D451)
-    ("alpha"   "\\mite"        #X1D452)
-    ("alpha"   "\\mitf"        #X1D453)
-    ("alpha"   "\\mitg"        #X1D454)
-    ("alpha"   "\\miti"        #X1D456)
-    ("alpha"   "\\mitj"        #X1D457)
-    ("alpha"   "\\mitk"        #X1D458)
-    ("alpha"   "\\mitl"        #X1D459)
-    ("alpha"   "\\mitm"        #X1D45A)
-    ("alpha"   "\\mitn"        #X1D45B)
-    ("alpha"   "\\mito"        #X1D45C)
-    ("alpha"   "\\mitp"        #X1D45D)
-    ("alpha"   "\\mitq"        #X1D45E)
-    ("alpha"   "\\mitr"        #X1D45F)
-    ("alpha"   "\\mits"        #X1D460)
-    ("alpha"   "\\mitt"        #X1D461)
-    ("alpha"   "\\mitu"        #X1D462)
-    ("alpha"   "\\mitv"        #X1D463)
-    ("alpha"   "\\mitw"        #X1D464)
-    ("alpha"   "\\mitx"        #X1D465)
-    ("alpha"   "\\mity"        #X1D466)
-    ("alpha"   "\\mitz"        #X1D467)
-    ("alpha"   "\\mbfitA"      #X1D468)
-    ("alpha"   "\\mbfitB"      #X1D469)
-    ("alpha"   "\\mbfitC"      #X1D46A)
-    ("alpha"   "\\mbfitD"      #X1D46B)
-    ("alpha"   "\\mbfitE"      #X1D46C)
-    ("alpha"   "\\mbfitF"      #X1D46D)
-    ("alpha"   "\\mbfitG"      #X1D46E)
-    ("alpha"   "\\mbfitH"      #X1D46F)
-    ("alpha"   "\\mbfitI"      #X1D470)
-    ("alpha"   "\\mbfitJ"      #X1D471)
-    ("alpha"   "\\mbfitK"      #X1D472)
-    ("alpha"   "\\mbfitL"      #X1D473)
-    ("alpha"   "\\mbfitM"      #X1D474)
-    ("alpha"   "\\mbfitN"      #X1D475)
-    ("alpha"   "\\mbfitO"      #X1D476)
-    ("alpha"   "\\mbfitP"      #X1D477)
-    ("alpha"   "\\mbfitQ"      #X1D478)
-    ("alpha"   "\\mbfitR"      #X1D479)
-    ("alpha"   "\\mbfitS"      #X1D47A)
-    ("alpha"   "\\mbfitT"      #X1D47B)
-    ("alpha"   "\\mbfitU"      #X1D47C)
-    ("alpha"   "\\mbfitV"      #X1D47D)
-    ("alpha"   "\\mbfitW"      #X1D47E)
-    ("alpha"   "\\mbfitX"      #X1D47F)
-    ("alpha"   "\\mbfitY"      #X1D480)
-    ("alpha"   "\\mbfitZ"      #X1D481)
-    ("alpha"   "\\mbfita"      #X1D482)
-    ("alpha"   "\\mbfitb"      #X1D483)
-    ("alpha"   "\\mbfitc"      #X1D484)
-    ("alpha"   "\\mbfitd"      #X1D485)
-    ("alpha"   "\\mbfite"      #X1D486)
-    ("alpha"   "\\mbfitf"      #X1D487)
-    ("alpha"   "\\mbfitg"      #X1D488)
-    ("alpha"   "\\mbfith"      #X1D489)
-    ("alpha"   "\\mbfiti"      #X1D48A)
-    ("alpha"   "\\mbfitj"      #X1D48B)
-    ("alpha"   "\\mbfitk"      #X1D48C)
-    ("alpha"   "\\mbfitl"      #X1D48D)
-    ("alpha"   "\\mbfitm"      #X1D48E)
-    ("alpha"   "\\mbfitn"      #X1D48F)
-    ("alpha"   "\\mbfito"      #X1D490)
-    ("alpha"   "\\mbfitp"      #X1D491)
-    ("alpha"   "\\mbfitq"      #X1D492)
-    ("alpha"   "\\mbfitr"      #X1D493)
-    ("alpha"   "\\mbfits"      #X1D494)
-    ("alpha"   "\\mbfitt"      #X1D495)
-    ("alpha"   "\\mbfitu"      #X1D496)
-    ("alpha"   "\\mbfitv"      #X1D497)
-    ("alpha"   "\\mbfitw"      #X1D498)
-    ("alpha"   "\\mbfitx"      #X1D499)
-    ("alpha"   "\\mbfity"      #X1D49A)
-    ("alpha"   "\\mbfitz"      #X1D49B)
-    ("alpha"   "\\mscrA"       #X1D49C)
-    ("alpha"   "\\mscrC"       #X1D49E)
-    ("alpha"   "\\mscrD"       #X1D49F)
-    ("alpha"   "\\mscrG"       #X1D4A2)
-    ("alpha"   "\\mscrJ"       #X1D4A5)
-    ("alpha"   "\\mscrK"       #X1D4A6)
-    ("alpha"   "\\mscrN"       #X1D4A9)
-    ("alpha"   "\\mscrO"       #X1D4AA)
-    ("alpha"   "\\mscrP"       #X1D4AB)
-    ("alpha"   "\\mscrQ"       #X1D4AC)
-    ("alpha"   "\\mscrS"       #X1D4AE)
-    ("alpha"   "\\mscrT"       #X1D4AF)
-    ("alpha"   "\\mscrU"       #X1D4B0)
-    ("alpha"   "\\mscrV"       #X1D4B1)
-    ("alpha"   "\\mscrW"       #X1D4B2)
-    ("alpha"   "\\mscrX"       #X1D4B3)
-    ("alpha"   "\\mscrY"       #X1D4B4)
-    ("alpha"   "\\mscrZ"       #X1D4B5)
-    ("alpha"   "\\mscra"       #X1D4B6)
-    ("alpha"   "\\mscrb"       #X1D4B7)
-    ("alpha"   "\\mscrc"       #X1D4B8)
-    ("alpha"   "\\mscrd"       #X1D4B9)
-    ("alpha"   "\\mscrf"       #X1D4BB)
-    ("alpha"   "\\mscrh"       #X1D4BD)
-    ("alpha"   "\\mscri"       #X1D4BE)
-    ("alpha"   "\\mscrj"       #X1D4BF)
-    ("alpha"   "\\mscrk"       #X1D4C0)
-    ("alpha"   "\\mscrl"       #X1D4C1)
-    ("alpha"   "\\mscrm"       #X1D4C2)
-    ("alpha"   "\\mscrn"       #X1D4C3)
-    ("alpha"   "\\mscrp"       #X1D4C5)
-    ("alpha"   "\\mscrq"       #X1D4C6)
-    ("alpha"   "\\mscrr"       #X1D4C7)
-    ("alpha"   "\\mscrs"       #X1D4C8)
-    ("alpha"   "\\mscrt"       #X1D4C9)
-    ("alpha"   "\\mscru"       #X1D4CA)
-    ("alpha"   "\\mscrv"       #X1D4CB)
-    ("alpha"   "\\mscrw"       #X1D4CC)
-    ("alpha"   "\\mscrx"       #X1D4CD)
-    ("alpha"   "\\mscry"       #X1D4CE)
-    ("alpha"   "\\mscrz"       #X1D4CF)
-    ("alpha"   "\\mbfscrA"     #X1D4D0)
-    ("alpha"   "\\mbfscrB"     #X1D4D1)
-    ("alpha"   "\\mbfscrC"     #X1D4D2)
-    ("alpha"   "\\mbfscrD"     #X1D4D3)
-    ("alpha"   "\\mbfscrE"     #X1D4D4)
-    ("alpha"   "\\mbfscrF"     #X1D4D5)
-    ("alpha"   "\\mbfscrG"     #X1D4D6)
-    ("alpha"   "\\mbfscrH"     #X1D4D7)
-    ("alpha"   "\\mbfscrI"     #X1D4D8)
-    ("alpha"   "\\mbfscrJ"     #X1D4D9)
-    ("alpha"   "\\mbfscrK"     #X1D4DA)
-    ("alpha"   "\\mbfscrL"     #X1D4DB)
-    ("alpha"   "\\mbfscrM"     #X1D4DC)
-    ("alpha"   "\\mbfscrN"     #X1D4DD)
-    ("alpha"   "\\mbfscrO"     #X1D4DE)
-    ("alpha"   "\\mbfscrP"     #X1D4DF)
-    ("alpha"   "\\mbfscrQ"     #X1D4E0)
-    ("alpha"   "\\mbfscrR"     #X1D4E1)
-    ("alpha"   "\\mbfscrS"     #X1D4E2)
-    ("alpha"   "\\mbfscrT"     #X1D4E3)
-    ("alpha"   "\\mbfscrU"     #X1D4E4)
-    ("alpha"   "\\mbfscrV"     #X1D4E5)
-    ("alpha"   "\\mbfscrW"     #X1D4E6)
-    ("alpha"   "\\mbfscrX"     #X1D4E7)
-    ("alpha"   "\\mbfscrY"     #X1D4E8)
-    ("alpha"   "\\mbfscrZ"     #X1D4E9)
-    ("alpha"   "\\mbfscra"     #X1D4EA)
-    ("alpha"   "\\mbfscrb"     #X1D4EB)
-    ("alpha"   "\\mbfscrc"     #X1D4EC)
-    ("alpha"   "\\mbfscrd"     #X1D4ED)
-    ("alpha"   "\\mbfscre"     #X1D4EE)
-    ("alpha"   "\\mbfscrf"     #X1D4EF)
-    ("alpha"   "\\mbfscrg"     #X1D4F0)
-    ("alpha"   "\\mbfscrh"     #X1D4F1)
-    ("alpha"   "\\mbfscri"     #X1D4F2)
-    ("alpha"   "\\mbfscrj"     #X1D4F3)
-    ("alpha"   "\\mbfscrk"     #X1D4F4)
-    ("alpha"   "\\mbfscrl"     #X1D4F5)
-    ("alpha"   "\\mbfscrm"     #X1D4F6)
-    ("alpha"   "\\mbfscrn"     #X1D4F7)
-    ("alpha"   "\\mbfscro"     #X1D4F8)
-    ("alpha"   "\\mbfscrp"     #X1D4F9)
-    ("alpha"   "\\mbfscrq"     #X1D4FA)
-    ("alpha"   "\\mbfscrr"     #X1D4FB)
-    ("alpha"   "\\mbfscrs"     #X1D4FC)
-    ("alpha"   "\\mbfscrt"     #X1D4FD)
-    ("alpha"   "\\mbfscru"     #X1D4FE)
-    ("alpha"   "\\mbfscrv"     #X1D4FF)
-    ("alpha"   "\\mbfscrw"     #X1D500)
-    ("alpha"   "\\mbfscrx"     #X1D501)
-    ("alpha"   "\\mbfscry"     #X1D502)
-    ("alpha"   "\\mbfscrz"     #X1D503)
-    ("alpha"   "\\mfrakA"      #X1D504)
-    ("alpha"   "\\mfrakB"      #X1D505)
-    ("alpha"   "\\mfrakD"      #X1D507)
-    ("alpha"   "\\mfrakE"      #X1D508)
-    ("alpha"   "\\mfrakF"      #X1D509)
-    ("alpha"   "\\mfrakG"      #X1D50A)
-    ("alpha"   "\\mfrakJ"      #X1D50D)
-    ("alpha"   "\\mfrakK"      #X1D50E)
-    ("alpha"   "\\mfrakL"      #X1D50F)
-    ("alpha"   "\\mfrakM"      #X1D510)
-    ("alpha"   "\\mfrakN"      #X1D511)
-    ("alpha"   "\\mfrakO"      #X1D512)
-    ("alpha"   "\\mfrakP"      #X1D513)
-    ("alpha"   "\\mfrakQ"      #X1D514)
-    ("alpha"   "\\mfrakS"      #X1D516)
-    ("alpha"   "\\mfrakT"      #X1D517)
-    ("alpha"   "\\mfrakU"      #X1D518)
-    ("alpha"   "\\mfrakV"      #X1D519)
-    ("alpha"   "\\mfrakW"      #X1D51A)
-    ("alpha"   "\\mfrakX"      #X1D51B)
-    ("alpha"   "\\mfrakY"      #X1D51C)
-    ("alpha"   "\\mfraka"      #X1D51E)
-    ("alpha"   "\\mfrakb"      #X1D51F)
-    ("alpha"   "\\mfrakc"      #X1D520)
-    ("alpha"   "\\mfrakd"      #X1D521)
-    ("alpha"   "\\mfrake"      #X1D522)
-    ("alpha"   "\\mfrakf"      #X1D523)
-    ("alpha"   "\\mfrakg"      #X1D524)
-    ("alpha"   "\\mfrakh"      #X1D525)
-    ("alpha"   "\\mfraki"      #X1D526)
-    ("alpha"   "\\mfrakj"      #X1D527)
-    ("alpha"   "\\mfrakk"      #X1D528)
-    ("alpha"   "\\mfrakl"      #X1D529)
-    ("alpha"   "\\mfrakm"      #X1D52A)
-    ("alpha"   "\\mfrakn"      #X1D52B)
-    ("alpha"   "\\mfrako"      #X1D52C)
-    ("alpha"   "\\mfrakp"      #X1D52D)
-    ("alpha"   "\\mfrakq"      #X1D52E)
-    ("alpha"   "\\mfrakr"      #X1D52F)
-    ("alpha"   "\\mfraks"      #X1D530)
-    ("alpha"   "\\mfrakt"      #X1D531)
-    ("alpha"   "\\mfraku"      #X1D532)
-    ("alpha"   "\\mfrakv"      #X1D533)
-    ("alpha"   "\\mfrakw"      #X1D534)
-    ("alpha"   "\\mfrakx"      #X1D535)
-    ("alpha"   "\\mfraky"      #X1D536)
-    ("alpha"   "\\mfrakz"      #X1D537)
-    ("alpha"   "\\BbbA"        #X1D538)
-    ("alpha"   "\\BbbB"        #X1D539)
-    ("alpha"   "\\BbbD"        #X1D53B)
-    ("alpha"   "\\BbbE"        #X1D53C)
-    ("alpha"   "\\BbbF"        #X1D53D)
-    ("alpha"   "\\BbbG"        #X1D53E)
-    ("alpha"   "\\BbbI"        #X1D540)
-    ("alpha"   "\\BbbJ"        #X1D541)
-    ("alpha"   "\\BbbK"        #X1D542)
-    ("alpha"   "\\BbbL"        #X1D543)
-    ("alpha"   "\\BbbM"        #X1D544)
-    ("alpha"   "\\BbbO"        #X1D546)
-    ("alpha"   "\\BbbS"        #X1D54A)
-    ("alpha"   "\\BbbT"        #X1D54B)
-    ("alpha"   "\\BbbU"        #X1D54C)
-    ("alpha"   "\\BbbV"        #X1D54D)
-    ("alpha"   "\\BbbW"        #X1D54E)
-    ("alpha"   "\\BbbX"        #X1D54F)
-    ("alpha"   "\\BbbY"        #X1D550)
-    ("alpha"   "\\Bbba"        #X1D552)
-    ("alpha"   "\\Bbbb"        #X1D553)
-    ("alpha"   "\\Bbbc"        #X1D554)
-    ("alpha"   "\\Bbbd"        #X1D555)
-    ("alpha"   "\\Bbbe"        #X1D556)
-    ("alpha"   "\\Bbbf"        #X1D557)
-    ("alpha"   "\\Bbbg"        #X1D558)
-    ("alpha"   "\\Bbbh"        #X1D559)
-    ("alpha"   "\\Bbbi"        #X1D55A)
-    ("alpha"   "\\Bbbj"        #X1D55B)
-    ("alpha"   "\\Bbbk"        #X1D55C)
-    ("alpha"   "\\Bbbl"        #X1D55D)
-    ("alpha"   "\\Bbbm"        #X1D55E)
-    ("alpha"   "\\Bbbn"        #X1D55F)
-    ("alpha"   "\\Bbbo"        #X1D560)
-    ("alpha"   "\\Bbbp"        #X1D561)
-    ("alpha"   "\\Bbbq"        #X1D562)
-    ("alpha"   "\\Bbbr"        #X1D563)
-    ("alpha"   "\\Bbbs"        #X1D564)
-    ("alpha"   "\\Bbbt"        #X1D565)
-    ("alpha"   "\\Bbbu"        #X1D566)
-    ("alpha"   "\\Bbbv"        #X1D567)
-    ("alpha"   "\\Bbbw"        #X1D568)
-    ("alpha"   "\\Bbbx"        #X1D569)
-    ("alpha"   "\\Bbby"        #X1D56A)
-    ("alpha"   "\\Bbbz"        #X1D56B)
-    ("alpha"   "\\mbffrakA"    #X1D56C)
-    ("alpha"   "\\mbffrakB"    #X1D56D)
-    ("alpha"   "\\mbffrakC"    #X1D56E)
-    ("alpha"   "\\mbffrakD"    #X1D56F)
-    ("alpha"   "\\mbffrakE"    #X1D570)
-    ("alpha"   "\\mbffrakF"    #X1D571)
-    ("alpha"   "\\mbffrakG"    #X1D572)
-    ("alpha"   "\\mbffrakH"    #X1D573)
-    ("alpha"   "\\mbffrakI"    #X1D574)
-    ("alpha"   "\\mbffrakJ"    #X1D575)
-    ("alpha"   "\\mbffrakK"    #X1D576)
-    ("alpha"   "\\mbffrakL"    #X1D577)
-    ("alpha"   "\\mbffrakM"    #X1D578)
-    ("alpha"   "\\mbffrakN"    #X1D579)
-    ("alpha"   "\\mbffrakO"    #X1D57A)
-    ("alpha"   "\\mbffrakP"    #X1D57B)
-    ("alpha"   "\\mbffrakQ"    #X1D57C)
-    ("alpha"   "\\mbffrakR"    #X1D57D)
-    ("alpha"   "\\mbffrakS"    #X1D57E)
-    ("alpha"   "\\mbffrakT"    #X1D57F)
-    ("alpha"   "\\mbffrakU"    #X1D580)
-    ("alpha"   "\\mbffrakV"    #X1D581)
-    ("alpha"   "\\mbffrakW"    #X1D582)
-    ("alpha"   "\\mbffrakX"    #X1D583)
-    ("alpha"   "\\mbffrakY"    #X1D584)
-    ("alpha"   "\\mbffrakZ"    #X1D585)
-    ("alpha"   "\\mbffraka"    #X1D586)
-    ("alpha"   "\\mbffrakb"    #X1D587)
-    ("alpha"   "\\mbffrakc"    #X1D588)
-    ("alpha"   "\\mbffrakd"    #X1D589)
-    ("alpha"   "\\mbffrake"    #X1D58A)
-    ("alpha"   "\\mbffrakf"    #X1D58B)
-    ("alpha"   "\\mbffrakg"    #X1D58C)
-    ("alpha"   "\\mbffrakh"    #X1D58D)
-    ("alpha"   "\\mbffraki"    #X1D58E)
-    ("alpha"   "\\mbffrakj"    #X1D58F)
-    ("alpha"   "\\mbffrakk"    #X1D590)
-    ("alpha"   "\\mbffrakl"    #X1D591)
-    ("alpha"   "\\mbffrakm"    #X1D592)
-    ("alpha"   "\\mbffrakn"    #X1D593)
-    ("alpha"   "\\mbffrako"    #X1D594)
-    ("alpha"   "\\mbffrakp"    #X1D595)
-    ("alpha"   "\\mbffrakq"    #X1D596)
-    ("alpha"   "\\mbffrakr"    #X1D597)
-    ("alpha"   "\\mbffraks"    #X1D598)
-    ("alpha"   "\\mbffrakt"    #X1D599)
-    ("alpha"   "\\mbffraku"    #X1D59A)
-    ("alpha"   "\\mbffrakv"    #X1D59B)
-    ("alpha"   "\\mbffrakw"    #X1D59C)
-    ("alpha"   "\\mbffrakx"    #X1D59D)
-    ("alpha"   "\\mbffraky"    #X1D59E)
-    ("alpha"   "\\mbffrakz"    #X1D59F)
-    ("alpha"   "\\msansA"      #X1D5A0)
-    ("alpha"   "\\msansB"      #X1D5A1)
-    ("alpha"   "\\msansC"      #X1D5A2)
-    ("alpha"   "\\msansD"      #X1D5A3)
-    ("alpha"   "\\msansE"      #X1D5A4)
-    ("alpha"   "\\msansF"      #X1D5A5)
-    ("alpha"   "\\msansG"      #X1D5A6)
-    ("alpha"   "\\msansH"      #X1D5A7)
-    ("alpha"   "\\msansI"      #X1D5A8)
-    ("alpha"   "\\msansJ"      #X1D5A9)
-    ("alpha"   "\\msansK"      #X1D5AA)
-    ("alpha"   "\\msansL"      #X1D5AB)
-    ("alpha"   "\\msansM"      #X1D5AC)
-    ("alpha"   "\\msansN"      #X1D5AD)
-    ("alpha"   "\\msansO"      #X1D5AE)
-    ("alpha"   "\\msansP"      #X1D5AF)
-    ("alpha"   "\\msansQ"      #X1D5B0)
-    ("alpha"   "\\msansR"      #X1D5B1)
-    ("alpha"   "\\msansS"      #X1D5B2)
-    ("alpha"   "\\msansT"      #X1D5B3)
-    ("alpha"   "\\msansU"      #X1D5B4)
-    ("alpha"   "\\msansV"      #X1D5B5)
-    ("alpha"   "\\msansW"      #X1D5B6)
-    ("alpha"   "\\msansX"      #X1D5B7)
-    ("alpha"   "\\msansY"      #X1D5B8)
-    ("alpha"   "\\msansZ"      #X1D5B9)
-    ("alpha"   "\\msansa"      #X1D5BA)
-    ("alpha"   "\\msansb"      #X1D5BB)
-    ("alpha"   "\\msansc"      #X1D5BC)
-    ("alpha"   "\\msansd"      #X1D5BD)
-    ("alpha"   "\\msanse"      #X1D5BE)
-    ("alpha"   "\\msansf"      #X1D5BF)
-    ("alpha"   "\\msansg"      #X1D5C0)
-    ("alpha"   "\\msansh"      #X1D5C1)
-    ("alpha"   "\\msansi"      #X1D5C2)
-    ("alpha"   "\\msansj"      #X1D5C3)
-    ("alpha"   "\\msansk"      #X1D5C4)
-    ("alpha"   "\\msansl"      #X1D5C5)
-    ("alpha"   "\\msansm"      #X1D5C6)
-    ("alpha"   "\\msansn"      #X1D5C7)
-    ("alpha"   "\\msanso"      #X1D5C8)
-    ("alpha"   "\\msansp"      #X1D5C9)
-    ("alpha"   "\\msansq"      #X1D5CA)
-    ("alpha"   "\\msansr"      #X1D5CB)
-    ("alpha"   "\\msanss"      #X1D5CC)
-    ("alpha"   "\\msanst"      #X1D5CD)
-    ("alpha"   "\\msansu"      #X1D5CE)
-    ("alpha"   "\\msansv"      #X1D5CF)
-    ("alpha"   "\\msansw"      #X1D5D0)
-    ("alpha"   "\\msansx"      #X1D5D1)
-    ("alpha"   "\\msansy"      #X1D5D2)
-    ("alpha"   "\\msansz"      #X1D5D3)
-    ("alpha"   "\\mbfsansA"    #X1D5D4)
-    ("alpha"   "\\mbfsansB"    #X1D5D5)
-    ("alpha"   "\\mbfsansC"    #X1D5D6)
-    ("alpha"   "\\mbfsansD"    #X1D5D7)
-    ("alpha"   "\\mbfsansE"    #X1D5D8)
-    ("alpha"   "\\mbfsansF"    #X1D5D9)
-    ("alpha"   "\\mbfsansG"    #X1D5DA)
-    ("alpha"   "\\mbfsansH"    #X1D5DB)
-    ("alpha"   "\\mbfsansI"    #X1D5DC)
-    ("alpha"   "\\mbfsansJ"    #X1D5DD)
-    ("alpha"   "\\mbfsansK"    #X1D5DE)
-    ("alpha"   "\\mbfsansL"    #X1D5DF)
-    ("alpha"   "\\mbfsansM"    #X1D5E0)
-    ("alpha"   "\\mbfsansN"    #X1D5E1)
-    ("alpha"   "\\mbfsansO"    #X1D5E2)
-    ("alpha"   "\\mbfsansP"    #X1D5E3)
-    ("alpha"   "\\mbfsansQ"    #X1D5E4)
-    ("alpha"   "\\mbfsansR"    #X1D5E5)
-    ("alpha"   "\\mbfsansS"    #X1D5E6)
-    ("alpha"   "\\mbfsansT"    #X1D5E7)
-    ("alpha"   "\\mbfsansU"    #X1D5E8)
-    ("alpha"   "\\mbfsansV"    #X1D5E9)
-    ("alpha"   "\\mbfsansW"    #X1D5EA)
-    ("alpha"   "\\mbfsansX"    #X1D5EB)
-    ("alpha"   "\\mbfsansY"    #X1D5EC)
-    ("alpha"   "\\mbfsansZ"    #X1D5ED)
-    ("alpha"   "\\mbfsansa"    #X1D5EE)
-    ("alpha"   "\\mbfsansb"    #X1D5EF)
-    ("alpha"   "\\mbfsansc"    #X1D5F0)
-    ("alpha"   "\\mbfsansd"    #X1D5F1)
-    ("alpha"   "\\mbfsanse"    #X1D5F2)
-    ("alpha"   "\\mbfsansf"    #X1D5F3)
-    ("alpha"   "\\mbfsansg"    #X1D5F4)
-    ("alpha"   "\\mbfsansh"    #X1D5F5)
-    ("alpha"   "\\mbfsansi"    #X1D5F6)
-    ("alpha"   "\\mbfsansj"    #X1D5F7)
-    ("alpha"   "\\mbfsansk"    #X1D5F8)
-    ("alpha"   "\\mbfsansl"    #X1D5F9)
-    ("alpha"   "\\mbfsansm"    #X1D5FA)
-    ("alpha"   "\\mbfsansn"    #X1D5FB)
-    ("alpha"   "\\mbfsanso"    #X1D5FC)
-    ("alpha"   "\\mbfsansp"    #X1D5FD)
-    ("alpha"   "\\mbfsansq"    #X1D5FE)
-    ("alpha"   "\\mbfsansr"    #X1D5FF)
-    ("alpha"   "\\mbfsanss"    #X1D600)
-    ("alpha"   "\\mbfsanst"    #X1D601)
-    ("alpha"   "\\mbfsansu"    #X1D602)
-    ("alpha"   "\\mbfsansv"    #X1D603)
-    ("alpha"   "\\mbfsansw"    #X1D604)
-    ("alpha"   "\\mbfsansx"    #X1D605)
-    ("alpha"   "\\mbfsansy"    #X1D606)
-    ("alpha"   "\\mbfsansz"    #X1D607)
-    ("alpha"   "\\mitsansA"    #X1D608)
-    ("alpha"   "\\mitsansB"    #X1D609)
-    ("alpha"   "\\mitsansC"    #X1D60A)
-    ("alpha"   "\\mitsansD"    #X1D60B)
-    ("alpha"   "\\mitsansE"    #X1D60C)
-    ("alpha"   "\\mitsansF"    #X1D60D)
-    ("alpha"   "\\mitsansG"    #X1D60E)
-    ("alpha"   "\\mitsansH"    #X1D60F)
-    ("alpha"   "\\mitsansI"    #X1D610)
-    ("alpha"   "\\mitsansJ"    #X1D611)
-    ("alpha"   "\\mitsansK"    #X1D612)
-    ("alpha"   "\\mitsansL"    #X1D613)
-    ("alpha"   "\\mitsansM"    #X1D614)
-    ("alpha"   "\\mitsansN"    #X1D615)
-    ("alpha"   "\\mitsansO"    #X1D616)
-    ("alpha"   "\\mitsansP"    #X1D617)
-    ("alpha"   "\\mitsansQ"    #X1D618)
-    ("alpha"   "\\mitsansR"    #X1D619)
-    ("alpha"   "\\mitsansS"    #X1D61A)
-    ("alpha"   "\\mitsansT"    #X1D61B)
-    ("alpha"   "\\mitsansU"    #X1D61C)
-    ("alpha"   "\\mitsansV"    #X1D61D)
-    ("alpha"   "\\mitsansW"    #X1D61E)
-    ("alpha"   "\\mitsansX"    #X1D61F)
-    ("alpha"   "\\mitsansY"    #X1D620)
-    ("alpha"   "\\mitsansZ"    #X1D621)
-    ("alpha"   "\\mitsansa"    #X1D622)
-    ("alpha"   "\\mitsansb"    #X1D623)
-    ("alpha"   "\\mitsansc"    #X1D624)
-    ("alpha"   "\\mitsansd"    #X1D625)
-    ("alpha"   "\\mitsanse"    #X1D626)
-    ("alpha"   "\\mitsansf"    #X1D627)
-    ("alpha"   "\\mitsansg"    #X1D628)
-    ("alpha"   "\\mitsansh"    #X1D629)
-    ("alpha"   "\\mitsansi"    #X1D62A)
-    ("alpha"   "\\mitsansj"    #X1D62B)
-    ("alpha"   "\\mitsansk"    #X1D62C)
-    ("alpha"   "\\mitsansl"    #X1D62D)
-    ("alpha"   "\\mitsansm"    #X1D62E)
-    ("alpha"   "\\mitsansn"    #X1D62F)
-    ("alpha"   "\\mitsanso"    #X1D630)
-    ("alpha"   "\\mitsansp"    #X1D631)
-    ("alpha"   "\\mitsansq"    #X1D632)
-    ("alpha"   "\\mitsansr"    #X1D633)
-    ("alpha"   "\\mitsanss"    #X1D634)
-    ("alpha"   "\\mitsanst"    #X1D635)
-    ("alpha"   "\\mitsansu"    #X1D636)
-    ("alpha"   "\\mitsansv"    #X1D637)
-    ("alpha"   "\\mitsansw"    #X1D638)
-    ("alpha"   "\\mitsansx"    #X1D639)
-    ("alpha"   "\\mitsansy"    #X1D63A)
-    ("alpha"   "\\mitsansz"    #X1D63B)
-    ("alpha"   "\\mbfitsansA"  #X1D63C)
-    ("alpha"   "\\mbfitsansB"  #X1D63D)
-    ("alpha"   "\\mbfitsansC"  #X1D63E)
-    ("alpha"   "\\mbfitsansD"  #X1D63F)
-    ("alpha"   "\\mbfitsansE"  #X1D640)
-    ("alpha"   "\\mbfitsansF"  #X1D641)
-    ("alpha"   "\\mbfitsansG"  #X1D642)
-    ("alpha"   "\\mbfitsansH"  #X1D643)
-    ("alpha"   "\\mbfitsansI"  #X1D644)
-    ("alpha"   "\\mbfitsansJ"  #X1D645)
-    ("alpha"   "\\mbfitsansK"  #X1D646)
-    ("alpha"   "\\mbfitsansL"  #X1D647)
-    ("alpha"   "\\mbfitsansM"  #X1D648)
-    ("alpha"   "\\mbfitsansN"  #X1D649)
-    ("alpha"   "\\mbfitsansO"  #X1D64A)
-    ("alpha"   "\\mbfitsansP"  #X1D64B)
-    ("alpha"   "\\mbfitsansQ"  #X1D64C)
-    ("alpha"   "\\mbfitsansR"  #X1D64D)
-    ("alpha"   "\\mbfitsansS"  #X1D64E)
-    ("alpha"   "\\mbfitsansT"  #X1D64F)
-    ("alpha"   "\\mbfitsansU"  #X1D650)
-    ("alpha"   "\\mbfitsansV"  #X1D651)
-    ("alpha"   "\\mbfitsansW"  #X1D652)
-    ("alpha"   "\\mbfitsansX"  #X1D653)
-    ("alpha"   "\\mbfitsansY"  #X1D654)
-    ("alpha"   "\\mbfitsansZ"  #X1D655)
-    ("alpha"   "\\mbfitsansa"  #X1D656)
-    ("alpha"   "\\mbfitsansb"  #X1D657)
-    ("alpha"   "\\mbfitsansc"  #X1D658)
-    ("alpha"   "\\mbfitsansd"  #X1D659)
-    ("alpha"   "\\mbfitsanse"  #X1D65A)
-    ("alpha"   "\\mbfitsansf"  #X1D65B)
-    ("alpha"   "\\mbfitsansg"  #X1D65C)
-    ("alpha"   "\\mbfitsansh"  #X1D65D)
-    ("alpha"   "\\mbfitsansi"  #X1D65E)
-    ("alpha"   "\\mbfitsansj"  #X1D65F)
-    ("alpha"   "\\mbfitsansk"  #X1D660)
-    ("alpha"   "\\mbfitsansl"  #X1D661)
-    ("alpha"   "\\mbfitsansm"  #X1D662)
-    ("alpha"   "\\mbfitsansn"  #X1D663)
-    ("alpha"   "\\mbfitsanso"  #X1D664)
-    ("alpha"   "\\mbfitsansp"  #X1D665)
-    ("alpha"   "\\mbfitsansq"  #X1D666)
-    ("alpha"   "\\mbfitsansr"  #X1D667)
-    ("alpha"   "\\mbfitsanss"  #X1D668)
-    ("alpha"   "\\mbfitsanst"  #X1D669)
-    ("alpha"   "\\mbfitsansu"  #X1D66A)
-    ("alpha"   "\\mbfitsansv"  #X1D66B)
-    ("alpha"   "\\mbfitsansw"  #X1D66C)
-    ("alpha"   "\\mbfitsansx"  #X1D66D)
-    ("alpha"   "\\mbfitsansy"  #X1D66E)
-    ("alpha"   "\\mbfitsansz"  #X1D66F)
-    ("alpha"   "\\mttA"        #X1D670)
-    ("alpha"   "\\mttB"        #X1D671)
-    ("alpha"   "\\mttC"        #X1D672)
-    ("alpha"   "\\mttD"        #X1D673)
-    ("alpha"   "\\mttE"        #X1D674)
-    ("alpha"   "\\mttF"        #X1D675)
-    ("alpha"   "\\mttG"        #X1D676)
-    ("alpha"   "\\mttH"        #X1D677)
-    ("alpha"   "\\mttI"        #X1D678)
-    ("alpha"   "\\mttJ"        #X1D679)
-    ("alpha"   "\\mttK"        #X1D67A)
-    ("alpha"   "\\mttL"        #X1D67B)
-    ("alpha"   "\\mttM"        #X1D67C)
-    ("alpha"   "\\mttN"        #X1D67D)
-    ("alpha"   "\\mttO"        #X1D67E)
-    ("alpha"   "\\mttP"        #X1D67F)
-    ("alpha"   "\\mttQ"        #X1D680)
-    ("alpha"   "\\mttR"        #X1D681)
-    ("alpha"   "\\mttS"        #X1D682)
-    ("alpha"   "\\mttT"        #X1D683)
-    ("alpha"   "\\mttU"        #X1D684)
-    ("alpha"   "\\mttV"        #X1D685)
-    ("alpha"   "\\mttW"        #X1D686)
-    ("alpha"   "\\mttX"        #X1D687)
-    ("alpha"   "\\mttY"        #X1D688)
-    ("alpha"   "\\mttZ"        #X1D689)
-    ("alpha"   "\\mtta"        #X1D68A)
-    ("alpha"   "\\mttb"        #X1D68B)
-    ("alpha"   "\\mttc"        #X1D68C)
-    ("alpha"   "\\mttd"        #X1D68D)
-    ("alpha"   "\\mtte"        #X1D68E)
-    ("alpha"   "\\mttf"        #X1D68F)
-    ("alpha"   "\\mttg"        #X1D690)
-    ("alpha"   "\\mtth"        #X1D691)
-    ("alpha"   "\\mtti"        #X1D692)
-    ("alpha"   "\\mttj"        #X1D693)
-    ("alpha"   "\\mttk"        #X1D694)
-    ("alpha"   "\\mttl"        #X1D695)
-    ("alpha"   "\\mttm"        #X1D696)
-    ("alpha"   "\\mttn"        #X1D697)
-    ("alpha"   "\\mtto"        #X1D698)
-    ("alpha"   "\\mttp"        #X1D699)
-    ("alpha"   "\\mttq"        #X1D69A)
-    ("alpha"   "\\mttr"        #X1D69B)
-    ("alpha"   "\\mtts"        #X1D69C)
-    ("alpha"   "\\mttt"        #X1D69D)
-    ("alpha"   "\\mttu"        #X1D69E)
-    ("alpha"   "\\mttv"        #X1D69F)
-    ("alpha"   "\\mttw"        #X1D6A0)
-    ("alpha"   "\\mttx"        #X1D6A1)
-    ("alpha"   "\\mtty"        #X1D6A2)
-    ("alpha"   "\\mttz"        #X1D6A3)
-    ("alpha"   "\\imath"       #X1D6A4)
-    ("alpha"   "\\jmath"       #X1D6A5)
-    ("alpha"   "\\mbfAlpha"    #X1D6A8)
-    ("alpha"   "\\mbfBeta"     #X1D6A9)
-    ("alpha"   "\\mbfGamma"    #X1D6AA)
-    ("alpha"   "\\mbfDelta"    #X1D6AB)
-    ("alpha"   "\\mbfEpsilon"  #X1D6AC)
-    ("alpha"   "\\mbfZeta"     #X1D6AD)
-    ("alpha"   "\\mbfEta"      #X1D6AE)
-    ("alpha"   "\\mbfTheta"    #X1D6AF)
-    ("alpha"   "\\mbfIota"     #X1D6B0)
-    ("alpha"   "\\mbfKappa"    #X1D6B1)
-    ("alpha"   "\\mbfLambda"   #X1D6B2)
-    ("alpha"   "\\mbfMu"       #X1D6B3)
-    ("alpha"   "\\mbfNu"       #X1D6B4)
-    ("alpha"   "\\mbfXi"       #X1D6B5)
-    ("alpha"   "\\mbfOmicron"  #X1D6B6)
-    ("alpha"   "\\mbfPi"       #X1D6B7)
-    ("alpha"   "\\mbfRho"      #X1D6B8)
-    ("alpha"   "\\mbfvarTheta" #X1D6B9)
-    ("alpha"   "\\mbfSigma"    #X1D6BA)
-    ("alpha"   "\\mbfTau"      #X1D6BB)
-    ("alpha"   "\\mbfUpsilon"  #X1D6BC)
-    ("alpha"   "\\mbfPhi"      #X1D6BD)
-    ("alpha"   "\\mbfChi"      #X1D6BE)
-    ("alpha"   "\\mbfPsi"      #X1D6BF)
-    ("alpha"   "\\mbfOmega"    #X1D6C0)
-    ("ord"     "\\mbfnabla"    #X1D6C1)
-    ("alpha"   "\\mbfalpha"    #X1D6C2)
-    ("alpha"   "\\mbfbeta"     #X1D6C3)
-    ("alpha"   "\\mbfgamma"    #X1D6C4)
-    ("alpha"   "\\mbfdelta"    #X1D6C5)
-    ("alpha"   "\\mbfepsilon"  #X1D6C6)
-    ("alpha"   "\\mbfzeta"     #X1D6C7)
-    ("alpha"   "\\mbfeta"      #X1D6C8)
-    ("alpha"   "\\mbftheta"    #X1D6C9)
-    ("alpha"   "\\mbfiota"     #X1D6CA)
-    ("alpha"   "\\mbfkappa"    #X1D6CB)
-    ("alpha"   "\\mbflambda"   #X1D6CC)
-    ("alpha"   "\\mbfmu"       #X1D6CD)
-    ("alpha"   "\\mbfnu"       #X1D6CE)
-    ("alpha"   "\\mbfxi"       #X1D6CF)
-    ("alpha"   "\\mbfomicron"  #X1D6D0)
-    ("alpha"   "\\mbfpi"       #X1D6D1)
-    ("alpha"   "\\mbfrho"      #X1D6D2)
-    ("alpha"   "\\mbfvarsigma" #X1D6D3)
-    ("alpha"   "\\mbfsigma"    #X1D6D4)
-    ("alpha"   "\\mbftau"      #X1D6D5)
-    ("alpha"   "\\mbfupsilon"  #X1D6D6)
-    ("alpha"   "\\mbfvarphi"   #X1D6D7)
-    ("alpha"   "\\mbfchi"      #X1D6D8)
-    ("alpha"   "\\mbfpsi"      #X1D6D9)
-    ("alpha"   "\\mbfomega"    #X1D6DA)
-    ("ord"     "\\mbfpartial"  #X1D6DB)
-    ("alpha"   "\\mbfvarepsilon"       #X1D6DC)
-    ("alpha"   "\\mbfvartheta" #X1D6DD)
-    ("alpha"   "\\mbfvarkappa" #X1D6DE)
-    ("alpha"   "\\mbfphi"      #X1D6DF)
-    ("alpha"   "\\mbfvarrho"   #X1D6E0)
-    ("alpha"   "\\mbfvarpi"    #X1D6E1)
-    ("alpha"   "\\mitAlpha"    #X1D6E2)
-    ("alpha"   "\\mitBeta"     #X1D6E3)
-    ("alpha"   "\\mitGamma"    #X1D6E4)
-    ("alpha"   "\\mitDelta"    #X1D6E5)
-    ("alpha"   "\\mitEpsilon"  #X1D6E6)
-    ("alpha"   "\\mitZeta"     #X1D6E7)
-    ("alpha"   "\\mitEta"      #X1D6E8)
-    ("alpha"   "\\mitTheta"    #X1D6E9)
-    ("alpha"   "\\mitIota"     #X1D6EA)
-    ("alpha"   "\\mitKappa"    #X1D6EB)
-    ("alpha"   "\\mitLambda"   #X1D6EC)
-    ("alpha"   "\\mitMu"       #X1D6ED)
-    ("alpha"   "\\mitNu"       #X1D6EE)
-    ("alpha"   "\\mitXi"       #X1D6EF)
-    ("alpha"   "\\mitOmicron"  #X1D6F0)
-    ("alpha"   "\\mitPi"       #X1D6F1)
-    ("alpha"   "\\mitRho"      #X1D6F2)
-    ("alpha"   "\\mitvarTheta" #X1D6F3)
-    ("alpha"   "\\mitSigma"    #X1D6F4)
-    ("alpha"   "\\mitTau"      #X1D6F5)
-    ("alpha"   "\\mitUpsilon"  #X1D6F6)
-    ("alpha"   "\\mitPhi"      #X1D6F7)
-    ("alpha"   "\\mitChi"      #X1D6F8)
-    ("alpha"   "\\mitPsi"      #X1D6F9)
-    ("alpha"   "\\mitOmega"    #X1D6FA)
-    ("ord"     "\\mitnabla"    #X1D6FB)
-    ("alpha"   "\\mitalpha"    #X1D6FC)
-    ("alpha"   "\\mitbeta"     #X1D6FD)
-    ("alpha"   "\\mitgamma"    #X1D6FE)
-    ("alpha"   "\\mitdelta"    #X1D6FF)
-    ("alpha"   "\\mitepsilon"  #X1D700)
-    ("alpha"   "\\mitzeta"     #X1D701)
-    ("alpha"   "\\miteta"      #X1D702)
-    ("alpha"   "\\mittheta"    #X1D703)
-    ("alpha"   "\\mitiota"     #X1D704)
-    ("alpha"   "\\mitkappa"    #X1D705)
-    ("alpha"   "\\mitlambda"   #X1D706)
-    ("alpha"   "\\mitmu"       #X1D707)
-    ("alpha"   "\\mitnu"       #X1D708)
-    ("alpha"   "\\mitxi"       #X1D709)
-    ("alpha"   "\\mitomicron"  #X1D70A)
-    ("alpha"   "\\mitpi"       #X1D70B)
-    ("alpha"   "\\mitrho"      #X1D70C)
-    ("alpha"   "\\mitvarsigma" #X1D70D)
-    ("alpha"   "\\mitsigma"    #X1D70E)
-    ("alpha"   "\\mittau"      #X1D70F)
-    ("alpha"   "\\mitupsilon"  #X1D710)
-    ("alpha"   "\\mitphi"      #X1D711)
-    ("alpha"   "\\mitchi"      #X1D712)
-    ("alpha"   "\\mitpsi"      #X1D713)
-    ("alpha"   "\\mitomega"    #X1D714)
-    ("ord"     "\\mitpartial"  #X1D715)
-    ("alpha"   "\\mitvarepsilon"       #X1D716)
-    ("alpha"   "\\mitvartheta" #X1D717)
-    ("alpha"   "\\mitvarkappa" #X1D718)
-    ("alpha"   "\\mitvarphi"   #X1D719)
-    ("alpha"   "\\mitvarrho"   #X1D71A)
-    ("alpha"   "\\mitvarpi"    #X1D71B)
-    ("alpha"   "\\mbfitAlpha"  #X1D71C)
-    ("alpha"   "\\mbfitBeta"   #X1D71D)
-    ("alpha"   "\\mbfitGamma"  #X1D71E)
-    ("alpha"   "\\mbfitDelta"  #X1D71F)
-    ("alpha"   "\\mbfitEpsilon"        #X1D720)
-    ("alpha"   "\\mbfitZeta"   #X1D721)
-    ("alpha"   "\\mbfitEta"    #X1D722)
-    ("alpha"   "\\mbfitTheta"  #X1D723)
-    ("alpha"   "\\mbfitIota"   #X1D724)
-    ("alpha"   "\\mbfitKappa"  #X1D725)
-    ("alpha"   "\\mbfitLambda" #X1D726)
-    ("alpha"   "\\mbfitMu"     #X1D727)
-    ("alpha"   "\\mbfitNu"     #X1D728)
-    ("alpha"   "\\mbfitXi"     #X1D729)
-    ("alpha"   "\\mbfitOmicron"        #X1D72A)
-    ("alpha"   "\\mbfitPi"     #X1D72B)
-    ("alpha"   "\\mbfitRho"    #X1D72C)
-    ("alpha"   "\\mbfitvarTheta"       #X1D72D)
-    ("alpha"   "\\mbfitSigma"  #X1D72E)
-    ("alpha"   "\\mbfitTau"    #X1D72F)
-    ("alpha"   "\\mbfitUpsilon"        #X1D730)
-    ("alpha"   "\\mbfitPhi"    #X1D731)
-    ("alpha"   "\\mbfitChi"    #X1D732)
-    ("alpha"   "\\mbfitPsi"    #X1D733)
-    ("alpha"   "\\mbfitOmega"  #X1D734)
-    ("ord"     "\\mbfitnabla"  #X1D735)
-    ("alpha"   "\\mbfitalpha"  #X1D736)
-    ("alpha"   "\\mbfitbeta"   #X1D737)
-    ("alpha"   "\\mbfitgamma"  #X1D738)
-    ("alpha"   "\\mbfitdelta"  #X1D739)
-    ("alpha"   "\\mbfitepsilon"        #X1D73A)
-    ("alpha"   "\\mbfitzeta"   #X1D73B)
-    ("alpha"   "\\mbfiteta"    #X1D73C)
-    ("alpha"   "\\mbfittheta"  #X1D73D)
-    ("alpha"   "\\mbfitiota"   #X1D73E)
-    ("alpha"   "\\mbfitkappa"  #X1D73F)
-    ("alpha"   "\\mbfitlambda" #X1D740)
-    ("alpha"   "\\mbfitmu"     #X1D741)
-    ("alpha"   "\\mbfitnu"     #X1D742)
-    ("alpha"   "\\mbfitxi"     #X1D743)
-    ("alpha"   "\\mbfitomicron"        #X1D744)
-    ("alpha"   "\\mbfitpi"     #X1D745)
-    ("alpha"   "\\mbfitrho"    #X1D746)
-    ("alpha"   "\\mbfitvarsigma"       #X1D747)
-    ("alpha"   "\\mbfitsigma"  #X1D748)
-    ("alpha"   "\\mbfittau"    #X1D749)
-    ("alpha"   "\\mbfitupsilon"        #X1D74A)
-    ("alpha"   "\\mbfitphi"    #X1D74B)
-    ("alpha"   "\\mbfitchi"    #X1D74C)
-    ("alpha"   "\\mbfitpsi"    #X1D74D)
-    ("alpha"   "\\mbfitomega"  #X1D74E)
-    ("ord"     "\\mbfitpartial"        #X1D74F)
-    ("alpha"   "\\mbfitvarepsilon"     #X1D750)
-    ("alpha"   "\\mbfitvartheta"       #X1D751)
-    ("alpha"   "\\mbfitvarkappa"       #X1D752)
-    ("alpha"   "\\mbfitvarphi" #X1D753)
-    ("alpha"   "\\mbfitvarrho" #X1D754)
-    ("alpha"   "\\mbfitvarpi"  #X1D755)
-    ("alpha"   "\\mbfsansAlpha"        #X1D756)
-    ("alpha"   "\\mbfsansBeta" #X1D757)
-    ("alpha"   "\\mbfsansGamma"        #X1D758)
-    ("alpha"   "\\mbfsansDelta"        #X1D759)
-    ("alpha"   "\\mbfsansEpsilon"      #X1D75A)
-    ("alpha"   "\\mbfsansZeta" #X1D75B)
-    ("alpha"   "\\mbfsansEta"  #X1D75C)
-    ("alpha"   "\\mbfsansTheta"        #X1D75D)
-    ("alpha"   "\\mbfsansIota" #X1D75E)
-    ("alpha"   "\\mbfsansKappa"        #X1D75F)
-    ("alpha"   "\\mbfsansLambda"       #X1D760)
-    ("alpha"   "\\mbfsansMu"   #X1D761)
-    ("alpha"   "\\mbfsansNu"   #X1D762)
-    ("alpha"   "\\mbfsansXi"   #X1D763)
-    ("alpha"   "\\mbfsansOmicron"      #X1D764)
-    ("alpha"   "\\mbfsansPi"   #X1D765)
-    ("alpha"   "\\mbfsansRho"  #X1D766)
-    ("alpha"   "\\mbfsansvarTheta"     #X1D767)
-    ("alpha"   "\\mbfsansSigma"        #X1D768)
-    ("alpha"   "\\mbfsansTau"  #X1D769)
-    ("alpha"   "\\mbfsansUpsilon"      #X1D76A)
-    ("alpha"   "\\mbfsansPhi"  #X1D76B)
-    ("alpha"   "\\mbfsansChi"  #X1D76C)
-    ("alpha"   "\\mbfsansPsi"  #X1D76D)
-    ("alpha"   "\\mbfsansOmega"        #X1D76E)
-    ("ord"     "\\mbfsansnabla"        #X1D76F)
-    ("alpha"   "\\mbfsansalpha"        #X1D770)
-    ("alpha"   "\\mbfsansbeta" #X1D771)
-    ("alpha"   "\\mbfsansgamma"        #X1D772)
-    ("alpha"   "\\mbfsansdelta"        #X1D773)
-    ("alpha"   "\\mbfsansepsilon"      #X1D774)
-    ("alpha"   "\\mbfsanszeta" #X1D775)
-    ("alpha"   "\\mbfsanseta"  #X1D776)
-    ("alpha"   "\\mbfsanstheta"        #X1D777)
-    ("alpha"   "\\mbfsansiota" #X1D778)
-    ("alpha"   "\\mbfsanskappa"        #X1D779)
-    ("alpha"   "\\mbfsanslambda"       #X1D77A)
-    ("alpha"   "\\mbfsansmu"   #X1D77B)
-    ("alpha"   "\\mbfsansnu"   #X1D77C)
-    ("alpha"   "\\mbfsansxi"   #X1D77D)
-    ("alpha"   "\\mbfsansomicron"      #X1D77E)
-    ("alpha"   "\\mbfsanspi"   #X1D77F)
-    ("alpha"   "\\mbfsansrho"  #X1D780)
-    ("alpha"   "\\mbfsansvarsigma"     #X1D781)
-    ("alpha"   "\\mbfsanssigma"        #X1D782)
-    ("alpha"   "\\mbfsanstau"  #X1D783)
-    ("alpha"   "\\mbfsansupsilon"      #X1D784)
-    ("alpha"   "\\mbfsansphi"  #X1D785)
-    ("alpha"   "\\mbfsanschi"  #X1D786)
-    ("alpha"   "\\mbfsanspsi"  #X1D787)
-    ("alpha"   "\\mbfsansomega"        #X1D788)
-    ("ord"     "\\mbfsanspartial"      #X1D789)
-    ("alpha"   "\\mbfsansvarepsilon"   #X1D78A)
-    ("alpha"   "\\mbfsansvartheta"     #X1D78B)
-    ("alpha"   "\\mbfsansvarkappa"     #X1D78C)
-    ("alpha"   "\\mbfsansvarphi"       #X1D78D)
-    ("alpha"   "\\mbfsansvarrho"       #X1D78E)
-    ("alpha"   "\\mbfsansvarpi"        #X1D78F)
-    ("alpha"   "\\mbfitsansAlpha"      #X1D790)
-    ("alpha"   "\\mbfitsansBeta"       #X1D791)
-    ("alpha"   "\\mbfitsansGamma"      #X1D792)
-    ("alpha"   "\\mbfitsansDelta"      #X1D793)
-    ("alpha"   "\\mbfitsansEpsilon"    #X1D794)
-    ("alpha"   "\\mbfitsansZeta"       #X1D795)
-    ("alpha"   "\\mbfitsansEta"        #X1D796)
-    ("alpha"   "\\mbfitsansTheta"      #X1D797)
-    ("alpha"   "\\mbfitsansIota"       #X1D798)
-    ("alpha"   "\\mbfitsansKappa"      #X1D799)
-    ("alpha"   "\\mbfitsansLambda"     #X1D79A)
-    ("alpha"   "\\mbfitsansMu" #X1D79B)
-    ("alpha"   "\\mbfitsansNu" #X1D79C)
-    ("alpha"   "\\mbfitsansXi" #X1D79D)
-    ("alpha"   "\\mbfitsansOmicron"    #X1D79E)
-    ("alpha"   "\\mbfitsansPi" #X1D79F)
-    ("alpha"   "\\mbfitsansRho"        #X1D7A0)
-    ("alpha"   "\\mbfitsansvarTheta"   #X1D7A1)
-    ("alpha"   "\\mbfitsansSigma"      #X1D7A2)
-    ("alpha"   "\\mbfitsansTau"        #X1D7A3)
-    ("alpha"   "\\mbfitsansUpsilon"    #X1D7A4)
-    ("alpha"   "\\mbfitsansPhi"        #X1D7A5)
-    ("alpha"   "\\mbfitsansChi"        #X1D7A6)
-    ("alpha"   "\\mbfitsansPsi"        #X1D7A7)
-    ("alpha"   "\\mbfitsansOmega"      #X1D7A8)
-    ("ord"     "\\mbfitsansnabla"      #X1D7A9)
-    ("alpha"   "\\mbfitsansalpha"      #X1D7AA)
-    ("alpha"   "\\mbfitsansbeta"       #X1D7AB)
-    ("alpha"   "\\mbfitsansgamma"      #X1D7AC)
-    ("alpha"   "\\mbfitsansdelta"      #X1D7AD)
-    ("alpha"   "\\mbfitsansepsilon"    #X1D7AE)
-    ("alpha"   "\\mbfitsanszeta"       #X1D7AF)
-    ("alpha"   "\\mbfitsanseta"        #X1D7B0)
-    ("alpha"   "\\mbfitsanstheta"      #X1D7B1)
-    ("alpha"   "\\mbfitsansiota"       #X1D7B2)
-    ("alpha"   "\\mbfitsanskappa"      #X1D7B3)
-    ("alpha"   "\\mbfitsanslambda"     #X1D7B4)
-    ("alpha"   "\\mbfitsansmu" #X1D7B5)
-    ("alpha"   "\\mbfitsansnu" #X1D7B6)
-    ("alpha"   "\\mbfitsansxi" #X1D7B7)
-    ("alpha"   "\\mbfitsansomicron"    #X1D7B8)
-    ("alpha"   "\\mbfitsanspi" #X1D7B9)
-    ("alpha"   "\\mbfitsansrho"        #X1D7BA)
-    ("alpha"   "\\mbfitsansvarsigma"   #X1D7BB)
-    ("alpha"   "\\mbfitsanssigma"      #X1D7BC)
-    ("alpha"   "\\mbfitsanstau"        #X1D7BD)
-    ("alpha"   "\\mbfitsansupsilon"    #X1D7BE)
-    ("alpha"   "\\mbfitsansphi"        #X1D7BF)
-    ("alpha"   "\\mbfitsanschi"        #X1D7C0)
-    ("alpha"   "\\mbfitsanspsi"        #X1D7C1)
-    ("alpha"   "\\mbfitsansomega"      #X1D7C2)
-    ("ord"     "\\mbfitsanspartial"    #X1D7C3)
-    ("alpha"   "\\mbfitsansvarepsilon" #X1D7C4)
-    ("alpha"   "\\mbfitsansvartheta"   #X1D7C5)
-    ("alpha"   "\\mbfitsansvarkappa"   #X1D7C6)
-    ("alpha"   "\\mbfitsansvarphi"     #X1D7C7)
-    ("alpha"   "\\mbfitsansvarrho"     #X1D7C8)
-    ("alpha"   "\\mbfitsansvarpi"      #X1D7C9)
-    ("alpha"   "\\mbfDigamma"  #X1D7CA)
-    ("alpha"   "\\mbfdigamma"  #X1D7CB)
-    ("ord"     "\\mbfzero"     #X1D7CE)
-    ("ord"     "\\mbfone"      #X1D7CF)
-    ("ord"     "\\mbftwo"      #X1D7D0)
-    ("ord"     "\\mbfthree"    #X1D7D1)
-    ("ord"     "\\mbffour"     #X1D7D2)
-    ("ord"     "\\mbffive"     #X1D7D3)
-    ("ord"     "\\mbfsix"      #X1D7D4)
-    ("ord"     "\\mbfseven"    #X1D7D5)
-    ("ord"     "\\mbfeight"    #X1D7D6)
-    ("ord"     "\\mbfnine"     #X1D7D7)
-    ("ord"     "\\Bbbzero"     #X1D7D8)
-    ("ord"     "\\Bbbone"      #X1D7D9)
-    ("ord"     "\\Bbbtwo"      #X1D7DA)
-    ("ord"     "\\Bbbthree"    #X1D7DB)
-    ("ord"     "\\Bbbfour"     #X1D7DC)
-    ("ord"     "\\Bbbfive"     #X1D7DD)
-    ("ord"     "\\Bbbsix"      #X1D7DE)
-    ("ord"     "\\Bbbseven"    #X1D7DF)
-    ("ord"     "\\Bbbeight"    #X1D7E0)
-    ("ord"     "\\Bbbnine"     #X1D7E1)
-    ("ord"     "\\msanszero"   #X1D7E2)
-    ("ord"     "\\msansone"    #X1D7E3)
-    ("ord"     "\\msanstwo"    #X1D7E4)
-    ("ord"     "\\msansthree"  #X1D7E5)
-    ("ord"     "\\msansfour"   #X1D7E6)
-    ("ord"     "\\msansfive"   #X1D7E7)
-    ("ord"     "\\msanssix"    #X1D7E8)
-    ("ord"     "\\msansseven"  #X1D7E9)
-    ("ord"     "\\msanseight"  #X1D7EA)
-    ("ord"     "\\msansnine"   #X1D7EB)
-    ("ord"     "\\mbfsanszero" #X1D7EC)
-    ("ord"     "\\mbfsansone"  #X1D7ED)
-    ("ord"     "\\mbfsanstwo"  #X1D7EE)
-    ("ord"     "\\mbfsansthree"        #X1D7EF)
-    ("ord"     "\\mbfsansfour" #X1D7F0)
-    ("ord"     "\\mbfsansfive" #X1D7F1)
-    ("ord"     "\\mbfsanssix"  #X1D7F2)
-    ("ord"     "\\mbfsansseven"        #X1D7F3)
-    ("ord"     "\\mbfsanseight"        #X1D7F4)
-    ("ord"     "\\mbfsansnine" #X1D7F5)
-    ("ord"     "\\mttzero"     #X1D7F6)
-    ("ord"     "\\mttone"      #X1D7F7)
-    ("ord"     "\\mtttwo"      #X1D7F8)
-    ("ord"     "\\mttthree"    #X1D7F9)
-    ("ord"     "\\mttfour"     #X1D7FA)
-    ("ord"     "\\mttfive"     #X1D7FB)
-    ("ord"     "\\mttsix"      #X1D7FC)
-    ("ord"     "\\mttseven"    #X1D7FD)
-    ("ord"     "\\mtteight"    #X1D7FE)
-    ("ord"     "\\mttnine"     #X1D7FF))
-  "Extended list of mathematical symbols.")
-
+  '(("mathaccent" "\\acute" #X00301 "́")
+    ("mathaccent" "\\annuity" #X020E7 "⃧")
+    ("mathaccent" "\\asteraccent" #X020F0 "⃰")
+    ("mathaccent" "\\bar" #X00304 "̄")
+    ("mathaccent" "\\breve" #X00306 "̆")
+    ("mathaccent" "\\candra" #X00310 "̐")
+    ("mathaccent" "\\check" #X0030C "̌")
+    ("mathaccent" "\\ddddot" #X020DC "⃜")
+    ("mathaccent" "\\dddot" #X020DB "⃛")
+    ("mathaccent" "\\ddot" #X00308 "̈")
+    ("mathaccent" "\\dot" #X00307 "̇")
+    ("mathaccent" "\\droang" #X0031A "̚")
+    ("mathaccent" "\\enclosecircle" #X020DD "⃝")
+    ("mathaccent" "\\enclosediamond" #X020DF "⃟")
+    ("mathaccent" "\\enclosesquare" #X020DE "⃞")
+    ("mathaccent" "\\enclosetriangle" #X020E4 "⃤")
+    ("mathaccent" "\\grave" #X00300 "̀")
+    ("mathaccent" "\\hat" #X00302 "̂")
+    ("mathaccent" "\\leftharpoonaccent" #X020D0 "⃐")
+    ("mathaccent" "\\not" #X00338 "̸")
+    ("mathaccent" "\\ocirc" #X0030A "̊")
+    ("mathaccent" "\\ocommatopright" #X00315 "̕")
+    ("mathaccent" "\\oturnedcomma" #X00312 "̒")
+    ("mathaccent" "\\overbar" #X00305 "̅")
+    ("mathaccent" "\\overleftarrow" #X020D6 "⃖")
+    ("mathaccent" "\\overleftrightarrow" #X020E1 "⃡")
+    ("mathaccent" "\\ovhook" #X00309 "̉")
+    ("mathaccent" "\\rightharpoonaccent" #X020D1 "⃑")
+    ("mathaccent" "\\threeunderdot" #X020E8 "⃨")
+    ("mathaccent" "\\tilde" #X00303 "̃")
+    ("mathaccent" "\\underbar" #X00331 "̱")
+    ("mathaccent" "\\underleftarrow" #X020EE "⃮")
+    ("mathaccent" "\\underleftharpoondown" #X020ED "⃭")
+    ("mathaccent" "\\underrightarrow" #X020EF "⃯")
+    ("mathaccent" "\\underrightharpoondown" #X020EC "⃬")
+    ("mathaccent" "\\vec" #X020D7 "⃗")
+    ("mathaccent" "\\vertoverlay" #X020D2 "⃒")
+    ("mathaccent" "\\widebridgeabove" #X020E9 "⃩")
+    ("mathaccent" "\\wideutilde" #X00330 "̰")
+    ("mathalpha" "\\Angstrom" #X0212B "Å")
+    ("mathalpha" "\\BbbA" #X1D538 "𝔸")
+    ("mathalpha" "\\BbbB" #X1D539 "𝔹")
+    ("mathalpha" "\\BbbC" #X02102 "ℂ")
+    ("mathalpha" "\\BbbD" #X1D53B "𝔻")
+    ("mathalpha" "\\BbbE" #X1D53C "𝔼")
+    ("mathalpha" "\\BbbF" #X1D53D "𝔽")
+    ("mathalpha" "\\BbbG" #X1D53E "𝔾")
+    ("mathalpha" "\\BbbGamma" #X0213E "ℾ")
+    ("mathalpha" "\\BbbH" #X0210D "ℍ")
+    ("mathalpha" "\\BbbI" #X1D540 "𝕀")
+    ("mathalpha" "\\BbbJ" #X1D541 "𝕁")
+    ("mathalpha" "\\BbbK" #X1D542 "𝕂")
+    ("mathalpha" "\\BbbL" #X1D543 "𝕃")
+    ("mathalpha" "\\BbbM" #X1D544 "𝕄")
+    ("mathalpha" "\\BbbN" #X02115 "ℕ")
+    ("mathalpha" "\\BbbO" #X1D546 "𝕆")
+    ("mathalpha" "\\BbbP" #X02119 "ℙ")
+    ("mathalpha" "\\BbbPi" #X0213F "ℿ")
+    ("mathalpha" "\\BbbQ" #X0211A "ℚ")
+    ("mathalpha" "\\BbbR" #X0211D "ℝ")
+    ("mathalpha" "\\BbbS" #X1D54A "𝕊")
+    ("mathalpha" "\\BbbT" #X1D54B "𝕋")
+    ("mathalpha" "\\BbbU" #X1D54C "𝕌")
+    ("mathalpha" "\\BbbV" #X1D54D "𝕍")
+    ("mathalpha" "\\BbbW" #X1D54E "𝕎")
+    ("mathalpha" "\\BbbX" #X1D54F "𝕏")
+    ("mathalpha" "\\BbbY" #X1D550 "𝕐")
+    ("mathalpha" "\\BbbZ" #X02124 "ℤ")
+    ("mathalpha" "\\Bbba" #X1D552 "𝕒")
+    ("mathalpha" "\\Bbbb" #X1D553 "𝕓")
+    ("mathalpha" "\\Bbbc" #X1D554 "𝕔")
+    ("mathalpha" "\\Bbbd" #X1D555 "𝕕")
+    ("mathalpha" "\\Bbbe" #X1D556 "𝕖")
+    ("mathalpha" "\\Bbbf" #X1D557 "𝕗")
+    ("mathalpha" "\\Bbbg" #X1D558 "𝕘")
+    ("mathalpha" "\\Bbbgamma" #X0213D "ℽ")
+    ("mathalpha" "\\Bbbh" #X1D559 "𝕙")
+    ("mathalpha" "\\Bbbi" #X1D55A "𝕚")
+    ("mathalpha" "\\Bbbj" #X1D55B "𝕛")
+    ("mathalpha" "\\Bbbk" #X1D55C "𝕜")
+    ("mathalpha" "\\Bbbl" #X1D55D "𝕝")
+    ("mathalpha" "\\Bbbm" #X1D55E "𝕞")
+    ("mathalpha" "\\Bbbn" #X1D55F "𝕟")
+    ("mathalpha" "\\Bbbo" #X1D560 "𝕠")
+    ("mathalpha" "\\Bbbp" #X1D561 "𝕡")
+    ("mathalpha" "\\Bbbq" #X1D562 "𝕢")
+    ("mathalpha" "\\Bbbr" #X1D563 "𝕣")
+    ("mathalpha" "\\Bbbs" #X1D564 "𝕤")
+    ("mathalpha" "\\Bbbt" #X1D565 "𝕥")
+    ("mathalpha" "\\Bbbu" #X1D566 "𝕦")
+    ("mathalpha" "\\Bbbv" #X1D567 "𝕧")
+    ("mathalpha" "\\Bbbw" #X1D568 "𝕨")
+    ("mathalpha" "\\Bbbx" #X1D569 "𝕩")
+    ("mathalpha" "\\Bbby" #X1D56A "𝕪")
+    ("mathalpha" "\\Bbbz" #X1D56B "𝕫")
+    ("mathalpha" "\\Im" #X02111 "ℑ")
+    ("mathalpha" "\\Re" #X0211C "ℜ")
+    ("mathalpha" "\\aleph" #X02135 "ℵ")
+    ("mathalpha" "\\beth" #X02136 "ℶ")
+    ("mathalpha" "\\daleth" #X02138 "ℸ")
+    ("mathalpha" "\\ell" #X02113 "ℓ")
+    ("mathalpha" "\\gimel" #X02137 "ℷ")
+    ("mathalpha" "\\hslash" #X0210F "ℏ")
+    ("mathalpha" "\\imath" #X1D6A4 "𝚤")
+    ("mathalpha" "\\jmath" #X1D6A5 "𝚥")
+    ("mathalpha" "\\matheth" #X000F0 "ð")
+    ("mathalpha" "\\mbfA" #X1D400 "𝐀")
+    ("mathalpha" "\\mbfAlpha" #X1D6A8 "𝚨")
+    ("mathalpha" "\\mbfB" #X1D401 "𝐁")
+    ("mathalpha" "\\mbfBeta" #X1D6A9 "𝚩")
+    ("mathalpha" "\\mbfC" #X1D402 "𝐂")
+    ("mathalpha" "\\mbfChi" #X1D6BE "𝚾")
+    ("mathalpha" "\\mbfD" #X1D403 "𝐃")
+    ("mathalpha" "\\mbfDelta" #X1D6AB "𝚫")
+    ("mathalpha" "\\mbfDigamma" #X1D7CA "𝟊")
+    ("mathalpha" "\\mbfE" #X1D404 "𝐄")
+    ("mathalpha" "\\mbfEpsilon" #X1D6AC "𝚬")
+    ("mathalpha" "\\mbfEta" #X1D6AE "𝚮")
+    ("mathalpha" "\\mbfF" #X1D405 "𝐅")
+    ("mathalpha" "\\mbfG" #X1D406 "𝐆")
+    ("mathalpha" "\\mbfGamma" #X1D6AA "𝚪")
+    ("mathalpha" "\\mbfH" #X1D407 "𝐇")
+    ("mathalpha" "\\mbfI" #X1D408 "𝐈")
+    ("mathalpha" "\\mbfIota" #X1D6B0 "𝚰")
+    ("mathalpha" "\\mbfJ" #X1D409 "𝐉")
+    ("mathalpha" "\\mbfK" #X1D40A "𝐊")
+    ("mathalpha" "\\mbfKappa" #X1D6B1 "𝚱")
+    ("mathalpha" "\\mbfL" #X1D40B "𝐋")
+    ("mathalpha" "\\mbfLambda" #X1D6B2 "𝚲")
+    ("mathalpha" "\\mbfM" #X1D40C "𝐌")
+    ("mathalpha" "\\mbfMu" #X1D6B3 "𝚳")
+    ("mathalpha" "\\mbfN" #X1D40D "𝐍")
+    ("mathalpha" "\\mbfNu" #X1D6B4 "𝚴")
+    ("mathalpha" "\\mbfO" #X1D40E "𝐎")
+    ("mathalpha" "\\mbfOmega" #X1D6C0 "𝛀")
+    ("mathalpha" "\\mbfOmicron" #X1D6B6 "𝚶")
+    ("mathalpha" "\\mbfP" #X1D40F "𝐏")
+    ("mathalpha" "\\mbfPhi" #X1D6BD "𝚽")
+    ("mathalpha" "\\mbfPi" #X1D6B7 "𝚷")
+    ("mathalpha" "\\mbfPsi" #X1D6BF "𝚿")
+    ("mathalpha" "\\mbfQ" #X1D410 "𝐐")
+    ("mathalpha" "\\mbfR" #X1D411 "𝐑")
+    ("mathalpha" "\\mbfRho" #X1D6B8 "𝚸")
+    ("mathalpha" "\\mbfS" #X1D412 "𝐒")
+    ("mathalpha" "\\mbfSigma" #X1D6BA "𝚺")
+    ("mathalpha" "\\mbfT" #X1D413 "𝐓")
+    ("mathalpha" "\\mbfTau" #X1D6BB "𝚻")
+    ("mathalpha" "\\mbfTheta" #X1D6AF "𝚯")
+    ("mathalpha" "\\mbfU" #X1D414 "𝐔")
+    ("mathalpha" "\\mbfUpsilon" #X1D6BC "𝚼")
+    ("mathalpha" "\\mbfV" #X1D415 "𝐕")
+    ("mathalpha" "\\mbfW" #X1D416 "𝐖")
+    ("mathalpha" "\\mbfX" #X1D417 "𝐗")
+    ("mathalpha" "\\mbfXi" #X1D6B5 "𝚵")
+    ("mathalpha" "\\mbfY" #X1D418 "𝐘")
+    ("mathalpha" "\\mbfZ" #X1D419 "𝐙")
+    ("mathalpha" "\\mbfZeta" #X1D6AD "𝚭")
+    ("mathalpha" "\\mbfa" #X1D41A "𝐚")
+    ("mathalpha" "\\mbfalpha" #X1D6C2 "𝛂")
+    ("mathalpha" "\\mbfb" #X1D41B "𝐛")
+    ("mathalpha" "\\mbfbeta" #X1D6C3 "𝛃")
+    ("mathalpha" "\\mbfc" #X1D41C "𝐜")
+    ("mathalpha" "\\mbfchi" #X1D6D8 "𝛘")
+    ("mathalpha" "\\mbfd" #X1D41D "𝐝")
+    ("mathalpha" "\\mbfdelta" #X1D6C5 "𝛅")
+    ("mathalpha" "\\mbfdigamma" #X1D7CB "𝟋")
+    ("mathalpha" "\\mbfe" #X1D41E "𝐞")
+    ("mathalpha" "\\mbfepsilon" #X1D6C6 "𝛆")
+    ("mathalpha" "\\mbfeta" #X1D6C8 "𝛈")
+    ("mathalpha" "\\mbff" #X1D41F "𝐟")
+    ("mathalpha" "\\mbffrakA" #X1D56C "𝕬")
+    ("mathalpha" "\\mbffrakB" #X1D56D "𝕭")
+    ("mathalpha" "\\mbffrakC" #X1D56E "𝕮")
+    ("mathalpha" "\\mbffrakD" #X1D56F "𝕯")
+    ("mathalpha" "\\mbffrakE" #X1D570 "𝕰")
+    ("mathalpha" "\\mbffrakF" #X1D571 "𝕱")
+    ("mathalpha" "\\mbffrakG" #X1D572 "𝕲")
+    ("mathalpha" "\\mbffrakH" #X1D573 "𝕳")
+    ("mathalpha" "\\mbffrakI" #X1D574 "𝕴")
+    ("mathalpha" "\\mbffrakJ" #X1D575 "𝕵")
+    ("mathalpha" "\\mbffrakK" #X1D576 "𝕶")
+    ("mathalpha" "\\mbffrakL" #X1D577 "𝕷")
+    ("mathalpha" "\\mbffrakM" #X1D578 "𝕸")
+    ("mathalpha" "\\mbffrakN" #X1D579 "𝕹")
+    ("mathalpha" "\\mbffrakO" #X1D57A "𝕺")
+    ("mathalpha" "\\mbffrakP" #X1D57B "𝕻")
+    ("mathalpha" "\\mbffrakQ" #X1D57C "𝕼")
+    ("mathalpha" "\\mbffrakR" #X1D57D "𝕽")
+    ("mathalpha" "\\mbffrakS" #X1D57E "𝕾")
+    ("mathalpha" "\\mbffrakT" #X1D57F "𝕿")
+    ("mathalpha" "\\mbffrakU" #X1D580 "𝖀")
+    ("mathalpha" "\\mbffrakV" #X1D581 "𝖁")
+    ("mathalpha" "\\mbffrakW" #X1D582 "𝖂")
+    ("mathalpha" "\\mbffrakX" #X1D583 "𝖃")
+    ("mathalpha" "\\mbffrakY" #X1D584 "𝖄")
+    ("mathalpha" "\\mbffrakZ" #X1D585 "𝖅")
+    ("mathalpha" "\\mbffraka" #X1D586 "𝖆")
+    ("mathalpha" "\\mbffrakb" #X1D587 "𝖇")
+    ("mathalpha" "\\mbffrakc" #X1D588 "𝖈")
+    ("mathalpha" "\\mbffrakd" #X1D589 "𝖉")
+    ("mathalpha" "\\mbffrake" #X1D58A "𝖊")
+    ("mathalpha" "\\mbffrakf" #X1D58B "𝖋")
+    ("mathalpha" "\\mbffrakg" #X1D58C "𝖌")
+    ("mathalpha" "\\mbffrakh" #X1D58D "𝖍")
+    ("mathalpha" "\\mbffraki" #X1D58E "𝖎")
+    ("mathalpha" "\\mbffrakj" #X1D58F "𝖏")
+    ("mathalpha" "\\mbffrakk" #X1D590 "𝖐")
+    ("mathalpha" "\\mbffrakl" #X1D591 "𝖑")
+    ("mathalpha" "\\mbffrakm" #X1D592 "𝖒")
+    ("mathalpha" "\\mbffrakn" #X1D593 "𝖓")
+    ("mathalpha" "\\mbffrako" #X1D594 "𝖔")
+    ("mathalpha" "\\mbffrakp" #X1D595 "𝖕")
+    ("mathalpha" "\\mbffrakq" #X1D596 "𝖖")
+    ("mathalpha" "\\mbffrakr" #X1D597 "𝖗")
+    ("mathalpha" "\\mbffraks" #X1D598 "𝖘")
+    ("mathalpha" "\\mbffrakt" #X1D599 "𝖙")
+    ("mathalpha" "\\mbffraku" #X1D59A "𝖚")
+    ("mathalpha" "\\mbffrakv" #X1D59B "𝖛")
+    ("mathalpha" "\\mbffrakw" #X1D59C "𝖜")
+    ("mathalpha" "\\mbffrakx" #X1D59D "𝖝")
+    ("mathalpha" "\\mbffraky" #X1D59E "𝖞")
+    ("mathalpha" "\\mbffrakz" #X1D59F "𝖟")
+    ("mathalpha" "\\mbfg" #X1D420 "𝐠")
+    ("mathalpha" "\\mbfgamma" #X1D6C4 "𝛄")
+    ("mathalpha" "\\mbfh" #X1D421 "𝐡")
+    ("mathalpha" "\\mbfi" #X1D422 "𝐢")
+    ("mathalpha" "\\mbfiota" #X1D6CA "𝛊")
+    ("mathalpha" "\\mbfitA" #X1D468 "𝑨")
+    ("mathalpha" "\\mbfitAlpha" #X1D71C "𝜜")
+    ("mathalpha" "\\mbfitB" #X1D469 "𝑩")
+    ("mathalpha" "\\mbfitBeta" #X1D71D "𝜝")
+    ("mathalpha" "\\mbfitC" #X1D46A "𝑪")
+    ("mathalpha" "\\mbfitChi" #X1D732 "𝜲")
+    ("mathalpha" "\\mbfitD" #X1D46B "𝑫")
+    ("mathalpha" "\\mbfitDelta" #X1D71F "𝜟")
+    ("mathalpha" "\\mbfitE" #X1D46C "𝑬")
+    ("mathalpha" "\\mbfitEpsilon" #X1D720 "𝜠")
+    ("mathalpha" "\\mbfitEta" #X1D722 "𝜢")
+    ("mathalpha" "\\mbfitF" #X1D46D "𝑭")
+    ("mathalpha" "\\mbfitG" #X1D46E "𝑮")
+    ("mathalpha" "\\mbfitGamma" #X1D71E "𝜞")
+    ("mathalpha" "\\mbfitH" #X1D46F "𝑯")
+    ("mathalpha" "\\mbfitI" #X1D470 "𝑰")
+    ("mathalpha" "\\mbfitIota" #X1D724 "𝜤")
+    ("mathalpha" "\\mbfitJ" #X1D471 "𝑱")
+    ("mathalpha" "\\mbfitK" #X1D472 "𝑲")
+    ("mathalpha" "\\mbfitKappa" #X1D725 "𝜥")
+    ("mathalpha" "\\mbfitL" #X1D473 "𝑳")
+    ("mathalpha" "\\mbfitLambda" #X1D726 "𝜦")
+    ("mathalpha" "\\mbfitM" #X1D474 "𝑴")
+    ("mathalpha" "\\mbfitMu" #X1D727 "𝜧")
+    ("mathalpha" "\\mbfitN" #X1D475 "𝑵")
+    ("mathalpha" "\\mbfitNu" #X1D728 "𝜨")
+    ("mathalpha" "\\mbfitO" #X1D476 "𝑶")
+    ("mathalpha" "\\mbfitOmega" #X1D734 "𝜴")
+    ("mathalpha" "\\mbfitOmicron" #X1D72A "𝜪")
+    ("mathalpha" "\\mbfitP" #X1D477 "𝑷")
+    ("mathalpha" "\\mbfitPhi" #X1D731 "𝜱")
+    ("mathalpha" "\\mbfitPi" #X1D72B "𝜫")
+    ("mathalpha" "\\mbfitPsi" #X1D733 "𝜳")
+    ("mathalpha" "\\mbfitQ" #X1D478 "𝑸")
+    ("mathalpha" "\\mbfitR" #X1D479 "𝑹")
+    ("mathalpha" "\\mbfitRho" #X1D72C "𝜬")
+    ("mathalpha" "\\mbfitS" #X1D47A "𝑺")
+    ("mathalpha" "\\mbfitSigma" #X1D72E "𝜮")
+    ("mathalpha" "\\mbfitT" #X1D47B "𝑻")
+    ("mathalpha" "\\mbfitTau" #X1D72F "𝜯")
+    ("mathalpha" "\\mbfitTheta" #X1D723 "𝜣")
+    ("mathalpha" "\\mbfitU" #X1D47C "𝑼")
+    ("mathalpha" "\\mbfitUpsilon" #X1D730 "𝜰")
+    ("mathalpha" "\\mbfitV" #X1D47D "𝑽")
+    ("mathalpha" "\\mbfitW" #X1D47E "𝑾")
+    ("mathalpha" "\\mbfitX" #X1D47F "𝑿")
+    ("mathalpha" "\\mbfitXi" #X1D729 "𝜩")
+    ("mathalpha" "\\mbfitY" #X1D480 "𝒀")
+    ("mathalpha" "\\mbfitZ" #X1D481 "𝒁")
+    ("mathalpha" "\\mbfitZeta" #X1D721 "𝜡")
+    ("mathalpha" "\\mbfita" #X1D482 "𝒂")
+    ("mathalpha" "\\mbfitalpha" #X1D736 "𝜶")
+    ("mathalpha" "\\mbfitb" #X1D483 "𝒃")
+    ("mathalpha" "\\mbfitbeta" #X1D737 "𝜷")
+    ("mathalpha" "\\mbfitc" #X1D484 "𝒄")
+    ("mathalpha" "\\mbfitchi" #X1D74C "𝝌")
+    ("mathalpha" "\\mbfitd" #X1D485 "𝒅")
+    ("mathalpha" "\\mbfitdelta" #X1D739 "𝜹")
+    ("mathalpha" "\\mbfite" #X1D486 "𝒆")
+    ("mathalpha" "\\mbfitepsilon" #X1D73A "𝜺")
+    ("mathalpha" "\\mbfiteta" #X1D73C "𝜼")
+    ("mathalpha" "\\mbfitf" #X1D487 "𝒇")
+    ("mathalpha" "\\mbfitg" #X1D488 "𝒈")
+    ("mathalpha" "\\mbfitgamma" #X1D738 "𝜸")
+    ("mathalpha" "\\mbfith" #X1D489 "𝒉")
+    ("mathalpha" "\\mbfiti" #X1D48A "𝒊")
+    ("mathalpha" "\\mbfitiota" #X1D73E "𝜾")
+    ("mathalpha" "\\mbfitj" #X1D48B "𝒋")
+    ("mathalpha" "\\mbfitk" #X1D48C "𝒌")
+    ("mathalpha" "\\mbfitkappa" #X1D73F "𝜿")
+    ("mathalpha" "\\mbfitl" #X1D48D "𝒍")
+    ("mathalpha" "\\mbfitlambda" #X1D740 "𝝀")
+    ("mathalpha" "\\mbfitm" #X1D48E "𝒎")
+    ("mathalpha" "\\mbfitmu" #X1D741 "𝝁")
+    ("mathalpha" "\\mbfitn" #X1D48F "𝒏")
+    ("mathalpha" "\\mbfitnu" #X1D742 "𝝂")
+    ("mathalpha" "\\mbfito" #X1D490 "𝒐")
+    ("mathalpha" "\\mbfitomega" #X1D74E "𝝎")
+    ("mathalpha" "\\mbfitomicron" #X1D744 "𝝄")
+    ("mathalpha" "\\mbfitp" #X1D491 "𝒑")
+    ("mathalpha" "\\mbfitphi" #X1D74B "𝝋")
+    ("mathalpha" "\\mbfitpi" #X1D745 "𝝅")
+    ("mathalpha" "\\mbfitpsi" #X1D74D "𝝍")
+    ("mathalpha" "\\mbfitq" #X1D492 "𝒒")
+    ("mathalpha" "\\mbfitr" #X1D493 "𝒓")
+    ("mathalpha" "\\mbfitrho" #X1D746 "𝝆")
+    ("mathalpha" "\\mbfits" #X1D494 "𝒔")
+    ("mathalpha" "\\mbfitsansA" #X1D63C "𝘼")
+    ("mathalpha" "\\mbfitsansAlpha" #X1D790 "𝞐")
+    ("mathalpha" "\\mbfitsansB" #X1D63D "𝘽")
+    ("mathalpha" "\\mbfitsansBeta" #X1D791 "𝞑")
+    ("mathalpha" "\\mbfitsansC" #X1D63E "𝘾")
+    ("mathalpha" "\\mbfitsansChi" #X1D7A6 "𝞦")
+    ("mathalpha" "\\mbfitsansD" #X1D63F "𝘿")
+    ("mathalpha" "\\mbfitsansDelta" #X1D793 "𝞓")
+    ("mathalpha" "\\mbfitsansE" #X1D640 "𝙀")
+    ("mathalpha" "\\mbfitsansEpsilon" #X1D794 "𝞔")
+    ("mathalpha" "\\mbfitsansEta" #X1D796 "𝞖")
+    ("mathalpha" "\\mbfitsansF" #X1D641 "𝙁")
+    ("mathalpha" "\\mbfitsansG" #X1D642 "𝙂")
+    ("mathalpha" "\\mbfitsansGamma" #X1D792 "𝞒")
+    ("mathalpha" "\\mbfitsansH" #X1D643 "𝙃")
+    ("mathalpha" "\\mbfitsansI" #X1D644 "𝙄")
+    ("mathalpha" "\\mbfitsansIota" #X1D798 "𝞘")
+    ("mathalpha" "\\mbfitsansJ" #X1D645 "𝙅")
+    ("mathalpha" "\\mbfitsansK" #X1D646 "𝙆")
+    ("mathalpha" "\\mbfitsansKappa" #X1D799 "𝞙")
+    ("mathalpha" "\\mbfitsansL" #X1D647 "𝙇")
+    ("mathalpha" "\\mbfitsansLambda" #X1D79A "𝞚")
+    ("mathalpha" "\\mbfitsansM" #X1D648 "𝙈")
+    ("mathalpha" "\\mbfitsansMu" #X1D79B "𝞛")
+    ("mathalpha" "\\mbfitsansN" #X1D649 "𝙉")
+    ("mathalpha" "\\mbfitsansNu" #X1D79C "𝞜")
+    ("mathalpha" "\\mbfitsansO" #X1D64A "𝙊")
+    ("mathalpha" "\\mbfitsansOmega" #X1D7A8 "𝞨")
+    ("mathalpha" "\\mbfitsansOmicron" #X1D79E "𝞞")
+    ("mathalpha" "\\mbfitsansP" #X1D64B "𝙋")
+    ("mathalpha" "\\mbfitsansPhi" #X1D7A5 "𝞥")
+    ("mathalpha" "\\mbfitsansPi" #X1D79F "𝞟")
+    ("mathalpha" "\\mbfitsansPsi" #X1D7A7 "𝞧")
+    ("mathalpha" "\\mbfitsansQ" #X1D64C "𝙌")
+    ("mathalpha" "\\mbfitsansR" #X1D64D "𝙍")
+    ("mathalpha" "\\mbfitsansRho" #X1D7A0 "𝞠")
+    ("mathalpha" "\\mbfitsansS" #X1D64E "𝙎")
+    ("mathalpha" "\\mbfitsansSigma" #X1D7A2 "𝞢")
+    ("mathalpha" "\\mbfitsansT" #X1D64F "𝙏")
+    ("mathalpha" "\\mbfitsansTau" #X1D7A3 "𝞣")
+    ("mathalpha" "\\mbfitsansTheta" #X1D797 "𝞗")
+    ("mathalpha" "\\mbfitsansU" #X1D650 "𝙐")
+    ("mathalpha" "\\mbfitsansUpsilon" #X1D7A4 "𝞤")
+    ("mathalpha" "\\mbfitsansV" #X1D651 "𝙑")
+    ("mathalpha" "\\mbfitsansW" #X1D652 "𝙒")
+    ("mathalpha" "\\mbfitsansX" #X1D653 "𝙓")
+    ("mathalpha" "\\mbfitsansXi" #X1D79D "𝞝")
+    ("mathalpha" "\\mbfitsansY" #X1D654 "𝙔")
+    ("mathalpha" "\\mbfitsansZ" #X1D655 "𝙕")
+    ("mathalpha" "\\mbfitsansZeta" #X1D795 "𝞕")
+    ("mathalpha" "\\mbfitsansa" #X1D656 "𝙖")
+    ("mathalpha" "\\mbfitsansalpha" #X1D7AA "𝞪")
+    ("mathalpha" "\\mbfitsansb" #X1D657 "𝙗")
+    ("mathalpha" "\\mbfitsansbeta" #X1D7AB "𝞫")
+    ("mathalpha" "\\mbfitsansc" #X1D658 "𝙘")
+    ("mathalpha" "\\mbfitsanschi" #X1D7C0 "𝟀")
+    ("mathalpha" "\\mbfitsansd" #X1D659 "𝙙")
+    ("mathalpha" "\\mbfitsansdelta" #X1D7AD "𝞭")
+    ("mathalpha" "\\mbfitsanse" #X1D65A "𝙚")
+    ("mathalpha" "\\mbfitsansepsilon" #X1D7AE "𝞮")
+    ("mathalpha" "\\mbfitsanseta" #X1D7B0 "𝞰")
+    ("mathalpha" "\\mbfitsansf" #X1D65B "𝙛")
+    ("mathalpha" "\\mbfitsansg" #X1D65C "𝙜")
+    ("mathalpha" "\\mbfitsansgamma" #X1D7AC "𝞬")
+    ("mathalpha" "\\mbfitsansh" #X1D65D "𝙝")
+    ("mathalpha" "\\mbfitsansi" #X1D65E "𝙞")
+    ("mathalpha" "\\mbfitsansiota" #X1D7B2 "𝞲")
+    ("mathalpha" "\\mbfitsansj" #X1D65F "𝙟")
+    ("mathalpha" "\\mbfitsansk" #X1D660 "𝙠")
+    ("mathalpha" "\\mbfitsanskappa" #X1D7B3 "𝞳")
+    ("mathalpha" "\\mbfitsansl" #X1D661 "𝙡")
+    ("mathalpha" "\\mbfitsanslambda" #X1D7B4 "𝞴")
+    ("mathalpha" "\\mbfitsansm" #X1D662 "𝙢")
+    ("mathalpha" "\\mbfitsansmu" #X1D7B5 "𝞵")
+    ("mathalpha" "\\mbfitsansn" #X1D663 "𝙣")
+    ("mathalpha" "\\mbfitsansnu" #X1D7B6 "𝞶")
+    ("mathalpha" "\\mbfitsanso" #X1D664 "𝙤")
+    ("mathalpha" "\\mbfitsansomega" #X1D7C2 "𝟂")
+    ("mathalpha" "\\mbfitsansomicron" #X1D7B8 "𝞸")
+    ("mathalpha" "\\mbfitsansp" #X1D665 "𝙥")
+    ("mathalpha" "\\mbfitsansphi" #X1D7BF "𝞿")
+    ("mathalpha" "\\mbfitsanspi" #X1D7B9 "𝞹")
+    ("mathalpha" "\\mbfitsanspsi" #X1D7C1 "𝟁")
+    ("mathalpha" "\\mbfitsansq" #X1D666 "𝙦")
+    ("mathalpha" "\\mbfitsansr" #X1D667 "𝙧")
+    ("mathalpha" "\\mbfitsansrho" #X1D7BA "𝞺")
+    ("mathalpha" "\\mbfitsanss" #X1D668 "𝙨")
+    ("mathalpha" "\\mbfitsanssigma" #X1D7BC "𝞼")
+    ("mathalpha" "\\mbfitsanst" #X1D669 "𝙩")
+    ("mathalpha" "\\mbfitsanstau" #X1D7BD "𝞽")
+    ("mathalpha" "\\mbfitsanstheta" #X1D7B1 "𝞱")
+    ("mathalpha" "\\mbfitsansu" #X1D66A "𝙪")
+    ("mathalpha" "\\mbfitsansupsilon" #X1D7BE "𝞾")
+    ("mathalpha" "\\mbfitsansv" #X1D66B "𝙫")
+    ("mathalpha" "\\mbfitsansvarTheta" #X1D7A1 "𝞡")
+    ("mathalpha" "\\mbfitsansvarepsilon" #X1D7C4 "𝟄")
+    ("mathalpha" "\\mbfitsansvarkappa" #X1D7C6 "𝟆")
+    ("mathalpha" "\\mbfitsansvarphi" #X1D7C7 "𝟇")
+    ("mathalpha" "\\mbfitsansvarpi" #X1D7C9 "𝟉")
+    ("mathalpha" "\\mbfitsansvarrho" #X1D7C8 "𝟈")
+    ("mathalpha" "\\mbfitsansvarsigma" #X1D7BB "𝞻")
+    ("mathalpha" "\\mbfitsansvartheta" #X1D7C5 "𝟅")
+    ("mathalpha" "\\mbfitsansw" #X1D66C "𝙬")
+    ("mathalpha" "\\mbfitsansx" #X1D66D "𝙭")
+    ("mathalpha" "\\mbfitsansxi" #X1D7B7 "𝞷")
+    ("mathalpha" "\\mbfitsansy" #X1D66E "𝙮")
+    ("mathalpha" "\\mbfitsansz" #X1D66F "𝙯")
+    ("mathalpha" "\\mbfitsanszeta" #X1D7AF "𝞯")
+    ("mathalpha" "\\mbfitsigma" #X1D748 "𝝈")
+    ("mathalpha" "\\mbfitt" #X1D495 "𝒕")
+    ("mathalpha" "\\mbfittau" #X1D749 "𝝉")
+    ("mathalpha" "\\mbfittheta" #X1D73D "𝜽")
+    ("mathalpha" "\\mbfitu" #X1D496 "𝒖")
+    ("mathalpha" "\\mbfitupsilon" #X1D74A "𝝊")
+    ("mathalpha" "\\mbfitv" #X1D497 "𝒗")
+    ("mathalpha" "\\mbfitvarTheta" #X1D72D "𝜭")
+    ("mathalpha" "\\mbfitvarepsilon" #X1D750 "𝝐")
+    ("mathalpha" "\\mbfitvarkappa" #X1D752 "𝝒")
+    ("mathalpha" "\\mbfitvarphi" #X1D753 "𝝓")
+    ("mathalpha" "\\mbfitvarpi" #X1D755 "𝝕")
+    ("mathalpha" "\\mbfitvarrho" #X1D754 "𝝔")
+    ("mathalpha" "\\mbfitvarsigma" #X1D747 "𝝇")
+    ("mathalpha" "\\mbfitvartheta" #X1D751 "𝝑")
+    ("mathalpha" "\\mbfitw" #X1D498 "𝒘")
+    ("mathalpha" "\\mbfitx" #X1D499 "𝒙")
+    ("mathalpha" "\\mbfitxi" #X1D743 "𝝃")
+    ("mathalpha" "\\mbfity" #X1D49A "𝒚")
+    ("mathalpha" "\\mbfitz" #X1D49B "𝒛")
+    ("mathalpha" "\\mbfitzeta" #X1D73B "𝜻")
+    ("mathalpha" "\\mbfj" #X1D423 "𝐣")
+    ("mathalpha" "\\mbfk" #X1D424 "𝐤")
+    ("mathalpha" "\\mbfkappa" #X1D6CB "𝛋")
+    ("mathalpha" "\\mbfl" #X1D425 "𝐥")
+    ("mathalpha" "\\mbflambda" #X1D6CC "𝛌")
+    ("mathalpha" "\\mbfm" #X1D426 "𝐦")
+    ("mathalpha" "\\mbfmu" #X1D6CD "𝛍")
+    ("mathalpha" "\\mbfn" #X1D427 "𝐧")
+    ("mathalpha" "\\mbfnu" #X1D6CE "𝛎")
+    ("mathalpha" "\\mbfo" #X1D428 "𝐨")
+    ("mathalpha" "\\mbfomega" #X1D6DA "𝛚")
+    ("mathalpha" "\\mbfomicron" #X1D6D0 "𝛐")
+    ("mathalpha" "\\mbfp" #X1D429 "𝐩")
+    ("mathalpha" "\\mbfphi" #X1D6DF "𝛟")
+    ("mathalpha" "\\mbfpi" #X1D6D1 "𝛑")
+    ("mathalpha" "\\mbfpsi" #X1D6D9 "𝛙")
+    ("mathalpha" "\\mbfq" #X1D42A "𝐪")
+    ("mathalpha" "\\mbfr" #X1D42B "𝐫")
+    ("mathalpha" "\\mbfrho" #X1D6D2 "𝛒")
+    ("mathalpha" "\\mbfs" #X1D42C "𝐬")
+    ("mathalpha" "\\mbfsansA" #X1D5D4 "𝗔")
+    ("mathalpha" "\\mbfsansAlpha" #X1D756 "𝝖")
+    ("mathalpha" "\\mbfsansB" #X1D5D5 "𝗕")
+    ("mathalpha" "\\mbfsansBeta" #X1D757 "𝝗")
+    ("mathalpha" "\\mbfsansC" #X1D5D6 "𝗖")
+    ("mathalpha" "\\mbfsansChi" #X1D76C "𝝬")
+    ("mathalpha" "\\mbfsansD" #X1D5D7 "𝗗")
+    ("mathalpha" "\\mbfsansDelta" #X1D759 "𝝙")
+    ("mathalpha" "\\mbfsansE" #X1D5D8 "𝗘")
+    ("mathalpha" "\\mbfsansEpsilon" #X1D75A "𝝚")
+    ("mathalpha" "\\mbfsansEta" #X1D75C "𝝜")
+    ("mathalpha" "\\mbfsansF" #X1D5D9 "𝗙")
+    ("mathalpha" "\\mbfsansG" #X1D5DA "𝗚")
+    ("mathalpha" "\\mbfsansGamma" #X1D758 "𝝘")
+    ("mathalpha" "\\mbfsansH" #X1D5DB "𝗛")
+    ("mathalpha" "\\mbfsansI" #X1D5DC "𝗜")
+    ("mathalpha" "\\mbfsansIota" #X1D75E "𝝞")
+    ("mathalpha" "\\mbfsansJ" #X1D5DD "𝗝")
+    ("mathalpha" "\\mbfsansK" #X1D5DE "𝗞")
+    ("mathalpha" "\\mbfsansKappa" #X1D75F "𝝟")
+    ("mathalpha" "\\mbfsansL" #X1D5DF "𝗟")
+    ("mathalpha" "\\mbfsansLambda" #X1D760 "𝝠")
+    ("mathalpha" "\\mbfsansM" #X1D5E0 "𝗠")
+    ("mathalpha" "\\mbfsansMu" #X1D761 "𝝡")
+    ("mathalpha" "\\mbfsansN" #X1D5E1 "𝗡")
+    ("mathalpha" "\\mbfsansNu" #X1D762 "𝝢")
+    ("mathalpha" "\\mbfsansO" #X1D5E2 "𝗢")
+    ("mathalpha" "\\mbfsansOmega" #X1D76E "𝝮")
+    ("mathalpha" "\\mbfsansOmicron" #X1D764 "𝝤")
+    ("mathalpha" "\\mbfsansP" #X1D5E3 "𝗣")
+    ("mathalpha" "\\mbfsansPhi" #X1D76B "𝝫")
+    ("mathalpha" "\\mbfsansPi" #X1D765 "𝝥")
+    ("mathalpha" "\\mbfsansPsi" #X1D76D "𝝭")
+    ("mathalpha" "\\mbfsansQ" #X1D5E4 "𝗤")
+    ("mathalpha" "\\mbfsansR" #X1D5E5 "𝗥")
+    ("mathalpha" "\\mbfsansRho" #X1D766 "𝝦")
+    ("mathalpha" "\\mbfsansS" #X1D5E6 "𝗦")
+    ("mathalpha" "\\mbfsansSigma" #X1D768 "𝝨")
+    ("mathalpha" "\\mbfsansT" #X1D5E7 "𝗧")
+    ("mathalpha" "\\mbfsansTau" #X1D769 "𝝩")
+    ("mathalpha" "\\mbfsansTheta" #X1D75D "𝝝")
+    ("mathalpha" "\\mbfsansU" #X1D5E8 "𝗨")
+    ("mathalpha" "\\mbfsansUpsilon" #X1D76A "𝝪")
+    ("mathalpha" "\\mbfsansV" #X1D5E9 "𝗩")
+    ("mathalpha" "\\mbfsansW" #X1D5EA "𝗪")
+    ("mathalpha" "\\mbfsansX" #X1D5EB "𝗫")
+    ("mathalpha" "\\mbfsansXi" #X1D763 "𝝣")
+    ("mathalpha" "\\mbfsansY" #X1D5EC "𝗬")
+    ("mathalpha" "\\mbfsansZ" #X1D5ED "𝗭")
+    ("mathalpha" "\\mbfsansZeta" #X1D75B "𝝛")
+    ("mathalpha" "\\mbfsansa" #X1D5EE "𝗮")
+    ("mathalpha" "\\mbfsansalpha" #X1D770 "𝝰")
+    ("mathalpha" "\\mbfsansb" #X1D5EF "𝗯")
+    ("mathalpha" "\\mbfsansbeta" #X1D771 "𝝱")
+    ("mathalpha" "\\mbfsansc" #X1D5F0 "𝗰")
+    ("mathalpha" "\\mbfsanschi" #X1D786 "𝞆")
+    ("mathalpha" "\\mbfsansd" #X1D5F1 "𝗱")
+    ("mathalpha" "\\mbfsansdelta" #X1D773 "𝝳")
+    ("mathalpha" "\\mbfsanse" #X1D5F2 "𝗲")
+    ("mathalpha" "\\mbfsansepsilon" #X1D774 "𝝴")
+    ("mathalpha" "\\mbfsanseta" #X1D776 "𝝶")
+    ("mathalpha" "\\mbfsansf" #X1D5F3 "𝗳")
+    ("mathalpha" "\\mbfsansg" #X1D5F4 "𝗴")
+    ("mathalpha" "\\mbfsansgamma" #X1D772 "𝝲")
+    ("mathalpha" "\\mbfsansh" #X1D5F5 "𝗵")
+    ("mathalpha" "\\mbfsansi" #X1D5F6 "𝗶")
+    ("mathalpha" "\\mbfsansiota" #X1D778 "𝝸")
+    ("mathalpha" "\\mbfsansj" #X1D5F7 "𝗷")
+    ("mathalpha" "\\mbfsansk" #X1D5F8 "𝗸")
+    ("mathalpha" "\\mbfsanskappa" #X1D779 "𝝹")
+    ("mathalpha" "\\mbfsansl" #X1D5F9 "𝗹")
+    ("mathalpha" "\\mbfsanslambda" #X1D77A "𝝺")
+    ("mathalpha" "\\mbfsansm" #X1D5FA "𝗺")
+    ("mathalpha" "\\mbfsansmu" #X1D77B "𝝻")
+    ("mathalpha" "\\mbfsansn" #X1D5FB "𝗻")
+    ("mathalpha" "\\mbfsansnu" #X1D77C "𝝼")
+    ("mathalpha" "\\mbfsanso" #X1D5FC "𝗼")
+    ("mathalpha" "\\mbfsansomega" #X1D788 "𝞈")
+    ("mathalpha" "\\mbfsansomicron" #X1D77E "𝝾")
+    ("mathalpha" "\\mbfsansp" #X1D5FD "𝗽")
+    ("mathalpha" "\\mbfsansphi" #X1D785 "𝞅")
+    ("mathalpha" "\\mbfsanspi" #X1D77F "𝝿")
+    ("mathalpha" "\\mbfsanspsi" #X1D787 "𝞇")
+    ("mathalpha" "\\mbfsansq" #X1D5FE "𝗾")
+    ("mathalpha" "\\mbfsansr" #X1D5FF "𝗿")
+    ("mathalpha" "\\mbfsansrho" #X1D780 "𝞀")
+    ("mathalpha" "\\mbfsanss" #X1D600 "𝘀")
+    ("mathalpha" "\\mbfsanssigma" #X1D782 "𝞂")
+    ("mathalpha" "\\mbfsanst" #X1D601 "𝘁")
+    ("mathalpha" "\\mbfsanstau" #X1D783 "𝞃")
+    ("mathalpha" "\\mbfsanstheta" #X1D777 "𝝷")
+    ("mathalpha" "\\mbfsansu" #X1D602 "𝘂")
+    ("mathalpha" "\\mbfsansupsilon" #X1D784 "𝞄")
+    ("mathalpha" "\\mbfsansv" #X1D603 "𝘃")
+    ("mathalpha" "\\mbfsansvarTheta" #X1D767 "𝝧")
+    ("mathalpha" "\\mbfsansvarepsilon" #X1D78A "𝞊")
+    ("mathalpha" "\\mbfsansvarkappa" #X1D78C "𝞌")
+    ("mathalpha" "\\mbfsansvarphi" #X1D78D "𝞍")
+    ("mathalpha" "\\mbfsansvarpi" #X1D78F "𝞏")
+    ("mathalpha" "\\mbfsansvarrho" #X1D78E "𝞎")
+    ("mathalpha" "\\mbfsansvarsigma" #X1D781 "𝞁")
+    ("mathalpha" "\\mbfsansvartheta" #X1D78B "𝞋")
+    ("mathalpha" "\\mbfsansw" #X1D604 "𝘄")
+    ("mathalpha" "\\mbfsansx" #X1D605 "𝘅")
+    ("mathalpha" "\\mbfsansxi" #X1D77D "𝝽")
+    ("mathalpha" "\\mbfsansy" #X1D606 "𝘆")
+    ("mathalpha" "\\mbfsansz" #X1D607 "𝘇")
+    ("mathalpha" "\\mbfsanszeta" #X1D775 "𝝵")
+    ("mathalpha" "\\mbfscrA" #X1D4D0 "𝓐")
+    ("mathalpha" "\\mbfscrB" #X1D4D1 "𝓑")
+    ("mathalpha" "\\mbfscrC" #X1D4D2 "𝓒")
+    ("mathalpha" "\\mbfscrD" #X1D4D3 "𝓓")
+    ("mathalpha" "\\mbfscrE" #X1D4D4 "𝓔")
+    ("mathalpha" "\\mbfscrF" #X1D4D5 "𝓕")
+    ("mathalpha" "\\mbfscrG" #X1D4D6 "𝓖")
+    ("mathalpha" "\\mbfscrH" #X1D4D7 "𝓗")
+    ("mathalpha" "\\mbfscrI" #X1D4D8 "𝓘")
+    ("mathalpha" "\\mbfscrJ" #X1D4D9 "𝓙")
+    ("mathalpha" "\\mbfscrK" #X1D4DA "𝓚")
+    ("mathalpha" "\\mbfscrL" #X1D4DB "𝓛")
+    ("mathalpha" "\\mbfscrM" #X1D4DC "𝓜")
+    ("mathalpha" "\\mbfscrN" #X1D4DD "𝓝")
+    ("mathalpha" "\\mbfscrO" #X1D4DE "𝓞")
+    ("mathalpha" "\\mbfscrP" #X1D4DF "𝓟")
+    ("mathalpha" "\\mbfscrQ" #X1D4E0 "𝓠")
+    ("mathalpha" "\\mbfscrR" #X1D4E1 "𝓡")
+    ("mathalpha" "\\mbfscrS" #X1D4E2 "𝓢")
+    ("mathalpha" "\\mbfscrT" #X1D4E3 "𝓣")
+    ("mathalpha" "\\mbfscrU" #X1D4E4 "𝓤")
+    ("mathalpha" "\\mbfscrV" #X1D4E5 "𝓥")
+    ("mathalpha" "\\mbfscrW" #X1D4E6 "𝓦")
+    ("mathalpha" "\\mbfscrX" #X1D4E7 "𝓧")
+    ("mathalpha" "\\mbfscrY" #X1D4E8 "𝓨")
+    ("mathalpha" "\\mbfscrZ" #X1D4E9 "𝓩")
+    ("mathalpha" "\\mbfscra" #X1D4EA "𝓪")
+    ("mathalpha" "\\mbfscrb" #X1D4EB "𝓫")
+    ("mathalpha" "\\mbfscrc" #X1D4EC "𝓬")
+    ("mathalpha" "\\mbfscrd" #X1D4ED "𝓭")
+    ("mathalpha" "\\mbfscre" #X1D4EE "𝓮")
+    ("mathalpha" "\\mbfscrf" #X1D4EF "𝓯")
+    ("mathalpha" "\\mbfscrg" #X1D4F0 "𝓰")
+    ("mathalpha" "\\mbfscrh" #X1D4F1 "𝓱")
+    ("mathalpha" "\\mbfscri" #X1D4F2 "𝓲")
+    ("mathalpha" "\\mbfscrj" #X1D4F3 "𝓳")
+    ("mathalpha" "\\mbfscrk" #X1D4F4 "𝓴")
+    ("mathalpha" "\\mbfscrl" #X1D4F5 "𝓵")
+    ("mathalpha" "\\mbfscrm" #X1D4F6 "𝓶")
+    ("mathalpha" "\\mbfscrn" #X1D4F7 "𝓷")
+    ("mathalpha" "\\mbfscro" #X1D4F8 "𝓸")
+    ("mathalpha" "\\mbfscrp" #X1D4F9 "𝓹")
+    ("mathalpha" "\\mbfscrq" #X1D4FA "𝓺")
+    ("mathalpha" "\\mbfscrr" #X1D4FB "𝓻")
+    ("mathalpha" "\\mbfscrs" #X1D4FC "𝓼")
+    ("mathalpha" "\\mbfscrt" #X1D4FD "𝓽")
+    ("mathalpha" "\\mbfscru" #X1D4FE "𝓾")
+    ("mathalpha" "\\mbfscrv" #X1D4FF "𝓿")
+    ("mathalpha" "\\mbfscrw" #X1D500 "𝔀")
+    ("mathalpha" "\\mbfscrx" #X1D501 "𝔁")
+    ("mathalpha" "\\mbfscry" #X1D502 "𝔂")
+    ("mathalpha" "\\mbfscrz" #X1D503 "𝔃")
+    ("mathalpha" "\\mbfsigma" #X1D6D4 "𝛔")
+    ("mathalpha" "\\mbft" #X1D42D "𝐭")
+    ("mathalpha" "\\mbftau" #X1D6D5 "𝛕")
+    ("mathalpha" "\\mbftheta" #X1D6C9 "𝛉")
+    ("mathalpha" "\\mbfu" #X1D42E "𝐮")
+    ("mathalpha" "\\mbfupsilon" #X1D6D6 "𝛖")
+    ("mathalpha" "\\mbfv" #X1D42F "𝐯")
+    ("mathalpha" "\\mbfvarTheta" #X1D6B9 "𝚹")
+    ("mathalpha" "\\mbfvarepsilon" #X1D6DC "𝛜")
+    ("mathalpha" "\\mbfvarkappa" #X1D6DE "𝛞")
+    ("mathalpha" "\\mbfvarphi" #X1D6D7 "𝛗")
+    ("mathalpha" "\\mbfvarpi" #X1D6E1 "𝛡")
+    ("mathalpha" "\\mbfvarrho" #X1D6E0 "𝛠")
+    ("mathalpha" "\\mbfvarsigma" #X1D6D3 "𝛓")
+    ("mathalpha" "\\mbfvartheta" #X1D6DD "𝛝")
+    ("mathalpha" "\\mbfw" #X1D430 "𝐰")
+    ("mathalpha" "\\mbfx" #X1D431 "𝐱")
+    ("mathalpha" "\\mbfxi" #X1D6CF "𝛏")
+    ("mathalpha" "\\mbfy" #X1D432 "𝐲")
+    ("mathalpha" "\\mbfz" #X1D433 "𝐳")
+    ("mathalpha" "\\mbfzeta" #X1D6C7 "𝛇")
+    ("mathalpha" "\\mfrakA" #X1D504 "𝔄")
+    ("mathalpha" "\\mfrakB" #X1D505 "𝔅")
+    ("mathalpha" "\\mfrakC" #X0212D "ℭ")
+    ("mathalpha" "\\mfrakD" #X1D507 "𝔇")
+    ("mathalpha" "\\mfrakE" #X1D508 "𝔈")
+    ("mathalpha" "\\mfrakF" #X1D509 "𝔉")
+    ("mathalpha" "\\mfrakG" #X1D50A "𝔊")
+    ("mathalpha" "\\mfrakH" #X0210C "ℌ")
+    ("mathalpha" "\\mfrakJ" #X1D50D "𝔍")
+    ("mathalpha" "\\mfrakK" #X1D50E "𝔎")
+    ("mathalpha" "\\mfrakL" #X1D50F "𝔏")
+    ("mathalpha" "\\mfrakM" #X1D510 "𝔐")
+    ("mathalpha" "\\mfrakN" #X1D511 "𝔑")
+    ("mathalpha" "\\mfrakO" #X1D512 "𝔒")
+    ("mathalpha" "\\mfrakP" #X1D513 "𝔓")
+    ("mathalpha" "\\mfrakQ" #X1D514 "𝔔")
+    ("mathalpha" "\\mfrakS" #X1D516 "𝔖")
+    ("mathalpha" "\\mfrakT" #X1D517 "𝔗")
+    ("mathalpha" "\\mfrakU" #X1D518 "𝔘")
+    ("mathalpha" "\\mfrakV" #X1D519 "𝔙")
+    ("mathalpha" "\\mfrakW" #X1D51A "𝔚")
+    ("mathalpha" "\\mfrakX" #X1D51B "𝔛")
+    ("mathalpha" "\\mfrakY" #X1D51C "𝔜")
+    ("mathalpha" "\\mfrakZ" #X02128 "ℨ")
+    ("mathalpha" "\\mfraka" #X1D51E "𝔞")
+    ("mathalpha" "\\mfrakb" #X1D51F "𝔟")
+    ("mathalpha" "\\mfrakc" #X1D520 "𝔠")
+    ("mathalpha" "\\mfrakd" #X1D521 "𝔡")
+    ("mathalpha" "\\mfrake" #X1D522 "𝔢")
+    ("mathalpha" "\\mfrakf" #X1D523 "𝔣")
+    ("mathalpha" "\\mfrakg" #X1D524 "𝔤")
+    ("mathalpha" "\\mfrakh" #X1D525 "𝔥")
+    ("mathalpha" "\\mfraki" #X1D526 "𝔦")
+    ("mathalpha" "\\mfrakj" #X1D527 "𝔧")
+    ("mathalpha" "\\mfrakk" #X1D528 "𝔨")
+    ("mathalpha" "\\mfrakl" #X1D529 "𝔩")
+    ("mathalpha" "\\mfrakm" #X1D52A "𝔪")
+    ("mathalpha" "\\mfrakn" #X1D52B "𝔫")
+    ("mathalpha" "\\mfrako" #X1D52C "𝔬")
+    ("mathalpha" "\\mfrakp" #X1D52D "𝔭")
+    ("mathalpha" "\\mfrakq" #X1D52E "𝔮")
+    ("mathalpha" "\\mfrakr" #X1D52F "𝔯")
+    ("mathalpha" "\\mfraks" #X1D530 "𝔰")
+    ("mathalpha" "\\mfrakt" #X1D531 "𝔱")
+    ("mathalpha" "\\mfraku" #X1D532 "𝔲")
+    ("mathalpha" "\\mfrakv" #X1D533 "𝔳")
+    ("mathalpha" "\\mfrakw" #X1D534 "𝔴")
+    ("mathalpha" "\\mfrakx" #X1D535 "𝔵")
+    ("mathalpha" "\\mfraky" #X1D536 "𝔶")
+    ("mathalpha" "\\mfrakz" #X1D537 "𝔷")
+    ("mathalpha" "\\mitA" #X1D434 "𝐴")
+    ("mathalpha" "\\mitAlpha" #X1D6E2 "𝛢")
+    ("mathalpha" "\\mitB" #X1D435 "𝐵")
+    ("mathalpha" "\\mitBeta" #X1D6E3 "𝛣")
+    ("mathalpha" "\\mitC" #X1D436 "𝐶")
+    ("mathalpha" "\\mitChi" #X1D6F8 "𝛸")
+    ("mathalpha" "\\mitD" #X1D437 "𝐷")
+    ("mathalpha" "\\mitDelta" #X1D6E5 "𝛥")
+    ("mathalpha" "\\mitE" #X1D438 "𝐸")
+    ("mathalpha" "\\mitEpsilon" #X1D6E6 "𝛦")
+    ("mathalpha" "\\mitEta" #X1D6E8 "𝛨")
+    ("mathalpha" "\\mitF" #X1D439 "𝐹")
+    ("mathalpha" "\\mitG" #X1D43A "𝐺")
+    ("mathalpha" "\\mitGamma" #X1D6E4 "𝛤")
+    ("mathalpha" "\\mitH" #X1D43B "𝐻")
+    ("mathalpha" "\\mitI" #X1D43C "𝐼")
+    ("mathalpha" "\\mitIota" #X1D6EA "𝛪")
+    ("mathalpha" "\\mitJ" #X1D43D "𝐽")
+    ("mathalpha" "\\mitK" #X1D43E "𝐾")
+    ("mathalpha" "\\mitKappa" #X1D6EB "𝛫")
+    ("mathalpha" "\\mitL" #X1D43F "𝐿")
+    ("mathalpha" "\\mitLambda" #X1D6EC "𝛬")
+    ("mathalpha" "\\mitM" #X1D440 "𝑀")
+    ("mathalpha" "\\mitMu" #X1D6ED "𝛭")
+    ("mathalpha" "\\mitN" #X1D441 "𝑁")
+    ("mathalpha" "\\mitNu" #X1D6EE "𝛮")
+    ("mathalpha" "\\mitO" #X1D442 "𝑂")
+    ("mathalpha" "\\mitOmega" #X1D6FA "𝛺")
+    ("mathalpha" "\\mitOmicron" #X1D6F0 "𝛰")
+    ("mathalpha" "\\mitP" #X1D443 "𝑃")
+    ("mathalpha" "\\mitPhi" #X1D6F7 "𝛷")
+    ("mathalpha" "\\mitPi" #X1D6F1 "𝛱")
+    ("mathalpha" "\\mitPsi" #X1D6F9 "𝛹")
+    ("mathalpha" "\\mitQ" #X1D444 "𝑄")
+    ("mathalpha" "\\mitR" #X1D445 "𝑅")
+    ("mathalpha" "\\mitRho" #X1D6F2 "𝛲")
+    ("mathalpha" "\\mitS" #X1D446 "𝑆")
+    ("mathalpha" "\\mitSigma" #X1D6F4 "𝛴")
+    ("mathalpha" "\\mitT" #X1D447 "𝑇")
+    ("mathalpha" "\\mitTau" #X1D6F5 "𝛵")
+    ("mathalpha" "\\mitTheta" #X1D6E9 "𝛩")
+    ("mathalpha" "\\mitU" #X1D448 "𝑈")
+    ("mathalpha" "\\mitUpsilon" #X1D6F6 "𝛶")
+    ("mathalpha" "\\mitV" #X1D449 "𝑉")
+    ("mathalpha" "\\mitW" #X1D44A "𝑊")
+    ("mathalpha" "\\mitX" #X1D44B "𝑋")
+    ("mathalpha" "\\mitXi" #X1D6EF "𝛯")
+    ("mathalpha" "\\mitY" #X1D44C "𝑌")
+    ("mathalpha" "\\mitZ" #X1D44D "𝑍")
+    ("mathalpha" "\\mitZeta" #X1D6E7 "𝛧")
+    ("mathalpha" "\\mita" #X1D44E "𝑎")
+    ("mathalpha" "\\mitalpha" #X1D6FC "𝛼")
+    ("mathalpha" "\\mitb" #X1D44F "𝑏")
+    ("mathalpha" "\\mitbeta" #X1D6FD "𝛽")
+    ("mathalpha" "\\mitc" #X1D450 "𝑐")
+    ("mathalpha" "\\mitchi" #X1D712 "𝜒")
+    ("mathalpha" "\\mitd" #X1D451 "𝑑")
+    ("mathalpha" "\\mitdelta" #X1D6FF "𝛿")
+    ("mathalpha" "\\mite" #X1D452 "𝑒")
+    ("mathalpha" "\\mitepsilon" #X1D700 "𝜀")
+    ("mathalpha" "\\miteta" #X1D702 "𝜂")
+    ("mathalpha" "\\mitf" #X1D453 "𝑓")
+    ("mathalpha" "\\mitg" #X1D454 "𝑔")
+    ("mathalpha" "\\mitgamma" #X1D6FE "𝛾")
+    ("mathalpha" "\\miti" #X1D456 "𝑖")
+    ("mathalpha" "\\mitiota" #X1D704 "𝜄")
+    ("mathalpha" "\\mitj" #X1D457 "𝑗")
+    ("mathalpha" "\\mitk" #X1D458 "𝑘")
+    ("mathalpha" "\\mitkappa" #X1D705 "𝜅")
+    ("mathalpha" "\\mitl" #X1D459 "𝑙")
+    ("mathalpha" "\\mitlambda" #X1D706 "𝜆")
+    ("mathalpha" "\\mitm" #X1D45A "𝑚")
+    ("mathalpha" "\\mitmu" #X1D707 "𝜇")
+    ("mathalpha" "\\mitn" #X1D45B "𝑛")
+    ("mathalpha" "\\mitnu" #X1D708 "𝜈")
+    ("mathalpha" "\\mito" #X1D45C "𝑜")
+    ("mathalpha" "\\mitomega" #X1D714 "𝜔")
+    ("mathalpha" "\\mitomicron" #X1D70A "𝜊")
+    ("mathalpha" "\\mitp" #X1D45D "𝑝")
+    ("mathalpha" "\\mitphi" #X1D711 "𝜑")
+    ("mathalpha" "\\mitpi" #X1D70B "𝜋")
+    ("mathalpha" "\\mitpsi" #X1D713 "𝜓")
+    ("mathalpha" "\\mitq" #X1D45E "𝑞")
+    ("mathalpha" "\\mitr" #X1D45F "𝑟")
+    ("mathalpha" "\\mitrho" #X1D70C "𝜌")
+    ("mathalpha" "\\mits" #X1D460 "𝑠")
+    ("mathalpha" "\\mitsansA" #X1D608 "𝘈")
+    ("mathalpha" "\\mitsansB" #X1D609 "𝘉")
+    ("mathalpha" "\\mitsansC" #X1D60A "𝘊")
+    ("mathalpha" "\\mitsansD" #X1D60B "𝘋")
+    ("mathalpha" "\\mitsansE" #X1D60C "𝘌")
+    ("mathalpha" "\\mitsansF" #X1D60D "𝘍")
+    ("mathalpha" "\\mitsansG" #X1D60E "𝘎")
+    ("mathalpha" "\\mitsansH" #X1D60F "𝘏")
+    ("mathalpha" "\\mitsansI" #X1D610 "𝘐")
+    ("mathalpha" "\\mitsansJ" #X1D611 "𝘑")
+    ("mathalpha" "\\mitsansK" #X1D612 "𝘒")
+    ("mathalpha" "\\mitsansL" #X1D613 "𝘓")
+    ("mathalpha" "\\mitsansM" #X1D614 "𝘔")
+    ("mathalpha" "\\mitsansN" #X1D615 "𝘕")
+    ("mathalpha" "\\mitsansO" #X1D616 "𝘖")
+    ("mathalpha" "\\mitsansP" #X1D617 "𝘗")
+    ("mathalpha" "\\mitsansQ" #X1D618 "𝘘")
+    ("mathalpha" "\\mitsansR" #X1D619 "𝘙")
+    ("mathalpha" "\\mitsansS" #X1D61A "𝘚")
+    ("mathalpha" "\\mitsansT" #X1D61B "𝘛")
+    ("mathalpha" "\\mitsansU" #X1D61C "𝘜")
+    ("mathalpha" "\\mitsansV" #X1D61D "𝘝")
+    ("mathalpha" "\\mitsansW" #X1D61E "𝘞")
+    ("mathalpha" "\\mitsansX" #X1D61F "𝘟")
+    ("mathalpha" "\\mitsansY" #X1D620 "𝘠")
+    ("mathalpha" "\\mitsansZ" #X1D621 "𝘡")
+    ("mathalpha" "\\mitsansa" #X1D622 "𝘢")
+    ("mathalpha" "\\mitsansb" #X1D623 "𝘣")
+    ("mathalpha" "\\mitsansc" #X1D624 "𝘤")
+    ("mathalpha" "\\mitsansd" #X1D625 "𝘥")
+    ("mathalpha" "\\mitsanse" #X1D626 "𝘦")
+    ("mathalpha" "\\mitsansf" #X1D627 "𝘧")
+    ("mathalpha" "\\mitsansg" #X1D628 "𝘨")
+    ("mathalpha" "\\mitsansh" #X1D629 "𝘩")
+    ("mathalpha" "\\mitsansi" #X1D62A "𝘪")
+    ("mathalpha" "\\mitsansj" #X1D62B "𝘫")
+    ("mathalpha" "\\mitsansk" #X1D62C "𝘬")
+    ("mathalpha" "\\mitsansl" #X1D62D "𝘭")
+    ("mathalpha" "\\mitsansm" #X1D62E "𝘮")
+    ("mathalpha" "\\mitsansn" #X1D62F "𝘯")
+    ("mathalpha" "\\mitsanso" #X1D630 "𝘰")
+    ("mathalpha" "\\mitsansp" #X1D631 "𝘱")
+    ("mathalpha" "\\mitsansq" #X1D632 "𝘲")
+    ("mathalpha" "\\mitsansr" #X1D633 "𝘳")
+    ("mathalpha" "\\mitsanss" #X1D634 "𝘴")
+    ("mathalpha" "\\mitsanst" #X1D635 "𝘵")
+    ("mathalpha" "\\mitsansu" #X1D636 "𝘶")
+    ("mathalpha" "\\mitsansv" #X1D637 "𝘷")
+    ("mathalpha" "\\mitsansw" #X1D638 "𝘸")
+    ("mathalpha" "\\mitsansx" #X1D639 "𝘹")
+    ("mathalpha" "\\mitsansy" #X1D63A "𝘺")
+    ("mathalpha" "\\mitsansz" #X1D63B "𝘻")
+    ("mathalpha" "\\mitsigma" #X1D70E "𝜎")
+    ("mathalpha" "\\mitt" #X1D461 "𝑡")
+    ("mathalpha" "\\mittau" #X1D70F "𝜏")
+    ("mathalpha" "\\mittheta" #X1D703 "𝜃")
+    ("mathalpha" "\\mitu" #X1D462 "𝑢")
+    ("mathalpha" "\\mitupsilon" #X1D710 "𝜐")
+    ("mathalpha" "\\mitv" #X1D463 "𝑣")
+    ("mathalpha" "\\mitvarTheta" #X1D6F3 "𝛳")
+    ("mathalpha" "\\mitvarepsilon" #X1D716 "𝜖")
+    ("mathalpha" "\\mitvarkappa" #X1D718 "𝜘")
+    ("mathalpha" "\\mitvarphi" #X1D719 "𝜙")
+    ("mathalpha" "\\mitvarpi" #X1D71B "𝜛")
+    ("mathalpha" "\\mitvarrho" #X1D71A "𝜚")
+    ("mathalpha" "\\mitvarsigma" #X1D70D "𝜍")
+    ("mathalpha" "\\mitvartheta" #X1D717 "𝜗")
+    ("mathalpha" "\\mitw" #X1D464 "𝑤")
+    ("mathalpha" "\\mitx" #X1D465 "𝑥")
+    ("mathalpha" "\\mitxi" #X1D709 "𝜉")
+    ("mathalpha" "\\mity" #X1D466 "𝑦")
+    ("mathalpha" "\\mitz" #X1D467 "𝑧")
+    ("mathalpha" "\\mitzeta" #X1D701 "𝜁")
+    ("mathalpha" "\\msansA" #X1D5A0 "𝖠")
+    ("mathalpha" "\\msansB" #X1D5A1 "𝖡")
+    ("mathalpha" "\\msansC" #X1D5A2 "𝖢")
+    ("mathalpha" "\\msansD" #X1D5A3 "𝖣")
+    ("mathalpha" "\\msansE" #X1D5A4 "𝖤")
+    ("mathalpha" "\\msansF" #X1D5A5 "𝖥")
+    ("mathalpha" "\\msansG" #X1D5A6 "𝖦")
+    ("mathalpha" "\\msansH" #X1D5A7 "𝖧")
+    ("mathalpha" "\\msansI" #X1D5A8 "𝖨")
+    ("mathalpha" "\\msansJ" #X1D5A9 "𝖩")
+    ("mathalpha" "\\msansK" #X1D5AA "𝖪")
+    ("mathalpha" "\\msansL" #X1D5AB "𝖫")
+    ("mathalpha" "\\msansM" #X1D5AC "𝖬")
+    ("mathalpha" "\\msansN" #X1D5AD "𝖭")
+    ("mathalpha" "\\msansO" #X1D5AE "𝖮")
+    ("mathalpha" "\\msansP" #X1D5AF "𝖯")
+    ("mathalpha" "\\msansQ" #X1D5B0 "𝖰")
+    ("mathalpha" "\\msansR" #X1D5B1 "𝖱")
+    ("mathalpha" "\\msansS" #X1D5B2 "𝖲")
+    ("mathalpha" "\\msansT" #X1D5B3 "𝖳")
+    ("mathalpha" "\\msansU" #X1D5B4 "𝖴")
+    ("mathalpha" "\\msansV" #X1D5B5 "𝖵")
+    ("mathalpha" "\\msansW" #X1D5B6 "𝖶")
+    ("mathalpha" "\\msansX" #X1D5B7 "𝖷")
+    ("mathalpha" "\\msansY" #X1D5B8 "𝖸")
+    ("mathalpha" "\\msansZ" #X1D5B9 "𝖹")
+    ("mathalpha" "\\msansa" #X1D5BA "𝖺")
+    ("mathalpha" "\\msansb" #X1D5BB "𝖻")
+    ("mathalpha" "\\msansc" #X1D5BC "𝖼")
+    ("mathalpha" "\\msansd" #X1D5BD "𝖽")
+    ("mathalpha" "\\msanse" #X1D5BE "𝖾")
+    ("mathalpha" "\\msansf" #X1D5BF "𝖿")
+    ("mathalpha" "\\msansg" #X1D5C0 "𝗀")
+    ("mathalpha" "\\msansh" #X1D5C1 "𝗁")
+    ("mathalpha" "\\msansi" #X1D5C2 "𝗂")
+    ("mathalpha" "\\msansj" #X1D5C3 "𝗃")
+    ("mathalpha" "\\msansk" #X1D5C4 "𝗄")
+    ("mathalpha" "\\msansl" #X1D5C5 "𝗅")
+    ("mathalpha" "\\msansm" #X1D5C6 "𝗆")
+    ("mathalpha" "\\msansn" #X1D5C7 "𝗇")
+    ("mathalpha" "\\msanso" #X1D5C8 "𝗈")
+    ("mathalpha" "\\msansp" #X1D5C9 "𝗉")
+    ("mathalpha" "\\msansq" #X1D5CA "𝗊")
+    ("mathalpha" "\\msansr" #X1D5CB "𝗋")
+    ("mathalpha" "\\msanss" #X1D5CC "𝗌")
+    ("mathalpha" "\\msanst" #X1D5CD "𝗍")
+    ("mathalpha" "\\msansu" #X1D5CE "𝗎")
+    ("mathalpha" "\\msansv" #X1D5CF "𝗏")
+    ("mathalpha" "\\msansw" #X1D5D0 "𝗐")
+    ("mathalpha" "\\msansx" #X1D5D1 "𝗑")
+    ("mathalpha" "\\msansy" #X1D5D2 "𝗒")
+    ("mathalpha" "\\msansz" #X1D5D3 "𝗓")
+    ("mathalpha" "\\mscrA" #X1D49C "𝒜")
+    ("mathalpha" "\\mscrB" #X0212C "ℬ")
+    ("mathalpha" "\\mscrC" #X1D49E "𝒞")
+    ("mathalpha" "\\mscrD" #X1D49F "𝒟")
+    ("mathalpha" "\\mscrE" #X02130 "ℰ")
+    ("mathalpha" "\\mscrF" #X02131 "ℱ")
+    ("mathalpha" "\\mscrG" #X1D4A2 "𝒢")
+    ("mathalpha" "\\mscrH" #X0210B "ℋ")
+    ("mathalpha" "\\mscrI" #X02110 "ℐ")
+    ("mathalpha" "\\mscrJ" #X1D4A5 "𝒥")
+    ("mathalpha" "\\mscrK" #X1D4A6 "𝒦")
+    ("mathalpha" "\\mscrL" #X02112 "ℒ")
+    ("mathalpha" "\\mscrM" #X02133 "ℳ")
+    ("mathalpha" "\\mscrN" #X1D4A9 "𝒩")
+    ("mathalpha" "\\mscrO" #X1D4AA "𝒪")
+    ("mathalpha" "\\mscrP" #X1D4AB "𝒫")
+    ("mathalpha" "\\mscrQ" #X1D4AC "𝒬")
+    ("mathalpha" "\\mscrR" #X0211B "ℛ")
+    ("mathalpha" "\\mscrS" #X1D4AE "𝒮")
+    ("mathalpha" "\\mscrT" #X1D4AF "𝒯")
+    ("mathalpha" "\\mscrU" #X1D4B0 "𝒰")
+    ("mathalpha" "\\mscrV" #X1D4B1 "𝒱")
+    ("mathalpha" "\\mscrW" #X1D4B2 "𝒲")
+    ("mathalpha" "\\mscrX" #X1D4B3 "𝒳")
+    ("mathalpha" "\\mscrY" #X1D4B4 "𝒴")
+    ("mathalpha" "\\mscrZ" #X1D4B5 "𝒵")
+    ("mathalpha" "\\mscra" #X1D4B6 "𝒶")
+    ("mathalpha" "\\mscrb" #X1D4B7 "𝒷")
+    ("mathalpha" "\\mscrc" #X1D4B8 "𝒸")
+    ("mathalpha" "\\mscrd" #X1D4B9 "𝒹")
+    ("mathalpha" "\\mscre" #X0212F "ℯ")
+    ("mathalpha" "\\mscrf" #X1D4BB "𝒻")
+    ("mathalpha" "\\mscrg" #X0210A "ℊ")
+    ("mathalpha" "\\mscrh" #X1D4BD "𝒽")
+    ("mathalpha" "\\mscri" #X1D4BE "𝒾")
+    ("mathalpha" "\\mscrj" #X1D4BF "𝒿")
+    ("mathalpha" "\\mscrk" #X1D4C0 "𝓀")
+    ("mathalpha" "\\mscrl" #X1D4C1 "𝓁")
+    ("mathalpha" "\\mscrm" #X1D4C2 "𝓂")
+    ("mathalpha" "\\mscrn" #X1D4C3 "𝓃")
+    ("mathalpha" "\\mscro" #X02134 "ℴ")
+    ("mathalpha" "\\mscrp" #X1D4C5 "𝓅")
+    ("mathalpha" "\\mscrq" #X1D4C6 "𝓆")
+    ("mathalpha" "\\mscrr" #X1D4C7 "𝓇")
+    ("mathalpha" "\\mscrs" #X1D4C8 "𝓈")
+    ("mathalpha" "\\mscrt" #X1D4C9 "𝓉")
+    ("mathalpha" "\\mscru" #X1D4CA "𝓊")
+    ("mathalpha" "\\mscrv" #X1D4CB "𝓋")
+    ("mathalpha" "\\mscrw" #X1D4CC "𝓌")
+    ("mathalpha" "\\mscrx" #X1D4CD "𝓍")
+    ("mathalpha" "\\mscry" #X1D4CE "𝓎")
+    ("mathalpha" "\\mscrz" #X1D4CF "𝓏")
+    ("mathalpha" "\\mttA" #X1D670 "𝙰")
+    ("mathalpha" "\\mttB" #X1D671 "𝙱")
+    ("mathalpha" "\\mttC" #X1D672 "𝙲")
+    ("mathalpha" "\\mttD" #X1D673 "𝙳")
+    ("mathalpha" "\\mttE" #X1D674 "𝙴")
+    ("mathalpha" "\\mttF" #X1D675 "𝙵")
+    ("mathalpha" "\\mttG" #X1D676 "𝙶")
+    ("mathalpha" "\\mttH" #X1D677 "𝙷")
+    ("mathalpha" "\\mttI" #X1D678 "𝙸")
+    ("mathalpha" "\\mttJ" #X1D679 "𝙹")
+    ("mathalpha" "\\mttK" #X1D67A "𝙺")
+    ("mathalpha" "\\mttL" #X1D67B "𝙻")
+    ("mathalpha" "\\mttM" #X1D67C "𝙼")
+    ("mathalpha" "\\mttN" #X1D67D "𝙽")
+    ("mathalpha" "\\mttO" #X1D67E "𝙾")
+    ("mathalpha" "\\mttP" #X1D67F "𝙿")
+    ("mathalpha" "\\mttQ" #X1D680 "𝚀")
+    ("mathalpha" "\\mttR" #X1D681 "𝚁")
+    ("mathalpha" "\\mttS" #X1D682 "𝚂")
+    ("mathalpha" "\\mttT" #X1D683 "𝚃")
+    ("mathalpha" "\\mttU" #X1D684 "𝚄")
+    ("mathalpha" "\\mttV" #X1D685 "𝚅")
+    ("mathalpha" "\\mttW" #X1D686 "𝚆")
+    ("mathalpha" "\\mttX" #X1D687 "𝚇")
+    ("mathalpha" "\\mttY" #X1D688 "𝚈")
+    ("mathalpha" "\\mttZ" #X1D689 "𝚉")
+    ("mathalpha" "\\mtta" #X1D68A "𝚊")
+    ("mathalpha" "\\mttb" #X1D68B "𝚋")
+    ("mathalpha" "\\mttc" #X1D68C "𝚌")
+    ("mathalpha" "\\mttd" #X1D68D "𝚍")
+    ("mathalpha" "\\mtte" #X1D68E "𝚎")
+    ("mathalpha" "\\mttf" #X1D68F "𝚏")
+    ("mathalpha" "\\mttg" #X1D690 "𝚐")
+    ("mathalpha" "\\mtth" #X1D691 "𝚑")
+    ("mathalpha" "\\mtti" #X1D692 "𝚒")
+    ("mathalpha" "\\mttj" #X1D693 "𝚓")
+    ("mathalpha" "\\mttk" #X1D694 "𝚔")
+    ("mathalpha" "\\mttl" #X1D695 "𝚕")
+    ("mathalpha" "\\mttm" #X1D696 "𝚖")
+    ("mathalpha" "\\mttn" #X1D697 "𝚗")
+    ("mathalpha" "\\mtto" #X1D698 "𝚘")
+    ("mathalpha" "\\mttp" #X1D699 "𝚙")
+    ("mathalpha" "\\mttq" #X1D69A "𝚚")
+    ("mathalpha" "\\mttr" #X1D69B "𝚛")
+    ("mathalpha" "\\mtts" #X1D69C "𝚜")
+    ("mathalpha" "\\mttt" #X1D69D "𝚝")
+    ("mathalpha" "\\mttu" #X1D69E "𝚞")
+    ("mathalpha" "\\mttv" #X1D69F "𝚟")
+    ("mathalpha" "\\mttw" #X1D6A0 "𝚠")
+    ("mathalpha" "\\mttx" #X1D6A1 "𝚡")
+    ("mathalpha" "\\mtty" #X1D6A2 "𝚢")
+    ("mathalpha" "\\mttz" #X1D6A3 "𝚣")
+    ("mathalpha" "\\period" #X0002E ".")
+    ("mathalpha" "\\turnediota" #X02129 "℩")
+    ("mathalpha" "\\upAlpha" #X00391 "Α")
+    ("mathalpha" "\\upBeta" #X00392 "Β")
+    ("mathalpha" "\\upChi" #X003A7 "Χ")
+    ("mathalpha" "\\upDelta" #X00394 "Δ")
+    ("mathalpha" "\\upDigamma" #X003DC "Ϝ")
+    ("mathalpha" "\\upEpsilon" #X00395 "Ε")
+    ("mathalpha" "\\upEta" #X00397 "Η")
+    ("mathalpha" "\\upGamma" #X00393 "Γ")
+    ("mathalpha" "\\upIota" #X00399 "Ι")
+    ("mathalpha" "\\upKappa" #X0039A "Κ")
+    ("mathalpha" "\\upKoppa" #X003DE "Ϟ")
+    ("mathalpha" "\\upLambda" #X0039B "Λ")
+    ("mathalpha" "\\upMu" #X0039C "Μ")
+    ("mathalpha" "\\upNu" #X0039D "Ν")
+    ("mathalpha" "\\upOmega" #X003A9 "Ω")
+    ("mathalpha" "\\upOmicron" #X0039F "Ο")
+    ("mathalpha" "\\upPhi" #X003A6 "Φ")
+    ("mathalpha" "\\upPi" #X003A0 "Π")
+    ("mathalpha" "\\upPsi" #X003A8 "Ψ")
+    ("mathalpha" "\\upRho" #X003A1 "Ρ")
+    ("mathalpha" "\\upSampi" #X003E0 "Ϡ")
+    ("mathalpha" "\\upSigma" #X003A3 "Σ")
+    ("mathalpha" "\\upStigma" #X003DA "Ϛ")
+    ("mathalpha" "\\upTau" #X003A4 "Τ")
+    ("mathalpha" "\\upTheta" #X00398 "Θ")
+    ("mathalpha" "\\upUpsilon" #X003A5 "Υ")
+    ("mathalpha" "\\upUpsilon" #X003D2 "ϒ")
+    ("mathalpha" "\\upXi" #X0039E "Ξ")
+    ("mathalpha" "\\upZeta" #X00396 "Ζ")
+    ("mathalpha" "\\upalpha" #X003B1 "α")
+    ("mathalpha" "\\upbeta" #X003B2 "β")
+    ("mathalpha" "\\upchi" #X003C7 "χ")
+    ("mathalpha" "\\updelta" #X003B4 "δ")
+    ("mathalpha" "\\updigamma" #X003DD "ϝ")
+    ("mathalpha" "\\upepsilon" #X003B5 "ε")
+    ("mathalpha" "\\upeta" #X003B7 "η")
+    ("mathalpha" "\\upgamma" #X003B3 "γ")
+    ("mathalpha" "\\upiota" #X003B9 "ι")
+    ("mathalpha" "\\upkappa" #X003BA "κ")
+    ("mathalpha" "\\upkoppa" #X003DF "ϟ")
+    ("mathalpha" "\\uplambda" #X003BB "λ")
+    ("mathalpha" "\\upmu" #X003BC "μ")
+    ("mathalpha" "\\upnu" #X003BD "ν")
+    ("mathalpha" "\\upomega" #X003C9 "ω")
+    ("mathalpha" "\\upomicron" #X003BF "ο")
+    ("mathalpha" "\\upphi" #X003D5 "ϕ")
+    ("mathalpha" "\\uppi" #X003C0 "π")
+    ("mathalpha" "\\uppsi" #X003C8 "ψ")
+    ("mathalpha" "\\uprho" #X003C1 "ρ")
+    ("mathalpha" "\\upsampi" #X003E1 "ϡ")
+    ("mathalpha" "\\upsigma" #X003C3 "σ")
+    ("mathalpha" "\\upstigma" #X003DB "ϛ")
+    ("mathalpha" "\\uptau" #X003C4 "τ")
+    ("mathalpha" "\\uptheta" #X003B8 "θ")
+    ("mathalpha" "\\upupsilon" #X003C5 "υ")
+    ("mathalpha" "\\upvarTheta" #X003F4 "ϴ")
+    ("mathalpha" "\\upvarbeta" #X003D0 "ϐ")
+    ("mathalpha" "\\upvarepsilon" #X003F5 "ϵ")
+    ("mathalpha" "\\upvarkappa" #X003F0 "ϰ")
+    ("mathalpha" "\\upvarphi" #X003C6 "φ")
+    ("mathalpha" "\\upvarpi" #X003D6 "ϖ")
+    ("mathalpha" "\\upvarrho" #X003F1 "ϱ")
+    ("mathalpha" "\\upvarsigma" #X003C2 "ς")
+    ("mathalpha" "\\upvartheta" #X003D1 "ϑ")
+    ("mathalpha" "\\upxi" #X003BE "ξ")
+    ("mathalpha" "\\upzeta" #X003B6 "ζ")
+    ("mathalpha" "\\wp" #X02118 "℘")
+    ("mathbin" "\\Cap" #X022D2 "⋒")
+    ("mathbin" "\\Cup" #X022D3 "⋓")
+    ("mathbin" "\\Otimes" #X02A37 "⨷")
+    ("mathbin" "\\Sqcap" #X02A4E "⩎")
+    ("mathbin" "\\Sqcup" #X02A4F "⩏")
+    ("mathbin" "\\Vee" #X02A54 "⩔")
+    ("mathbin" "\\Wedge" #X02A53 "⩓")
+    ("mathbin" "\\amalg" #X02A3F "⨿")
+    ("mathbin" "\\ast" #X02217 "∗")
+    ("mathbin" "\\barcap" #X02A43 "⩃")
+    ("mathbin" "\\barcup" #X02A42 "⩂")
+    ("mathbin" "\\barvee" #X022BD "⊽")
+    ("mathbin" "\\barwedge" #X022BC "⊼")
+    ("mathbin" "\\bigslopedvee" #X02A57 "⩗")
+    ("mathbin" "\\bigslopedwedge" #X02A58 "⩘")
+    ("mathbin" "\\bigtriangledown" #X025BD "▽")
+    ("mathbin" "\\bigtriangleup" #X025B3 "△")
+    ("mathbin" "\\blackhourglass" #X029D7 "⧗")
+    ("mathbin" "\\blacktriangle" #X025B4 "▴")
+    ("mathbin" "\\blacktriangledown" #X025BE "▾")
+    ("mathbin" "\\blacktriangleleft" #X025C0 "◀")
+    ("mathbin" "\\blacktriangleright" #X025B6 "▶")
+    ("mathbin" "\\boxast" #X029C6 "⧆")
+    ("mathbin" "\\boxbar" #X025EB "◫")
+    ("mathbin" "\\boxbox" #X029C8 "⧈")
+    ("mathbin" "\\boxbslash" #X029C5 "⧅")
+    ("mathbin" "\\boxcircle" #X029C7 "⧇")
+    ("mathbin" "\\boxdiag" #X029C4 "⧄")
+    ("mathbin" "\\boxdot" #X022A1 "⊡")
+    ("mathbin" "\\boxminus" #X0229F "⊟")
+    ("mathbin" "\\boxplus" #X0229E "⊞")
+    ("mathbin" "\\boxtimes" #X022A0 "⊠")
+    ("mathbin" "\\btimes" #X02A32 "⨲")
+    ("mathbin" "\\cap" #X02229 "∩")
+    ("mathbin" "\\capbarcup" #X02A49 "⩉")
+    ("mathbin" "\\capdot" #X02A40 "⩀")
+    ("mathbin" "\\capovercup" #X02A47 "⩇")
+    ("mathbin" "\\capwedge" #X02A44 "⩄")
+    ("mathbin" "\\cdot" #X022C5 "⋅")
+    ("mathbin" "\\cdotp" #X000B7 "·")
+    ("mathbin" "\\circledast" #X0229B "⊛")
+    ("mathbin" "\\circledcirc" #X0229A "⊚")
+    ("mathbin" "\\circleddash" #X0229D "⊝")
+    ("mathbin" "\\circledequal" #X0229C "⊜")
+    ("mathbin" "\\circledparallel" #X029B7 "⦷")
+    ("mathbin" "\\circledvert" #X029B6 "⦶")
+    ("mathbin" "\\circlehbar" #X029B5 "⦵")
+    ("mathbin" "\\closedvarcap" #X02A4D "⩍")
+    ("mathbin" "\\closedvarcup" #X02A4C "⩌")
+    ("mathbin" "\\closedvarcupsmashprod" #X02A50 "⩐")
+    ("mathbin" "\\commaminus" #X02A29 "⨩")
+    ("mathbin" "\\concavediamond" #X027E1 "⟡")
+    ("mathbin" "\\concavediamondtickleft" #X027E2 "⟢")
+    ("mathbin" "\\concavediamondtickright" #X027E3 "⟣")
+    ("mathbin" "\\cup" #X0222A "∪")
+    ("mathbin" "\\cupbarcap" #X02A48 "⩈")
+    ("mathbin" "\\cupdot" #X0228D "⊍")
+    ("mathbin" "\\cupleftarrow" #X0228C "⊌")
+    ("mathbin" "\\cupovercap" #X02A46 "⩆")
+    ("mathbin" "\\cupvee" #X02A45 "⩅")
+    ("mathbin" "\\curlyvee" #X022CE "⋎")
+    ("mathbin" "\\curlywedge" #X022CF "⋏")
+    ("mathbin" "\\dagger" #X02020 "†")
+    ("mathbin" "\\ddagger" #X02021 "‡")
+    ("mathbin" "\\div" #X000F7 "÷")
+    ("mathbin" "\\divideontimes" #X022C7 "⋇")
+    ("mathbin" "\\divslash" #X02215 "∕")
+    ("mathbin" "\\dotminus" #X02238 "∸")
+    ("mathbin" "\\dotplus" #X02214 "∔")
+    ("mathbin" "\\dottimes" #X02A30 "⨰")
+    ("mathbin" "\\doublebarvee" #X02A62 "⩢")
+    ("mathbin" "\\doublebarwedge" #X02A5E "⩞")
+    ("mathbin" "\\doubleplus" #X029FA "⧺")
+    ("mathbin" "\\dsol" #X029F6 "⧶")
+    ("mathbin" "\\dsub" #X02A64 "⩤")
+    ("mathbin" "\\eqqplus" #X02A71 "⩱")
+    ("mathbin" "\\fcmp" #X02A3E "⨾")
+    ("mathbin" "\\fracslash" #X02044 "⁄")
+    ("mathbin" "\\hourglass" #X029D6 "⧖")
+    ("mathbin" "\\intercal" #X022BA "⊺")
+    ("mathbin" "\\interleave" #X02AF4 "⫴")
+    ("mathbin" "\\intprod" #X02A3C "⨼")
+    ("mathbin" "\\intprodr" #X02A3D "⨽")
+    ("mathbin" "\\invlazys" #X0223E "∾")
+    ("mathbin" "\\leftthreetimes" #X022CB "⋋")
+    ("mathbin" "\\lozengeminus" #X027E0 "⟠")
+    ("mathbin" "\\ltimes" #X022C9 "⋉")
+    ("mathbin" "\\mdlgblklozenge" #X029EB "⧫")
+    ("mathbin" "\\mdlgwhtcircle" #X025CB "○")
+    ("mathbin" "\\midbarvee" #X02A5D "⩝")
+    ("mathbin" "\\midbarwedge" #X02A5C "⩜")
+    ("mathbin" "\\minus" #X02212 "−")
+    ("mathbin" "\\minusdot" #X02A2A "⨪")
+    ("mathbin" "\\minusfdots" #X02A2B "⨫")
+    ("mathbin" "\\minusrdots" #X02A2C "⨬")
+    ("mathbin" "\\mp" #X02213 "∓")
+    ("mathbin" "\\nhVvert" #X02AF5 "⫵")
+    ("mathbin" "\\obar" #X0233D "⌽")
+    ("mathbin" "\\obslash" #X029B8 "⦸")
+    ("mathbin" "\\odiv" #X02A38 "⨸")
+    ("mathbin" "\\odot" #X02299 "⊙")
+    ("mathbin" "\\ogreaterthan" #X029C1 "⧁")
+    ("mathbin" "\\olessthan" #X029C0 "⧀")
+    ("mathbin" "\\ominus" #X02296 "⊖")
+    ("mathbin" "\\operp" #X029B9 "⦹")
+    ("mathbin" "\\oplus" #X02295 "⊕")
+    ("mathbin" "\\opluslhrim" #X02A2D "⨭")
+    ("mathbin" "\\oplusrhrim" #X02A2E "⨮")
+    ("mathbin" "\\oslash" #X02298 "⊘")
+    ("mathbin" "\\otimes" #X02297 "⊗")
+    ("mathbin" "\\otimeshat" #X02A36 "⨶")
+    ("mathbin" "\\otimeslhrim" #X02A34 "⨴")
+    ("mathbin" "\\otimesrhrim" #X02A35 "⨵")
+    ("mathbin" "\\plus" #X0002B "+")
+    ("mathbin" "\\plusdot" #X02A25 "⨥")
+    ("mathbin" "\\pluseqq" #X02A72 "⩲")
+    ("mathbin" "\\plushat" #X02A23 "⨣")
+    ("mathbin" "\\plussim" #X02A26 "⨦")
+    ("mathbin" "\\plussubtwo" #X02A27 "⨧")
+    ("mathbin" "\\plustrif" #X02A28 "⨨")
+    ("mathbin" "\\pm" #X000B1 "±")
+    ("mathbin" "\\rightthreetimes" #X022CC "⋌")
+    ("mathbin" "\\ringplus" #X02A22 "⨢")
+    ("mathbin" "\\rsolbar" #X029F7 "⧷")
+    ("mathbin" "\\rsub" #X02A65 "⩥")
+    ("mathbin" "\\rtimes" #X022CA "⋊")
+    ("mathbin" "\\setminus" #X029F5 "⧵")
+    ("mathbin" "\\shuffle" #X029E2 "⧢")
+    ("mathbin" "\\simplus" #X02A24 "⨤")
+    ("mathbin" "\\smallblacktriangleleft" #X025C2 "◂")
+    ("mathbin" "\\smallblacktriangleright" #X025B8 "▸")
+    ("mathbin" "\\smallsetminus" #X02216 "∖")
+    ("mathbin" "\\smalltriangleleft" #X025C3 "◃")
+    ("mathbin" "\\smalltriangleright" #X025B9 "▹")
+    ("mathbin" "\\smashtimes" #X02A33 "⨳")
+    ("mathbin" "\\smblkcircle" #X02022 "•")
+    ("mathbin" "\\smwhtdiamond" #X022C4 "⋄")
+    ("mathbin" "\\sqcap" #X02293 "⊓")
+    ("mathbin" "\\sqcup" #X02294 "⊔")
+    ("mathbin" "\\sslash" #X02AFD "⫽")
+    ("mathbin" "\\star" #X022C6 "⋆")
+    ("mathbin" "\\talloblong" #X02AFE "⫾")
+    ("mathbin" "\\threedotcolon" #X02AF6 "⫶")
+    ("mathbin" "\\tieconcat" #X02040 "⁀")
+    ("mathbin" "\\times" #X000D7 "×")
+    ("mathbin" "\\timesbar" #X02A31 "⨱")
+    ("mathbin" "\\tminus" #X029FF "⧿")
+    ("mathbin" "\\tplus" #X029FE "⧾")
+    ("mathbin" "\\triangledown" #X025BF "▿")
+    ("mathbin" "\\triangleleft" #X025C1 "◁")
+    ("mathbin" "\\triangleminus" #X02A3A "⨺")
+    ("mathbin" "\\triangleplus" #X02A39 "⨹")
+    ("mathbin" "\\triangleright" #X025B7 "▷")
+    ("mathbin" "\\triangleserifs" #X029CD "⧍")
+    ("mathbin" "\\triangletimes" #X02A3B "⨻")
+    ("mathbin" "\\tripleplus" #X029FB "⧻")
+    ("mathbin" "\\trslash" #X02AFB "⫻")
+    ("mathbin" "\\twocaps" #X02A4B "⩋")
+    ("mathbin" "\\twocups" #X02A4A "⩊")
+    ("mathbin" "\\typecolon" #X02982 "⦂")
+    ("mathbin" "\\uminus" #X02A41 "⩁")
+    ("mathbin" "\\upand" #X0214B "⅋")
+    ("mathbin" "\\uplus" #X0228E "⊎")
+    ("mathbin" "\\varbarwedge" #X02305 "⌅")
+    ("mathbin" "\\vardoublebarwedge" #X02306 "⌆")
+    ("mathbin" "\\vartriangle" #X025B5 "▵")
+    ("mathbin" "\\varveebar" #X02A61 "⩡")
+    ("mathbin" "\\vectimes" #X02A2F "⨯")
+    ("mathbin" "\\vee" #X02228 "∨")
+    ("mathbin" "\\veebar" #X022BB "⊻")
+    ("mathbin" "\\veedot" #X027C7 "⟇")
+    ("mathbin" "\\veedoublebar" #X02A63 "⩣")
+    ("mathbin" "\\veemidvert" #X02A5B "⩛")
+    ("mathbin" "\\veeodot" #X02A52 "⩒")
+    ("mathbin" "\\veeonvee" #X02A56 "⩖")
+    ("mathbin" "\\vysmblkcircle" #X02219 "∙")
+    ("mathbin" "\\vysmwhtcircle" #X02218 "∘")
+    ("mathbin" "\\wedge" #X02227 "∧")
+    ("mathbin" "\\wedgebar" #X02A5F "⩟")
+    ("mathbin" "\\wedgedot" #X027D1 "⟑")
+    ("mathbin" "\\wedgedoublebar" #X02A60 "⩠")
+    ("mathbin" "\\wedgemidvert" #X02A5A "⩚")
+    ("mathbin" "\\wedgeodot" #X02A51 "⩑")
+    ("mathbin" "\\wedgeonwedge" #X02A55 "⩕")
+    ("mathbin" "\\whitesquaretickleft" #X027E4 "⟤")
+    ("mathbin" "\\whitesquaretickright" #X027E5 "⟥")
+    ("mathbin" "\\wr" #X02240 "≀")
+    ("mathclose" "\\Rbrbrak" #X027ED "⟭")
+    ("mathclose" "\\Rbrbrak" #X03019 "〙")
+    ("mathclose" "\\Rparenless" #X02996 "⦖")
+    ("mathclose" "\\Rvzigzag" #X029DB "⧛")
+    ("mathclose" "\\lrcorner" #X0231F "⌟")
+    ("mathclose" "\\rAngle" #X027EB "⟫")
+    ("mathclose" "\\rBrace" #X02984 "⦄")
+    ("mathclose" "\\rBrack" #X027E7 "⟧")
+    ("mathclose" "\\rParen" #X02986 "⦆")
+    ("mathclose" "\\rangle" #X027E9 "⟩")
+    ("mathclose" "\\rangledot" #X02992 "⦒")
+    ("mathclose" "\\rbag" #X027C6 "⟆")
+    ("mathclose" "\\rblkbrbrak" #X02998 "⦘")
+    ("mathclose" "\\rbrace" #X0007D "}")
+    ("mathclose" "\\rbrack" #X0005D "]")
+    ("mathclose" "\\rbracklrtick" #X0298E "⦎")
+    ("mathclose" "\\rbrackubar" #X0298C "⦌")
+    ("mathclose" "\\rbrackurtick" #X02990 "⦐")
+    ("mathclose" "\\rbrbrak" #X02773 "❳")
+    ("mathclose" "\\rbrbrak" #X03015 "〕")
+    ("mathclose" "\\rceil" #X02309 "⌉")
+    ("mathclose" "\\rcurvyangle" #X029FD "⧽")
+    ("mathclose" "\\rfloor" #X0230B "⌋")
+    ("mathclose" "\\rparen" #X00029 ")")
+    ("mathclose" "\\rparengtr" #X02994 "⦔")
+    ("mathclose" "\\rrangle" #X0298A "⦊")
+    ("mathclose" "\\rrparenthesis" #X02988 "⦈")
+    ("mathclose" "\\rvzigzag" #X029D9 "⧙")
+    ("mathclose" "\\urcorner" #X0231D "⌝")
+    ("mathfence" "\\Vert" #X02016 "‖")
+    ("mathfence" "\\Vvert" #X02980 "⦀")
+    ("mathfence" "\\vert" #X0007C "|")
+    ("mathop" "\\Bbbsum" #X02140 "⅀")
+    ("mathop" "\\Join" #X02A1D "⨝")
+    ("mathop" "\\awint" #X02A11 "⨑")
+    ("mathop" "\\bigbot" #X027D8 "⟘")
+    ("mathop" "\\bigcap" #X022C2 "⋂")
+    ("mathop" "\\bigcup" #X022C3 "⋃")
+    ("mathop" "\\bigcupdot" #X02A03 "⨃")
+    ("mathop" "\\biginterleave" #X02AFC "⫼")
+    ("mathop" "\\bigodot" #X02A00 "⨀")
+    ("mathop" "\\bigoplus" #X02A01 "⨁")
+    ("mathop" "\\bigotimes" #X02A02 "⨂")
+    ("mathop" "\\bigsqcap" #X02A05 "⨅")
+    ("mathop" "\\bigsqcup" #X02A06 "⨆")
+    ("mathop" "\\bigtalloblong" #X02AFF "⫿")
+    ("mathop" "\\bigtimes" #X02A09 "⨉")
+    ("mathop" "\\bigtop" #X027D9 "⟙")
+    ("mathop" "\\bigtriangleleft" #X02A1E "⨞")
+    ("mathop" "\\biguplus" #X02A04 "⨄")
+    ("mathop" "\\bigvee" #X022C1 "⋁")
+    ("mathop" "\\bigwedge" #X022C0 "⋀")
+    ("mathop" "\\cirfnint" #X02A10 "⨐")
+    ("mathop" "\\conjquant" #X02A07 "⨇")
+    ("mathop" "\\coprod" #X02210 "∐")
+    ("mathop" "\\disjquant" #X02A08 "⨈")
+    ("mathop" "\\fint" #X02A0F "⨏")
+    ("mathop" "\\fullouterjoin" #X027D7 "⟗")
+    ("mathop" "\\iiiint" #X02A0C "⨌")
+    ("mathop" "\\iiint" #X0222D "∭")
+    ("mathop" "\\iint" #X0222C "∬")
+    ("mathop" "\\int" #X0222B "∫")
+    ("mathop" "\\intBar" #X02A0E "⨎")
+    ("mathop" "\\intbar" #X02A0D "⨍")
+    ("mathop" "\\intcap" #X02A19 "⨙")
+    ("mathop" "\\intclockwise" #X02231 "∱")
+    ("mathop" "\\intcup" #X02A1A "⨚")
+    ("mathop" "\\intlarhk" #X02A17 "⨗")
+    ("mathop" "\\intx" #X02A18 "⨘")
+    ("mathop" "\\leftouterjoin" #X027D5 "⟕")
+    ("mathop" "\\lowint" #X02A1C "⨜")
+    ("mathop" "\\npolint" #X02A14 "⨔")
+    ("mathop" "\\oiiint" #X02230 "∰")
+    ("mathop" "\\oiint" #X0222F "∯")
+    ("mathop" "\\oint" #X0222E "∮")
+    ("mathop" "\\ointctrclockwise" #X02233 "∳")
+    ("mathop" "\\pointint" #X02A15 "⨕")
+    ("mathop" "\\prod" #X0220F "∏")
+    ("mathop" "\\rightouterjoin" #X027D6 "⟖")
+    ("mathop" "\\rppolint" #X02A12 "⨒")
+    ("mathop" "\\scpolint" #X02A13 "⨓")
+    ("mathop" "\\sqint" #X02A16 "⨖")
+    ("mathop" "\\sum" #X02211 "∑")
+    ("mathop" "\\sumint" #X02A0B "⨋")
+    ("mathop" "\\upint" #X02A1B "⨛")
+    ("mathop" "\\varointclockwise" #X02232 "∲")
+    ("mathop" "\\xbsol" #X029F9 "⧹")
+    ("mathop" "\\xsol" #X029F8 "⧸")
+    ("mathop" "\\zcmp" #X02A1F "⨟")
+    ("mathop" "\\zpipe" #X02A20 "⨠")
+    ("mathop" "\\zproject" #X02A21 "⨡")
+    ("mathopen" "\\Lbrbrak" #X027EC "⟬")
+    ("mathopen" "\\Lbrbrak" #X03018 "〘")
+    ("mathopen" "\\Lparengtr" #X02995 "⦕")
+    ("mathopen" "\\Lvzigzag" #X029DA "⧚")
+    ("mathopen" "\\lAngle" #X027EA "⟪")
+    ("mathopen" "\\lBrace" #X02983 "⦃")
+    ("mathopen" "\\lBrack" #X027E6 "⟦")
+    ("mathopen" "\\lParen" #X02985 "⦅")
+    ("mathopen" "\\langle" #X027E8 "⟨")
+    ("mathopen" "\\langledot" #X02991 "⦑")
+    ("mathopen" "\\lbag" #X027C5 "⟅")
+    ("mathopen" "\\lblkbrbrak" #X02997 "⦗")
+    ("mathopen" "\\lbrace" #X0007B "{")
+    ("mathopen" "\\lbrack" #X0005B "[")
+    ("mathopen" "\\lbracklltick" #X0298F "⦏")
+    ("mathopen" "\\lbrackubar" #X0298B "⦋")
+    ("mathopen" "\\lbrackultick" #X0298D "⦍")
+    ("mathopen" "\\lbrbrak" #X02772 "❲")
+    ("mathopen" "\\lbrbrak" #X03014 "〔")
+    ("mathopen" "\\lceil" #X02308 "⌈")
+    ("mathopen" "\\lcurvyangle" #X029FC "⧼")
+    ("mathopen" "\\lfloor" #X0230A "⌊")
+    ("mathopen" "\\llangle" #X02989 "⦉")
+    ("mathopen" "\\llcorner" #X0231E "⌞")
+    ("mathopen" "\\llparenthesis" #X02987 "⦇")
+    ("mathopen" "\\longdivision" #X027CC "⟌")
+    ("mathopen" "\\lparen" #X00028 "(")
+    ("mathopen" "\\lparenless" #X02993 "⦓")
+    ("mathopen" "\\lvzigzag" #X029D8 "⧘")
+    ("mathopen" "\\ulcorner" #X0231C "⌜")
+    ("mathord" "\\APLboxquestion" #X02370 "⍰")
+    ("mathord" "\\APLboxupcaret" #X02353 "⍓")
+    ("mathord" "\\APLnotbackslash" #X02340 "⍀")
+    ("mathord" "\\Bbbeight" #X1D7E0 "𝟠")
+    ("mathord" "\\Bbbfive" #X1D7DD "𝟝")
+    ("mathord" "\\Bbbfour" #X1D7DC "𝟜")
+    ("mathord" "\\Bbbnine" #X1D7E1 "𝟡")
+    ("mathord" "\\Bbbone" #X1D7D9 "𝟙")
+    ("mathord" "\\Bbbpi" #X0213C "ℼ")
+    ("mathord" "\\Bbbseven" #X1D7DF "𝟟")
+    ("mathord" "\\Bbbsix" #X1D7DE "𝟞")
+    ("mathord" "\\Bbbthree" #X1D7DB "𝟛")
+    ("mathord" "\\Bbbtwo" #X1D7DA "𝟚")
+    ("mathord" "\\Bbbzero" #X1D7D8 "𝟘")
+    ("mathord" "\\Eulerconst" #X02107 "ℇ")
+    ("mathord" "\\Exclam" #X0203C "‼")
+    ("mathord" "\\Finv" #X02132 "Ⅎ")
+    ("mathord" "\\Game" #X02141 "⅁")
+    ("mathord" "\\Hermaphrodite" #X026A5 "⚥")
+    ("mathord" "\\Planckconst" #X0210E "ℎ")
+    ("mathord" "\\PropertyLine" #X0214A "⅊")
+    ("mathord" "\\QED" #X0220E "∎")
+    ("mathord" "\\Question" #X02047 "⁇")
+    ("mathord" "\\Yup" #X02144 "⅄")
+    ("mathord" "\\Zbar" #X001B5 "Ƶ")
+    ("mathord" "\\accurrent" #X023E6 "⏦")
+    ("mathord" "\\acidfree" #X0267E "♾")
+    ("mathord" "\\acwopencirclearrow" #X021BA "↺")
+    ("mathord" "\\ampersand" #X00026 "&")
+    ("mathord" "\\angdnr" #X0299F "⦟")
+    ("mathord" "\\angle" #X02220 "∠")
+    ("mathord" "\\angles" #X0299E "⦞")
+    ("mathord" "\\angleubar" #X029A4 "⦤")
+    ("mathord" "\\astrosun" #X02609 "☉")
+    ("mathord" "\\atsign" #X00040 "@")
+    ("mathord" "\\backdprime" #X02036 "‶")
+    ("mathord" "\\backprime" #X02035 "‵")
+    ("mathord" "\\backslash" #X0005C "\\")
+    ("mathord" "\\backtrprime" #X02037 "‷")
+    ("mathord" "\\barleftarrowrightarrowba" #X021B9 "↹")
+    ("mathord" "\\barovernorthwestarrow" #X021B8 "↸")
+    ("mathord" "\\bbrktbrk" #X023B6 "⎶")
+    ("mathord" "\\bdtriplevdash" #X02506 "┆")
+    ("mathord" "\\because" #X02235 "∵")
+    ("mathord" "\\benzenr" #X023E3 "⏣")
+    ("mathord" "\\bigblacktriangledown" #X025BC "▼")
+    ("mathord" "\\bigblacktriangleup" #X025B2 "▲")
+    ("mathord" "\\bigstar" #X02605 "★")
+    ("mathord" "\\bigwhitestar" #X02606 "☆")
+    ("mathord" "\\blackcircledownarrow" #X029ED "⧭")
+    ("mathord" "\\blackcircledrightdot" #X02688 "⚈")
+    ("mathord" "\\blackcircledtwodots" #X02689 "⚉")
+    ("mathord" "\\blackcircleulquadwhite" #X025D5 "◕")
+    ("mathord" "\\blackdiamonddownarrow" #X029EA "⧪")
+    ("mathord" "\\blackinwhitediamond" #X025C8 "◈")
+    ("mathord" "\\blackinwhitesquare" #X025A3 "▣")
+    ("mathord" "\\blacklefthalfcircle" #X025D6 "◖")
+    ("mathord" "\\blackpointerleft" #X025C4 "◄")
+    ("mathord" "\\blackpointerright" #X025BA "►")
+    ("mathord" "\\blackrighthalfcircle" #X025D7 "◗")
+    ("mathord" "\\blacksmiley" #X0263B "☻")
+    ("mathord" "\\blkhorzoval" #X02B2C "⬬")
+    ("mathord" "\\blkvertoval" #X02B2E "⬮")
+    ("mathord" "\\blockfull" #X02588 "█")
+    ("mathord" "\\blockhalfshaded" #X02592 "▒")
+    ("mathord" "\\blocklefthalf" #X0258C "▌")
+    ("mathord" "\\blocklowhalf" #X02584 "▄")
+    ("mathord" "\\blockqtrshaded" #X02591 "░")
+    ("mathord" "\\blockrighthalf" #X02590 "▐")
+    ("mathord" "\\blockthreeqtrshaded" #X02593 "▓")
+    ("mathord" "\\blockuphalf" #X02580 "▀")
+    ("mathord" "\\bot" #X022A5 "⊥")
+    ("mathord" "\\botsemicircle" #X025E1 "◡")
+    ("mathord" "\\boxonbox" #X029C9 "⧉")
+    ("mathord" "\\bullseye" #X025CE "◎")
+    ("mathord" "\\caretinsert" #X02038 "‸")
+    ("mathord" "\\carriagereturn" #X021B5 "↵")
+    ("mathord" "\\checkmark" #X02713 "✓")
+    ("mathord" "\\cirE" #X029C3 "⧃")
+    ("mathord" "\\circlebottomhalfblack" #X025D2 "◒")
+    ("mathord" "\\circledbullet" #X029BF "⦿")
+    ("mathord" "\\circledownarrow" #X029EC "⧬")
+    ("mathord" "\\circledrightdot" #X02686 "⚆")
+    ("mathord" "\\circledstar" #X0272A "✪")
+    ("mathord" "\\circledtwodots" #X02687 "⚇")
+    ("mathord" "\\circledwhitebullet" #X029BE "⦾")
+    ("mathord" "\\circlelefthalfblack" #X025D0 "◐")
+    ("mathord" "\\circlellquad" #X025F5 "◵")
+    ("mathord" "\\circlelrquad" #X025F6 "◶")
+    ("mathord" "\\circlerighthalfblack" #X025D1 "◑")
+    ("mathord" "\\circletophalfblack" #X025D3 "◓")
+    ("mathord" "\\circleulquad" #X025F4 "◴")
+    ("mathord" "\\circleurquad" #X025F7 "◷")
+    ("mathord" "\\circleurquadblack" #X025D4 "◔")
+    ("mathord" "\\circlevertfill" #X025CD "◍")
+    ("mathord" "\\cirscir" #X029C2 "⧂")
+    ("mathord" "\\clubsuit" #X02663 "♣")
+    ("mathord" "\\complement" #X02201 "∁")
+    ("mathord" "\\conictaper" #X02332 "⌲")
+    ("mathord" "\\cwopencirclearrow" #X021BB "↻")
+    ("mathord" "\\danger" #X02621 "☡")
+    ("mathord" "\\diameter" #X02300 "⌀")
+    ("mathord" "\\diamondbotblack" #X02B19 "⬙")
+    ("mathord" "\\diamondcdot" #X027D0 "⟐")
+    ("mathord" "\\diamondleftblack" #X02B16 "⬖")
+    ("mathord" "\\diamondrightblack" #X02B17 "⬗")
+    ("mathord" "\\diamondsuit" #X02662 "♢")
+    ("mathord" "\\diamondtopblack" #X02B18 "⬘")
+    ("mathord" "\\dicei" #X02680 "⚀")
+    ("mathord" "\\diceii" #X02681 "⚁")
+    ("mathord" "\\diceiii" #X02682 "⚂")
+    ("mathord" "\\diceiv" #X02683 "⚃")
+    ("mathord" "\\dicev" #X02684 "⚄")
+    ("mathord" "\\dicevi" #X02685 "⚅")
+    ("mathord" "\\dingasterisk" #X0273D "✽")
+    ("mathord" "\\dottedcircle" #X025CC "◌")
+    ("mathord" "\\dottedsquare" #X02B1A "⬚")
+    ("mathord" "\\downdasharrow" #X021E3 "⇣")
+    ("mathord" "\\downrightcurvedarrow" #X02935 "⤵")
+    ("mathord" "\\downtriangleleftblack" #X029E8 "⧨")
+    ("mathord" "\\downtrianglerightblack" #X029E9 "⧩")
+    ("mathord" "\\downwhitearrow" #X021E9 "⇩")
+    ("mathord" "\\dprime" #X02033 "″")
+    ("mathord" "\\draftingarrow" #X0279B "➛")
+    ("mathord" "\\eighthnote" #X0266A "♪")
+    ("mathord" "\\elinters" #X023E7 "⏧")
+    ("mathord" "\\emptysetoarr" #X029B3 "⦳")
+    ("mathord" "\\emptysetoarrl" #X029B4 "⦴")
+    ("mathord" "\\emptysetobar" #X029B1 "⦱")
+    ("mathord" "\\emptysetocirc" #X029B2 "⦲")
+    ("mathord" "\\enleadertwodots" #X02025 "‥")
+    ("mathord" "\\errbarblackcircle" #X029F3 "⧳")
+    ("mathord" "\\errbarblackdiamond" #X029F1 "⧱")
+    ("mathord" "\\errbarblacksquare" #X029EF "⧯")
+    ("mathord" "\\errbarcircle" #X029F2 "⧲")
+    ("mathord" "\\errbardiamond" #X029F0 "⧰")
+    ("mathord" "\\errbarsquare" #X029EE "⧮")
+    ("mathord" "\\euro" #X020AC "€")
+    ("mathord" "\\exists" #X02203 "∃")
+    ("mathord" "\\fdiagovnearrow" #X0292F "⤯")
+    ("mathord" "\\fdiagovrdiag" #X0292C "⤬")
+    ("mathord" "\\female" #X02640 "♀")
+    ("mathord" "\\fisheye" #X025C9 "◉")
+    ("mathord" "\\flat" #X0266D "♭")
+    ("mathord" "\\fltns" #X023E5 "⏥")
+    ("mathord" "\\forall" #X02200 "∀")
+    ("mathord" "\\fourvdots" #X02999 "⦙")
+    ("mathord" "\\gtlpar" #X029A0 "⦠")
+    ("mathord" "\\harrowextender" #X023AF "⎯")
+    ("mathord" "\\heartsuit" #X02661 "♡")
+    ("mathord" "\\hermitmatrix" #X022B9 "⊹")
+    ("mathord" "\\hexagon" #X02394 "⎔")
+    ("mathord" "\\hexagonblack" #X02B23 "⬣")
+    ("mathord" "\\horizbar" #X02015 "―")
+    ("mathord" "\\house" #X02302 "⌂")
+    ("mathord" "\\hrectangle" #X025AD "▭")
+    ("mathord" "\\hrectangleblack" #X025AC "▬")
+    ("mathord" "\\hyphenbullet" #X02043 "⁃")
+    ("mathord" "\\hzigzag" #X03030 "〰")
+    ("mathord" "\\iinfin" #X029DC "⧜")
+    ("mathord" "\\increment" #X02206 "∆")
+    ("mathord" "\\infty" #X0221E "∞")
+    ("mathord" "\\intbottom" #X02321 "⌡")
+    ("mathord" "\\intextender" #X023AE "⎮")
+    ("mathord" "\\inttop" #X02320 "⌠")
+    ("mathord" "\\inversebullet" #X025D8 "◘")
+    ("mathord" "\\inversewhitecircle" #X025D9 "◙")
+    ("mathord" "\\invnot" #X02310 "⌐")
+    ("mathord" "\\invwhitelowerhalfcircle" #X025DB "◛")
+    ("mathord" "\\invwhiteupperhalfcircle" #X025DA "◚")
+    ("mathord" "\\laplac" #X029E0 "⧠")
+    ("mathord" "\\lbracelend" #X023A9 "⎩")
+    ("mathord" "\\lbracemid" #X023A8 "⎨")
+    ("mathord" "\\lbraceuend" #X023A7 "⎧")
+    ("mathord" "\\lbrackextender" #X023A2 "⎢")
+    ("mathord" "\\lbracklend" #X023A3 "⎣")
+    ("mathord" "\\lbrackuend" #X023A1 "⎡")
+    ("mathord" "\\leftdasharrow" #X021E0 "⇠")
+    ("mathord" "\\leftmoon" #X0263E "☾")
+    ("mathord" "\\leftwhitearrow" #X021E6 "⇦")
+    ("mathord" "\\lgblkcircle" #X02B24 "⬤")
+    ("mathord" "\\lgblksquare" #X02B1B "⬛")
+    ("mathord" "\\lgwhtcircle" #X025EF "◯")
+    ("mathord" "\\lgwhtsquare" #X02B1C "⬜")
+    ("mathord" "\\linefeed" #X021B4 "↴")
+    ("mathord" "\\llarc" #X025DF "◟")
+    ("mathord" "\\llblacktriangle" #X025E3 "◣")
+    ("mathord" "\\lltriangle" #X025FA "◺")
+    ("mathord" "\\lmoustache" #X023B0 "⎰")
+    ("mathord" "\\lparenextender" #X0239C "⎜")
+    ("mathord" "\\lparenlend" #X0239D "⎝")
+    ("mathord" "\\lparenuend" #X0239B "⎛")
+    ("mathord" "\\lrarc" #X025DE "◞")
+    ("mathord" "\\lrblacktriangle" #X025E2 "◢")
+    ("mathord" "\\lrtriangle" #X025FF "◿")
+    ("mathord" "\\lvboxline" #X023B8 "⎸")
+    ("mathord" "\\male" #X02642 "♂")
+    ("mathord" "\\maltese" #X02720 "✠")
+    ("mathord" "\\mathdollar" #X00024 "$")
+    ("mathord" "\\mathslash" #X0002F "/")
+    ("mathord" "\\mbfitnabla" #X1D735 "𝜵")
+    ("mathord" "\\mbfitpartial" #X1D74F "𝝏")
+    ("mathord" "\\mbfitsansnabla" #X1D7A9 "𝞩")
+    ("mathord" "\\mbfitsanspartial" #X1D7C3 "𝟃")
+    ("mathord" "\\mbfnabla" #X1D6C1 "𝛁")
+    ("mathord" "\\mbfpartial" #X1D6DB "𝛛")
+    ("mathord" "\\mbfsanseight" #X1D7F4 "𝟴")
+    ("mathord" "\\mbfsansfive" #X1D7F1 "𝟱")
+    ("mathord" "\\mbfsansfour" #X1D7F0 "𝟰")
+    ("mathord" "\\mbfsansnabla" #X1D76F "𝝯")
+    ("mathord" "\\mbfsansnine" #X1D7F5 "𝟵")
+    ("mathord" "\\mbfsansone" #X1D7ED "𝟭")
+    ("mathord" "\\mbfsanspartial" #X1D789 "𝞉")
+    ("mathord" "\\mbfsansseven" #X1D7F3 "𝟳")
+    ("mathord" "\\mbfsanssix" #X1D7F2 "𝟲")
+    ("mathord" "\\mbfsansthree" #X1D7EF "𝟯")
+    ("mathord" "\\mbfsanstwo" #X1D7EE "𝟮")
+    ("mathord" "\\mbfsanszero" #X1D7EC "𝟬")
+    ("mathord" "\\mdblkcircle" #X026AB "⚫")
+    ("mathord" "\\mdblkdiamond" #X02B25 "⬥")
+    ("mathord" "\\mdblklozenge" #X02B27 "⬧")
+    ("mathord" "\\mdblksquare" #X025FC "◼")
+    ("mathord" "\\mdlgblkcircle" #X025CF "●")
+    ("mathord" "\\mdlgblkdiamond" #X025C6 "◆")
+    ("mathord" "\\mdlgblksquare" #X025A0 "■")
+    ("mathord" "\\mdlgwhtdiamond" #X025C7 "◇")
+    ("mathord" "\\mdlgwhtlozenge" #X025CA "◊")
+    ("mathord" "\\mdlgwhtsquare" #X025A1 "□")
+    ("mathord" "\\mdsmblkcircle" #X02981 "⦁")
+    ("mathord" "\\mdsmblksquare" #X025FE "◾")
+    ("mathord" "\\mdsmwhtcircle" #X026AC "⚬")
+    ("mathord" "\\mdsmwhtsquare" #X025FD "◽")
+    ("mathord" "\\mdwhtcircle" #X026AA "⚪")
+    ("mathord" "\\mdwhtdiamond" #X02B26 "⬦")
+    ("mathord" "\\mdwhtlozenge" #X02B28 "⬨")
+    ("mathord" "\\mdwhtsquare" #X025FB "◻")
+    ("mathord" "\\measangledltosw" #X029AF "⦯")
+    ("mathord" "\\measangledrtose" #X029AE "⦮")
+    ("mathord" "\\measangleldtosw" #X029AB "⦫")
+    ("mathord" "\\measanglelutonw" #X029A9 "⦩")
+    ("mathord" "\\measanglerdtose" #X029AA "⦪")
+    ("mathord" "\\measanglerutone" #X029A8 "⦨")
+    ("mathord" "\\measangleultonw" #X029AD "⦭")
+    ("mathord" "\\measangleurtone" #X029AC "⦬")
+    ("mathord" "\\measuredangle" #X02221 "∡")
+    ("mathord" "\\measuredangleleft" #X0299B "⦛")
+    ("mathord" "\\measuredrightangle" #X022BE "⊾")
+    ("mathord" "\\medblackstar" #X02B51 "⭑")
+    ("mathord" "\\medwhitestar" #X02B50 "⭐")
+    ("mathord" "\\mho" #X02127 "℧")
+    ("mathord" "\\mitBbbD" #X02145 "ⅅ")
+    ("mathord" "\\mitBbbd" #X02146 "ⅆ")
+    ("mathord" "\\mitBbbe" #X02147 "ⅇ")
+    ("mathord" "\\mitBbbi" #X02148 "ⅈ")
+    ("mathord" "\\mitBbbj" #X02149 "ⅉ")
+    ("mathord" "\\mitnabla" #X1D6FB "𝛻")
+    ("mathord" "\\mitpartial" #X1D715 "𝜕")
+    ("mathord" "\\modtwosum" #X02A0A "⨊")
+    ("mathord" "\\msanseight" #X1D7EA "𝟪")
+    ("mathord" "\\msansfive" #X1D7E7 "𝟧")
+    ("mathord" "\\msansfour" #X1D7E6 "𝟦")
+    ("mathord" "\\msansnine" #X1D7EB "𝟫")
+    ("mathord" "\\msansone" #X1D7E3 "𝟣")
+    ("mathord" "\\msansseven" #X1D7E9 "𝟩")
+    ("mathord" "\\msanssix" #X1D7E8 "𝟨")
+    ("mathord" "\\msansthree" #X1D7E5 "𝟥")
+    ("mathord" "\\msanstwo" #X1D7E4 "𝟤")
+    ("mathord" "\\msanszero" #X1D7E2 "𝟢")
+    ("mathord" "\\mtteight" #X1D7FE "𝟾")
+    ("mathord" "\\mttfive" #X1D7FB "𝟻")
+    ("mathord" "\\mttfour" #X1D7FA "𝟺")
+    ("mathord" "\\mttnine" #X1D7FF "𝟿")
+    ("mathord" "\\mttone" #X1D7F7 "𝟷")
+    ("mathord" "\\mttseven" #X1D7FD "𝟽")
+    ("mathord" "\\mttsix" #X1D7FC "𝟼")
+    ("mathord" "\\mttthree" #X1D7F9 "𝟹")
+    ("mathord" "\\mtttwo" #X1D7F8 "𝟸")
+    ("mathord" "\\mttzero" #X1D7F6 "𝟶")
+    ("mathord" "\\nHdownarrow" #X021DF "⇟")
+    ("mathord" "\\nHuparrow" #X021DE "⇞")
+    ("mathord" "\\nabla" #X02207 "∇")
+    ("mathord" "\\natural" #X0266E "♮")
+    ("mathord" "\\neg" #X000AC "¬")
+    ("mathord" "\\neovnwarrow" #X02931 "⤱")
+    ("mathord" "\\neovsearrow" #X0292E "⤮")
+    ("mathord" "\\neuter" #X026B2 "⚲")
+    ("mathord" "\\nexists" #X02204 "∄")
+    ("mathord" "\\nvinfty" #X029DE "⧞")
+    ("mathord" "\\nwovnearrow" #X02932 "⤲")
+    ("mathord" "\\obot" #X029BA "⦺")
+    ("mathord" "\\obrbrak" #X023E0 "⏠")
+    ("mathord" "\\octothorpe" #X00023 "#")
+    ("mathord" "\\odotslashdot" #X029BC "⦼")
+    ("mathord" "\\olcross" #X029BB "⦻")
+    ("mathord" "\\parallelogram" #X025B1 "▱")
+    ("mathord" "\\parallelogramblack" #X025B0 "▰")
+    ("mathord" "\\partial" #X02202 "∂")
+    ("mathord" "\\pentagon" #X02B20 "⬠")
+    ("mathord" "\\pentagonblack" #X02B1F "⬟")
+    ("mathord" "\\percent" #X00025 "%")
+    ("mathord" "\\perps" #X02AE1 "⫡")
+    ("mathord" "\\postalmark" #X03012 "〒")
+    ("mathord" "\\prime" #X02032 "′")
+    ("mathord" "\\profline" #X02312 "⌒")
+    ("mathord" "\\profsurf" #X02313 "⌓")
+    ("mathord" "\\qprime" #X02057 "⁗")
+    ("mathord" "\\quarternote" #X02669 "♩")
+    ("mathord" "\\question" #X0003F "?")
+    ("mathord" "\\rangledownzigzagarrow" #X0237C "⍼")
+    ("mathord" "\\rbracelend" #X023AD "⎭")
+    ("mathord" "\\rbracemid" #X023AC "⎬")
+    ("mathord" "\\rbraceuend" #X023AB "⎫")
+    ("mathord" "\\rbrackextender" #X023A5 "⎥")
+    ("mathord" "\\rbracklend" #X023A6 "⎦")
+    ("mathord" "\\rbrackuend" #X023A4 "⎤")
+    ("mathord" "\\rdiagovfdiag" #X0292B "⤫")
+    ("mathord" "\\rdiagovsearrow" #X02930 "⤰")
+    ("mathord" "\\revangle" #X029A3 "⦣")
+    ("mathord" "\\revangleubar" #X029A5 "⦥")
+    ("mathord" "\\revemptyset" #X029B0 "⦰")
+    ("mathord" "\\rightangle" #X0221F "∟")
+    ("mathord" "\\rightanglemdot" #X0299D "⦝")
+    ("mathord" "\\rightanglesqr" #X0299C "⦜")
+    ("mathord" "\\rightdasharrow" #X021E2 "⇢")
+    ("mathord" "\\rightmoon" #X0263D "☽")
+    ("mathord" "\\rightpentagon" #X02B54 "⭔")
+    ("mathord" "\\rightpentagonblack" #X02B53 "⭓")
+    ("mathord" "\\rightwhitearrow" #X021E8 "⇨")
+    ("mathord" "\\rmoustache" #X023B1 "⎱")
+    ("mathord" "\\rparenextender" #X0239F "⎟")
+    ("mathord" "\\rparenlend" #X023A0 "⎠")
+    ("mathord" "\\rparenuend" #X0239E "⎞")
+    ("mathord" "\\rvboxline" #X023B9 "⎹")
+    ("mathord" "\\sansLmirrored" #X02143 "⅃")
+    ("mathord" "\\sansLturned" #X02142 "⅂")
+    ("mathord" "\\seovnearrow" #X0292D "⤭")
+    ("mathord" "\\sharp" #X0266F "♯")
+    ("mathord" "\\sinewave" #X0223F "∿")
+    ("mathord" "\\smblkdiamond" #X02B29 "⬩")
+    ("mathord" "\\smblklozenge" #X02B2A "⬪")
+    ("mathord" "\\smblksquare" #X025AA "▪")
+    ("mathord" "\\smwhitestar" #X02B52 "⭒")
+    ("mathord" "\\smwhtcircle" #X025E6 "◦")
+    ("mathord" "\\smwhtlozenge" #X02B2B "⬫")
+    ("mathord" "\\smwhtsquare" #X025AB "▫")
+    ("mathord" "\\spadesuit" #X02660 "♠")
+    ("mathord" "\\sphericalangle" #X02222 "∢")
+    ("mathord" "\\sphericalangleup" #X029A1 "⦡")
+    ("mathord" "\\sqlozenge" #X02311 "⌑")
+    ("mathord" "\\sqrtbottom" #X023B7 "⎷")
+    ("mathord" "\\squarebotblack" #X02B13 "⬓")
+    ("mathord" "\\squarecrossfill" #X025A9 "▩")
+    ("mathord" "\\squarehfill" #X025A4 "▤")
+    ("mathord" "\\squarehvfill" #X025A6 "▦")
+    ("mathord" "\\squareleftblack" #X025E7 "◧")
+    ("mathord" "\\squarellblack" #X02B15 "⬕")
+    ("mathord" "\\squarellquad" #X025F1 "◱")
+    ("mathord" "\\squarelrblack" #X025EA "◪")
+    ("mathord" "\\squarelrquad" #X025F2 "◲")
+    ("mathord" "\\squareneswfill" #X025A8 "▨")
+    ("mathord" "\\squarenwsefill" #X025A7 "▧")
+    ("mathord" "\\squarerightblack" #X025E8 "◨")
+    ("mathord" "\\squaretopblack" #X02B12 "⬒")
+    ("mathord" "\\squareulblack" #X025E9 "◩")
+    ("mathord" "\\squareulquad" #X025F0 "◰")
+    ("mathord" "\\squareurblack" #X02B14 "⬔")
+    ("mathord" "\\squareurquad" #X025F3 "◳")
+    ("mathord" "\\squarevfill" #X025A5 "▥")
+    ("mathord" "\\squoval" #X025A2 "▢")
+    ("mathord" "\\sterling" #X000A3 "£")
+    ("mathord" "\\strns" #X023E4 "⏤")
+    ("mathord" "\\subsetcirc" #X027C3 "⟃")
+    ("mathord" "\\sumbottom" #X023B3 "⎳")
+    ("mathord" "\\sumtop" #X023B2 "⎲")
+    ("mathord" "\\sun" #X0263C "☼")
+    ("mathord" "\\supsetcirc" #X027C4 "⟄")
+    ("mathord" "\\therefore" #X02234 "∴")
+    ("mathord" "\\thermod" #X029E7 "⧧")
+    ("mathord" "\\threedangle" #X027C0 "⟀")
+    ("mathord" "\\tieinfty" #X029DD "⧝")
+    ("mathord" "\\top" #X022A4 "⊤")
+    ("mathord" "\\topbot" #X02336 "⌶")
+    ("mathord" "\\topcir" #X02AF1 "⫱")
+    ("mathord" "\\topsemicircle" #X025E0 "◠")
+    ("mathord" "\\trapezium" #X023E2 "⏢")
+    ("mathord" "\\trianglecdot" #X025EC "◬")
+    ("mathord" "\\triangleleftblack" #X025ED "◭")
+    ("mathord" "\\triangleodot" #X029CA "⧊")
+    ("mathord" "\\trianglerightblack" #X025EE "◮")
+    ("mathord" "\\triangles" #X029CC "⧌")
+    ("mathord" "\\triangleubar" #X029CB "⧋")
+    ("mathord" "\\trprime" #X02034 "‴")
+    ("mathord" "\\turnangle" #X029A2 "⦢")
+    ("mathord" "\\turnednot" #X02319 "⌙")
+    ("mathord" "\\twolowline" #X02017 "‗")
+    ("mathord" "\\twonotes" #X0266B "♫")
+    ("mathord" "\\ubrbrak" #X023E1 "⏡")
+    ("mathord" "\\ularc" #X025DC "◜")
+    ("mathord" "\\ulblacktriangle" #X025E4 "◤")
+    ("mathord" "\\ultriangle" #X025F8 "◸")
+    ("mathord" "\\unicodecdots" #X022EF "⋯")
+    ("mathord" "\\unicodeellipsis" #X02026 "…")
+    ("mathord" "\\uparrowoncircle" #X029BD "⦽")
+    ("mathord" "\\upbackepsilon" #X003F6 "϶")
+    ("mathord" "\\updasharrow" #X021E1 "⇡")
+    ("mathord" "\\updownarrowbar" #X021A8 "↨")
+    ("mathord" "\\upoldKoppa" #X003D8 "Ϙ")
+    ("mathord" "\\upoldkoppa" #X003D9 "ϙ")
+    ("mathord" "\\uprightcurvearrow" #X02934 "⤴")
+    ("mathord" "\\upwhitearrow" #X021E7 "⇧")
+    ("mathord" "\\urarc" #X025DD "◝")
+    ("mathord" "\\urblacktriangle" #X025E5 "◥")
+    ("mathord" "\\urtriangle" #X025F9 "◹")
+    ("mathord" "\\varcarriagereturn" #X023CE "⏎")
+    ("mathord" "\\varclubsuit" #X02667 "♧")
+    ("mathord" "\\vardiamondsuit" #X02666 "♦")
+    ("mathord" "\\varheartsuit" #X02665 "♥")
+    ("mathord" "\\varhexagon" #X02B21 "⬡")
+    ("mathord" "\\varhexagonblack" #X02B22 "⬢")
+    ("mathord" "\\varhexagonlrbonds" #X0232C "⌬")
+    ("mathord" "\\varlrtriangle" #X022BF "⊿")
+    ("mathord" "\\varnothing" #X02205 "∅")
+    ("mathord" "\\varspadesuit" #X02664 "♤")
+    ("mathord" "\\varstar" #X02736 "✶")
+    ("mathord" "\\vbraceextender" #X023AA "⎪")
+    ("mathord" "\\viewdata" #X02317 "⌗")
+    ("mathord" "\\vrectangle" #X025AF "▯")
+    ("mathord" "\\vrectangleblack" #X025AE "▮")
+    ("mathord" "\\vysmblksquare" #X02B1D "⬝")
+    ("mathord" "\\vysmwhtsquare" #X02B1E "⬞")
+    ("mathord" "\\vzigzag" #X0299A "⦚")
+    ("mathord" "\\whitearrowupfrombar" #X021EA "⇪")
+    ("mathord" "\\whiteinwhitetriangle" #X027C1 "⟁")
+    ("mathord" "\\whitepointerleft" #X025C5 "◅")
+    ("mathord" "\\whitepointerright" #X025BB "▻")
+    ("mathord" "\\whthorzoval" #X02B2D "⬭")
+    ("mathord" "\\whtvertoval" #X02B2F "⬯")
+    ("mathord" "\\wideangledown" #X029A6 "⦦")
+    ("mathord" "\\wideangleup" #X029A7 "⦧")
+    ("mathord" "\\yen" #X000A5 "¥")
+    ("mathover" "\\overbrace" #X023DE "⏞")
+    ("mathover" "\\overbracket" #X023B4 "⎴")
+    ("mathover" "\\overparen" #X023DC "⏜")
+    ("mathpunct" "\\comma" #X0002C ",")
+    ("mathpunct" "\\exclam" #X00021 "!")
+    ("mathpunct" "\\mathcolon" #X0003A ":")
+    ("mathpunct" "\\semicolon" #X0003B ";")
+    ("mathradical" "\\cuberoot" #X0221B "∛")
+    ("mathradical" "\\fourthroot" #X0221C "∜")
+    ("mathradical" "\\sqrt" #X0221A "√")
+    ("mathrel" "\\APLnotslash" #X0233F "⌿")
+    ("mathrel" "\\Barv" #X02AE7 "⫧")
+    ("mathrel" "\\Bumpeq" #X0224E "≎")
+    ("mathrel" "\\Colon" #X02237 "∷")
+    ("mathrel" "\\Coloneq" #X02A74 "⩴")
+    ("mathrel" "\\DDownarrow" #X027F1 "⟱")
+    ("mathrel" "\\DashV" #X02AE5 "⫥")
+    ("mathrel" "\\DashVDash" #X027DA "⟚")
+    ("mathrel" "\\Dashv" #X02AE4 "⫤")
+    ("mathrel" "\\Ddownarrow" #X0290B "⤋")
+    ("mathrel" "\\Doteq" #X02251 "≑")
+    ("mathrel" "\\Downarrow" #X021D3 "⇓")
+    ("mathrel" "\\Equiv" #X02263 "≣")
+    ("mathrel" "\\Gt" #X02AA2 "⪢")
+    ("mathrel" "\\LLeftarrow" #X02B45 "⭅")
+    ("mathrel" "\\Ldsh" #X021B2 "↲")
+    ("mathrel" "\\Leftarrow" #X021D0 "⇐")
+    ("mathrel" "\\Leftrightarrow" #X021D4 "⇔")
+    ("mathrel" "\\Lleftarrow" #X021DA "⇚")
+    ("mathrel" "\\Longleftarrow" #X027F8 "⟸")
+    ("mathrel" "\\Longleftrightarrow" #X027FA "⟺")
+    ("mathrel" "\\Longmapsfrom" #X027FD "⟽")
+    ("mathrel" "\\Longmapsto" #X027FE "⟾")
+    ("mathrel" "\\Longrightarrow" #X027F9 "⟹")
+    ("mathrel" "\\Lsh" #X021B0 "↰")
+    ("mathrel" "\\Lt" #X02AA1 "⪡")
+    ("mathrel" "\\Mapsfrom" #X02906 "⤆")
+    ("mathrel" "\\Mapsto" #X02907 "⤇")
+    ("mathrel" "\\Nearrow" #X021D7 "⇗")
+    ("mathrel" "\\Not" #X02AEC "⫬")
+    ("mathrel" "\\Nwarrow" #X021D6 "⇖")
+    ("mathrel" "\\Prec" #X02ABB "⪻")
+    ("mathrel" "\\RRightarrow" #X02B46 "⭆")
+    ("mathrel" "\\Rdsh" #X021B3 "↳")
+    ("mathrel" "\\Rightarrow" #X021D2 "⇒")
+    ("mathrel" "\\Rrightarrow" #X021DB "⇛")
+    ("mathrel" "\\Rsh" #X021B1 "↱")
+    ("mathrel" "\\Searrow" #X021D8 "⇘")
+    ("mathrel" "\\Subset" #X022D0 "⋐")
+    ("mathrel" "\\Succ" #X02ABC "⪼")
+    ("mathrel" "\\Supset" #X022D1 "⋑")
+    ("mathrel" "\\Swarrow" #X021D9 "⇙")
+    ("mathrel" "\\UUparrow" #X027F0 "⟰")
+    ("mathrel" "\\Uparrow" #X021D1 "⇑")
+    ("mathrel" "\\Updownarrow" #X021D5 "⇕")
+    ("mathrel" "\\Uuparrow" #X0290A "⤊")
+    ("mathrel" "\\VDash" #X022AB "⊫")
+    ("mathrel" "\\Vbar" #X02AEB "⫫")
+    ("mathrel" "\\Vdash" #X022A9 "⊩")
+    ("mathrel" "\\Vvdash" #X022AA "⊪")
+    ("mathrel" "\\acwcirclearrow" #X02940 "⥀")
+    ("mathrel" "\\acwgapcirclearrow" #X027F2 "⟲")
+    ("mathrel" "\\acwleftarcarrow" #X02939 "⤹")
+    ("mathrel" "\\acwoverarcarrow" #X0293A "⤺")
+    ("mathrel" "\\acwunderarcarrow" #X0293B "⤻")
+    ("mathrel" "\\adots" #X022F0 "⋰")
+    ("mathrel" "\\approx" #X02248 "≈")
+    ("mathrel" "\\approxeq" #X0224A "≊")
+    ("mathrel" "\\approxeqq" #X02A70 "⩰")
+    ("mathrel" "\\approxident" #X0224B "≋")
+    ("mathrel" "\\arceq" #X02258 "≘")
+    ("mathrel" "\\assert" #X022A6 "⊦")
+    ("mathrel" "\\asteq" #X02A6E "⩮")
+    ("mathrel" "\\asymp" #X0224D "≍")
+    ("mathrel" "\\bNot" #X02AED "⫭")
+    ("mathrel" "\\backcong" #X0224C "≌")
+    ("mathrel" "\\backsim" #X0223D "∽")
+    ("mathrel" "\\backsimeq" #X022CD "⋍")
+    ("mathrel" "\\bagmember" #X022FF "⋿")
+    ("mathrel" "\\barV" #X02AEA "⫪")
+    ("mathrel" "\\bardownharpoonleft" #X02961 "⥡")
+    ("mathrel" "\\bardownharpoonright" #X0295D "⥝")
+    ("mathrel" "\\barleftarrow" #X021E4 "⇤")
+    ("mathrel" "\\barleftharpoondown" #X02956 "⥖")
+    ("mathrel" "\\barleftharpoonup" #X02952 "⥒")
+    ("mathrel" "\\barrightarrowdiamond" #X02920 "⤠")
+    ("mathrel" "\\barrightharpoondown" #X0295F "⥟")
+    ("mathrel" "\\barrightharpoonup" #X0295B "⥛")
+    ("mathrel" "\\baruparrow" #X02912 "⤒")
+    ("mathrel" "\\barupharpoonleft" #X02958 "⥘")
+    ("mathrel" "\\barupharpoonright" #X02954 "⥔")
+    ("mathrel" "\\between" #X0226C "≬")
+    ("mathrel" "\\bowtie" #X022C8 "⋈")
+    ("mathrel" "\\bsimilarleftarrow" #X02B41 "⭁")
+    ("mathrel" "\\bsimilarrightarrow" #X02B47 "⭇")
+    ("mathrel" "\\bsolhsub" #X027C8 "⟈")
+    ("mathrel" "\\bumpeq" #X0224F "≏")
+    ("mathrel" "\\bumpeqq" #X02AAE "⪮")
+    ("mathrel" "\\ccwundercurvearrow" #X0293F "⤿")
+    ("mathrel" "\\cirbot" #X027DF "⟟")
+    ("mathrel" "\\circeq" #X02257 "≗")
+    ("mathrel" "\\circleonleftarrow" #X02B30 "⬰")
+    ("mathrel" "\\circleonrightarrow" #X021F4 "⇴")
+    ("mathrel" "\\cirmid" #X02AEF "⫯")
+    ("mathrel" "\\closure" #X02050 "⁐")
+    ("mathrel" "\\coloneq" #X02254 "≔")
+    ("mathrel" "\\cong" #X02245 "≅")
+    ("mathrel" "\\congdot" #X02A6D "⩭")
+    ("mathrel" "\\csub" #X02ACF "⫏")
+    ("mathrel" "\\csube" #X02AD1 "⫑")
+    ("mathrel" "\\csup" #X02AD0 "⫐")
+    ("mathrel" "\\csupe" #X02AD2 "⫒")
+    ("mathrel" "\\curlyeqprec" #X022DE "⋞")
+    ("mathrel" "\\curlyeqsucc" #X022DF "⋟")
+    ("mathrel" "\\curvearrowleft" #X021B6 "↶")
+    ("mathrel" "\\curvearrowleftplus" #X0293D "⤽")
+    ("mathrel" "\\curvearrowright" #X021B7 "↷")
+    ("mathrel" "\\curvearrowrightminus" #X0293C "⤼")
+    ("mathrel" "\\cwcirclearrow" #X02941 "⥁")
+    ("mathrel" "\\cwgapcirclearrow" #X027F3 "⟳")
+    ("mathrel" "\\cwrightarcarrow" #X02938 "⤸")
+    ("mathrel" "\\cwundercurvearrow" #X0293E "⤾")
+    ("mathrel" "\\dashV" #X02AE3 "⫣")
+    ("mathrel" "\\dashVdash" #X027DB "⟛")
+    ("mathrel" "\\dashcolon" #X02239 "∹")
+    ("mathrel" "\\dashleftharpoondown" #X0296B "⥫")
+    ("mathrel" "\\dashrightharpoondown" #X0296D "⥭")
+    ("mathrel" "\\dashv" #X022A3 "⊣")
+    ("mathrel" "\\dbkarow" #X0290F "⤏")
+    ("mathrel" "\\ddots" #X022F1 "⋱")
+    ("mathrel" "\\ddotseq" #X02A77 "⩷")
+    ("mathrel" "\\diamondleftarrow" #X0291D "⤝")
+    ("mathrel" "\\diamondleftarrowbar" #X0291F "⤟")
+    ("mathrel" "\\disin" #X022F2 "⋲")
+    ("mathrel" "\\doteq" #X02250 "≐")
+    ("mathrel" "\\dotequiv" #X02A67 "⩧")
+    ("mathrel" "\\dotsim" #X02A6A "⩪")
+    ("mathrel" "\\dotsminusdots" #X0223A "∺")
+    ("mathrel" "\\downarrow" #X02193 "↓")
+    ("mathrel" "\\downarrowbar" #X02913 "⤓")
+    ("mathrel" "\\downarrowbarred" #X02908 "⤈")
+    ("mathrel" "\\downdownarrows" #X021CA "⇊")
+    ("mathrel" "\\downfishtail" #X0297F "⥿")
+    ("mathrel" "\\downharpoonleft" #X021C3 "⇃")
+    ("mathrel" "\\downharpoonleftbar" #X02959 "⥙")
+    ("mathrel" "\\downharpoonright" #X021C2 "⇂")
+    ("mathrel" "\\downharpoonrightbar" #X02955 "⥕")
+    ("mathrel" "\\downharpoonsleftright" #X02965 "⥥")
+    ("mathrel" "\\downuparrows" #X021F5 "⇵")
+    ("mathrel" "\\downupharpoonsleftright" #X0296F "⥯")
+    ("mathrel" "\\downzigzagarrow" #X021AF "↯")
+    ("mathrel" "\\drbkarow" #X02910 "⤐")
+    ("mathrel" "\\dualmap" #X029DF "⧟")
+    ("mathrel" "\\egsdot" #X02A98 "⪘")
+    ("mathrel" "\\elsdot" #X02A97 "⪗")
+    ("mathrel" "\\eparsl" #X029E3 "⧣")
+    ("mathrel" "\\eqcirc" #X02256 "≖")
+    ("mathrel" "\\eqcolon" #X02255 "≕")
+    ("mathrel" "\\eqdef" #X0225D "≝")
+    ("mathrel" "\\eqdot" #X02A66 "⩦")
+    ("mathrel" "\\eqeq" #X02A75 "⩵")
+    ("mathrel" "\\eqeqeq" #X02A76 "⩶")
+    ("mathrel" "\\eqgtr" #X022DD "⋝")
+    ("mathrel" "\\eqless" #X022DC "⋜")
+    ("mathrel" "\\eqqgtr" #X02A9A "⪚")
+    ("mathrel" "\\eqqless" #X02A99 "⪙")
+    ("mathrel" "\\eqqsim" #X02A73 "⩳")
+    ("mathrel" "\\eqqslantgtr" #X02A9C "⪜")
+    ("mathrel" "\\eqqslantless" #X02A9B "⪛")
+    ("mathrel" "\\eqsim" #X02242 "≂")
+    ("mathrel" "\\eqslantgtr" #X02A96 "⪖")
+    ("mathrel" "\\eqslantless" #X02A95 "⪕")
+    ("mathrel" "\\equal" #X0003D "=")
+    ("mathrel" "\\equalleftarrow" #X02B40 "⭀")
+    ("mathrel" "\\equalparallel" #X022D5 "⋕")
+    ("mathrel" "\\equalrightarrow" #X02971 "⥱")
+    ("mathrel" "\\equiv" #X02261 "≡")
+    ("mathrel" "\\equivDD" #X02A78 "⩸")
+    ("mathrel" "\\equivVert" #X02A68 "⩨")
+    ("mathrel" "\\equivVvert" #X02A69 "⩩")
+    ("mathrel" "\\eqvparsl" #X029E5 "⧥")
+    ("mathrel" "\\fallingdotseq" #X02252 "≒")
+    ("mathrel" "\\fbowtie" #X029D3 "⧓")
+    ("mathrel" "\\forks" #X02ADC "⫝̸")
+    ("mathrel" "\\forksnot" #X02ADD "⫝")
+    ("mathrel" "\\forkv" #X02AD9 "⫙")
+    ("mathrel" "\\frown" #X02322 "⌢")
+    ("mathrel" "\\geq" #X02265 "≥")
+    ("mathrel" "\\geqq" #X02267 "≧")
+    ("mathrel" "\\geqqslant" #X02AFA "⫺")
+    ("mathrel" "\\geqslant" #X02A7E "⩾")
+    ("mathrel" "\\gescc" #X02AA9 "⪩")
+    ("mathrel" "\\gesdot" #X02A80 "⪀")
+    ("mathrel" "\\gesdoto" #X02A82 "⪂")
+    ("mathrel" "\\gesdotol" #X02A84 "⪄")
+    ("mathrel" "\\gesles" #X02A94 "⪔")
+    ("mathrel" "\\gg" #X0226B "≫")
+    ("mathrel" "\\ggg" #X022D9 "⋙")
+    ("mathrel" "\\gggnest" #X02AF8 "⫸")
+    ("mathrel" "\\glE" #X02A92 "⪒")
+    ("mathrel" "\\gla" #X02AA5 "⪥")
+    ("mathrel" "\\gleichstark" #X029E6 "⧦")
+    ("mathrel" "\\glj" #X02AA4 "⪤")
+    ("mathrel" "\\gnapprox" #X02A8A "⪊")
+    ("mathrel" "\\gneq" #X02A88 "⪈")
+    ("mathrel" "\\gneqq" #X02269 "≩")
+    ("mathrel" "\\gnsim" #X022E7 "⋧")
+    ("mathrel" "\\greater" #X0003E ">")
+    ("mathrel" "\\gsime" #X02A8E "⪎")
+    ("mathrel" "\\gsiml" #X02A90 "⪐")
+    ("mathrel" "\\gtcc" #X02AA7 "⪧")
+    ("mathrel" "\\gtcir" #X02A7A "⩺")
+    ("mathrel" "\\gtquest" #X02A7C "⩼")
+    ("mathrel" "\\gtrapprox" #X02A86 "⪆")
+    ("mathrel" "\\gtrarr" #X02978 "⥸")
+    ("mathrel" "\\gtrdot" #X022D7 "⋗")
+    ("mathrel" "\\gtreqless" #X022DB "⋛")
+    ("mathrel" "\\gtreqqless" #X02A8C "⪌")
+    ("mathrel" "\\gtrless" #X02277 "≷")
+    ("mathrel" "\\gtrsim" #X02273 "≳")
+    ("mathrel" "\\hatapprox" #X02A6F "⩯")
+    ("mathrel" "\\hknearrow" #X02924 "⤤")
+    ("mathrel" "\\hknwarrow" #X02923 "⤣")
+    ("mathrel" "\\hksearow" #X02925 "⤥")
+    ("mathrel" "\\hkswarow" #X02926 "⤦")
+    ("mathrel" "\\hookleftarrow" #X021A9 "↩")
+    ("mathrel" "\\hookrightarrow" #X021AA "↪")
+    ("mathrel" "\\imageof" #X022B7 "⊷")
+    ("mathrel" "\\in" #X02208 "∈")
+    ("mathrel" "\\isinE" #X022F9 "⋹")
+    ("mathrel" "\\isindot" #X022F5 "⋵")
+    ("mathrel" "\\isinobar" #X022F7 "⋷")
+    ("mathrel" "\\isins" #X022F4 "⋴")
+    ("mathrel" "\\isinvb" #X022F8 "⋸")
+    ("mathrel" "\\kernelcontraction" #X0223B "∻")
+    ("mathrel" "\\lat" #X02AAB "⪫")
+    ("mathrel" "\\late" #X02AAD "⪭")
+    ("mathrel" "\\leftarrow" #X02190 "←")
+    ("mathrel" "\\leftarrowapprox" #X02B4A "⭊")
+    ("mathrel" "\\leftarrowbackapprox" #X02B42 "⭂")
+    ("mathrel" "\\leftarrowbsimilar" #X02B4B "⭋")
+    ("mathrel" "\\leftarrowless" #X02977 "⥷")
+    ("mathrel" "\\leftarrowonoplus" #X02B32 "⬲")
+    ("mathrel" "\\leftarrowplus" #X02946 "⥆")
+    ("mathrel" "\\leftarrowshortrightarrow" #X02943 "⥃")
+    ("mathrel" "\\leftarrowsimilar" #X02973 "⥳")
+    ("mathrel" "\\leftarrowsubset" #X0297A "⥺")
+    ("mathrel" "\\leftarrowtail" #X021A2 "↢")
+    ("mathrel" "\\leftarrowtriangle" #X021FD "⇽")
+    ("mathrel" "\\leftarrowx" #X02B3E "⬾")
+    ("mathrel" "\\leftbkarrow" #X0290C "⤌")
+    ("mathrel" "\\leftcurvedarrow" #X02B3F "⬿")
+    ("mathrel" "\\leftdbkarrow" #X0290E "⤎")
+    ("mathrel" "\\leftdbltail" #X0291B "⤛")
+    ("mathrel" "\\leftdotarrow" #X02B38 "⬸")
+    ("mathrel" "\\leftdowncurvedarrow" #X02936 "⤶")
+    ("mathrel" "\\leftfishtail" #X0297C "⥼")
+    ("mathrel" "\\leftharpoondown" #X021BD "↽")
+    ("mathrel" "\\leftharpoondownbar" #X0295E "⥞")
+    ("mathrel" "\\leftharpoonsupdown" #X02962 "⥢")
+    ("mathrel" "\\leftharpoonup" #X021BC "↼")
+    ("mathrel" "\\leftharpoonupbar" #X0295A "⥚")
+    ("mathrel" "\\leftharpoonupdash" #X0296A "⥪")
+    ("mathrel" "\\leftleftarrows" #X021C7 "⇇")
+    ("mathrel" "\\leftrightarrow" #X02194 "↔")
+    ("mathrel" "\\leftrightarrowcircle" #X02948 "⥈")
+    ("mathrel" "\\leftrightarrows" #X021C6 "⇆")
+    ("mathrel" "\\leftrightarrowtriangle" #X021FF "⇿")
+    ("mathrel" "\\leftrightharpoondowndown" #X02950 "⥐")
+    ("mathrel" "\\leftrightharpoondownup" #X0294B "⥋")
+    ("mathrel" "\\leftrightharpoons" #X021CB "⇋")
+    ("mathrel" "\\leftrightharpoonsdown" #X02967 "⥧")
+    ("mathrel" "\\leftrightharpoonsup" #X02966 "⥦")
+    ("mathrel" "\\leftrightharpoonupdown" #X0294A "⥊")
+    ("mathrel" "\\leftrightharpoonupup" #X0294E "⥎")
+    ("mathrel" "\\leftrightsquigarrow" #X021AD "↭")
+    ("mathrel" "\\leftsquigarrow" #X021DC "⇜")
+    ("mathrel" "\\lefttail" #X02919 "⤙")
+    ("mathrel" "\\leftthreearrows" #X02B31 "⬱")
+    ("mathrel" "\\leftwavearrow" #X0219C "↜")
+    ("mathrel" "\\leq" #X02264 "≤")
+    ("mathrel" "\\leqq" #X02266 "≦")
+    ("mathrel" "\\leqqslant" #X02AF9 "⫹")
+    ("mathrel" "\\leqslant" #X02A7D "⩽")
+    ("mathrel" "\\lescc" #X02AA8 "⪨")
+    ("mathrel" "\\lesdot" #X02A7F "⩿")
+    ("mathrel" "\\lesdoto" #X02A81 "⪁")
+    ("mathrel" "\\lesdotor" #X02A83 "⪃")
+    ("mathrel" "\\lesges" #X02A93 "⪓")
+    ("mathrel" "\\less" #X0003C "<")
+    ("mathrel" "\\lessapprox" #X02A85 "⪅")
+    ("mathrel" "\\lessdot" #X022D6 "⋖")
+    ("mathrel" "\\lesseqgtr" #X022DA "⋚")
+    ("mathrel" "\\lesseqqgtr" #X02A8B "⪋")
+    ("mathrel" "\\lessgtr" #X02276 "≶")
+    ("mathrel" "\\lesssim" #X02272 "≲")
+    ("mathrel" "\\lfbowtie" #X029D1 "⧑")
+    ("mathrel" "\\lftimes" #X029D4 "⧔")
+    ("mathrel" "\\lgE" #X02A91 "⪑")
+    ("mathrel" "\\ll" #X0226A "≪")
+    ("mathrel" "\\lll" #X022D8 "⋘")
+    ("mathrel" "\\lllnest" #X02AF7 "⫷")
+    ("mathrel" "\\lnapprox" #X02A89 "⪉")
+    ("mathrel" "\\lneq" #X02A87 "⪇")
+    ("mathrel" "\\lneqq" #X02268 "≨")
+    ("mathrel" "\\lnsim" #X022E6 "⋦")
+    ("mathrel" "\\longdashv" #X027DE "⟞")
+    ("mathrel" "\\longleftarrow" #X027F5 "⟵")
+    ("mathrel" "\\longleftrightarrow" #X027F7 "⟷")
+    ("mathrel" "\\longleftsquigarrow" #X02B33 "⬳")
+    ("mathrel" "\\longmapsfrom" #X027FB "⟻")
+    ("mathrel" "\\longmapsto" #X027FC "⟼")
+    ("mathrel" "\\longrightarrow" #X027F6 "⟶")
+    ("mathrel" "\\longrightsquigarrow" #X027FF "⟿")
+    ("mathrel" "\\looparrowleft" #X021AB "↫")
+    ("mathrel" "\\looparrowright" #X021AC "↬")
+    ("mathrel" "\\lrtriangleeq" #X029E1 "⧡")
+    ("mathrel" "\\lsime" #X02A8D "⪍")
+    ("mathrel" "\\lsimg" #X02A8F "⪏")
+    ("mathrel" "\\lsqhook" #X02ACD "⫍")
+    ("mathrel" "\\ltcc" #X02AA6 "⪦")
+    ("mathrel" "\\ltcir" #X02A79 "⩹")
+    ("mathrel" "\\ltlarr" #X02976 "⥶")
+    ("mathrel" "\\ltquest" #X02A7B "⩻")
+    ("mathrel" "\\ltrivb" #X029CF "⧏")
+    ("mathrel" "\\mapsdown" #X021A7 "↧")
+    ("mathrel" "\\mapsfrom" #X021A4 "↤")
+    ("mathrel" "\\mapsto" #X021A6 "↦")
+    ("mathrel" "\\mapsup" #X021A5 "↥")
+    ("mathrel" "\\mathratio" #X02236 "∶")
+    ("mathrel" "\\measeq" #X0225E "≞")
+    ("mathrel" "\\mid" #X02223 "∣")
+    ("mathrel" "\\midcir" #X02AF0 "⫰")
+    ("mathrel" "\\mlcp" #X02ADB "⫛")
+    ("mathrel" "\\models" #X022A7 "⊧")
+    ("mathrel" "\\multimap" #X022B8 "⊸")
+    ("mathrel" "\\multimapinv" #X027DC "⟜")
+    ("mathrel" "\\nLeftarrow" #X021CD "⇍")
+    ("mathrel" "\\nLeftrightarrow" #X021CE "⇎")
+    ("mathrel" "\\nRightarrow" #X021CF "⇏")
+    ("mathrel" "\\nVDash" #X022AF "⊯")
+    ("mathrel" "\\nVdash" #X022AE "⊮")
+    ("mathrel" "\\nVleftarrow" #X021FA "⇺")
+    ("mathrel" "\\nVleftarrowtail" #X02B3A "⬺")
+    ("mathrel" "\\nVleftrightarrow" #X021FC "⇼")
+    ("mathrel" "\\nVrightarrow" #X021FB "⇻")
+    ("mathrel" "\\nVrightarrowtail" #X02915 "⤕")
+    ("mathrel" "\\nVtwoheadleftarrow" #X02B35 "⬵")
+    ("mathrel" "\\nVtwoheadleftarrowtail" #X02B3D "⬽")
+    ("mathrel" "\\nVtwoheadrightarrow" #X02901 "⤁")
+    ("mathrel" "\\nVtwoheadrightarrowtail" #X02918 "⤘")
+    ("mathrel" "\\napprox" #X02249 "≉")
+    ("mathrel" "\\nasymp" #X0226D "≭")
+    ("mathrel" "\\ncong" #X02247 "≇")
+    ("mathrel" "\\ne" #X02260 "≠")
+    ("mathrel" "\\nearrow" #X02197 "↗")
+    ("mathrel" "\\nequiv" #X02262 "≢")
+    ("mathrel" "\\neswarrow" #X02922 "⤢")
+    ("mathrel" "\\ngeq" #X02271 "≱")
+    ("mathrel" "\\ngtr" #X0226F "≯")
+    ("mathrel" "\\ngtrless" #X02279 "≹")
+    ("mathrel" "\\ngtrsim" #X02275 "≵")
+    ("mathrel" "\\nhpar" #X02AF2 "⫲")
+    ("mathrel" "\\ni" #X0220B "∋")
+    ("mathrel" "\\niobar" #X022FE "⋾")
+    ("mathrel" "\\nis" #X022FC "⋼")
+    ("mathrel" "\\nisd" #X022FA "⋺")
+    ("mathrel" "\\nleftarrow" #X0219A "↚")
+    ("mathrel" "\\nleftrightarrow" #X021AE "↮")
+    ("mathrel" "\\nleq" #X02270 "≰")
+    ("mathrel" "\\nless" #X0226E "≮")
+    ("mathrel" "\\nlessgtr" #X02278 "≸")
+    ("mathrel" "\\nlesssim" #X02274 "≴")
+    ("mathrel" "\\nmid" #X02224 "∤")
+    ("mathrel" "\\nni" #X0220C "∌")
+    ("mathrel" "\\notin" #X02209 "∉")
+    ("mathrel" "\\nparallel" #X02226 "∦")
+    ("mathrel" "\\nprec" #X02280 "⊀")
+    ("mathrel" "\\npreccurlyeq" #X022E0 "⋠")
+    ("mathrel" "\\nrightarrow" #X0219B "↛")
+    ("mathrel" "\\nsim" #X02241 "≁")
+    ("mathrel" "\\nsime" #X02244 "≄")
+    ("mathrel" "\\nsqsubseteq" #X022E2 "⋢")
+    ("mathrel" "\\nsqsupseteq" #X022E3 "⋣")
+    ("mathrel" "\\nsubset" #X02284 "⊄")
+    ("mathrel" "\\nsubseteq" #X02288 "⊈")
+    ("mathrel" "\\nsucc" #X02281 "⊁")
+    ("mathrel" "\\nsucccurlyeq" #X022E1 "⋡")
+    ("mathrel" "\\nsupset" #X02285 "⊅")
+    ("mathrel" "\\nsupseteq" #X02289 "⊉")
+    ("mathrel" "\\ntriangleleft" #X022EA "⋪")
+    ("mathrel" "\\ntrianglelefteq" #X022EC "⋬")
+    ("mathrel" "\\ntriangleright" #X022EB "⋫")
+    ("mathrel" "\\ntrianglerighteq" #X022ED "⋭")
+    ("mathrel" "\\nvDash" #X022AD "⊭")
+    ("mathrel" "\\nvLeftarrow" #X02902 "⤂")
+    ("mathrel" "\\nvLeftrightarrow" #X02904 "⤄")
+    ("mathrel" "\\nvRightarrow" #X02903 "⤃")
+    ("mathrel" "\\nvdash" #X022AC "⊬")
+    ("mathrel" "\\nvleftarrow" #X021F7 "⇷")
+    ("mathrel" "\\nvleftarrowtail" #X02B39 "⬹")
+    ("mathrel" "\\nvleftrightarrow" #X021F9 "⇹")
+    ("mathrel" "\\nvrightarrow" #X021F8 "⇸")
+    ("mathrel" "\\nvrightarrowtail" #X02914 "⤔")
+    ("mathrel" "\\nvtwoheadleftarrow" #X02B34 "⬴")
+    ("mathrel" "\\nvtwoheadleftarrowtail" #X02B3C "⬼")
+    ("mathrel" "\\nvtwoheadrightarrow" #X02900 "⤀")
+    ("mathrel" "\\nvtwoheadrightarrowtail" #X02917 "⤗")
+    ("mathrel" "\\nwarrow" #X02196 "↖")
+    ("mathrel" "\\nwsearrow" #X02921 "⤡")
+    ("mathrel" "\\origof" #X022B6 "⊶")
+    ("mathrel" "\\parallel" #X02225 "∥")
+    ("mathrel" "\\parsim" #X02AF3 "⫳")
+    ("mathrel" "\\partialmeetcontraction" #X02AA3 "⪣")
+    ("mathrel" "\\perp" #X027C2 "⟂")
+    ("mathrel" "\\pitchfork" #X022D4 "⋔")
+    ("mathrel" "\\prec" #X0227A "≺")
+    ("mathrel" "\\precapprox" #X02AB7 "⪷")
+    ("mathrel" "\\preccurlyeq" #X0227C "≼")
+    ("mathrel" "\\preceq" #X02AAF "⪯")
+    ("mathrel" "\\preceqq" #X02AB3 "⪳")
+    ("mathrel" "\\precnapprox" #X02AB9 "⪹")
+    ("mathrel" "\\precneq" #X02AB1 "⪱")
+    ("mathrel" "\\precneqq" #X02AB5 "⪵")
+    ("mathrel" "\\precnsim" #X022E8 "⋨")
+    ("mathrel" "\\precsim" #X0227E "≾")
+    ("mathrel" "\\propto" #X0221D "∝")
+    ("mathrel" "\\prurel" #X022B0 "⊰")
+    ("mathrel" "\\pullback" #X027D3 "⟓")
+    ("mathrel" "\\pushout" #X027D4 "⟔")
+    ("mathrel" "\\questeq" #X0225F "≟")
+    ("mathrel" "\\revnmid" #X02AEE "⫮")
+    ("mathrel" "\\rfbowtie" #X029D2 "⧒")
+    ("mathrel" "\\rftimes" #X029D5 "⧕")
+    ("mathrel" "\\rightarrow" #X02192 "→")
+    ("mathrel" "\\rightarrowapprox" #X02975 "⥵")
+    ("mathrel" "\\rightarrowbackapprox" #X02B48 "⭈")
+    ("mathrel" "\\rightarrowbar" #X021E5 "⇥")
+    ("mathrel" "\\rightarrowbsimilar" #X02B4C "⭌")
+    ("mathrel" "\\rightarrowdiamond" #X0291E "⤞")
+    ("mathrel" "\\rightarrowgtr" #X02B43 "⭃")
+    ("mathrel" "\\rightarrowonoplus" #X027F4 "⟴")
+    ("mathrel" "\\rightarrowplus" #X02945 "⥅")
+    ("mathrel" "\\rightarrowshortleftarrow" #X02942 "⥂")
+    ("mathrel" "\\rightarrowsimilar" #X02974 "⥴")
+    ("mathrel" "\\rightarrowsupset" #X02B44 "⭄")
+    ("mathrel" "\\rightarrowtail" #X021A3 "↣")
+    ("mathrel" "\\rightarrowtriangle" #X021FE "⇾")
+    ("mathrel" "\\rightarrowx" #X02947 "⥇")
+    ("mathrel" "\\rightbkarrow" #X0290D "⤍")
+    ("mathrel" "\\rightcurvedarrow" #X02933 "⤳")
+    ("mathrel" "\\rightdbltail" #X0291C "⤜")
+    ("mathrel" "\\rightdotarrow" #X02911 "⤑")
+    ("mathrel" "\\rightdowncurvedarrow" #X02937 "⤷")
+    ("mathrel" "\\rightfishtail" #X0297D "⥽")
+    ("mathrel" "\\rightharpoondown" #X021C1 "⇁")
+    ("mathrel" "\\rightharpoondownbar" #X02957 "⥗")
+    ("mathrel" "\\rightharpoonsupdown" #X02964 "⥤")
+    ("mathrel" "\\rightharpoonup" #X021C0 "⇀")
+    ("mathrel" "\\rightharpoonupbar" #X02953 "⥓")
+    ("mathrel" "\\rightharpoonupdash" #X0296C "⥬")
+    ("mathrel" "\\rightimply" #X02970 "⥰")
+    ("mathrel" "\\rightleftarrows" #X021C4 "⇄")
+    ("mathrel" "\\rightleftharpoons" #X021CC "⇌")
+    ("mathrel" "\\rightleftharpoonsdown" #X02969 "⥩")
+    ("mathrel" "\\rightleftharpoonsup" #X02968 "⥨")
+    ("mathrel" "\\rightrightarrows" #X021C9 "⇉")
+    ("mathrel" "\\rightsquigarrow" #X021DD "⇝")
+    ("mathrel" "\\righttail" #X0291A "⤚")
+    ("mathrel" "\\rightthreearrows" #X021F6 "⇶")
+    ("mathrel" "\\rightwavearrow" #X0219D "↝")
+    ("mathrel" "\\risingdotseq" #X02253 "≓")
+    ("mathrel" "\\rsqhook" #X02ACE "⫎")
+    ("mathrel" "\\rtriltri" #X029CE "⧎")
+    ("mathrel" "\\ruledelayed" #X029F4 "⧴")
+    ("mathrel" "\\scurel" #X022B1 "⊱")
+    ("mathrel" "\\searrow" #X02198 "↘")
+    ("mathrel" "\\shortdowntack" #X02ADF "⫟")
+    ("mathrel" "\\shortlefttack" #X02ADE "⫞")
+    ("mathrel" "\\shortrightarrowleftarrow" #X02944 "⥄")
+    ("mathrel" "\\shortuptack" #X02AE0 "⫠")
+    ("mathrel" "\\sim" #X0223C "∼")
+    ("mathrel" "\\simeq" #X02243 "≃")
+    ("mathrel" "\\simgE" #X02AA0 "⪠")
+    ("mathrel" "\\simgtr" #X02A9E "⪞")
+    ("mathrel" "\\similarleftarrow" #X02B49 "⭉")
+    ("mathrel" "\\similarrightarrow" #X02972 "⥲")
+    ("mathrel" "\\simlE" #X02A9F "⪟")
+    ("mathrel" "\\simless" #X02A9D "⪝")
+    ("mathrel" "\\simminussim" #X02A6C "⩬")
+    ("mathrel" "\\simneqq" #X02246 "≆")
+    ("mathrel" "\\simrdots" #X02A6B "⩫")
+    ("mathrel" "\\smallin" #X0220A "∊")
+    ("mathrel" "\\smallni" #X0220D "∍")
+    ("mathrel" "\\smeparsl" #X029E4 "⧤")
+    ("mathrel" "\\smile" #X02323 "⌣")
+    ("mathrel" "\\smt" #X02AAA "⪪")
+    ("mathrel" "\\smte" #X02AAC "⪬")
+    ("mathrel" "\\sqsubset" #X0228F "⊏")
+    ("mathrel" "\\sqsubseteq" #X02291 "⊑")
+    ("mathrel" "\\sqsubsetneq" #X022E4 "⋤")
+    ("mathrel" "\\sqsupset" #X02290 "⊐")
+    ("mathrel" "\\sqsupseteq" #X02292 "⊒")
+    ("mathrel" "\\sqsupsetneq" #X022E5 "⋥")
+    ("mathrel" "\\stareq" #X0225B "≛")
+    ("mathrel" "\\subedot" #X02AC3 "⫃")
+    ("mathrel" "\\submult" #X02AC1 "⫁")
+    ("mathrel" "\\subrarr" #X02979 "⥹")
+    ("mathrel" "\\subset" #X02282 "⊂")
+    ("mathrel" "\\subsetapprox" #X02AC9 "⫉")
+    ("mathrel" "\\subsetdot" #X02ABD "⪽")
+    ("mathrel" "\\subseteq" #X02286 "⊆")
+    ("mathrel" "\\subseteqq" #X02AC5 "⫅")
+    ("mathrel" "\\subsetneq" #X0228A "⊊")
+    ("mathrel" "\\subsetneqq" #X02ACB "⫋")
+    ("mathrel" "\\subsetplus" #X02ABF "⪿")
+    ("mathrel" "\\subsim" #X02AC7 "⫇")
+    ("mathrel" "\\subsub" #X02AD5 "⫕")
+    ("mathrel" "\\subsup" #X02AD3 "⫓")
+    ("mathrel" "\\succ" #X0227B "≻")
+    ("mathrel" "\\succapprox" #X02AB8 "⪸")
+    ("mathrel" "\\succcurlyeq" #X0227D "≽")
+    ("mathrel" "\\succeq" #X02AB0 "⪰")
+    ("mathrel" "\\succeqq" #X02AB4 "⪴")
+    ("mathrel" "\\succnapprox" #X02ABA "⪺")
+    ("mathrel" "\\succneq" #X02AB2 "⪲")
+    ("mathrel" "\\succneqq" #X02AB6 "⪶")
+    ("mathrel" "\\succnsim" #X022E9 "⋩")
+    ("mathrel" "\\succsim" #X0227F "≿")
+    ("mathrel" "\\supdsub" #X02AD8 "⫘")
+    ("mathrel" "\\supedot" #X02AC4 "⫄")
+    ("mathrel" "\\suphsol" #X027C9 "⟉")
+    ("mathrel" "\\suphsub" #X02AD7 "⫗")
+    ("mathrel" "\\suplarr" #X0297B "⥻")
+    ("mathrel" "\\supmult" #X02AC2 "⫂")
+    ("mathrel" "\\supset" #X02283 "⊃")
+    ("mathrel" "\\supsetapprox" #X02ACA "⫊")
+    ("mathrel" "\\supsetdot" #X02ABE "⪾")
+    ("mathrel" "\\supseteq" #X02287 "⊇")
+    ("mathrel" "\\supseteqq" #X02AC6 "⫆")
+    ("mathrel" "\\supsetneq" #X0228B "⊋")
+    ("mathrel" "\\supsetneqq" #X02ACC "⫌")
+    ("mathrel" "\\supsetplus" #X02AC0 "⫀")
+    ("mathrel" "\\supsim" #X02AC8 "⫈")
+    ("mathrel" "\\supsub" #X02AD4 "⫔")
+    ("mathrel" "\\supsup" #X02AD6 "⫖")
+    ("mathrel" "\\swarrow" #X02199 "↙")
+    ("mathrel" "\\toea" #X02928 "⤨")
+    ("mathrel" "\\tona" #X02927 "⤧")
+    ("mathrel" "\\topfork" #X02ADA "⫚")
+    ("mathrel" "\\tosa" #X02929 "⤩")
+    ("mathrel" "\\towa" #X0292A "⤪")
+    ("mathrel" "\\trianglelefteq" #X022B4 "⊴")
+    ("mathrel" "\\triangleq" #X0225C "≜")
+    ("mathrel" "\\trianglerighteq" #X022B5 "⊵")
+    ("mathrel" "\\twoheaddownarrow" #X021A1 "↡")
+    ("mathrel" "\\twoheadleftarrow" #X0219E "↞")
+    ("mathrel" "\\twoheadleftarrowtail" #X02B3B "⬻")
+    ("mathrel" "\\twoheadleftdbkarrow" #X02B37 "⬷")
+    ("mathrel" "\\twoheadmapsfrom" #X02B36 "⬶")
+    ("mathrel" "\\twoheadmapsto" #X02905 "⤅")
+    ("mathrel" "\\twoheadrightarrow" #X021A0 "↠")
+    ("mathrel" "\\twoheadrightarrowtail" #X02916 "⤖")
+    ("mathrel" "\\twoheaduparrow" #X0219F "↟")
+    ("mathrel" "\\twoheaduparrowcircle" #X02949 "⥉")
+    ("mathrel" "\\uparrow" #X02191 "↑")
+    ("mathrel" "\\uparrowbarred" #X02909 "⤉")
+    ("mathrel" "\\updownarrow" #X02195 "↕")
+    ("mathrel" "\\updownarrows" #X021C5 "⇅")
+    ("mathrel" "\\updownharpoonleftleft" #X02951 "⥑")
+    ("mathrel" "\\updownharpoonleftright" #X0294D "⥍")
+    ("mathrel" "\\updownharpoonrightleft" #X0294C "⥌")
+    ("mathrel" "\\updownharpoonrightright" #X0294F "⥏")
+    ("mathrel" "\\updownharpoonsleftright" #X0296E "⥮")
+    ("mathrel" "\\upfishtail" #X0297E "⥾")
+    ("mathrel" "\\upharpoonleft" #X021BF "↿")
+    ("mathrel" "\\upharpoonleftbar" #X02960 "⥠")
+    ("mathrel" "\\upharpoonright" #X021BE "↾")
+    ("mathrel" "\\upharpoonrightbar" #X0295C "⥜")
+    ("mathrel" "\\upharpoonsleftright" #X02963 "⥣")
+    ("mathrel" "\\upin" #X027D2 "⟒")
+    ("mathrel" "\\upuparrows" #X021C8 "⇈")
+    ("mathrel" "\\vBar" #X02AE8 "⫨")
+    ("mathrel" "\\vBarv" #X02AE9 "⫩")
+    ("mathrel" "\\vDash" #X022A8 "⊨")
+    ("mathrel" "\\vDdash" #X02AE2 "⫢")
+    ("mathrel" "\\varVdash" #X02AE6 "⫦")
+    ("mathrel" "\\varisinobar" #X022F6 "⋶")
+    ("mathrel" "\\varisins" #X022F3 "⋳")
+    ("mathrel" "\\varniobar" #X022FD "⋽")
+    ("mathrel" "\\varnis" #X022FB "⋻")
+    ("mathrel" "\\vartriangleleft" #X022B2 "⊲")
+    ("mathrel" "\\vartriangleright" #X022B3 "⊳")
+    ("mathrel" "\\vbrtri" #X029D0 "⧐")
+    ("mathrel" "\\vdash" #X022A2 "⊢")
+    ("mathrel" "\\vdots" #X022EE "⋮")
+    ("mathrel" "\\veeeq" #X0225A "≚")
+    ("mathrel" "\\veeonwedge" #X02A59 "⩙")
+    ("mathrel" "\\vlongdash" #X027DD "⟝")
+    ("mathrel" "\\wedgeq" #X02259 "≙")
+    ("mathunder" "\\underbrace" #X023DF "⏟")
+    ("mathunder" "\\underbracket" #X023B5 "⎵")
+    ("mathunder" "\\underparen" #X023DD "⏝"))
+  "Extended list of mathematical symbols.
+Taken from http://milde.users.sourceforge.net/LUCR/Math/ and
+prepared with `msl--read-LUCR-list' function. This list does not
+contain some (about 190) of the standard LaTeX math commands in
+`math-symbol-list-basic' because they are named differently in
+unicode-math standard.")
 
 (defconst math-symbol-list-latex-commands
   '("address" "addtocounter" "addtolength" "addvspace" "Alph" "alph" "Alph
@@ -3028,7 +3026,7 @@
     "item" "itemindent" "itemsep" "itshape" "kill"
     "label" "labelenumi" "labelenumii" "labelenumiii" "labelenumiv"
     "labelitemi" "labelitemii" "labelitemiii" "labelitemiv" "labelsep"
-    "labelwidth" "land" "LARGE" "Large" "large" "LaTeX" "le" "leadsto"
+    "labelwidth" "land" "LARGE" "Large" "large" "LaTeX" "le" "left" "leadsto"
     "lefteqn" "leftmargin" "leftmargini" "leftmarginii" "leftmarginiii"
     "leftmarginiv" "leftmarginv" "leftmarginvi" "line" "linebreak"
     "linethickness" "linewidth" "listoffigures" "listoftables" "listparindent"
@@ -3063,5 +3061,42 @@
     "width" "year")
   "List of the latex commands.")
 
+
+;; IMPORT UTILITIES
+
+(defun msl--read-LUCR-list (file &optional print)
+  "Read in LUCR list from [1] and optionally PRINT.
+LUCR list is a super-set of unicode-math list [2]. FILE is a
+local file from [3].
+
+ [1] http://milde.users.sourceforge.net/LUCR/Math/
+ [2] https://github.com/wspr/unicode-math/blob/master/unicode-math-table.tex
+ [3] http://milde.users.sourceforge.net/LUCR/Math/data/unimathsymbols.txt
+"
+  (let* ((lines (with-temp-buffer
+                  (insert-file-contents file)
+                  (split-string (buffer-string) "\n" t)))
+         (symb (cl-loop for l in lines
+                        unless (string-match-p "^#" l)
+                        for words = (split-string l "\\^")
+                        if (> (length (nth 3 words)) 0)
+                        collect (list (nth 5 words) (nth 3 words) (nth 0 
words) (substring (nth 1 words) -1))
+                        ;; if (and (> (length (nth 3 words)) 0)
+                        ;;         (not (string= (nth 2 words) (nth 3 words))))
+                        ;; collect (list (nth 5 words) (nth 2 words) (nth 0 
words) (substring (nth 1 words) -1))
+                        ))
+         (symb (cl-sort symb (lambda (a b) (string-lessp (concat (car a) (cadr 
a)) (concat (car b) (cadr b)))))))
+    (if print
+        (let ((out-buff (get-buffer-create "*symbol-list*")))
+          (with-current-buffer out-buff
+            (erase-buffer)
+            (insert "(")
+            (dolist (w symb)
+              (insert (apply 'format "(\"%s\" \"\\%s\" #X%s \"%s\")\n" w )))
+            (insert ")")
+            (goto-char (point-min)))
+          (switch-to-buffer out-buff))
+      symb)))
+
 (provide 'math-symbol-lists)
 ;;; math-symbol-lists.el ends here
diff --git a/packages/metar/metar.el b/packages/metar/metar.el
index 7b78f07..b6989ea 100644
--- a/packages/metar/metar.el
+++ b/packages/metar/metar.el
@@ -1,9 +1,9 @@
 ;;; metar.el --- Retrieve and decode METAR weather information
 
-;; Copyright (C) 2007, 2014  Free Software Foundation, Inc.
+;; Copyright (C) 2007, 2014-2016  Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <address@hidden>
-;; Version: 0.1
+;; Version: 0.2
 ;; Package-Requires: ((cl-lib "0.5"))
 ;; Keywords: comm
 
@@ -239,45 +239,46 @@ If no match if found, nil is returned."
       (when station-code
        (cons station-code (round best-distance))))))
 
-(defun metar-convert-unit (value new-unit)
+(defun metar-convert-unit (value new-unit &optional convert-units-function)
   "Convert VALUE to NEW-UNIT.
 VALUE is a string with the value followed by the unit, like \"5 knot\"
-and NEW-UNIT should be a unit name like \"kph\" or similar."
+and NEW-UNIT should be a unit name like \"kph\" or similar.
+CONVERT-UNITS-FUNCTION designates the function actually doing the conversion.
+It must have the signature of `math-convert-units', which is the default."
   (cl-check-type value string)
-  (cl-check-type new-unit (or string symbol))
-  (cl-multiple-value-bind (value unit)
-      (split-string
-       (math-format-value
-       (math-convert-units (math-simplify (math-read-expr value))
-                           (math-read-expr
-                            (cl-etypecase new-unit
-                                          (string new-unit)
-                                          (symbol (symbol-name new-unit))))))
-       " ")
-    (cons (string-to-number value) (intern unit))))
+  (unless (symbolp new-unit)
+    (setq new-unit (intern new-unit)))
+  (let ((expr (math-simplify (math-read-expr value))))
+    ;; Sneakily work around bug#19582.
+    (when (eq (car-safe expr) 'neg)
+      (setq expr `(* -1 ,(cadr expr))))
+    (cl-assert (or (math-zerop expr)
+                  (not (memq (math-single-units-in-expr-p expr) '(nil wrong))))
+              nil
+              "Metar: Not exactly one unit in expression: %S" expr)
+    (let ((res (math-simplify-units
+               (funcall (or convert-units-function 'math-convert-units)
+                        expr
+                        (math-build-var-name new-unit)
+                        t))))
+      (cl-assert (math-realp res) nil
+                "Metar: Not a Calc real number: %S" res)
+      (cons (string-to-number (math-format-value (if (integerp res)
+                                                    res
+                                                  (math-float res))))
+           new-unit))))
 
 (defun metar-convert-temperature (string &optional unit)
-  (let* ((value (concat (if (= (aref string 0) ?M)
-                           (concat "-" (substring string 1))
-                         string)
-                       "degC"))
-        (expr (math-read-expr value))
-        (old-unit (math-single-units-in-expr-p expr))
-        (new-unit (or unit (cdr (assq 'temperature metar-units)))))
-    (if old-unit
-       (cl-multiple-value-bind (value unit)
-           (split-string
-            (math-format-value
-             (math-simplify-units
-              (math-convert-temperature
-               expr
-               (list 'var
-                     (car old-unit)
-                     (intern (concat "var-" (symbol-name (car old-unit)))))
-               (math-read-expr (cl-etypecase new-unit
-                                 (string new-unit)
-                                 (symbol (symbol-name new-unit))))))) " ")
-         (cons (string-to-number value) (intern unit))))))
+  (metar-convert-unit (concat (if (= (aref string 0) ?M)
+                                 (concat "-" (substring string 1))
+                               string)
+                             "degC")
+                     (or unit (cdr (assq 'temperature metar-units)))
+                     (lambda (expr new-unit-var pure)
+                       (math-convert-temperature expr
+                                                 (math-build-var-name 'degC)
+                                                 new-unit-var
+                                                 pure))))
 
 (defcustom metar-url
   "http://weather.noaa.gov/pub/data/observations/metar/stations/%s.TXT";
diff --git a/packages/minimap/minimap.el b/packages/minimap/minimap.el
index 4d58023..231c049 100644
--- a/packages/minimap/minimap.el
+++ b/packages/minimap/minimap.el
@@ -229,10 +229,10 @@ read text using those faces.  By default, this should 
enlarge all
 function names in the minimap, given you have font locking
 enabled.  This variable can have the following values:
 
-'as-fallback (the default) -- The feature will only be activated
+`as-fallback' (the default) -- The feature will only be activated
   if information from CEDET's semantic analyzer isn't available
   (see: `minimap-display-semantic-overlays').
-'always -- Always active.
+`always' -- Always active.
 nil -- Inactive."
   :type '(choice (const :tag "Fallback if CEDET unavailable." 'as-fallback)
                 (const :tag "Always active." 'always)
@@ -254,14 +254,14 @@ Unlike text properties, overlays are not applied 
automatically to
 the minimap and must be explicitly synced.  This variable
 specifies which overlay properties should be synced by
 `minimap-sync-overlays'.  Most importantly, this variable should
-include 'invisible', so that hidden text does not appear in the
+include `invisible', so that hidden text does not appear in the
 minimap buffer."
   :type '(repeat symbol)
   :group 'minimap)
 
 (defcustom minimap-major-modes '(prog-mode)
   "Major modes for which a minimap should be created.
-This can also be a parent mode like 'prog-mode.
+This can also be a parent mode like `prog-mode'.
 If nil, a minimap must be explicitly created for each buffer."
   :type '(repeat symbol)
   :group 'minimap)
diff --git a/packages/multishell/multishell-list.el 
b/packages/multishell/multishell-list.el
index dc7529b..9300494 100644
--- a/packages/multishell/multishell-list.el
+++ b/packages/multishell/multishell-list.el
@@ -231,9 +231,9 @@ Provide for concluding minibuffer interaction if we're in 
completing mode."
 
 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
+- 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
@@ -271,7 +271,7 @@ For duplicates, we prefer the ones that have paths."
   "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*'.
+`multishell-history' list in a popped buffer named `*Shells*'.
 
 In the buffer, hit ? or h for a list of commands.
 
diff --git a/packages/multishell/multishell.el 
b/packages/multishell/multishell.el
index 51bad08..54d0436 100644
--- a/packages/multishell/multishell.el
+++ b/packages/multishell/multishell.el
@@ -179,8 +179,8 @@ with allout-mode."
 (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)."
+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
@@ -210,8 +210,8 @@ If optional UNBIND is true, globally unbind the key.
 (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)."
+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)
 
@@ -364,7 +364,7 @@ prefixing your \\[multishell-pop-to-shell] invocation with 
single or double
 
  - 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'.
+   the name), defaulting to `shell'.
 
    Completion is available.
 
@@ -389,21 +389,21 @@ prefixing your \\[multishell-pop-to-shell] invocation 
with single or double
 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
+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/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. 
+* `/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
+* `#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
+* `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.
@@ -480,7 +480,7 @@ customize the savehist group to activate savehist."
 
     ;; Situate:
 
-    (cond 
+    (cond
 
      ((and (or curr-buff-proc from-buffer-is-shell)
            (not arg)
@@ -652,7 +652,7 @@ Return what's provided, if anything, else 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
+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
diff --git a/packages/muse/muse-backlink.el b/packages/muse/muse-backlink.el
index d5b7ebd..76c0c9c 100644
--- a/packages/muse/muse-backlink.el
+++ b/packages/muse/muse-backlink.el
@@ -83,10 +83,10 @@ that for the default value of SEPARATORS leading and 
trailing whitespace
 are effectively trimmed).  If nil, all zero-length substrings are retained,
 which correctly parses CSV format, for example.
 
-Note that the effect of `(split-string STRING)' is the same as
-`(split-string STRING split-string-default-separators t)').  In the rare
+Note that the effect of (split-string STRING) is the same as
+(split-string STRING split-string-default-separators t).  In the rare
 case that you wish to retain zero-length substrings when splitting on
-whitespace, use `(split-string STRING split-string-default-separators)'.
+whitespace, use (split-string STRING split-string-default-separators).
 
 Modifies the match data; use `save-match-data' if necessary."
         (let ((keep-nulls (not (if separators omit-nulls t)))
diff --git a/packages/muse/muse-colors.el b/packages/muse/muse-colors.el
index 132310d..401ed94 100644
--- a/packages/muse/muse-colors.el
+++ b/packages/muse/muse-colors.el
@@ -61,7 +61,7 @@ See `muse-colors-buffer' for more information."
   "Specify whether the heading faces should be auto-generated.
 The default is to scale them.
 
-Choosing 'outline will copy the colors from the outline-mode
+Choosing `outline' will copy the colors from the outline-mode
 headings.
 
 If you want to customize each of the headings individually, set
diff --git a/packages/muse/muse-html.el b/packages/muse/muse-html.el
index 2473025..bcdee56 100644
--- a/packages/muse/muse-html.el
+++ b/packages/muse/muse-html.el
@@ -400,7 +400,7 @@ change this to \"application/xhtml+xml\"."
                                               'detect
                                             "iso-8859-1")
   "The charset to append to the HTML <meta> tag.
-If set to the symbol 'detect, use `muse-html-encoding-map' to try
+If set to the symbol `detect', use `muse-html-encoding-map' to try
 and determine the HTML charset from emacs's coding.  If set to a
 string, this string will be used to force a particular charset"
   :type '(choice string symbol)
@@ -422,7 +422,7 @@ This will be used if no special characters are found."
   "Modes that we allow the <src> tag to colorize.
 If t, permit the <src> tag to colorize any mode.
 
-If a list of mode names, such as '(\"html\" \"latex\"), and the
+If a list of mode names, such as (\"html\" \"latex\"), and the
 lang argument to <src> is not in the list, then use fundamental
 mode instead."
   :type '(choice (const :tag "Any" t)
diff --git a/packages/muse/muse-http.el b/packages/muse/muse-http.el
index 40bd1cb..0c83c92 100644
--- a/packages/muse/muse-http.el
+++ b/packages/muse/muse-http.el
@@ -42,7 +42,7 @@
   :group 'press)
 
 (defcustom muse-http-maintainer (concat "webmaster@" (system-name))
-  "The maintainer address to use for the HTTP 'From' field."
+  "The maintainer address to use for the HTTP `From' field."
   :type 'string
   :group 'muse-http)
 
diff --git a/packages/muse/muse-ipc.el b/packages/muse/muse-ipc.el
index 9ce8eb1..da8eb37 100644
--- a/packages/muse/muse-ipc.el
+++ b/packages/muse/muse-ipc.el
@@ -48,7 +48,7 @@
   :type 'number)
 
 (defcustom muse-ipc-ignore-done nil
-  "If non-nil, ignore any 'done' messages that we get from clients."
+  "If non-nil, ignore any `done' messages that we get from clients."
   :group 'muse-ipc
   :type 'boolean)
 
diff --git a/packages/muse/muse-mode.el b/packages/muse/muse-mode.el
index 9659843..eaac573 100644
--- a/packages/muse/muse-mode.el
+++ b/packages/muse/muse-mode.el
@@ -395,7 +395,7 @@ your current list type and indentation level."
 
 (defun muse-alter-list-item-indentation (operation)
   "Alter the indentation of the current list item.
-Valid values of OPERATION are 'increase and 'decrease."
+Valid values of OPERATION are `increase' and `decrease'."
   (let ((pstart (muse-get-paragraph-start))
         (list-item (format muse-list-item-regexp
                            (concat "[" muse-regexp-blank "]*")))
@@ -923,7 +923,7 @@ function, you might want to set this manually.")
           "\\|[" muse-regexp-blank "][0-9]+\\.[" muse-regexp-blank "]*\\)")
   "Regexp used to match the beginning of a list item.
 This is used by `muse-list-edit-minor-mode'.
-The '%s' will be replaced with a whitespace regexp when publishing.")
+The `%s' will be replaced with a whitespace regexp when publishing.")
 
 (defun muse-l-e-m-m-insert-list-item ()
   "Insert a list item at the current point, taking into account
diff --git a/packages/muse/muse-publish.el b/packages/muse/muse-publish.el
index cbcd415..a5d5f08 100644
--- a/packages/muse/muse-publish.el
+++ b/packages/muse/muse-publish.el
@@ -1017,17 +1017,17 @@ If IGNORE-READ-ONLY is non-nil, ignore the read-only 
property.
 CONTEXT is used to figure out what kind of specials to escape.
 
 The following contexts exist in Muse.
-'underline  _underlined text_
-'literal    =monospaced text= or <code> region (monospaced, escaped)
-'emphasis   *emphasized text*
-'email      address@hidden
-'url        http://example.com
-'url-desc   [[...][description of an explicit link]]
-'image      [[image.png]]
-'example    <example> region (monospaced, block context, escaped)
-'verbatim   <verbatim> region (escaped)
-'footnote   footnote text
-'document   normal text"
+`underline'  _underlined text_
+`literal'    =monospaced text= or <code> region (monospaced, escaped)
+`emphasis'   *emphasized text*
+`email'      address@hidden
+`url'        http://example.com
+`url-desc'   [[...][description of an explicit link]]
+`image'      [[image.png]]
+`example'    <example> region (monospaced, block context, escaped)
+`verbatim'   <verbatim> region (escaped)
+`footnote'   footnote text
+`document'   normal text"
   (let ((specials (muse-style-element :specials nil t)))
     (cond ((functionp specials)
            (setq specials (funcall specials context)))
diff --git a/packages/muse/muse-regexps.el b/packages/muse/muse-regexps.el
index ad3ce3f..900b0cd 100644
--- a/packages/muse/muse-regexps.el
+++ b/packages/muse/muse-regexps.el
@@ -44,7 +44,7 @@
 
 (defcustom muse-regexp-use-character-classes 'undecided
   "Indicate whether to use extended character classes like [:space:].
-If 'undecided, Muse will use them if your emacs is known to support them.
+If `undecided', Muse will use them if your emacs is known to support them.
 
 Emacs 22 and Emacs 21.3.50 are known to support them.  XEmacs
 does not support them.
@@ -149,7 +149,7 @@ the time."
           "\\|[" muse-regexp-blank "]-[" muse-regexp-blank "]*"
           "\\|[" muse-regexp-blank "][0-9]+\\.[" muse-regexp-blank "]*\\)")
   "Regexp used to match the beginning of a list item.
-The '%s' will be replaced with a whitespace regexp when publishing."
+The `%s' will be replaced with a whitespace regexp when publishing."
   :type 'regexp
   :group 'muse-regexp)
 
diff --git a/packages/muse/muse.el b/packages/muse/muse.el
index 7982b46..a6a6177 100644
--- a/packages/muse/muse.el
+++ b/packages/muse/muse.el
@@ -403,7 +403,7 @@ before the second."
 The rating is stripped out in the returned list.
 Default sorting is highest-first.
 
-If TEST if specified, use it to sort the list.  The default test is '>."
+If TEST if specified, use it to sort the list.  The default test is `>'."
   (unless test (setq test '>))
   (mapcar (function cdr)
           (muse-sort-with-closure
@@ -476,8 +476,8 @@ never modify the directory part of the path."
 
 (defun muse-list* (arg &rest rest)
   "Return a new list with specified args as elements, cons'd to last arg.
-Thus, `(list* A B C D)' is equivalent to `(nconc (list A B C) D)', or to
-`(cons A (cons B (cons C D)))'."
+Thus, (muse-list* A B C D) is equivalent to (nconc (list A B C) D)' or to
+(cons A (cons B (cons C D)))."
   (cond ((not rest) arg)
         ((not (cdr rest)) (cons arg (car rest)))
         (t (let* ((n (length rest))
@@ -742,7 +742,7 @@ function."
 
 (defun muse-list-item-type (str)
   "Determine the type of list given STR.
-Returns either 'ul, 'ol, 'dl-term, 'dl-entry, or nil."
+Returns either `ul', `ol', `dl-term', `dl-entry', or nil."
   (save-match-data
     (cond ((or (string= str "")
                (< (length str) 2))
diff --git a/packages/myers/myers.el b/packages/myers/myers.el
new file mode 100644
index 0000000..e52dd6a
--- /dev/null
+++ b/packages/myers/myers.el
@@ -0,0 +1,196 @@
+;;; myers.el --- Random-access singly-linked lists     -*- lexical-binding: t; 
-*-
+
+;; Copyright (C) 2016  Free Software Foundation, Inc.
+
+;; Author: Stefan Monnier <address@hidden>
+;; Keywords: list, containers
+;; Package-Requires: ((emacs "25"))
+;; Version: 0.1
+
+;; 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 implements Eugene W. Myers's "stacks" which are like
+;; standard singly-linked lists, except that they also provide efficient
+;; lookup.  More specifically:
+;;
+;; cons/car/cdr are O(1), while (nthcdr N L) is O(min (N, log L))
+;;
+;; For details, see "An applicative random-access stack", Eugene W. Myers,
+;; 1983, Information Processing Letters
+;; 
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.188.9344&rep=rep1&type=pdf
+
+;;; Code:
+
+(require 'cl-lib)
+(require 'seq)
+
+(cl-defstruct (myers
+               (:copier nil)
+               (:constructor nil)
+               (:conc-name myers--)
+               (:constructor myers--cons (car cdr skip-distance skip)))
+  (car nil :read-only t)
+  (cdr nil :read-only t :type (or null myers))
+  ;; Contrary to Myers's presentation, we index from the top of the stack,
+  ;; and we don't store the total length but the "skip distance" instead.
+  ;; This makes `cons' slightly faster, and better matches our use for
+  ;; debruijn environments.
+  (skip-distance nil :read-only t :type integer)
+  (skip nil :read-only t :type (or null myers)))
+
+(defun myers-cons (car cdr)
+  "Create a new Myers cons, give it CAR and CDR as components, and return it.
+This like `cons' but for Myers's lists."
+  (if (null cdr)
+      (myers--cons car cdr 1 cdr)
+    (let ((s1 (myers--skip-distance cdr))
+          (cddr (myers--skip cdr)))
+      (if (null cddr)
+          (myers--cons car cdr 1 cdr)
+        (let ((s2 (myers--skip-distance cddr))
+              (cdddr (myers--skip cddr)))
+          (if (<= s2 s1)
+              (myers--cons car cdr (+ 1 s1 s2) cdddr)
+            (myers--cons car cdr 1 cdr)))))))
+
+(defun myers-list (&rest objects)
+  "Return a newly created list with specified arguments as elements."
+  (let ((list nil))
+    (dolist (x (nreverse objects))
+      (setq list (myers-cons x list)))
+    list))
+
+;; FIXME: Should myers-car/cdr just defer to myers--car/cdr, or should they
+;; reproduce car/cdr's behavior more faithfully and return nil when the arg
+;; is nil?
+(defalias 'myers-car #'myers--car)
+(defalias 'myers-cdr #'myers--cdr)
+
+(pcase-defmacro myers-cons (car cdr)
+  `(cl-struct myers (car ,car) (cdr ,cdr)))
+
+(defun myers-nthcdr (n list)
+  "Take `myers-cdr' N times on LIST, return the result."
+  (while (and (> n 0) list)
+    (let ((s (myers--skip-distance list)))
+      (if (<= s n)
+          (setq n (- n s) list (myers--skip list))
+        (setq n (- n 1) list (myers--cdr list)))))
+  list)
+
+;; This operation would be more efficient using Myers's choice of keeping
+;; the length (instead of the skip-distance) in each node.
+(cl-defmethod seq-length ((seq myers))
+  (let ((n 0))
+    (while seq
+      (cl-incf n (myers--skip-distance seq))
+      (setq seq (myers--skip seq)))
+    n))
+
+(cl-defmethod seq-elt ((seq myers) n)
+  (let ((l (myers-nthcdr n seq)))
+    (when l (myers--car l))))
+
+
+(cl-defmethod seq-do (fun (seq myers))
+  (while seq
+    (funcall fun (myers--car seq))
+    (setq seq (myers--cdr seq))))
+
+(cl-defmethod seqp ((_seq myers)) t)
+
+(cl-defmethod seq-copy ((seq myers))
+  (let ((elts ()))
+    (while seq
+      (push (myers--car seq) elts)
+      (setq seq (myers--cdr seq)))
+    (dolist (elt elts)
+      (setq seq (myers-cons elt seq)))
+    seq))
+
+(cl-defmethod seq-subseq ((seq myers) start &optional end)
+  (when (< start 0)
+    (let ((nstart (+ (seq-length seq) start)))
+      (if (< nstart 0)
+          (signal 'args-out-of-range (list seq start))
+        (setq start nstart))))
+  (setq seq (myers-nthcdr start seq))
+  (if (null end)
+      (seq-copy seq)
+    (let ((nend (if (>= end 0)
+                    (- end start)
+                  (+ end (seq-length seq)))))
+      (if (< nend 0)
+          (signal 'args-out-of-range (list seq end))
+        (setq end nend)))
+    (let ((elts ())
+          (res ()))
+      (dotimes (_ end)
+        (push (myers--car seq) elts)
+        (setq seq (myers--cdr seq)))
+      (dolist (elt elts)
+        (setq res (myers-cons elt res)))
+      res)))
+
+(cl-defmethod seq-empty-p ((_seq myers)) nil)
+
+(cl-defmethod seq-reverse ((seq myers))
+  (let ((res ()))
+    (while seq
+      (setq res (myers-cons (myers--car seq) res))
+      (setq seq (myers--cdr seq)))
+    res))
+
+(defun myers-find (pred list)
+  "Find the first element of LIST for which PRED returns non-nil.
+\"Binary\" search, assuming the list is \"sorted\" (i.e. all elements after
+this one also return true).
+Return the node holding that element (or nil, if none found)."
+  (while
+      (when list
+        (if (funcall pred (myers--car list))
+            nil
+          (let ((l2 (myers--skip list)))
+            (setq list (myers--cdr list))
+            (if (eq l2 list)
+                t
+              (while
+                  (and l2 (not (funcall pred (myers--car l2)))
+                       (progn
+                         (setq list (myers--cdr l2))
+                         (setq l2 (myers--skip l2))
+                         t))))
+            t))))
+  list)
+
+;; (* Find the last node for which the predicate `p' is false.
+;;  * "Binary" search, assuming the list is "sorted" (i.e. all elements after
+;;  * this one also return true).  *)
+;; let rec findcdr p l =
+;;   let rec findcdr2 last l1 l2 =
+;;     match l1,l2 with
+;;     | _, (Mcons (x, l1, _, l2) as l) when not (p x) -> findcdr2 (Some l) l1 
l2
+;;     | l, _ -> findcdr1 last l
+;;   and findcdr1 last l =
+;;     match l with
+;;      | Mnil -> last
+;;      | Mcons (x, _, _, _) when p x -> last
+;;      | Mcons (_, l1, _, l2) -> findcdr2 (Some l) l1 l2
+;;   in findcdr1 None l
+
+
+(provide 'myers)
+;;; myers.el ends here
diff --git a/packages/nameless/README.org b/packages/nameless/README.org
index 9d8b7eb..46b861b 100644
--- a/packages/nameless/README.org
+++ b/packages/nameless/README.org
@@ -14,7 +14,7 @@ the *right* has ~nameless-mode~ turned on.\\
 To use this package add the following configuration to your Emacs init file.
 
 #+BEGIN_SRC emacs-lisp
-(add-hook 'emacs-lisp-mode-hook #'nameless-mode-from-hook)
+(add-hook 'emacs-lisp-mode-hook #'nameless-mode)
 #+END_SRC
 
 You can configure a string to use instead of ~:~ by setting the
diff --git a/packages/nameless/nameless.el b/packages/nameless/nameless.el
index 183b46d..3f21756 100644
--- a/packages/nameless/nameless.el
+++ b/packages/nameless/nameless.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <address@hidden>
 ;; URL: https://github.com/Malabarba/nameless
 ;; Keywords: convenience, lisp
-;; Version: 0.5.1
+;; Version: 1.0.1
 ;; Package-Requires: ((emacs "24.4"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -59,8 +59,8 @@ use commonly.  To apply aliases specific to a file, set the
 Each element of this list should have the form (ALIAS . NAMESPACE),
 both strings.  For example, if you set this variable to
           ((\"fl\" . \"font-lock\"))
-then expressions like `(font-lock-add-keywords nil kwds)' will
-displayed as `(fl/add-keywords nil kwds)' instead.
+then expressions like (font-lock-add-keywords nil kwds) will be
+displayed as (fl/add-keywords nil kwds) instead.
 
 Furthermore typing `fl' followed by `\\[nameless-insert-name]' will
 automatically insert `font-lock-'."
@@ -256,6 +256,15 @@ Return S."
     (remove-text-properties 0 length '(composition nil display nil) s)
     s))
 
+(defun nameless--after-hack-local-variables ()
+  "Set font-lock-keywords after `hack-local-variables-hook'."
+  (nameless--remove-keywords)
+  (apply #'nameless--add-keywords
+         `(,@(when nameless-current-name
+               `((nil . ,nameless-current-name)))
+           ,@nameless-global-aliases
+           ,@nameless-aliases)))
+
 
 ;;; Minor mode
 ;;;###autoload
@@ -267,25 +276,22 @@ Return S."
                    nameless-discover-current-name
                    (ignore-errors (string-match "\\.el\\'" 
(lm-get-package-name))))
           (setq nameless-current-name
-                (replace-regexp-in-string "\\(-mode\\)?\\.[^.]*\\'" "" 
(lm-get-package-name))))
+                (replace-regexp-in-string 
"\\(-mode\\)?\\(-tests?\\)?\\.[^.]*\\'" "" (lm-get-package-name))))
         (add-function :filter-return (local 'filter-buffer-substring-function)
                       #'nameless--filter-string)
-        (apply #'nameless--add-keywords
-               `(,@(when nameless-current-name
-                     `((nil . ,nameless-current-name)))
-                 ,@nameless-global-aliases
-                 ,@nameless-aliases)))
+        (nameless--after-hack-local-variables)
+        (add-hook 'hack-local-variables-hook
+                  #'nameless--after-hack-local-variables
+                  nil 'local))
     (remove-function (local 'filter-buffer-substring-function)
                      #'nameless--filter-string)
-    (setq nameless-current-name nil)
+    (remove-hook 'hack-local-variables-hook
+                 #'nameless--after-hack-local-variables
+                 'local)
     (nameless--remove-keywords)))
 
 ;;;###autoload
-(defun nameless-mode-from-hook ()
-  "Turn on `nameless-mode'.
-Designed to be added to `emacs-lisp-mode-hook'.
-Interactively, just invoke `nameless-mode' directly."
-  (add-hook 'find-file-hook #'nameless-mode nil 'local))
+(define-obsolete-function-alias 'nameless-mode-from-hook 'nameless-mode 
"1.0.0")
 
 (provide 'nameless)
 ;;; nameless.el ends here
diff --git a/packages/nhexl-mode/nhexl-mode.el 
b/packages/nhexl-mode/nhexl-mode.el
index d4a3d26..e4ebc14 100644
--- a/packages/nhexl-mode/nhexl-mode.el
+++ b/packages/nhexl-mode/nhexl-mode.el
@@ -1,10 +1,11 @@
 ;;; nhexl-mode.el --- Minor mode to edit files via hex-dump format  -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2010, 2012  Free Software Foundation, Inc.
+;; Copyright (C) 2010, 2012, 2016  Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <address@hidden>
 ;; Keywords: data
-;; Version: 0.1
+;; Version: 0.2
+;; Package-Requires: ((emacs "24") (cl-lib "0.5"))
 
 ;; 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
@@ -37,7 +38,7 @@
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 (require 'hexl)                         ;For faces.
 
 (defgroup nhexl nil
@@ -101,7 +102,7 @@
 (defun nhexl--debug-count-ols ()
   (let ((i 0))
     (dolist (ol (overlays-in (point-min) (point-max)))
-      (when (overlay-get ol 'nhexl) (incf i)))
+      (when (overlay-get ol 'nhexl) (cl-incf i)))
     i))
 
 (defun nhexl--flush-overlays (buffer)
@@ -193,7 +194,7 @@
                            'display (copy-sequence "␊"))))
     (while (< from to)
 
-      (decf nhexl--overlay-counter)
+      (cl-decf nhexl--overlay-counter)
       (when (and (= nhexl--overlay-counter 0)
                  ;; If the user enabled jit-lock-stealth fontification, then
                  ;; removing overlays is just a waste since
diff --git a/packages/nlinum/nlinum.el b/packages/nlinum/nlinum.el
index 98c9cbc..358cad4 100644
--- a/packages/nlinum/nlinum.el
+++ b/packages/nlinum/nlinum.el
@@ -1,6 +1,6 @@
 ;;; nlinum.el --- Show line numbers in the margin  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2012, 2014, 2015  Free Software Foundation, Inc.
+;; Copyright (C) 2012, 2014, 2015, 2016  Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <address@hidden>
 ;; Keywords: convenience
@@ -26,6 +26,11 @@
 
 ;;; News:
 
+;; v1.7:
+;; - Add ability to highlight current line number.
+;; - New custom variable `nlinum-highlight-current-line' and
+;;   face `nlinum-current-line'.
+
 ;; v1.3:
 ;; - New custom variable `nlinum-format'.
 ;; - Change in calling convention of `nlinum-format-function'.
@@ -36,11 +41,33 @@
 
 ;;; Code:
 
-(require 'linum)                        ;For its face.
+(require 'linum)                        ;For its face
+
+(defgroup nlinum nil
+  "Show line numbers in the margin, (hopefully) more efficiently."
+  :group 'convenience
+  :group 'linum
+  :prefix "nlinum")
+
+(defcustom nlinum-highlight-current-line nil
+  ;; FIXME: It would be good to enable it by default, but only once we make it
+  ;; work right with multiple-windows.
+  "Whether the current line number should be highlighted.
+When non-nil, the current line number is highlighted in `nlinum-current-line'
+face."
+  :type 'boolean)
+
+(defface nlinum-current-line
+  '((t :inherit linum :weight bold))
+  "Face for displaying current line.")
 
 (defvar nlinum--width 2)
 (make-variable-buffer-local 'nlinum--width)
 
+(defvar nlinum--current-line 0
+  "Store current line number.")
+(make-variable-buffer-local 'nlinum--current-line)
+
 ;; (defvar nlinum--desc "")
 
 ;;;###autoload
@@ -53,9 +80,10 @@ if ARG is omitted or nil.
 Linum mode is a buffer-local minor mode."
   :lighter nil ;; (" NLinum" nlinum--desc)
   (jit-lock-unregister #'nlinum--region)
-  (remove-hook 'window-configuration-change-hook #'nlinum--setup-window t)
-  (remove-hook 'text-scale-mode-hook #'nlinum--setup-window t)
-  (remove-hook 'after-change-functions #'nlinum--after-change t)
+  (remove-hook 'window-configuration-change-hook #'nlinum--setup-window :local)
+  (remove-hook 'text-scale-mode-hook #'nlinum--setup-window :local)
+  (remove-hook 'after-change-functions #'nlinum--after-change :local)
+  (remove-hook 'post-command-hook #'nlinum--current-line-update :local)
   (kill-local-variable 'nlinum--line-number-cache)
   (remove-overlays (point-min) (point-max) 'nlinum t)
   ;; (kill-local-variable 'nlinum--ol-counter)
@@ -64,10 +92,13 @@ Linum mode is a buffer-local minor mode."
     ;; FIXME: Another approach would be to make the mode permanent-local,
     ;; which might indeed be preferable.
     (add-hook 'change-major-mode-hook (lambda () (nlinum-mode -1)))
-    (add-hook 'text-scale-mode-hook #'nlinum--setup-window nil t)
+    (add-hook 'text-scale-mode-hook #'nlinum--setup-window nil :local)
     (add-hook 'window-configuration-change-hook #'nlinum--setup-window nil t)
-    (add-hook 'after-change-functions #'nlinum--after-change nil t)
-    (jit-lock-register #'nlinum--region t))
+    (add-hook 'after-change-functions #'nlinum--after-change nil :local)
+    (if nlinum-highlight-current-line
+        (add-hook 'post-command-hook #'nlinum--current-line-update nil :local)
+      (remove-hook 'post-command-hook #'nlinum--current-line-update :local))
+    (jit-lock-register #'nlinum--region :contextual))
   (nlinum--setup-windows))
 
 (defun nlinum--face-height (face)
@@ -131,6 +162,34 @@ Linum mode is a buffer-local minor mode."
                          (point-min) (point-max) '(fontified)))))
                   (current-buffer)))
 
+(defun nlinum--current-line-update ()
+  "Update current line number."
+  (let ((last-line nlinum--current-line))
+    (setq nlinum--current-line (save-excursion
+                                 (forward-line 0)
+                                 (nlinum--line-number-at-pos)))
+
+    (let ((line-diff (- last-line nlinum--current-line))
+          beg end)
+      ;; Remove the text properties only if the current line has changed.
+      (when (not (zerop line-diff))
+        (if (natnump line-diff)
+            ;; Point is moving upward.
+            (progn
+              (setq beg (line-beginning-position))
+              (setq end (line-end-position (1+ line-diff))))
+          ;; Point is moving downward.
+          (setq beg (line-beginning-position (1+ line-diff)))
+          (setq end (line-end-position)))
+
+        ;; (message "curr-line:%d [beg/end:%d/%d] -- last-line:%d"
+        ;;          nlinum--current-line beg end last-line)
+        (with-silent-modifications
+          (remove-text-properties beg
+                                  ;; Handle the case of blank lines too.
+                                  (min (point-max) (1+ end))
+                                  '(fontified)))))))
+
 ;; (defun nlinum--ol-count ()
 ;;   (let ((i 0))
 ;;     (dolist (ol (overlays-in (point-min) (point-max)))
@@ -192,8 +251,9 @@ Linum mode is a buffer-local minor mode."
   (setq nlinum--line-number-cache nil))
 
 (defun nlinum--line-number-at-pos ()
-  "Like `line-number-at-pos' but sped up with a cache."
-  ;; (assert (bolp))
+  "Like `line-number-at-pos' but sped up with a cache.
+Only works right if point is at BOL."
+  ;; (cl-assert (bolp))
   (let ((pos
          (if (and nlinum--line-number-cache
                   (> (- (point) (point-min))
@@ -215,11 +275,17 @@ Used by the default `nlinum-format-function'."
 
 (defvar nlinum-format-function
   (lambda (line width)
-    (let ((str (format nlinum-format line)))
+    (let* ((is-current-line (= line nlinum--current-line))
+           (str (format nlinum-format line)))
       (when (< (length str) width)
         ;; Left pad to try and right-align the line-numbers.
         (setq str (concat (make-string (- width (length str)) ?\ ) str)))
-      (put-text-property 0 width 'face 'linum str)
+      (put-text-property 0 width 'face
+                         (if (and nlinum-highlight-current-line
+                                  is-current-line)
+                             'nlinum-current-line
+                           'linum)
+                         str)
       str))
   "Function to build the string representing the line number.
 Takes 2 arguments LINE and WIDTH, both of them numbers, and should return
diff --git a/packages/notes-mode/notes-index-mode.el 
b/packages/notes-mode/notes-index-mode.el
index 5d959ec..16012d5 100644
--- a/packages/notes-mode/notes-index-mode.el
+++ b/packages/notes-mode/notes-index-mode.el
@@ -102,7 +102,7 @@ Tenses passive will be."
       (if (and notes-mode-complete-subjects (not notes-subject-table))
          (setq notes-subject-table (make-vector
                                     (- (expt
-                                     8 
+                                     8
                                      (length
                                       (format
                                        "%o"
@@ -163,10 +163,10 @@ Returns the buffer position of a successful hit, or nil."
 
 (defun notes-index-goto-date (date &optional direction)
   "Goto the DATE in the current line of the index file, modified by DIRECTION.
-If DIRECTION is 'this, go there.
-If DIRECTION is 'next or 'prev, go to the corresponding entry.
+If DIRECTION is `this', go there.
+If DIRECTION is `next' or `prev', go to the corresponding entry.
 If the entry doesn't exist, then go to the nearest entry according
-to DIRECTION (and the next one if DIRECTION is 'this)."
+to DIRECTION (and the next one if DIRECTION is `this')."
   (cond
    ((eq direction 'prev)
     (notes-index-date-search
@@ -190,7 +190,7 @@ to DIRECTION (and the next one if DIRECTION is 'this)."
 (defun notes-index-link (link &optional tag where)
   "* Follow a notes-index LINK.
 Optionally takes a subject TAG and
-WHERE ('otherwindow or nil) to open the new file."
+WHERE (`otherwindow' or nil) to open the new file."
   (interactive "sNotes-index link: ")
   (notes-w3-url (notes-file-to-url link tag) where t))
 
@@ -203,7 +203,7 @@ WHERE ('otherwindow or nil) to open the new file."
 (defun notes-index-follow-link (pt &optional where)
   "Follow a link at PT in notes-index-mode.
 The link is taken from the location PT,
-and the new information is shown WHERE (either 'otherwindow or not)."
+and the new information is shown WHERE (either `otherwindow' or nil)."
   (interactive "d")
   (save-excursion
     (let (start date tag)
diff --git a/packages/notes-mode/notes-mode.el 
b/packages/notes-mode/notes-mode.el
index f113bb6..2f7d766 100644
--- a/packages/notes-mode/notes-mode.el
+++ b/packages/notes-mode/notes-mode.el
@@ -22,7 +22,7 @@
 
 
 ;;; Commentary:
-;; 
+;;
 
 ;;; Code:
 
@@ -44,7 +44,7 @@
 
 
 (defun notes-beginning-of-defun ()
-  "Go to the beginning of a notes ``section''."
+  "Go to the beginning of a notes “section”."
   (interactive)
   (let
       ((old-point (point)))
@@ -59,7 +59,7 @@
       (re-search-backward notes-beginning-of-defun-regexp nil 'to-limit))))
 
 (defun notes-end-of-defun ()
-  "Go to the end of a notes ``section''."
+  "Go to the end of a notes “section”."
   (interactive)
   (let ((regexp notes-beginning-of-defun-regexp))
     (if (looking-at regexp)
@@ -120,7 +120,7 @@ we go to the last note based upon the index file."
     ;; undoing our work).
     (if (eq start-buffer (car end-buffer-and-point))
        (goto-char (cdr end-buffer-and-point)))))
-       
+
 
 (defun notes-follow-next-link ()
   "Go to the next link for this topic."
@@ -146,14 +146,14 @@ Currently this is just a hack."
     (if value
        (car (cdr value))
       key)))
-  
+
 
 (defun notes-complete-subject ()
   "Complete the notes subject under point."
   (interactive)
   (let
-      ((subject (save-excursion 
-                 (beginning-of-line) 
+      ((subject (save-excursion
+                 (beginning-of-line)
                  (notes-extract-subject t)))
        old-completion-ignore-case
        full-subject)
@@ -174,7 +174,7 @@ Currently this is just a hack."
        (t   ;; Do our own completion.
        (setq full-subject (try-completion subject notes-subject-table)
              subject (completing-read "Subject: "
-                                      notes-subject-table nil nil 
+                                      notes-subject-table nil nil
                                       (if (stringp full-subject)
                                           full-subject
                                         subject)))
@@ -196,7 +196,7 @@ Currently this code only handles brand new entries."
       (goto-char (point-min))
       (if (re-search-forward
            (concat "^" (regexp-quote subject) ":.* \\([0-9]+\\)$")
-           (point-max) t) 
+           (point-max) t)
           (save-window-excursion
             (cond ((and (notes-w3-url
                          (notes-file-to-url (match-string 1) subject))
@@ -207,7 +207,7 @@ Currently this code only handles brand new entries."
                     (delete-char 6)
                     (insert this-url)
                     (setq last-url (notes-current-url))
-                    (if (and (null pre-modified) 
+                    (if (and (null pre-modified)
                              (>= notes-electric-prevnext 2))
                         (save-buffer))))))))
     (if last-url
@@ -225,7 +225,7 @@ Currently this code only handles brand new entries."
        (save-excursion
          (beginning-of-line)
          (and (not (eq cur-point (point)))  ;; normal return if at b-o-ln
-              (notes-extract-subject t)))) 
+              (notes-extract-subject t))))
       (progn (notes-underline-line)
             (if notes-electric-prevnext
                 (notes-fix-prevnext-this-entry)))
@@ -251,19 +251,19 @@ If we're not in an entry, we leave you in the index file.
 If the current date doesn't exist, error in DIRECTION.
 Returns nil if on errors (no index; no date in DIRECTION),
 otherwise the point of the hit."
-  (interactive) 
+  (interactive)
   (let ((start-buffer (current-buffer))
        (subject (notes-extract-subject))  ; get subject if on it
-       (date (if (null (buffer-file-name)) nil 
+       (date (if (null (buffer-file-name)) nil
                (file-name-nondirectory (buffer-file-name)))))
     ;; Try and get the subject, either forward...
     (if (not subject)
-       (save-excursion 
+       (save-excursion
          (notes-beginning-of-defun)
          (setq subject (notes-extract-subject))))
     ;;    ...or backwards.
     (if (not subject)
-       (save-excursion 
+       (save-excursion
          (notes-end-of-defun)
          (setq subject (notes-extract-subject))))
     ;; Form and jump to the url for the index-entry.
@@ -409,7 +409,7 @@ Use the mknew cache if possible."
                    " '"
                    ;; FIXME: Use shell-quote-argument.
                   (buffer-file-name) "'") 't)))))
-  
+
 
 ;;;
 ;;; encryption
@@ -418,7 +418,7 @@ Use the mknew cache if possible."
 ;; or mailcrypt 3.4.x or >=3.5.x
 ;;
 
-(defvar notes-encryption-library 
+(defvar notes-encryption-library
   'mailcrypt
 ;  (cond
 ;   ((fboundp 'mc-encrypt-region) 'mailcrypt)
@@ -546,10 +546,10 @@ Should have a leading 0x.")
          (forward-line 1)))
       (setq start (point))
       ;; sanity check
-      (if (re-search-forward "^-----BEGIN PGP MESSAGE" 
-                            (progn 
-                              (save-excursion 
-                                (notes-end-of-defun) 
+      (if (re-search-forward "^-----BEGIN PGP MESSAGE"
+                            (progn
+                              (save-excursion
+                                (notes-end-of-defun)
                                 (point))) t)
          (error "Note is already encrypted."))
       ;; find the end
@@ -567,10 +567,10 @@ Should have a leading 0x.")
   (save-excursion
     (if (not (looking-at notes-beginning-of-defun-regexp))
        (notes-beginning-of-defun))
-    (if (null (re-search-forward "^-----BEGIN PGP" 
-                                (progn 
-                                  (save-excursion 
-                                    (notes-end-of-defun) 
+    (if (null (re-search-forward "^-----BEGIN PGP"
+                                (progn
+                                  (save-excursion
+                                    (notes-end-of-defun)
                                     (point))) t))
        (error "Note is not encrypted."))
     (beginning-of-line)
@@ -667,17 +667,17 @@ Inside a notes buffer one can click on URLs and follow 
them to
 other notes files.
 
 See the file notes-variables.el for all customization options.
-To change options, (require 'notes-variables) in your .emacs
+To change options, (require \\='notes-variables) in your .emacs
 and then change things.
 
 Subjects in notes mode are lines beginning with an asterisk
-and underlined with dashes.  Subjects can be completed 
+and underlined with dashes.  Subjects can be completed
 with \\[notes-complete-subject] and are automatically underlined.
 
 You may wish to add this code to your .emacs file:
-    (add-to-list 'auto-mode-alist
-       (cons \"/9[0-9][0-9][0-9][0-9][0-9].?\\\\'\" 'notes-mode))
-    (define-key global-map [?\\C-c ?n] 'notes-index-todays-link)
+    (add-to-list \\='auto-mode-alist
+      (cons \"/9[0-9][0-9][0-9][0-9][0-9].?\\\\\\='\" \\='notes-mode))
+    (define-key global-map [?\\C-c ?n] \\='notes-index-todays-link)
 to automatically enter notes mode.
 
 I have two suggestions for how to organize your notes files.
diff --git a/packages/notes-mode/notes-url.el b/packages/notes-mode/notes-url.el
index 407f644..496f386 100644
--- a/packages/notes-mode/notes-url.el
+++ b/packages/notes-mode/notes-url.el
@@ -44,8 +44,8 @@ This record is useful for debugging.")
 (defun notes-w3-url (url &optional where best-effort)
   "Open a notes-url.  Handle simple URLs here, or call notes-w3-alternate-url.
 Takes the URL as an argument.  Optionally you specify
-WHERE the information should appear (either 'otherwindow or not,
-defaults to not).
+WHERE the information should appear (either `otherwindow' or nil,
+defaults to nil).
 BEST-EFFORT causes notes-w3-url allows the tag portion of the URL to not
 match.  If there's no tag match, it looks for the nearest matching prefix.
 
@@ -54,7 +54,7 @@ URLs optionally can begin with an URL: tag, which will be 
ignored.
 notes-w3-url handles only <file://localhost/...> (or <file:///...>) URLs.
 Other URLs it hands off to the routine in notes-w3-alternate-url
 for processing.  If you use w3-mode, then
-    (setq notes-w3-alternate-url 'w3-follow-link)
+    (setq notes-w3-alternate-url \\='w3-follow-link)
 will have w3 handle tough URLs."
   (if (string-match "\\`[Uu][Rr][Ll]:" url)
       (setq url (substring url 4)))
@@ -91,7 +91,7 @@ will have w3 handle tough URLs."
        t))))
 
 (defun notes-w3-url-tag-backup (tag)
-  "Strip the last ``part'' off of TAG."
+  "Strip the last “part” off of TAG."
   (let ((result)
        (separators " /\t.:")
        (buf (get-buffer-create " *notes-w3-url-tag-backup")))
@@ -110,7 +110,7 @@ will have w3 handle tough URLs."
   "Find the TAG in the current buffer according to MODE.
 BEST-EFFORT is either t (do prefix matching),
 nil find the tag exactly,
-or 'searching (used internally)."
+or `searching' (used internally)."
   (cond
    ((not tag) nil)
    ((and (string= tag "") (eq best-effort 'searching)) nil)
@@ -127,17 +127,17 @@ or 'searching (used internally)."
       (if (not best-effort)
          (error "Cannot find tag ``%s'' in %s." tag fname))
       (notes-w3-url-tag (notes-w3-url-tag-backup tag) 'searching)))))
-  
+
 
 (defun notes-w3-pass-through-alternate-url (url &optional where)
   "Pass a click event through to the old binding for notes-w3-url.
 Try this combination:
-  (add-hook 'notes-mode-load-hooks
+  (add-hook \\='notes-mode-load-hooks
             (function (lambda ()
                         (define-key notes-mode-map [mouse-2]
-                          'notes-w3-follow-link-mouse)
+                          \\='notes-w3-follow-link-mouse)
                         (setq notes-w3-alternate-url
-                          'notes-w3-my-alternate-url))))"
+                          \\='notes-w3-my-alternate-url))))"
   (let ((event last-input-event))
     (funcall (lookup-key
              (current-global-map)
@@ -147,7 +147,7 @@ Try this combination:
 ;;;###autoload
 (defun notes-w3-follow-link (pt &optional where)
   "* Follow the URL at the point.
-Takes a PT to look at and a WHERE to open the URL ('otherwindow or nil).
+Takes a PT to look at and a WHERE to open the URL (`otherwindow' or nil).
 This code works hard to recognize URLs based on context information.
 URLs can be quoted by whitespace, beginning and end of lines,
 or the official < and >.
diff --git a/packages/notes-mode/notes-variables.el 
b/packages/notes-mode/notes-variables.el
index de141c5..7a20967 100644
--- a/packages/notes-mode/notes-variables.el
+++ b/packages/notes-mode/notes-variables.el
@@ -101,7 +101,7 @@ Turning this off for large notes-index's can improve 
performance.")
 
 (defvar notes-bold-face 'notes-bold-face
   "* Face to use for notes-index-mode and notes-mode subjects.
-The default face is copied from 'bold.")
+The default face is copied from `bold'.")
 
 (defvar notes-font-lock-keywords
   '(("^\\* .*$" . notes-bold-face)
diff --git a/packages/num3-mode/num3-mode.el b/packages/num3-mode/num3-mode.el
index 5026cbe..d4f12e0 100644
--- a/packages/num3-mode/num3-mode.el
+++ b/packages/num3-mode/num3-mode.el
@@ -45,10 +45,12 @@ font-lock is on."
   :group 'text)
 
 (defcustom num3-group-size 3
-  "Number of digits to group in decimal numbers.")
+  "Number of digits to group in decimal numbers."
+  :type 'integer)
 
 (defcustom num3-threshold 5
-  "Number must be at least that long to start highlighting.")
+  "Number must be at least that long to start highlighting."
+  :type 'integer)
 
 (defface num3-face-odd
   '((t))
@@ -92,7 +94,7 @@ where) decimal point (would be) is."
         (font-lock-add-keywords nil '(num3--matcher) 'append))
     (font-lock-remove-keywords nil '(num3--matcher)))
   (if (fboundp 'font-lock-flush) (font-lock-flush)
-    (when font-lock-mode (font-lock-fontify-buffer))))
+    (when font-lock-mode (with-no-warnings (font-lock-fontify-buffer)))))
 
 ;;;###autoload
 (define-globalized-minor-mode global-num3-mode num3-mode num3-mode)
diff --git a/packages/oauth2/oauth2.el b/packages/oauth2/oauth2.el
index 180f791..c8807f3 100644
--- a/packages/oauth2/oauth2.el
+++ b/packages/oauth2/oauth2.el
@@ -1,9 +1,9 @@
 ;;; oauth2.el --- OAuth 2.0 Authorization Protocol
 
-;; Copyright (C) 2011-2013 Free Software Foundation, Inc
+;; Copyright (C) 2011-2016 Free Software Foundation, Inc
 
 ;; Author: Julien Danjou <address@hidden>
-;; Version: 0.10
+;; Version: 0.11
 ;; Keywords: comm
 
 ;; This file is part of GNU Emacs.
@@ -189,18 +189,28 @@ This allows to store the token in an unique way."
 (defvar oauth--url-advice nil)
 (defvar oauth--token-data)
 
+(defun oauth2-authz-bearer-header (token)
+  "Return `Authoriztions: Bearer' header with TOKEN."
+  (cons "Authorization" (format "Bearer %s" token)))
+
+(defun oauth2-extra-headers (extra-headers)
+  "Return EXTRA-HEADERS with `Authorization: Bearer' added."
+  (cons (oauth2-authz-bearer-header (oauth2-token-access-token (car 
oauth--token-data)))
+        extra-headers))
+
+
 ;; FIXME: We should change URL so that this can be done without an advice.
 (defadvice url-http-handle-authentication (around oauth-hack activate)
   (if (not oauth--url-advice)
       ad-do-it
     (let ((url-request-method url-http-method)
           (url-request-data url-http-data)
-          (url-request-extra-headers url-http-extra-headers)))
-    (url-retrieve-internal (oauth2-url-append-access-token
-                            (oauth2-refresh-access (car oauth--token-data))
-                            (cdr oauth--token-data))
-                           url-callback-function
-                           url-callback-arguments)
+          (url-request-extra-headers
+           (oauth2-extra-headers url-http-extra-headers))))
+    (oauth2-refresh-access (car oauth--token-data))
+    (url-retrieve-internal (cdr oauth--token-data)
+               url-callback-function
+               url-callback-arguments)
     ;; This is to make `url' think it's done.
     (when (boundp 'success) (setq success t)) ;For URL library in Emacs<24.4.
     (setq ad-return-value t)))                ;For URL library in Emacs≥24.4.
@@ -213,9 +223,9 @@ TOKEN can be obtained with `oauth2-auth'."
     (let ((oauth--url-advice t)         ;Activate our advice.
           (url-request-method request-method)
           (url-request-data request-data)
-          (url-request-extra-headers request-extra-headers))
-      (url-retrieve-synchronously
-       (oauth2-url-append-access-token token url)))))
+          (url-request-extra-headers
+           (oauth2-extra-headers request-extra-headers)))
+      (url-retrieve-synchronously url))))
 
 ;;;###autoload
 (defun oauth2-url-retrieve (token url callback &optional
@@ -229,10 +239,9 @@ when finished.  See `url-retrieve'."
     (let ((oauth--url-advice t)         ;Activate our advice.
           (url-request-method request-method)
           (url-request-data request-data)
-          (url-request-extra-headers request-extra-headers))
-      (url-retrieve
-       (oauth2-url-append-access-token token url)
-       callback cbargs))))
+          (url-request-extra-headers
+           (oauth2-extra-headers request-extra-headers)))
+      (url-retrieve url callback cbargs))))
 
 (provide 'oauth2)
 
diff --git a/packages/other-frame-window/other-frame-window.el 
b/packages/other-frame-window/other-frame-window.el
index 2427ce6..979d18f 100755
--- a/packages/other-frame-window/other-frame-window.el
+++ b/packages/other-frame-window/other-frame-window.el
@@ -120,7 +120,7 @@
             #'ofw--preserve-state))
 
 (defun ofw-delete-from-overriding ()
-  "Remove ourselves from 'display-buffer-overriding-action' action list, if 
present."
+  "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 (remq #'ofw-display-buffer-other-frame
@@ -142,7 +142,7 @@
   "Show BUFFER in another window in the current frame,
 creating new window if needed and allowed.
 If successful, return window; else return nil.
-Intended for 'display-buffer-overriding-action'."
+Intended for `display-buffer-overriding-action'."
   ;; Reset for next display-buffer call.  Normally, this is taken care
   ;; of by ofw--reset-prefix, but we do it here in case the user does
   ;; two ofw prefixed commands consecutively.
@@ -161,7 +161,7 @@ Intended for 'display-buffer-overriding-action'."
 (defun ofw-display-buffer-other-frame (buffer alist)
   "Show BUFFER in another frame, creating a new frame if needed.
 If successful, return window; else return nil.
-Intended for 'display-buffer-overriding-action'."
+Intended for `display-buffer-overriding-action'."
   ;; Reset for next display-buffer call.
   (ofw-delete-from-overriding)
 
@@ -179,7 +179,7 @@ This allows `switch-to-buffer' to respect 
`ofw-other-window',
     (funcall orig-fun buffer norecord force-same-window)))
 
 (defun ofw--suspend-and-restore (orig-func &rest args)
-  "Call ORIG-FUNC without any ofw actions on 
'display-buffer-overriding-action'."
+  "Call ORIG-FUNC without any ofw actions on 
`display-buffer-overriding-action'."
   (let ((display-buffer-overriding-action display-buffer-overriding-action))
     (ofw-delete-from-overriding)
     (apply orig-func args)))
diff --git a/packages/poker/poker.el b/packages/poker/poker.el
index 55f22be..fbfa78c 100644
--- a/packages/poker/poker.el
+++ b/packages/poker/poker.el
@@ -1,10 +1,10 @@
-;;; poker.el --- Texas hold'em poker
+;;; poker.el --- Texas hold 'em poker
 
-;; Copyright (C) 2014  Free Software Foundation, Inc.
+;; Copyright (C) 2014, 2016  Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <address@hidden>
 ;; Maintainer: Mario Lang <address@hidden>
-;; Version: 0.1
+;; Version: 0.2
 ;; Keywords: games
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -22,7 +22,13 @@
 
 ;;; Commentary:
 
-;; poker.el provides texas hold'em poker gameplay for Emacs.
+;; poker.el provides Texas hold 'em poker gameplay for Emacs.
+
+;;; Todo:
+
+;; * Provide a better user interface.  A buffer should be used to keep
+;;   the state and visual representation of a table/game.
+;; * Smarter AIs.
 
 ;;; Requires:
 
@@ -57,6 +63,176 @@
                                      ((eq rank 'queen) #xD)
                                      ((eq rank 'king)  #XE)
                                      (t                rank))))))))
+(defconst poker-pre-flop-starting-hands
+  '((AA 0.8551 0.7375 0.6422 0.5622 0.4946 0.4388 0.3907 0.349 0.3134 0.2828)
+    (KK 0.8273 0.692 0.586 0.5022 0.4331 0.3785 0.332 0.2951 0.2638 0.2386)
+    (QQ 0.8017 0.6536 0.5387 0.4525 0.3829 0.3298 0.2878 0.2535 0.2265 0.2045)
+    (JJ 0.7781 0.6166 0.496 0.4072 0.3406 0.2904 0.2511 0.2214 0.1984 0.181)
+    (TT 0.7538 0.5807 0.4568 0.3689 0.3044 0.2577 0.2238 0.1979 0.1771 0.1626)
+    (99 0.7251 0.541 0.4159 0.33 0.2709 0.2293 0.1989 0.1767 0.1605 0.1483)
+    (88 0.6965 0.5052 0.3808 0.2995 0.2443 0.2084 0.1818 0.1634 0.1499 0.1391)
+    (AKs 0.6787 0.5185 0.425 0.3655 0.3216 0.2876 0.2602 0.2362 0.2179 0.2004)
+    (AQs 0.6718 0.5059 0.4104 0.3492 0.3056 0.272 0.2451 0.2228 0.2042 0.1884)
+    (77 0.6674 0.47 0.3492 0.2728 0.2231 0.1912 0.1685 0.1524 0.141 0.1331)
+    (AJs 0.6637 0.495 0.398 0.3365 0.2927 0.2591 0.2337 0.2131 0.1956 0.1813)
+    (AK 0.6614 0.4933 0.3965 0.334 0.29 0.2556 0.2257 0.2027 0.183 0.1647)
+    (ATs 0.6575 0.4845 0.388 0.3266 0.2827 0.2508 0.2259 0.2057 0.1888 0.1747)
+    (AQ 0.6532 0.4804 0.3804 0.3175 0.2726 0.2376 0.2101 0.1858 0.1683 0.1521)
+    (AJ 0.6467 0.4673 0.3673 0.3029 0.258 0.2241 0.197 0.1752 0.1569 0.1414)
+    (KQs 0.6438 0.4828 0.3937 0.3377 0.2947 0.2639 0.2374 0.2156 0.1977 0.1825)
+    (A9s 0.6404 0.4606 0.3617 0.2999 0.2574 0.2263 0.2032 0.184 0.1689 0.1556)
+    (66 0.6394 0.4383 0.3205 0.2499 0.2054 0.178 0.1582 0.145 0.1353 0.1278)
+    (AT 0.6389 0.4582 0.3555 0.2918 0.2467 0.2134 0.1878 0.1664 0.1492 0.1347)
+    (KJs 0.6365 0.4712 0.3824 0.3244 0.2829 0.2513 0.2265 0.2071 0.1893 0.1755)
+    (A8s 0.633 0.4531 0.354 0.2915 0.2498 0.219 0.1972 0.1785 0.1638 0.1511)
+    (KTs 0.6302 0.4631 0.3713 0.3137 0.2736 0.2418 0.2185 0.1991 0.184 0.1703)
+    (A7s 0.6261 0.4434 0.3436 0.2827 0.2425 0.2123 0.1908 0.1732 0.1592 0.1477)
+    (KQ 0.6254 0.4559 0.3644 0.3051 0.2626 0.2289 0.2038 0.1814 0.1632 0.1476)
+    (A9 0.6208 0.4325 0.3282 0.2635 0.2192 0.1866 0.1631 0.1429 0.127 0.1146)
+    (A5s 0.6182 0.4351 0.3396 0.2804 0.2413 0.2142 0.1928 0.1757 0.1621 0.1513)
+    (KJ 0.6167 0.4443 0.3509 0.291 0.2484 0.2166 0.1916 0.1702 0.1528 0.1387)
+    (A6s 0.6162 0.4318 0.3326 0.2743 0.2351 0.2073 0.1867 0.1697 0.1564 0.1451)
+    (QJs 0.6138 0.455 0.3702 0.3156 0.2762 0.2453 0.2211 0.2019 0.1855 0.1721)
+    (A8 0.6132 0.4234 0.3185 0.2537 0.2109 0.1794 0.1557 0.1368 0.1216 0.1096)
+    (K9s 0.613 0.439 0.3458 0.2865 0.2474 0.2179 0.1955 0.1764 0.1616 0.1501)
+    (55 0.6097 0.4074 0.2951 0.2291 0.1908 0.1655 0.1491 0.1365 0.1291 0.1219)
+    (KT 0.6095 0.4344 0.3391 0.2795 0.2377 0.2062 0.182 0.1623 0.1463 0.133)
+    (A4s 0.6091 0.4264 0.3308 0.2737 0.2366 0.2094 0.1882 0.172 0.1584 0.1474)
+    (QTs 0.6076 0.4459 0.3607 0.3052 0.2658 0.237 0.2141 0.1956 0.1803 0.1675)
+    (A7 0.6049 0.4124 0.3085 0.2448 0.2018 0.1723 0.1499 0.1312 0.1164 0.1052)
+    (A3s 0.6008 0.4184 0.323 0.2675 0.2316 0.204 0.1847 0.1685 0.1555 0.1443)
+    (K8s 0.5985 0.4194 0.3251 0.2685 0.2291 0.2015 0.1799 0.1634 0.1499 0.1393)
+    (A5 0.5976 0.4047 0.3026 0.2409 0.2012 0.1734 0.1514 0.1336 0.1196 0.1084)
+    (A6 0.5945 0.4012 0.2965 0.2347 0.194 0.1654 0.1443 0.1275 0.113 0.1022)
+    (QJ 0.5937 0.4274 0.34 0.2836 0.2426 0.2115 0.1873 0.167 0.1503 0.1374)
+    (A2s 0.5928 0.4081 0.3147 0.2597 0.2244 0.1985 0.1793 0.1629 0.1503 0.1397)
+    (K7s 0.5927 0.4121 0.3174 0.2617 0.224 0.1961 0.1761 0.1594 0.1461 0.1359)
+    (K9 0.5922 0.4092 0.3108 0.251 0.21 0.1798 0.1562 0.138 0.123 0.1105)
+    (Q9s 0.5909 0.4223 0.3346 0.2789 0.2404 0.2122 0.1898 0.1725 0.1592 0.1476)
+    (JTs 0.5894 0.4354 0.3532 0.3017 0.2633 0.2351 0.2124 0.1954 0.1807 0.1688)
+    (A4 0.5876 0.3943 0.2932 0.2339 0.1949 0.1673 0.146 0.1295 0.1164 0.105)
+    (QT 0.5863 0.4173 0.3283 0.2712 0.2323 0.2017 0.1778 0.1589 0.1448 0.1325)
+    (K6s 0.5858 0.4038 0.3101 0.2543 0.2173 0.1918 0.1719 0.1556 0.1434 0.1332)
+    (A3 0.5784 0.3846 0.2848 0.2266 0.1894 0.1616 0.1416 0.1249 0.1122 0.1014)
+    (K5s 0.5776 0.3947 0.3024 0.2488 0.2136 0.1876 0.1683 0.1531 0.1408 0.1309)
+    (44 0.577 0.3741 0.2686 0.2114 0.1776 0.1564 0.1432 0.133 0.1256 0.1194)
+    (Q8s 0.5765 0.4026 0.3132 0.2586 0.2226 0.1955 0.1748 0.1593 0.1469 0.1353)
+    (K8 0.576 0.3878 0.2887 0.2304 0.19 0.1616 0.1402 0.1234 0.1101 0.0984)
+    (J9s 0.5725 0.4117 0.3281 0.2753 0.238 0.2106 0.1896 0.1725 0.1605 0.1493)
+    (A2 0.5694 0.3739 0.2755 0.2185 0.1811 0.1552 0.1352 0.1197 0.1065 0.0967)
+    (K7 0.5692 0.3787 0.2813 0.2232 0.1835 0.1565 0.1344 0.1187 0.1053 0.095)
+    (K4s 0.5691 0.3866 0.2953 0.2425 0.2075 0.1829 0.1635 0.1501 0.1374 0.1286)
+    (Q9 0.5686 0.3918 0.3001 0.2436 0.2039 0.1758 0.153 0.1357 0.1211 0.11)
+    (JT 0.5667 0.4056 0.3221 0.2696 0.2296 0.2016 0.1779 0.1612 0.147 0.1349)
+    (Q7s 0.5614 0.3831 0.2948 0.2419 0.2061 0.1813 0.1627 0.1474 0.1358 0.1262)
+    (K6 0.5607 0.3704 0.2729 0.2152 0.1777 0.1498 0.1304 0.1151 0.1023 0.0915)
+    (K3s 0.5597 0.3785 0.2889 0.236 0.2025 0.1787 0.1601 0.1459 0.1343 0.1254)
+    (J8s 0.557 0.3918 0.3075 0.2559 0.2203 0.1946 0.1748 0.1584 0.1466 0.1367)
+    (T9s 0.5558 0.4035 0.3256 0.2742 0.2394 0.2124 0.1918 0.1757 0.1636 0.1529)
+    (Q6s 0.5555 0.3762 0.2888 0.2363 0.2023 0.1778 0.1585 0.1449 0.1332 0.1227)
+    (K5 0.5538 0.3615 0.2648 0.2087 0.1721 0.1458 0.1263 0.1112 0.0996 0.0892)
+    (Q8 0.5531 0.3708 0.2787 0.2229 0.1848 0.1556 0.136 0.1202 0.1069 0.0968)
+    (K2s 0.5514 0.3692 0.281 0.2304 0.1985 0.1746 0.157 0.1436 0.1322 0.1231)
+    (J9 0.5491 0.38 0.295 0.2415 0.203 0.1747 0.1539 0.1375 0.1233 0.1127)
+    (Q5s 0.5484 0.3695 0.2808 0.2313 0.1969 0.1739 0.156 0.1417 0.1303 0.1215)
+    (33 0.5454 0.3437 0.2457 0.1946 0.1665 0.1502 0.1385 0.1299 0.1234 0.1176)
+    (K4 0.5436 0.3524 0.2563 0.2011 0.1659 0.1406 0.1215 0.107 0.0961 0.0865)
+    (J7s 0.542 0.373 0.2874 0.2375 0.2036 0.1794 0.1599 0.1462 0.1349 0.1258)
+    (T8s 0.5417 0.3852 0.3055 0.2551 0.2205 0.1962 0.1766 0.1626 0.1506 0.1406)
+    (Q4s 0.5392 0.3613 0.2743 0.2248 0.1916 0.1689 0.1527 0.1388 0.1271 0.1189)
+    (Q7 0.5371 0.35 0.2581 0.2035 0.1674 0.1411 0.122 0.1079 0.0956 0.0865)
+    (K3 0.5354 0.3431 0.248 0.1946 0.1602 0.1353 0.1182 0.104 0.0925 0.0834)
+    (J8 0.5321 0.3596 0.2722 0.2202 0.1833 0.1565 0.1372 0.1215 0.1094 0.0993)
+    (T9 0.532 0.3736 0.2929 0.2411 0.2038 0.1777 0.1571 0.1415 0.1288 0.1185)
+    (Q3s 0.5316 0.3524 0.2671 0.2189 0.1868 0.1654 0.1474 0.135 0.1246 0.1161)
+    (Q6 0.5305 0.3429 0.2512 0.1976 0.1619 0.1367 0.1177 0.104 0.0923 0.0833)
+    (98s 0.5275 0.3775 0.3009 0.2516 0.2168 0.1916 0.1729 0.1586 0.1464 0.1372)
+    (T7s 0.5264 0.3655 0.2859 0.2377 0.2045 0.1817 0.163 0.1496 0.1385 0.1296)
+    (J6s 0.5262 0.3532 0.2704 0.2217 0.1894 0.1659 0.1489 0.1359 0.1255 0.1169)
+    (K2 0.5254 0.3331 0.24 0.1886 0.1549 0.1317 0.1142 0.1006 0.0891 0.0809)
+    (Q5 0.5227 0.3354 0.2444 0.1907 0.1566 0.1326 0.1141 0.1006 0.0903 0.0815)
+    (Q2s 0.5224 0.3438 0.2598 0.2137 0.1824 0.1609 0.1441 0.1318 0.122 0.1129)
+    (J5s 0.5214 0.348 0.2658 0.2172 0.1855 0.1636 0.1469 0.134 0.1233 0.1147)
+    (J7 0.5164 0.3379 0.2518 0.1995 0.1651 0.1403 0.1216 0.1075 0.0967 0.0878)
+    (T8 0.5157 0.3522 0.2715 0.2207 0.1851 0.1596 0.1404 0.1262 0.1148 0.1057)
+    (Q4 0.5132 0.3249 0.2352 0.1835 0.1506 0.1276 0.1103 0.0973 0.0867 0.0787)
+    (J4s 0.5126 0.3397 0.2586 0.2115 0.1814 0.1586 0.1432 0.1306 0.1203 0.1122)
+    (22 0.5125 0.3132 0.2256 0.1817 0.1587 0.1448 0.1355 0.1279 0.1224 0.1163)
+    (97s 0.5122 0.3594 0.2829 0.2357 0.2028 0.1796 0.1615 0.1481 0.1384 0.1293)
+    (T6s 0.5106 0.3468 0.2675 0.2204 0.189 0.1669 0.1505 0.1378 0.1277 0.1188)
+    (Q3 0.5044 0.3162 0.2278 0.1774 0.1455 0.1227 0.1062 0.0936 0.0837 0.0757)
+    (J3s 0.5043 0.3315 0.2506 0.2054 0.1755 0.1541 0.1394 0.1275 0.118 0.1094)
+    (87s 0.5028 0.3567 0.2828 0.2358 0.2033 0.1805 0.1633 0.1514 0.1403 0.132)
+    (98 0.5009 0.3446 0.2668 0.2159 0.181 0.1558 0.1372 0.1228 0.1122 0.1037)
+    (T7 0.5001 0.332 0.2499 0.2011 0.1671 0.1433 0.1252 0.1119 0.1017 0.0931)
+    (J6 0.5 0.3182 0.2334 0.1823 0.1496 0.1259 0.1095 0.0966 0.0863 0.0782)
+    (96s 0.4971 0.3404 0.2646 0.2192 0.1884 0.1668 0.1503 0.1377 0.127 0.1188)
+    (J2s 0.4954 0.3231 0.2437 0.1999 0.1717 0.1513 0.1359 0.1236 0.1147 0.1066)
+    (T5s 0.4952 0.3292 0.2501 0.2063 0.1761 0.1549 0.1396 0.1282 0.1188 0.1109)
+    (J5 0.4941 0.3118 0.2268 0.1775 0.1454 0.1231 0.1065 0.094 0.084 0.0764)
+    (Q2 0.494 0.3072 0.2206 0.1709 0.1408 0.1189 0.1026 0.0906 0.0804 0.0725)
+    (T4s 0.4888 0.3213 0.2456 0.2012 0.1722 0.1513 0.1368 0.1246 0.1151 0.108)
+    (86s 0.4859 0.3388 0.2662 0.2214 0.1909 0.1698 0.1538 0.1419 0.1319 0.1236)
+    (97 0.4856 0.3255 0.2475 0.1996 0.1664 0.1427 0.126 0.1121 0.1023 0.0944)
+    (J4 0.4846 0.3039 0.2184 0.1714 0.139 0.1175 0.1021 0.0904 0.0809 0.0731)
+    (T6 0.4834 0.3115 0.2304 0.182 0.151 0.1272 0.1116 0.0997 0.0899 0.0822)
+    (95s 0.4814 0.3222 0.2477 0.2033 0.1747 0.1539 0.1385 0.1266 0.1165 0.1096)
+    (T3s 0.4798 0.3138 0.2375 0.1955 0.167 0.1478 0.1332 0.1209 0.1128 0.1053)
+    (76s 0.4789 0.3382 0.2676 0.223 0.193 0.1722 0.1572 0.1452 0.1356 0.1278)
+    (J3 0.4757 0.2944 0.2106 0.1645 0.1336 0.1133 0.0983 0.0862 0.0775 0.0703)
+    (87 0.474 0.3238 0.2478 0.1999 0.1677 0.1446 0.1279 0.1153 0.1056 0.0983)
+    (T2s 0.4715 0.3056 0.2314 0.1892 0.1628 0.1435 0.1298 0.1183 0.1097 0.1029)
+    (85s 0.4703 0.3206 0.2488 0.205 0.177 0.1573 0.1424 0.1304 0.1219 0.1147)
+    (96 0.4686 0.3059 0.2284 0.1813 0.1499 0.1283 0.1122 0.1003 0.0912 0.0836)
+    (T5 0.4664 0.2914 0.212 0.1656 0.1365 0.1158 0.1004 0.0893 0.0801 0.073)
+    (J2 0.4663 0.2856 0.2039 0.1576 0.1293 0.109 0.0945 0.083 0.0748 0.0675)
+    (75s 0.4643 0.3202 0.2515 0.2098 0.181 0.1614 0.1472 0.1366 0.1285 0.1198)
+    (94s 0.4639 0.3041 0.231 0.1884 0.1609 0.1414 0.1268 0.1159 0.1066 0.1)
+    (T4 0.4598 0.2851 0.2057 0.1602 0.1323 0.1114 0.097 0.0854 0.0769 0.07)
+    (65s 0.459 0.3217 0.2533 0.2122 0.1848 0.1654 0.1509 0.14 0.1311 0.1242)
+    (86 0.458 0.3037 0.2299 0.1833 0.1542 0.1319 0.117 0.1057 0.0973 0.0899)
+    (93s 0.4572 0.2974 0.2253 0.1837 0.1563 0.1377 0.1238 0.1129 0.1036 0.0972)
+    (84s 0.4532 0.3021 0.2313 0.1905 0.1627 0.144 0.1297 0.1195 0.11 0.1038)
+    (95 0.4517 0.2862 0.2096 0.1641 0.1348 0.1135 0.0998 0.0884 0.0796 0.073)
+    (76 0.4502 0.3041 0.2314 0.1868 0.1561 0.1357 0.121 0.1099 0.1011 0.0943)
+    (T3 0.4499 0.2775 0.1983 0.1542 0.1266 0.107 0.0928 0.0817 0.0742 0.0677)
+    (92s 0.4487 0.2899 0.2194 0.1789 0.1523 0.1339 0.1208 0.1103 0.102 0.095)
+    (74s 0.4454 0.3023 0.2339 0.1936 0.1668 0.1489 0.1345 0.1243 0.1156 0.1089)
+    (54s 0.444 0.3104 0.2435 0.2044 0.1786 0.1607 0.1483 0.1374 0.1288 0.1224)
+    (64s 0.4408 0.3049 0.2382 0.1975 0.1717 0.1535 0.1408 0.13 0.1219 0.1154)
+    (T2 0.4407 0.2683 0.191 0.1486 0.1214 0.1027 0.0893 0.0794 0.0713 0.0646)
+    (85 0.4407 0.2852 0.2114 0.1665 0.1386 0.1189 0.1042 0.0944 0.0862 0.0793)
+    (83s 0.4345 0.2832 0.2138 0.1747 0.1498 0.1318 0.1185 0.1087 0.1005 0.0938)
+    (75 0.4337 0.2848 0.2133 0.1717 0.1426 0.1241 0.1104 0.1002 0.0927 0.0862)
+    (94 0.4332 0.2656 0.1904 0.1475 0.1203 0.1008 0.0872 0.078 0.0698 0.0635)
+    (65 0.4281 0.2868 0.2169 0.1749 0.1468 0.1281 0.1149 0.1055 0.0979 0.091)
+    (82s 0.4279 0.2772 0.2094 0.1718 0.1463 0.1285 0.1159 0.1062 0.0978 0.0909)
+    (73s 0.4276 0.2833 0.2168 0.1773 0.1528 0.1356 0.1224 0.1128 0.1048 0.0985)
+    (93 0.4264 0.2592 0.1849 0.1423 0.1153 0.0971 0.0841 0.0739 0.0665 0.0601)
+    (53s 0.4248 0.292 0.228 0.1898 0.1658 0.1497 0.1375 0.1278 0.119 0.113)
+    (63s 0.4236 0.2853 0.2201 0.1818 0.158 0.141 0.1283 0.1191 0.1107 0.1042)
+    (84 0.4216 0.2648 0.1921 0.1486 0.1236 0.1044 0.0917 0.0813 0.0733 0.0676)
+    (92 0.4173 0.2511 0.1784 0.1368 0.1108 0.0928 0.0801 0.071 0.0635 0.0569)
+    (43s 0.4156 0.2826 0.2189 0.1825 0.1585 0.1431 0.1306 0.1218 0.1136 0.1071)
+    (74 0.4141 0.2652 0.1954 0.1535 0.1279 0.1097 0.0973 0.0879 0.0804 0.0742)
+    (54 0.4126 0.2739 0.2055 0.1658 0.1406 0.1234 0.1113 0.102 0.0946 0.0891)
+    (64 0.4102 0.2676 0.199 0.1594 0.134 0.1165 0.1043 0.0943 0.0871 0.0815)
+    (72s 0.4092 0.2647 0.1999 0.1623 0.1399 0.1236 0.1122 0.1026 0.0951 0.0892)
+    (52s 0.4076 0.2737 0.2106 0.1748 0.1523 0.1373 0.1252 0.1159 0.109 0.102)
+    (62s 0.4052 0.2669 0.2036 0.1666 0.1437 0.1279 0.1163 0.1072 0.0997 0.0931)
+    (83 0.4021 0.2436 0.1742 0.1335 0.1084 0.0912 0.0791 0.0707 0.0636 0.0581)
+    (42s 0.3982 0.2653 0.2033 0.1684 0.1467 0.1317 0.121 0.1119 0.1052 0.0981)
+    (82 0.3962 0.2374 0.1688 0.1292 0.1048 0.0881 0.0765 0.0677 0.0605 0.0548)
+    (73 0.3955 0.2447 0.1761 0.1375 0.1123 0.0957 0.0838 0.0749 0.0685 0.0627)
+    (53 0.3938 0.2548 0.1883 0.1505 0.1274 0.1118 0.1009 0.0915 0.0854 0.0799)
+    (63 0.3911 0.2475 0.1809 0.1419 0.1182 0.1018 0.091 0.0823 0.0752 0.0706)
+    (32s 0.3895 0.2562 0.1951 0.1609 0.1406 0.1258 0.1155 0.1066 0.0991 0.0931)
+    (43 0.3826 0.2444 0.1789 0.1428 0.12 0.1046 0.0937 0.0855 0.079 0.0735)
+    (72 0.3738 0.2244 0.1581 0.1218 0.0989 0.0835 0.0726 0.0647 0.0586 0.0538)
+    (52 0.3736 0.2342 0.1694 0.1342 0.1121 0.0975 0.0866 0.0795 0.0734 0.0683)
+    (62 0.3709 0.2273 0.1622 0.1257 0.1032 0.088 0.0777 0.0699 0.0639 0.0587)
+    (42 0.3631 0.225 0.1632 0.1271 0.1073 0.0932 0.0828 0.0755 0.0693 0.0643)
+    (32 0.3539 0.2162 0.1536 0.1202 0.0996 0.0859 0.0769 0.0698 0.0632 
0.0584)))
 
 ;;; Code:
 
@@ -93,31 +269,46 @@ RANK is one of `poker-ranks' and SUIT is one of 
`poker-suits'."
 The result is a 24 bit integer where the leftmost 4 bits (0-8) indicate the 
type
 of hand, and the remaining nibbles are rank values of decisive cards.
 The highest possible value is therefore #x8CBA98 and the lowest is #x053210."
-  (let* ((ranks (mapcar #'poker-card-rank hand))
-        (rank-counts (sort (mapcar (lambda (rank) (cons (cl-count rank ranks) 
rank))
-                                   (cl-remove-duplicates ranks))
+  (let* ((rank-counts (sort (let ((cards hand) result)
+                             (while cards
+                               (let ((rank (poker-card-rank (car cards))))
+                                 (unless (rassq rank result)
+                                   (push (cons (let ((count 1))
+                                                 (dolist (card (cdr cards) 
count)
+                                                   (when (eq (poker-card-rank 
card)
+                                                             rank)
+                                                     (setq count (1+ count)))))
+                                               rank)
+                                         result)))
+                               (setq cards (cdr cards)))
+                             result)
                            (lambda (lhs rhs) (or (> (car lhs) (car rhs))
                                                  (and (= (car lhs) (car rhs))
                                                       (> (cdr lhs) (cdr 
rhs)))))))
-        (ranks-length nil))
-    (setq ranks (mapcar #'cdr rank-counts)
-         rank-counts (mapcar #'car rank-counts)
-         ranks-length (length ranks))
-    (logior (ash (cond
-                 ((equal rank-counts '(2 1 1 1)) 1)
-                 ((eq ranks-length 5)
-                  (let ((straight (or (when (and (eq (nth 0 ranks) 12)
-                                                  (eq (nth 1 ranks) 3))
-                                         (setq ranks '(3 2 1 0 0)))
-                                       (eq (- (nth 0 ranks) (nth 4 ranks)) 4)))
-                         (flush (eq (length (cl-delete-duplicates
-                                             (mapcar #'poker-card-suit hand))) 
1)))
-                     (cond ((and straight flush) 8) (flush 5) (straight 4) (t 
0))))
-                 ((equal rank-counts '(2 2 1)) 2)
-                 ((equal rank-counts '(3 1 1)) 3)
-                 ((equal rank-counts '(3 2)) 6)
-                 ((equal rank-counts '(4 1)) 7))
-                20)
+        (ranks-length (length rank-counts))
+        (ranks (mapcar #'cdr rank-counts)))
+    (setq rank-counts (mapcar #'car rank-counts))
+    (logior (cond
+            ((eq ranks-length 4) #x100000)
+            ((eq ranks-length 5)
+             (let ((straight (or (when (and (eq (nth 0 ranks) 12)
+                                            (eq (nth 1 ranks) 3))
+                                   (setq ranks '(3 2 1 0 0)))
+                                 (eq (- (nth 0 ranks) (nth 4 ranks)) 4)))
+                   (flush (let ((suit (poker-card-suit (car hand)))
+                                (tail (cdr hand)))
+                            (while (and tail
+                                        (eq suit (poker-card-suit (car tail))))
+                              (setq tail (cdr tail)))
+                            (not tail))))
+               (cond ((and straight flush) #x800000)
+                     (straight             #x400000)
+                     (flush                #x500000)
+                     (t                      0))))
+            ((equal rank-counts '(2 2 1)) #x200000)
+            ((equal rank-counts '(3 1 1)) #x300000)
+            ((equal rank-counts '(3 2)) #x600000)
+            ((equal rank-counts '(4 1)) #x700000))
            (ash (nth 0 ranks) 16)
            (ash (nth 1 ranks) 12)
            (if (> ranks-length 2) (ash (nth 2 ranks) 8) 0)
@@ -256,69 +447,81 @@ HAND is a list of 5 poker cards."
 
 (defun poker-strength (pocket &optional community opponents)
   "Estimate the strength of POCKET and COMMUNITY cards against number of 
OPPONENTS.
-The optional number of OPPONENTS defaults to 2."
-  (let ((wins 0) (iterations 100))
-    (dotimes (i iterations)
-      (let ((deck (poker-random-deck))
-           (players (make-vector (or opponents 1) nil)))
-       (dolist (card pocket) (setq deck (delete card deck)))
-       (dolist (card community) (setq deck (delete card deck)))
-       (dotimes (cards 2)
-         (dotimes (player (or opponents 1))
-           (push (pop deck) (aref players player))))
-       (let ((board (append community nil)))
-         (dotimes (_ (- 5 (length community)))
-           (push (pop deck) board))
-         (setq wins (+ wins (caar (cl-sort
-                                   (mapcar (lambda (info)
-                                             (setcdr info (poker-best-hand
-                                                           (append (cdr info) 
board)))
-                                             info)
-                                           (nconc (list (cons 1 pocket))
-                                                  (mapcar (lambda (cards)
-                                                            (cons 0 cards))
-                                                          players)))
-                                   #'poker-hand-> :key #'cdr)))))))
-    (/ (float wins) iterations)))
+The optional number of OPPONENTS defaults to 1."
+  (or (and (not community)
+          (nth (or opponents 1)
+               (assq (poker-starting-hand-name pocket)
+                     poker-pre-flop-starting-hands)))
+      (let ((wins 0) (iterations 300))
+       (dotimes (i iterations)
+         (let ((deck (poker-random-deck))
+               (players (make-vector (or opponents 1) nil)))
+           (dolist (card pocket) (setq deck (delete card deck)))
+           (dolist (card community) (setq deck (delete card deck)))
+           (dotimes (cards 2)
+             (dotimes (player (or opponents 1))
+               (push (pop deck) (aref players player))))
+           (let ((board (append community nil)))
+             (dotimes (_ (- 5 (length community)))
+               (push (pop deck) board))
+             (setq wins (+ wins (caar (cl-sort
+                                       (mapcar (lambda (info)
+                                                 (setcdr info (poker-best-hand
+                                                               (append (cdr 
info) board)))
+                                                 info)
+                                               (nconc (list (cons 1 pocket))
+                                                      (mapcar (lambda (cards)
+                                                                (cons 0 cards))
+                                                              players)))
+                                       #'poker-hand-> :key #'cdr)))))))
+       (/ (float wins) iterations))))
+
+(defun poker-starting-hand-name (pocket)
+  (cl-assert (eq (length pocket) 2))
+  (cl-assert (not (eq (nth 0 pocket) (nth 1 pocket))))
+  (let ((rank-name (vector "2" "3" "4" "5" "6" "7" "8" "9" "T"
+                          "J" "Q" "K" "A"))
+       (rank1 (poker-card-rank (nth 0 pocket)))
+       (rank2 (poker-card-rank (nth 1 pocket)))
+       (suited (eq (poker-card-suit (nth 0 pocket))
+                   (poker-card-suit (nth 1 pocket)))))
+    (when (< rank1 rank2)
+      (let ((tmp rank1))
+       (setq rank1 rank2 rank2 tmp)))
+    (if (and (< rank1 (cl-position 10 poker-ranks))
+            (< rank2 (cl-position 10 poker-ranks))
+            (not suited))
+       (+ (* (+ rank1 2) 10) (+ rank2 2))
+      (intern (concat (aref rank-name rank1)
+                     (aref rank-name rank2)
+                     (when suited "s"))))))
 
 (defun poker-pre-flop-starting-hands (opponents)
-  (let ((rank-name (vector "2" "3" "4" "5" "6" "7" "8" "9" "T" "J" "Q" "K" 
"A"))
-       (hands ()))
-    (dolist (rank1 poker-ranks)
+  (let (hands)
+    (dolist (rank1 poker-ranks (cl-sort hands #'> :key #'cdr))
       (dolist (rank2 poker-ranks)
        (if (eq rank1 rank2)
-         (push (cons (poker-strength (list (poker-make-card rank1 'clubs)
-                                           (poker-make-card rank2 'hearts))
-                                     nil opponents)
-                     (if (memq rank1 '(2 3 4 5 6 7 8 9))
-                         (+ (* rank1 10) rank1)
-                       (intern (format "%s%s"
-                                       (aref rank-name (cl-position rank1 
poker-ranks))
-                                       (aref rank-name (cl-position rank2 
poker-ranks))))))
-               hands)
-         (when (< (cl-position rank1 poker-ranks) (cl-position rank2 
poker-ranks))
+           (push (let ((pocket (list (poker-make-card rank1 'clubs)
+                                     (poker-make-card rank2 'hearts))))
+                   (cons (poker-strength pocket nil opponents)
+                         (poker-starting-hand-name pocket)))
+                 hands)
+         (when (< (cl-position rank1 poker-ranks)
+                  (cl-position rank2 poker-ranks))
            (let ((tmp rank1))
-             (setq tmp rank1
-                   rank1 rank2
+             (setq rank1 rank2
                    rank2 tmp)))
          (dolist (suited '(nil t))
-           (let ((code (if (and (memq rank1 '(2 3 4 5 6 7 8 9))
-                                (memq rank2 '(2 3 4 5 6 7 8 9))
-                                (not suited))
-                           (+ (* rank1 10) rank2)
-                         (intern
-                          (format "%s%s%s"
-                                  (aref rank-name (cl-position rank1 
poker-ranks))
-                                  (aref rank-name (cl-position rank2 
poker-ranks))
-                                  (if suited "s" ""))))))
+           (let* ((pocket (list (poker-make-card rank1 'clubs)
+                                (poker-make-card rank2 (if suited
+                                                           'clubs 'hearts))))
+                  (code (poker-starting-hand-name pocket)))
              (unless (rassq code hands)
                (accept-process-output)
                (message "%S" code)
-               (push (cons (poker-strength
-                            (list (poker-make-card rank1 'clubs)
-                                  (poker-make-card rank2 (if suited 'clubs 
'hearts)))
-                            nil opponents) code) hands)))))))
-    (cl-sort hands #'> :key #'car)))
+               (push (cons (poker-strength pocket nil opponents)
+                           code)
+                     hands)))))))))
 
 (defun poker-pot-odds (bet pot)
   "Return the odds when BET is added to POT."
@@ -342,7 +545,7 @@ FCR-FN specifies a function to use when a fold-call-raise 
decision is required."
        (cons 'wagered 0)
        (cons 'pocket nil)
        (cons 'fcr-fn fcr-fn)))
-  
+
 (defun poker-player-name (player)
   "Return the name of poker PLAYER."
   (cdr (assq 'name player)))
@@ -589,7 +792,7 @@ FCR-FN specifies a function to use when a fold-call-raise 
decision is required."
               (poker-player-name (car winners))
               (poker-distribute-winnings winners players))
       winners))
-   
+
    ;; pre-flop, second round of bets, no raises allowed
    ((and (null board) (cl-remove-if
                       (lambda (player)
@@ -833,8 +1036,8 @@ FCR-FN specifies a function to use when a fold-call-raise 
decision is required."
 
 ;;;###autoload
 (define-key menu-bar-games-menu
-  [poker] '(menu-item "Texas hold'em poker" poker
-                     :help "Play texas hold'em poker"))
+  [poker] '(menu-item "Texas hold 'em poker" poker
+                     :help "Play Texas hold 'em poker"))
 
 ;;; Tests:
 
@@ -848,6 +1051,36 @@ FCR-FN specifies a function to use when a fold-call-raise 
decision is required."
   (should (equal (poker-possible-hands '(1 2 3 4 5 6))
                  (poker-combinations 5 '(1 2 3 4 5 6)))))
 
+(ert-deftest poker-hand-value ()
+  (cl-labels ((permute (list)
+               (when list
+                 (if (not (cdr list)) (list list)
+                   (cl-mapcan (lambda (elt)
+                                (mapcar (lambda (l) (cons elt l))
+                                        (permute (remq elt list))))
+                              list)))))
+    ;; Straight flush
+    (dolist (suit poker-suits)
+      (dolist (hand (permute (mapcar (lambda (args)
+                                      (apply #'poker-make-card args))
+                                    (list (list 'ace suit) (list 'king suit)
+                                          (list 'queen suit) (list 'jack suit)
+                                          (list 10 suit)))))
+       (should (eq (poker-hand-value hand) #x8cba98))))
+    ;; Straight
+    (dolist (s1 poker-suits)
+      (dolist (s2 poker-suits)
+       (dolist (s3 poker-suits)
+         (dolist (s4 poker-suits)
+           (dolist (s5 poker-suits)
+             (unless (and (eq s1 s2) (eq s2 s3) (eq s3 s4) (eq s4 s5))
+               (dolist (hand (permute (mapcar (lambda (args)
+                                                (apply #'poker-make-card args))
+                                              (list (list 'ace s1) (list 'king 
s2)
+                                                    (list 'queen s3) (list 
'jack s4)
+                                                    (list 10 s5)))))
+                 (should (eq (poker-hand-value hand) #x4cba98)))))))))))
+
 (ert-deftest poker ()
   (let ((players (list (poker-make-player "Angela" #'poker-automatic-fcr)
                       (poker-make-player "Bettina" #'poker-automatic-fcr)
diff --git a/packages/realgud/.gitignore b/packages/realgud/.gitignore
new file mode 100644
index 0000000..843d43b
--- /dev/null
+++ b/packages/realgud/.gitignore
@@ -0,0 +1,27 @@
+*.elc
+*~
+/*-pkg.el
+/*.tar.gz
+/.cask/
+/.python-version
+/README
+/aclocal.m4
+/autom4te.cache
+/common.mk
+/config.log
+/config.status
+/configure
+/configure.lineno
+/elpa
+/how-to-make-a-release.txt
+/install-sh
+/missing
+/node_modules
+/realgud-autoloads.el
+/test/npm-debug.log
+/tmp
+Makefile
+Makefile.in
+elc-stamp
+elc-temp
+script
diff --git a/packages/realgud/.travis.yml b/packages/realgud/.travis.yml
new file mode 100644
index 0000000..0515aa0
--- /dev/null
+++ b/packages/realgud/.travis.yml
@@ -0,0 +1,16 @@
+language: emacs-lisp
+
+env:
+  - EMACS=emacs24
+
+install:
+  - if [ "$EMACS" = 'emacs24' ]; then
+      sudo add-apt-repository -y ppa:cassou/emacs &&
+      sudo apt-get -qq update &&
+      sudo apt-get -qq -f install &&
+      sudo apt-get -qq install emacs24 emacs24-el;
+    fi
+
+# run the tests
+script:
+  - NO_CHECK_EMACS_PACKAGES=1 /bin/bash ./autogen.sh && cd test && make 
check-elget
diff --git a/packages/realgud/AUTHORS b/packages/realgud/AUTHORS
new file mode 100644
index 0000000..60fc84e
--- /dev/null
+++ b/packages/realgud/AUTHORS
@@ -0,0 +1 @@
address@hidden
diff --git a/packages/realgud/COPYING b/packages/realgud/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/packages/realgud/COPYING
@@ -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/realgud/Cask b/packages/realgud/Cask
new file mode 100644
index 0000000..29fa0ff
--- /dev/null
+++ b/packages/realgud/Cask
@@ -0,0 +1,10 @@
+(source gnu)
+(source melpa)
+
+(package-file "realgud.el")
+
+(depends-on "load-relative")
+(depends-on "loc-changes")
+
+(development
+  (depends-on "test-simple"))
diff --git a/packages/realgud/ChangeLog b/packages/realgud/ChangeLog
new file mode 100644
index 0000000..d0bb58b
--- /dev/null
+++ b/packages/realgud/ChangeLog
@@ -0,0 +1,1764 @@
+2016-08-04  Stefan Monnier  <address@hidden>
+
+       * realgud.el: Add missing cl-lib dependency.
+       * <most-other-files>: Remove unneeded (require 'cl) and replace the
+       other ones with (require 'cl-lib)
+
+       * test/test-common-helper.el (realgud-test-info):
+       * realgud/common/regexp.el (realgud-loc-pat):
+       * realgud/common/lochist.el (realgud-loc-hist):
+       * realgud/common/buffer/info.el (realgud-backtrace-info):
+       * realgud/common/loc.el (realgud-loc): Use `cl-defstruct'.
+
+       * realgud/common/run.el (realgud:run-process, realgud:run-debugger):
+       Use cl-remove-if and cl-remove-duplicates.
+
+       * realgud/common/track.el (realgud-track-bp-loc): Fix typo.
+
+       * test/test-track.el:
+       * test/test-regexp.el:
+       * test/test-regexp-ruby.el:
+       * test/test-regexp-rdebug.el:
+       * test/test-core.el: Use lexical-binding rather than lexical-let.
+
+2010-11-27  rocky <address@hidden>
+
+       * dbgr/debugger/trepan/init.el, dbgr/lang/ruby.el,
+       test/test-regexp-trepan.el: Add trepan frame regexp tests.
+
+2010-11-27  rocky <address@hidden>
+
+       * dbgr/debugger/rdebug/init.el, dbgr/debugger/trepan/init.el,
+       dbgr/debugger/trepanx/init.el, dbgr/lang/ruby.el: Go over rdebug for
+       backtrace buffer regexp and improve other regexps.
+
+2010-11-27  rocky <address@hidden>
+
+       * dbgr/common/buffer/helper.el, dbgr/debugger/trepan/init.el,
+       dbgr/debugger/trepanx/init.el, dbgr/lang/ruby.el: Work on trepanx
+       regexps for backtrace. (Might have broken trepan regexps)
+
+2010-11-26  rocky <address@hidden>
+
+       * dbgr.el, dbgr/common/buffer/backtrace.el,
+       dbgr/common/buffer/helper.el, dbgr/debugger/trepan/init.el: Parses
+       backtrace lines (more) correctly now. Add text property for frame
+       number and. goto-frame now works.
+
+2010-11-26  rocky <address@hidden>
+
+       * dbgr.el, dbgr/common/bp.el, dbgr/common/buffer/backtrace.el,
+       dbgr/common/file.el, dbgr/common/init/kshdb.el, dbgr/common/loc.el,
+       dbgr/common/regexp.el, dbgr/common/track.el,
+       dbgr/debugger/bashdb/init.el, dbgr/debugger/gdb/init.el,
+       dbgr/debugger/pydbgr/init.el, dbgr/debugger/rdebug/init.el,
+       dbgr/debugger/trepan/init.el, dbgr/debugger/trepanx/init.el,
+       dbgr/debugger/zshdb/init.el, test/test-track.el: Start to add text
+       properties to backtrace buffer. Much more is needed. Start adding
+       string examples of things matching trepan regexps.
+
+2010-11-26  rocky <address@hidden>
+
+       * configure.ac, dbgr.el, dbgr/common/init/bashdb.el,
+       dbgr/debugger/Makefile.am, dbgr/debugger/bashdb/.gitignore,
+       dbgr/debugger/bashdb/Makefile.am, dbgr/debugger/bashdb/bashdb.el,
+       dbgr/debugger/bashdb/cmds.el, dbgr/debugger/bashdb/core.el,
+       dbgr/debugger/bashdb/init.el, dbgr/debugger/bashdb/track-mode.el,
+       dbgr/debugger/zshdb/core.el, dbgr/debugger/zshdb/init.el,
+       test/test-dbgr.el: Add emacs debugger as a full-fledged front-end.
+
+2010-11-22  rocky <address@hidden>
+
+       * test/test-regexp-trepanx.el: Work on trepanx regexp test
+
+2010-11-22  rocky <address@hidden>
+
+       * dbgr/debugger/pydbgr/pydbgr.el, dbgr/debugger/zshdb/zshdb.el: 
+       Small Doc string fixes from cut-and-paste.
+
+2010-11-22  rocky <address@hidden>
+
+       * dbgr/common/track.el, dbgr/debugger/pydbgr/track-mode.el,
+       dbgr/debugger/trepan/track-mode.el,
+       dbgr/debugger/zshdb/track-mode.el: track.el: call up
+       debugger-specific track mode track-mode.el: experiment with more
+       robust mode hook.
+
+2010-11-22  rocky <address@hidden>
+
+       * dbgr/common/track-mode.el, dbgr/debugger/trepanx/init.el,
+       dbgr/lang/ruby.el: Parent map of track-mode come from shell, not
+       comint. Correct rubinius backtrace regexp.
+
+2010-11-21  rocky <address@hidden>
+
+       * dbgr/common/buffer/command.el, dbgr/debugger/pydbgr/track-mode.el: 
+       Fix some small bugs
+
+2010-11-21  rocky <address@hidden>
+
+       * dbgr/common/track-mode.el, dbgr/debugger/gdb/track-mode.el,
+       dbgr/debugger/pydbgr/track-mode.el,
+       dbgr/debugger/rdebug/track-mode.el,
+       dbgr/debugger/trepan/track-mode.el,
+       dbgr/debugger/trepanx/track-mode.el,
+       dbgr/debugger/zshdb/track-mode.el: keybindings now work properly for
+       specific debugger track modes. Could be better, but this is a start
+       and a big improvement.
+
+2010-11-21  rocky <address@hidden>
+
+       * dbgr/common/fringe.el, dbgr/common/track-mode.el,
+       dbgr/debugger/gdb/track-mode.el,
+       dbgr/debugger/pydbgr/track-mode.el,
+       dbgr/debugger/rdebug/track-mode.el,
+       dbgr/debugger/trepan/track-mode.el,
+       dbgr/debugger/trepanx/track-mode.el, test/test-track-mode.el: Keymap
+       definition (which was probably improper) is messing up
+       define-minor-mode so leave that out for now. rename keymap variable
+       to a value which I hope is picked up automagically.
+
+2010-11-21  rocky <address@hidden>
+
+       * dbgr/common/buffer/helper.el: This time, for sure?
+
+2010-11-21  rocky <address@hidden>
+
+       * dbgr/common/buffer/helper.el, dbgr/common/track.el: Fix an
+       annoying bug where we weren't tracking changes in the source buffer.
+
+
+2010-11-04  rocky <address@hidden>
+
+       * dbgr/debugger/rdebug/track-mode.el,
+       dbgr/debugger/trepan/track-mode.el,
+       dbgr/debugger/trepanx/track-mode.el: This time, for sure!
+
+2010-11-04  rocky <address@hidden>
+
+       * dbgr/debugger/rdebug/track-mode.el: Now redundant (and wrong)
+       line.
+
+2010-11-04  rocky <address@hidden>
+
+       * dbgr/debugger/rdebug/track-mode.el,
+       dbgr/debugger/trepanx/track-mode.el: One more place to fold in
+       ruby-specific traceback key bindings.
+
+2010-11-04  rocky <address@hidden>
+
+       * dbgr/common/track.el, dbgr/debugger/rdebug/core.el,
+       dbgr/debugger/trepan/core.el, dbgr/debugger/trepan/track-mode.el,
+       dbgr/debugger/trepanx/core.el, dbgr/debugger/trepanx/track-mode.el,
+       dbgr/lang/ruby.el: Dry some code bound to ruby keys. Should do the
+       same for others...
+
+2010-11-03  rocky <address@hidden>
+
+       * dbgr/common/buffer/command.el, dbgr/common/init/Makefile.am,
+       dbgr/common/send.el, dbgr/common/track.el,
+       dbgr/debugger/.gitignore, dbgr/debugger/Makefile.am,
+       dbgr/debugger/pydbgr/pydbgr.el, dbgr/debugger/rdebug/rdebug.el,
+       dbgr/debugger/trepan/trepan.el, dbgr/debugger/trepanx/trepanx.el,
+       dbgr/debugger/zshdb/zshdb.el, test/Makefile.am, test/test-track.el: 
+       Remove output for internal-status commands like dbgr-backtrace-init.
+       Front-end command names now universally start dbgr-, e.g.
+       dbgr-trepan with most having aliases to shorter name, e.g. trepan.
+       The exception is "gdb" which doesn't have an alias, since "gdb" is a
+       well-established and Emacs command. Go over Makefile's yet again.
+
+2010-11-03  rocky <address@hidden>
+
+       * dbgr/common/init/gdb.el, dbgr/debugger/gdb/init.el,
+       dbgr/debugger/gdb/track-mode.el, test/test-regexp-gdb.el: 
+       common/init/gdb.el -> debugger/gdb/init.el gdb-pat-hash ->
+       dbgr-gdb-pat-hash
+
+2010-11-02  rocky <address@hidden>
+
+       * configure.ac, dbgr.el, dbgr/Makefile.am, dbgr/common.mk,
+       dbgr/common/Makefile.am, dbgr/common/buffer/Makefile.am,
+       dbgr/debugger/.gitignore, dbgr/debugger/Makefile.am,
+       dbgr/debugger/common.mk, dbgr/debugger/gdb/.gitignore,
+       dbgr/debugger/gdb/Makefile.am, dbgr/debugger/gdb/core.el,
+       dbgr/debugger/gdb/gdb.el, dbgr/debugger/gdb/track-mode.el,
+       dbgr/debugger/pydbgr/.gitignore, dbgr/debugger/pydbgr/Makefile.am,
+       dbgr/debugger/pydbgr/cmds.el, dbgr/debugger/pydbgr/core.el,
+       dbgr/debugger/pydbgr/init.el, dbgr/debugger/pydbgr/pydbgr.el,
+       dbgr/debugger/pydbgr/track-mode.el,
+       dbgr/debugger/rdebug/.gitignore, dbgr/debugger/rdebug/Makefile.am,
+       dbgr/debugger/rdebug/cmds.el, dbgr/debugger/rdebug/core.el,
+       dbgr/debugger/rdebug/init.el, dbgr/debugger/rdebug/rdebug.el,
+       dbgr/debugger/rdebug/track-mode.el,
+       dbgr/debugger/trepan/.gitignore, dbgr/debugger/trepan/Makefile.am,
+       dbgr/debugger/trepan/cmds.el, dbgr/debugger/trepan/core.el,
+       dbgr/debugger/trepan/init.el, dbgr/debugger/trepan/track-mode.el,
+       dbgr/debugger/trepan/trepan.el, dbgr/debugger/trepanx/.gitignore,
+       dbgr/debugger/trepanx/Makefile.am, dbgr/debugger/trepanx/cmds.el,
+       dbgr/debugger/trepanx/core.el, dbgr/debugger/trepanx/init.el,
+       dbgr/debugger/trepanx/track-mode.el,
+       dbgr/debugger/trepanx/trepanx.el, dbgr/debugger/zshdb/.gitignore,
+       dbgr/debugger/zshdb/Makefile.am, dbgr/debugger/zshdb/cmds.el,
+       dbgr/debugger/zshdb/core.el, dbgr/debugger/zshdb/init.el,
+       dbgr/debugger/zshdb/track-mode.el, dbgr/debugger/zshdb/zshdb.el,
+       dbgr/gdb/.gitignore, dbgr/gdb/Makefile.am, dbgr/gdb/core.el,
+       dbgr/gdb/gdb.el, dbgr/gdb/track-mode.el, dbgr/lang/Makefile.am,
+       dbgr/pydbgr/.gitignore, dbgr/pydbgr/Makefile.am,
+       dbgr/pydbgr/cmds.el, dbgr/pydbgr/core.el, dbgr/pydbgr/init.el,
+       dbgr/pydbgr/pydbgr.el, dbgr/pydbgr/track-mode.el,
+       dbgr/rdebug/.gitignore, dbgr/rdebug/Makefile.am,
+       dbgr/rdebug/cmds.el, dbgr/rdebug/core.el, dbgr/rdebug/init.el,
+       dbgr/rdebug/rdebug.el, dbgr/rdebug/track-mode.el,
+       dbgr/trepan/.gitignore, dbgr/trepan/Makefile.am,
+       dbgr/trepan/cmds.el, dbgr/trepan/core.el, dbgr/trepan/init.el,
+       dbgr/trepan/track-mode.el, dbgr/trepan/trepan.el,
+       dbgr/trepanx/.gitignore, dbgr/trepanx/Makefile.am,
+       dbgr/trepanx/cmds.el, dbgr/trepanx/core.el, dbgr/trepanx/init.el,
+       dbgr/trepanx/track-mode.el, dbgr/trepanx/trepanx.el,
+       dbgr/zshdb/.gitignore, dbgr/zshdb/Makefile.am, dbgr/zshdb/cmds.el,
+       dbgr/zshdb/core.el, dbgr/zshdb/init.el, dbgr/zshdb/track-mode.el,
+       dbgr/zshdb/zshdb.el, test/test-bt-pydbgr.el,
+       test/test-bt-rdebug.el, test/test-bt-trepan.el,
+       test/test-bt-trepanx.el, test/test-bt-zshdb.el,
+       test/test-buf-cmd.el, test/test-core.el, test/test-pydbgr.el,
+       test/test-rdebug.el, test/test-regexp-pydbgr.el,
+       test/test-regexp-rdebug.el, test/test-regexp-trepan.el,
+       test/test-regexp-trepanx.el, test/test-regexp.el,
+       test/test-send.el, test/test-srcbuf.el, test/test-track-mode.el,
+       test/test-track.el: move debugger-specific code down to a debugger
+       directory.
+
+2010-11-02  rocky <address@hidden>
+
+       * dbgr/Makefile.am, dbgr/common.mk, dbgr/gdb/Makefile.am,
+       dbgr/lang/Makefile.am, dbgr/pydbgr/Makefile.am,
+       dbgr/rdebug/Makefile.am, dbgr/trepan/Makefile.am,
+       dbgr/trepanx/Makefile.am, dbgr/zshdb/Makefile.am: DRY Makefile.am
+       code.
+
+2010-11-02  rocky <address@hidden>
+
+       * configure.ac, dbgr.el, dbgr/Makefile.am, dbgr/common/Makefile.am,
+       dbgr/common/buffer/Makefile.am, dbgr/common/core.el,
+       dbgr/common/init/rbdbgr.el, dbgr/gdb/Makefile.am,
+       dbgr/lang/Makefile.am, dbgr/lang/ruby.el, dbgr/rbdbgr/.gitignore,
+       dbgr/rbdbgr/Makefile.am, dbgr/rbdbgr/cmds.el, dbgr/rbdbgr/core.el,
+       dbgr/rbdbgr/rbdbgr.el, dbgr/rbdbgr/track-mode.el,
+       dbgr/rdebug/init.el, dbgr/trepan/init.el, test/Makefile.am,
+       test/test-buf-cmd.el, test/test-dbgr.el, test/test-regexp-gdb.el,
+       test/test-regexp-rbdbgr.el, test/test-regexp.el, test/test-send.el,
+       test/test-srcbuf.el: Remove rbdbgr. Nevering-ending struggle to DRY
+       code more.
+
+2010-11-02  rocky <address@hidden>
+
+       * configure.ac, dbgr/Makefile.am, dbgr/common/init/bashdb.el,
+       dbgr/common/init/gdb.el, dbgr/common/init/kshdb.el,
+       dbgr/common/init/pydb.el, dbgr/common/init/rbdbgr.el,
+       dbgr/common/init/remake.el, dbgr/gdb/track-mode.el,
+       dbgr/lang/.gitignore, dbgr/lang/Makefile.am, dbgr/lang/ruby.el,
+       dbgr/pydbgr/core.el, dbgr/pydbgr/init.el,
+       dbgr/pydbgr/track-mode.el, dbgr/rbdbgr/core.el,
+       dbgr/rdebug/core.el, dbgr/rdebug/init.el,
+       dbgr/rdebug/track-mode.el, dbgr/trepan/core.el,
+       dbgr/trepan/init.el, dbgr/trepan/track-mode.el,
+       dbgr/trepanx/core.el, dbgr/trepanx/init.el,
+       dbgr/trepanx/track-mode.el, dbgr/zshdb/core.el, dbgr/zshdb/init.el,
+       dbgr/zshdb/track-mode.el, test/test-regexp-rdebug.el: 
+       traceback->backtrace Start to DRY common language regular
+       expressions.
+
+2010-11-02  rocky <address@hidden>
+
+       * dbgr/common/init/trepanx.el, dbgr/trepanx/cmds.el,
+       dbgr/trepanx/core.el, dbgr/trepanx/init.el,
+       dbgr/trepanx/track-mode.el, dbgr/trepanx/trepanx.el,
+       test/Makefile.am, test/test-bt-trepanx.el,
+       test/test-regexp-trepanx.el: common/init/trepanx.el ->
+       trepanx/init.el Add font-lock-default test.
+
+2010-11-01  rocky <address@hidden>
+
+       * dbgr/zshdb/init.el, test/Makefile.am, test/test-bt-zshdb.el: Start
+       font lock for zshdb.
+
+2010-11-01  rocky <address@hidden>
+
+       * dbgr/pydbgr/init.el, dbgr/rdebug/init.el, dbgr/trepan/init.el,
+       test/Makefile.am, test/test-bt-pydbgr.el: Work on pydbgr
+       font-lock-defaults. Comments regexps better.
+
+2010-11-01  rocky <address@hidden>
+
+       * dbgr/common/init.el, dbgr/pydbgr/init.el, dbgr/rdebug/init.el,
+       dbgr/trepan/init.el, test/test-bt-rdebug.el, test/test-bt-trepan.el: 
+       Better backtrace font-lock defaults. Start working on pydbgr
+       backtrace font-lock.
+
+2010-11-01  rocky <address@hidden>
+
+       * dbgr/trepan/init.el, test/Makefile.am, test/test-bt-trepan.el: 
+       trepan backtrace font-lock-default is more correct.
+
+2010-11-01  rocky <address@hidden>
+
+       * dbgr/trepan/init.el, test/Makefile.am, test/test-bt-rdebug.el,
+       test/test-bt-trepan.el, test/test-buf-bt.el: More regourous rdebug
+       backtrace font-lock-default tests. Start work on trepan backtrace
+       font-lock-default.
+
+2010-11-01  rocky <address@hidden>
+
+       * dbgr/common/buffer/backtrace.el, test/test-buf-bt.el: Add 1st
+       fontify test.
+
+2010-10-31  rocky <address@hidden>
+
+       * dbgr/common/buffer/backtrace.el, dbgr/common/buffer/command.el,
+       dbgr/common/init.el, dbgr/rdebug/init.el, dbgr/trepan/init.el: Add
+       font-lock faces to backtrace buffer. Attempt to do for command, but
+       more work is needed.
+
+2010-10-31  rocky <address@hidden>
+
+       * dbgr/common/buffer/backtrace.el, dbgr/common/init/trepan.el,
+       dbgr/trepan/cmds.el, dbgr/trepan/core.el, dbgr/trepan/init.el,
+       dbgr/trepan/track-mode.el, dbgr/trepan/trepan.el,
+       test/test-regexp-trepan.el, test/test-track.el: 
+       common/init/trepan.el -> trepan/init.el backtrace.el: remove compile
+       warnings by commenting out future code
+
+2010-10-31  rocky <address@hidden>
+
+       * dbgr/common/buffer/backtrace.el, test/Makefile.am,
+       test/test-buf-bt.el, test/test-buf-cmd.el, test/test-cmdbuf.el: Work
+       on backtrace buffer and mode. More to come...
+
+2010-10-31  rocky <address@hidden>
+
+       * dbgr/common/init/rdebug.el, dbgr/rdebug/cmds.el,
+       dbgr/rdebug/core.el, dbgr/rdebug/init.el, dbgr/rdebug/rdebug.el,
+       dbgr/rdebug/track-mode.el, test/test-regexp-rdebug.el: 
+       common/init/rdebug.el -> rdebug/init.el
+
+2010-10-31  rocky <address@hidden>
+
+       * dbgr/common/buffer/backtrace.el, dbgr/common/init/pydbgr.el,
+       dbgr/pydbgr/cmds.el, dbgr/pydbgr/core.el, dbgr/pydbgr/init.el,
+       dbgr/pydbgr/pydbgr.el, dbgr/pydbgr/track-mode.el,
+       dbgr/zshdb/core.el, dbgr/zshdb/init.el, dbgr/zshdb/track-mode.el,
+       test/test-regexp-pydbgr.el: Move init/pydbgr.el to pydbgr/init.el.
+       zshdb/*.el: Correct some mistakes in moving from before.
+       buffer/backtrace.el: Make this loadable without error.
+
+2010-10-31  rocky <address@hidden>
+
+       * dbgr/common/init/zshdb.el, dbgr/zshdb/cmds.el,
+       dbgr/zshdb/core.el, dbgr/zshdb/init.el, dbgr/zshdb/track-mode.el,
+       dbgr/zshdb/zshdb.el: Start to move init/*.el into respective
+       debugger-specific directories.
+
+2010-10-31  rocky <address@hidden>
+
+       * configure.ac, dbgr/common/Makefile.am, dbgr/common/bt-buf.el,
+       dbgr/common/buffer.el, dbgr/common/buffer/.gitignore,
+       dbgr/common/buffer/Makefile.am, dbgr/common/buffer/backtrace.el,
+       dbgr/common/buffer/command.el, dbgr/common/buffer/helper.el,
+       dbgr/common/buffer/source.el, dbgr/common/cmdbuf.el,
+       dbgr/common/cmds.el, dbgr/common/core.el, dbgr/common/reset.el,
+       dbgr/common/send.el, dbgr/common/shortkey.el,
+       dbgr/common/srcbuf.el, dbgr/common/track-mode.el,
+       dbgr/common/track.el, dbgr/common/window.el, test/test-cmdbuf.el,
+       test/test-regexp.el, test/test-srcbuf.el: Move buffer-related files
+       into a separate directory. Will help future growth.
+
+2010-10-31  rocky <address@hidden>
+
+       * dbgr.el, dbgr/zshdb/Makefile.am, dbgr/zshdb/core.el: Administrivia
+       around adding zshdb properly.
+
+2010-10-31  rocky <address@hidden>
+
+       * configure.ac, dbgr/Makefile.am, dbgr/zshdb/.gitignore,
+       dbgr/zshdb/Makefile.am, dbgr/zshdb/cmds.el, dbgr/zshdb/core.el,
+       dbgr/zshdb/track-mode.el, dbgr/zshdb/zshdb.el: Start zshdb debugger
+       support.
+
+2010-10-31  rocky <address@hidden>
+
+       * dbgr.el, dbgr/common/bp.el, dbgr/common/bt-buf.el,
+       dbgr/common/buffer.el, dbgr/common/cmdbuf.el, dbgr/common/cmds.el,
+       dbgr/common/core.el, dbgr/common/custom.el, dbgr/common/file.el,
+       dbgr/common/fringe.el, dbgr/common/helper.el, dbgr/common/init.el,
+       dbgr/common/init/bashdb.el, dbgr/common/init/gdb.el,
+       dbgr/common/init/kshdb.el, dbgr/common/init/pydb.el,
+       dbgr/common/init/pydbgr.el, dbgr/common/init/rbdbgr.el,
+       dbgr/common/init/rdebug.el, dbgr/common/init/remake.el,
+       dbgr/common/init/trepan.el, dbgr/common/init/trepanx.el,
+       dbgr/common/init/zshdb.el, dbgr/common/key.el, dbgr/common/lang.el,
+       dbgr/common/loc.el, dbgr/common/lochist.el, dbgr/common/menu.el,
+       dbgr/common/regexp.el, dbgr/common/reset.el, dbgr/common/send.el,
+       dbgr/common/shortkey.el, dbgr/common/srcbuf.el,
+       dbgr/common/track-mode.el, dbgr/common/window.el, dbgr/gdb/core.el,
+       dbgr/gdb/gdb.el, dbgr/gdb/track-mode.el, dbgr/pydbgr/cmds.el,
+       dbgr/pydbgr/core.el, dbgr/pydbgr/pydbgr.el,
+       dbgr/pydbgr/track-mode.el, dbgr/rdebug/cmds.el,
+       dbgr/rdebug/core.el, dbgr/rdebug/rdebug.el,
+       dbgr/rdebug/track-mode.el, dbgr/trepan/cmds.el,
+       dbgr/trepan/core.el, dbgr/trepan/track-mode.el,
+       dbgr/trepan/trepan.el, dbgr/trepanx/cmds.el, dbgr/trepanx/core.el,
+       dbgr/trepanx/track-mode.el, dbgr/trepanx/trepanx.el: Start to add
+       copyright.
+
+2010-10-31  rocky <address@hidden>
+
+       * dbgr/common/bt-buf.el, dbgr/common/track.el: Fix problem with
+       divert-output sequencing problem which caused old output to be used.
+
+
+2010-10-30  rocky <address@hidden>
+
+       * dbgr/common/bt-buf.el, dbgr/common/cmdbuf.el,
+       dbgr/common/send.el, dbgr/common/tb-buf.el,
+       dbgr/common/track-mode.el, dbgr/common/track.el,
+       test/test-track-mode.el, test/test-track.el: More progress on
+       diverting output.
+
+2010-10-30  rocky <address@hidden>
+
+       * dbgr.el: Add dbgr-reload-features which is really what we probably
+       want rather than dbgr-unload-features.
+
+2010-10-30  rocky <address@hidden>
+
+       * dbgr/common/track-mode.el, test/test-track-mode.el: Fix
+       dbgr-track-mode-vars macro.
+
+2010-10-30  rocky <address@hidden>
+
+       * dbgr/common/send.el, dbgr/common/tb-buf.el, dbgr/common/track.el: 
+       Work on sending commands for status whose output needs to be
+       diverted and sent to a special buffer, like "backtrace"
+
+2010-10-29  rocky <address@hidden>
+
+       * dbgr/common/track-mode.el, dbgr/common/track.el,
+       test/test-track.el: Start working on commands that divert output. We
+       will use this for auxiliary status buffers for breakponts or
+       backtrace, etc.
+
+2010-10-16  rocky <address@hidden>
+
+       * dbgr/pydbgr/core.el: Small bug in recognizing if pydbgr or cli.py
+       given
+
+2010-10-16  rocky <address@hidden>
+
+       * dbgr/common/core.el, dbgr/common/lang.el, dbgr/gdb/core.el,
+       dbgr/pydbgr/core.el, dbgr/rbdbgr/core.el, dbgr/rdebug/core.el,
+       dbgr/trepan/core.el, dbgr/trepanx/core.el, test/Makefile.am,
+       test/test-core.el, test/test-lang.el, test/test-pydbgr.el,
+       test/test-rdebug.el: DRY via dbgr-suggest-lang-file. Fix up tests
+       related to this region.
+
+2010-10-16  rocky <address@hidden>
+
+       * dbgr/common/lang.el, dbgr/pydbgr/core.el, dbgr/rbdbgr/core.el,
+       dbgr/rdebug/core.el, dbgr/trepan/core.el, dbgr/trepanx/core.el,
+       test/test-core.el, test/test-pydbgr.el, test/test-rdebug.el: Better
+       initial suggestion of language file to debug by searching visited
+       buffers.  DRY some of the code a little. Much much much more is
+       DRYness is needed. Start putting in Programming-language-specific
+       code into common/lang.el
+
+2010-10-06  rocky <address@hidden>
+
+       * dbgr/trepan/core.el: Tolerate .exe on ruby interpreter for
+       Microsoft.
+
+2010-10-06  rocky <address@hidden>
+
+       * dbgr/common/cmds.el, dbgr/common/core.el,
+       dbgr/common/shortkey.el, dbgr/pydbgr/cmds.el, dbgr/rdebug/cmds.el,
+       dbgr/trepan/cmds.el, dbgr/trepanx/cmds.el: Work on terminating
+       gracefully. cmds.el: Add dbgr-terminate (reset debugger information)
+       to dbgr-cmd-quit. core.el: Create dbgr-terminate to encapsulate what
+       needs to be done on reset. shortkey.el: use 0 to turn off mode.
+       debugger/cmds.el: call define-gdb-like-commands explicitly
+       trepan/cmds.el: use quit! instead of quit.
+
+2010-10-05  rocky <address@hidden>
+
+       * dbgr/common/core.el: Suppress and emacs warning.
+
+2010-10-05  rocky <address@hidden>
+
+       * dbgr/pydbgr/core.el, dbgr/rdebug/.gitignore,
+       dbgr/rdebug/elc-stamp: core.el: Allow python.exe as an interpreter
+       name on Microsoft.          Allow cli.py as alternative to pydbgr
+       rdebug/*: Adminstrivia
+
+2010-10-01  rocky <address@hidden>
+
+       * dbgr/common/cmdbuf.el, dbgr/common/track.el: short-key-on-tracing?
+       -> dbgr-short-key-on-tracing?
+
+2010-10-01  rocky <address@hidden>
+
+       * dbgr/common/cmdbuf.el, dbgr/common/core.el: Do better with respect
+       to cleaning up on process end: Remove fringe arrows, short-key-mode
+       and breakpoints in source buffers.
+
+2010-09-30  rocky <address@hidden>
+
+       * dbgr/common/shortkey.el, dbgr/common/srcbuf.el,
+       dbgr/common/track.el, dbgr/trepan/track-mode.el: Add customizable
+       variable "short-key-on-tracing?" which will set short-key mode for
+       any source buffer that is traced into.
+
+2010-09-30  rocky <address@hidden>
+
+       * dbgr/common/cmds.el, dbgr/common/key.el,
+       dbgr/common/track-mode.el, dbgr/gdb/core.el, dbgr/gdb/gdb.el,
+       dbgr/gdb/track-mode.el, dbgr/pydbgr/track-mode.el,
+       dbgr/rbdbgr/cmds.el, dbgr/rdebug/track-mode.el,
+       dbgr/trepan/track-mode.el, dbgr/trepanx/track-mode.el: Use expanded
+       file name in 'break' command. See also previous commit message since
+       it appears that many changes didn't get pushed from that.
+
+2010-09-29  rocky <address@hidden>
+
+       * dbgr/pydbgr/cmds.el: DRY track mode code. Add M-kp-up and
+       M-kp-down in standard keys.
+
+2010-09-29  rocky <address@hidden>
+
+       * README.textile: rbdbgr -> trepanning
+
+2010-09-29  rocky <address@hidden>
+
+       * dbgr/common/key.el, dbgr/gdb/track-mode.el, dbgr/pydbgr/core.el,
+       dbgr/pydbgr/track-mode.el, dbgr/rdebug/track-mode.el,
+       dbgr/trepan/track-mode.el, dbgr/trepanx/track-mode.el: Work on
+       getting debugger-specific minor-mode keymaps working. Some of the
+       prior workarounds were remove. Still really need to DRY code. Try
+       C-c SPC for break.
+
+2010-09-29  rocky <address@hidden>
+
+       * dbgr/common/srcbuf.el, dbgr/gdb/track-mode.el,
+       dbgr/pydbgr/track-mode.el, dbgr/rbdbgr/track-mode.el,
+       dbgr/rdebug/track-mode.el, dbgr/trepan/track-mode.el,
+       dbgr/trepanx/track-mode.el: Debugger common keys are now set in
+       source-code windows. Figured out how to use debugger keymaps in
+       command window, and setting debugger-specific command buffer keys.
+       However more work is needed here and we really need to DRY code.
+
+2010-09-29  rocky <address@hidden>
+
+       * dbgr/common/init/pydbgr.el, dbgr/common/key.el,
+       dbgr/pydbgr/core.el, dbgr/pydbgr/track-mode.el,
+       test/test-rdebug.el, test/test-regexp-pydbgr.el: key.el: Add "b" for
+       break in shortkey mode. test-rdebug.el: fix up faulty cut-n-paste:
+       python -> ruby; pydbgr => rdebug pydbgr.el, test-regexp-pydbgr.el
+       traceback -> backtrace
+
+2010-09-24  rocky <address@hidden>
+
+       * dbgr.el, dbgr/trepan/.gitignore, dbgr/trepanx/rbdbgr.el,
+       dbgr/trepanx/trepanx.el, test/test-regexp-trepan.el,
+       test/test-regexp-trepanx.el: Growing pains related to adding
+       trepan(x).
+
+2010-09-24  rocky <address@hidden>
+
+       * configure.ac, dbgr/Makefile.am, dbgr/common/init/trepan.el,
+       dbgr/common/init/trepanx.el, dbgr/trepan/.gitignore,
+       dbgr/trepan/Makefile.am, dbgr/trepan/cmds.el, dbgr/trepan/core.el,
+       dbgr/trepan/track-mode.el, dbgr/trepan/trepan.el,
+       dbgr/trepanx/.gitignore, dbgr/trepanx/Makefile.am,
+       dbgr/trepanx/cmds.el, dbgr/trepanx/core.el, dbgr/trepanx/rbdbgr.el,
+       dbgr/trepanx/track-mode.el, test/Makefile.am: Add trepan and trepanx
+       debuggers.
+
+2010-09-24  rocky <address@hidden>
+
+       * dbgr/gdb/core.el, dbgr/pydbgr/core.el, dbgr/pydbgr/pydbgr.el,
+       dbgr/rbdbgr/core.el, dbgr/rdebug/core.el: Wasn't picking up variable
+       set by xxx-command-name. See comment in
+       http://stackoverflow.com/questions/3764575/using-pydbgr-with-emacs
+
+2010-09-18  rocky <address@hidden>
+
+       * test/test-regexp-pydbgr.el: Add <module> onto the end - just in
+       case.
+
+2010-09-18  rocky <address@hidden>
+
+       * test/test-regexp-pydbgr.el: Add test for MS prompt locations (with
+       drive letter and backslash) and non-MS prompt location without drive
+       and forward slash.
+
+2010-09-09  rocky <address@hidden>
+
+       * dbgr/Makefile.am, dbgr/common/Makefile.am,
+       dbgr/common/init/Makefile.am, dbgr/common/init/rbdbgr.el,
+       test/test-regexp-rbdbgr.el: init/rbdbgr.el: lfp and dfp are *hex*
+       addresses. Makefile.am: clean now removes compiled lisp files
+       teste-regexp-rbdbgr.el: previously renamed key from traceback to
+       backtrace -- Ooops
+
+2010-08-27  rocky <address@hidden>
+
+       * dbgr/rdebug/track-mode.el: Found one more C-c! -> C-c!!
+
+2010-08-22  rocky <address@hidden>
+
+       * dbgr/common/key.el: More keys for M-up. My PC keyboard has a
+       messed-up up-arrow. So allow Kp-up as well.
+
+2010-08-20  R. Bernstein <address@hidden>
+
+       * dbgr/common/init/rbdbgr.el, dbgr/rbdbgr/core.el,
+       dbgr/rbdbgr/track-mode.el: traceback -> backtrace which is what I
+       think it's called in Ruby (i.e. rb_backtrace) and use C-c!b which I
+       think is more mnemonic than C-c!e.
+
+2010-08-20  R. Bernstein <address@hidden>
+
+       * dbgr/rbdbgr/core.el: rbdbgr/core.el Match function name listed in
+       init/rbdbgr.el
+
+2010-08-20  R. Bernstein <address@hidden>
+
+       * dbgr/common/init/rbdbgr.el, dbgr/rbdbgr/core.el,
+       dbgr/rbdbgr/track-mode.el, test/test-regexp-rbdbgr.el: Add command
+       to position on control-frame traceback.
+
+2010-08-17  R. Bernstein <address@hidden>
+
+       * INSTALL, dbgr/common/key.el: Customize more for Emacs.
+
+2010-08-17  rocky <address@hidden>
+
+       * configure.ac: Check for required prerequisite packages.
+
+2010-08-17  rocky <address@hidden>
+
+       * configure.ac: Set default value for EMACS to, well, "emacs".
+
+2010-08-17  rocky <address@hidden>
+
+       * configure.ac: Test to make sure we have emacs 23 or greater.
+
+2010-08-13  R. Bernstein <address@hidden>
+
+       * .gitignore, INSTALL: More specific installation instructions.
+
+2010-08-12  rocky <address@hidden>
+
+       * README.textile: Typo
+
+2010-08-12  rocky <address@hidden>
+
+       * README.textile: Better textile linking.
+
+2010-08-12  rocky <address@hidden>
+
+       * README.textile: Add link to detailed installation instructions.
+       Thanks to Andrea Crotti for the suggestion.
+
+2010-08-09  R. Bernstein <address@hidden>
+
+       * dbgr/common/shortkey.el: M-[insert] toggles dbgr-short-key-mode as
+       well. And when you aren't in short-key mode, it works too --
+       provided the buffer has an associated debugger.
+
+2010-08-05  rocky <address@hidden>
+
+       * dbgr/common/shortkey.el: shortkey.el: Add 'c' for 'continue.
+
+2010-08-05  rocky <address@hidden>
+
+       * dbgr/common/init/pydbgr.el, dbgr/common/init/rbdbgr.el,
+       dbgr/common/shortkey.el, test/test-regexp-pydbgr.el: shortkey.el:
+       Shortkey 'b' to set a breakpoint. (Don't have delete or toggle yet).
+       pydbgr.el Add regexp for breakpoint set and deleted.
+
+2010-08-04  rocky <address@hidden>
+
+       * dbgr/pydbgr/core.el: .rb -> .py
+
+2010-08-03  rocky <address@hidden>
+
+       * dbgr/pydbgr/core.el, test/Makefile.am, test/gcd.py, test/gcd.rb,
+       test/test-pydbgr.el, test/test-rdebug.el: As suggesting a Ruby file
+       in pydbgr. Add test for this now.
+
+2010-08-01  rocky <address@hidden>
+
+       * dbgr/rdebug/rdebug.el: M-x rdebug -> M-x dbgr-rdebug so as not to
+       conflict with the older rdebug code.
+
+2010-06-15  rocky <address@hidden>
+
+       * .gitignore, autogen.sh, test/test-track-mode.el: automess needs a
+       README.
+
+2010-06-11  rocky <address@hidden>
+
+       Merge branch 'master' of github.com:rocky/emacs-dbgr
+
+2010-06-11  rocky <address@hidden>
+
+       * README, README.textile: Update README to note dependencies and
+       what debugger's we've got.
+
+2010-06-07  R. Bernstein <address@hidden>
+
+       * dbgr/common/init/rdebug.el: Comment typo
+
+2010-05-23  rocky <address@hidden>
+
+       * dbgr/rdebug/rdebug.el, test/Makefile.am, test/test-rdebug.el: Add
+       routine from rdebug to parse out command line options and get script
+       name.
+
+2010-05-22  rocky <address@hidden>
+
+       * ChangeLog, dbgr/common/init/pydb.el: Add "provide-me" for pydb
+
+2010-05-06  rocky <address@hidden>
+
+       * dbgr/common/init/bashdb.el, dbgr/common/init/kshdb.el,
+       dbgr/common/init/pydbgr.el, dbgr/common/init/rbdbgr.el,
+       test/Makefile.am, test/test-dbgr.el, test/test-regexp-rbdbgr.el: 
+       common/init/rbdbgr.el: prompt pattern has changed Makefile.am:
+       wasn't testing rbdbgr reset: Add more provide's in init files.
+
+2010-03-20  rocky <address@hidden>
+
+       * dbgr/pydbgr/Makefile.am: Forgot one python->pydbgr
+
+2010-03-19  R. Bernstein <address@hidden>
+
+       * dbgr.el, dbgr/gdb/gdb.el, dbgr/pydbgr/pydbgr.el,
+       dbgr/rbdbgr/rbdbgr.el, dbgr/rdebug/rdebug.el: Add "dbgr-" prefix to
+       keep namespace separate from other standalones, e.g. dbg-gdb vs gdb.
+
+
+2010-03-19  rocky <address@hidden>
+
+       * configure.ac: One more python->pydbgr
+
+2010-03-19  R. Bernstein <address@hidden>
+
+       * dbgr.el, dbgr/Makefile.am, dbgr/gdb/core.el,
+       dbgr/gdb/gdb-core.el, dbgr/gdb/gdb-track-mode.el, dbgr/gdb/gdb.el,
+       dbgr/gdb/track-mode.el, dbgr/pydbgr/.gitignore,
+       dbgr/pydbgr/Makefile.am, dbgr/pydbgr/core.el,
+       dbgr/pydbgr/pydbgr.el, dbgr/pydbgr/track-mode.el,
+       dbgr/python/.gitignore, dbgr/python/Makefile.am,
+       dbgr/python/pydbgr-core.el, dbgr/python/pydbgr-track-mode.el,
+       dbgr/python/pydbgr.el, test/Makefile.am,
+       test/test-regexp-pydbgr.el, test/test-regexp-python.el: directory
+       python -> pydbgr. Debugger-specific file anme simplifications.
+
+2010-03-19  R. Bernstein <address@hidden>
+
+       * configure.ac, dbgr.el, dbgr/Makefile.am, dbgr/bp.el,
+       dbgr/buffer.el, dbgr/cmdbuf.el, dbgr/cmds.el,
+       dbgr/common/.gitignore, dbgr/common/Makefile.am, dbgr/common/bp.el,
+       dbgr/common/buffer.el, dbgr/common/cmdbuf.el, dbgr/common/cmds.el,
+       dbgr/common/core.el, dbgr/common/custom.el, dbgr/common/file.el,
+       dbgr/common/fringe.el, dbgr/common/helper.el, dbgr/common/init.el,
+       dbgr/common/init/.gitignore, dbgr/common/init/Makefile.am,
+       dbgr/common/init/bashdb.el, dbgr/common/init/gdb.el,
+       dbgr/common/init/kshdb.el, dbgr/common/init/pydb.el,
+       dbgr/common/init/pydbgr.el, dbgr/common/init/rbdbgr.el,
+       dbgr/common/init/rdebug.el, dbgr/common/init/remake.el,
+       dbgr/common/init/zshdb.el, dbgr/common/key.el, dbgr/common/loc.el,
+       dbgr/common/lochist.el, dbgr/common/menu.el, dbgr/common/regexp.el,
+       dbgr/common/reset.el, dbgr/common/send.el, dbgr/common/shortkey.el,
+       dbgr/common/srcbuf.el, dbgr/common/track-mode.el,
+       dbgr/common/track.el, dbgr/common/window.el, dbgr/core.el,
+       dbgr/custom.el, dbgr/file.el, dbgr/fringe.el, dbgr/gdb/gdb-core.el,
+       dbgr/gdb/gdb-track-mode.el, dbgr/gdb/gdb.el, dbgr/helper.el,
+       dbgr/init.el, dbgr/init/.gitignore, dbgr/init/Makefile.am,
+       dbgr/init/bashdb.el, dbgr/init/gdb.el, dbgr/init/kshdb.el,
+       dbgr/init/pydb.el, dbgr/init/pydbgr.el, dbgr/init/rbdbgr.el,
+       dbgr/init/rdebug.el, dbgr/init/remake.el, dbgr/init/zshdb.el,
+       dbgr/key.el, dbgr/loc.el, dbgr/lochist.el, dbgr/menu.el,
+       dbgr/python/pydbgr-core.el, dbgr/python/pydbgr-track-mode.el,
+       dbgr/python/pydbgr.el, dbgr/rbdbgr/cmds.el, dbgr/rbdbgr/core.el,
+       dbgr/rbdbgr/rbdbgr.el, dbgr/rbdbgr/track-mode.el,
+       dbgr/rdebug/cmds.el, dbgr/rdebug/core.el, dbgr/rdebug/rdebug.el,
+       dbgr/rdebug/track-mode.el, dbgr/regexp.el, dbgr/reset.el,
+       dbgr/send.el, dbgr/shortkey.el, dbgr/srcbuf.el, dbgr/track-mode.el,
+       dbgr/track.el, dbgr/window.el, test/test-bp.el,
+       test/test-cmdbuf.el, test/test-core.el, test/test-file.el,
+       test/test-helper.el, test/test-loc.el, test/test-lochist.el,
+       test/test-regexp-gdb.el, test/test-regexp-python.el,
+       test/test-regexp-rbdbgr.el, test/test-regexp-rdebug.el,
+       test/test-regexp.el, test/test-send.el, test/test-shortkey.el,
+       test/test-srcbuf.el, test/test-track.el: All common code now pushed
+       to common directory one level don. First part an overall filesystem
+       reorganization. Later on we will remove init, and rename python to
+       pydbgr, and add pydb.
+
+2010-03-13  rocky <address@hidden>
+
+       * dbgr/key.el, dbgr/lochist.el, dbgr/rdebug/.gitignore,
+       dbgr/rdebug/Makefile: key.el: add key to set breakpoints lochist.el:
+       larger default history ring .gitignore, Makefile: is derived from
+       Makefile.am
+
+2010-03-12  R. Bernstein <address@hidden>
+
+       * dbgr/gdb/gdb-track-mode.el, dbgr/python/pydbgr-track-mode.el,
+       dbgr/rbdbgr/track-mode.el, dbgr/rdebug/track-mode.el,
+       test/Makefile.am, test/test-track-mode.el, test/test-track.el: Base
+       the specific debugger track-mode-maps on the generic track-mode map.
+       Start a track-mode unit test.
+
+2010-03-04  R. Bernstein <address@hidden>
+
+       * configure.ac, dbgr.el, dbgr/Makefile.am, dbgr/init/rdebug.el,
+       dbgr/rbdbgr/.gitignore, dbgr/rbdbgr/Makefile.am,
+       dbgr/rbdbgr/cmds.el, dbgr/rbdbgr/core.el, dbgr/rbdbgr/rbdbgr.el,
+       dbgr/rbdbgr/track-mode.el, dbgr/rdebug/.gitignore,
+       dbgr/rdebug/Makefile, dbgr/rdebug/Makefile.am, dbgr/rdebug/cmds.el,
+       dbgr/rdebug/core.el, dbgr/rdebug/elc-stamp, dbgr/rdebug/rdebug.el,
+       dbgr/rdebug/track-mode.el, dbgr/ruby/.gitignore,
+       dbgr/ruby/Makefile.am, dbgr/ruby/cmds.el, dbgr/ruby/core.el,
+       dbgr/ruby/rbdbgr.el, dbgr/ruby/track-mode.el, test/test-core.el: 
+       Start rdebug. Will probably reorganize directories down the line.
+
+2010-01-31  rocky <address@hidden>
+
+       * dbgr/cmdbuf.el, dbgr/cmds.el, dbgr/key.el, dbgr/menu.el,
+       dbgr/ruby/core.el, dbgr/ruby/rbdbgr.el, dbgr/ruby/track-mode.el,
+       dbgr/track.el, test/test-core.el: Move forward on breakpoints. Add
+       breakpoint list to cmdbuf and menu items for breakpoint  track.el
+       Reduce use of depreciated fields in cmdbuf  ruby/*.el: simplify
+       names.
+
+2010-01-31  rocky <address@hidden>
+
+       * dbgr/ruby/cmds.el, dbgr/ruby/core.el, dbgr/ruby/rbdbgr-core.el,
+       dbgr/ruby/rbdbgr-track-mode.el, dbgr/ruby/track-mode.el: Move
+       forward towards handling breakpoints: Keep a list of breakpoints in
+       cmdbuf, add menu item to set a breakpoint  ruby/*: simplify names
+       track.el: reduce use of depricated loc-regex, file-group, line-group
+       fields.
+
+2010-01-30  rocky <address@hidden>
+
+       * dbgr/cmdbuf.el, dbgr/init/rbdbgr.el, dbgr/track.el: Start to
+       remove dbgr-cmdbuf-info loc-regexp, file-group and line-group. Add
+       pat for in rbdbgr a deleted breakpoint.
+
+2010-01-27  rocky <address@hidden>
+
+       * dbgr.el: dbr.el: dbgr-loaded-features is a command.
+
+2010-01-27  R. Bernstein <address@hidden>
+
+       * dbgr.el, dbgr/bp.el, test/Makefile.am, test/test-bp.el,
+       test/test-dbgr.el: dbgr.el test-dbgr.el: Add ability to get list of
+       feature loaded with dbgr and unload them. This makes it possible to
+       reload dbgr without leaving the Emacs. bp.el: More work needed on
+       testing.
+
+2010-01-27  rocky <address@hidden>
+
+       * dbgr/core.el, dbgr/gdb/gdb.el, dbgr/python/pydbgr.el,
+       dbgr/reset.el, dbgr/ruby/rbdbgr.el: Add reset by default to
+       dbg-exec-shell.
+
+2010-01-26  rocky <address@hidden>
+
+       * dbgr/reset.el: Start a reset routine.
+
+2010-01-26  rocky <address@hidden>
+
+       * dbgr/cmdbuf.el, dbgr/track.el, test/test-cmdbuf.el,
+       test/test-track.el: cmdbuf.el: Save source buffers associated with a
+       given command buffer. track.el: ditto. dbgr-track-from-region():
+       check that cmdbuf is a cmdbuf.
+
+2010-01-24  rocky <address@hidden>
+
+       * dbgr/core.el, dbgr/gdb/gdb.el: gdb.el: expand script filename.
+       core.el: docstring fix.
+
+2010-01-24  rocky <address@hidden>
+
+       * dbgr.el, dbgr/gdb/.gitignore, dbgr/init/gdb.el, dbgr/loc.el,
+       dbgr/regexp.el: Add fields for address, and character offset.
+
+2010-01-21  R. Bernstein <address@hidden>
+
+       * dbgr/gdb/gdb-track-mode.el, dbgr/track.el: Tolerate missing source
+       file. Need to do better though between file.el:
+       dbgr-file-loc-from-line and dbgr/track.el
+
+2010-01-20  rocky <address@hidden>
+
+       * configure.ac: Administrivia
+
+2010-01-20  rocky <address@hidden>
+
+       * dbgr/Makefile.am, dbgr/gdb/.gitignore, dbgr/gdb/Makefile.am,
+       dbgr/gdb/gdb-core.el, dbgr/gdb/gdb-track-mode.el, dbgr/gdb/gdb.el: 
+       Fill out more gdb interaction via dbgr.
+
+2010-01-18  rocky <address@hidden>
+
+       * dbgr/loc.el, test/test-regexp-gdb.el: loc.el: add place holder for
+       column number test-regexp-gdb.el: start unit test for gdb.
+
+2010-01-18  R. Bernstein <address@hidden>
+
+       * dbgr/init/gdb.el: Start gdb mode.
+
+2010-01-09  rocky <address@hidden>
+
+       * dbgr/bp.el, dbgr/track.el, test/test-track.el: Breakpont fixes.
+       Show only one breakpoint icon in margin. Store breakpoint number as
+       a number, not a string. Show breakpoint in help string. Add a
+       dbgr-track-bp-loc test.
+
+2010-01-02  rocky <address@hidden>
+
+       * dbgr/init/bashdb.el, dbgr/init/kshdb.el, dbgr/init/zshdb.el: Add
+       breakpoint tracking regexp.
+
+2010-01-01  rocky <address@hidden>
+
+       * dbgr/init/rdebug.el: Add breakpoint regexp for rdebug.
+
+2010-01-01  rocky <address@hidden>
+
+       * test/test-regexp-rbdbgr.el, test/test-regexp-rdebug.el,
+       test/test-regexp-ruby.el: Add breakpoint tracking for rdebug.
+
+2010-01-01  rocky <address@hidden>
+
+       * test/Makefile: Makefile is derived
+
+2010-01-01  rocky <address@hidden>
+
+       * dbgr/track.el: Remove erroneous message.
+
+2010-01-01  rocky <address@hidden>
+
+       * dbgr/bp.el, dbgr/file.el, dbgr/init/rbdbgr.el, dbgr/loc.el,
+       dbgr/regexp.el, dbgr/track.el, test/test-bp.el,
+       test/test-regexp-ruby.el, test/test-track.el: Attempt to move
+       forward in tracking breakpoints setting.
+
+2009-12-28  rocky <address@hidden>
+
+       * dbgr/bp.el, dbgr/brkpt.el: Add breakpoint handling test.
+
+2009-12-28  rocky <address@hidden>
+
+       * dbgr/brkpt.el: More display/remove cleanup.
+
+2009-12-27  rocky <address@hidden>
+
+       * dbgr/brkpt.el: Small improvements (?) towards getting breakpoint
+       icons working.
+
+2009-12-27  rocky <address@hidden>
+
+       * Makefile.am, configure.ac, dbgr/Makefile.am, dbgr/brkpt.el,
+       dbgr/fringe.el, test/.gitignore, test/Makefile, test/Makefile.am: 
+       Start working on breakpoint icons. "make test" works inside dbgr
+       directory.
+
+2009-12-22  rocky <address@hidden>
+
+       * dbgr/cmds.el, dbgr/send.el, dbgr/window.el, test/test-send.el: 
+       Some debugger commands prompt. So we need to make sure we show the
+       command buffer for those.
+
+2009-12-21  rocky <address@hidden>
+
+       * dbgr/cmds.el, dbgr/custom.el, dbgr/key.el, dbgr/menu.el,
+       dbgr/shortkey.el: Get menus under control. Works now in "short-key"
+       mode. Help is provided too!
+
+2009-12-20  rocky <address@hidden>
+
+       * dbgr/buffer.el, dbgr/cmds.el, dbgr/menu.el,
+       dbgr/ruby/rbdbgr-track-mode.el, dbgr/shortkey.el,
+       dbgr/track-mode.el: Start to add menu commands. gdb command "finish"
+       added.
+
+2009-12-18  rocky <address@hidden>
+
+       * autogen.sh: Don't overwrite elisp-comp.
+
+2009-12-16  rocky <address@hidden>
+
+       * dbgr/loc.el: Use loc-changes-goto of new package loc-changes to
+       find line number positions. loc-changes-goto is more tolerant of
+       buffer modifications.
+
+2009-12-16  rocky <address@hidden>
+
+       * .gitignore, Makefile.am, buffer.el, cmdbuf.el, cmds.el,
+       configure.ac, core.el, custom.el, dbgr.el, dbgr/.gitignore,
+       dbgr/Makefile.am, dbgr/buffer.el, dbgr/cmdbuf.el, dbgr/cmds.el,
+       dbgr/core.el, dbgr/custom.el, dbgr/file.el, dbgr/fringe.el,
+       dbgr/helper.el, dbgr/init.el, dbgr/init/.gitignore,
+       dbgr/init/Makefile.am, dbgr/init/bashdb.el, dbgr/init/kshdb.el,
+       dbgr/init/pydb.el, dbgr/init/pydbgr.el, dbgr/init/rbdbgr.el,
+       dbgr/init/rdebug.el, dbgr/init/remake.el, dbgr/init/zshdb.el,
+       dbgr/key.el, dbgr/loc.el, dbgr/lochist.el, dbgr/python/.gitignore,
+       dbgr/python/Makefile.am, dbgr/python/pydbgr-core.el,
+       dbgr/python/pydbgr-track-mode.el, dbgr/python/pydbgr.el,
+       dbgr/regexp.el, dbgr/ruby/.gitignore, dbgr/ruby/Makefile.am,
+       dbgr/ruby/rbdbgr-core.el, dbgr/ruby/rbdbgr-track-mode.el,
+       dbgr/ruby/rbdbgr.el, dbgr/send.el, dbgr/shortkey.el,
+       dbgr/srcbuf.el, dbgr/track-mode.el, dbgr/track.el, dbgr/window.el,
+       file.el, fringe.el, helper.el, init.el, init/.gitignore,
+       init/Makefile.am, init/bashdb.el, init/kshdb.el, init/pydb.el,
+       init/pydbgr.el, init/rbdbgr.el, init/rdebug.el, init/remake.el,
+       init/zshdb.el, key.el, loc.el, lochist.el, python/.gitignore,
+       python/Makefile.am, python/pydbgr-core.el,
+       python/pydbgr-track-mode.el, python/pydbgr.el, regexp.el,
+       ruby/.gitignore, ruby/Makefile.am, ruby/rbdbgr-core.el,
+       ruby/rbdbgr-track-mode.el, ruby/rbdbgr.el, send.el, shortkey.el,
+       srcbuf.el, test/test-cmdbuf.el, test/test-core.el,
+       test/test-file.el, test/test-helper.el, test/test-loc.el,
+       test/test-lochist.el, test/test-regexp-python.el,
+       test/test-regexp-ruby.el, test/test-regexp.el, test/test-send.el,
+       test/test-shortkey.el, test/test-srcbuf.el, test/test-track.el,
+       track-mode.el, track.el, window.el: dbgr.el - loads everything (via
+       load-relative). Push dbgr source files into dbgr which is where they
+       are installed. Cleaner this way.
+
+2009-12-14  rocky <address@hidden>
+
+       * test/test-srcbuf.el, test/test-track.el: behave -> test-unit
+
+2009-12-13  rocky <address@hidden>
+
+       * test/behave.el, test/test-cmdbuf.el, test/test-core.el,
+       test/test-file.el, test/test-helper.el, test/test-loc.el,
+       test/test-lochist.el, test/test-regexp-python.el,
+       test/test-regexp-ruby.el, test/test-regexp.el, test/test-send.el,
+       test/test-shortkey.el: Remove local behave.el in favor of new
+       test-unit package.
+
+2009-12-10  rocky <address@hidden>
+
+       * track.el: Give error message when track-from-region on a
+       non-debugger command buffer.
+
+2009-12-10  rocky <address@hidden>
+
+       * core.el, fringe.el, track-mode.el, track.el: 
+       dbgr-fringe-history-unset -> dbgr-fringe-erase-history-arrows. Also
+       let it be used as a command.  Update some docstrings.
+
+2009-12-10  rocky <address@hidden>
+
+       * track.el: Make dbgr-track-from-region more interactive useful:
+       call the location tracking routine adjust the display.
+
+2009-12-09  rocky <address@hidden>
+
+       * AUTHORS, init/rdebug.el, track.el: rdebug.el: make more
+       user-friendly for interactive dbgr-track-from-region calls.
+
+2009-12-08  rocky <address@hidden>
+
+       * fringe.el, python/pydbgr.el, ruby/rbdbgr.el: Small changes.
+
+2009-12-06  rocky <address@hidden>
+
+       * key.el, track-mode.el, track.el: track.el: Fix bug in
+       dbgr-goto-line-for-loc-pat key.el, track-mode.el: temporary
+       workaround for VMware keybinding mess up.
+
+2009-12-06  rocky <address@hidden>
+
+       * init/rbdbgr.el, ruby/rbdbgr-track-mode.el, ruby/rbdbgr.el: Make
+       rbdbgr-track-mode.el stand on its own.
+
+2009-11-29  rocky <address@hidden>
+
+       * cmdbuf.el, cmds.el, core.el, key.el, send.el, srcbuf.el,
+       test/test-send.el, track.el: Start adding flags to command-send to
+       indicate whether to record history, and whether we have a
+       frame-changing command. Do more error checking in command-send for
+       running processes and so on. Add more commands and keys bindings to
+       short-key.  core.el: consider source and command buffer past history
+       *only* if it was run with the same debugger as we want to currently
+       run.
+
+2009-11-29  rocky <address@hidden>
+
+       * cmds.el, helper.el, key.el, send.el, test/test-send.el: Make gdb
+       commands more short-key friendly - that is can be called from the
+       source window. Add newer-frame: "<" and older frame ">".
+
+2009-11-29  rocky <address@hidden>
+
+       * fringe.el, track-mode.el, track.el: Handle some error cases, and
+       fix source tracking created in DRYing code. fringe.el: handle
+       deleting the buffer we are trying to update the fringe arrow for
+       track-mode.el: handle error case where we invoke dbgr-track-mode in
+       a non-process buffer. track.el: need to switch to source buffer to
+       query overlay arrow.
+
+2009-11-29  rocky <address@hidden>
+
+       * shortkey.el, track.el, window.el: Keep command buffer position and
+       source location position in sync when moving back in the history of
+       positions. See docstring of dbgr-track-hist-fn-internal for which
+       windows get displayed. DRY code a little.
+
+2009-11-29  rocky <address@hidden>
+
+       * Makefile.am, cmdbuf.el, core.el, key.el, loc.el, shortkey.el,
+       srcbuf.el, test/behave.el, test/test-file.el,
+       test/test-shortkey.el, track-mode.el, track.el, window.el: Fix up
+       and simplify short-key mode so the setting is saved in the process
+       buffer and propagated to the source buffers encountered.  key.el:
+       add 's' for step. test/behave.el: add assert-raises!  track-mode.el:
+       use standard name -setup instead of -body. Pass an explicit
+       parameter.  window.el: remove older, now-unused code.
+
+2009-11-27  rocky <address@hidden>
+
+       * cmdbuf.el, cmds.el, file.el, loc.el, shortkey.el,
+       test/test-cmdbuf.el, track.el, window.el: Bang on (source) window
+       update and display. Less disruption of windows on update. Add
+       variable in cmdbuf to track shortkey mode.  file.el
+       (dbgr-file-line-count): remove bug. save-current isn't what we want.
+       Use find-file-noselect so we don't disrupt current buffer.
+       cmdbuf.el, cmds,el: at ? to ends of boolean variables.  loc.el:
+       don't change the selected buffer.  test-cmdbuf.el: fix improper call
+       to dbgr-cmdbuf-info-cmd-args=
+
+2009-11-26  rocky <address@hidden>
+
+       * cmdbuf.el: Remove spurious warning.
+
+2009-11-26  rocky <address@hidden>
+
+       * Makefile.am, elisp-comp, helper.el, test/test-cmdbuf.el: 
+       elisp-comp: remove temp script. Makefile.am: Wasn't running cmdbuf
+       test. helper.el: current best guess at a setter method.
+
+2009-11-25  rocky <address@hidden>
+
+       * test/behave.el, test/test-send.el: behave.el: fix incorrect
+       initializion of assert count. test-send.el: Check docstring is set
+       on dbgr-define-command
+
+2009-11-24  rocky <address@hidden>
+
+       * send.el, test/behave.el, test/test-send.el: send.el: docstring
+       elaboration. test-send.el: Add test of dbgr-define-command. Show
+       number of assertions run.
+
+2009-11-24  rocky <address@hidden>
+
+       * ruby/rbdbgr.el: Need to use require-relative-list with prefix?
+
+2009-11-24  rocky <address@hidden>
+
+       * track.el: Force going to the current source-code line when in the
+       case that buffer is already visible. No doubt there will be more
+       work on this.
+
+2009-11-23  rocky <address@hidden>
+
+       * configure.ac: dbgr-loc.el -> dbgr.el
+
+2009-11-23  R. Bernstein <address@hidden>
+
+       * core.el, python/pydbgr-track-mode.el, python/pydbgr.el,
+       ruby/rbdbgr-track-mode.el, ruby/rbdbgr.el, track-mode.el: Deal with
+       process sentinel as part of turning on dbgr-track-mode so that we
+       catch process hangup dbgr-track-mode (as well as running the
+       debugger from the outset).
+
+2009-11-23  R. Bernstein <address@hidden>
+
+       * buffer.el, cmdbuf.el, core.el, lochist.el, srcbuf.el: docstring
+       name regularization.
+
+2009-11-22  rocky <address@hidden>
+
+       * buffer.el, cmdbuf.el, cmds.el, core.el, custom.el,
+       dbgr-buffer.el, dbgr-cmdbuf.el, dbgr-cmds.el, dbgr-core.el,
+       dbgr-custom.el, dbgr-file.el, dbgr-fringe.el, dbgr-helper.el,
+       dbgr-init.el, dbgr-key.el, dbgr-loc.el, dbgr-lochist.el,
+       dbgr-regexp.el, dbgr-send.el, dbgr-shortkey.el, dbgr-srcbuf.el,
+       dbgr-track-mode.el, dbgr-track.el, dbgr-window.el, file.el,
+       fringe.el, helper.el, init.el, init/bashdb.el, init/kshdb.el,
+       init/pydb.el, init/pydbgr.el, init/rbdbgr.el, init/rdebug.el,
+       init/remake.el, init/zshdb.el, key.el, loc.el, lochist.el,
+       python/pydbgr-core.el, python/pydbgr-track-mode.el,
+       python/pydbgr.el, regexp.el, ruby/rbdbgr-core.el,
+       ruby/rbdbgr-track-mode.el, ruby/rbdbgr.el, send.el, shortkey.el,
+       srcbuf.el, test/test-core.el, test/test-file.el,
+       test/test-helper.el, test/test-loc.el, test/test-lochist.el,
+       test/test-regexp.el, test/test-send.el, test/test-srcbuf.el,
+       test/test-track.el, track-mode.el, track.el, window.el: Remove dbgr-
+       from filenames, although the files still provide with a dbgr- prefix
+       thanks to recent changes to load-relative.
+
+2009-11-22  rocky <address@hidden>
+
+       * dbgr-buffer.el, dbgr-cmdbuf.el, dbgr-cmds.el, dbgr-helper.el,
+       dbgr-key.el, dbgr-send.el, dbgr-shortkey.el, dbgr-track-mode.el,
+       dbgr-track.el, dbgr-window.el: Bang on short-key mode. Add variable
+       in command buffer which tell whether to add a cmmand to the history
+       or and to end up in the command buffer. Bugs in dbgr-define-command
+       fixed. provide-me used more often.
+
+2009-11-20  rocky <address@hidden>
+
+       * dbgr-buffer.el, dbgr-cmdbuf.el, dbgr-core.el, dbgr-custom.el,
+       dbgr-file.el, dbgr-helper.el, dbgr-key.el, dbgr-send.el,
+       dbgr-shortkey.el, dbgr-srcbuf.el, dbgr-track.el: (provide 'xxx) ->
+       (provide-me). This ensures we get it right. Start to fold in Anders'
+       shortkey mode and keybindings and all that other great stuff.
+
+2009-11-20  rocky <address@hidden>
+
+       * dbgr-send.el: dbgr-send-process: send a debugger command and
+       redirect output to a temporary buffer. The hope is that this is will
+       be a cleaner way to make a request and get an answer - no comint
+       filters are involved.
+
+2009-11-20  R. Bernstein <address@hidden>
+
+       * dbgr-core.el, dbgr-fringe.el, dbgr-track.el: Set fringe arrows for
+       dedicated command buffers.
+
+2009-11-20  R. Bernstein <address@hidden>
+
+       * test/test-lochist.el: Test changes since we no longer remove
+       duplicate locations.
+
+2009-11-20  R. Bernstein <address@hidden>
+
+       * dbgr-cmds.el, dbgr-fringe.el, dbgr-lochist.el,
+       dbgr-track-mode.el, python/pydbgr-track-mode.el,
+       ruby/rbdbgr-track-mode.el: dbgr-fringe.el: remove duplicate test.
+       This needs to be done at a higher level. Empirically get fringe
+       history access correct, until I better understand what's wrong.
+       dbgr-cmds.el: add more gdb commands. Use them in the python and ruby
+       debuggers.
+
+2009-11-20  rocky <address@hidden>
+
+       * dbgr-fringe.el, dbgr-track.el: Don't set older marks if the are at
+       the same position as newer ones.
+
+2009-11-20  rocky <address@hidden>
+
+       * dbgr-cmdbuf.el, dbgr-core.el, dbgr-fringe.el, dbgr-loc.el,
+       dbgr-srcbuf.el, dbgr-track-mode.el, dbgr-track.el,
+       test/test-regexp.el: Add history of locations stopped (last 3) in
+       the fringe. Also some associated simplification and cleanup around
+       this code.
+
+2009-11-19  R. Bernstein <address@hidden>
+
+       * dbgr-arrow.el, dbgr-buffer.el, dbgr-cmdbuf.el, dbgr-core.el,
+       dbgr-fringe.el, dbgr-loc.el, dbgr-track.el: dbgr-arrow ->
+       dbgr-fringe. Simplify a tad more.
+
+2009-11-19  rocky <address@hidden>
+
+       * dbgr-arrow.el, dbgr-core.el, dbgr-loc.el, dbgr-track-mode.el,
+       dbgr-track.el: Improve arrow interface to just the essentials.
+       Remove arrow when leaving dbgr-track-mode.
+
+2009-11-19  rocky <address@hidden>
+
+       * dbgr-arrow.el: Fringe arrow cleanup and simplification in advance
+       of reworking to add a source buffer-local variable of ring of
+       history positions and marking them in the fringe in both the source
+       and command buffers.  list of positions
+
+2009-11-19  rocky <address@hidden>
+
+       * dbgr-arrow.el, ruby/rbdbgr-core.el: rbdbgr-core.el: fix invalid fn
+       name dbgr-arrow.el: start allow location history in fringe.
+
+2009-11-18  rocky <address@hidden>
+
+       * test/test-send.el, test/test-srcbuf.el: Attempt more realistic
+       tests.
+
+2009-11-18  R. Bernstein <address@hidden>
+
+       * dbgr-buffer.el, dbgr-cmdbuf.el, dbgr-init.el, dbgr-srcbuf.el,
+       dbgr-track-mode.el, test/test-send.el: Bugs I probably would have
+       caught if I had done more thorough unit testing.
+
+2009-11-18  R. Bernstein <address@hidden>
+
+       * dbgr-core.el, init/Makefile.am: Small bugfix.
+
+2009-11-18  R. Bernstein <address@hidden>
+
+       * Makefile.am, python/pydbgr-core.el, python/pydbgr-track-mode.el,
+       python/pydbgr.el, ruby/rbdbgr-core.el, ruby/rbdbgr-track-mode.el,
+       ruby/rbdbgr.el: Since elisp-comp has been fixed we can use
+       require-relative-list in subdirectories. Reinstate compiling them.
+       DRY code some.
+
+2009-11-18  rocky <address@hidden>
+
+       * .gitignore, Makefile.am, dbgr-cmdbuf.el, dbgr-core.el,
+       dbgr-init.el, dbgr-track-mode.el, elisp-comp,
+       python/pydbgr-core.el, python/pydbgr-track-mode.el,
+       python/pydbgr.el, ruby/rbdbgr-core.el, ruby/rbdbgr.el,
+       test/test-send.el, test/test-track.el: Correct bugs in and clean up
+       track-mode setting and debugger invocation.  Suggested debugger
+       invocation command is now the last invocation unless the buffer has
+       a better idea.  elisp-comp: we now need our own since we don't want
+       to compile in a directory. Makefile.am: no subdirs until I have more
+       time to go over this.
+
+2009-11-17  rocky <address@hidden>
+
+       * Makefile.am, configure.ac, dbgr-cmdbuf.el, dbgr-core.el,
+       dbgr-init.el, dbgr-regexp.el, dbgr-track.el, init/.gitignore,
+       init/Makefile.am, init/bashdb.el, init/kshdb.el, init/pydb.el,
+       init/pydbgr.el, init/rbdbgr.el, init/rdebug.el, init/remake.el,
+       init/zshdb.el, python/pydbgr-core.el, python/pydbgr-regexp.el,
+       python/pydbgr.el, ruby/rbdbgr-core.el, ruby/rbdbgr-regexp.el,
+       ruby/rbdbgr-track-mode.el, ruby/rbdbgr.el, test/test-cmdbuf.el,
+       test/test-regexp-python.el, test/test-regexp-ruby.el,
+       test/test-regexp.el, test/test-send.el: Create a global hash which
+       contains regular expression information for each of the debuggers.
+       Each debugger has a regular expression to match a prompt location
+       and a regular expression for the prompt string that comint uses.
+       However there may be other regular expressions for things like stack
+       traces.  Part of a long-needed refactoring. More to follow. Expect
+       breakage.
+
+2009-11-17  R. Bernstein <address@hidden>
+
+       * dbgr-cmdbuf.el, test/test-send.el: I think the bug in
+       load-relative may have been the cause of some of the weirdness found
+       here.
+
+2009-11-17  R. Bernstein <address@hidden>
+
+       * dbgr-cmds.el, dbgr-send.el: Add dbgr-define-command and some
+       common gdb-commands.
+
+2009-11-17  R. Bernstein <address@hidden>
+
+       * dbgr-send.el, test/test-send.el: Don't issue message if we are in
+       a command buffer Fill in test cases more.
+
+2009-11-17  rocky <address@hidden>
+
+       * dbgr-send.el, test/test-send.el: Make dbgr-command interactive.
+
+2009-11-17  rocky <address@hidden>
+
+       * Makefile.am, dbgr-send.el, test/test-send.el: Add
+       dbgr-expand-format-string
+
+2009-11-17  rocky <address@hidden>
+
+       * dbgr-arrow.el: dbgr-set-arrow: add optional indicator pair
+
+2009-11-16  rocky <address@hidden>
+
+       * dbgr-arrow.el: Minor
+
+2009-11-16  rocky <address@hidden>
+
+       * dbgr-core.el, python/pydbgr.el, ruby/rbdbgr.el: Hoist some common
+       code. Missing a require in rbdbgr.el and remove an extra prvide in
+       pydbgr.el
+
+2009-11-16  rocky <address@hidden>
+
+       * dbgr-buffer.el, dbgr-cmdbuf.el, dbgr-core.el, dbgr-helper.el,
+       dbgr-srcbuf.el, dbgr-track-mode.el, test/test-helper.el: Simpilify
+       struct access even more by removing "dbgr-" prefix. I like things to
+       look real simple.
+
+2009-11-16  rocky <address@hidden>
+
+       * dbgr-buffer.el, dbgr-cmdbuf.el, dbgr-core.el, dbgr-srcbuf.el,
+       python/pydbgr-core.el, ruby/rbdbgr-core.el: Push forward with
+       simpler access to struct fields. pydbgr, rbdbgr: remove compilation
+       bug/warning.
+
+2009-11-16  R. Bernstein <address@hidden>
+
+       * dbgr-cmdbuf.el, dbgr-srcbuf.el, dbgr-track-mode.el,
+       dbgr-track.el, python/pydbgr.el, ruby/rbdbgr.el: dbgr-cmdbuf: minor
+       fixes. SMake more use simplified defstruct access, add dbgr-cmdbuf?
+       rbdbgr: pass in pat-hash to get set correctly.
+
+2009-11-16  rocky <address@hidden>
+
+       * dbgr-cmdbuf.el, dbgr-helper.el, dbgr-track.el, test/behave.el,
+       test/test-cmdbuf.el, test/test-helper.el: dbgr-sget: start to
+       simplify access to defstruct fields. More cmdbuf tests.
+
+2009-11-15  rocky <address@hidden>
+
+       * dbgr-cmdbuf.el, dbgr-send.el, dbgr-track-mode.el, dbgr-track.el,
+       python/pydbgr-core.el, python/pydbgr-regexp.el,
+       python/pydbgr-track-mode.el, python/pydbgr.el,
+       ruby/rbdbgr-regexp.el, ruby/rbdbgr-track-mode.el: dbgr-command-send
+       now echos its output. prompt is set correctly for rbdbgr and pydbgr.
+
+
+2009-11-15  rocky <address@hidden>
+
+       * Makefile.am, dbgr-buffer.el, dbgr-cmdbuf.el, dbgr-core.el,
+       dbgr-helper.el, dbgr-regexp.el, dbgr-scriptbuf.el, dbgr-send.el,
+       dbgr-srcbuf.el, dbgr-track-mode.el, dbgr-track.el,
+       python/pydbgr-core.el, python/pydbgr-regexp.el, python/pydbgr.el,
+       ruby/rbdbgr-core.el, ruby/rbdbgr-regexp.el, ruby/rbdbgr.el,
+       test/test-scriptbuf.el, test/test-srcbuf.el: Bug fix: minibuffer
+       history was not saving prior of debugger invocations. scriptbuf ->
+       srcbuf.
+
+2009-11-15  rocky <address@hidden>
+
+       * test/test-helper.el, test/test-regexp-ruby.el,
+       test/test-regexp2.el: Add with-current-buffer-safe to guard against
+       deleted buffers. Set/save comint-prompt-regexp. Correct debugger
+       prompts which are not the same as location matching patterns.
+       Workaround problem in loading pydbg/rbdbgr not pulling in all files.
+       Include python regexp test.
+
+2009-11-15  rocky <address@hidden>
+
+       * dbgr-buffer.el, dbgr-send.el: Start routines which allow us to
+       send commands to the debugger process: dbgr-send-command. Right now
+       though, It is not inserting into the buffer nor the output filter
+       function to kick in.
+
+2009-11-15  rocky <address@hidden>
+
+       * dbgr-buffer.el, dbgr-core.el, dbgr-file.el, dbgr-loc.el,
+       dbgr-lochist.el, dbgr-track.el, dbgr-window.el: Start to use
+       require-relative-list more. Note: require-relative-list has problems
+       when used in subdirectories python or ruby. But for '.' -like
+       require relative, it is fine.
+
+2009-11-15  rocky <address@hidden>
+
+       * dbgr-buffer.el, dbgr-cmdbuf.el, dbgr-core.el, dbgr-file.el,
+       dbgr-scriptbuf.el, dbgr-track.el, test/test-cmdbuf.el: 
+       dbg-buffer.el: Start buffer access routines Start to reduce
+       declare-functions by getting definitions more directly.
+
+2009-11-14  rocky <address@hidden>
+
+       * Makefile.am, dbgr-cmdbuf.el, dbgr-loc.el, dbgr-scriptbuf.el,
+       test/test-cmdbuf.el, test/test-scriptbuf.el: Start cmdbuf tests. Add
+       predicates to see if a buffer is a debugger script or command.
+
+2009-11-13  R. Bernstein <address@hidden>
+
+       * Makefile.am, configure.ac, python/.gitignore, python/Makefile.am,
+       ruby/Makefile.am: Fix up install so that we go to our own directory
+       and have language-specific directories underneath that.
+
+2009-11-13  R. Bernstein <address@hidden>
+
+       * python/.gitignore, python/Makefile.am, python/pydbgr.el,
+       ruby/.gitignore, ruby/rbdbgr.el: Mostly administrivia.
+
+2009-11-13  rockyb <address@hidden>
+
+       * dbgr-core.el, python/pydbgr-track-mode.el, python/pydbgr.el,
+       ruby/rbdbgr.el: Sentinel should detect deleted buffers. comint
+       output hooks were not installed in pydbgr and rbdbgr.
+
+2009-11-13  R. Bernstein <address@hidden>
+
+       * Makefile.am, configure.ac, dbgr-track-mode.el, dbgr-track.el,
+       python/pydbgr-core.el, python/pydbgr-regexp.el,
+       python/pydbgr-track-mode.el, python/pydbgr.el, ruby/Makefile.am,
+       ruby/rbdbgr-core.el, ruby/rbdbgr-regexp.el,
+       ruby/rbdbgr-track-mode.el, ruby/rbdbgr.el: Add Makefiles in python
+       and ruby. Remove byte-compile warnings in python and ruby.
+       dbgr-track.el: goto-... -> dbgr-goto
+
+2009-11-13  rocky <address@hidden>
+
+       * dbgr-arrow.el, dbgr-cmdbuf.el, dbgr-file.el, dbgr-helper.el,
+       dbgr-loc.el, dbgr-lochist.el, dbgr-scriptbuf.el,
+       dbgr-track-mode.el, dbgr-track.el, dbgr-window.el,
+       python/pydbgr-core.el, python/pydbgr.el, ruby/rbdbgr-core.el,
+       ruby/rbdbgr.el: Switch to using require-relative instead of
+       load-realative.
+
+2009-11-13  rocky <address@hidden>
+
+       * dbgr-cmdbuf.el, dbgr-core.el, dbgr-file.el, dbgr-loc.el,
+       dbgr-lochist.el, dbgr-scriptbuf.el, dbgr-track-mode.el,
+       dbgr-track.el, dbgr-window.el, python/pydbgr-core.el,
+       python/pydbgr-track-mode.el, python/pydbgr.el, ruby/rbdbgr-core.el,
+       ruby/rbdbgr-regexp.el, ruby/rbdbgr-track-mode.el, ruby/rbdbgr.el: 
+       Used in testing require-relative
+
+2009-11-11  rocky <address@hidden>
+
+       * dbgr-cmdbuf.el, dbgr-core.el, dbgr-helper.el,
+       python/pydbgr-core.el, python/pydbgr.el, ruby/rbdbgr-core.el,
+       ruby/rbdbgr.el, test/test-scriptbuf.el: */*-core.el Common routine
+       to query for command line. dbgr-cmdf.el: fix bugs in command-line
+       retrieval.
+
+2009-11-11  R. Bernstein <address@hidden>
+
+       * dbgr-cmdbuf.el, dbgr-scriptbuf.el, python/pydbgr-core.el,
+       python/pydbgr.el, ruby/rbdbgr-core.el, ruby/rbdbgr.el: First cut at
+       saving command arguments in script buffer. Much improved but More
+       work needed.
+
+2009-11-11  R. Bernstein <address@hidden>
+
+       * dbgr-cmdbuf.el, dbgr-core.el, dbgr-procbuf.el, dbgr-scriptbuf.el,
+       dbgr-track-mode.el, dbgr-track.el, test/test-regexp.el,
+       test/test-scriptbuf.el, test/test-track.el: procbuf -> cmdbuf
+
+2009-11-11  rocky <address@hidden>
+
+       * dbgr-file.el, dbgr-helper.el, dbgr-procbuf.el, dbgr-scriptbuf.el,
+       dbgr-track.el, dbgr-window.el, test/.gitignore, test/behave.el,
+       test/test-helper.el, test/test-scriptbuf.el: behave.el: was not
+       passing assertion message to assert-t Store debugger name inside
+       script buffers. Command invocation to come... dbgr-window.el: add
+       provide for my name. Start helper file. xx-p -> xx? because it is
+       cooler.
+
+2009-11-10  rocky <address@hidden>
+
+       * dbgr-loc.el, ruby/rbdbgr.el: dbgr-loc.el: fix M-up/down motion in
+       command buffer to match mark ruby/rbdbgr.el: remove bogus
+       (shell-mode).
+
+2009-11-10  R. Bernstein <address@hidden>
+
+       * dbgr-file.el, dbgr-loc.el, dbgr-lochist.el, dbgr-procbuf.el,
+       dbgr-track.el, test/test-file.el, test/test-load.el,
+       test/test-loc.el, test/test-lochist.el: Move command process mark
+       into location structure. More work is needed.
+
+2009-11-10  rocky <address@hidden>
+
+       * dbgr-loc.el, dbgr-lochist.el, dbgr-procbuf.el, dbgr-track.el: Keep
+       (historical) process buffer position in sync with historical source
+       buffer position. Warning: this needs refactorization.
+
+2009-11-10  rocky <address@hidden>
+
+       * dbgr-arrow.el: switch-buffer -> set-buffer so we don't mess up
+       window positions.
+
+2009-11-09  rocky <address@hidden>
+
+       * dbgr-core.el: dbgr-exec-shell Deal with nil directory in command
+       invocation
+
+2009-11-09  R. Bernstein <address@hidden>
+
+       * dbgr-core.el, dbgr-loc.el, dbgr-lochist.el, dbgr-procbuf.el,
+       dbgr-regexp.el, dbgr-scriptbuf.el, dbgr-track.el: Remove
+       byte-compile warnings.
+
+2009-11-09  R. Bernstein <address@hidden>
+
+       * dbgr-track-mode.el, dbgr-track.el: Better load-relative uses and
+       remove a failing require.
+
+2009-11-09  rocky <address@hidden>
+
+       * ruby/rbdbgr-core.el, ruby/rbdbgr-regexp.el,
+       ruby/rbdbgr-track-mode.el, ruby/rbdbgr.el: Use require-relative now.
+
+
+2009-11-09  rocky <address@hidden>
+
+       * dbgr-core.el, dbgr-file.el, dbgr-procbuf.el, dbgr-track.el: Use
+       load-relative with lists of files when possible.
+
+2009-11-09  rocky <address@hidden>
+
+       * README, dbgr-core.el, dbgr-load.el, dbgr-loc.el,
+       dbgr-track-mode.el, dbgr-track.el, test/behave.el: Start to use
+       load-relative. dbgr-core.el: fix bug in dbgr-term-sentinal
+
+2009-11-08  rocky <address@hidden>
+
+       * dbgr-core.el, dbgr-procbuf.el, dbgr-scriptbuf.el, dbgr-track.el,
+       ruby/rbdbgr-core.el, test/test-scriptbuf.el: Clean up code with sets
+       buffer-local variables in scriptbuf and procbuf. Although this is a
+       big improvement, more work is needed.
+
+2009-11-08  rocky <address@hidden>
+
+       * Makefile.am, dbgr-arrow.el, dbgr-core.el, dbgr-scriptbuf-var.el,
+       dbgr-scriptbuf.el, dbgr-track.el, python/pydbgr-core.el,
+       ruby/rbdbgr-core.el, test/test-scriptbuf.el: Set debugger
+       buffer-local variables for command/process and source buffers. Set
+       default directory in command buffer. Source buffer now has last
+       command invocation and a pointer to the process buffer.
+
+2009-11-07  rocky <address@hidden>
+
+       * dbgr-arrow.el, dbgr-core.el, dbgr-load.el, dbgr-loc.el,
+       dbgr-procbuf-var.el, dbgr-procbuf.el, dbgr-scriptbuf-var.el,
+       dbgr-track-mode.el, dbgr-track.el, test/test-regexp.el,
+       test/test-track.el: Put overla/arrow/fringe arrow on current
+       location in source window.
+
+2009-11-02  rocky <address@hidden>
+
+       * dbgr-regexp.el, dbgr-track-mode.el, dbgr-track.el: dbgr-regexp.el:
+       regexp bug fixes for rdebug. dbgr-track-mode.el: docstring typo
+       dbgr-track.el: don't run hooks if dbgr-track-mode is not set.
+
+2009-11-02  R. Bernstein <address@hidden>
+
+       * dbgr-file.el, dbgr-track.el, python/pydbgr-core.el,
+       ruby/rbdbgr-core.el, ruby/rbdbgr-regexp.el: Keep history of pydbgr,
+       rbdbgr invocations and modify minibuffer mode map to do filename
+       completion. FIXME: need to DRY this code.
+
+2009-11-02  rocky <address@hidden>
+
+       * dbgr-core.el, dbgr-scriptbuf-var.el, python/pydbgr.el,
+       ruby/rbdbgr-core.el, ruby/rbdbgr.el: Save the last invocation as a
+       buffer-local variable in the process buffer.
+
+2009-11-01  rocky <address@hidden>
+
+       * test/behave.el, test/test-regexp-python.el: Add an optional
+       message parmater on assert-... .
+
+2009-11-01  rocky <address@hidden>
+
+       * test/behave.el: Tidy behave.el a little bit more.
+
+2009-11-01  rocky <address@hidden>
+
+       * test/behave.el, test/test-core.el, test/test-file.el,
+       test/test-load.el, test/test-loc.el, test/test-lochist.el,
+       test/test-regexp-python.el, test/test-regexp.el,
+       test/test-regexp2.el, test/test-track.el: behave.el: expect- =>
+       assert- . DRY assert-t.
+
+2009-11-01  rocky <address@hidden>
+
+       * dbgr-core.el, dbgr-track.el, python/pydbgr-core.el,
+       python/pydbgr-regexp.el, python/pydbgr-track-mode.el,
+       python/pydbgr.el, ruby/.gitignore, ruby/rbdbgr-core.el,
+       ruby/rbdbgr-track-mode.el, test/test-regexp-python.el: Add a 2nd
+       debugger. In the process DRY and make common some code.
+
+2009-10-31  rocky <address@hidden>
+
+       * dbgr-core.el, dbgr-loc.el: Don't kill existing processes in
+       processe buffers when rerunning the same command Showing location
+       negotiates the buffers correctly now.
+
+2009-10-31  rocky <address@hidden>
+
+       * dbgr-core.el, dbgr-file.el, dbgr-track-mode.el, dbgr-track.el,
+       dbgr-window.el, ruby/rbdbgr-core.el, ruby/rbdbgr-track-mode.el,
+       ruby/rbdbgr.el: rbdbgr via comint now works.
+
+2009-10-30  R. Bernstein <address@hidden>
+
+       * dbgr-core.el, dbgr-file.el, ruby/rbdbgr.el: More work on term
+       mode.
+
+2009-10-30  rocky <address@hidden>
+
+       * Makefile.am, configure.ac, dbgr-core.el, dbgr-file.el,
+       dbgr-regexp.el, dbgr-track-mode.el, dbgr-track.el, ruby/.gitignore,
+       ruby/Makefile.am, ruby/rbdbgr-core.el, ruby/rbdbgr-regexp.el,
+       ruby/rbdbgr-track-mode.el, ruby/rbdbgr.el, test/behave.el,
+       test/test-core.el, test/test-track.el: For now rbdbgr uses term.el
+       for its process buffer. However term.el doesn't have an output
+       filter function - yet.
+
+2009-10-29  R. Bernstein <address@hidden>
+
+       * dbgr-core.el, ruby/rbdbgr-core.el, test/test-core.el: More
+       detailed command-line parsing. Warning - is in intermediate state.
+
+2009-10-29  R. Bernstein <address@hidden>
+
+       * dbgr-core.el, ruby/rbdbgr-core.el, ruby/rbdbgr.el: Closer to
+       having command rbdbgr working.
+
+2009-10-29  R. Bernstein <address@hidden>
+
+       * dbgr-core.el: Start dbgr-exec-shell and dbgr-term-sential -
+       creation of an eterm shell to run debugger in.
+
+2009-10-29  rocky <address@hidden>
+
+       * dbgr-file.el, dbgr-track-mode.el, dbgr-track.el,
+       ruby/rbdbgr-core.el, test/test-core.el, test/test-file.el,
+       test/test-load.el, test/test-loc.el, test/test-lochist.el,
+       test/test-regexp.el, test/test-regexp2.el, test/test-track.el: Use
+       save-current-buffer. clean up dbgr-track-mode.el and misc small
+       fixes.
+
+2009-10-29  rocky <address@hidden>
+
+       * dbgr-core.el, dbgr-track-mode.el, ruby/rbdbgr-core.el,
+       test/behave.el, test/gcd.rb, test/test-core.el, test/test-file.el,
+       test/test-load.el, test/test-loc.el, test/test-lochist.el,
+       test/test-regexp.el, test/test-regexp2.el: test/behave.el: add
+       expect-equal, expect-t, expect-nil and show actual + expected on
+       error dbgr-core.el: move option parsing here rbdbgr-core.el: fn-name
+       typo; adjust for new dbgr-core test-core.el: add more
+       rbdbgr-file-mode tests
+
+2009-10-28  rocky <address@hidden>
+
+       * dbgr-track-mode.el, dbgr-track.el, ruby/rbdbgr-core.el,
+       ruby/rbdbgr-regexp.el, ruby/rbdbgr-track-mode.el: 
+       dbgr-track-mode.el: simplify mode hook code by using
+       define-minor-mode macro more effectively.  dbgr-track.el: we'll see
+       if we can get away with not having dbg-info global.  ruby/*.el:
+       rbdbgr-track-mode now works again
+
+2009-10-28  rocky <address@hidden(none)>
+
+       * dbgr-track-mode.el, dbgr-track.el, ruby/rbdbgr-track-mode.el: 
+       dbgr-track-mode sets status dynamically based on debugger name.
+
+2009-10-28  rockyb <address@hidden>
+
+       * autogen.sh, configure.ac, dbgr-file.el, dbgr-load.el,
+       dbgr-loc.el, dbgr-scriptbuf-var.el, dbgr-track-mode.el,
+       dbgr-track.el, ruby/rbdbgr-core.el, test/test-core.el: 
+       dbgr-track-mode minimally works.
+
+2009-10-28  rockyb <address@hidden>
+
+       * Start the Grand Unified Debugger Rewrite.
+
diff --git a/packages/realgud/INSTALL.md b/packages/realgud/INSTALL.md
new file mode 100644
index 0000000..cc7f7dd
--- /dev/null
+++ b/packages/realgud/INSTALL.md
@@ -0,0 +1,5 @@
+* Have `test-simple`, `loc-changes`, `cl-lib` and `load-relative` installed.
+* From inside emacs, evaluate:
+```lisp
+  (compile (format "EMACSLOADPATH=:%s:%s ./autogen.sh" (file-name-directory 
(locate-library "test-simple.elc")) (file-name-directory (locate-library 
"realgud.elc"))))
+```
diff --git a/packages/realgud/Makefile.am b/packages/realgud/Makefile.am
new file mode 100644
index 0000000..0a8395f
--- /dev/null
+++ b/packages/realgud/Makefile.am
@@ -0,0 +1,68 @@
+# Note: This makefile include remake-style target comments.
+# These comments before the targets start with #:
+# remake --tasks to shows the targets and the comments
+
+SUBDIRS = realgud test
+
+GIT2CL ?= git2cl
+RUBY   ?= ruby
+
+lispdir = @lispdir@
+
+include common.mk
+
+PHONY=check clean dist distclean test check-short check-terse install-short
+
+EXTRA_DIST=common.mk README.md INSTALL.md THANKS  $(lisp_files) test/gcd.py 
test/gcd.rb test/gdb
+
+if MAINTAINER_MODE
+
+#: Remove change log: ChangeLog
+rmChangeLog:
+       rm ChangeLog || true
+
+#: Create a ChangeLog file from git logs
+ChangeLog: rmChangeLog
+       git log --pretty --numstat --summary | $(GIT2CL) > $@
+
+ACLOCAL_AMFLAGS=-I .
+
+endif
+
+#: Run all tests
+test: check
+
+#: Run all tests without bloated output
+check-short:
+       $(MAKE) check 2>&1  | $(RUBY) test/make-check-filter.rb
+
+#: Run all tests without and show just the failure lines
+check-terse:
+       $(MAKE) check 2>&1  | $(RUBY) tes/make-check-filter.rb | grep failure
+
+#: Run "make install"
+install-short:
+       $(MAKE) install 2>&1  | $(RUBY) test/make-check-filter.rb
+
+.PHONY: test check check-short rmChangeLog check_copyrights
+
+CR_EXCEPTIONS=cr_exceptions.txt
+#: Check that copyrights are assigned to FSF
+check_copyrights:
+       @echo "Compute exceptions >$(CR_EXCEPTIONS)~"
+       @export LC_ALL=C;                                           \
+       (cd $(top_srcdir) &&                                        \
+       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)~"
diff --git a/packages/context-coloring/test/fixtures/empty 
b/packages/realgud/NEWS
similarity index 100%
copy from packages/context-coloring/test/fixtures/empty
copy to packages/realgud/NEWS
diff --git a/packages/realgud/README.md b/packages/realgud/README.md
new file mode 100644
index 0000000..dde134c
--- /dev/null
+++ b/packages/realgud/README.md
@@ -0,0 +1,110 @@
+[![Build Status][travis-image]][travis-url]
+[![MELPA][melpa-image]][melpa]
+[![MELPA Stable][melpa-stable-image]][melpa-stable]
+
+![RealGUD logo](etc/realgud-logo.png)
+
+**A extensible, modular GNU Emacs front-end for interacting with external 
debuggers**, brought to you by **Rocky Bernstein** 
(address@hidden(https://github.com/rocky)) and **Clément Pit-Claudel** 
(address@hidden(https://github.com/cpitclaudel)).
+
+![RealGUD screenshot](etc/realgud.png)
+
+# Setup
+
+You can install RealGUD from [MELPA](http://melpa.org/#/getting-started), a 
repository of Emacs packages. If you don't have MELPA set up, add the following 
to your `.emacs` and restart Emacs:
+
+```elisp
+(require 'package)
+(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/";) t)
+(package-initialize)
+```
+
+You can then run the following commands to install RealGUD:
+
+```
+M-x package-refresh-contents RET      (to refresh your package database)
+M-x package-install RET realgud RET   (to install and compile `realgud` and 
its dependencies)
+```
+
+Alternatively, you can install RealGUD using 
[el-get](http://www.emacswiki.org/emacs/el-get) or from source directly. See 
[this article](https://github.com/realgud/realgud/wiki/How-to-Install) in our 
wiki for more info.
+
+# Quick start
+
+Use `M-x load-library RET realgud RET` to load RealGUD.
+
+## Launching the debugger
+
+Open a source file, then use `M-x realgud:<debugger-name>` to start your 
favorite debugger (for example, you can use `M-x realgud:pdb` to launch PDB, a 
Python debugger).  RealGUD opens two windows: the *command window* (showing the 
debugger's REPL), and the *source window*, showing your code (with some 
debuggers, such as `realgud:gdb`, this window does not appear until you type 
`start` in the *command window*).  An solid arrow `▶` indicates the current 
line in the source window.  Grayed  [...]
+
+## Using the debugger
+
+All usual debugger commands work in the command window: for example, you can 
type `n RET` in the command window to step forward one source line. But 
RealGUD's power lies in the source window: in it, most single keys correspond 
to a debugger action. For example, you can press `n` in the source window to 
step forward.
+
+## Source window commands
+
+Here is a quick rundown of the most useful commands. “🐁” indicates mouse 
commands (commands that can be run by clicking on a variable or in the 
margins). Many of the commands are accessible from the tool bar 
(`tool-bar-mode`) and the menu (`menu-bar-mode`).
+
+* **Motion commands**
+
+    | Command                                       | Action                   
                     |
+    | --------------------------------------------- | 
--------------------------------------------- |
+    | <kbd>n</kbd>, <kbd>F10</kbd>                  | Next (aka “step over”, 
“step through”)        |
+    | <kbd>s</kbd>, <kbd>SPC</kbd>, <kbd>F11</kbd>  | Step (aka “step into”)   
                     |
+    | <kbd>f</kbd>, <kbd>S-F11</kbd>                | Finish (aka “step out”, 
“return”)             |
+    | <kbd>c</kbd>, <kbd>F5</kbd>                   | Continue (run to next 
break point)            |
+
+* **Using breakpoints**
+
+    | Command                                       | Action                   
                     |
+    | --------------------------------------------- | 
--------------------------------------------- |
+    | <kbd>b</kbd>, <kbd>F9</kbd>                   | Set breakpoint 🐁         
                     |
+    | <kbd>D</kbd>                                  | Clear breakpoint 🐁 (by 
number)                |
+
+* **Inspecting variables**
+
+    | Command                                       | Action                   
                     |
+    | --------------------------------------------- | 
--------------------------------------------- |
+    | <kbd>mouse-2</kbd> (middle button)            | Inspect variable under 
cursor (in tooltip) 🐁  |
+    | <kbd>e</kbd>                                  | Evaluate expression      
                     |
+
+* **Control commands**
+
+    | Command                                       | Action                   
                     |
+    | --------------------------------------------- | 
--------------------------------------------- |
+    | <kbd>q</kbd>, <kbd>S-F5</kbd>                 | Quit                     
                     |
+    | <kbd>R</kbd>, <kbd>r</kbd>                    | Run (aka “restart”)      
                     |
+    | <kbd>S</kbd>                                  | Go to command window     
                     |
+
+# Supported debuggers
+
+RealGUD supports [many external 
debuggers](https://github.com/realgud/realgud/wiki/Debuggers-Supported).  Help 
us [support even 
more](https://github.com/realgud/realgud/wiki/How-to-add-a-new-debugger)!
+
+# Advanced topics
+
+## Extra commands
+
+“⚙” indicates a work-in-progress (contributions welcome!)
+
+| Command                                      | Action                        
                 |
+| -------------------------------------------- | 
---------------------------------------------- |
+| <kbd>U</kbd>                                 | Until (run to a greater 
source line)           |
+| <kbd>u</kbd>, <kbd>&gt;</kbd>                | Up stack (move to older stack 
frame)           |
+| <kbd>d</kbd>, <kbd>&lt;</kbd>                | Down stack (move to younger 
stack frame)       |
+| <kbd>X</kbd>                                 | Clear breakpoint (by line)    
                 |
+| <kbd>j</kbd>                                 | Jump to current line ⚙        
                 |
+| <kbd>-</kbd>                                 | Disable breakpoint ⚙          
                 |
+| <kbd>+</kbd>                                 | Enable breakpoint ⚙           
                 |
+
+## Tracking an existing debugger process
+
+Use `M-x realgud-track-mode` inside an existing 
[shell](http://www.gnu.org/software/emacs/manual/html_node/emacs/Shell.html), 
or [eshell](https://www.gnu.org/software/emacs/manual/html_mono/eshell.html) 
buffer to track an already-running debugger process.
+
+### RealGUD's wiki
+
+Browse the [wiki](http://wiki.github.com/realgud/realgud/) for more 
information about [setting 
up](http://wiki.github.com/realgud/realgud/how-to-install), [using 
realgud](http://wiki.github.com/realgud/realgud/how-to-use), [exploring 
features](https://github.com/realgud/realgud/wiki/Features), and lots more.
+
+[travis-image]: https://api.travis-ci.org/realgud/realgud.svg?branch=master
+[travis-url]: https://travis-ci.org/realgud/realgud
+[melpa-stable-image]: http://stable.melpa.org/packages/realgud-badge.svg
+[melpa-stable]: http://stable.melpa.org/#/realgud
+[melpa-image]: http://melpa.org/packages/realgud-badge.svg
+[melpa]: http://melpa.org/#/realgud
diff --git a/packages/realgud/THANKS b/packages/realgud/THANKS
new file mode 100644
index 0000000..3bac612
--- /dev/null
+++ b/packages/realgud/THANKS
@@ -0,0 +1,17 @@
+Lars Andersen (expez) - Getting this packaged and put on to Melpa. Also the 
new name, realgud, is basically his idea.
+
+Anders Lindgren - The inspiration behind in an earlier incarnation of this 
code, ruby-debug. Ideas like short-key-mode are his.
+
+Nick Roberts - We used some of the code for the fringe icons from gdb-mi.
+
+NYC Emacs Meetup and Nicolas Dudebout - straightening me out on 
set-keymap-parent
+
+Kilian Kilger - gdb fixes
+
+Sean Farley - ipdb support
+
+Clément Pit-Claudel - improvements, bug fixes, and emacs compliance too varied 
to categorize.
+                      See git commits for details
+
+Stefan Monnier <address@hidden> - Elisp and ELPA guidance
+amelio-vazquez-reina - documentation
diff --git a/packages/realgud/autogen.sh b/packages/realgud/autogen.sh
new file mode 100755
index 0000000..cbe8d87
--- /dev/null
+++ b/packages/realgud/autogen.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+ln -fs README.md README
+touch common.mk
+autoreconf -vi && \
+autoconf && {
+  echo "Running configure with --enable-maintainer-mode $@"
+  ./configure --enable-maintainer-mode $@
+}
diff --git a/packages/realgud/common.mk.in b/packages/realgud/common.mk.in
new file mode 100644
index 0000000..0a2358e
--- /dev/null
+++ b/packages/realgud/common.mk.in
@@ -0,0 +1,25 @@
+lisp_files := $(wildcard *.el)
+lisp_LISP = $(lisp_files)
+MOSTLYCLEANFILES = *.elc
+
+short:
+       $(MAKE) 2>&1 >/dev/null | ruby $(top_srcdir)/make-check-filter.rb
+
+%.short:
+       $(MAKE) $(@:.short=) 2>&1 >/dev/null
+
+# This is the default rule, but we need to include an EMACLOADPATH
+.el.elc:
+       if test "$(EMACS)" != "no"; then \
+         am__dir=. am__subdir_includes=''; \
+         case $@ in */*) \
+           am__dir=`echo '$@' | sed 's,/[^/]*$$,,'`; \
+           am__subdir_includes="-L $$am__dir -L $(srcdir)/$$am__dir"; \
+         esac; \
+         test -d "$$am__dir" || $(MKDIR_P) "$$am__dir" || exit 1; \
+         EMACSLOADPATH=$(EMACSLOADPATH) $(EMACS) --batch \
+           $(AM_ELCFLAGS) $(ELCFLAGS) \
+           $$am__subdir_includes -L $(builddir) -L $(srcdir) \
+           --eval "(defun byte-compile-dest-file (f) \"address@hidden")" \
+           --eval "(unless (byte-compile-file \"$<\") (kill-emacs 1))"; \
+       else :; fi
diff --git a/packages/realgud/compute-lispdir.sh 
b/packages/realgud/compute-lispdir.sh
new file mode 100755
index 0000000..220befd
--- /dev/null
+++ b/packages/realgud/compute-lispdir.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+# Figures out a reasonable --prefix
+typeset -i rc=0
+typeset -i DEBUG=${DEBUG:-0}
+EMACS_PROG=${EMACS_PROG:-emacs}
+list=$($EMACS_PROG --batch --no-splash --no-site-file --eval '(message 
(substring (format "%s" load-path) 1 -1))' 2>&1)
+rc=$?
+if (( rc != 0 )) ; then
+    echo  >&2 "Something went wrong running $EMACS_PROG"
+    exit $rc
+$cmd
+fi
+for dir in $list ; do
+    if [[ -d $dir ]] ; then
+       case $dir in
+           */emacs/site-lisp)
+               ((DEBUG)) && echo "site lisp: $dir"
+               echo "$dir"
+               exit 0
+               ;;
+       esac
+    fi
+done
+for dir in $list ; do
+    if [[ -d $dir ]] ; then
+       case $dir in
+           */emacs/2[34]\.[0-9]/site-lisp)
+               ((DEBUG)) && echo "versioned site lisp: $dir"
+               echo "$dir"
+               exit 0
+               ;;
+       esac
+    fi
+done
+for dir in $list ; do
+    if [[ -d $dir ]] ; then
+       case $dir in
+           */emacs/2[34]\.[0-9]/site-lisp)
+               ((DEBUG)) && echo "versioned site lisp: $dir"
+               echo "$dir"
+               exit 0
+               ;;
+       esac
+    fi
+done
+exit 0
diff --git a/packages/realgud/configure.ac b/packages/realgud/configure.ac
new file mode 100644
index 0000000..d9cc1c1
--- /dev/null
+++ b/packages/realgud/configure.ac
@@ -0,0 +1,88 @@
+dnl FIXME: pick up from realgud.el
+AC_INIT(emacs-realgud, 1.4.0,)
+AC_CONFIG_SRCDIR(realgud.el)
+AM_INIT_AUTOMAKE([foreign])
+AM_MAINTAINER_MODE
+
+AC_PATH_PROG([EMACS], [emacs], [emacs])
+AC_ARG_WITH(emacs, AC_HELP_STRING([--with-emacs],
+                  [location of emacs program]), EMACS=$withval)
+
+AC_MSG_NOTICE("Checking emacs version")
+$EMACS -batch -q --no-site-file -eval \
+  '(if (<= emacs-major-version 23)
+       (progn
+         (error "You need GNU Emacs 24 or better.")
+         (kill-emacs 1)
+       )
+   )'
+if test $? -ne 0 ; then
+    AC_MSG_ERROR([Can't continue until above error is corrected.])
+fi
+
+if test "$NO_CHECK_EMACS_PACKAGES" = "" ; then
+AC_MSG_NOTICE("Checking prerequiste packages")
+$EMACS -batch -q --no-site-file -eval \
+  '(dolist (package
+         (quote (cl-lib loc-changes load-relative test-simple)))
+        (require package))
+   )'
+fi
+if test $? -ne 0 ; then
+    AC_MSG_ERROR([Can't continue until above error is corrected.])
+fi
+
+##################################################################
+# See if --with-lispdir was set. If not, set it to a reasonable default
+# based on where bash thinks bashdb is supposed to be installed.
+##################################################################
+
+AM_MISSING_PROG(GIT2CL, git2cl, $missing_dir)
+
+# Check whether --with-lispdir was given.
+if test "${with_lispdir+set}" = set; then :
+else
+  my_lispdir=$(EMACS_PROG=$EMACS $SH_PROG $(dirname $0)/compute-lispdir.sh)
+  if test "${my_lispdir+set}" = set; then :
+    with_lispdir=$my_lispdir
+    echo "'compute-lispdir.sh' lispdir install directory override: 
'$with_lispdir'"
+  fi
+fi
+
+##
+## Find out where to install the debugger emacs lisp files
+##
+AM_PATH_LISPDIR
+lispdir_realgud=$lispdir/realgud
+AC_SUBST([lispdir])
+AC_SUBST([lispdir_realgud])
+
+AM_CONDITIONAL(INSTALL_EMACS_LISP, test "x$lispdir_realgud" != "x")
+
+AC_CONFIG_FILES([Makefile \
+                common.mk \
+                realgud/Makefile \
+                realgud/common/Makefile \
+                realgud/common/buffer/Makefile \
+                realgud/debugger/Makefile \
+                realgud/debugger/bashdb/Makefile \
+                realgud/debugger/gdb/Makefile \
+                realgud/debugger/gub/Makefile \
+                realgud/debugger/ipdb/Makefile \
+                realgud/debugger/jdb/Makefile \
+                realgud/debugger/kshdb/Makefile \
+                realgud/debugger/nodejs/Makefile \
+                realgud/debugger/perldb/Makefile \
+                realgud/debugger/pdb/Makefile \
+                realgud/debugger/rdebug/Makefile \
+                realgud/debugger/remake/Makefile \
+                realgud/debugger/trepan/Makefile \
+                realgud/debugger/trepan2/Makefile \
+                realgud/debugger/trepan3k/Makefile \
+                realgud/debugger/trepan.pl/Makefile \
+                realgud/debugger/trepanjs/Makefile \
+                realgud/debugger/zshdb/Makefile \
+                realgud/lang/Makefile \
+                test/Makefile \
+                ])
+AC_OUTPUT
diff --git a/packages/context-coloring/test/fixtures/empty 
b/packages/realgud/cr_exceptions.txt
similarity index 100%
copy from packages/context-coloring/test/fixtures/empty
copy to packages/realgud/cr_exceptions.txt
diff --git a/packages/realgud/elisp-comp b/packages/realgud/elisp-comp
new file mode 100755
index 0000000..8277552
--- /dev/null
+++ b/packages/realgud/elisp-comp
@@ -0,0 +1,93 @@
+#!/bin/sh
+# Copyright (C) 1995-2012 Free Software Foundation, Inc.
+
+scriptversion=2014-02-09.22; # UTC
+
+# Franc,ois Pinard <address@hidden>, 1995.
+#
+# 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <address@hidden> or send patches to
+# <address@hidden>.
+
+case $1 in
+  '')
+     echo "$0: No files.  Try '$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: elisp-comp [--help] [--version] FILES...
+
+This script byte-compiles all '.el' files listed as FILES using GNU
+Emacs, and put the resulting '.elc' files into the current directory,
+so disregarding the original directories used in '.el' arguments.
+
+This script manages in such a way that all Emacs LISP files to
+be compiled are made visible between themselves, in the event
+they require or load-library one another.
+
+Report bugs to <address@hidden>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "elisp-comp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$EMACS" || test "$EMACS" = "t"; then
+  # Value of "t" means we are running in a shell under Emacs.
+  # Just assume Emacs is called "emacs".
+  EMACS=emacs
+fi
+
+tempdir=elc.$$
+
+# Cleanup the temporary directory on exit.
+trap 'ret=$?; rm -rf "$tempdir" && exit $ret' 0
+do_exit='(exit $ret); exit $ret'
+trap "ret=129; $do_exit" 1
+trap "ret=130; $do_exit" 2
+trap "ret=141; $do_exit" 13
+trap "ret=143; $do_exit" 15
+
+# mkdir $tempdir
+# cp "$@" $tempdir
+
+(
+  # cd $tempdir
+  echo "(setq load-path (cons nil (cons \"$abs_srcdir\" load-path)))" > script
+  $EMACS -batch -q -l script -f batch-byte-compile-if-not-done *.el || exit $?
+  # mv *.elc ..
+) || exit $?
+
+(exit 0); exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/packages/context-coloring/test/fixtures/empty 
b/packages/realgud/etc/.nosearch
similarity index 100%
copy from packages/context-coloring/test/fixtures/empty
copy to packages/realgud/etc/.nosearch
diff --git a/packages/realgud/etc/realgud-logo-square.png 
b/packages/realgud/etc/realgud-logo-square.png
new file mode 100644
index 0000000..d6a5d40
Binary files /dev/null and b/packages/realgud/etc/realgud-logo-square.png differ
diff --git a/packages/realgud/etc/realgud-logo.png 
b/packages/realgud/etc/realgud-logo.png
new file mode 100644
index 0000000..c1349ce
Binary files /dev/null and b/packages/realgud/etc/realgud-logo.png differ
diff --git a/packages/realgud/etc/realgud-logo.svg 
b/packages/realgud/etc/realgud-logo.svg
new file mode 100644
index 0000000..99ad3fc
--- /dev/null
+++ b/packages/realgud/etc/realgud-logo.svg
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   xml:space="preserve"
+   id="svg4768"
+   viewBox="0.171 0.201 2880.0002 640"
+   height="60"
+   width="270"
+   version="1.0"
+   inkscape:version="0.91 r"
+   sodipodi:docname="realgud.svg"
+   inkscape:export-filename="/home/clement/desktop/realgud.png"
+   inkscape:export-xdpi="180"
+   inkscape:export-ydpi="180"><sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1920"
+     inkscape:window-height="1030"
+     id="namedview72"
+     showgrid="false"
+     inkscape:zoom="4"
+     inkscape:cx="115.47042"
+     inkscape:cy="38.714008"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="svg4768"
+     fit-margin-top="3"
+     fit-margin-left="3"
+     fit-margin-right="3"
+     fit-margin-bottom="3" />
+<!-- Parts of this image extracted from GNU Emacs' icon (the white wave-like 
shape) -->
+<defs
+     id="defs4770" /><rect
+     style="display:none;fill:none"
+     id="rect4772"
+     y="101.52715"
+     x="-665.96661"
+     height="512"
+     width="512" /><g
+     style="display:none"
+     id="g4788"
+     transform="translate(-666.13763,101.32614)"><g
+       style="display:inline"
+       id="g4790" /></g><g
+     style="display:none"
+     id="g4806"
+     transform="translate(-666.13763,101.32614)"><g
+       style="display:inline"
+       id="g4808"><path
+         style="display:none;fill:#050505"
+         id="path4810"
+         d="m 349.098,256.651 c -0.265,-0.254 37.637,27.605 39.421,25.012 
6.362,-9.252 82.046,-93.137 84.784,-116.236 0.242,-2.003 -0.516,-4.096 
-0.516,-4.096 0,0 -1.19,-0.144 -6.325,-4.314 -2.692,-2.192 -5.483,-4.581 
-5.483,-4.581 -16.054,0.998 -57.885,41.559 -111.062,103.568"
+         inkscape:connector-curvature="0" /></g></g><text
+     xml:space="preserve"
+     
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:688.39953613px;line-height:125%;font-family:Ubuntu;-inkscape-font-specification:'Ubuntu
 
Medium';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     x="-25.458374"
+     y="569.73444"
+     id="text3492"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3494"
+       x="-25.458374"
+       y="569.73444"
+       
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-family:Ubuntu;-inkscape-font-specification:'Ubuntu
 Medium';fill:#000000">R</tspan></text>
+<g
+     id="g3515"
+     transform="matrix(0.89624184,0,0,0.89624184,406.60585,174.82476)"
+     inkscape:export-xdpi="349.85999"
+     inkscape:export-ydpi="349.85999"><path
+       
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:13.33816814;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path4235-9"
+       d="m 501.09769,256.201 c 0,136.65118 -109.6574,247.42885 
-244.92663,247.42885 -135.26924,0 -244.92675,-110.77767 -244.92675,-247.42886 
0,-136.6512 109.65751,-247.4288435 244.92675,-247.4288435 135.26923,0 
244.92663,110.7776435 244.92663,247.4288435 z"
+       inkscape:connector-curvature="0" /><path
+       
style="opacity:1;fill:#a40000;fill-opacity:1;stroke:#ffffff;stroke-width:13.33816814;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path4235"
+       d="m 489.28614,256.20099 c 0,130.06122 -104.36919,235.49665 
-233.11509,235.49665 -128.7459,0 -233.1152,-105.43543 -233.1152,-235.49665 
0,-130.06122 104.3693,-235.496645 233.1152,-235.496645 128.7459,0 
233.11509,105.435425 233.11509,235.496645 z"
+       inkscape:connector-curvature="0" /><path
+       
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path4237"
+       d="m 175.0003,422.31057 c 0,0 19.7385,1.39634 45.1312,-0.84159 
10.2834,-0.9063 49.3267,-4.74128 78.5169,-11.14289 0,0 35.5899,-7.61669 
54.6301,-14.63335 19.9225,-7.34185 30.7636,-13.57304 35.6433,-22.40243 
-0.2128,-1.80907 1.5024,-8.22438 -7.685,-12.07788 -23.4887,-9.85199 
-50.73,-8.06998 -104.6338,-9.21285 -59.7772,-2.05391 -79.6627,-12.05971 
-90.2556,-20.11838 -10.1579,-8.17519 -5.05,-30.79254 38.4742,-50.71499 
21.9244,-10.60898 107.8705,-30.18698 107.8705,-30.18698 -28.9451,-14 [...]
+       inkscape:connector-curvature="0" /></g><text
+     xml:space="preserve"
+     
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:688.3994751px;line-height:125%;font-family:Ubuntu;-inkscape-font-specification:'Ubuntu
 
Medium';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     x="860.70557"
+     y="569.73444"
+     id="text3492-3"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3494-6"
+       x="860.70557"
+       y="569.73444"
+       
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-family:Ubuntu;-inkscape-font-specification:'Ubuntu
 Medium';fill:#000000">alGUD</tspan></text>
+</svg>
diff --git a/packages/realgud/etc/realgud.png b/packages/realgud/etc/realgud.png
new file mode 100644
index 0000000..6e8c4e9
Binary files /dev/null and b/packages/realgud/etc/realgud.png differ
diff --git a/packages/realgud/etc/screenshot.el 
b/packages/realgud/etc/screenshot.el
new file mode 100644
index 0000000..ef19a46
--- /dev/null
+++ b/packages/realgud/etc/screenshot.el
@@ -0,0 +1,100 @@
+;;; Prepare a RealGUD screenshot
+
+;; Copyright (C) 2016 Free Software Foundation, Inc
+
+;; Author: Clément Pit--Claudel
+
+;; 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/>.
+;; Run ‘cask exec emacs -Q -L . -l etc/screenshot.el’ from the project's root 
to
+;; build a screenshot.
+
+(defvar my/fringe-width 12)
+
+(defun my/cleanup ()
+  (dolist (buffer (buffer-list))
+    (kill-buffer buffer)))
+
+(defun my/prepare-UI ()
+  "Prepare UI for taking a screenshot."
+  (ido-mode)
+  (tool-bar-mode)
+  (menu-bar-mode -1)
+  (scroll-bar-mode -1)
+  (column-number-mode)
+  (fringe-mode (cons my/fringe-width my/fringe-width))
+  (blink-cursor-mode -1)
+  (setq-default cursor-type 'bar
+                split-width-threshold 80
+                truncate-partial-width-windows t
+                frame-title-format (format "RealGUD:PDB @ Emacs %s" 
emacs-version)
+                x-gtk-use-system-tooltips nil)
+  (load-theme 'tango t)
+  ;; (set-face-attribute 'tooltip nil :height 60)
+  (set-face-attribute 'match nil :background "yellow1")
+  (set-face-attribute 'default nil :family "Ubuntu Mono" :height 90)
+  (set-face-attribute 'mode-line nil :foreground "gray60" :background "black")
+  (set-face-attribute 'mode-line-inactive nil :foreground "gray60" :background 
"#404045")
+  (set-face-attribute 'mode-line-buffer-id nil :foreground "#eab700")
+  (set-fontset-font t 'unicode "Ubuntu Mono")
+  (set-frame-size nil 140 20)
+  (redisplay t))
+
+(defun my/load-RealGUD ()
+  "Load RealGUD."
+  (package-initialize)
+  (load-library "realgud")
+  (setq realgud-bp-fringe-indicator-style
+        '(realgud-bp-filled . realgud-bp-hollow)))
+
+(defvar my/source-buffer nil)
+(defvar my/command-buffer nil)
+
+(defun my/load-example ()
+  "Prepare an example file and start the debugger."
+  (save-window-excursion
+    (find-file "realgud/common/fringe-utils.py")
+    (setq my/source-buffer (current-buffer))
+    (hl-line-mode 1)
+    (realgud:pdb (format "python3 -m pdb %S" buffer-file-name))
+    (sit-for 3) ;; Give PDB some time to start
+    (setq my/command-buffer (current-buffer))
+    (font-lock-add-keywords ;; Hide default directory
+     nil `((,(regexp-quote default-directory) 0 '(face nil display "<demo>/") 
append)) t)
+    (font-lock-mode 1))
+  (switch-to-buffer my/source-buffer)
+  (set-window-buffer (split-window-horizontally) my/command-buffer))
+
+(defun my/prepare-screenshot-1 ()
+  "Prepare for taking a screenshot."
+  (my/prepare-UI)
+  (my/load-RealGUD)
+  (my/load-example)
+  (with-current-buffer my/source-buffer
+    (dolist (line '(4 12 17))
+      (goto-char (point-min))
+      (forward-line (1- line))
+      (realgud:cmd-break nil)
+      (sit-for 1)))
+  (goto-char (point-min))
+  (recenter-top-bottom 0)
+  (realgud:cmd-next)
+  (sit-for 1)
+  (realgud:cmd-continue)
+  (sit-for 1)
+  (hl-line-highlight)
+  (set-window-start (get-buffer-window my/command-buffer) 1)
+  (message nil))
+
+(print default-directory)
+(run-with-idle-timer 0 nil #'my/prepare-screenshot-1)
diff --git a/packages/realgud/install-from-git.sh 
b/packages/realgud/install-from-git.sh
new file mode 100755
index 0000000..8f1291a
--- /dev/null
+++ b/packages/realgud/install-from-git.sh
@@ -0,0 +1,102 @@
+#!/bin/bash
+
+# This installs all realgud and its prerequisites. If you are lucky
+# you can just run this:
+#
+#   bash ./install-from-git.sh
+#
+# However we do provide for some customization...
+#
+# 1. GIT PROTOCOL
+# ===============
+#
+# If your "git clone" can't handle the "http" protocol, you might be
+# able to use the "git" protocol. To do this set the GIT_PROTOCOL
+# variable like this:
+#
+#     GIT_PROTOCOL=git sh ./install-from-git.sh
+#
+# 2. configure options (e.g --prefix)
+# ====================================
+
+# If you want to customize configuration parameters, for example,
+# choose where to install, you can pass configure options to this
+# script. For example:# can pass configure options.
+#
+#     sh ./install-from-git.sh --prefix=/tmp
+#
+# 3. TO "sudo" or not to "sudo"?
+# ==============================
+# If you are running as root on a *Nix-like box, then there's no problem.
+#
+# If you are not running as root, "sudo" might be invoked to install
+# code.  On systems that don't have a "sudo" command but need
+# filesystem permission, then you get by with setting SUDO_CMD to "su root-c"
+# For example:
+#
+#    SUDO_CMD='su root -c' sh ./install-from-git.sh
+#
+# If you have sufficient filesystem permission (which is often the
+# case on Windows or cygwin) then you might not need or want sudo. So
+# here, set SUDO_CMD to a blank:
+#
+#      SUDO_CMD=' ' sh ./install-from-git.sh
+#
+#
+# To finish here is an invocation using all 3 above options:
+#   GIT_PROTOCOL='git' SUDO_CMD=' ' sh ./install-from-git.sh --prefix=/tmp
+
+GIT_PROTOCOL=${GIT_PROTOCOL:-https}
+
+# Run and echo a command
+run_cmd() {
+    echo "--- Running command: $@"
+    $@
+    rc=$?
+    echo "--- $@ exit status is $?"
+    return $rc
+}
+
+# environment variable SUDO_CMD could be "sudo" or "su root -c" or " "
+# for don't need sudo
+
+if (( $(id -u) != 0)) ; then
+    if [[ -z "$SUDO_CMD" ]] ; then
+       need_sudo='sudo'
+       if which $need_sudo >/dev/null 2>&1 ; then
+           try_cmd=''
+       else
+           need_sudo='su root -c'
+           try_cmd='su'
+       fi
+    else
+       need_sudo="$SUDO_CMD"
+    fi
+else
+    need_sudo=''
+    try_cmd=''
+fi
+
+for program in git make $try_cmd ; do
+    if ! which $program >/dev/null 2>&1 ; then
+       echo "Can't find program $program in $PATH"
+       exit 1
+    fi
+done
+
+for pkg in emacs-{test-simple,load-relative,loc-changes,dbgr} ; do
+    echo '******************************************'
+    echo Trying to install ${pkg}...
+    echo '******************************************'
+    if [[ -d $pkg ]]; then
+       run_cmd $need_sudo rm -fr $pkg
+    fi
+    run_cmd git clone ${GIT_PROTOCOL}://github.com/rocky/${pkg}.git
+    (cd $pkg && \
+        run_cmd $SHELL ./autogen.sh && \
+       run_cmd ./configure $@ && \
+       run_cmd make && \
+       run_cmd make check && \
+        run_cmd $need_sudo make install
+    )
+done
diff --git a/packages/realgud/realgud-recursive-autoloads.el 
b/packages/realgud/realgud-recursive-autoloads.el
new file mode 100644
index 0000000..63539c5
--- /dev/null
+++ b/packages/realgud/realgud-recursive-autoloads.el
@@ -0,0 +1,1300 @@
+;;; realgud-recursive-autoloads.el --- automatically extracted autoloads
+;;
+;;; Code:
+
+
+;;;### (autoloads nil "realgud/common/backtrace-mode" 
"realgud/common/backtrace-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/backtrace-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/backtrace-mode" '("realgud-backtrace-mode-map" 
"realgud-backtrace-mode" "realgud:frames-menu")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/backtrack-mode" 
"realgud/common/backtrack-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/backtrack-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/backtrack-mode" '("realgud-backtrack-set-debugger" 
"realgud-backtrack-mode" "realgud-backtrack-mode-map" 
"realgud-backtrack-mode-vars")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/bp" "realgud/common/bp.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/bp.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/bp" '("realgud-bp-")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/bp-image-data" 
"realgud/common/bp-image-data.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/bp-image-data.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/bp-image-data" '("realgud-bp-disabled-" 
"realgud-bp-enabled-tiff-data" "realgud-bp-enabled-svg-data" 
"realgud-bp-enabled-pbm-data" "realgud-bp-xpm-data")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/buffer/backtrace" 
"realgud/common/buffer/backtrace.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/buffer/backtrace.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/buffer/backtrace" '("realgud-backtrace-" "realgud-goto-" 
"realgud:backtrace-" "realgud-track-divert-string" "realgud-backtrace?")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/buffer/command" 
"realgud/common/buffer/command.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/buffer/command.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/buffer/command" '("realgud-cmdbuf-" 
"realgud:cmdbuf-buffers-describe" "realgud:cmdbuf-info-describe" 
"realgud-cmdbuf?")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/buffer/helper" 
"realgud/common/buffer/helper.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/buffer/helper.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/buffer/helper" '("realgud:srcbuf-info-describe" 
"realgud-get-process" "realgud-get-srcbuf-from-cmdbuf" 
"realgud-get-cmdbuf-from-srcbuf" "realgud-get-cmdbuf-from-backtrace")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/buffer/info" 
"realgud/common/buffer/info.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/buffer/info.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/buffer/info" '("realgud:info-mode-hook" "realgud:info-mode" 
"realgud-backtrace-info")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/buffer/source" 
"realgud/common/buffer/source.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/buffer/source.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/buffer/source" '("realgud-srcbuf-" "realgud-srcbuf?")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/cmds" "realgud/common/cmds.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/cmds.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/cmds" '("realgud-safe-mode" "realgud:cmd-quit" 
"realgud:cmd-terminate")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/core" "realgud/common/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/core" '("realgud-" "realgud:")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/custom" "realgud/common/custom.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/custom.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/custom" '("realgud-srcbuf-lock" "realgud-key-prefix")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/eval" "realgud/common/eval.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/eval.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/eval" '("realgud:tooltip-eval" "realgud:eval-process-output")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/file" "realgud/common/file.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/file.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/file" '("realgud-file-remap")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/fringe" "realgud/common/fringe.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/fringe.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/fringe" '("realgud-overlay-" 
"realgud-fringe-erase-history-arrows" "realgud-fringe-history-set" 
"realgud-fringe-set-arrow")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/helper" "realgud/common/helper.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/helper.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/helper" '("realgud-" "with-current-buffer-safe" 
"buffer-killed?" "realgud:debugger-name-transform" "fn-p-to-fn?-alias")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/init" "realgud/common/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/init" '("realgud-line-number-face" 
"realgud-backtrace-number-face" "realgud-file-name-face")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/key" "realgud/common/key.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/key.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/key" '("realgud-populate-src-buffer-map-plain" 
"realgud-populate-common-keys" "realgud-populate-common-fn-keys-function" 
"realgud-populate-common-fn-keys-standard")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/lang" "realgud/common/lang.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/lang.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/lang" '("realgud-suggest-lang-file" "realgud-lang-mode?" 
"realgud:suggest-file-from-buffer")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/loc" "realgud/common/loc.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/loc.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/loc" '("realgud-loc?" "realgud-loc" "realgud:loc-describe")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/lochist" "realgud/common/lochist.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/lochist.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/lochist" '("realgud-loc-hist-" "realgud-loc-hist")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/menu" "realgud/common/menu.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/menu.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/menu" '("realgud-menu-item" "realgud-populate-debugger-menu")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/regexp" "realgud/common/regexp.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/regexp.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/regexp" '("realgud:regexp-captured-num" 
"realgud:variable-basename-hash" "realgud-loc-pat" "realgud-pat-hash" 
"realgud-command-hash")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/reset" "realgud/common/reset.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/reset.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/reset" '("realgud:reset")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/run" "realgud/common/run.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/run.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/run" '("realgud:run-debugger")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/send" "realgud/common/send.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/send.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/send" '("realgud:send-" "realgud-send-" 
"comint-output-filter-orig" "realgud-expand-format" "realgud-command")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/shortkey" "realgud/common/shortkey.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/shortkey.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/shortkey" '("realgud:goto-loc-hist-" "realgud-short-key-" 
"realgud:shortkey-mode-map" "realgud-get-short-key-mode-map" 
"realgud-populate-src-buffer-map")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/track" "realgud/common/track.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/track.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/track" '("realgud-goto-line-for-" "realgud-track-" 
"realgud:goto-" "realgud-short-key-on-tracing?" "realgud:track-set-debugger")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/track-mode" 
"realgud/common/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/track-mode" '("realgud-track-mode" "realgud:tool-bar-map" 
"realgud-track-mode-map" "realgud-track-mode-setup" "realgud-track-mode-vars")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/utils" "realgud/common/utils.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/utils.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/utils" '("realgud:strip" "realgud:flatten")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/common/window" "realgud/common/window.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/common/window.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/common/window" '("realgud:window-bt-undisturb-src" 
"realgud-window-cmd-undisturb-src" "realgud-window-src-undisturb-cmd" 
"realgud-window-src" "realgud-window-update-position")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/bashdb/bashdb" 
"realgud/debugger/bashdb/bashdb.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/bashdb/bashdb.el
+
+(autoload 'realgud:bashdb "realgud/debugger/bashdb/bashdb" "\
+Invoke the bashdb shell debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run bash. You will be prompted
+for a command line is one isn't supplied.
+
+OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `bashdb-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+
+\(fn &optional OPT-CMD-LINE NO-RESET)" t nil)
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/bashdb/bashdb" '("realgud:bashdb-command-name" "bashdb")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/bashdb/core" 
"realgud/debugger/bashdb/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/bashdb/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/bashdb/core" '("realgud:bashdb-" "bashdb-query-cmdline" 
"bashdb-parse-cmd-args" "bashdb-suggest-invocation" "bashdb-reset")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/bashdb/init" 
"realgud/debugger/bashdb/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/bashdb/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/bashdb/init" '("realgud:bashdb-pat-hash" 
"realgud:bashdb-command-hash")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/bashdb/track-mode" 
"realgud/debugger/bashdb/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/bashdb/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/bashdb/track-mode" '("bashdb-track-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/gdb/core" 
"realgud/debugger/gdb/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/gdb/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/gdb/core" '("realgud:gdb-")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/gdb/gdb" "realgud/debugger/gdb/gdb.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/gdb/gdb.el
+
+(autoload 'realgud:gdb "realgud/debugger/gdb/gdb" "\
+Invoke the gdb debugger and start the Emacs user interface.
+
+OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+
+\(fn &optional OPT-CMD-LINE NO-RESET)" t nil)
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/gdb/gdb" '("realgud:gdb-pid-associate" 
"realgud:gdb-pid-command-buffer" "realgud:gdb-pid" 
"realgud:gdb-find-command-buffer" "realgud:gdb-command-name")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/gdb/init" 
"realgud/debugger/gdb/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/gdb/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/gdb/init" '("realgud:gdb-frame-num-regexp" 
"realgud:gdb-frame-start-regexp" "realgud:gdb-frame-file-regexp" 
"realgud:gdb-command-hash" "realgud:gdb-pat-hash")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/gdb/track-mode" 
"realgud/debugger/gdb/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/gdb/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/gdb/track-mode" '("realgud:gdb-track-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/gub/core" 
"realgud/debugger/gub/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/gub/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/gub/core" '("realgud:gub-" "gub-query-cmdline" 
"gub-parse-cmd-args" "gub-suggest-invocation" "gub-reset")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/gub/gub" "realgud/debugger/gub/gub.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/gub/gub.el
+
+(autoload 'realgud-gub "realgud/debugger/gub/gub" "\
+Invoke the Go SSA debugger, gub and start the Emacs user interface.
+
+String COMMAND-LINE specifies how to run gub.
+
+Normally command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset.
+
+\(fn &optional OPT-COMMAND-LINE NO-RESET)" t nil)
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/gub/gub" '("realgud:gub-command-name" "realgud-gub-fn" 
"gub")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/gub/init" 
"realgud/debugger/gub/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/gub/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/gub/init" '("realgud:gub-frame-" "realgud:gub-command-hash" 
"realgud:gub-selected-frame-arrow" "realgud:gub-pat-hash")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/gub/track-mode" 
"realgud/debugger/gub/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/gub/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/gub/track-mode" '("realgud:gub-goto-panic-location" 
"realgud:gub-goto-location" "gub-track-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/ipdb/core" 
"realgud/debugger/ipdb/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/ipdb/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/ipdb/core" '("realgud:ipdb-" "ipdb-parse-" "ipdb-reset" 
"ipdb-suggest-invocation" "ipdb-query-cmdline")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/ipdb/init" 
"realgud/debugger/ipdb/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/ipdb/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/ipdb/init" '("realgud:ipdb-pat-hash" 
"realgud:ipdb-command-hash")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/ipdb/ipdb" 
"realgud/debugger/ipdb/ipdb.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/ipdb/ipdb.el
+
+(autoload 'realgud:ipdb "realgud/debugger/ipdb/ipdb" "\
+Invoke the ipdb Python debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run ipdb. You will be prompted
+for a command line is one isn't supplied.
+
+OPT-COMMAND-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `ipdb-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+
+\(fn &optional OPT-CMD-LINE NO-RESET)" t nil)
+
+(autoload 'realgud:ipdb-remote "realgud/debugger/ipdb/ipdb" "\
+Invoke the ipdb Python debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run ipdb. You will be prompted
+for a command line is one isn't supplied.
+
+OPT-COMMAND-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `ipdb-parse-remote-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+
+\(fn &optional OPT-CMD-LINE NO-RESET)" t nil)
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/ipdb/ipdb" '("realgud:ipdb-command-name" "ipdb")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/ipdb/track-mode" 
"realgud/debugger/ipdb/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/ipdb/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/ipdb/track-mode" '("ipdb-track-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/jdb/backtrack-mode" 
"realgud/debugger/jdb/backtrack-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/jdb/backtrack-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/jdb/backtrack-mode" '("realgud:jdb-goto-control-frame-line" 
"jdb-backtrack-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/jdb/core" 
"realgud/debugger/jdb/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/jdb/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/jdb/core" '("realgud:jdb-" "jdb-reset" 
"jdb-suggest-invocation")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/jdb/file" 
"realgud/debugger/jdb/file.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/jdb/file.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/jdb/file" '("gud-jdb-")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/jdb/init" 
"realgud/debugger/jdb/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/jdb/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/jdb/init" '("realgud:jdb-")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/jdb/jdb" "realgud/debugger/jdb/jdb.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/jdb/jdb.el
+
+(autoload 'realgud:jdb "realgud/debugger/jdb/jdb" "\
+Invoke the Java jdb debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `jdb-parse-cmd-args' and path elements found by that
+are expanded using `expand-file-name'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+
+\(fn &optional OPT-CMD-LINE NO-RESET)" t nil)
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/jdb/jdb" '("realgud:jdb-command-name" "jdb")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/jdb/track-mode" 
"realgud/debugger/jdb/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/jdb/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/jdb/track-mode" '("realgud:jdb-track-mode" 
"realgud:jdb-goto-control-frame-line" "realgud:jdb-goto-syntax-error-line")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/kshdb/core" 
"realgud/debugger/kshdb/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/kshdb/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/kshdb/core" '("realgud:kshdb-" "kshdb-query-cmdline" 
"kshdb-parse-cmd-args" "kshdb-suggest-invocation" "kshdb-reset")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/kshdb/init" 
"realgud/debugger/kshdb/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/kshdb/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/kshdb/init" '("realgud:kshdb-pat-hash" 
"realgud:kshdb-command-hash")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/kshdb/kshdb" 
"realgud/debugger/kshdb/kshdb.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/kshdb/kshdb.el
+
+(autoload 'realgud:kshdb "realgud/debugger/kshdb/kshdb" "\
+Invoke the Korn shell debugger, kshdb, and start the Emacs user interface.
+
+String COMMAND-LINE specifies how to run kshdb.
+
+Normally command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset.
+
+\(fn &optional OPT-COMMAND-LINE NO-RESET)" t nil)
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/kshdb/kshdb" '("realgud:kshdb-command-name" "kshdb")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/kshdb/track-mode" 
"realgud/debugger/kshdb/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/kshdb/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/kshdb/track-mode" '("kshdb-track-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/nodejs/core" 
"realgud/debugger/nodejs/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/nodejs/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/nodejs/core" '("realgud:nodejs-" "nodejs-query-cmdline" 
"nodejs-parse-cmd-args")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/nodejs/init" 
"realgud/debugger/nodejs/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/nodejs/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/nodejs/init" '("realgud:nodejs-frame-" 
"realgud:nodejs-pat-hash" "realgud:nodejs-debugger-name" 
"realgud:nodejs-command-hash")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/nodejs/nodejs" 
"realgud/debugger/nodejs/nodejs.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/nodejs/nodejs.el
+
+(autoload 'realgud:nodejs "realgud/debugger/nodejs/nodejs" "\
+Invoke the nodejs shell debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run nodejs.
+
+OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `nodejs-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+
+\(fn &optional OPT-CMD-LINE NO-RESET)" t nil)
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/nodejs/nodejs" '("realgud:nodejs-command-name")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/nodejs/track-mode" 
"realgud/debugger/nodejs/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/nodejs/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/nodejs/track-mode" '("realgud:nodejs-track-mode-internal" 
"nodejs-track-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/pdb/core" 
"realgud/debugger/pdb/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/pdb/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/pdb/core" '("realgud:pdb-" "pdb-parse-" "pdb-reset" 
"pdb-suggest-invocation" "pdb-query-cmdline")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/pdb/init" 
"realgud/debugger/pdb/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/pdb/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/pdb/init" '("realgud:pdb-pat-hash" 
"realgud:pdb-command-hash")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/pdb/pdb" "realgud/debugger/pdb/pdb.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/pdb/pdb.el
+
+(autoload 'realgud:pdb "realgud/debugger/pdb/pdb" "\
+Invoke the pdb Python debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run pdb. You will be prompted
+for a command line is one isn't supplied.
+
+OPT-COMMAND-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `pdb-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+
+\(fn &optional OPT-CMD-LINE NO-RESET)" t nil)
+
+(autoload 'realgud:pdb-remote "realgud/debugger/pdb/pdb" "\
+Invoke the pdb Python debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run pdb. You will be prompted
+for a command line is one isn't supplied.
+
+OPT-COMMAND-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `pdb-parse-remote-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+
+\(fn &optional OPT-CMD-LINE NO-RESET)" t nil)
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/pdb/pdb" '("realgud:pdb-command-name" "pdb")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/pdb/track-mode" 
"realgud/debugger/pdb/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/pdb/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/pdb/track-mode" '("pdb-track-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/perldb/core" 
"realgud/debugger/perldb/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/perldb/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/perldb/core" '("realgud:perldb-")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/perldb/init" 
"realgud/debugger/perldb/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/perldb/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/perldb/init" '("realgud:perldb-loc-regexp" 
"realgud:perldb-loc-noeval-regexp" "realgud:perldb-loc-eval-regexp" 
"realgud:perldb-command-hash" "realgud:perldb-pat-hash")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/perldb/perldb" 
"realgud/debugger/perldb/perldb.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/perldb/perldb.el
+
+(autoload 'realgud:perldb "realgud/debugger/perldb/perldb" "\
+Invoke the Perl debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run nodejs.
+
+OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `perldb-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+
+\(fn &optional OPT-CMD-LINE NO-RESET)" t nil)
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/perldb/perldb" '("realgud:perldb-command-name")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/perldb/track-mode" 
"realgud/debugger/perldb/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/perldb/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/perldb/track-mode" '("perldb-track-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/rdebug/core" 
"realgud/debugger/rdebug/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/rdebug/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/rdebug/core" '("realgud:rdebug-" "rdebug-query-cmdline" 
"rdebug-parse-cmd-args" "rdebug-suggest-invocation" "rdebug-reset")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/rdebug/init" 
"realgud/debugger/rdebug/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/rdebug/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/rdebug/init" '("realgud-rdebug-pat-hash" 
"realgud-rdebug-command-hash" "realgud-rdebug-frame-file-line-regexp" 
"realgud-rdebug-frame-start-regexp" "realgud-rdebug-frame-num-regexp")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/rdebug/rdebug" 
"realgud/debugger/rdebug/rdebug.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/rdebug/rdebug.el
+
+(autoload 'realgud:rdebug "realgud/debugger/rdebug/rdebug" "\
+Invoke the rdebug Ruby debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `trepan8-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+
+\(fn &optional OPT-CMD-LINE NO-RESET)" t nil)
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/rdebug/rdebug" '("realgud:rdebug-command-name" 
"rdebug-get-script-name" "rdebug")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/rdebug/track-mode" 
"realgud/debugger/rdebug/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/rdebug/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/rdebug/track-mode" '("rdebug-track-mode" 
"rdebug-track-mode-internal")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/remake/core" 
"realgud/debugger/remake/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/remake/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/remake/core" '("realgud:remake-" "remake-suggest-" 
"remake-query-cmdline" "remake-parse-cmd-args" "remake-reset")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/remake/init" 
"realgud/debugger/remake/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/remake/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/remake/init" '("realgud:remake-frame-" 
"realgud:remake-command-hash" "realgud:remake-selected-frame-arrow" 
"realgud:remake-pat-hash")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/remake/remake" 
"realgud/debugger/remake/remake.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/remake/remake.el
+
+(autoload 'realgud:remake "realgud/debugger/remake/remake" "\
+See `realgud:remake' for details
+
+\(fn &optional OPT-CMD-LINE NO-RESET)" t nil)
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/remake/remake" '("realgud:remake-run-debugger" 
"realgud:remake-command-name" "remake")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/remake/track-mode" 
"realgud/debugger/remake/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/remake/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/remake/track-mode" '("remake-track-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan.pl/backtrack-mode"
+;;;;;;  "realgud/debugger/trepan.pl/backtrack-mode.el" (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan.pl/backtrack-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan.pl/backtrack-mode" 
'("realgud:trepanpl-goto-control-frame-line" "trepanpl-backtrack-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan.pl/core" 
"realgud/debugger/trepan.pl/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan.pl/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan.pl/core" '("realgud:trepanpl-")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan.pl/init" 
"realgud/debugger/trepan.pl/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan.pl/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan.pl/init" '("realgud:trepanpl-")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan.pl/track-mode" 
"realgud/debugger/trepan.pl/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan.pl/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan.pl/track-mode" 
'("realgud:trepanpl-goto-syntax-error-line" "realgud:trepanpl-track-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan.pl/trepanpl" 
"realgud/debugger/trepan.pl/trepanpl.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan.pl/trepanpl.el
+
+(autoload 'realgud:trepan\.pl "realgud/debugger/trepan.pl/trepanpl" "\
+Invoke the trepan.pl Perl debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run trepan.pl. You will be prompted
+for a command line is one isn't supplied.
+
+OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `realgud:trepanpl-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+
+\(fn &optional OPT-CMD-LINE NO-RESET)" t nil)
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan.pl/trepanpl" '("realgud:trepanpl-command-name" 
"trepan.pl")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan/backtrack-mode" 
"realgud/debugger/trepan/backtrack-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan/backtrack-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan/backtrack-mode" 
'("realgud:trepan-goto-control-frame-line" "trepan-backtrack-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan/core" 
"realgud/debugger/trepan/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan/core" '("realgud:trepan-" "trepan-reset" 
"trepan-suggest-invocation")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan/init" 
"realgud/debugger/trepan/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan/init" '("realgud:trepan-command-hash" 
"realgud:trepan-debugger-name" "realgud:trepan-frame-file-regexp" 
"realgud:trepan-selected-frame-indicator" "realgud:trepan-pat-hash")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan/track-mode" 
"realgud/debugger/trepan/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan/track-mode" '("trepan-track-mode" 
"realgud:trepan-goto-control-frame-line" 
"realgud:trepan-goto-syntax-error-line")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan/trepan" 
"realgud/debugger/trepan/trepan.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan/trepan.el
+
+(autoload 'realgud:trepan "realgud/debugger/trepan/trepan" "\
+Invoke the trepan Ruby debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `trepan-parse-cmd-args' and path elements found by that
+are expanded using `expand-file-name'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+
+\(fn &optional OPT-CMD-LINE NO-RESET)" t nil)
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan/trepan" '("realgud:trepan-command-name" "trepan")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan2/core" 
"realgud/debugger/trepan2/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan2/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan2/core" '("realgud:trepan2-" "trepan2-query-cmdline" 
"trepan2-parse-cmd-args" "trepan2-suggest-invocation" "trepan2-reset")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan2/init" 
"realgud/debugger/trepan2/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan2/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan2/init" '("realgud:trepan2-pat-hash" 
"realgud:trepan2-command-hash")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan2/track-mode" 
"realgud/debugger/trepan2/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan2/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan2/track-mode" '("trepan2-track-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan2/trepan2" 
"realgud/debugger/trepan2/trepan2.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan2/trepan2.el
+
+(autoload 'realgud:trepan2 "realgud/debugger/trepan2/trepan2" "\
+Invoke the trepan2 Python debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `trepan2-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+
+\(fn &optional OPT-CMD-LINE NO-RESET)" t nil)
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan2/trepan2" '("realgud:trepan2-command-name" "trepan2")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan3k/core" 
"realgud/debugger/trepan3k/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan3k/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan3k/core" '("realgud:trepan3k-" "trepan3k-query-cmdline" 
"trepan3k-parse-cmd-args" "trepan3k-suggest-invocation" "trepan3k-reset")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan3k/init" 
"realgud/debugger/trepan3k/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan3k/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan3k/init" '("realgud:trepan3k-pat-hash" 
"realgud:trepan3k-command-hash")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan3k/track-mode" 
"realgud/debugger/trepan3k/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan3k/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan3k/track-mode" '("trepan3k-track-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepan3k/trepan3k" 
"realgud/debugger/trepan3k/trepan3k.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepan3k/trepan3k.el
+
+(autoload 'realgud:trepan3k "realgud/debugger/trepan3k/trepan3k" "\
+Invoke the trepan3k Python debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `trepan2-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+
+\(fn &optional OPT-CMD-LINE NO-RESET)" t nil)
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepan3k/trepan3k" '("realgud:trepan3k-command-name" 
"trepan3k")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepanjs/backtrack-mode"
+;;;;;;  "realgud/debugger/trepanjs/backtrack-mode.el" (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepanjs/backtrack-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepanjs/backtrack-mode" 
'("realgud:trepanjs-goto-control-frame-line" "trepanjs-backtrack-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepanjs/core" 
"realgud/debugger/trepanjs/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepanjs/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepanjs/core" '("realgud:trepanjs-")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepanjs/init" 
"realgud/debugger/trepanjs/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepanjs/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepanjs/init" '("realgud:trepanjs-frame-" 
"realgud:trepanjs-pat-hash" "realgud:trepanjs-file-regexp" 
"realgud:trepanjs-debugger-name" "realgud:trepanjs-command-hash")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepanjs/track-mode" 
"realgud/debugger/trepanjs/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepanjs/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepanjs/track-mode" 
'("realgud:trepanjs-goto-syntax-error-line" "trepanjs-track-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/trepanjs/trepanjs" 
"realgud/debugger/trepanjs/trepanjs.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/trepanjs/trepanjs.el
+
+(autoload 'realgud:trepanjs "realgud/debugger/trepanjs/trepanjs" "\
+Invoke the trepanjs Ruby debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `trepanjs-parse-cmd-args' and path elements found by that
+are expanded using `expand-file-name'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+
+\(fn &optional OPT-CMD-LINE NO-RESET)" t nil)
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/trepanjs/trepanjs" '("realgud:trepanjs-command-name" 
"trepanjs")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/zshdb/core" 
"realgud/debugger/zshdb/core.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/zshdb/core.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/zshdb/core" '("realgud:zshdb-" "zshdb-query-cmdline" 
"zshdb-parse-cmd-args" "zshdb-suggest-invocation" "zshdb-reset")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/zshdb/init" 
"realgud/debugger/zshdb/init.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/zshdb/init.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/zshdb/init" '("realgud:zshdb-pat-hash" 
"realgud:zshdb-command-hash")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/zshdb/track-mode" 
"realgud/debugger/zshdb/track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/zshdb/track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/zshdb/track-mode" '("zshdb-track-mode")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/debugger/zshdb/zshdb" 
"realgud/debugger/zshdb/zshdb.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/debugger/zshdb/zshdb.el
+
+(autoload 'realgud:zshdb "realgud/debugger/zshdb/zshdb" "\
+Invoke the zshdb Z-shell debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run zshdb.
+
+OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `zshdb-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+
+\(fn &optional OPT-CMD-LINE NO-RESET)" t nil)
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/debugger/zshdb/zshdb" '("realgud:zshdb-command-name" "zshdb")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/lang/js" "realgud/lang/js.el" (0 0
+;;;;;;  0 0))
+;;; Generated autoloads from realgud/lang/js.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/lang/js" '("realgud:js-backtrace-loc-pat" "realgud:js-term-escape")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/lang/perl" "realgud/lang/perl.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/lang/perl.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/lang/perl" '("realgud:perl-goto-errmsg-line" 
"realgud-perl-populate-command-keys" "realgud-perl-ignore-file-re" 
"realgud-perl-errmsg-loc-pat" "realgud-perl-carp-loc-pat")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/lang/posix-shell" "realgud/lang/posix-shell.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/lang/posix-shell.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/lang/posix-shell" '("realgud-shell-frame-" "realgud:POSIX-debugger-" 
"realgud-shell-backtrace-loc-pat" "realgud-posix-shell-populate-command-keys")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/lang/python" "realgud/lang/python.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/lang/python.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/lang/python" '("realgud:python-trepan-" "realgud-python-" 
"realgud:python-debugger-font-lock-keywords" "realgud-pytest-error-loc-pat" 
"realgud:pytest-goto-errmsg-line")))
+
+;;;***
+
+;;;### (autoloads nil "realgud/lang/ruby" "realgud/lang/ruby.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from realgud/lang/ruby.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"realgud/lang/ruby" '("realgud:" "realgud-ruby-" "realgud-rubinius-" 
"realgud-rspec-backtrace-loc-pat" "realgud-rails-backtrace-loc-pat")))
+
+;;;***
+
+;;;### (autoloads nil "test/test-common-helper" "test/test-common-helper.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from test/test-common-helper.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"test/test-common-helper" '("realgud-test-info")))
+
+;;;***
+
+;;;### (autoloads nil "test/test-gdb" "test/test-gdb.el" (0 0 0 0))
+;;; Generated autoloads from test/test-gdb.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"test/test-gdb" '("realgud:gdb-executable")))
+
+;;;***
+
+;;;### (autoloads nil "test/test-remake" "test/test-remake.el" (0
+;;;;;;  0 0 0))
+;;; Generated autoloads from test/test-remake.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"test/test-remake" '("realgud-exec-shell")))
+
+;;;***
+
+;;;### (autoloads nil "test/test-send" "test/test-send.el" (0 0 0
+;;;;;;  0))
+;;; Generated autoloads from test/test-send.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"test/test-send" '("setup")))
+
+;;;***
+
+;;;### (autoloads nil "test/test-srcbuf" "test/test-srcbuf.el" (0
+;;;;;;  0 0 0))
+;;; Generated autoloads from test/test-srcbuf.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"test/test-srcbuf" '("temp-cmdbuf" "setup")))
+
+;;;***
+
+;;;### (autoloads nil "test/test-track-mode" "test/test-track-mode.el"
+;;;;;;  (0 0 0 0))
+;;; Generated autoloads from test/test-track-mode.el
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes 
"test/test-track-mode" '("temp-cmdbuf" "setup")))
+
+;;;***
+
+;;;### (autoloads nil nil ("realgud/common/attach.el" 
"realgud/common/follow.el"
+;;;;;;  "test/bt-helper.el" "test/regexp-helper.el" "test/test-bashdb.el"
+;;;;;;  "test/test-bp.el" "test/test-bt-pdb.el" "test/test-bt-rdebug.el"
+;;;;;;  "test/test-bt-trepan.el" "test/test-bt-trepan2.el" 
"test/test-bt-trepan3k.el"
+;;;;;;  "test/test-bt-zshdb.el" "test/test-buf-bt.el" "test/test-buf-cmd.el"
+;;;;;;  "test/test-core.el" "test/test-file.el" "test/test-gdb-core.el"
+;;;;;;  "test/test-gub-core.el" "test/test-ipdb.el" "test/test-jdb.el"
+;;;;;;  "test/test-lang.el" "test/test-loc-regexp-gub.el" 
"test/test-loc-regexp-nodejs.el"
+;;;;;;  "test/test-loc-regexp-trepan.el" "test/test-loc-regexp-trepanpl.el"
+;;;;;;  "test/test-loc.el" "test/test-lochist.el" "test/test-nodejs.el"
+;;;;;;  "test/test-pdb.el" "test/test-perldb.el" "test/test-rdebug.el"
+;;;;;;  "test/test-realgud.el" "test/test-regexp-bashdb.el" 
"test/test-regexp-gdb.el"
+;;;;;;  "test/test-regexp-gub.el" "test/test-regexp-ipdb.el" 
"test/test-regexp-jdb.el"
+;;;;;;  "test/test-regexp-nodejs.el" "test/test-regexp-pdb.el" 
"test/test-regexp-perldb.el"
+;;;;;;  "test/test-regexp-rdebug.el" "test/test-regexp-remake.el"
+;;;;;;  "test/test-regexp-ruby.el" "test/test-regexp-trepan.el" 
"test/test-regexp-trepan2.el"
+;;;;;;  "test/test-regexp-trepan3k.el" "test/test-regexp-trepanjs.el"
+;;;;;;  "test/test-regexp-trepanpl.el" "test/test-regexp-zshdb.el"
+;;;;;;  "test/test-regexp.el" "test/test-remake-core.el" 
"test/test-shortkey.el"
+;;;;;;  "test/test-track.el" "test/test-trepan2.el" "test/test-trepan3k.el"
+;;;;;;  "test/test-trepanpl.el" "test/test-utils.el" "test/test-zshdb.el")
+;;;;;;  (0 0 0 0))
+
+;;;***
+
+(provide 'realgud-recursive-autoloads)
+;; Local Variables:
+;; version-control: never
+;; no-byte-compile: t
+;; no-update-autoloads: t
+;; coding: utf-8
+;; End:
+;;; realgud-recursive-autoloads.el ends here
diff --git a/packages/realgud/realgud.el b/packages/realgud/realgud.el
new file mode 100644
index 0000000..2035b9d
--- /dev/null
+++ b/packages/realgud/realgud.el
@@ -0,0 +1,209 @@
+;;; realgud.el --- A modular front-end for interacting with external debuggers
+
+;; Author: Rocky Bernstein <address@hidden>
+;; Version: 1.4.3
+;; Package-Type: multi
+;; Package-Requires: ((load-relative "1.2") (loc-changes "1.2") (test-simple  
"1.2.0") (cl-lib "0.5") (emacs "24"))
+;; URL: http://github.com/realgud/realgud/
+
+;; Copyright (C) 2015-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/>.
+
+;;; Commentary:
+
+;; A modular, extensible GNU Emacs front-end for interacting with
+;; external debuggers.
+;;
+;; Quick start: https://github.com/realgud/realgud/
+;;
+;; See URL `https://github.com/realgud/realgud/wiki/Features' for features, and
+;; URL `https://github.com/realgud/realgud/wiki/Debuggers-Supported' for
+;; debuggers we can handle.
+;;
+;; Once upon a time in an Emacs far far away and a programming-style
+;; deservedly banished, there was a monolithic Cathederal-like
+;; debugger front-end called gub.  This interfaced with a number of
+;; debuggers, many now dead.  Is there anyone still alive that
+;; remembers sdb from UNIX/32V circa 1980?
+;;
+;; This isn't that.  Here we make use of more modern programming
+;; practices, more numerous and smaller files, unit tests, and better
+;; use of Emacs primitives, e.g. buffer marks, buffer-local variables,
+;; structures, rings, hash tables.  Although there is still much to be
+;; desired, this code is more scalable and suitable as a common base for
+;; an Emacs front-end to modern debuggers.
+;;
+;; Oh, and because global variables are largely banned, we can support
+;; several simultaneous debug sessions.
+
+;; If you don't see your favorite debugger, see URL
+;; `https://github.com/realgud/realgud/wiki/How-to-add-a-new-debugger/'
+;; for how you can add your own.
+
+;; The debugger is run out of a comint process buffer, or you can use
+;; a `realgud-track-mode' inside an existing comint shell, shell, or
+;; eshell buffer.
+
+;; To install you will need a couple of other Emacs packages
+;; installed.  If you install via melpa (`package-install') or
+;; `el-get', these will be pulled in automatically.  See the
+;; installation instructions URL
+;; `https://github.com/realgud/realgud/wiki/How-to-Install' for all
+;; the ways to to install and more details on installation.
+
+;;; Code:
+
+;; Press C-x C-e at the end of the next line configure the program in
+;; for building via "make" to get set up.
+;; (compile (format "EMACSLOADPATH=:%s:%s ./autogen.sh" (file-name-directory 
(locate-library "test-simple.elc")) (file-name-directory (locate-library 
"load-relative.elc")) (file-name-directory (locate-library "loc-changes.elc"))))
+
+(require 'load-relative)
+
+(defgroup realgud nil
+  "The Grand Cathedral Debugger rewrite"
+  :group 'processes
+  :group 'tools
+  :version "24.3")
+
+;; FIXME: extend require-relative for "autoload".
+(defun realgud:load-features()
+  (require-relative-list
+   '(
+     "./realgud/common/track-mode"
+     "./realgud/common/utils"
+     "./realgud/debugger/bashdb/bashdb"
+     "./realgud/debugger/gdb/gdb"
+     "./realgud/debugger/gub/gub"
+     "./realgud/debugger/ipdb/ipdb"
+     "./realgud/debugger/jdb/jdb"
+     "./realgud/debugger/kshdb/kshdb"
+     "./realgud/debugger/nodejs/nodejs"
+     "./realgud/debugger/pdb/pdb"
+     "./realgud/debugger/perldb/perldb"
+     "./realgud/debugger/rdebug/rdebug"
+     "./realgud/debugger/remake/remake"
+     "./realgud/debugger/trepan/trepan"
+     "./realgud/debugger/trepanjs/trepanjs"
+     "./realgud/debugger/trepan.pl/trepanpl"
+     "./realgud/debugger/trepan2/trepan2"
+     "./realgud/debugger/trepan3k/trepan3k"
+     "./realgud/debugger/zshdb/zshdb"
+     ) "realgud-")
+  )
+
+(load-relative "./realgud/common/custom")
+
+(defun realgud-feature-starts-with(feature prefix)
+  "realgud-strings-starts-with on stringified FEATURE and PREFIX."
+  (declare (indent 1))
+  (string-prefix-p (symbol-name feature) prefix)
+  )
+
+(defun realgud:loaded-features()
+  "Return a list of loaded debugger features. These are the
+features that start with 'realgud-' and also include standalone debugger 
features
+like 'pydbgr'."
+  (let ((result nil)
+       (feature-str))
+    (dolist (feature features result)
+      (setq feature-str (symbol-name feature))
+      (cond ((eq 't
+                (string-prefix-p feature-str "realgud-"))
+            (setq result (cons feature-str result)))
+           ((eq 't
+                (string-prefix-p feature-str "nodejs"))
+            (setq result (cons feature-str result)))
+           ((eq 't
+                ;; No trailing '-' to get a plain "trepan".
+                (string-prefix-p feature-str "trepan"))
+            (setq result (cons feature-str result)))
+           ((eq 't
+                ;; No trailing '-' to get a plain "trepanx".
+                (string-prefix-p feature-str "trepanx"))
+            (setq result (cons feature-str result)))
+           ('t nil))
+       )
+      )
+)
+
+(defun realgud:unload-features()
+  "Remove all features loaded from this package. Used in
+`realgud:reload-features'. See that."
+  (interactive "")
+  (let ((result (realgud:loaded-features)))
+    (dolist (feature result result)
+      (unless (symbolp feature) (setq feature (make-symbol feature)))
+      (if (featurep feature)
+       (unload-feature feature) 't))
+  ))
+
+(defun realgud:reload-features()
+  "Reload all features loaded from this package. Useful if have
+changed some code or want to reload another version, say a newer
+development version and you already have this package loaded."
+  (interactive "")
+  (realgud:unload-features)
+  (realgud:load-features)
+  )
+
+;; Load everything.
+(realgud:load-features)
+
+
+;;; Autoloads-related code
+
+;; This section is needed because package.el doesn't recurse into 
subdirectories
+;; when looking for autoload-able forms.  As a workaround, we statically
+;; generate our own autoloads, and force Emacs to read them by adding an extra
+;; autoloded form.
+
+;;;###autoload
+(defconst realgud--recursive-autoloads-file-name 
"realgud-recursive-autoloads.el"
+  "Where to store autoloads for subdirectory contents.")
+
+;;;###autoload
+(defconst realgud--recursive-autoloads-base-directory
+  (file-name-directory
+   (if load-in-progress load-file-name
+     buffer-file-name)))
+
+;;;###autoload
+(with-demoted-errors "Error in RealGUD's autoloads: %s"
+  (load (expand-file-name realgud--recursive-autoloads-file-name
+                          realgud--recursive-autoloads-base-directory)
+        t t))
+
+(defun realgud--rebuild-recursive-autoloads ()
+  "Update RealGUD's recursive autoloads.
+This is needed because the package.el infrastructure doesn't
+process autoloads in subdirectories; instead we create an
+additional autoloads file of our own, and we load it from an
+autoloaded form.  Maintainers should run this after adding
+autoloaded functions, and commit the resulting changes."
+  (interactive)
+  (let ((generated-autoload-file
+         (expand-file-name realgud--recursive-autoloads-file-name
+                           realgud--recursive-autoloads-base-directory)))
+    (when (file-exists-p generated-autoload-file)
+      (delete-file generated-autoload-file))
+    (dolist (name (with-no-warnings
+                    (directory-files-recursively
+                     realgud--recursive-autoloads-base-directory "" t)))
+      (when (file-directory-p name)
+        (update-directory-autoloads name)))))
+
+(provide-me)
+
+;;; realgud.el ends here
diff --git a/packages/context-coloring/test/fixtures/empty 
b/packages/realgud/realgud/.nosearch
similarity index 100%
copy from packages/context-coloring/test/fixtures/empty
copy to packages/realgud/realgud/.nosearch
diff --git a/packages/realgud/realgud/Makefile.am 
b/packages/realgud/realgud/Makefile.am
new file mode 100644
index 0000000..75a2af8
--- /dev/null
+++ b/packages/realgud/realgud/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = common debugger lang
diff --git a/packages/realgud/realgud/common/Makefile.am 
b/packages/realgud/realgud/common/Makefile.am
new file mode 100644
index 0000000..44d7530
--- /dev/null
+++ b/packages/realgud/realgud/common/Makefile.am
@@ -0,0 +1,4 @@
+SUBDIRS = buffer
+
+include $(top_srcdir)/common.mk
+lispdir = @lispdir_realgud@/$(notdir $(subdir))
diff --git a/packages/realgud/realgud/common/attach.el 
b/packages/realgud/realgud/common/attach.el
new file mode 100644
index 0000000..aefd62f
--- /dev/null
+++ b/packages/realgud/realgud/common/attach.el
@@ -0,0 +1,68 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;;; Emacs Commands to associate or attach a source buffer to a command
+;;; buffer and vice versa.
+
+(require 'load-relative)
+(require-relative-list  '("buffer/command" "buffer/source")
+                       "realgud-buffer-")
+(require-relative-list  '("shortkey") "realgud-")
+
+(declare-function realgud-cmdbuf-add-srcbuf           'realgud-buffer-command)
+(declare-function realgud-cmdbuf?                     'realgud-buffer-command)
+(declare-function realgud-srcbuf-init-or-update       'realgud-source)
+(declare-function realgud-short-key-mode-setup        'realgud-shortkey)
+
+(defun realgud:attach-source-buffer(srcbuf)
+  "Associate a source buffer with the current command buffer"
+  (interactive "bsource buffer: ")
+  (unless (realgud-cmdbuf?)
+    (error "The command only works inside a command buffer"))
+  (unless (get-buffer-process (current-buffer))
+    (warn "Can't find a process for command buffer %s" (current-buffer)))
+
+  (let* ((cmdbuf (current-buffer))
+        (shortkey-mode? (realgud-sget 'cmdbuf-info 'src-shortkey?)))
+    (if (stringp srcbuf) (setq srcbuf (get-buffer srcbuf)))
+    (realgud-cmdbuf-add-srcbuf srcbuf)
+    (realgud-srcbuf-init-or-update srcbuf cmdbuf)
+    (if shortkey-mode?
+       (with-current-buffer srcbuf
+         (realgud-short-key-mode-setup 't))
+      )
+    )
+  )
+
+(defun realgud:attach-command-buffer(cmdbuf)
+  "Associate a command buffer with the current source buffer"
+
+  (interactive "bcommand buffer: ")
+  (if (stringp cmdbuf) (setq cmdbuf (get-buffer cmdbuf)))
+  (let* ((srcbuf (current-buffer))
+        (shortkey-mode?))
+    (with-current-buffer cmdbuf
+      (unless (realgud-cmdbuf?)
+       (error "The buffer is not a command buffer"))
+      (unless (get-buffer-process (current-buffer))
+       (warn "Can't find a process for command buffer %s" (current-buffer)))
+      (setq shortkey-mode? (realgud-sget 'cmdbuf-info 'src-shortkey?)))
+    (realgud-cmdbuf-add-srcbuf srcbuf)
+    (realgud-srcbuf-init-or-update srcbuf cmdbuf)
+    (if shortkey-mode? (realgud-short-key-mode-setup 't)))
+  )
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/backtrace-mode.el 
b/packages/realgud/realgud/common/backtrace-mode.el
new file mode 100644
index 0000000..96fec26
--- /dev/null
+++ b/packages/realgud/realgud/common/backtrace-mode.el
@@ -0,0 +1,118 @@
+;; Copyright (C) 2015 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;;; Debugger Backtrace buffer mode settings
+(require 'load-relative)
+(require-relative-list  '("menu" "key") "realgud-")
+(require-relative-list  '("buffer/command") "realgud-buffer-")
+
+(declare-function realgud-populate-debugger-menu 'realgud-menu)
+(declare-function realgud-populate-common-keys 'realgud-menu)
+(declare-function realgud-cmdbuf-pat 'realgud-menu)
+
+(defvar realgud:frames-menu nil
+  "Frames menu in Backtrace menu.")
+
+;; (setq realgud:frames-menu
+;;       (let ((map (make-sparse-keymap "Goto Specific Frames")))
+;;     (define-key map [frames-menu]
+;;       (list 'menu-item "Specific Frames" 'realgud:frames-menu))
+;;     (realgud-menu-item map "Frame 1" 'realgud-goto-frame-1)
+;;     (realgud-menu-item map "Frame 2" 'realgud-goto-frame-2)
+;;     (realgud-menu-item map "Frame 3" 'realgud-goto-frame-3)
+;;     )
+;;       map)
+
+(defvar realgud-backtrace-mode-map
+  (let ((map  (realgud-populate-debugger-menu (make-sparse-keymap))))
+    (suppress-keymap map)
+    (realgud-populate-common-keys map)
+    (define-key map "."       'realgud-backtrace-moveto-frame-selected)
+    (define-key map "r"       'realgud:backtrace-init)
+    (define-key map [double-mouse-1] 'realgud:follow-event)
+    (define-key map [mouse-2] 'realgud:follow-event)
+    (define-key map [enter]   'realgud:follow-event)
+    (define-key map [mouse-3] 'realgud:follow-event)
+    (define-key map [enter]   'realgud:follow-event)
+    (define-key map [return]  'realgud:follow-point)
+    (define-key map [up]      'realgud-backtrace-moveto-frame-prev)
+    (define-key map [down]    'realgud-backtrace-moveto-frame-next)
+    (define-key map "l"       'realgud-recenter-arrow)
+
+    (define-key map [frames-menu]
+      (list 'menu-item "Specific Frames" 'realgud:frames-menu))
+
+    ;; FIXME: these can go to a common routine. See also shortkey.el and
+    ;; key.el
+    (define-key map "<"       'realgud:cmd-newer-frame)
+    (define-key map ">"       'realgud:cmd-older-frame)
+    (define-key map "d"       'realgud:cmd-newer-frame)
+    (define-key map "u"       'realgud:cmd-older-frame)
+    (define-key map "q"       'realgud:cmd-quit)
+    (define-key map "C"       'realgud-window-cmd-undisturb-src)
+    (define-key map "F"       'realgud:window-bt)
+    (define-key map "I"       'realgud:cmdbuf-info-describe)
+    (define-key map "S"       'realgud-window-src-undisturb-cmd)
+
+    (define-key map "n"       'realgud-backtrace-moveto-frame-next)
+    (define-key map "p"       'realgud-backtrace-moveto-frame-prev)
+    (define-key map "0"       'realgud-goto-frame-n)
+    (define-key map "1"       'realgud-goto-frame-n)
+    (define-key map "2"       'realgud-goto-frame-n)
+    (define-key map "3"       'realgud-goto-frame-n)
+    (define-key map "4"       'realgud-goto-frame-n)
+    (define-key map "5"       'realgud-goto-frame-n)
+    (define-key map "6"       'realgud-goto-frame-n)
+    (define-key map "7"       'realgud-goto-frame-n)
+    (define-key map "8"       'realgud-goto-frame-n)
+    (define-key map "9"       'realgud-goto-frame-n)
+
+    ;; --------------------
+    ;; The "Stack window" submenu.
+    ;; (let ((submenu realgud:frames-menu))
+    ;;   (define-key-after map [menu-bar debugger stack]
+    ;;     (cons "Stack window" submenu)
+    ;;     'placeholder))
+    map)
+  "Keymap to navigate realgud stack frames.
+
+\\{realgud-backtrace-mode-map}")
+
+(defun realgud-backtrace-mode (&optional cmdbuf)
+  "Major mode for displaying the stack frames.
+\\{realgud-frames-mode-map}"
+  (interactive)
+  (kill-all-local-variables)
+  (setq buffer-read-only 't)
+  (setq major-mode 'realgud-backtrace-mode)
+  (setq mode-name "Realgud Stack Frames")
+  ;; (set (make-local-variable 'realgud-secondary-buffer) t)
+  (setq mode-line-process 'realgud-mode-line-process)
+  (use-local-map realgud-backtrace-mode-map)
+
+  ;; FIXME: make buffer specific
+  (if cmdbuf
+      (let* ((font-lock-keywords
+             (with-current-buffer cmdbuf
+               (realgud-cmdbuf-pat "font-lock-keywords"))))
+       (if font-lock-keywords
+           (set (make-local-variable 'font-lock-defaults)
+                (list font-lock-keywords)))
+       ))
+  ;; (run-mode-hooks 'realgud-backtrace-mode-hook)
+  )
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/backtrack-mode.el 
b/packages/realgud/realgud/common/backtrack-mode.el
new file mode 100644
index 0000000..a4bbfc5
--- /dev/null
+++ b/packages/realgud/realgud/common/backtrack-mode.el
@@ -0,0 +1,115 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;;  Used to parse programming-language backtrace-like tracks
+;;  output. In contrast to track-mode, there doesn't have to be a
+;;  process shell arround Compare with backtrace-mode.el which
+;;  handles backtraces inside the debugger
+
+(require 'shell)
+
+(require 'load-relative)
+(require-relative-list
+ '("core"   "helper" "track" "loc" "lochist" "file"
+   "fringe" "window" "regexp" "menu"
+   "send"   "shortkey") "realgud-")
+
+(require-relative-list  '("buffer/command") "realgud-buffer-")
+
+(declare-function realgud:debugger-name-transform 'realgud-helper)
+(declare-function realgud-populate-debugger-menu  'realgud-menu)
+(declare-function realgud:track-set-debugger      'realgud-track)
+
+(defvar realgud-backtrack-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map [frames-menu]
+      (list 'menu-item "Specific Frames" 'realgud:frames-menu))
+    (define-key map [M-right]  'realgud-track-hist-newest)
+    (define-key map [M-down]   'realgud-track-hist-newer)
+    (define-key map [M-up]     'realgud-track-hist-older)
+    (define-key map [M-print]  'realgud-track-hist-older)
+    (define-key map [M-S-down] 'realgud-track-hist-newest)
+    (define-key map [M-S-up]   'realgud-track-hist-oldest)
+    (realgud-populate-debugger-menu map)
+    map)
+  "Keymap used in `realgud-backtrack-minor-mode'.")
+
+;; FIXME figure out if I can put this in something like a header file.
+;; FIXME: combine with realgud:track-set-debugger's completing read
+(defun realgud-backtrack-set-debugger (debugger-name)
+  "Set debugger name This info is returned or nil if we can't find a
+debugger with that information"
+  (interactive
+   (list (completing-read "Debugger name: " realgud-pat-hash)))
+  (let ((regexp-hash (gethash debugger-name realgud-pat-hash)))
+    (if regexp-hash
+       (let* ((base-variable-name
+               (or (gethash debugger-name realgud:variable-basename-hash)
+                   debugger-name))
+              (specific-track-mode (intern (concat base-variable-name 
"-backtrack-mode")))
+              )
+         (if (and (not (eval specific-track-mode))
+                  (functionp specific-track-mode))
+             (funcall specific-track-mode 't))
+         )
+      (progn
+       (message "I Don't have %s listed as a debugger." debugger-name)
+       nil)
+      )))
+
+(define-minor-mode realgud-backtrack-mode
+  "Minor mode for backtracking parsing."
+  :init-value nil
+  :global nil
+  :group 'realgud
+
+  :lighter
+  (:eval (progn
+          (concat " "
+                  (if (realgud-cmdbuf-info-set?)
+                      (realgud-sget 'cmdbuf-info 'debugger-name)
+                    "dbgr??"))))
+
+  :keymap realgud-backtrack-mode-map
+  ;; Setup/teardown
+  )
+
+(defmacro realgud-backtrack-mode-vars (name)
+  `(progn
+     (defvar ,(intern (concat name "-backtrack-mode")) nil
+       ,(format "Non-nil if using %s-backtrack-mode as a minor mode of some 
other mode.
+Use the command `%s-track-mode' to toggle or set this variable." name name))
+     (defvar ,(intern (concat name "-backtrack-mode-map")) (make-sparse-keymap)
+       ,(format "Keymap used in `%s-backtrack-mode'." name))
+    ))
+
+;; FIXME: The below could be a macro? I have a hard time getting
+;; macros right.
+(defun realgud-backtrack-mode-body(name)
+  "Used in by custom debuggers: pydbgr, trepan, gdb, etc. NAME is
+the name of the debugger which is used to preface variables."
+  (realgud:track-set-debugger name)
+  (funcall (intern (concat "realgud-define-" name "-commands")))
+  (if (intern (concat name "-backtrack-mode"))
+      (progn
+       (realgud-backtrack-mode 't)
+       (run-mode-hooks (intern (concat name "-backtrack-mode-hook"))))
+    (progn
+      (realgud-backtrack-mode nil)
+      )))
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/bp-image-data.el 
b/packages/realgud/realgud/common/bp-image-data.el
new file mode 100644
index 0000000..d0aaca3
--- /dev/null
+++ b/packages/realgud/realgud/common/bp-image-data.el
@@ -0,0 +1,378 @@
+;; Copyright (C) 2016 Free Software Foundation, Inc
+
+;; Authors: Clément Pit--Claudel, Nick Roberts <address@hidden>,
+;; Rocky Bernstein
+
+;; 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/>.
+;; Run ‘cask exec emacs -Q -L . -l etc/screenshot.el’ from the project's root 
to
+;; build a screenshot.
+
+(require 'load-relative)
+
+(defconst realgud-bp-xpm-data
+        "/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+\"10 10 2 1\",
+\"  c red\",
+\"+ c None\",
+/* pixels */
+\"+++    +++\",
+\"++      ++\",
+\"+        +\",
+\"          \",
+\"          \",
+\"          \",
+\"          \",
+\"+        +\",
+\"++      ++\",
+\"+++    +++\",
+};"
+  "XPM data used for breakpoint enable and disable icon.")
+
+;; For seeing what above icon looks like:
+(if nil
+    (progn
+      (let ((image
+            (find-image `((:type xpm :data
+                                 ,realgud-bp-xpm-data
+                                 :ascent 100 :pointer hand)))))
+       (insert-image image))   ;; eval-last-sexp after previous ))
+      (let ((image
+            (find-image `((:type xpm :data
+                                 ,realgud-bp-xpm-data
+                                 :conversion disabled
+                                 :ascent 100 :pointer hand)))))
+       (insert-image image))   ;; eval-last-sexp after previous ))
+      )
+  )
+
+(defconst realgud-bp-enabled-pbm-data
+  "P1
+10 10\",
+0 0 0 0 1 1 1 1 0 0 0 0
+0 0 0 1 1 1 1 1 1 0 0 0
+0 0 1 1 1 1 1 1 1 1 0 0
+0 1 1 1 1 1 1 1 1 1 1 0
+0 1 1 1 1 1 1 1 1 1 1 0
+0 1 1 1 1 1 1 1 1 1 1 0
+0 1 1 1 1 1 1 1 1 1 1 0
+0 0 1 1 1 1 1 1 1 1 0 0
+0 0 0 1 1 1 1 1 1 0 0 0
+0 0 0 0 1 1 1 1 0 0 0 0"
+  "PBM data used for enabled breakpoint icon.")
+
+;; For seeing what above icon looks like:
+(if nil
+    (let ((image
+         (find-image `((:type pbm :data
+                              ,realgud-bp-enabled-pbm-data
+                              :ascent 100 :pointer hand)))))
+      (insert-image image))   ;; eval-last-sexp after previous ))
+  )
+
+(defconst realgud-bp-disabled-pbm-data
+  "P1
+10 10\",
+1 1 1 1 0 0 0 0 1 1 1 1
+1 1 1 0 0 0 0 0 0 1 1 1
+1 1 0 0 0 0 0 0 0 0 1 1
+1 0 0 0 0 0 0 0 0 0 0 1
+1 0 0 0 0 0 0 0 0 0 0 1
+1 0 0 0 0 0 0 0 0 0 0 1
+1 0 0 0 0 0 0 0 0 0 0 1
+1 1 0 0 0 0 0 0 0 0 1 1
+1 1 1 0 0 0 0 0 0 1 1 1
+1 1 1 1 0 0 0 0 1 1 1 1"
+  "PBM data used for disabled breakpoint icon.")
+
+;; For seeing what above icon looks like:
+(if nil
+    (let ((image
+         (find-image `((:type pbm :data
+                              ,realgud-bp-disabled-pbm-data
+                              :ascent 100 :pointer hand)))))
+      (insert-image image))   ;; eval-last-sexp after previous ))
+  )
+
+
+
+(defconst realgud-bp-enabled-svg-data
+"<?xml version='1.0' standalone='no'?>
+<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 20010904//EN'
+  'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
+<svg width='10' height='10'>
+  <circle cx='0' cy='0' r='1' fill='none'/>
+  <circle cx='1' cy='0' r='1' fill='none'/>
+  <circle cx='2' cy='0' r='1' fill='none'/>
+  <circle cx='3' cy='0' r='1' fill='red'/>
+  <circle cx='4' cy='0' r='1' fill='red'/>
+  <circle cx='5' cy='0' r='1' fill='red'/>
+  <circle cx='6' cy='0' r='1' fill='red'/>
+  <circle cx='7' cy='0' r='1' fill='none'/>
+  <circle cx='8' cy='0' r='1' fill='none'/>
+  <circle cx='9' cy='0' r='1' fill='none'/>
+  <circle cx='0' cy='1' r='1' fill='none'/>
+  <circle cx='1' cy='1' r='1' fill='none'/>
+  <circle cx='2' cy='1' r='1' fill='red'/>
+  <circle cx='3' cy='1' r='1' fill='red'/>
+  <circle cx='4' cy='1' r='1' fill='red'/>
+  <circle cx='5' cy='1' r='1' fill='red'/>
+  <circle cx='6' cy='1' r='1' fill='red'/>
+  <circle cx='7' cy='1' r='1' fill='red'/>
+  <circle cx='8' cy='1' r='1' fill='none'/>
+  <circle cx='9' cy='1' r='1' fill='none'/>
+  <circle cx='0' cy='2' r='1' fill='none'/>
+  <circle cx='1' cy='2' r='1' fill='red'/>
+  <circle cx='2' cy='2' r='1' fill='red'/>
+  <circle cx='3' cy='2' r='1' fill='red'/>
+  <circle cx='4' cy='2' r='1' fill='red'/>
+  <circle cx='5' cy='2' r='1' fill='red'/>
+  <circle cx='6' cy='2' r='1' fill='red'/>
+  <circle cx='7' cy='2' r='1' fill='red'/>
+  <circle cx='8' cy='2' r='1' fill='red'/>
+  <circle cx='9' cy='2' r='1' fill='none'/>
+  <circle cx='0' cy='3' r='1' fill='red'/>
+  <circle cx='1' cy='3' r='1' fill='red'/>
+  <circle cx='2' cy='3' r='1' fill='red'/>
+  <circle cx='3' cy='3' r='1' fill='red'/>
+  <circle cx='4' cy='3' r='1' fill='red'/>
+  <circle cx='5' cy='3' r='1' fill='red'/>
+  <circle cx='6' cy='3' r='1' fill='red'/>
+  <circle cx='7' cy='3' r='1' fill='red'/>
+  <circle cx='8' cy='3' r='1' fill='red'/>
+  <circle cx='9' cy='3' r='1' fill='red'/>
+  <circle cx='0' cy='4' r='1' fill='red'/>
+  <circle cx='1' cy='4' r='1' fill='red'/>
+  <circle cx='2' cy='4' r='1' fill='red'/>
+  <circle cx='3' cy='4' r='1' fill='red'/>
+  <circle cx='4' cy='4' r='1' fill='red'/>
+  <circle cx='5' cy='4' r='1' fill='red'/>
+  <circle cx='6' cy='4' r='1' fill='red'/>
+  <circle cx='7' cy='4' r='1' fill='red'/>
+  <circle cx='8' cy='4' r='1' fill='red'/>
+  <circle cx='9' cy='4' r='1' fill='red'/>
+  <circle cx='0' cy='5' r='1' fill='red'/>
+  <circle cx='1' cy='5' r='1' fill='red'/>
+  <circle cx='2' cy='5' r='1' fill='red'/>
+  <circle cx='3' cy='5' r='1' fill='red'/>
+  <circle cx='4' cy='5' r='1' fill='red'/>
+  <circle cx='5' cy='5' r='1' fill='red'/>
+  <circle cx='6' cy='5' r='1' fill='red'/>
+  <circle cx='7' cy='5' r='1' fill='red'/>
+  <circle cx='8' cy='5' r='1' fill='red'/>
+  <circle cx='9' cy='5' r='1' fill='red'/>
+  <circle cx='0' cy='6' r='1' fill='red'/>
+  <circle cx='1' cy='6' r='1' fill='red'/>
+  <circle cx='2' cy='6' r='1' fill='red'/>
+  <circle cx='3' cy='6' r='1' fill='red'/>
+  <circle cx='4' cy='6' r='1' fill='red'/>
+  <circle cx='5' cy='6' r='1' fill='red'/>
+  <circle cx='6' cy='6' r='1' fill='red'/>
+  <circle cx='7' cy='6' r='1' fill='red'/>
+  <circle cx='8' cy='6' r='1' fill='red'/>
+  <circle cx='9' cy='6' r='1' fill='red'/>
+  <circle cx='0' cy='7' r='1' fill='none'/>
+  <circle cx='1' cy='7' r='1' fill='red'/>
+  <circle cx='2' cy='7' r='1' fill='red'/>
+  <circle cx='3' cy='7' r='1' fill='red'/>
+  <circle cx='4' cy='7' r='1' fill='red'/>
+  <circle cx='5' cy='7' r='1' fill='red'/>
+  <circle cx='6' cy='7' r='1' fill='red'/>
+  <circle cx='7' cy='7' r='1' fill='red'/>
+  <circle cx='8' cy='7' r='1' fill='red'/>
+  <circle cx='9' cy='7' r='1' fill='none'/>
+  <circle cx='0' cy='8' r='1' fill='none'/>
+  <circle cx='1' cy='8' r='1' fill='none'/>
+  <circle cx='2' cy='8' r='1' fill='red'/>
+  <circle cx='3' cy='8' r='1' fill='red'/>
+  <circle cx='4' cy='8' r='1' fill='red'/>
+  <circle cx='5' cy='8' r='1' fill='red'/>
+  <circle cx='6' cy='8' r='1' fill='red'/>
+  <circle cx='7' cy='8' r='1' fill='red'/>
+  <circle cx='8' cy='8' r='1' fill='none'/>
+  <circle cx='9' cy='8' r='1' fill='none'/>
+  <circle cx='0' cy='9' r='1' fill='none'/>
+  <circle cx='1' cy='9' r='1' fill='none'/>
+  <circle cx='2' cy='9' r='1' fill='none'/>
+  <circle cx='3' cy='9' r='1' fill='red'/>
+  <circle cx='4' cy='9' r='1' fill='red'/>
+  <circle cx='5' cy='9' r='1' fill='red'/>
+  <circle cx='6' cy='9' r='1' fill='red'/>
+  <circle cx='7' cy='9' r='1' fill='none'/>
+  <circle cx='8' cy='9' r='1' fill='none'/>
+  <circle cx='9' cy='9' r='1' fill='none'/>
+</svg>")
+
+;; For seeing what above icon looks like:
+(if nil
+    (let ((image
+         (find-image `((:type svg :data
+                              ,realgud-bp-enabled-svg-data
+                              :ascent 100 :pointer hand)))))
+      (insert-image image))   ;; eval-last-sexp after previous ))
+  )
+
+(defconst realgud-bp-disabled-svg-data
+"<?xml version='1.0' standalone='no'?>
+<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 20010904//EN'
+  'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
+<svg width='10' height='10'>
+  <circle cx='0' cy='0' r='1' fill='none'/>
+  <circle cx='1' cy='0' r='1' fill='none'/>
+  <circle cx='2' cy='0' r='1' fill='none'/>
+  <circle cx='3' cy='0' r='1' fill='gray'/>
+  <circle cx='4' cy='0' r='1' fill='gray'/>
+  <circle cx='5' cy='0' r='1' fill='gray'/>
+  <circle cx='6' cy='0' r='1' fill='gray'/>
+  <circle cx='7' cy='0' r='1' fill='none'/>
+  <circle cx='8' cy='0' r='1' fill='none'/>
+  <circle cx='9' cy='0' r='1' fill='none'/>
+  <circle cx='0' cy='1' r='1' fill='none'/>
+  <circle cx='1' cy='1' r='1' fill='none'/>
+  <circle cx='2' cy='1' r='1' fill='gray'/>
+  <circle cx='3' cy='1' r='1' fill='gray'/>
+  <circle cx='4' cy='1' r='1' fill='gray'/>
+  <circle cx='5' cy='1' r='1' fill='gray'/>
+  <circle cx='6' cy='1' r='1' fill='gray'/>
+  <circle cx='7' cy='1' r='1' fill='gray'/>
+  <circle cx='8' cy='1' r='1' fill='none'/>
+  <circle cx='9' cy='1' r='1' fill='none'/>
+  <circle cx='0' cy='2' r='1' fill='none'/>
+  <circle cx='1' cy='2' r='1' fill='gray'/>
+  <circle cx='2' cy='2' r='1' fill='gray'/>
+  <circle cx='3' cy='2' r='1' fill='gray'/>
+  <circle cx='4' cy='2' r='1' fill='gray'/>
+  <circle cx='5' cy='2' r='1' fill='gray'/>
+  <circle cx='6' cy='2' r='1' fill='gray'/>
+  <circle cx='7' cy='2' r='1' fill='gray'/>
+  <circle cx='8' cy='2' r='1' fill='gray'/>
+  <circle cx='9' cy='2' r='1' fill='none'/>
+  <circle cx='0' cy='3' r='1' fill='gray'/>
+  <circle cx='1' cy='3' r='1' fill='gray'/>
+  <circle cx='2' cy='3' r='1' fill='gray'/>
+  <circle cx='3' cy='3' r='1' fill='gray'/>
+  <circle cx='4' cy='3' r='1' fill='gray'/>
+  <circle cx='5' cy='3' r='1' fill='gray'/>
+  <circle cx='6' cy='3' r='1' fill='gray'/>
+  <circle cx='7' cy='3' r='1' fill='gray'/>
+  <circle cx='8' cy='3' r='1' fill='gray'/>
+  <circle cx='9' cy='3' r='1' fill='gray'/>
+  <circle cx='0' cy='4' r='1' fill='gray'/>
+  <circle cx='1' cy='4' r='1' fill='gray'/>
+  <circle cx='2' cy='4' r='1' fill='gray'/>
+  <circle cx='3' cy='4' r='1' fill='gray'/>
+  <circle cx='4' cy='4' r='1' fill='gray'/>
+  <circle cx='5' cy='4' r='1' fill='gray'/>
+  <circle cx='6' cy='4' r='1' fill='gray'/>
+  <circle cx='7' cy='4' r='1' fill='gray'/>
+  <circle cx='8' cy='4' r='1' fill='gray'/>
+  <circle cx='9' cy='4' r='1' fill='gray'/>
+  <circle cx='0' cy='5' r='1' fill='gray'/>
+  <circle cx='1' cy='5' r='1' fill='gray'/>
+  <circle cx='2' cy='5' r='1' fill='gray'/>
+  <circle cx='3' cy='5' r='1' fill='gray'/>
+  <circle cx='4' cy='5' r='1' fill='gray'/>
+  <circle cx='5' cy='5' r='1' fill='gray'/>
+  <circle cx='6' cy='5' r='1' fill='gray'/>
+  <circle cx='7' cy='5' r='1' fill='gray'/>
+  <circle cx='8' cy='5' r='1' fill='gray'/>
+  <circle cx='9' cy='5' r='1' fill='gray'/>
+  <circle cx='0' cy='6' r='1' fill='gray'/>
+  <circle cx='1' cy='6' r='1' fill='gray'/>
+  <circle cx='2' cy='6' r='1' fill='gray'/>
+  <circle cx='3' cy='6' r='1' fill='gray'/>
+  <circle cx='4' cy='6' r='1' fill='gray'/>
+  <circle cx='5' cy='6' r='1' fill='gray'/>
+  <circle cx='6' cy='6' r='1' fill='gray'/>
+  <circle cx='7' cy='6' r='1' fill='gray'/>
+  <circle cx='8' cy='6' r='1' fill='gray'/>
+  <circle cx='9' cy='6' r='1' fill='gray'/>
+  <circle cx='0' cy='7' r='1' fill='none'/>
+  <circle cx='1' cy='7' r='1' fill='gray'/>
+  <circle cx='2' cy='7' r='1' fill='gray'/>
+  <circle cx='3' cy='7' r='1' fill='gray'/>
+  <circle cx='4' cy='7' r='1' fill='gray'/>
+  <circle cx='5' cy='7' r='1' fill='gray'/>
+  <circle cx='6' cy='7' r='1' fill='gray'/>
+  <circle cx='7' cy='7' r='1' fill='gray'/>
+  <circle cx='8' cy='7' r='1' fill='gray'/>
+  <circle cx='9' cy='7' r='1' fill='none'/>
+  <circle cx='0' cy='8' r='1' fill='none'/>
+  <circle cx='1' cy='8' r='1' fill='none'/>
+  <circle cx='2' cy='8' r='1' fill='gray'/>
+  <circle cx='3' cy='8' r='1' fill='gray'/>
+  <circle cx='4' cy='8' r='1' fill='gray'/>
+  <circle cx='5' cy='8' r='1' fill='gray'/>
+  <circle cx='6' cy='8' r='1' fill='gray'/>
+  <circle cx='7' cy='8' r='1' fill='gray'/>
+  <circle cx='8' cy='8' r='1' fill='none'/>
+  <circle cx='9' cy='8' r='1' fill='none'/>
+  <circle cx='0' cy='9' r='1' fill='none'/>
+  <circle cx='1' cy='9' r='1' fill='none'/>
+  <circle cx='2' cy='9' r='1' fill='none'/>
+  <circle cx='3' cy='9' r='1' fill='gray'/>
+  <circle cx='4' cy='9' r='1' fill='gray'/>
+  <circle cx='5' cy='9' r='1' fill='gray'/>
+  <circle cx='6' cy='9' r='1' fill='gray'/>
+  <circle cx='7' cy='9' r='1' fill='none'/>
+  <circle cx='8' cy='9' r='1' fill='none'/>
+  <circle cx='9' cy='9' r='1' fill='none'/>
+</svg>")
+
+;; For seeing what above icon looks like:
+(if nil
+    (let ((image
+         (find-image `((:type svg :data
+                              ,realgud-bp-disabled-svg-data
+                              :ascent 100 :pointer hand)))))
+      (insert-image image))   ;; eval-last-sexp after previous ))
+  )
+
+(defconst realgud-bp-enabled-tiff-data
+"II*(����������@@@@������������������������BBBB��������������������@@@@��������������������������������BBBB������������������������������������������������BBBB����������������������������������������������������������������������������������������������������������������������������
 [...]
+
+
+

&f 
4<()>D?TR/tmp/address@hidden@���(address@hidden@@address@hidden&address@hidden
    @<
+�@"
+  "TIFF data used for breakpoint enabled icon.")
+
+;; For seeing what above icon looks like:
+(if nil
+    (let ((image
+         (find-image `((:type tiff :data
+                              ,realgud-bp-enabled-tiff-data
+                              :ascent 100 :pointer hand)))))
+      (insert-image image))   ;; eval-last-sexp after previous ))
+  )
+
+(defconst realgud-bp-disabled-tiff-data
+"II*�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
+
+
+
�����()>�?�R/tmp/address@hidden@���(address@hidden@@address@hidden&address@hidden
        @<
+�@"
+  "TIFF data used for breakpoint disabled icon.")
+
+;; For seeing what above icon looks like:
+(if nil
+    (let ((image
+         (find-image `((:type tiff :data
+                              ,realgud-bp-disabled-tiff-data
+                              :ascent 100 :pointer hand)))))
+      (insert-image image))   ;; eval-last-sexp after previous ))
+  )
+
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/bp.el 
b/packages/realgud/realgud/common/bp.el
new file mode 100644
index 0000000..a330945
--- /dev/null
+++ b/packages/realgud/realgud/common/bp.el
@@ -0,0 +1,231 @@
+;; Copyright (C) 2010, 2012-2015 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;; Code associated with breakpoints
+
+(require 'image)
+(require 'load-relative)
+(require-relative-list '("loc" "bp-image-data") "realgud-")
+
+(defun realgud-bp-remove-icons (&optional begin-pos end-pos bpnum)
+  "Remove breakpoint icons (overlays) in BEGIN-POS .. END-POS.
+The default value for BEGIN-POS is `point'.  The default value
+for END-POS is BEGIN-POS.  When BPNUM is non-nil, only remove
+overlays with that breakpoint number.
+
+The way we determine if an overlay is ours is by inspecting the
+overlay for a realgud property."
+  (interactive "r")
+  (setq begin-pos (or begin-pos (point))
+        end-pos (or end-pos begin-pos))
+  (dolist (overlay (overlays-in begin-pos end-pos))
+    (when (overlay-get overlay 'realgud)
+      (when (or (null bpnum) (equal bpnum (overlay-get overlay 
'realgud-bp-num)))
+        (delete-overlay overlay)))))
+
+(defvar realgud-bp-enabled-icon nil
+  "Icon for an enabled breakpoint in display margin.")
+
+(defvar realgud-bp-disabled-icon nil
+  "Icon for a disabled breakpoint in display margin.")
+
+(defun realgud-set-bp-icons()
+  "Load breakpoint icons, if needed."
+  (when (display-images-p)
+    (unless realgud-bp-enabled-icon
+      (setq realgud-bp-enabled-icon
+            (find-image `((:type xpm :data
+                                 ,realgud-bp-xpm-data
+                                 :ascent 100 :pointer hand)
+                          (:type svg :data
+                                 ,realgud-bp-enabled-svg-data
+                                 :ascent 100 :pointer hand)
+                          (:type tiff :data
+                                 ,realgud-bp-enabled-tiff-data
+                                 :ascent 100 :pointer hand)
+                          (:type pbm :data
+                                 ,realgud-bp-enabled-pbm-data
+                                 :ascent 100 :pointer hand)))))
+    (unless realgud-bp-disabled-icon
+      (setq realgud-bp-disabled-icon
+            (find-image `((:type xpm :data
+                                 ,realgud-bp-xpm-data
+                                 :conversion disabled ; different than 
'enabled'
+                                 :ascent 100 :pointer hand)
+                          (:type svg :data
+                                 ,realgud-bp-disabled-svg-data
+                                 :ascent 100 :pointer hand)
+                          (:type tiff :data
+                                 ,realgud-bp-disabled-tiff-data
+                                 :ascent 100 :pointer hand)
+                          (:type pbm :data
+                                 ,realgud-bp-disabled-pbm-data
+                                 :ascent 100 :pointer hand)
+                          (:type svg :data
+                                 ,realgud-bp-disabled-svg-data
+                                 :ascent 100 :pointer hand)))))))
+
+(declare-function define-fringe-bitmap "fringe.c"
+                  (bitmap bits &optional height width align))
+
+(when (display-images-p)
+  ;; Taken from gdb-mi
+  (define-fringe-bitmap 'realgud-bp-filled
+    "\x3c\x7e\xff\xff\xff\xff\x7e\x3c")
+  (define-fringe-bitmap 'realgud-bp-hollow
+    "\x3c\x42\x81\x81\x81\x81\x42\x3c"))
+
+(defgroup realgud-bp nil
+  "RealGUD breakpoints UI"
+  :group 'realgud
+  :prefix 'realgud-bp-)
+
+(defface realgud-bp-enabled-face
+  '((t :foreground "red" :weight bold))
+  "Face for enabled breakpoints (in the fringe or margin)."
+  :group 'realgud-bp)
+
+(defface realgud-bp-disabled-face
+  '((t :foreground "grey" :weight bold))
+  "Face for disabled breakpoints (in the fringe or margin).
+Only used in text terminals: fringe icons always use
+`realgud-bp-enabled-face'."
+  :group 'realgud-bp)
+
+(defface realgud-bp-line-enabled-face
+  '((t :inherit diff-removed))
+  "Face for lines with enabled breakpoints."
+  :group 'realgud-bp)
+
+(defface realgud-bp-line-disabled-face
+  '((t))
+  "Face for lines with disabled breakpoints."
+  :group 'realgud-bp)
+
+(defcustom realgud-bp-fringe-indicator-style '(filled-rectangle . 
hollow-rectangle)
+  "Which fringe icon to use for breakpoints."
+  :type '(choice (const :tag "Disc" (realgud-bp-filled . realgud-bp-hollow))
+                 (const :tag "Square" (filled-square . hollow-square))
+                 (const :tag "Rectangle" (filled-rectangle . 
hollow-rectangle)))
+  :group 'realgud-bp)
+
+(defcustom realgud-bp-use-fringe t
+  "Whether to use the fringe to display breakpoints.
+If nil, use margins instead."
+  :type '(boolean)
+  :group 'realgud-bp)
+
+(defun realgud-bp--fringe-width ()
+  "Compute width of left fringe."
+  (let ((window (get-buffer-window (current-buffer))))
+    (or left-fringe-width
+        (and window (car (window-fringes window)))
+        0)))
+
+(defun realgud-bp-add-fringe-icon (overlay icon)
+  "Add a fringe icon to OVERLAY.
+ICON is a symbol registered with `define-fringe-bitmap'."
+  ;; Ensure that the fringe is wide enough
+  (unless (>= (realgud-bp--fringe-width) 8)
+    (set-fringe-mode `(8 . ,right-fringe-width)))
+  ;; Add the fringe icon
+  (let* ((fringe-spec `(left-fringe ,icon realgud-bp-enabled-face)))
+    (overlay-put overlay 'before-string (propertize "x" 'display 
fringe-spec))))
+
+(defun realgud-bp-add-margin-indicator (overlay text image face)
+  "Add a margin breakpoint indicator to OVERLAY.
+TEXT is a string, IMAGE an IMAGE spec or nil; TEXT gets
+highlighted with FACE."
+  ;; Ensure that the margin is large enough (Taken from gdb-mi)
+  (when (< left-margin-width 2)
+    (save-current-buffer
+      (setq left-margin-width 2)
+      (let ((window (get-buffer-window (current-buffer) 0)))
+        (if window
+            (set-window-margins
+             window left-margin-width right-margin-width)))))
+  ;; Add the margin string
+  (let* ((indicator (or image (propertize text 'face face)))
+         (spec `((margin left-margin) ,indicator)))
+    (overlay-put overlay 'before-string (propertize text 'display spec))))
+
+(defun realgud-bp-put-icon (pos enable? bp-num &optional buf)
+  "Add a breakpoint icon at POS according to breakpoint-display-style.
+Use the fringe if available, and the margin otherwise.  Record
+breakpoint status ENABLE? and breakpoint number BP-NUM in
+overlay.  BUF is the buffer that POS refers to; it detaults to
+the current buffer."
+  (let* ((bp-text) (bp-face) (line-face) (margin-icon) (fringe-icon))
+    (realgud-set-bp-icons)
+    (if enable?
+        (setq bp-text "B"
+              bp-face 'realgud-bp-enabled-face
+              line-face 'realgud-bp-line-enabled-face
+              margin-icon realgud-bp-enabled-icon
+              fringe-icon (car realgud-bp-fringe-indicator-style))
+      (setq bp-text "b"
+            bp-face 'realgud-bp-disabled-face
+            line-face 'realgud-bp-line-disabled-face
+            margin-icon realgud-bp-disabled-icon
+            fringe-icon (cdr realgud-bp-fringe-indicator-style)))
+    (let ((help-echo (format "%s%s: mouse-1 to clear" bp-text bp-num)))
+      (setq bp-text (propertize bp-text 'help-echo help-echo)))
+    (with-current-buffer (or buf (current-buffer))
+      (realgud-bp-remove-icons pos (1+ pos) bp-num)
+      (let* ((eol (save-excursion (goto-char pos) (point-at-eol)))
+             (ov (make-overlay pos (1+ eol) (current-buffer) t nil)))
+        (if (and realgud-bp-use-fringe (display-images-p))
+            (realgud-bp-add-fringe-icon ov fringe-icon)
+          (realgud-bp-add-margin-indicator ov bp-text margin-icon bp-face))
+        (overlay-put ov 'face line-face)
+        (overlay-put ov 'realgud t)
+        (overlay-put ov 'realgud-bp-num bp-num)
+        (overlay-put ov 'realgud-bp-enabled enable?)))))
+
+(defun realgud-bp-del-icon (pos &optional buf bpnum)
+  "Delete breakpoint icon at POS.
+BUF is the buffer which pos refers to (default: current buffer).
+If BPNUM is non-nil, only remove overlays maching that breakpoint
+number."
+  (with-current-buffer (or buf (current-buffer))
+    (realgud-bp-remove-icons pos (1+ pos) bpnum)))
+
+(defun realgud-bp-add-info (loc)
+  "Record bp information for location LOC."
+  (if (realgud-loc? loc)
+      (let* ((marker (realgud-loc-marker loc))
+             (bp-num (realgud-loc-num loc)))
+        (realgud-bp-put-icon marker t bp-num))))
+
+(defun realgud-bp-del-info (loc)
+  "Remove bp information for location LOC."
+  (if (realgud-loc? loc)
+      (let* ((marker (realgud-loc-marker loc))
+             (bp-num (realgud-loc-num loc)))
+        (realgud-bp-del-icon marker (current-buffer) bp-num))))
+
+(defun realgud-bp-enable-disable-info (bp-num enable? loc buf)
+  "Enable or disable bp with BP-NUM at location LOC in BUF."
+  (if (realgud-loc? loc)
+      (let* ((marker (realgud-loc-marker loc))
+             (bp-num-check (realgud-loc-num loc)))
+       (if (eq bp-num bp-num-check)
+           (realgud-bp-put-icon marker enable? bp-num buf)
+         (message "Internal error - bp number found %s doesn't match requested 
%s"
+                  bp-num-check bp-num)
+         ))))
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/buffer/Makefile.am 
b/packages/realgud/realgud/common/buffer/Makefile.am
new file mode 100644
index 0000000..b881b44
--- /dev/null
+++ b/packages/realgud/realgud/common/buffer/Makefile.am
@@ -0,0 +1,3 @@
+include $(top_srcdir)/common.mk
+
+lispdir = @lispdir_realgud@/common/buffer
diff --git a/packages/realgud/realgud/common/buffer/backtrace.el 
b/packages/realgud/realgud/common/buffer/backtrace.el
new file mode 100644
index 0000000..9f05c93
--- /dev/null
+++ b/packages/realgud/realgud/common/buffer/backtrace.el
@@ -0,0 +1,480 @@
+;;; Backtrace buffer
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; Copyright (C) 2015-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/>.
+
+(require 'ansi-color)
+(require 'ring)
+(require 'load-relative)
+(eval-when-compile (require 'cl-lib))
+(require-relative-list
+ '("../key" "helper" "../follow" "../loc") "realgud-")
+
+(require-relative-list
+ '("command") "realgud-buffer-")
+
+(declare-function realgud-cmdbuf-debugger-name 'realgud-buffer-command)
+(declare-function realgud-cmdbuf?              'realgud-buffer-command)
+(declare-function realgud-backtrace-mode (cmdbuf))
+(declare-function realgud:cmd-backtrace (arg))
+(declare-function realgud-cmdbuf-pat(key))
+(declare-function realgud-cmdbuf-info-in-srcbuf?= (arg))
+(declare-function realgud-get-cmdbuf 'realgud-buffer-helper)
+(declare-function realgud:file-loc-from-line 'realgud-file)
+(declare-function realgud:loc-describe 'realgud-loc)
+
+(defstruct realgud-backtrace-info
+  "debugger object/structure specific to a (top-level) program to be debugged."
+  (cmdbuf    nil)  ;; buffer of the associated debugger process
+  (cur-pos   0)    ;; Frame we are at
+  frame-ring       ;; ring of marks in buffer of frame numbers. The
+                   ;; text at that marker has additional properties about the
+                   ;; frame
+)
+
+(declare-function realgud:cmd-frame 'realgud-buffer-command)
+(declare-function realgud-get-cmdbuf(&optional opt-buffer))
+(declare-function realgud-command 'realgud-send)
+
+(make-variable-buffer-local (defvar realgud-backtrace-info))
+
+;: FIXME: not picked up from track. Why?
+(defvar realgud-track-divert-string nil)
+
+(defvar realgud-goto-entry-acc "")
+
+(defun realgud-get-buffer-base-name(string)
+  "Leading and ending * in string. For example:
+   *shell<2>* -> shell<2>
+   *foo shell* -> foo
+   buffer.c -> buffer.c"
+  (if (string-match "^[*]?\\([^*]+\\)[*]?$" string)
+      (let ((string-sans-stars (match-string 1 string)))
+       (if (string-match "\\(.+\\) shell" string-sans-stars)
+           (match-string 1 string-sans-stars)
+         string-sans-stars)
+       )
+    string
+    )
+)
+
+(defun realgud:backtrace-describe (&optional buffer)
+  (interactive "")
+  (unless buffer (setq buffer (current-buffer)))
+  (with-current-buffer buffer
+    (let ((frames (realgud-backtrace-info-frame-ring realgud-backtrace-info))
+         (frame)
+         (loc)
+         (i 0))
+      (switch-to-buffer (get-buffer-create "*Describe*"))
+      (while (and (< i (ring-length frames)) (setq frame (ring-ref frames i)))
+       (insert (format "*** %d\n" i))
+       (insert (format "%s\n" frame))
+       (when (markerp frame)
+         (with-current-buffer (marker-buffer frame)
+           (goto-char frame)
+           (setq loc (get-text-property (point) 'loc))
+         )
+         (when loc (realgud:loc-describe loc)))
+       (setq i (1+ i))
+      )
+    )
+    ))
+
+;; FIXME: create this in a new frame.
+(defun realgud:backtrace-init ()
+  (interactive)
+  (let ((buffer (current-buffer))
+       (cmdbuf (realgud-get-cmdbuf))
+       (process)
+       )
+    (with-current-buffer-safe cmdbuf
+      (let ((frame-pat (realgud-cmdbuf-pat "debugger-backtrace"))
+           (indicator-re (or (realgud-cmdbuf-pat "selected-frame-indicator")
+                             "->"))
+           (selected-frame-num)
+           (frame-pos-ring)
+           (sleep-count 0)
+           )
+       (unless frame-pat
+         (error "No 'debugger-backtrace' regular expression recorded for 
debugger %s"
+                (realgud-cmdbuf-debugger-name)))
+       (setq process (get-buffer-process (current-buffer)))
+       (realgud-cmdbuf-info-in-srcbuf?= (not (realgud-cmdbuf? buffer)))
+       (realgud-cmdbuf-info-divert-output?= t)
+       (setq realgud-track-divert-string nil)
+       (realgud:cmd-backtrace 0)
+       (while (and (eq 'run (process-status process))
+                   (null realgud-track-divert-string)
+                   (> 1000 (setq sleep-count (1+ sleep-count))))
+         (sleep-for 0.001)
+         )
+       (if (>= sleep-count 1000)
+           (message "Timeout on running debugger command")
+         ;; else
+         ;; (message "+++4 %s" realgud-track-divert-string)
+         (let ((bt-buffer (get-buffer-create
+                           (format "*Backtrace %s*"
+                                   (realgud-get-buffer-base-name
+                                    (buffer-name)))))
+               (divert-string realgud-track-divert-string)
+               )
+           (realgud-cmdbuf-info-bt-buf= bt-buffer)
+           (with-current-buffer bt-buffer
+             (setq buffer-read-only nil)
+             (delete-region (point-min) (point-max))
+             (if divert-string
+                 (let* ((triple
+                         (realgud:backtrace-add-text-properties
+                          frame-pat cmdbuf divert-string indicator-re))
+                        (string-with-props
+                         (ansi-color-filter-apply (car triple)))
+                        (frame-num-pos-list (caddr triple))
+                        )
+                   (setq selected-frame-num (cadr triple))
+                   (insert string-with-props)
+                   ;; add marks for each position
+                   (realgud-backtrace-mode cmdbuf)
+                   (setq frame-pos-ring
+                         (make-ring (length frame-num-pos-list)))
+                   (dolist (pos frame-num-pos-list)
+                     (goto-char (1+ pos))
+                     (ring-insert-at-beginning frame-pos-ring (point-marker))
+                     )
+                   )
+               )
+             ;; realgud-backtrace-mode kills all local variables so
+             ;; we set this after. Alternatively change realgud-backtrace-mode.
+             (set (make-local-variable 'realgud-backtrace-info)
+                  (make-realgud-backtrace-info
+                   :cmdbuf cmdbuf
+                   :frame-ring frame-pos-ring
+                   ))
+             (if selected-frame-num
+                 (realgud-backtrace-moveto-frame selected-frame-num))
+             )
+           )
+         )
+       )
+      )
+    (unless cmdbuf
+      (message "Unable to find debugger command buffer for %s" buffer))
+    )
+  )
+
+(defun realgud-backtrace? ( &optional buffer)
+  "Return true if BUFFER is a debugger command buffer."
+  (with-current-buffer-safe
+   (or buffer (current-buffer))
+   (realgud-backtrace-info-set?)))
+
+
+(defalias 'realgud-backtrace-info? 'realgud-backtrace-info-p)
+
+(defun realgud-backtrace-info-set? ()
+  "Return true if realgud-backtrace-info is set."
+  (and (boundp 'realgud-backtrace-info)
+       realgud-backtrace-info
+       (realgud-backtrace-info? realgud-backtrace-info)))
+
+
+(defun realgud-backtrace-moveto-frame-selected ()
+  "Set point to the selected frame."
+  (interactive)
+  (if (realgud-backtrace?)
+      (let* ((cur-pos (realgud-sget 'backtrace-info 'cur-pos))
+            (ring-size (ring-size (realgud-sget 'backtrace-info 'frame-ring)))
+            )
+       (if (and cur-pos (> ring-size 0))
+           (realgud-backtrace-moveto-frame cur-pos)
+         ;else
+         (message "No frame information recorded")
+         )
+       )
+    )
+  )
+
+(defun realgud-backtrace-moveto-frame (num &optional opt-buffer)
+  (if (integerp num)
+      (if (realgud-backtrace?)
+         (let* ((ring (realgud-sget 'backtrace-info 'frame-ring))
+                (marker (ring-ref ring num)))
+           (setf (realgud-backtrace-info-cur-pos realgud-backtrace-info) num)
+           (goto-char marker)
+           )
+       )
+    ; else
+    (message "frame number %s is not an integer" num)
+    )
+  )
+
+(defun realgud-backtrace-moveto-frame-next ()
+  "Set point to the next frame. If we are at the end, wrap to the
+beginning. Note that we are just moving in the backtrace buffer,
+not updating the frame stack."
+  (interactive)
+  (if (realgud-backtrace?)
+      (let* ((cur-pos (realgud-sget 'backtrace-info 'cur-pos))
+            (ring-size (ring-size (realgud-sget 'backtrace-info 'frame-ring)))
+            )
+       (if (and cur-pos (> ring-size 0))
+           (realgud-backtrace-moveto-frame (ring-plus1 cur-pos ring-size))
+         ;else
+         (message "No frame information recorded")
+         )
+       )
+    )
+  )
+
+(defun realgud-backtrace-moveto-frame-prev ()
+  "Set point to the next frame. If we are at the beginning, wrap to the
+end. Note that we are just moving in the backtrace buffer,
+not updating the frame stack."
+  (interactive)
+  (if (realgud-backtrace?)
+      (let* ((cur-pos (realgud-sget 'backtrace-info 'cur-pos))
+            (ring-size (ring-size (realgud-sget 'backtrace-info 'frame-ring)))
+            )
+       (if (and cur-pos (> ring-size 0))
+           (realgud-backtrace-moveto-frame (ring-minus1 cur-pos ring-size))
+         ;else
+         (message "No frame information recorded")
+         )
+      )
+    )
+  )
+
+(defun realgud-goto-frame-n-internal (keys)
+  (if (and (stringp keys)
+           (= (length keys) 1))
+      (progn
+        (setq realgud-goto-entry-acc (concat realgud-goto-entry-acc keys))
+        ;; Try to find the longest suffix.
+        (let ((acc realgud-goto-entry-acc))
+          (while (not (string= acc ""))
+            (if (not (realgud-goto-entry-try acc))
+                (setq acc (substring acc 1))
+              (realgud:cmd-frame (string-to-number acc))
+              ;; Break loop.
+              (setq acc "")))))
+    (message "`realgud-goto-frame-n' must be bound to a number key")))
+
+;; FIXME: replace with ring.
+(defun realgud-goto-entry-try (str)
+  "See if there is an entry with number STR.  If not return nil."
+  (goto-char (point-min))
+  (if (re-search-forward (concat "^[^0-9]*\\(" str "\\)[^0-9]") nil t)
+      (progn
+        (goto-char (match-end 1))
+        t)
+    nil))
+
+
+;; The following is split in two to facilitate debugging.
+(defun realgud-goto-entry-n-internal (keys)
+  (if (and (stringp keys)
+           (= (length keys) 1))
+      (progn
+        (setq realgud-goto-entry-acc (concat realgud-goto-entry-acc keys))
+        ;; Try to find the longest suffix.
+        (let ((acc realgud-goto-entry-acc)
+              (p (point)))
+          (while (not (string= acc ""))
+            (if (not (realgud-goto-entry-try acc))
+                (setq acc (substring acc 1))
+              (setq p (point))
+              ;; Break loop.
+              (setq acc "")))
+          (goto-char p)))
+    (message "`realgud-goto-entry-n' must be bound to a number key")))
+
+
+(defun realgud-goto-entry-n ()
+  "Go to an entry number.
+
+Breakpoints, Display expressions and Stack Frames all have
+numbers associated with them which are distinct from line
+numbers.  In a secondary buffer, this function is usually bound to
+a numeric key which will position you at that entry number.  To
+go to an entry above 9, just keep entering the number.  For
+example, if you press 1 and then 9, you should jump to entry
+1 (if it exists) and then 19 (if that exists).  Entering any
+non-digit will start entry number from the beginning again."
+  (interactive)
+  (if (not (eq last-command 'realgud-goto-entry-n))
+      (setq realgud-goto-entry-acc ""))
+  (realgud-goto-entry-n-internal (this-command-keys)))
+
+(defun realgud-goto-frame ()
+  "Go to the frame number. We get the frame number from the
+'frame-num property"
+  (interactive)
+  (if (realgud-backtrace?)
+      (let ((frame-num (get-text-property (point) 'frame-num)))
+       (if frame-num
+           (realgud:cmd-frame frame-num)
+         (message "No frame property found at this point")
+         )
+       )
+    )
+  )
+
+(defun realgud-goto-frame-1 ()
+  "Go to the frame 1"
+  (interactive)
+  (if (realgud-backtrace?)
+      (realgud:cmd-frame 1)
+    )
+  )
+
+(defun realgud-goto-frame-2 ()
+  "Go to the frame 2"
+  (interactive)
+  (if (realgud-backtrace?)
+      (realgud:cmd-frame 2)
+    )
+  )
+
+(defun realgud-goto-frame-3 ()
+  "Go to the frame 3"
+  (interactive)
+  (if (realgud-backtrace?)
+      (realgud:cmd-frame 3)
+    )
+  )
+
+(defun realgud-goto-frame-mouse (event)
+  (interactive "e")
+  (let* ((pos (posn-point (event-end event)))
+        (frame-num (get-text-property pos 'frame-num)))
+    (if (realgud-backtrace?)
+       (if frame-num
+           (realgud:cmd-frame frame-num)
+         (message "No frame property found at this point")
+         )
+      )
+    )
+)
+
+(defun realgud-goto-frame-n ()
+  "Go to the frame number indicated by the accumulated numeric keys just 
entered.
+
+This function is usually bound to a numeric key in a 'frame'
+secondary buffer. To go to an entry above 9, just keep entering
+the number. For example, if you press 1 and then 9, frame 1 is selected
+\(if it exists) and then frame 19 (if that exists). Entering any
+non-digit will start entry number from the beginning again."
+  (interactive)
+  (if (not (eq last-command 'realgud-goto-frame-n))
+      (setq realgud-goto-entry-acc ""))
+  (realgud-goto-frame-n-internal (this-command-keys)))
+
+(defun realgud:backtrace-add-text-properties(frame-pat cmdbuf &optional 
opt-string
+                                                      frame-indicator-re)
+  "Parse OPT-STRING or the current buffer and add frame properties: frame 
number,
+filename, line number, whether the frame is selected as text properties."
+
+  (let* ((string (or opt-string
+                   (buffer-substring (point-min) (point-max))
+                   ))
+        (stripped-string (ansi-color-filter-apply string))
+        (frame-regexp (realgud-loc-pat-regexp frame-pat))
+        (frame-group-pat (realgud-loc-pat-num frame-pat))
+        (file-group-pat (realgud-loc-pat-file-group frame-pat))
+        (line-group-pat (realgud-loc-pat-line-group frame-pat))
+        (alt-frame-num -1)
+        (last-pos 0)
+        (selected-frame-num nil)
+        (frame-num-pos-list '())
+        )
+    (while (string-match frame-regexp stripped-string last-pos)
+      (let ((frame-num-str) (frame-num) (line-num) (filename)
+           ;; FIXME: Remove hack that group 1 is always the frame indicator.
+           (frame-indicator
+            (substring stripped-string (match-beginning 1) (match-end 1)))
+           (frame-num-pos)
+
+           )
+       (if frame-group-pat
+           (progn
+             (setq frame-num-str
+                   (substring stripped-string
+                              (match-beginning frame-group-pat)
+                              (match-end frame-group-pat)))
+             (setq frame-num (string-to-number frame-num-str))
+             (setq frame-num-pos (match-beginning frame-group-pat))
+             (add-to-list 'frame-num-pos-list frame-num-pos t)
+             (add-text-properties (match-beginning frame-group-pat)
+                                  (match-end frame-group-pat)
+                                  (list 'mouse-face 'highlight
+                                        'help-echo "mouse-2: goto this frame"
+                                        'frame frame-num)
+                                  string)
+             )
+         ; else
+         (progn
+           (setq frame-num-str
+                   (substring stripped-string (match-beginning 0)
+                              (match-end 0)))
+           (setq frame-num (incf alt-frame-num))
+           (setq frame-num-pos (match-beginning 0))
+           (add-to-list 'frame-num-pos-list frame-num-pos t)
+           (add-text-properties (match-beginning 0) (match-end 0)
+                                (list 'mouse-face 'highlight
+                                      'help-echo "mouse-2: goto this frame"
+                                      'frame frame-num)
+                                string)
+           )
+         )
+       (when file-group-pat
+         (setq filename (substring stripped-string
+                                   (match-beginning file-group-pat)
+                                   (match-end file-group-pat)))
+         (add-text-properties (match-beginning file-group-pat)
+                              (match-end file-group-pat)
+                              (list 'mouse-face 'highlight
+                                    'help-echo "mouse-2: goto this file"
+                                    'action 'realgud:follow-event
+                                    'file filename)
+                              string)
+           )
+       (when line-group-pat
+         (let ((line-num-str (substring stripped-string
+                                   (match-beginning line-group-pat)
+                                   (match-end line-group-pat))))
+           (setq line-num (string-to-number (or line-num-str "1")))
+         ))
+
+       (when (and (stringp filename) (numberp line-num))
+         (let ((loc (realgud:file-loc-from-line filename line-num cmdbuf)))
+           (put-text-property (match-beginning 0) (match-end 0)
+                              'loc loc string)
+           ))
+       (put-text-property (match-beginning 0) (match-end 0)
+                          'frame-num  frame-num string)
+       (setq last-pos (match-end 0))
+
+       (if (string-match frame-indicator-re frame-indicator)
+         (setq selected-frame-num frame-num))
+       ))
+
+    (list string selected-frame-num frame-num-pos-list)
+    )
+  )
+
+(provide-me "realgud-buffer-")
diff --git a/packages/realgud/realgud/common/buffer/command.el 
b/packages/realgud/realgud/common/buffer/command.el
new file mode 100644
index 0000000..760db53
--- /dev/null
+++ b/packages/realgud/realgud/common/buffer/command.el
@@ -0,0 +1,397 @@
+;; Copyright (C) 2015 Free Software Foundation, Inc
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;;; process-command buffer things
+
+(require 'load-relative)
+(require 'json)
+(require-relative-list
+ '("../fringe"  "../loc" "../lochist" "../regexp")  "realgud-")
+(require-relative-list '("info")  "realgud-buffer-")
+
+(declare-function realgud-get-cmdbuf 'realgud-buffer-helper)
+
+(eval-when-compile
+  (byte-compile-disable-warning 'cl-functions)
+  ;; Somehow disabling cl-functions causes the erroneous message:
+  ;;   Warning: the function `reduce' might not be defined at runtime.
+  ;; FIXME: isolate, fix and/or report back to Emacs developers a bug
+  (byte-compile-disable-warning 'unresolved)
+  (defvar realgud-cmdbuf-info)
+  )
+(require 'cl-lib)
+
+(defface debugger-running
+  '((((class color) (min-colors 16) (background light))
+     (:foreground "Green4" :weight bold))
+    (((class color) (min-colors 88) (background dark))
+     (:foreground "Green1" :weight bold))
+    (((class color) (min-colors 16) (background dark))
+     (:foreground "Green" :weight bold))
+    (((class color)) (:foreground "green" :weight bold))
+    (t (:weight bold)))
+  "Face used to highlight debugger run information."
+  :group 'realgud
+  :version "24.3")
+
+(defface debugger-not-running
+  '((t :inherit font-lock-warning-face))
+  "Face used when debugger or process is not running."
+  :group 'realgud
+  :version "24.3")
+
+
+(defstruct realgud-cmdbuf-info
+  "The debugger object/structure specific to a process buffer."
+  debugger-name        ;; Name of debugger
+  base-variable-name   ;; prefix used in variables pertinent to this
+                       ;; debugger sometimes it is the same as the debugger
+                       ;; and sometimes it is different
+  cmd-args             ;; Command-line invocation arguments
+  frame-switch?        ;; Should the selected window be the source buffer or
+                      ;; command buffer?
+  in-srcbuf?           ;; If true, selected window should be the source buffer.
+                      ;; Otherwise, the command buffer?
+  last-input-end       ;; point where input last ended. Set from
+                       ;; comint-last-input-end
+  prior-prompt-regexp  ;; regular expression prompt (e.g.
+                       ;; comint-prompt-regexp) *before* setting
+                       ;; loc-regexp
+  no-record?           ;; Should we update the location history?
+  in-debugger?         ;; True if we think we are in a debugger
+  src-shortkey?        ;; Are source buffers in realgud-short-key mode?
+  regexp-hash          ;; hash table of regular expressions appropriate for
+                       ;; this debugger. Eventually loc-regexp, file-group
+                       ;; and line-group below will removed and stored here.
+  srcbuf-list          ;; list of source buffers we have stopped at
+  bt-buf               ;; backtrace buffer if it exists
+  bp-list              ;; list of breakpoints
+  divert-output?       ;; Output is part of a conversation between front-end
+                       ;; debugger.
+  cmd-hash             ;; Allows us to remap command names like
+                       ;; quit => quit!
+  callback-loc-fn      ;; If we need, as in the case of Java, to do
+                       ;; special handling to map output to a file
+                       ;; location, this is set to that special
+                       ;; function
+  callback-eval-filter ;; If set, this function strip extraneous output
+                       ;; when evaluating an expression. For example,
+                       ;; some trepan debuggers expression values prefaced 
with:
+                       ;; $DB::D[0] =
+
+  ;; FIXME: REMOVE THIS and use regexp-hash
+  loc-regexp   ;; Location regular expression string
+  file-group
+  line-group
+  alt-file-group
+  alt-line-group
+  text-group
+  ignore-file-re
+
+  loc-hist     ;; ring of locations seen in the course of execution
+               ;; see realgud-lochist
+  starting-directory    ;; directory where initial debug command was issued.
+                        ;; this can be used to resolve relative file names
+  )
+(make-variable-buffer-local 'realgud-cmdbuf-info)
+(make-variable-buffer-local 'realgud-last-output-start)
+
+(defalias 'realgud-cmdbuf-info? 'realgud-cmdbuf-info-p)
+
+;; FIXME: figure out how to put in a loop.
+(realgud-struct-field-setter "realgud-cmdbuf-info" "bp-list")
+(realgud-struct-field-setter "realgud-cmdbuf-info" "bt-buf")
+(realgud-struct-field-setter "realgud-cmdbuf-info" "cmd-args")
+(realgud-struct-field-setter "realgud-cmdbuf-info" "last-input-end")
+(realgud-struct-field-setter "realgud-cmdbuf-info" "divert-output?")
+(realgud-struct-field-setter "realgud-cmdbuf-info" "frame-switch?")
+(realgud-struct-field-setter "realgud-cmdbuf-info" "in-srcbuf?")
+(realgud-struct-field-setter "realgud-cmdbuf-info" "no-record?")
+(realgud-struct-field-setter "realgud-cmdbuf-info" "prior-prompt-regexp")
+(realgud-struct-field-setter "realgud-cmdbuf-info" "src-shortkey?")
+(realgud-struct-field-setter "realgud-cmdbuf-info" "in-debugger?")
+(realgud-struct-field-setter "realgud-cmdbuf-info" "callback-loc-fn")
+(realgud-struct-field-setter "realgud-cmdbuf-info" "callback-eval-filter")
+(realgud-struct-field-setter "realgud-cmdbuf-info" "starting-directory")
+
+(defun realgud:cmdbuf-follow-buffer(event)
+  (interactive "e")
+  (let* ((pos (posn-point (event-end event)))
+        (buffer (get-text-property pos 'buffer)))
+    (find-file-other-window (buffer-file-name buffer))))
+
+(defun realgud:cmdbuf-buffers-describe (buffer-list)
+  (insert "** Source Buffers Seen\n")
+  (dolist (buffer buffer-list)
+    (insert "  - ")
+    (put-text-property
+     (insert-text-button
+      (buffer-name buffer)
+      'action 'realgud:cmdbuf-follow-buffer
+      'help-echo "mouse-2: visit this file")
+     (point)
+     'buffer buffer)
+    (insert "\n")
+    ))
+
+(defun realgud:cmdbuf-info-describe (&optional buffer)
+  "Display realgud-cmdcbuf-info fields of BUFFER.
+BUFFER is either a debugger command or source buffer. If BUFFER is not given
+the current buffer is used as a starting point.
+Information is put in an internal buffer called *Describe*."
+  (interactive "")
+  (setq buffer (realgud-get-cmdbuf buffer))
+  (if buffer
+      (with-current-buffer buffer
+       (let ((info realgud-cmdbuf-info)
+             (cmdbuf-name (buffer-name)))
+         (switch-to-buffer (get-buffer-create "*Describe*"))
+         (setq buffer-read-only 'nil)
+         (delete-region (point-min) (point-max))
+         (insert "#+STARTUP: showall\n")
+         ;;(insert "#+OPTIONS:    H:2 num:nil toc:t \\n:nil ::t |:t ^:nil -:t 
f:t *:t tex:t d:(HIDE) tags:not-in-toc\n")
+         (insert (format "#+TITLE: Debugger info for %s\n" cmdbuf-name))
+         (insert "** General Information\n")
+         (mapc 'insert
+               (list
+                (format "  - Debugger name     ::\t%s\n"
+                        (json-encode (realgud-cmdbuf-info-debugger-name info)))
+                (format "  - Command-line args ::\t%s\n"
+                        (json-encode (realgud-cmdbuf-info-cmd-args info)))
+                (format "  - Starting directory ::\t%s\n"
+                        (realgud-cmdbuf-info-starting-directory info))
+                (format "  - Selected window should contain source? :: %s\n"
+                        (realgud-cmdbuf-info-in-srcbuf? info))
+                (format "  - Last input end    ::\t%s\n"
+                        (realgud-cmdbuf-info-last-input-end info))
+                (format "  - Source should go into short-key mode? :: %s\n"
+                        (realgud-cmdbuf-info-src-shortkey? info))
+                (format "  - Breakpoint list   ::\t %s\n"
+                        (realgud-cmdbuf-info-bp-list info))
+                (format "  - Remap table for debugger commands ::\n\t%s\n"
+                        (json-encode (realgud-cmdbuf-info-cmd-hash info)))
+                (format "  - Backtrace buffer  ::\t%s\n"
+                        (realgud-cmdbuf-info-bt-buf info))
+                (format "  - In debugger?      ::\t%s\n"
+                        (realgud-cmdbuf-info-in-debugger? info))
+                ))
+         (insert "\n")
+         (realgud:cmdbuf-buffers-describe (realgud-cmdbuf-info-srcbuf-list 
info))
+         (insert "\n")
+         (realgud:loc-hist-describe (realgud-cmdbuf-info-loc-hist info))
+         (goto-char (point-min))
+         (realgud:info-mode)
+         )
+       )
+    (message "Buffer %s is not a debugger source or command buffer; nothing 
done."
+            (or buffer (current-buffer)))
+    )
+  )
+
+(defun realgud-cmdbuf? (&optional buffer)
+  "Return true if BUFFER is a debugger command buffer."
+  (with-current-buffer-safe
+   (or buffer (current-buffer))
+   (realgud-cmdbuf-info-set?)))
+
+(defun realgud-cmdbuf-info-set? ()
+  "Return true if realgud-cmdbuf-info is set."
+  (and (boundp 'realgud-cmdbuf-info)
+       realgud-cmdbuf-info
+       (realgud-cmdbuf-info? realgud-cmdbuf-info)))
+
+(defun realgud-cmdbuf-toggle-in-debugger? (&optional buffer)
+  "Toggle state of whether we think we are in the debugger or not"
+  (interactive "")
+  (setq buffer (realgud-get-cmdbuf buffer))
+  (if buffer
+      (with-current-buffer buffer
+       (realgud-cmdbuf-info-in-debugger?=
+        (not (realgud-sget 'cmdbuf-info 'in-debugger?)))
+       (message "Command buffer is in debugger?: %s\n"
+                (realgud-cmdbuf-info-in-debugger? realgud-cmdbuf-info))
+       (realgud-cmdbuf-mode-line-update)
+       )
+    (message "Buffer %s is not a debugger buffer; nothing done."
+            (or buffer (current-buffer)))
+    )
+  )
+
+(defun realgud-cmdbuf-stay-in-source-toggle (&optional buffer)
+  "Toggle state of whether we should stay in source code or not"
+  (interactive "")
+  (setq buffer (realgud-get-cmdbuf buffer))
+  (if buffer
+      (with-current-buffer buffer
+       (realgud-cmdbuf-info-in-srcbuf?=
+        (not (realgud-sget 'cmdbuf-info 'in-srcbuf?)))
+       (message "Selected window should contain source?: %s\n"
+                (realgud-cmdbuf-info-in-srcbuf? realgud-cmdbuf-info))
+       )
+    (message "Buffer %s is not a debugger buffer; nothing done."
+            (or buffer (current-buffer)))
+    )
+  )
+
+(defun realgud-cmdbuf-add-srcbuf(srcbuf &optional cmdbuf)
+  "Add SRCBUF to srcbuf-list field of INFO unless it is already included."
+  (setq cmdbuf (or cmdbuf (current-buffer)))
+  (if (realgud-cmdbuf? cmdbuf)
+      (with-current-buffer-safe cmdbuf
+       (unless (memq srcbuf (realgud-cmdbuf-info-srcbuf-list 
realgud-cmdbuf-info))
+         (setf (realgud-cmdbuf-info-srcbuf-list realgud-cmdbuf-info)
+               (cons srcbuf (realgud-cmdbuf-info-srcbuf-list 
realgud-cmdbuf-info))))
+       )
+    )
+  )
+
+(defun realgud-cmdbuf-set-shortkey(&optional cmdbuf unset)
+  (interactive "")
+  (setq cmdbuf (or cmdbuf (current-buffer)))
+  (if (realgud-cmdbuf? cmdbuf)
+      (with-current-buffer-safe cmdbuf
+       (setf (realgud-cmdbuf-info-src-shortkey? realgud-cmdbuf-info) (not 
unset))
+       (message "Set source to shortkey is now %s" (not unset))
+       ))
+  )
+
+(defun realgud-cmdbuf-command-string(cmd-buffer)
+  "Get the command string invocation for this command buffer"
+    (cond
+     ((realgud-cmdbuf? cmd-buffer)
+      (with-current-buffer cmd-buffer
+       (let*
+           ((cmd-args (realgud-sget 'cmdbuf-info 'cmd-args))
+            (result (car cmd-args)))
+         (and cmd-args
+              (reduce (lambda(result x)
+                        (setq result (concat result " " x)))
+                      cmd-args)))))
+     (t nil)))
+
+;; FIXME cmd-hash should not be optional. And while I am at it, remove
+;; parameters loc-regexp, file-group, and line-group which can be found
+;; inside pat-hash
+;;
+;; To do this however we need to fix up the caller
+;; realgud:track-set-debugger by changing realgud-pat-hash to store a hash
+;; rather than the loc, file, and line fields; those fields then get
+;; removed.
+
+(defun realgud-cmdbuf-init
+    (cmd-buf debugger-name regexp-hash &optional cmd-hash base-variable-name
+            starting-directory)
+  "Initialize CMD-BUF for a working with a debugger.
+DEBUGGER-NAME is the name of the debugger; REGEXP-HASH are debugger-specific
+values set in the debugger's init.el."
+  (with-current-buffer-safe cmd-buf
+    (let ((realgud-loc-pat (gethash "loc" regexp-hash))
+         (font-lock-keywords)
+         )
+      (setq realgud-cmdbuf-info
+           (make-realgud-cmdbuf-info
+            :in-srcbuf? nil
+            :debugger-name debugger-name
+             :base-variable-name (or base-variable-name debugger-name)
+            :loc-regexp (realgud-sget 'loc-pat 'regexp)
+            :file-group (realgud-sget 'loc-pat 'file-group)
+            :line-group (realgud-sget 'loc-pat 'line-group)
+            :alt-file-group (realgud-sget 'loc-pat 'alt-file-group)
+            :alt-line-group (realgud-sget 'loc-pat 'alt-line-group)
+            :text-group (realgud-sget 'loc-pat 'text-group)
+            :ignore-file-re (realgud-sget 'loc-pat 'ignore-file-re)
+            :loc-hist (make-realgud-loc-hist)
+            :regexp-hash regexp-hash
+            :bt-buf nil
+            :last-input-end (point-max)
+            :cmd-hash cmd-hash
+            :src-shortkey? t
+            :in-debugger? nil
+            :callback-loc-fn (gethash "loc-callback-fn" regexp-hash)
+            :callback-eval-filter (gethash "callback-eval-filter"
+                                           regexp-hash)
+            ))
+      (setq font-lock-keywords (realgud-cmdbuf-pat "font-lock-keywords"))
+      (if font-lock-keywords
+         (set (make-local-variable 'font-lock-defaults)
+              (list font-lock-keywords)))
+      )
+
+    (put 'realgud-cmdbuf-info 'variable-documentation
+        "Debugger object for a process buffer."))
+  )
+
+(defun realgud-cmdbuf-debugger-name (&optional cmd-buf)
+  "Return the debugger name recorded in the debugger command-process buffer."
+  (with-current-buffer-safe (or cmd-buf (current-buffer))
+    (if (realgud-cmdbuf?)
+       (realgud-sget 'cmdbuf-info 'debugger-name)
+      nil))
+  )
+
+(defun realgud-cmdbuf-pat(key)
+  "Extract regexp stored under KEY in a realgud-cmdbuf via realgud-cmdbuf-info"
+  (if (realgud-cmdbuf?)
+      (let*
+         ((debugger-name (realgud-cmdbuf-debugger-name))
+          (regexp-hash (gethash debugger-name realgud-pat-hash))
+          (loc-pat (gethash key regexp-hash)))
+       loc-pat)
+    nil))
+
+(defun realgud-cmdbuf-loc-hist(cmd-buf)
+  "Return the history ring of locations that a debugger
+command-process buffer has stored."
+  (with-current-buffer-safe cmd-buf
+    (realgud-sget 'cmdbuf-info 'loc-hist))
+)
+
+(defun realgud-cmdbuf-src-marker(cmd-buf)
+  "Return a marker to current source location stored in the history ring."
+  (with-current-buffer cmd-buf
+    (lexical-let* ((loc (realgud-loc-hist-item (realgud-cmdbuf-loc-hist 
cmd-buf))))
+      (and loc (realgud-loc-marker loc)))))
+
+(defun realgud-cmdbuf-mode-line-update (&optional opt-cmdbuf)
+  "Force update of command buffer to include process status"
+  (let ((cmdbuf (realgud-get-cmdbuf opt-cmdbuf))
+       (debug-status)
+       (status)
+       (cmd-process)
+       )
+    (if (and cmdbuf (buffer-name cmdbuf))
+       (with-current-buffer cmdbuf
+         (setq cmd-process (get-buffer-process cmdbuf))
+         (setq debug-status
+               (if (realgud-sget 'cmdbuf-info 'in-debugger?)
+                   " debugger"
+                 ""))
+         (setq status
+               (if cmd-process
+                   (list (propertize
+                          (format ":%s%s"
+                                  (process-status cmd-process) debug-status)
+                          'face 'debugger-running))
+                 (list (propertize ":not running" 'face
+                       'debugger-not-running))
+                 ))
+         (setq mode-line-process status)
+         ;; Force mode line redisplay soon.
+         (force-mode-line-update))
+      ))
+  )
+
+
+(provide-me "realgud-buffer-")
diff --git a/packages/realgud/realgud/common/buffer/helper.el 
b/packages/realgud/realgud/common/buffer/helper.el
new file mode 100644
index 0000000..97e73da
--- /dev/null
+++ b/packages/realgud/realgud/common/buffer/helper.el
@@ -0,0 +1,181 @@
+; Copyright (C) 2010, 2014 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+(require 'load-relative)
+(require-relative-list '("../fringe" "../helper" "../lochist")
+                      "realgud-")
+(require-relative-list '("command" "source" "backtrace") "realgud-buffer-")
+
+(declare-function realgud-backtrace?        'realgud-buffer-backtace)
+(declare-function realgud-cmdbuf?           'realgud-buffer-command)
+(declare-function realgud:loc-hist-describe 'realgud-lochist)
+(declare-function realgud-loc-hist-item     'realgud-lochist)
+(declare-function realgud-srcbuf?           'realgud-buffer-command)
+(declare-function buffer-killed?            'realgud-helper)
+
+(defvar realgud-cmdbuf-info)
+
+(defun realgud-get-cmdbuf-from-backtrace ( &optional opt-buffer)
+  "Return the command buffer associated with source
+OPT-BUFFER or if that is ommited `current-buffer' which is
+assumed to be a source-code buffer."
+  (let ((buffer (or opt-buffer (current-buffer))))
+    (if (realgud-backtrace? buffer)
+       (with-current-buffer-safe buffer
+         (realgud-sget 'backtrace-info 'cmdbuf))
+      nil)))
+
+(defun realgud-get-cmdbuf-from-srcbuf ( &optional opt-buffer)
+  "Return the command buffer associated with source
+OPT-BUFFER or if that is ommited `current-buffer' which is
+assumed to be a source-code buffer."
+  (let ((buffer (or opt-buffer (current-buffer))))
+    (if (realgud-srcbuf? buffer)
+       (with-current-buffer-safe buffer
+         (realgud-sget 'srcbuf-info 'cmdproc))
+      nil)))
+
+(defun realgud-get-srcbuf-from-cmdbuf ( &optional opt-buffer opt-loc)
+  "Return the source-code buffer associated with command
+OPT-BUFFER or if that is ommited `current-buffer' which is
+assumed to be a process-command buffer."
+  (let ((buffer (or opt-buffer (current-buffer))))
+    (if (realgud-cmdbuf? buffer)
+       (with-current-buffer-safe buffer
+         (let ((loc
+                (or opt-loc
+                    (realgud-loc-hist-item
+                     (realgud-cmdbuf-info-loc-hist realgud-cmdbuf-info)))))
+           (if loc
+               (marker-buffer (realgud-loc-marker loc))
+             nil)
+           ))
+      nil)))
+
+(defun realgud-get-srcbuf( &optional opt-buffer opt-loc)
+  "Return source-code buffer associated with OPT-BUFFER or
+`current-buffer' if that is omitted. nil is returned if we don't
+find anything. If we started out with a buffer that is set up to
+be a source-code buffer we will use that even though it might not
+be the source code buffer for the frame that the debugger is
+using. See also `realgud-get-current-srcbuf'."
+
+  (let ((buffer (or opt-buffer (current-buffer))))
+    (with-current-buffer-safe buffer
+      (cond
+       ;; Perhaps buffer is a source source-code buffer?
+       ((realgud-srcbuf? buffer) buffer)
+       ;; Perhaps buffer is a process-command buffer.
+       ((realgud-cmdbuf? buffer)
+       (realgud-get-srcbuf-from-cmdbuf buffer opt-loc))
+       (t nil)))))
+
+(defun realgud-get-current-srcbuf( &optional opt-buffer)
+  "Return the source-code buffer associated with OPT-BUFFER
+or `current-buffer' if that is omitted. nil is returned
+if we don't find anything."
+
+  (let ((buffer (or opt-buffer (current-buffer))))
+    (with-current-buffer-safe buffer
+      (let ((cmdbuf
+            (cond
+             ((realgud-srcbuf? buffer)
+              (realgud-get-cmdbuf-from-srcbuf buffer))
+             ((realgud-cmdbuf? buffer)
+              buffer)
+             (t nil))))
+       (if cmdbuf
+           (realgud-get-srcbuf-from-cmdbuf cmdbuf)
+         nil)))))
+
+(defun realgud-get-cmdbuf( &optional opt-buffer)
+  "Return the command buffer associated with OPT-BUFFER
+or `current-buffer' if that is omitted. nil is returned
+if we don't find anything."
+
+  (let ((buffer (or opt-buffer (current-buffer))))
+    (with-current-buffer-safe buffer
+      (cond
+       ;; Perhaps buffer is a process-command buffer?
+       ((realgud-cmdbuf? buffer) buffer)
+       ;; Perhaps buffer is a source-code buffer?
+       ((realgud-srcbuf? buffer)
+       (realgud-get-cmdbuf-from-srcbuf buffer))
+       ;; Perhaps buffer is a backtrace buffer?
+       ((realgud-backtrace? buffer)
+       (realgud-get-cmdbuf-from-backtrace buffer))
+       (t nil)))))
+
+(defun realgud-get-backtrace-buf( &optional opt-buffer)
+  "Return the backtrace buffer associated with
+OPT-BUFFER or if that is ommited `current-buffer'."
+  (let* ((buffer (or opt-buffer (current-buffer)))
+        (cmdbuf (realgud-get-cmdbuf buffer)))
+    (with-current-buffer-safe cmdbuf
+      (realgud-sget 'cmdbuf-info 'bt-buf)
+      ))
+  )
+
+(defun realgud-get-process (&optional opt-buffer)
+  "Return the process buffer associated with OPT-BUFFER or
+  `current-buffer' if that is omitted. nil is returned if
+we don't find anything."
+  (let* ((buffer (or opt-buffer (current-buffer)))
+        (cmdbuf (realgud-get-cmdbuf buffer)))
+    (if cmdbuf
+       (get-buffer-process cmdbuf)
+      nil)
+    )
+)
+
+(defun realgud:srcbuf-info-describe (&optional buffer)
+  "Provide descriptive information of the buffer-local variable
+`realgud-srcbuf-info', a defstruct. BUFFER if given is the buffer to
+use to get the information from.
+"
+  (interactive "")
+  (setq buffer (realgud-get-srcbuf buffer))
+  (if buffer
+      (with-current-buffer buffer
+       (let ((info realgud-srcbuf-info)
+             (srcbuf-name (buffer-name))
+             (a1 realgud-overlay-arrow1)
+             (a2 realgud-overlay-arrow2)
+             (a3 realgud-overlay-arrow3)
+             )
+         (switch-to-buffer (get-buffer-create "*Describe*"))
+         (delete-region (point-min) (point-max))
+         (mapc 'insert
+               (list
+                (format "srcbuf-info for %s\n" srcbuf-name)
+                (format "Was previously read only?: %s\n"
+                        (realgud-srcbuf-info-was-read-only? info))
+                (format "Command Process buffer: %s\n"
+                        (realgud-srcbuf-info-cmdproc info))
+
+                ;; FIXME This info isn't part of the src info structure.
+                (format "Overlay arrow 1: %s\n" a1)
+                (format "Overlay arrow 2: %s\n" a2)
+                (format "Overlay arrow 3: %s\n" a3)
+                (format "Location history:\n")
+                ))
+         (realgud:loc-hist-describe  (realgud-srcbuf-info-loc-hist info))
+         )
+       )
+    (message "Buffer %s is not a debugger source buffer; nothing done."
+            (or buffer (current-buffer)))
+    )
+  )
+
+(provide-me "realgud-buffer-")
diff --git a/packages/realgud/realgud/common/buffer/info.el 
b/packages/realgud/realgud/common/buffer/info.el
new file mode 100644
index 0000000..246f302
--- /dev/null
+++ b/packages/realgud/realgud/common/buffer/info.el
@@ -0,0 +1,64 @@
+;; Copyright (C) 2015-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/>.
+;;; process-command buffer things
+
+;;; A mode based off of org mode to show debugger information
+
+(eval-when-compile (require 'cl-lib))
+(require 'org)
+
+(require 'load-relative)
+
+(cl-defstruct realgud-backtrace-info
+  "debugger object/structure specific to debugger info."
+  (cmdbuf    nil)  ;; buffer of the associated debugger process
+)
+
+;; Can't load because this causes a cyclic dependency on
+;; buffer/commands via cmd and buffer/commands uses us.
+;; (require-relative-list  '("menu") "realgud-")
+
+;; FIXME: full definition is in menu.
+(defvar realgud:info-mode-map)
+
+(defcustom realgud:info-mode-hook '()
+  "Hook for customizing realgud info mode."
+  :type 'hook
+  :group 'realgud)
+
+
+(define-derived-mode realgud:info-mode org-mode "Debugger Info"
+  "Major mode for interacting realgud debugger information."
+  (use-local-map realgud:info-mode-map)
+  (setq buffer-read-only t)
+  )
+
+;; FIXME:
+;; (defvar realgud:info-mode-map
+;;   (realgud-populate-debugger-menu
+;;           (make-sparse-keymap "Debugger")))
+
+;; (define-key realgud:info-mode-map [menu-bar debugger]
+;;   (cons "Debugger" (realgud-populate-debugger-menu
+;;           (make-sparse-keymap "Debugger"))))
+
+;; (define-key realgud:info-mode-map [menu-bar debugger backtrace]
+;;   '("Backtrace" . realgud:window-bt))
+;;(define-key realgud:info-mode-map  [menu-bar debugger command]
+;;  '("Go to Command Buffer" . realgud-window-cmd-undisturb-src))
+;;(define-key realgud:info-mode-map [menu-bar debugger source]
+;;  '("Go to Source Buffer" . realgud-window-src-undisturb-cmd))
+
+(provide-me "realgud-buffer-")
diff --git a/packages/realgud/realgud/common/buffer/source.el 
b/packages/realgud/realgud/common/buffer/source.el
new file mode 100644
index 0000000..fc6c0cc
--- /dev/null
+++ b/packages/realgud/realgud/common/buffer/source.el
@@ -0,0 +1,208 @@
+;;; Copyright (C) 2010, 2012-2015 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;;; source-code buffer code
+(eval-when-compile
+  (defvar realgud-srcbuf-info) ;; is buffer local
+  (defvar realgud-cmdbuf-info) ;; in the cmdbuf, this is buffer local
+  )
+
+(require 'cl-lib)
+(require 'load-relative)
+(require-relative-list '("../helper" "../key") "realgud-")
+
+(declare-function realgud-populate-common-keys 'realgud-menu)
+(declare-function buffer-killed?               'realgud-helper)
+(declare-function buffer-loc-line-number?      'realgud-loc)
+(declare-function realgud-cmdbuf-add-srcbuf    'realgud-cmdbuf)
+(declare-function realgud-cmdbuf-info-bp-list  'realgud-cmdbuf)
+(declare-function realgud-cmdbuf?              'realgud-cmdbuf)
+(declare-function realgud-loc-marker           'realgud-loc)
+(declare-function realgud-loc-line-number      'realgud-loc)
+(declare-function realgud-loc-num              'realgud-loc)
+(declare-function make-realgud-loc-hist        'realgud-lochist)
+(declare-function realgud-get-srcbuf           'helper)
+(declare-function realgud-short-key-mode-setup 'realgud-shortkey)
+
+(defstruct realgud-srcbuf-info
+  "debugger object/structure specific to a (top-level) source program
+to be debugged."
+  cmdproc        ;; buffer of the associated debugger process
+  cur-pos        ;; If not nil, the debugger thinks we are currently
+                ;; positioned at a corresponding place in the
+                ;; program.
+  short-key?     ;; Was the source buffer previously in short-key
+                ;; mode? Used to deterimine when short-key mode
+                ;; changes state in a source buffer, so we need to
+                ;; perform on/off actions.
+  was-read-only? ;; Was buffer initially read only? (i.e. the original
+                ;; value of the buffer's buffer-read-only
+                ;; variable. Short-key-mode may change the read-only
+                ;; state, so we need restore this value when leaving
+                ;; short-key mode
+  prev-local-map ;; Local map before enabling short-key-mode
+
+  loc-hist       ;; ring of locations seen
+
+  ;; FILL IN THE FUTURE
+  ;;(brkpt-alist '())  ;; alist of breakpoints the debugger has referring
+                       ;; to this buffer. Each item is (brkpt-name . marker)
+  ;;
+)
+
+
+(defalias 'realgud-srcbuf-info? 'realgud-srcbuf-p)
+
+;; FIXME: figure out how to put in a loop.
+(realgud-struct-field-setter "realgud-srcbuf-info" "cmdproc")
+(realgud-struct-field-setter "realgud-srcbuf-info" "short-key?")
+(realgud-struct-field-setter "realgud-srcbuf-info" "was-read-only?")
+(realgud-struct-field-setter "realgud-srcbuf-info" "prev-local-map")
+
+(defun realgud-srcbuf-info-set? ()
+  "Return non-nil if `realgud-srcbuf-info' is set."
+  (and (bound-and-true-p realgud-srcbuf-info)
+       (realgud-srcbuf-info? realgud-srcbuf-info)))
+
+(defun realgud-srcbuf? (&optional buffer)
+  "Return non-nil if BUFFER is a debugger source buffer."
+  (with-current-buffer-safe (or buffer (current-buffer))
+    (and (realgud-srcbuf-info-set?)
+        (not (buffer-killed? (realgud-sget 'srcbuf-info 'cmdproc)))
+   )))
+
+(defun realgud--read-cmd-buf (prompt)
+  "Read a command buffer, prompting with PROMPT."
+  (let* ((cmd-bufs (cl-remove-if-not #'realgud-cmdbuf? (buffer-list)))
+         (buf-names (mapcar #'buffer-name cmd-bufs))
+         (default (car buf-names)))
+    (when buf-names
+      ;; Use completing-read instead of read-buffer: annoyingly, ido's
+      ;; read-buffer ignores predicates.
+      (setq prompt (format "%s (default: %s): " prompt default))
+      (get-buffer (completing-read prompt buf-names nil t nil nil default)))))
+
+(defun realgud--ensure-attached (&optional src-buf)
+  "Try to attach SRC-BUF to a command buffer.
+If SRC-BUF is already attached, do nothing.  Otherwise, prompt
+the user for a command buffer to associate SRC-BUF to.  Returns
+non-nil if association was successful.  SRC-BUF defaults to
+current buffer."
+  (setq src-buf (or src-buf (current-buffer)))
+  (unless (realgud-srcbuf? src-buf)
+    (let ((cmd-buf (realgud--read-cmd-buf "Command buffer to attach to")))
+      (if cmd-buf
+          (realgud-srcbuf-init src-buf cmd-buf)
+        (message "No debugger process found to attach %s to" (buffer-name)))))
+  (realgud-srcbuf? src-buf))
+
+(defun realgud-srcbuf-debugger-name (&optional src-buf)
+  "Return the debugger name recorded in the debugger command-process buffer."
+  (with-current-buffer-safe (or src-buf (current-buffer))
+    (realgud-sget 'srcbuf-info 'debugger-name))
+)
+
+(defun realgud-srcbuf-loc-hist(src-buf)
+  "Return the history ring of locations that a debugger process has stored."
+  (with-current-buffer-safe src-buf
+    (realgud-sget 'srcbuf-info 'loc-hist))
+)
+
+(declare-function fn-p-to-fn?-alias(sym))
+(fn-p-to-fn?-alias 'realgud-srcbuf-info-p)
+(declare-function realgud-srcbuf-info?(var))
+(declare-function realgud-cmdbuf-info-name(cmdbuf-info))
+
+;; FIXME: support a list of cmdprocs's since we want to allow
+;; a source buffer to potentially participate in several debuggers
+;; which might be active.
+(make-variable-buffer-local 'realgud-srcbuf-info)
+
+(defun realgud-srcbuf-init
+  (src-buffer cmdproc-buffer)
+  "Initialize SRC-BUFFER as a source-code buffer for a debugger.
+CMDPROC-BUFFER is the process-command buffer containing the
+debugger."
+  (with-current-buffer cmdproc-buffer
+    (set-buffer src-buffer)
+    (set (make-local-variable 'realgud-srcbuf-info)
+        (make-realgud-srcbuf-info
+         :cmdproc cmdproc-buffer
+         :loc-hist (make-realgud-loc-hist)))
+    (put 'realgud-srcbuf-info 'variable-documentation
+        "Debugger information for a buffer containing source code.")))
+
+(defun realgud-srcbuf-init-or-update (src-buffer cmdproc-buffer)
+  "Call `realgud-srcbuf-init' for SRC-BUFFER update `realgud-srcbuf-info' 
variables
+in it with those from CMDPROC-BUFFER"
+  (realgud-cmdbuf-add-srcbuf src-buffer cmdproc-buffer)
+  (with-current-buffer-safe src-buffer
+    (realgud-populate-common-keys
+     ;; use-local-map returns nil so e have to call (current-local-map)
+     ;; again in this case.
+     (or (current-local-map) (use-local-map (make-sparse-keymap))
+        (current-local-map)))
+    (if (realgud-srcbuf-info? realgud-srcbuf-info)
+       (realgud-srcbuf-info-cmdproc= cmdproc-buffer)
+      (realgud-srcbuf-init src-buffer cmdproc-buffer))))
+
+(defun realgud:cmdbuf-associate ()
+  "Associate a command buffer with the current (source-code) buffer."
+  ;; realgud-short-key-mode-setup will attempt to associate if needed.
+  (realgud-short-key-mode-setup t))
+
+(defun realgud-srcbuf-bp-list(&optional buffer)
+  "Return a list of breakpoint loc structures that reside in
+BUFFER which should be an initialized source buffer."
+  (let ((src-buffer (realgud-get-srcbuf buffer)))
+    (if src-buffer
+       (with-current-buffer src-buffer
+       (let* ((info realgud-srcbuf-info)
+              (cmdbuf (realgud-srcbuf-info-cmdproc info)))
+         (with-current-buffer cmdbuf
+           (let ((bp-list
+                  (realgud-cmdbuf-info-bp-list realgud-cmdbuf-info)))
+             (delq nil
+                   (mapcar (lambda (loc)
+                             (cond ((eq src-buffer
+                                        (marker-buffer (realgud-loc-marker 
loc)))
+                                    loc)
+                                   (nil)))
+                           bp-list))
+             )))))))
+
+(defun realgud-get-bpnum-from-line-num(line-num &optional buffer)
+  "Find a breakpoint number associated with LINE-NUM in source code BUFFER.
+If none exists return nil"
+  (let ((src-buffer (realgud-get-srcbuf buffer))
+       (bp-num nil)
+       (bp)
+       (bp-list)
+       )
+    (if src-buffer
+       (progn
+         (setq bp-list (realgud-srcbuf-bp-list src-buffer))
+         (while (and (not bp-num) bp-list)
+           (setq bp (car bp-list))
+           (setq bp-list (cdr bp-list))
+           (if (eq line-num (realgud-loc-line-number bp))
+               (setq bp-num (realgud-loc-num bp)))
+           ))
+      )
+    bp-num))
+
+(provide-me "realgud-buffer-")
diff --git a/packages/realgud/realgud/common/cmds.el 
b/packages/realgud/realgud/common/cmds.el
new file mode 100644
index 0000000..8f02555
--- /dev/null
+++ b/packages/realgud/realgud/common/cmds.el
@@ -0,0 +1,429 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+(require 'load-relative)
+(require-relative-list  '("send" "core") "realgud-")
+(require-relative-list  '("buffer/command") "realgud-buffer-")
+(require-relative-list  '("buffer/source") "realgud-buffer-")
+
+(declare-function buffer-killed? 'helper)
+(declare-function realgud-cmdbuf-info-in-srcbuf?=   'realgud-buffer-command)
+(declare-function realgud-cmdbuf?      'realgud-buffer-command)
+(declare-function realgud-command      'realgud-send)
+(declare-function realgud-get-cmdbuf   'realgud-buffer-helper)
+(declare-function realgud-get-command  'realgud-buffer-command)
+(declare-function realgud-get-bpnum-from-line-num 'realgud-buffer-source)
+
+(declare-function realgud:terminate 'realgud-core)
+(declare-function realgud:terminate-srcbuf 'realdgud-core)
+
+(defcustom realgud-safe-mode t
+  "Confirm certain commands before running them.
+Similar to GDB's “set confirm”."
+  :type 'boolean
+  :group 'realgud)
+
+(defun realgud:prompt-if-safe-mode(message)
+  "Ask use to confirm current command if in safe mode.
+Use MESSAGE plus a space as the prompt string.  Do not confirm
+when command was run from a menu."
+  (if (and realgud-safe-mode
+           last-nonmenu-event
+           (not (equal last-nonmenu-event '(tool-bar))))
+      (when (y-or-n-p (concat message " "))
+        (run-with-timer
+         0 nil #'message
+         "Customize `realgud-safe-mode' to disable confirmation prompts.")
+        t)
+    t))
+
+(defun realgud:cmd--line-number-from-prefix-arg ()
+  "Guess or read a line number based on prefix arg.
+Returns (nil) for current line, and a list whose car is the line
+number otherwise."
+  (cond
+   ((numberp current-prefix-arg)
+    current-prefix-arg)
+   ((consp current-prefix-arg)
+    (let* ((min-line (save-excursion
+                       (goto-char (point-min))
+                       (line-number-at-pos)))
+           (max-line (save-excursion
+                       (goto-char (point-max))
+                       (line-number-at-pos)))
+           (prompt (format "Line number (%d..%d)? " min-line max-line))
+           (picked-line 0))
+      (while (not (<= min-line picked-line max-line))
+        (setq picked-line (read-number prompt)))
+      (list picked-line)))))
+
+(defmacro realgud:cmd--with-line-override (line &rest body)
+  "Run BODY with %l format specifier bound to LINE.
+This is needed because going to LINE explicitly would interfere
+with other motion initiated by debugger messages."
+  (declare (indent 1)
+           (debug t))
+  (let ((line-var (make-symbol "--line--")))
+    `(let* ((,line-var ,line)
+            (realgud-expand-format-overrides
+             (cons (cons ?l (and ,line-var (number-to-string ,line-var)))
+                   realgud-expand-format-overrides)))
+       ,@body)))
+
+(defconst realgud-cmd:default-hash
+  (let ((hash (make-hash-table :test 'equal)))
+    (puthash "backtrace" "backtrace" hash)
+    (puthash "break" "break %X:%l" hash)
+    (puthash "clear" "clear %l" hash)
+    (puthash "continue" "continue" hash)
+    (puthash "delete" "delete %p" hash)
+    (puthash "disable" "disable %p" hash)
+    (puthash "down" "down %p" hash)
+    (puthash "enable" "enable %p" hash)
+    (puthash "eval" "eval %s" hash)
+    (puthash "finish" "finish" hash)
+    (puthash "frame" "frame %p" hash)
+    (puthash "jump" "jump %l" hash)
+    (puthash "kill" "kill" hash)
+    (puthash "next" "next %p" hash)
+    (puthash "repeat-last" "\n" hash)
+    (puthash "restart" "run" hash)
+    (puthash "shell" "shell" hash)
+    (puthash "step" "step %p" hash)
+    (puthash "until" "until" hash)
+    (puthash "up" "up %p" hash)
+    hash)
+  "Default hash of command name → debugger command.
+This is used as a fallback when the debugger-specific command
+hash does not specify a custom debugger command.")
+
+(defun realgud:cmd-run-command(arg cmd-name &optional
+                                   default-cmd-template no-record?
+                                   frame-switch? realgud-prompts?)
+  "Run debugger command CMD-NAME.
+If CMD-NAME isn't set in the command buffer's command hash, use
+DEFAULT-CMD-TEMPLATE and fall back to looking CMD-NAME up in
+`realgud:cmd-get-cmd-hash'."
+  (let* ((buffer (current-buffer))
+         (cmdbuf (realgud-get-cmdbuf))
+         (cmd-hash (with-current-buffer-safe cmdbuf
+                     (realgud-cmdbuf-info-cmd-hash realgud-cmdbuf-info)))
+         (cmd (or (and (hash-table-p cmd-hash)
+                       (gethash cmd-name cmd-hash))
+                  default-cmd-template
+                  (gethash cmd-name realgud-cmd:default-hash))))
+    (if (or (null cmd) (equal cmd "*not-implemented*"))
+       (message "Command %s is not implemented for this debugger" cmd-name)
+      (progn
+        ;; Set flag to know which buffer to jump back to
+        (with-current-buffer-safe cmdbuf
+          (realgud-cmdbuf-info-in-srcbuf?= (not (realgud-cmdbuf? buffer))))
+        ;; Run actual command
+       (realgud-command cmd arg no-record? frame-switch? realgud-prompts?)
+       ;; FIXME: Figure out how to update the position if the source
+       ;; buffer is displayed.
+       ;; (if frame-switch?
+       ;;      (let* ((src-buffer (realgud-get-srcbuf-from-cmdbuf cmdbuf))
+       ;;             (src-window (get-buffer-window src-buffer))
+       ;;             ))
+       ;;        (with-selected-window src-window
+       ;;          (message "recentering...")
+       ;;          (realgud-recenter-arrow)
+       ;;        ))
+        )
+      )
+    ))
+
+(defun realgud:cmd-remap (arg cmd-name default-cmd-template
+                              &optional key no-record? frame-switch?
+                              realgud-prompts?)
+  "Compatibility alias for `realgud:cmd-run-command'.
+ARG, CMD-NAME, DEFAULT-CMD-TEMPLATE are as in `realgud:cmd-run-command'.
+KEY is ignored.  NO-RECORD?, FRAME-SWITCH?, REALGUD-PROMPTS? are
+as in `realgud:cmd-run-command'."
+  (realgud:cmd-run-command arg cmd-name default-cmd-template
+                           no-record? frame-switch?
+                           realgud-prompts?))
+
+(make-obsolete 'realgud:cmd-remap 'realgud:cmd-run-command "1.3.1")
+
+(defun realgud:cmd-backtrace(arg)
+  "Show the current call stack."
+  (interactive "p")
+  (realgud:cmd-run-command arg "backtrace")
+  )
+
+(defun realgud:cmd-break (&optional line-number)
+  "Set a breakpoint at the current line.
+With prefix argument LINE-NUMBER, prompt for line number."
+  (interactive (realgud:cmd--line-number-from-prefix-arg))
+  (realgud:cmd--with-line-override line-number
+                                   (realgud:cmd-run-command line-number 
"break")))
+
+(defun realgud:cmd-clear(&optional line-number)
+  "Delete breakpoint at the current line.
+With prefix argument LINE-NUMBER, prompt for line number."
+  (interactive (realgud:cmd--line-number-from-prefix-arg))
+  (realgud:cmd--with-line-override line-number
+                                   (realgud:cmd-run-command line-number 
"clear")))
+
+(defun realgud:cmd-jump(&optional line-number)
+  "Jump to current line.
+With prefix argument LINE-NUMBER, prompt for line number."
+  (interactive (realgud:cmd--line-number-from-prefix-arg))
+  (realgud:cmd--with-line-override line-number
+    (realgud:cmd-run-command (line-number-at-pos) "jump")))
+
+(defun realgud:cmd-continue(&optional arg)
+    "Continue execution.
+With prefix argument ARG, prompt for argument to \"continue\"
+command.  In safe mode (or with prefix arg), confirm before
+running."
+    (interactive (when (consp current-prefix-arg)
+                   (list (read-string "Continue args: " nil nil nil t))))
+    (when (or arg (realgud:prompt-if-safe-mode
+                   "Continue to next breakpoint?"))
+      (realgud:cmd-run-command arg "continue")))
+
+(defun realgud:bpnum-on-current-line()
+  "Return number of one breakpoint on current line, if any.
+If none is found, return nil."
+  (realgud-get-bpnum-from-line-num (line-number-at-pos)))
+
+(defun realgud:bpnum-from-prefix-arg()
+  "Return number of one breakpoint on current line, if any.
+If none is found, or if `current-prefix-arg' is a cons (i.e. a
+C-u prefix arg), ask user for a breakpoint number.  If
+`current-prefix-arg' is a number (i.e. a numeric prefix arg),
+return it unmodified."
+  (let ((must-prompt (consp current-prefix-arg))
+        (current-bp (realgud:bpnum-on-current-line)))
+    (list
+     (if (numberp current-prefix-arg)
+         current-prefix-arg
+       (or (and (not must-prompt) current-bp)
+           (read-number "Breakpoint number: " current-bp))))))
+
+(defun realgud:cmd-delete(bpnum)
+    "Delete breakpoint by number.
+Interactively, find breakpoint on current line, if any.  With
+numeric prefix argument, delete breakpoint with that number
+instead.  With prefix argument (C-u), or when no breakpoint can
+be found on the current line, prompt for a breakpoint number."
+    (interactive (realgud:bpnum-from-prefix-arg))
+    (realgud:cmd-run-command bpnum "delete"))
+
+(defun realgud:cmd-disable(bpnum)
+    "Disable breakpoint BPNUM.
+Interactively, find breakpoint on current line, if any.  With
+numeric prefix argument, disable breakpoint with that number
+instead.  With prefix argument (C-u), or when no breakpoint can
+be found on the current line, prompt for a breakpoint number."
+    (interactive (realgud:bpnum-from-prefix-arg))
+    (realgud:cmd-run-command bpnum "disable"))
+
+(defun realgud:cmd-enable(bpnum)
+    "Enable breakpoint BPNUM.
+Interactively, find breakpoint on current line, if any.  With
+numeric prefix argument, enable breakpoint with that number
+instead.  With prefix argument (C-u), or when no breakpoint can
+be found on the current line, prompt for a breakpoint number."
+    (interactive (realgud:bpnum-from-prefix-arg))
+    (realgud:cmd-run-command bpnum "enable"))
+
+(defun realgud-cmds--add-remove-bp (pos)
+  "Add or delete breakpoint at POS."
+  (save-excursion
+    (goto-char pos)
+    (let ((existing-bp-num (realgud:bpnum-on-current-line)))
+      (if existing-bp-num
+          (realgud:cmd-delete existing-bp-num)
+        (realgud:cmd-break)))))
+
+(defun realgud-cmds--mouse-add-remove-bp (event)
+  "Add or delete breakpoint on line pointed to by EVENT.
+EVENT should be a mouse click on the left fringe or margin."
+  (interactive "e")
+  (let* ((posn (event-end event))
+         (pos (posn-point posn)))
+    (when (numberp pos)
+      (with-current-buffer (window-buffer (posn-window posn))
+        (realgud-cmds--add-remove-bp pos)))))
+
+(defun realgud:cmd-eval(arg)
+    "Evaluate an expression."
+    (interactive "MEval expesssion: ")
+    (realgud:cmd-run-command arg "eval")
+)
+
+(defun realgud:cmd-eval-region(start end)
+    "Evaluate current region."
+    (interactive "r")
+    (let ((text (buffer-substring-no-properties start end)))
+      (realgud:cmd-run-command text "eval")))
+
+(defun realgud:cmd-eval-dwim()
+  "Eval the current region if active; otherwise, prompt."
+  (interactive)
+  (call-interactively (if (region-active-p)
+                          #'realgud:cmd-eval-region
+                        #'realgud:cmd-eval)))
+
+(defun realgud:cmd-finish(&optional arg)
+    "Run until the completion of the current stack frame.
+
+This command is often referred to as 'step out' as opposed to
+'step over' or 'step into'."
+    (interactive "p")
+    (realgud:cmd-run-command arg "finish")
+)
+
+(defun realgud:cmd-frame(arg)
+    "Change the current frame number to the value of the numeric argument.
+If no argument specified use 0 or the most recent frame."
+    (interactive "p")
+    (realgud:cmd-run-command arg "frame" nil t t)
+)
+
+(defun realgud:cmd-kill()
+  "Kill debugger process."
+  (interactive)
+  (realgud:cmd-run-command nil "kill" nil nil nil t))
+
+(defun realgud:cmd-newer-frame(&optional arg)
+    "Move the current frame to a newer (more recent) frame.
+With a numeric argument move that many levels forward."
+    (interactive "p")
+    (realgud:cmd-run-command arg "down" nil t t)
+)
+
+(defun realgud:cmd-next(&optional count)
+    "Step one source line at current call level.
+
+With numeric argument COUNT, step that many times. This command is
+often referred to as `step through' as opposed to `step into' or
+`step out'.
+
+The definition of `next' is debugger specific, so see the
+documentation of your debugger for a more complete definition of
+what is getting stepped."
+    (interactive "p")
+    (realgud:cmd-run-command count "next"))
+
+(defun realgud:cmd-next-no-arg()
+  "Step one source line at current call level.
+
+The definition of 'next' is debugger specific so, see the
+debugger documentation for a more complete definition of what is
+getting stepped."
+    (interactive)
+    (realgud:cmd-next))
+
+(defun realgud:cmd-older-frame(&optional arg)
+  "Move the current frame to an older (less recent) frame.
+With a numeric argument move that many levels back."
+    (interactive "p")
+    (realgud:cmd-run-command arg "up" nil t t)
+)
+
+(defun realgud:cmd-repeat-last()
+  "Repeat the last command (or generally what <enter> does."
+  (interactive)
+  (realgud:cmd-run-command nil "repeat-last" nil t nil t))
+
+(defun realgud:cmd-restart()
+  "Restart execution."
+  (interactive)
+  (if (realgud:prompt-if-safe-mode
+                "Restart program?")
+      (realgud:cmd-run-command nil "restart" nil t nil t)))
+
+(defun realgud:cmd-shell()
+  "Drop to a shell."
+  (interactive)
+  (realgud:cmd-run-command nil "shell"))
+
+(defun realgud:cmd-step(&optional count)
+    "Step one source line.
+
+With a numeric prefix argument COUNT, step that many times.
+This command is often referred to as `step into' as opposed to
+`step over' or `step out'.
+
+The definition of `step' is debugger specific, so see the
+documentation of your debugger for a more complete definition of
+what is getting stepped."
+    (interactive "p")
+    (realgud:cmd-run-command count "step"))
+
+(defun realgud:cmd-step-no-arg()
+    "Step one source line.
+
+The definition of `step' is debugger specific, so see the
+documentation of your debugger for a more complete definition of
+what is getting stepped."
+    (interactive)
+    (realgud:cmd-step))
+
+(defun realgud:cmd-terminate ()
+  "Gently terminate source and command buffers without possibly
+issuing a command to the underlying debuger.  Use this if the
+underlying debugger has died or you want to get out of all
+shortkey modes in the source window and possibly restart
+debugging after editing source."
+  (interactive)
+  (realgud:terminate (current-buffer))
+)
+
+(defun realgud:cmd-until(&optional arg)
+    "Run until the completion of the current stack frame.
+
+Continue until the current line. In some cases this is really
+two commands - setting a temporary breakpoint on the line and
+continuing execution."
+    (interactive "p")
+    (realgud:cmd-run-command arg "until")
+)
+
+(defun realgud:cmd-quit (&optional arg)
+  "Gently terminate execution of the debugged program."
+  (interactive "p")
+  (if (realgud:prompt-if-safe-mode
+                "Quit debugger?")
+      (let ((buffer (current-buffer))
+           (cmdbuf (realgud-get-cmdbuf))
+           (cmd-hash)
+           (cmd)
+           )
+       (if cmdbuf
+           (progn
+             (with-current-buffer cmdbuf
+               (realgud-cmdbuf-info-in-srcbuf?= (not (realgud-cmdbuf? buffer)))
+               (setq cmd-hash (realgud-cmdbuf-info-cmd-hash 
realgud-cmdbuf-info))
+               (unless (and cmd-hash (setq cmd (gethash "quit" cmd-hash)))
+                 (setq cmd "quit"))
+               )
+          (realgud-command cmd arg t)
+         (if cmdbuf (realgud:terminate cmdbuf))
+         )
+         ;; else
+         (realgud:terminate-srcbuf buffer)
+         )
+       )
+    ))
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/core.el 
b/packages/realgud/realgud/common/core.el
new file mode 100644
index 0000000..d7dade7
--- /dev/null
+++ b/packages/realgud/realgud/common/core.el
@@ -0,0 +1,330 @@
+;; Copyright (C) 2010-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;; (require 'term)
+
+(if (< emacs-major-version 24)
+    (error
+     "You need at least Emacs 24 or greater to run this - you have version %d"
+     emacs-major-version))
+
+(require 'comint)
+(require 'load-relative)
+(require 'loc-changes)
+(require-relative-list '("fringe" "helper" "lang" "reset")
+                      "realgud-")
+(require-relative-list '("buffer/command" "buffer/source") "realgud-buffer-")
+
+(declare-function comint-exec  'comint)
+(declare-function comint-mode  'comint)
+(declare-function realgud-bp-remove-icons             'realgud-bp)
+(declare-function realgud:suggest-file-from-buffer    'realgud-lang)
+(declare-function realgud-cmdbuf-args=                'realgud-buffer-command)
+(declare-function realgud-cmdbuf-command-string       'realgud-buffer-command)
+(declare-function realgud-cmdbuf-debugger-name        'realgud-buffer-command)
+(declare-function realgud-cmdbuf-info-bp-list=        'realgud-buffer-command)
+(declare-function realgud-cmdbuf-info-in-debugger?=   'realgud-buffer-command)
+(declare-function realgud-cmdbuf-info-starting-directory= 
'realgud-buffer-command)
+(declare-function realgud-cmdbuf-mode-line-update     'realgud-buffer-command)
+(declare-function realgud-cmdbuf?                     'realgud-helper)
+(declare-function realgud-command-string              'realgud-buffer-command)
+(declare-function realgud-fringe-erase-history-arrows 'realgud-buffer-command)
+(declare-function realgud-get-cmdbuf                  'realgud-helper)
+(declare-function realgud:reset                       'realgud-reset)
+(declare-function realgud-short-key-mode-setup        'realgud-shortkey)
+(declare-function realgud-srcbuf-command-string       'realgud-buffer-source)
+(declare-function realgud-srcbuf-debugger-name        'realgud-buffer-source)
+(declare-function realgud-srcbuf-init                 'realgud-buffer-source)
+(declare-function realgud-srcbuf?                     'realgud-buffer-source)
+(declare-function realgud-suggest-lang-file           'realgud-lang)
+
+(defvar realgud-srcbuf-info)
+(defvar starting-directory)
+
+(defun realgud:expand-file-name-if-exists (filename)
+  "Return FILENAME expanded using `expand-file-name' if that name exists.
+Otherwise, just return FILENAME."
+  (let* ((expanded-filename (expand-file-name filename))
+        (result (cond ((file-exists-p expanded-filename)
+                         expanded-filename)
+                        ('t filename))))
+    result)
+)
+
+(defun realgud-suggest-invocation
+  (debugger-name _minibuffer-history lang-str lang-ext-regexp
+                &optional last-resort)
+  "Suggest a debugger command invocation. If the current buffer
+is a source file or process buffer previously set, then use the
+value of that the command invocations found by buffer-local
+variables.  Otherwise, we try to find a suitable program file
+using LANG-STR and LANG-EXT-REGEXP."
+  (let* ((buf (current-buffer))
+        (filename)
+        (cmd-str-cmdbuf (realgud-cmdbuf-command-string buf))
+        )
+    (cond
+     ((and cmd-str-cmdbuf (equal debugger-name (realgud-cmdbuf-debugger-name 
buf)))
+      cmd-str-cmdbuf)
+     ((setq filename (realgud:suggest-file-from-buffer lang-str))
+      (concat debugger-name " " (shell-quote-argument filename)))
+     (t (concat debugger-name " "
+                (shell-quote-argument
+                 (realgud-suggest-lang-file lang-str lang-ext-regexp 
last-resort))))
+     )))
+
+(defun realgud-query-cmdline
+  (suggest-invocation-fn
+   minibuffer-local-map
+   minibuffer-history
+   &optional opt-debugger)
+  "Prompt for a debugger command invocation to run.
+Analogous to `gud-query-cmdline'.
+
+If you happen to be in a debugger process buffer, the last command invocation
+for that first one suggested. Failing that, some amount of guessing is done
+to find a suitable file via SUGGEST-INVOCATION-FN.
+
+We also set filename completion and use a history of the prior
+dbgr invocations "
+  (let ((debugger (or opt-debugger
+                  (realgud-sget 'srcbuf-info 'debugger-name))))
+    (read-shell-command
+     (format "Run %s (like this): " debugger)  ;; prompt string
+     (funcall suggest-invocation-fn debugger)  ;; initial value
+     minibuffer-history                        ;; history variable
+     )))
+
+(defun realgud-parse-command-arg (args two-args opt-two-args)
+  "Return a cons node where the car is a list containing the
+entire first option and the cdr is the remaining arguments from ARGS.
+
+We determine if an option has length one or two using the lists
+TWO-ARGS and OPT-TWO-ARGS. Both of these are list of 'options',
+that is strings without the leading dash. TWO-ARGS takes a
+mandatory additional argument. OPT-TWO-ARGS might take two
+arguments. The rule for an optional argument that we use is if
+the next parameter starts with a dash ('-'), it is not part of
+the preceeding parameter when that parameter is optional.
+
+NOTE: we don't check whether the first arguments of ARGS is an
+option by testing to see if it starts say with a dash. So on
+return the first argument is always removed.
+"
+  (let ((arg (car args))
+       (d-two-args (mapcar (lambda(x) (concat "-" x)) two-args))
+       (d-opt-two-args (mapcar (lambda(x) (concat "-" x)) opt-two-args))
+       (remaining (cdr args)))
+    (cond
+     ((member arg d-two-args)
+      (if (not remaining)
+           (progn
+             (message "Expecting an argument after %s. Continuing anyway."
+                      arg)
+             (cons (list arg) (list remaining)))
+       (cons (list arg (car remaining)) (list (cdr remaining)))))
+     ((member arg d-opt-two-args)
+      (if (and remaining (not (string-match "^-" (car remaining))))
+         (cons (list arg (car remaining)) (list (cdr remaining)))
+       (cons (list arg) (list remaining))))
+     (t (cons (list arg) (list remaining))))))
+
+(defun realgud:terminate-srcbuf (&optional srcbuf)
+  "Resets source buffer."
+  (interactive "bsource buffer: ")
+  (if (stringp srcbuf) (setq srcbuf (get-buffer srcbuf)))
+  (with-current-buffer srcbuf
+    (realgud-fringe-erase-history-arrows)
+    (realgud-bp-remove-icons (point-min) (point-max))
+    (when (realgud-srcbuf?)
+      (realgud-short-key-mode-setup nil)
+      (redisplay)
+      )
+    (loc-changes-clear-buffer)
+    ))
+
+(defun realgud:terminate (&optional buf)
+  "Resets state in all buffers associated with source or command
+buffer BUF) This does things like remove fringe arrows breakpoint
+icons and resets short-key mode."
+  (interactive "bbuffer: ")
+  (if (stringp buf) (setq buf (get-buffer buf)))
+  (let ((cmdbuf (realgud-get-cmdbuf buf)))
+    (if cmdbuf
+       (with-current-buffer cmdbuf
+         (realgud-cmdbuf-info-in-debugger?= nil)
+         (realgud-cmdbuf-info-bp-list= '())
+         (realgud-cmdbuf-mode-line-update)
+         (realgud-fringe-erase-history-arrows)
+         (if realgud-cmdbuf-info
+             (dolist (srcbuf (realgud-cmdbuf-info-srcbuf-list 
realgud-cmdbuf-info))
+               (if (realgud-srcbuf? srcbuf)
+                   (with-current-buffer srcbuf
+                     (realgud:terminate-srcbuf srcbuf)
+                     ))
+               )
+           )
+         )
+      (error "Buffer %s does not seem to be attached to a debugger"
+            (buffer-name))
+      )
+    )
+  )
+
+(defun realgud:kill-buffer-hook ()
+  "When a realgud command buffer is killed, call `realgud:terminate' to
+clean up.
+Note that `realgud-term-sentinel' is not helpful here because
+the buffer and data associated with it are already gone."
+  (when (realgud-cmdbuf?) (realgud:terminate (current-buffer)))
+)
+(add-hook 'kill-buffer-hook 'realgud:kill-buffer-hook)
+
+(defun realgud-term-sentinel (process string)
+  "Called when PROCESS dies. We call `realgud:terminate' to clean up."
+  (let ((cmdbuf (realgud-get-cmdbuf)))
+    (if cmdbuf (realgud:terminate cmdbuf)))
+  (message "That's all folks.... %s" string))
+
+(defun realgud:binary (file-name)
+  "Return a whether FILE-NAME is executable or not or very large"
+  (let* ((truename (file-chase-links file-name))
+        (output (shell-command-to-string
+                 (format "file %s" truename)))
+        (filesize (nth 7 (file-attributes truename)))
+        )
+    (cond
+     ((string-match "ELF" output) t)
+     ((and large-file-warning-threshold filesize
+          (> filesize large-file-warning-threshold)) t)
+     ('t nil))))
+
+
+(defun realgud-exec-shell (debugger-name script-filename program
+                                     &optional no-reset &rest args)
+  "Run the specified SCRIPT-FILENAME in under debugger DEBUGGER-NAME a
+comint process buffer. ARGS are the arguments passed to the
+PROGRAM.  At the moment, no piping of input is allowed.
+
+SCRIPT-FILENAME will have local variable `realgud-script-info' set
+which contains the debugger name and debugger process-command
+buffer.
+
+Normally command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset."
+
+  (let* ((current-directory
+         (or (file-name-directory script-filename)
+             default-directory "./"))
+        (cmdproc-buffer-name
+         (replace-regexp-in-string
+          "\s+" "\s"
+          (format "*%s %s shell*"
+                  (file-name-nondirectory debugger-name)
+                  (file-name-nondirectory script-filename))))
+        (cmdproc-buffer (get-buffer-create cmdproc-buffer-name))
+        (realgud-buf (current-buffer))
+        (cmd-args (cons program args))
+        (process (get-buffer-process cmdproc-buffer)))
+
+    (with-current-buffer cmdproc-buffer
+      ;; If the found command buffer isn't for the same debugger
+      ;; invocation command, rename that and start a new one.
+      ;;
+      ;; For example: "bashdb /tmp/foo" does not match "bashdb
+      ;; /etc/foo" even though they both canonicalize to the buffer
+      ;; "*bashdb foo shell*"
+      (when (and (realgud-cmdbuf?)
+                (not
+                 (equal cmd-args
+                        (realgud-cmdbuf-info-cmd-args realgud-cmdbuf-info))
+                 ))
+       (rename-uniquely)
+       (setq cmdproc-buffer (get-buffer-create cmdproc-buffer-name))
+       (setq process nil)
+       ))
+
+    (if (and process (eq 'run (process-status process)))
+        cmdproc-buffer
+      (with-current-buffer cmdproc-buffer
+       (and (realgud-cmdbuf?) (not no-reset) (realgud:reset))
+       (make-local-variable 'starting-directory)
+       (setq starting-directory current-directory)
+
+       (insert "Current directory: " current-directory "\n")
+       (insert "Command: " (mapconcat 'identity cmd-args " ") "\n")
+
+
+       ;; For term.el
+       ;; (term-mode)
+       ;; (set (make-local-variable 'term-term-name) realgud-term-name)
+       ;; (make-local-variable 'realgud-parent-buffer)
+       ;; (setq realgud-parent-buffer realgud-buf)
+
+       ;; For comint.el.
+       (comint-mode)
+
+       ;; Making overlay-arrow-variable-list buffer local has to be
+       ;; done after running commint mode. FIXME: find out why and if
+       ;; this reason is justifyable. Also consider moving this somewhere
+       ;; else.
+       (make-local-variable 'overlay-arrow-variable-list)
+       (make-local-variable 'realgud-overlay-arrow1)
+       (make-local-variable 'realgud-overlay-arrow2)
+       (make-local-variable 'realgud-overlay-arrow3)
+
+       (condition-case failure
+           (comint-exec cmdproc-buffer debugger-name program nil args)
+         (error
+          (let ((text (format "%S\n" failure)))
+            (insert text)
+            (message text)(sit-for 1)
+            text)))
+
+       (setq process (get-buffer-process cmdproc-buffer))
+
+       (if (and process (eq 'run (process-status process)))
+         (let ((src-buffer)
+               (cmdline-list (cons program args)))
+           ;; is this right?
+           (when (and (file-exists-p script-filename)
+                      (not (realgud:binary script-filename)))
+             (setq src-buffer (find-file-noselect script-filename))
+             (point-max)
+             (realgud-srcbuf-init src-buffer cmdproc-buffer))
+           (process-put process 'buffer cmdproc-buffer))
+         ;; else
+         (let ((text
+                (format
+                 "Failed to invoke debugger %s on program %s with args %s\n"
+                 debugger-name program (mapconcat 'identity args " "))))
+           (with-current-buffer cmdproc-buffer (insert text))
+           (message text)
+         ))
+    cmdproc-buffer))))
+
+;; Start of a term-output-filter for term.el
+(defun realgud-term-output-filter (process string)
+  (let ((process-buffer (process-get process 'buffer)))
+    (if process-buffer
+       (save-current-buffer
+         (set-buffer process-buffer)
+         ;; (insert-before-markers (format "+++1 %s" string))
+         (insert-before-markers string)))))
+
+(provide-me "realgud-")
diff --git a/packages/loc-changes/test/install-pkgs.el 
b/packages/realgud/realgud/common/custom.el
similarity index 55%
rename from packages/loc-changes/test/install-pkgs.el
rename to packages/realgud/realgud/common/custom.el
index d43575c..d429b23 100644
--- a/packages/loc-changes/test/install-pkgs.el
+++ b/packages/realgud/realgud/common/custom.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2015 Free Software Foundation, Inc
+;; Copyright (C) 2010 Free Software Foundation, Inc
 
 ;; Author: Rocky Bernstein <address@hidden>
 
@@ -12,13 +12,17 @@
 ;; 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/>.
+(require 'load-relative)
 
-(require 'package)
-(package-refresh-contents)
-(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/";)))
-(condition-case nil
-    (package-install 'test-simple)
-  ((debug error) nil))
-(load-library "test-simple")
+(defcustom realgud-key-prefix "\C-x\C-a"
+  "Prefix of all realgud commands valid in source buffers."
+  :type 'string
+  :group 'realgud)
+
+(defcustom realgud-srcbuf-lock t
+  "Set source buffers read-only when the debugger is active.
+A setting of `nil` allows editing, but Short-Key-mode use may inhibit this."
+  :type 'boolean
+  :group 'realgud)
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/eval.el 
b/packages/realgud/realgud/common/eval.el
new file mode 100644
index 0000000..1ba52a4
--- /dev/null
+++ b/packages/realgud/realgud/common/eval.el
@@ -0,0 +1,101 @@
+;; show expressions using tooltip
+
+;; Author: Rocky Bernstein <address@hidden>
+;; Version: 1.1
+;; Keywords: internal
+;; URL: http://github.com/rocky/emacs-load-relative
+;; Compatibility: GNU Emacs 24.x
+
+;; Copyright (C) 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
+;; 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/>.
+
+(require 'tooltip)
+(require 'ansi-color)
+(require 'load-relative)
+
+(require-relative-list '("cmds" "helper" "utils")  "realgud-")
+(require-relative-list '("buffer/command")         "realgud-buffer-")
+
+(declare-function realgud:cmd-eval   'realgud-cmd)
+(declare-function realgud-get-cmdbuf 'realgud-helper)
+(declare-function realgud-cmdbuf-pat 'realgud-send)
+(declare-function realgud:strip      'realgud-utils)
+
+(make-variable-buffer-local
+ (defvar realgud:process-filter-save nil
+   "realgud saves/restores the previous process filter here"))
+
+(defun realgud:tooltip-eval (event)
+  "Show tip for identifier or selection under the mouse.
+The mouse must either point at an identifier or inside a selected
+region for the tip window to be shown.
+
+This function must return nil if it doesn't handle EVENT."
+  (interactive "e")
+  (let ((process)
+       (cmdbuf (realgud-get-cmdbuf))
+       (process))
+    (when (and (eventp event)
+              cmdbuf
+              (setq process (get-buffer-process cmdbuf))
+              (posn-point (event-end event))
+              )
+      (let ((expr (tooltip-expr-to-print event)))
+       (when expr
+         (with-current-buffer cmdbuf
+           (setq realgud:process-filter-save (process-filter process))
+           (set-process-filter process 'realgud:eval-process-output))
+         (realgud:cmd-eval expr)
+         ))
+      )))
+
+(defun realgud:eval-process-output (process output-str)
+  "Process debugger output and show it in a tooltip window."
+  (set-process-filter process
+                     (or realgud:process-filter-save 'comint-output-filter))
+  (with-current-buffer (realgud-get-cmdbuf)
+    (goto-char (process-mark process))
+    (setq comint-last-input-end (process-mark process))
+    (insert output-str)
+    (set-marker (process-mark process) (point)))
+    (setq comint-last-output-start
+         (setq realgud-last-output-start (process-mark process)))
+
+  (tooltip-show (realgud:eval-strip process output-str))
+  )
+
+(defun realgud:eval-strip-default(prompt-regexp output-str)
+  (realgud:strip
+   (ansi-color-filter-apply
+    (if (string-match prompt-regexp output-str)
+       (substring output-str 0 (match-beginning 0))
+      output-str))))
+
+
+(defun realgud:eval-strip(process output-str)
+  "Return OUTPUT-STR with any prompt of PROCESS stripped from its end."
+  (save-match-data
+    (with-current-buffer (process-buffer process)
+      (let* ((prompt-pat (realgud-cmdbuf-pat "prompt"))
+            (prompt-regexp (realgud-loc-pat-regexp prompt-pat))
+            (eval-filter (realgud-sget 'cmdbuf-info 'callback-eval-filter))
+            )
+       (if eval-filter
+           (funcall eval-filter output-str)
+         (realgud:eval-strip-default prompt-regexp output-str))
+       ))))
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/file.el 
b/packages/realgud/realgud/common/file.el
new file mode 100644
index 0000000..257ffc3
--- /dev/null
+++ b/packages/realgud/realgud/common/file.el
@@ -0,0 +1,138 @@
+;; Copyright (C) 2010-2011, 2013-2014 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+; Should realgud:file-loc-from-line be here or elsewhere?
+(require 'load-relative)
+(require 'compile) ;; for compilation-find-file
+(require-relative-list '("helper" "loc") "realgud-")
+
+(defvar realgud-file-remap (make-hash-table :test 'equal)
+  "How to remap files we otherwise can't find in the
+  filesystem. The hash key is the file string we saw, and the
+  value is associated filesystem string presumably in the
+  filesystem")
+
+(declare-function realgud:strip         'realgud)
+(declare-function realgud-loc-goto      'realgud-loc)
+(declare-function buffer-killed?        'helper)
+(declare-function compilation-find-file 'compile)
+
+(defun realgud:file-line-count(filename)
+  "Return the number of lines in file FILENAME, or nil FILENAME can't be
+found"
+  (if (file-exists-p filename)
+      (let ((file-buffer (find-file-noselect filename)))
+       (with-current-buffer-safe file-buffer
+         (line-number-at-pos (point-max))))
+    nil))
+
+(defun realgud:file-column-from-string(filename line-number source-text
+                                               &optional no-strip-blanks)
+  "Return the column of the first column position of SOURCE-TEXT
+at LINE-NUMBER or nil if it is not there"
+  (condition-case nil
+      (when (and source-text (file-exists-p filename))
+        (let ((file-buffer (find-file-noselect filename)))
+          (with-current-buffer-safe file-buffer
+            (save-excursion
+              (goto-char (point-min))
+              (forward-line (1- line-number))
+              (unless no-strip-blanks
+                (setq source-text (realgud:strip source-text)))
+              (when (search-forward source-text (point-at-eol))
+                (goto-char (match-beginning 0))
+                (current-column))))))
+    (error nil)))
+
+;; FIXME: should allow column number to be passed in.
+(defun realgud:file-loc-from-line(filename line-number
+                                          &optional cmd-marker source-text 
bp-num
+                                          ;; FIXME: remove ignore-file-re and 
cover with
+                                          ;; find-file-fn.
+                                          ignore-file-re find-file-fn 
directory)
+  "Return a realgud-loc for FILENAME and LINE-NUMBER and the
+other optional position information.
+
+CMD-MARKER and BP-NUM get stored in the realgud-loc
+object. FIND-FILE-FN is a function which do special things to
+transform filename so it can be found. This could include
+searching classpaths (in Java), stripping leading and trailing
+blanks, or deliberately ignoring 'pseudo-file patterns like (eval
+1) of Perl and <string> of Python.
+
+If we're unable find the source code we return a string describing the
+problem as best as we can determine."
+
+  (unless (and filename (file-readable-p filename))
+    (if find-file-fn
+       (setq filename (funcall find-file-fn filename))
+      ;; FIXME: Remove the below by refactoring to use the above find-file-fn
+      ;; else
+      (if (and ignore-file-re (string-match ignore-file-re filename))
+         (message "tracking ignored for psuedo-file %s" filename)
+       ;; else
+       (let ((remapped-filename))
+         (if (gethash filename realgud-file-remap)
+             (progn
+               (setq remapped-filename (gethash filename realgud-file-remap))
+               (if (file-exists-p remapped-filename)
+                   (setq filename remapped-filename)
+                 (remhash filename realgud-file-remap)))
+           ;; else
+           (progn
+             (setq remapped-filename
+                   (buffer-file-name
+                    (compilation-find-file (point-marker) filename directory)))
+             (when (and remapped-filename (file-exists-p remapped-filename))
+               (puthash filename remapped-filename realgud-file-remap)
+               (setq filename remapped-filename)
+               )
+             )))
+       )
+      ;; FIXME: remove above -----------------------------------.
+      ))
+  (if filename
+      (if (file-readable-p filename)
+         (if (integerp line-number)
+             (if (> line-number 0)
+                 (lexical-let ((line-count))
+                   (if (setq line-count (realgud:file-line-count filename))
+                       (if (> line-count line-number)
+                           (let* ((column-number
+                                   (realgud:file-column-from-string filename
+                                                                   line-number
+                                                                   
source-text))
+                                  ;; And you thought we'd never get around to
+                                  ;; doing something other than validation?
+                                  (loc (make-realgud-loc
+                                        :num           bp-num
+                                        :cmd-marker    cmd-marker
+                                        :filename      filename
+                                        :line-number   line-number
+                                        :column-number column-number
+                                        :source-text   source-text
+                                        :marker        (make-marker)
+                                        )))
+                             loc)
+                         ;; else
+                         (format "File %s has only %d lines. (Line %d 
requested.)"
+                                 filename line-count line-number))
+                     (format "Problem getting line count for file `%s'" 
filename)))
+               (format "line number %s should be greater than 0" line-number))
+           (format "%s is not an integer" line-number))
+       ;; else
+       (format "File named `%s' not readable" filename)))
+  )
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/follow.el 
b/packages/realgud/realgud/common/follow.el
new file mode 100644
index 0000000..65aa879
--- /dev/null
+++ b/packages/realgud/realgud/common/follow.el
@@ -0,0 +1,50 @@
+;; Copyright (C) 2015 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;; Follows or goto's something
+(require 'load-relative)
+
+(declare-function realgud:cmd-frame 'realgud-cmds)
+
+(defun realgud:follow-mark(mark)
+  (when (markerp mark)
+    (let ((buffer (marker-buffer mark)))
+      (set-buffer buffer)
+      (set-window-point (display-buffer buffer) mark)
+      (goto-char mark)
+    )))
+
+
+(defun realgud:follow(pos)
+  (interactive "%d")
+  (let* ((mark (get-text-property pos 'mark))
+        (filename (get-text-property pos 'file))
+        (frame-num (get-text-property pos 'frame-num))
+        )
+    (cond ((markerp mark) (realgud:follow-mark mark) 't)
+         ((stringp filename)
+          (find-file-other-window filename))
+         ((numberp frame-num) (realgud:cmd-frame frame-num))
+         ('t (message "No location property found here")))
+    ))
+
+(defun realgud:follow-point()
+  (interactive)
+  (realgud:follow (point)))
+
+(defun realgud:follow-event(event)
+  (interactive "e")
+  (realgud:follow (posn-point (event-end event))))
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/fringe-utils.py 
b/packages/realgud/realgud/common/fringe-utils.py
new file mode 100755
index 0000000..784cdb0
--- /dev/null
+++ b/packages/realgud/realgud/common/fringe-utils.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python3
+
+def bit2char(byte, offset):
+    return "X" if byte & (1 << offset) else " "
+
+def char2bit(char, offset):
+    return (0 if char == " " else 1) << offset
+
+def decompile_bitmap(bmp_bytes):
+    lines = []
+    for b in bmp_bytes:
+        lines.append("".join(bit2char(b, offset) for offset in range(8)))
+    return lines
+
+def compile_bitmap(bmp_lines):
+    bmp_bytes = []
+    for line in bmp_lines:
+        s = sum(char2bit(c, offset) for (offset, c) in enumerate(line))
+        bmp_bytes.append(s.to_bytes(1, byteorder="big"))
+    return b"".join(bmp_bytes)
+
+hollow_circle = ["  XXXX  ",
+                 " X    X ",
+                 "X      X",
+                 "X      X",
+                 "X      X",
+                 "X      X",
+                 " X    X ",
+                 "  XXXX  "]
+
+def print_compiled(bmp):
+    print("".join(r'\x{:02x}'.format(b) for b in bmp))
+
+print("\n".join(decompile_bitmap(b"\x3c\x7e\xff\xff\xff\xff\x7e\x3c")))
+print_compiled(compile_bitmap(decompile_bitmap(b"\x3c\x7e\xff\xff\xff\xff\x7e\x3c")))
+print_compiled(compile_bitmap(hollow_circle))
+
diff --git a/packages/realgud/realgud/common/fringe.el 
b/packages/realgud/realgud/common/fringe.el
new file mode 100644
index 0000000..c50153b
--- /dev/null
+++ b/packages/realgud/realgud/common/fringe.el
@@ -0,0 +1,233 @@
+;; Copyright (C) 2010, 2012, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;; Fringe marks for history of stopping points
+(require 'load-relative)
+(require-relative-list '("helper") "realgud-")
+
+(declare-function realgud-loc-hist-item-at       'realgud-lochist)
+(declare-function buffer-killed?                 'helper)
+(declare-function realgud-loc-cmd-marker         'realgud-loc)
+(declare-function realgud:follow-mark            'realgud-follow)
+(declare-function realgud-loc-marker             'realgud-loc)
+
+;; Bitmap for hollow overlay-arrow in fringe
+(if (display-images-p)
+    (define-fringe-bitmap 'hollow-right-triangle
+      "\xe0\x90\x88\x84\x84\x88\x90\xe0"))
+
+;; FIXME: Figure out how to do this as a macro.
+
+(if (equal 'dark (frame-parameter nil 'background-mode))
+    (progn
+      (defface realgud-overlay-arrow1
+       '((t
+          :foreground "green"
+          :weight bold))
+       "Fringe face for current position."
+       :group 'realgud)
+
+      (defface realgud-overlay-arrow2
+       '((t
+          :foreground "white"
+          :weight bold))
+       "Fringe face for position one back in fringe."
+       :group 'realgud)
+
+      (defface realgud-overlay-arrow3
+       '((t
+          :foreground "gray"
+          :weight bold))
+       "Fringe face for position two back in fringe."
+       :group 'realgud)
+      )
+  ;; else
+  (progn
+    (defface realgud-overlay-arrow1
+      '((t
+        :foreground "black"
+        :weight bold))
+      "Fringe face for current position."
+      :group 'realgud)
+
+    (defface realgud-overlay-arrow2
+      '((t
+        :foreground "gray"
+        :weight bold))
+      "Fringe face for position one back in fringe."
+      :group 'realgud)
+
+    (defface realgud-overlay-arrow3
+      '((t
+        :foreground "gainsboro"
+        :weight bold))
+      "Fringe face for position two back in fringe."
+      :group 'realgud)))
+
+
+(defvar realgud-overlay-arrow1 nil
+  "Overlay arrow variable which contains the most recent debugger
+position.")
+(defvar realgud-overlay-arrow2 nil
+  "Overlay arrow variable which contains the 2nd most recent debugger
+position.")
+(defvar realgud-overlay-arrow3 nil
+  "Overlay arrow variable which contains the 3rd most recent debugger
+position.")
+
+;; FIXME: since overlay overlay-arrow-list can be global, and perhaps
+;; has to stay that way since some Emacs code may expect that, we
+;; should use different global overlay arrow variables for the
+;; different debuggers. E.g. trepan-overlay-arrow1,
+;; pyrealgud-overlay-arrow1 and so on. That way, if those debuggers are
+;; running concurrently, the fringe for one doesn't interfere with the
+;; fringe for another.
+
+;; Loop to set up fringe position markers.
+
+;; Here is an example of what each iteration does:
+;;
+;;   (make-local-variable 'realgud-overlay-arrow1) ;; or 2, or 3
+;;   (put 'realgud-overlay-arrow1 'overlay-arrow-string "=>" ;; or "2>", or 
">3"
+;;   (define-fringe-bitmap 'realgud-overlay-arrow1 "\xc0...")
+;;   (add-to-list 'overlay-arrow-variable-list 'realgud-overlay-arrow1)
+
+(dolist (pair
+        '( ("3" . "3>")  ("2" . "2>") ("1" . "=>")))
+  (let ((arrow-symbol (intern (concat "realgud-overlay-arrow" (car pair))))
+       (arrow-bitmap (intern (concat "realgud-right-triangle" (car pair))))
+       (arrow-face (intern (concat "realgud-overlay-arrow" (car pair)))))
+    (make-local-variable arrow-symbol)
+    (put arrow-symbol 'overlay-arrow-string (cdr pair))
+    (if (display-images-p)
+       (progn
+         (define-fringe-bitmap arrow-bitmap "\xc0\xf0\xf8\xfc\xfc\xf8\xf0\xc0")
+         (put arrow-symbol 'overlay-arrow-bitmap arrow-bitmap)
+         (set-fringe-bitmap-face arrow-bitmap arrow-face)))
+    (add-to-list 'overlay-arrow-variable-list arrow-symbol)))
+
+(defun realgud-fringe-set-arrow (overlay-arrow marker)
+  "Set the fringe indicator or overlay arrow to MARKER. This is done
+for example to indicate a debugger position."
+  (let ((position (marker-position marker)))
+    (if position
+       (with-current-buffer (marker-buffer marker)
+         (save-excursion
+           (save-restriction
+             (widen)
+             (progn
+               (goto-char position)
+               ;; We need to ignore field boundaries, so we use
+               ;; forward-line rather than beginning-of-line.
+               (forward-line 0)
+               (set overlay-arrow (point-marker)))))))))
+
+(defun realgud-fringe-history-set (loc-hist &optional do-cmdbuf?)
+  "Set arrows on the last positions we have stopped on."
+  ;; FIXME DRY somehow
+  (let* (
+        (loc1 (realgud-loc-hist-item-at loc-hist 2))
+        (loc2 (realgud-loc-hist-item-at loc-hist 1))
+        (loc3 (realgud-loc-hist-item-at loc-hist 0))
+        (mark1 (and loc3 (realgud-loc-marker loc3)))
+        (mark2 (and loc2 (realgud-loc-marker loc2)))
+        (mark3 (and loc1 (realgud-loc-marker loc1)))
+        (cmd-mark1 (and loc3 (realgud-loc-cmd-marker loc3)))
+        (cmd-mark2 (and loc2 (realgud-loc-cmd-marker loc2)))
+        (cmd-mark3 (and loc1 (realgud-loc-cmd-marker loc1)))
+        )
+    (when (and loc3 (not (equal mark3 mark2)))
+      (realgud-fringe-set-arrow 'realgud-overlay-arrow3 mark3)
+      (if do-cmdbuf?
+         (realgud-fringe-set-arrow 'realgud-overlay-arrow3 cmd-mark3)))
+    (when (and loc2 (not (equal mark2 mark1)))
+      (realgud-fringe-set-arrow 'realgud-overlay-arrow2 mark2)
+      (if do-cmdbuf?
+         (realgud-fringe-set-arrow 'realgud-overlay-arrow2 cmd-mark2)))
+    (when loc1
+      (realgud-fringe-set-arrow 'realgud-overlay-arrow1 mark1)
+      (when (and do-cmdbuf? cmd-mark1)
+         (realgud-fringe-set-arrow 'realgud-overlay-arrow1 cmd-mark1)
+         (goto-char (marker-position cmd-mark1)))
+      )
+    ))
+
+(defun realgud-fringe-erase-history-arrows ()
+  "Erase the history arrows from the fringe. You might want call
+this command interactively if you have conceptually stopped
+debugging and now find the fringe arrows distracting. But you
+don't want to kill the debugger process or quit a debugger
+session which should also erase those fringe arrows."
+  (interactive)
+  (setq realgud-overlay-arrow1 nil)
+  (setq realgud-overlay-arrow2 nil)
+  (setq realgud-overlay-arrow3 nil))
+
+(defun realgud-goto-arrow1()
+  "Goto the position stored in realgud-overlay-arrow1"
+  (interactive "")
+  (if realgud-overlay-arrow1
+      (realgud:follow-mark realgud-overlay-arrow1))
+  )
+
+(defun realgud-goto-arrow2()
+  "Goto the position stored in realgud-overlay-arrow2"
+  (interactive "")
+  (if realgud-overlay-arrow2
+      (realgud:follow-mark realgud-overlay-arrow2))
+  )
+
+
+(defun realgud-goto-arrow3()
+  "Goto the position stored in realgud-overlay-arrow3"
+  (interactive "")
+  (if realgud-overlay-arrow3
+      (realgud:follow-mark realgud-overlay-arrow3))
+  )
+
+(defun realgud-recenter-arrow1()
+  "If the current buffer contains realgud-overlay-arrow1 go to that position"
+  (interactive "")
+  (if (and realgud-overlay-arrow1
+          (eq (marker-buffer realgud-overlay-arrow1) (current-buffer)))
+      (goto-char realgud-overlay-arrow1))
+  )
+
+(defun realgud-recenter-arrow(&optional opt-buffer)
+  "If the current buffer contains realgud-overlay-arrows 1, 2 or 3
+   recenter window to show that"
+  (interactive "")
+  (let ((buffer (or opt-buffer (current-buffer))))
+    ;; We need to update in the order 3..1 so that if there are more than on
+    ;; arrows in the same buffer the smaller number (e.g. arrow 1) is the
+    ;; position we are at rather than the earlier one (e.g. arrow 3).
+    (with-current-buffer-safe buffer
+      (if (and realgud-overlay-arrow3
+              (eq (marker-buffer realgud-overlay-arrow3) buffer))
+         (realgud:follow-mark realgud-overlay-arrow3)
+       )
+      (if (and realgud-overlay-arrow2
+              (eq (marker-buffer realgud-overlay-arrow2) buffer))
+         (realgud:follow-mark realgud-overlay-arrow2)
+      )
+      (if (and realgud-overlay-arrow1
+              (eq (marker-buffer realgud-overlay-arrow1) buffer))
+         (realgud:follow-mark realgud-overlay-arrow1)
+       )
+      (redisplay)
+      )
+    ))
+
+
+(provide 'realgud-fringe)
diff --git a/packages/realgud/realgud/common/helper.el 
b/packages/realgud/realgud/common/helper.el
new file mode 100644
index 0000000..7467b2b
--- /dev/null
+++ b/packages/realgud/realgud/common/helper.el
@@ -0,0 +1,108 @@
+;; Copyright (C) 2010, 2014, 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+(eval-when-compile (require 'cl-lib))   ;For setf.
+
+;;; Miscellaneous utility functions
+(require 'load-relative)
+
+(defun fn-p-to-fn?-alias (fn-sym)
+  "FN-SYM is assumed to be a symbol which is a function.  If it
+ends in a 'p' or '-p', that suffix is stripped; in either case, a
+suffix with '?' is added this name is a new alias for that
+function FN-SYM."
+  (if (and (symbolp fn-sym) (functionp fn-sym))
+      (let*
+         ((fn-str (symbol-name fn-sym))
+          (new-fn-str
+            (cond
+             ((and (> (length fn-str) 2) (equal "-p" (substring fn-str -2)))
+              (substring fn-str 0 -2))
+             ((and (> (length fn-str) 1) (equal "p" (substring fn-str -1)))
+              (substring fn-str 0 -1))
+             (t fn-str)))
+          (new-fn-sym (intern (concat new-fn-str "?"))))
+       (defalias new-fn-sym fn-sym))))
+
+;; FIXME push the special casing into the debuggers themselves.
+(defun realgud:debugger-name-transform (debugger-name)
+  "In some cases we need to prefix a short debugger name, like
+'gdb' with 'realgud:'. This does that."
+  (let ((debugger-name-short
+        (file-name-sans-extension (file-name-nondirectory debugger-name))))
+    (cond
+     ;; ((equal debugger-name-short "gdb") "realgud:gdb")
+     ;; ((equal debugger-name-short "jdb") "realgud:jdb")
+     ((equal debugger-name-short "tortoise") "gub")
+     ((or (equal debugger-name "trepan.pl")
+         (equal debugger-name-short "trepanpl"))
+      "realgud:trepanpl")
+     ('t debugger-name-short))))
+
+(defun buffer-killed? (buffer)
+  "Return t if BUFFER is killed."
+  (not (buffer-live-p buffer)))
+
+(defmacro with-current-buffer-safe (buffer &rest body)
+  "Check that BUFFER has not been deleted before calling
+`with-current-buffer'. If it has been deleted return nil."
+  (declare (indent 1) (debug t))
+  `(if (or (not ,buffer) (buffer-killed? ,buffer))
+       nil
+     (with-current-buffer ,buffer
+       ,@body)))
+
+
+;; FIXME: prepend realgud- onto the beginning of struct-symbol
+(defmacro realgud-sget (struct-symbol struct-field)
+  "Simplified access to a field of a `defstruct'
+variable. STRUCT-SYMBOL is a defstruct symbol name. STRUCT-FIELD
+is a field in that. Access (STRUCT-SYMBOL-STRUCT-FIELD STRUCT-SYMBOL)"
+  (declare (indent 1) (debug t))
+  `(let* ((realgud-symbol-str
+          (concat "realgud-" (symbol-name ,struct-symbol)))
+         (realgud-field-access
+          (intern (concat realgud-symbol-str "-" (symbol-name, 
struct-field)))))
+    (funcall realgud-field-access (eval (intern realgud-symbol-str)))))
+
+
+(defmacro realgud-struct-field-setter (variable-name field)
+  "Creates an defstruct setter method for field FIELD with
+of defstruct variable VARIABLE-NAME. For example:
+
+  (realgud-struct-field-setter \"realgud-srcbuf-info\" \"short-key?\")
+gives:
+  (defun realgud-srcbuf-info-short-key?=(value)
+    (setf (realgud-srcbuf-info-short-key? realgud-srcbuf-info) value))
+"
+  (declare (indent 1) (debug t))
+  `(defun ,(intern (concat variable-name "-" field "=")) (value)
+     ;; FIXME: figure out how to add docstring
+     ;; ,(concat "Sets field" ,field " of " ,variable-name " to VALUE")
+     (if ,(intern variable-name)
+        (setf (,(intern (concat variable-name "-" field))
+               ,(intern variable-name)) value))
+    ))
+
+;; (defun realgud-struct-field (var-sym field-sym)
+;;   (setq var-str (symbol-name var-sym))
+;;   (setq field-str (symbol-name field-sym))
+;;   (funcall (symbol-function (intern (concat var-str "-" field-str)))
+;;        (eval (intern var-str))))
+
+(provide-me "realgud-")
+
+;; Local Variables:
+;; byte-compile-warnings: (not cl-functions)
+;; End:
diff --git a/packages/realgud/realgud/common/init.el 
b/packages/realgud/realgud/common/init.el
new file mode 100644
index 0000000..7001d85
--- /dev/null
+++ b/packages/realgud/realgud/common/init.el
@@ -0,0 +1,45 @@
+;; Copyright (C) 2010, 2015 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+(require 'load-relative)
+
+(defface realgud-line-number
+  '((t :inherit font-lock-variable-name-face))
+  "Face for displaying line numbers in."
+  :group 'realgud
+  :version "23.4")
+
+(defvar realgud-line-number-face 'realgud-line-number
+  "Face name to use for line numbers.")
+
+(defface realgud-file-name
+  '((t :inherit font-lock-preprocessor-face))
+  "Face for displaying file names."
+  :group 'realgud
+  :version "23.4")
+
+(defface realgud-backtrace-number
+  '((t
+     :foreground "black"
+     :weight bold))
+  "Fringe face for current position."
+  :group 'realgud)
+
+(defvar realgud-backtrace-number-face 'realgud-backtrace-number
+  "Face name to use for backtrace numbers.")
+
+(defvar realgud-file-name-face 'realgud-file-name
+  "Face name to use for file names.")
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/key.el 
b/packages/realgud/realgud/common/key.el
new file mode 100644
index 0000000..86357fd
--- /dev/null
+++ b/packages/realgud/realgud/common/key.el
@@ -0,0 +1,146 @@
+;; Author: Rocky Bernstein <address@hidden>
+;; Version: 1.1
+;; Keywords: internal
+;; URL: http://github.com/rocky/emacs-load-relative
+;; Compatibility: GNU Emacs 24.x
+
+;; Copyright (C) 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 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/>.
+
+(provide 'key)
+;;; key.el ends here
+
+(require 'load-relative)
+(require-relative "custom" nil "realgud-")
+
+(defcustom realgud-populate-common-fn-keys-function
+  'realgud-populate-common-fn-keys-standard
+  "The function to call to populate key bindings common to all dbgr windows.
+This includes the secondary windows, the debugger shell, and all
+Ruby source buffers when the debugger is active.
+
+This variable can be bound to the following:
+
+* nil -- Don't bind any keys.
+
+* `realgud-populate-common-fn-keys-standard' -- Bind the function
+  keys according to a widely used debugger convention:
+
+\\{realgud-example-map-standard}
+
+* `realgud-populate-common-fn-keys-eclipse' -- Bind according to Eclipse.
+
+\\{realgud-example-map-eclipse}
+
+* `realgud-populate-common-fn-keys-netbeans' -- Bind according to NetBeans.
+
+\\{realgud-example-map-netbeans}
+
+* Any other value is expected to be a callable function that takes one
+  argument, the keymap, and populates it with suitable keys."
+  :type 'function
+  :group 'realgud)
+
+;; -------------------------------------------------------------------
+;; Key bindings
+;;
+
+(defun realgud-populate-common-fn-keys-standard (&optional map)
+  "Bind the debugger function key layout used by many debuggers.
+
+\\{realgud-example-map-standard}"
+  (define-key map [f5]    'realgud:cmd-continue)
+  (define-key map [S-f5]  'realgud:cmd-quit)
+  ;; (define-key map [f9]    'realgud-toggle-source-breakpoint)
+  (define-key map [f9]    'realgud:cmd-break)
+  ;; (define-key map [C-f9]  'realgud-toggle-source-breakpoint-enabled)
+  (define-key map [f10]   'realgud:cmd-next)
+  (define-key map [f11]   'realgud:cmd-step)
+  (define-key map [S-f11] 'realgud:cmd-finish)
+  (define-key map [M-down]    'realgud-track-hist-newer)
+  (define-key map [A-down]    'realgud-track-hist-newer)
+  (define-key map [M-kp-2]    'realgud-track-hist-newer)
+  (define-key map [M-up]      'realgud-track-hist-older)
+  (define-key map [A-up]      'realgud-track-hist-older)
+  (define-key map [M-kp-8]    'realgud-track-hist-older)
+  (define-key map [M-kp-up]   'realgud-track-hist-older)
+  (define-key map [M-kp-down] 'realgud-track-hist-newer)
+  (define-key map [M-print]   'realgud-track-hist-older)
+  (define-key map [M-S-down]  'realgud-track-hist-newest)
+  (define-key map [M-S-up]    'realgud-track-hist-oldest)
+  (define-key map "\C-c " 'realgud:cmd-break)
+  )
+
+;; TODO: add eclipse, and netbeans
+
+(defun realgud-populate-common-keys (map)
+  "Define the keys that are used by all debugger buffers, including
+source-code buffers
+
+The variable `realgud-populate-common-fn-keys-function' controls the layout."
+  (define-key map "\C-x\C-a\C-q" 'realgud-short-key-mode)
+  (if realgud-populate-common-fn-keys-function
+      (funcall realgud-populate-common-fn-keys-function map)))
+
+(defun realgud-populate-src-buffer-map-plain (map)
+  "Bind ordinary text characters used in debugger source-code buffers.
+
+This does not touch change menus; for that see 
`realgud-populate-debugger-menu'.
+Nor does it touch prefix keys; for that see `realgud-populate-keys-standard'"
+  ;; Common Debugger functions
+  (let ((prefix-map (make-sparse-keymap)))
+    (define-key map "b" 'realgud:cmd-break)
+    (define-key map "D" 'realgud:cmd-delete)
+    (define-key map "X" 'realgud:cmd-clear)
+    (define-key map "-" 'realgud:cmd-disable)
+    (define-key map "+" 'realgud:cmd-enable)
+    (define-key map "T" 'realgud:cmd-backtrace)
+    (define-key map [delete] 'realgud:cmd-delete)
+    (define-key map [enter] 'realgud:cmd-repeat-last)
+    (define-key map (kbd "RET") 'realgud:cmd-repeat-last)
+    (define-key map " " 'realgud:cmd-step)
+    (define-key map "f" 'realgud:cmd-finish)
+    (define-key map "n" 'realgud:cmd-next)
+    (define-key map "q" 'realgud:cmd-quit)
+    (define-key map "k" 'realgud:cmd-kill)
+    (define-key map "r" 'realgud:cmd-restart)
+    (define-key map "R" 'realgud:cmd-restart)
+    (define-key map "s" 'realgud:cmd-step)
+    (define-key map "!" 'realgud:cmd-shell)
+
+    ;; FIXME: these can go to a common routine. See also shortkey.el
+    ;; and backtrace-mode.el
+    (define-key map "<" 'realgud:cmd-newer-frame)
+    (define-key map ">" 'realgud:cmd-older-frame)
+    (define-key map "d" 'realgud:cmd-newer-frame)
+    (define-key map "u" 'realgud:cmd-older-frame)
+    (define-key map "C" 'realgud-window-cmd-undisturb-src)
+    (define-key map "F" 'realgud:window-bt)
+    (define-key map "Q" 'realgud:cmd-terminate)
+    (define-key map "S" 'realgud-window-src-undisturb-cmd)
+    (define-key map "U" 'realgud:cmd-until)
+
+    (define-key map [M-down]    'realgud-track-hist-newer)
+    (define-key map [M-kp-2]    'realgud-track-hist-newer)
+    (define-key map [M-up]      'realgud-track-hist-older)
+    (define-key map [M-kp-8]    'realgud-track-hist-older)
+    (define-key map [M-kp-up]   'realgud-track-hist-older)
+    (define-key map [M-kp-down] 'realgud-track-hist-newer)
+    (define-key map [M-print]   'realgud-track-hist-older)
+    (define-key map [M-S-down]  'realgud-track-hist-newest)
+    (define-key map [M-S-up]    'realgud-track-hist-oldest)
+    ))
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/lang.el 
b/packages/realgud/realgud/common/lang.el
new file mode 100644
index 0000000..d3b4cb3
--- /dev/null
+++ b/packages/realgud/realgud/common/lang.el
@@ -0,0 +1,111 @@
+;; Copyright (C) 2010, 2012, 2014-2015 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;; Programming language specific stuff.
+(require 'load-relative)
+
+(defun realgud-lang-mode? (filename lang-str)
+  "Return true if FILENAME is a buffer we are visiting a buffer
+that is in LANG-STR mode. The test is just that the major mode
+starts LANG-STR."
+  (let ((buffer (and filename (find-buffer-visiting filename)))
+        (match-pos))
+    (cond (buffer
+          (save-current-buffer
+            (set-buffer buffer)
+            (setq match-pos
+                  (string-match (format "^%s-" lang-str)
+                                (format "%s" major-mode))))
+          (and match-pos (= 0 match-pos)))
+         ('t nil)
+         ))
+  )
+
+(defun realgud:suggest-file-from-buffer (lang-str &optional opt-buff-list)
+    "Suggest the first in the buffer list for which test-func is
+    't. Typically this is used. To search for a buffer in one of
+    the programming modes like Ruby or Python."
+    (let ((file)
+          (buff)
+          (not-found 't)
+          (buff-list (or opt-buff-list (buffer-list)))
+          )
+      (while (and not-found (setq buff (car-safe buff-list)))
+        (setq buff-list (cdr buff-list))
+        (setq file (buffer-file-name buff))
+        (if (realgud-lang-mode? file lang-str)
+            (setq not-found nil)
+          ))
+      (if not-found nil file)
+      )
+    )
+
+(defun realgud-suggest-lang-file (lang-str lang-ext-regexp &optional 
last-resort)
+ "Suggest a file to debug. We search for the the major mode for
+that programming language using we check filenames using
+LANG-EXT-REGEXP. For example, for ruby LANG-STR would be 'ruby'
+and LANG-EXT-REGEXP would be '\\.rb$'.
+
+Buffers and files are ranked with a priority. Higher is more
+priority and selected will be selected over lower-priorities.
+
+The first priority is given to the current buffer. If the major
+mode matches LANG-STR, then we are done. If not, we'll set
+priority 2 and we keep going.  Then we will try files in the
+default-directory. Of those buffers we are visiting, we check the
+major mode. The first one we find we will return.  Failing this,
+we see if the file is executable and has a LANG-EXT suffix. These
+have priority 8.  Failing that, we'll go for just having a
+LANG-EXT suffix. These have priority 7. And other executable
+files that are not directories have priority 6 if they have the
+right LANG-EXT, otherwise they are priority 5.
+
+Within a given priority, we use the first one we find."
+    (let* ((file)
+           (file-list (directory-files default-directory))
+           (priority 2)
+           (is-not-directory)
+           (result (buffer-file-name)))
+      (unless (realgud-lang-mode? result lang-str)
+       (while (and (setq file (car-safe file-list)) (< priority 8))
+         (setq file-list (cdr file-list))
+         (when (realgud-lang-mode? file lang-str)
+           (setq result file)
+           (setq priority
+                 (if (file-executable-p file)
+                     (setq priority 8)
+                   (setq priority 7))))
+         ;; The file isn't in a language-mode buffer,
+         ;; Check for an executable file with a language extension.
+         (if (and file (file-executable-p file)
+                  (setq is-not-directory (not (file-directory-p file))))
+             (if (and (string-match lang-ext-regexp file))
+                 (if (< priority 6)
+                     (progn
+                       (setq result file)
+                       (setq priority 6))))
+           (when (and is-not-directory (< priority 5))
+             ;; Found some sort of regular file.
+             (setq result file)
+             (setq priority 5))
+           ))
+       )
+      (if (< priority 6)
+         (if (setq file (realgud:suggest-file-from-buffer lang-str))
+             (setq result file)
+           (if last-resort (setq result last-resort))))
+      result)
+    )
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/loc.el 
b/packages/realgud/realgud/common/loc.el
new file mode 100644
index 0000000..76584c0
--- /dev/null
+++ b/packages/realgud/realgud/common/loc.el
@@ -0,0 +1,187 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;; This describes a debugger location structure and has code for
+;; working with them.
+
+(eval-when-compile (require 'cl-lib))
+
+(require 'load-relative)
+(require 'loc-changes)
+(require-relative-list '("fringe" "follow") "realgud-")
+(require-relative-list '("buffer/source") "realgud-buffer-")
+
+;; FIXME: removed because of recursive loads
+;; (require-relative-list '("buffer/helper") "realgud-buffer-")
+
+(declare-function realgud:strip                  'realgud)
+(declare-function realgud-get-cmdbuf-from-srcbuf 'realgud-buffer-helper)
+(declare-function realgud-srcbuf?                'realgud-buffer-source)
+
+(cl-defstruct realgud-loc
+"Our own location type. Even though a mark contains a
+file-name (via a buffer) and a line number (via an offset), we
+want to save the values that were seen/requested originally."
+   num           ;; If there is a number such as a breakpoint or frame
+                ;; number associated with this location, this is set.
+                ;; nil otherwise.
+   filename
+   line-number
+   column-number ;; Column offset within line
+   source-text   ;; Source text if available
+   marker        ;; Position in source code
+   cmd-marker    ;; Position in command process buffer
+)
+
+(defalias 'realgud-loc? 'realgud-loc-p)
+
+;; The below function is generic and might be found in standard
+;; library. Or it might be moved someplace more generic.
+(defun realgud:buffer-line-no-props()
+  "Returns a string containing the line that `point' is at,
+without buffer properties."
+  (buffer-substring-no-properties (point-at-bol)
+                                 (point-at-eol)))
+
+(defun realgud:loc-describe (loc)
+  "Display realgud-cmdcbuf-info.
+Information is put in an internal buffer called *Describe*."
+  (interactive "")
+  (switch-to-buffer (get-buffer-create "*Describe*"))
+  (let ((link-start) (link-end) (map) (filename))
+    (insert "  - filename      :: ")
+    (setq filename (realgud-loc-filename loc))
+    (put-text-property
+     (insert-text-button filename
+                        'action 'realgud:follow-event
+                        'help-echo "mouse-2: go to this file")
+     (point)
+     'file filename)
+    (insert "\n")
+    (mapc 'insert
+         (list
+          (format "  - line number   :: %s\n" (realgud-loc-line-number loc))
+          (format "  - brkpt num     :: %s\n" (realgud-loc-num loc))
+          (format "  - column number :: %s\n"
+                  (realgud-loc-column-number loc))
+          (format "  - source text   :: %s\n" (realgud-loc-source-text loc))
+          ))
+    ;; Make locations clickable
+    (insert "  - source marker :: ")
+    (put-text-property
+     (insert-text-button (format "%s" (realgud-loc-marker loc))
+                        'action 'realgud:follow-event
+                        'help-echo "mouse-2: go to this source location")
+     (point)
+     'mark (realgud-loc-marker loc))
+
+    (insert "\n  - cmdbuf marker :: ")
+    (put-text-property
+     (insert-text-button (format "%s" (realgud-loc-cmd-marker loc))
+                        'action 'realgud:follow-event
+                        'help-echo "mouse-2: go to this command-buffer 
location")
+     (point)
+     'mark (realgud-loc-cmd-marker loc))
+    (insert "\n")
+    )
+  )
+
+
+(defun realgud-loc-current(&optional source-buffer cmd-marker)
+  "Create a location object for the point in the current buffer.
+   If SOURCE-BUFFER is not given, take the current buffer as the
+   source buffer."
+  (interactive "")
+  (unless source-buffer
+    (setq source-buffer (current-buffer)))
+  (unless (realgud-srcbuf? source-buffer)
+    (error "%s is not a realgud source buffer" source-buffer))
+  (unless cmd-marker
+    (setq cmd-marker
+         (realgud-get-cmdbuf-from-srcbuf source-buffer))
+    )
+  (with-current-buffer source-buffer
+    (let ((mark (point-marker))
+         (text (realgud:buffer-line-no-props)))
+      (make-realgud-loc
+       :filename (buffer-file-name source-buffer)
+       :column-number (current-column)
+       :line-number (line-number-at-pos)
+       :source-text text
+       :marker      mark
+       :cmd-marker cmd-marker
+       )
+      )))
+
+(defun realgud-loc-marker=(loc marker)
+  (setf (realgud-loc-marker loc) marker))
+
+(defun realgud-loc-goto(loc)
+  "Position point in the buffer referred to by LOC. This may
+involve reading in a file. In the process, the marker inside LOC
+may be updated.
+
+If LOC is found, The buffer containing the location referred to,
+the source-code buffer, is returned. Otherwise, nil is returned."
+  (if (realgud-loc? loc)
+      (let* ((filename    (realgud-loc-filename loc))
+            (line-number (realgud-loc-line-number loc))
+            (column-number (realgud-loc-column-number loc))
+            (marker      (realgud-loc-marker loc))
+            (cmd-marker  (realgud-loc-cmd-marker loc))
+            (use-marker  nil)
+            (src-buffer  (marker-buffer (or marker (make-marker)))))
+       (if (and (not src-buffer) filename)
+           (setq src-buffer (find-file-noselect filename)))
+       (if cmd-marker
+           (with-current-buffer (marker-buffer cmd-marker)
+             (goto-char cmd-marker)))
+       (if src-buffer
+           (with-current-buffer src-buffer
+             (when (and marker (marker-position marker))
+               ;; A marker has been set in loc, so use that.
+               (goto-char (marker-position marker))
+               (setq use-marker 't)
+               (let ((current-text (realgud:buffer-line-no-props))
+                     (loc-text (realgud-loc-source-text loc)))
+                 (unless (and loc-text
+                              (equal (realgud:strip current-text) 
(realgud:strip loc-text)))
+                   (loc-changes-goto line-number)
+                   (setq current-text (realgud:buffer-line-no-props))
+                   (when (equal current-text loc-text)
+                     (message "Marked location needed updating")
+                     (setq use-marker nil))
+                   )))
+             (if use-marker
+                 (goto-char (marker-position marker))
+               ;; else
+               ;; We don't have a position set in the source buffer
+               ;; so find it and go there. We use `loc-changes-goto'
+               ;; to find that spot. `loc-changes-goto' keeps a
+               ;; record of the first time we went to that spot, so
+               ;; in the face of buffer modifications, it may be more
+               ;; reliable.
+               (let ((src-marker))
+                 (loc-changes-goto line-number)
+                 (when column-number
+                   (move-to-column column-number))
+                 (setq src-marker (point-marker))
+                 (realgud-loc-marker= loc src-marker)
+                 ))))
+       src-buffer )))
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/lochist.el 
b/packages/realgud/realgud/common/lochist.el
new file mode 100644
index 0000000..786e8e3
--- /dev/null
+++ b/packages/realgud/realgud/common/lochist.el
@@ -0,0 +1,146 @@
+;; Copyright (C) 2010, 2012, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;; Debugger location ring
+;;; Commentary:
+
+;; This file manages a ring of (recently stopped) positions to allow
+;; the programmer to move between them.
+
+;;; Code:
+
+(eval-when-compile (require 'cl-lib))
+(require 'ring)
+(require 'org)
+(require 'load-relative)
+(require-relative-list '("loc") "realgud-")
+
+(declare-function realgud:loc-describe 'realgud-loc)
+
+(defcustom realgud-loc-hist-size 20  ; For testing. Should really be larger.
+  "Size of realgud's position history ring"
+  :type 'integer
+  :group 'realgud)
+
+(cl-defstruct realgud-loc-hist
+  "A list of source-code positions recently encountered"
+  (position -1)
+  (ring (make-ring realgud-loc-hist-size)))
+
+(defun realgud:loc-hist-describe(loc-hist)
+  "Format LOC-HIST values inside buffer *Describe*"
+  (switch-to-buffer (get-buffer-create "*Describe*"))
+  (org-mode)
+  (insert "** Source Positions Stopped At\n")
+  (mapc 'insert
+       (list
+        (format "  -  buffer size  :: %d\n" realgud-loc-hist-size)
+        (format "  -  position     :: %d\n"
+                (realgud-loc-hist-position loc-hist))))
+  (let ((locs (cddr (realgud-loc-hist-ring loc-hist)))
+       (loc)
+       (i 0))
+    (while (and (< i (length locs)) (setq loc (elt locs i)) (realgud-loc? loc) 
)
+      (insert (format "*** %d\n" i))
+      (realgud:loc-describe loc)
+      (setq i (1+ i))
+      )
+    )
+)
+
+(defun realgud-loc-hist-item-at(loc-hist position)
+  "Get the current item stored at POSITION of the ring
+component in LOC-HIST"
+  (lexical-let ((ring (realgud-loc-hist-ring loc-hist)))
+    (if (ring-empty-p ring)
+       nil
+      (ring-ref ring position))))
+
+(defun realgud-loc-hist-item(loc-hist)
+  "Get the current item of LOC-HIST at the position previously set"
+  (realgud-loc-hist-item-at
+   loc-hist
+   (realgud-loc-hist-position loc-hist)))
+
+(defun realgud-loc-hist-add(loc-hist loc)
+  "Add FRAME to LOC-HIST"
+  ;; Switching frames shouldn't save a new ring
+  ;; position. Also make sure no position is different.
+  ;; Perhaps duplicates should be controlled by an option.
+  (let* ((ring (realgud-loc-hist-ring loc-hist))
+        (old-loc (realgud-loc-hist-item loc-hist)))
+    (unless (and
+            old-loc
+            (equal (realgud-loc-filename old-loc)
+                   (realgud-loc-filename loc))
+            (equal (realgud-loc-line-number old-loc)
+                   (realgud-loc-line-number loc))
+            (equal (realgud-loc-column-number old-loc)
+                   (realgud-loc-column-number old-loc)))
+      (setf (realgud-loc-hist-position loc-hist) 0)
+      (ring-insert ring loc)
+    )
+    ))
+
+(defun realgud-loc-hist-clear(loc-hist)
+  "Clear out all source locations in LOC-HIST"
+  (lexical-let* ((ring (ring-ref (realgud-loc-hist-ring loc-hist)
+                                (realgud-loc-hist-position loc-hist)))
+                (head (car ring)))
+    (setf (realgud-loc-hist-position loc-hist) (- head 1))
+    (while (not (ring-empty-p ring))
+      (ring-remove ring))))
+
+(defun realgud-loc-hist-index(loc-hist)
+  "Return the ring-index value of LOC-HIST"
+  (lexical-let* (
+                (ring (realgud-loc-hist-ring loc-hist))
+                (head (car ring))
+                (ringlen (cadr ring))
+                (index (mod (+ ringlen head
+                               (- (realgud-loc-hist-position loc-hist)))
+                            ringlen)))
+    (if (zerop index) ringlen index)
+    ))
+
+(defun realgud-loc-hist-set (loc-hist position)
+  "Set LOC-HIST to POSITION in the stopping history"
+  (setf (realgud-loc-hist-position loc-hist) position))
+
+;; FIXME: add numeric arg?
+(defun realgud-loc-hist-newer (loc-hist)
+  "Set LOC-HIST position to an newer position."
+
+  (setf (realgud-loc-hist-position loc-hist)
+       (ring-minus1 (realgud-loc-hist-position loc-hist)
+                   (ring-length (realgud-loc-hist-ring loc-hist)))))
+
+(defun realgud-loc-hist-newest (loc-hist)
+  "Set LOC-HIST position to the newest position."
+  (setf (realgud-loc-hist-position loc-hist) -1))
+
+;; FIXME: add numeric arg?
+(defun realgud-loc-hist-older (loc-hist)
+  "Set LOC-HIST position to an older position."
+    (setf (realgud-loc-hist-position loc-hist)
+        (ring-plus1 (realgud-loc-hist-position loc-hist)
+                     (ring-length (realgud-loc-hist-ring loc-hist)))))
+
+(defun realgud-loc-hist-oldest (loc-hist)
+  "Set LOC-HIST to the oldest stopping point."
+  (lexical-let* ((ring (realgud-loc-hist-ring loc-hist))
+                (head (car ring)))
+    (setf (realgud-loc-hist-position loc-hist) head)))
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/menu.el 
b/packages/realgud/realgud/common/menu.el
new file mode 100644
index 0000000..2d3209c
--- /dev/null
+++ b/packages/realgud/realgud/common/menu.el
@@ -0,0 +1,183 @@
+; Copyright (C) 2010-2011, 2015 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;; -------------------------------------------------------------------
+;; Menu support.
+;;
+
+(require 'load-relative)
+
+;; We want the doc strings from gdb-like commands for our help
+;; menus.
+(require-relative-list '("cmds") "realgud-")
+
+;; Note: We want the key binding to show in the menu. However, our
+;; situation is a little bit complex:
+;;
+;; 1) We want the binding of the `common' man (i.e. the function key
+;;    the user has selected.)
+;;
+;; 2) We want this even when the menu is disabled and the key isn't
+;;    bound, typically when the debugger isn't running.
+;;
+;; This has been solved by setting up an explicit ":keys" properly.
+(defun realgud-menu-item (common-map name cmd &rest args)
+  "Return a menu item entry with the correct key bindings.
+
+A command can be bound to a number of different key sequences. If
+the realgud common map contains a binding it is displayed in the
+menu. (The common map typically contains function key bindings.)"
+  (let ((key-binding (where-is-internal cmd (list common-map) t))
+        (hint '()))
+    (if key-binding
+        (setq hint (list :keys (key-description key-binding))))
+    (append (list 'menu-item name cmd)
+            hint
+            args)))
+
+
+;; I had a *lot* of trouble with emacs keymaps and duplicate menus.
+;; Don't use set-parent-mode on any minor mode.
+;; It is possible that realgud-track-mode could be a derived major mode whose 
parent
+;; is comint, but that seems drastic.
+;; Instead we take the various minor modes and add a debugger menu to that.
+(defun realgud-populate-debugger-menu (map)
+  "Populate the 'Debugger' menu inside an existing menu (short-key or 
track-mode)."
+  (let ((debugger-map (make-sparse-keymap "Debugger")))
+    (define-key map [menu-bar debugger] (cons "Debugger" debugger-map))
+    (define-key debugger-map [command]
+      (realgud-menu-item debugger-map "Go to Command Buffer"
+                        'realgud-window-cmd-undisturb-src
+                        :enable '(and (realgud-get-process) (not 
(realgud-cmdbuf?)))
+                        :help (documentation 'realgud-window-cmd-undisturb-src)
+                        ))
+
+    (define-key debugger-map [source]
+      (realgud-menu-item debugger-map "Go to Source Buffer"
+                        'realgud-window-src-undisturb-cmd
+                        :enable '(and (realgud-get-process) (not 
(realgud-srcbuf?)))
+                        :help (documentation 'realgud-window-src-undisturb-cmd)
+                        ))
+
+    (define-key debugger-map [info]
+      (realgud-menu-item debugger-map "Debugger Info"
+                        'realgud:cmdbuf-info-describe
+                        :help (documentation 'realgud:cmdbuf-info-describe)
+                        ))
+
+    (define-key debugger-map [backtrace]
+      (realgud-menu-item debugger-map "Backtrace" 'realgud:window-bt
+                        :enable '(realgud-get-process)
+                        :help (documentation 'realgud:window-bt)
+                        ))
+
+    (define-key debugger-map [arrow3]
+      (realgud-menu-item debugger-map "Arrow 3" 'realgud-goto-arrow3
+                        :enable '(realgud-get-process)
+                        :help (documentation 'realgud-goto-arrow3)
+                        ))
+
+    (define-key debugger-map [arrow2]
+      (realgud-menu-item debugger-map "Arrow 2" 'realgud-goto-arrow2
+                        :enable '(realgud-get-process)
+                        :help (documentation 'realgud-goto-arrow2)
+                        ))
+
+    (define-key debugger-map [arrow1]
+      (realgud-menu-item debugger-map "Arrow 1" 'realgud-goto-arrow1
+                        :enable '(realgud-get-process)
+                        :help (documentation 'realgud-goto-arrow1)
+                        ))
+
+    (define-key debugger-map [break]
+       (realgud-menu-item debugger-map "Set Breakpoint" 'realgud:cmd-break
+                          :enable '(realgud-get-process)
+                          :help (documentation 'realgud:cmd-break)
+                          ))
+
+    (define-key debugger-map [continue]
+      (realgud-menu-item debugger-map "Continue" 'realgud:cmd-continue
+                        :enable '(realgud-get-process)
+                        :help (documentation 'realgud:cmd-continue)
+                        ))
+
+    (define-key debugger-map [until]
+      (realgud-menu-item debugger-map "Continue to Line" 'realgud:cmd-until
+                        :enable '(and (realgud-get-process) 
realgud-short-key-mode)
+                        :help (documentation 'realgud:cmd-until)
+                        ))
+
+    (define-key debugger-map [next]
+      (realgud-menu-item debugger-map "Next (step through)" 'realgud:cmd-next
+                        :enable '(realgud-get-process)
+                          :help (documentation 'realgud:cmd-next)
+                          ))
+
+    (define-key debugger-map [finish]
+      (realgud-menu-item debugger-map "Finish (step out)" 'realgud:cmd-finish
+                        :enable '(realgud-get-process)
+                          :help (documentation 'realgud:cmd-finish)
+                          ))
+
+    (define-key debugger-map [step]
+      (realgud-menu-item debugger-map "Step (step into)" 'realgud:cmd-step
+                        :enable '(realgud-get-process)
+                        :help (documentation 'realgud:cmd-step)
+                        ))
+
+    (define-key debugger-map [menu-bar debugger line1] '(menu-item "--"))
+
+    (define-key debugger-map [down]
+      (realgud-menu-item debugger-map "Down Stack" 'realgud:cmd-newer-frame
+                        :enable '(realgud-get-process)
+                        :help (documentation 'realgud:cmd-newer-frame)
+                        ))
+
+    (define-key debugger-map [up]
+      (realgud-menu-item debugger-map "Up Stack" 'realgud:cmd-older-frame
+                        :enable '(realgud-get-process)
+                        :help (documentation 'realgud:cmd-older-frame)
+                        ))
+
+    (define-key debugger-map [menu-bar debugger line1] '(menu-item "--"))
+
+    (define-key debugger-map [quit]
+      (realgud-menu-item debugger-map "Quit" 'realgud:cmd-quit
+                        :enable '(realgud-get-process)
+                        :help (documentation 'realgud:cmd-quit)
+                        ))
+
+    (define-key debugger-map [restart]
+      (realgud-menu-item debugger-map "Restart" 'realgud:cmd-restart
+                        :enable '(realgud-get-process)
+                        :help (documentation 'realgud:cmd-restart)
+                        ))
+
+    (define-key debugger-map [eval]
+      (realgud-menu-item debugger-map "Evaluate region or string" 
'realgud:cmd-eval-dwim
+                        :enable '(realgud-get-process)
+                        :help (documentation 'realgud:cmd-eval-dwim)
+                        ))
+
+    (define-key debugger-map [Recenter]
+      (realgud-menu-item debugger-map "Recenter" 'realgud-recenter-arrow
+                        :enable '(realgud-get-process)
+                        :help (documentation 'realgud-recenter-arrow)
+                        ))
+    ;; Put them in the menu bar:
+    (setq menu-bar-final-items (append '(debugger) menu-bar-final-items))
+    map
+  ))
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/regexp.el 
b/packages/realgud/realgud/common/regexp.el
new file mode 100644
index 0000000..e21de25
--- /dev/null
+++ b/packages/realgud/realgud/common/regexp.el
@@ -0,0 +1,76 @@
+;; Copyright (C) 2010-2011, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;; FIXME - think of a better name.
+;;;
+;;; Debugger regular expressions for many kinds of
+;;;  debuggers
+
+;;; Here we have hash tables used in each kind of debugger
+;;; and names for patterns matching fields in a location
+;;; structure
+
+;;; Code:
+
+;; -------------------------------------------------------------------
+;; Variables defining regular expressions (regexp:s).
+;;
+
+(eval-when-compile (require 'cl-lib))
+
+(cl-defstruct realgud-loc-pat
+  "Information to match and extract position and other related information 
typically
+output by a debugger inside a process shell"
+  (num)                ;; General number. Could be for example
+                      ;; breakpoint number,
+  (string)             ;; General string, Could be for example a list of
+                       ;; breakpoint number. Or can be used if for example
+                       ;; if we need more than one in a complicated re
+                       ;; where we can't assign a single number to a
+                       ;; file position as in Perl locations.
+  (regexp)             ;; a stack position, or thread number.
+  (file-group)         ;; Filename position in struct
+  (line-group)         ;; Line number position in struct
+  (alt-file-group)     ;; Used when regexp is too complicated and use \|
+                       ;; e.g. perldb file loc regexps
+  (alt-line-group)     ;; ditto
+  (char-offset-group)  ;; Character offset position in struct
+  (instruction-address-group)
+  (column-group)
+  (ignore-file-re)     ;; Some debuggers create pseudo files in eval strings
+                       ;; for example "(eval)" in Ruby and Perl
+  (text-group)         ;; Some source text that should found at position
+  (class-group)        ;; Java doesn't refer to files, but class names
+  (event-group)        ;; Stopping event, e.g.statement, breakpoint,
+                      ;; call, return, exception, etc.
+)
+
+(defconst realgud:regexp-captured-num  "\\([0-9]+\\)")
+
+(defvar realgud-pat-hash (make-hash-table :test 'equal)
+  "Hash key is the debugger name, a string. The values of a hash entry
+  is a realgud-loc-pat struct")
+
+(defvar realgud-command-hash (make-hash-table :test 'equal)
+  "Hash key is the debugger name, a string. The value of a hash
+  entry is a hash table mapping cannonic command name
+  debugger-specific command name. For example, for trepanning:
+  'quit' -> 'quit!'")
+
+(defvar realgud:variable-basename-hash (make-hash-table :test 'equal)
+  "Hash key is the debugger name, a string. The value of a hash
+  entry is the base name to use that variables of that debugger use.
+  For example, for 'gdb' it is 'realgud:gdb'.")
+
+(provide 'realgud-regexp)
diff --git a/packages/realgud/realgud/common/reset.el 
b/packages/realgud/realgud/common/reset.el
new file mode 100644
index 0000000..03f734b
--- /dev/null
+++ b/packages/realgud/realgud/common/reset.el
@@ -0,0 +1,58 @@
+;; Copyright (C) 2010, 2014, 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;; reset state on quit or restart
+
+(require 'load-relative)
+(require 'loc-changes)
+(require-relative-list '("bp" "fringe" "helper") "realgud-")
+(require-relative-list '("buffer/helper" "buffer/command" "buffer/source")
+                      "realgud-buffer-")
+
+(declare-function loc-changes-clear-buffer       'loc-changes)
+(declare-function realgud-bp-remove-icons        'realgud-buffer-command)
+(declare-function realgud-cmdbuf?                'realgud-buffer-command)
+(declare-function realgud-get-cmdbuf-from-srcbuf 'realgud-buffer-helper)
+(declare-function realgud-fringe-erase-history-arrows
+                 'realgud-buffer-command)
+
+(defun realgud:reset (&optional opt-buffer)
+  "Reset state prior to quitting or restarting"
+  (interactive)
+  (let* ((buf (or opt-buffer (current-buffer)))
+        (cmdbuf
+         (cond ((realgud-cmdbuf? buf) buf)
+               ((realgud-get-cmdbuf-from-srcbuf buf))
+               ('t nil))))
+    (if cmdbuf
+       (with-current-buffer cmdbuf
+         (realgud-fringe-erase-history-arrows)
+         (let ((buf-list (realgud-sget 'cmdbuf-info 'srcbuf-list)))
+           (dolist (buf buf-list buf-list)
+             (with-current-buffer buf
+               (loc-changes-clear-buffer)
+               (realgud-fringe-erase-history-arrows)
+               ;; FIXME: iterate over specific breakpoints.
+               (realgud-bp-remove-icons (point-min) (point-max))
+               )
+             (message "buffer %s" buf)
+             ))
+         (setq realgud-cmdbuf-info nil)
+         )
+      ;; else
+      (error "Unable to find command buffer from %s" buf)
+      ))
+  )
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/run.el 
b/packages/realgud/realgud/common/run.el
new file mode 100644
index 0000000..f78bd35
--- /dev/null
+++ b/packages/realgud/realgud/common/run.el
@@ -0,0 +1,205 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+; (require 'term)
+
+(require 'cl-lib)
+(require 'shell)
+(require 'load-relative)
+(require-relative-list '("core" "track" "utils") "realgud-")
+(require-relative-list '("buffer/command") "realgud-buffer-")
+
+(declare-function realgud-cmdbuf-info-in-debugger?=   'realgud-buffer-command)
+(declare-function realgud-cmdbuf-info-cmd-args=       'realgud-buffer-command)
+(declare-function realgud:track-set-debugger          'realgud-track)
+(declare-function realgud-cmdbuf-info-starting-directory= 
'realgud-buffer-command)
+(declare-function realgud-parse-command-arg           'realgud-core)
+(declare-function realgud:expand-file-name-if-exists  'realgud-core)
+(declare-function realgud:flatten                     'realgud-utils)
+
+(defvar starting-directory)
+
+(defun realgud:parse-cmd-args(args two-args opt-two-args interp-regexp 
debugger-regexp
+                                  path-args-list annotate-args)
+  "Parse command line ARGS for the annotate level and name of script to debug.
+
+ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing:
+* the command processor (e.g. bash) and it's arguments if any - a list of 
strings
+* the name of the debugger given (e.g. bashdb) and its arguments - a list of 
strings.
+  If there is no debugger, for example gdb, nodejs then nil is returned.
+* the script name and its arguments - list of strings
+* whether the annotate or emacs option was given ('-A', '--annotate' or 
'--emacs) - a boolean
+
+The script name and options mentioning paths are file expanded
+
+For example for the following input
+  (map 'list 'symbol-name
+   '(bash --norc bashdb -l . --emacs ./gcd.sh a b))
+
+we might return:
+   ((\"bash\" \"--norc\") (\"bashdb\" \"-l\" \"/tmp\" \"--emacs\") 
(\"/tmp/gcd.sh\" \"a\" \"b\") t)
+
+Note that path elements have been expanded via `expand-file-name'.
+"
+  ;; Parse the following kind of pattern:
+  ;;  [bash bash-options] bashdb bashdb-options script-name script-options
+  (let (
+       (pair)
+       ;; Things returned
+       (script-name nil)
+       (debugger-name nil)
+       (interpreter-args '())
+       (debugger-args '())
+       (script-args '())
+       (annotate-p nil))
+
+    (if (not (and args))
+       ;; Got nothing: return '(nil, nil nil nil)
+       (list interpreter-args debugger-args script-args annotate-p)
+      ;; else
+      ;; Strip off optional interpreter name
+      (when (and interp-regexp
+                (string-match interp-regexp
+                              (file-name-sans-extension
+                               (file-name-nondirectory (car args)))))
+       (setq interpreter-args (list (pop args)))
+
+       ;; Strip off compiler/intepreter-specific options
+       (while (and args
+                   (string-match "^-" (car args)))
+         (setq pair (realgud-parse-command-arg
+                     args two-args opt-two-args))
+         (nconc interpreter-args (car pair))
+         (setq args (cadr pair))))
+
+      ;; Skip to the first non-option argument.
+      (while (and args (not script-name))
+       (let ((arg (car args)))
+         (cond
+          ;; path-like options
+          ((member arg path-args-list)
+           (setq arg (pop args))
+           (nconc debugger-args
+                  (list arg (realgud:expand-file-name-if-exists
+                             (pop args)))))
+          ;; Other options with arguments.
+          ((string-match "^-" arg)
+           (setq pair (realgud-parse-command-arg
+                       args two-args opt-two-args))
+           (nconc debugger-args (car pair))
+           (setq args (cadr pair)))
+          ;; Anything else must be the script to debug.
+          (t (setq script-name (realgud:expand-file-name-if-exists arg))
+             (setq script-args (cons script-name (cdr args))))
+          )))
+      (list interpreter-args debugger-args script-args annotate-p))))
+
+(defun realgud:run-process(debugger-name script-filename cmd-args
+                                        minibuffer-history
+                                        &optional no-reset)
+  "Runs `realgud-exec-shell' with DEBUGGER-NAME SCRIPT-FILENAME
+and CMD-ARGS. If this succeeds, we save CMD-ARGS in command-buffer
+for use if we want to restart.  If we don't succeed in running
+the program, we will switch to the command buffer which shows
+details of the error. The command buffer or nil is returned.
+
+DEBUGGER-NAME is used in selecting the tracking mode inside the
+command buffer. The debugger name and SCRIPT-FILENAME are used in
+selecting a buffer name for the command buffer.
+
+Normally command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset."
+
+  (let ((cmd-buf))
+    (setq cmd-buf
+         (apply 'realgud-exec-shell debugger-name script-filename
+                (car cmd-args) no-reset (cdr cmd-args)))
+    ;; FIXME: Is there probably is a way to remove the
+    ;; below test and combine in condition-case?
+    (let ((process (get-buffer-process cmd-buf)))
+      (if (and process (eq 'run (process-status process)))
+         (progn
+           (switch-to-buffer cmd-buf)
+           (realgud:track-set-debugger debugger-name)
+           (realgud-cmdbuf-info-in-debugger?= 't)
+           (realgud-cmdbuf-info-cmd-args= cmd-args)
+           (when cmd-buf
+             (switch-to-buffer cmd-buf)
+             (when realgud-cmdbuf-info
+               (let* ((info realgud-cmdbuf-info)
+                      (cmd-args (realgud-cmdbuf-info-cmd-args info))
+                      (cmd-str  (mapconcat 'identity  cmd-args " ")))
+                 (if (boundp 'starting-directory)
+                     (realgud-cmdbuf-info-starting-directory= 
starting-directory))
+                 (set minibuffer-history
+                      (cl-remove-duplicates
+                       (cons cmd-str (eval minibuffer-history)) :from-end)
+                      ))
+               )))
+       ;; else
+       (progn
+         (if cmd-buf (switch-to-buffer cmd-buf))
+         (message "Error running command: %s" (mapconcat 'identity cmd-args " 
"))
+         )
+       )
+      )
+    cmd-buf
+    )
+  )
+
+(defun realgud:run-debugger (debugger-name query-cmdline-fn parse-cmd-args-fn
+                                          minibuffer-history
+                                          &optional opt-command-line
+                                          no-reset opt-script-name)
+  "Invoke the a debugger and start the Emacs user interface.
+
+String OPT-COMMAND-LINE specifies how to run DEBUGGER-NAME. You
+will be prompted for a command line using QUERY-CMDLINE-FN is one
+isn't supplied.
+
+OPT-COMMAND-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by PARSE-CMD-FN and path elements found by that
+are expanded using `expand-file-name'.
+
+If successful, The command buffer of the debugger process is returned.
+Otherwise nil is returned.
+"
+  (let* ((cmd-str (or opt-command-line (funcall query-cmdline-fn 
debugger-name)))
+        (cmd-args (split-string-and-unquote cmd-str))
+        (parsed-args (funcall parse-cmd-args-fn cmd-args))
+        (script-args (caddr parsed-args))
+        (script-name (or opt-script-name (car script-args)))
+        (parsed-cmd-args
+         (cl-remove-if 'nil (realgud:flatten parsed-args)))
+        )
+    (realgud:run-process debugger-name script-name parsed-cmd-args
+                        minibuffer-history no-reset)
+    )
+  )
+
+(provide-me "realgud:")
+
+;; Local Variables:
+;; byte-compile-warnings: (not cl-functions)
+;; End:
diff --git a/packages/realgud/realgud/common/send.el 
b/packages/realgud/realgud/common/send.el
new file mode 100644
index 0000000..81edf16
--- /dev/null
+++ b/packages/realgud/realgud/common/send.el
@@ -0,0 +1,266 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+(require 'comint)
+(require 'eshell)
+(require 'load-relative)
+(require-relative-list '("utils" "window") "realgud-")
+(require-relative-list '("buffer/helper") "realgud-buffer-")
+
+(declare-function realgud-get-cmdbuf        'realgud-buffer-helper)
+(declare-function realgud-window-cmd-undisturb-src 'realgud-window)
+(declare-function comint-goto-process-mark  'comint)
+(declare-function comint-send-input         'comint)
+(declare-function realgud:canonic-major-mode 'realgud-utils)
+
+(defun realgud:send-input ()
+  "Sends command buffer line either to comint or eshell"
+  (interactive)
+  (let ((mode (realgud:canonic-major-mode)))
+    (ignore-errors
+      (cond ((eq mode 'eshell)
+            (eshell-send-input))
+           ((eq mode 'comint)
+            (comint-send-input))
+           ))))
+
+(defun realgud:send-command-common (process command-str)
+  "Assume we are in a comint buffer. Insert COMMAND-STR and
+send that input onto the process."
+  (if (eq 'run (process-status process))
+      (let ((mode (realgud:canonic-major-mode)))
+       (cond ((eq mode 'eshell)
+              (goto-char eshell-last-output-end)
+              (setq eshell-last-output-start
+                    (setq realgud-last-output-start (point-marker))))
+             ((eq mode 'comint)
+              (comint-check-proc (current-buffer))
+              (comint-goto-process-mark)
+              (setq comint-last-output-start
+                   (setq realgud-last-output-start (point-marker)))))
+       (insert command-str)
+       (realgud:send-input)
+       )
+    ;; else
+    (message "Process %s not in `run' state; not issuing %s"
+            process command-str)
+    )
+  )
+
+(defalias 'comint-output-filter-orig
+  (symbol-function 'comint-output-filter))
+
+(defvar realgud-last-output-start)
+(defun fake-output-filter(process string)
+  "A process output filter that saves the results into a temporary buffer."
+  (with-current-buffer (get-buffer-create "*realgud-process-output-temp*")
+    (goto-char (point-max))
+    (set (make-local-variable 'realgud-last-output-start)
+        (point-marker))
+    (insert (concat "\n" string))
+    (goto-char (point-max))))
+
+(defun realgud-send-command-process (process command-str)
+  "Invoke debugger COMMAND adding that command and the
+results into the command buffer."
+  (fset 'comint-output-filter (symbol-function 'fake-output-filter))
+  (apply comint-input-sender (list process command-str))
+  (sit-for 0.25) ;; FIXME with something better
+  (fset 'comint-output-filter (symbol-function 'comint-output-filter-orig))
+  )
+
+;; Here are some other possibilities for functions.
+;; Comint-specific: doesn't insert input into the buffer which is
+;; what gud-call does.
+;;   (apply comint-input-sender (list proc command))
+;;
+;; Works on any process-oriented buffer, not just comint.
+;;   (process-send-string (get-buffer-process (current-buffer))
+;;                        (concat command "\n"))
+
+
+(defun realgud-send-command (command &optional opt-send-fn opt-buffer)
+  "Invoke the debugger COMMAND adding that command and the
+results into the command buffer."
+  (let* ((cmdbuf (realgud-get-cmdbuf opt-buffer))
+        (send-command-fn (or opt-send-fn (function 
realgud:send-command-common)))
+        )
+    (if cmdbuf
+       (with-current-buffer cmdbuf
+         (let ((process (get-buffer-process cmdbuf)))
+           (unless process
+             (realgud-cmdbuf-info-in-debugger?= nil)
+             (error "Command process buffer is not running")
+             )
+           (if (realgud-sget 'cmdbuf-info 'in-debugger?)
+               (funcall send-command-fn process command)
+             (error "Command buffer doesn't think a debugger is running - Use 
`realgud-cmdbuf-toggle-in-debugger?' to toggle")
+             )
+           ))
+      (error "Can't find command process buffer")
+      )))
+
+(defun realgud-send-command-invisible (command-str)
+  (realgud-send-command command-str (function realgud-send-command-process)))
+
+(defvar realgud-expand-format-overrides nil
+  "An alist of overrides for `realgud-expand-format'.
+Each element should have the form (KEY . VALUE).  Key should be a
+single-character escape accepted by `realgud-expand-format';
+value should be a string.  Every time %KEY is encountered in te
+string, it will be replaced by VALUE instead of being processed
+as usual.  If VALUE is nil, the override is ignored.")
+
+(defun realgud-expand-format (fmt-str &optional opt-str opt-buffer)
+  "Expands commands format characters inside FMT-STR.
+OPT-STR is an optional string (used with %p and %s).  Values are
+taken from current buffer, or OPT-BUFFER if non-nil.  Some
+%-escapes in the string arguments are expanded.  These are:
+
+  %f -- Name without directory of current source file.
+  %F -- Name without directory or extension of current source file.
+  %x -- Name of current source file.
+  %X -- Expanded name of current source file.
+  %d -- Directory of current source file.
+  %l -- Number of current source line.
+  %c -- Fully qualified class name derived from the expression
+        surrounding point.
+  %p -- Value of OPT-STR, converted to string using `int-to-string'
+  %s -- Value of OPT-STR.
+
+%p and %s are replaced by an empty string if OPT-STR is nil."
+  (let* ((buffer (or opt-buffer (current-buffer)))
+        (srcbuf (realgud-get-srcbuf buffer))
+        (src-file-name (and srcbuf (buffer-file-name srcbuf)))
+        result)
+    (while (and fmt-str
+               (let ((case-fold-search nil))
+                 (string-match "\\([^%]*\\)%\\([dfFlpxXs]\\)" fmt-str)))
+      (let* ((key-str (match-string 2 fmt-str))
+            (key (string-to-char key-str)))
+       (setq result
+             (concat
+              result (match-string 1 fmt-str)
+              (cond
+               ((cdr (assq key realgud-expand-format-overrides)))
+               ((eq key ?d)
+                (or (and src-file-name
+                         (file-name-directory src-file-name))
+                    "*source-file-not-found-for-%d"))
+               ((eq key ?f)
+                (or (and src-file-name
+                         (file-name-nondirectory src-file-name))
+                    "*source-file-not-found-for-%f*"))
+               ((eq key ?F)
+                (or (and src-file-name
+                         (file-name-sans-extension
+                          (file-name-nondirectory src-file-name)))
+                    "*source-file-not-found-for-%F"))
+               ((eq key ?l)
+                (if srcbuf
+                    (with-current-buffer srcbuf
+                      (int-to-string
+                       (save-restriction
+                         (widen)
+                         (+ (count-lines (point-min) (point))
+                            (if (bolp) 1 0)))))
+                  "source-buffer-not-found-for-%l"))
+               ((eq key ?x)
+                (or (and src-file-name src-file-name)
+                    "*source-file-not-found-for-%x"))
+               ((eq key ?X)
+                (or (and src-file-name (expand-file-name src-file-name))
+                    "*source-file-not-found-for-%X"))
+               ;; ((eq key ?e)
+               ;;  (gud-find-expr))
+               ;; ((eq key ?a)
+               ;;  (gud-read-address))
+               ;; ((eq key ?c)
+               ;;   (gud-find-class srcbuf))
+                ((eq key ?p) (if opt-str (int-to-string opt-str) ""))
+                ((eq key ?s) (or opt-str ""))
+                (t key)))))
+      (setq fmt-str (substring fmt-str (match-end 2))))
+    ;; There might be text left in FMT-STR when the loop ends.
+    (concat result fmt-str)))
+
+(defun realgud-command (fmt &optional arg no-record? frame-switch? 
realgud-prompts?)
+  "Sends a command to the process associated with the command
+buffer of the current buffer. A bit of checking is done before
+sending the command to make sure that we can find a command
+buffer, and that it has a running process associated with it.
+
+FMT is a string which may contain format characters that are
+expanded. See `realgud-expand-format' for a list of the format
+characters and their meanings.
+
+If NO-RECORD? is set, the command won't be recorded in the
+position history. This is often done in status and information
+gathering or frame setting commands and is generally *not* done
+in commands that continue execution.
+
+If FRAME-SWITCH? is set, the fringe overlay array icon is set to
+indicate the depth of the frame.
+
+If REALGUD-PROMPTS? is set, then then issuing the command will cause a
+debugger prompt.
+"
+  (interactive "sCommand (may contain format chars): ")
+  (let* ((command-str (realgud-expand-format fmt arg))
+        (cmd-buff (realgud-get-cmdbuf))
+        )
+    (unless cmd-buff
+      (error "Can't find command buffer for buffer %s" (current-buffer)))
+
+    ;; Display the expanded command in the message area unless the
+    ;; current buffer is the command buffer.
+    (unless (realgud-cmdbuf?)
+      (message "Command: %s" command-str))
+
+    (with-current-buffer cmd-buff
+      (let* ((process (get-buffer-process cmd-buff))
+            (last-output-end (point-marker))
+            (in-srcbuf? (realgud-sget 'cmdbuf-info 'in-srcbuf?))
+            )
+       (unless process
+         (error "Can't find process for command buffer %s" cmd-buff))
+       (unless (eq 'run (process-status process))
+         (error "Process %s isn't running; status %s" process
+                (process-status process)))
+
+       (realgud-cmdbuf-info-no-record?= no-record?)
+       (realgud-cmdbuf-info-frame-switch?= frame-switch?)
+
+       ;; Down the line we may handle prompting in a more
+       ;; sophisticated way. But for now, we handle this by forcing
+       ;; display of the command buffer.
+       (if realgud-prompts? (realgud-window-cmd-undisturb-src nil 't))
+
+       (realgud-send-command command-str (function 
realgud:send-command-common))
+
+       ;; Wait for the process-mark to change before changing variables
+       ;; that effect the hook processing.
+       (while (and (eq 'run (process-status process))
+                   (equal last-output-end (process-mark process)))
+         (sit-for 0))
+
+       ;; Reset temporary hook-processing variables to their default state.
+       (realgud-cmdbuf-info-no-record?= nil)
+       (realgud-cmdbuf-info-frame-switch?=  nil)
+       ))))
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/shortkey.el 
b/packages/realgud/realgud/common/shortkey.el
new file mode 100644
index 0000000..43c741f
--- /dev/null
+++ b/packages/realgud/realgud/common/shortkey.el
@@ -0,0 +1,221 @@
+;; Copyright (C) 2010-2015 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+(require 'load-relative)
+(require-relative-list '("custom" "eval" "helper" "key" "lochist" "loc"
+                        "menu")
+                      "realgud-")
+(require-relative-list '("buffer/command" "buffer/helper" "buffer/source")
+                      "realgud-buffer-")
+
+(eval-when-compile
+  (defvar realgud:tool-bar-map) ;; Fully defined in track-mode
+)
+
+
+(declare-function realgud-cmdbuf?                       
'realgud-buffer-command)
+(declare-function realgud:debugger-name-transform       'realgud-helper)
+(declare-function realgud-get-cmdbuf                    'realgud-buffer-helper)
+(declare-function realgud:follow-mark                   'realgud-follow)
+(declare-function realgud-loc-hist-item-at              'realgud-lochist)
+(declare-function realgud-cmdbuf-loc-hist               'realgud-command)
+(declare-function realgud-populate-debugger-menu        'realgud-menu)
+(declare-function realgud-populate-common-keys          'realgud-key)
+(declare-function realgud-populate-src-buffer-map-plain 'realgud-key)
+(declare-function realgud-srcbuf-info-short-key?=,      'realgud-source)
+(declare-function realgud-srcbuf-info-was-read-only?=   'realgud-source)
+(declare-function realgud-srcbuf-info-prev-local-map=   'realgud-source)
+(declare-function realgud-srcbuf?                       'realgud-buffer-source)
+
+;; (defvar realgud::tool-bar-map) ;; fully defined in track-mode.el
+
+(defvar realgud:shortkey-mode-map
+  (let ((map (make-sparse-keymap)))
+    (suppress-keymap map)
+    (realgud-populate-debugger-menu map)
+    (realgud-populate-common-keys map)
+    (realgud-populate-src-buffer-map-plain map)
+    (define-key map "1"        'realgud-goto-arrow1)
+    (define-key map "2"        'realgud-goto-arrow2)
+    (define-key map "3"        'realgud-goto-arrow3)
+    (define-key map "4"        'realgud:goto-loc-hist-4)
+    (define-key map "5"        'realgud:goto-loc-hist-5)
+    (define-key map "6"        'realgud:goto-loc-hist-6)
+    (define-key map "7"        'realgud:goto-loc-hist-7)
+    (define-key map "8"        'realgud:goto-loc-hist-8)
+    (define-key map "9"        'realgud:goto-loc-hist-9)
+    (define-key map "b"        'realgud:cmd-break)
+    (define-key map "j"        'realgud:cmd-jump)
+    (define-key map "c"        'realgud:cmd-continue)
+    (define-key map "e"        'realgud:cmd-eval-dwim)
+    (define-key map "U"        'realgud:cmd-until)
+    (define-key map [mouse-2]  'realgud:tooltip-eval)
+    (define-key map [left-fringe mouse-1] #'realgud-cmds--mouse-add-remove-bp)
+    (define-key map [left-margin mouse-1] #'realgud-cmds--mouse-add-remove-bp)
+
+    ;; FIXME: these can go to a common routine
+    (define-key map "<"        'realgud:cmd-newer-frame)
+    (define-key map ">"        'realgud:cmd-older-frame)
+    (define-key map "d"        'realgud:cmd-newer-frame)
+    (define-key map "u"        'realgud:cmd-older-frame)
+    (define-key map "l"        'realgud-recenter-arrow)
+    (define-key map "C"        'realgud-window-cmd-undisturb-src)
+    (define-key map "I"        'realgud:cmdbuf-info-describe)
+    (define-key map "S"        'realgud-window-src-undisturb-cmd)
+
+    (define-key map "R"        'realgud:cmd-restart)
+    (define-key map "!"        'realgud:cmd-shell)
+    (define-key map [insert]   'realgud-short-key-mode)
+    (define-key map [(control x)(control q)] 'realgud-short-key-mode)
+    map)
+  "Keymap used in `realgud-short-key-mode'.")
+
+;; Implementation note: This is the mode that does all the work, it's
+;; local to the buffer that is affected.
+(define-minor-mode realgud-short-key-mode
+  "Minor mode with short keys for source buffers for the `realgud' debugger.
+If `realgud-srcbuf-lock' is set, the buffer is read-only when the
+minor mode is active.
+
+\\{realgud:shortkey-mode-map}"
+  :group 'realgud
+  :global nil
+  :init-value nil
+  :lighter " ShortKeys"
+  :keymap realgud:shortkey-mode-map
+  ;; executed on activation/deactivation:
+  (realgud-short-key-mode-setup realgud-short-key-mode))
+
+(defun realgud-get-short-key-mode-map (cmdbuf)
+  (when (realgud-cmdbuf? cmdbuf)
+    (with-current-buffer cmdbuf
+      (let* ((info realgud-cmdbuf-info)
+            (debugger-name (realgud-cmdbuf-info-debugger-name info))
+            (base-variable-name
+             (or (gethash debugger-name realgud:variable-basename-hash)
+             debugger-name))
+            (keymap-symbol
+             (intern
+              (replace-regexp-in-string
+               "\\." ""
+               (concat base-variable-name "-short-key-mode-map"))))
+            (keymap (eval keymap-symbol))
+            )
+       (cond ((keymapp keymap) keymap)
+             ('t nil))
+       ))
+    ))
+
+(defun realgud-short-key-mode-setup (mode-on?)
+  "Set up or tear down `realgud-short-key-mode'.
+MODE-ON? is a boolean indicating whether the mode should be
+turned on or off."
+  (setq realgud-short-key-mode mode-on?)
+  ;; When enabling, try to find a command buffer to attach to.
+  (when (and realgud-short-key-mode (not (realgud--ensure-attached)))
+    (setq realgud-short-key-mode nil))
+  ;; Now apply mode change
+  (cond
+   ;; Mode was just enabled
+   (realgud-short-key-mode
+    ;; Record info to restore it when disabling
+    (unless (equal (realgud-sget 'srcbuf-info 'short-key?) 
realgud-short-key-mode)
+      (realgud-srcbuf-info-prev-local-map= (current-local-map))
+      (realgud-srcbuf-info-was-read-only?= buffer-read-only))
+    ;; Apply local map
+    (let ((keymap (realgud-get-short-key-mode-map (realgud-get-cmdbuf))))
+      (when keymap (use-local-map keymap)))
+    ;; Finish setting up
+    (set (make-local-variable 'tool-bar-map) realgud:tool-bar-map)
+    (local-set-key [m-insert] #'realgud-short-key-mode)
+    (setq buffer-read-only realgud-srcbuf-lock)
+    (run-mode-hooks 'realgud-short-key-mode-hook))
+   ;; Mode was just disabled
+   (t
+    (kill-local-variable 'tool-bar-map)
+    (when (realgud-srcbuf-info-set?)
+      ;; Restore previous state
+      (use-local-map (realgud-sget 'srcbuf-info 'prev-local-map))
+      (setq buffer-read-only (realgud-sget 'srcbuf-info 'was-read-only?)))))
+  ;; Record state
+  (when (realgud-srcbuf-info-set?)
+    (realgud-srcbuf-info-short-key?= realgud-short-key-mode)))
+
+(defun realgud-short-key-mode-off ()
+  "Turn off `realgud-short-key-mode' in all buffers."
+  (interactive)
+  (save-excursion
+      (dolist (buf (buffer-list))
+        (set-buffer buf)
+        (when realgud-short-key-mode
+         (realgud-short-key-mode -1)))))
+
+(defun realgud-populate-src-buffer-map (map)
+  "Bind all common keys and menu used in src buffers.
+This includes the keys bound to `realgud-key-prefix' (typically C-x
+C-a)."
+  (realgud-populate-src-buffer-map-plain map)
+  (realgud-populate-common-keys map)
+  (let ((prefix-map (make-sparse-keymap)))
+    (realgud-populate-debugger-menu map)
+    (realgud-populate-src-buffer-map-plain prefix-map)
+    (define-key map realgud-key-prefix prefix-map)))
+
+(defun realgud:goto-loc-hist(num)
+  "Go to position nth from the newest position."
+  (let ((cmdbuf (realgud-get-cmdbuf)))
+    (if cmdbuf
+      (let* ((loc-hist (realgud-cmdbuf-loc-hist cmdbuf))
+           (loc (realgud-loc-hist-item-at loc-hist (- num)))
+           (loc-marker (realgud-loc-marker loc)))
+       (realgud:follow-mark loc-marker))
+      ;; else
+       (message "No command buffer associated with this buffer")
+    )))
+
+
+(defun realgud:goto-loc-hist-4 ()
+  "Go to position 4th from the newest position."
+  (interactive)
+  (realgud:goto-loc-hist 4))
+
+(defun realgud:goto-loc-hist-5 ()
+  "Go to position 5th from the newest position."
+  (interactive)
+  (realgud:goto-loc-hist 5))
+
+(defun realgud:goto-loc-hist-6 ()
+  "Go to position 6th from the newest position."
+  (interactive)
+  (realgud:goto-loc-hist 6))
+
+(defun realgud:goto-loc-hist-7 ()
+  "Go to position 7th from the newest position."
+  (interactive)
+  (realgud:goto-loc-hist 7))
+
+(defun realgud:goto-loc-hist-8 ()
+  "Go to position 8th from the newest position."
+  (interactive)
+  (realgud:goto-loc-hist 8))
+
+(defun realgud:goto-loc-hist-9 ()
+  "Go to position 9th from the newest position."
+  (interactive)
+  (realgud:goto-loc-hist 9))
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/track-mode.el 
b/packages/realgud/realgud/common/track-mode.el
new file mode 100644
index 0000000..4f58428
--- /dev/null
+++ b/packages/realgud/realgud/common/track-mode.el
@@ -0,0 +1,239 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;; tracks shell output
+
+(require 'shell)
+
+(require 'load-relative)
+(require-relative-list
+ '("core"   "helper" "track" "loc" "lochist" "file"
+   "fringe" "window" "regexp" "menu" "backtrace-mode"
+   "send"   "shortkey" "utils") "realgud-")
+
+(require-relative-list  '("buffer/command") "realgud-buffer-")
+
+;; FIXME figure out if I can put this in something like a header file.
+(declare-function realgud-fringe-erase-history-arrows 'realgud-buffer-command)
+(declare-function realgud:track-set-debugger          'realgud-track)
+(declare-function realgud-populate-debugger-menu      'realgud-menu)
+(declare-function realgud-cmdbuf-info-divert-output?=
+                 'realgud-buffer-command)
+(declare-function realgud-cmdbuf-info-prior-prompt-regexp=
+                 'realgud-buffer-command)
+(declare-function realgud-cmdbuf-info-set?
+                 'realgud-buffer-command)
+(declare-function realgud:canonic-major-mode
+                 'realgud-utils)
+
+(defvar realgud-track-mode-map
+  (let ((map  (copy-keymap shell-mode-map)))
+    (realgud-populate-debugger-menu map)
+    (define-key map "\r"       'realgud:send-input)
+    (define-key map [M-right]  'realgud-track-hist-newest)
+    (define-key map [M-down]   'realgud-track-hist-newer)
+    (define-key map [M-up]     'realgud-track-hist-older)
+    (define-key map [M-print]  'realgud-track-hist-older)
+    (define-key map [M-S-down] 'realgud-track-hist-newest)
+    (define-key map [M-S-up]   'realgud-track-hist-oldest)
+    (define-key map "\C-cS" 'realgud-window-src-undisturb-cmd)
+    (define-key map (kbd "C-c !d") 'realgud:goto-debugger-loc-line)
+    map)
+  "Keymap used in `realgud-track-minor-mode'.
+
+\\{realgud-track-mode-map}")
+
+
+(defvar realgud:tool-bar-map
+  (let ((map (make-sparse-keymap)))
+    (dolist (x '((realgud:cmd-break . "gud/break")
+                ;; (realgud:cmd-remove . "gud/remove")
+                ;; (realgud:cmd-print . "gud/print")
+                ;; (realgud:cmd-pstar . "gud/pstar")
+                ;; (realgud:cmd-pp . "gud/pp")
+                ;; (realgud:cmd-watch . "gud/watch")
+                (realgud:cmd-restart . "gud/run")
+                ;; (realgud:cmd-go . "gud/go")
+                ;; (realgud:cmd-stop-subjob . "gud/stop")
+                (realgud:cmd-continue . "gud/cont")
+                (realgud:cmd-until . "gud/until")
+                (realgud:cmd-next . "gud/next")
+                (realgud:cmd-step . "gud/step")
+                (realgud:cmd-finish . "gud/finish")
+                ;; (realgud:cmd-nexti . "gud/nexti")
+                ;; (realgud:cmd-stepi . "gud/stepi")
+                (realgud:cmd-older-frame . "gud/up")
+                (realgud:cmd-newer-frame . "gud/down")
+                (realgud:cmdbuf-info-describe . "info"))
+              map)
+      (tool-bar-local-item-from-menu
+       (car x) (cdr x) map realgud-track-mode-map)))
+  "toolbar use when `realgud' interface is active"
+  )
+
+(define-minor-mode realgud-track-mode
+  "Minor mode for tracking debugging inside a process shell."
+  :init-value nil
+  :global nil
+  :group 'realgud
+
+  :lighter
+  (:eval (progn
+          (concat " "
+                  (if (realgud-cmdbuf-info-set?)
+                      (realgud-sget 'cmdbuf-info 'debugger-name)
+                    "dbgr??"))))
+
+  :keymap realgud-track-mode-map
+  ;; Setup/teardown
+  (realgud-track-mode-setup realgud-track-mode)
+  )
+
+;; FIXME: this should have been picked up by require'ing track.
+(defvar realgud-track-divert-string)
+
+(defun realgud-track-mode-setup (mode-on?)
+  "Called when entering or leaving `realgud-track-mode'. Variable
+MODE-ON is a boolean which specifies if we are going into or out
+of this mode."
+  (if mode-on?
+      (let ((process (get-buffer-process (current-buffer))))
+       (unless process
+         (setq realgud-track-mode nil)
+         (error "Can't find a process for buffer %s" (current-buffer)))
+
+       (setq realgud-track-divert-string "")
+       (setq realgud-track-mode 't)
+
+       ;; FIXME: save and chain process-sentinel via
+       ;; (process-sentinel (get-buffer-process (current-buffer)))
+       (set-process-sentinel process 'realgud-term-sentinel)
+       (unless (and (realgud-cmdbuf-info-set?)
+                    (realgud-sget 'cmdbuf-info 'debugger-name))
+         (call-interactively 'realgud:track-set-debugger))
+       (if (boundp 'comint-last-output-start)
+           (progn
+             (realgud-cmdbuf-info-prior-prompt-regexp= comint-prompt-regexp)
+             (realgud-cmdbuf-info-divert-output?= nil)
+             (let* ((regexp-hash
+                     (and (realgud-cmdbuf-info? realgud-cmdbuf-info)
+                          (realgud-sget 'cmdbuf-info 'regexp-hash)))
+                    (prompt-pat (and regexp-hash
+                                     (gethash "prompt" regexp-hash))))
+               (if prompt-pat
+                   (setq comint-prompt-regexp
+                           (realgud-loc-pat-regexp prompt-pat)))))
+         (set-marker comint-last-output-start (point)))
+
+       (set (make-local-variable 'tool-bar-map) realgud:tool-bar-map)
+       (let ((mode (realgud:canonic-major-mode)))
+         (cond ((eq mode 'eshell)
+                (add-hook 'eshell-output-filter-functions
+                          'realgud-track-eshell-output-filter-hook))
+               ((eq mode 'comint)
+                (add-hook 'comint-output-filter-functions
+                          'realgud-track-comint-output-filter-hook))
+               ))
+       (run-mode-hooks 'realgud-track-mode-hook))
+  ;; else
+    (progn
+      (if (and (boundp 'comint-last-output-start) realgud-cmdbuf-info)
+       (setq comint-prompt-regexp
+          (realgud-sget 'cmdbuf-info 'prior-prompt-regexp))
+       )
+      (kill-local-variable 'realgud:tool-bar-map)
+      (realgud-fringe-erase-history-arrows)
+      (let ((mode (realgud:canonic-major-mode)))
+       (cond ((eq mode 'eshell)
+              (remove-hook 'eshell-output-filter-functions
+                   'realgud-track-eshell-output-filter-hook))
+             ((eq mode 'comint)
+              (remove-hook 'comint-output-filter-functions
+                           'realgud-track-comint-output-filter-hook))
+             ))
+      (let* ((cmd-process (get-buffer-process (current-buffer)))
+            (status (if cmd-process
+                        (list (propertize (format ":%s"
+                                                  (process-status cmd-process))
+                           'face 'debugger-running))
+                      ""))
+            )
+       (setq mode-line-process status)
+       ;; Force mode line redisplay soon.
+       (force-mode-line-update)
+       ;; FIXME: This is a workaround. Without this, we comint doesn't
+       ;; process commands
+       (unless (member 'comint-mode minor-mode-list) (comint-mode))
+       )
+
+      ;; FIXME: restore/unchain old process sentinels.
+      )
+    )
+  )
+
+;; For name == "trepan", produces:
+;;   (defvar trepan-track-mode nil
+;;     "Non-nil if using trepan track-mode ... "
+;;   (defvar trepan-track-mode-map (make-sparse-keymap))
+;;   (defvar trepan-short-key-mode-map (make-sparse-keymap))
+;;   (set-keymap-parent trepan-short-key-mode-map realgud-short-key-mode-map)
+(defmacro realgud-track-mode-vars (name)
+  `(progn
+     (defvar ,(intern (concat name "-track-mode")) nil
+       ,(format "Non-nil if using %s-track-mode as a minor mode of some other 
mode.
+Use the command `%s-track-mode' to toggle or set this variable." name name))
+     (defvar ,(intern (concat name "-track-mode-map")) (make-sparse-keymap)
+       ,(format "Keymap used in `%s-track-mode'." name))
+     (defvar ,(intern (concat name "-short-key-mode-map")) 
(make-sparse-keymap))
+    ))
+
+;; FIXME: The below could be a macro? I have a hard time getting
+;; macros right.
+(defun realgud-track-mode-body(name)
+  "Used in by custom debuggers: pydbgr, trepan, gdb, etc. NAME is
+the name of the debugger which is used to preface variables."
+  (realgud:track-set-debugger name)
+  (funcall (intern (concat "realgud-define-" name "-commands")))
+  (if (intern (concat name "-track-mode"))
+      (progn
+       (setq realgud-track-mode 't)
+       (run-mode-hooks (intern (concat name "-track-mode-hook"))))
+    (progn
+      (setq realgud-track-mode nil)
+      )))
+
+(defun realgud:track-mode-disable()
+  "Disable the debugger track-mode hook"
+  (interactive "")
+  (if realgud-track-mode
+      (progn
+       (setq realgud-track-mode nil)
+       ;; FIXME: for some reason, disabling trak mode also
+       ;; disables shell mode. Reinitialize it?
+       (if (equal mode-name "Shell")
+           (shell-mode))
+       )
+    (message "Debugger is not in track mode")))
+
+(defun realgud:track-mode-enable()
+  "Enable the debugger track-mode hook"
+  (interactive "")
+  (if realgud-track-mode
+      (message "Debugger track mode is already enabled.")
+    (setq realgud-track-mode t))
+  )
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/track.el 
b/packages/realgud/realgud/common/track.el
new file mode 100644
index 0000000..badb83f
--- /dev/null
+++ b/packages/realgud/realgud/common/track.el
@@ -0,0 +1,807 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+(declare-function realgud:terminate &optional cmdbuf)
+
+(defconst realgud-track-char-range 10000
+  "Max number of characters from end of buffer to search for stack entry.")
+
+;; Shell process buffers that we can hook into:
+(require 'esh-mode)
+(require 'ansi-color)
+(require 'comint)
+
+(require 'load-relative)
+(require-relative-list
+ '("core"           "file"     "fringe"
+   "helper"         "init"     "loc"    "lochist"
+   "regexp"         "shortkey" "window"
+   "bp"
+   ) "realgud-")
+
+(require-relative-list
+ '("buffer/command" "buffer/helper" "buffer/source") "realgud-buffer-")
+
+(defcustom realgud-short-key-on-tracing? nil
+"If non-nil, set short-key mode for any source buffer that is traced into"
+  :type 'symbolp
+  :group 'realgud)
+
+(declare-function fn-p-to-fn?-alias                   'realgud-helper)
+(declare-function realgud-bp-add-info                 'realgud-bp)
+(declare-function realgud-bp-del-info                 'realgud-bp)
+(declare-function realgud-bp-enable-disable-info      'realgud-bp)
+(declare-function realgud-cmdbuf-add-srcbuf           'realgud-buffer-command)
+(declare-function realgud-cmdbuf-debugger-name        'realgud-buffer-command)
+(declare-function realgud-cmdbuf-info-bp-list=        'realgud-buffer-command)
+(declare-function realgud-cmdbuf-info-divert-output?= 'realgud-buffer-command)
+(declare-function realgud-cmdbuf-info-in-debugger?    'realgud-buffer-command)
+(declare-function realgud-cmdbuf-info-in-debugger?=   'realgud-buffer-command)
+(declare-function realgud-cmdbuf-info-last-input-end= 'realgud-buffer-command)
+(declare-function realgud-cmdbuf-init                 'realgud-buffer-command)
+(declare-function realgud-cmdbuf-loc-hist             'realgud-buffer-command)
+(declare-function realgud-cmdbuf-mode-line-update     'realgud-buffer-command)
+(declare-function realgud-cmdbuf-mode-line-update     'realgud-buffer-command)
+(declare-function realgud-cmdbuf-pat                  'realgud-buffer-command)
+(declare-function realgud-cmdbuf?                     'realgud-buffer-command)
+(declare-function realgud-cmdbuf-info-in-srcbuf?=     'realgud-buffer-command)
+(declare-function realgud:debugger-name-transform     'realgud-helper)
+(declare-function realgud:terminate                   'realgud-core)
+(declare-function realgud:file-loc-from-line          'realgud-file)
+(declare-function realgud-fringe-history-set          'realgud-fringe)
+(declare-function realgud-get-cmdbuf                  'realgud-buffer-command)
+(declare-function realgud-get-srcbuf-from-cmdbuf      'realgud-buffer-helper)
+(declare-function realgud-loc-goto                    'realgud-loc)
+(declare-function realgud-loc-hist-add                'realgud-lochist)
+(declare-function realgud-loc-hist-index              'realgud-lochist)
+(declare-function realgud-loc-hist-item               'realgud-lochist)
+(declare-function realgud-loc?                        'realgud-loc)
+(declare-function realgud-short-key-mode-setup        'realgud-shortkey)
+(declare-function realgud-srcbuf-init-or-update       'realgud-source)
+(declare-function realgud-srcbuf-loc-hist             'realgud-source)
+(declare-function realgud-window-src                  'realgud-window)
+(declare-function realgud-window-src-undisturb-cmd    'realgud-window)
+(declare-function realgud-window-update-position      'realgud-window)
+
+(make-variable-buffer-local  (defvar realgud-track-mode))
+(fn-p-to-fn?-alias 'realgud-loc-p)
+
+(defvar realgud-track-divert-string)
+(defvar starting-directory)
+
+(defun realgud-track-comint-output-filter-hook(text)
+  "An output-filter hook custom for comint shells.  Find
+location/s, if any, and run the action(s) associated with
+finding a new location/s.  The parameter TEXT appears because it
+is part of the comint-output-filter-functions API. Instead we use
+marks set in buffer-local variables to extract text"
+
+  ;; Instead of trying to piece things together from partial text
+  ;; (which can be almost useless depending on Emacs version), we
+  ;; monitor to the point where we have the next dbgr prompt, and then
+  ;; check all text from comint-last-input-end to process-mark.
+
+  ;; FIXME: Add unwind-protect?
+  (if (and realgud-track-mode (realgud-cmdbuf? (current-buffer)))
+      (let* ((cmd-buff (current-buffer))
+            (cmd-mark (point-marker))
+            (shortkey
+             (realgud-cmdbuf-info-src-shortkey?
+              realgud-cmdbuf-info))
+            (curr-proc (get-buffer-process cmd-buff))
+            (cmdbuf-last-output-end
+             (realgud-cmdbuf-info-last-input-end realgud-cmdbuf-info))
+            (last-output-end
+             (if curr-proc
+                 (process-mark curr-proc)
+               cmdbuf-last-output-end))
+            (last-output-start (max comint-last-input-start
+                                    (- last-output-end 
realgud-track-char-range))))
+       ;; Sometimes we get called twice and the second time nothing
+       ;; changes. Guard against this.
+       (unless (= last-output-start last-output-end)
+         (unless (= last-output-end cmdbuf-last-output-end)
+           (setq last-output-start (max last-output-start
+                                        cmdbuf-last-output-end))
+           )
+         ;; Done with using old command buffer's last-input-end.
+         ;; Update that for next time.
+         (realgud-cmdbuf-info-last-input-end= last-output-start)
+         (realgud:track-from-region last-output-start
+                                    last-output-end cmd-mark cmd-buff
+                                    shortkey 't))
+       )
+    )
+  )
+
+(defun realgud-track-eshell-output-filter-hook()
+  "An output-filter hook custom for eshell shells.  Find
+location(s), if any, and run the action(s) associated with We use
+marks set in buffer-local variables to extract text"
+
+  ;; FIXME: Add unwind-protect?
+  (if realgud-track-mode
+      (lexical-let* ((cmd-buff (current-buffer))
+                    (cmd-mark (point-marker))
+                    (shortkey
+                     (realgud-cmdbuf-info-src-shortkey?
+                      realgud-cmdbuf-info))
+                    (loc (realgud:track-from-region
+                          eshell-last-output-start
+                          eshell-last-output-end cmd-mark cmd-buff
+                          shortkey)))
+       (realgud-track-loc-action loc cmd-buff 't shortkey))
+    ))
+
+(defun realgud-track-term-output-filter-hook(text)
+  "An output-filter hook custom for ansi-term shells.  Find
+location/s, if any, and run the action(s) associated with
+finding a new location/s.  The parameter TEXT appears because it
+is part of the comint-output-filter-functions API. Instead we use
+marks set in buffer-local variables to extract text"
+  (if (and realgud-track-mode (realgud-cmdbuf? (current-buffer)))
+      (realgud-track-loc text (point-marker))
+    ))
+
+(defun realgud:track-complain-if-not-in-cmd-buffer (&optional buf errorp)
+  "Complain if BUF (default: current buffer) is not a command buffer.
+With non-nil ERRORP, raise an exception.  Otherwise, print a
+message."
+  (setq buf (or buf (current-buffer)))
+  (unless (realgud-cmdbuf? buf)
+    (funcall (if errorp #'error #'message)
+             "Buffer %s is not a debugger command buffer" buf)
+    t))
+
+(defun realgud:track-from-region(from to &optional cmd-mark opt-cmdbuf
+                                     shortkey-on-tracing? no-warn-if-no-match?)
+  "Find and position a buffer at the location found in the marked region.
+
+You might want to use this function interactively after marking a
+region in a debugger-tracked shell buffer (see `realgud-track-mode')
+or a more dedicated debugger command buffer.
+
+The marked region location should match the regexp found in the
+buffer-local variable `realgud-cmdbuf-info' structure under the
+field loc-regexp. You can see what this is by
+evaluating (realgud-cmdbuf-info-loc-regexp realgud-cmdbuf-info)"
+
+  (interactive "r")
+  (if (> from to) (psetq to from from to))
+  (let* ((text (buffer-substring-no-properties from to))
+        (loc (realgud-track-loc text cmd-mark))
+        ;; If we see a selected frame number, it is stored
+        ;; in frame-num. Otherwise, nil.
+        (frame-num)
+        (text-sans-loc)
+        (bp-loc)
+        (cmdbuf (or opt-cmdbuf (current-buffer)))
+        )
+    (unless (realgud:track-complain-if-not-in-cmd-buffer cmdbuf t)
+       (if (not (equal "" text))
+           (with-current-buffer cmdbuf
+             (if (realgud-sget 'cmdbuf-info 'divert-output?)
+                 (realgud-track-divert-prompt text cmdbuf to))
+             ;; FIXME: instead of these fixed filters,
+             ;; put into a list and iterate over that.
+             (realgud-track-termination? text)
+             (setq text-sans-loc (or (realgud-track-loc-remaining text) text))
+             (realgud-track-bp-enable-disable text-sans-loc
+                                              (realgud-cmdbuf-pat 
"brkpt-enable")
+                                              't)
+             (realgud-track-bp-enable-disable text-sans-loc
+                                              (realgud-cmdbuf-pat 
"brkpt-disable")
+                                              nil)
+             (setq frame-num (realgud-track-selected-frame text))
+             (if (and frame-num (not loc))
+                 (setq loc (realgud-track-loc-from-selected-frame
+                            text cmd-mark)))
+
+             (setq bp-loc (realgud-track-bp-loc text-sans-loc cmd-mark cmdbuf))
+             (if bp-loc
+                 (let ((src-buffer (realgud-loc-goto bp-loc)))
+                   (realgud-cmdbuf-add-srcbuf src-buffer cmdbuf)
+                   (with-current-buffer src-buffer
+                     (realgud-bp-add-info bp-loc)
+                     )))
+             (if loc
+                 (let ((selected-frame
+                        (or (not frame-num)
+                            (eq frame-num (realgud-cmdbuf-pat 
"top-frame-num")))))
+                   (realgud-track-loc-action loc cmdbuf (not selected-frame)
+                                              shortkey-on-tracing?)
+                   (realgud-cmdbuf-info-in-debugger?= 't)
+                    (realgud-cmdbuf-mode-line-update))
+                (dolist (bp-loc (realgud-track-bp-delete text-sans-loc 
cmd-mark cmdbuf))
+                  (let ((src-buffer (realgud-loc-goto bp-loc)))
+                    (realgud-cmdbuf-add-srcbuf src-buffer cmdbuf)
+                    (with-current-buffer src-buffer
+                      (realgud-bp-del-info bp-loc)
+                      ))))
+              )
+          )
+        )
+    )
+  )
+
+(defun realgud-track-hist-fn-internal(fn)
+  "Update both command buffer and a source buffer to reflect the
+selected location in the location history. If we started in a
+command buffer, we stay in a command buffer. Moving inside a
+command buffer always shows the corresponding source
+file. However it is possible in shortkey mode to show only the
+source code window, even the commmand buffer is updated albeit
+unshown."
+
+  (let ((cmdbuf (realgud-get-cmdbuf (current-buffer))))
+    (if cmdbuf
+       (let* ((loc-hist (realgud-cmdbuf-loc-hist cmdbuf))
+              (window (selected-window))
+              (position (funcall fn loc-hist))
+              (stay-in-cmdbuf?
+               (or (eq (current-buffer) cmdbuf)
+                   (with-current-buffer cmdbuf
+                     (not (realgud-sget 'cmdbuf-info 'in-srcbuf?)))))
+              (loc (realgud-loc-hist-item loc-hist))
+              (srcbuf (realgud-get-srcbuf-from-cmdbuf cmdbuf loc))
+              )
+         (set-buffer (realgud-loc-goto loc))
+
+         ;; Make sure command buffer is updated
+         (realgud-window-update-position cmdbuf
+                                      (realgud-loc-cmd-marker loc))
+
+         ;; FIXME turn into fn. combine with realgud-track-loc-action.
+         (if stay-in-cmdbuf?
+             (let ((cmd-window (realgud-window-src-undisturb-cmd srcbuf)))
+               (if cmd-window (select-window cmd-window)))
+           (realgud-window-src srcbuf)
+         )
+
+         ;; Make sure source buffer is updated
+         (realgud-window-update-position srcbuf
+                                      (realgud-loc-marker loc))
+
+         (message "history position %s line %s"
+                  (realgud-loc-hist-index loc-hist)
+                  (realgud-loc-line-number loc))
+         (select-window window)))
+  ))
+
+;; FIXME: Can we dry code more via a macro?
+(defun realgud-track-hist-newer()
+  (interactive)
+  (realgud-track-hist-fn-internal 'realgud-loc-hist-newer))
+
+(defun realgud-track-hist-newest()
+  (interactive)
+  (realgud-track-hist-fn-internal 'realgud-loc-hist-newest))
+
+(defun realgud-track-hist-older()
+  (interactive)
+  (realgud-track-hist-fn-internal 'realgud-loc-hist-older))
+
+(defun realgud-track-hist-oldest()
+  (interactive)
+  (realgud-track-hist-fn-internal 'realgud-loc-hist-oldest))
+
+(defun realgud-track-loc-action (loc cmdbuf &optional not-selected-frame
+                                 shortkey-on-tracing?)
+  "If loc is valid, show loc and do whatever actions we do for
+encountering a new loc."
+  (if (realgud-loc? loc)
+      (let*
+         ((cmdbuf-loc-hist (realgud-cmdbuf-loc-hist cmdbuf))
+          (cmdbuf-local-overlay-arrow?
+           (with-current-buffer cmdbuf
+             (local-variable-p 'overlay-arrow-variable-list)))
+          (stay-in-cmdbuf?
+           (with-current-buffer cmdbuf
+             (not (realgud-sget 'cmdbuf-info 'in-srcbuf?))))
+          (shortkey-mode?
+           (with-current-buffer cmdbuf
+             (realgud-sget 'cmdbuf-info 'src-shortkey?)))
+          (srcbuf)
+          (srcbuf-loc-hist)
+          )
+
+       (setq srcbuf (realgud-loc-goto loc))
+       (realgud-srcbuf-init-or-update srcbuf cmdbuf)
+       (setq srcbuf-loc-hist (realgud-srcbuf-loc-hist srcbuf))
+       (realgud-cmdbuf-add-srcbuf srcbuf cmdbuf)
+
+       (with-current-buffer srcbuf
+         (realgud-short-key-mode-setup
+          (and shortkey-on-tracing?
+               (or realgud-short-key-on-tracing? shortkey-mode?))
+          ))
+
+        ;; Do we need to go back to the process/command buffer because other
+        ;; output-filter hooks run after this may assume they are in that
+        ;; buffer? If so, we may have to use set-buffer rather than
+       ;; switch-to-buffer in some cases.
+       (set-buffer cmdbuf)
+
+       (unless (realgud-sget 'cmdbuf-info 'no-record?)
+         (realgud-loc-hist-add srcbuf-loc-hist loc)
+         (realgud-loc-hist-add cmdbuf-loc-hist loc)
+         (realgud-fringe-history-set cmdbuf-loc-hist 
cmdbuf-local-overlay-arrow?)
+         )
+
+       ;; FIXME turn into fn. combine with realgud-track-hist-fn-internal
+       (if stay-in-cmdbuf?
+           (let ((cmd-window (realgud-window-src-undisturb-cmd srcbuf)))
+             (with-current-buffer srcbuf
+               (if (and (boundp 'realgud-overlay-arrow1)
+                        (markerp realgud-overlay-arrow1))
+                   (progn
+                     ;; Doesn't work
+                     ;; (if not-selected-frame
+                     ;;          (set-fringe-bitmap-face 'hollow-right-triangle
+                     ;;                                  
'realgud-overlay-arrow1)
+                     ;;                        ; else
+                     ;;        (set-fringe-bitmap-face 'realgud-right-triangle1
+                     ;;                                'realgud-overlay-arrow1)
+                     ;;        )
+                     (realgud-window-update-position srcbuf 
realgud-overlay-arrow1)))
+               )
+             (if cmd-window (select-window cmd-window)))
+         ; else
+         (with-current-buffer srcbuf
+           (realgud-window-src srcbuf)
+           (realgud-window-update-position srcbuf realgud-overlay-arrow1))
+         ;; reset 'in-srcbuf' to allow the command buffer to keep point focus
+         ;; when used directly. 'in-srcbuf' is set 't' early in the stack
+         ;; (prior to common command code, e.g. this) when any command is run
+         ;; from a source buffer
+         (with-current-buffer cmdbuf
+           (realgud-cmdbuf-info-in-srcbuf?= nil))
+         )
+       ))
+  )
+
+(defun realgud-track-loc(text cmd-mark &optional opt-regexp opt-file-group
+                          opt-line-group no-warn-on-no-match?
+                          opt-ignore-file-re)
+  "Do regular-expression matching to find a file name and line number inside
+string TEXT. If we match, we will turn the result into a realgud-loc struct.
+Otherwise return nil."
+
+  ;; NOTE: realgud-cmdbuf-info is a buffer variable local to the process 
running
+  ;; the debugger. It contains a realgud-cmdbuf-info "struct". In that struct 
are
+  ;; the fields loc-regexp, file-group, line-group, alt-file-group, and 
alt-line-group.
+  ;;
+  ;; By setting the the fields of realgud-cmdbuf-info appropriately, we
+  ;; can accomodate a family of debuggers -- one at a time -- for the
+  ;; buffer process.
+
+  (unless (realgud:track-complain-if-not-in-cmd-buffer)
+      (let
+         ((loc-regexp (or opt-regexp
+                          (realgud-sget 'cmdbuf-info 'loc-regexp)))
+          (file-group (or opt-file-group
+                          (realgud-sget 'cmdbuf-info 'file-group)))
+          (line-group (or opt-line-group
+                          (realgud-sget 'cmdbuf-info 'line-group)))
+          (alt-file-group (realgud-sget 'cmdbuf-info 'alt-file-group))
+          (alt-line-group (realgud-sget 'cmdbuf-info 'alt-line-group))
+          (text-group (realgud-sget 'cmdbuf-info 'text-group))
+          (ignore-file-re (or opt-ignore-file-re
+                              (realgud-sget 'cmdbuf-info 'ignore-file-re)))
+          (callback-loc-fn (realgud-sget 'cmdbuf-info 'callback-loc-fn))
+          )
+       (if loc-regexp
+           (if (string-match loc-regexp text)
+               (let* ((filename (or (match-string file-group text)
+                                    (match-string alt-file-group text)))
+                      (line-str (or (match-string line-group text)
+                                    (match-string alt-line-group text)))
+                      (source-str (and text-group
+                                       (match-string text-group text)))
+                      (lineno (string-to-number (or line-str "1")))
+                      (directory
+                       (cond ((boundp 'starting-directory) starting-directory)
+                                    (t nil)))
+                      )
+                 (when source-str
+                   (setq source-str (ansi-color-filter-apply
+                                     source-str)))
+                 (cond (callback-loc-fn
+                        (funcall callback-loc-fn text
+                                 filename lineno source-str
+                                 ignore-file-re cmd-mark))
+                       ('t
+                        (unless line-str
+                          (message "line number not found -- using 1"))
+                        (if (and filename lineno)
+                            (realgud:file-loc-from-line filename lineno
+                                                        cmd-mark
+                                                        source-str nil
+                                                        ignore-file-re
+                                                        nil
+                                                        directory
+                                                        )
+                          ;; else
+                          nil)))))
+         ;; else
+         (and (message
+               (concat "Buffer variable for regular expression pattern not"
+                        " given and not passed as a parameter"))
+               nil)))
+    )
+  )
+
+(defun realgud-track-bp-loc(text &optional cmd-mark cmdbuf ignore-file-re)
+  "Do regular-expression matching to find a file name and line number inside
+string TEXT. If we match, we will turn the result into a realgud-loc struct.
+Otherwise return nil. CMD-MARK is set in the realgud-loc object created.
+"
+
+  ; NOTE: realgud-cmdbuf-info is a buffer variable local to the process
+  ; running the debugger. It contains a realgud-cmdbuf-info "struct". In
+  ; that struct is the regexp hash to match positions. By setting the
+  ; the fields of realgud-cmdbuf-info appropriately we can accomodate a
+  ; family of debuggers -- one at a time -- for the buffer process.
+
+  (setq cmdbuf (or cmdbuf (current-buffer)))
+  (with-current-buffer cmdbuf
+    (unless (realgud:track-complain-if-not-in-cmd-buffer cmdbuf t)
+        (let* ((loc-pat (realgud-cmdbuf-pat "brkpt-set")))
+         (if loc-pat
+             (let ((bp-num-group   (realgud-loc-pat-num loc-pat))
+                   (loc-regexp     (realgud-loc-pat-regexp loc-pat))
+                   (file-group     (realgud-loc-pat-file-group loc-pat))
+                   (line-group     (realgud-loc-pat-line-group loc-pat))
+                   (text-group     (realgud-loc-pat-text-group loc-pat))
+                   (ignore-file-re (realgud-loc-pat-ignore-file-re loc-pat))
+                   )
+               (if loc-regexp
+                   (if (string-match loc-regexp text)
+                       (let* ((bp-num (match-string bp-num-group text))
+                              (filename (match-string file-group text))
+                              (line-str (match-string line-group text))
+                              (source-str (and text-group (match-string 
text-group text)))
+                              (lineno (string-to-number (or line-str "1")))
+                              )
+                         (unless line-str
+                           (message "line number not found -- using 1"))
+                         (if (and filename lineno)
+                             (let* ((directory
+                                     (cond ((boundp 'starting-directory) 
starting-directory)
+                                           (t nil)))
+                                    (loc-or-error
+                                    (realgud:file-loc-from-line
+                                     filename lineno
+                                     cmd-mark
+                                     source-str
+                                     (string-to-number bp-num)
+                                     ignore-file-re nil directory
+                                     )))
+                               (if (stringp loc-or-error)
+                                   (progn
+                                     (message loc-or-error)
+                                     ;; set to return nil
+                                     nil)
+                                 ;; else
+                                 (progn
+                                   ;; Add breakpoint to list of breakpoints
+                                   (realgud-cmdbuf-info-bp-list=
+                                    (cons loc-or-error (realgud-sget 
'cmdbuf-info 'bp-list)))
+                                   ;; Set to return location
+                                   loc-or-error)))
+                           nil)))
+                 nil))
+            nil))
+      )
+    )
+)
+
+(defun realgud-track-bp-delete(text &optional cmd-mark cmdbuf ignore-file-re)
+  "Do regular-expression matching to see if a breakpoint has been
+deleted inside string TEXT. Return a list of breakpoint locations
+of the breakpoints found in command buffer."
+
+  ; NOTE: realgud-cmdbuf-info is a buffer variable local to the process
+  ; running the debugger. It contains a realgud-cmdbuf-info "struct". In
+  ; that struct is the regexp hash to match positions. By setting the
+  ; the fields of realgud-cmdbuf-info appropriately we can accomodate a
+  ; family of debuggers -- one at a time -- for the buffer process.
+
+  (setq cmdbuf (or cmdbuf (current-buffer)))
+  (with-current-buffer cmdbuf
+    (unless (realgud:track-complain-if-not-in-cmd-buffer cmdbuf t)
+      (let* ((loc-pat (realgud-cmdbuf-pat "brkpt-del")))
+        (when loc-pat
+          (let ((bp-num-group (realgud-loc-pat-num loc-pat))
+                (loc-regexp   (realgud-loc-pat-regexp loc-pat)))
+            (when (and loc-regexp (string-match loc-regexp text))
+              (let* ((bp-nums-str (match-string bp-num-group text))
+                     (bp-num-strs (split-string bp-nums-str "[^0-9]+" t))
+                     (bp-nums (mapcar #'string-to-number bp-num-strs))
+                     (info realgud-cmdbuf-info)
+                     (all-bps (realgud-cmdbuf-info-bp-list info))
+                     (found-locs nil))
+                (dolist (loc all-bps)
+                  (when (memq (realgud-loc-num loc) bp-nums)
+                    (push loc found-locs)
+                    ;; Remove loc from breakpoint list
+                    (realgud-cmdbuf-info-bp-list=
+                     (remove loc (realgud-cmdbuf-info-bp-list info)))))
+                ;; return the locations
+                found-locs))))))))
+
+(defun realgud-track-bp-enable-disable(text loc-pat enable? &optional cmdbuf)
+  "Do regular-expression matching see if a breakpoint has been enabled or 
disabled inside
+string TEXT. If we match, we will do the action to the breakpoint found and 
return the
+breakpoint location. Otherwise return nil.
+"
+  (setq cmdbuf (or cmdbuf (current-buffer)))
+  (with-current-buffer cmdbuf
+    (if (realgud-cmdbuf?)
+       (let* ((found-loc nil))
+         (if loc-pat
+             (let ((bp-num-group (realgud-loc-pat-num loc-pat))
+                   (loc-regexp   (realgud-loc-pat-regexp loc-pat)))
+               (if (and loc-regexp (string-match loc-regexp text))
+                   (let* ((bp-num (string-to-number (match-string bp-num-group 
text)))
+                          (info realgud-cmdbuf-info)
+                          (bp-list (realgud-cmdbuf-info-bp-list info))
+                          (loc)
+                          )
+                     (while (and (not found-loc) (setq loc (car-safe bp-list)))
+                       (setq bp-list (cdr bp-list))
+                       (when (eq (realgud-loc-num loc) bp-num)
+                         (setq found-loc loc)
+                         (let ((src-buffer (realgud-loc-goto loc)))
+                           (realgud-cmdbuf-add-srcbuf src-buffer cmdbuf)
+                           (with-current-buffer src-buffer
+                             (realgud-bp-enable-disable-info bp-num enable? 
loc src-buffer)
+                             )))
+                       )
+                     ;; return the location:
+                     found-loc)
+                 nil))
+           nil))
+      (and (message "Current buffer %s is not a debugger command buffer"
+                   (current-buffer)) nil)
+      )
+    )
+)
+
+(defun realgud-track-loc-remaining(text)
+  "Return the portion of TEXT starting with the part after the
+loc-regexp pattern"
+  (if (realgud-cmdbuf?)
+      (let* ((loc-pat (realgud-cmdbuf-pat "loc"))
+            (loc-regexp (realgud-loc-pat-regexp loc-pat))
+            )
+       (if loc-regexp
+           (if (string-match loc-regexp text)
+               (substring text (match-end 0))
+             nil)
+         nil))
+    nil)
+  )
+
+(defun realgud-track-selected-frame(text)
+  "Return a selected frame number found in TEXT or nil if none found."
+  (if (realgud-cmdbuf?)
+      (let ((selected-frame-pat (realgud-cmdbuf-pat "selected-frame"))
+           (frame-num-regexp)
+           )
+       (if (and selected-frame-pat
+                (setq frame-num-regexp (realgud-loc-pat-regexp
+                                        selected-frame-pat)))
+           (if (string-match frame-num-regexp text)
+               (let ((frame-num-group (realgud-loc-pat-num 
selected-frame-pat)))
+                 (string-to-number (match-string frame-num-group text)))
+             nil)
+         nil))
+    nil)
+  )
+
+
+(defun realgud-track-loc-from-selected-frame(text cmd-mark &optional
+                                                 opt-regexp opt-ignore-file-re)
+  "Return a selected frame number found in TEXT or nil if none found."
+  (if (realgud-cmdbuf?)
+      (let ((selected-frame-pat (realgud-cmdbuf-pat "selected-frame"))
+           (frame-num-regexp)
+           (ignore-file-re (or opt-ignore-file-re
+                               (realgud-sget 'cmdbuf-info 'ignore-file-re))))
+       (if (and selected-frame-pat
+                (setq frame-num-regexp (realgud-loc-pat-regexp
+                                        selected-frame-pat)))
+           (if (string-match frame-num-regexp text)
+               (let* ((file-group (realgud-loc-pat-file-group 
selected-frame-pat))
+                      (line-group (realgud-loc-pat-line-group 
selected-frame-pat))
+                      (filename (match-string file-group text))
+                      (lineno (string-to-number (match-string line-group 
text))))
+                 (if (and filename lineno)
+                     (realgud:file-loc-from-line filename lineno
+                                                 cmd-mark nil nil 
ignore-file-re)
+                   nil))
+             nil)
+         nil))
+    nil))
+
+(defun realgud-track-termination?(text)
+  "Return 't and call `realgud:terminate' we we have a termination message"
+  (if (realgud-cmdbuf?)
+      (let ((termination-re (realgud-cmdbuf-pat "termination"))
+           )
+       (if (and termination-re (string-match termination-re text))
+           (progn
+             (realgud:terminate (current-buffer))
+             't)
+         nil)
+       )
+    )
+  )
+
+(defun realgud-track-divert-prompt(text cmdbuf to)
+  "Return a cons node of the part before the prompt-regexp and the part
+   after the prompt-regexp-prompt. If not found return nil."
+  (with-current-buffer cmdbuf
+    ;; (message "+++3 %s, buf: %s" text (buffer-name))
+    (if (realgud-cmdbuf?)
+       (let* ((prompt-pat (realgud-cmdbuf-pat "prompt"))
+              (prompt-regexp (realgud-loc-pat-regexp prompt-pat))
+              )
+         (if prompt-regexp
+             (if (string-match prompt-regexp text)
+                 (progn
+                   (setq realgud-track-divert-string
+                         (substring text 0 (match-beginning 0)))
+                   ;; We've got desired output, so reset divert output.
+                   (realgud-cmdbuf-info-divert-output?= nil)
+                   (cond ((search-backward-regexp prompt-regexp)
+                          (kill-region realgud-last-output-start (point))
+                          (goto-char (point-max)))
+                         ('t (kill-region realgud-last-output-start to)))
+                   )
+             ))
+         )
+      )
+    )
+  )
+
+(defun realgud-goto-line-for-loc-pat (pt &optional opt-realgud-loc-pat)
+  "Display the location mentioned in line described by
+PT. OPT-REALGUD-LOC-PAT is used to get regular-expresion pattern
+matching information. If not supplied we use the current buffer's \"location\"
+pattern found via realgud-cmdbuf information. nil is returned if we can't
+find a location. non-nil if we can find a location.
+"
+  (interactive "d")
+  (save-excursion
+    (goto-char pt)
+    (let*
+       ((cmdbuf (current-buffer))
+        (cmd-mark (point-marker))
+        (curr-proc (get-buffer-process cmdbuf))
+        (start (line-beginning-position))
+        (end (line-end-position))
+        (loc-pat (or opt-realgud-loc-pat (realgud-cmdbuf-pat "loc")))
+        (loc)
+        )
+      (unless (and loc-pat (realgud-loc-pat-p loc-pat))
+       (error "Can't find location information for %s" cmdbuf))
+      (setq loc (realgud-track-loc (buffer-substring-no-properties start end)
+                               cmd-mark
+                               (realgud-loc-pat-regexp loc-pat)
+                               (realgud-loc-pat-file-group loc-pat)
+                               (realgud-loc-pat-line-group loc-pat)
+                               nil
+                               (realgud-loc-pat-ignore-file-re loc-pat)
+                               ))
+      (if (stringp loc)
+         (message loc)
+       (if loc (or (realgud-track-loc-action loc cmdbuf) 't)
+         nil))
+      ))
+    )
+
+(defun realgud:track-set-debugger (debugger-name)
+  "Set debugger name and information associated with that
+debugger for the buffer process. This info is returned or nil if
+we can't find a debugger with that information.`.
+"
+  ;; FIXME: turn into fn which can be used by realgud-backtrack-set-debugger
+  (interactive
+   (list (completing-read "Debugger name: " realgud-pat-hash)))
+  (let* ((base-variable-name
+         (or (gethash debugger-name realgud:variable-basename-hash)
+             debugger-name))
+         (regexp-hash (gethash debugger-name realgud-pat-hash))
+         (command-hash (gethash debugger-name realgud-command-hash))
+       )
+    (unless regexp-hash
+      ;; FIXME: phase out realgud:debugger-name-transform
+      (setq base-variable-name (realgud:debugger-name-transform debugger-name))
+      (setq regexp-hash (gethash base-variable-name realgud-pat-hash))
+      (setq command-hash (gethash base-variable-name realgud-command-hash))
+      )
+    (if regexp-hash
+       (let* (
+              (mode-name (concat " " (capitalize base-variable-name) "-Track"))
+              (specific-track-mode (intern (concat base-variable-name 
"-track-mode")))
+              )
+         (realgud-cmdbuf-init (current-buffer)
+                               debugger-name regexp-hash
+                               command-hash base-variable-name)
+         (if (and (not (eval specific-track-mode))
+                  (functionp specific-track-mode))
+             (funcall specific-track-mode 't))
+         )
+      (progn
+       (message "I don't have %s listed as a debugger." debugger-name)
+       nil)
+      )))
+
+;; FIXME: need better name for this and next fn.
+(defun realgud-goto-line-for-pt-and-type (pt type pat-hash)
+  "Position the source code at the location that is matched by
+PAT-HASH with key TYPE. The line at PT is used as the string
+to match against and has location info embedded in it"
+  (realgud-goto-line-for-loc-pat pt (gethash type pat-hash)))
+
+
+(defun realgud-goto-line-for-pt (pt pattern-key)
+  "Position the source code at the location indicated by a
+pattern found in the command buffer with pattern-key
+PATTERN-KEY. (PATTERN-KEY is something like 'debugger-backtrace'
+or 'loc'.) The line at PT is used as the string to match against
+and has location info embedded in it"
+  (interactive "d")
+  (unless (realgud-cmdbuf?)
+    (error "You need to be in a debugger command buffer to run this"))
+  (let* ((debugger-name (realgud-cmdbuf-debugger-name))
+        (debugger-pat-hash (gethash debugger-name realgud-pat-hash)))
+    (realgud-goto-line-for-pt-and-type pt pattern-key debugger-pat-hash)
+    )
+  )
+
+(defun realgud:goto-debugger-backtrace-line (pt)
+  "Position the source code at the location indicated by matching a
+command buffer's debugger backtrace pattern against the line at PT."
+  (interactive "d")
+  (unless (realgud-goto-line-for-pt pt "debugger-backtrace")
+    (message "Line didn't match a debugger backtrace location.")
+    ))
+
+(defun realgud:goto-lang-backtrace-line (pt)
+  "Position the source code at the location indicated by matching a
+command buffer's programming-language backtrace pattern against the line at 
PT."
+  (interactive "d")
+  (unless (realgud-goto-line-for-pt pt "lang-backtrace")
+    (message "Line didn't match a programming-language backtrace location.")
+    ))
+
+(defun realgud:goto-debugger-loc-line (pt)
+  "Position the source-code at the location indicated by matching a
+command buffer's debugger location pattern against the line at PT."
+  (interactive "d")
+  (unless (realgud-goto-line-for-pt pt "loc")
+    (message "Line didn't match a debugger location indicator line.")
+    ))
+
+(provide-me "realgud-")
+
+;; Local Variables:
+;; byte-compile-warnings: (not cl-functions)
+;; End:
diff --git a/packages/realgud/realgud/common/utils.el 
b/packages/realgud/realgud/common/utils.el
new file mode 100644
index 0000000..7be79c5
--- /dev/null
+++ b/packages/realgud/realgud/common/utils.el
@@ -0,0 +1,46 @@
+;; Copyright (C) 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+(require 'load-relative)
+(require 'comint)
+(require 'eshell)
+
+(defun realgud:strip (str)
+      "Remove leading and tailing whitespace from STR."
+      (while (string-match "\\`\n+\\|^\\s-+\\|\\s-+$\\|\n+\\'"
+                           str)
+        (setq str (replace-match "" t t str)))
+      str)
+
+;; From http://rosettacode.org/wiki/Flatten_a_list#Emacs_Lisp
+(defun realgud:flatten (mylist)
+  (cond
+   ((null mylist) nil)
+   ((atom mylist) (list mylist))
+   (t
+    (append (realgud:flatten (car mylist)) (realgud:flatten (cdr mylist))))))
+
+(defun realgud:canonic-major-mode()
+  "Return
+    - 'eshell if we are in eshell-mode,
+    - 'comint if the major comint-mode or shell-mode
+Or raise an error if neither."
+
+  (cond ((eq major-mode 'eshell-mode)
+       'eshell)
+       ((or (eq major-mode 'comint-mode) (eq major-mode 'shell-mode))
+         'comint)
+       ('t (error "We can only handle comint, shell, or eshell buffers"))
+       ))
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/common/window.el 
b/packages/realgud/realgud/common/window.el
new file mode 100644
index 0000000..e922094
--- /dev/null
+++ b/packages/realgud/realgud/common/window.el
@@ -0,0 +1,180 @@
+;; Copyright (C) 2010, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+(require 'load-relative)
+(require-relative-list '("helper") "realgud-")
+(require-relative-list '("buffer/helper") "realgud-buffer-")
+
+(declare-function realgud:backtrace-init    'realgud-buffer-helper)
+(declare-function realgud-get-backtrace-buf 'realgud-buffer-helper)
+(declare-function realgud-get-cmdbuf        'realgud-buffer-helper)
+(declare-function realgud-get-srcbuf        'realgud-buffer-helper)
+(declare-function buffer-killed?            'realgud-helper)
+
+(declare-function one-window-p(bool))
+
+(defun realgud-window-update-position (buffer marker)
+  "Update BUFFER to position specified with MARKER.
+We assume MARKER points inside BUFFER"
+  (with-current-buffer buffer
+    (goto-char marker)
+    (let ((window (get-buffer-window buffer)))
+      (if window (set-window-point window marker))
+      )))
+
+
+(defun realgud-window-src ( &optional opt-buffer )
+  "Make sure the source buffer is displayed in a window
+We don't care if the command buffer is also displayed.
+See also `realgud-window-src-undisturb-cmd'"
+  (let* ((buffer (or opt-buffer (current-buffer)))
+        (src-buffer (realgud-get-srcbuf buffer))
+        (src-window (get-buffer-window src-buffer 'visible))
+        (window (selected-window)))
+    (if src-buffer
+       (unless (and src-window (not (window-minibuffer-p)))
+         (set-window-buffer window src-buffer))
+       )
+    ))
+
+(defun realgud-window-src-undisturb-cmd ( &optional opt-buffer )
+  "Make sure the source buffers is displayed in windows without
+disturbing the command window if it is also displayed. Returns
+the command window
+See also `realgud-window-src'"
+  (interactive)
+  (let* ((buffer (or opt-buffer (current-buffer)))
+        (src-buffer (realgud-get-srcbuf buffer))
+        (src-window (get-buffer-window src-buffer))
+        (cmd-buffer (realgud-get-cmdbuf buffer))
+        (cmd-window (get-buffer-window cmd-buffer))
+        (window (selected-window))
+        )
+    (if src-buffer
+       (unless src-window
+         (setq src-window
+               (if (eq window cmd-window)
+                   ;; FIXME: generalize what to do here.
+                   (if (one-window-p 't)
+                       (split-window)
+                     (next-window window 'no-minibuf))
+                 window))
+         (set-window-buffer src-window src-buffer))
+       )
+    (select-window src-window)
+    cmd-window)
+  )
+
+(defun realgud-window-cmd-undisturb-src ( &optional opt-buffer switch?)
+  "Make sure the source buffer is displayed in windows without
+disturbing the command window if it is also displayed. Returns
+the source window.
+See also `realgud-window-src'"
+  (interactive)
+  (let* ((buffer (or opt-buffer (current-buffer)))
+        (src-buffer (realgud-get-srcbuf buffer))
+        (src-window (get-buffer-window src-buffer))
+        (cmd-buffer (realgud-get-cmdbuf buffer))
+        (cmd-window (get-buffer-window cmd-buffer))
+        (window (selected-window))
+        )
+    (when cmd-buffer
+      (unless cmd-window
+       (setq cmd-window
+             (if (eq window src-window)
+                 ;; FIXME: generalize what to do here.
+                 (if (one-window-p 't)
+                     (split-window)
+                   (next-window window 'no-minibuf))
+               window))
+       (set-window-buffer cmd-window cmd-buffer)
+       )
+      (if switch?
+         (and (select-window cmd-window)
+              (switch-to-buffer cmd-buffer)))
+
+      )
+    (select-window cmd-window)
+    src-window)
+  )
+
+(defun realgud:window-bt-undisturb-src ( &optional opt-buffer switch?)
+  "Make sure the backtrace buffer is displayed in windows without
+disturbing the source window if it is also displayed. Returns
+the source window
+See also `realgud-window-src'"
+  (interactive)
+  (let* ((buffer (or opt-buffer (current-buffer)))
+        (src-buffer (realgud-get-srcbuf buffer))
+        (src-window (get-buffer-window src-buffer))
+        (cmd-buffer (realgud-get-cmdbuf buffer))
+        (cmd-window (get-buffer-window cmd-buffer))
+        (bt-buffer (realgud-get-backtrace-buf cmd-buffer))
+        (bt-window (get-buffer-window bt-buffer))
+        (window (selected-window))
+        )
+    (when cmd-buffer
+      (unless bt-window
+       (setq bt-window
+             (if (eq window src-window)
+                 ;; FIXME: generalize what to do here.
+                 (if (one-window-p 't)
+                     (split-window)
+                   (next-window window 'no-minibuf))
+               window))
+       (set-window-buffer bt-window bt-buffer)
+       )
+      (if switch?
+         (and (select-window bt-window)
+              (switch-to-buffer bt-buffer)))
+
+      )
+    src-window)
+  )
+
+(defun realgud:window-bt()
+  "Refresh backtrace information and display that in a buffer"
+  (interactive)
+  (with-current-buffer-safe (realgud-get-cmdbuf)
+    (realgud:backtrace-init)
+    (realgud:window-bt-undisturb-src)
+    )
+  )
+
+
+;; (defun realgud-window-src-and-cmd ( &optional opt-buffer )
+;;   "Make sure the source buffers is displayed in windows without
+;; disturbing the command window if it is also displayed. Returns
+;; the command window
+;; See also `realgud-window-src-window'"
+;;   (interactive)
+;;   (let* ((buffer (or opt-buffer (current-buffer)))
+;;      (src-buffer (realgud-get-srcbuf buffer))
+;;      (src-window (get-buffer-window src-buffer))
+;;      (cmd-buffer (realgud-get-cmdbuf buffer))
+;;      (cmd-window (get-buffer-window cmd-buffer))
+;;      (window (selected-window))
+;;      )
+;;     (if src-buffer
+;;     (unless src-window
+;;       (setq src-window
+;;             (if (eq window cmd-window)
+;;                 (if (one-window-p 't) (split-window) (next-window window))
+;;               window))
+;;       (set-window-buffer src-window src-buffer))
+;;     )
+;;     cmd-window)
+;;   )
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/debugger/Makefile.am 
b/packages/realgud/realgud/debugger/Makefile.am
new file mode 100644
index 0000000..5f7a769
--- /dev/null
+++ b/packages/realgud/realgud/debugger/Makefile.am
@@ -0,0 +1,8 @@
+SUBDIRS = \
+       bashdb gdb gub ipdb jdb kshdb nodejs \
+       pdb perldb rdebug remake \
+       trepan trepan2 trepan3k trepan.pl trepanjs \
+       zshdb
+EXTRA_DIST = common.mk
+
+.PHONY: check all
diff --git a/packages/realgud/realgud/debugger/bashdb/Makefile.am 
b/packages/realgud/realgud/debugger/bashdb/Makefile.am
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/bashdb/Makefile.am
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/packages/realgud/realgud/debugger/bashdb/bashdb.el 
b/packages/realgud/realgud/debugger/bashdb/bashdb.el
new file mode 100644
index 0000000..8ca9d38
--- /dev/null
+++ b/packages/realgud/realgud/debugger/bashdb/bashdb.el
@@ -0,0 +1,82 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;;  `bashdb' Main interface to bashdb via Emacs
+(require 'load-relative)
+(require-relative-list '("../../common/helper") "realgud-")
+(require-relative-list '("../../common/run")    "realgud:")
+(require-relative-list '("core" "track-mode")   "realgud:bashdb-")
+
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:bashdb nil
+  "The realgud interface to bashdb"
+  :group 'realgud
+  :version "24.3")
+
+;; -------------------------------------------------------------------
+;; User-definable variables
+;;
+
+(defcustom realgud:bashdb-command-name
+  ;;"bashdb --emacs 3"
+  "bashdb"
+  "File name for executing the bash debugger and command options.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'realgud:bashdb)
+
+;; -------------------------------------------------------------------
+;; The end.
+;;
+
+(declare-function bashdb-track-mode     'realgud-bashdb-track-mode)
+(declare-function bashdb-query-cmdline  'realgud:bashdb-core)
+(declare-function bashdb-parse-cmd-args 'realgud:bashdb-core)
+(declare-function realgud:run-debugger 'realgud:run)
+
+;;;###autoload
+(defun realgud:bashdb (&optional opt-cmd-line no-reset)
+  "Invoke the bashdb shell debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run bash. You will be prompted
+for a command line is one isn't supplied.
+
+OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `bashdb-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+"
+  (interactive)
+  (realgud:run-debugger "bashdb"
+                       'bashdb-query-cmdline
+                       'bashdb-parse-cmd-args
+                       'realgud:bashdb-minibuffer-history
+                       opt-cmd-line no-reset)
+  )
+
+(defalias 'bashdb 'realgud:bashdb)
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/debugger/bashdb/core.el 
b/packages/realgud/realgud/debugger/bashdb/core.el
new file mode 100644
index 0000000..87c371c
--- /dev/null
+++ b/packages/realgud/realgud/debugger/bashdb/core.el
@@ -0,0 +1,197 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+(require 'load-relative)
+(require-relative-list '("../../common/track" "../../common/core")
+                      "realgud-")
+(require-relative-list '("init") "realgud:bashdb-")
+
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
+(declare-function realgud-parse-command-arg  'realgud-core)
+(declare-function realgud-query-cmdline      'realgud-core)
+(declare-function realgud-suggest-invocation 'realgud-core)
+
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:bashdb-minibuffer-history nil
+  "minibuffer history list for the command `realgud:bashdb'.")
+
+(easy-mmode-defmap bashdb-minibuffer-local-map
+  '(("\C-i" . comint-dynamic-complete-filename))
+  "Keymap for minibuffer prompting of bashdb startup command."
+  :inherit minibuffer-local-map)
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun bashdb-query-cmdline (&optional opt-debugger)
+  (realgud-query-cmdline
+   'bashdb-suggest-invocation
+   bashdb-minibuffer-local-map
+   'realgud:bashdb-minibuffer-history
+   opt-debugger))
+
+;;; FIXME: DRY this with other *-parse-cmd-args routines
+(defun bashdb-parse-cmd-args (orig-args)
+  "Parse command line ORIG-ARGS for the annotate level and name of script to 
debug.
+
+ORIG-ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing:
+* the command processor (e.g. bash) and it's arguments if any - a list of 
strings
+* the name of the debugger given (e.g. bashdb) and its arguments - a list of 
strings
+* the script name and its arguments - list of strings
+* whether the annotate or emacs option was given ('-A', '--annotate' or 
'--emacs) - a boolean
+
+The script name and options mentioning paths are file expanded
+
+For example for the following input
+  (map 'list 'symbol-name
+   '(bash --norc bashdb -l . --emacs ./gcd.sh a b))
+
+we might return:
+   ((\"bash\" \"--norc\") (\"bashdb\" \"-l\" \"/tmp\" \"--emacs\") 
(\"/tmp/gcd.sh\" \"a\" \"b\") t)
+
+Note that path elements have been expanded via 
`realgud:expand-file-name-if-exists'.
+"
+
+  ;; Parse the following kind of pattern:
+  ;;  [bash bash-options] bashdb bashdb-options script-name script-options
+  (let (
+       (args orig-args)
+       (pair)          ;; temp return from
+       ;; bash doesn't have any optional two-arg options
+       (bash-opt-two-args '())
+       (bash-two-args '("o" "c"))
+
+       ;; One dash is added automatically to the below, so
+       ;; h is really -h and -host is really --host.
+       (bashdb-two-args '("A" "-annotate" "l" "-library"
+                          "c" "-command" "-t" "-tty"
+                          "x" "-eval-command"))
+       (bashdb-opt-two-args '())
+       (interp-regexp
+        (if (member system-type (list 'windows-nt 'cygwin 'msdos))
+            "^bash*\\(.exe\\)?$"
+          "^bash*$"))
+       (bashdb-two-arg-name)
+       (debugger-flag nil) ;; 't if "bash --debugger" given
+
+       ;; Things returned
+       (script-name nil)
+       (debugger-name nil)
+       (interpreter-args '())
+       (debugger-args '())
+       (script-args '())
+       (annotate-p nil))
+
+    (if (not (and args))
+       ;; Got nothing: return '(nil, nil)
+       (list interpreter-args debugger-args script-args annotate-p)
+      ;; else
+      ;; Strip off optional "bash" or "bash4" etc.
+      (when (string-match interp-regexp
+                         (file-name-sans-extension
+                          (file-name-nondirectory (car args))))
+       (setq interpreter-args (list (pop args)))
+
+       ;; Strip off bash-specific options
+       (while (and args
+                   (string-match "^-" (car args)))
+         (setq pair (realgud-parse-command-arg
+                     args bash-two-args bash-opt-two-args))
+         (if (equal "--debugger" (caar pair))
+             (setq debugger-flag 't))
+         (nconc interpreter-args (car pair))
+         (setq args (cadr pair))))
+
+      ;; Remove "bashdb" from "bashdb --bashdb-options script
+      ;; --script-options"
+      (unless debugger-flag
+       (setq debugger-name (file-name-sans-extension
+                            (file-name-nondirectory (car args))))
+       (unless (string-match "^bashdb$" debugger-name)
+         (message
+          "Expecting debugger name `%s' to be `bashdb'"
+          debugger-name))
+       (setq debugger-args (list (pop args)))
+       )
+
+      ;; Skip to the first non-option argument.
+      (while (and args (not script-name))
+       (let ((arg (car args)))
+         (cond
+          ;; Annotation or emacs option with level number.
+          ((member arg '("--annotate" "-A" "--emacs"))
+           (setq annotate-p t)
+           (nconc debugger-args (list (pop args))))
+          ;; Combined annotation and level option.
+          ((string-match "^--annotate=[0-9]" arg)
+           (nconc debugger-args (list (pop args)) )
+           (setq annotate-p t))
+          ;; Library option
+          ((member arg '("--library" "-l"))
+           (setq arg (pop args))
+           (nconc debugger-args
+                  (list arg (realgud:expand-file-name-if-exists
+                             (pop args)))))
+          ;; Other options with arguments.
+          ((string-match "^-" arg)
+           (setq pair (realgud-parse-command-arg
+                       args bashdb-two-args bashdb-opt-two-args))
+           (nconc debugger-args (car pair))
+           (setq args (cadr pair)))
+          ;; Anything else must be the script to debug.
+          (t (setq script-name (realgud:expand-file-name-if-exists arg))
+             (setq script-args (cons script-name (cdr args))))
+          )))
+      (list interpreter-args debugger-args script-args annotate-p))))
+
+;; To silence Warning: reference to free variable
+(defvar realgud:bashdb-command-name)
+
+(defun bashdb-suggest-invocation (debugger-name)
+  "Suggest a bashdb command invocation via `realgud-suggest-invocaton'"
+  (realgud-suggest-invocation realgud:bashdb-command-name
+                             realgud:bashdb-minibuffer-history
+                             "sh" "\\.\\(?:ba\\)?sh$"
+                             realgud:bashdb-command-name))
+
+(defun bashdb-reset ()
+  "Bashdb cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+  (interactive)
+  ;; (bashdb-breakpoint-remove-all-icons)
+  (dolist (buffer (buffer-list))
+    (when (string-match "\\*bashdb-[a-z]+\\*" (buffer-name buffer))
+      (let ((w (get-buffer-window buffer)))
+        (when w
+          (delete-window w)))
+      (kill-buffer buffer))))
+
+;; (defun bashdb-reset-keymaps()
+;;   "This unbinds the special debugger keys of the source buffers."
+;;   (interactive)
+;;   (setcdr (assq 'bashdb-debugger-support-minor-mode minor-mode-map-alist)
+;;       bashdb-debugger-support-minor-mode-map-when-deactive))
+
+
+(defun realgud:bashdb-customize ()
+  "Use `customize' to edit the settings of the `bashdb' debugger."
+  (interactive)
+  (customize-group 'realgud:bashdb))
+
+(provide-me "realgud:bashdb-")
diff --git a/packages/realgud/realgud/debugger/bashdb/init.el 
b/packages/realgud/realgud/debugger/bashdb/init.el
new file mode 100644
index 0000000..2c7769f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/bashdb/init.el
@@ -0,0 +1,109 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;; Regular expressions for Bash shell debugger: bashdb
+
+(eval-when-compile (require 'cl-lib))   ;For setf.
+(require 'load-relative)
+(require-relative-list '("../../common/regexp"
+                        "../../common/loc"
+                        "../../common/init")
+                      "realgud-")
+(require-relative-list '("../../lang/posix-shell") "realgud-lang-")
+
+(defvar realgud:bashdb-pat-hash)
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defvar realgud:bashdb-pat-hash (make-hash-table :test 'equal)
+  "Hash key is the what kind of pattern we want to match:
+backtrace, prompt, etc.  The values of a hash entry is a
+realgud-loc-pat struct")
+
+;; Regular expression that describes a bashdb location generally shown
+;; before a command prompt.
+;; For example:
+;;   (/etc/init.d/apparmor:35):
+(setf (gethash "loc" realgud:bashdb-pat-hash) realgud:POSIX-debugger-loc-pat)
+
+;; Top frame number
+(setf (gethash "top-frame-num" realgud:bashdb-pat-hash) 0)
+
+;; Regular expression that describes a bashdb command prompt
+;; For example:
+;;   bashdb<10>
+;;   bashdb<(5)>
+;;   bashdb<<1>>
+(setf (gethash "prompt" realgud:bashdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp  (format  "^bashdb[<]+[(]*%s[)]*[>]+ "
+                        realgud:regexp-captured-num)
+       :num 1
+       ))
+
+;;  Regular expression that describes a "breakpoint set" line
+(setf (gethash "brkpt-set" realgud:bashdb-pat-hash)
+      realgud:POSIX-debugger-brkpt-set-pat)
+
+;; Regular expression that describes a debugger "delete" (breakpoint) response.
+;; For example:
+;;   Deleted breakpoint 1.
+(setf (gethash "brkpt-del" realgud:bashdb-pat-hash)
+      realgud:POSIX-debugger-brkpt-del-pat)
+
+;; Regular expression that describes a debugger "disable" (breakpoint) 
response.
+;; For example:
+;;   Breakpoint entry 4 disabled.
+(setf (gethash "brkpt-disable" realgud:bashdb-pat-hash)
+      realgud:POSIX-debugger-brkpt-disable-pat)
+
+;; Regular expression that describes a debugger "enable" (breakpoint) response.
+;; For example:
+;;   Breakpoint entry 4 enabled.
+(setf (gethash "brkpt-enable" realgud:bashdb-pat-hash)
+      realgud:POSIX-debugger-brkpt-enable-pat)
+
+;; Regular expression that describes a debugger "backtrace" command line.
+;; For example:
+;;   ->0 in file `../bashdb/test/example/subshell.sh' at line 6
+;;   ##1 source("../bashdb/shell.sh") called from file `/bin/bashdb' at line 
140
+;;   ##2 main() called from file `/bin/bashdb' at line 0
+(setf (gethash "debugger-backtrace" realgud:bashdb-pat-hash)
+      realgud:POSIX-debugger-backtrace-pat)
+
+;; Regular expression for a termination message.
+(setf (gethash "termination" realgud:bashdb-pat-hash)
+       "^bashdb: That's all, folks...\n")
+
+(setf (gethash "font-lock-keywords" realgud:bashdb-pat-hash)
+      realgud:POSIX-debugger-font-lock-keywords)
+
+(setf (gethash "bashdb" realgud-pat-hash) realgud:bashdb-pat-hash)
+
+(defvar realgud:bashdb-command-hash (make-hash-table :test 'equal)
+  "Hash key is command name like 'quit' and the value is
+  the bashdb command to use, like 'quit!'")
+
+(setf (gethash "bashdb" realgud-command-hash) realgud:bashdb-command-hash)
+
+(setf (gethash "clear"  realgud:bashdb-command-hash) "clear %l")
+(setf (gethash "quit"   realgud:bashdb-command-hash) "quit")
+(setf (gethash "until"  realgud:bashdb-command-hash) "continue %l")
+
+;; Unsupported features:
+(setf (gethash "jump"  realgud:bashdb-command-hash) "*not-implemented*")
+
+(provide-me "realgud:bashdb-")
diff --git a/packages/realgud/realgud/debugger/bashdb/track-mode.el 
b/packages/realgud/realgud/debugger/bashdb/track-mode.el
new file mode 100644
index 0000000..d01d6c7
--- /dev/null
+++ b/packages/realgud/realgud/debugger/bashdb/track-mode.el
@@ -0,0 +1,73 @@
+;; Copyright (C) 2012-2016 Free Software Foundation, Inc
+
+;; Author: 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.
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; Bash Debugger tracking in a comint or eshell buffer.
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                        "../../common/track"
+                        "../../common/track-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud:bashdb-")
+(require-relative "../../lang/posix-shell" nil "realgud-lang-")
+
+(declare-function realgud-track-mode 'realgud-track-mode)
+(declare-function realgud-track-mode-hook 'realgud-track-mode)
+(declare-function realgud-track-mode-setup   'realgud-track-mode)
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+(declare-function realgud-posix-shell-populate-command-keys
+                 'realgud-lang-posix-shell)
+
+(realgud-track-mode-vars "bashdb")
+
+(defun bashdb-track-mode-hook()
+  (if bashdb-track-mode
+      (progn
+       (use-local-map bashdb-track-mode-map)
+       (message "using bashdb mode map")
+       )
+    (message "bashdb track-mode-hook disable called"))
+)
+
+(define-minor-mode bashdb-track-mode
+  "Minor mode for tracking bashdb source locations inside a process shell via 
realgud. bashdb is a Bash debugger. See URL `http://bashdb.sf.net'.
+
+If called interactively with no prefix argument, the mode is toggled. A prefix 
argument, captured as ARG, enables the mode if the argument is positive, and 
disables it otherwise.
+
+\\{bashdb-track-mode-map}"
+  :init-value nil
+  ;; :lighter " bashdb"   ;; mode-line indicator from realgud-track is 
sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:bashdb
+  :keymap bashdb-track-mode-map
+
+  (realgud:track-set-debugger "bashdb")
+  (if bashdb-track-mode
+      (progn
+        (realgud-track-mode-setup 't)
+        (bashdb-track-mode-hook))
+    (progn
+      (setq realgud-track-mode nil)
+      ))
+)
+
+(define-key bashdb-short-key-mode-map "T" 'realgud:cmd-backtrace)
+
+(provide-me "realgud:bashdb-")
diff --git a/packages/realgud/realgud/debugger/common.mk 
b/packages/realgud/realgud/debugger/common.mk
new file mode 100644
index 0000000..b09deeb
--- /dev/null
+++ b/packages/realgud/realgud/debugger/common.mk
@@ -0,0 +1,3 @@
+include $(top_srcdir)/common.mk
+
+lispdir = @lispdir_realgud@/debugger/$(notdir $(subdir))
diff --git a/packages/realgud/realgud/debugger/gdb/Makefile.am 
b/packages/realgud/realgud/debugger/gdb/Makefile.am
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/gdb/Makefile.am
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/packages/realgud/realgud/debugger/gdb/core.el 
b/packages/realgud/realgud/debugger/gdb/core.el
new file mode 100644
index 0000000..35fc492
--- /dev/null
+++ b/packages/realgud/realgud/debugger/gdb/core.el
@@ -0,0 +1,223 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+(require 'load-relative)
+(require-relative-list '("../../common/track"
+                        "../../common/core"
+                        "../../common/lang")
+                      "realgud-")
+
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
+(declare-function realgud-lang-mode? 'realgud-lang)
+(declare-function realgud-parse-command-arg 'realgud-core)
+(declare-function realgud-query-cmdline 'realgud-core)
+
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:gdb-minibuffer-history nil
+  "minibuffer history list for the command `gdb'.")
+
+(easy-mmode-defmap realgud:gdb-minibuffer-local-map
+  '(("\C-i" . comint-dynamic-complete-filename))
+  "Keymap for minibuffer prompting of gud startup command."
+  :inherit minibuffer-local-map)
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun realgud:gdb-query-cmdline (&optional opt-debugger)
+  (realgud-query-cmdline
+   'realgud:gdb-suggest-invocation
+   realgud:gdb-minibuffer-local-map
+   'realgud:gdb-minibuffer-history
+   opt-debugger))
+
+(defun realgud:gdb-parse-cmd-args (orig-args)
+  "Parse command line ARGS for the annotate level and name of script to debug.
+
+ORIG_ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing
+* the name of the debugger given (e.g. gdb) and its arguments - a list of 
strings
+* nil (a placeholder in other routines of this ilk for a debugger
+* the script name and its arguments - list of strings
+* whether the annotate or emacs option was given ('-A', '--annotate' or 
'--emacs) - a boolean
+
+For example for the following input
+  (map 'list 'symbol-name
+   '(gdb --tty /dev/pts/1 -cd ~ --emacs ./gcd.py a b))
+
+we might return:
+   ((\"gdb\" \"--tty\" \"/dev/pts/1\" \"-cd\" \"home/rocky\' \"--emacs\") nil 
\"(/tmp/gcd.py a b\") 't\")
+
+Note that path elements have been expanded via `expand-file-name'.
+"
+
+  ;; Parse the following kind of pattern:
+  ;;  gdb gdb-options script-name script-options
+  (let (
+       (args orig-args)
+       (pair)          ;; temp return from
+
+       ;; One dash is added automatically to the below, so
+       ;; h is really -h and -host is really --host.
+       (gdb-two-args '("x" "-command" "b" "-exec"
+                       "cd" "-pid"  "-core" "-directory"
+                       "-annotate"
+                       "i" "-interpreter"
+                       "se" "-symbols" "-tty"))
+       ;; gdb doesn't optionsl 2-arg options.
+       (gdb-opt-two-args '())
+
+       ;; Things returned
+       (script-name nil)
+       (debugger-name nil)
+       (debugger-args '())
+       (script-args '())
+       (annotate-p nil))
+
+    (if (not (and args))
+       ;; Got nothing: return '(nil nil nil nil)
+       (list debugger-args nil script-args annotate-p)
+      ;; else
+      (progn
+
+       ;; Remove "gdb" from "gdb --gdb-options script
+       ;; --script-options"
+       (setq debugger-name (file-name-sans-extension
+                            (file-name-nondirectory (car args))))
+       (unless (string-match "^gdb.*" debugger-name)
+         (message
+          "Expecting debugger name `%s' to be `gdb'"
+          debugger-name))
+       (setq debugger-args (list (pop args)))
+
+       ;; Skip to the first non-option argument.
+       (while (and args (not script-name))
+         (let ((arg (car args)))
+           (cond
+            ;; Annotation or emacs option with level number.
+            ((or (member arg '("--annotate" "-A"))
+                 (equal arg "--emacs"))
+             (setq annotate-p t)
+             (nconc debugger-args (list (pop args) (pop args))))
+            ;; Combined annotation and level option.
+            ((string-match "^--annotate=[0-9]" arg)
+             (nconc debugger-args (list (pop args) (pop args)) )
+             (setq annotate-p t))
+            ((string-match "^--interpreter=" arg)
+             (warn "realgud doesn't support the --interpreter option; option 
ignored")
+             (setq args (cdr args)))
+            ((equal "-i" arg)
+             (warn "realgud doesn't support the -i option; option ignored")
+             (setq args (cddr args)))
+            ;; path-argument ooptions
+            ((member arg '("-cd" ))
+             (setq arg (pop args))
+             (nconc debugger-args
+                    (list arg (realgud:expand-file-name-if-exists
+                               (pop args)))))
+            ;; Options with arguments.
+            ((string-match "^-" arg)
+             (setq pair (realgud-parse-command-arg
+                         args gdb-two-args gdb-opt-two-args))
+             (nconc debugger-args (car pair))
+             (setq args (cadr pair)))
+            ;; Anything else must be the script to debug.
+            (t (setq script-name arg)
+               (setq script-args args))
+            )))
+       (list debugger-args nil script-args annotate-p)))))
+
+(defvar realgud:gdb-command-name)
+
+(defun realgud:gdb-executable (file-name)
+  "Return a priority for whether FILE-NAME is likely we can run gdb on"
+  (let ((output (shell-command-to-string
+                (format "file %s" (file-chase-links file-name)))))
+    (cond
+     ((string-match "ASCII" output) 2)
+     ((string-match "ELF" output) 7)
+     ((string-match "executable" output) 6)
+     ('t 5))))
+
+(defun realgud:gdb-suggest-invocation (&optional debugger-name)
+  "Suggest a gdb command invocation. Here is the priority we use:
+* an executable file with the name of the current buffer stripped of its 
extension
+* any executable file in the current directory with no extension
+* the last invocation in gdb:minibuffer-history
+* any executable in the current directory
+When all else fails return the empty string."
+  (let* ((file-list (directory-files default-directory))
+        (priority 2)
+        (best-filename nil)
+        (try-filename (file-name-base (or (buffer-file-name) "gdb"))))
+    (when (member try-filename (directory-files default-directory))
+       (setq best-filename try-filename)
+       (setq priority (+ (realgud:gdb-executable try-filename) 2)))
+
+    ;; FIXME: I think a better test would be to look for
+    ;; c-mode in the buffer that have a corresponding executable
+    (while (and (setq try-filename (car-safe file-list)) (< priority 8))
+      (setq file-list (cdr file-list))
+      (if (and (file-executable-p try-filename)
+              (not (file-directory-p try-filename)))
+         (if (equal try-filename (file-name-sans-extension try-filename))
+             (progn
+               (setq best-filename try-filename)
+               (setq priority (1+ (realgud:gdb-executable best-filename))))
+           ;; else
+           (progn
+             (setq best-filename try-filename)
+             (setq priority (realgud:gdb-executable best-filename))
+             ))
+       ))
+    (if (< priority 8)
+       (cond
+        (realgud:gdb-minibuffer-history
+         (car realgud:gdb-minibuffer-history))
+        ((equal priority 7)
+         (concat "gdb " best-filename))
+        (t "gdb "))
+      ;; else
+      (concat "gdb " best-filename))
+    ))
+
+(defun realgud:gdb-reset ()
+  "Gdb cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+  (interactive)
+  ;; (gdb-breakpoint-remove-all-icons)
+  (dolist (buffer (buffer-list))
+    (when (string-match "\\*gdb-[a-z]+\\*" (buffer-name buffer))
+      (let ((w (get-buffer-window buffer)))
+        (when w
+          (delete-window w)))
+      (kill-buffer buffer))))
+
+;; (defun gdb-reset-keymaps()
+;;   "This unbinds the special debugger keys of the source buffers."
+;;   (interactive)
+;;   (setcdr (assq 'gdb-debugger-support-minor-mode minor-mode-map-alist)
+;;       gdb-debugger-support-minor-mode-map-when-deactive))
+
+
+(defun realgud:gdb-customize ()
+  "Use `customize' to edit the settings of the `realgud:gdb' debugger."
+  (interactive)
+  (customize-group 'realgud:gdb))
+
+(provide-me "realgud:gdb-")
diff --git a/packages/realgud/realgud/debugger/gdb/gdb.el 
b/packages/realgud/realgud/debugger/gdb/gdb.el
new file mode 100644
index 0000000..4c2853f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/gdb/gdb.el
@@ -0,0 +1,141 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;;  `realgud:gdb' Main interface to gdb via Emacs
+(require 'load-relative)
+(require-relative-list '("../../common/helper" "../../common/utils")
+                      "realgud-")
+
+(require-relative-list '("../../common/buffer/command"
+                        "../../common/buffer/source")
+                      "realgud-buffer-")
+
+(require-relative-list '("core" "track-mode") "realgud:gdb-")
+
+(declare-function realgud-cmdbuf? 'realgud-buffer-command)
+(declare-function realgud:cmdbuf-associate 'realgud-buffer-source)
+(declare-function realgud-parse-command-arg 'realgud-core)
+
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:gdb nil
+  "The realgud interface to gdb"
+  :group 'realgud
+  :version "24.3")
+
+;; -------------------------------------------------------------------
+;; User definable variables
+;;
+
+(defcustom realgud:gdb-command-name
+  ;;"gdb --emacs 3"
+  "gdb"
+  "File name for executing the and command options.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'realgud:gdb)
+
+(declare-function realgud:gdb-track-mode     'realgud:gdb-track-mode)
+(declare-function realgud-command            'realgud:gdb-core)
+(declare-function realgud:gdb-parse-cmd-args 'realgud:gdb-core)
+(declare-function realgud:gdb-query-cmdline  'realgud:gdb-core)
+(declare-function realgud:run-process        'realgud-core)
+(declare-function realgud:flatten            'realgud-utils)
+
+;; -------------------------------------------------------------------
+;; The end.
+;;
+
+(defun realgud:gdb-pid-command-buffer (pid)
+  "Return the command buffer used when gdb -p PID is invoked"
+  (format "*gdb %d shell*" pid)
+  )
+
+(defun realgud:gdb-find-command-buffer (pid)
+  "Find the among current buffers a buffer that is a realgud command buffer
+running gdb on process number PID"
+  (let ((find-cmd-buf (realgud:gdb-pid-command-buffer pid)))
+    (dolist (buf (buffer-list))
+      (if (and (equal find-cmd-buf (buffer-name buf))
+               (realgud-cmdbuf? buf)
+               (get-buffer-process buf))
+       (return buf)))))
+
+(defun realgud:gdb-pid (pid)
+  "Start debugging gdb process with pid PID."
+  (interactive "nEnter the pid that gdb should attach to: ")
+  (realgud:gdb (format "%s -p %d" realgud:gdb-command-name pid))
+  ;; FIXME: should add code to test if attach worked.
+  )
+
+(defun realgud:gdb-pid-associate (pid)
+  "Start debugging gdb process with pid PID and associate the
+current buffer to that realgud command buffer."
+  (interactive "nEnter the pid that gdb should attach to and associate the 
current buffer to: ")
+  (let* ((command-buf)
+        (source-buf (current-buffer))
+        )
+    (realgud:gdb-pid pid)
+    (setq command-buf (realgud:gdb-find-command-buffer pid))
+    (if command-buf
+       (with-current-buffer source-buf
+         (realgud:cmdbuf-associate))
+      )))
+
+;;;###autoload
+(defun realgud:gdb (&optional opt-cmd-line no-reset)
+  "Invoke the gdb debugger and start the Emacs user interface.
+
+OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+"
+
+  (interactive)
+  (let* ((cmd-str (or opt-cmd-line (realgud:gdb-query-cmdline "gdb")))
+        (cmd-args (split-string-and-unquote cmd-str))
+        (parsed-args (realgud:gdb-parse-cmd-args cmd-args))
+        (script-args (caddr parsed-args))
+        (script-name (or (car script-args) ""))
+        (parsed-cmd-args
+           (cl-remove-if-not 'stringp (realgud:flatten parsed-args)))
+        (cmd-buf (realgud:run-process realgud:gdb-command-name
+                                      script-name parsed-cmd-args
+                                      'realgud:gdb-minibuffer-history
+                                      nil))
+        )
+    (if cmd-buf
+       (let ((process (get-buffer-process cmd-buf)))
+         (if (and process (eq 'run (process-status process)))
+             (with-current-buffer cmd-buf
+               (realgud-command "set annotate 1" nil nil nil)
+               )))
+      )
+    ))
+
+(provide-me "realgud-")
+
+;; Local Variables:
+;; byte-compile-warnings: (not cl-functions)
+;; End:
diff --git a/packages/realgud/realgud/debugger/gdb/init.el 
b/packages/realgud/realgud/debugger/gdb/init.el
new file mode 100644
index 0000000..92bb5d6
--- /dev/null
+++ b/packages/realgud/realgud/debugger/gdb/init.el
@@ -0,0 +1,143 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;;; gdb debugger
+
+(eval-when-compile (require 'cl-lib))
+
+(require 'load-relative)
+(require-relative-list '("../../common/regexp" "../../common/loc") "realgud-")
+
+(defvar realgud-pat-hash)
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defvar realgud:gdb-pat-hash (make-hash-table :test 'equal)
+  "hash key is the what kind of pattern we want to match:
+backtrace, prompt, etc.  the values of a hash entry is a
+realgud-loc-pat struct")
+
+(declare-function make-realgud-loc "realgud-loc" (a b c d e f))
+
+(defconst realgud:gdb-frame-file-regexp
+  (format "\\(.+\\):%s" realgud:regexp-captured-num))
+
+;; Regular expression that describes a lldb location generally shown
+;; before a command prompt. NOTE: we assume annotate 1!
+;; For example:
+;; /src/build/ruby-2.1.5/main.c:24:454:beg:0x55555557659f
+(setf (gethash "loc" realgud:gdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp (format "^%s:%s:beg:0x\\([0-9a-f]+\\)"
+                      realgud:gdb-frame-file-regexp 
realgud:regexp-captured-num)
+       :file-group 1
+       :line-group 2
+       :char-offset-group 3))
+
+;; Regular expression that describes a gdb prompt
+;; For example:
+;;   (gdb)
+(setf (gethash "prompt" realgud:gdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp   "^(gdb) "
+       ))
+
+;; Regular expression that describes a "breakpoint set" line
+;; For example:
+;;   Breakpoint 1, main (argc=1, argv=0x7fffffffdbd8) at main.c:24
+(setf (gethash "brkpt-set" realgud:gdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp (format "^Breakpoint %s at 0x\\([0-9a-f]*\\): file \\(.+\\), 
line %s.\n"
+                      realgud:regexp-captured-num realgud:regexp-captured-num)
+       :num 1
+       :file-group 3
+       :line-group 4))
+
+;; Regular expression that describes a debugger "delete" (breakpoint)
+;; response.
+;; For example:
+;;   Deleted breakpoint 1
+;;   Deleted breakpoints 1 2 3 4
+(setf (gethash "brkpt-del" realgud:gdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^Deleted breakpoints? \\(\\([0-9]+ *\\)+\\)\n"
+       :num 1))
+
+(defconst realgud:gdb-frame-start-regexp
+  "\\(?:^\\|\n\\)")
+
+(defconst realgud:gdb-frame-num-regexp
+  (format "#%s " realgud:regexp-captured-num))
+
+;; Regular expression that describes a gdb "backtrace" command line.
+;; For example:
+;; #0  main (argc=2, argv=0xbffff564, envp=0xbffff570) at main.c:935
+;; #1  0xb7e9f4a5 in *__GI___strdup (s=0xbffff760 "/tmp/remake/remake") at 
strdup.c:42
+;; #2  0x080593ac in main (argc=2, argv=0xbffff5a4, envp=0xbffff5b0)
+;;    at main.c:952
+;; #46 0xb7f51b87 in vm_call_cfunc (th=0x804d188, reg_cfp=0xb7ba9e88, num=0,
+;;    recv=157798080, blockptr=0x0, me=0x80d12a0) at vm_insnhelper.c:410
+
+(setf (gethash "debugger-backtrace" realgud:gdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp         (concat realgud:gdb-frame-start-regexp
+                       realgud:gdb-frame-num-regexp
+                       "\\(?:.\\|\\(?:[\n] \\)\\)+[ ]+at "
+                       realgud:gdb-frame-file-regexp
+                       )
+       :num 1
+       :file-group 2
+       :line-group 3)
+      )
+
+(setf (gethash "font-lock-keywords" realgud:gdb-pat-hash)
+      '(
+       ;; #2  0x080593ac in main (argc=2, argv=0xbffff5a4, envp=0xbffff5b0)
+       ;;    at main.c:952
+       ("[ \n]+at \\(.*\\):\\([0-9]+\\)"
+        (1 realgud-file-name-face)
+        (2 realgud-line-number-face))
+
+       ;; The frame number and first type name, if present.
+       ;; E.g. =>#0  Makefile.in at /tmp/Makefile:216
+       ;;      ---^
+       ( "#\\(?:^\\|\n\\)\\([0-9]+\\)  "
+        (1 realgud-backtrace-number-face))
+       ))
+
+(setf (gethash "gdb" realgud-pat-hash) realgud:gdb-pat-hash)
+
+;;  Prefix used in variable names (e.g. short-key-mode-map) for
+;; this debugger
+
+(setf (gethash "gdb" realgud:variable-basename-hash) "realgud:gdb")
+
+(defvar realgud:gdb-command-hash (make-hash-table :test 'equal)
+  "Hash key is command name like 'continue' and the value is
+  the gdb command to use, like 'continue'")
+
+(setf (gethash "break"    realgud:gdb-command-hash) "break %X:%l")
+(setf (gethash "clear"    realgud:gdb-command-hash) "clear %X:%l")
+(setf (gethash "continue" realgud:gdb-command-hash) "continue")
+(setf (gethash "eval"     realgud:gdb-command-hash) "print %s")
+(setf (gethash "quit"     realgud:gdb-command-hash) "quit")
+(setf (gethash "run"      realgud:gdb-command-hash) "run")
+(setf (gethash "step"     realgud:gdb-command-hash) "step %p")
+(setf (gethash "gdb" realgud-command-hash) realgud:gdb-command-hash)
+
+(setf (gethash "gdb" realgud-pat-hash) realgud:gdb-pat-hash)
+
+(provide-me "realgud:gdb-")
diff --git a/packages/realgud/realgud/debugger/gdb/track-mode.el 
b/packages/realgud/realgud/debugger/gdb/track-mode.el
new file mode 100644
index 0000000..9497657
--- /dev/null
+++ b/packages/realgud/realgud/debugger/gdb/track-mode.el
@@ -0,0 +1,74 @@
+;;; track-mode.el ---
+
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;; gdb tracking a comint or eshell buffer.
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                        "../../common/track"
+                        "../../common/track-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud:gdb-")
+
+(realgud-track-mode-vars "realgud:gdb")
+
+(declare-function realgud-track-mode         'realgud-track-mode)
+(declare-function realgud:track-mode-hook    'realgud-track-mode)
+(declare-function realgud:track-mode-enable  'realgud-track-mode)
+(declare-function realgud-track-mode-setup   'realgud-track-mode)
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+
+(define-key realgud:gdb-track-mode-map
+  (kbd "C-c !b") 'realgud:goto-debugger-backtrace-line)
+
+(defun realgud:gdb-track-mode-hook()
+  (use-local-map realgud:gdb-track-mode-map)
+  (realgud-track-mode-setup 't)
+  (message "realgud:gdb track-mode-hook called")
+)
+
+(define-minor-mode realgud:gdb-track-mode
+  "Minor mode for tracking gdb inside a process shell via realgud.
+
+If called interactively with no prefix argument, the mode is toggled. A prefix 
argument, captured as ARG, enables the mode if the argument is positive, and 
disables it otherwise.
+
+Key bindings:
+\\{realgud:gdb-track-mode-map}
+"
+  :init-value nil
+  ;; :lighter " gdb"   ;; mode-line indicator from realgud-track is sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:gdb
+  :keymap realgud:gdb-track-mode-map
+  (if realgud:gdb-track-mode
+      (progn
+       (realgud:track-set-debugger "gdb")
+        (realgud:gdb-track-mode-hook)
+        (realgud:track-mode-enable))
+    (progn
+      (setq realgud-track-mode nil)
+      ))
+)
+
+(provide-me "realgud:gdb-")
+;;; track-mode.el ends here
diff --git a/packages/realgud/realgud/debugger/gub/Makefile.am 
b/packages/realgud/realgud/debugger/gub/Makefile.am
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/gub/Makefile.am
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/packages/realgud/realgud/debugger/gub/core.el 
b/packages/realgud/realgud/debugger/gub/core.el
new file mode 100644
index 0000000..d6d13da
--- /dev/null
+++ b/packages/realgud/realgud/debugger/gub/core.el
@@ -0,0 +1,181 @@
+;; Copyright (C) 2013-2014, 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+(require 'load-relative)
+(require-relative-list '("../../common/track" "../../common/lang"
+                        "../../common/core") "realgud-")
+(require-relative-list '("init") "realgud:gub-")
+
+(declare-function realgud-query-cmdline      'realgud-core)
+(declare-function realgud-suggest-invocation 'realgud-core)
+(declare-function realgud-lang-mode?         'realgud-lang)
+
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:gub-minibuffer-history nil
+  "minibuffer history list for the command `gub'.")
+
+(easy-mmode-defmap gub-minibuffer-local-map
+  '(("\C-i" . comint-dynamic-complete-filename))
+  "Keymap for minibuffer prompting of gud startup command."
+  :inherit minibuffer-local-map)
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun gub-query-cmdline (&optional opt-debugger)
+  (realgud-query-cmdline
+   'gub-suggest-invocation
+   gub-minibuffer-local-map
+   'realgud:gub-minibuffer-history
+   opt-debugger))
+
+(defun gub-parse-cmd-args (orig-args)
+  "Parse command line ARGS for the name of script to debug and its args.
+
+ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing
+
+- the command processor (e.g. gub.sh) and it's arguments if any - a list of 
strings
+For example for the following input
+  \'./gub.sh --gub=\"-I\" -- ./gcd.go a b\'
+
+we might return:
+   (gub (\"-gub=-I\") (./gcd.rb a b))
+
+NOTE: the above should have each item listed in quotes.
+"
+
+  (let (
+       (args orig-args)
+       (interp-regexp ".*\\(^gub\.sh\\|tortoise\\)$")
+
+       ;; Things returned
+       (gub-name "gub.sh")
+       (gub-args '())
+       (go-prog-and-args '())
+       )
+
+    (if (not (and args))
+       ;; Got nothing
+       (list gub-name gub-args go-prog-and-args)
+      ;; else
+      ;; Strip off "gub.sh"
+      (when (string-match interp-regexp
+                          (file-name-nondirectory (car args)))
+       (setq gub-name (pop args))
+       )
+
+      ;; parse options
+      (while args
+       (let ((arg (pop args)))
+         (cond
+          ((string-match "^-[-]?gub=" arg)
+           (setq gub-args (nconc gub-args (list arg))))
+
+          ((string-match "^-run" arg)
+           (setq gub-args (nconc gub-args (list arg))))
+
+          ((string-match "^-interp=SS" arg)
+           (setq gub-args (nconc gub-args (list arg))))
+
+          ((equal arg "--")) ;; Ignore
+
+          ;; Anything else add to gub-args
+          ('t (setq go-prog-and-args (nconc go-prog-and-args (list arg))))
+          ))))
+      (list gub-name gub-args go-prog-and-args)
+    ))
+
+(defconst realgud:gub-auto-suffix-regexp
+  "\\.go$"
+  "Go file suffix"
+)
+
+(defun gub-suggest-file-priority(filename)
+  (let ((priority 2)
+       (is-not-directory)
+       )
+    (if (realgud-lang-mode? filename "go")
+       (progn
+         (if (string-match realgud:gub-auto-suffix-regexp filename)
+             (setq priority 5)
+           (setq priority 7))
+         ))
+    priority
+    )
+)
+
+;; To silence Warning: reference to free variable
+(defvar realgud:gub-command-name)
+
+(defun gub-suggest-invocation (debugger-name)
+  "Suggest a command invocation via `realgud-suggest-invocaton'"
+  (realgud-suggest-invocation realgud:gub-command-name
+                             realgud:gub-minibuffer-history
+                             "go" "\\.go$"))
+
+;; Convert a command line as would be typed normally to run a script
+;; into one that invokes an Emacs-enabled debugging session.
+;; "--debugger" in inserted as the first switch.
+
+(defun realgud:gub-massage-args (command-line)
+  (let* ((new-args (list "--debugger"))
+        (args (split-string-and-unquote command-line))
+        (program (car args))
+        (seen-e nil)
+        (shift (lambda ()
+                 (setq new-args (cons (car args) new-args))
+                 (setq args (cdr args)))))
+
+    ;; Pass all switches and -e scripts through.
+    (while (and args
+               (string-match "^-" (car args))
+               (not (equal "-" (car args)))
+               (not (equal "--" (car args))))
+      (funcall shift))
+
+    (if (or (not args)
+           (string-match "^-" (car args)))
+       (error "Can't use stdin as the script to debug"))
+    ;; This is the program name.
+    (funcall shift)
+
+    (while args
+      (funcall shift))
+
+    (nreverse new-args)
+    )
+  )
+
+(defun gub-reset ()
+  "Gub cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+  (interactive)
+  ;; (gub-breakpoint-remove-all-icons)
+  (dolist (buffer (buffer-list))
+    (when (string-match "\\*gub-[a-z]+\\*" (buffer-name buffer))
+      (let ((w (get-buffer-window buffer)))
+        (when w
+          (delete-window w)))
+      (kill-buffer buffer))))
+
+;; (defun gub-reset-keymaps()
+;;   "This unbinds the special debugger keys of the source buffers."
+;;   (interactive)
+;;   (setcdr (assq 'gub-debugger-support-minor-mode minor-mode-map-alist)
+;;       gub-debugger-support-minor-mode-map-when-deactive))
+
+
+(defun realgud:gub-customize ()
+  "Use `customize' to edit the settings of the `gub' debugger."
+  (interactive)
+  (customize-group 'realgud:gub))
+
+(provide-me "realgud:gub-")
diff --git a/packages/realgud/realgud/debugger/gub/gub.el 
b/packages/realgud/realgud/debugger/gub/gub.el
new file mode 100644
index 0000000..6a7ad15
--- /dev/null
+++ b/packages/realgud/realgud/debugger/gub/gub.el
@@ -0,0 +1,86 @@
+;; Copyright (C) 2015 Free Software Foundation, Inc
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;;  `gub' Main interface to Go gub via Emacs
+(require 'load-relative)
+(require-relative-list '("../../common/helper") "realgud-")
+(require-relative-list '("../../common/track") "realgud-")
+(require-relative-list '("core" "track-mode") "realgud:gub-")
+
+(eval-when-compile (require 'cl-lib))
+
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:gub nil
+  "The realgud interface to the Go SSA interpreter debugger, gub"
+  :group 'realgud
+  :version "23.4")
+
+;; -------------------------------------------------------------------
+;; User definable variables
+;;
+
+(defcustom realgud:gub-command-name
+  "tortoise -run -gub= -interp=SS --"
+  "File name for executing the Go SSA interpreter/debugger, gub, and command 
options.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'realgud:gub)
+
+(declare-function gub-query-cmdline  'realgud-gub-core)
+(declare-function gub-parse-cmd-args 'realgud-gub-core)
+(declare-function realgud:run-process 'realgud-core)
+
+
+(defun realgud-gub-fn (&optional opt-command-line no-reset)
+  "See `realgud-gub' for details"
+
+  (let* ((cmd-str (or opt-command-line (gub-query-cmdline "gub")))
+        (cmd-args (split-string-and-unquote cmd-str))
+        (parsed-args (gub-parse-cmd-args cmd-args))
+        (gub-program (car parsed-args))
+        (gub-args (cadr parsed-args))
+        (go-prog-and-args (caddr parsed-args))
+        (script-filename (car go-prog-and-args))
+        (cmd-buf))
+    (realgud:run-process gub-program script-filename cmd-args
+                        'gub-track-mode no-reset)
+    )
+  )
+
+;;;###autoload
+(defun realgud-gub (&optional opt-command-line no-reset)
+  "Invoke the Go SSA debugger, gub and start the Emacs user interface.
+
+String COMMAND-LINE specifies how to run gub.
+
+Normally command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset."
+
+
+  (interactive)
+  (realgud-gub-fn opt-command-line no-reset)
+  )
+
+(defalias 'gub 'realgud-gub)
+
+(provide-me "realgud-")
+;;; gub.el ends here
diff --git a/packages/realgud/realgud/debugger/gub/init.el 
b/packages/realgud/realgud/debugger/gub/init.el
new file mode 100644
index 0000000..f244267
--- /dev/null
+++ b/packages/realgud/realgud/debugger/gub/init.el
@@ -0,0 +1,206 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;; Regular expressions for Go SSA debugger: gub
+
+(eval-when-compile (require 'cl-lib))   ;For setf.
+
+(require 'load-relative)
+(require-relative-list '("../../common/regexp"
+                        "../../common/loc"
+                        "../../common/init")
+                      "realgud-")
+
+(defvar realgud-pat-hash)
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defvar realgud:gub-pat-hash (make-hash-table :test 'equal)
+  "Hash key is the what kind of pattern we want to match:
+backtrace, prompt, etc.  The values of a hash entry is a
+realgud-loc-pat struct")
+
+;; Regular expression that describes a gub location generally shown
+;; before a command prompt.
+;; For example:
+;; interp/testdata/square.go:16:2-17
+(setf (gethash "loc" realgud:gub-pat-hash)
+      (make-realgud-loc-pat
+       :regexp
+       
"\\(?:^\\|\n\\)\\(\\(?:[a-zA-Z]:\\)?[a-zA-Z0-9_/.\\\\][-a-zA-Z0-9_/.\\\\ 
]*\\.go\\):\\([0-9]+\\)"
+       :file-group 1
+       :line-group 2))
+
+;; Regular expression that describes a Go backtrace line.
+;; For example:
+;; ssa-interp/interp/interp.go:202 (0x506c84)
+;;     visitInstr: *fr.get(instr.Addr).(*Value) = copyVal(fr.get(instr.Val))
+;; sa-interp/interp/interp.go:604 (0x50b5b1)
+;;     runFrame: switch visitInstr(fr, instr) {
+(setf (gethash "lang-backtrace" realgud:gub-pat-hash)
+  (make-realgud-loc-pat
+   :regexp
+   
"\\(?:^\\|\n\\)\\(\\(?:[a-zA-Z]:\\)?[a-zA-Z0-9_/.\\\\][-a-zA-Z0-9_/.\\\\]*\\.go\\):\\([0-9]+\\)"
+   :file-group 1
+   :line-group 2))
+
+
+;; Regular expression that describes a gub location generally shown
+;; before a command prompt.
+;; For example:
+;;   gub[1]:
+;;   address@hidden:
+(setf (gethash "prompt" realgud:gub-pat-hash)
+      (make-realgud-loc-pat
+       :regexp  (format  "^gub\\[%s\\(?:@%s\\)?\\]: "
+                        realgud:regexp-captured-num
+                        realgud:regexp-captured-num)
+       :num 1
+       ))
+
+;;  Regular expression that describes a "breakpoint set" line
+(setf (gethash "brkpt-set" realgud:gub-pat-hash)
+      (make-realgud-loc-pat
+       :regexp (format
+               "^Breakpoint %s set\\(?:in function \\) in file 
\\([a-zA-Z0-9_/.\\\\][-a-zA-Z0-9_/.\\\\ ]*\\.go\\) line %s, column %s"
+               realgud:regexp-captured-num realgud:regexp-captured-num
+               realgud:regexp-captured-num)
+       :num 1
+       :file-group 2
+       :line-group 3
+       :char-offset-group 4))
+
+;; Regular expression that describes a debugger "delete" (breakpoint) response.
+;; For example:
+;;   Deleted breakpoint 1.
+(setf (gethash "brkpt-del" realgud:gub-pat-hash)
+      (make-realgud-loc-pat
+       :regexp (format
+               "^Deleted breakpoint %s\n"
+               realgud:regexp-captured-num)
+       :num 1))
+
+;; Regular expression describes general location. In contrast to loc
+;; which triggers automatically, we bind this to a key like C-c !s
+;; For example:
+;;               interp/testdata/square.go:16:2-17
+;  ^^^^^^ spaces
+(setf (gethash "general-location" realgud:gub-pat-hash)
+      (make-realgud-loc-pat
+       :regexp
+       (format
+       "\\(?:^\\|\n\\)[ 
\t]*\\(\\(?:[a-zA-Z]:\\)?[a-zA-Z0-9_/.\\\\][-a-zA-Z0-9_/.\\\\ ]*\\.go\\):%s" 
realgud:regexp-captured-num)
+       :file-group 1
+       :line-group 2))
+
+(defconst realgud:gub-selected-frame-arrow "=>"
+"String that describes which frame is selected in a debugger
+backtrace listing.")
+(defconst realgud:gub-frame-arrow (format "\\(%s\\|  \\)"
+                                         realgud:gub-selected-frame-arrow))
+(defconst realgud:gub-frame-num-regexp
+  (format " #%s " realgud:regexp-captured-num))
+
+(defconst realgud:gub-frame-file-regexp
+  (format " at \\(.*\\):%s" realgud:regexp-captured-num))
+
+
+;; Regular expression that describes a debugger "backtrace" command line.
+;; For example:
+;; => #0 square(n)
+;;    #1 main()
+(setf (gethash "debugger-backtrace" realgud:gub-pat-hash)
+      (make-realgud-loc-pat
+       :regexp         (concat "^"
+                       realgud:gub-frame-arrow
+                       realgud:gub-frame-num-regexp
+                       "\\(.*\\)"
+                       realgud:gub-frame-file-regexp
+                       )
+       :num 2
+       :file-group 4
+       :line-group 5)
+      )
+
+(setf (gethash "selected-frame-indicator" realgud:gub-pat-hash)
+      realgud:gub-selected-frame-arrow)
+
+;; Regular expression that describes a Go backtrace line
+;; For example:
+;;    /usr/local/go/src/pkg/runtime/panic.c:482 (0x805c956)
+;;    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-^^^-----------
+(setf (gethash "lang-backtrace" realgud:gub-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^\\(/.+\\):\\([0-9]+\\) \\((0x[0-9a-f]+)\\)?$"
+       :file-group 1
+       :line-group 2))
+
+;; Regular expression that describes a Go runtime panic
+;; For example:
+;;     /tmp/github.com/rocky/ssa-interp/eval/selectorexpr.go:18 +0x9f
+;;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-^^------
+(setf (gethash "panic-backtrace" realgud:gub-pat-hash)
+      (make-realgud-loc-pat
+       :regexp (format "^[ \t]*\\(/.+\\):%s \\(+0x[0-9a-f]+\\)?$"
+                      realgud:regexp-captured-num)
+       :file-group 1
+       :line-group 2))
+
+;; Regular expression for a termination message.
+(setf (gethash "termination" realgud:gub-pat-hash)
+       "^gub: That's all, folks...\n")
+
+(setf (gethash "font-lock-keywords" realgud:gub-pat-hash)
+      '(
+       ;; File name and line number
+       ;; E.g. =>#0  Makefile.in at /tmp/Makefile:216
+       ;;                        ---^^^^^^^^^^^^^-^^^
+       (" at \\(.*\\):\\([0-9]+\\)"
+        (1 realgud-file-name-face)
+        (2 realgud-line-number-face))
+
+       ;; The frame number and first type name, if present.
+       ;; E.g. =>#0  Makefile.in at /tmp/Makefile:216
+       ;;      ---^
+       ("#\\([0-9]+\\)  "
+        (1 realgud-backtrace-number-face))
+       ))
+
+(setf (gethash "gub" realgud-pat-hash) realgud:gub-pat-hash)
+
+;;  Prefix used in variable names (e.g. short-key-mode-map) for
+;; this debugger
+
+(setf (gethash "tortoise" realgud:variable-basename-hash) "realgud:gub")
+
+(defvar realgud:gub-command-hash (make-hash-table :test 'equal)
+  "Hash key is command name like 'quit' and the value is
+  the gub command to use, like 'q'")
+
+(setf (gethash "backtrace" realgud:gub-command-hash) "backtrace")
+(setf (gethash "break"     realgud:gub-command-hash) "break %l")
+(setf (gethash "continue"  realgud:gub-command-hash) "continue")
+;;(setf (gethash "eval"      realgud:gub-command-hash) "x %s")
+(setf (gethash "quit"      realgud:gub-command-hash) "quit")
+(setf (gethash "restart"   realgud:gub-command-hash) "R")
+(setf (gethash "run"       realgud:gub-command-hash) "R")
+(setf (gethash "step"      realgud:gub-command-hash) "step")
+(setf (gethash "next"      realgud:gub-command-hash) "next")
+(setf (gethash "until"     realgud:gub-command-hash) "until %l")
+(setf (gethash "gub" realgud-command-hash) realgud:gub-command-hash)
+
+
+(provide-me "realgud:gub-")
diff --git a/packages/realgud/realgud/debugger/gub/track-mode.el 
b/packages/realgud/realgud/debugger/gub/track-mode.el
new file mode 100644
index 0000000..b48bb0c
--- /dev/null
+++ b/packages/realgud/realgud/debugger/gub/track-mode.el
@@ -0,0 +1,85 @@
+;; Copyright (C) 2013-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;; Golang SSA gub tracking a comint buffer.
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                        "../../common/track"
+                        "../../common/track-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud:gub-")
+
+(realgud-track-mode-vars "gub")
+
+(declare-function realgud-goto-line-for-pt 'realgud-track-mode)
+(declare-function realgud-track-mode 'realgud-track-mode)
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+(declare-function realgud-track-mode-setup 'realgud-track-mode)
+
+(defun realgud:gub-goto-location (pt)
+  "Display the location mentioned in a location
+described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "general-location"))
+
+
+(defun realgud:gub-goto-panic-location (pt)
+  "Display the location mentioned in a location
+described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "panic-backtrace"))
+
+
+(define-key gub-track-mode-map
+  (kbd "C-c !!") 'realgud:goto-lang-backtrace-line)
+(define-key gub-track-mode-map
+  (kbd "C-c !b") 'realgud:goto-debugger-backtrace-line)
+(define-key gub-track-mode-map
+  (kbd "C-c !s") 'realgud:gub-goto-location)
+(define-key gub-track-mode-map
+  (kbd "C-c !p") 'realgud:gub-goto-panic-location)
+
+(defun gub-track-mode-hook()
+  (if gub-track-mode
+      (progn
+       (use-local-map gub-track-mode-map)
+       (message "using gub mode map")
+       )
+    (message "gub track-mode-hook disable called"))
+)
+
+(define-minor-mode gub-track-mode
+  "Minor mode for tracking gub source locations inside a process shell via 
realgud. gub is a Go language debugger.
+
+If called interactively with no prefix argument, the mode is toggled. A prefix 
argument, captured as ARG, enables the mode if the argument is positive, and 
disables it otherwise.
+
+\\{gub-track-mode-map}
+"
+  :init-value nil
+  ;; :lighter " gub"   ;; mode-line indicator from realgud-track is sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:gub
+  :keymap gub-track-mode-map
+
+  (realgud:track-set-debugger "gub")
+  (if gub-track-mode
+      (progn
+       (realgud-track-mode-setup 't)
+        (gub-track-mode-hook))
+    (progn
+      (setq realgud-track-mode nil)
+      ))
+)
+
+(provide-me "realgud:gub-")
diff --git a/packages/realgud/realgud/debugger/ipdb/Makefile.am 
b/packages/realgud/realgud/debugger/ipdb/Makefile.am
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/ipdb/Makefile.am
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/packages/realgud/realgud/debugger/ipdb/core.el 
b/packages/realgud/realgud/debugger/ipdb/core.el
new file mode 100644
index 0000000..8d64e6a
--- /dev/null
+++ b/packages/realgud/realgud/debugger/ipdb/core.el
@@ -0,0 +1,255 @@
+;; Copyright (C) 2016 Free Software Foundation, Inc
+
+;; Author: Sean Farley <address@hidden>, Rocky Bernstein (address@hidden)
+
+;; 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.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.or/licenses/>.
+
+
+(require 'comint)
+(require 'load-relative)
+(require-relative-list '("../../common/track"
+                        "../../common/core"
+                        "../../common/lang")
+                      "realgud-")
+(require-relative-list '("init") "realgud:ipdb-")
+
+
+(declare-function realgud-lang-mode? 'realgud-lang)
+(declare-function realgud-parse-command-arg 'realgud-core)
+(declare-function realgud-query-cmdline 'realgud-core)
+(declare-function realgud-suggest-invocation 'realgud-core)
+(declare-function realgud-get-cmdbuf   'realgud-buffer-helper)
+
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:ipdb-minibuffer-history nil
+  "minibuffer history list for the command `ipdb'.")
+
+(defvar realgud:ipdb-remote-minibuffer-history nil
+  "minibuffer history list for the command `ipdb-remote'.")
+
+(easy-mmode-defmap ipdb-minibuffer-local-map
+  '(("\C-i" . comint-dynamic-complete-filename))
+  "Keymap for minibuffer prompting of debugger startup command."
+  :inherit minibuffer-local-map)
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun ipdb-query-cmdline (&optional opt-debugger)
+  (realgud-query-cmdline
+   'ipdb-suggest-invocation
+   ipdb-minibuffer-local-map
+   'realgud:ipdb-minibuffer-history
+   opt-debugger))
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun ipdb-remote-query-cmdline ()
+  (realgud-query-cmdline
+   'ipdb-suggest-invocation
+   ipdb-minibuffer-local-map
+   'realgud:ipdb-remote-minibuffer-history
+   "telnet"))
+
+(defun ipdb-parse-cmd-args (orig-args)
+  "Parse command line ORIG-ARGS for the annotate level and name of script to 
debug.
+
+ORIG-ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing:
+* the command processor (e.g. python) and it's arguments if any - a list of 
strings
+* the name of the debugger given (e.g. ipdb) and its arguments - a list of 
strings
+* the script name and its arguments - list of strings
+* whether the annotate or emacs option was given ('-A', '--annotate' or 
'--emacs) - a boolean
+
+For example for the following input:
+  (map 'list 'symbol-name
+   '(python2.6 -O -Qold ./gcd.py a b))
+
+we might return:
+   ((\"python2.6\" \"-O\" \"-Qold\") (\"ipdb\") (\"/tmp/gcd.py\" \"a\" \"b\") 
nil)
+
+Note that the script name path has been expanded via `expand-file-name'.
+"
+
+  ;; Parse the following kind of pattern:
+  ;;  [python python-options] ipdb ipdb-options script-name script-options
+  (let (
+       (args orig-args)
+       (pair)          ;; temp return from
+       (python-opt-two-args '())
+       ;; Python doesn't have mandatory 2-arg options in our sense,
+       ;; since the two args can be run together, e.g. "-C/tmp" or "-C /tmp"
+       ;;
+       (python-two-args '())
+       ;; ipdb doesn't have any arguments
+       (ipdb-two-args '())
+       (ipdb-opt-two-args '())
+       (interp-regexp
+        (if (member system-type (list 'windows-nt 'cygwin 'msdos))
+            "^python[-0-9.]*\\(.exe\\)?$"
+          "^python[-0-9.]*$"))
+
+       ;; Things returned
+       (annotate-p nil)
+       (debugger-args '())
+       (debugger-name nil)
+       (interpreter-args '())
+       (script-args '())
+       (script-name nil)
+       )
+
+    (if (not (and args))
+       ;; Got nothing: return '(nil, nil)
+       (list interpreter-args debugger-args script-args annotate-p)
+      ;; else
+      ;; Strip off optional "python" or "python182" etc.
+      (when (string-match interp-regexp
+                         (file-name-sans-extension
+                          (file-name-nondirectory (car args))))
+       (setq interpreter-args (list (pop args)))
+
+       ;; Strip off Python-specific options
+       (while (and args
+                   (string-match "^-" (car args)))
+         (setq pair (realgud-parse-command-arg
+                     args python-two-args python-opt-two-args))
+         (nconc interpreter-args (car pair))
+         (setq args (cadr pair))))
+
+      ;; Remove "ipdb" from "ipdb --ipdb-options script
+      ;; --script-options"
+      (setq debugger-name (file-name-sans-extension
+                          (file-name-nondirectory (car args))))
+      (unless (string-match "^\\(ipdb\\|cli.py\\)$" debugger-name)
+       (message
+        "Expecting debugger name `%s' to be `ipdb' or `cli.py'"
+        debugger-name))
+      (setq debugger-args (list (pop args)))
+
+      ;; Skip to the first non-option argument.
+      (while (and args (not script-name))
+       (let ((arg (car args)))
+         (cond
+          ;; Options with arguments.
+          ((string-match "^-" arg)
+           (setq pair (realgud-parse-command-arg
+                       args ipdb-two-args ipdb-opt-two-args))
+           (nconc debugger-args (car pair))
+           (setq args (cadr pair)))
+          ;; Anything else must be the script to debug.
+          (t (setq script-name (expand-file-name arg))
+             (setq script-args (cons script-name (cdr args))))
+          )))
+      (list interpreter-args debugger-args script-args annotate-p))))
+
+(defun ipdb-parse-remote-cmd-args (orig-args)
+    "Parse command line ORIG-ARGS
+ORIG-ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing:
+* the command processor (e.g. python) and it's arguments if any - a list of 
strings
+* the name of the debugger given (e.g. ipdb) and its arguments - a list of 
strings
+* the script name and its arguments - list of strings
+* nil
+
+For example for the following input:
+  (map 'list 'symbol-name
+   '(telnet localhost 6900))
+
+we might return:
+   ((\"telnet\" \"localhost\" \"6900\") nil nil nil)
+
+Note that the script name path has been expanded via `expand-file-name'.
+"
+    (list orig-args '("ipdb") nil nil nil)
+  )
+
+  ;; To silence Warning: reference to free variable
+(defvar realgud:ipdb-command-name)
+
+(defun ipdb-remote-suggest-invocation (debugger-name)
+  "Suggest an ipdb command invocation via `realgud-suggest-invocaton'"
+  "telnet 127.0.0.1 4000")
+
+(defun ipdb-suggest-invocation (debugger-name)
+  "Suggest a ipdb command invocation via `realgud-suggest-invocaton'"
+  (realgud-suggest-invocation realgud:ipdb-command-name
+                             realgud:ipdb-minibuffer-history
+                             "python" "\\.py"))
+
+(defun ipdb-reset ()
+  "Ipdb cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+  (interactive)
+  ;; (ipdb-breakpoint-remove-all-icons)
+  (dolist (buffer (buffer-list))
+    (when (string-match "\\*ipdb-[a-z]+\\*" (buffer-name buffer))
+      (let ((w (get-buffer-window buffer)))
+        (when w
+          (delete-window w)))
+      (kill-buffer buffer))))
+
+;; (defun ipdb-reset-keymaps()
+;;   "This unbinds the special debugger keys of the source buffers."
+;;   (interactive)
+;;   (setcdr (assq 'ipdb-debugger-support-minor-mode minor-mode-map-alist)
+;;       ipdb-debugger-support-minor-mode-map-when-deactive))
+
+(defconst realgud:ipdb-complete-script
+  (concat
+   "from IPython import get_ipython;"
+   "comp = '''%s''';"
+   "prefix, candidates = get_ipython().Completer.complete(line_buffer = comp);"
+   "print(';'.join([prefix] + candidates))"))
+
+(defun realgud:ipdb-backend-complete ()
+  "Send a command to the ipdb buffer and parse the output.
+
+The idea here is to rely on the
+`comint-redirect-send-command-to-process' function to send a
+python command `realgud:ipdb-complete-script' that will return
+the completions for the given input."
+  (interactive)
+  (let ((buffer (current-buffer))
+        (cmdbuf (realgud-get-cmdbuf))
+        (process (get-buffer-process (current-buffer)))
+        (start-pos (save-excursion (comint-goto-process-mark) (point)))
+        (end-pos (point)))
+
+    ;; get the input string
+    (when (> end-pos start-pos)
+      (let* ((input-str (buffer-substring-no-properties start-pos end-pos))
+             (command-str (format realgud:ipdb-complete-script input-str))
+             (output-str (with-temp-buffer
+                           (comint-redirect-send-command-to-process
+                            command-str (current-buffer) process nil t)
+                           ;; Wait for the process to complete
+                           (with-current-buffer (process-buffer process)
+                             (while (null comint-redirect-completed)
+                               (accept-process-output nil 0 5))) ;; wait 5ms
+                           (buffer-substring (point-min) (1- (point-max)))))
+             (output-values (split-string output-str ";"))
+             (prefix (car output-values)))
+        (list (- end-pos (length prefix)) end-pos (cdr output-values))))))
+
+(defun realgud:ipdb-completion-at-point ()
+  (let ((ipdb (realgud:ipdb-backend-complete)))
+    (when ipdb
+      (list (nth 0 ipdb)
+            (nth 1 ipdb)
+            (nth 2 ipdb)
+            :exclusive 'yes))))
+
+(defun realgud:ipdb-customize ()
+  "Use `customize' to edit the settings of the `ipdb' debugger."
+  (interactive)
+  (customize-group 'realgud:ipdb))
+
+(provide-me "realgud:ipdb-")
diff --git a/packages/realgud/realgud/debugger/ipdb/init.el 
b/packages/realgud/realgud/debugger/ipdb/init.el
new file mode 100644
index 0000000..b1cd04f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/ipdb/init.el
@@ -0,0 +1,133 @@
+;; Copyright (C) 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+;; Author: Sean Farley <address@hidden>
+
+;; 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/>.
+;; Stock Python debugger ipdb
+
+(eval-when-compile (require 'cl-lib))   ;For setf.
+
+(require 'load-relative)
+(require-relative-list '("../../common/regexp"
+                        "../../common/loc"
+                        "../../common/init")
+                      "realgud-")
+(require-relative-list '("../../lang/python") "realgud-lang-")
+
+(defvar realgud-pat-hash)
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defvar realgud:ipdb-pat-hash (make-hash-table :test 'equal)
+  "Hash key is the what kind of pattern we want to match:
+backtrace, prompt, etc.  The values of a hash entry is a
+realgud-loc-pat struct")
+
+(declare-function make-realgud-loc "realgud-loc" (a b c d e f))
+
+;; Regular expression that describes a ipdb location generally shown
+;; before a command prompt.
+;;
+;; Program-location lines look like this:
+;;   > /usr/bin/zonetab2pot.py(15)<module>()
+;; or MS Windows:
+;;   > c:\\mydirectory\\gcd.py(10)<module>
+(setf (gethash "loc" realgud:ipdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^> \\(\\(?:[a-zA-Z]:\\)?[-a-zA-Z0-9_/.\\\\ ]+\\)(\\([0-9]+\\))"
+       :file-group 1
+       :line-group 2))
+
+(setf (gethash "prompt" realgud:ipdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp   "^ipdb[>] "
+       ))
+
+;;  Regular expression that describes a Python backtrace line.
+(setf (gethash "lang-backtrace" realgud:ipdb-pat-hash)
+      realgud-python-backtrace-loc-pat)
+
+;;  Regular expression that describes location in a pytest error
+(setf (gethash "pytest-error" realgud:ipdb-pat-hash)
+      realgud-pytest-error-loc-pat)
+
+;;  Regular expression that describes a "breakpoint set" line. For example:
+;;     Breakpoint 1 at /usr/bin/ipdb:7
+(setf (gethash "brkpt-set" realgud:ipdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^Breakpoint \\([0-9]+\\) at[ 
\t\n]+\\(.+\\):\\([0-9]+\\)\\(\n\\|$\\)"
+       :num 1
+       :file-group 2
+       :line-group 3))
+
+;; Regular expression that describes a "delete breakpoint" line
+;; Python 3 includes a file name and line number; Python 2 doesn't
+(setf (gethash "brkpt-del" realgud:ipdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^Deleted breakpoint \\([0-9]+\\)"
+       :num 1))
+
+(setf (gethash "font-lock-keywords" realgud:ipdb-pat-hash)
+      '(
+       ;; The frame number and first type name, if present.
+       ("^\\(->\\|##\\)\\([0-9]+\\) \\(<module>\\)? 
*\\([a-zA-Z_][a-zA-Z0-9_]*\\)(\\(.+\\))?"
+        (2 realgud-backtrace-number-face)
+        (4 font-lock-function-name-face nil t))     ; t means optional.
+
+       ;; Parameter sequence, E.g. gcd(a=3, b=5)
+       ;;                             ^^^^^^^^^
+       ("(\\(.+\\))"
+        (1 font-lock-variable-name-face))
+
+       ;; File name. E.g  file '/test/gcd.py'
+       ;;                 ------^^^^^^^^^^^^-
+       ("[ \t]+file '\\([^ ]+*\\)'"
+        (1 realgud-file-name-face))
+
+       ;; Line number. E.g. at line 28
+        ;;                  ---------^^
+       ("[ \t]+at line \\([0-9]+\\)$"
+        (1 realgud-line-number-face))
+
+       ;; Function name.
+       ("\\<\\([a-zA-Z_][a-zA-Z0-9_]*\\)\\.\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
+        (1 font-lock-type-face)
+        (2 font-lock-function-name-face))
+       ;; (ipdb-frames-match-current-line
+       ;;  (0 ipdb-frames-current-frame-face append))
+       ))
+
+(setf (gethash "ipdb" realgud-pat-hash) realgud:ipdb-pat-hash)
+
+(defvar realgud:ipdb-command-hash (make-hash-table :test 'equal)
+  "Hash key is command name like 'finish' and the value is
+the ipdb command to use, like 'return'")
+
+(setf (gethash "pdb" realgud-command-hash) realgud:ipdb-command-hash)
+
+;; Mappings between PDB-specific names and GUD names
+(setf (gethash "finish" realgud:ipdb-command-hash) "return")
+(setf (gethash "kill" realgud:ipdb-command-hash) "quit")
+(setf (gethash "backtrace" realgud:ipdb-command-hash) "where")
+;; Clear in Python does both the usual “delete” and “clear”
+(setf (gethash "delete" realgud:ipdb-command-hash) "clear %p")
+(setf (gethash "clear" realgud:ipdb-command-hash) "clear %X:%l")
+;; Use ‘!’ instead of ‘p’, since ‘p’ only works for expressions, not statements
+(setf (gethash "eval" realgud:ipdb-command-hash) "!%s")
+
+;; Unsupported features:
+(setf (gethash "shell" realgud:ipdb-command-hash) "*not-implemented*")
+(setf (gethash "frame" realgud:ipdb-command-hash) "*not-implemented*")
+
+(provide-me "realgud:ipdb-")
diff --git a/packages/realgud/realgud/debugger/ipdb/ipdb.el 
b/packages/realgud/realgud/debugger/ipdb/ipdb.el
new file mode 100644
index 0000000..022acbd
--- /dev/null
+++ b/packages/realgud/realgud/debugger/ipdb/ipdb.el
@@ -0,0 +1,122 @@
+;; Copyright (C) 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+;; Author: Sean Farley <address@hidden>
+
+;; 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/>.
+
+;;  `ipdb' Main interface to ipdb via Emacs
+(require 'load-relative)
+(require-relative-list '("core" "track-mode") "realgud:ipdb-")
+(require-relative-list '("../../common/run")  "realgud:")
+(require-relative-list '("core" "track-mode") "realgud:ipdb-")
+
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:ipdb nil
+  "The realgud interface to the Python ipdb debugger"
+  :group 'realgud
+  :version "24.3")
+
+;; -------------------------------------------------------------------
+;; User-definable variables
+;;
+
+(defcustom realgud:ipdb-command-name
+  "ipdb"
+  "File name for executing the stock Python debugger and command options.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'realgud:ipdb)
+;; -------------------------------------------------------------------
+;; The end.
+;;
+
+(declare-function ipdb-track-mode       'realgud:ipdb-track)
+(declare-function ipdb-query-cmdline    'realgud:ipdb-core)
+(declare-function ipdb-parse-cmd-args   'realgud:ipdb-core)
+(declare-function realgud:ipdb-completion-at-point 'realgud:ipdb-core)
+(declare-function realgud:run-debugger 'realgud:run)
+
+;;;###autoload
+(defun realgud:ipdb (&optional opt-cmd-line no-reset)
+  "Invoke the ipdb Python debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run ipdb. You will be prompted
+for a command line is one isn't supplied.
+
+OPT-COMMAND-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `ipdb-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+"
+  (interactive)
+  (let ((cmd-buf (realgud:run-debugger "ipdb" 'ipdb-query-cmdline
+                                       'ipdb-parse-cmd-args
+                                       'realgud:ipdb-minibuffer-history
+                                       opt-cmd-line no-reset))
+        )
+    (add-hook 'completion-at-point-functions
+              'realgud:ipdb-completion-at-point nil t)
+    (with-current-buffer cmd-buf
+      (add-hook 'completion-at-point-functions
+               'realgud:ipdb-completion-at-point nil t)
+      )
+    cmd-buf)
+  )
+
+
+;;;###autoload
+(defun realgud:ipdb-remote (&optional opt-cmd-line no-reset)
+  "Invoke the ipdb Python debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run ipdb. You will be prompted
+for a command line is one isn't supplied.
+
+OPT-COMMAND-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `ipdb-parse-remote-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+"
+  (interactive)
+  (let ((cmd-buf (realgud:run-debugger "ipdb" 'ipdb-remote-query-cmdline
+                                       'ipdb-parse-remote-cmd-args
+                                       'realgud:ipdb-remote-minibuffer-history
+                                       opt-cmd-line no-reset "remote-ipdb"))
+        )
+    (add-hook 'completion-at-point-functions
+              'realgud:ipdb-completion-at-point nil t)
+    cmd-buf)
+  )
+
+
+(defalias 'ipdb 'realgud:ipdb)
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/debugger/ipdb/track-mode.el 
b/packages/realgud/realgud/debugger/ipdb/track-mode.el
new file mode 100644
index 0000000..b723a07
--- /dev/null
+++ b/packages/realgud/realgud/debugger/ipdb/track-mode.el
@@ -0,0 +1,77 @@
+;; Copyright (C) 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+;; Author: Sean Farley <address@hidden>
+
+;; 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/>.
+;; Python "ipdb" Debugger tracking a comint buffer.
+
+(require 'load-relative)
+(require-relative-list '(
+                         "../../common/cmds"
+                         "../../common/menu"
+                         "../../common/track"
+                         "../../common/track-mode"
+                         )
+                       "realgud-")
+(require-relative-list '("core" "init") "realgud:ipdb-")
+
+(realgud-track-mode-vars "ipdb")
+
+(declare-function realgud-track-mode 'realgud-track-mode)
+(declare-function realgud-track-mode-setup 'realgud-track-mode)
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+(declare-function realgud-python-populate-command-keys 'realgud-lang-python)
+(declare-function realgud:ipdb-completion-at-point 'realgud:ipdb-core)
+
+(realgud-python-populate-command-keys ipdb-track-mode-map)
+
+(defun ipdb-track-mode-hook()
+  (if ipdb-track-mode
+      (progn
+        (use-local-map ipdb-track-mode-map)
+        (add-hook 'completion-at-point-functions
+                  'realgud:ipdb-completion-at-point nil t)
+        (message "using ipdb mode map")
+        )
+    (message "ipdb track-mode-hook disable called")
+    )
+)
+
+(define-minor-mode ipdb-track-mode
+  "Minor mode for tracking ipdb source locations inside a process shell via 
realgud. ipdb is a Python debugger based on ipython.
+
+If called interactively with no prefix argument, the mode is toggled. A prefix 
argument, captured as ARG, enables the mode if the argument is positive, and 
disables it otherwise.
+
+a process shell.
+
+\\{ipdb-track-mode-map}
+"
+  :init-value nil
+  ;; :lighter " ipdb"   ;; mode-line indicator from realgud-track is 
sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:ipdb
+  :keymap ipdb-track-mode-map
+  (realgud:track-set-debugger "ipdb")
+  (if ipdb-track-mode
+      (progn
+       (realgud-track-mode-setup 't)
+        (ipdb-track-mode-hook))
+    (progn
+      (setq realgud-track-mode nil)
+      ))
+)
+
+(provide-me "realgud:ipdb-")
diff --git a/packages/realgud/realgud/debugger/jdb/Makefile.am 
b/packages/realgud/realgud/debugger/jdb/Makefile.am
new file mode 100644
index 0000000..9a343a5
--- /dev/null
+++ b/packages/realgud/realgud/debugger/jdb/Makefile.am
@@ -0,0 +1 @@
+include $(srcdir)/../common.mk
diff --git a/packages/realgud/realgud/debugger/jdb/README 
b/packages/realgud/realgud/debugger/jdb/README
new file mode 100644
index 0000000..d37044a
--- /dev/null
+++ b/packages/realgud/realgud/debugger/jdb/README
@@ -0,0 +1,2 @@
+Supporting JDB is going to be a mess.
+Consider using something else. Eclipse anyone?
diff --git a/packages/realgud/realgud/debugger/jdb/backtrack-mode.el 
b/packages/realgud/realgud/debugger/jdb/backtrack-mode.el
new file mode 100644
index 0000000..1454edc
--- /dev/null
+++ b/packages/realgud/realgud/debugger/jdb/backtrack-mode.el
@@ -0,0 +1,78 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;; Mode for parsing various kinds of backtraces found in Java
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                        "../../common/track-mode"
+                        "../../common/backtrack-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud:jdb-")
+(require-relative-list '("../../lang/ruby") "realgud-lang-")
+
+(realgud-backtrack-mode-vars "jdb")
+(set-keymap-parent jdb-backtrack-mode-map realgud-backtrack-mode-map)
+
+(declare-function realgud-backtrack-mode         
'realgud-common-backtrack-mode)
+(declare-function realgud-backtrack-set-debugger 
'realgud-common-backtrack-mode)
+(declare-function realgud-goto-line-for-pt       
'realgud-common-backtrack-mode)
+(declare-function realgud:ruby-populate-command-keys 'realgud-lang-ruby)
+
+(defun realgud:jdb-goto-control-frame-line (pt)
+  "Display the location mentioned by a control-frame line
+described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "control-frame"))
+
+(realgud:ruby-populate-command-keys jdb-backtrack-mode-map)
+(define-key jdb-backtrack-mode-map
+  (kbd "C-c !c") 'realgud:jdb-goto-control-frame-line)
+
+(define-minor-mode jdb-backtrack-mode
+  "Minor mode for tracking ruby debugging inside a file which may not have 
process shell.
+
+\\{jdb-backtrack-mode-map}"
+  :init-value nil
+  ;; :lighter " jdb"   ;; mode-line indicator from realgud-track is sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:jdb
+  :keymap jdb-backtrack-mode-map
+
+  (realgud-backtrack-set-debugger "jdb")
+  (if jdb-backtrack-mode
+      (progn
+       (realgud-backtrack-mode 't)
+       (run-mode-hooks (intern (jdb-backtrack-mode-hook))))
+    (progn
+      (realgud-backtrack-mode nil)
+      ))
+)
+
+(defun jdb-backtrack-mode-hook()
+  (if jdb-backtrack-mode
+      (progn
+       (use-local-map jdb-backtrack-mode-map)
+       (message "using jdb mode map")
+       )
+    (message "jdb backtrack-mode-hook disable called"))
+)
+
+(provide-me "realgud:jdb-")
diff --git a/packages/realgud/realgud/debugger/jdb/core.el 
b/packages/realgud/realgud/debugger/jdb/core.el
new file mode 100644
index 0000000..9199c23
--- /dev/null
+++ b/packages/realgud/realgud/debugger/jdb/core.el
@@ -0,0 +1,192 @@
+;; Copyright (C) 2014, 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;; We use gud to handle the classpath-to-filename mapping
+(require 'gud)
+(require 'compile) ;; for compilation-find-file
+
+(require 'load-relative)
+(require-relative-list '("../../common/track"
+                         "../../common/core"
+                         "../../common/file"
+                         "../../common/lang"
+                         "../../common/utils")
+                       "realgud-")
+(require-relative-list '("init") "realgud:jdb-")
+
+(declare-function gud-find-source            'gud)
+
+(declare-function realgud:strip              'realgud-utils)
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
+(declare-function realgud-parse-command-arg  'realgud-core)
+(declare-function realgud-query-cmdline      'realgud-core)
+(declare-function realgud-suggest-invocation 'realgud-core)
+(declare-function realgud:file-loc-from-line 'realgud-file)
+
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:jdb-minibuffer-history nil
+  "minibuffer history list for the command `realgud:jdb'.")
+
+(easy-mmode-defmap jdb-minibuffer-local-map
+  '(("\C-i" . comint-dynamic-complete-filename))
+  "Keymap for minibuffer prompting of gud startup command."
+  :inherit minibuffer-local-map)
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun realgud:jdb-query-cmdline (&optional opt-debugger)
+  (realgud-query-cmdline
+   'jdb-suggest-invocation
+   jdb-minibuffer-local-map
+   'realgud:jdb-minibuffer-history
+   opt-debugger))
+
+(defun realgud:jdb-dot-to-slash (str)
+  "Change '.' to '/' in STR but chop off from the last . to the end. For 
example
+ca.mgcill.rocky.snpEff.main => ca/mcgill/rocky/snpEff"
+      ;;(setq str (replace-regexp-in-string "\\([^\\.]+\\.\\)[^\\.]+$" "\\1" 
str))
+      ;;(setq str (replace-regexp-in-string "\\.$" "" str))
+      (setq str (replace-regexp-in-string "\\." "/" str))
+      str)
+
+(defvar realgud:jdb-file-remap (make-hash-table :test 'equal)
+  "How to remap Java files in jdb when we otherwise can't find in
+  the filesystem. The hash key is the file string we saw, and the
+  value is associated filesystem string presumably in the
+  filesystem")
+
+(defun realgud:jdb-find-file(filename)
+  "A find-file specific for java/jdb. We use `gdb-jdb-find-source' to map a
+name to a filename. Failing that we can add on .java to the name. Failing that
+we will prompt for a mapping and save that in `realgud:jdb-file-remap' when
+that works."
+  (let* ((transformed-file)
+        (stripped-filename (realgud:strip filename))
+        (gud-jdb-filename (gud-jdb-find-source stripped-filename))
+       )
+    (cond
+     ((and gud-jdb-filename (file-exists-p gud-jdb-filename))
+      gud-jdb-filename)
+     ((file-exists-p (setq transformed-file (concat stripped-filename 
".java")))
+      transformed-file)
+     ('t
+      (if (gethash stripped-filename realgud:jdb-file-remap)
+         (let ((remapped-filename))
+           (setq remapped-filename (gethash stripped-filename 
realgud:jdb-file-remap))
+           (if (file-exists-p remapped-filename)
+               remapped-filename
+             ;; else
+             (and (remhash filename realgud-file-remap) nil)))
+       ;; else
+       (let ((remapped-filename)
+             (guess-filename (realgud:jdb-dot-to-slash filename)))
+         (setq remapped-filename
+               (buffer-file-name
+                (compilation-find-file (point-marker) guess-filename
+                                       nil "%s.java")))
+         (when (and remapped-filename (file-exists-p remapped-filename))
+           (puthash stripped-filename remapped-filename realgud:jdb-file-remap)
+           remapped-filename
+           ))
+       ))
+     ))
+  )
+
+(defun realgud:jdb-loc-fn-callback(text filename lineno source-str
+                                       ignore-file-re cmd-mark)
+  (realgud:file-loc-from-line filename lineno
+                             cmd-mark source-str nil
+                             ignore-file-re 'realgud:jdb-find-file))
+
+(defun realgud:jdb-parse-cmd-args (orig-args)
+  "Parse command line ARGS for the annotate level and name of script to debug.
+
+ORIG-ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing
+
+* the command debugger (e.g. jdb)
+
+* debugger command rguments if any - a list of strings
+
+* the script name and its arguments - list of strings
+
+For example for the following input
+   '(\"jdb\" \"-classpath . ./TestMe.java a b\"))
+
+we might return:
+   (\"jdb\" nil \"TestMe\"))
+
+Note that the script name path has been expanded via `expand-file-name'.
+"
+
+  ;; Parse the following kind of pattern:
+  ;;  [ruby ruby-options] jdb jdb-options script-name script-options
+  (let (
+        (args orig-args)
+       (interp-regexp
+        (if (member system-type (list 'windows-nt 'cygwin 'msdos))
+            "^jdb*\\(.exe\\)?$"
+          "^jdb*$"))
+       (jdb-name)
+        ;;
+        ;; One dash is added automatically to the below, so
+        ;; attach is really -attach
+       (jdb-two-args '("attach" "sourcepath" "classpath" "dbgtrace"))
+
+        ;; Things returned
+        (debugger-args '())
+        (program-args '()))
+
+    (if (not (and args))
+        ;; Got nothing: return '(nil nil nil)
+        (list jdb-name nil debugger-args program-args)
+      ;; else
+      ;; Strip off optional "jdb" or "jdb.exe" etc.
+      (when (string-match interp-regexp (car args))
+       (setq jdb-name (car args))
+        (setq program-args (nconc program-args (cdr args))))
+
+      (list jdb-name debugger-args program-args))))
+
+;; To silence Warning: reference to free variable
+(defvar realgud:jdb-command-name)
+
+(defun jdb-suggest-invocation (debugger-name)
+  "Suggest a jdb command invocation via `realgud-suggest-invocaton'"
+  (realgud-suggest-invocation realgud:jdb-command-name
+                             realgud:jdb-minibuffer-history
+                             "java" "\\.java$" "jdb"))
+
+(defun jdb-reset ()
+  "Jdb cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+  (interactive)
+  ;; (jdb-breakpoint-remove-all-icons)
+  (dolist (buffer (buffer-list))
+    (when (string-match "\\*jdb-[a-z]+\\*" (buffer-name buffer))
+      (let ((w (get-buffer-window buffer)))
+        (when w
+          (delete-window w)))
+      (kill-buffer buffer))))
+
+;; (defun jdb-reset-keymaps()
+;;   "This unbinds the special debugger keys of the source buffers."
+;;   (interactive)
+;;   (setcdr (assq 'jdb-debugger-support-minor-mode minor-mode-map-alist)
+;;        jdb-debugger-support-minor-mode-map-when-deactive))
+
+
+(defun realgud:jdb-customize ()
+  "Use `customize' to edit the settings of the `jdb' debugger."
+  (interactive)
+  (customize-group 'realgud:jdb))
+
+(provide-me "realgud:jdb-")
diff --git a/packages/realgud/realgud/debugger/jdb/file.el 
b/packages/realgud/realgud/debugger/jdb/file.el
new file mode 100644
index 0000000..388478a
--- /dev/null
+++ b/packages/realgud/realgud/debugger/jdb/file.el
@@ -0,0 +1,241 @@
+;; Copyright (C) 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+;; Association list of fully qualified class names (package + class name)
+;; and their source files.
+(defvar gud-jdb-class-source-alist nil
+  "Association list of fully qualified class names and source files.")
+
+;; This is used to hold a source file during analysis.
+(defvar gud-jdb-analysis-buffer nil)
+
+(defvar gud-jdb-classpath-string nil
+  "Holds temporary classpath values.")
+
+(defun gud-jdb-build-source-files-list (path extn)
+  "Return a list of java source files (absolute paths).
+PATH gives the directories in which to search for files with
+extension EXTN.  Normally EXTN is given as the regular expression
+ \"\\.java$\" ."
+  (apply 'nconc (mapcar (lambda (d)
+                         (when (file-directory-p d)
+                           (directory-files d t extn nil)))
+                       path)))
+
+;; Move point past whitespace.
+(defun gud-jdb-skip-whitespace ()
+  (skip-chars-forward " \n\r\t\014"))
+
+;; Move point past a "// <eol>" type of comment.
+(defun gud-jdb-skip-single-line-comment ()
+  (end-of-line))
+
+;; Move point past a "/* */" or "/** */" type of comment.
+(defun gud-jdb-skip-traditional-or-documentation-comment ()
+  (forward-char 2)
+  (catch 'break
+    (while (not (eobp))
+      (if (eq (following-char) ?*)
+         (progn
+           (forward-char)
+           (if (not (eobp))
+               (if (eq (following-char) ?/)
+                   (progn
+                     (forward-char)
+                     (throw 'break nil)))))
+       (forward-char)))))
+
+;; Move point past any number of consecutive whitespace chars and/or comments.
+(defun gud-jdb-skip-whitespace-and-comments ()
+  (gud-jdb-skip-whitespace)
+  (catch 'done
+    (while t
+      (cond
+       ((looking-at "//")
+       (gud-jdb-skip-single-line-comment)
+       (gud-jdb-skip-whitespace))
+       ((looking-at "/\\*")
+       (gud-jdb-skip-traditional-or-documentation-comment)
+       (gud-jdb-skip-whitespace))
+       (t (throw 'done nil))))))
+
+;; Move point past things that are id-like.  The intent is to skip regular
+;; id's, such as class or interface names as well as package and interface
+;; names.
+(defun gud-jdb-skip-id-ish-thing ()
+  (skip-chars-forward "^ /\n\r\t\014,;{"))
+
+;; Move point past a string literal.
+(defun gud-jdb-skip-string-literal ()
+  (forward-char)
+  (while (not (cond
+              ((eq (following-char) ?\\)
+               (forward-char))
+              ((eq (following-char) ?\042))))
+    (forward-char))
+  (forward-char))
+
+;; Move point past a character literal.
+(defun gud-jdb-skip-character-literal ()
+  (forward-char)
+  (while
+      (progn
+       (if (eq (following-char) ?\\)
+           (forward-char 2))
+       (not (eq (following-char) ?\')))
+    (forward-char))
+  (forward-char))
+
+;; Move point past the following block.  There may be (legal) cruft before
+;; the block's opening brace.  There must be a block or it's the end of life
+;; in petticoat junction.
+(defun gud-jdb-skip-block ()
+
+  ;; Find the beginning of the block.
+  (while
+      (not (eq (following-char) ?{))
+
+    ;; Skip any constructs that can harbor literal block delimiter
+    ;; characters and/or the delimiters for the constructs themselves.
+    (cond
+     ((looking-at "//")
+      (gud-jdb-skip-single-line-comment))
+     ((looking-at "/\\*")
+      (gud-jdb-skip-traditional-or-documentation-comment))
+     ((eq (following-char) ?\042)
+      (gud-jdb-skip-string-literal))
+     ((eq (following-char) ?\')
+      (gud-jdb-skip-character-literal))
+     (t (forward-char))))
+
+  ;; Now at the beginning of the block.
+  (forward-char)
+
+  ;; Skip over the body of the block as well as the final brace.
+  (let ((open-level 1))
+    (while (not (eq open-level 0))
+      (cond
+       ((looking-at "//")
+       (gud-jdb-skip-single-line-comment))
+       ((looking-at "/\\*")
+       (gud-jdb-skip-traditional-or-documentation-comment))
+       ((eq (following-char) ?\042)
+       (gud-jdb-skip-string-literal))
+       ((eq (following-char) ?\')
+       (gud-jdb-skip-character-literal))
+       ((eq (following-char) ?{)
+       (setq open-level (+ open-level 1))
+       (forward-char))
+       ((eq (following-char) ?})
+       (setq open-level (- open-level 1))
+       (forward-char))
+       (t (forward-char))))))
+
+;; Find the package and class definitions in Java source file FILE.  Assumes
+;; that FILE contains a legal Java program.  BUF is a scratch buffer used
+;; to hold the source during analysis.
+(defun gud-jdb-analyze-source (buf file)
+  (let ((l nil))
+    (set-buffer buf)
+    (insert-file-contents file nil nil nil t)
+    (goto-char 0)
+    (catch 'abort
+      (let ((p ""))
+       (while (progn
+                (gud-jdb-skip-whitespace)
+                (not (eobp)))
+         (cond
+
+          ;; Any number of semi's following a block is legal.  Move point
+          ;; past them.  Note that comments and whitespace may be
+          ;; interspersed as well.
+          ((eq (following-char) ?\073)
+           (forward-char))
+
+          ;; Move point past a single line comment.
+          ((looking-at "//")
+           (gud-jdb-skip-single-line-comment))
+
+          ;; Move point past a traditional or documentation comment.
+          ((looking-at "/\\*")
+           (gud-jdb-skip-traditional-or-documentation-comment))
+
+          ;; Move point past a package statement, but save the PackageName.
+          ((looking-at "package")
+           (forward-char 7)
+           (gud-jdb-skip-whitespace-and-comments)
+           (let ((s (point)))
+             (gud-jdb-skip-id-ish-thing)
+             (setq p (concat (buffer-substring s (point)) "."))
+             (gud-jdb-skip-whitespace-and-comments)
+             (if (eq (following-char) ?\073)
+                 (forward-char))))
+
+          ;; Move point past an import statement.
+          ((looking-at "import")
+           (forward-char 6)
+           (gud-jdb-skip-whitespace-and-comments)
+           (gud-jdb-skip-id-ish-thing)
+           (gud-jdb-skip-whitespace-and-comments)
+           (if (eq (following-char) ?\073)
+               (forward-char)))
+
+          ;; Move point past the various kinds of ClassModifiers.
+          ((looking-at "public")
+           (forward-char 6))
+          ((looking-at "abstract")
+           (forward-char 8))
+          ((looking-at "final")
+           (forward-char 5))
+
+          ;; Move point past a ClassDeclaration, but save the class
+          ;; Identifier.
+          ((looking-at "class")
+           (forward-char 5)
+           (gud-jdb-skip-whitespace-and-comments)
+           (let ((s (point)))
+             (gud-jdb-skip-id-ish-thing)
+             (setq
+              l (nconc l (list (concat p (buffer-substring s (point)))))))
+           (gud-jdb-skip-block))
+
+          ;; Move point past an interface statement.
+          ((looking-at "interface")
+           (forward-char 9)
+           (gud-jdb-skip-block))
+
+          ;; Anything else means the input is invalid.
+          (t
+           (message "Error parsing file %s." file)
+           (throw 'abort nil))))))
+    l))
+
+(defun gud-jdb-build-class-source-alist-for-file (file)
+  (mapcar
+   (lambda (c)
+     (cons c file))
+   (gud-jdb-analyze-source gud-jdb-analysis-buffer file)))
+
+;; Return an alist of fully qualified classes and the source files
+;; holding their definitions.  SOURCES holds a list of all the source
+;; files to examine.
+(defun gud-jdb-build-class-source-alist (sources)
+  (setq gud-jdb-analysis-buffer (get-buffer-create " *gud-jdb-scratch*"))
+  (prog1
+      (apply
+       'nconc
+       (mapcar
+       'gud-jdb-build-class-source-alist-for-file
+       sources))
+    (kill-buffer gud-jdb-analysis-buffer)
+    (setq gud-jdb-analysis-buffer nil)))
diff --git a/packages/realgud/realgud/debugger/jdb/init.el 
b/packages/realgud/realgud/debugger/jdb/init.el
new file mode 100644
index 0000000..82bfe4a
--- /dev/null
+++ b/packages/realgud/realgud/debugger/jdb/init.el
@@ -0,0 +1,226 @@
+;; Copyright (C) 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+(eval-when-compile (require 'cl-lib))   ;For setf.
+
+(require 'load-relative)
+(require-relative-list '("../../common/regexp"
+                        "../../common/loc"
+                        "../../common/init")
+                      "realgud-")
+
+;; (require-relative-list '("../../lang/java") "realgud-lang-")
+
+(defvar realgud-pat-hash)
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defconst realgud:jdb-identifier "[A-Za-z_][A-Za-z0-9_.]+"
+"Regexp string that matches a Java identifier possily with class
+name. For example java.lang.Class.getDeclaredMethods")
+
+(defvar realgud:jdb-pat-hash (make-hash-table :test 'equal)
+  "Hash key is the what kind of pattern we want to match:
+backtrace, prompt, etc.  The values of a hash entry is a
+realgud-loc-pat struct")
+
+(setf (gethash "loc-callback-fn" realgud:jdb-pat-hash) 
'realgud:jdb-loc-fn-callback)
+
+;; realgud-loc-pat that describes a jdb location generally shown
+;; before a command prompt. For example:
+;;   Breakpoint hit: "thread=main", TestMe.main(), line=7 bci=0
+;;   Step completed: "thread=main", TestMe.<init>(), line=15 bci=0
+
+(setf (gethash "loc" realgud:jdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "\\(?:Breakpoint hit\\|Step completed\\): \"thread=.+\", 
\\(.+\\)?[.]\\(.+\\)(), line=\\([0-9]+\\) 
bci=\\([0-9]+\\)\\(?:\n\\([0-9]+\\)\\(.*\\)\\)?"
+       :file-group 1
+       :line-group 3
+       :text-group 6))
+
+;; realgud-loc-pat that describes a jdb command prompt
+;; For example:
+;;   main[1]
+;;   main[2]
+;;   >
+;; FIXME: I think the pattern is thread-name[stack-level]
+;; Here, we only deal with main.
+(setf (gethash "prompt" realgud:jdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^\\(?:main\\[\\([0-9]+\\)\\]\\|>\\) "
+       :num 1
+       ))
+
+;; realgud-loc-pat that describes a Java syntax error line.
+;; (setf (gethash "syntax-error" realgud:jdb-pat-hash)
+;;       realgud-java-syntax-error-pat)
+
+;; realgud-loc-pat that describes a Java backtrace line.
+;; For example:
+;;  [1] ca.snpEffect.commandLine.SnpEff.run (SnpEff.java:7)
+(setf (gethash "lang-backtrace" realgud:jdb-pat-hash)
+  (make-realgud-loc-pat
+   ;; FIXME: use realgud:jdb-identifier
+   :regexp "^\\(?:[     ]*[\\[0-9\\]+]\\) \\([A-Za-z_.][A-Za-z0-9.]+\\) 
(\\([A-Za-z_.][A-Za-z0-9.]+\\):\\([0-9]+\\))"
+   :file-group 1
+   :line-group 2))
+
+;; realgud-loc-pat that describes a "breakpoint set" line.
+;; For example:
+;;   Set breakpoint TestMe:7
+(setf (gethash "brkpt-set" realgud:jdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^Set breakpoint \\(.+\\):\\([0-9]+\\)"
+       :num 1
+       :line-group 2))
+
+;; realgud-loc-pat that describes a debugger "delete" (breakpoint) response.
+;; For example:
+;;   Removed: breakpoint TestMe:7
+(setf (gethash "brkpt-del" realgud:jdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^Removed breakpoint \\(.+\\):\\([0-9]+\\)\n"
+       :line-group 1))
+
+(defconst realgud:jdb-selected-frame-indicator "-->"
+"String that describes which frame is selected in a debugger
+backtrace listing.")
+
+(defconst realgud:jdb-frame-file-regexp
+  "[ \t\n]+in file \\([^ \n]+\\)")
+
+(defconst realgud:jdb-debugger-name "jdb" "Name of debugger")
+
+;; Top frame number
+(setf (gethash "top-frame-num" realgud:jdb-pat-hash) 0)
+
+;; realgud-loc-pat that describes a debugger "selected" frame in
+;; a frame-motion command.
+;; For example:
+;; --> #1 [1] TestMe.main (TestMe.java:7)
+;; Rocky: sometimes I am not getting the frame indicator.
+(setf (gethash "selected-frame" realgud:jdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp
+       (format "^%s #\\([0-9]+\\) .*%s"
+              realgud:jdb-selected-frame-indicator
+              realgud:jdb-frame-file-regexp)
+       :num 1))
+
+;; realgud-loc-pat that describes a jdb backtrace line.
+;; For example:
+;;  [1] TestMe.main (TestMe.java:7)
+;;  [2] java.lang.Class.privateGetDeclaredMethods (Class.java:2,570)
+;;  [3] java.lang.Class.getMethod0 (Class.java:2,813)
+;;  [4] java.lang.Class.getMethod (Class.java:1,663)
+;;  [5] sun.launcher.LauncherHelper.getMainMethod (LauncherHelper.java:494)
+;;  [6] sun.launcher.LauncherHelper.checkAndLoadMain (LauncherHelper.java:486)
+(setf (gethash "debugger-backtrace" realgud:jdb-pat-hash)
+  (make-realgud-loc-pat
+   :regexp "^\\(?:[\t ]*[\\[[0-9]+\\] 
\\)\\([A-Za-z_.][A-Za-z0-9.]+\\):\\([0-9]+\\)"
+   :file-group 1
+   :line-group 2))
+
+(setf (gethash "font-lock-keywords" realgud:jdb-pat-hash)
+      '(
+       ;; The frame number and first type name, if present.
+       ;; FIXME: use realgud:jdb-identifier
+       ("^\\(-->\\|   \\)? #\\([0-9]+\\) \\([A-Z]+\\) 
*\\([A-Z_][a-zA-Z0-9_]*\\)[#]\\([a-zA-Z_][a-zA-Z_[0-9]]*\\)?"
+        (2 realgud-backtrace-number-face)
+        (3 font-lock-keyword-face)         ; e.g. METHOD, TOP
+        (4 font-lock-constant-face)        ; e.g. Object
+        (5 font-lock-function-name-face nil t))   ; t means optional
+       ;; Instruction sequence
+       ("<\\(.+\\)>"
+        (1 font-lock-variable-name-face))
+       ;; "::Type", which occurs in class name of function and in parameter 
list.
+       ;; Parameter sequence
+       ("(\\(.+\\))"
+        (1 font-lock-variable-name-face))
+       ;; "::Type", which occurs in class name of function and in parameter 
list.
+       ("::\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
+        (1 font-lock-type-face))
+       ;; File name.
+       ("[ \t]+in file \\([^ ]+*\\)"
+        (1 realgud-file-name-face))
+       ;; Line number.
+       ("[ \t]+at line \\([0-9]+\\)$"
+        (1 realgud-line-number-face))
+       ;; Function name.
+       ("\\<\\([a-zA-Z_][a-zA-Z0-9_]*\\)\\.\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
+        (1 font-lock-type-face)
+        (2 font-lock-function-name-face))
+       ;; (jdb-frames-match-current-line
+       ;;  (0 jdb-frames-current-frame-face append))
+       ))
+
+;; (setf (gethash "font-lock-keywords" realgud:jdb-pat-hash)
+;;       '(
+;;     ;; The frame number and first type name, if present.
+;;     ((concat realgud:jdb-frame-start-regexp " "
+;;                     realgud:jdb-frame-num-regexp " "
+;;                     "\\([A-Z]+\\) 
*\\([A-Z_][a-zA-Z0-9_]*\\)[#]\\([a-zA-Z_][a-zA-Z_[0-9]]*\\)?")
+;;      (2 realgud-backtrace-number-face)
+;;      (3 font-lock-keyword-face)         ; e.g. METHOD, TOP
+;;      (4 font-lock-constant-face)        ; e.g. Object
+;;      (5 font-lock-function-name-face nil t))   ; t means optional
+;;     ;; Instruction sequence
+;;     ("<\\(.+\\)>"
+;;      (1 font-lock-variable-name-face))
+;;     ;; "::Type", which occurs in class name of function and in
+;;     ;; parameter list.  Parameter sequence
+;;     ("(\\(.+\\))"
+;;      (1 font-lock-variable-name-face))
+;;     ;; "::Type", which occurs in class name of function and in
+;;     ;; parameter list.
+;;     ("::\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
+;;      (1 font-lock-type-face))
+;;     ;; File name.
+;;     (realgud:jdb-frame-file-regexp (1 realgud-file-name-face))
+;;     ;; Line number.
+;;     (realgud:jdb-frame-line-regexp (1 realgud-line-number-face))
+;;     ;; Function name.
+;;     ("\\<\\([a-zA-Z_][a-zA-Z0-9_]*\\)\\.\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
+;;      (1 font-lock-type-face)
+;;      (2 font-lock-function-name-face))
+;;     ;; (jdb-frames-match-current-line
+;;     ;;  (0 jdb-frames-current-frame-face append))
+;;     ))
+
+(setf (gethash realgud:jdb-debugger-name realgud-pat-hash) 
realgud:jdb-pat-hash)
+
+(defvar realgud:jdb-command-hash (make-hash-table :test 'equal)
+  "Hash key is command name like 'quit' and the value is
+  the jdb command to use, like 'quit!'")
+
+(setf (gethash realgud:jdb-debugger-name
+              realgud-command-hash) realgud:jdb-command-hash)
+
+;;  Prefix used in variable names (e.g. short-key-mode-map) for
+;; this debugger
+
+(setf (gethash "jdb" realgud:variable-basename-hash) "realgud:jdb")
+
+
+(setf (gethash "backtrace"   realgud:jdb-command-hash) "where")
+
+;; For these we need to deal with java classpaths.
+;; Also jdb is pretty sucky when it comes to giving an prompt that
+;; we can write a regex for. So we don't even know often when there
+;; is a prompt!
+(setf (gethash "break"       realgud:jdb-command-hash) "*not-implemented*")
+(setf (gethash "clear"       realgud:jdb-command-hash) "*not-implemented*")
+(setf (gethash "restart"     realgud:jdb-command-hash) "*not-implemented*")
+
+(setf (gethash "continue"    realgud:jdb-command-hash) "cont")
+(setf (gethash "finish"      realgud:jdb-command-hash) "step up")
+(setf (gethash "up"          realgud:jdb-command-hash) "up\C-Mwhere")
+(setf (gethash "down"        realgud:jdb-command-hash) "down\C-Mwhere")
+
+
+(provide-me "realgud:jdb-")
diff --git a/packages/realgud/realgud/debugger/jdb/jdb.el 
b/packages/realgud/realgud/debugger/jdb/jdb.el
new file mode 100644
index 0000000..62afcea
--- /dev/null
+++ b/packages/realgud/realgud/debugger/jdb/jdb.el
@@ -0,0 +1,104 @@
+;; Copyright (C) 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;  `jdb' Main interface to jdb via Emacs
+
+(require 'gud) ;; For class-path and source-path handling
+
+(require 'load-relative)
+(require-relative-list '("../../common/run") "realgud:")
+(require-relative-list '("../../common/helper" "../../common/utils")
+                      "realgud-")
+(require-relative-list '("core" "track-mode") "realgud:jdb-")
+
+(declare-function realgud:jdb-query-cmdline  'realgud:jdb-core)
+(declare-function realgud:jdb-parse-cmd-args 'realgud:jdb-core)
+(declare-function realgud:run-process        'realgud:core)
+(declare-function realgud:flatten            'realgud-utils)
+
+
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:jdb nil
+  "The realgud interface to the Java's jdb debugger"
+  :group 'java
+  :group 'realgud
+  :version "24.3")
+
+;; -------------------------------------------------------------------
+;; User-definable variables
+;;
+
+(defcustom realgud:jdb-command-name
+  ;;"jdb --emacs 3"
+  "jdb"
+  "File name for executing the Java debugger and command options.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'realgud:jdb)
+
+;;;###autoload
+(defun realgud:jdb (&optional opt-cmd-line no-reset)
+  "Invoke the Java jdb debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `jdb-parse-cmd-args' and path elements found by that
+are expanded using `expand-file-name'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+"
+  (interactive)
+
+  (setq gud-jdb-classpath nil)
+  (setq gud-jdb-sourcepath nil)
+  ;; Set gud-jdb-classpath from the CLASSPATH environment variable,
+  ;; if CLASSPATH is set.
+  (setq gud-jdb-classpath-string (or (getenv "CLASSPATH") "."))
+  (if gud-jdb-classpath-string
+      (setq gud-jdb-classpath
+           (gud-jdb-parse-classpath-string gud-jdb-classpath-string)))
+
+  (setq gud-jdb-class-source-alist
+       (gud-jdb-build-class-source-alist
+        (setq gud-jdb-source-files
+              (gud-jdb-build-source-files-list gud-jdb-directories
+                                               "\\.java$"))))
+  (fset 'gud-jdb-find-source 'gud-jdb-find-source-file)
+
+
+  ;; reset for future invocations
+  (setq gud-jdb-classpath-string nil)
+
+  (let* (
+        (cmd-str (or opt-cmd-line (realgud:jdb-query-cmdline "jdb")))
+        (cmd-args (split-string-and-unquote cmd-str))
+        (parsed-args (realgud:jdb-parse-cmd-args cmd-args))
+        (script-args (caddr parsed-args))
+        (script-name (car script-args))
+        (parsed-cmd-args
+         (cl-remove-if 'nil (realgud:flatten parsed-args)))
+        )
+    (realgud:run-process "jdb" script-name parsed-cmd-args
+                        'realgud:jdb-track-mode-hook no-reset)
+    )
+  )
+
+(defalias 'jdb 'realgud:jdb)
+(provide-me "realgud-")
+
+;; Local Variables:
+;; byte-compile-warnings: (not cl-functions)
+;; End:
diff --git a/packages/realgud/realgud/debugger/jdb/track-mode.el 
b/packages/realgud/realgud/debugger/jdb/track-mode.el
new file mode 100644
index 0000000..e35a134
--- /dev/null
+++ b/packages/realgud/realgud/debugger/jdb/track-mode.el
@@ -0,0 +1,89 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;; Java "jdb" Debugger tracking a comint or eshell buffer.
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                        "../../common/track"
+                        "../../common/track-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud:jdb-")
+(require-relative-list '("../../lang/ruby") "realgud-lang-")
+
+(declare-function realgud-track-mode 'realgud-track-mode)
+(declare-function realgud-track-mode-hook 'realgud-track-mode)
+(declare-function realgud-track-mode-setup 'realgud-track-mode)
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+(declare-function realgud-goto-line-for-pt 'realgud-track-mode)
+
+(realgud-track-mode-vars "realgud:jdb")
+;;(defvaralias 'jdb-short-key-mode-map 'realgud:jdb-short-key-mode-map)
+;;(defvaralias 'jdb-track-mode         'realgud:track-mode)
+
+(define-key realgud-track-mode-map
+  (kbd "C-c !!") 'realgud:goto-lang-backtrace-line)
+(define-key realgud-track-mode-map
+  (kbd "C-c !b") 'realgud:goto-debugger-backtrace-line)
+
+(defun realgud:jdb-goto-control-frame-line (pt)
+  "Display the location mentioned by a control-frame line
+described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "control-frame"))
+
+(defun realgud:jdb-goto-syntax-error-line (pt)
+  "Display the location mentioned in a Syntax error line
+described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "syntax-error"))
+
+(define-key realgud:jdb-track-mode-map
+  (kbd "C-c !c") 'realgud:jdb-goto-control-frame-line)
+(define-key realgud:jdb-track-mode-map
+  (kbd "C-c !s") 'realgud:jdb-goto-syntax-error-line)
+
+(defun realgud:jdb-track-mode-hook()
+  (if realgud:jdb-track-mode
+      (progn
+       (use-local-map realgud:jdb-track-mode-map)
+       (message "using realgud:jdb-track-mode-map"))
+    ;; else
+    (progn
+      (setq realgud-track-mode nil)
+      ))
+)
+
+(define-minor-mode realgud:jdb-track-mode
+  "Minor mode for tracking jdb source locations inside a process shell via 
realgud. jdb is a Ruby debugger.
+
+If called interactively with no prefix argument, the mode is toggled. A prefix 
argument, captured as ARG, enables the mode if the argument is positive, and 
disables it otherwise.
+
+\\{realgud:jdb-track-mode-map}
+"
+  :init-value nil
+  ;; :lighter " jdb"   ;; mode-line indicator from realgud-track is sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:jdb
+  :keymap realgud:jdb-track-mode-map
+  (realgud:track-set-debugger "jdb")
+  (if realgud:jdb-track-mode
+      (progn
+       (realgud-track-mode-setup 't)
+       (realgud:jdb-track-mode-hook))
+    (progn
+      (setq realgud-track-mode nil)
+      ))
+)
+
+(provide-me "realgud:jdb-")
diff --git a/packages/realgud/realgud/debugger/kshdb/Makefile.am 
b/packages/realgud/realgud/debugger/kshdb/Makefile.am
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/kshdb/Makefile.am
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/packages/realgud/realgud/debugger/kshdb/core.el 
b/packages/realgud/realgud/debugger/kshdb/core.el
new file mode 100644
index 0000000..afcb119
--- /dev/null
+++ b/packages/realgud/realgud/debugger/kshdb/core.el
@@ -0,0 +1,175 @@
+;; Copyright (C) 2010, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+(require 'load-relative)
+(require-relative-list '("../../common/track" "../../common/core") "realgud-")
+(require-relative-list '("init") "realgud:kshdb-")
+
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
+(declare-function realgud-parse-command-arg  'realgud-core)
+(declare-function realgud-query-cmdline      'realgud-core)
+(declare-function realgud-suggest-invocation 'realgud-core)
+
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:kshdb-minibuffer-history nil
+  "minibuffer history list for the command `kshdb'.")
+
+(easy-mmode-defmap kshdb-minibuffer-local-map
+  '(("\C-i" . comint-dynamic-complete-filename))
+  "Keymap for minibuffer prompting of gud startup command."
+  :inherit minibuffer-local-map)
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun kshdb-query-cmdline (&optional opt-debugger)
+  (realgud-query-cmdline
+   'kshdb-suggest-invocation
+   kshdb-minibuffer-local-map
+   'realgud:kshdb-minibuffer-history
+   opt-debugger))
+
+;;; FIXME: DRY this with other *-parse-cmd-args routines
+(defun kshdb-parse-cmd-args (orig-args)
+  "Parse command line ARGS for the annotate level and name of script to debug.
+
+ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing
+- the command processor (e.g. kshdb) and it's arguments if any - a list of 
strings
+- the name of the debugger given (e.g. kshdb) and its arguments - a list of 
strings
+- the script name and its arguments - list of strings
+- whether the annotate or emacs option was given ('-A', '--annotate' or 
'--emacs) - a boolean
+
+For example for the following input
+  (map 'list 'symbol-name
+   '(ksh -W -C /tmp kshdb --emacs ./gcd.rb a b))
+
+we might return:
+   ((ksh -W -C) (kshdb --emacs) (./gcd.rb a b) 't)
+
+NOTE: the above should have each item listed in quotes.
+"
+
+  ;; Parse the following kind of pattern:
+  ;;  [ksh ksh-options] kshdb kshdb-options script-name script-options
+  (let (
+       (args orig-args)
+       (pair)          ;; temp return from
+       ;; ksh doesn't have any optional two-arg options
+       (ksh-opt-two-args '())
+       (ksh-two-args '("o" "c"))
+
+       ;; One dash is added automatically to the below, so
+       ;; h is really -h and -host is really --host.
+       (kshdb-two-args '("A" "-annotate" "l" "-library"
+                         "-highlight" "-no-highlight"
+                          "c" "-command" "-t" "-tty"
+                          "x" "-eval-command"))
+       (kshdb-opt-two-args '())
+       (interp-regexp
+        (if (member system-type (list 'windows-nt 'cygwin 'msdos))
+            "^ksh*\\(.exe\\)?$"
+          "^ksh*$"))
+
+       ;; Things returned
+       (script-name nil)
+       (debugger-name nil)
+       (interpreter-args '())
+       (debugger-args '())
+       (script-args '())
+       (annotate-p nil))
+
+    (if (not (and args))
+       ;; Got nothing: return '(nil, nil)
+       (list interpreter-args debugger-args script-args annotate-p)
+      ;; else
+      ;; Strip off optional "ruby" or "ruby182" etc.
+      (when (string-match interp-regexp
+                         (file-name-sans-extension
+                          (file-name-nondirectory (car args))))
+       (setq interpreter-args (list (pop args)))
+
+       ;; Strip off Ruby-specific options
+       (while (and args
+                   (string-match "^-" (car args)))
+         (setq pair (realgud-parse-command-arg
+                     args ksh-two-args ksh-opt-two-args))
+         (nconc interpreter-args (car pair))
+         (setq args (cadr pair))))
+
+      ;; Remove "kshdb" from "kshdb --kshdb-options script
+      ;; --script-options"
+      (setq debugger-name (file-name-sans-extension
+                          (file-name-nondirectory (car args))))
+      (unless (string-match "^kshdb$" debugger-name)
+       (message
+        "Expecting debugger name `%s' to be `kshdb'"
+        debugger-name))
+      (setq debugger-args (list (pop args)))
+
+      ;; Skip to the first non-option argument.
+      (while (and args (not script-name))
+       (let ((arg (car args)))
+         (cond
+          ;; Annotation or emacs option with level number.
+          ((or (member arg '("--annotate" "-A"))
+               (equal arg "--emacs"))
+           (setq annotate-p t)
+           (nconc debugger-args (list (pop args))))
+          ;; Combined annotation and level option.
+          ((string-match "^--annotate=[0-9]" arg)
+           (nconc debugger-args (list (pop args)) )
+           (setq annotate-p t))
+          ;; Options with arguments.
+          ((string-match "^-" arg)
+           (setq pair (realgud-parse-command-arg
+                       args kshdb-two-args kshdb-opt-two-args))
+           (nconc debugger-args (car pair))
+           (setq args (cadr pair)))
+          ;; Anything else must be the script to debug.
+          (t (setq script-name (realgud:expand-file-name-if-exists arg))
+              (setq script-args (cons script-name (cdr args))))
+          )))
+      (list interpreter-args debugger-args script-args annotate-p))))
+
+;;To silence Warning: reference to free variable
+(defvar realgud:kshdb-command-name)
+
+(defun kshdb-suggest-invocation (debugger-name)
+  "Suggest a kshdb command invocation via `realgud-suggest-invocaton'"
+  (realgud-suggest-invocation realgud:kshdb-command-name
+                             realgud:kshdb-minibuffer-history
+                             "sh" "\\.\\(?:k\\)?sh$"))
+
+(defun kshdb-reset ()
+  "Kshdb cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+  (interactive)
+  ;; (kshdb-breakpoint-remove-all-icons)
+  (dolist (buffer (buffer-list))
+    (when (string-match "\\*kshdb-[a-z]+\\*" (buffer-name buffer))
+      (let ((w (get-buffer-window buffer)))
+        (when w
+          (delete-window w)))
+      (kill-buffer buffer))))
+
+;; (defun kshdb-reset-keymaps()
+;;   "This unbinds the special debugger keys of the source buffers."
+;;   (interactive)
+;;   (setcdr (assq 'kshdb-debugger-support-minor-mode minor-mode-map-alist)
+;;       kshdb-debugger-support-minor-mode-map-when-deactive))
+
+
+(defun realgud:kshdb-customize ()
+  "Use `customize' to edit the settings of the `kshdb' debugger."
+  (interactive)
+  (customize-group 'realgud:kshdb))
+
+(provide-me "realgud:kshdb-")
diff --git a/packages/realgud/realgud/debugger/kshdb/init.el 
b/packages/realgud/realgud/debugger/kshdb/init.el
new file mode 100644
index 0000000..e6f6f74
--- /dev/null
+++ b/packages/realgud/realgud/debugger/kshdb/init.el
@@ -0,0 +1,125 @@
+;; Copyright (C) 2010-2011, 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;Regular expressions for Korn shell debugger: kshdb
+
+(eval-when-compile (require 'cl-lib))   ;For setf.
+
+(require 'load-relative)
+(require-relative-list '("../../common/regexp"
+                        "../../common/loc"
+                        "../../common/init")
+                      "realgud-")
+(require-relative-list '("../../lang/posix-shell") "realgud-lang-")
+
+(defvar realgud-pat-hash)
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defvar realgud:kshdb-pat-hash (make-hash-table :test 'equal)
+  "Hash key is the what kind of pattern we want to match:
+backtrace, prompt, etc.  The values of a hash entry is a
+realgud-loc-pat struct")
+
+;; Top frame number
+(setf (gethash "top-frame-num" realgud:kshdb-pat-hash) 0)
+
+;; Regular expression that describes a kshdb location generally shown
+;; before a command prompt.
+;; For example:
+;;   (/etc/init.d/apparmor:35):
+(setf (gethash "loc" realgud:kshdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "\\(^\\|\n\\)(\\([^:]+\\):\\([0-9]*\\))"
+       :file-group 2
+       :line-group 3))
+
+;; For example:
+;;   kshdb<10>
+;;   kshdb<(5)>
+;;   kshdb<<1>>
+(setf (gethash "prompt" realgud:kshdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp   "^kshdb[<]+[(]*\\([0-9]+\\)[)]*[>]+ "
+       :num 1
+       ))
+
+;;  Regular expression that describes a "breakpoint set" line
+(setf (gethash "brkpt-set" realgud:kshdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^Breakpoint \\([0-9]+\\) set in file \\(.+\\), line 
\\([0-9]+\\).\n"
+       :num 1
+       :file-group 2
+       :line-group 3))
+
+;; Regular expression that describes a debugger "delete" (breakpoint) response.
+;; For example:
+;;   Removed 1 breakpoint(s).
+(setf (gethash "brkpt-del" realgud:kshdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^Removed \\([0-9]+\\) breakpoints(s).\n"
+       :num 1))
+
+;; Regular expression that describes a debugger "backtrace" command line.
+;; For example:
+;;   ->0 in file `/etc/apparmor/fns' at line 24
+;;   ##1 /etc/apparmor/fns called from file `/etc/init.d/apparmor' at line 35
+;;   ##2 /etc/init.d/apparmor called from file `/usr/bin/kshdb' at line 129
+(setf (gethash "debugger-backtrace" realgud:kshdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp         (concat realgud-shell-frame-start-regexp
+                       realgud-shell-frame-num-regexp "[ ]?"
+                       "\\(.*\\)"
+                       realgud-shell-frame-file-regexp
+                       "\\(?:" realgud-shell-frame-line-regexp "\\)?"
+                       )
+       :num 2
+       :file-group 4
+       :line-group 5)
+      )
+
+;; Regular expression that for a termination message.
+(setf (gethash "termination" realgud:kshdb-pat-hash)
+       "^kshdb: That's all, folks...\n")
+
+(setf (gethash "font-lock-keywords" realgud:kshdb-pat-hash)
+      '(
+       ;; The frame number and first type name, if present.
+       ;; E.g. ->0 in file `/etc/init.d/apparmor' at line 35
+       ;;      --^-
+       ("^\\(->\\|##\\)\\([0-9]+\\) "
+        (2 realgud-backtrace-number-face))
+
+       ;; File name.
+       ;; E.g. ->0 in file `/etc/init.d/apparmor' at line 35
+       ;;          ---------^^^^^^^^^^^^^^^^^^^^-
+       ("[ \t]+\\(in\\|from\\) file `\\(.+\\)'"
+        (2 realgud-file-name-face))
+
+       ;; File name.
+       ;; E.g. ->0 in file `/etc/init.d/apparmor' at line 35
+       ;;                                         --------^^
+       ;; Line number.
+       ("[ \t]+at line \\([0-9]+\\)$"
+        (1 realgud-line-number-face))
+       ;; (trepan-frames-match-current-line
+       ;;  (0 trepan-frames-current-frame-face append))
+       ))
+
+(setf (gethash "kshdb" realgud-pat-hash) realgud:kshdb-pat-hash)
+
+(defvar realgud:kshdb-command-hash (make-hash-table :test 'equal)
+  "hash key is command name like 'quit' and the value is
+  the trepan command to use, like 'quit!'")
+
+;; (setf (gethash "quit" realgud:kshdb-command-hash) "quit!")
+
+(setf (gethash "kshdb" realgud-pat-hash) realgud:kshdb-pat-hash)
+(setf (gethash "clear" realgud:kshdb-command-hash) "clear %l")
+
+(provide-me "realgud:kshdb-")
diff --git a/packages/realgud/realgud/debugger/kshdb/kshdb.el 
b/packages/realgud/realgud/debugger/kshdb/kshdb.el
new file mode 100644
index 0000000..9355ee3
--- /dev/null
+++ b/packages/realgud/realgud/debugger/kshdb/kshdb.el
@@ -0,0 +1,70 @@
+;; Copyright (C) 2011, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;  `kshdb' Main interface to kshdb via Emacs
+(require 'load-relative)
+(require-relative-list '("../../common/helper") "realgud-")
+(require-relative-list '("../../common/track") "realgud-")
+(require-relative-list '("core" "track-mode") "realgud:kshdb-")
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:kshdb nil
+  "The realgud interface to the Korn shell debugger, kshdb"
+  :group 'realgud
+  :version "24.3")
+
+;; -------------------------------------------------------------------
+;; User definable variables
+;;
+
+(defcustom realgud:kshdb-command-name
+  ;;"kshdb --emacs 3"
+  "kshdb"
+  "File name for executing the kshdb and its command options.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'realgud:kshdb)
+
+(declare-function kshdb-track-mode (bool))
+(declare-function kshdb-query-cmdline  'realgud:kshdb-core)
+(declare-function kshdb-parse-cmd-args 'realgud:kshdb-core)
+(declare-function realgud:run-process 'realgud-run)
+
+;; -------------------------------------------------------------------
+;; The end.
+;;
+
+;;;###autoload
+(defun realgud:kshdb (&optional opt-command-line no-reset)
+  "Invoke the Korn shell debugger, kshdb, and start the Emacs user interface.
+
+String COMMAND-LINE specifies how to run kshdb.
+
+Normally command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset."
+  (interactive)
+  (let* ((cmd-str (or opt-command-line (kshdb-query-cmdline "kshdb")))
+        (cmd-args (split-string-and-unquote cmd-str))
+        (parsed-args (kshdb-parse-cmd-args cmd-args))
+        (script-args (cdr cmd-args))
+        (script-name (car script-args))
+        (cmd-buf))
+    (realgud:run-process "kshdb" script-name cmd-args
+                        'realgud:kshdb-minibuffer-history
+                        no-reset)
+    ))
+
+(defalias 'kshdb 'realgud:kshdb)
+(provide-me "realgud-")
+
+;;; kshdb.el ends here
diff --git a/packages/realgud/realgud/debugger/kshdb/track-mode.el 
b/packages/realgud/realgud/debugger/kshdb/track-mode.el
new file mode 100644
index 0000000..a80da63
--- /dev/null
+++ b/packages/realgud/realgud/debugger/kshdb/track-mode.el
@@ -0,0 +1,72 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;;; "kshdb" Debugger tracking a comint or eshell buffer.
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                        "../../common/track"
+                        "../../common/track-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud:kshdb-")
+
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+(declare-function realgud-track-mode-setup   'realgud-track-mode)
+(declare-function realgud-posix-shell-populate-command-keys
+                 'realgud-lang-posix-shell)
+
+(realgud-track-mode-vars "kshdb")
+(realgud-posix-shell-populate-command-keys kshdb-track-mode-map)
+
+(declare-function realgud-track-mode(bool))
+
+(defun kshdb-track-mode-hook()
+  (if kshdb-track-mode
+      (progn
+       (use-local-map kshdb-track-mode-map)
+       (message "using kshdb mode map")
+       )
+    (message "kshdb track-mode-hook disable called"))
+)
+
+(define-minor-mode kshdb-track-mode
+  "Minor mode for tracking kshdb source locations inside a process shell via 
realgud. kshdb is a Korn Shell debugger.
+
+If called interactively with no prefix argument, the mode is toggled. A prefix 
argument, captured as ARG, enables the mode if the argument is positive, and 
disables it otherwise.
+
+\\{kshdb-track-mode-map}
+"
+  :init-value nil
+  ;; :lighter " kshdb"   ;; mode-line indicator from realgud-track is 
sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'kshdb
+  :keymap kshdb-track-mode-map
+
+  (realgud:track-set-debugger "kshdb")
+  (if kshdb-track-mode
+      (progn
+       (realgud-track-mode 't)
+        (kshdb-track-mode-hook))
+    (progn
+      (realgud-track-mode nil)
+      ))
+)
+
+(provide-me "realgud:kshdb-")
diff --git a/packages/realgud/realgud/debugger/nodejs/Makefile.am 
b/packages/realgud/realgud/debugger/nodejs/Makefile.am
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/nodejs/Makefile.am
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/packages/realgud/realgud/debugger/nodejs/core.el 
b/packages/realgud/realgud/debugger/nodejs/core.el
new file mode 100644
index 0000000..065ac37
--- /dev/null
+++ b/packages/realgud/realgud/debugger/nodejs/core.el
@@ -0,0 +1,166 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+(require 'load-relative)
+(require-relative-list '("../../common/track" "../../common/core")
+                      "realgud-")
+(require-relative-list '("init") "realgud:nodejs-")
+
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
+(declare-function realgud-parse-command-arg  'realgud-core)
+(declare-function realgud-query-cmdline      'realgud-core)
+(declare-function realgud-suggest-invocation 'realgud-core)
+
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:nodejs-minibuffer-history nil
+  "minibuffer history list for the command `nodejs'.")
+
+(easy-mmode-defmap realgud:nodejs-minibuffer-local-map
+  '(("\C-i" . comint-dynamic-complete-filename))
+  "Keymap for minibuffer prompting of nodejs startup command."
+  :inherit minibuffer-local-map)
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun nodejs-query-cmdline (&optional opt-debugger)
+  (realgud-query-cmdline
+   'realgud:nodejs-suggest-invocation
+   realgud:nodejs-minibuffer-local-map
+   'realgud:nodejs-minibuffer-history
+   opt-debugger))
+
+;;; FIXME: DRY this with other *-parse-cmd-args routines
+(defun nodejs-parse-cmd-args (orig-args)
+  "Parse command line ORIG-ARGS for the name of script to debug.
+
+ORIG-ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing
+* the name of the debugger given (e.g. nodejs) and its arguments - a list of 
strings
+* the script name and its arguments - list of strings
+
+For example for the following input:
+  (map 'list 'symbol-name
+   '(node --interactive --debugger-port 5858 /tmp nodejs ./gcd.js a b))
+
+we might return:
+   ((\"node\" \"--interactive\" \"--debugger-port\" \"5858\") nil 
(\"/tmp/gcd.js\" \"a\" \"b\"))
+
+Note that path elements have been expanded via `expand-file-name'.
+"
+
+  ;; Parse the following kind of pattern:
+  ;;  node nodejs-options script-name script-options
+  (let (
+       (args orig-args)
+       (pair)          ;; temp return from
+       (node-two-args '("-debugger_port" "C" "D" "i" "l" "m" "-module" "x"))
+       ;; node doesn't have any optional two-arg options
+       (node-opt-two-args '())
+
+       ;; One dash is added automatically to the below, so
+       ;; h is really -h and -debugger_port is really --debugger_port.
+       (nodejs-two-args '("-debugger_port"))
+       (nodejs-opt-two-args '())
+
+       ;; Things returned
+       (script-name nil)
+       (debugger-name nil)
+       (interpreter-args '())
+       (script-args '())
+       )
+    (if (not (and args))
+       ;; Got nothing: return '(nil, nil, nil)
+       (list interpreter-args nil script-args)
+      ;; else
+      (progn
+       ;; Remove "nodejs" (or "nodemon" or "node") from invocation like:
+       ;; nodejs --nodejs-options script --script-options
+       (setq debugger-name (file-name-sans-extension
+                            (file-name-nondirectory (car args))))
+       (unless (string-match "^node\\(?:js\\|mon\\)?$" debugger-name)
+         (message
+          "Expecting debugger name `%s' to be `node', `nodemon', or `nodejs'"
+          debugger-name))
+       (setq interpreter-args (list (pop args)))
+
+       ;; Skip to the first non-option argument.
+       (while (and args (not script-name))
+         (let ((arg (car args)))
+           (cond
+            ((equal "debug" arg)
+             (nconc interpreter-args (list arg))
+             (setq args (cdr args))
+             )
+
+            ;; Options with arguments.
+            ((string-match "^-" arg)
+             (setq pair (realgud-parse-command-arg
+                         args nodejs-two-args nodejs-opt-two-args))
+             (nconc interpreter-args (car pair))
+             (setq args (cadr pair)))
+            ;; Anything else must be the script to debug.
+            (t (setq script-name (realgud:expand-file-name-if-exists arg))
+              (setq script-args (cons script-name (cdr args))))
+            )))
+       (list interpreter-args nil script-args)))
+    ))
+
+;; To silence Warning: reference to free variable
+(defvar realgud:nodejs-command-name)
+
+(defun realgud:nodejs-suggest-invocation (debugger-name)
+  "Suggest a nodejs command invocation via `realgud-suggest-invocaton'"
+  (realgud-suggest-invocation realgud:nodejs-command-name
+                             realgud:nodejs-minibuffer-history
+                             "js" "\\.js$"))
+
+(defun realgud:nodejs-remove-ansi-shmutz()
+  "Remove ASCII escape sequences that node.js 'decorates' in
+prompts and interactive output with"
+  (add-to-list
+   'comint-preoutput-filter-functions
+   (lambda (output)
+     (replace-regexp-in-string "\033\\[[0-9]+[GKJ]" "" output)))
+  )
+
+(defun realgud:nodejs-reset ()
+  "Nodejs cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+  (interactive)
+  ;; (nodejs-breakpoint-remove-all-icons)
+  (dolist (buffer (buffer-list))
+    (when (string-match "\\*nodejs-[a-z]+\\*" (buffer-name buffer))
+      (let ((w (get-buffer-window buffer)))
+        (when w
+          (delete-window w)))
+      (kill-buffer buffer))))
+
+;; (defun nodejs-reset-keymaps()
+;;   "This unbinds the special debugger keys of the source buffers."
+;;   (interactive)
+;;   (setcdr (assq 'nodejs-debugger-support-minor-mode minor-mode-map-alist)
+;;       nodejs-debugger-support-minor-mode-map-when-deactive))
+
+
+(defun realgud:nodejs-customize ()
+  "Use `customize' to edit the settings of the `nodejs' debugger."
+  (interactive)
+  (customize-group 'realgud:nodejs))
+
+(provide-me "realgud:nodejs-")
diff --git a/packages/realgud/realgud/debugger/nodejs/init.el 
b/packages/realgud/realgud/debugger/nodejs/init.el
new file mode 100644
index 0000000..70634af
--- /dev/null
+++ b/packages/realgud/realgud/debugger/nodejs/init.el
@@ -0,0 +1,167 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;;; Regular expressions for nodejs Javascript debugger.
+
+(eval-when-compile (require 'cl-lib))   ;For setf.
+
+(require 'load-relative)
+(require-relative-list '("../../common/regexp"
+                        "../../common/loc"
+                        "../../common/init")
+                      "realgud-")
+(require-relative-list '("../../lang/js") "realgud-lang-")
+
+(defvar realgud:nodejs-pat-hash)
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defvar realgud:nodejs-pat-hash (make-hash-table :test 'equal)
+  "Hash key is the what kind of pattern we want to match:
+backtrace, prompt, etc.  The values of a hash entry is a
+realgud-loc-pat struct")
+
+;; before a command prompt.
+;; For example:
+;;   break in /home/indutny/Code/git/indutny/myscript.js:1
+(setf (gethash "loc" realgud:nodejs-pat-hash)
+      (make-realgud-loc-pat
+       :regexp (format
+               "\\(?:%s\\)*\\(?:break\\|exception\\) in %s:%s"
+               realgud:js-term-escape "\\([^:]+\\)"
+               realgud:regexp-captured-num)
+       :file-group 1
+       :line-group 2))
+
+;; Regular expression that describes a nodejs command prompt
+;; For example:
+;;   debug>
+(setf (gethash "prompt" realgud:nodejs-pat-hash)
+      (make-realgud-loc-pat
+       :regexp (format "^\\(?:%s\\)*debug> " realgud:js-term-escape)
+       ))
+
+;;  Regular expression that describes a "breakpoint set" line
+;;
+;; (setf (gethash "brkpt-set" realgud:nodejs-pat-hash)
+;;       (make-realgud-loc-pat
+;;        :regexp "^[*] \\([0-9]+\\) "
+;;        :line-group 1))
+
+;; Regular expression that describes a V8 backtrace line.
+;; For example:
+;;    at repl:1:7
+;;    at Interface.controlEval 
(/src/external-vcs/github/trepanjs/lib/interface.js:352:18)
+;;    at REPLServer.b [as eval] (domain.js:183:18)
+(setf (gethash "lang-backtrace" realgud:nodejs-pat-hash)
+  realgud:js-backtrace-loc-pat)
+
+;; Regular expression that describes a debugger "delete" (breakpoint)
+;; response.
+;; For example:
+;;   Removed 1 breakpoint(s).
+(setf (gethash "brkpt-del" realgud:nodejs-pat-hash)
+      (make-realgud-loc-pat
+       :regexp (format "^Removed %s breakpoint(s).\n"
+                      realgud:regexp-captured-num)
+       :num 1))
+
+
+(defconst realgud:nodejs-frame-start-regexp  "\\(?:^\\|\n\\)\\(?:#\\)")
+(defconst realgud:nodejs-frame-num-regexp    realgud:regexp-captured-num)
+(defconst realgud:nodejs-frame-module-regexp "[^ \t\n]+")
+(defconst realgud:nodejs-frame-file-regexp   "[^ \t\n]+")
+
+;; Regular expression that describes a nodejs location generally shown
+;; Regular expression that describes a debugger "backtrace" command line.
+;; For example:
+;; #0 module.js:380:17
+;; #1 dbgtest.js:3:9
+;; #2 Module._compile module.js:456:26
+;; #3 Module._extensions..js module.js:474:10
+;; #4 Module.load module.js:356:32
+;; #5 Module._load module.js:312:12
+;; #6 Module.runMain module.js:497:10
+; ;#7 timers.js:110:15
+(setf (gethash "debugger-backtrace" realgud:nodejs-pat-hash)
+      (make-realgud-loc-pat
+       :regexp         (concat realgud:nodejs-frame-start-regexp
+                       realgud:nodejs-frame-num-regexp " "
+                       "\\(?:" realgud:nodejs-frame-module-regexp " \\)?"
+                       "\\(" realgud:nodejs-frame-file-regexp "\\)"
+                       ":"
+                       realgud:regexp-captured-num
+                       ":"
+                       realgud:regexp-captured-num
+                       )
+       :num 1
+       :file-group 2
+       :line-group 3
+       :char-offset-group 4))
+
+(defconst realgud:nodejs-debugger-name "nodejs" "Name of debugger")
+
+;; ;; Regular expression that for a termination message.
+;; (setf (gethash "termination" realgud:nodejs-pat-hash)
+;;        "^nodejs: That's all, folks...\n")
+
+(setf (gethash "font-lock-keywords" realgud:nodejs-pat-hash)
+      '(
+       ;; The frame number and first type name, if present.
+       ;; E.g. ->0 in file `/etc/init.d/apparmor' at line 35
+       ;;      --^-
+       ("^\\(->\\|##\\)\\([0-9]+\\) "
+        (2 realgud-backtrace-number-face))
+
+       ;; File name.
+       ;; E.g. ->0 in file `/etc/init.d/apparmor' at line 35
+       ;;          ---------^^^^^^^^^^^^^^^^^^^^-
+       ("[ \t]+\\(in\\|from\\) file `\\(.+\\)'"
+        (2 realgud-file-name-face))
+
+       ;; File name.
+       ;; E.g. ->0 in file `/etc/init.d/apparmor' at line 35
+       ;;                                         --------^^
+       ;; Line number.
+       ("[ \t]+at line \\([0-9]+\\)$"
+        (1 realgud-line-number-face))
+       ))
+
+(setf (gethash realgud:nodejs-debugger-name realgud-pat-hash)
+      realgud:nodejs-pat-hash)
+
+(defvar realgud:nodejs-command-hash (make-hash-table :test 'equal)
+  "Hash key is command name like 'finish' and the value is
+  the nodejs command to use, like 'out'")
+
+(setf (gethash "backtrace"  realgud:nodejs-command-hash) "T")
+(setf (gethash "break"      realgud:nodejs-command-hash)
+      "setBreakpoint('%X',%l)")
+(setf (gethash "continue"   realgud:nodejs-command-hash) "cont")
+(setf (gethash "quit"       realgud:nodejs-command-hash) "quit")
+(setf (gethash "finish"     realgud:nodejs-command-hash) "out")
+(setf (gethash "shell"      realgud:nodejs-command-hash) "repl")
+(setf (gethash "eval"       realgud:nodejs-command-hash) "*not-implemented*")
+
+;; We need aliases for step and next because the default would
+;; do step 1 and nodejs doesn't handle this. And if it did,
+;; it would probably look like step(1).
+(setf (gethash "step"       realgud:nodejs-command-hash) "step")
+(setf (gethash "next"       realgud:nodejs-command-hash) "next")
+
+;; Unsupported features:
+(setf (gethash "jump"  realgud:nodejs-command-hash) "*not-implemented*")
+
+(provide-me "realgud:nodejs-")
diff --git a/packages/realgud/realgud/debugger/nodejs/nodejs.el 
b/packages/realgud/realgud/debugger/nodejs/nodejs.el
new file mode 100644
index 0000000..7ca4f5c
--- /dev/null
+++ b/packages/realgud/realgud/debugger/nodejs/nodejs.el
@@ -0,0 +1,82 @@
+;; Copyright (C) 2014-2016 Free Software Foundation, Inc
+
+;; Author: 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.
+
+;;  `nodejs' Main interface to nodejs debugger via Emacs
+(require 'load-relative)
+(require-relative-list '("../../common/helper") "realgud-")
+(require-relative-list '("../../common/run")    "realgud:")
+(require-relative-list '("core" "track-mode")   "realgud:nodejs-")
+(require-relative-list '("../../lang/js") "realgud-lang-")
+
+(declare-function realgud:js-remove-ansi-schmutz 'realgud-lang-js)
+(declare-function realgud:run-debugger 'realgud:run)
+
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:nodejs nil
+  "The realgud interface to the nodejs debugger"
+  :group 'realgud
+  :version "24.3")
+
+;; -------------------------------------------------------------------
+;; User-definable variables
+;;
+
+(defcustom realgud:nodejs-command-name
+  "node debug"
+  "File name for executing the Javascript debugger and command options.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'realgud:nodejs)
+
+;; -------------------------------------------------------------------
+;; The end.
+;;
+
+(declare-function nodejs-track-mode     'realgud-nodejs-track-mode)
+(declare-function nodejs-query-cmdline  'realgud:nodejs-core)
+(declare-function nodejs-parse-cmd-args 'realgud:nodejs-core)
+
+;;;###autoload
+(defun realgud:nodejs (&optional opt-cmd-line no-reset)
+  "Invoke the nodejs shell debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run nodejs.
+
+OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `nodejs-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+"
+  (interactive)
+  (let ((cmd-buf
+        (realgud:run-debugger "nodejs"
+                              'nodejs-query-cmdline 'nodejs-parse-cmd-args
+                              'realgud:nodejs-minibuffer-history
+                              opt-cmd-line no-reset)))
+    (if cmd-buf
+       (with-current-buffer cmd-buf
+         ;; FIXME should allow customization whether to do or not
+         ;; and also only do if hook is not already there.
+         (realgud:js-remove-ansi-schmutz)
+         )
+      )))
+
+;; There is already a nodejs command in `nodejs-repl'.
+;; (defalias 'nodejs 'realgud:nodejs)
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/debugger/nodejs/track-mode.el 
b/packages/realgud/realgud/debugger/nodejs/track-mode.el
new file mode 100644
index 0000000..6afaa62
--- /dev/null
+++ b/packages/realgud/realgud/debugger/nodejs/track-mode.el
@@ -0,0 +1,87 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;;; nodejs tracking a comint buffer.
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                        "../../common/track"
+                        "../../common/track-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud:nodejs-")
+;; (require-relative-list '("../../lang/js") "realgud-lang-")
+
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+(declare-function realgud-track-mode-setup   'realgud-track-mode)
+
+(realgud-track-mode-vars "nodejs")
+
+(declare-function realgud-track-mode(bool))
+
+(defun nodejs-track-mode-hook()
+  (if nodejs-track-mode
+      (progn
+       (use-local-map nodejs-track-mode-map)
+       (message "using nodejs mode map")
+       )
+    (message "nodejs track-mode-hook disable called"))
+)
+
+(define-minor-mode nodejs-track-mode
+  "Minor mode for tracking nodejs source locations inside a nodejs shell via 
realgud.
+
+If called interactively with no prefix argument, the mode is toggled. A prefix 
argument, captured as ARG, enables the mode if the argument is positive, and 
disables it otherwise.
+
+\\{nodejs-track-mode-map}"
+  :init-value nil
+  ;; :lighter " nodejs"   ;; mode-line indicator from realgud-track is 
sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:nodejs
+
+  :keymap nodejs-track-mode-map
+
+  (realgud:track-set-debugger "nodejs")
+  (realgud:nodejs-track-mode-internal)
+)
+
+(defun realgud:nodejs-track-mode-internal (&optional arg)
+  (realgud:track-set-debugger "nodejs")
+  (if nodejs-track-mode
+      (progn
+        (realgud-track-mode-setup 't)
+        (nodejs-track-mode-hook))
+    (progn
+      (setq realgud-track-mode nil)
+      ))
+  )
+
+;; ;; Debugger commands that nodejs doesn't have
+;; (define-key nodejs-track-mode-map
+;;   [remap realgud:cmd-newer-frame] 'undefined)
+;; (define-key nodejs-track-mode-map
+;;   [remap realgud:cmd-older-frame] 'undefined)
+(define-key nodejs-short-key-mode-map
+  [remap realgud:cmd-step] 'realgud:cmd-step-no-arg)
+(define-key nodejs-short-key-mode-map
+  [remap realgud:cmd-step] 'realgud:cmd-step-no-arg)
+(define-key nodejs-short-key-mode-map
+  [remap realgud:cmd-next] 'realgud:cmd-next-no-arg)
+
+(provide-me "realgud:nodejs-")
diff --git a/packages/realgud/realgud/debugger/pdb/Makefile.am 
b/packages/realgud/realgud/debugger/pdb/Makefile.am
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/pdb/Makefile.am
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/packages/realgud/realgud/debugger/pdb/core.el 
b/packages/realgud/realgud/debugger/pdb/core.el
new file mode 100644
index 0000000..16c5dbd
--- /dev/null
+++ b/packages/realgud/realgud/debugger/pdb/core.el
@@ -0,0 +1,207 @@
+;; Copyright (C) 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+(require 'load-relative)
+(require-relative-list '("../../common/track"
+                        "../../common/core"
+                        "../../common/lang")
+                      "realgud-")
+(require-relative-list '("init") "realgud:pdb-")
+
+
+(declare-function realgud-lang-mode? 'realgud-lang)
+(declare-function realgud-parse-command-arg 'realgud-core)
+(declare-function realgud-query-cmdline 'realgud-core)
+(declare-function realgud-suggest-invocation 'realgud-core)
+
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:pdb-minibuffer-history nil
+  "minibuffer history list for the command `pdb'.")
+
+(defvar realgud:pdb-remote-minibuffer-history nil
+  "minibuffer history list for the command `pdb-remote'.")
+
+(easy-mmode-defmap pdb-minibuffer-local-map
+  '(("\C-i" . comint-dynamic-complete-filename))
+  "Keymap for minibuffer prompting of debugger startup command."
+  :inherit minibuffer-local-map)
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun pdb-query-cmdline (&optional opt-debugger)
+  (realgud-query-cmdline
+   'pdb-suggest-invocation
+   pdb-minibuffer-local-map
+   'realgud:pdb-minibuffer-history
+   opt-debugger))
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun pdb-remote-query-cmdline (not-used)
+  (realgud-query-cmdline
+   'pdb-remote-suggest-invocation
+   pdb-minibuffer-local-map
+   'realgud:pdb-remote-minibuffer-history
+   "telnet"))
+
+(defun pdb-parse-cmd-args (orig-args)
+  "Parse command line ORIG-ARGS for the annotate level and name of script to 
debug.
+
+ORIG-ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing:
+* the command processor (e.g. python) and it's arguments if any - a list of 
strings
+* the name of the debugger given (e.g. pdb) and its arguments - a list of 
strings
+* the script name and its arguments - list of strings
+* whether the annotate or emacs option was given ('-A', '--annotate' or 
'--emacs) - a boolean
+
+For example for the following input:
+  (map 'list 'symbol-name
+   '(python2.6 -O -Qold ./gcd.py a b))
+
+we might return:
+   ((\"python2.6\" \"-O\" \"-Qold\") (\"pdb\") (\"/tmp/gcd.py\" \"a\" \"b\") 
nil)
+
+Note that the script name path has been expanded via `expand-file-name'.
+"
+
+  ;; Parse the following kind of pattern:
+  ;;  [python python-options] pdb pdb-options script-name script-options
+  (let (
+       (args orig-args)
+       (pair)          ;; temp return from
+       (python-opt-two-args '())
+       ;; Python doesn't have mandatory 2-arg options in our sense,
+       ;; since the two args can be run together, e.g. "-C/tmp" or "-C /tmp"
+       ;;
+       (python-two-args '())
+       ;; pdb doesn't have any arguments
+       (pdb-two-args '())
+       (pdb-opt-two-args '())
+       (interp-regexp
+        (if (member system-type (list 'windows-nt 'cygwin 'msdos))
+            "^python[-0-9.]*\\(.exe\\)?$"
+          "^python[-0-9.]*$"))
+
+       ;; Things returned
+       (annotate-p nil)
+       (debugger-args '())
+       (debugger-name nil)
+       (interpreter-args '())
+       (script-args '())
+       (script-name nil)
+       )
+
+    (if (not (and args))
+       ;; Got nothing: return '(nil, nil)
+       (list interpreter-args debugger-args script-args annotate-p)
+      ;; else
+      ;; Strip off optional "python" or "python182" etc.
+      (when (string-match interp-regexp
+                         (file-name-sans-extension
+                          (file-name-nondirectory (car args))))
+       (setq interpreter-args (list (pop args)))
+
+       ;; Strip off Python-specific options
+       (while (and args
+                   (string-match "^-" (car args)))
+         (setq pair (realgud-parse-command-arg
+                     args python-two-args python-opt-two-args))
+         (nconc interpreter-args (car pair))
+         (setq args (cadr pair))))
+
+      ;; Remove "pdb" from "pdb --pdb-options script
+      ;; --script-options"
+      (setq debugger-name (file-name-sans-extension
+                          (file-name-nondirectory (car args))))
+      (unless (string-match "^\\(pdb\\|cli.py\\)$" debugger-name)
+       (message
+        "Expecting debugger name `%s' to be `pdb' or `cli.py'"
+        debugger-name))
+      (setq debugger-args (list (pop args)))
+
+      ;; Skip to the first non-option argument.
+      (while (and args (not script-name))
+       (let ((arg (car args)))
+         (cond
+          ;; Options with arguments.
+          ((string-match "^-" arg)
+           (setq pair (realgud-parse-command-arg
+                       args pdb-two-args pdb-opt-two-args))
+           (nconc debugger-args (car pair))
+           (setq args (cadr pair)))
+          ;; Anything else must be the script to debug.
+          (t (setq script-name (expand-file-name arg))
+             (setq script-args (cons script-name (cdr args))))
+          )))
+      (list interpreter-args debugger-args script-args annotate-p))))
+
+(defun pdb-parse-remote-cmd-args (orig-args)
+    "Parse command line ORIG-ARGS
+ORIG-ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing:
+* the command processor (e.g. python) and it's arguments if any - a list of 
strings
+* the name of the debugger given (e.g. pdb) and its arguments - a list of 
strings
+* the script name and its arguments - list of strings
+* nil
+
+For example for the following input:
+  (map 'list 'symbol-name
+   '(telnet localhost 6900))
+
+we might return:
+   ((\"telnet\" \"localhost\" \"6900\") nil nil nil)
+
+Note that the script name path has been expanded via `expand-file-name'.
+"
+    (list orig-args nil nil nil)
+  )
+
+  ;; To silence Warning: reference to free variable
+(defvar realgud:pdb-command-name)
+
+(defun pdb-remote-suggest-invocation (debugger-name)
+  "Suggest a pdb command invocation via `realgud-suggest-invocaton'"
+  "telnet 127.0.0.1 4000"
+  )
+
+
+(defun pdb-suggest-invocation (debugger-name)
+  "Suggest a pdb command invocation via `realgud-suggest-invocaton'"
+  (realgud-suggest-invocation realgud:pdb-command-name
+                             realgud:pdb-minibuffer-history
+                             "python" "\\.py"))
+
+(defun pdb-reset ()
+  "Pdb cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+  (interactive)
+  ;; (pdb-breakpoint-remove-all-icons)
+  (dolist (buffer (buffer-list))
+    (when (string-match "\\*pdb-[a-z]+\\*" (buffer-name buffer))
+      (let ((w (get-buffer-window buffer)))
+        (when w
+          (delete-window w)))
+      (kill-buffer buffer))))
+
+;; (defun pdb-reset-keymaps()
+;;   "This unbinds the special debugger keys of the source buffers."
+;;   (interactive)
+;;   (setcdr (assq 'pdb-debugger-support-minor-mode minor-mode-map-alist)
+;;       pdb-debugger-support-minor-mode-map-when-deactive))
+
+
+(defun realgud:pdb-customize ()
+  "Use `customize' to edit the settings of the `pdb' debugger."
+  (interactive)
+  (customize-group 'realgud:pdb))
+
+(provide-me "realgud:pdb-")
diff --git a/packages/realgud/realgud/debugger/pdb/init.el 
b/packages/realgud/realgud/debugger/pdb/init.el
new file mode 100644
index 0000000..7068758
--- /dev/null
+++ b/packages/realgud/realgud/debugger/pdb/init.el
@@ -0,0 +1,133 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;; Stock Python debugger pdb
+
+(eval-when-compile (require 'cl-lib))   ;For setf.
+
+(require 'load-relative)
+(require-relative-list '("../../common/regexp"
+                        "../../common/loc"
+                        "../../common/init")
+                      "realgud-")
+(require-relative-list '("../../lang/python") "realgud-lang-")
+
+(defvar realgud-pat-hash)
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defvar realgud:pdb-pat-hash (make-hash-table :test 'equal)
+  "Hash key is the what kind of pattern we want to match:
+backtrace, prompt, etc.  The values of a hash entry is a
+realgud-loc-pat struct")
+
+(declare-function make-realgud-loc "realgud-loc" (a b c d e f))
+
+;; Regular expression that describes a pdb location generally shown
+;; before a command prompt.
+;;
+;; Program-location lines look like this:
+;;   > /usr/bin/zonetab2pot.py(15)<module>()
+;; or MS Windows:
+;;   > c:\\mydirectory\\gcd.py(10)<module>
+(setf (gethash "loc" realgud:pdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^> \\(\\(?:[a-zA-Z]:\\)?[-a-zA-Z0-9_/.\\\\ ]+\\)(\\([0-9]+\\))"
+       :file-group 1
+       :line-group 2))
+
+(setf (gethash "prompt" realgud:pdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp   "^[(]+Pdb[)]+ "
+       ))
+
+;;  Regular expression that describes a Python backtrace line.
+(setf (gethash "lang-backtrace" realgud:pdb-pat-hash)
+      realgud-python-backtrace-loc-pat)
+
+;;  Regular expression that describes location in a pytest error
+(setf (gethash "pytest-error" realgud:pdb-pat-hash)
+      realgud-pytest-error-loc-pat)
+
+;;  Regular expression that describes a "breakpoint set" line. For example:
+;;     Breakpoint 1 at /usr/bin/pdb:7
+(setf (gethash "brkpt-set" realgud:pdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^Breakpoint \\([0-9]+\\) at[ 
\t\n]+\\(.+\\):\\([0-9]+\\)\\(\n\\|$\\)"
+       :num 1
+       :file-group 2
+       :line-group 3))
+
+;;  Regular expression that describes a "delete breakpoint" line
+;; Python 3 includes a file name and line number; Python 2 doesn't
+(setf (gethash "brkpt-del" realgud:pdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^Deleted breakpoint \\([0-9]+\\)"
+       :num 1))
+
+(setf (gethash "font-lock-keywords" realgud:pdb-pat-hash)
+      '(
+       ;; The frame number and first type name, if present.
+       ("^\\(->\\|##\\)\\([0-9]+\\) \\(<module>\\)? 
*\\([a-zA-Z_][a-zA-Z0-9_]*\\)(\\(.+\\))?"
+        (2 realgud-backtrace-number-face)
+        (4 font-lock-function-name-face nil t))     ; t means optional.
+
+       ;; Parameter sequence, E.g. gcd(a=3, b=5)
+       ;;                             ^^^^^^^^^
+       ("(\\(.+\\))"
+        (1 font-lock-variable-name-face))
+
+       ;; File name. E.g  file '/test/gcd.py'
+       ;;                 ------^^^^^^^^^^^^-
+       ("[ \t]+file '\\([^ ]+*\\)'"
+        (1 realgud-file-name-face))
+
+       ;; Line number. E.g. at line 28
+        ;;                  ---------^^
+       ("[ \t]+at line \\([0-9]+\\)$"
+        (1 realgud-line-number-face))
+
+       ;; Function name.
+       ("\\<\\([a-zA-Z_][a-zA-Z0-9_]*\\)\\.\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
+        (1 font-lock-type-face)
+        (2 font-lock-function-name-face))
+       ;; (pdb-frames-match-current-line
+       ;;  (0 pdb-frames-current-frame-face append))
+       ))
+
+(setf (gethash "pdb" realgud-pat-hash) realgud:pdb-pat-hash)
+
+
+(defvar realgud:pdb-command-hash (make-hash-table :test 'equal)
+  "Hash key is command name like 'finish' and the value is
+the pdb command to use, like 'return'")
+
+(setf (gethash "pdb" realgud-command-hash) realgud:pdb-command-hash)
+
+;; Mappings between PDB-specific names and GUD names
+(setf (gethash "finish" realgud:pdb-command-hash) "return")
+(setf (gethash "kill" realgud:pdb-command-hash) "quit")
+(setf (gethash "backtrace" realgud:pdb-command-hash) "where")
+;; Clear in Python does both the usual “delete” and “clear”
+(setf (gethash "delete" realgud:pdb-command-hash) "clear %p")
+(setf (gethash "clear" realgud:pdb-command-hash) "clear %X:%l")
+;; Use ‘!’ instead of ‘p’, since ‘p’ only works for expressions, not statements
+(setf (gethash "eval" realgud:pdb-command-hash) "!%s")
+
+;; Unsupported features:
+(setf (gethash "shell" realgud:pdb-command-hash) "*not-implemented*")
+(setf (gethash "frame" realgud:pdb-command-hash) "*not-implemented*")
+
+(provide-me "realgud:pdb-")
diff --git a/packages/realgud/realgud/debugger/pdb/pdb.el 
b/packages/realgud/realgud/debugger/pdb/pdb.el
new file mode 100644
index 0000000..8ddd380
--- /dev/null
+++ b/packages/realgud/realgud/debugger/pdb/pdb.el
@@ -0,0 +1,108 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;;  `pdb' Main interface to pdb via Emacs
+(require 'load-relative)
+(require-relative-list '("core" "track-mode") "realgud:pdb-")
+(require-relative-list '("../../common/run")  "realgud:")
+(require-relative-list '("core" "track-mode") "realgud:pdb-")
+
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:pdb nil
+  "The realgud interface to the Python pdb debugger"
+  :group 'realgud
+  :version "24.3")
+
+;; -------------------------------------------------------------------
+;; User-definable variables
+;;
+
+(defcustom realgud:pdb-command-name
+  "pdb"
+  "File name for executing the stock Python debugger and command options.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'realgud:pdb)
+;; -------------------------------------------------------------------
+;; The end.
+;;
+
+(declare-function pdb-track-mode       'realgud:pdb-track)
+(declare-function pdb-query-cmdline    'realgud:pdb-core)
+(declare-function pdb-parse-cmd-args   'realgud:pdb-core)
+(declare-function realgud:run-debugger 'realgud:run)
+
+;;;###autoload
+(defun realgud:pdb (&optional opt-cmd-line no-reset)
+  "Invoke the pdb Python debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run pdb. You will be prompted
+for a command line is one isn't supplied.
+
+OPT-COMMAND-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `pdb-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+"
+  (interactive)
+  (realgud:run-debugger "pdb" 'pdb-query-cmdline
+                       'pdb-parse-cmd-args
+                       'realgud:pdb-minibuffer-history
+                       opt-cmd-line no-reset)
+  )
+
+
+;;;###autoload
+(defun realgud:pdb-remote (&optional opt-cmd-line no-reset)
+  "Invoke the pdb Python debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run pdb. You will be prompted
+for a command line is one isn't supplied.
+
+OPT-COMMAND-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `pdb-parse-remote-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+"
+  (interactive)
+  (realgud:run-debugger "pdb" 'pdb-remote-query-cmdline
+                       'pdb-parse-remote-cmd-args
+                       'realgud:pdb-remote-minibuffer-history
+                       opt-cmd-line no-reset "remote-pdb")
+  )
+
+
+(defalias 'pdb 'realgud:pdb)
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/debugger/pdb/track-mode.el 
b/packages/realgud/realgud/debugger/pdb/track-mode.el
new file mode 100644
index 0000000..b18172f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/pdb/track-mode.el
@@ -0,0 +1,73 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;; Python "pdb" Debugger tracking a comint buffer.
+
+(require 'load-relative)
+(require-relative-list '(
+                         "../../common/cmds"
+                         "../../common/menu"
+                         "../../common/track"
+                         "../../common/track-mode"
+                         )
+                       "realgud-")
+(require-relative-list '("core" "init") "realgud:pdb-")
+
+(realgud-track-mode-vars "pdb")
+
+(declare-function realgud-track-mode 'realgud-track-mode)
+(declare-function realgud-track-mode-setup 'realgud-track-mode)
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+(declare-function realgud-python-populate-command-keys 'realgud-lang-python)
+
+(realgud-python-populate-command-keys pdb-track-mode-map)
+
+(defun pdb-track-mode-hook()
+  (if pdb-track-mode
+      (progn
+        (use-local-map pdb-track-mode-map)
+        (message "using pdb mode map")
+        )
+    (message "pdb track-mode-hook disable called")
+    )
+)
+
+(define-minor-mode pdb-track-mode
+  "Minor mode for tracking pdb source locations inside a process shell via 
realgud. pdb is the stock Python debugger.
+
+If called interactively with no prefix argument, the mode is toggled. A prefix 
argument, captured as ARG, enables the mode if the argument is positive, and 
disables it otherwise.
+
+a process shell.
+
+\\{pdb-track-mode-map}
+"
+  :init-value nil
+  ;; :lighter " pdb"   ;; mode-line indicator from realgud-track is sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:pdb
+  :keymap pdb-track-mode-map
+  (realgud:track-set-debugger "pdb")
+  (if pdb-track-mode
+      (progn
+       (realgud-track-mode-setup 't)
+        (pdb-track-mode-hook))
+    (progn
+      (setq realgud-track-mode nil)
+      ))
+)
+
+(provide-me "realgud:pdb-")
diff --git a/packages/realgud/realgud/debugger/perldb/Makefile.am 
b/packages/realgud/realgud/debugger/perldb/Makefile.am
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/perldb/Makefile.am
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/packages/realgud/realgud/debugger/perldb/core.el 
b/packages/realgud/realgud/debugger/perldb/core.el
new file mode 100644
index 0000000..04f6f0c
--- /dev/null
+++ b/packages/realgud/realgud/debugger/perldb/core.el
@@ -0,0 +1,151 @@
+;; Copyright (C) 2011, 2013-2014, 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+(require 'load-relative)
+(require-relative-list '("../../common/track"
+                        "../../common/core"
+                        "../../common/lang")
+                      "realgud-")
+(require-relative-list '("init") "realgud:perldb-")
+
+(declare-function realgud-lang-mode?         'realgud-lang)
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
+(declare-function realgud-parse-command-arg  'realgud-core)
+(declare-function realgud-query-cmdline      'realgud-core)
+(declare-function realgud-suggest-invocation 'realgud-core)
+
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:perldb-minibuffer-history nil
+  "minibuffer history list for the command `perldb'.")
+
+(easy-mmode-defmap realgud:perldb-minibuffer-local-map
+  '(("\C-i" . comint-dynamic-complete-filename))
+  "Keymap for minibuffer prompting of perldb startup command."
+  :inherit minibuffer-local-map)
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun realgud:perldb-query-cmdline (&optional opt-debugger)
+  (realgud-query-cmdline
+   'realgud:perldb-suggest-invocation
+   realgud:perldb-minibuffer-local-map
+   'realgud:perldb-minibuffer-history
+   opt-debugger))
+
+;;; FIXME: DRY this with other *-parse-cmd-args routines
+(defun realgud:perldb-parse-cmd-args (orig-args)
+  "Parse command line ARGS for the annotate level and name of script to debug.
+
+ORIG-ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing
+
+* the command processor (e.g. perl) and it's arguments if any - a
+  list of strings
+
+* the script name and its arguments - list of strings
+
+For example for the following input:
+  (map 'list 'symbol-name
+   '(perl -W -C /tmp -d ./gcd.pl a b))
+
+we might return:
+   ((\"perl\" \"-W\" \"-C\" \"-d\") nil (\"/tmp/gcd.pl\" \"a\" \"b\"))
+
+Note that path elements have been expanded via 
`realgud:expand-file-name-if-exists'.
+"
+
+  ;; Parse the following kind of pattern:
+  ;;  [perl perl-options] perldb perldb-options script-name script-options
+  (let (
+       (args orig-args)
+       (pair)          ;; temp return from
+       (perl-opt-two-args '("0" "C" "D" "i" "l" "m" "-module" "x"))
+       ;; Perl doesn't have mandatory 2-arg options in our sense,
+       ;; since the two args can be run together, e.g. "-C/tmp" or "-C /tmp"
+       ;;
+       (perl-two-args '())
+       ;; One dash is added automatically to the below, so
+       ;; h is really -h and -host is really --host.
+       (perldb-two-args '("e" "E"))
+       (perldb-opt-two-args '())
+       (interp-regexp
+        (if (member system-type (list 'windows-nt 'cygwin 'msdos))
+            "^perl\\(?:5[0-9.]*\\)\\(.exe\\)?$"
+          "^perl\\(?:5[0-9.]*\\)?$"))
+
+       ;; Things returned
+       (script-name nil)
+       (debugger-name nil)
+       (interpreter-args '())
+       (script-args '())
+       )
+
+    (if (not (and args))
+       ;; Got nothing
+       (list interpreter-args nil script-args)
+      ;; else
+      ;; Remove "perl" or "perl5.10.1" etc.
+      (when (string-match interp-regexp
+                         (file-name-sans-extension
+                          (file-name-nondirectory (car args))))
+       (setq interpreter-args (list (pop args)))
+
+       ;; Skip to the first non-option argument
+       (while (and args (not script-name))
+         (let ((arg (car args)))
+           (cond
+            ;; Options with arguments.
+            ((string-match "^-" (car args))
+             (setq pair (realgud-parse-command-arg
+                         args perl-two-args perl-opt-two-args))
+             (nconc interpreter-args (car pair))
+             (setq args (cadr pair)))
+            ;; Anything else must be the script to debug.
+            (t (setq script-name (realgud:expand-file-name-if-exists arg))
+               (setq script-args (cons script-name (cdr args))))
+            )))
+       (list interpreter-args nil script-args)))
+    ))
+
+; # To silence Warning: reference to free variable
+(defvar realgud:perldb-command-name)
+
+(defun realgud:perldb-suggest-invocation (debugger-name)
+  "Suggest a perldb command invocation via `realgud-suggest-invocaton'"
+  (realgud-suggest-invocation realgud:perldb-command-name
+                             realgud:perldb-minibuffer-history
+                             "perl" "\\.pl$"))
+
+(defun realgud:perldb-reset ()
+  "Perldb cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+  (interactive)
+  ;; (perldb-breakpoint-remove-all-icons)
+  (dolist (buffer (buffer-list))
+    (when (string-match "\\*perldb-[a-z]+\\*" (buffer-name buffer))
+      (let ((w (get-buffer-window buffer)))
+        (when w
+          (delete-window w)))
+      (kill-buffer buffer))))
+
+;; (defun perldb-reset-keymaps()
+;;   "This unbinds the special debugger keys of the source buffers."
+;;   (interactive)
+;;   (setcdr (assq 'perldb-debugger-support-minor-mode minor-mode-map-alist)
+;;       perldb-debugger-support-minor-mode-map-when-deactive))
+
+
+(defun realgud:perldb-customize ()
+  "Use `customize' to edit the settings of the `perldb' debugger."
+  (interactive)
+  (customize-group 'realgud:perldb))
+
+(provide-me "realgud:perldb-")
diff --git a/packages/realgud/realgud/debugger/perldb/init.el 
b/packages/realgud/realgud/debugger/perldb/init.el
new file mode 100644
index 0000000..42dbedf
--- /dev/null
+++ b/packages/realgud/realgud/debugger/perldb/init.el
@@ -0,0 +1,145 @@
+;;; Copyright (C) 2011, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+;; 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/>.
+;;; Regular expressions for nodejs Javascript debugger.
+;;; Stock Perl debugger perldb
+
+(eval-when-compile (require 'cl-lib))   ;For setf.
+
+(require 'load-relative)
+(require-relative-list '("../../common/regexp" "../../common/loc") "realgud-")
+(require-relative-list '("../../lang/perl") "realgud-lang-")
+
+(defvar realgud-pat-hash)
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defvar realgud:perldb-pat-hash (make-hash-table :test 'equal)
+  "Hash key is the what kind of pattern we want to match:
+lang-backtrace, prompt, etc.  The values of a hash entry is a
+realgud-loc-pat struct")
+
+(declare-function make-realgud-loc "realgud-loc" (a b c d e f))
+
+;; Program-location lines look like these:
+;;   File::Basename::dirname(/usr/share/perl/5.16.0/File/Basename.pm:284):
+;;   File::Basename::dirname(/usr/share/perl/5.16.0/File/Basename.pm:284):     
my $path;
+;;   main::(/usr/bin/latex2html:102):
+;;   main::(/usr/bin/latex2html:102):  @ARGV=2;
+;;   main::CODE(0x9407ac8)(l2hconf.pm:6):;;
+;;   main::((eval 8)[/tmp/eval.pl:2]:1):
+;;
+;;   And what are complications MS Windows adds?
+
+;; Hnadle eval form first, e.g.:
+;;    main::((eval 8)[/tmp/eval.pl:2]:1):
+
+(defconst realgud:perldb-loc-eval-regexp
+  (format "(eval [0-9]+)\\[\\(.+\\):%s\\]"
+         realgud:regexp-captured-num))
+
+;; Hnadle non eval form
+;;    main::CODE(0x9407ac8)(l2hconf.pm:6):;;
+
+(defconst realgud:perldb-loc-noeval-regexp
+  (format "\\(?:CODE(0x[0-9a-h]+)\\)?(\\(.+\\):%s):\\(?:\t\\(.*\\)\\)?\n"
+         realgud:regexp-captured-num))
+
+;; Note that eval form has to come before non-eval form as the non-eval
+;; form encompases the eval form. The two clauses makes it hard
+;; to match file and line positions, so we ned to result to the
+;; "alt" forms of file and lines as well as the non-alt formes
+(defconst realgud:perldb-loc-regexp
+  (format "\\(?:%s\\)\\|\\(?:%s\\)"
+         realgud:perldb-loc-eval-regexp realgud:perldb-loc-noeval-regexp))
+
+;; Regular expression that describes a perldb location generally shown
+;; before a command prompt. We include matching the source text so we
+;; can save that.
+(setf (gethash "loc" realgud:perldb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp realgud:perldb-loc-regexp
+       :alt-file-group 1
+       :alt-line-group 2
+       :file-group 3
+       :line-group 4
+       :text-group 5))
+
+;; perldb debugger prompt.
+;; Examples:
+;;   DB<4>
+;; [pid=6489->6502]  DB<1>
+;;
+(setf (gethash "prompt" realgud:perldb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp   "\\(?:\\[pid=[0-9]+->[0-9]+\\]\\)?  DB<\\([0-9]+\\)> "
+       :num 1
+       ))
+
+;;  Regular expression that describes a Perl debugger backtrace line.
+;; $ = main::top_navigation_panel called from file `./latex2html' line 7400
+;; $ = main::BEGIN() called from file `(eval 19)[/usr/bin/latex2html:126]' 
line 2
+(setf (gethash "debugger-backtrace" realgud:perldb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp   "\s+called from file `\\(.+\\)' line \\([0-9]+\\)"
+       :file-group 1
+       :line-group 2))
+
+;;  Regular expression that describes location in a Perl errmsg
+(setf (gethash "perl-errmsg" realgud:perldb-pat-hash)
+      realgud-perl-errmsg-loc-pat)
+
+;;  Regular expression that describes a Perl Carp backtrace line.
+;;  at /tmp/foo.pl line 7
+;;     main::__ANON__('Illegal division by zero at /tmp/foo.pl line 4.\x{a}') 
called at /tmp/foo.pl line 4
+;;     main::foo(3) called at /tmp/foo.pl line 8
+(setf (gethash "lang-backtrace" realgud:perldb-pat-hash)
+      realgud-perl-carp-loc-pat)
+
+(defvar realgud:perldb-command-hash (make-hash-table :test 'equal)
+  "Hash key is command name like 'quit' and the value is
+  the perldb command to use, like 'q'")
+
+(setf (gethash "font-lock-keywords" realgud:perldb-pat-hash)
+      '(
+       ("\s+called from file `\\(.+\\)' line \\([0-9]+\\)"
+        (1 realgud-file-name-face)
+        (2 realgud-line-number-face))
+       ))
+
+
+(setf (gethash "perldb"  realgud-pat-hash) realgud:perldb-pat-hash)
+
+(setf (gethash "backtrace" realgud:perldb-command-hash) "T")
+(setf (gethash "break"     realgud:perldb-command-hash) "b %l")
+(setf (gethash "clear"     realgud:perldb-command-hash) "B %l")
+(setf (gethash "continue"  realgud:perldb-command-hash) "c")
+(setf (gethash "eval"      realgud:perldb-command-hash) "x %s")
+(setf (gethash "quit"      realgud:perldb-command-hash) "q")
+(setf (gethash "restart"   realgud:perldb-command-hash) "R")
+(setf (gethash "run"       realgud:perldb-command-hash) "R")
+(setf (gethash "step"      realgud:perldb-command-hash) "s")
+(setf (gethash "next"      realgud:perldb-command-hash) "n")
+(setf (gethash "until"     realgud:perldb-command-hash) "c %l")
+(setf (gethash "perldb" realgud-command-hash) realgud:perldb-command-hash)
+
+;; Unsupported features:
+(setf (gethash "frame" realgud:perldb-command-hash) "*not-implemented*")
+(setf (gethash "shell" realgud:perldb-command-hash) "*not-implemented*")
+(setf (gethash "up"    realgud:perldb-command-hash) "*not-implemented*")
+(setf (gethash "down"  realgud:perldb-command-hash) "*not-implemented*")
+(setf (gethash "jump"  realgud:perldb-command-hash) "*not-implemented*")
+(setf (gethash "kill"  realgud:perldb-command-hash) "*not-implemented*")
+
+(provide-me "realgud:perldb-")
diff --git a/packages/realgud/realgud/debugger/perldb/perldb.el 
b/packages/realgud/realgud/debugger/perldb/perldb.el
new file mode 100644
index 0000000..7c4b447
--- /dev/null
+++ b/packages/realgud/realgud/debugger/perldb/perldb.el
@@ -0,0 +1,71 @@
+;; Copyright (C) 2011, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;  `perldb' Main interface to perl debugger via Emacs
+(require 'load-relative)
+(require-relative-list '("../../common/helper") "realgud-")
+(require-relative-list '("../../common/run")    "realgud:")
+(require-relative-list '("core" "track-mode")   "realgud:perldb-")
+
+(declare-function realgud:run-debugger 'realgud:run)
+
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:perldb nil
+  "The realgud interface to the Perl debugger, perldb"
+  :group 'realgud
+  :version "24.3")
+
+;; -------------------------------------------------------------------
+;; User-definable variables
+;;
+
+(defcustom realgud:perldb-command-name
+  "perl -d"
+  "Option to needed to run the Perl debugger"
+  :type 'string
+  :group 'realgud:perldb)
+
+;; -------------------------------------------------------------------
+;; The end.
+;;
+
+(declare-function perldb-track-mode (bool))
+(declare-function realgud:perldb-query-cmdline  'realgud:perldb-core)
+(declare-function realgud:perldb-parse-cmd-args 'realgud:perldb-core)
+
+;;;###autoload
+(defun realgud:perldb (&optional opt-cmd-line no-reset)
+  "Invoke the Perl debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run nodejs.
+
+OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `perldb-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+"
+  (interactive)
+  (realgud:run-debugger "perldb"
+                       'realgud:perldb-query-cmdline
+                       'realgud:perldb-parse-cmd-args
+                       'realgud:perldb-minibuffer-history
+                       opt-cmd-line no-reset))
+
+;; (defalias 'perldb 'realgud:perldb)
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/debugger/perldb/track-mode.el 
b/packages/realgud/realgud/debugger/perldb/track-mode.el
new file mode 100644
index 0000000..ce80a23
--- /dev/null
+++ b/packages/realgud/realgud/debugger/perldb/track-mode.el
@@ -0,0 +1,79 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;; Stock Perl Debugger "perldb5" tracking a comint or eshell buffer.
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                        "../../common/track"
+                        "../../common/track-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud:perldb-")
+(require-relative-list '("../../lang/perl") "realgud-lang-")
+
+(realgud-track-mode-vars "perldb")
+
+(declare-function realgud-perl-populate-command-keys
+                 'realgud:perldb)
+(declare-function realgud-track-mode 'realgud-track-mode)
+(declare-function realgud-track-mode-setup    realgud-track-mode)
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+
+(realgud-perl-populate-command-keys perldb-track-mode-map )
+
+(defun perldb-track-mode-hook()
+  (if perldb-track-mode
+      (progn
+       (use-local-map perldb-track-mode-map)
+       (message "using perldb mode map")
+       )
+    (message "perldb track-mode-hook disable called"))
+)
+
+(define-minor-mode perldb-track-mode
+  "Minor mode for tracking perl5db source locations inside a process shell via 
realgud. perl5db is the stock Perl debugger.
+
+If called interactively with no prefix argument, the mode is toggled. A prefix 
argument, captured as ARG, enables the mode if the argument is positive, and 
disables it otherwise.
+
+\\{perldb-track-mode-map}
+"
+  :init-value nil
+  ;; :lighter " perldb"   ;; mode-line indicator from realgud-track is 
sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:perldb
+  :keymap perldb-track-mode-map
+
+  (realgud:track-set-debugger "perldb")
+  (if perldb-track-mode
+      (progn
+       (realgud-track-mode-setup 't)
+       (perldb-track-mode-hook))
+    (progn
+      (setq realgud-track-mode nil)
+      ))
+)
+
+;; Perldb doesn't have stack switching commands.
+(define-key perldb-short-key-mode-map
+  [remap realgud:cmd-newer-frame] 'undefined)
+(define-key perldb-short-key-mode-map
+  [remap realgud:cmd-older-frame] 'undefined)
+
+(provide-me "realgud:perldb-")
diff --git a/packages/realgud/realgud/debugger/rdebug/Makefile.am 
b/packages/realgud/realgud/debugger/rdebug/Makefile.am
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/rdebug/Makefile.am
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/packages/realgud/realgud/debugger/rdebug/core.el 
b/packages/realgud/realgud/debugger/rdebug/core.el
new file mode 100644
index 0000000..bd66518
--- /dev/null
+++ b/packages/realgud/realgud/debugger/rdebug/core.el
@@ -0,0 +1,171 @@
+;; Copyright (C) 2010, 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+(require 'load-relative)
+(require-relative-list '("../../common/track"
+                        "../../common/core"
+                        "../../common/lang")
+                      "realgud-")
+(require-relative-list '("init") "realgud-rdebug-")
+
+(declare-function realgud-lang-mode? 'realgud-lang)
+(declare-function realgud-parse-command-arg  'realgud-core)
+(declare-function realgud-query-cmdline      'realgud-core)
+(declare-function realgud-suggest-invocation 'realgud-core)
+
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:rdebug-minibuffer-history nil
+  "minibuffer history list for the command `rdebug'.")
+
+(easy-mmode-defmap rdebug-minibuffer-local-map
+  '(("\C-i" . comint-dynamic-complete-filename))
+  "Keymap for minibuffer prompting of gud startup command."
+  :inherit minibuffer-local-map)
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun rdebug-query-cmdline (&optional opt-debugger)
+  (realgud-query-cmdline
+   'rdebug-suggest-invocation
+   rdebug-minibuffer-local-map
+   'realgud:rdebug-minibuffer-history
+   opt-debugger))
+
+(defun rdebug-parse-cmd-args (orig-args)
+  "Parse command line ARGS for the annotate level and name of script to debug.
+
+ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing
+- the command processor (e.g. ruby) and it's arguments if any - a list of 
strings
+- the name of the debugger given (e.g. rdebug) and its arguments - a list of 
strings
+- the script name and its arguments - list of strings
+- whether the annotate or emacs option was given ('-A', '--annotate' or 
'--emacs) - a boolean
+
+For example for the following input
+  (map 'list 'symbol-name
+   '(ruby1.9 -W -C /tmp rdebug --emacs ./gcd.rb a b))
+
+we might return:
+   ((ruby1.9 -W -C) (rdebug --emacs) (./gcd.rb a b) 't)
+
+NOTE: the above should have each item listed in quotes.
+"
+
+  ;; Parse the following kind of pattern:
+  ;;  [ruby ruby-options] rdebug rdebug-options script-name script-options
+  (let (
+       (args orig-args)
+       (pair)          ;; temp return from
+       (ruby-opt-two-args '("0" "C" "e" "E" "F" "i"))
+       ;; Ruby doesn't have mandatory 2-arg options in our sense,
+       ;; since the two args can be run together, e.g. "-C/tmp" or "-C /tmp"
+       ;;
+       (ruby-two-args '())
+       ;; One dash is added automatically to the below, so
+       ;; h is really -h and -host is really --host.
+       (rdebug-two-args '("h" "-host" "p" "-port"
+                          "I" "-include" "-r" "-require"))
+       (rdebug-opt-two-args '())
+
+       ;; Things returned
+       (script-name nil)
+       (debugger-name nil)
+       (interpreter-args '())
+       (debugger-args '())
+       (script-args '())
+       (annotate-p nil))
+
+    (if (not (and args))
+       ;; Got nothing: return '(nil, nil)
+       (list interpreter-args debugger-args script-args annotate-p)
+      ;; else
+      ;; Strip off optional "ruby" or "ruby182" etc.
+      (when (string-match "^ruby[-0-9]*$"
+                         (file-name-sans-extension
+                          (file-name-nondirectory (car args))))
+       (setq interpreter-args (list (pop args)))
+
+       ;; Strip off Ruby-specific options
+       (while (and args
+                   (string-match "^-" (car args)))
+         (setq pair (realgud-parse-command-arg
+                     args ruby-two-args ruby-opt-two-args))
+         (nconc interpreter-args (car pair))
+         (setq args (cadr pair))))
+
+      ;; Remove "rdebug" from "rdebug --rdebug-options script
+      ;; --script-options"
+      (setq debugger-name (file-name-sans-extension
+                          (file-name-nondirectory (car args))))
+      (unless (string-match "^rdebug$" debugger-name)
+       (message
+        "Expecting debugger name `%s' to be `rdebug'"
+        debugger-name))
+      (setq debugger-args (list (pop args)))
+
+      ;; Skip to the first non-option argument.
+      (while (and args (not script-name))
+       (let ((arg (car args)))
+         (cond
+          ;; Annotation or emacs option with level number.
+          ((or (member arg '("--annotate" "-A"))
+               (equal arg "--emacs"))
+           (setq annotate-p t)
+           (nconc debugger-args (list (pop args))))
+          ;; Combined annotation and level option.
+          ((string-match "^--annotate=[0-9]" arg)
+           (nconc debugger-args (list (pop args)) )
+           (setq annotate-p t))
+          ;; Options with arguments.
+          ((string-match "^-" arg)
+           (setq pair (realgud-parse-command-arg
+                       args rdebug-two-args rdebug-opt-two-args))
+           (nconc debugger-args (car pair))
+           (setq args (cadr pair)))
+          ;; Anything else must be the script to debug.
+          (t (setq script-name arg)
+             (setq script-args args))
+          )))
+      (list interpreter-args debugger-args script-args annotate-p))))
+
+(defvar realgud:rdebug-command-name)
+(defun rdebug-suggest-invocation (debugger-name)
+  "Suggest a rdebug command invocation via `realgud-suggest-invocaton'"
+  (realgud-suggest-invocation realgud:rdebug-command-name
+                             realgud:rdebug-minibuffer-history
+                             "ruby" "\\.rb$"
+                             realgud:rdebug-command-name))
+
+(defun rdebug-reset ()
+  "Rdebug cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+  (interactive)
+  ;; (rdebug-breakpoint-remove-all-icons)
+  (dolist (buffer (buffer-list))
+    (when (string-match "\\*rdebug-[a-z]+\\*" (buffer-name buffer))
+      (let ((w (get-buffer-window buffer)))
+        (when w
+          (delete-window w)))
+      (kill-buffer buffer))))
+
+;; (defun rdebug-reset-keymaps()
+;;   "This unbinds the special debugger keys of the source buffers."
+;;   (interactive)
+;;   (setcdr (assq 'rdebug-debugger-support-minor-mode minor-mode-map-alist)
+;;       rdebug-debugger-support-minor-mode-map-when-deactive))
+
+
+(defun realgud:rdebug-customize ()
+  "Use `customize' to edit the settings of the `rdebug' debugger."
+  (interactive)
+  (customize-group 'realgud:rdebug))
+
+(provide-me "realgud-rdebug-")
diff --git a/packages/realgud/realgud/debugger/rdebug/init.el 
b/packages/realgud/realgud/debugger/rdebug/init.el
new file mode 100644
index 0000000..4b4a024
--- /dev/null
+++ b/packages/realgud/realgud/debugger/rdebug/init.el
@@ -0,0 +1,143 @@
+;; Copyright (C) 2010, 2011, 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;; Ruby 1.8 debugger: ruby-debug (rdebug)
+
+(eval-when-compile (require 'cl-lib))   ;For stef.
+
+(require 'load-relative)
+(require-relative-list '("../../common/regexp" "../../common/loc") "realgud-")
+(require-relative-list '("../../lang/ruby") "realgud-lang-")
+
+(defvar realgud-pat-hash)
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defvar realgud-rdebug-pat-hash (make-hash-table :test 'equal)
+  "Hash key is the what kind of pattern we want to match:
+backtrace, prompt, etc.  The values of a hash entry is a
+realgud-loc-pat struct")
+
+;; Regular expression that describes a rdebug location generally shown
+;; before a command prompt.
+;; For example:
+;;  /usr/lib/ruby/1.8/rubygems/custom_require.rb:31  # in Emacs
+;; /usr/bin/irb:12
+(setf (gethash "loc" realgud-rdebug-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "\\(?:source 
\\)?\\(\\(?:[a-zA-Z]:\\)?\\(?:.+\\)\\):\\([0-9]+\\).*\\(?:\n\\|$\\)"
+       :file-group 1
+       :line-group 2
+       :ignore-file-re  "(eval)"
+      ))
+
+;; Regular expression that describes a rdebug command prompt
+;; For example:
+;;   (rdb:1)
+(setf (gethash "prompt" realgud-rdebug-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^(rdb:[0-9]+) "
+       ))
+
+;;  Regular expression that describes a Ruby backtrace line.
+(setf (gethash "lang-backtrace" realgud-rdebug-pat-hash)
+      realgud-ruby-backtrace-loc-pat)
+
+;;  Regular expression that describes a ruby $! backtrace
+(setf (gethash "dollar-bang-backtrace" realgud-rdebug-pat-hash)
+      realgud-ruby-dollar-bang-loc-pat)
+
+;; Regular expression that describes a rdebug "breakpoint set" line
+;; For example:
+;;   Breakpoint 1 file /test/gcd.rb, line 6
+;;   -----------^------^^^^^^^^^^^^-------^
+(setf (gethash "brkpt-set" realgud-rdebug-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^Breakpoint \\([0-9]+\\) file \\(.+\\), line \\([0-9]+\\)\n"
+       :num 1
+       :file-group 2
+       :line-group 3))
+
+(defconst realgud-rdebug-frame-file-line-regexp
+  "[ \t\n]+at line \\(.*\\):\\([0-9]+\\)$")
+
+(defconst realgud-rdebug-frame-start-regexp realgud:trepan-frame-start-regexp)
+(defconst realgud-rdebug-frame-num-regexp   realgud:trepan-frame-num-regexp)
+
+;;  Regular expression that describes a Ruby $! string
+(setf (gethash "dollar-bang" realgud-rdebug-pat-hash)
+      realgud-ruby-dollar-bang-loc-pat)
+
+;;  Regular expression that describes a Ruby $! string
+(setf (gethash "rails-backtrace" realgud-rdebug-pat-hash)
+      realgud-rails-backtrace-loc-pat)
+
+;;  Regular expression that describes a debugger "backtrace" command line.
+;;  e.g.
+;; --> #0 at line /usr/bin/irb:12
+;;     #1 main.__script__ at /tmp/fact.rb:1
+;;     #1 main.__script__ at /tmp/fact.rb:1
+;;     #0 IRB.start(ap_path#String) at line /usr/lib/ruby/1.8/irb.rb:52
+(setf (gethash "debugger-backtrace" realgud-rdebug-pat-hash)
+      (make-realgud-loc-pat
+       :regexp         (concat realgud-rdebug-frame-start-regexp " "
+                       realgud-rdebug-frame-num-regexp
+                       "\\(?: \\(?:\\(.+\\)(\\(.*\\))\\)\\)?"
+                       realgud-rdebug-frame-file-line-regexp
+                       )
+       :num 2
+       :file-group 5
+       :line-group 6)
+      )
+
+(setf (gethash "font-lock-keywords" realgud-rdebug-pat-hash)
+      '(
+       ;; Parameters and first type entry. E.g Object.gcd(a#Fixnum, b#Fixnum)
+       ;;                                                 ^-^^^^^^  ^-^^^^^^
+       ("\\<\\([a-zA-Z_][a-zA-Z0-9_]*\\)#\\([a-zA-Z_][a-zA-Z0-9_]*\\)\\>"
+        (1 font-lock-variable-name-face)
+        (2 font-lock-constant-face))
+
+       ;; "::Type", which occurs in class name of function and in
+       ;; parameter list.
+       ("::\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
+        (1 font-lock-type-face))
+
+       ;; The frame number and first type name, if present.
+       ;; E.g. --> #0 Object.gcd(a#Fixnum, b#Fixnum)
+        ;;      -----^-^^^^^^.^^^
+       ("^\\(-->\\)? *#\\([0-9]+\\) *\\(\\([a-zA-Z_][a-zA-Z0-9_]*\\)[.:]\\)?"
+        (2 realgud-backtrace-number-face)
+        (4 font-lock-constant-face nil t))     ; t means optional.
+
+       ;; File name and line number. E.g. at line /test/gcd.rb:6
+        ;;                                 -------^^^^^^^^^^^^^-^
+       ("at line \\(.*\\):\\([0-9]+\\)$"
+        (1 realgud-file-name-face)
+        (2 realgud-line-number-face))
+
+       ;; Function name.
+       ("\\<\\([a-zA-Z_][a-zA-Z0-9_]*\\)\\.\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
+        (1 font-lock-type-face)
+        (2 font-lock-function-name-face))
+       ;; (rdebug-frames-match-current-line
+       ;;  (0 rdebug-frames-current-frame-face append))
+       ))
+
+
+(setf (gethash "rdebug" realgud-pat-hash) realgud-rdebug-pat-hash)
+
+(defvar realgud-rdebug-command-hash (make-hash-table :test 'equal)
+  "Hash key is command name like 'quit' and the value is
+  the trepanx command to use, like 'quit!'")
+
+(setf (gethash "quit" realgud-rdebug-command-hash) "quit!")
+(setf (gethash "shell" realgud-rdebug-command-hash) "irb")
+(setf (gethash "rdebug" realgud-command-hash) realgud-rdebug-command-hash)
+
+(provide-me "realgud-rdebug-")
diff --git a/packages/realgud/realgud/debugger/rdebug/rdebug.el 
b/packages/realgud/realgud/debugger/rdebug/rdebug.el
new file mode 100644
index 0000000..253f015
--- /dev/null
+++ b/packages/realgud/realgud/debugger/rdebug/rdebug.el
@@ -0,0 +1,123 @@
+;; Copyright (C) 2010-2011, 2014-2015 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;  `rdebug' Main interface to rdebug via Emacs
+(require 'load-relative)
+(require-relative-list '("../../common/helper"
+                        "../../common/track") "realgud-")
+(require-relative-list '("core" "track-mode") "realgud-rdebug-")
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:rdebug nil
+  "The realgud interface to the Ruby debugger, rdebug"
+  :group 'realgud
+  :version "24.3")
+
+(declare-function rdebug-query-cmdline   'realgud-rdebug-core)
+(declare-function rdebug-parse-cmd-args  'realgud-rdebug-core)
+(declare-function realgud:run-debugger   'realgud:run)
+
+;; -------------------------------------------------------------------
+;; User definable variables
+;;
+
+(defcustom realgud:rdebug-command-name
+  ;;"rdebug --emacs 3"
+  "rdebug"
+  "File name for executing the Ruby debugger and command options.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'realgud:rdebug)
+
+(declare-function rdebug-track-mode (bool))
+
+;; -------------------------------------------------------------------
+;; The end.
+;;
+
+(defun rdebug-get-script-name (args)
+  "Parse command line ARGS.
+
+ARGS is a list of strings containing the rdebug command name. We
+return a list containing the script name, and whether the
+annotate option was set is returned.
+
+Initially annotate should be set to nil.  Argument ARGS contains
+a tokenized list of the command line."
+  ;; Parse the following:
+  ;;
+  ;;  [ruby ruby-options] rdebug rdebug-options script-name script-options
+  (and args
+       (let ((name nil)
+             (annotate-p nil))
+         ;; Strip of optional "ruby" or "ruby182" etc.
+         (when (string-match "^ruby[0-9]*$"
+                             (file-name-sans-extension
+                              (file-name-nondirectory (car args))))
+           (pop args)
+           (while (and args
+                       (string-match "^-" (car args)))
+             (if (member (car args) '("-e" "-r" "-I" "-C" "-F" "-K"))
+                 (pop args))
+             (pop args)))
+         ;; Remove "rdebug" from "rdebug --rdebug-options script
+         ;; --script-options"
+         (pop args)
+         ;; Skip to the first non-option argument.
+         (while (and args
+                     (not name))
+           (let ((arg (pop args)))
+             (cond
+              ;; Annotation or emacs option with level number.
+              ((or (member arg '("--annotate" "-A"))
+                  (equal arg "--emacs"))
+               (setq annotate-p t)
+               (pop args))
+              ;; Combined annotation and level option.
+              ((string-match "^--annotate=[0-9]" arg)
+               (setq annotate-p t))
+              ;; Options with arguments.
+              ((member arg '("-h" "--host" "-p" "--port"
+                             "-I" "--include" "-r" "--require"))
+               (pop args))
+              ((string-match "^-" arg)
+               nil)
+              (t
+               (setq name arg)))))
+         (and name
+              (list name annotate-p)))))
+
+
+;;;###autoload
+(defun realgud:rdebug (&optional opt-cmd-line no-reset)
+  "Invoke the rdebug Ruby debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `trepan8-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+"
+  (interactive)
+  (realgud:run-debugger "rdebug" 'rdebug-query-cmdline
+                       'rdebug-parse-cmd-args
+                       'realgud:rdebug-minibuffer-history
+                       opt-cmd-line no-reset)
+  )
+
+
+(defalias 'rdebug 'realgud:rdebug)
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/debugger/rdebug/track-mode.el 
b/packages/realgud/realgud/debugger/rdebug/track-mode.el
new file mode 100644
index 0000000..87d6986
--- /dev/null
+++ b/packages/realgud/realgud/debugger/rdebug/track-mode.el
@@ -0,0 +1,70 @@
+;; Copyright (C) 2010, 2012, 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;; Ruby "rdebug" Debugger tracking a comint or eshell buffer.
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                        "../../common/track"
+                        "../../common/track-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud-rdebug-")
+(require-relative-list '("../../lang/ruby") "realgud-lang-")
+
+(realgud-track-mode-vars "rdebug")
+
+(declare-function realgud:ruby-populate-command-keys 'realgud-track-lang-ruby)
+(declare-function realgud-track-mode                 'realgud-track-mode)
+(declare-function realgud-track-mode-hook            'realgud-track-mode)
+(declare-function realgud-track-mode-setup           'realgud-track-mode)
+(declare-function realgud:track-set-debugger         'realgud-track-mode)
+
+(realgud:ruby-populate-command-keys rdebug-track-mode-map)
+
+(defun rdebug-track-mode-hook()
+  (if rdebug-track-mode
+      (progn
+       (use-local-map rdebug-track-mode-map)
+       (message "using rdebug mode map")
+       )
+    (message "rdebug track-mode-hook disable called"))
+)
+
+(define-minor-mode rdebug-track-mode
+  "Minor mode for tracking rdebug source locations inside a process shell via 
realgud. rdebug is a Ruby debugger.
+
+If called interactively with no prefix argument, the mode is toggled. A prefix 
argument, captured as ARG, enables the mode if the argument is positive, and 
disables it otherwise.
+
+\\{rdebug-track-mode-map}
+"
+  :init-value nil
+  ;; :lighter " rdebug"   ;; mode-line indicator from realgud-track is 
sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:rdebug
+  :keymap rdebug-track-mode-map
+  (rdebug-track-mode-internal rdebug-track-mode)
+)
+
+;; Broken out as a function for debugging
+(defun rdebug-track-mode-internal (&optional arg)
+  (realgud:track-set-debugger "rdebug")
+  (if rdebug-track-mode
+      (progn
+       (realgud-track-mode-setup 't)
+       (rdebug-track-mode-hook))
+    (progn
+      (setq realgud-track-mode nil)
+      ))
+)
+
+(provide-me "realgud-rdebug-")
diff --git a/packages/realgud/realgud/debugger/remake/Makefile.am 
b/packages/realgud/realgud/debugger/remake/Makefile.am
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/remake/Makefile.am
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/packages/realgud/realgud/debugger/remake/core.el 
b/packages/realgud/realgud/debugger/remake/core.el
new file mode 100644
index 0000000..7f2772c
--- /dev/null
+++ b/packages/realgud/realgud/debugger/remake/core.el
@@ -0,0 +1,259 @@
+;; Copyright (C) 2011, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+(require 'load-relative)
+(require-relative-list '("../../common/track" "../../common/core" 
"../../common/lang")
+                      "realgud-")
+(require-relative-list '("../../common/buffer/command")
+                      "realgud-buffer-")
+(require-relative-list '("init") "realgud:remake-")
+
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
+(declare-function realgud-parse-command-arg  'realgud-core)
+(declare-function realgud-query-cmdline      'realgud-core)
+(declare-function realgud-suggest-invocation 'realgud-core)
+(declare-function realgud-lang-mode?         'realgud-lang)
+(declare-function realgud-cmdbuf-command-string
+                                            'realgud-buffer-command)
+(declare-function realgud-cmdbuf-debugger-name
+                                            'realgud-buffer-command)
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:remake-minibuffer-history nil
+  "minibuffer history list for the command `remake'.")
+
+(easy-mmode-defmap remake-minibuffer-local-map
+  '(("\C-i" . comint-dynamic-complete-filename))
+  "Keymap for minibuffer prompting of gud startup command."
+  :inherit minibuffer-local-map)
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun remake-query-cmdline (&optional opt-debugger)
+  (realgud-query-cmdline
+   'remake-suggest-invocation
+   remake-minibuffer-local-map
+   'realgud:remake-minibuffer-history
+   opt-debugger))
+
+(defun remake-parse-cmd-args (orig-args)
+  "Parse command line ARGS for the annotate level and name of script to debug.
+
+ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing
+
+- the command processor (e.g. make)
+- the Makefile name
+- command args (which includes the makefile name)
+
+For example for the following input
+  '(\"remake\" \"-x\" \"/tmp/Makefile\")
+
+we might return:
+   (\"remake\" \"/tmp/Makefile\" (\"-x\" \"/tmp/Makefile\"))
+
+"
+
+  (let (
+       (args orig-args)
+       (interp-regexp
+        (if (member system-type (list 'windows-nt 'cygwin 'msdos))
+            "^\\(re\\)?make*\\(.exe\\)?$"
+          "^\\(re\\)?make*$"))
+
+       ;; Things returned
+       (remake-name nil)
+       (makefile-name nil)
+       (remake-args '())
+       )
+
+    (if (not (and args))
+       ;; Got nothing
+       (list remake-name makefile-name remake-args)
+      ;; else
+      ;; Strip off "make" or "remake" etc.
+      (when (string-match interp-regexp
+                         (file-name-sans-extension
+                          (file-name-nondirectory (car args))))
+       (setq remake-name (pop args))
+       )
+
+      ;; parse options
+      (while args
+       (let ((arg (pop args)))
+         (cond
+          ;; ;; Annotation or emacs option with level number.
+          ;; ((or (member arg '("--annotate" "-A"))
+          ;;   (equal arg "--emacs"))
+          ;;  (setq annotate-p t)
+          ;;  (nconc debugger-args (list (pop args))))
+          ;; ;; Combined annotation and level option.
+          ;; ((string-match "^--annotate=[0-9]" arg)
+          ;;  (nconc debugger-args (list (pop args)) )
+          ;;  (setq annotate-p t))
+
+          ((member arg '("--file" "--makefile" "-f"))
+           (setq remake-args (nconc remake-args (list arg)))
+           (setq makefile-name (realgud:expand-file-name-if-exists
+                                (pop args)))
+           (setq remake-args (nconc remake-args
+                                    (list (format "%s" makefile-name)))))
+
+          ;; Anything else add to remake-args
+          ('t (setq remake-args (nconc remake-args (list arg))))
+          )))
+      (list remake-name makefile-name remake-args))))
+
+(defconst realgud:remake-auto-suffix-regexp
+  "\\.\\(am\\|in\\)$"
+  "Common automake and autoconf Makefile suffixes"
+)
+
+(defconst realgud:remake-makefile-regexp
+  "\\(^[Mm]akefile$\\|\\.Makefile$\\|\\.mk\\)$"
+  "Regular expression matching common Makefile names"
+)
+
+(defun remake-suggest-file-priority(filename)
+  (let ((priority 2)
+       (is-not-directory)
+       )
+    (if (realgud-lang-mode? filename "makefile")
+       (progn
+         (if (string-match realgud:remake-makefile-regexp filename)
+             (setq priority 8)
+           (if (string-match realgud:remake-auto-suffix-regexp filename)
+               (setq priority 5)
+             (setq priority 7)))
+         ))
+    ;; The file isn't in a makefile-mode buffer,
+    ;; Check for an executable file with a .mk extension.
+    (if (setq is-not-directory (not (file-directory-p filename)))
+       (if (and (string-match realgud:remake-makefile-regexp filename))
+           (if (< priority 6)
+               (progn
+                 (setq priority 6)))))
+    priority
+    )
+)
+
+(defun remake-suggest-Makefile ()
+ "Suggest a Makefile to debug.
+
+The first priority is given to the current buffer. If the major
+mode matches GNUMakefile and doesn't end in .am or .in, then we
+are done. If not, we'll set priority 2 (a low or easily
+overridden priority) and we keep going.  Then we will try files
+in the default-directory. Of those that we are visiting we check
+the major mode. There are demerits for a file ending in .in or
+.am which are used by 'configure' and 'automake' respectively.
+
+If the current buffer isn't a success, we see if the file matches
+REGEXP. These have priority 9, 8 or 7 depending on whether there
+is a .in or .am sufifx and there is a REGEXP match'.  Within a
+given priority, we use the first one we find."
+    (let* ((file)
+          (file-list (directory-files default-directory))
+          (priority 2)
+          (is-not-directory)
+          (result (buffer-file-name)))
+      (if (not (realgud-lang-mode? result "makefile"))
+         (progn
+           (while (and (setq file (car-safe file-list)) (< priority 8))
+             (setq file-list (cdr file-list))
+             (let ((try-priority (remake-suggest-file-priority file)))
+               (if (> try-priority priority)
+                   (progn
+                     (setq priority try-priority)
+                     (setq result file)))
+               ))
+           ))
+      result)
+    )
+
+;; To silence Warning: reference to free variable
+(defvar realgud:remake-command-name)
+
+;; Note opt-debugger is not used. It has to be there because
+;; realgud-suggest-invocation passes an argument.
+(defun remake-suggest-invocation (&optional opt-debugger)
+  "Suggest a remake command invocation via `realgud-suggest-invocaton'"
+
+  (let* ((buf (current-buffer))
+        (debugger-name realgud:remake-command-name)
+        (cmd-str-cmdbuf (realgud-cmdbuf-command-string buf))
+        )
+    (cond
+     ((and cmd-str-cmdbuf (equal debugger-name (realgud-cmdbuf-debugger-name 
buf)))
+      cmd-str-cmdbuf)
+     ((and minibuffer-history (listp minibuffer-history))
+      (car minibuffer-history))
+     (t (concat debugger-name " --debugger -f "
+               (remake-suggest-Makefile)))
+     )))
+
+;; Convert a command line as would be typed normally to run a script
+;; into one that invokes an Emacs-enabled debugging session.
+;; "--debugger" in inserted as the first switch.
+
+(defun realgud:remake-massage-args (command-line)
+  (let* ((new-args (list "--debugger"))
+        (args (split-string-and-unquote command-line))
+        (program (car args))
+        (seen-e nil)
+        (shift (lambda ()
+                 (setq new-args (cons (car args) new-args))
+                 (setq args (cdr args)))))
+
+    ;; Pass all switches and -e scripts through.
+    (while (and args
+               (string-match "^-" (car args))
+               (not (equal "-" (car args)))
+               (not (equal "--" (car args))))
+      (funcall shift))
+
+    (if (or (not args)
+           (string-match "^-" (car args)))
+       (error "Can't use stdin as the script to debug"))
+    ;; This is the program name.
+    (funcall shift)
+
+    (while args
+      (funcall shift))
+
+    (nreverse new-args)
+    )
+  )
+
+(defun remake-reset ()
+  "Remake cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+  (interactive)
+  ;; (remake-breakpoint-remove-all-icons)
+  (dolist (buffer (buffer-list))
+    (when (string-match "\\*remake-[a-z]+\\*" (buffer-name buffer))
+      (let ((w (get-buffer-window buffer)))
+        (when w
+          (delete-window w)))
+      (kill-buffer buffer))))
+
+;; (defun remake-reset-keymaps()
+;;   "This unbinds the special debugger keys of the source buffers."
+;;   (interactive)
+;;   (setcdr (assq 'remake-debugger-support-minor-mode minor-mode-map-alist)
+;;       remake-debugger-support-minor-mode-map-when-deactive))
+
+
+(defun realgud:remake-customize ()
+  "Use `customize' to edit the settings of the `remake' debugger."
+  (interactive)
+  (customize-group 'realgud:remake))
+
+(provide-me "realgud:remake-")
diff --git a/packages/realgud/realgud/debugger/remake/init.el 
b/packages/realgud/realgud/debugger/remake/init.el
new file mode 100644
index 0000000..0c650cf
--- /dev/null
+++ b/packages/realgud/realgud/debugger/remake/init.el
@@ -0,0 +1,154 @@
+;; Copyright (C) 2011, 2014, 2016 Free Software Foundation, Inc
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;;; Regular expressions for GNU Make debugger: remake
+
+(eval-when-compile (require 'cl-lib))   ;For setf.
+
+(require 'load-relative)
+(require-relative-list '("../../common/regexp"
+                        "../../common/loc"
+                        "../../common/init")
+                      "realgud-")
+
+(defvar realgud-pat-hash)
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defvar realgud:remake-pat-hash (make-hash-table :test 'equal)
+  "Hash key is the what kind of pattern we want to match:
+backtrace, prompt, etc.  The values of a hash entry is a
+realgud-loc-pat struct")
+
+;; Top frame number
+(setf (gethash "top-frame-num" realgud:remake-pat-hash) 0)
+
+;; realgud-loc-pat that describes a remake location generally shown
+;; before a command prompt.
+;; For example:
+;; -- (emacs-dbgr/realgud/debugger/Makefile:168)
+(setf (gethash "loc" realgud:remake-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "\\(?:^\\|\n\\)\\(?:.. 
\\)?(\\(\\(?:[a-zA-Z]:\\)?[-a-zA-Z0-9_/.\\\\ 
]+\\):\\([0-9]+\\))\\(?:\n\\(.*?\\)\n\\)?"
+       :file-group 1
+       :line-group 2
+       :text-group 3))
+
+;; For example:
+;;   remake<10>
+;;   remake<<1>>
+(setf (gethash "prompt" realgud:remake-pat-hash)
+      (make-realgud-loc-pat
+       :regexp   "^remake[<]+\\([0-9]+\\)[>]+ "
+       :num 1
+       ))
+
+;;  realgud-loc-pat that describes a "breakpoint set" line
+(setf (gethash "brkpt-set" realgud:remake-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^Breakpoint \\([0-9]+\\) on target \\([^:]*\\): file \\(.+\\), 
line \\([0-9]+\\).\n"
+       :num 1
+       :file-group 3
+       :line-group 4))
+
+;; realgud-loc-pat that describes a debugger "delete" (breakpoint) response.
+;; For example:
+;;   Removed 1 breakpoint(s).
+(setf (gethash "brkpt-del" realgud:remake-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^Breakpoint \\([0-9]+\\) on target .* cleared\n"
+       :num 1))
+
+(defconst realgud:remake-selected-frame-arrow "=>"
+"String that describes which frame is selected in a debugger
+backtrace listing.")
+(defconst realgud:remake-frame-arrow (format "\\(%s\\|  \\)"
+                                         realgud:remake-selected-frame-arrow))
+(defconst realgud:remake-frame-num-regexp
+  "#\\([0-9]+\\)  ")
+
+(defconst realgud:remake-frame-file-regexp " at \\(.*\\):\\([0-9]+\\)")
+
+;; realgud-loc-pat that describes a remake "backtrace" command line.
+;; For example:
+;; #0  Makefile.in at /tmp/Makefile:216
+;; #1  Makefile at /tmp/Makefile:230
+(setf (gethash "lang-backtrace" realgud:remake-pat-hash)
+      (make-realgud-loc-pat
+       :regexp         (concat "^"
+                       realgud:remake-frame-num-regexp
+                       "\\(.*\\)"
+                       realgud:remake-frame-file-regexp
+                       )
+       :num 1
+       :file-group 3
+       :line-group 4)
+      )
+
+;; realgud-loc-pat that describes a debugger "backtrace" command line.
+;; For example:
+;; =>#0  Makefile.in at /tmp/Makefile:216
+;;   #1  Makefile at /tmp/Makefile:230
+(setf (gethash "debugger-backtrace" realgud:remake-pat-hash)
+      (make-realgud-loc-pat
+       :regexp         (concat "^"
+                       realgud:remake-frame-arrow
+                       realgud:remake-frame-num-regexp
+                       "\\(.*\\)"
+                       realgud:remake-frame-file-regexp
+                       )
+       :num 2
+       :file-group 4
+       :line-group 5)
+      )
+
+;; realgud-loc-pat that describes which frame is selected in
+;; a debugger backtrace listing.
+(setf (gethash "selected-frame-indicator" realgud:remake-pat-hash)
+      realgud:remake-selected-frame-arrow)
+
+;; Regular expression for a termination message.
+(setf (gethash "termination" realgud:remake-pat-hash)
+       "^remake: That's all, folks...\n")
+
+(setf (gethash "font-lock-keywords" realgud:remake-pat-hash)
+      '(
+       ;; ;; File name and line number
+       ;; ;; E.g. =>#0  Makefile.in at /tmp/Makefile:216
+       ;; ;;                       ----^^^^^^^^^^^^^^^^^
+       (" at \\(.*\\):\\([0-9]+\\)"
+        (1 realgud-file-name-face)
+        (2 realgud-line-number-face))
+
+       ;; The frame number and first type name, if present.
+       ;; E.g. =>#0  Makefile.in at /tmp/Makefile:216
+       ;;      ---^
+       ("#\\([0-9]+\\)  "
+        (1 realgud-backtrace-number-face))
+       ))
+
+(setf (gethash "remake" realgud-pat-hash) realgud:remake-pat-hash)
+
+(defvar realgud:remake-command-hash (make-hash-table :test 'equal)
+  "Hash key is command name like 'quit' and the value is
+  the remake command to use, like 'q'")
+
+(setf (gethash "break"  realgud:remake-command-hash) "break %l")
+(setf (gethash "eval"   realgud:remake-command-hash) "expand %s")
+(setf (gethash "remake" realgud-command-hash) realgud:remake-command-hash)
+
+;; Unsupported features:
+(setf (gethash "jump"  realgud:remake-command-hash) "*not-implemented*")
+
+(provide-me "realgud:remake-")
diff --git a/packages/realgud/realgud/debugger/remake/remake.el 
b/packages/realgud/realgud/debugger/remake/remake.el
new file mode 100644
index 0000000..e244cd3
--- /dev/null
+++ b/packages/realgud/realgud/debugger/remake/remake.el
@@ -0,0 +1,89 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;;  `remake' Main interface to remake via Emacs
+(require 'load-relative)
+(require-relative-list '("../../common/helper") "realgud-")
+(require-relative-list '("../../common/track")  "realgud-")
+(require-relative-list '("../../common/run")    "realgud:")
+(require-relative-list '("core" "track-mode") "realgud:remake-")
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:remake nil
+  "The realgud interface to the GNU Make debugger"
+  :group 'realgud
+  :group 'make
+  :version "24.3")
+
+(eval-when-compile (require 'cl-lib))
+
+(declare-function remake-query-cmdline  'realgud:remake-core)
+(declare-function remake-parse-cmd-args 'realgud:remake-core)
+(declare-function realgud:run-debugger  'realgud:run)
+(declare-function realgud:run-process   'realgud:run)
+
+(defun realgud:remake-run-debugger (&optional opt-command-line
+                                   no-reset)
+  "Invoke the a debugger and start the Emacs user interface.
+
+String OPT-COMMAND-LINE specifies how to run DEBUGGER-NAME. You
+will be prompted for a command line using QUERY-CMDLINE-FN is one
+isn't supplied.
+
+OPT-COMMAND-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by PARSE-CMD-FN and path elements found by that
+are expanded using `expand-file-name'.
+
+If successful, The command buffer of the debugger process is returned.
+Otherwise nil is returned.
+"
+  (let* ((cmd-str (or opt-command-line (remake-query-cmdline "remake")))
+        (cmd-args (split-string-and-unquote cmd-str))
+        (parsed-args (remake-parse-cmd-args cmd-args))
+        (debugger (car parsed-args))
+        (script-args (caddr parsed-args))
+        (script-name (cadr parsed-args))
+        )
+    (realgud:run-process debugger script-name cmd-args
+                        realgud:remake-minibuffer-history no-reset)
+    )
+  )
+
+;; -------------------------------------------------------------------
+;; User definable variables
+;;
+
+(defcustom realgud:remake-command-name
+  ;;"remake --emacs 3"
+  "remake"
+  "File name for executing the GNU make debugger, remake, and command options.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'realgud:remake)
+
+;;;###autoload
+(defun realgud:remake (&optional opt-cmd-line no-reset)
+  "See `realgud:remake' for details"
+  (interactive)
+  (realgud:remake-run-debugger opt-cmd-line no-reset)
+  )
+
+(defalias 'remake 'realgud:remake)
+
+(provide-me "realgud-")
+;;; remake.el ends here
diff --git a/packages/realgud/realgud/debugger/remake/track-mode.el 
b/packages/realgud/realgud/debugger/remake/track-mode.el
new file mode 100644
index 0000000..2bc649f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/remake/track-mode.el
@@ -0,0 +1,69 @@
+;; Copyright (C) 2012, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;; GNU Make Debugger tracking a comint buffer.
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                        "../../common/track"
+                        "../../common/track-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud:remake-")
+
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+(declare-function realgud-track-mode-setup   'realgud-track-mode)
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+
+(realgud-track-mode-vars "remake")
+
+(define-key remake-track-mode-map
+  (kbd "C-c !!") 'realgud:goto-lang-backtrace-line)
+(define-key remake-track-mode-map
+  (kbd "C-c !b") 'realgud:goto-debugger-backtrace-line)
+
+(defun remake-track-mode-hook()
+  (if remake-track-mode
+      (progn
+       (use-local-map remake-track-mode-map)
+       (message "using remake mode map")
+       )
+    (message "remake track-mode-hook disable called"))
+)
+
+(define-minor-mode remake-track-mode
+  "Minor mode for tracking remake source locations inside a process shell via 
realgud. remake is a GNU Make debugger.
+
+If called interactively with no prefix argument, the mode is toggled. A prefix 
argument, captured as ARG, enables the mode if the argument is positive, and 
disables it otherwise.
+
+\\{remake-track-mode-map}
+"
+  "Minor mode for tracking ruby debugging inside a process shell."
+  :init-value nil
+  ;; :lighter " remake"   ;; mode-line indicator from realgud-track is 
sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:remake
+  :keymap remake-track-mode-map
+
+  (realgud:track-set-debugger "remake")
+  (if remake-track-mode
+      (progn
+       (realgud-track-mode-setup 't)
+        (remake-track-mode-hook))
+    (progn
+      (setq realgud-track-mode nil)
+      ))
+)
+
+(define-key remake-short-key-mode-map "T" 'realgud:cmd-backtrace)
+
+(provide-me "realgud:remake-")
diff --git a/packages/realgud/realgud/debugger/trepan.pl/Makefile.am 
b/packages/realgud/realgud/debugger/trepan.pl/Makefile.am
new file mode 100644
index 0000000..9a343a5
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan.pl/Makefile.am
@@ -0,0 +1 @@
+include $(srcdir)/../common.mk
diff --git a/packages/realgud/realgud/debugger/trepan.pl/backtrack-mode.el 
b/packages/realgud/realgud/debugger/trepan.pl/backtrack-mode.el
new file mode 100644
index 0000000..7f7728b
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan.pl/backtrack-mode.el
@@ -0,0 +1,73 @@
+;; Copyright (C) 2011, 2014, 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;; Mode for parsing various kinds of backtraces found in Perl
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                         "../../common/track-mode"
+                        "../../common/backtrack-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud:trepanpl-")
+(require-relative-list '("../../lang/perl") "realgud-lang-")
+
+(declare-function realgud-goto-line-for-pt
+                 'realgud-track-mode)
+(declare-function realgud-backtrack-set-debugger
+                 'realgud-common-backtrack-mode)
+(declare-function realgud-perl-populate-command-keys
+                 'realgud-lang-perl)
+
+(realgud-backtrack-mode-vars "trepanpl")
+(set-keymap-parent trepanpl-backtrack-mode-map realgud-backtrack-mode-map)
+
+(declare-function realgud-backtrack-mode(bool))
+
+(defun realgud:trepanpl-goto-control-frame-line (pt)
+  "Display the location mentioned by a control-frame line
+described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "control-frame"))
+
+(realgud-perl-populate-command-keys trepanpl-backtrack-mode-map)
+(define-key trepanpl-backtrack-mode-map
+  (kbd "C-c !c") 'realgud:trepanpl-goto-control-frame-line)
+
+(define-minor-mode trepanpl-backtrack-mode
+  "Minor mode for tracking ruby debugging inside a file which may not have 
process shell."
+  :init-value nil
+  ;; :lighter " trepanpl"   ;; mode-line indicator from realgud-track is 
sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:trepanpl
+  :keymap trepanpl-backtrack-mode-map
+
+  (realgud-backtrack-set-debugger "trepan.pl")
+  (if trepanpl-backtrack-mode
+      (progn
+       (realgud-backtrack-mode 't)
+       (run-mode-hooks (intern (trepanpl-backtrack-mode-hook))))
+    (progn
+      (realgud-backtrack-mode nil)
+      ))
+)
+
+(defun trepanpl-backtrack-mode-hook()
+  (if trepanpl-backtrack-mode
+      (progn
+       (use-local-map trepanpl-backtrack-mode-map)
+       (message "using trepanpl mode map")
+       )
+    (message "trepan.pl backtrack-mode-hook disable called"))
+)
+
+(provide-me "realgud:trepanpl-")
diff --git a/packages/realgud/realgud/debugger/trepan.pl/core.el 
b/packages/realgud/realgud/debugger/trepan.pl/core.el
new file mode 100644
index 0000000..37ea9a8
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan.pl/core.el
@@ -0,0 +1,182 @@
+;; Copyright (C) 2011-2012, 2014, 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+(require 'load-relative)
+(require-relative-list '("../../common/track"
+                         "../../common/core"
+                         "../../common/eval"
+                         "../../common/lang")
+                       "realgud-")
+(require-relative-list '("init") "realgud:trepanpl-")
+
+(declare-function realgud:eval-strip-default 'realgud-eval)
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
+(declare-function realgud-parse-command-arg  'realgud-core)
+(declare-function realgud-query-cmdline      'realgud-core)
+(declare-function realgud-suggest-invocation 'realgud-core)
+
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:trepanpl-minibuffer-history nil
+  "minibuffer history list for the command `realgud:trepan.pl'.")
+
+(easy-mmode-defmap realgud:trepanpl-minibuffer-local-map
+  '(("\C-i" . comint-dynamic-complete-filename))
+  "Keymap for minibuffer prompting of trepanpl startup command."
+  :inherit minibuffer-local-map)
+
+(defun realgud:trepanpl-eval-filter-callback(output-str)
+  (realgud:eval-strip-default realgud:trepanpl-prompt-regexp
+   (if (string-match realgud:trepanpl-eval-result-prefix-regexp output-str)
+       (substring output-str (match-end 0))
+     output-str)))
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun realgud:trepanpl-query-cmdline (&optional opt-debugger)
+  (realgud-query-cmdline
+   'realgud:trepanpl-suggest-invocation
+   realgud:trepanpl-minibuffer-local-map
+   'realgud:trepanpl-minibuffer-history
+   opt-debugger))
+
+;;; FIXME: DRY this with other *-parse-cmd-args routines
+(defun realgud:trepanpl-parse-cmd-args (orig-args)
+  "Parse command line ORIG-ARGS for the annotate level and name of script to 
debug.
+
+ORIG_ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing:
+* the command processor (e.g. perl) and it's arguments if any - a list of 
strings
+* the name of the debugger given (e.g. trepan.pl) and its arguments - a list 
of strings
+* the script name and its arguments - list of strings
+
+For example for the following input:
+  (map 'list 'symbol-name
+   '(perl5.10 -w -I . trepan.pl --cd . ./gcd.pl a b))
+
+we might return:
+   ((\"perl\" \"-w\" \"-I\" \"/tmp\") (\"trepan.pl\" \"cd\" \"/tmp\") 
(\"/tmp/gcd.pl\" \"a\" \"b\"))
+
+Note that the script name path has been expanded via `expand-file-name'.
+"
+
+  ;; Parse the following kind of pattern:
+  ;;  [perl perl-options] trepanpl trepanpl-options script-name script-options
+  (let (
+        (args orig-args)
+        (pair)          ;; temp return from
+        (perl-opt-two-args '("0" "C" "D" "i" "I" "l" "m" "-module" "x"))
+        ;; Perl doesn't have mandatory 2-arg options in our sense,
+        ;; since the two args can be run together, e.g. "-C/tmp" or "-C /tmp"
+        ;;
+        (perl-two-args '())
+        ;; One dash is added automatically to the below, so
+        ;; h is really -h and -host is really --host.
+        (trepanpl-two-args '("h" "-host" "p" "-port"
+                           "I" "-include"))
+        (trepanpl-opt-two-args '())
+        (interp-regexp
+         (if (member system-type (list 'windows-nt 'cygwin 'msdos))
+             "^perl\\(?:5[0-9.]*\\)\\(.exe\\)?$"
+           "^perl\\(?:5[0-9.]*\\)?$"))
+
+        ;; Things returned
+        (script-name nil)
+        (debugger-name nil)
+        (interpreter-args '())
+        (debugger-args '())
+        (script-args '())
+        (annotate-p nil))
+
+    (if (not (and args))
+        ;; Got nothing: return '(nil, nil)
+        (list interpreter-args debugger-args script-args annotate-p)
+      ;; else
+      ;; Strip off optional "perl" or "perl5.10.1" etc.
+      (when (string-match interp-regexp
+                          (file-name-sans-extension
+                           (file-name-nondirectory (car args))))
+        (setq interpreter-args (list (pop args)))
+
+        ;; Strip off optional "perl" or "perl5.10.1" etc.
+        (while (and args
+                    (string-match "^-" (car args)))
+          (setq pair (realgud-parse-command-arg
+                      args perl-two-args perl-opt-two-args))
+          (nconc interpreter-args (car pair))
+          (setq args (cadr pair))))
+
+      ;; Remove "trepan.pl" from "trepan.pl --trepan.pl-options script
+      ;; --script-options"
+      (setq debugger-name (file-name-nondirectory (car args)))
+      (unless (string-match "^trepan.pl$" debugger-name)
+       (message
+        "Expecting debugger name `%s' to be `trepan.pl'"
+        debugger-name))
+      (setq debugger-args (list (pop args)))
+
+      ;; Skip to the first non-option argument.
+      (while (and args (not script-name))
+       (let ((arg (car args)))
+         (cond
+          ((member arg
+                   '("--cmddir" "--batch" "--cd" "--include" "-I" "--module" 
"-M"
+                     "-c" "--command"))
+           (setq arg (pop args))
+           (nconc debugger-args
+                  (list arg (expand-file-name (pop args)))))
+          ;; Other options with arguments.
+          ((string-match "^-" arg)
+           (setq pair (realgud-parse-command-arg
+                       args trepanpl-two-args trepanpl-opt-two-args))
+           (nconc debugger-args (car pair))
+           (setq args (cadr pair)))
+          ;; Anything else must be the script to debug.
+          (t (setq script-name (realgud:expand-file-name-if-exists arg))
+             (setq script-args (cons script-name (cdr args))))
+          )))
+      (list interpreter-args debugger-args script-args))
+    ))
+
+; # To silence Warning: reference to free variable
+(defvar realgud:trepanpl-command-name)
+
+(defun realgud:trepanpl-suggest-invocation (debugger-name)
+  "Suggest a trepanpl command invocation via `realgud-suggest-invocaton'"
+  (realgud-suggest-invocation realgud:trepanpl-command-name
+                             realgud:trepanpl-minibuffer-history
+                             "perl" "\\.pl$" "trepan.pl"))
+
+(defun realgud:trepanpl-reset ()
+  "Trepanpl cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+  (interactive)
+  ;; (trepanpl-breakpoint-remove-all-icons)
+  (dolist (buffer (buffer-list))
+    (when (string-match "\\*trepanpl-[a-z]+\\*" (buffer-name buffer))
+      (let ((w (get-buffer-window buffer)))
+        (when w
+          (delete-window w)))
+      (kill-buffer buffer))))
+
+;; (defun trepanpl-reset-keymaps()
+;;   "This unbinds the special debugger keys of the source buffers."
+;;   (interactive)
+;;   (setcdr (assq 'trepanpl-debugger-support-minor-mode minor-mode-map-alist)
+;;        trepanpl-debugger-support-minor-mode-map-when-deactive))
+
+
+(defun realgud:trepanpl-customize ()
+  "Use `customize' to edit the settings of the
+`realgud:trepan.pl' debugger."
+  (interactive)
+  (customize-group 'realgud:trepanpl))
+
+(provide-me "realgud:trepanpl-")
diff --git a/packages/realgud/realgud/debugger/trepan.pl/init.el 
b/packages/realgud/realgud/debugger/trepan.pl/init.el
new file mode 100644
index 0000000..2865180
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan.pl/init.el
@@ -0,0 +1,280 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;; Trepanning Perl debugger
+(eval-when-compile (require 'cl-lib))   ;For setf.
+
+(require 'load-relative)
+(require-relative-list '("../../common/regexp"
+                        "../../common/loc"
+                        "../../common/init")
+                      "realgud-")
+(require-relative-list '("../../lang/perl") "realgud-lang-")
+
+(defvar realgud-pat-hash)
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defvar realgud:trepanpl-pat-hash (make-hash-table :test 'equal)
+  "Hash key is the what kind of pattern we want to match:
+backtrace, prompt, etc.  The values of a hash entry is a
+realgud-loc-pat struct")
+
+;; Regular expression that describes a trepan.pl location generally shown
+;; before a command prompt. We include matching the source text so we
+;; can save that.
+;;
+;; Program-location lines look like this:
+;; -- File::Basename::(/usr/share/perl/5.14/File/Basename.pm:284 @0x8918b70)
+;; my $dirname = dirname(__FILE__);
+;;
+;; or for an eval'd expression:
+;; -- main::((eval 1189)[/tmp/test.pl:2] remapped /tmp/JLlH.pl:1 @0xadcbda0)
+;; $x = 1 + 2;
+;;
+;; or at a function call without the Perl OpCode position or source text:
+;; -> main::(example/gcd.pl:8)
+
+(setf (gethash "loc" realgud:trepanpl-pat-hash)
+      (make-realgud-loc-pat
+       :regexp (format ".. \\(?:.+::\\)?(\\(?:.+ \\(?:via\\|remapped\\) 
\\)?\\(.+\\):%s\\(?: @0x[0-9a-f]+\\)?)\\(?:\n\\(.*?\\)\n\\)?"
+                      realgud:regexp-captured-num)
+       :file-group 1
+       :line-group 2
+       :text-group 3
+       :ignore-file-re  realgud-perl-ignore-file-re)
+      )
+
+(defconst realgud:trepanpl-frame-start-regexp
+  "\\(^\\|\n\\)\\(?:-->\\|   \\) #")
+
+;; Regular expression that describes a trepanpl command prompt
+;; For example:
+;;   (trepanpl):
+;;   ((trepanpl)):
+;;   (address@hidden):
+;;   (address@hidden):
+(defconst realgud:trepanpl-prompt-regexp
+  "^(+trepanpl\\(@[0-9]+\\|@main\\)?)+: ")
+
+(setf (gethash "prompt" realgud:trepanpl-pat-hash)
+      (make-realgud-loc-pat
+       :regexp realgud:trepanpl-prompt-regexp
+       ))
+
+(defconst realgud:trepanpl-eval-result-prefix-regexp
+  "^\\$DB::D\\[[0-9]+\\] = ")
+
+(setf (gethash "prompt" realgud:trepanpl-pat-hash)
+      (make-realgud-loc-pat
+       :regexp realgud:trepanpl-prompt-regexp
+       ))
+
+
+(defconst realgud:trepanpl-frame-num-regexp
+  realgud:regexp-captured-num)
+
+;; Regular expression that describes a Perl backtrace line.
+;; For example:
+;; --> #0 @ = File::Basename::fileparse('/usr/local/bin/trepan.pl') in
+;;     file `/usr/share/perl/5.18.2/File/Basename.pm' at line 107
+;;     #1 @ = File::Basename::dirname('/usr/local/bin/trepan.pl') in
+;;     file `/usr/share/perl/5.18.2/File/Basename.pm' at line 294
+;;     #2 file `/usr/local/bin/trepan.pl' at line 11
+(setf (gethash "debugger-backtrace" realgud:trepanpl-pat-hash)
+  (make-realgud-loc-pat
+   :regexp (concat
+           realgud:trepanpl-frame-start-regexp
+           realgud:trepanpl-frame-num-regexp
+           "\\(?: address@hidden = .* in\\)?"
+           "[\n\t ]+?file `"
+           "\\(.*\\)' at line "
+           realgud:regexp-captured-num)
+   :num 2
+   :file-group 3
+   :line-group 4
+   :ignore-file-re  realgud-perl-ignore-file-re)
+  )
+
+;;  Regular expression that describes location in a Perl errmsg
+(setf (gethash "perl-errmsg" realgud:trepanpl-pat-hash)
+      realgud-perl-errmsg-loc-pat)
+
+;;  Regular expression that describes a Perl Carp backtrace line.
+;;  at /tmp/foo.pl line 7
+;;     main::__ANON__('Illegal division by zero at /tmp/foo.pl line 4.\x{a}') 
called at /tmp/foo.pl line 4
+;;     main::foo(3) called at /tmp/foo.pl line 8
+(setf (gethash "lang-backtrace" realgud:trepanpl-pat-hash)
+      realgud-perl-carp-loc-pat)
+
+;; Regular expression that describes a "breakpoint set" line.
+;; For example:
+;;   Breakpoint 1 set in (eval 1177)[/Eval.pm:94] at line 5"
+;;   Breakpoint 2 set in /tmp/File/Basename.pm at line 215
+(setf (gethash "brkpt-set" realgud:trepanpl-pat-hash)
+      (make-realgud-loc-pat
+       :regexp (format "^Breakpoint %s set in[\n\t ]+\\(.+\\)[ \t\n]+at line 
\\([0-9]+\\)"
+                      realgud:regexp-captured-num)
+       :num 1
+       :file-group 2
+       :line-group 3
+       :ignore-file-re  realgud-perl-ignore-file-re)
+      )
+
+;; Regular expression that describes a debugger "delete" (breakpoint) response.
+;; For example:
+;;   Deleted breakpoint 1.
+(setf (gethash "brkpt-del" realgud:trepanpl-pat-hash)
+      (make-realgud-loc-pat
+       :regexp (format "^Deleted breakpoint %s\n"
+                      realgud:regexp-captured-num)
+       :num 1))
+
+;; Regular expression that describes a debugger "disable" (breakpoint) 
response.
+;; For example:
+;;   Breakpoint entry 4 disabled.
+(setf (gethash "brkpt-disable" realgud:trepanpl-pat-hash)
+      (make-realgud-loc-pat
+       :regexp (format "^Breakpoint %s disabled"
+                      realgud:regexp-captured-num)
+       :num 1))
+
+;; Regular expression that describes a debugger "enable" (breakpoint) response.
+;; For example:
+;;   Breakpoint 4 enabled.
+(setf (gethash "brkpt-enable" realgud:trepanpl-pat-hash)
+      (make-realgud-loc-pat
+       :regexp (format "^Breakpoint %s enabled"
+                      realgud:regexp-captured-num)
+       :num 1))
+
+(defconst realgud:trepanpl-selected-frame-indicator "-->"
+"String that describes which frame is selected in a debugger
+backtrace listing.")
+
+(defconst realgud:trepanpl-frame-file-regexp
+  "[ \t\n]+in file \\([^ \n]+\\)")
+
+(defconst realgud:trepanpl-debugger-name "trepan.pl" "Name of debugger")
+
+;; Top frame number
+(setf (gethash "top-frame-num" realgud:trepanpl-pat-hash) 0)
+
+;; realgud-loc-pat that describes a debugger "selected" frame in in
+;; a frame-motion command.
+;; For example:
+;; --> #1 TOP Object#<top /usr/local/bin/irb> in file /usr/local/bin/ipl at 
line 9
+(setf (gethash "selected-frame" realgud:trepanpl-pat-hash)
+      (make-realgud-loc-pat
+       :regexp
+       (format "^%s #\\([0-9]+\\) .*%s"
+              realgud:trepanpl-selected-frame-indicator
+              realgud:trepanpl-frame-file-regexp)
+       :num 1))
+
+;; Regular expression that for a termination message.
+(setf (gethash "termination" realgud:trepanpl-pat-hash)
+       "^trepan.pl: That's all, folks...\n")
+
+(setf (gethash "font-lock-keywords" realgud:trepanpl-pat-hash)
+      '(
+       ;; The frame number and first type name, if present.
+       ("^\\(-->\\|   \\)? #\\([0-9]+\\) \\([A-Z]+\\) 
*\\([A-Z_][a-zA-Z0-9_]*\\)[#]\\([a-zA-Z_][a-zA-Z_[0-9]]*\\)?"
+        (2 realgud-backtrace-number-face)
+        (3 font-lock-keyword-face)         ; e.g. METHOD, TOP
+        (4 font-lock-constant-face)        ; e.g. Object
+        (5 font-lock-function-name-face nil t))   ; t means optional
+       ;; Instruction sequence
+       ("<\\(.+\\)>"
+        (1 font-lock-variable-name-face))
+       ;; "::Type", which occurs in class name of function and in parameter 
list.
+       ;; Parameter sequence
+       ("(\\(.+\\))"
+        (1 font-lock-variable-name-face))
+       ;; "::Type", which occurs in class name of function and in parameter 
list.
+       ("::\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
+        (1 font-lock-type-face))
+       ;; File name.
+       ("[ \t]+in file \\([^ ]+*\\)"
+        (1 realgud-file-name-face))
+       ;; Line number.
+       ("[ \t]+at line \\([0-9]+\\)$"
+        (1 realgud-line-number-face))
+       ;; Function name.
+       ("\\<\\([a-zA-Z_][a-zA-Z0-9_]*\\)\\.\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
+        (1 font-lock-type-face)
+        (2 font-lock-function-name-face))
+       ;; (trepanpl-frames-match-current-line
+       ;;  (0 trepanpl-frames-current-frame-face append))
+       ))
+
+;; (setf (gethash "font-lock-keywords" realgud:trepanpl-pat-hash)
+;;       '(
+;;     ;; The frame number and first type name, if present.
+;;     ((concat realgud:trepanpl-frame-start-regexp " "
+;;                     realgud:trepanpl-frame-num-regexp " "
+;;                     "\\([A-Z]+\\) 
*\\([A-Z_][a-zA-Z0-9_]*\\)[#]\\([a-zA-Z_][a-zA-Z_[0-9]]*\\)?")
+;;      (2 realgud-backtrace-number-face)
+;;      (3 font-lock-keyword-face)         ; e.g. METHOD, TOP
+;;      (4 font-lock-constant-face)        ; e.g. Object
+;;      (5 font-lock-function-name-face nil t))   ; t means optional
+;;     ;; Instruction sequence
+;;     ("<\\(.+\\)>"
+;;      (1 font-lock-variable-name-face))
+;;     ;; "::Type", which occurs in class name of function and in
+;;     ;; parameter list.  Parameter sequence
+;;     ("(\\(.+\\))"
+;;      (1 font-lock-variable-name-face))
+;;     ;; "::Type", which occurs in class name of function and in
+;;     ;; parameter list.
+;;     ("::\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
+;;      (1 font-lock-type-face))
+;;     ;; File name.
+;;     (realgud:trepanpl-frame-file-regexp (1 realgud-file-name-face))
+;;     ;; Line number.
+;;     (realgud:trepanpl-frame-line-regexp (1 realgud-line-number-face))
+;;     ;; Function name.
+;;     ("\\<\\([a-zA-Z_][a-zA-Z0-9_]*\\)\\.\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
+;;      (1 font-lock-type-face)
+;;      (2 font-lock-function-name-face))
+;;     ;; (trepanpl-frames-match-current-line
+;;     ;;  (0 trepanpl-frames-current-frame-face append))
+;;     ))
+
+(setf (gethash "callback-eval-filter" realgud:trepanpl-pat-hash)
+      'realgud:trepanpl-eval-filter-callback)
+
+(setf (gethash realgud:trepanpl-debugger-name realgud-pat-hash) 
realgud:trepanpl-pat-hash)
+
+;;  Prefix used in variable names (e.g. short-key-mode-map) for
+;; this debugger
+
+(setf (gethash "trepan.pl" realgud:variable-basename-hash) "realgud:trepanpl")
+
+(defvar realgud:trepanpl-command-hash (make-hash-table :test 'equal)
+  "Hash key is command name like 'quit' and the value is
+  the trepanpl command to use, like 'quit!'")
+
+(setf (gethash "break"  realgud:trepanpl-command-hash) "break %x %l")
+(setf (gethash "quit"   realgud:trepanpl-command-hash) "quit!")
+(setf (gethash "until"   realgud:trepanpl-command-hash) "continue %l")
+(setf (gethash realgud:trepanpl-debugger-name
+              realgud-command-hash) realgud:trepanpl-command-hash)
+
+;; Unsupported features:
+(setf (gethash "jump"  realgud:trepanpl-command-hash) "*not-implemented*")
+
+(provide-me "realgud:trepanpl-")
diff --git a/packages/realgud/realgud/debugger/trepan.pl/track-mode.el 
b/packages/realgud/realgud/debugger/trepan.pl/track-mode.el
new file mode 100644
index 0000000..d29add5
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan.pl/track-mode.el
@@ -0,0 +1,81 @@
+;; Copyright (C) 2011-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;; Perl trepanning Debugger tracking a comint buffer.
+
+(require 'load-relative)
+(require-relative-list '(
+                         "../../common/cmds"
+                         "../../common/menu"
+                         "../../common/track"
+                         "../../common/track-mode"
+                         )
+                       "realgud-")
+(require-relative-list '("core" "init") "realgud:trepanpl-")
+(require-relative-list '("../../lang/perl") "realgud-lang-")
+
+(realgud-track-mode-vars "realgud:trepanpl")
+
+(declare-function realgud-goto-line-for-pt   'realgud-track-mode)
+(declare-function realgud-track-mode         'realgud-track-mode)
+(declare-function realgud-track-mode-setup   'realgud-track-mode)
+(declare-function realgud:track-mode-hook    'realgud-track-mode)
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+(declare-function realgud-perl-populate-command-keys 'realgud-lang-perl)
+
+
+(defun realgud:trepanpl-goto-syntax-error-line (pt)
+  "Display the location mentioned in a Syntax error line
+described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "syntax-error"))
+
+(define-key realgud:trepanpl-track-mode-map
+  (kbd "C-c !s") 'realgud:trepanpl-goto-syntax-error-line)
+
+(realgud-perl-populate-command-keys realgud:trepanpl-track-mode-map)
+
+(defun realgud:trepanpl-track-mode-hook()
+  (if realgud:trepanpl-track-mode
+      (progn
+        (use-local-map realgud:trepanpl-track-mode-map)
+        (message "using trepanpl mode map")
+        )
+    (message "trepan.pl track-mode-hook disable called"))
+)
+
+(define-minor-mode realgud:trepanpl-track-mode
+  "Minor mode for tracking trepan.pl source locations inside a
+process shell via realgud. trepan.pl is a Perl debugger see URL
+`https://metacpan.org/pod/Devel::Trepan'.
+
+If called interactively with no prefix argument, the mode is
+toggled. A prefix argument, captured as ARG, enables the mode if
+the argument is positive, and disables it otherwise.
+"
+  :init-value nil
+  ;; :lighter " trepanpl"   ;; mode-line indicator from realgud-track is 
sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:trepanpl
+  :keymap realgud:trepanpl-track-mode-map
+
+  (realgud:track-set-debugger "trepan.pl")
+  (if realgud:trepanpl-track-mode
+      (progn
+        (realgud-track-mode-setup 't)
+        (realgud:trepanpl-track-mode-hook))
+    (progn
+      (setq realgud-track-mode nil)
+      ))
+)
+
+(define-key realgud:trepanpl-short-key-mode-map "T" 'realgud:cmd-backtrace)
+
+(provide-me "realgud:trepanpl-")
diff --git a/packages/realgud/realgud/debugger/trepan.pl/trepanpl.el 
b/packages/realgud/realgud/debugger/trepan.pl/trepanpl.el
new file mode 100644
index 0000000..0b4ac32
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan.pl/trepanpl.el
@@ -0,0 +1,73 @@
+;; Copyright (C) 2011, 2014, 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;  `trepanpl' Main interface to trepanpl via Emacs
+(require 'load-relative)
+(require-relative-list '("../../common/helper") "realgud-")
+(require-relative-list '("../../common/track")  "realgud-")
+(require-relative-list '("../../common/run")    "realgud:")
+(require-relative-list '("core" "track-mode")   "realgud:trepanpl-")
+
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:trepanpl nil
+  "The realgud interface to the Perl \"trepanning\" debugger"
+  :group 'perl
+  :group 'realgud
+  :version "24.3")
+
+;; -------------------------------------------------------------------
+;; User definable variables
+;;
+
+(defcustom realgud:trepanpl-command-name
+  "trepan.pl"
+  "File name for executing the Perl debugger and command options.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'realgud:trepanpl)
+
+;; -------------------------------------------------------------------
+;; The end.
+;;
+
+(declare-function realgud:trepanpl-track-mode     'realgud-trepanpl-track)
+(declare-function realgud:trepanpl-query-cmdline  'realgud-trepanpl-core)
+(declare-function realgud:trepanpl-parse-cmd-args 'realgud-trepanpl-core)
+(declare-function realgud:run-debugger             'realgud:run)
+
+;;;###autoload
+(defun realgud:trepan.pl (&optional opt-cmd-line no-reset)
+  "Invoke the trepan.pl Perl debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run trepan.pl. You will be prompted
+for a command line is one isn't supplied.
+
+OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `realgud:trepanpl-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+"
+  (interactive)
+  (realgud:run-debugger "trepan.pl" 'realgud:trepanpl-query-cmdline
+                       'realgud:trepanpl-parse-cmd-args
+                       'realgud:trepanpl-minibuffer-history
+                       opt-cmd-line no-reset))
+
+(defalias 'trepan.pl 'realgud:trepan.pl)
+(provide-me "realgud-")
+;;; trepanpl.el ends here
diff --git a/packages/realgud/realgud/debugger/trepan/Makefile.am 
b/packages/realgud/realgud/debugger/trepan/Makefile.am
new file mode 100644
index 0000000..9a343a5
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan/Makefile.am
@@ -0,0 +1 @@
+include $(srcdir)/../common.mk
diff --git a/packages/realgud/realgud/debugger/trepan/backtrack-mode.el 
b/packages/realgud/realgud/debugger/trepan/backtrack-mode.el
new file mode 100644
index 0000000..d92b6b7
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan/backtrack-mode.el
@@ -0,0 +1,80 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;;; Mode for parsing various kinds of backtraces found in Ruby
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                        "../../common/track-mode"
+                        "../../common/backtrack-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud:trepan-")
+(require-relative-list '("../../lang/ruby") "realgud-lang-")
+
+(realgud-backtrack-mode-vars "trepan")
+(set-keymap-parent trepan-backtrack-mode-map realgud-backtrack-mode-map)
+
+(declare-function realgud-backtrack-mode         
'realgud-common-backtrack-mode)
+(declare-function realgud-backtrack-set-debugger 
'realgud-common-backtrack-mode)
+(declare-function realgud-goto-line-for-pt       
'realgud-common-backtrack-mode)
+(declare-function realgud:ruby-populate-command-keys 'realgud-lang-ruby)
+
+(defun realgud:trepan-goto-control-frame-line (pt)
+  "Display the location mentioned by a control-frame line
+described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "control-frame"))
+
+(realgud:ruby-populate-command-keys trepan-backtrack-mode-map)
+(define-key trepan-backtrack-mode-map
+  (kbd "C-c !c") 'realgud:trepan-goto-control-frame-line)
+
+(define-minor-mode trepan-backtrack-mode
+  "Minor mode for tracking ruby debugging inside a file which may not have 
process shell.
+
+\\{trepan-backtrack-mode-map}
+"
+  :init-value nil
+  ;; :lighter " trepan"   ;; mode-line indicator from realgud-track is 
sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:trepan
+  :keymap trepan-backtrack-mode-map
+
+  (realgud-backtrack-set-debugger "trepan")
+  (if trepan-backtrack-mode
+      (progn
+       (realgud-backtrack-mode 't)
+       (run-mode-hooks (intern (trepan-backtrack-mode-hook))))
+    (progn
+      (realgud-backtrack-mode nil)
+      ))
+)
+
+(defun trepan-backtrack-mode-hook()
+  (if trepan-backtrack-mode
+      (progn
+       (use-local-map trepan-backtrack-mode-map)
+       (message "using trepan mode map")
+       )
+    (message "trepan backtrack-mode-hook disable called"))
+)
+
+(provide-me "realgud:trepan-")
diff --git a/packages/realgud/realgud/debugger/trepan/core.el 
b/packages/realgud/realgud/debugger/trepan/core.el
new file mode 100644
index 0000000..a844208
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan/core.el
@@ -0,0 +1,242 @@
+;; Copyright (C) 2010, 2012, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+(require 'compile) ;; for compilation-find-file
+(require 'load-relative)
+(require-relative-list '("../../common/track"
+                         "../../common/core"
+                         "../../common/lang")
+                       "realgud-")
+(require-relative-list '("init") "realgud:trepan-")
+
+(declare-function realgud:strip              'realgud)
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
+(declare-function realgud-parse-command-arg  'realgud-core)
+(declare-function realgud-query-cmdline      'realgud-core)
+(declare-function realgud-suggest-invocation 'realgud-core)
+(declare-function realgud:file-loc-from-line 'realgud-file)
+
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:trepan-minibuffer-history nil
+  "minibuffer history list for the command `realgud:trepan'.")
+
+(easy-mmode-defmap trepan-minibuffer-local-map
+  '(("\C-i" . comint-dynamic-complete-filename))
+  "Keymap for minibuffer prompting of gud startup command."
+  :inherit minibuffer-local-map)
+
+(defvar realgud:trepan-file-remap (make-hash-table :test 'equal)
+  "How to remap Python files in trepan when we otherwise can't
+  find in the filesystem. The hash key is the file string we saw,
+  and the value is associated filesystem string presumably in the
+  filesystem")
+
+;; FIXME: this code could be generalized and put in a common place.
+(defun realgud:trepan-find-file(filename)
+  "A find-file specific for trepan. We strip off trailing
+blanks. Failing that we will prompt for a mapping and save that
+in variable `realgud:trepan-file-remap' when that works. In the
+future, we may also consult RUBYPATH."
+  (let* ((transformed-file)
+        (stripped-filename (realgud:strip filename))
+        ;; (ignore-file-re)
+       )
+    (cond
+     ((file-exists-p filename) filename)
+     ((file-exists-p stripped-filename) stripped-filename)
+     ;; ((string-match ((ignore-file-re filename)
+     ;;        (message "tracking ignored for psuedo-file: %s" filename) nil)
+     ('t
+      ;; FIXME search RUBYLIB if not absolute file?
+      (if (gethash filename realgud-file-remap)
+         (let ((remapped-filename))
+           (setq remapped-filename (gethash filename 
realgud:trepan-file-remap))
+           (if (file-exists-p remapped-filename)
+               remapped-filename
+             ;; else
+             (and (remhash filename realgud-file-remap)) nil)
+           ;; else
+           (let ((remapped-filename))
+             (setq remapped-filename
+                   (buffer-file-name
+                    (compilation-find-file (point-marker) stripped-filename
+                                           nil "%s.rb")))
+             (when (and remapped-filename (file-exists-p remapped-filename))
+               (puthash filename remapped-filename realgud-file-remap)
+               remapped-filename
+               ))
+           ))
+      ))
+    ))
+
+(defun realgud:trepan-loc-fn-callback(text filename lineno source-str
+                                          ignore-file-re cmd-mark)
+  (realgud:file-loc-from-line filename lineno
+                             cmd-mark source-str nil nil
+                             'realgud:trepan-find-file))
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun realgud:trepan-query-cmdline (&optional opt-debugger)
+  (realgud-query-cmdline
+   'trepan-suggest-invocation
+   trepan-minibuffer-local-map
+   'realgud:trepan-minibuffer-history
+   opt-debugger))
+
+(defun realgud:trepan-parse-cmd-args (orig-args)
+  "Parse command line ARGS for the annotate level and name of script to debug.
+
+ORIG-ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing
+
+* the command processor (e.g. ruby) and it's arguments if any - a
+  list of strings
+
+* the name of the debugger given (e.g. trepan) and its arguments
+  - a list of strings
+
+* the script name and its arguments - list of strings
+
+* whether the annotate or emacs option was given ('-A',
+  '--annotate' or '--emacs) - a boolean
+
+For example for the following input
+  (map 'list 'symbol-name
+   '(ruby1.9 -W -C /tmp trepan --emacs ./gcd.rb a b))
+
+we might return:
+   ((ruby1.9 -W -C) (trepan --emacs) (./gcd.rb a b) 't)
+
+Note that the script name path has been expanded via `expand-file-name'.
+"
+
+  ;; Parse the following kind of pattern:
+  ;;  [ruby ruby-options] trepan trepan-options script-name script-options
+  (let (
+        (args orig-args)
+        (pair)          ;; temp return from
+        (ruby-opt-two-args '("0" "C" "e" "E" "F" "i"))
+        ;; Ruby doesn't have mandatory 2-arg options in our sense,
+        ;; since the two args can be run together, e.g. "-C/tmp" or "-C /tmp"
+        ;;
+        (ruby-two-args '())
+        ;; One dash is added automatically to the below, so
+        ;; h is really -h and -host is really --host.
+        (trepan-two-args '("h" "-host" "p" "-port"
+                           "I" "-include" "-r" "-require"))
+        (trepan-opt-two-args '())
+        (interp-regexp
+         (if (member system-type (list 'windows-nt 'cygwin 'msdos))
+             "^ruby[-0-9]*\\(.exe\\)?$"
+           "^ruby[-0-9]*$"))
+
+        ;; Things returned
+        (script-name nil)
+        (debugger-name nil)
+        (interpreter-args '())
+        (debugger-args '())
+        (script-args '())
+        (annotate-p nil))
+
+    (if (not (and args))
+        ;; Got nothing: return '(nil, nil)
+        (list interpreter-args debugger-args script-args annotate-p)
+      ;; else
+      ;; Strip off optional "ruby" or "ruby182" etc.
+      (when (string-match interp-regexp
+                          (file-name-sans-extension
+                           (file-name-nondirectory (car args))))
+        (setq interpreter-args (list (pop args)))
+
+        ;; Strip off Ruby-specific options
+        (while (and args
+                    (string-match "^-" (car args)))
+          (setq pair (realgud-parse-command-arg
+                      args ruby-two-args ruby-opt-two-args))
+          (nconc interpreter-args (car pair))
+          (setq args (cadr pair))))
+
+      ;; Remove "trepan" from "trepan --trepan-options script
+      ;; --script-options"
+      (setq debugger-name (file-name-sans-extension
+                           (file-name-nondirectory (car args))))
+      (unless (string-match "^trepan$" debugger-name)
+        (message
+         "Expecting debugger name `%s' to be `trepan'"
+         debugger-name))
+      (setq debugger-args (list (pop args)))
+
+      ;; Skip to the first non-option argument.
+      (while (and args (not script-name))
+        (let ((arg (car args)))
+          (cond
+           ;; Annotation or emacs option with level number.
+           ((or (member arg '("--annotate" "-A"))
+                (equal arg "--emacs"))
+            (setq annotate-p t)
+            (nconc debugger-args (list (pop args))))
+           ;; Combined annotation and level option.
+           ((string-match "^--annotate=[0-9]" arg)
+            (nconc debugger-args (list (pop args)) )
+            (setq annotate-p t))
+          ;; path-argument options
+          ((member arg '("--include" "-I" "--require" "-I"))
+           (setq arg (pop args))
+           (nconc debugger-args
+                  (list arg (realgud:expand-file-name-if-exists
+                             (pop args)))))
+           ;; Options with arguments.
+           ((string-match "^-" arg)
+            (setq pair (realgud-parse-command-arg
+                        args trepan-two-args trepan-opt-two-args))
+            (nconc debugger-args (car pair))
+            (setq args (cadr pair)))
+           ;; Anything else must be the script to debug.
+          (t (setq script-name (realgud:expand-file-name-if-exists arg))
+             (setq script-args (cons script-name (cdr args))))
+           )))
+      (list interpreter-args debugger-args script-args annotate-p))))
+
+;; To silence Warning: reference to free variable
+(defvar realgud:trepan-command-name)
+
+(defun trepan-suggest-invocation (debugger-name)
+  "Suggest a trepan command invocation via `realgud-suggest-invocaton'"
+  (realgud-suggest-invocation realgud:trepan-command-name
+                             realgud:trepan-minibuffer-history
+                             "ruby" "\\.rb$" "trepan"))
+
+(defun trepan-reset ()
+  "Trepan cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+  (interactive)
+  ;; (trepan-breakpoint-remove-all-icons)
+  (dolist (buffer (buffer-list))
+    (when (string-match "\\*trepan-[a-z]+\\*" (buffer-name buffer))
+      (let ((w (get-buffer-window buffer)))
+        (when w
+          (delete-window w)))
+      (kill-buffer buffer))))
+
+;; (defun trepan-reset-keymaps()
+;;   "This unbinds the special debugger keys of the source buffers."
+;;   (interactive)
+;;   (setcdr (assq 'trepan-debugger-support-minor-mode minor-mode-map-alist)
+;;        trepan-debugger-support-minor-mode-map-when-deactive))
+
+
+(defun realgud:trepan-customize ()
+  "Use `customize' to edit the settings of the `trepan' debugger."
+  (interactive)
+  (customize-group 'realgud:trepan))
+
+(provide-me "realgud:trepan-")
diff --git a/packages/realgud/realgud/debugger/trepan/init.el 
b/packages/realgud/realgud/debugger/trepan/init.el
new file mode 100644
index 0000000..b2cc954
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan/init.el
@@ -0,0 +1,230 @@
+;; Copyright (C) 2010, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;; Ruby Trepanning debugger
+(eval-when-compile (require 'cl-lib))   ;For setf.
+
+(require 'load-relative)
+(require-relative-list '("../../common/regexp"
+                        "../../common/loc"
+                        "../../common/init")
+                      "realgud-")
+(require-relative-list '("../../lang/ruby") "realgud-lang-")
+
+(defvar realgud-pat-hash)
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defvar realgud:trepan-pat-hash (make-hash-table :test 'equal)
+  "Hash key is the what kind of pattern we want to match:
+backtrace, prompt, etc.  The values of a hash entry is a
+realgud-loc-pat struct")
+
+(setf (gethash "loc-callback-fn" realgud:trepan-pat-hash) 
'realgud:trepan-loc-fn-callback)
+
+;; Regular expression that describes a trepan location generally shown
+;; before a command prompt.
+;; For example:
+;; -- (/tmp/linecache.rb:64)
+;; C> (/tmp/eval.rb:2)
+(setf (gethash "loc" realgud:trepan-pat-hash)
+      (make-realgud-loc-pat
+       :regexp ".. (\\(?:.+ \\(?:via\\|remapped\\) 
\\)?\\(.+\\):\\([0-9]+\\)\\(?: @[0-9]+\\)?)\\(?:\n\\(.*?\\)\n\\)?"
+       :file-group 1
+       :line-group 2
+       :text-group 3
+       :ignore-file-re  "(eval: .*)"
+       ))
+
+;; Regular expression that describes a trepan command prompt
+;; For example:
+;;   (trepan):
+;;   ((trepan)):
+;;   (address@hidden):
+;;   (address@hidden):
+(setf (gethash "prompt" realgud:trepan-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^(+trepan\\(@[0-9]+\\|@main\\)?)+: "
+       ))
+
+;; Regular expression that describes a Ruby YARV 1.9 syntax error line.
+(setf (gethash "syntax-error" realgud:trepan-pat-hash)
+      realgud-ruby-YARV-syntax-error-pat)
+
+;; Regular expression that describes a Ruby YARV backtrace line.
+;; For example: 
+;;     from /ruby/gems/2.2.0/gems/fog-1.32.0/lib/fog/digitalocean.rb:1:in 
`<top (required)>'
+;;     from /Users/fog-1.32.0/lib/fog.rb:28:in `require'
+(setf (gethash "lang-backtrace" realgud:trepan-pat-hash)
+      realgud-ruby-backtrace-loc-pat)
+   
+;;  Regular expression that describes a ruby $! backtrace
+(setf (gethash "dollar-bang-backtrace" realgud:trepan-pat-hash)
+      realgud-ruby-dollar-bang-loc-pat)
+
+;; Regular expression that describes a "breakpoint set" line.
+;; For example:
+;;   Breakpoint 1 set at VM offset 2 of instruction sequence "require",
+;;     line 29 in file <internal:lib/rubygems/custom_require>.
+;;   Breakpoint 2 set at VM offset 29 of instruction sequence "<top /xx.rb>",
+;;     line 64 in file /src/external-vcs/linecache/trunk/lib/linecache.rb.
+(setf (gethash "brkpt-set" realgud:trepan-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^Breakpoint \\([0-9]+\\) set at .*[\n\t ]+line \\([0-9]+\\)[ 
\t\n]+in file \\(.+\\)."
+       :num 1
+       :file-group 3
+       :line-group 2))
+
+;; Regular expression that describes a debugger "delete" (breakpoint) response.
+;; For example:
+;;   Deleted breakpoint 1.
+(setf (gethash "brkpt-del" realgud:trepan-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^Deleted breakpoint \\([0-9]+\\).\n"
+       :num 1))
+
+(defconst realgud:trepan-selected-frame-indicator "-->"
+"String that describes which frame is selected in a debugger
+backtrace listing.")
+
+(defconst realgud:trepan-frame-file-regexp
+  "[ \t\n]+in file \\([^ \n]+\\)")
+
+(defconst realgud:trepan-debugger-name "trepan" "Name of debugger")
+
+;; Top frame number
+(setf (gethash "top-frame-num" realgud:trepan-pat-hash) 0)
+
+;; Regular expression that describes a debugger "selected" frame in in
+;; a frame-motion command.
+;; For example:
+;; --> #1 TOP Object#<top /usr/local/bin/irb> in file /usr/local/bin/irb at 
line 9
+(setf (gethash "selected-frame" realgud:trepan-pat-hash)
+      (make-realgud-loc-pat
+       :regexp
+       (format "^%s #\\([0-9]+\\) .*%s"
+              realgud:trepan-selected-frame-indicator
+              realgud:trepan-frame-file-regexp)
+       :num 1))
+
+(setf (gethash "control-frame" realgud:trepan-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^c:\\([0-9]+\\) p:\\([0-9]+\\) s:\\([0-9]+\\) b:\\([0-9]+\\) 
l:\\([0-9a-f]+\\) d:\\([0-9a-f]+\\) \\([A-Z]+\\) \\(.+\\):\\([0-9]+\\)"
+       :file-group 8
+       :line-group 9))
+
+;;  Regular expression that describes a Ruby $! string
+(setf (gethash "dollar-bang" realgud:trepan-pat-hash)
+      realgud-ruby-dollar-bang-loc-pat)
+
+;;  Regular expression that describes debugger "backtrace" command line.
+;;  e.g.
+;; --> #0 METHOD Object#require(path) in file <internal:lib/require> at line 28
+;;     #1 TOP Object#<top /tmp/linecache.rb> in file /tmp/linecache.rb
+(setf (gethash "debugger-backtrace" realgud:trepan-pat-hash)
+      (make-realgud-loc-pat
+       :regexp         (concat realgud:trepan-frame-start-regexp " "
+                       realgud:trepan-frame-num-regexp " "
+                       "\\([A-Z]+\\) *\\([A-Z_][a-zA-Z0-9_]*\\)[#]\\(.*\\)"
+                       realgud:trepan-frame-file-regexp
+                       "\\(?:" realgud:trepan-frame-line-regexp "\\)?"
+                       )
+       :num 2
+       :file-group 6
+       :line-group 7)
+      )
+
+;; Regular expression that for a termination message.
+(setf (gethash "termination" realgud:trepan-pat-hash)
+       "^trepan: That's all, folks...\n")
+
+(setf (gethash "font-lock-keywords" realgud:trepan-pat-hash)
+      '(
+       ;; The frame number and first type name, if present.
+       ("^\\(-->\\|   \\)? #\\([0-9]+\\) \\([A-Z]+\\) 
*\\([A-Z_][a-zA-Z0-9_]*\\)[#]\\([a-zA-Z_][a-zA-Z_[0-9]]*\\)?"
+        (2 realgud-backtrace-number-face)
+        (3 font-lock-keyword-face)         ; e.g. METHOD, TOP
+        (4 font-lock-constant-face)        ; e.g. Object
+        (5 font-lock-function-name-face nil t))   ; t means optional
+       ;; Instruction sequence
+       ("<\\(.+\\)>"
+        (1 font-lock-variable-name-face))
+       ;; "::Type", which occurs in class name of function and in parameter 
list.
+       ;; Parameter sequence
+       ("(\\(.+\\))"
+        (1 font-lock-variable-name-face))
+       ;; "::Type", which occurs in class name of function and in parameter 
list.
+       ("::\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
+        (1 font-lock-type-face))
+       ;; File name.
+       ("[ \t]+in file \\([^ ]+*\\)"
+        (1 realgud-file-name-face))
+       ;; Line number.
+       ("[ \t]+at line \\([0-9]+\\)$"
+        (1 realgud-line-number-face))
+       ;; Function name.
+       ("\\<\\([a-zA-Z_][a-zA-Z0-9_]*\\)\\.\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
+        (1 font-lock-type-face)
+        (2 font-lock-function-name-face))
+       ;; (trepan-frames-match-current-line
+       ;;  (0 trepan-frames-current-frame-face append))
+       ))
+
+;; (setf (gethash "font-lock-keywords" realgud:trepan-pat-hash)
+;;       '(
+;;     ;; The frame number and first type name, if present.
+;;     ((concat realgud:trepan-frame-start-regexp " "
+;;                     realgud:trepan-frame-num-regexp " "
+;;                     "\\([A-Z]+\\) 
*\\([A-Z_][a-zA-Z0-9_]*\\)[#]\\([a-zA-Z_][a-zA-Z_[0-9]]*\\)?")
+;;      (2 realgud-backtrace-number-face)
+;;      (3 font-lock-keyword-face)         ; e.g. METHOD, TOP
+;;      (4 font-lock-constant-face)        ; e.g. Object
+;;      (5 font-lock-function-name-face nil t))   ; t means optional
+;;     ;; Instruction sequence
+;;     ("<\\(.+\\)>"
+;;      (1 font-lock-variable-name-face))
+;;     ;; "::Type", which occurs in class name of function and in
+;;     ;; parameter list.  Parameter sequence
+;;     ("(\\(.+\\))"
+;;      (1 font-lock-variable-name-face))
+;;     ;; "::Type", which occurs in class name of function and in
+;;     ;; parameter list.
+;;     ("::\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
+;;      (1 font-lock-type-face))
+;;     ;; File name.
+;;     (realgud:trepan-frame-file-regexp (1 realgud-file-name-face))
+;;     ;; Line number.
+;;     (realgud:trepan-frame-line-regexp (1 realgud-line-number-face))
+;;     ;; Function name.
+;;     ("\\<\\([a-zA-Z_][a-zA-Z0-9_]*\\)\\.\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
+;;      (1 font-lock-type-face)
+;;      (2 font-lock-function-name-face))
+;;     ;; (trepan-frames-match-current-line
+;;     ;;  (0 trepan-frames-current-frame-face append))
+;;     ))
+
+(setf (gethash realgud:trepan-debugger-name realgud-pat-hash) 
realgud:trepan-pat-hash)
+
+(defvar realgud:trepan-command-hash (make-hash-table :test 'equal)
+  "Hash key is command name like 'quit' and the value is
+  the trepan command to use, like 'quit!'")
+
+(setf (gethash "quit" realgud:trepan-command-hash) "quit!")
+(setf (gethash "shell" realgud:trepan-command-hash) "irb")
+(setf (gethash realgud:trepan-debugger-name
+              realgud-command-hash) realgud:trepan-command-hash)
+
+(provide-me "realgud:trepan-")
diff --git a/packages/realgud/realgud/debugger/trepan/track-mode.el 
b/packages/realgud/realgud/debugger/trepan/track-mode.el
new file mode 100644
index 0000000..f5fafb2
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan/track-mode.el
@@ -0,0 +1,94 @@
+;; Copyright (C) 2010, 2012-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;; Ruby "trepan" Debugger tracking a comint or eshell buffer.
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                        "../../common/track"
+                        "../../common/track-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud:trepan-")
+(require-relative-list '("../../lang/ruby") "realgud-lang-")
+
+(declare-function realgud-track-mode 'realgud-track-mode)
+(declare-function realgud-track-mode-hook 'realgud-track-mode)
+(declare-function realgud-track-mode-setup 'realgud-track-mode)
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+(declare-function realgud-goto-line-for-pt 'realgud-track-mode)
+
+(realgud-track-mode-vars "trepan")
+
+(define-key realgud-track-mode-map
+  (kbd "C-c !!") 'realgud:goto-lang-backtrace-line)
+(define-key realgud-track-mode-map
+  (kbd "C-c !b") 'realgud:goto-debugger-backtrace-line)
+
+(declare-function realgud:ruby-populate-command-keys 'realgud-lang-ruby)
+
+(defun realgud:trepan-goto-control-frame-line (pt)
+  "Display the location mentioned by a control-frame line
+described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "control-frame"))
+
+(defun realgud:trepan-goto-syntax-error-line (pt)
+  "Display the location mentioned in a Syntax error line
+described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "syntax-error"))
+
+(realgud:ruby-populate-command-keys trepan-track-mode-map)
+
+(define-key trepan-track-mode-map
+  (kbd "C-c !c") 'realgud:trepan-goto-control-frame-line)
+(define-key trepan-track-mode-map
+  (kbd "C-c !s") 'realgud:trepan-goto-syntax-error-line)
+
+(defun trepan-track-mode-hook()
+  (if trepan-track-mode
+      (progn
+       (use-local-map trepan-track-mode-map)
+       (message "using trepan mode map")
+       )
+    (message "trepan track-mode-hook disable called"))
+)
+
+(define-minor-mode trepan-track-mode
+  "Minor mode for tracking trepan source locations inside a process shell via 
realgud. trepan is a Ruby debugger.
+
+If called interactively with no prefix argument, the mode is toggled. A prefix 
argument, captured as ARG, enables the mode if the argument is positive, and 
disables it otherwise.
+
+\\{trepan-track-mode-map}
+"
+  :init-value nil
+  ;; :lighter " trepan"   ;; mode-line indicator from realgud-track is 
sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:trepan
+  :keymap trepan-track-mode-map
+  (realgud:track-set-debugger "trepan")
+  (if trepan-track-mode
+      (progn
+       (realgud-track-mode-setup 't)
+        (trepan-track-mode-hook))
+    (progn
+      (setq realgud-track-mode nil)
+      ))
+)
+
+(provide-me "realgud:trepan-")
diff --git a/packages/realgud/realgud/debugger/trepan/trepan.el 
b/packages/realgud/realgud/debugger/trepan/trepan.el
new file mode 100644
index 0000000..41c51b1
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan/trepan.el
@@ -0,0 +1,71 @@
+;; Copyright (C) 2010-2011, 2013-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;  `trepan' Main interface to trepan via Emacs
+(require 'load-relative)
+(require-relative-list '("../../common/helper") "realgud-")
+(require-relative-list '("../../common/run")    "realgud:")
+(require-relative-list '("core" "track-mode") "realgud:trepan-")
+
+(declare-function realgud:trepan-query-cmdline  'realgud:trepan-core)
+(declare-function realgud:trepan-parse-cmd-args 'realgud:trepan-core)
+(declare-function realgud:run-debugger 'realgud:run)
+
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:trepan nil
+  "The realgud interface to the Ruby 1.9.2 1.9.3 \"trepanning\" debugger"
+  :group 'ruby
+  :group 'realgud
+  :version "24.3")
+
+;; -------------------------------------------------------------------
+;; User-definable variables
+;;
+
+(defcustom realgud:trepan-command-name
+  ;;"trepan --emacs 3"
+  "trepan"
+  "File name for executing the Ruby debugger and command options.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'realgud:trepan)
+
+;;;###autoload
+(defun realgud:trepan (&optional opt-cmd-line no-reset)
+  "Invoke the trepan Ruby debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `trepan-parse-cmd-args' and path elements found by that
+are expanded using `expand-file-name'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+"
+  (interactive)
+  (realgud:run-debugger "trepan" 'realgud:trepan-query-cmdline
+                       'realgud:trepan-parse-cmd-args
+                       'realgud:trepan-minibuffer-history
+                       opt-cmd-line no-reset)
+  )
+
+(defalias 'trepan 'realgud:trepan)
+(provide-me "realgud-")
+;;; trepan.el ends here
diff --git a/packages/realgud/realgud/debugger/trepan2/Makefile.am 
b/packages/realgud/realgud/debugger/trepan2/Makefile.am
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan2/Makefile.am
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/packages/realgud/realgud/debugger/trepan2/core.el 
b/packages/realgud/realgud/debugger/trepan2/core.el
new file mode 100644
index 0000000..ddf9011
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan2/core.el
@@ -0,0 +1,241 @@
+;; Copyright (C) 2010-2012, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+(require 'compile) ;; for compilation-find-file
+(require 'load-relative)
+(require-relative-list '("../../common/track"
+                        "../../common/core"
+                         "../../common/file"
+                        "../../common/lang")
+                      "realgud-")
+(require-relative-list '("init") "realgud:trepan2-")
+
+(declare-function realgud:strip              'realgud)
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
+(declare-function realgud-parse-command-arg  'realgud-core)
+(declare-function realgud-query-cmdline      'realgud-core)
+(declare-function realgud-suggest-invocation 'realgud-core)
+(declare-function realgud:file-loc-from-line 'realgud-file)
+
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:trepan2-minibuffer-history nil
+  "minibuffer history list for the command `realgud:trepan2'.")
+
+(easy-mmode-defmap trepan2-minibuffer-local-map
+  '(("\C-i" . comint-dynamic-complete-filename))
+  "Keymap for minibuffer prompting of gud startup command."
+  :inherit minibuffer-local-map)
+
+(defvar realgud:trepan2-file-remap (make-hash-table :test 'equal)
+  "How to remap Python files in trepan2 when we otherwise can't
+  find in the filesystem. The hash key is the file string we saw,
+  and the value is associated filesystem string presumably in the
+  filesystem")
+
+;; FIXME: this code could be generalized and put in a common place.
+(defun realgud:trepan2-find-file(filename)
+  "A find-file specific for python/trepan. We strip off trailing
+blanks. Failing that we will prompt for a mapping and save that
+in variable `realgud:trepan2-file-remap' when that works. In the future,
+we may also consult PYTHONPATH."
+  (let* ((transformed-file)
+        (stripped-filename (realgud:strip filename))
+        (ignore-file-re realgud-python-ignore-file-re)
+       )
+    (cond
+     ((file-exists-p filename) filename)
+     ((file-exists-p stripped-filename) stripped-filename)
+     ((string-match ignore-file-re filename)
+       (message "tracking ignored for psuedo-file: %s" filename) nil)
+     ('t
+      ;; FIXME search PYTHONPATH if not absolute file
+      (if (gethash filename realgud-file-remap)
+         (let ((remapped-filename))
+           (setq remapped-filename (gethash filename 
realgud:trepan2-file-remap))
+           (if (file-exists-p remapped-filename)
+               remapped-filename
+             ;; else
+             (and (remhash filename realgud-file-remap)) nil)
+           ;; else
+           (let ((remapped-filename))
+             (setq remapped-filename
+                   (buffer-file-name
+                    (compilation-find-file (point-marker) stripped-filename
+                                           nil "%s.py")))
+             (when (and remapped-filename (file-exists-p remapped-filename))
+               (puthash filename remapped-filename realgud-file-remap)
+               remapped-filename
+               ))
+           ))
+      ))
+    ))
+
+(defun realgud:trepan2-loc-fn-callback(text filename lineno source-str
+                                           ignore-file-re cmd-mark)
+  (realgud:file-loc-from-line filename lineno
+                             cmd-mark source-str nil nil
+                             'realgud:trepan2-find-file))
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun trepan2-query-cmdline (&optional opt-debugger)
+  (realgud-query-cmdline
+   'trepan2-suggest-invocation
+   trepan2-minibuffer-local-map
+   'realgud:trepan2-minibuffer-history
+   opt-debugger))
+
+(defun trepan2-parse-cmd-args (orig-args)
+  "Parse command line ARGS for the annotate level and name of script to debug.
+
+ORIG-ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing
+- the command processor (e.g. python) and it's arguments if any - a list of 
strings
+- the name of the debugger given (e.g. trepan2) and its arguments - a list of 
strings
+- the script name and its arguments - list of strings
+- whether the annotate or emacs option was given ('-A', '--annotate' or 
'--emacs) - a boolean
+
+For example for the following input
+  (map 'list 'symbol-name
+   '(python2.6 -O -Qold --emacs ./gcd.py a b))
+
+we might return:
+   ((python2.6 -O -Qold) (trepan2 --emacs) (./gcd.py a b) 't)
+
+NOTE: the above should have each item listed in quotes.
+"
+
+  ;; Parse the following kind of pattern:
+  ;;  [python python-options] trepan2 trepan2-options script-name 
script-options
+  (let (
+       (args orig-args)
+       (pair)          ;; temp return from
+       (python-opt-two-args '("c" "m" "Q" "W"))
+       ;; Python doesn't have mandatory 2-arg options in our sense,
+       ;; since the two args can be run together, e.g. "-C/tmp" or "-C /tmp"
+       ;;
+       (python-two-args '())
+       ;; One dash is added automatically to the below, so
+       ;; h is really -h and -host is really --host.
+       (trepan2-two-args '("x" "-command" "e" "-execute"
+                          "o" "-output"  "t" "-target"
+                          "a" "-annotate"))
+       (trepan2-opt-two-args '())
+       (interp-regexp
+        (if (member system-type (list 'windows-nt 'cygwin 'msdos))
+            "^python[-0-9.]*\\(.exe\\)?$"
+          "^python[-0-9.]*$"))
+
+       ;; Things returned
+       (annotate-p nil)
+       (debugger-args '())
+       (debugger-name nil)
+       (interpreter-args '())
+       (script-args '())
+       (script-name nil)
+       )
+
+    (if (not (and args))
+       ;; Got nothing: return '(nil, nil)
+       (list interpreter-args debugger-args script-args annotate-p)
+      ;; else
+      ;; Strip off optional "python" or "python182" etc.
+      (when (string-match interp-regexp
+                         (file-name-sans-extension
+                          (file-name-nondirectory (car args))))
+       (setq interpreter-args (list (pop args)))
+
+       ;; Strip off Python-specific options
+       (while (and args
+                   (string-match "^-" (car args)))
+         (setq pair (realgud-parse-command-arg
+                     args python-two-args python-opt-two-args))
+         (nconc interpreter-args (car pair))
+         (setq args (cadr pair))))
+
+      ;; Remove "trepan2" from "trepan2 --trepan2-options script
+      ;; --script-options"
+      (setq debugger-name (file-name-sans-extension
+                          (file-name-nondirectory (car args))))
+      (unless (string-match "^\\(trepan2\\|cli.py\\)$" debugger-name)
+       (message
+        "Expecting debugger name `%s' to be `trepan2' or `cli.py'"
+        debugger-name))
+      (setq debugger-args (list (pop args)))
+
+      ;; Skip to the first non-option argument.
+      (while (and args (not script-name))
+       (let ((arg (car args)))
+         (cond
+          ;; Annotation or emacs option with level number.
+          ((or (member arg '("--annotate" "-A"))
+               (equal arg "--emacs"))
+           (setq annotate-p t)
+           (nconc debugger-args (list (pop args))))
+          ;; Combined annotation and level option.
+          ((string-match "^--annotate=[0-9]" arg)
+           (nconc debugger-args (list (pop args)) )
+           (setq annotate-p t))
+          ;; Options with arguments.
+          ((string-match "^-" arg)
+           (setq pair (realgud-parse-command-arg
+                       args trepan2-two-args trepan2-opt-two-args))
+           (nconc debugger-args (car pair))
+           (setq args (cadr pair)))
+          ;; Anything else must be the script to debug.
+          (t (setq script-name (realgud:expand-file-name-if-exists arg))
+             (setq script-args (cons script-name (cdr args))))
+          )))
+      (list interpreter-args debugger-args script-args annotate-p))))
+
+;; To silence Warning: reference to free variable
+(defvar realgud:trepan2-command-name)
+
+(defun trepan2-suggest-invocation (debugger-name)
+  "Suggest a trepan2 command invocation via `realgud-suggest-invocaton'"
+  (realgud-suggest-invocation realgud:trepan2-command-name
+                             realgud:trepan2-minibuffer-history
+                             "python" "\\.py"
+                             realgud:trepan2-command-name))
+
+(defun trepan2-reset ()
+  "Trepan2 cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+  (interactive)
+  ;; (trepan2-breakpoint-remove-all-icons)
+  (dolist (buffer (buffer-list))
+    (when (string-match "\\*trepan2-[a-z]+\\*" (buffer-name buffer))
+      (let ((w (get-buffer-window buffer)))
+        (when w
+          (delete-window w)))
+      (kill-buffer buffer))))
+
+;; (defun trepan2-reset-keymaps()
+;;   "This unbinds the special debugger keys of the source buffers."
+;;   (interactive)
+;;   (setcdr (assq 'trepan2-debugger-support-minor-mode minor-mode-map-alist)
+;;       trepan2-debugger-support-minor-mode-map-when-deactive))
+
+
+(defun realgud:trepan2-customize ()
+  "Use `customize' to edit the settings of the `trepan2' debugger."
+  (interactive)
+  (customize-group 'realgud:trepan2))
+
+(provide-me "realgud:trepan2-")
diff --git a/packages/realgud/realgud/debugger/trepan2/init.el 
b/packages/realgud/realgud/debugger/trepan2/init.el
new file mode 100644
index 0000000..2f13fa7
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan2/init.el
@@ -0,0 +1,110 @@
+;; Copyright (C) 2010-2012, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;; trepan2: Python 2.5 - 2.7; for 3.0+ see trepan3k
+
+(eval-when-compile (require 'cl-lib))   ;For setf.
+
+(require 'load-relative)
+(require-relative-list '("../../common/regexp"
+                        "../../common/loc"
+                        "../../common/init")
+                      "realgud-")
+(require-relative-list '("../../lang/python") "realgud-lang-")
+
+(defvar realgud-pat-hash)
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defvar realgud:trepan2-pat-hash (make-hash-table :test 'equal)
+  "Hash key is the what kind of pattern we want to match:
+backtrace, prompt, etc.  The values of a hash entry is a
+realgud-loc-pat struct")
+
+(declare-function make-realgud-loc 'realgud-loc)
+
+(setf (gethash "loc-callback-fn" realgud:trepan2-pat-hash) 
'realgud:trepan2-loc-fn-callback)
+
+;; Regular expression that describes a trepan2 location generally shown
+;; before a command prompt.
+;;
+;; For example:
+;;   (/usr/bin/zonetab2pot.py:15 @3): <module>
+;;   (/usr/bin/zonetab2pot.py:15 remapped <string>): <module>
+;; or MS Windows:
+;;   (c:\\mydirectory\\gcd.py:10): <module>
+(setf (gethash "loc" realgud:trepan2-pat-hash)
+      realgud:python-trepan-loc-pat)
+
+(setf (gethash "prompt" realgud:trepan2-pat-hash)
+      (make-realgud-loc-pat
+       :regexp   "^(trepan2) "
+       ))
+
+;; Regular expression that describes a trepan2 backtrace line.
+;; For example:
+;; ->0 get_distribution(dist='trepan==0.3.9')
+;;     called from file '/python2.7/dist-packages/pkg_res.py' at line 341
+;; ##1 load_entry_point(dist='tr=0.3.9', group='console_scripts', name='tr')
+;;     called from file '/python2.7/dist-packages/pkg_res.py' at line 351
+;; ##2 <module> exec()
+
+(setf (gethash "debugger-backtrace" realgud:trepan2-pat-hash)
+      realgud:python-trepan-backtrace-pat)
+
+;;  Regular expression that describes a Python backtrace line.
+(setf (gethash "lang-backtrace" realgud:trepan2-pat-hash)
+      realgud-python-backtrace-loc-pat)
+
+;;  Regular expression that describes location in a pytest error
+(setf (gethash "pytest-error" realgud:trepan2-pat-hash)
+      realgud-pytest-error-loc-pat)
+
+;;  Regular expression that describes a "breakpoint set" line
+(setf (gethash "brkpt-set" realgud:trepan2-pat-hash)
+      realgud:python-trepan-brkpt-set-pat)
+
+;;  Regular expression that describes a "delete breakpoint" line
+(setf (gethash "brkpt-del" realgud:trepan2-pat-hash)
+      realgud:python-trepan-brkpt-del-pat)
+
+;; Regular expression that describes a debugger "disable" (breakpoint) 
response.
+;; For example:
+;;   Breakpoint 4 disabled.
+(setf (gethash "brkpt-disable" realgud:trepan2-pat-hash)
+      realgud:python-trepan-brkpt-disable-pat)
+
+;; Regular expression that describes a debugger "enable" (breakpoint) response.
+;; For example:
+;;   Breakpoint 4 enabled.
+(setf (gethash "brkpt-enable" realgud:trepan2-pat-hash)
+      realgud:python-trepan-brkpt-disable-pat)
+
+;; Regular expression for a termination message.
+(setf (gethash "termination" realgud:trepan2-pat-hash)
+      "^trepan2: That's all, folks...\n")
+
+(setf (gethash "font-lock-keywords" realgud:trepan2-pat-hash)
+      realgud:python-debugger-font-lock-keywords)
+
+(setf (gethash "trepan2" realgud-pat-hash) realgud:trepan2-pat-hash)
+
+(defvar realgud:trepan2-command-hash (make-hash-table :test 'equal)
+  "Hash key is command name like 'shell' and the value is
+  the trepan2 command to use, like 'python'")
+
+(setf (gethash "shell" realgud:trepan2-command-hash) "python")
+(setf (gethash "until" realgud:trepan2-command-hash) "continue %l")
+
+;; If your version of trepan2 doesn't support "quit!",
+;; get a more recent version of trepan2
+(setf (gethash "quit" realgud:trepan2-command-hash) "quit!")
+
+(setf (gethash "trepan2" realgud-command-hash) realgud:trepan2-command-hash)
+
+(provide-me "realgud:trepan2-")
diff --git a/packages/realgud/realgud/debugger/trepan2/track-mode.el 
b/packages/realgud/realgud/debugger/trepan2/track-mode.el
new file mode 100644
index 0000000..d10bde5
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan2/track-mode.el
@@ -0,0 +1,77 @@
+;; Copyright (C) 2010-2012, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;;
+;; Python "trepan2" Debugger tracking in a comint or eshell buffer.
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                        "../../common/track"
+                        "../../common/track-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud:trepan2-")
+(require-relative-list '("../../lang/python") "realgud-lang-")
+
+(declare-function realgud-track-mode 'realgud-track-mode)
+(declare-function realgud-track-mode-hook 'realgud-track-mode)
+(declare-function realgud-track-mode-setup   'realgud-track-mode)
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+(declare-function realgud-python-populate-command-keys 'realgud-lang-python)
+
+(realgud-track-mode-vars "trepan2")
+
+(realgud-python-populate-command-keys trepan2-track-mode-map)
+
+(defun trepan2-track-mode-hook()
+  (if trepan2-track-mode
+      (progn
+       (use-local-map trepan2-track-mode-map)
+       (message "using trepan2 mode map")
+       )
+    (message "trepan2 track-mode-hook disable called")
+    )
+)
+
+(define-minor-mode trepan2-track-mode
+  "Minor mode for tracking trepan2 source locations inside a process shell via 
realgud. trepan2 is a Python debugger. See URL 
`https://github.com/rocky/emacs-dbgr/rocky/python2-trepan/'.
+
+If called interactively with no prefix argument, the mode is toggled. A prefix 
argument, captured as ARG, enables the mode if the argument is positive, and 
disables it otherwise.
+
+\\{trepan2-track-mode-map}
+"
+  :init-value nil
+  ;; :lighter " trepan2"   ;; mode-line indicator from realgud-track is 
sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:trepan2
+  :keymap trepan2-track-mode-map
+
+  (realgud:track-set-debugger "trepan2")
+  (if trepan2-track-mode
+      (progn
+       (realgud-track-mode-setup 't)
+        (trepan2-track-mode-hook))
+    (progn
+      (setq realgud-track-mode nil)
+      ))
+)
+
+(define-key trepan2-short-key-mode-map "T" 'realgud:cmd-backtrace)
+
+(provide-me "realgud:trepan2-")
diff --git a/packages/realgud/realgud/debugger/trepan2/trepan2.el 
b/packages/realgud/realgud/debugger/trepan2/trepan2.el
new file mode 100644
index 0000000..84bfd47
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan2/trepan2.el
@@ -0,0 +1,75 @@
+;; Copyright (C) 2010-2012, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;; Main interface to trepan2 via Emacs
+
+(require 'load-relative)
+(require-relative-list '("../../common/helper") "realgud-")
+(require-relative-list '("../../common/run")    "realgud:")
+(require-relative-list '("core" "track-mode")   "realgud:trepan2-")
+
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:trepan2 nil
+  "The realgud interface to the Python trepan2 debugger"
+  :group 'realgud
+  :group 'python
+  :version "24.2")
+
+(declare-function trepan2-query-cmdline  'realgud:trepan2-core)
+(declare-function trepan2-parse-cmd-args 'realgud:trepan2-core)
+(declare-function trepan2-track-mode     'realgud:pydbgr-track-mode)
+(declare-function realgud:run-debugger   'realgud:run)
+
+;; -------------------------------------------------------------------
+;; User-definable variables
+;;
+
+(defcustom realgud:trepan2-command-name
+  ;;"trepan2 --emacs 3"
+  "trepan2"
+  "File name for executing the Python debugger and command options.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'realgud:trepan2)
+
+
+;; -------------------------------------------------------------------
+;; The end.
+;;
+
+;;;###autoload
+(defun realgud:trepan2 (&optional opt-cmd-line no-reset)
+  "Invoke the trepan2 Python debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `trepan2-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+"
+  (interactive)
+  (realgud:run-debugger "trepan2"
+                       'trepan2-query-cmdline
+                       'trepan2-parse-cmd-args
+                       'realgud:trepan2-minibuffer-history
+                       opt-cmd-line no-reset)
+  )
+
+
+(defalias 'trepan2 'realgud:trepan2)
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/debugger/trepan3k/Makefile.am 
b/packages/realgud/realgud/debugger/trepan3k/Makefile.am
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan3k/Makefile.am
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/packages/realgud/realgud/debugger/trepan3k/core.el 
b/packages/realgud/realgud/debugger/trepan3k/core.el
new file mode 100644
index 0000000..6806a00
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan3k/core.el
@@ -0,0 +1,187 @@
+;; Copyright (C) 2010, 2012-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;;
+(require 'load-relative)
+(require-relative-list '("../../common/track"
+                        "../../common/core"
+                        "../../common/lang")
+                      "realgud-")
+(require-relative-list '("init") "realgud:trepan3k-")
+
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
+(declare-function realgud-parse-command-arg  'realgud-core)
+(declare-function realgud-query-cmdline      'realgud-core)
+(declare-function realgud-suggest-invocation 'realgud-core)
+
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:trepan3k-minibuffer-history nil
+  "minibuffer history list for the command `realgud:trepan3k'.")
+
+(easy-mmode-defmap trepan3k-minibuffer-local-map
+  '(("\C-i" . comint-dynamic-complete-filename))
+  "Keymap for minibuffer prompting of gud startup command."
+  :inherit minibuffer-local-map)
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun trepan3k-query-cmdline (&optional opt-debugger)
+  (realgud-query-cmdline
+   'trepan3k-suggest-invocation
+   trepan3k-minibuffer-local-map
+   'realgud-trepan3k-minibuffer-history
+   opt-debugger))
+
+(defun trepan3k-parse-cmd-args (orig-args)
+  "Parse command line ARGS for the annotate level and name of script to debug.
+
+ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing
+- the command processor (e.g. python) and it's arguments if any - a list of 
strings
+- the name of the debugger given (e.g. trepan3k) and its arguments - a list of 
strings
+- the script name and its arguments - list of strings
+- whether the annotate or emacs option was given ('-A', '--annotate' or 
'--emacs) - a boolean
+
+For example for the following input
+  (map 'list 'symbol-name
+   '(python2.6 -O -Qold --emacs ./gcd.py a b))
+
+we might return:
+   ((python2.6 -O -Qold) (trepan3k --emacs) (./gcd.py a b) 't)
+
+NOTE: the above should have each item listed in quotes.
+"
+
+  ;; Parse the following kind of pattern:
+  ;;  [python python-options] trepan3k trepan3k-options script-name 
script-options
+  (let (
+       (args orig-args)
+       (pair)          ;; temp return from
+       (python-opt-two-args '("c" "m" "Q" "W"))
+       ;; Python doesn't have mandatory 2-arg options in our sense,
+       ;; since the two args can be run together, e.g. "-C/tmp" or "-C /tmp"
+       ;;
+       (python-two-args '())
+       ;; One dash is added automatically to the below, so
+       ;; h is really -h and -host is really --host.
+       (trepan3k-two-args '("x" "-command" "e" "-execute"
+                          "o" "-output"  "t" "-target"
+                          "a" "-annotate"))
+       (trepan3k-opt-two-args '())
+       (interp-regexp
+        (if (member system-type (list 'windows-nt 'cygwin 'msdos))
+            "^python[-0-9.]*\\(.exe\\)?$"
+          "^python[-0-9.]*$"))
+
+       ;; Things returned
+       (annotate-p nil)
+       (debugger-args '())
+       (debugger-name nil)
+       (interpreter-args '())
+       (script-args '())
+       (script-name nil)
+       )
+
+    (if (not (and args))
+       ;; Got nothing: return '(nil, nil)
+       (list interpreter-args debugger-args script-args annotate-p)
+      ;; else
+      ;; Strip off optional "python" or "python182" etc.
+      (when (string-match interp-regexp
+                         (file-name-sans-extension
+                          (file-name-nondirectory (car args))))
+       (setq interpreter-args (list (pop args)))
+
+       ;; Strip off Python-specific options
+       (while (and args
+                   (string-match "^-" (car args)))
+         (setq pair (realgud-parse-command-arg
+                     args python-two-args python-opt-two-args))
+         (nconc interpreter-args (car pair))
+         (setq args (cadr pair))))
+
+      ;; Remove "trepan3k" from "trepan3k --trepan3k-options script
+      ;; --script-options"
+      (setq debugger-name (file-name-sans-extension
+                          (file-name-nondirectory (car args))))
+      (unless (string-match "^\\(trepan3k\\|cli.py\\)$" debugger-name)
+       (message
+        "Expecting debugger name `%s' to be `trepan3k' or `cli.py'"
+        debugger-name))
+      (setq debugger-args (list (pop args)))
+
+      ;; Skip to the first non-option argument.
+      (while (and args (not script-name))
+       (let ((arg (car args)))
+         (cond
+          ;; Annotation or emacs option with level number.
+          ((or (member arg '("--annotate" "-A"))
+               (equal arg "--emacs"))
+           (setq annotate-p t)
+           (nconc debugger-args (list (pop args))))
+          ;; Combined annotation and level option.
+          ((string-match "^--annotate=[0-9]" arg)
+           (nconc debugger-args (list (pop args)) )
+           (setq annotate-p t))
+          ;; Options with arguments.
+          ((string-match "^-" arg)
+           (setq pair (realgud-parse-command-arg
+                       args trepan3k-two-args trepan3k-opt-two-args))
+           (nconc debugger-args (car pair))
+           (setq args (cadr pair)))
+          ;; Anything else must be the script to debug.
+          (t (setq script-name (realgud:expand-file-name-if-exists arg))
+             (setq script-args (cons script-name (cdr args))))
+          )))
+      (list interpreter-args debugger-args script-args annotate-p))))
+
+;; To silence Warning: reference to free variable
+(defvar realgud:trepan3k-command-name)
+
+(defun trepan3k-suggest-invocation (debugger-name)
+  "Suggest a trepan3k command invocation via `realgud-suggest-invocaton'"
+  (realgud-suggest-invocation realgud:trepan3k-command-name
+                             realgud:trepan3k-minibuffer-history
+                             "python" "\\.py"
+                             realgud:trepan3k-command-name))
+
+(defun trepan3k-reset ()
+  "Trepan3k cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+  (interactive)
+  ;; (trepan3k-breakpoint-remove-all-icons)
+  (dolist (buffer (buffer-list))
+    (when (string-match "\\*trepan3k-[a-z]+\\*" (buffer-name buffer))
+      (let ((w (get-buffer-window buffer)))
+        (when w
+          (delete-window w)))
+      (kill-buffer buffer))))
+
+;; (defun trepan3k-reset-keymaps()
+;;   "This unbinds the special debugger keys of the source buffers."
+;;   (interactive)
+;;   (setcdr (assq 'trepan3k-debugger-support-minor-mode minor-mode-map-alist)
+;;       trepan3k-debugger-support-minor-mode-map-when-deactive))
+
+
+(defun realgud:trepan3k-customize ()
+  "Use `customize' to edit the settings of the `trepan3k' debugger."
+  (interactive)
+  (customize-group 'realgud:trepan3k))
+
+(provide-me "realgud:trepan3k-")
diff --git a/packages/realgud/realgud/debugger/trepan3k/init.el 
b/packages/realgud/realgud/debugger/trepan3k/init.el
new file mode 100644
index 0000000..ef2dfbd
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan3k/init.el
@@ -0,0 +1,116 @@
+;; Copyright (C) 2010-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;; trepan3k: Python 3.2 and beyond
+
+(eval-when-compile (require 'cl-lib))   ;For setf.
+
+(require 'load-relative)
+(require-relative-list '("../../common/regexp"
+                        "../../common/loc"
+                        "../../common/init")
+                      "realgud-")
+(require-relative-list '("../../lang/python") "realgud-lang-")
+
+(defvar realgud-pat-hash)
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defvar realgud:trepan3k-pat-hash (make-hash-table :test 'equal)
+  "Hash key is the what kind of pattern we want to match:
+backtrace, prompt, etc.  The values of a hash entry is a
+realgud-loc-pat struct")
+
+(declare-function make-realgud-loc 'realgud-loc)
+
+;; Regular expression that describes a trepan3k location generally shown
+;; before a command prompt.
+;;
+;; For example:
+;;   (/usr/bin/zonetab2pot.py:15): <module>
+;;   (/usr/bin/zonetab2pot.py:15 remapped <string>): <module>
+;; or MS Windows:
+;;   (c:\\mydirectory\\gcd.py:10): <module>
+(setf (gethash "loc" realgud:trepan3k-pat-hash)
+      realgud:python-trepan-loc-pat)
+
+(setf (gethash "prompt" realgud:trepan3k-pat-hash)
+      (make-realgud-loc-pat
+       :regexp   "^(trepan3k) "
+       ))
+
+;; Regular expression that describes a trepan3k backtrace line.
+;; For example:
+;; ->0 get_distribution(dist='trepan==0.3.9')
+;;     called from file '/python2.7/dist-packages/pkg_res.py' at line 341
+;; ##1 load_entry_point(dist='tr=0.3.9', group='console_scripts', name='tr')
+;;     called from file '/python2.7/dist-packages/pkg_res.py' at line 351
+;; ##2 <module> exec()
+
+(setf (gethash "debugger-backtrace" realgud:trepan3k-pat-hash)
+      realgud:python-trepan-backtrace-pat)
+
+;;  Regular expression that describes a Python backtrace line.
+(setf (gethash "lang-backtrace" realgud:trepan3k-pat-hash)
+      realgud-python-backtrace-loc-pat)
+
+;;  Regular expression that describes location in a pytest error
+(setf (gethash "pytest-error" realgud:trepan3k-pat-hash)
+      realgud-pytest-error-loc-pat)
+
+;;  Regular expression that describes a "breakpoint set" line
+(setf (gethash "brkpt-set" realgud:trepan3k-pat-hash)
+      realgud:python-trepan-brkpt-set-pat)
+
+;;  Regular expression that describes a "delete breakpoint" line
+(setf (gethash "brkpt-del" realgud:trepan3k-pat-hash)
+      realgud:python-trepan-brkpt-del-pat)
+
+;; Regular expression that describes a debugger "disable" (breakpoint) 
response.
+;; For example:
+;;   Breakpoint 4 disabled.
+(setf (gethash "brkpt-disable" realgud:trepan3k-pat-hash)
+      realgud:python-trepan-brkpt-disable-pat)
+
+;; Regular expression that describes a debugger "enable" (breakpoint) response.
+;; For example:
+;;   Breakpoint 4 enabled.
+(setf (gethash "brkpt-enable" realgud:trepan3k-pat-hash)
+      realgud:python-trepan-brkpt-enable-pat)
+
+;; Regular expression for a termination message.
+(setf (gethash "termination" realgud:trepan3k-pat-hash)
+       "^trepan3k: That's all, folks...\n")
+
+(setf (gethash "font-lock-keywords" realgud:trepan3k-pat-hash)
+      realgud:python-debugger-font-lock-keywords)
+
+(setf (gethash "trepan3k" realgud-pat-hash) realgud:trepan3k-pat-hash)
+
+(defvar realgud:trepan3k-command-hash (make-hash-table :test 'equal)
+  "Hash key is command name like 'shell' and the value is
+  the trepan3k command to use, like 'python'")
+
+(setf (gethash "shell" realgud:trepan3k-command-hash) "python")
+(setf (gethash "until" realgud-command-hash) "continue %l")
+
+;; If your version of trepan3k doesn't support "quit!",
+;; get a more recent version of trepan2
+(setf (gethash "quit" realgud:trepan3k-command-hash) "quit!")
+
+(setf (gethash "trepan3k" realgud-command-hash) realgud:trepan3k-command-hash)
+
+(provide-me "realgud:trepan3k-")
diff --git a/packages/realgud/realgud/debugger/trepan3k/track-mode.el 
b/packages/realgud/realgud/debugger/trepan3k/track-mode.el
new file mode 100644
index 0000000..d7473cd
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan3k/track-mode.el
@@ -0,0 +1,77 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;; Python "trepan3k" Debugger tracking a comint buffer.
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                        "../../common/track"
+                        "../../common/track-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud:trepan3k-")
+(require-relative-list '("../../lang/python") "realgud-lang-")
+
+(declare-function realgud-track-mode 'realgud-track-mode)
+(declare-function realgud-track-mode-hook 'realgud-track-mode)
+(declare-function realgud-track-mode-setup 'realgud-track-mode)
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+(declare-function realgud-python-populate-command-keys 'realgud-lang-python)
+
+(realgud-track-mode-vars "trepan3k")
+
+(declare-function realgud-track-mode(bool))
+
+(realgud-python-populate-command-keys trepan3k-track-mode-map)
+
+(defun trepan3k-track-mode-hook()
+  (if trepan3k-track-mode
+      (progn
+       (use-local-map trepan3k-track-mode-map)
+       (message "using trepan3k mode map")
+       )
+    (message "trepan3k track-mode-hook disable called")
+    )
+)
+
+(define-minor-mode trepan3k-track-mode
+  "Minor mode for tracking trepan3k source locations inside a process shell 
via realgud. trepan3k is a Python debugger. See URL 
`http://code.google.com/p/python3-trepan/'.
+
+If called interactively with no prefix argument, the mode is toggled. A prefix 
argument, captured as ARG, enables the mode if the argument is positive, and 
disables it otherwise.
+
+\\{trepan3k-track-mode-map}
+"
+  :init-value nil
+  ;; :lighter " trepan3k"   ;; mode-line indicator from realgud-track is 
sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:trepan3k
+  :keymap trepan3k-track-mode-map
+  (realgud:track-set-debugger "trepan3k")
+  (if trepan3k-track-mode
+      (progn
+       (realgud-track-mode-setup 't)
+       (trepan3k-track-mode-hook))
+    (progn
+      (setq realgud-track-mode nil)
+      ))
+)
+
+(define-key trepan3k-short-key-mode-map "T" 'realgud:cmd-backtrace)
+
+(provide-me "realgud:trepan3k-")
diff --git a/packages/realgud/realgud/debugger/trepan3k/trepan3k.el 
b/packages/realgud/realgud/debugger/trepan3k/trepan3k.el
new file mode 100644
index 0000000..a91f486
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepan3k/trepan3k.el
@@ -0,0 +1,73 @@
+;; Copyright (C) 2010-2014, 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+(require 'load-relative)
+(require-relative-list '("../../common/helper") "realgud-")
+(require-relative-list '("../../common/run")    "realgud:")
+(require-relative-list '("core" "track-mode") "realgud:trepan3k-")
+
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:trepan3k nil
+  "The realgud interface to the Python debugger, trepan3k"
+  :group 'realgud
+  :group 'python
+  :version "24.3")
+
+(declare-function trepan3k-query-cmdline  'realgud:trepan3k-core)
+(declare-function trepan3k-parse-cmd-args 'realgud:trepan3k-core)
+(declare-function realgud:run-debugger    'realgud:run)
+
+;; -------------------------------------------------------------------
+;; User-definable variables
+;;
+
+(defcustom realgud:trepan3k-command-name
+  ;;"trepan3k --emacs 3"
+  "trepan3k"
+  "File name for executing the Python debugger and command options.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'realgud:trepan3k)
+
+(declare-function trepan3k-track-mode (bool))
+
+;; -------------------------------------------------------------------
+;; The end.
+;;
+
+;;;###autoload
+(defun realgud:trepan3k (&optional opt-cmd-line no-reset)
+  "Invoke the trepan3k Python debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `trepan2-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+"
+  (interactive)
+  (realgud:run-debugger "trepan3k"
+                       'trepan3k-query-cmdline
+                       'trepan3k-parse-cmd-args
+                       'realgud:trepan3k-minibuffer-history
+                       opt-cmd-line no-reset)
+  )
+
+
+(defalias 'trepan3k 'realgud:trepan3k)
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/debugger/trepanjs/Makefile.am 
b/packages/realgud/realgud/debugger/trepanjs/Makefile.am
new file mode 100644
index 0000000..9a343a5
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepanjs/Makefile.am
@@ -0,0 +1 @@
+include $(srcdir)/../common.mk
diff --git a/packages/realgud/realgud/debugger/trepanjs/backtrack-mode.el 
b/packages/realgud/realgud/debugger/trepanjs/backtrack-mode.el
new file mode 100644
index 0000000..0732dc5
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepanjs/backtrack-mode.el
@@ -0,0 +1,80 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;;; Mode for parsing various kinds of backtraces found in JavaScript
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                        "../../common/track-mode"
+                        "../../common/backtrack-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud:trepanjs-")
+(require-relative-list '("../../lang/ruby") "realgud-lang-")
+
+(realgud-backtrack-mode-vars "trepanjs")
+(set-keymap-parent trepanjs-backtrack-mode-map realgud-backtrack-mode-map)
+
+(declare-function realgud-backtrack-mode         
'realgud-common-backtrack-mode)
+(declare-function realgud-backtrack-set-debugger 
'realgud-common-backtrack-mode)
+(declare-function realgud-goto-line-for-pt       
'realgud-common-backtrack-mode)
+(declare-function realgud:ruby-populate-command-keys 'realgud-lang-ruby)
+
+(defun realgud:trepanjs-goto-control-frame-line (pt)
+  "Display the location mentioned by a control-frame line
+described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "control-frame"))
+
+(realgud:ruby-populate-command-keys trepanjs-backtrack-mode-map)
+(define-key trepanjs-backtrack-mode-map
+  (kbd "C-c !c") 'realgud:trepanjs-goto-control-frame-line)
+
+(define-minor-mode trepanjs-backtrack-mode
+  "Minor mode for tracking ruby debugging inside a file which may not have 
process shell.
+
+\\{trepanjs-backtrack-mode-map}
+"
+  :init-value nil
+  ;; :lighter " trepanjs"   ;; mode-line indicator from realgud-track is 
sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:trepanjs
+  :keymap trepanjs-backtrack-mode-map
+
+  (realgud-backtrack-set-debugger "trepanjs")
+  (if trepanjs-backtrack-mode
+      (progn
+       (realgud-backtrack-mode 't)
+       (run-mode-hooks (intern (trepanjs-backtrack-mode-hook))))
+    (progn
+      (realgud-backtrack-mode nil)
+      ))
+)
+
+(defun trepanjs-backtrack-mode-hook()
+  (if trepanjs-backtrack-mode
+      (progn
+       (use-local-map trepanjs-backtrack-mode-map)
+       (message "using trepanjs mode map")
+       )
+    (message "trepanjs backtrack-mode-hook disable called"))
+)
+
+(provide-me "realgud:trepanjs-")
diff --git a/packages/realgud/realgud/debugger/trepanjs/core.el 
b/packages/realgud/realgud/debugger/trepanjs/core.el
new file mode 100644
index 0000000..b3256c1
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepanjs/core.el
@@ -0,0 +1,167 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+(require 'load-relative)
+(require-relative-list '("../../common/track"
+                         "../../common/core"
+                         "../../common/lang")
+                       "realgud-")
+(require-relative-list '("init") "realgud:trepanjs-")
+
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
+(declare-function realgud-parse-command-arg  'realgud-core)
+(declare-function realgud-query-cmdline      'realgud-core)
+(declare-function realgud-suggest-invocation 'realgud-core)
+
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:trepanjs-minibuffer-history nil
+  "minibuffer history list for the command `realgud:trepanjs'.")
+
+(easy-mmode-defmap realgud:trepanjs-minibuffer-local-map
+  '(("\C-i" . comint-dynamic-complete-filename))
+  "Keymap for minibuffer prompting of trepanjs startup command."
+  :inherit minibuffer-local-map)
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun realgud:trepanjs-query-cmdline (&optional opt-debugger)
+  (realgud-query-cmdline
+   'realgud:trepanjs-suggest-invocation
+   realgud:trepanjs-minibuffer-local-map
+   'realgud:trepanjs-minibuffer-history
+   opt-debugger))
+
+(defun realgud:trepanjs-parse-cmd-args (orig-args)
+  "Parse command line ARGS for the name of script to debug.
+
+ORIG-ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing
+* the name of the debugger given (e.g. trepanjs) and its arguments - a list of 
strings
+* the script name and its arguments - list of strings
+
+For example for the following input:
+  (map 'list 'symbol-name
+   '(trepanjs  --no-highlight --port 5858 /tmp trepanjs ./gcd.js a b))
+
+we might return:
+   ((\"trepanjs\" \"--no-highlight\" \"--port\" \"5858\") nil (\"/tmp/gcd.js\" 
\"a\" \"b\"))
+
+Note that path elements have been expanded via `expand-file-name'.
+"
+
+  ;; Parse the following kind of pattern:
+  ;;  node trepanjs-options script-name script-options
+  (let (
+       (args orig-args)
+       (pair)          ;; temp return from
+       (node-two-args '("-max-stack-size"))
+       ;; node doesn't have any optional two-arg options
+       (node-opt-two-args '())
+
+       ;; One dash is added automatically to the below, so
+       ;; p is really -p and -port is really --port.
+       (trepanjs-two-args '("-port" "-host" "-pid" "p"))
+       (trepanjs-opt-two-args '())
+
+       ;; Things returned
+       (script-name nil)
+       (debugger-name nil)
+       (interpreter-args '())
+       (script-args '())
+       )
+    (if (not (and args))
+       ;; Got nothing: return '(nil, nil, nil)
+       (list interpreter-args nil script-args)
+      ;; else
+      (progn
+       ;; Remove "trepanjs" (or "nodemon" or "node") from invocation like:
+       ;; trepanjs --trepanjs-options script --script-options
+       (setq debugger-name (file-name-sans-extension
+                            (file-name-nondirectory (car args))))
+       (unless (string-match "^node\\(?:js\\|mon\\)?$" debugger-name)
+         (message
+          "Expecting debugger name `%s' to be `node', `nodemon', or `trepanjs'"
+          debugger-name))
+       (setq interpreter-args (list (pop args)))
+
+       ;; Skip to the first non-option argument.
+       (while (and args (not script-name))
+         (let ((arg (car args)))
+           (cond
+            ((equal "debug" arg)
+             (nconc interpreter-args (list arg))
+             (setq args (cdr args))
+             )
+
+            ;; Options with arguments.
+            ((string-match "^-" arg)
+             (setq pair (realgud-parse-command-arg
+                         args trepanjs-two-args trepanjs-opt-two-args))
+             (nconc interpreter-args (car pair))
+             (setq args (cadr pair)))
+            ;; Anything else must be the script to debug.
+            (t (setq script-name (realgud:expand-file-name-if-exists arg))
+              (setq script-args (cons script-name (cdr args))))
+            )))
+       (list interpreter-args nil script-args)))
+    ))
+
+;; To silence Warning: reference to free variable
+(defvar realgud:trepanjs-command-name)
+
+(defun realgud:trepanjs-suggest-invocation (debugger-name)
+  "Suggest a trepanjs command invocation via `realgud-suggest-invocaton'"
+  (realgud-suggest-invocation realgud:trepanjs-command-name
+                             realgud:trepanjs-minibuffer-history
+                             "js" "\\.js$"))
+
+(defun realgud:trepanjs-remove-ansi-shmutz()
+  "Remove ASCII escape sequences that node.js 'decorates' in
+prompts and interactive output with"
+  (add-to-list
+   'comint-preoutput-filter-functions
+   (lambda (output)
+     (replace-regexp-in-string "\033\\[[0-9]+[GKJ]" "" output)))
+  )
+
+(defun realgud:trepanjs-reset ()
+  "Trepanjs cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+  (interactive)
+  ;; (trepanjs-breakpoint-remove-all-icons)
+  (dolist (buffer (buffer-list))
+    (when (string-match "\\*trepanjs-[a-z]+\\*" (buffer-name buffer))
+      (let ((w (get-buffer-window buffer)))
+        (when w
+          (delete-window w)))
+      (kill-buffer buffer))))
+
+;; (defun trepanjs-reset-keymaps()
+;;   "This unbinds the special debugger keys of the source buffers."
+;;   (interactive)
+;;   (setcdr (assq 'trepanjs-debugger-support-minor-mode minor-mode-map-alist)
+;;       trepanjs-debugger-support-minor-mode-map-when-deactive))
+
+
+(defun realgud:trepanjs-customize ()
+  "Use `customize' to edit the settings of the `trepanjs' debugger."
+  (interactive)
+  (customize-group 'realgud:trepanjs))
+
+(provide-me "realgud:trepanjs-")
diff --git a/packages/realgud/realgud/debugger/trepanjs/init.el 
b/packages/realgud/realgud/debugger/trepanjs/init.el
new file mode 100644
index 0000000..8470fe2
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepanjs/init.el
@@ -0,0 +1,162 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;;; Regular expressions for nodejs Javascript debugger.
+
+(eval-when-compile (require 'cl-lib))   ;For setf.
+
+(require 'load-relative)
+(require-relative-list '("../../common/regexp"
+                        "../../common/loc"
+                        "../../common/init")
+                      "realgud-")
+(require-relative-list '("../../lang/js") "realgud-lang-")
+
+(defvar realgud:trepanjs-pat-hash (make-hash-table :test 'equal)
+  "Hash key is the what kind of pattern we want to match:
+backtrace, prompt, etc.  The values of a hash entry is a
+realgud-loc-pat struct")
+
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defconst realgud:trepanjs-file-regexp   "\\([^ \t\n]+\\)\\(?: \\[.*\\]\\)?")
+
+;; Regular expression that describes a trepanjs location generally shown
+;; before a command prompt.
+;; For example:
+;;   break in /home/indutny/Code/git/indutny/myscript.js:1
+;;   exception in /usr/lib/nodejs/module.js [module.js]:362
+(setf (gethash "loc" realgud:trepanjs-pat-hash)
+      (make-realgud-loc-pat
+       :regexp (format
+               "\\(?:%s\\)*\\(?:break\\|exception\\|call\\) in %s at line 
%s:%s"
+               realgud:js-term-escape realgud:trepanjs-file-regexp
+               realgud:regexp-captured-num
+               realgud:regexp-captured-num)
+       :file-group 1
+       :line-group 2
+       :char-offset-group 3
+       ))
+
+;; Regular expression that describes a trepanjs command prompt
+;; For example:
+;;   (trepanjs):
+(setf (gethash "prompt" realgud:trepanjs-pat-hash)
+      (make-realgud-loc-pat
+       :regexp (format "^\\(?:%s\\)*(+trepanjs)+ " realgud:js-term-escape)
+       ))
+
+;;  Regular expression that describes a "breakpoint set" line
+;; For example:
+;;  Breakpoint 2 set in file /tmp/gcd.js, line 2.
+;;  Breakpoint 3 set in file /usr/lib/nodejs/module.js [module.js], line 380.
+(setf (gethash "brkpt-set" realgud:trepanjs-pat-hash)
+      (make-realgud-loc-pat
+       :regexp (format "^Breakpoint %s set in file %s, line %s.\n"
+                      realgud:regexp-captured-num
+                      realgud:trepanjs-file-regexp
+                      realgud:regexp-captured-num)
+       :num 1
+       :file-group 2
+       :line-group 3))
+
+;; Regular expression that describes a debugger "delete" (breakpoint) response.
+;; For example:
+;;   Deleted breakpoint 1
+(setf (gethash "brkpt-del" realgud:trepanjs-pat-hash)
+      (make-realgud-loc-pat
+       :regexp "^Deleted breakpoint \\(\\([0-9]+ *\\)+\\)\n"
+       :num 1))
+
+;; Regular expression that describes a V8 backtrace line.
+;; For example:
+;;    at repl:1:7
+;;    at Interface.controlEval 
(/src/external-vcs/github/trepanjs/lib/interface.js:352:18)
+;;    at REPLServer.b [as eval] (domain.js:183:18)
+(setf (gethash "lang-backtrace" realgud:trepanjs-pat-hash)
+  realgud:js-backtrace-loc-pat)
+
+;; Regular expression that describes a debugger "delete" (breakpoint)
+;; response.
+;; For example:
+;;   Deleted breakpoint 1.
+(setf (gethash "brkpt-del" realgud:trepanjs-pat-hash)
+      (make-realgud-loc-pat
+       :regexp (format "^Deleted breakpoint %s.\n"
+                      realgud:regexp-captured-num)
+       :num 1))
+
+
+(defconst realgud:trepanjs-frame-start-regexp  "\\(?:^\\|\n\\)\\(?: #\\)")
+(defconst realgud:trepanjs-frame-num-regexp    realgud:regexp-captured-num)
+(defconst realgud:trepanjs-frame-module-regexp "[^ \t\n]+")
+
+;;  Regular expression that describes debugger "backtrace" command line.
+;;  e.g.
+;; ## require called from file /usr/lib/nodejs/module.js [module.js] at line 
380:17
+;; ## in file /src/external-vcs/github/trepanjs/example/gcd.js 
[/src/external-vcs/github/trepanjs/example/gcd.js] at line 2:12
+(setf (gethash "debugger-backtrace" realgud:trepanjs-pat-hash)
+      (make-realgud-loc-pat
+       :regexp         (concat realgud:trepanjs-frame-start-regexp " "
+                       realgud:regexp-captured-num " "
+                       "\\(?:" realgud:trepanjs-frame-module-regexp "[ 
\t\n]+called from file "
+                       realgud:trepanjs-file-regexp
+                       "\\)\\| in file "
+                       realgud:regexp-captured-num
+                       "\\)"
+                       "at line \\(" realgud:regexp-captured-num "\\):"
+                       realgud:regexp-captured-num
+                       )
+       :num 1
+       :file-group 2
+       :line-group 3
+       :char-offset-group 4
+       ))
+
+(defconst realgud:trepanjs-debugger-name "trepanjs" "Name of debugger")
+
+;; Top frame number
+(setf (gethash "top-frame-num" realgud:trepanjs-pat-hash) 0)
+
+;; Regular expression that for a termination message.
+(setf (gethash "termination" realgud:trepanjs-pat-hash)
+       "^trepanjs: That's all, folks...\n")
+
+(setf (gethash realgud:trepanjs-debugger-name realgud-pat-hash) 
realgud:trepanjs-pat-hash)
+
+(defvar realgud:trepanjs-command-hash (make-hash-table :test 'equal)
+  "Hash key is command name like 'quit' and the value is
+  the trepanjs command to use, like 'quit!'")
+
+(setf (gethash realgud:trepanjs-debugger-name
+              realgud-command-hash) realgud:trepanjs-command-hash)
+
+(setf (gethash "break"      realgud:trepanjs-command-hash)
+      "setBreakpoint(%l)")
+(setf (gethash "clear"      realgud:trepanjs-command-hash)
+      "clearBreakpoint('%X', %l)")
+(setf (gethash "delete"      realgud:trepanjs-command-hash)
+      "clearBreakpoint('%X', %l)")
+;; We need aliases for step and next because the default would
+;; do step 1 and trepanjs doesn't handle this. Or when it does,
+;; it will probably look like step(1)
+(setf (gethash "eval"       realgud:trepanjs-command-hash) "eval('%s')")
+(setf (gethash "quit"       realgud:trepanjs-command-hash) "quit()")
+
+;; Unsupported features:
+(setf (gethash "kill"  realgud:trepanjs-command-hash) "*not-implemented*")
+
+(provide-me "realgud:trepanjs-")
diff --git a/packages/realgud/realgud/debugger/trepanjs/track-mode.el 
b/packages/realgud/realgud/debugger/trepanjs/track-mode.el
new file mode 100644
index 0000000..5d8c8cd
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepanjs/track-mode.el
@@ -0,0 +1,87 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;;; "trepanjs" Debugger tracking a comint or eshell buffer.
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                        "../../common/track"
+                        "../../common/track-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud:trepanjs-")
+;; (require-relative-list '("../../lang/js") "realgud-lang-")
+
+(declare-function realgud-track-mode 'realgud-track-mode)
+(declare-function realgud-track-mode-hook 'realgud-track-mode)
+(declare-function realgud-track-mode-setup 'realgud-track-mode)
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+(declare-function realgud-goto-line-for-pt 'realgud-track-mode)
+
+(realgud-track-mode-vars "trepanjs")
+
+(define-key realgud-track-mode-map
+  (kbd "C-c !!") 'realgud:goto-lang-backtrace-line)
+(define-key realgud-track-mode-map
+  (kbd "C-c !b") 'realgud:goto-debugger-backtrace-line)
+
+(declare-function realgud:ruby-populate-command-keys 'realgud-lang-ruby)
+
+(defun realgud:trepanjs-goto-syntax-error-line (pt)
+  "Display the location mentioned in a Syntax error line
+described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "syntax-error"))
+
+(define-key trepanjs-track-mode-map
+  (kbd "C-c !s") 'realgud:trepanjs-goto-syntax-error-line)
+
+(defun trepanjs-track-mode-hook()
+  (if trepanjs-track-mode
+      (progn
+       (use-local-map trepanjs-track-mode-map)
+       (message "using trepanjs mode map")
+       )
+    (message "trepanjs track-mode-hook disable called"))
+)
+
+(define-minor-mode trepanjs-track-mode
+  "Minor mode for tracking trepanjs source locations inside a process shell 
via realgud. trepanjs is a Ruby debugger.
+
+If called interactively with no prefix argument, the mode is toggled. A prefix 
argument, captured as ARG, enables the mode if the argument is positive, and 
disables it otherwise.
+
+\\{trepanjs-track-mode-map}
+"
+  :init-value nil
+  ;; :lighter " trepanjs"   ;; mode-line indicator from realgud-track is 
sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:trepanjs
+  :keymap trepanjs-track-mode-map
+  (realgud:track-set-debugger "trepanjs")
+  (if trepanjs-track-mode
+      (progn
+       (realgud-track-mode-setup 't)
+        (trepanjs-track-mode-hook))
+    (progn
+      (setq realgud-track-mode nil)
+      ))
+)
+
+(provide-me "realgud:trepanjs-")
diff --git a/packages/realgud/realgud/debugger/trepanjs/trepanjs.el 
b/packages/realgud/realgud/debugger/trepanjs/trepanjs.el
new file mode 100644
index 0000000..e0deb51
--- /dev/null
+++ b/packages/realgud/realgud/debugger/trepanjs/trepanjs.el
@@ -0,0 +1,84 @@
+;; Copyright (C) 2015 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+;;; Regular expressions for nodejs Javascript debugger.
+
+;;  `trepanjs' Main interface to trepanjs via Emacs
+(require 'load-relative)
+(require-relative-list '("../../common/helper") "realgud-")
+(require-relative-list '("../../common/run")    "realgud:")
+(require-relative-list '("core" "track-mode") "realgud:trepanjs-")
+(require-relative-list '("../../lang/js") "realgud-lang-")
+
+(declare-function realgud:trepanjs-query-cmdline  'realgud:trepanjs-core)
+(declare-function realgud:trepanjs-parse-cmd-args 'realgud:trepanjs-core)
+(declare-function realgud:js-remove-ansi-schmutz 'realgud-lang-js)
+(declare-function realgud:run-debugger 'realgud:run)
+
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:trepanjs nil
+  "The realgud interface to the Ruby 1.9.2 1.9.3 \"trepanjsning\" debugger"
+  :group 'ruby
+  :group 'realgud
+  :version "24.3")
+
+;; -------------------------------------------------------------------
+;; User-definable variables
+;;
+
+(defcustom realgud:trepanjs-command-name
+  ;;"trepanjs --emacs 3"
+  "trepanjs"
+  "File name for executing the Ruby debugger and command options.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'realgud:trepanjs)
+
+;;;###autoload
+(defun realgud:trepanjs (&optional opt-cmd-line no-reset)
+  "Invoke the trepanjs Ruby debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `trepanjs-parse-cmd-args' and path elements found by that
+are expanded using `expand-file-name'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+"
+  (interactive)
+  (let ((cmd-buf
+        (realgud:run-debugger "trepanjs" 'realgud:trepanjs-query-cmdline
+                              'realgud:trepanjs-parse-cmd-args
+                              'realgud:trepanjs-minibuffer-history
+                              opt-cmd-line no-reset)))
+    (if cmd-buf
+       (with-current-buffer cmd-buf
+         ;; FIXME should allow customization whether to do or not
+         ;; and also only do if hook is not already there.
+         (realgud:js-remove-ansi-schmutz)
+         )
+      )))
+
+(defalias 'trepanjs 'realgud:trepanjs)
+(provide-me "realgud-")
+;;; trepanjs.el ends here
diff --git a/packages/realgud/realgud/debugger/zshdb/Makefile.am 
b/packages/realgud/realgud/debugger/zshdb/Makefile.am
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/packages/realgud/realgud/debugger/zshdb/Makefile.am
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/packages/realgud/realgud/debugger/zshdb/core.el 
b/packages/realgud/realgud/debugger/zshdb/core.el
new file mode 100644
index 0000000..2eefad1
--- /dev/null
+++ b/packages/realgud/realgud/debugger/zshdb/core.el
@@ -0,0 +1,191 @@
+;; Copyright (C) 2010-2011, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+(require 'load-relative)
+(require-relative-list '("../../common/track" "../../common/core")
+                      "realgud-")
+(require-relative-list '("init") "realgud:zshdb-")
+
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
+(declare-function realgud-parse-command-arg  'realgud-core)
+(declare-function realgud-query-cmdline      'realgud-core)
+(declare-function realgud-suggest-invocation 'realgud-core)
+(declare-function realgud-lang-mode?         'realgud-lang)
+
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:zshdb-minibuffer-history nil
+  "minibuffer history list for the command `realgud:zshdb'.")
+
+(easy-mmode-defmap zshdb-minibuffer-local-map
+  '(("\C-i" . comint-dynamic-complete-filename))
+  "Keymap for minibuffer prompting of zshdb startup command."
+  :inherit minibuffer-local-map)
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun zshdb-query-cmdline (&optional opt-debugger)
+  (realgud-query-cmdline
+   'zshdb-suggest-invocation
+   zshdb-minibuffer-local-map
+   'realgud:zshdb-minibuffer-history
+   opt-debugger))
+
+;;; FIXME: DRY this with other *-parse-cmd-args routines
+(defun zshdb-parse-cmd-args (orig-args)
+  "Parse command line ORIG-ARGS for the annotate level and name of script to 
debug.
+
+ORIG-ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing
+* the command processor (e.g. zshdb) and it's arguments if any - a list of 
strings
+* the name of the debugger given (e.g. zshdb) and its arguments - a list of 
strings
+* the script name and its arguments - list of strings
+* whether the annotate or emacs option was given ('-A', '--annotate' or 
'--emacs) - a boolean
+
+For example for the following input
+  (map 'list 'symbol-name
+   '(zsh -b /usr/local/bin/zshdb -A -L . ./gcd.sh a b))
+
+we might return:
+   ((\"zsh\" \"-b\") (\"/usr/local/bin/zshdb\" \"-A\") (\"-L\" \"/tmp\" 
\"/tmp/gcd.sh\" \"a\" \"b\") 't)
+
+Note that path elements have been expanded via 
`realgud:expand-file-name-if-exists'.
+"
+
+  ;; Parse the following kind of pattern:
+  ;;  [zsh zsh-options] zshdb zshdb-options script-name script-options
+  (let (
+       (args orig-args)
+       (pair)          ;; temp return from
+       ;; zsh doesn't have any optional two-arg options
+       (zsh-opt-two-args '())
+       (zsh-two-args '("o" "c"))
+
+       ;; One dash is added automatically to the below, so
+       ;; h is really -h and -host is really --host.
+       (zshdb-two-args '("A" "-annotate" "l" "-library"
+                          "c" "-command" "-t" "-tty"
+                          "x" "-eval-command"))
+       (zshdb-opt-two-args '())
+       (interp-regexp
+        (if (member system-type (list 'windows-nt 'cygwin 'msdos))
+            "^zsh*\\(.exe\\)?$"
+          "^zsh*$"))
+
+       ;; Things returned
+       (script-name nil)
+       (debugger-name nil)
+       (interpreter-args '())
+       (debugger-args '())
+       (script-args '())
+       (annotate-p nil))
+
+    (if (not (and args))
+       ;; Got nothing: return '(nil, nil)
+       (list interpreter-args debugger-args script-args annotate-p)
+      ;; else
+      ;; Strip off optional "zsh" or "zsh.exe" etc.
+      (when (string-match interp-regexp
+                         (file-name-sans-extension
+                          (file-name-nondirectory (car args))))
+       (setq interpreter-args (list (pop args)))
+
+       ;; Strip off zsh-specific options
+       (while (and args
+                   (string-match "^-" (car args)))
+         (setq pair (realgud-parse-command-arg
+                     args zsh-two-args zsh-opt-two-args))
+         (nconc interpreter-args (car pair))
+         (setq args (cadr pair))))
+
+      ;; Remove "zshdb" from "zshdb --zshdb-options script
+      ;; --script-options"
+      (setq debugger-name (file-name-sans-extension
+                          (file-name-nondirectory (car args))))
+      (unless (string-match "^zshdb$" debugger-name)
+       (message
+        "Expecting debugger name `%s' to be `zshdb'"
+        debugger-name))
+      (setq debugger-args (list (pop args)))
+
+      ;; Skip to the first non-option argument.
+      (while (and args (not script-name))
+       (let ((arg (car args)))
+         (cond
+          ;; Annotation or emacs option with level number.
+          ((or (member arg '("--annotate" "-A"))
+               (equal arg "--emacs"))
+           (setq annotate-p t)
+           (nconc debugger-args (list (pop args))))
+          ;; Combined annotation and level option.
+          ((string-match "^--annotate=[0-9]" arg)
+           (nconc debugger-args (list (pop args)) )
+           (setq annotate-p t))
+          ;; Library option
+          ((member arg '("--library" "-l"))
+           (setq arg (pop args))
+           (nconc debugger-args
+                  (list arg (realgud:expand-file-name-if-exists
+                             (pop args)))))
+          ;; Other options with arguments.
+          ((string-match "^-" arg)
+           (setq pair (realgud-parse-command-arg
+                       args zshdb-two-args zshdb-opt-two-args))
+           (nconc debugger-args (car pair))
+           (setq args (cadr pair)))
+          ;; Anything else must be the script to debug.
+          (t (setq script-name (realgud:expand-file-name-if-exists arg))
+             (setq script-args (cons script-name (cdr args))))
+          )))
+      (list interpreter-args debugger-args script-args annotate-p))))
+
+;; To silence Warning: reference to free variable
+(defvar realgud:zshdb-command-name)
+
+(defun zshdb-suggest-invocation (debugger-name)
+  "Suggest a zshdb command invocation via `realgud-suggest-invocaton'"
+  (realgud-suggest-invocation realgud:zshdb-command-name
+                             realgud:zshdb-minibuffer-history
+                             "sh" "\\.\\(?:z\\)?sh$"))
+
+(defun realgud:zshdb-remove-ansi-schmutz()
+  "Remove ASCII escape sequences that node.js 'decorates' in
+prompts and interactive output with"
+  (add-to-list
+   'comint-preoutput-filter-functions
+   (lambda (output)
+     (replace-regexp-in-string "\033\\[\\?[0-9]+[GKJhl]" "" output)))
+  )
+
+(defun zshdb-reset ()
+  "Zshdb cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+  (interactive)
+  ;; (zshdb-breakpoint-remove-all-icons)
+  (dolist (buffer (buffer-list))
+    (when (string-match "\\*zshdb-[a-z]+\\*" (buffer-name buffer))
+      (let ((w (get-buffer-window buffer)))
+        (when w
+          (delete-window w)))
+      (kill-buffer buffer))))
+
+;; (defun zshdb-reset-keymaps()
+;;   "This unbinds the special debugger keys of the source buffers."
+;;   (interactive)
+;;   (setcdr (assq 'zshdb-debugger-support-minor-mode minor-mode-map-alist)
+;;       zshdb-debugger-support-minor-mode-map-when-deactive))
+
+
+(defun realgud:zshdb-customize ()
+  "Use `customize' to edit the settings of the `zshdb' debugger."
+  (interactive)
+  (customize-group 'realgud:zshdb))
+
+(provide-me "realgud:zshdb-")
diff --git a/packages/realgud/realgud/debugger/zshdb/init.el 
b/packages/realgud/realgud/debugger/zshdb/init.el
new file mode 100644
index 0000000..8a2c0a9
--- /dev/null
+++ b/packages/realgud/realgud/debugger/zshdb/init.el
@@ -0,0 +1,105 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+(eval-when-compile (require 'cl-lib))   ;For setf.
+
+(require 'load-relative)
+(require-relative-list '("../../common/regexp"
+                        "../../common/loc"
+                        "../../common/init")
+                      "realgud-")
+(require-relative-list '("../../lang/posix-shell") "realgud-lang-")
+
+(defvar realgud:zshdb-pat-hash)
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defvar realgud:zshdb-pat-hash (make-hash-table :test 'equal)
+  "Hash key is the what kind of pattern we want to match:
+backtrace, prompt, etc.  The values of a hash entry is a
+realgud-loc-pat struct")
+
+;; Regular expression that describes a zshdb location generally shown
+;; before a command prompt.
+;; For example:
+;;   (/etc/init.d/apparmor:35):
+(setf (gethash "loc" realgud:zshdb-pat-hash) realgud:POSIX-debugger-loc-pat)
+
+;; Regular expression that describes a zshdb command prompt
+;; For example:
+;;   zshdb<10>
+;;   zshdb<(5)>
+;;   zshdb<<1>>
+(setf (gethash "prompt" realgud:zshdb-pat-hash)
+      (make-realgud-loc-pat
+       :regexp   (format "^zshdb[<]+[(]*%s[)]*[>]+ "
+                        realgud:regexp-captured-num)
+       :num 1
+       ))
+
+;;  Regular expression that describes a "breakpoint set" line.
+(setf (gethash "brkpt-set" realgud:zshdb-pat-hash)
+      realgud:POSIX-debugger-brkpt-set-pat)
+
+;; Regular expression that describes a debugger "delete" (breakpoint) response.
+;; For example:
+;;   Deleted breakpoint 1.
+(setf (gethash "brkpt-del" realgud:zshdb-pat-hash)
+      realgud:POSIX-debugger-brkpt-del-pat)
+
+;; Regular expression that describes a debugger "disable" (breakpoint) 
response.
+;; For example:
+;;   Breakpoint entry 4 disabled.
+(setf (gethash "brkpt-disable" realgud:zshdb-pat-hash)
+      realgud:POSIX-debugger-brkpt-disable-pat)
+
+;; Regular expression that describes a debugger "enable" (breakpoint) response.
+;; For example:
+;;   Breakpoint entry 4 enabled.
+(setf (gethash "brkpt-enable" realgud:zshdb-pat-hash)
+      realgud:POSIX-debugger-brkpt-enable-pat)
+
+;; Regular expression that describes a debugger "backtrace" command line.
+;; For example:
+;;   ->0 in file `/etc/apparmor/fns' at line 24
+;;   ##1 /etc/apparmor/fns called from file `/etc/init.d/apparmor' at line 35
+;;   ##2 /etc/init.d/apparmor called from file `/usr/bin/zshdb' at line 129
+(setf (gethash "debugger-backtrace" realgud:zshdb-pat-hash)
+      realgud:POSIX-debugger-backtrace-pat)
+
+;; Regular expression that for a termination message.
+(setf (gethash "termination" realgud:zshdb-pat-hash)
+       "^zshdb: That's all, folks...\n")
+
+(setf (gethash "font-lock-keywords" realgud:zshdb-pat-hash)
+      realgud:POSIX-debugger-font-lock-keywords)
+
+(setf (gethash "zshdb" realgud-pat-hash) realgud:zshdb-pat-hash)
+
+(defvar realgud:zshdb-command-hash (make-hash-table :test 'equal)
+  "Hash key is command name like 'quit' and the value is
+  the zshdb command to use, like 'quit!'")
+
+(setf (gethash "zshdb"  realgud-command-hash) realgud:zshdb-command-hash)
+
+(setf (gethash "clear"  realgud:zshdb-command-hash) "clear %l")
+(setf (gethash "quit"   realgud:zshdb-command-hash) "quit")
+(setf (gethash "until"  realgud:zshdb-command-hash) "continue %l")
+
+;; Unsupported features:
+(setf (gethash "jump"  realgud:zshdb-command-hash) "*not-implemented*")
+
+(provide-me "realgud:zshdb-")
diff --git a/packages/realgud/realgud/debugger/zshdb/track-mode.el 
b/packages/realgud/realgud/debugger/zshdb/track-mode.el
new file mode 100644
index 0000000..ecf0b12
--- /dev/null
+++ b/packages/realgud/realgud/debugger/zshdb/track-mode.el
@@ -0,0 +1,69 @@
+;; Copyright (C) 2012, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;; "zshdb" Debugger tracking a comint buffer.
+
+(require 'load-relative)
+(require-relative-list '(
+                        "../../common/cmds"
+                        "../../common/menu"
+                        "../../common/track"
+                        "../../common/track-mode"
+                        )
+                      "realgud-")
+(require-relative-list '("core" "init") "realgud:zshdb-")
+(require-relative "../../lang/posix-shell" nil "realgud-lang-")
+
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+(declare-function realgud-track-mode-setup   'realgud-track-mode)
+(declare-function realgud-posix-shell-populate-command-keys
+                 'realgud-lang-posix-shell)
+
+(realgud-track-mode-vars "zshdb")
+(realgud-posix-shell-populate-command-keys zshdb-track-mode-map)
+
+(declare-function realgud-track-mode(bool))
+
+
+(defun zshdb-track-mode-hook()
+  (if zshdb-track-mode
+      (progn
+       (use-local-map zshdb-track-mode-map)
+       (message "using zshdb mode map")
+       )
+    (message "zshdb track-mode-hook disable called"))
+)
+
+(define-minor-mode zshdb-track-mode
+  "Minor mode for tracking zshdb source locations inside a process shell via 
realgud. zshdb is a zsh debugger.
+
+If called interactively with no prefix argument, the mode is toggled. A prefix 
argument, captured as ARG, enables the mode if the argument is positive, and 
disables it otherwise.
+
+\\{zshdb-track-mode-map}
+"
+  :init-value nil
+  ;; :lighter " zshdb"   ;; mode-line indicator from realgud-track is 
sufficient.
+  ;; The minor mode bindings.
+  :global nil
+  :group 'realgud:zshdb
+  :keymap zshdb-track-mode-map
+
+  (realgud:track-set-debugger "zshdb")
+  (if zshdb-track-mode
+      (progn
+       (realgud-track-mode-setup 't)
+        (zshdb-track-mode-hook))
+    (progn
+      (setq realgud-track-mode nil)
+      ))
+)
+
+(define-key zshdb-short-key-mode-map "T" 'realgud:cmd-backtrace)
+
+(provide-me "realgud:zshdb-")
diff --git a/packages/realgud/realgud/debugger/zshdb/zshdb.el 
b/packages/realgud/realgud/debugger/zshdb/zshdb.el
new file mode 100644
index 0000000..0812997
--- /dev/null
+++ b/packages/realgud/realgud/debugger/zshdb/zshdb.el
@@ -0,0 +1,88 @@
+;; Copyright (C) 2011, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;  `zshdb' Main interface to zshdb via Emacs
+(require 'load-relative)
+(require-relative-list '("../../common/helper") "realgud-")
+(require-relative-list '("../../common/track")  "realgud-")
+(require-relative-list '("../../common/run")    "realgud:")
+(require-relative-list '("core" "track-mode")   "realgud:zshdb-")
+
+(declare-function realgud:zshdb-remove-ansi-schmutz 'realgud:zshdb-core)
+(declare-function zshdb-track-mode (bool))
+(declare-function zshdb-query-cmdline  'realgud:zshdb-core)
+(declare-function zshdb-parse-cmd-args 'realgud:zshdb-core)
+
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:zshdb nil
+  "The realgud interface to the Zsh debugger, zshdb"
+  :group 'realgud
+  :version "24.3")
+
+;; -------------------------------------------------------------------
+;; User definable variables
+;;
+
+(defcustom realgud:zshdb-command-name
+  ;;"zshdb --emacs 3"
+  "zshdb"
+  "File name for executing the zshdb and its command options.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'realgud:zshdb)
+
+(declare-function zshdb-track-mode (bool))
+
+;; -------------------------------------------------------------------
+;; The end.
+;;
+
+(declare-function zshdb-track-mode     'realgud-zshdb-track-mode)
+(declare-function zshdb-query-cmdline  'realgud:zshdb-core)
+(declare-function zshdb-parse-cmd-args 'realgud:zshdb-core)
+(declare-function realgud:run-debugger 'realgud:run)
+
+; ### FIXME: DRY with other top-level routines
+;;;###autoload
+(defun realgud:zshdb (&optional opt-cmd-line no-reset)
+  "Invoke the zshdb Z-shell debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run zshdb.
+
+OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `zshdb-parse-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+"
+  (interactive)
+  (let ((cmd-buf
+        (realgud:run-debugger realgud:zshdb-command-name 'zshdb-query-cmdline
+                              'zshdb-parse-cmd-args
+                              'realgud:zshdb-minibuffer-history
+                              opt-cmd-line no-reset)))
+    (if cmd-buf
+       (with-current-buffer cmd-buf
+         ;; FIXME should allow customization whether to do or not
+         ;; and also only do if hook is not already there.
+         (realgud:zshdb-remove-ansi-schmutz)
+         )
+      )))
+
+(defalias 'zshdb 'realgud:zshdb)
+
+(provide-me "realgud-")
diff --git a/packages/realgud/realgud/lang/Makefile.am 
b/packages/realgud/realgud/lang/Makefile.am
new file mode 100644
index 0000000..a6f5e4c
--- /dev/null
+++ b/packages/realgud/realgud/lang/Makefile.am
@@ -0,0 +1,5 @@
+lispdir = @lispdir_realgud@/$(notdir $(subdir))
+lisp_files := $(wildcard *.el)
+lisp_LISP = $(lisp_files)
+EXTRA_DIST = $(lisp_files)
+MOSTLYCLEANFILES = *.elc
diff --git a/packages/realgud/realgud/lang/js.el 
b/packages/realgud/realgud/lang/js.el
new file mode 100644
index 0000000..ede33ef
--- /dev/null
+++ b/packages/realgud/realgud/lang/js.el
@@ -0,0 +1,52 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+(require 'load-relative)
+(require-relative-list '("../common/regexp" "../common/loc" "../common/track")
+                      "realgud-")
+
+(defconst realgud:js-term-escape "[[0-9]+[GKJ]"
+  "Escape sequence regular expression pattern trepanjs often puts
+  in around prompts")
+
+(declare-function realgud-goto-line-for-pt 'realgud-track)
+
+;;  Regular expression that describes a Perl Carp backtrace line.
+;;  at /tmp/foo.pl line 7
+;;     main::__ANON__('Illegal division by zero at /tmp/foo.pl line 4.\x{a}') 
called at /tmp/foo.pl line 4
+;;     main::foo(3) called at /tmp/foo.pl line 8
+(defconst realgud:js-backtrace-loc-pat
+  (make-realgud-loc-pat
+   :regexp (format "^\\(?:[\t ]+at \\)?\\([^:]+\\) (\\(.*\\):%s:%s)"
+                  realgud:regexp-captured-num realgud:regexp-captured-num)
+   :file-group 2
+   :line-group 3
+   :char-offset-group 4)
+  "A realgud-loc-pat struct that describes a V8 backtrace location")
+
+(defun realgud:js-remove-ansi-schmutz()
+  "Remove ASCII escape sequences that node.js 'decorates' in
+prompts and interactive output with"
+  (interactive "")
+  (add-to-list
+   'comint-preoutput-filter-functions
+   (lambda (output)
+     (replace-regexp-in-string "\033\\[[0-9]+[GKJ]" "" output)))
+  )
+
+
+(provide-me "realgud-lang-")
diff --git a/packages/realgud/realgud/lang/perl.el 
b/packages/realgud/realgud/lang/perl.el
new file mode 100644
index 0000000..cad3374
--- /dev/null
+++ b/packages/realgud/realgud/lang/perl.el
@@ -0,0 +1,60 @@
+;; Copyright (C) 2011, 2014, 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;;; Common Perl constants and regular expressions.
+(require 'load-relative)
+(require-relative-list '("../common/regexp" "../common/loc" "../common/track")
+                      "realgud-")
+
+(declare-function realgud-goto-line-for-pt 'realgud-track)
+
+;;  Regular expression that describes a Perl Carp backtrace line.
+;;  at /tmp/foo.pl line 7
+;;     main::__ANON__('Illegal division by zero at /tmp/foo.pl line 4.\x{a}') 
called at /tmp/foo.pl line 4
+;;     main::foo(3) called at /tmp/foo.pl line 8
+(defconst realgud-perl-carp-loc-pat
+      (make-realgud-loc-pat
+       :regexp   (concat
+                 "\\(?:^\\|
+\\)"
+                 "\\(?:[ \t]+\\(?:\\|.* called \\)at \\(.*\\) line 
\\([0-9]+\\)\\)")
+       :file-group 1
+       :line-group 2)
+  "A realgud-loc-pat struct that describes a line used in a Carp message"  )
+
+(defconst realgud-perl-errmsg-loc-pat
+      (make-realgud-loc-pat
+       :regexp   (concat
+                 " at \\(.+\\) line \\([0-9]+\\).$")
+       :file-group 1
+       :line-group 2)
+  "A realgud-loc-pat struct that describes a line used in an error message"  )
+
+;;  Regular expression that pseudo-files in caller. For example:
+;;    (eval 1006)[../example/eval.pl:5]
+(defconst realgud-perl-ignore-file-re "(eval [0-9]+)\\(\\[.+\\]\\)?"
+  "Regular expression that pseudo-files of caller()")
+
+;; FIXME: there is probably a less redundant way to do the following
+;; FNS.
+(defun realgud:perl-goto-errmsg-line (pt)
+  "Display the location mentioned by the Perl error message described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "perl-errmsg"))
+
+(defun realgud-perl-populate-command-keys (&optional map)
+  "Bind the debugger function key layout used by many debuggers.
+
+\\{realgud-example-map-standard}"
+  (define-key map (kbd "C-c !b") 'realgud:goto-debugger-backtrace-line)
+  (define-key map (kbd "C-c !!") 'realgud:goto-lang-backtrace-line)
+  (define-key map (kbd "C-c !e") 'realgud:perl-goto-errmsg-line)
+  )
+
+(provide-me "realgud-lang-")
diff --git a/packages/realgud/realgud/lang/posix-shell.el 
b/packages/realgud/realgud/lang/posix-shell.el
new file mode 100644
index 0000000..1ef2313
--- /dev/null
+++ b/packages/realgud/realgud/lang/posix-shell.el
@@ -0,0 +1,150 @@
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;;
+;; Common POSIX-Shell like constants and regular expressions.
+;; Actually a lot of this is not about POSIX shell as it is about the
+;; common-ness of bashdb, zshdb, and kshdb. But since those are the
+;; *only* debuggers I know of for POSIX shells, it's not too much of
+;; a stretch to think of this as for all "shell".
+
+(require 'load-relative)
+(require-relative-list '("../common/regexp" "../common/loc"
+                        "../common/track" "../common/send")
+                      "realgud-")
+
+(defconst realgud-shell-backtrace-loc-pat
+  (make-realgud-loc-pat
+   :regexp "^[ \t]+from \\([^:]+\\):\\([0-9]+\\)\\(?: in `.*'\\)?"
+   :file-group 1
+   :line-group 2)
+  "A realgud-loc-pat struct that describes a Shell backtrace (or
+traceback) line."  )
+
+(defconst realgud-shell-frame-start-regexp
+  "\\(?:^\\|\n\\)\\(->\\|##\\)")
+
+(defconst realgud-shell-frame-num-regexp
+  realgud:regexp-captured-num)
+
+(defconst realgud-shell-frame-file-regexp
+  "[ \t\n]+\\(?:in\\|from\\) file `\\(.+\\)'")
+
+(defconst realgud-shell-frame-line-regexp
+  (format "[ \t\n]+at line %s\\(?:\n\\|$\\)" realgud:regexp-captured-num))
+
+(defun realgud-posix-shell-populate-command-keys (&optional map)
+  "Bind the debugger function key layout used by many debuggers.
+
+\\{realgud-example-map-standard}"
+  (define-key map (kbd "C-c !b") 'realgud:goto-debugger-backtrace-line)
+  (define-key map (kbd "C-c !!") 'realgud:goto-lang-backtrace-line)
+  )
+
+;; Regular expression that describes a bashdb/zshdb location generally shown
+;; before a command prompt.
+;; For example:
+;;   (/etc/init.d/apparmor:35):
+(defconst realgud:POSIX-debugger-loc-pat
+      (make-realgud-loc-pat
+       :regexp "\\(?:^\\|\n\\)(\\([^:]+\\):\\([0-9]*\\)):\\(?:\n\\(.+\\)\\)?"
+       :file-group 1
+       :line-group 2
+       :text-group 3)
+      "A realgud-loc-pat struct that describes a POSIX shell debugger
+      location line.")
+
+;; Regular expression that describes a debugger "backtrace" command line.
+;; For example:
+;;   ->0 in file `/etc/apparmor/fns' at line 24
+;;   ##1 /etc/apparmor/fns called from file `/etc/init.d/apparmor' at line 35
+;;   ##2 /etc/init.d/apparmor called from file `/usr/bin/zshdb' at line 129
+(defconst realgud:POSIX-debugger-backtrace-pat
+  (make-realgud-loc-pat
+   :regexp     (concat realgud-shell-frame-start-regexp
+                       realgud-shell-frame-num-regexp "[ ]?"
+                       "\\(.*\\)"
+                       realgud-shell-frame-file-regexp
+                       "\\(?:" realgud-shell-frame-line-regexp "\\)?"
+                       )
+   :num 2
+   :file-group 4
+   :line-group 5)
+  "A realgud-loc-pat struct that describes a Python trepan
+      backtrace location line." )
+
+;;  Regular expression that describes a "breakpoint set" line
+(defconst realgud:POSIX-debugger-brkpt-set-pat
+  (make-realgud-loc-pat
+   :regexp (format "^Breakpoint \\([0-9]+\\) set in file \\(.+\\), line %s.\n"
+                  realgud:regexp-captured-num)
+   :num 1
+   :file-group 2
+   :line-group 3))
+
+;; Regular expression that describes a debugger "delete" (breakpoint) response.
+;; For example:
+;;   Removed 1 breakpoint(s).
+(defconst realgud:POSIX-debugger-brkpt-del-pat
+  (make-realgud-loc-pat
+   :regexp (format "^Deleted breakpoint %s\n"
+                  realgud:regexp-captured-num)
+   :num 1))
+
+;; Regular expression that describes a debugger "disable" (breakpoint) 
response.
+;; For example:
+;;   Breakpoint entry 4 disabled.
+(defconst realgud:POSIX-debugger-brkpt-disable-pat
+  (make-realgud-loc-pat
+   :regexp (format "^Breakpoint entry %s disabled."
+                  realgud:regexp-captured-num)
+   :num 1))
+
+;; Regular expression that describes a debugger "enable" (breakpoint) response.
+;; For example:
+;;   Breakpoint entry 4 enabled.
+(defconst realgud:POSIX-debugger-brkpt-enable-pat
+  (make-realgud-loc-pat
+   :regexp (format "^Breakpoint entry %s enabled."
+                  realgud:regexp-captured-num)
+   :num 1))
+
+(defconst realgud:POSIX-debugger-font-lock-keywords
+  '(
+    ;; The frame number and first type name, if present.
+    ;; E.g. ->0 in file `/etc/init.d/apparmor' at line 35
+    ;;      --^-
+    ("^\\(->\\|##\\)\\([0-9]+\\) "
+     (2 realgud-backtrace-number-face))
+
+    ;; File name.
+    ;; E.g. ->0 in file `/etc/init.d/apparmor' at line 35
+    ;;          ---------^^^^^^^^^^^^^^^^^^^^-
+    ("[ \t]+\\(in\\|from\\) file `\\(.+\\)'"
+     (2 realgud-file-name-face))
+
+    ;; File name.
+    ;; E.g. ->0 in file `/etc/init.d/apparmor' at line 35
+    ;;                                         --------^^
+    ;; Line number.
+    ("[ \t]+at line \\([0-9]+\\)$"
+     (1 realgud-line-number-face))
+    ;; (trepan-frames-match-current-line
+    ;;  (0 trepan-frames-current-frame-face append))
+    ))
+
+(provide-me "realgud-lang-")
diff --git a/packages/realgud/realgud/lang/python.el 
b/packages/realgud/realgud/lang/python.el
new file mode 100644
index 0000000..a2e8b54
--- /dev/null
+++ b/packages/realgud/realgud/lang/python.el
@@ -0,0 +1,176 @@
+;; Copyright (C) 2011, 2014-2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;;; Common Python constants and regular expressions.
+(require 'load-relative)
+(require-relative-list '("../common/regexp" "../common/loc" "../common/track")
+                      "realgud-")
+
+(declare-function realgud-goto-line-for-pt 'realgud-track)
+
+(defconst realgud-python-backtrace-loc-pat
+  (make-realgud-loc-pat
+   :regexp "^[ \t]+File \"\\(.+\\)\", line \\([0-9]+\\)"
+   :file-group 1
+   :line-group 2)
+  "A realgud-loc-pat struct that describes a Python backtrace (or
+traceback) line."  )
+
+;;  Regular expression that pseudo-files in caller. For example:
+;;    <string>
+(defconst realgud-python-ignore-file-re "<string>"
+  "Regular expression that pseudo-files of caller()")
+
+(defun realgud-python-populate-command-keys (&optional map)
+  "Bind the debugger function key layout used by many debuggers.
+
+\\{realgud-example-map-standard}"
+  (define-key map (kbd "C-c !b") 'realgud:goto-debugger-backtrace-line)
+  (define-key map (kbd "C-c !!") 'realgud:goto-lang-backtrace-line)
+  (define-key map (kbd "C-c !e") 'realgud:pytest-goto-errmsg-line)
+  )
+
+
+;; Things common to the trepan Python debuggers
+
+(defconst realgud:python-trepan-frame-start-regexp
+  "\\(?:^\\|\n\\)\\(->\\|##\\)")
+
+(defconst realgud:python-trepan-frame-num-regexp
+  "\\([0-9]+\\)")
+
+;; Regular expression that describes a trepan2/3k location generally shown
+;; before a command prompt.
+;;
+;; For example:
+;;   (/usr/bin/zonetab2pot.py:15 @10): <module>
+;;   (/usr/bin/zonetab2pot.py:15 remapped <string>): <module>
+;; or MS Windows:
+;;   (c:\\mydirectory\\gcd.py:10): <module>
+
+(defconst realgud:python-trepan-loc-pat
+      (make-realgud-loc-pat
+       :regexp "^(\\(\\(?:[a-zA-Z]:\\)?[-a-zA-Z0-9_/.\\\\ 
]+\\):\\([0-9]+\\)\\(?: @[0-9]+\\)?\\(?: remapped .*?\\)?): 
\\(?:<module>\\)?\\(?:\n.. [0-9]+ \\(.*?\\)\n\\)?"
+       :file-group 1
+       :line-group 2
+       :text-group 3
+       :ignore-file-re  realgud-python-ignore-file-re)
+      "A realgud-loc-pat struct that describes a Python trepan
+      location line."  )
+
+;; Regular expression that describes a trepan2/3k backtrace line.
+;; For example:
+;; ->0 get_distribution(dist='trepan==0.3.9')
+;;     called from file '/python2.7/dist-packages/pkg_res.py' at line 341
+;; ##1 load_entry_point(dist='tr=0.3.9', group='console_scripts', name='tr')
+;;     called from file '/python2.7/dist-packages/pkg_res.py' at line 351
+;; ##2 <module> exec()
+
+(defconst realgud:python-trepan-backtrace-pat
+  (make-realgud-loc-pat
+   :regexp (concat
+           realgud:python-trepan-frame-start-regexp
+           realgud:python-trepan-frame-num-regexp "[ ]"
+           "\\(?:.*?)\\)\\(?:[\n\t ]+?\\)"
+           "\\(?:called from file \\)?'\\([^:]+?\\)' at line \\([0-9]+\\)")
+   :num 2
+   :file-group 3
+   :line-group 4
+   :ignore-file-re  realgud-python-ignore-file-re)
+      "A realgud-loc-pat struct that describes a Python trepan
+      backtrace location line." )
+
+;;  Regular expression that describes a "breakpoint set" line
+(defconst realgud:python-trepan-brkpt-set-pat
+  (make-realgud-loc-pat
+   :regexp "^Breakpoint \\([0-9]+\\) set at line \\([0-9]+\\)[ \t\n]+of file[ 
\t\n]+\\(.+\\)\\(\n\\|$\\)"
+   :num 1
+   :file-group 3
+   :line-group 2))
+
+;; Regular expression that describes a debugger "delete" (breakpoint) response.
+(defconst realgud:python-trepan-brkpt-del-pat
+      (make-realgud-loc-pat
+       :regexp "^Deleted breakpoint \\([0-9]+\\)\n"
+       :num 1))
+
+;; Regular expression that describes a debugger "disable" (breakpoint) 
response.
+;; For example:
+;;   Breakpoint entry 4 disabled.
+(defconst realgud:python-trepan-brkpt-disable-pat
+  (make-realgud-loc-pat
+   :regexp (format "^Breakpoint %s disabled"
+                  realgud:regexp-captured-num)
+   :num 1))
+
+;; Regular expression that describes a debugger "enable" (breakpoint) response.
+;; For example:
+;;   Breakpoint entry 4 enabled.
+(defconst realgud:python-trepan-brkpt-enable-pat
+  (make-realgud-loc-pat
+   :regexp (format "^Breakpoint %s enabled"
+                  realgud:regexp-captured-num)
+   :num 1))
+
+(defconst realgud:python-debugger-font-lock-keywords
+  '(
+    ;; The frame number and first type name, if present.
+    ("^\\(->\\|##\\)\\([0-9]+\\) \\(<module>\\)? 
*\\([a-zA-Z_][a-zA-Z0-9_]*\\)(\\(.+\\))?"
+     (2 realgud-backtrace-number-face)
+     (4 font-lock-function-name-face nil t))     ; t means optional.
+
+    ;; Parameter sequence, E.g. gcd(a=3, b=5)
+    ;;                             ^^^^^^^^^
+    ("(\\(.+\\))"
+     (1 font-lock-variable-name-face))
+
+    ;; File name. E.g  file '/test/gcd.py'
+    ;;                 ------^^^^^^^^^^^^-
+    ("[ \t]+file '\\([^ ]+*\\)'"
+     (1 realgud-file-name-face))
+
+    ;; Line number. E.g. at line 28
+    ;;                  ---------^^
+    ("[ \t]+at line \\([0-9]+\\)$"
+     (1 realgud-line-number-face))
+
+    ;; Function name.
+    ("\\<\\([a-zA-Z_][a-zA-Z0-9_]*\\)\\.\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
+     (1 font-lock-type-face)
+     (2 font-lock-function-name-face))
+    ;; (trepan2-frames-match-current-line
+    ;;  (0 trepan2-frames-current-frame-face append))
+    ))
+
+(defconst realgud-pytest-error-loc-pat
+  (make-realgud-loc-pat
+   :regexp "^\\(.*\\):\\([0-9]+\\): in "
+   :file-group 1
+   :line-group 2)
+  "A realgud-loc-pat struct that describes a Pytest error line"
+  )
+
+
+;; FIXME: there is probably a less redundant way to do the following
+;; FNS.
+(defun realgud:pytest-goto-errmsg-line (pt)
+  "Display the location mentioned by the pytest error at PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "pytest-error"))
+
+
+(provide-me "realgud-lang-")
diff --git a/packages/realgud/realgud/lang/ruby.el 
b/packages/realgud/realgud/lang/ruby.el
new file mode 100644
index 0000000..9e4699e
--- /dev/null
+++ b/packages/realgud/realgud/lang/ruby.el
@@ -0,0 +1,131 @@
+;; Copyright (C) 2010, 2014, 2016 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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.
+
+;; Common Ruby constants and regular expressions.
+(require 'load-relative)
+(require-relative-list '("../common/regexp" "../common/loc" "../common/track")
+                      "realgud-")
+
+(declare-function realgud-goto-line-for-pt 'realgud-track)
+
+(defconst realgud-rails-backtrace-loc-pat
+  (make-realgud-loc-pat
+   :regexp "^\\([^:]+\\):\\([0-9]+\\)\\(?:[:]in `.*'\\)?"
+   :file-group 1
+   :line-group 2)
+  "A realgud-loc-pat struct that describes a Rails backtrace (or
+traceback) line."  )
+
+(defconst realgud-rspec-backtrace-loc-pat
+  (make-realgud-loc-pat
+   :regexp "^[ ]*# \\([^:]+\\):\\([0-9]+\\)\\(?:[:]in `.*'\\)?"
+   :file-group 1
+   :line-group 2)
+  "A realgud-loc-pat struct that describes an rspec backtrace (or
+traceback) line."  )
+
+;; Regular expression that describes a Ruby YARV 1.9 syntax error line.
+;; SyntaxError: /tmp/columnize.rb:270: syntax error, unexpected $end, ...
+(defconst realgud-ruby-YARV-syntax-error-pat
+  (make-realgud-loc-pat
+   :regexp "^SyntaxError: \\([^:]+\\):\\([0-9]+\\): syntax error"
+   :file-group 1
+   :line-group 2)
+  "A realgud-loc-pat struct that describes a Ruby YARV syntax error message")
+
+(defconst realgud-ruby-backtrace-loc-pat
+  (make-realgud-loc-pat
+   :regexp "^[ \t]+from \\([^:]+\\):\\([0-9]+\\)\\(?: in `.*'\\)?"
+   :file-group 1
+   :line-group 2)
+  "A realgud-loc-pat struct that describes a Ruby backtrace (or
+traceback) line."  )
+
+(defconst realgud-rubinius-backtrace-loc-pat
+  (make-realgud-loc-pat
+   :regexp "^\\(?:\\[0;3[1-4]m\\)?[ \t]+.* at \\([^:]+\\):\\([0-9]+\\)"
+   :file-group 1
+   :line-group 2)
+  "A realgud-loc-pat struct that describes a Rubinius backtrace (or
+traceback) line."  )
+
+(defconst realgud-rubinius-Xagent-backtrace-loc-pat
+  (make-realgud-loc-pat
+   :regexp "^\\(?:\\[0;3[1-4]m\\)?0x[a-f0-9]\\{8\\}: .* in 
\\([^:]+\\):\\([0-9]+\\) ([+][0-9]+)"
+   :file-group 1
+   :line-group 2)
+  "A realgud-loc-pat struct that describes a Rubinius Xagent backtrace (or
+traceback) line."  )
+
+(defconst realgud-ruby-dollar-bang-loc-pat
+      (make-realgud-loc-pat
+       :regexp "^[ \t]*[[]?\\(.+\\):\\([0-9]+\\):in `.*'"
+       :file-group 1
+       :line-group 2)
+  "A realgud-loc-pat that struct that describes a Ruby $! string."
+)
+
+;; FIXME: there is probably a less redundant way to do the following
+;; FNS.
+(defun realgud:rails-goto-backtrace-line (pt)
+  "Display the location mentioned by the Rails backtrace line
+described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "rails-backtrace"))
+
+;; FIXME: there is probably a less redundant way to do the following
+;; FNS.
+(defun realgud:rspec-goto-backtrace-line (pt)
+  "Display the location mentioned by the Rails backtrace line
+described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "rspec-backtrace"))
+
+(defun realgud:rubinius-goto-Xagent-backtrace-line (pt)
+  "Display the location mentioned by the Rubinius Xagent- backtrace line
+described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "rubinius-backtrace-Xagent"))
+
+(defun realgud:ruby-goto-backtrace-line (pt)
+  "Display the location mentioned by the Ruby backtrace line
+described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "lang-backtrace"))
+
+(defun realgud:ruby-goto-dollar-bang-line (pt)
+  "Display the location mentioned by the Ruby backtrace line
+described by PT."
+  (interactive "d")
+  (realgud-goto-line-for-pt pt "dollar-bang-backtrace"))
+
+(defun realgud:ruby-populate-command-keys (&optional map)
+  "Bind the debugger function key layout used by many debuggers.
+
+\\{realgud-example-map-standard}"
+  (define-key map (kbd "C-c !l") 'realgud:goto-lang-backtrace-line)
+  (define-key map (kbd "C-c !!") 'realgud:ruby-goto-dollar-bang-line)
+  (define-key map (kbd "C-c !b") 'realgud:goto-debugger-backtrace-line)
+  (define-key map (kbd "C-c !r") 'realgud:rails-goto-backtrace-line)
+  (define-key map (kbd "C-c !s") 'realgud:rspec-goto-backtrace-line)
+  )
+
+
+;; Some things common to all trepan debuggers (Rubinius and Ruby 1.9.2)
+(defconst realgud:trepan-frame-start-regexp
+  "\\(?:^\\|\n\\)\\(-->\\|   \\)")
+
+(defconst realgud:trepan-frame-num-regexp
+  "#\\([0-9]+\\)")
+
+(defconst realgud:trepan-frame-line-regexp
+  "[ \t\n]+at line \\([0-9]+\\)\\(?:\n\\|$\\)")
+
+
+(provide-me "realgud-lang-")
diff --git a/packages/realgud/test/.gitignore b/packages/realgud/test/.gitignore
new file mode 100644
index 0000000..b616aaf
--- /dev/null
+++ b/packages/realgud/test/.gitignore
@@ -0,0 +1,5 @@
+/*.elc
+/*~
+/HelloWorld.class
+/Makefile
+/Makefile.in
diff --git a/packages/context-coloring/test/fixtures/empty 
b/packages/realgud/test/.nosearch
similarity index 100%
copy from packages/context-coloring/test/fixtures/empty
copy to packages/realgud/test/.nosearch
diff --git a/packages/realgud/test/HelloWorld.java 
b/packages/realgud/test/HelloWorld.java
new file mode 100644
index 0000000..27a5485
--- /dev/null
+++ b/packages/realgud/test/HelloWorld.java
@@ -0,0 +1,6 @@
+public class HelloWorld {
+    public static void main(String[] args) {
+       String msg = "Hello, World!";
+        System.out.println(msg); // Display the string.
+    }
+}
diff --git a/packages/loc-changes/test/Makefile.am 
b/packages/realgud/test/Makefile.am
similarity index 87%
copy from packages/loc-changes/test/Makefile.am
copy to packages/realgud/test/Makefile.am
index 48f7f72..0fba6da 100644
--- a/packages/loc-changes/test/Makefile.am
+++ b/packages/realgud/test/Makefile.am
@@ -2,11 +2,6 @@ include $(top_srcdir)/common.mk
 
 PHONY=check test all check-elget test-elget help
 
-all: check
-
-#: same thing as "check"
-test: check
-
 #: overall help on running the make targets
 help:
        @echo "The main function of this Makefile is to facilitate running 
tests."
@@ -34,7 +29,9 @@ help:
        @echo
        @echo "    make test-srcbuf.elrun"
 
-EXTRA_DIST=sample.txt
+
+#: same thing as "check"
+test: check
 
 #: same thing as "check-elget"
 test-elget: check-elget
@@ -48,16 +45,15 @@ EL_GET_CHECK_FILES = $(notdir $(test_files:.el=.elrun))
 check: $(CHECK_FILES)
 
 #: Run all tests via el-get
-check-elget:
-       (cd $(top_srcdir)/test && $(EMACS) --batch --no-site-file --no-splash 
--load ./install-pkgs.el --load test-basic.el)
+check-elget: $(EL_GET_CHECK_FILES)
 
 #: Run all tests with minimum verbosity
 check-short:
-       $(MAKE) check 2>&1  | ruby ../make-check-filter.rb
+       $(MAKE) check 2>&1  | ruby make-check-filter.rb
 
 #: Run all tests with minimum verbosity via el-get
 check-short-elget:
-       $(MAKE) check-elget 2>&1  | ruby ./make-check-filter.rb
+       $(MAKE) check-elget 2>&1  | ruby make-check-filter.rb
 
 test-%.run:
        (cd $(top_srcdir)/test && $(EMACS) --batch --no-site-file --no-splash 
--load $(@:.run=.el))
diff --git a/packages/realgud/test/bt-helper.el 
b/packages/realgud/test/bt-helper.el
new file mode 100644
index 0000000..a9f63d8
--- /dev/null
+++ b/packages/realgud/test/bt-helper.el
@@ -0,0 +1,47 @@
+(require 'test-simple)
+(require 'font-lock)
+
+(load-file "../realgud/common/buffer/command.el")
+(load-file "../realgud/common/buffer/backtrace.el")
+(load-file "../realgud/common/backtrace-mode.el")
+
+(declare-function realgud-backtrace-mode 'realgud-backtrace-mode)
+(declare-function realgud-cmdbuf-init 'realgud-buffer-command)
+
+(eval-when-compile
+  (defvar temp-cmdbuf)
+  (defvar temp-bt)
+  (defvar realgud-pat-hash)
+)
+
+(defun setup-bt-vars(debugger-name)
+  "Sets up globals temp-cmdbuf and temp-bt with command buffer
+for DEBUGGER-NAME"
+  (setq temp-cmdbuf (generate-new-buffer "*cmdbuf-test*"))
+  (setq temp-bt (generate-new-buffer "*bt-test*"))
+  (with-current-buffer temp-cmdbuf
+    (switch-to-buffer temp-cmdbuf)
+    (realgud-cmdbuf-init temp-cmdbuf debugger-name
+                     (gethash debugger-name realgud-pat-hash))
+
+    (switch-to-buffer nil)
+  ))
+
+
+(defun setup-bt(debugger-name string)
+  "Sets up globals temp-cmdbuf and temp-bt with command buffer
+for DEBUGGER-NAME and initializes it to STRING"
+  (setup-bt-vars debugger-name)
+  (with-current-buffer temp-bt
+    (realgud-backtrace-mode temp-cmdbuf)
+    (goto-char (point-min))
+    (setq buffer-read-only nil)
+    (insert string)
+    (font-lock-fontify-buffer)
+    ;; Newer emacs's use:
+    (goto-char (point-min))
+    )
+  temp-bt
+)
+
+(provide 'realgud-bt-helper)
diff --git a/packages/realgud/test/gcd.js b/packages/realgud/test/gcd.js
new file mode 100644
index 0000000..ee56555
--- /dev/null
+++ b/packages/realgud/test/gcd.js
@@ -0,0 +1,45 @@
+//!/usr/bin/env node
+var util = require("util");
+require("console");
+
+function ask(question, format, callback) {
+ var stdin = process.stdin, stdout = process.stdout;
+
+ stdin.resume();
+ stdout.write(question + ": ");
+
+ stdin.once('data', function(data) {
+   data = data.toString().trim();
+
+   if (format.test(data)) {
+     callback(data);
+   } else {
+     stdout.write("It should match: "+ format +"\n");
+     ask(question, format, callback);
+   }
+ });
+}
+
+// GCD. We assume positive numbers
+function gcd(a, b) {
+    // Make: a <= b
+    if (a > b) {
+       var temp = a;
+       a = b;
+       b = temp;
+    }
+
+    if (a <= 0) { return null };
+
+    if (a == 1 || b-a == 0) {
+       return a;
+    }
+    return gcd(b-a, a);
+}
+
+var a = parseInt(process.argv[0]) || 24,
+    b = parseInt(process.argv[0]) || 5;
+
+console.log(util.format("The GCD of %d and %d is %d", a, b,
+                       gcd(a, b)));
+process.exit();
diff --git a/packages/realgud/test/gcd.pl b/packages/realgud/test/gcd.pl
new file mode 100644
index 0000000..df476a8
--- /dev/null
+++ b/packages/realgud/test/gcd.pl
@@ -0,0 +1,21 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+
+# GCD. We assume positive numbers
+sub gcd($$);
+sub gcd($$) 
+{ 
+    my ($a, $b) = @_;
+    # Make: a <= b
+    ($a, $b) = ($b, $a) if ($a > $b);
+
+    return undef if $a <= 0;
+    return $a if ($a == 1) or ($b-$a == 0);
+    return gcd($b-$a, $a);
+}
+
+die sprintf "Need two integer arguments, got %d", scalar(@ARGV) unless 
+    @ARGV == 2;
+my ($a, $b) = @ARGV[0,1];
+printf "The GCD of %d and %d is %d\n", $a, $b, gcd($a, $b);
diff --git a/packages/realgud/test/gcd.py b/packages/realgud/test/gcd.py
new file mode 100755
index 0000000..e64f284
--- /dev/null
+++ b/packages/realgud/test/gcd.py
@@ -0,0 +1,41 @@
+#!/usr/bin/python
+"""Greatest Common Divisor
+
+Some characterstics of this program used for testing check_args() does
+not have a 'return' statement.
+
+check_args() raises an uncaught exception when given the wrong number
+of parameters.
+
+"""
+import sys
+
+def check_args():
+    if len(sys.argv) != 3:
+        # Rather than use sys.exit let's just raise an error
+        raise Exception("Need to give two numbers")
+    for i in range(2):
+        try:
+            sys.argv[i+1] = int(sys.argv[i+1])
+        except ValueError:
+            print("** Expecting an integer, got: %s" % repr(sys.argv[i]))
+            sys.exit(2)
+
+def gcd(a,b):
+    """ GCD. We assume positive numbers"""
+
+    # Make: a <= b
+    if a > b:
+       (a, b) = (b, a)
+
+    if a <= 0:
+        return None
+    if a == 1 or b-a == 0:
+        return a
+    return gcd(b-a, a)
+
+if __name__=='__main__':
+    check_args()
+
+    (a, b) = sys.argv[1:3]
+    print("The GCD of %d and %d is %d" % (a, b, gcd(a, b)))
diff --git a/packages/realgud/test/gcd.rb b/packages/realgud/test/gcd.rb
new file mode 100755
index 0000000..c780a31
--- /dev/null
+++ b/packages/realgud/test/gcd.rb
@@ -0,0 +1,19 @@
+#!/usr/bin/env ruby
+
+# GCD. We assume positive numbers
+def gcd(a, b)
+  # Make: a <= b
+  if a > b
+    a, b = [b, a]
+  end
+
+  return nil if a <= 0
+
+  if a == 1 or b-a == 0
+    return a
+  end
+  return gcd(b-a, a)
+end
+
+a, b = ARGV[0..1].map {|arg| arg.to_i}
+puts "The GCD of %d and %d is %d" % [a, b, gcd(a, b)]
diff --git a/packages/realgud/test/gcd.sh b/packages/realgud/test/gcd.sh
new file mode 100755
index 0000000..497f33b
--- /dev/null
+++ b/packages/realgud/test/gcd.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+# Greatest Common Divisor in POSIX shell using Euclid's algorithm.  On
+# return, variable gcd_value is set and is the gcd of parameters $1
+# and $2. The GCD of a negative number is the same as the GCD of its
+# absolute value, since a negative number is -1 times its positive
+# value.  Negative numbers are set when there is an error; -1 is set
+# when the wrong number of parameters are given.
+gcd() {
+    typeset -i a=$1
+    typeset -i b=$2
+    if (( a > b )) ; then
+       a=$b
+       b=$1
+    fi
+   if (( a == 1 || (b-a) == 0)) ; then
+       gcd_value=$a
+       return 0
+   fi
+   typeset -i c
+   ((c=b-a))
+   gcd $c $a
+}
+
+gcd $1 $2
+echo $gcd_value
diff --git a/packages/realgud/test/gdb/bar.sh b/packages/realgud/test/gdb/bar.sh
new file mode 100755
index 0000000..6c961d1
--- /dev/null
+++ b/packages/realgud/test/gdb/bar.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo This Should get selected 3rd
diff --git a/packages/context-coloring/test/fixtures/empty 
b/packages/realgud/test/gdb/baz
old mode 100644
new mode 100755
similarity index 100%
copy from packages/context-coloring/test/fixtures/empty
copy to packages/realgud/test/gdb/baz
diff --git a/packages/context-coloring/test/fixtures/empty 
b/packages/realgud/test/gdb/baz.c
similarity index 100%
copy from packages/context-coloring/test/fixtures/empty
copy to packages/realgud/test/gdb/baz.c
diff --git a/packages/context-coloring/test/fixtures/empty 
b/packages/realgud/test/gdb/foo
old mode 100644
new mode 100755
similarity index 100%
copy from packages/context-coloring/test/fixtures/empty
copy to packages/realgud/test/gdb/foo
diff --git a/packages/context-coloring/test/fixtures/empty 
b/packages/realgud/test/gdb/foo.c
similarity index 100%
copy from packages/context-coloring/test/fixtures/empty
copy to packages/realgud/test/gdb/foo.c
diff --git a/packages/realgud/test/gdb/test2/bar.sh 
b/packages/realgud/test/gdb/test2/bar.sh
new file mode 100755
index 0000000..6c961d1
--- /dev/null
+++ b/packages/realgud/test/gdb/test2/bar.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo This Should get selected 3rd
diff --git a/packages/context-coloring/test/fixtures/empty 
b/packages/realgud/test/gdb/test2/baz.c
similarity index 100%
rename from packages/context-coloring/test/fixtures/empty
rename to packages/realgud/test/gdb/test2/baz.c
diff --git a/packages/realgud/test/make-check-filter.rb 
b/packages/realgud/test/make-check-filter.rb
new file mode 100644
index 0000000..508c8f6
--- /dev/null
+++ b/packages/realgud/test/make-check-filter.rb
@@ -0,0 +1,24 @@
+#!/usr/bin/env ruby
+# Use this to cut out the crud from make check.
+# Use like this:
+#   make check 2>&1  | ruby ../make-check-filter.rb
+# See Makefile.am
+pats = ["^(?:Loading",
+        '(re)?make\[',
+        "Making check in",
+        '\(cd \.\.',
+        "make -C",
+        "Test-Unit",
+        "Fontifying",
+        "`flet'",
+        '\s*$',
+        '##[<>]+$'
+       ].join('|') + ')'
+# puts pats
+skip_re = /#{pats}/
+
+while gets()
+  next if $_.encode!('UTF-8', 'binary',
+                     invalid: :replace, undef: :replace, replace: '') =~ 
skip_re
+  puts $_
+end
diff --git a/packages/realgud/test/node_modules/gcd.js/gcd.js 
b/packages/realgud/test/node_modules/gcd.js/gcd.js
new file mode 100644
index 0000000..6d7ce32
--- /dev/null
+++ b/packages/realgud/test/node_modules/gcd.js/gcd.js
@@ -0,0 +1,47 @@
+//!/usr/bin/env node
+var util = require("util");
+require("console");
+
+function ask(question, format, callback) {
+ var stdin = process.stdin, stdout = process.stdout;
+
+ stdin.resume();
+ stdout.write(question + ": ");
+
+ stdin.once('data', function(data) {
+   data = data.toString().trim();
+
+   if (format.test(data)) {
+     callback(data);
+   } else {
+     stdout.write("It should match: "+ format +"\n");
+     ask(question, format, callback);
+   }
+ });
+}
+
+// GCD. We assume positive numbers
+function gcd(a, b) {
+    // Make: a <= b
+    if (a > b) {
+       var temp = a;
+       a = b;
+       b = temp;
+    }
+
+    if (a <= 0) { return null };
+
+    if (a == 1 || b-a == 0) {
+       return a;
+    }
+    return gcd(b-a, a);
+}
+
+var a=24;
+
+ask("GCD of 24 and", /^\d+$/, function(b_str) {
+    var b = parseInt(b_str, 10);
+    console.log(util.format("The GCD of %d and %d is %d", a, b,
+                           gcd(a, b)));
+    process.exit();
+});
diff --git a/packages/realgud/test/node_modules/gcd.js/package.json 
b/packages/realgud/test/node_modules/gcd.js/package.json
new file mode 100644
index 0000000..06a4cee
--- /dev/null
+++ b/packages/realgud/test/node_modules/gcd.js/package.json
@@ -0,0 +1,12 @@
+{
+    "name": "emacs-dbgr",
+    "private": false,
+    "version": "1.0.0",
+    "description": "Debugging is going to be realgud.",
+    "repository": "https://github.com/rocky/emacs-dbgr";,
+    "dependencies": {},
+    "devDependencies": {},
+    "scripts": {
+       "start": "node --debug gcd.js"
+    }
+}
diff --git a/packages/realgud/test/regexp-helper.el 
b/packages/realgud/test/regexp-helper.el
new file mode 100644
index 0000000..01dc7d2
--- /dev/null
+++ b/packages/realgud/test/regexp-helper.el
@@ -0,0 +1,50 @@
+(require 'test-simple)
+(load-file "../realgud/common/buffer/command.el")
+
+(eval-when-compile
+  (defvar helper-bps)
+  (defvar helper-loc)
+  (defvar helper-tb)
+  (defvar prompt-pat)
+)
+
+(declare-function realgud-loc-pat-regexp 'realgud-backtrace-mode)
+(declare-function realgud-cmdbuf-info-loc-regexp 'realgud-buffer-command)
+(declare-function test-simple-start 'test-simple)
+
+
+(defun setup-regexp-vars(pat-hash)
+  (setq helper-bps    (gethash "brkpt-set" pat-hash))
+  (setq helper-loc    (gethash "loc"       pat-hash))
+  (setq helper-tb     (gethash "lang-backtrace" pat-hash))
+)
+
+(defun loc-match(text var)
+  "Match TEXT against regexp field VAR"
+  (string-match (realgud-loc-pat-regexp var) text)
+)
+
+(defun bp-loc-match(text)
+  (string-match (realgud-loc-pat-regexp helper-bps) text)
+)
+
+(defun tb-loc-match(text)
+  (string-match (realgud-loc-pat-regexp helper-tb) text)
+)
+
+(defun cmdbuf-loc-match(text dbgr)
+  "Match TEXT against cmdbuf-info-loc field VAR"
+  (string-match (realgud-cmdbuf-info-loc-regexp dbgr) text)
+  )
+
+(defun prompt-match(prompt-str &optional num-str fmt-str)
+  (unless fmt-str (setq fmt-str "debugger prompt %s"))
+  (assert-equal 0 (string-match (realgud-loc-pat-regexp prompt-pat)
+                               prompt-str)
+               (format fmt-str prompt-str))
+  (cond (num-str
+        (assert-equal num-str (substring prompt-str
+                                      (match-beginning 1) (match-end 1))))
+       ('t 't))
+  )
+(provide 'realgud-regexp-helper)
diff --git a/packages/realgud/test/test-bashdb.el 
b/packages/realgud/test/test-bashdb.el
new file mode 100644
index 0000000..6dac5ad
--- /dev/null
+++ b/packages/realgud/test/test-bashdb.el
@@ -0,0 +1,60 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "../realgud/debugger/bashdb/bashdb.el")
+(load-file "../realgud/debugger/bashdb/core.el")
+(load-file "../realgud/common/core.el")
+(load-file "../realgud/common/lang.el")
+
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
+
+(eval-when-compile
+  (defvar test:run-process-save)
+  (defvar realgud:bashdb-minibuffer-history)
+  )
+
+(declare-function bashdb-parse-cmd-args 'realgud:bashdb)
+(declare-function bashdb-suggest-invocation 'realgud:bzshdb)
+(declare-function realgud:bashdb        'realgud:bashdb)
+(declare-function __FILE__              'load-relative)
+
+(test-simple-start)
+(make-local-variable 'realgud:bashdb-minibuffer-history)
+(setq realgud:bashdb-minibuffer-history nil)
+
+;; Save value realgud:run-process and change it to something we want
+(setq test:run-process-save (symbol-function 'realgud:run-process))
+(defun realgud:run-process(debugger-name script-filename cmd-args
+                                        minibuf-history
+                                        &optional no-reset)
+  "Fake realgud:run-process used in testing"
+  (note
+   (format "%s %s %s" debugger-name script-filename cmd-args))
+  (assert-equal "bashdb" debugger-name "debugger name gets passed")
+  (let ((expanded-name
+        (realgud:expand-file-name-if-exists "./gcd.sh")))
+    (assert-equal  expanded-name script-filename "file name check")
+    (assert-equal (list "-l" (expand-file-name ".") expanded-name "3" "5")
+                 (cdr cmd-args) "command args listified")
+    ))
+
+(note "bashdb-parse-cmd-args")
+(assert-equal (list nil '("bashdb")
+                   (list (realgud:expand-file-name-if-exists "foo")) nil)
+             (bashdb-parse-cmd-args '("bashdb" "foo")))
+(assert-equal (list nil '("bashdb")
+                   (list (realgud:expand-file-name-if-exists "program.sh")
+                         "foo") nil)
+             (bashdb-parse-cmd-args
+              '("bashdb" "program.sh" "foo")))
+(with-current-buffer (find-file "gcd.sh")
+  (shell-script-mode)
+  (assert-matches "bashdb .*gcd.sh$" (bashdb-suggest-invocation "bashdb")))
+
+(realgud:bashdb "bashdb -l . ./gcd.sh 3 5")
+;; Restore the old value of realgud:run-process
+(fset 'realgud:run-process test:run-process-save)
+
+(end-tests)
diff --git a/packages/realgud/test/test-bp.el b/packages/realgud/test/test-bp.el
new file mode 100644
index 0000000..ae6047e
--- /dev/null
+++ b/packages/realgud/test/test-bp.el
@@ -0,0 +1,59 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "../realgud/common/bp.el")
+(declare-function realgud-bp-remove-icons 'realgud-bp)
+
+(eval-when-compile
+  (defvar temp-srcbuf)
+)
+
+
+(test-simple-start)
+
+(note "breakpoints")
+
+(set (make-local-variable 'temp-srcbuf)
+     (generate-new-buffer "*srcbuf-test*"))
+(with-current-buffer temp-srcbuf
+  (insert "abc\ndef\n")
+  (note "breakpoint reset")
+  (realgud-bp-remove-icons (point-min) (point-max))
+  (assert-equal 0 (length (overlays-in (point-min) (point-max)))
+               "Should not have any breakpoints in buffer")
+  )
+  ;; (note "breakpoint set")
+  ;; (realgud-bp-put-icon (point-min) 't 1 temp-srcbuf)
+  ;; (realgud-bp-put-icon (point-max) nil 2 temp-srcbuf)
+  ;; (assert-equal 2 (length (overlays-in (point-min) (point-max)))
+  ;;     (format
+  ;;      "Should find breakpoints in buffer %s"
+  ;;      temp-srcbuf))
+  ;; (let* ((ov-list (overlays-in (point-min) (point-min)))
+  ;;    (ov (car-safe ov-list))
+  ;;    (before-string)
+  ;;    )
+  ;; (assert-equal 1 (length ov-list)
+  ;;       "Should find 1 breakpoint at (point-min)")
+  ;; (setq before-string (overlay-get ov 'before-string))
+  ;;   (assert-equal 1 (get-text-property 0 'realgud-bptno before-string)
+  ;;       "Should find breakpoint number 1 in overlay's before-string")
+  ;;  (assert-equal t (get-text-property 0 'enabled before-string)
+  ;;     "Breakpoint 1 should be enabled")
+  ;;   )
+  ;;   (let* ((ov-list (overlays-in (point-max) (point-max)))
+  ;;   (ov (car-safe ov-list))
+  ;;   (before-string)
+  ;;    )
+  ;;   (assert-equal 1 (length ov-list)
+  ;;     "Should find 1 breakpoint at (point-max)")
+  ;;   (setq before-string (overlay-get ov 'before-string))
+  ;;     (assert-equal 2 (get-text-property 0 'realgud-bptno before-string)
+  ;;    "Should find breakpoint number 1 in overlay's before-string")
+  ;;     (assert-equal nil (get-text-property 0 'enabled before-string)
+  ;;     "Breakpoint 1 should be disabled")
+  ;;    )
+
+(end-tests)
diff --git a/packages/realgud/test/test-bt-pdb.el 
b/packages/realgud/test/test-bt-pdb.el
new file mode 100644
index 0000000..e5ee8a8
--- /dev/null
+++ b/packages/realgud/test/test-bt-pdb.el
@@ -0,0 +1,45 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "./bt-helper.el")
+(load-file "../realgud/debugger/pdb/init.el")
+
+(declare-function setup-bt 'realgud-bt-helper)
+(declare-function __FILE__ 'load-relative)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar temp-bt)
+)
+
+
+(setq temp-bt
+      (setup-bt "pdb"
+               "->0 gcd(a=3, b=5) called from file '/test/gcd.py' at line 28
+##1 <module> execfile() file '/test/gcd.py' at line 41
+"))
+
+(with-current-buffer temp-bt
+  (switch-to-buffer temp-bt)
+  (goto-char (point-min))
+  (dolist (pair
+          '(
+            ("->" .    realgud-backtrace-number )
+            ("gc"    . font-lock-function-name-face )
+            ("("     . font-lock-variable-name-face )
+            ("/test" . realgud-file-name)
+            ("2"     . realgud-line-number)
+            ("##"    . realgud-backtrace-number)
+            ("/test" . realgud-file-name)
+            ("4"     . realgud-line-number)
+            ))
+    (search-forward (car pair))
+    (assert-eql (cdr pair)
+                 (get-text-property (point) 'face))
+    )
+  )
+
+(end-tests)
diff --git a/packages/realgud/test/test-bt-rdebug.el 
b/packages/realgud/test/test-bt-rdebug.el
new file mode 100644
index 0000000..f3c4d25
--- /dev/null
+++ b/packages/realgud/test/test-bt-rdebug.el
@@ -0,0 +1,47 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "./bt-helper.el")
+(load-file "../realgud/debugger/rdebug/init.el")
+
+(declare-function setup-bt 'realgud-bt-helper)
+(declare-function __FILE__ 'load-relative)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar temp-bt)
+)
+
+(setq temp-bt
+      (setup-bt "rdebug"
+               "--> #0 Object.gcd(a#Fixnum, b#Fixnum)
+       at line /test/gcd.rb:6
+    #1 at line /test/gcd.rb:19
+"))
+
+(with-current-buffer temp-bt
+  (switch-to-buffer temp-bt)
+  (goto-char (point-min))
+  (dolist (pair
+          '(
+            ("#" .     realgud-backtrace-number )
+            ("Objec" . font-lock-constant-face )
+            ("gc"    . font-lock-function-name-face )
+            ("("     . font-lock-variable-name-face )
+            ("Fixnu" . font-lock-constant-face )
+            ("/test" . realgud-file-name)
+            (":"     . realgud-line-number)
+            ("#"     . realgud-backtrace-number)
+            ("/test" . realgud-file-name)
+            (":"     . realgud-line-number)
+            ))
+    (search-forward (car pair))
+    (assert-equal (cdr pair)
+                 (get-text-property (point) 'face))
+    )
+  )
+
+(end-tests)
diff --git a/packages/realgud/test/test-bt-trepan.el 
b/packages/realgud/test/test-bt-trepan.el
new file mode 100644
index 0000000..0bc5e6e
--- /dev/null
+++ b/packages/realgud/test/test-bt-trepan.el
@@ -0,0 +1,49 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "./bt-helper.el")
+(load-file "../realgud/debugger/trepan/init.el")
+
+(declare-function setup-bt 'realgud-bt-helper)
+(declare-function __FILE__ 'load-relative)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar temp-bt)
+)
+
+(setq temp-bt
+      (setup-bt "trepan"
+               "--> #0 METHOD Object#gcd(a, b) in file /test/gcd.rb at line 4
+    #1 TOP Object#<top /gcd.rb> in file /test/gcd.rb
+       at line 19
+"))
+
+(with-current-buffer temp-bt
+  (switch-to-buffer temp-bt)
+  (goto-char (point-min))
+  (dolist (pair
+          '(
+            ("#" .     realgud-backtrace-number )
+            ("METHO" . font-lock-keyword-face )
+            ("Objec" . font-lock-constant-face )
+            ("#"     . font-lock-function-name-face )
+            ("("     . font-lock-variable-name-face )
+            ("/test" . realgud-file-name)
+            ("line " . realgud-line-number)
+            ("#"     . realgud-backtrace-number)
+            ("Objec" . font-lock-constant-face )
+            ("<top"  . font-lock-variable-name-face)
+            ("/test" . realgud-file-name)
+            ("line " . realgud-line-number)
+            ))
+    (search-forward (car pair))
+    (assert-equal (cdr pair)
+                 (get-text-property (point) 'face))
+    )
+  )
+
+(end-tests)
diff --git a/packages/realgud/test/test-bt-trepan2.el 
b/packages/realgud/test/test-bt-trepan2.el
new file mode 100644
index 0000000..d3d3d0f
--- /dev/null
+++ b/packages/realgud/test/test-bt-trepan2.el
@@ -0,0 +1,43 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "./bt-helper.el")
+(load-file "../realgud/debugger/trepan2/init.el")
+
+(declare-function setup-bt 'realgud-bt-helper)
+(declare-function __FILE__ 'load-relative)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar temp-bt)
+)
+
+(setq temp-bt
+      (setup-bt "trepan2"
+               "->0 gcd(a=3, b=5) called from file '/test/gcd.py' at line 28
+##1 <module> execfile() file '/test/gcd.py' at line 41
+"))
+
+(with-current-buffer temp-bt
+  (switch-to-buffer temp-bt)
+  (goto-char (point-min))
+  (dolist (pair
+          '(
+            ("->" .    realgud-backtrace-number )
+            ("gc"    . font-lock-function-name-face )
+            ("("     . font-lock-variable-name-face )
+            ("/test" . realgud-file-name)
+            ("2"     . realgud-line-number)
+            ("##"    . realgud-backtrace-number)
+            ("/test" . realgud-file-name)
+            ("4"     . realgud-line-number)
+            ))
+    (search-forward (car pair))
+    (assert-equal (cdr pair)
+                 (get-text-property (point) 'face))
+    )
+  )
+(end-tests)
diff --git a/packages/realgud/test/test-bt-trepan3k.el 
b/packages/realgud/test/test-bt-trepan3k.el
new file mode 100644
index 0000000..d3d3d0f
--- /dev/null
+++ b/packages/realgud/test/test-bt-trepan3k.el
@@ -0,0 +1,43 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "./bt-helper.el")
+(load-file "../realgud/debugger/trepan2/init.el")
+
+(declare-function setup-bt 'realgud-bt-helper)
+(declare-function __FILE__ 'load-relative)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar temp-bt)
+)
+
+(setq temp-bt
+      (setup-bt "trepan2"
+               "->0 gcd(a=3, b=5) called from file '/test/gcd.py' at line 28
+##1 <module> execfile() file '/test/gcd.py' at line 41
+"))
+
+(with-current-buffer temp-bt
+  (switch-to-buffer temp-bt)
+  (goto-char (point-min))
+  (dolist (pair
+          '(
+            ("->" .    realgud-backtrace-number )
+            ("gc"    . font-lock-function-name-face )
+            ("("     . font-lock-variable-name-face )
+            ("/test" . realgud-file-name)
+            ("2"     . realgud-line-number)
+            ("##"    . realgud-backtrace-number)
+            ("/test" . realgud-file-name)
+            ("4"     . realgud-line-number)
+            ))
+    (search-forward (car pair))
+    (assert-equal (cdr pair)
+                 (get-text-property (point) 'face))
+    )
+  )
+(end-tests)
diff --git a/packages/realgud/test/test-bt-zshdb.el 
b/packages/realgud/test/test-bt-zshdb.el
new file mode 100644
index 0000000..fdbc2e7
--- /dev/null
+++ b/packages/realgud/test/test-bt-zshdb.el
@@ -0,0 +1,38 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "./bt-helper.el")
+(load-file "../realgud/debugger/zshdb/init.el")
+
+(declare-function setup-bt 'realgud-bt-helper)
+(declare-function __FILE__ 'load-relative)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar temp-bt)
+)
+
+(setq temp-bt
+      (setup-bt "zshdb"
+               "->0 in file `/test/autogen.sh' at line 2
+##1 /test/autogen.sh called from file `/usr/local/bin/zshdb' at line 121
+"))
+(with-current-buffer temp-bt
+  (switch-to-buffer temp-bt)
+  (goto-char (point-min))
+  (dolist (pair
+          '(
+            ("->" .    realgud-backtrace-number )
+            ("/test" . realgud-file-name)
+            ("line " . realgud-line-number)
+            ))
+    (search-forward (car pair))
+    (assert-equal (cdr pair)
+                 (get-text-property (point) 'face))
+    )
+  )
+
+(end-tests)
diff --git a/packages/realgud/test/test-buf-bt.el 
b/packages/realgud/test/test-buf-bt.el
new file mode 100644
index 0000000..2ef06db
--- /dev/null
+++ b/packages/realgud/test/test-buf-bt.el
@@ -0,0 +1,27 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'load-relative)
+(require 'test-simple)
+(require 'font-lock)
+
+
+(load-file "../realgud/common/buffer/command.el")
+(load-file "../realgud/common/buffer/backtrace.el")
+
+(declare-function realgud-get-buffer-base-name 'realgud-command)
+
+(test-simple-start)
+
+(note "realgud-buffer-backtrace")
+
+(assert-equal "abc" (realgud-get-buffer-base-name "*abc*")
+             "remove buffer stars")
+
+(assert-equal "abc" (realgud-get-buffer-base-name "abc")
+             "no buffer stars")
+
+(assert-equal "abc" (realgud-get-buffer-base-name "*abc shell*")
+             "remove buffer stars and shell")
+
+(end-tests)
diff --git a/packages/realgud/test/test-buf-cmd.el 
b/packages/realgud/test/test-buf-cmd.el
new file mode 100644
index 0000000..48aa2ee
--- /dev/null
+++ b/packages/realgud/test/test-buf-cmd.el
@@ -0,0 +1,57 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/common/buffer/command.el")
+(load-file "../realgud/debugger/trepan/init.el")
+(declare-function realgud-cmdbuf-init 'realgud-buffer-command)
+(declare-function realgud-cmdbuf-command-string 'realgud-buffer-command)
+(declare-function realgud-cmdbuf-info-cmd-args= 'realgud-buffer-command)
+(declare-function realgud-cmdbuf-debugger-name  'realgud-buffer-command)
+(declare-function realgud-cmdbuf-info-srcbuf-list 'realgud-buffer-command)
+(declare-function realgud-cmdbuf-add-srcbuf 'realgud-buffer-command)
+(declare-function realgud-cmdbuf? 'realgud-buffer-command)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar temp-cmdbuf)
+  (defvar realgud-pat-hash)
+  (defvar realgud-cmdbuf-info)
+)
+
+(assert-nil (realgud-cmdbuf? (current-buffer))
+           "realgud-cmdbuf? before init")
+
+(assert-equal nil (realgud-cmdbuf-command-string (current-buffer))
+             "realgud-cmdbuf-command-string - uninit")
+(setq temp-cmdbuf (generate-new-buffer "*cmdbuf-test*"))
+(assert-t (realgud-cmdbuf-init temp-cmdbuf "trepan"
+                           (gethash "trepan" realgud-pat-hash))
+         "realgud-cmdbuf-init")
+
+(with-current-buffer temp-cmdbuf
+  (switch-to-buffer temp-cmdbuf)
+  (realgud-cmdbuf-info-cmd-args= '("command" "args"))
+  (assert-equal "command args"
+               (realgud-cmdbuf-command-string temp-cmdbuf))
+  (assert-equal "trepan"
+               (realgud-cmdbuf-debugger-name))
+  (assert-equal nil
+               (realgud-cmdbuf-info-srcbuf-list
+                realgud-cmdbuf-info)
+               "srcbuf-list should start out nil")
+  (realgud-cmdbuf-add-srcbuf (current-buffer) temp-cmdbuf)
+  (assert-equal (list (current-buffer))
+               (realgud-cmdbuf-info-srcbuf-list
+                realgud-cmdbuf-info)
+               "should have added one item to srcbuf-list")
+  (realgud-cmdbuf-add-srcbuf (current-buffer) temp-cmdbuf)
+  (assert-equal (list (current-buffer))
+               (realgud-cmdbuf-info-srcbuf-list
+                realgud-cmdbuf-info)
+               "Second source buffer same as first; should have added still 
only one item.")
+  (switch-to-buffer nil)
+  )
+
+(end-tests)
diff --git a/packages/realgud/test/test-common-helper.el 
b/packages/realgud/test/test-common-helper.el
new file mode 100644
index 0000000..396edc6
--- /dev/null
+++ b/packages/realgud/test/test-common-helper.el
@@ -0,0 +1,30 @@
+(eval-when-compile (require 'cl-lib))
+(require 'test-simple)
+(load-file "../realgud/common/helper.el")
+
+(declare-function realgud-struct-field-setter 'realgud-helper)
+(declare-function realgud:debugger-name-transform 'realgud-helper)
+(declare-function __FILE__                    'load-relative)
+
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar realgud-test-info)
+)
+
+(cl-defstruct realgud-test-info name)
+(realgud-struct-field-setter "realgud-test-info" "name")
+
+(set (make-local-variable 'realgud-test-info)
+     (make-realgud-test-info :name "foo"))
+
+(note "setter macro works")
+(assert-t (functionp 'realgud-test-info-name=))
+(assert-equal "foo" (realgud-test-info-name= "foo"))
+
+(note "realgud:debugger-name-transform")
+(assert-equal "trepan" (realgud:debugger-name-transform "trepan"))
+;; (assert-equal "realgud:gdb" (realgud:debugger-name-transform "gdb"))
+
+(end-tests)
diff --git a/packages/realgud/test/test-core.el 
b/packages/realgud/test/test-core.el
new file mode 100644
index 0000000..d3e6ca2
--- /dev/null
+++ b/packages/realgud/test/test-core.el
@@ -0,0 +1,98 @@
+;; -*- lexical-binding:t -*-
+
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(eval-when-compile (defvar trepan-core))
+
+(declare-function __FILE__ 'load-relative)
+(setq trepan-core "../realgud/debugger/trepan/core.el")
+(load-file "../realgud/common/core.el")
+
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
+(declare-function realgud-parse-command-arg,     'realgud-core)
+(declare-function realgud:trepan-parse-cmd-args  'realgud:trepan)
+
+;; We use a specific language to test core. Here we use trepan.
+(load-file "../realgud/debugger/trepan/core.el")
+
+(test-simple-start)
+
+;; FIXME: Add a test of relgud-exec-shell where
+;; we have two invocation of different files that canonicalize
+;; to the same buffer. Make sure the buffers are distinct.
+;; For example: bashdb /etc/profile should not match
+;; bashdb /tmp/profile
+
+(note "realgud:expand-file-name-if-exists")
+
+(assert-equal (realgud:expand-file-name-if-exists "file-not-here")
+             "file-not-here" "no expansion when expanded file doesn't exist")
+
+(assert-equal (realgud:expand-file-name-if-exists ".")
+             (expand-file-name "."))
+
+(note "realgud-parse-...")
+
+(let ((opt-two-args '("0" "C" "e" "E" "F" "i")))
+  (assert-equal '(("-0" "a") nil)
+               (realgud-parse-command-arg '("-0" "a") '() opt-two-args)
+                 "Two args found, none remain afterwards though.")
+
+  (assert-equal
+   '(("-5") ("a" "-0"))
+   (realgud-parse-command-arg '("-5" "a" "-0") '()
+                                   opt-two-args)
+   "One arg not found.")
+
+  (assert-equal
+   '((nil) nil)
+   (realgud-parse-command-arg '() '() opt-two-args)
+   "Degenerate case - no args"
+   )
+
+  (assert-equal
+   '(("--port" "123") ("bar"))
+   (realgud-parse-command-arg
+    '("--port" "123" "bar") '("-port") '())
+   "two mandatory args"
+   )
+
+  (assert-equal
+   '(("/usr/bin/ruby1.9" "-W") ("trepan") ("foo") nil)
+   (realgud:trepan-parse-cmd-args
+    '("/usr/bin/ruby1.9" "-W" "trepan" "foo"))
+     "Separate Ruby with its arg from debugger and its arg.")
+
+  (assert-equal
+   '(("ruby1.9" "-T3") ("trepan" "--port" "123") ("bar") nil)
+   (realgud:trepan-parse-cmd-args
+    '("ruby1.9" "-T3" "trepan" "--port" "123" "bar"))
+   "Ruby with two args and trepan with two args")
+
+  (assert-equal
+   '(nil ("trepan" "--port" "1" "--annotate=3")
+        ("foo" "a") t)
+   (realgud:trepan-parse-cmd-args
+    '("trepan" "--port" "1" "--annotate=3" "foo" "a"))
+  "trepan with annotate args")
+
+  (assert-equal
+   '(nil ("trepan" "--port" "123")
+        ("foo" "--emacs" "a") nil)
+   (realgud:trepan-parse-cmd-args
+    '("trepan" "--port" "123" "foo" "--emacs" "a"))
+   "trepan with --emacs in the wrong place")
+
+  (assert-equal
+   '(("ruby" "-I/usr/lib/ruby")
+     ("trepan" "-h" "foo" "--emacs")
+     ("baz") t)
+   (realgud:trepan-parse-cmd-args
+    '("ruby" "-I/usr/lib/ruby" "trepan" "-h" "foo"
+      "--emacs" "baz"))
+     "trepan with emacs")
+  )
+
+(end-tests)
diff --git a/packages/realgud/test/test-file.el 
b/packages/realgud/test/test-file.el
new file mode 100644
index 0000000..e9129d4
--- /dev/null
+++ b/packages/realgud/test/test-file.el
@@ -0,0 +1,128 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/common/loc.el")
+(load-file "../realgud/common/file.el")
+
+;; Note the below line number is tested so it must match what's listed
+;; below.
+(declare-function __FILE__                     'load-relative)
+
+(declare-function realgud:file-loc-from-line   'realgud-file)
+(declare-function realgud:file-line-count      'realgud-file)
+(declare-function realgud:file-column-from-string 'realgud-file)
+(declare-function realgud-loc?                 'realgud-loc)
+
+(declare-function realgud-loc-line-number      'realgud-loc)
+(declare-function realgud-loc-column-number    'realgud-loc)
+(declare-function realgud-loc-filename         'realgud-loc)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar realgud-file-remap)
+  (defvar test-filename)
+  (defvar test-file-loc)
+  (defvar remap-filename)
+  (defvar old-compilation-find-file)
+)
+
+(clrhash realgud-file-remap)
+
+(setq old-compilation-find-file (symbol-function 'compilation-find-file))
+
+(setq test-filename (symbol-file 'test-simple))
+
+(note "realgud:file-line-count")
+
+(assert-nil
+ (realgud:file-line-count "not-found-file")
+ "File not found")
+
+(assert-t (integerp (realgud:file-line-count test-filename))
+         "File found")
+
+
+(note "realgud:file-loc-from-line")
+
+(fset 'compilation-find-file (lambda(mark test-filename opt)
+                              (get-buffer "*scratch*")))
+
+(save-excursion
+  ;; NOTE: this calls compilation-find-file which prompts for a file
+  ;; (assert-equal
+  ;;  "File named `not-found-file' not readable"
+  ;;  (realgud:file-loc-from-line
+  ;;   "not-found-file" 5 (make-marker))
+  ;;  )
+
+  (assert-t (stringp (realgud:file-loc-from-line test-filename 5.5))
+           "invalid real line number")
+
+  (assert-t (stringp (realgud:file-loc-from-line test-filename -1))
+           "negative number")
+
+  (note "realgud:file-loc-from-line information")
+
+  (assert-t (stringp (realgud:file-loc-from-line test-filename 10001))
+           "Line number too large for file")
+
+  (setq test-file-loc (realgud:file-loc-from-line (__FILE__) 5 nil ";; Note"))
+  (assert-t (realgud-loc? test-file-loc)
+           "Ok loc creation - no cmd marker")
+
+  (assert-t (realgud-loc?
+            (realgud:file-loc-from-line test-filename 30 (make-marker)))
+           "Ok loc creation - cmd marker")
+
+  (assert-equal 5 (realgud-loc-line-number test-file-loc))
+
+  ;; FIXME: don't know why this fails in batch
+  ;; (assert-equal 0 (realgud-loc-column-number test-file-loc))
+
+  (assert-equal (__FILE__) (realgud-loc-filename test-file-loc))
+
+  (note "realgud:file-loc-from-line remapping")
+
+  (setq remap-filename " bogus remap-filename.el")
+
+  ;; (assert-equal
+  ;;  (format "File named `%s' not readable" remap-filename)
+  ;;  (realgud:file-loc-from-line
+  ;;   remap-filename 5 (make-marker))
+  ;;  )
+  )
+
+
+(puthash remap-filename test-filename realgud-file-remap)
+
+(assert-t (realgud-loc?
+          (realgud:file-loc-from-line remap-filename 30))
+         "Ok loc creation with remap - no cmd marker")
+
+;; FIXME: don't know why this fails in batch
+;; (assert-equal
+;;  18
+;;  (realgud:file-column-from-string (__FILE__) 7 "__FILE__")
+;;  "Should find string in file/line and get column"
+;;  )
+
+(assert-nil
+ (realgud:file-column-from-string (__FILE__) 5 "__FILE__")
+ "Should not find string at this line in located file"
+ )
+
+(assert-nil
+ (realgud:file-column-from-string (concat (__FILE__) "FOO") 7 "__FILE__")
+ "Should not find file"
+ )
+
+(assert-nil
+ (realgud:file-column-from-string (__FILE__) 10000 "__FILE__")
+ "Should not find line in file at all"
+ )
+
+(fset 'compilation-find-file old-compilation-find-file)
+
+(end-tests)
diff --git a/packages/realgud/test/test-gdb-core.el 
b/packages/realgud/test/test-gdb-core.el
new file mode 100644
index 0000000..8aabe69
--- /dev/null
+++ b/packages/realgud/test/test-gdb-core.el
@@ -0,0 +1,66 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/debugger/gdb/core.el")
+
+(declare-function realgud:gdb-parse-cmd-args 'realgud-gdb-core)
+
+(test-simple-start)
+
+(note "invoke gdb without command line arguments")
+(assert-equal '(("gdb") nil nil nil)
+             (realgud:gdb-parse-cmd-args
+              '("gdb")))
+
+(note "invoke gdb with annotate command line parameter")
+(assert-equal '(("gdb" "--annotate" "1") nil nil t)
+             (realgud:gdb-parse-cmd-args
+              '("gdb" "--annotate" "1")))
+
+(note "invoke gdb with annotate command line parameter and file")
+(assert-equal '(("gdb" "--annotate" "1") nil ("file.c") t)
+             (realgud:gdb-parse-cmd-args
+              '("gdb" "--annotate" "1" "file.c")))
+
+(note "invoke gdb with annotate command line parameter and pid")
+(assert-equal '(("gdb" "--annotate" "1" "-p") nil ("4812") t)
+             (realgud:gdb-parse-cmd-args
+              '("gdb" "--annotate" "1" "-p" "4812")))
+
+(note "invoke gdb with pid")
+(assert-equal '(("gdb" "-p") nil ("4511") nil)
+             (realgud:gdb-parse-cmd-args
+              '("gdb" "-p" "4511")))
+
+(eval-when-compile
+  (defvar test:warn-save)
+  (defvar last-mess)
+)
+
+(setq test:warn-save (symbol-function 'warn))
+
+(note "Stripping --interpreter=mi option")
+(defun warn (mess &optional args)
+  "Fake realgud:run-process used in testing"
+  (setq last-mess mess)
+  )
+
+(setq last-mess nil)
+(assert-equal '(("gdb" "-p") nil ("1955") nil)
+             (realgud:gdb-parse-cmd-args
+              '("gdb" "--interpreter=mi" "-p" "1955")))
+
+(assert-nil (null last-mess))
+(setq last-mess nil)
+
+(assert-equal '(("gdb" "-p") nil ("1954") nil)
+             (realgud:gdb-parse-cmd-args
+              '("gdb" "-i" "mi" "-p" "1954")))
+
+;; Restore the old value of realgud:run-process
+(assert-nil (null last-mess))
+(fset 'warn test:warn-save)
+
+
+(end-tests)
diff --git a/packages/realgud/test/test-gdb.el 
b/packages/realgud/test/test-gdb.el
new file mode 100644
index 0000000..cf07cec
--- /dev/null
+++ b/packages/realgud/test/test-gdb.el
@@ -0,0 +1,68 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "../realgud/common/buffer/command.el")
+(load-file "../realgud/debugger/gdb/core.el")
+(load-file "./regexp-helper.el")
+
+(eval-when-compile
+  (defvar realgud:gdb-minibuffer-history)
+  (defvar test:realgud-gdb-executable-save)
+  (defvar test:realgud-minibuffer-history-save)
+)
+
+(declare-function realgud:gdb-suggest-invocation 'realgud:bashdb)
+(declare-function __FILE__              'require-relative)
+
+(test-simple-start)
+
+;; Save value realgud:run-process and change it to something we want
+(setq test:realgud-gdb-executable-save (symbol-function 
'realgud:gdb-executable))
+(setq test:realgud-minibuffer-history-save realgud:gdb-minibuffer-history)
+
+(defun realgud:gdb-executable (filename)
+  "Mock function for testing"
+  (cond ((equal filename "bar.sh") 7)
+       ((equal filename "foo") 8)
+       ((equal filename "baz") 8)
+       (t 3)))
+
+(defun gdb-test()
+  (note "realgud:gdb-suggest-invocation")
+  (setq realgud:gdb-minibuffer-history nil)
+  (let ((my-directory (file-name-directory (__FILE__))))
+    (save-excursion
+      (note "Test preference to buffer editing")
+      (setq default-directory
+           (concat my-directory "gdb"))
+      (find-file-literally "foo.c")
+      (assert-equal "gdb foo" (realgud:gdb-suggest-invocation)
+                   "Should find file sans extension - foo")
+      (find-file-literally "baz.c")
+      (assert-equal "gdb baz" (realgud:gdb-suggest-invocation)
+                   "Should find file sans extension - baz")
+      )
+    (save-excursion
+      (note "Pick up non-sans executable")
+      (setq default-directory
+           (concat my-directory  "gdb/test2"))
+      ;; (assert-equal "gdb bar.sh" (realgud:gdb-suggest-invocation))
+      (setq realgud:gdb-minibuffer-history '("gdb testing"))
+      (setq default-directory
+           (concat my-directory  "gdb/test2"))
+      (assert-equal "gdb testing" (realgud:gdb-suggest-invocation)
+                   "After setting minibuffer history - takes precidence")
+      )
+    (setq default-directory my-directory)
+    )
+  )
+(gdb-test)
+(end-tests)
+
+;; Restore the old values.
+;; You might have to run the below if you run this interactively.
+(fset 'realgud:gdb-executable test:realgud-gdb-executable-save)
+(setq realgud:gdb-minibuffer-history test:realgud-minibuffer-history-save)
+(setq default-directory (file-name-directory (__FILE__)))
diff --git a/packages/realgud/test/test-gub-core.el 
b/packages/realgud/test/test-gub-core.el
new file mode 100644
index 0000000..cab0b0b
--- /dev/null
+++ b/packages/realgud/test/test-gub-core.el
@@ -0,0 +1,22 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/debugger/gub/core.el")
+
+(declare-function __FILE__ 'load-relative)
+(declare-function gub-parse-cmd-args 'realgud-gub-core)
+
+(test-simple-start)
+
+(note "form(s) involving gub.sh shell script")
+(assert-equal '("gub.sh" ("--gub=\"-I\"") ("./gcd.go" "3" "5"))
+             (gub-parse-cmd-args
+              '("gub.sh" "--gub=\"-I\"" "--" "./gcd.go" "3" "5")))
+
+(note "form(s) involving underlying tortoise interpreter")
+(assert-equal '("tortoise" ("-run" "-gub=" "-interp=SS") ("./gcd.go" "3" "5"))
+             (gub-parse-cmd-args
+              '("tortoise" "-run" "-gub=" "-interp=SS" "--" "./gcd.go" "3" 
"5")))
+
+(end-tests)
diff --git a/packages/realgud/test/test-ipdb.el 
b/packages/realgud/test/test-ipdb.el
new file mode 100644
index 0000000..77b32aa
--- /dev/null
+++ b/packages/realgud/test/test-ipdb.el
@@ -0,0 +1,40 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "../realgud/debugger/ipdb/ipdb.el")
+
+(eval-when-compile (defvar test:run-process-save))
+
+(declare-function ipdb-parse-cmd-args 'realgud:ipdb-core)
+(declare-function realgud:ipdb        'realgud:ipdb)
+(declare-function __FILE__            'load-relative)
+
+(test-simple-start)
+
+;; Save value realgud:run-process and change it to something we want
+(setq test:run-process-save (symbol-function 'realgud:run-process))
+(defun realgud:run-process(debugger-name script-filename cmd-args
+                                     minibuffer-histroy &optional no-reset)
+  "Fake realgud:run-process used in testing"
+  (note
+   (format "%s %s %s" debugger-name script-filename cmd-args))
+  (assert-equal "ipdb" debugger-name "debugger name gets passed")
+  (assert-equal (expand-file-name "./gcd.py") script-filename "file name 
check")
+  (assert-equal '("3" "5") (cddr cmd-args) "command args listified")
+  (generate-new-buffer "*cmdbuf-test*")
+  )
+
+(note "ipdb-parse-cmd-args")
+(assert-equal (list nil '("ipdb") (list (expand-file-name "foo")) nil)
+             (ipdb-parse-cmd-args '("ipdb" "foo")))
+(assert-equal (list nil '("ipdb") (list (expand-file-name "program.py") "foo") 
nil)
+             (ipdb-parse-cmd-args
+              '("ipdb" "program.py" "foo")))
+
+(realgud:ipdb "ipdb ./gcd.py 3 5")
+;; Restore the old value of realgud:run-process
+(fset 'realgud:run-process test:run-process-save)
+
+(end-tests)
diff --git a/packages/realgud/test/test-jdb.el 
b/packages/realgud/test/test-jdb.el
new file mode 100644
index 0000000..881b60d
--- /dev/null
+++ b/packages/realgud/test/test-jdb.el
@@ -0,0 +1,18 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "../realgud/debugger/jdb/core.el")
+(test-simple-start)
+
+(declare-function __FILE__  'load-relative)
+(declare-function realgud:jdb-parse-cmd-args 'realgud:jdb-core)
+(declare-function realgud:jdb-dot-to-slash   'realgud:jdb-core)
+
+(assert-equal '("jdb" nil ("./TestMe.java"))
+             (realgud:jdb-parse-cmd-args '("jdb" "./TestMe.java")))
+(assert-equal "mcb/pcingola/SnpEff/main"
+             (realgud:jdb-dot-to-slash "mcb.pcingola.SnpEff.main"))
+
+(end-tests)
diff --git a/packages/realgud/test/test-lang.el 
b/packages/realgud/test/test-lang.el
new file mode 100644
index 0000000..72f775c
--- /dev/null
+++ b/packages/realgud/test/test-lang.el
@@ -0,0 +1,65 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+
+(eval-when-compile
+  (defvar elisp-file)
+  (defvar elisp-buffer)
+)
+
+(set (make-local-variable 'elisp-file)
+     "../realgud/common/core.el")
+
+(load-file "../realgud/common/lang.el")
+(test-simple-start)
+
+(declare-function realgud-suggest-lang-file 'realgud-lang)
+(declare-function realgud:suggest-file-from-buffer 'realgud-lang)
+(declare-function realgud-lang-mode? 'realgud-lang)
+(declare-function __FILE__           'load-relative)
+
+(note "realgud-lang-mode?")
+
+(assert-nil
+ (realgud-lang-mode? elisp-file "ruby")
+ "realgud-lang-mode? with Lisp file")
+
+
+(save-excursion
+  (find-file "./gcd.rb")
+  (assert-t
+   (realgud-lang-mode? "./gcd.rb" "ruby")
+   "realgud-lang-mode? with Ruby file")
+  )
+
+
+(assert-equal "gcd.rb"
+              (realgud-suggest-lang-file "ruby" "\\.rb$")
+              "realgud-suggest-lang-file"
+              )
+
+(assert-equal "default.bogus"
+              (realgud-suggest-lang-file "bogus" "\\.bogus$" "default.bogus")
+              "realgud-suggest-lang-file"
+              )
+
+(assert-t (file-exists-p (realgud-suggest-lang-file "bogus" "\\.bogus$")))
+
+(note "realgud:suggest-file-from-buffer")
+
+
+(with-current-buffer
+    (setq elisp-buffer (find-file "./test-dbgr.el"))
+  (set (make-local-variable 'major-mode)
+       'emacs-lisp-mode)
+  (message "set major mode to %s" major-mode)
+  )
+(assert-equal (buffer-file-name elisp-buffer)
+                                (realgud:suggest-file-from-buffer
+                                 "emacs-lisp"
+                                 (list elisp-buffer))
+                                "realgud-lang-mode? with Lisp file")
+
+(end-tests)
diff --git a/packages/realgud/test/test-loc-regexp-gub.el 
b/packages/realgud/test/test-loc-regexp-gub.el
new file mode 100644
index 0000000..e6c4746
--- /dev/null
+++ b/packages/realgud/test/test-loc-regexp-gub.el
@@ -0,0 +1,63 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "./regexp-helper.el")
+(load-file "../realgud/common/regexp.el")
+(load-file "../realgud/debugger/gub/init.el")
+
+(declare-function realgud-cmdbuf-info-loc-regexp 'realgud-buffer-command)
+(declare-function cmdbuf-loc-match               'realgud-regexp)
+(declare-function realgud-loc-pat-regexp         'realgud-regexp)
+(declare-function realgud-loc-pat-file-group     'realgud-regexp)
+(declare-function realgud-loc-pat-line-group     'realgud-regexp)
+(declare-function realgud-cmdbuf-info-file-group 'realgud-regexp)
+(declare-function realgud-cmdbuf-info-line-group 'realgud-regexp)
+(declare-function realgud-cmdbuf-info            'realgud-regexp)
+(declare-function make-realgud-cmdbuf-info       'realgud-regexp)
+(declare-function __FILE__                       'load-relative)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar dbg-name)
+  (defvar realgud-pat-hash)
+  (defvar loc-pat)
+  (defvar test-dbgr)
+  (defvar test-text)
+)
+
+;; Some setup usually done in setting up the buffer.
+;; We customize this for the debugger trepan. Others may follow.
+;; FIXME: encapsulate this.
+(setq dbg-name "gub")
+(setq loc-pat (gethash "loc" (gethash dbg-name realgud-pat-hash)))
+
+(setq test-dbgr (make-realgud-cmdbuf-info
+                :debugger-name dbg-name
+                :loc-regexp (realgud-loc-pat-regexp loc-pat)
+                :file-group (realgud-loc-pat-file-group loc-pat)
+                :line-group (realgud-loc-pat-line-group loc-pat)))
+
+
+(setq test-text "interp/testdata/square.go:15:6")
+(assert-t (numberp (cmdbuf-loc-match test-text test-dbgr)) "basic location")
+
+(note "extract file name")
+(assert-equal 0 (cmdbuf-loc-match test-text test-dbgr))
+(assert-equal "interp/testdata/square.go"
+             (match-string (realgud-cmdbuf-info-file-group test-dbgr)
+                           test-text))
+
+(assert-equal "15"
+             (match-string
+              (realgud-cmdbuf-info-line-group test-dbgr)
+              test-text) "extract line number")
+
+(setq test-text " interp/testdata/square.go:15:6")
+(assert-nil (numberp (cmdbuf-loc-match test-text test-dbgr))
+           "location starts with blank")
+
+
+(end-tests)
diff --git a/packages/realgud/test/test-loc-regexp-nodejs.el 
b/packages/realgud/test/test-loc-regexp-nodejs.el
new file mode 100644
index 0000000..f9b647d
--- /dev/null
+++ b/packages/realgud/test/test-loc-regexp-nodejs.el
@@ -0,0 +1,115 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(load-file "./regexp-helper.el")
+(load-file "../realgud/common/regexp.el")
+(load-file "../realgud/debugger/nodejs/init.el")
+
+(declare-function realgud-cmdbuf-info-loc-regexp 'realgud-buffer-command)
+(declare-function cmdbuf-loc-match               'realgud-regexp-helper)
+(declare-function realgud-loc-pat-regexp         'realgud-regexp)
+(declare-function realgud-loc-pat-file-group     'realgud-regexp)
+(declare-function realgud-loc-pat-line-group     'realgud-regexp)
+(declare-function realgud-cmdbuf-info-file-group 'realgud-regexp)
+(declare-function realgud-cmdbuf-info-line-group 'realgud-regexp)
+(declare-function realgud-cmdbuf-info            'realgud-regexp)
+(declare-function make-realgud-cmdbuf-info       'realgud-regexp)
+(declare-function realgud-loc-pat-num            'realgud-regexp)
+(declare-function test-simple-start 'test-simple)
+(declare-function assert-t 'test-simple)
+(declare-function assert-equal 'test-simple)
+(declare-function note 'test-simple)
+(declare-function end-tests 'test-simple)
+(declare-function realgud-loc-pat-char-offset-group  'realgud:nodejs-init)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar file-group)
+  (defvar frame-re)
+  (defvar line-group)
+  (defvar num-group)
+  (defvar col-group)
+  (defvar test-pos)
+  (defvar bt-re)
+  (defvar dbg-name)
+  (defvar realgud-pat-hash)
+  (defvar loc-pat)
+  (defvar test-dbgr)
+  (defvar test-s1)
+  (defvar realgud-pat-bt)
+  (defvar realgud:nodejs-pat-hash)
+)
+
+; Some setup usually done in setting up the buffer.
+; We customize this for the debugger trepan. Others may follow.
+; FIXME: encapsulate this.
+(setq dbg-name "nodejs")
+(setq loc-pat (gethash "loc" (gethash dbg-name realgud-pat-hash)))
+
+(setq test-dbgr (make-realgud-cmdbuf-info
+                :debugger-name dbg-name
+                :loc-regexp (realgud-loc-pat-regexp loc-pat)
+                :file-group (realgud-loc-pat-file-group loc-pat)
+                :line-group (realgud-loc-pat-line-group loc-pat)))
+
+
+(note "debugger-backtrace")
+(setq realgud-pat-bt  (gethash "debugger-backtrace"
+                            realgud:nodejs-pat-hash))
+(setq test-s1
+      "#0 module.js:380:17
+#1 Module._compile module2.js:456:26
+#2 Module._extensions..js module.js:474:10
+#3 Module.load module.js:356:32
+")
+
+(setq bt-re (realgud-loc-pat-regexp realgud-pat-bt))
+(setq num-group (realgud-loc-pat-num realgud-pat-bt))
+(setq file-group (realgud-loc-pat-file-group realgud-pat-bt))
+(setq line-group (realgud-loc-pat-line-group realgud-pat-bt))
+(setq col-group (realgud-loc-pat-char-offset-group realgud-pat-bt))
+(assert-equal 0 (string-match bt-re test-s1))
+(assert-equal "0" (substring test-s1
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "module.js"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "380"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+(assert-equal "17" (substring test-s1
+                            (match-beginning col-group)
+                            (match-end col-group)))
+
+(setq test-pos (match-end 0))
+(assert-equal 19 (string-match bt-re test-s1 test-pos))
+
+(setq test-s1
+      "#1 Module._compile module2.js:456:26
+#2 Module._extensions..js module.js:474:10
+#3 Module.load module.js:356:32
+")
+(assert-equal 0 (string-match bt-re test-s1))
+
+(assert-equal "1" (substring test-s1
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "module2.js"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "456"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+(assert-equal "26" (substring test-s1
+                             (match-beginning col-group)
+                             (match-end col-group)))
+(setq test-pos (match-end 0))
+(assert-equal 36 test-pos)
+
+(end-tests)
diff --git a/packages/realgud/test/test-loc-regexp-trepan.el 
b/packages/realgud/test/test-loc-regexp-trepan.el
new file mode 100644
index 0000000..d8fd898
--- /dev/null
+++ b/packages/realgud/test/test-loc-regexp-trepan.el
@@ -0,0 +1,83 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "./regexp-helper.el")
+(load-file "../realgud/common/regexp.el")
+(load-file "../realgud/debugger/trepan/init.el")
+
+(declare-function realgud-cmdbuf-info-loc-regexp 'realgud-buffer-command)
+(declare-function cmdbuf-loc-match               'realgud-regexp)
+(declare-function realgud-loc-pat-regexp         'realgud-regexp)
+(declare-function realgud-loc-pat-file-group     'realgud-regexp)
+(declare-function realgud-loc-pat-line-group     'realgud-regexp)
+(declare-function realgud-cmdbuf-info-file-group 'realgud-regexp)
+(declare-function realgud-cmdbuf-info-line-group 'realgud-regexp)
+(declare-function realgud-cmdbuf-info            'realgud-regexp)
+(declare-function make-realgud-cmdbuf-info       'realgud-regexp)
+(declare-function __FILE__                       'load-relative)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar dbg-name)
+  (defvar realgud-pat-hash)
+  (defvar loc-pat)
+  (defvar test-dbgr)
+  (defvar test-text)
+)
+
+;; Some setup usually done in setting up the buffer.
+;; We customize this for the debugger trepan. Others may follow.
+;; FIXME: encapsulate this.
+(setq dbg-name "trepan")
+(setq loc-pat (gethash "loc" (gethash dbg-name realgud-pat-hash)))
+
+(setq test-dbgr (make-realgud-cmdbuf-info
+                :debugger-name dbg-name
+                :loc-regexp (realgud-loc-pat-regexp loc-pat)
+                :file-group (realgud-loc-pat-file-group loc-pat)
+                :line-group (realgud-loc-pat-line-group loc-pat)))
+
+(setq test-text "-- (/usr/local/bin/irb:9 @2)")
+(assert-t (numberp (cmdbuf-loc-match test-text test-dbgr)) "basic location")
+
+(note "extract file name")
+(assert-equal 0 (cmdbuf-loc-match test-text test-dbgr))
+(assert-equal "/usr/local/bin/irb"
+             (match-string (realgud-cmdbuf-info-file-group test-dbgr)
+                           test-text))
+
+(assert-equal "9"
+             (match-string
+              (realgud-cmdbuf-info-line-group test-dbgr)
+              test-text) "extract line number")
+
+(setq test-text "-> (<internal:lib/rubygems/custom_require>:28 remapped 
/usr/lib/ruby/gems/1.9.1/gems/data/custom_require.rb:28 @2)")
+(assert-t (numberp (cmdbuf-loc-match test-text test-dbgr)) "remapped location")
+
+(assert-equal 0 (cmdbuf-loc-match test-text test-dbgr))
+(assert-equal "/usr/lib/ruby/gems/1.9.1/gems/data/custom_require.rb"
+             (match-string (realgud-cmdbuf-info-file-group test-dbgr)
+                           test-text) "extract remapped file name")
+
+(assert-equal "28"
+             (match-string
+              (realgud-cmdbuf-info-line-group test-dbgr)
+              test-text) "extract remapped line number")
+
+(setq test-text "C> (/tmp/c-func.rb:2)")
+(assert-t (numberp (cmdbuf-loc-match test-text test-dbgr)) "basic location for 
C fn")
+
+(assert-equal 0 (cmdbuf-loc-match test-text test-dbgr))
+(assert-equal "/tmp/c-func.rb"
+             (match-string (realgud-cmdbuf-info-file-group test-dbgr)
+                           test-text) "extract file name for C fn")
+
+(assert-equal "2"
+             (match-string
+              (realgud-cmdbuf-info-line-group test-dbgr)
+              test-text) "extract line number for C fn")
+
+(end-tests)
diff --git a/packages/realgud/test/test-loc-regexp-trepanpl.el 
b/packages/realgud/test/test-loc-regexp-trepanpl.el
new file mode 100644
index 0000000..e56325d
--- /dev/null
+++ b/packages/realgud/test/test-loc-regexp-trepanpl.el
@@ -0,0 +1,128 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(load-file "./regexp-helper.el")
+(load-file "../realgud/common/regexp.el")
+(load-file "../realgud/debugger/trepan.pl/init.el")
+
+(declare-function realgud-cmdbuf-info-loc-regexp 'realgud-buffer-command)
+(declare-function cmdbuf-loc-match               'realgud-regexp-helper)
+(declare-function realgud-loc-pat-regexp         'realgud-regexp)
+(declare-function realgud-loc-pat-file-group     'realgud-regexp)
+(declare-function realgud-loc-pat-line-group     'realgud-regexp)
+(declare-function realgud-cmdbuf-info-file-group 'realgud-regexp)
+(declare-function realgud-cmdbuf-info-line-group 'realgud-regexp)
+(declare-function realgud-cmdbuf-info            'realgud-regexp)
+(declare-function make-realgud-cmdbuf-info       'realgud-regexp)
+(declare-function realgud-loc-pat-num            'realgud-regexp)
+(declare-function test-simple-start 'test-simple)
+(declare-function assert-t 'test-simple)
+(declare-function assert-equal 'test-simple)
+(declare-function note 'test-simple)
+(declare-function end-tests 'test-simple)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar file-group)
+  (defvar frame-re)
+  (defvar line-group)
+  (defvar num-group)
+  (defvar test-pos)
+  (defvar dbg-name)
+  (defvar realgud-pat-hash)
+  (defvar loc-pat)
+  (defvar test-dbgr)
+  (defvar test-s1)
+  (defvar realgud-pat-bt)
+  (defvar realgud:trepanpl-pat-hash)
+)
+
+; Some setup usually done in setting up the buffer.
+; We customize this for the debugger trepan. Others may follow.
+; FIXME: encapsulate this.
+(setq dbg-name "trepan.pl")
+(setq loc-pat (gethash "loc" (gethash dbg-name realgud-pat-hash)))
+
+(setq test-dbgr (make-realgud-cmdbuf-info
+                :debugger-name dbg-name
+                :loc-regexp (realgud-loc-pat-regexp loc-pat)
+                :file-group (realgud-loc-pat-file-group loc-pat)
+                :line-group (realgud-loc-pat-line-group loc-pat)))
+
+
+(setq test-s1 "-- main::(../example/gcd.pl:18)")
+(assert-t (numberp (cmdbuf-loc-match test-s1 test-dbgr)) "basic location")
+
+(assert-equal 0 (cmdbuf-loc-match test-s1 test-dbgr))
+
+(note "extract location fields")
+(assert-equal "../example/gcd.pl"
+             (match-string (realgud-cmdbuf-info-file-group test-dbgr)
+                           test-s1))
+
+(assert-equal "18"
+             (match-string
+              (realgud-cmdbuf-info-line-group test-dbgr)
+              test-s1) "extract line number")
+
+
+(note "Test with hex location")
+(setq test-s1 "-- File::Basename::(/usr/share/perl/5.14/File/Basename.pm:284 
@0x8918b70)")
+(assert-t (numberp (cmdbuf-loc-match test-s1 test-dbgr)) "basic location")
+(assert-equal 0 (cmdbuf-loc-match test-s1 test-dbgr))
+
+(assert-equal "/usr/share/perl/5.14/File/Basename.pm"
+             (match-string (realgud-cmdbuf-info-file-group test-dbgr)
+                           test-s1))
+
+(assert-equal "284"
+             (match-string
+              (realgud-cmdbuf-info-line-group test-dbgr)
+              test-s1) "extract line number")
+
+
+(note "debugger-backtrace")
+(setq realgud-pat-bt  (gethash "debugger-backtrace"
+                            realgud:trepanpl-pat-hash))
+(setq test-s1
+      "--> #0 @ = File::Basename::fileparse('/usr/local/bin/trepan.pl') in
+       file `/usr/share/perl/5.18.2/File/Basename.pm' at line 107
+    #1 @ = File::Basename::dirname('/usr/local/bin/trepan.pl') in
+       file `/usr/share/perl/5.18.2/File/Basename1.pm' at line 294
+    #2 file `/usr/local/bin/trepan.pl' at line 11
+")
+(setq frame-re (realgud-loc-pat-regexp realgud-pat-bt))
+(setq num-group (realgud-loc-pat-num realgud-pat-bt))
+(setq file-group (realgud-loc-pat-file-group realgud-pat-bt))
+(setq line-group (realgud-loc-pat-line-group realgud-pat-bt))
+(assert-equal 0 (string-match frame-re test-s1))
+(assert-equal "0" (substring test-s1
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "/usr/share/perl/5.18.2/File/Basename.pm"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "107"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+(setq test-pos (match-end 0))
+
+(assert-equal 127 (string-match frame-re test-s1 test-pos))
+(assert-equal "1" (substring test-s1
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "/usr/share/perl/5.18.2/File/Basename1.pm"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "294"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+(setq test-pos (match-end 0))
+(assert-equal 254 test-pos)
+
+(end-tests)
diff --git a/packages/realgud/test/test-loc.el 
b/packages/realgud/test/test-loc.el
new file mode 100644
index 0000000..3a9510a
--- /dev/null
+++ b/packages/realgud/test/test-loc.el
@@ -0,0 +1,63 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/common/buffer/source.el")
+(load-file "../realgud/common/loc.el")
+
+(declare-function __FILE__                    'load-relative)
+(declare-function make-realgud-loc            'realgud-loc)
+(declare-function realgud-loc-cmd-marker      'realgud-loc)
+(declare-function realgud-loc-line-number     'realgud-loc)
+(declare-function realgud-loc-marker          'realgud-loc)
+(declare-function realgud-loc-marker=         'realgud-loc)
+
+(test-simple-start)
+
+(save-current-buffer
+
+  ;; Below, we need to make sure current-buffer has an associated
+  ;; file with it.
+  (find-file (symbol-file 'test-simple))
+
+  (note "location field extraction")
+  (let* ((buff (current-buffer))
+        (filename (buffer-file-name buff))
+        (source-marker (point-marker))
+        (cmd-marker (point-marker))
+        (good-loc (make-realgud-loc
+                   :filename filename
+                   :line-number 5
+                   :marker source-marker
+                   :cmd-marker cmd-marker
+                   ))
+        (good-loc2 (make-realgud-loc
+                    :filename filename
+                    :line-number 6
+                    :marker source-marker
+                    :cmd-marker cmd-marker
+                    ))
+        ;; (good-loc3 (realgud-loc-current buff cmd-marker))
+        )
+
+    (assert-equal 5 (realgud-loc-line-number good-loc) "line-number 
extraction")
+
+    (assert-equal source-marker (realgud-loc-marker good-loc)
+                 "source code marker extraction")
+
+
+    (assert-equal cmd-marker (realgud-loc-cmd-marker good-loc)
+                 "command process marker extraction")
+
+
+    (realgud-loc-marker= good-loc2 source-marker)
+    (assert-equal source-marker (realgud-loc-marker good-loc2)
+                 "marker set")
+
+    ))
+
+(end-tests)
+
+; TODO: add test for debug-loc-goto, e.g.
+;(realgud-loc-goto (realgud-loc-new "/tmp/bashdb.diff" 8))
+;(realgud-loc-goto (realgud-loc-new "/tmp/bashdb.diff" 8) 'other-window 1)
diff --git a/packages/realgud/test/test-lochist.el 
b/packages/realgud/test/test-lochist.el
new file mode 100644
index 0000000..b684339
--- /dev/null
+++ b/packages/realgud/test/test-lochist.el
@@ -0,0 +1,114 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/common/loc.el")
+(load-file "../realgud/common/lochist.el")
+(load-file "../realgud/common/buffer/helper.el")
+
+(declare-function __FILE__                    'load-relative)
+(declare-function make-realgud-loc            'realgud-loc)
+(declare-function make-realgud-loc-his        'realgud-loc)
+(declare-function realgud-loc-hist-add        'realgud-lochist)
+(declare-function realgud-loc-hist-ring       'realgud-lochist)
+(declare-function realgud-loc-hist-item       'realgud-lochist)
+(declare-function realgud-loc-hist-position   'realgud-lochist)
+(declare-function realgud-loc-hist-index      'realgud-lochist)
+(declare-function realgud-loc-hist-newest     'realgud-lochist)
+(declare-function realgud:buffer-line-no-props 'realgud-buffer-helper)
+(declare-function make-realgud-loc-hist      'realgud-lochist)
+(declare-function ring-length 'ring)
+
+(declare-function realgud-get-cmdbuf-from-srcbuf 'realgud-buffer-helper)
+
+(test-simple-start)
+
+;;; (defun setup()
+;;;      (lexical-let ((loc-hist (make-realgud-loc-hist))
+;;;               (filename (buffer-file-name (current-buffer)))
+;;;               (loc (realgud-loc-current)))
+;;;        (realgud-loc-hist-add loc-hist loc)))
+;;;        ;; (message "aa ring-index %s"
+;;;        ;;          (realgud-loc-hist-index loc-hist))))
+
+;;; (setup)
+
+
+;; FIXME: redo tests, so we don't have to almost duplicate and
+;; dummy realgud-loc-current.
+(defun realgud-loc-current(&optional source-buffer cmd-marker)
+  "Create a location object for the point in the current buffer.
+   If SOURCE-BUFFER is not given, take the current buffer as the
+   source buffer."
+  (interactive "")
+  (unless source-buffer
+    (setq source-buffer (current-buffer)))
+  ;;(unless (realgud-srcbuf? source-buffer)
+  ;;  (error "%s is not a realgud source buffer" source-buffer))
+  (unless cmd-marker
+    (setq cmd-marker
+         (realgud-get-cmdbuf-from-srcbuf source-buffer))
+    )
+  (with-current-buffer source-buffer
+    (let ((mark (point-marker))
+         (text (realgud:buffer-line-no-props)))
+      (make-realgud-loc
+       :filename (buffer-file-name source-buffer)
+       :column-number (current-column)
+       :line-number (line-number-at-pos)
+       :source-text text
+       :marker      mark
+       :cmd-marker cmd-marker
+       )
+      )))
+
+
+(let ((saved-buffer (current-buffer)))
+  ; Below, we need to make sure current-buffer has an associated
+  ; file with it.
+  (find-file (symbol-file 'test-simple))
+
+  (note "location ring initialization and fields access")
+  (let* ((loc-hist (make-realgud-loc-hist))
+        (source-buffer (current-buffer))
+        (cmd-marker (point-marker))
+        (filename (buffer-file-name (current-buffer)))
+        (loc (realgud-loc-current source-buffer cmd-marker)))
+
+    (assert-t (ring-p (realgud-loc-hist-ring loc-hist))
+             "get ring component for a new history ring")
+
+
+    (assert-equal -1 (realgud-loc-hist-position loc-hist)
+                 "ring position for an empty history ring is -1")
+
+
+    (assert-nil (realgud-loc-hist-item loc-hist)
+               "get item for an empty history ring")
+
+    (realgud-loc-hist-add loc-hist loc)
+    (assert-equal loc (realgud-loc-hist-item loc-hist)
+                 "add an item to an empty history ring")
+
+
+    (assert-equal 1 (ring-length
+                    (realgud-loc-hist-ring loc-hist))
+                 "One item in history ring")
+
+    (assert-equal 1 (realgud-loc-hist-index loc-hist)
+                 "ring index in history ring is 1")
+
+    ;; (realgud-loc-hist-add loc-hist loc)
+    ;; (assert-equal 1 (ring-length
+    ;;                      (realgud-loc-hist-ring loc-hist) )
+    ;;                   "duplicate item added is ignored")
+
+
+    (assert-equal 1 (realgud-loc-hist-index loc-hist)
+                 "ring index in history ring after dup ignore is still 1")
+
+    (assert-equal -1 (realgud-loc-hist-newest loc-hist) "Set to newest 
position")
+
+            ))
+
+(end-tests)
diff --git a/packages/realgud/test/test-nodejs.el 
b/packages/realgud/test/test-nodejs.el
new file mode 100644
index 0000000..e6ab3bb
--- /dev/null
+++ b/packages/realgud/test/test-nodejs.el
@@ -0,0 +1,37 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/debugger/nodejs/nodejs.el")
+
+(eval-when-compile (defvar test:run-process-save))
+
+(declare-function nodejs-parse-cmd-args 'realgud:nodejs)
+(declare-function nodejs                'realgud:nodejs)
+(declare-function __FILE__              'load-relative)
+
+(test-simple-start)
+
+;; Save value realgud:run-process and change it to something we want
+(setq test:run-process-save (symbol-function 'realgud:run-process))
+(defun realgud:run-process(debugger-name script-filename cmd-args
+                                        minibuf-history &optional no-reset)
+  "Fake realgud:run-process used in testing"
+  (note
+   (format "%s %s %s" debugger-name script-filename cmd-args))
+  (assert-equal "node" debugger-name "debugger name gets passed")
+  (let ((expanded-name (expand-file-name "./gcd.js")))
+    (assert-equal  expanded-name script-filename "file name check")
+    ))
+
+(note "nodejs-parse-cmd-args")
+(assert-equal (list '("node" "debug") nil '("foo"))
+             (nodejs-parse-cmd-args '("node" "debug" "foo")))
+
+;; FIXME: need to mock remove-ansi-schmutz in realgud:nodejs
+;; (realgud:nodejs "node debug ./gcd.js 3 5")
+
+;; Restore the old value of realgud:run-process
+(fset 'realgud:run-process test:run-process-save)
+
+(end-tests)
diff --git a/packages/realgud/test/test-pdb.el 
b/packages/realgud/test/test-pdb.el
new file mode 100644
index 0000000..d58d5a0
--- /dev/null
+++ b/packages/realgud/test/test-pdb.el
@@ -0,0 +1,39 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "../realgud/debugger/pdb/pdb.el")
+
+(eval-when-compile (defvar test:run-process-save))
+
+(declare-function pdb-parse-cmd-args 'realgud:pdb-core)
+(declare-function realgud:pdb        'realgud:pdb)
+(declare-function __FILE__           'load-relative)
+
+(test-simple-start)
+
+;; Save value realgud:run-process and change it to something we want
+(setq test:run-process-save (symbol-function 'realgud:run-process))
+(defun realgud:run-process(debugger-name script-filename cmd-args
+                                     minibuffer-histroy &optional no-reset)
+  "Fake realgud:run-process used in testing"
+  (note
+   (format "%s %s %s" debugger-name script-filename cmd-args))
+  (assert-equal "pdb" debugger-name "debugger name gets passed")
+  (assert-equal (expand-file-name "./gcd.py") script-filename "file name 
check")
+  (assert-equal '("3" "5") (cddr cmd-args) "command args listified")
+  )
+
+(note "pdb-parse-cmd-args")
+(assert-equal (list nil '("pdb") (list (expand-file-name "foo")) nil)
+             (pdb-parse-cmd-args '("pdb" "foo")))
+(assert-equal (list nil '("pdb") (list (expand-file-name "program.py") "foo") 
nil)
+             (pdb-parse-cmd-args
+              '("pdb" "program.py" "foo")))
+
+(realgud:pdb "pdb ./gcd.py 3 5")
+;; Restore the old value of realgud:run-process
+(fset 'realgud:run-process test:run-process-save)
+
+(end-tests)
diff --git a/packages/realgud/test/test-perldb.el 
b/packages/realgud/test/test-perldb.el
new file mode 100644
index 0000000..90b4fef
--- /dev/null
+++ b/packages/realgud/test/test-perldb.el
@@ -0,0 +1,26 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/debugger/perldb/perldb.el")
+
+(declare-function realgud:perldb-parse-cmd-args 'realgud:perldb)
+(declare-function realgud:perldb        'realgud:perldb)
+(declare-function __FILE__              'load-relative)
+
+(declare-function realgud-perldb-parse-cmd-args 'realgud-perldb)
+(test-simple-start)
+
+(note "realgud:perldb-parse-cmd-args")
+(assert-equal (list
+              '("perl" "-W" "-d") nil
+              (list (expand-file-name"gcd.rb") "a" "b"))
+             (realgud:perldb-parse-cmd-args
+              '("perl" "-W" "-d" "gcd.rb" "a" "b")))
+(assert-equal (list
+              '("perl5.10.1" "-C" "/tmp" "-d") nil
+               (list (expand-file-name "gcd.rb")))
+             (realgud:perldb-parse-cmd-args
+              '("perl5.10.1" "-C" "/tmp" "-d" "gcd.rb")))
+
+(end-tests)
diff --git a/packages/realgud/test/test-rdebug.el 
b/packages/realgud/test/test-rdebug.el
new file mode 100644
index 0000000..20a7d22
--- /dev/null
+++ b/packages/realgud/test/test-rdebug.el
@@ -0,0 +1,45 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "../realgud/debugger/rdebug/rdebug.el")
+(declare-function rdebug-get-script-name 'realgud-rdebug)
+(declare-function __FILE__               'load-relative)
+(test-simple-start)
+
+(note "rdebug-get-script-name")
+(assert-equal '("foo" nil)
+             (rdebug-get-script-name '("rdebug" "foo")))
+(assert-equal '("foo" nil)
+             (rdebug-get-script-name '("rdebug" "-m" "foo")))
+(assert-equal '("foo" t)
+             (rdebug-get-script-name
+              '("rdebug" "--emacs" "3" "foo")))
+(assert-equal '("foo" t)
+             (rdebug-get-script-name
+              '("myrdebug" "--annotate=1" "foo")))
+(assert-equal '("foo" t)
+             (rdebug-get-script-name
+              '("ruby" "rdebug" "--annotate" "1" "foo")))
+(assert-equal '("foo" nil)
+             (rdebug-get-script-name
+              '("/usr/bin/ruby19" "rdebug"
+                "--emacs-basic" "foo")))
+(assert-equal '("foo" nil)
+             (rdebug-get-script-name '("rdbg.rb" "foo")))
+(assert-equal '("rdbg.rb" nil)
+             (rdebug-get-script-name
+              '("rdebug" "rdbg.rb" "foo")))
+(assert-equal '("foo" t)
+             (rdebug-get-script-name
+              '("rdebug" "-A" "1" "foo")))
+(assert-equal '("foo" nil)
+             (rdebug-get-script-name
+              '("rdebug" "--include" "me" "-n" "foo")))
+(assert-equal '("foo" nil)
+             (rdebug-get-script-name
+              '("rdebug" "--server" "-d" "--host"
+                "localhost" "foo" "-1")))
+
+(end-tests)
diff --git a/packages/realgud/test/test-realgud.el 
b/packages/realgud/test/test-realgud.el
new file mode 100644
index 0000000..2e7d09e
--- /dev/null
+++ b/packages/realgud/test/test-realgud.el
@@ -0,0 +1,31 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud.el")
+
+(declare-function realgud:loaded-features    'realgud)
+(declare-function realgud:unload-features    'realgud-regexp)
+(declare-function __FILE__                   'load-relative)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar test-realgud:features)
+)
+
+(note "realgud")
+
+(note "realgud:loaded-features")
+(set (make-local-variable 'test-realgud:features) (realgud:loaded-features))
+;; (dolist (feature '(realgud-trepan
+;;                            realgud-core))
+;;   (assert-t (not (not (member feature test-realgud:features)))) )
+
+(note "realgud-unload-features")
+(load-file "../realgud.el")
+(assert-nil (not (realgud:loaded-features)))
+(assert-nil (not (realgud:unload-features)))
+(realgud:loaded-features)
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp-bashdb.el 
b/packages/realgud/test/test-regexp-bashdb.el
new file mode 100644
index 0000000..5e34b0f
--- /dev/null
+++ b/packages/realgud/test/test-regexp-bashdb.el
@@ -0,0 +1,126 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "../realgud/debugger/bashdb/init.el")
+(load-file "./regexp-helper.el")
+
+(declare-function loc-match                     'realgud-helper)
+(declare-function prompt-match                   'regexp-helper)
+(declare-function realgud-loc-pat-num            'realgud-regexp)
+(declare-function realgud-loc-pat-regexp         'realgud-regexp)
+(declare-function realgud-loc-pat-file-group     'realgud-regexp)
+(declare-function realgud-loc-pat-line-group     'realgud-regexp)
+(declare-function __FILE__                       'load-relative)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar file-group)
+  (defvar frame-re)
+  (defvar line-group)
+  (defvar num-group)
+  (defvar test-pos)
+  (defvar prompt-pat)
+  (defvar realgud:bashdb-pat-hash)
+  (defvar realgud-pat-bt)
+  (defvar test-s1)
+  (defvar test-text)
+  (defvar brkpt-del)
+  (defvar bp-del-pat)
+  (defvar bp-enable-pat)
+  (defvar bp-disable-pat)
+)
+
+(set (make-local-variable 'bp-del-pat)
+      (gethash "brkpt-del" realgud:bashdb-pat-hash))
+
+(set (make-local-variable 'bp-enable-pat)
+      (gethash "brkpt-enable" realgud:bashdb-pat-hash))
+
+(set (make-local-variable 'bp-disable-pat)
+      (gethash "brkpt-disable" realgud:bashdb-pat-hash))
+
+(note "bashdb prompt matching")
+(set (make-local-variable 'prompt-pat)
+     (gethash "prompt" realgud:bashdb-pat-hash))
+(prompt-match "bashdb<10> "  "10")
+(prompt-match  "bashdb<(5)> " "5" "subshell prompt %s")
+(prompt-match  "bashdb<<1>> " "1" "nested debug prompt %s")
+
+(note "debugger-backtrace")
+(setq realgud-pat-bt  (gethash "debugger-backtrace"
+                            realgud:bashdb-pat-hash))
+(setq test-s1
+      "->0 in file `/etc/apparmor/functions' at line 24
+##1 source(\"/etc/apparmor/functions\") called from file 
`/etc/init.d/apparmor' at line 35
+##2 source(\"/etc/init.d/apparmor\") called from file `/usr/local/bin/bashdb' 
at line 140
+##3 main() called from file `/bin/bashdb' at line 0
+")
+(setq frame-re (realgud-loc-pat-regexp realgud-pat-bt))
+(setq num-group (realgud-loc-pat-num realgud-pat-bt))
+(setq file-group (realgud-loc-pat-file-group realgud-pat-bt))
+(setq line-group (realgud-loc-pat-line-group realgud-pat-bt))
+(assert-equal 0 (string-match frame-re test-s1))
+(assert-equal "0" (substring test-s1
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "/etc/apparmor/functions"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "24"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+(setq test-pos (match-end 0))
+
+(assert-equal 49 (string-match frame-re test-s1 test-pos))
+(assert-equal "1" (substring test-s1
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "/etc/init.d/apparmor"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "35"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+(setq test-pos (match-end 0))
+(assert-equal 138 (string-match frame-re test-s1 test-pos))
+(assert-equal "2" (substring test-s1
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "/usr/local/bin/bashdb"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "140"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+(setq test-pos (match-end 0))
+(assert-equal 226 (string-match frame-re test-s1 test-pos))
+(assert-equal "3" (substring test-s1
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "/bin/bashdb"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+
+(note "breakpoint delete matching")
+(setq test-text "Deleted breakpoint 1\n")
+(assert-t (numberp (loc-match test-text bp-del-pat)) "breakpoint delete 
matching")
+
+(note "breakpoint enable matching")
+(setq test-text "Breakpoint entry 4 enabled.\n")
+(assert-t (numberp (loc-match test-text bp-enable-pat)) "breakpoint enable 
matching")
+
+(note "breakpoint disable matching")
+(setq test-text "Breakpoint entry 2 disabled.\n")
+(assert-t (numberp (loc-match test-text bp-disable-pat)) "breakpoint disable 
matching")
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp-gdb.el 
b/packages/realgud/test/test-regexp-gdb.el
new file mode 100644
index 0000000..b649e78
--- /dev/null
+++ b/packages/realgud/test/test-regexp-gdb.el
@@ -0,0 +1,112 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "../realgud/common/buffer/command.el")
+(load-file "../realgud/debugger/gdb/init.el")
+(load-file "./regexp-helper.el")
+
+(declare-function __FILE__              'load-relative)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar dbg-name)   (defvar realgud-pat-hash)   (defvar realgud-bt-pat)
+  (defvar loc-pat)    (defvar prompt-pat)         (defvar test-s1)
+  (defvar file-group) (defvar line-group)         (defvar test-pos)
+  (defvar test-dbgr)  (defvar test-text)          (defvar realgud-bt-re)
+  (defvar realgud:gdb-pat-hash)
+)
+
+; Some setup usually done in setting up the buffer.
+; We customize this for this debugger.
+; FIXME: encapsulate this.
+(setq dbg-name "gdb")
+
+(setq loc-pat (gethash "loc" (gethash dbg-name realgud-pat-hash)))
+(setq test-dbgr (make-realgud-cmdbuf-info
+                 :debugger-name dbg-name
+                 :loc-regexp (realgud-loc-pat-regexp loc-pat)
+                 :file-group (realgud-loc-pat-file-group loc-pat)
+                 :line-group (realgud-loc-pat-line-group loc-pat)))
+
+;; FIXME: we get a void variable somewhere in here when running
+;;        even though we define it in lexical-let. Dunno why.
+;;        setq however will workaround this.
+(setq test-text "/home/rocky/c/ctest.c:80:2000:beg:0x8048748>")
+(note "traceback location matching")
+
+(assert-t (numberp (cmdbuf-loc-match test-text test-dbgr)) "basic location")
+(assert-equal "/home/rocky/c/ctest.c"
+             (match-string (realgud-cmdbuf-info-file-group test-dbgr)
+                           test-text) "extract file name")
+(assert-equal "80"
+             (match-string (realgud-cmdbuf-info-line-group test-dbgr)
+                           test-text) "extract line number")
+(note "debugger-backtrace")
+(setq realgud-bt-pat  (gethash "debugger-backtrace"
+                           realgud:gdb-pat-hash))
+(setq test-s1
+      "#0  main (argc=2, argv=0xbffff564, envp=0xbffff570) at main.c:935
+#1  0xb7e9f4a5 in *__GI___strdup (s=0xbffff760 \"/tmp/remake/remake\") at 
strdup.c:42
+#2  0x080593ac in main (argc=2, argv=0xbffff5a4, envp=0xbffff5b0)
+    at main.c:952
+#46 0xb7f51b87 in vm_call_cfunc (th=0x804d188, reg_cfp=0xb7ba9e88, num=0,
+    recv=157798080, blockptr=0x0, me=0x80d12a0) at vm_insnhelper.c:410
+")
+(setq realgud-bt-re (realgud-loc-pat-regexp realgud-bt-pat))
+(setq file-group (realgud-loc-pat-file-group realgud-bt-pat))
+(setq line-group (realgud-loc-pat-line-group realgud-bt-pat))
+(assert-equal 0 (string-match realgud-bt-re test-s1))
+(assert-equal "main.c"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "935"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+
+(setq test-pos (match-end 0))
+(assert-equal 65 test-pos)
+(assert-equal 65 (string-match realgud-bt-re test-s1 test-pos))
+(assert-equal "strdup.c"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "42"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+
+(setq test-pos (match-end 0))
+(assert-equal 149 test-pos)
+(assert-equal 149 (string-match realgud-bt-re test-s1 test-pos))
+(assert-equal "main.c"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "952"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+
+(setq test-pos (match-end 0))
+(assert-equal 233 test-pos)
+(assert-equal 233 (string-match realgud-bt-re test-s1 test-pos))
+(assert-equal "vm_insnhelper.c"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "410"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+
+(note "prompt")
+(set (make-local-variable 'prompt-pat)
+     (gethash "prompt" realgud:gdb-pat-hash))
+(prompt-match "(gdb) ")
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp-gub.el 
b/packages/realgud/test/test-regexp-gub.el
new file mode 100644
index 0000000..0240a05
--- /dev/null
+++ b/packages/realgud/test/test-regexp-gub.el
@@ -0,0 +1,65 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/common/buffer/command.el")
+(load-file "../realgud/debugger/gub/init.el")
+(load-file "./regexp-helper.el")
+
+(test-simple-start)
+
+(declare-function __FILE__                       'load-relative)
+
+(eval-when-compile
+  (defvar dbg-name)
+  (defvar realgud:gub-pat-hash)
+  (defvar panic-tb)
+  (defvar test-tb)
+  (defvar prompt-pat)
+  (defvar test-dbgr)
+  (defvar test-text)
+)
+
+; Some setup usually done in setting up the buffer.
+; We customize this for this debugger.
+; FIXME: encapsulate this.
+(setq dbg-name "gub")
+
+(note "gub prompt")
+(set (make-local-variable 'prompt-pat)
+     (gethash "prompt" realgud:gub-pat-hash))
+(prompt-match "gub[0]: ")
+(prompt-match "gub[20]: ")
+(prompt-match "address@hidden: ")
+
+(setup-regexp-vars realgud:gub-pat-hash)
+(set (make-local-variable 'test-tb)
+     (gethash "lang-backtrace"  realgud:gub-pat-hash))
+
+(note "go lang traceback")
+(setq test-text "/usr/local/go/src/pkg/runtime/panic.c:482 (0x805c956)")
+
+(assert-t (numberp (tb-loc-match test-text)) "go traceback location")
+(assert-equal "/usr/local/go/src/pkg/runtime/panic.c"
+             (match-string (realgud-loc-pat-file-group test-tb)
+                           test-text) "extract traceback file name")
+(assert-equal "482"
+             (match-string (realgud-loc-pat-line-group test-tb)
+                           test-text)   "extract traceback line number")
+
+(note "panic traceback")
+(setq test-text "      
/tmp/github.com/rocky/ssa-interp/eval/selectorexpr.go:18 +0x9f")
+
+(set (make-local-variable 'panic-tb)
+     (gethash "panic-backtrace"  realgud:gub-pat-hash))
+
+(assert-t (numberp (string-match (realgud-loc-pat-regexp panic-tb) test-text))
+         "go panic location")
+(assert-equal "/tmp/github.com/rocky/ssa-interp/eval/selectorexpr.go"
+             (match-string (realgud-loc-pat-file-group test-tb)
+                           test-text) "extract panic traceback file name")
+(assert-equal "18"
+             (match-string (realgud-loc-pat-line-group test-tb)
+                           test-text)   "extract panic traceback line number")
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp-ipdb.el 
b/packages/realgud/test/test-regexp-ipdb.el
new file mode 100644
index 0000000..a9a74cc
--- /dev/null
+++ b/packages/realgud/test/test-regexp-ipdb.el
@@ -0,0 +1,108 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/debugger/ipdb/init.el")
+(load-file "./regexp-helper.el")
+
+(declare-function __FILE__                       'load-relative)
+(declare-function loc-match                     'realgud-helper)
+(declare-function prompt-match                   'regexp-helper)
+(declare-function realgud-loc-pat-file-group     'realgud-regexp)
+(declare-function realgud-loc-pat-line-group     'realgud-regexp)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar loc-pat)   (defvar prompt-pat) (defvar realgud:ipdb-pat-hash)
+  (defvar tb-pat)    (defvar test-text)  (defvar prompt-str)
+  (defvar bps-pat)
+)
+
+(set (make-local-variable 'bps-pat)
+      (gethash "brkpt-set" realgud:ipdb-pat-hash))
+
+(set (make-local-variable 'loc-pat)
+     (gethash "loc"       realgud:ipdb-pat-hash))
+
+(set (make-local-variable 'prompt-pat)
+      (gethash "prompt"    realgud:ipdb-pat-hash))
+
+(set (make-local-variable 'tb-pat)
+      (gethash "lang-backtrace" realgud:ipdb-pat-hash))
+
+;; FIXME: we get a void variable somewhere in here when running
+;;        even though we define it in lexical-let. Dunno why.
+;;        setq however will workaround this.
+(setq test-text
+      "  File \"/usr/lib/python2.6/code.py\", line 281, in raw_input")
+(note "traceback location matching")
+
+(assert-t (numberp (loc-match test-text tb-pat)) "basic traceback location")
+
+(assert-equal "/usr/lib/python2.6/code.py"
+             (match-string (realgud-loc-pat-file-group tb-pat)
+                           test-text))
+
+(setq test-text
+      "  File \"/usr/lib/python2.6/code.py\", line 281, in raw_input")
+(loc-match test-text tb-pat)
+(assert-equal "281"
+             (match-string (realgud-loc-pat-line-group tb-pat)
+                           test-text) "extract line number")
+
+(note "breakpoint location matching")
+
+(setq test-text "Breakpoint 1 at /src/git/code/gcd.py:13")
+(assert-t (numberp (loc-match test-text bps-pat))
+         "basic breakpoint location")
+
+(assert-equal "/src/git/code/gcd.py"
+             (match-string (realgud-loc-pat-file-group
+                            bps-pat)
+                           test-text)
+             "extract breakpoint file name")
+
+
+(assert-equal "13"
+             (match-string (realgud-loc-pat-line-group
+                            bps-pat)
+                           test-text)   "extract breakpoint line number")
+
+;; (set test-text "(c:\\working\\python\\helloworld.py:30): <module>")
+;;
+;; (assert-t (numberp (loc-match test-text loc-pat)) "MS DOS position 
location")
+;; ;;
+;; (assert-equal "c:\\working\\python\\helloworld.py"
+;;     (match-string (realgud-loc-pat-file-group loc-pat)
+;;                   test-text)
+;;     (format "Failing file group is %s"
+;;                             (realgud-loc-pat-file-group tb-pat))
+;;     "extract file name")
+;; (assert-equal "30"
+;;           (match-string (realgud-loc-pat-line-group loc-pat)
+;;                         test-text) "extract line number")
+
+(setq test-text "> /usr/bin/ipython(24)<module>")
+(assert-t (numberp (loc-match test-text loc-pat)) "position location")
+(assert-equal "/usr/bin/ipython"
+             (match-string (realgud-loc-pat-file-group loc-pat)
+                           test-text)
+             (format "Failing file group is %s"
+                     (realgud-loc-pat-file-group tb-pat)))
+(assert-equal "24"
+             (match-string (realgud-loc-pat-line-group
+                            loc-pat)
+                           test-text)
+             "extract line number")
+
+
+(note "prompt matching")
+(set (make-local-variable 'prompt-str) "ipdb> ")
+(prompt-match prompt-str nil "debugger prompt: %s")
+(setq prompt-str "ipdb")
+(assert-nil (numberp (loc-match prompt-str prompt-pat))
+           (format "%s %s" "invalid debugger prompt"
+                   prompt-str))
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp-jdb.el 
b/packages/realgud/test/test-regexp-jdb.el
new file mode 100644
index 0000000..efac100
--- /dev/null
+++ b/packages/realgud/test/test-regexp-jdb.el
@@ -0,0 +1,78 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/common/buffer/command.el")
+(load-file "../realgud/debugger/jdb/init.el")
+(load-file "./regexp-helper.el")
+
+(declare-function __FILE__              'load-relative)
+(declare-function prompt-match          'regexp-helper)
+
+(eval-when-compile
+  (defvar dbg-name)   (defvar realgud-pat-hash)   (defvar loc-pat)
+  (defvar test-dbgr)  (defvar test-text)         (defvar prompt-pat)
+  (defvar realgud:jdb-pat-hash)
+)
+
+(test-simple-start)
+
+(note "jdb prompt matching")
+(set (make-local-variable 'prompt-pat)
+     (gethash "prompt" realgud:jdb-pat-hash))
+(prompt-match "main[1] "  "1" "most common main prompt")
+(prompt-match "main[2] "  "2" "main prompt up a level")
+(prompt-match "> " nil "no loc prompt")
+
+
+; Some setup usually done in setting up the buffer.
+; We customize this for this debugger.
+; FIXME: encapsulate this.
+(setq dbg-name "jdb")
+
+(setq loc-pat (gethash "loc" (gethash dbg-name realgud-pat-hash)))
+(setq test-dbgr (make-realgud-cmdbuf-info
+                :debugger-name dbg-name
+                :loc-regexp (realgud-loc-pat-regexp loc-pat)
+                :file-group (realgud-loc-pat-file-group loc-pat)
+                :line-group (realgud-loc-pat-line-group loc-pat)))
+
+;; FIXME: we get a void variable somewhere in here when running
+;;        even though we define it in lexical-let. Dunno why.
+;;        setq however will workaround this.
+(let ((text "Breakpoint hit: \"thread=main\", TestMe.main(), line=7 bci=0"))
+
+  (note "traceback location matching")
+
+  (assert-t (numberp (cmdbuf-loc-match text test-dbgr)) "breakpoint location")
+  (assert-equal "7"
+             (match-string (realgud-cmdbuf-info-line-group test-dbgr)
+                           text) "extract line number from breakpoint"))
+
+(let ((text "Step completed: \"thread=main\", TestMe.main(), line=71 bci=0"))
+  (assert-t (numberp (cmdbuf-loc-match text test-dbgr)) "breakpoint location")
+  (assert-equal "71"
+               (match-string (realgud-cmdbuf-info-line-group test-dbgr)
+                             text) "extract line number from step"))
+
+;; (note "debugger-backtrace")
+;; (setq realgud-bt-pat  (gethash "debugger-backtrace"
+;;                         realgud:jdb-pat-hash))
+;; (setq s1
+;;       "  [1] java.lang.Class.getDeclaredMethods0 (native method)
+;;   [2] java.lang.Class.privateGetDeclaredMethods (Class.java:2,570)
+;;   [3] java.lang.Class.getMethod0 (Class.java:2,813)
+;;   [4] java.lang.Class.getMethod (Class.java:1,663)
+;;   [5] sun.launcher.LauncherHelper.getMainMethod (LauncherHelper.java:494)
+;;   [6] sun.launcher.LauncherHelper.checkAndLoadMain (LauncherHelper.java:486)
+;; ")
+;; (setq realgud-bt-re (realgud-loc-pat-regexp realgud-bt-pat))
+;; (setq file-group (realgud-loc-pat-file-group realgud-bt-pat))
+;; (setq line-group (realgud-loc-pat-line-group realgud-bt-pat))
+;; (assert-equal 0 (string-match realgud-bt-re s1))
+;; (assert-equal "570"
+;;           (substring s1
+;;                      (match-beginning line-group)
+;;                      (match-end line-group)))
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp-nodejs.el 
b/packages/realgud/test/test-regexp-nodejs.el
new file mode 100644
index 0000000..c4ea10d
--- /dev/null
+++ b/packages/realgud/test/test-regexp-nodejs.el
@@ -0,0 +1,74 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/debugger/nodejs/init.el")
+(load-file "./regexp-helper.el")
+
+(declare-function realgud-cmdbuf-info-loc-regexp 'realgud-buffer-command)
+(declare-function cmdbuf-loc-match               'realgud-regexp)
+(declare-function loc-match                     'realgud-helper)
+(declare-function prompt-match                   'regexp-helper)
+(declare-function realgud-loc-pat-num            'realgud-regexp)
+(declare-function realgud-loc-pat-regexp         'realgud-regexp)
+(declare-function realgud-loc-pat-file-group     'realgud-regexp)
+(declare-function realgud-loc-pat-line-group     'realgud-regexp)
+(declare-function  make-realgud-cmdbuf-info      'realgud-regexp)
+(declare-function realgud-cmdbuf-info-file-group 'realgud-regexp)
+(declare-function realgud-cmdbuf-info-line-group 'realgud-regexp)
+(declare-function __FILE__                       'load-relative)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar dbg-name)
+  (defvar loc-pat)
+  (defvar bt-pat)
+  (defvar prompt-pat)
+  (defvar realgud:nodejs-pat-hash)
+  (defvar realgud-pat-hash)
+  (defvar test-dbgr)
+  (defvar test-text)
+  (defvar test-s1)
+)
+
+(note "nodejs prompt matching")
+(set (make-local-variable 'prompt-pat)
+     (gethash "prompt" realgud:nodejs-pat-hash))
+(prompt-match "debug> ")
+(prompt-match "debug> connecting... ok")
+
+(note "nodejs location matching")
+(setq dbg-name "nodejs")
+(setq loc-pat (gethash "loc" (gethash dbg-name realgud-pat-hash)))
+
+(setq test-dbgr (make-realgud-cmdbuf-info
+                :debugger-name dbg-name
+                :loc-regexp (realgud-loc-pat-regexp loc-pat)
+                :file-group (realgud-loc-pat-file-group loc-pat)
+                :line-group (realgud-loc-pat-line-group loc-pat)))
+
+(setq test-text "break in test/fixtures/break-in-module/main.js:1\n")
+(assert-t (numberp (cmdbuf-loc-match test-text test-dbgr)) "basic location")
+
+(string-match (realgud-cmdbuf-info-loc-regexp test-dbgr) test-text)
+(assert-equal "test/fixtures/break-in-module/main.js"
+             (match-string (realgud-cmdbuf-info-file-group test-dbgr)
+                           test-text) "extract file name")
+
+(string-match (realgud-cmdbuf-info-loc-regexp test-dbgr) test-text)
+(assert-equal "1"
+             (match-string
+              (realgud-cmdbuf-info-line-group test-dbgr)
+              test-text) "extract line number")
+
+(note "debugger-backtrace")
+(setq test-text
+    "#0 module.js:380:17
+")
+
+(set (make-local-variable
+      'bt-pat)
+      (gethash "debugger-backtrace" realgud:nodejs-pat-hash))
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp-pdb.el 
b/packages/realgud/test/test-regexp-pdb.el
new file mode 100644
index 0000000..dfb72af
--- /dev/null
+++ b/packages/realgud/test/test-regexp-pdb.el
@@ -0,0 +1,107 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/debugger/pdb/init.el")
+(load-file "./regexp-helper.el")
+
+(declare-function __FILE__              'load-relative)
+(declare-function prompt-match          'regexp-helper)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar loc-pat)   (defvar prompt-pat) (defvar realgud:pdb-pat-hash)
+  (defvar tb-pat)    (defvar test-text)  (defvar prompt-str)
+  (defvar bps-pat)
+)
+
+(set (make-local-variable 'bps-pat)
+      (gethash "brkpt-set" realgud:pdb-pat-hash))
+
+(set (make-local-variable 'loc-pat)
+     (gethash "loc"       realgud:pdb-pat-hash))
+
+(set (make-local-variable 'prompt-pat)
+      (gethash "prompt"    realgud:pdb-pat-hash))
+
+(set (make-local-variable 'tb-pat)
+      (gethash "lang-backtrace" realgud:pdb-pat-hash))
+
+;; FIXME: we get a void variable somewhere in here when running
+;;        even though we define it in lexical-let. Dunno why.
+;;        setq however will workaround this.
+(setq test-text
+      "  File \"/usr/lib/python2.6/code.py\", line 281, in raw_input")
+(note "traceback location matching")
+
+(assert-t (numberp (loc-match test-text tb-pat)) "basic traceback location")
+
+(assert-equal "/usr/lib/python2.6/code.py"
+             (match-string (realgud-loc-pat-file-group tb-pat)
+                           test-text))
+
+(setq test-text
+      "  File \"/usr/lib/python2.6/code.py\", line 281, in raw_input")
+(loc-match test-text tb-pat)
+(assert-equal "281"
+             (match-string (realgud-loc-pat-line-group tb-pat)
+                           test-text) "extract line number")
+
+(note "breakpoint location matching")
+
+(setq test-text "Breakpoint 1 at /src/git/code/gcd.py:13")
+(assert-t (numberp (loc-match test-text bps-pat))
+         "basic breakpoint location")
+
+(assert-equal "/src/git/code/gcd.py"
+             (match-string (realgud-loc-pat-file-group
+                            bps-pat)
+                           test-text)
+             "extract breakpoint file name")
+
+
+(assert-equal "13"
+             (match-string (realgud-loc-pat-line-group
+                            bps-pat)
+                           test-text)   "extract breakpoint line number")
+
+;; (set test-text "(c:\\working\\python\\helloworld.py:30): <module>")
+;;
+;; (assert-t (numberp (loc-match test-text loc-pat)) "MS DOS position 
location")
+;; ;;
+;; (assert-equal "c:\\working\\python\\helloworld.py"
+;;     (match-string (realgud-loc-pat-file-group loc-pat)
+;;                   test-text)
+;;     (format "Failing file group is %s"
+;;                             (realgud-loc-pat-file-group tb-pat))
+;;     "extract file name")
+;; (assert-equal "30"
+;;           (match-string (realgud-loc-pat-line-group loc-pat)
+;;                         test-text) "extract line number")
+
+(setq test-text "> /usr/bin/ipython(24)<module>")
+(assert-t (numberp (loc-match test-text loc-pat)) "position location")
+(assert-equal "/usr/bin/ipython"
+             (match-string (realgud-loc-pat-file-group loc-pat)
+                           test-text)
+             (format "Failing file group is %s"
+                     (realgud-loc-pat-file-group tb-pat)))
+(assert-equal "24"
+             (match-string (realgud-loc-pat-line-group
+                            loc-pat)
+                           test-text)
+             "extract line number")
+
+
+(note "prompt matching")
+(set (make-local-variable 'prompt-str) "(Pdb) ")
+(prompt-match prompt-str nil "debugger prompt: %s")
+(setq prompt-str "((Pdb)) ")
+(prompt-match prompt-str nil "nested debugger prompt: %s")
+(setq prompt-str "Pdb) ")
+(assert-nil (numberp (loc-match prompt-str prompt-pat))
+           (format "%s %s" "invalid debugger prompt"
+                   prompt-str))
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp-perldb.el 
b/packages/realgud/test/test-regexp-perldb.el
new file mode 100644
index 0000000..71ac0b6
--- /dev/null
+++ b/packages/realgud/test/test-regexp-perldb.el
@@ -0,0 +1,207 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/common/buffer/command.el")
+(load-file "../realgud/lang/perl.el")
+(load-file "../realgud/debugger/perldb/init.el")
+(load-file "./regexp-helper.el")
+
+(declare-function __FILE__              'load-relative)
+(declare-function prompt-match          'regexp-helper)
+(declare-function cmdbuf-loc-match      'realgud-regexp)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar dbg-name)
+  (defvar realgud:perldb-pat-hash)
+  (defvar realgud-pat-hash)
+  (defvar panic-tb)
+  (defvar loc-pat)
+  (defvar test-pos)
+  (defvar prompt-pat)
+  (defvar test-dbgr)
+  (defvar carp-bt-re)
+  (defvar file-group)
+  (defvar line-group)
+  (defvar test-text)
+  (defvar lang-bt-pat)
+  (defvar lang-bt-re)
+  (defvar realgud-bt-pat)
+  (defvar realgud-bt-re)
+  (defvar test-s1)
+  (defvar realgud-perl-ignore-file-re)
+)
+
+; Some setup usually done in setting up the buffer.
+; We customize this for this debugger.
+; FIXME: encapsulate this.
+(setq dbg-name "perldb")
+(set (make-local-variable 'loc-pat)
+     (gethash "loc"    (gethash dbg-name realgud-pat-hash)))
+(set (make-local-variable 'prompt-pat)
+     (gethash "prompt" realgud:perldb-pat-hash))
+
+(setq test-dbgr (make-realgud-cmdbuf-info
+                :debugger-name dbg-name
+                :loc-regexp (realgud-loc-pat-regexp loc-pat)
+                :file-group (realgud-loc-pat-file-group loc-pat)
+                :alt-line-group (realgud-loc-pat-alt-line-group loc-pat)
+                :alt-file-group (realgud-loc-pat-alt-file-group loc-pat)
+                :line-group (realgud-loc-pat-line-group loc-pat)
+                :text-group (realgud-loc-pat-text-group loc-pat)
+                ))
+
+(note "prompt")
+(prompt-match "  DB<2> "  "2")
+(prompt-match "[pid=6489->6502]  DB<1> " "1")
+
+(setq test-text "((eval 1006)[../example/eval.pl:5])")
+(assert-equal 1 (string-match realgud:perldb-loc-eval-regexp
+                             test-text)
+             "perldb eval loc matching")
+
+(assert-equal "../example/eval.pl"
+             (match-string (realgud-cmdbuf-info-alt-file-group test-dbgr)
+                           test-text)
+             "extract file name when we have source text")
+
+(assert-equal "5"
+             (match-string (realgud-cmdbuf-info-alt-line-group test-dbgr)
+                           test-text))
+
+(assert-equal 0 (string-match realgud-perl-ignore-file-re
+                             "(eval 1006)[../example/eval.pl:5]")
+             "perldb file ignore matching")
+
+(setq test-text "main::(/usr/bin/latex2html:102):\n")
+
+(assert-t (numberp (cmdbuf-loc-match test-text test-dbgr)) "basic location")
+(assert-equal "/usr/bin/latex2html"
+             (match-string (realgud-cmdbuf-info-file-group test-dbgr)
+                           test-text)
+             "extract file name")
+
+(setq test-text 
"File::Basename::dirname(/usr/share/perl/5.16.0/File/Basename.pm:284): my $path 
= shift;
+")
+
+(assert-t (numberp (cmdbuf-loc-match test-text test-dbgr))
+         "location with source")
+(assert-equal "/usr/share/perl/5.16.0/File/Basename.pm"
+             (match-string (realgud-cmdbuf-info-file-group test-dbgr)
+                           test-text)
+             "extract file name when we have source text")
+(assert-equal "284"
+             (match-string (realgud-cmdbuf-info-line-group test-dbgr)
+                           test-text)
+             "extract line number when we have source text")
+(assert-equal "my $path = shift;"
+             (match-string (realgud-cmdbuf-info-text-group test-dbgr)
+                           test-text)
+             "extract source text")
+
+(setq test-text "main::((eval 6)[eval.pl:5]:2):        $x = 2;")
+
+(assert-t (numberp (cmdbuf-loc-match test-text test-dbgr)) "eval location")
+
+(assert-equal "eval.pl"
+             (match-string (realgud-cmdbuf-info-alt-file-group test-dbgr)
+                           test-text)
+             "extract eval file name")
+
+(assert-equal "5"
+             (match-string (realgud-cmdbuf-info-alt-line-group test-dbgr)
+                           test-text) "extract line number")
+
+(note "location for with CODE in it")
+(setq test-text "main::CODE(0x9407ac8)(l2hconf.pm:6):\n")
+(assert-t (numberp (cmdbuf-loc-match test-text test-dbgr)))
+(assert-equal "l2hconf.pm"
+             (match-string (realgud-cmdbuf-info-file-group test-dbgr)
+                           test-text))
+(assert-equal "6"
+             (match-string (realgud-cmdbuf-info-line-group test-dbgr)
+                           test-text))
+
+(note "debugger-backtrace")
+(setq realgud-bt-pat  (gethash "debugger-backtrace"
+                           realgud:perldb-pat-hash))
+(setq test-s1
+      "$ = main::top_navigation_panel called from file `./latex2html' line 7400
+p")
+(setq realgud-bt-re (realgud-loc-pat-regexp realgud-bt-pat))
+(setq file-group (realgud-loc-pat-file-group realgud-bt-pat))
+(setq line-group (realgud-loc-pat-line-group realgud-bt-pat))
+(assert-equal 30 (string-match realgud-bt-re test-s1))
+(assert-equal "./latex2html"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "7400"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+
+(note "debugger-errmsg")
+(setq realgud-bt-pat  (gethash "perl-errmsg"
+                           realgud:perldb-pat-hash))
+(setq test-s1
+      "Use of uninitialized value $lines[0] in join or string at 
bin/../lib/LineCache.pm line 548.")
+(setq realgud-bt-re (realgud-loc-pat-regexp realgud-bt-pat))
+(setq file-group (realgud-loc-pat-file-group realgud-bt-pat))
+(setq line-group (realgud-loc-pat-line-group realgud-bt-pat))
+(assert-equal 54 (string-match realgud-bt-re test-s1))
+(assert-equal "bin/../lib/LineCache.pm"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "548"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+
+(note "carp-backtrace")
+(setq test-s1
+      " at /tmp/foo.pl line 7
+       main::__ANON__('Illegal division by zero at /tmp/foo.pl line 4.\x{a}') 
called at foo2.pl line 5
+       main::foo(3) called at foo3.pl line 8
+")
+(setq lang-bt-pat (gethash "lang-backtrace"
+                          realgud:perldb-pat-hash))
+(setq carp-bt-re (realgud-loc-pat-regexp lang-bt-pat))
+(setq file-group (realgud-loc-pat-file-group lang-bt-pat))
+(setq line-group (realgud-loc-pat-line-group lang-bt-pat))
+(assert-equal 0 (string-match carp-bt-re test-s1))
+(assert-equal "/tmp/foo.pl"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "7"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+(setq test-pos (match-end 0))
+
+(assert-equal 22 (string-match carp-bt-re test-s1 test-pos))
+(assert-equal "foo2.pl"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "5"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+
+(setq test-pos (match-end 0))
+(assert-equal 119 (string-match carp-bt-re test-s1 test-pos))
+(assert-equal "foo3.pl"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "8"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp-rdebug.el 
b/packages/realgud/test/test-regexp-rdebug.el
new file mode 100644
index 0000000..c57dc23
--- /dev/null
+++ b/packages/realgud/test/test-regexp-rdebug.el
@@ -0,0 +1,50 @@
+;; -*- lexical-binding:t -*-
+
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/debugger/rdebug/init.el")
+(load-file "./regexp-helper.el")
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar realgud-rdebug-pat-hash)
+)
+
+(setup-regexp-vars realgud-rdebug-pat-hash)
+(setq rails-bt (gethash "rails-backtrace" realgud-rdebug-pat-hash))
+
+;; FIXME: we get a void variable somewhere in here when running
+;;        even though we define it in lexical-let. Dunno why.
+;;        setq however will workaround this.
+(setq text "   from /usr/local/bin/irb:12:in `<main>'")
+(note "traceback location matching")
+(let ((text "  from /usr/local/bin/irb:12:in `<main>'"))
+  (assert-t (numberp (loc-match text helper-tb)) "basic traceback location")
+  (assert-equal "/usr/local/bin/irb"
+               (match-string (realgud-loc-pat-file-group helper-tb)
+                             text)
+               "extract traceback file name")
+  (assert-equal "12"
+               (match-string (realgud-loc-pat-line-group helper-tb)
+                             text) "extract traceback line number")
+  )
+
+(let ((text "Breakpoint 1 file /usr/bin/irb, line 10\n"))
+  (assert-t (numberp (loc-match text helper-bps)) "basic breakpoint location")
+  (assert-equal "/usr/bin/irb"
+               (match-string (realgud-loc-pat-file-group helper-bps)
+                             text) "extract breakpoint file name")
+  (assert-equal "10"
+               (match-string (realgud-loc-pat-line-group helper-bps)
+                             text)   "extract breakpoint line number")
+  )
+
+(note "prompt")
+(set (make-local-variable 'prompt-pat)
+     (gethash "prompt" realgud-rdebug-pat-hash))
+(prompt-match "(rdb:1) ")
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp-remake.el 
b/packages/realgud/test/test-regexp-remake.el
new file mode 100644
index 0000000..1aa2748
--- /dev/null
+++ b/packages/realgud/test/test-regexp-remake.el
@@ -0,0 +1,69 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/debugger/remake/init.el")
+(load-file "./regexp-helper.el")
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar prompt-pat) (defvar frame-pat)   (defvar frame-re)
+  (defvar loc-pat)    (defvar prompt-pat)  (defvar test-text)
+  (defvar file-group) (defvar line-group)  (defvar test-pos)
+  (defvar num-pat)    (defvar num-group)   (defvar realgud:remake-pat-hash)
+)
+
+(set (make-local-variable 'prompt-pat)
+     (gethash "prompt"             realgud:remake-pat-hash))
+(set (make-local-variable 'frame-pat)
+     (gethash "debugger-backtrace" realgud:remake-pat-hash))
+
+(note "remake prompt")
+(prompt-match "remake<10> "  "10")
+(prompt-match  "remake<<1>> " "1" "recursive remake %s")
+
+(note "remake debugger-backtrace")
+(setq test-text
+      "=>#0  Makefile.in at /tmp/Makefile:216
+  #1  Makefile at /tmp/Makefile:230
+")
+
+(set (make-local-variable 'frame-re)
+     (realgud-loc-pat-regexp frame-pat))
+(set (make-local-variable 'num-group)
+     (realgud-loc-pat-num frame-pat))
+(set (make-local-variable 'file-group)
+     (realgud-loc-pat-file-group frame-pat))
+(set (make-local-variable 'line-group)
+     (realgud-loc-pat-line-group frame-pat))
+
+(assert-equal 0 (string-match frame-re test-text))
+(assert-equal "0" (substring test-text
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "/tmp/Makefile"
+             (substring test-text
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "216"
+             (substring test-text
+                        (match-beginning line-group)
+                        (match-end line-group)))
+(set (make-local-variable 'test-pos)
+     (match-end 0))
+
+(assert-equal 39 (string-match frame-re test-text test-pos))
+(assert-equal "1" (substring test-text
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "/tmp/Makefile"
+             (substring test-text
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "230"
+             (substring test-text
+                        (match-beginning line-group)
+                        (match-end line-group)))
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp-ruby.el 
b/packages/realgud/test/test-regexp-ruby.el
new file mode 100644
index 0000000..a2392b1
--- /dev/null
+++ b/packages/realgud/test/test-regexp-ruby.el
@@ -0,0 +1,43 @@
+;; -*- lexical-binding:t -*-
+
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+;; Don't have a pat-hash for ruby, so we need something that pulls in
+;; Ruby.
+(load-file "./regexp-helper.el")
+(load-file "../realgud/debugger/rdebug/init.el")
+
+(test-simple-start)
+
+(setq bt  (gethash "rails-backtrace" realgud-rdebug-pat-hash))
+
+;; FIXME: we get a void variable somewhere in here when running
+;;        even though we define it in lexical-let. Dunno why.
+;;        setq however will workaround this.
+(setq text "/tmp/rails-2.3.5/lib/tasks/databases.rake:360")
+
+(let ((text "/tmp/rails-2.3.5/lib/tasks/databases.rake:360"))
+
+  (assert-t (numberp (loc-match text bt)) "basic traceback location")
+  (assert-equal "/tmp/rails-2.3.5/lib/tasks/databases.rake"
+               (match-string (realgud-loc-pat-file-group bt)
+                             text) "extract traceback file name")
+  (assert-equal "360"
+               (match-string (realgud-loc-pat-line-group bt)
+                             text)   "extract traceback line number")
+  )
+
+(let ((text
+       "/tmp/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'"))
+
+  (assert-t (numberp (loc-match text bt)) "traceback location with in")
+  (assert-equal "/tmp/gems/rake-0.8.7/lib/rake.rb"
+               (match-string (realgud-loc-pat-file-group bt)
+                             text)   "extract traceback file name 2")
+  (assert-equal "597"
+               (match-string (realgud-loc-pat-line-group bt)
+                             text)   "extract breakpoint line number 2")
+  )
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp-trepan.el 
b/packages/realgud/test/test-regexp-trepan.el
new file mode 100644
index 0000000..bff0331
--- /dev/null
+++ b/packages/realgud/test/test-regexp-trepan.el
@@ -0,0 +1,124 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/debugger/trepan/init.el")
+(load-file "./regexp-helper.el")
+
+(test-simple-start)
+
+(set (make-local-variable 'bps-pat)
+     (gethash "brkpt-set"          realgud:trepan-pat-hash))
+(set (make-local-variable 'dbg-bt-pat)
+     (gethash "debugger-backtrace" realgud:trepan-pat-hash))
+(set (make-local-variable 'prompt-pat)
+     (gethash "prompt"             realgud:trepan-pat-hash))
+(set (make-local-variable 'lang-bt-pat)
+     (gethash "lang-backtrace"     realgud:trepan-pat-hash))
+(set (make-local-variable 'ctrl-pat)
+     (gethash "control-frame"      realgud:trepan-pat-hash))
+
+;; FIXME: we get a void variable somewhere in here when running
+;;        even though we define it in lexical-let. Dunno why.
+;;        setq however will workaround this.
+(set (make-local-variable 'text)
+ "     from /usr/local/bin/irb:12:in `<main>'")
+
+(note "traceback location matching")
+
+(setq text "   from /usr/local/bin/irb:12:in `<main>'")
+
+(assert-t (numberp (loc-match text lang-bt-pat))
+         "basic traceback location")
+(assert-equal "/usr/local/bin/irb"
+             (match-string (realgud-loc-pat-file-group lang-bt-pat) text)
+             "extract traceback file name")
+
+(assert-equal "12"
+             (match-string (realgud-loc-pat-line-group
+                            lang-bt-pat) text)
+             "extract traceback line number")
+
+(note "debugger-backtrace")
+(set (make-local-variable 's1)
+     "--> #0 METHOD Object#require(path) in file <internal:lib/require> at 
line 28
+    #1 TOP Object#<top /tmp/linecache.rb> in file /tmp/linecache.rb
+")
+
+(set (make-local-variable 'frame-re)
+     (realgud-loc-pat-regexp dbg-bt-pat))
+(set (make-local-variable 'num-group)
+     (realgud-loc-pat-num dbg-bt-pat))
+(set (make-local-variable 'file-group)
+     (realgud-loc-pat-file-group dbg-bt-pat))
+(set (make-local-variable 'line-group)
+     (realgud-loc-pat-line-group dbg-bt-pat))
+
+(assert-equal 0 (string-match frame-re s1))
+(assert-equal "0" (substring s1
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "<internal:lib/require>"
+             (substring s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "28"
+             (substring s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+(setq pos (match-end 0))
+
+(assert-equal 77 (string-match frame-re s1 pos))
+(assert-equal "1" (substring s1
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "/tmp/linecache.rb"
+             (substring s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+
+(note "prompt")
+(prompt-match "(trepan): ")
+(prompt-match "((trepan)): " nil "nested debugger prompt: %s")
+(prompt-match "((address@hidden)): " "@55" "nested debugger prompt with addr: 
%s")
+(prompt-match "((address@hidden)): " "@main"
+             "nested debugger prompt with method: %s")
+(setq prompt-str "trepan:")
+(assert-nil (loc-match prompt-str prompt-pat)
+           (format "invalid prompt %s" prompt-str))
+
+
+(note "control-frame")
+(assert-equal 0 (loc-match
+                "c:0026 p:0181 s:0136 b:0136 l:000135 d:000135 METHOD 
/trepan-0.0.1/app/frame.rb:132 "
+                ctrl-pat)
+             )
+(assert-equal 0 (loc-match
+                "c:0030 p:0041 s:0144 b:0144 l:00226c d:00226c METHOD 
/gems/trepan-0.0.1/processor/eval.rb:15 "
+                ctrl-pat)
+             )
+(assert-equal 0 (loc-match
+                "c:0015 p:0139 s:0070 b:0070 l:000063 d:000069 BLOCK  
/gems/app/core.rb:121"
+                ctrl-pat)
+             )
+
+(setq text "Breakpoint 1 set at VM offset 2 of instruction sequence \"<top 
/usr/local/bin/irb>\",
+       line 9 in file /usr/local/bin/irb.
+")
+
+
+(assert-t (numberp (loc-match text bps-pat))
+         "basic breakpoint location")
+
+
+(assert-equal "/usr/local/bin/irb"
+             (match-string (realgud-loc-pat-file-group
+                            bps-pat) text)
+             "extract breakpoint file name")
+
+(assert-equal "9"
+             (match-string (realgud-loc-pat-line-group
+                            bps-pat) text)
+             "extract breakpoint line number")
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp-trepan2.el 
b/packages/realgud/test/test-regexp-trepan2.el
new file mode 100644
index 0000000..15ed531
--- /dev/null
+++ b/packages/realgud/test/test-regexp-trepan2.el
@@ -0,0 +1,167 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "./regexp-helper.el")
+(load-file "../realgud/debugger/trepan2/init.el")
+
+(declare-function loc-match                     'realgud-helper)
+(declare-function prompt-match                   'regexp-helper)
+(declare-function realgud-loc-pat-num            'realgud-regexp)
+(declare-function realgud-loc-pat-regexp         'realgud-regexp)
+(declare-function realgud-loc-pat-file-group     'realgud-regexp)
+(declare-function realgud-loc-pat-line-group     'realgud-regexp)
+(declare-function __FILE__                       'load-relative)
+(declare-function setup-regexp-vars              'regexp-helper)
+(declare-function realgud-loc-pat-text-group     'realgud-trepan2-init)
+
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar file-group)
+  (defvar frame-re)
+  (defvar line-group)
+  (defvar num-group)
+  (defvar test-pos)
+  (defvar test-s1)
+  (defvar helper-tb)
+  (defvar helper-bps)
+  (defvar prompt-pat)
+  (defvar realgud-pat-bt)
+  (defvar helper-loc)
+  (defvar realgud:trepan2-pat-hash)
+  (defvar trepan2-text)
+)
+
+(note "prompt matching")
+
+(set (make-local-variable 'prompt-pat)
+     (gethash "prompt" realgud:trepan2-pat-hash))
+
+(prompt-match "(trepan2) ")
+
+(setup-regexp-vars realgud:trepan2-pat-hash)
+
+(note "debugger-backtrace")
+(setq realgud-pat-bt  (gethash "debugger-backtrace"
+                            realgud:trepan2-pat-hash))
+(setq test-s1
+      "##0 gcd(a=3, b=5) called from file '/tmp/test/gcd.py' at line 31
+->1 <module> exec()
+     '/tmp/test/gcd2.py' at line 41
+")
+(setq frame-re (realgud-loc-pat-regexp realgud-pat-bt))
+(setq num-group (realgud-loc-pat-num realgud-pat-bt))
+(setq file-group (realgud-loc-pat-file-group realgud-pat-bt))
+(setq line-group (realgud-loc-pat-line-group realgud-pat-bt))
+(assert-equal 0 (string-match frame-re test-s1))
+(assert-equal "0" (substring test-s1
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "/tmp/test/gcd.py"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "31"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+(setq test-pos (match-end 0))
+
+(assert-equal 64 (string-match frame-re test-s1 test-pos))
+(assert-equal "1" (substring test-s1
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "/tmp/test/gcd2.py"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "41"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+(setq test-pos (match-end 0))
+(assert-equal 120 test-pos)
+
+(setq helper-tb  (gethash "lang-backtrace" realgud:trepan2-pat-hash))
+
+(note "traceback location matching")
+(setq test-s1
+      "  File \"/usr/lib/python2.6/code.py\", line 281, in raw_input")
+
+(assert-t (numberp (loc-match test-s1 helper-tb))
+         "basic traceback location")
+
+(assert-equal "/usr/lib/python2.6/code.py"
+             (match-string (realgud-loc-pat-file-group helper-tb)
+                           test-s1)
+             (format "extract file - failing file group is %s"
+                     (realgud-loc-pat-file-group helper-tb)))
+(assert-equal "281"
+             (match-string (realgud-loc-pat-line-group helper-tb)
+                           test-s1) "extract line number")
+
+(note "breakpoint location matching")
+
+(setq test-s1
+      "Breakpoint 1 set at line 13 of file /src/git/code/gcd.py")
+
+(assert-t (numberp (loc-match test-s1 helper-bps))
+         "basic breakpoint location")
+(assert-equal "/src/git/code/gcd.py"
+             (match-string (realgud-loc-pat-file-group helper-bps)
+                           test-s1)   "extract breakpoint file name")
+(assert-equal "13"
+             (match-string (realgud-loc-pat-line-group helper-bps)
+                           test-s1)
+             "extract breakpoint line number")
+(setq test-s1 "(c:\\working\\python\\helloworld.py:30): <module>")
+(assert-t (numberp (loc-match test-s1 helper-loc))
+         "MS DOS position location")
+(assert-equal "c:\\working\\python\\helloworld.py"
+             (match-string (realgud-loc-pat-file-group helper-loc)
+                           test-s1)
+             (format "extract file - Failing file group is %s"
+                     (realgud-loc-pat-file-group helper-tb)))
+(assert-equal "30"
+             (match-string (realgud-loc-pat-line-group helper-loc)
+                           test-s1)   "extract line number")
+
+(setq test-s1 "(/usr/bin/ipython:24 @31): <module>")
+(assert-t (numberp (loc-match test-s1 helper-loc))
+         "position location")
+(assert-equal "/usr/bin/ipython"
+             (match-string (realgud-loc-pat-file-group helper-loc)
+                           test-s1)
+             (format "extract-file - failing file group is %s"
+                     (realgud-loc-pat-file-group helper-tb)))
+(assert-equal "24"
+             (match-string (realgud-loc-pat-line-group helper-loc)
+                           test-s1)
+             "extract line number")
+
+(setq test-s1
+      "(/tmp/eval_stringzDKTfr.py:1 remapped <string>): <module>")
+(assert-t (numberp (loc-match test-s1 helper-loc))   "position location")
+(assert-equal "/tmp/eval_stringzDKTfr.py"
+             (match-string (realgud-loc-pat-file-group helper-loc)
+                           test-s1)
+             (format "extract-file name - failing file group is %s"
+                     (realgud-loc-pat-file-group helper-tb)))
+(assert-equal "1"
+             (match-string (realgud-loc-pat-line-group helper-loc)
+                           test-s1)   "extract line number")
+
+(note "source text")
+
+(setq test-s1
+      "(/usr/local/bin/trepan2:4): <module>\n-- 4 import 
sys\n(trepan2) ")
+(assert-t (numberp (loc-match test-s1 helper-loc)) "source location")
+(assert-equal
+ "import sys"
+ (match-string (realgud-loc-pat-text-group helper-loc)
+              test-s1)   "extract source text")
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp-trepan3k.el 
b/packages/realgud/test/test-regexp-trepan3k.el
new file mode 100644
index 0000000..1c60d52
--- /dev/null
+++ b/packages/realgud/test/test-regexp-trepan3k.el
@@ -0,0 +1,167 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "./regexp-helper.el")
+(load-file "../realgud/debugger/trepan3k/init.el")
+
+(declare-function loc-match                     'realgud-helper)
+(declare-function prompt-match                   'regexp-helper)
+(declare-function realgud-loc-pat-num            'realgud-regexp)
+(declare-function realgud-loc-pat-regexp         'realgud-regexp)
+(declare-function realgud-loc-pat-file-group     'realgud-regexp)
+(declare-function realgud-loc-pat-line-group     'realgud-regexp)
+(declare-function __FILE__                       'load-relative)
+(declare-function setup-regexp-vars              'regexp-helper)
+(declare-function realgud-loc-pat-text-group     'realgud-trepan3k-init)
+
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar file-group)
+  (defvar frame-re)
+  (defvar line-group)
+  (defvar num-group)
+  (defvar test-pos)
+  (defvar test-s1)
+  (defvar helper-tb)
+  (defvar helper-bps)
+  (defvar prompt-pat)
+  (defvar realgud-pat-bt)
+  (defvar helper-loc)
+  (defvar realgud:trepan3k-pat-hash)
+  (defvar trepan3k-text)
+)
+
+(note "prompt matching")
+
+(set (make-local-variable 'prompt-pat)
+     (gethash "prompt" realgud:trepan3k-pat-hash))
+
+(prompt-match "(trepan3k) ")
+
+(setup-regexp-vars realgud:trepan3k-pat-hash)
+
+(note "debugger-backtrace")
+(setq realgud-pat-bt  (gethash "debugger-backtrace"
+                            realgud:trepan3k-pat-hash))
+(setq test-s1
+      "##0 gcd(a=3, b=5) called from file '/tmp/test/gcd.py' at line 31
+->1 <module> exec()
+     '/tmp/test/gcd2.py' at line 41
+")
+(setq frame-re (realgud-loc-pat-regexp realgud-pat-bt))
+(setq num-group (realgud-loc-pat-num realgud-pat-bt))
+(setq file-group (realgud-loc-pat-file-group realgud-pat-bt))
+(setq line-group (realgud-loc-pat-line-group realgud-pat-bt))
+(assert-equal 0 (string-match frame-re test-s1))
+(assert-equal "0" (substring test-s1
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "/tmp/test/gcd.py"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "31"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+(setq test-pos (match-end 0))
+
+(assert-equal 64 (string-match frame-re test-s1 test-pos))
+(assert-equal "1" (substring test-s1
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "/tmp/test/gcd2.py"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "41"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+(setq test-pos (match-end 0))
+(assert-equal 120 test-pos)
+
+(setq helper-tb  (gethash "lang-backtrace" realgud:trepan3k-pat-hash))
+
+(note "traceback location matching")
+(setq test-s1
+      "  File \"/usr/lib/python2.6/code.py\", line 281, in raw_input")
+
+(assert-t (numberp (loc-match test-s1 helper-tb))
+         "basic traceback location")
+
+(assert-equal "/usr/lib/python2.6/code.py"
+             (match-string (realgud-loc-pat-file-group helper-tb)
+                           test-s1)
+             (format "extract file - failing file group is %s"
+                     (realgud-loc-pat-file-group helper-tb)))
+(assert-equal "281"
+             (match-string (realgud-loc-pat-line-group helper-tb)
+                           test-s1) "extract line number")
+
+(note "breakpoint location matching")
+
+(setq test-s1
+      "Breakpoint 1 set at line 13 of file /src/git/code/gcd.py")
+
+(assert-t (numberp (loc-match test-s1 helper-bps))
+         "basic breakpoint location")
+(assert-equal "/src/git/code/gcd.py"
+             (match-string (realgud-loc-pat-file-group helper-bps)
+                           test-s1)   "extract breakpoint file name")
+(assert-equal "13"
+             (match-string (realgud-loc-pat-line-group helper-bps)
+                           test-s1)
+             "extract breakpoint line number")
+(setq test-s1 "(c:\\working\\python\\helloworld.py:30): <module>")
+(assert-t (numberp (loc-match test-s1 helper-loc))
+         "MS DOS position location")
+(assert-equal "c:\\working\\python\\helloworld.py"
+             (match-string (realgud-loc-pat-file-group helper-loc)
+                           test-s1)
+             (format "extract file - Failing file group is %s"
+                     (realgud-loc-pat-file-group helper-tb)))
+(assert-equal "30"
+             (match-string (realgud-loc-pat-line-group helper-loc)
+                           test-s1)   "extract line number")
+
+(setq test-s1 "(/usr/bin/ipython:24): <module>")
+(assert-t (numberp (loc-match test-s1 helper-loc))
+         "position location")
+(assert-equal "/usr/bin/ipython"
+             (match-string (realgud-loc-pat-file-group helper-loc)
+                           test-s1)
+             (format "extract-file - failing file group is %s"
+                     (realgud-loc-pat-file-group helper-tb)))
+(assert-equal "24"
+             (match-string (realgud-loc-pat-line-group helper-loc)
+                           test-s1)
+             "extract line number")
+
+(setq test-s1
+      "(/tmp/eval_stringzDKTfr.py:1 remapped <string>): <module>")
+(assert-t (numberp (loc-match test-s1 helper-loc))   "position location")
+(assert-equal "/tmp/eval_stringzDKTfr.py"
+             (match-string (realgud-loc-pat-file-group helper-loc)
+                           test-s1)
+             (format "extract-file name - failing file group is %s"
+                     (realgud-loc-pat-file-group helper-tb)))
+(assert-equal "1"
+             (match-string (realgud-loc-pat-line-group helper-loc)
+                           test-s1)   "extract line number")
+
+(note "source text")
+
+(setq test-s1
+      "(/usr/local/bin/trepan3k:4): <module>\n-- 4 import 
sys\n(trepan3k) ")
+(assert-t (numberp (loc-match test-s1 helper-loc)) "source location")
+(assert-equal
+ "import sys"
+ (match-string (realgud-loc-pat-text-group helper-loc)
+              test-s1)   "extract source text")
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp-trepanjs.el 
b/packages/realgud/test/test-regexp-trepanjs.el
new file mode 100644
index 0000000..d26102d
--- /dev/null
+++ b/packages/realgud/test/test-regexp-trepanjs.el
@@ -0,0 +1,94 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/debugger/trepanjs/init.el")
+(load-file "./regexp-helper.el")
+
+(declare-function realgud-cmdbuf-info-loc-regexp 'realgud-buffer-command)
+(declare-function cmdbuf-loc-match               'realgud-regexp)
+(declare-function loc-match                     'realgud-helper)
+(declare-function prompt-match                   'regexp-helper)
+(declare-function realgud-loc-pat-num            'realgud-regexp)
+(declare-function realgud-loc-pat-regexp         'realgud-regexp)
+(declare-function realgud-loc-pat-file-group     'realgud-regexp)
+(declare-function realgud-loc-pat-line-group     'realgud-regexp)
+(declare-function  make-realgud-cmdbuf-info      'realgud-regexp)
+(declare-function realgud-cmdbuf-info-file-group 'realgud-regexp)
+(declare-function realgud-cmdbuf-info-line-group 'realgud-regexp)
+(declare-function __FILE__                       'load-relative)
+(declare-function setup-regexp-vars              'regexp-helper)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar dbg-name)
+  (defvar loc-pat)
+  (defvar bt-pat)
+  (defvar prompt-pat)
+  (defvar realgud:trepanjs-pat-hash)
+  (defvar realgud-pat-hash)
+  (defvar helper-bps)
+  (defvar test-dbgr)
+  (defvar test-text)
+  (defvar test-s1)
+)
+
+(setup-regexp-vars realgud:trepanjs-pat-hash)
+
+(note "trepanjs prompt matching")
+(set (make-local-variable 'prompt-pat)
+     (gethash "prompt" realgud:trepanjs-pat-hash))
+(prompt-match "(trepanjs) ")
+(prompt-match "(trepanjs) connecting... ok")
+
+(note "trepanjs location matching")
+(setq dbg-name "trepanjs")
+(setq loc-pat (gethash "loc" (gethash dbg-name realgud-pat-hash)))
+
+(setq test-dbgr (make-realgud-cmdbuf-info
+                :debugger-name dbg-name
+                :loc-regexp (realgud-loc-pat-regexp loc-pat)
+                :file-group (realgud-loc-pat-file-group loc-pat)
+                :line-group (realgud-loc-pat-line-group loc-pat)))
+
+(setq test-text "break in test/fixtures/break-in-module/main.js at line 
1:23\n")
+(assert-t (numberp (cmdbuf-loc-match test-text test-dbgr)) "basic location")
+
+(string-match (realgud-cmdbuf-info-loc-regexp test-dbgr) test-text)
+(assert-equal "test/fixtures/break-in-module/main.js"
+             (match-string (realgud-cmdbuf-info-file-group test-dbgr)
+                           test-text) "extract file name")
+
+(string-match (realgud-cmdbuf-info-loc-regexp test-dbgr) test-text)
+(assert-equal "1"
+             (match-string
+              (realgud-cmdbuf-info-line-group test-dbgr)
+              test-text) "extract line number")
+
+(note "breakpoint location matching")
+
+(setq test-text
+      "Breakpoint 2 set in file /tmp/gcd.js, line 2.
+")
+
+(assert-t (numberp (loc-match test-text helper-bps))
+         "basic breakpoint location")
+(assert-equal "/tmp/gcd.js"
+             (match-string (realgud-loc-pat-file-group helper-bps)
+                           test-text)   "extract breakpoint file name")
+(assert-equal "2"
+             (match-string (realgud-loc-pat-line-group helper-bps)
+                           test-text)
+             "extract breakpoint line number")
+
+(note "debugger-backtrace")
+(setq test-text
+    "##1 in file /tmp/test/gcd.js at line 2:12"
+)
+
+(set (make-local-variable
+      'bt-pat)
+      (gethash "debugger-backtrace" realgud:trepanjs-pat-hash))
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp-trepanpl.el 
b/packages/realgud/test/test-regexp-trepanpl.el
new file mode 100644
index 0000000..00e0242
--- /dev/null
+++ b/packages/realgud/test/test-regexp-trepanpl.el
@@ -0,0 +1,115 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "../realgud/debugger/trepan.pl/init.el")
+(load-file "./regexp-helper.el")
+
+(eval-when-compile
+  (defvar realgud:trepanpl-pat-hash)
+  (defvar prompt-str)
+  (defvar test-dbgr)
+  (defvar carp-bt-re)
+  (defvar file-group)
+  (defvar line-group)
+  (defvar test-text)
+  (defvar dbg-bt-pat)
+  (defvar bps-pat)
+  (defvar realgud-bt-pat)
+  (defvar brkpt-del)
+  (defvar bp-del-pat)
+  (defvar bp-enable-pat)
+  (defvar bp-disable-pat)
+  (defvar realgud-perl-ignnore-file-re)
+)
+(declare-function __FILE__   'load-relative)
+
+(test-simple-start)
+
+(set (make-local-variable 'helper-bps)
+     (gethash "brkpt-set"       realgud:trepanpl-pat-hash))
+(set (make-local-variable 'prompt)
+     (gethash "prompt"          realgud:trepanpl-pat-hash))
+(set (make-local-variable 'helper-tb)
+     (gethash "lang-backtrace"  realgud:trepanpl-pat-hash))
+
+
+(set (make-local-variable 'bp-del-pat)
+      (gethash "brkpt-del" realgud:trepanpl-pat-hash))
+
+(set (make-local-variable 'bp-enable-pat)
+      (gethash "brkpt-enable" realgud:trepanpl-pat-hash))
+
+(set (make-local-variable 'bp-disable-pat)
+      (gethash "brkpt-disable" realgud:trepanpl-pat-hash))
+
+(note "prompt matching")
+(set (make-local-variable 'prompt-pat)
+     (gethash "prompt" realgud:trepanpl-pat-hash))
+(prompt-match "(trepanpl): ")
+(prompt-match "((trepanpl)): " nil "nested debugger prompt: %s")
+(setq prompt-str "trepanpl:")
+(assert-nil (loc-match prompt-str prompt-pat)
+           (format "invalid prompt %s" prompt-str))
+
+(setq test-text "Breakpoint 2 set in /tmp/File/Basename.pm at line 215")
+
+(assert-t (numberp (bp-loc-match test-text))
+         "basic breakpoint location")
+(assert-equal "/tmp/File/Basename.pm"
+             (match-string (realgud-loc-pat-file-group helper-bps)
+                           test-text)
+             "extract breakpoint file name"
+             )
+(assert-equal "215"
+             (match-string (realgud-loc-pat-line-group helper-bps)
+                           test-text)
+             "extract breakpoint line number"
+             )
+
+(setq test-text "Breakpoint 1 set in (eval 1177)[/Eval.pm:94] at line 5")
+(assert-t (numberp (bp-loc-match test-text)) "eval breakpoint location")
+(setq bps-pat
+     (gethash "brkpt-set"          realgud:trepanpl-pat-hash))
+(setq dbg-bt-pat
+     (gethash "debugger-backtrace" realgud:trepanpl-pat-hash))
+(setq prompt-pat
+     (gethash "prompt"             realgud:trepanpl-pat-hash))
+(setq lang-bt-pat
+     (gethash "lang-backtrace"     realgud:trepanpl-pat-hash))
+
+(note "prompt")
+(prompt-match "(trepanpl): ")
+(prompt-match "((trepanpl)): " nil "nested debugger prompt: %s")
+
+(setq test-text "Breakpoint 1 set in /tmp/gcd.pl at line 9")
+
+(assert-t (numberp (loc-match test-text bps-pat))
+         "basic breakpoint location")
+
+
+(assert-equal "/tmp/gcd.pl"
+             (match-string (realgud-loc-pat-file-group
+                            bps-pat) test-text)
+             "extract breakpoint file name")
+
+(assert-equal "9"
+             (match-string (realgud-loc-pat-line-group
+                            bps-pat) test-text)
+             "extract breakpoint line number")
+
+;; (note "breakpoint delete matching")
+;; (setq test-text "Deleted breakpoint 1.\n")
+;; (assert-t (numberp (loc-match test-text bp-del-pat)) "breakpoint delete 
matching")
+
+(note "breakpoint enable matching")
+(setq test-text "Breakpoint 4 enabled.\n")
+(assert-t (numberp (loc-match test-text bp-enable-pat)) "breakpoint enable 
matching")
+
+
+(note "breakpoint disable matching")
+(setq test-text "Breakpoint 2 disabled.\n")
+(assert-t (numberp (loc-match test-text bp-disable-pat)) "breakpoint disable 
matching")
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp-zshdb.el 
b/packages/realgud/test/test-regexp-zshdb.el
new file mode 100644
index 0000000..1ffecad
--- /dev/null
+++ b/packages/realgud/test/test-regexp-zshdb.el
@@ -0,0 +1,118 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/debugger/zshdb/init.el")
+(load-file "./regexp-helper.el")
+
+(declare-function loc-match                     'realgud-helper)
+(declare-function prompt-match                   'regexp-helper)
+(declare-function realgud-loc-pat-num            'realgud-regexp)
+(declare-function realgud-loc-pat-regexp         'realgud-regexp)
+(declare-function realgud-loc-pat-file-group     'realgud-regexp)
+(declare-function realgud-loc-pat-line-group     'realgud-regexp)
+(declare-function __FILE__                       'load-relative)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar file-group)
+  (defvar frame-re)
+  (defvar line-group)
+  (defvar num-group)
+  (defvar test-pos)
+  (defvar prompt-pat)
+  (defvar realgud:zshdb-pat-hash)
+  (defvar realgud-pat-bt)
+  (defvar test-s1)
+  (defvar test-text)
+  (defvar brkpt-del)
+  (defvar bp-del-pat)
+)
+
+(set (make-local-variable 'bp-del-pat)
+      (gethash "brkpt-del" realgud:zshdb-pat-hash))
+
+(setq prompt-pat (gethash "prompt"             realgud:zshdb-pat-hash))
+(setq frame-pat  (gethash "debugger-backtrace" realgud:zshdb-pat-hash))
+
+(set (make-local-variable 'bp-del-pat)
+      (gethash "brkpt-del" realgud:zshdb-pat-hash))
+
+(set (make-local-variable 'bp-enable-pat)
+      (gethash "brkpt-enable" realgud:zshdb-pat-hash))
+
+(set (make-local-variable 'bp-disable-pat)
+      (gethash "brkpt-disable" realgud:zshdb-pat-hash))
+
+(note "zshdb prompt matching")
+(prompt-match "zshdb<10> "  "10")
+(prompt-match  "zshdb<(5)> " "5" "subshell prompt %s")
+(prompt-match  "zshdb<<1>> " "1" "nested debug prompt %s")
+
+(note "zshdb frame matching")
+
+(note "debugger-backtrace")
+(setq test-s1
+      "->0 in file `/etc/apparmor/functions' at line 24
+##1 /etc/apparmor/functions called from file `/etc/init.d/apparmor' at line 35
+##2 /etc/init.d/apparmor called from file `/usr/local/bin/zshdb' at line 129
+")
+(setq frame-re (realgud-loc-pat-regexp frame-pat))
+(setq num-group (realgud-loc-pat-num frame-pat))
+(setq file-group (realgud-loc-pat-file-group frame-pat))
+(setq line-group (realgud-loc-pat-line-group frame-pat))
+(assert-equal 0 (string-match frame-re test-s1))
+(assert-equal "0" (substring test-s1
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "/etc/apparmor/functions"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "24"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+(setq test-pos (match-end 0))
+
+(assert-equal 49 (string-match frame-re test-s1 test-pos))
+(assert-equal "1" (substring test-s1
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "/etc/init.d/apparmor"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "35"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+(setq test-pos (match-end 0))
+(assert-equal 128 (string-match frame-re test-s1 test-pos))
+(assert-equal "2" (substring test-s1
+                            (match-beginning num-group)
+                            (match-end num-group)))
+(assert-equal "/usr/local/bin/zshdb"
+             (substring test-s1
+                        (match-beginning file-group)
+                        (match-end file-group)))
+(assert-equal "129"
+             (substring test-s1
+                        (match-beginning line-group)
+                        (match-end line-group)))
+
+(note "breakpoint delete matching")
+(setq test-text "Deleted breakpoint 1\n")
+(assert-t (numberp (loc-match test-text bp-del-pat)) "breakpoint delete 
matching")
+
+(note "breakpoint enable matching")
+(setq test-text "Breakpoint entry 4 enabled.\n")
+(assert-t (numberp (loc-match test-text bp-enable-pat)) "breakpoint enable 
matching")
+
+
+(note "breakpoint disable matching")
+(setq test-text "Breakpoint entry 2 disabled.\n")
+(assert-t (numberp (loc-match test-text bp-disable-pat)) "breakpoint disable 
matching")
+
+(end-tests)
diff --git a/packages/realgud/test/test-regexp.el 
b/packages/realgud/test/test-regexp.el
new file mode 100644
index 0000000..0cdde95
--- /dev/null
+++ b/packages/realgud/test/test-regexp.el
@@ -0,0 +1,79 @@
+;; -*- lexical-binding:t -*-
+
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'load-relative)
+(require 'test-simple)
+(load-file "../realgud/common/buffer/command.el")
+(load-file "../realgud/debugger/trepan/init.el")
+(load-file "./regexp-helper.el")
+
+(declare-function cmdbuf-loc-match               'realgud-regexp)
+(declare-function make-realgud-cmdbuf-info       'realgud-regexp)
+(declare-function realgud-cmdbuf-info            'realgud-regexp)
+(declare-function realgud-cmdbuf-info-file-group 'realgud-regexp)
+(declare-function realgud-cmdbuf-info-line-group 'realgud-regexp)
+(declare-function realgud-loc-pat-file-group     'realgud-regexp)
+(declare-function realgud-loc-pat-line-group     'realgud-regexp)
+(declare-function realgud-loc-pat-regexp         'realgud-regexp)
+(declare-function __FILE__                       'load-relative)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar dbg-name)
+  (defvar realgud-pat-hash)
+  (defvar loc-pat)
+  (defvar test-dbgr)
+)
+
+; Some setup usually done in setting up the buffer.
+; We customize this for the debugger trepan. Others may follow.
+; FIXME: encapsulate this.
+(setq dbg-name "trepan")
+(setq loc-pat (gethash "loc" (gethash dbg-name realgud-pat-hash)))
+
+(setq test-dbgr (make-realgud-cmdbuf-info
+                 :debugger-name dbg-name
+                 :loc-regexp (realgud-loc-pat-regexp loc-pat)
+                 :file-group (realgud-loc-pat-file-group  loc-pat)
+                 :line-group (realgud-loc-pat-line-group  loc-pat)))
+
+
+(let ((text ".. (./dbgr.rb:73)")
+             (text2 "C> ((eval):1 via /tmp/eval2.rb:2)")
+             (text3 "-- (<internal:prelude>:28 remapped prelude.rb:28)")
+             (text4 "-- 
(/src/external-vcs/dbgrr/processor/command/info_subcmd/registers_subcmd/dfp.rb:2)\nrequire_relative
 %w(.. .. base subsubcmd)\n")
+             )
+
+  (assert-t (numberp (cmdbuf-loc-match text test-dbgr)) "basic location")
+  (assert-equal "./dbgr.rb"
+               (match-string (realgud-cmdbuf-info-file-group test-dbgr)
+                             text)   "extract file name")
+  (assert-equal "73"
+               (match-string (realgud-cmdbuf-info-line-group test-dbgr)
+                             text)   "extract line number")
+  (assert-t (numberp (cmdbuf-loc-match text4 test-dbgr)) "more complex 
location")
+
+
+  ;; Now try 'via'
+  (assert-t (numberp (cmdbuf-loc-match text2 test-dbgr)) "basic 'via' 
location")
+  (assert-equal "/tmp/eval2.rb"
+               (match-string (realgud-cmdbuf-info-file-group test-dbgr)
+                             text2)
+                 "extract via file name")
+  (assert-equal "2" (match-string (realgud-cmdbuf-info-line-group test-dbgr)
+                                 text2)
+               "extract via line number")
+
+  ;; Now try remap
+  (assert-t (numberp (cmdbuf-loc-match text3 test-dbgr)) "basic 'via' 
location")
+
+  ;;
+  (setq text "--> #0 METHOD Object#square(x) in file ./trepan.rb at line 73")
+  (assert-nil (numberp (cmdbuf-loc-match text test-dbgr)) "unmatched location")
+
+  )
+
+(end-tests)
diff --git a/packages/realgud/test/test-remake-core.el 
b/packages/realgud/test/test-remake-core.el
new file mode 100644
index 0000000..1f76d22
--- /dev/null
+++ b/packages/realgud/test/test-remake-core.el
@@ -0,0 +1,38 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/debugger/remake/core.el")
+
+(declare-function __FILE__ 'load-relative)
+(declare-function remake-parse-cmd-args        'realgud-remake-core)
+(declare-function remake-suggest-Makefile      'realgud-remake-core)
+(declare-function remake-suggest-file-priority 'realgud-remake-core)
+
+(test-simple-start)
+
+(assert-equal (list "remake" (expand-file-name "Makefile")
+                   (list "-X" "-f" (expand-file-name "Makefile")))
+             (remake-parse-cmd-args
+              '("remake" "-X" "-f" "Makefile"))
+             "remake-parse-cmd-args")
+
+(assert-equal "Makefile" (remake-suggest-Makefile) "remake-suggest-Makefile")
+
+(assert-equal 2 (remake-suggest-file-priority "foo")
+             "remake-file-suggest-priority")
+(let ((buffer (get-file-buffer "Makefile.am")))
+  (if buffer (kill-buffer buffer))
+  (assert-equal 2 (remake-suggest-file-priority "Makefile.am"))
+  (setq buffer (find-file-noselect "Makefile.am"))
+  (assert-equal 5 (remake-suggest-file-priority "Makefile.am"))
+  (kill-buffer buffer)
+  (setq buffer (get-file-buffer "Makefile"))
+  (if buffer (kill-buffer buffer))
+  (assert-equal 6 (remake-suggest-file-priority "Makefile"))
+  (setq buffer (find-file-noselect "Makefile"))
+  (assert-equal 8 (remake-suggest-file-priority "Makefile"))
+  (kill-buffer buffer)
+  )
+
+(end-tests)
diff --git a/packages/realgud/test/test-remake.el 
b/packages/realgud/test/test-remake.el
new file mode 100644
index 0000000..f441932
--- /dev/null
+++ b/packages/realgud/test/test-remake.el
@@ -0,0 +1,37 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/common/core.el") ;; for realgud-exec-shell
+(load-file "../realgud/debugger/remake/remake.el")
+
+(eval-when-compile (defvar my-buf))
+
+(declare-function realgud:remake        'realgud:remake)
+(declare-function __FILE__              'load-relative)
+
+(test-simple-start)
+
+(defun realgud-exec-shell (debugger-name script-filename program
+                                     &optional no-reset &rest args)
+  "Mock for realgud-exec-shell. We copy the part of the real realgud-exec-shell
+file-name-directory that was failing"
+  (let ((cmdproc-buffer (get-buffer-create "foo"))
+       (starting-directory
+               (or (file-name-directory script-filename)
+                   default-directory "./")))
+    (start-process "my-process" cmdproc-buffer "sleep" "10000")
+    cmdproc-buffer
+    )
+  )
+
+(note "can deal with no Makefile name")
+;; If realgud:remake is successful we switch buffers
+(setq my-buf (current-buffer))
+;; FIXME:
+;; (realgud:remake "remake --debugger")
+;; (assert-t (not (eq (current-buffer) my-buf)))
+;; (delete-process "foo")
+;; (switch-to-buffer my-buf)
+
+(end-tests)
diff --git a/packages/realgud/test/test-send.el 
b/packages/realgud/test/test-send.el
new file mode 100644
index 0000000..580cfd5
--- /dev/null
+++ b/packages/realgud/test/test-send.el
@@ -0,0 +1,61 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+
+(load-file "../realgud/common/send.el")
+(load-file "../realgud/common/regexp.el")
+(load-file "../realgud/debugger/trepan/init.el")
+
+(declare-function realgud-srcbuf-init 'realgud-buffer-source)
+(test-simple-start)
+
+(eval-when-compile
+  (defvar temp-cmdbuf nil)
+  (defvar realgud-pat-hash)
+  (defvar file-name)
+)
+
+(defun setup ()
+  (setq temp-cmdbuf (generate-new-buffer "*cmdbuf-test*"))
+  (realgud-cmdbuf-init temp-cmdbuf "trepan" (gethash "trepan" 
realgud-pat-hash))
+  (realgud-srcbuf-init (current-buffer) temp-cmdbuf)
+)
+
+(defun tear-down()
+  (kill-buffer temp-cmdbuf)
+)
+
+(dolist (str '("abc" "100%" "I feel %% today"))
+  (assert-equal str (realgud-expand-format str "format no expand characters")))
+
+
+(assert-equal "line 5" (realgud-expand-format "line %p" 5)
+             "format %l - with arg")
+(assert-equal "line " (realgud-expand-format "line %p")
+             "format %l - without arg")
+
+(assert-equal "hi, rocky!"
+             (realgud-expand-format "h%s!" "i, rocky")
+             "format %s")
+
+(setup)
+;; Current buffer is now set up as a source buffer
+(setq file-name (buffer-file-name))
+(note "File formatting")
+(if (and file-name (realgud-get-srcbuf (current-buffer)))
+    (dolist
+       (pair
+        (list
+         (cons "%d" (file-name-directory file-name))
+         (cons "%x" file-name)
+         (cons "%X" (expand-file-name file-name))
+         (cons "%f" "test-send.el")
+         (cons "%F" "test-send")))
+      (assert-equal (cdr pair) (realgud-expand-format (car pair)))))
+(tear-down)
+
+
+(assert-raises error (realgud-command "testing"))
+
+(end-tests)
diff --git a/packages/realgud/test/test-shortkey.el 
b/packages/realgud/test/test-shortkey.el
new file mode 100644
index 0000000..5f599d9
--- /dev/null
+++ b/packages/realgud/test/test-shortkey.el
@@ -0,0 +1,40 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "../realgud/common/shortkey.el")
+(load-file "../realgud/common/buffer/command.el")
+(declare-function realgud-cmdbuf-init            'realgud-buffer-command)
+(declare-function realgud-shortkey-mode-setup    'realgud-shortkey)
+(declare-function realgud-get-short-key-mode-map 'realgud-shortkey)
+
+(eval-when-compile
+  (defvar temp-cmdbuf)
+  (defvar debugger-name)
+  (defvar realgud-pat-hash)
+  (defvar test-keymap)
+  (defvar nodejs-short-key-mode-map)
+)
+
+(declare-function __FILE__           'load-relative)
+
+(test-simple-start)
+
+(note "realgud-shortkey")
+(assert-raises error (realgud-shortkey-mode-setup))
+(assert-nil (realgud-get-short-key-mode-map (current-buffer)))
+
+(note "realgud-get-short-key-mode-map")
+
+(setq temp-cmdbuf (generate-new-buffer "*cmdbuf-test*"))
+(setq debugger-name "nodejs")
+(load-file "../realgud/debugger/nodejs/nodejs.el")
+(realgud-cmdbuf-init temp-cmdbuf debugger-name
+                    (gethash debugger-name realgud-pat-hash))
+(setq test-keymap (realgud-get-short-key-mode-map temp-cmdbuf))
+(assert-t (keymapp test-keymap)
+         "realgud-get-short-key-mode-map returns keymap")
+(assert-equal test-keymap nodejs-short-key-mode-map
+         "realgud-get-short-key-mode-map returns nodejs-short-key-mode-map")
+(end-tests)
diff --git a/packages/realgud/test/test-srcbuf.el 
b/packages/realgud/test/test-srcbuf.el
new file mode 100644
index 0000000..a910c42
--- /dev/null
+++ b/packages/realgud/test/test-srcbuf.el
@@ -0,0 +1,72 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/common/buffer/source.el")
+(load-file "../realgud/common/buffer/command.el")
+(load-file "../realgud/debugger/trepan/init.el")
+(load-file "../realgud/debugger/trepan/track-mode.el")
+
+(declare-function realgud-cmdbuf-init 'realgud-buffer-command)
+(declare-function realgud-srcbuf-init 'realgud-buffer-source)
+(declare-function __FILE__            'load-relative)
+
+(declare-function realgud-srcbuf?                   'realgud-buffer-source)
+(declare-function realgud-srcbuf-loc-p              'realgud-loc)
+(declare-function realgud-srcbuf-info-debugger-name 'realgud-loc)
+(declare-function realgud-srcbuf-info-cmdproc       'realgud-track)
+(declare-function realgud-srcbuf-init-or-update     'realgud-track)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar realgud-pat-hash)
+  (defvar realgud-srcbuf-info)
+  (defvar temp-srcbuf)
+  (defvar test-filename)
+)
+
+(defvar temp-cmdbuf nil)
+(defun tear-down()
+  (kill-buffer temp-cmdbuf)
+  (kill-buffer temp-srcbuf)
+)
+
+(defun setup ()
+  (setq temp-cmdbuf (generate-new-buffer "*cmdbuf-test*"))
+  (realgud-cmdbuf-init temp-cmdbuf "trepan" (gethash "trepan" 
realgud-pat-hash))
+  (setq temp-srcbuf (find-file-noselect "./gcd.rb"))
+)
+
+(assert-nil (realgud-srcbuf? (current-buffer)) "realgud-srcbuf? before init")
+(setq realgud-srcbuf-info nil)
+(assert-nil (realgud-srcbuf? (current-buffer))
+           "realgud-srcbuf? before init - but nil")
+
+(note "realgud-srcbuf-init")
+(setup)
+(realgud-srcbuf-init temp-srcbuf temp-cmdbuf)
+
+(assert-t (realgud-srcbuf? temp-srcbuf)
+         "realgud-srcbuf? after init")
+
+(assert-equal temp-cmdbuf
+             (with-current-buffer temp-srcbuf
+               (realgud-srcbuf-info-cmdproc realgud-srcbuf-info)))
+
+(realgud-srcbuf-init-or-update temp-srcbuf temp-cmdbuf)
+(assert-equal temp-cmdbuf
+             (with-current-buffer temp-srcbuf
+               (realgud-srcbuf-info-cmdproc realgud-srcbuf-info))
+             "realgud-srcbuf-init-or-update - update")
+
+(kill-buffer temp-srcbuf)
+(setq temp-srcbuf (find-file-noselect "./gcd.rb"))
+(realgud-srcbuf-init-or-update temp-srcbuf temp-cmdbuf)
+(assert-equal temp-cmdbuf
+             (with-current-buffer temp-srcbuf
+                        (realgud-srcbuf-info-cmdproc realgud-srcbuf-info))
+             "realgud-srcbuf-init-or-update - init")
+(tear-down)
+
+(end-tests)
diff --git a/packages/realgud/test/test-track-mode.el 
b/packages/realgud/test/test-track-mode.el
new file mode 100644
index 0000000..7128e6d
--- /dev/null
+++ b/packages/realgud/test/test-track-mode.el
@@ -0,0 +1,66 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'comint)
+(load-file "../realgud/debugger/trepan/trepan.el")
+(load-file "../realgud/common/buffer/command.el")
+(load-file "../realgud/common/track-mode.el")
+(load-file "../realgud/common/backtrace-mode.el")
+
+(declare-function realgud-cmdbuf-init 'realgud-buffer-command)
+(declare-function realgud-srcbuf-init 'realgud-buffer-source)
+(declare-function __FILE__            'load-relative)
+
+(test-simple-start)
+
+(defvar realgud-pat-hash)
+(defvar temp-cmdbuf nil)
+
+(declare-function trepan-track-mode 'realgud:trepan)
+(declare-function realgud-track-mode-vars 'realgud-track-mode)
+(declare-function realgud-backtrace-mode 'realgud-backtrace-mode)
+
+(defun setup ()
+  (setq temp-cmdbuf (generate-new-buffer "*cmdbuf-test*"))
+  ;; (start-process "test-track-mode" temp-cmdbuf nil)
+  (start-process "test-track-mode" temp-cmdbuf "/bin/sh")
+
+  (realgud-cmdbuf-init temp-cmdbuf "trepan" (gethash "trepan" 
realgud-pat-hash))
+  (with-current-buffer temp-cmdbuf
+    (comint-mode)
+    (trepan-track-mode 't))
+  (realgud-srcbuf-init (current-buffer) temp-cmdbuf)
+)
+
+(defun tear-down()
+  (kill-buffer temp-cmdbuf)
+)
+
+(setup)
+
+;; Current buffer is now set up as a source buffer
+
+(with-current-buffer temp-cmdbuf
+  (switch-to-buffer temp-cmdbuf)
+  (dolist (fn '(realgud-track-hist-newest
+               realgud-track-hist-newer
+               realgud-track-hist-older
+               realgud-track-hist-oldest))
+    (assert-nil (null (where-is-internal fn))
+               (format "track-functions-mapped-to-keys %s" fn))
+    )
+  (switch-to-buffer nil)
+  )
+
+(note "track-mode-vars")
+(makunbound 'foo-track-mode)
+(makunbound 'foo-track-mode-map)
+(realgud-track-mode-vars "foo")
+(dolist (var '("foo-track-mode-map" "foo-track-mode"))
+  (let ((var-sym (intern var)))
+    (assert-t (boundp var-sym))
+    (assert-t (stringp (get var-sym 'variable-documentation)))
+    ))
+
+(end-tests)
diff --git a/packages/realgud/test/test-track.el 
b/packages/realgud/test/test-track.el
new file mode 100644
index 0000000..5e98fec
--- /dev/null
+++ b/packages/realgud/test/test-track.el
@@ -0,0 +1,121 @@
+;; -*- lexical-binding:t -*-
+
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/common/track.el")
+(load-file "../realgud/common/core.el")
+(load-file "../realgud/common/loc.el")
+(load-file "../realgud/debugger/trepan/core.el")
+(load-file "../realgud/debugger/trepan/init.el")
+
+(declare-function __FILE__                     'load-relative)
+(declare-function realgud-cmdbuf-init          'realgud-buffer-command)
+(declare-function realgud-loc-filename         'realgud-loc)
+(declare-function realgud-loc-p                'realgud-loc)
+(declare-function realgud-loc-line-number      'realgud-loc)
+(declare-function realgud:track-from-region    'realgud-track)
+(declare-function realgud-track-loc            'realgud-track)
+(declare-function realgud-track-loc-remaining  'realgud-track)
+(declare-function realgud-track-selected-frame 'realgud-track)
+(declare-function realgud-track-termination?   'realgud-track)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar debugger-output)
+  (defvar line-number)
+  (defvar realgud-pat-hash)
+  (defvar test-filename)
+)
+
+;; Some setup usually done in setting up the buffer.
+;; We customize this for the debugger trepan. Others may follow.
+;; FIXME: encapsulate this.
+(makunbound 'realgud-cmdbuf-info)
+
+;; FIXME/WARNING the below is customized for trepan
+(realgud-cmdbuf-init (current-buffer) "trepan"
+                 (gethash "trepan" realgud-pat-hash))
+
+(setq test-filename (symbol-file 'test-simple))
+(setq line-number 7)
+(setq debugger-output (format "-> (%s:%d)\nrequire 'foo'\n(trepan):\n"
+                             test-filename line-number))
+(let ((loc (realgud-track-loc debugger-output nil)))
+  (assert-t (realgud-loc-p loc)   "loc extracted")
+  (assert-equal "(trepan):\n"
+               (realgud-track-loc-remaining debugger-output)
+               "loc-remaining")
+  (assert-equal test-filename (realgud-loc-filename loc)
+               "loc filename extracted")
+  (assert-equal line-number (realgud-loc-line-number loc)
+               "loc line-number extracted")
+  )
+
+(note "realgud-track-selected-frame")
+(setq debugger-output "up
+--> #1 TOP Object#<top /usr/local/bin/irb> in file /usr/local/bin/irb at line 9
+   (/usr/local/bin/irb:9 @11)
+require irb'
+")
+(assert-equal 1 (realgud-track-selected-frame debugger-output))
+
+(setq debugger-output "
+--> #0 TOP Object#<top /usr/local/bin/irb> in file /usr/local/bin/irb at line 9
+   (/usr/local/bin/irb:9 @11)
+require irb'
+")
+(assert-equal 0 (realgud-track-selected-frame debugger-output))
+
+(setq debugger-output "
+<- (<internal:lib/rubygems/custom_require>:38 remapped 
/usr/local/lib/ruby/gems/1.9.1/gems/trepanning-0.1.3.dev/data/custom_require.rb:38
 @16)
+R=> false
+end
+")
+(assert-nil (realgud-track-selected-frame debugger-output))
+
+
+(note "realgud-track-termination?")
+(setq debugger-output "-- (/usr/local/bin/irb:9 @2)
+require 'irb'
+")
+(assert-nil (realgud-track-termination? debugger-output))
+(setq debugger-output "Really quit? (N/y) y
+trepan: That's all, folks...
+")
+(assert-t (realgud-track-termination? debugger-output))
+
+
+;; (setq debugger-bp-output (format "Breakpoint %d set at line %d\n\tin file 
%s.\n"
+;;                               bp-num line-number test-filename))
+;; (setq bp-loc (realgud-track-bp-loc debugger-bp-output nil))
+;; (setq bp-num 2)
+
+;; (specify "bp-loc extracted"
+;;       (message "output: %s" debugger-bp-output)
+;;       (message "bp-loc: %s" bp-loc)
+;;       (message "bp-num: %d" bp-num)
+;;       (assert-t (realgud-loc-p bp-loc))
+;;       (assert-equal bp-num (realgud-loc-num bp-loc)))
+
+;; (specify "realgud-track-divert-prompt"
+;;       (realgud-cmdbuf-info-divert-output?= 't)
+;;       (setq realgud-track-divert-string "")
+;;       (setq text
+;;             "--> #0 TOP Object#<top /usr/local/bin/irb> in file 
/usr/local/bin/irb at line 9\n(trepan): ")
+;;       (setq realgud-last-output-start (point-max))
+;;       (realgud-track-divert-prompt text (current-buffer) (point-max))
+;;       (assert-equal "--> #0 TOP Object#<top /usr/local/bin/irb> in file 
/usr/local/bin/irb at line 9\n"
+;;                     realgud-track-divert-string)
+;;       (assert-equal nil (realgud-sget 'cmdbuf-info 'divert-output?))
+;;       )
+
+(makunbound 'realgud-cmdbuf-info)
+(assert-raises error
+              (realgud:track-from-region (point-min)
+                                      (point-max))
+              "invalid cmdbuf")
+
+(end-tests)
diff --git a/packages/realgud/test/test-trepan2.el 
b/packages/realgud/test/test-trepan2.el
new file mode 100644
index 0000000..6197357
--- /dev/null
+++ b/packages/realgud/test/test-trepan2.el
@@ -0,0 +1,45 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/debugger/trepan2/trepan2.el")
+(load-file "../realgud/debugger/trepan2/core.el")
+(load-file "../realgud.el")
+
+(declare-function trepan2-parse-cmd-args    'realgud:trepan2)
+(declare-function realgud:trepan2-find-file 'realgud:trepan2-core)
+(declare-function __FILE__                  'load-relative)
+
+
+(test-simple-start)
+
+(note "trepan2-parse-cmd-args")
+
+(assert-equal '(nil ("trepan2") ("foo") nil)
+             (trepan2-parse-cmd-args '("trepan2" "foo")))
+(assert-equal '(nil ("trepan2" "-n") ("foo") nil)
+             (trepan2-parse-cmd-args '("trepan2" "-n" "foo")))
+(assert-equal '(("/usr/bin/python") ("trepan2" "--different")
+               ("foo") nil)
+             (trepan2-parse-cmd-args
+              '("/usr/bin/python" "trepan2"
+                "--different" "foo")))
+(assert-equal '(nil ("program.py") ("foo") nil)
+             (trepan2-parse-cmd-args '("program.py" "foo")))
+(assert-equal '(nil ("trepan2") ("program.py" "foo") nil)
+             (trepan2-parse-cmd-args
+              '("trepan2" "program.py" "foo")))
+
+(note "realgud:trepan2-find-file")
+(assert-nil (realgud:trepan2-find-file "<string>")
+           "Should ignore psuedo file")
+
+(eval-when-compile
+  (defvar test-python-file))
+
+(set (make-local-variable 'test-python-file)
+     (concat (file-name-directory (__FILE__)) "gcd.py"))
+(assert-equal test-python-file (realgud:trepan2-find-file test-python-file)
+           "Should ignore psuedo file")
+
+(end-tests)
diff --git a/packages/realgud/test/test-trepan3k.el 
b/packages/realgud/test/test-trepan3k.el
new file mode 100644
index 0000000..758ad86
--- /dev/null
+++ b/packages/realgud/test/test-trepan3k.el
@@ -0,0 +1,37 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/debugger/trepan3k/trepan3k.el")
+(declare-function trepan3k-parse-cmd-args 'realgud:trepan3k)
+(declare-function __FILE__                'require-relative)
+
+(test-simple-start)
+
+(note "trepan3k-parse-cmd-args")
+
+(assert-equal '(nil ("trepan3k") ("foo") nil)
+             (trepan3k-parse-cmd-args '("trepan3k" "foo")))
+(assert-equal '(nil ("trepan3k" "-n") ("foo") nil)
+             (trepan3k-parse-cmd-args '("trepan3k" "-n" "foo")))
+(assert-equal '(nil ("trepan3k" "--annotate=1") ("foo") t)
+             (trepan3k-parse-cmd-args
+              '("trepan3k" "--annotate=1" "foo")))
+(assert-equal '(nil ("mytrepan3k" "--annotate=1") ("foo") t)
+             (trepan3k-parse-cmd-args
+              '("mytrepan3k" "--annotate=1" "foo")))
+(assert-equal '(("python") ("trepan3k" "--annotate") ("1" "foo") t)
+             (trepan3k-parse-cmd-args
+              '("python" "trepan3k" "--annotate" "1" "foo")))
+(assert-equal '(("/usr/bin/python") ("trepan3k" "--different")
+               ("foo") nil)
+             (trepan3k-parse-cmd-args
+              '("/usr/bin/python" "trepan3k"
+                "--different" "foo")))
+(assert-equal '(nil ("program.py") ("foo") nil)
+             (trepan3k-parse-cmd-args '("program.py" "foo")))
+(assert-equal '(nil ("trepan3k") ("program.py" "foo") nil)
+             (trepan3k-parse-cmd-args
+              '("trepan3k" "program.py" "foo")))
+
+(end-tests)
diff --git a/packages/realgud/test/test-trepanpl.el 
b/packages/realgud/test/test-trepanpl.el
new file mode 100644
index 0000000..6b5c807
--- /dev/null
+++ b/packages/realgud/test/test-trepanpl.el
@@ -0,0 +1,50 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/common/buffer/command.el")
+(load-file "../realgud/debugger/trepan.pl/trepanpl.el")
+
+(eval-when-compile (defvar test:run-process-save))
+
+(declare-function realgud:trepanpl-parse-cmd-args 'realgud:trepanpl)
+(declare-function realgud:trepan.pl               'realgud:trepanpl)
+(declare-function __FILE__                        'require-relative)
+
+(test-simple-start)
+
+;; Save value realgud:run-process and change it to something we want
+(setq test:run-process-save (symbol-function 'realgud:run-process))
+(defun realgud:run-process(debugger-name script-filename cmd-args
+                                     minibuf-history
+                                     &optional no-reset)
+  "Fake realgud:run-process used in testing"
+  (note
+   (format "%s %s %s" debugger-name script-filename cmd-args))
+  (assert-equal "trepan.pl" debugger-name "debugger name gets passed")
+  (let ((expanded-name (expand-file-name "./gcd.pl")))
+    (assert-equal  expanded-name script-filename "file name check")
+    (assert-equal (list "-I" (expand-file-name ".") expanded-name "3" "5")
+                 (cdr cmd-args) "command args listified")
+    )
+  nil ;; Make sure trepanpl doesn't try to do anything with cmdbuf
+  )
+
+(note "realgud:trepanpl-parse-cmd-args")
+(assert-equal (list nil '("trepan.pl") '("foo"))
+             (realgud:trepanpl-parse-cmd-args '("trepan.pl" "foo")))
+(assert-equal (list '("perl5.8") '("trepan.pl") '("foo"))
+             (realgud:trepanpl-parse-cmd-args '("perl5.8" "trepan.pl" "foo")))
+(assert-equal (list nil '("trepan.pl") '("program.pl" "foo"))
+             (realgud:trepanpl-parse-cmd-args
+              '("trepan.pl" "program.pl" "foo")))
+(assert-equal (list nil '("trepan.pl") (list (expand-file-name "gcd.pl") 
"foo"))
+             (realgud:trepanpl-parse-cmd-args
+              '("trepan.pl" "gcd.pl" "foo")))
+
+(realgud:trepan.pl "trepanpl -I . ./gcd.pl 3 5")
+
+;; Restore the old value of realgud:run-process
+(fset 'realgud:run-process test:run-process-save)
+
+(end-tests)
diff --git a/packages/realgud/test/test-utils.el 
b/packages/realgud/test/test-utils.el
new file mode 100644
index 0000000..47d9958
--- /dev/null
+++ b/packages/realgud/test/test-utils.el
@@ -0,0 +1,49 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'comint)
+(require 'eshell)
+(require 'shell)
+
+(load-file "../realgud/common/utils.el")
+
+(declare-function realgud:flatten            'realgud-utils)
+(declare-function realgud:strip              'realgud-regexp)
+(declare-function __FILE__                   'load-relative)
+(declare-function realgud:canonic-major-mode 'realgud-utils)
+
+(test-simple-start)
+
+(eval-when-compile
+  (defvar test-realgud:features)
+)
+
+(note "realgud:strip")
+(assert-equal "abc" (realgud:strip "abc"))
+(assert-equal "def" (realgud:strip "\n  def\t  "))
+
+(note "realgud:flatten")
+(assert-equal '(abc) (realgud:flatten '(abc)))
+(assert-equal '(abc def h i j) (realgud:flatten '(abc (def (h) i) j)))
+
+(note "realgud:canonic-major-mode")
+
+(assert-raises error (realgud:canonic-major-mode)
+              "Not in eshell, comint or shell-mode")
+
+(with-temp-buffer
+  (comint-mode)
+  (assert-equal 'comint (realgud:canonic-major-mode)))
+
+(with-temp-buffer
+  (eshell-mode)
+  (assert-equal 'eshell (realgud:canonic-major-mode)))
+
+;; (with-temp-buffer
+;;   (start-process "bogus" (current-buffer) "sleep" "1")
+;;   (shell-mode)
+;;   (assert-equal 'comint (realgud:canonic-major-mode))
+;;   )
+
+(end-tests)
diff --git a/packages/realgud/test/test-zshdb.el 
b/packages/realgud/test/test-zshdb.el
new file mode 100644
index 0000000..a908777
--- /dev/null
+++ b/packages/realgud/test/test-zshdb.el
@@ -0,0 +1,60 @@
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(load-file "../realgud/debugger/zshdb/zshdb.el")
+(load-file "../realgud/common/core.el")
+
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
+
+(eval-when-compile
+  (defvar test:run-process-save)
+  (defvar realgud:zshdb-minibuffer-history)
+  )
+
+(declare-function zshdb-parse-cmd-args 'realgud:zshdb)
+(declare-function zshdb-suggest-invocation 'realgud:zshdb)
+(declare-function realgud:zshdb        'realgud:zshdb)
+(declare-function __FILE__             'require-relative)
+
+(test-simple-start)
+(make-local-variable 'realgud:zshdb-minibuffer-history)
+(setq realgud:zshdb-minibuffer-history nil)
+
+;; Save value realgud:run-process and change it to something we want
+(setq test:run-process-save (symbol-function 'realgud:run-process))
+(defun realgud:run-process(debugger-name script-filename cmd-args
+                                     minibuf-history
+                                     &optional no-reset)
+  "Fake realgud:run-process used in testing"
+  (note
+   (format "%s %s %s" debugger-name script-filename cmd-args))
+  (assert-equal "zshdb" debugger-name "debugger name gets passed")
+  (let ((expanded-name
+        (realgud:expand-file-name-if-exists "./gcd.sh")))
+    (assert-equal  expanded-name script-filename "file name check")
+    (assert-equal (list expanded-name "3" "5")
+                 (cdr cmd-args) "command args listified")
+    )
+  (current-buffer)
+  )
+
+(note "zshdb-parse-cmd-args")
+(assert-equal (list nil '("zshdb")
+                   (list (realgud:expand-file-name-if-exists "foo")) nil)
+             (zshdb-parse-cmd-args '("zshdb" "foo")))
+(assert-equal (list nil '("zshdb")
+                   (list (realgud:expand-file-name-if-exists "program.sh")
+                         "foo") nil)
+             (zshdb-parse-cmd-args
+              '("zshdb" "program.sh" "foo")))
+
+(with-current-buffer (find-file "gcd.sh")
+  (shell-script-mode)
+  (assert-matches "zshdb .*gcd.sh$" (zshdb-suggest-invocation "zshdb")))
+
+(realgud:zshdb "zshdb ./gcd.sh 3 5")
+;; Restore the old value of realgud:run-process
+(fset 'realgud:run-process test:run-process-save)
+
+(end-tests)
diff --git a/packages/rich-minority/rich-minority.el 
b/packages/rich-minority/rich-minority.el
index 78a4166..71bb159 100644
--- a/packages/rich-minority/rich-minority.el
+++ b/packages/rich-minority/rich-minority.el
@@ -113,7 +113,7 @@ Has three possible values:
   minor-mode list.
 
 If you'd like to use a list of regexps, simply use something like the 
following:
-    (setq rm-blacklist (mapconcat 'identity list-of-regexps \"\\\\|\"))
+    (setq rm-blacklist (mapconcat \\='identity list-of-regexps \"\\\\|\"))
 
 Don't forget to start each string with a blank space, as most
 minor-mode lighters start with a space."
@@ -140,7 +140,7 @@ minor-mode lighters start with a space."
   the minor-mode list.
 
 If you'd like to use a list of regexps, simply use something like the 
following:
-    (setq rm-whitelist (mapconcat 'identity list-of-regexps \"\\\\|\"))
+    (setq rm-whitelist (mapconcat \\='identity list-of-regexps \"\\\\|\"))
 
 Don't forget to start each string with a blank space, as most
 minor-mode lighters start with a space."
diff --git a/packages/rnc-mode/rnc-mode.el b/packages/rnc-mode/rnc-mode.el
index 81f891b..9a08b5e 100644
--- a/packages/rnc-mode/rnc-mode.el
+++ b/packages/rnc-mode/rnc-mode.el
@@ -123,6 +123,7 @@
 (defun rnc-smie-rules (kind token)
   (pcase (cons kind token)
     (`(:list-intro . "element") t)
+    (`(:elem . empty-line-token) " ; ")
     (`(:before . ,(or "include" "default" "namespace" "datatypes")) 0)
     (`(:before . "{")
      (save-excursion
diff --git a/packages/scroll-restore/scroll-restore.el 
b/packages/scroll-restore/scroll-restore.el
index d1ca7e9..5c99207 100644
--- a/packages/scroll-restore/scroll-restore.el
+++ b/packages/scroll-restore/scroll-restore.el
@@ -166,7 +166,7 @@ cursor and `scroll-restore-cursor-color' to change its 
color."
 (defcustom scroll-restore-cursor-type 'box
   "Type of cursor when original position is off-screen.
 Applied if and only if `scroll-restore-handle-cursor' is either
-'type or t.
+`type' or t.
 
 Be careful when another application uses that type.  Otherwise,
 you might get unexpected results when Scroll Restore mode resets
@@ -188,7 +188,7 @@ the value of scroll-restore-cursor-type."
 (defcustom scroll-restore-cursor-color "DarkCyan"
   "Background color of cursor when original position is off-screen.
 Applied if and only if `scroll-restore-handle-cursor' is either
-'color or t.
+`color' or t.
 
 Observe that when Emacs changes the color of the cursor, the
 change applies to all windows on the associated frame.
@@ -238,7 +238,7 @@ drags."
 
 (defface scroll-restore-region
   '((t :inherit region))
-  "Face for Scroll Restore region when `scroll-restore-handle-region' is 
+  "Face for Scroll Restore region when `scroll-restore-handle-region' is
 non-nil.")
 
 ;; Note: We can't use `point-before-scroll' for our purposes because
diff --git a/packages/sed-mode/sed-mode.el b/packages/sed-mode/sed-mode.el
new file mode 100644
index 0000000..1b35c7a
--- /dev/null
+++ b/packages/sed-mode/sed-mode.el
@@ -0,0 +1,140 @@
+;;; sed-mode.el --- Major mode to edit sed scripts  -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2016  Free Software Foundation, Inc.
+
+;; Author: Stefan Monnier <address@hidden>
+;; Version: 1.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:
+
+;; If you need this major mode, you might also want to
+;; consider spending some time with `M-x doctor'.
+
+;;; Code:
+
+(require 'cl-lib)
+(require 'smie)
+
+(defgroup sed-mode nil
+  "Major mode to edit sed code."
+  :group 'programming)
+
+
+(defvar sed-mode-syntax-table
+  (let ((st (make-syntax-table)))
+    (modify-syntax-entry ?# "<" st)
+    (modify-syntax-entry ?\n ">" st)
+    (modify-syntax-entry ?\\ "." st)
+    st))
+
+(defconst sed-commands ":=aiqQrRbcdDhHgGlnNpPstTwWxy")
+
+(eval-and-compile
+  (defconst sed-command-prefix-regexp "\\(?:^\\|[$/0-9;]\\)[ \t]*")
+  (defconst sed-address-prefix-regexp "\\(?:^\\|[,;]\\)[ \t]*"))
+
+(defconst sed-label-regexp "[[:alnum:]]+")
+
+(defun sed-syntax-propertize (beg end)
+  (goto-char beg)
+  (sed-syntax-propertize-string end)
+  (funcall
+   (syntax-propertize-rules
+    ("\\\\$"
+     (0 (unless (nth 8 (save-excursion (syntax-ppss (match-beginning 0))))
+          (put-text-property (match-beginning 0) (match-end 0)
+                             'syntax-table (string-to-syntax "|"))
+          (sed-syntax-propertize-string end)
+          nil)))
+    ((concat "\\(?:" sed-address-prefix-regexp
+             "\\(?:\\(?1:/\\)\\|\\\\\\(?1:.\\)\\)"
+             "\\|" sed-command-prefix-regexp "[sy]\\(?1:.\\)"
+             "\\)")
+     (0 (unless (nth 8 (save-excursion (syntax-ppss (match-beginning 0))))
+          (put-text-property (match-beginning 1) (match-end 1)
+                             'syntax-table (string-to-syntax "\""))
+          (sed-syntax-propertize-string end)
+          nil))))
+   (point) end))
+
+(defun sed-syntax-propertize-string (end)
+  (let* ((ppss (syntax-ppss))
+         (c (nth 3 ppss)))
+    (when c
+      (let ((count (cond
+                    ((or (eq c t)
+                         (not (memq (char-before (nth 8 ppss)) '(?s ?y))))
+                     1)
+                    (t 2))))
+        (goto-char (1+ (nth 8 ppss)))
+        (when (re-search-forward
+               (if (eq c t) "[^\\]\n" (regexp-quote (string c)))
+               end 'move count)
+          (put-text-property (1- (match-end 0)) (match-end 0)
+                             'syntax-table
+                             (if (eq c t) (string-to-syntax "|")
+                               (string-to-syntax "\""))))))))
+
+(defun sed--font-lock-command (cmd)
+  (unless (nth 8 (syntax-ppss))
+    (pcase cmd
+      (?: (if (looking-at (concat "[   ]*\\(" sed-label-regexp "\\)"))
+              (put-text-property (match-beginning 1) (match-end 1) 'face
+                                 font-lock-function-name-face)))
+      ((or ?b ?t ?T)
+       (if (looking-at (concat "[      ]*\\(" sed-label-regexp "\\)"))
+           (put-text-property (match-beginning 1) (match-end 1) 'face
+                              font-lock-constant-face))))
+    font-lock-keyword-face))
+
+(defconst sed-font-lock-keywords
+  `((,(concat sed-command-prefix-regexp "\\([" sed-commands "]\\)")
+     (1 (sed--font-lock-command (char-after (match-beginning 1)))))))
+
+(defconst sed-smie-grammar nil)
+
+(defun sed-smie-rules (kind token)
+  (pcase (cons kind token)
+    (`(:list-intro . ,_) t)
+    ))
+
+;;;###autoload (add-to-list 'auto-mode-alist '("\\.sed\\'" . sed-mode))
+;;;###autoload (add-to-list 'interpreter-mode-alist '("sed" . sed-mode))
+
+;;;###autoload
+(define-derived-mode sed-mode prog-mode "Sed"
+  "Sed editing mode."
+  ;; (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 #'sed-syntax-propertize)
+  (setq-local font-lock-defaults '(sed-font-lock-keywords))
+  (smie-setup sed-smie-grammar #'sed-smie-rules
+              ;; :backward-token #'sm-c-smie-backward-token
+              ;; :forward-token #'sm-c-smie-forward-token
+              )
+  ;; 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)))
+  )
+
+(provide 'sed-mode)
+;;; sed-mode.el ends here
diff --git a/packages/seq/seq-24.el b/packages/seq/seq-24.el
new file mode 100644
index 0000000..04688d3
--- /dev/null
+++ b/packages/seq/seq-24.el
@@ -0,0 +1,464 @@
+;;; seq-24.el --- seq.el implementation for Emacs 24.x -*- lexical-binding: t 
-*-
+
+;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
+
+;; Author: Nicolas Petton <address@hidden>
+;; Keywords: sequences
+
+;; Maintainer: 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:
+
+;; Sequence-manipulation functions that complement basic functions
+;; provided by subr.el.
+;;
+;; All functions are prefixed with "seq-".
+;;
+;; All provided functions work on lists, strings and vectors.
+;;
+;; Functions taking a predicate or iterating over a sequence using a
+;; function as argument take the function as their first argument and
+;; the sequence as their second argument.  All other functions take
+;; the sequence as their first argument.
+
+;;; Code:
+
+(defmacro seq-doseq (spec &rest body)
+  "Loop over a sequence.
+Similar to `dolist' but can be applied to lists, strings, and vectors.
+
+Evaluate BODY with VAR bound to each element of SEQ, in turn.
+
+\(fn (VAR SEQ) BODY...)"
+  (declare (indent 1) (debug ((symbolp form &optional form) body)))
+  (let ((length (make-symbol "length"))
+        (seq (make-symbol "seq"))
+        (index (make-symbol "index")))
+    `(let* ((,seq ,(cadr spec))
+            (,length (if (listp ,seq) nil (seq-length ,seq)))
+            (,index (if ,length 0 ,seq)))
+       (while (if ,length
+                  (< ,index ,length)
+                (consp ,index))
+         (let ((,(car spec) (if ,length
+                                (prog1 (seq-elt ,seq ,index)
+                                  (setq ,index (+ ,index 1)))
+                              (pop ,index))))
+           ,@body)))))
+
+;; Implementation of `seq-let' compatible with Emacs<25.1.
+(defmacro seq-let (args sequence &rest body)
+  "Bind the variables in ARGS to the elements of SEQUENCE then evaluate BODY.
+
+ARGS can also include the `&rest' marker followed by a variable
+name to be bound to the rest of SEQUENCE."
+  (declare (indent 2) (debug t))
+  (let ((seq-var (make-symbol "seq")))
+    `(let* ((,seq-var ,sequence)
+            ,@(seq--make-bindings args seq-var))
+       ,@body)))
+
+(defun seq-drop (sequence n)
+  "Return a subsequence of SEQUENCE without its first N elements.
+The result is a sequence of the same type as SEQUENCE.
+
+If N is a negative integer or zero, SEQUENCE is returned."
+  (if (<= n 0)
+      sequence
+    (if (listp sequence)
+        (seq--drop-list sequence n)
+      (let ((length (seq-length sequence)))
+        (seq-subseq sequence (min n length) length)))))
+
+(defun seq-take (sequence n)
+  "Return a subsequence of SEQUENCE with its first N elements.
+The result is a sequence of the same type as SEQUENCE.
+
+If N is a negative integer or zero, an empty sequence is
+returned."
+  (if (listp sequence)
+      (seq--take-list sequence n)
+    (seq-subseq sequence 0 (min (max n 0) (seq-length sequence)))))
+
+(defun seq-drop-while (predicate sequence)
+  "Return a sequence from the first element for which (PREDICATE element) is 
nil in SEQUENCE.
+The result is a sequence of the same type as SEQUENCE."
+  (if (listp sequence)
+      (seq--drop-while-list predicate sequence)
+    (seq-drop sequence (seq--count-successive predicate sequence))))
+
+(defun seq-take-while (predicate sequence)
+  "Return the successive elements for which (PREDICATE element) is non-nil in 
SEQUENCE.
+The result is a sequence of the same type as SEQUENCE."
+  (if (listp sequence)
+      (seq--take-while-list predicate sequence)
+    (seq-take sequence (seq--count-successive predicate sequence))))
+
+(defun seq-filter (predicate sequence)
+  "Return a list of all the elements for which (PREDICATE element) is non-nil 
in SEQUENCE."
+  (let ((exclude (make-symbol "exclude")))
+    (delq exclude (seq-map (lambda (elt)
+                             (if (funcall predicate elt)
+                                 elt
+                               exclude))
+                           sequence))))
+
+(defun seq-map-indexed (function sequence)
+  "Return the result of applying FUNCTION to each element of SEQUENCE.
+Unlike `seq-map', FUNCTION takes two arguments: the element of
+the sequence, and its index within the sequence."
+  (let ((index 0))
+    (seq-map (lambda (elt)
+               (prog1
+                   (funcall function elt index)
+                 (setq index (1+ index))))
+             sequence)))
+
+(defun seq-remove (predicate sequence)
+  "Return a list of all the elements for which (PREDICATE element) is nil in 
SEQUENCE."
+  (seq-filter (lambda (elt) (not (funcall predicate elt)))
+              sequence))
+
+(defun seq-reduce (function sequence initial-value)
+  "Reduce the function FUNCTION across SEQUENCE, starting with INITIAL-VALUE.
+
+Return the result of calling FUNCTION with INITIAL-VALUE and the
+first element of SEQUENCE, then calling FUNCTION with that result and
+the second element of SEQUENCE, then with that result and the third
+element of SEQUENCE, etc.
+
+If SEQUENCE is empty, return INITIAL-VALUE and FUNCTION is not called."
+  (if (seq-empty-p sequence)
+      initial-value
+    (let ((acc initial-value))
+      (seq-doseq (elt sequence)
+        (setq acc (funcall function acc elt)))
+      acc)))
+
+(defun seq-some (predicate sequence)
+  "Return the first value for which if (PREDICATE element) is non-nil for in 
SEQUENCE."
+  (catch 'seq--break
+    (seq-doseq (elt sequence)
+      (let ((result (funcall predicate elt)))
+        (when result
+          (throw 'seq--break result))))
+    nil))
+
+(defun seq-find (predicate sequence &optional default)
+  "Return the first element for which (PREDICATE element) is non-nil in 
SEQUENCE.
+If no element is found, return DEFAULT.
+
+Note that `seq-find' has an ambiguity if the found element is
+identical to DEFAULT, as it cannot be known if an element was
+found or not."
+  (catch 'seq--break
+    (seq-doseq (elt sequence)
+      (when (funcall predicate elt)
+        (throw 'seq--break elt)))
+    default))
+
+(defun seq-every-p (predicate sequence)
+  "Return non-nil if (PREDICATE element) is non-nil for all elements of the 
sequence SEQUENCE."
+  (catch 'seq--break
+    (seq-doseq (elt sequence)
+      (or (funcall predicate elt)
+          (throw 'seq--break nil)))
+    t))
+
+(defun seq-count (predicate sequence)
+  "Return the number of elements for which (PREDICATE element) is non-nil in 
SEQUENCE."
+  (let ((count 0))
+    (seq-doseq (elt sequence)
+      (when (funcall predicate elt)
+        (setq count (+ 1 count))))
+    count))
+
+(defun seq-empty-p (sequence)
+  "Return non-nil if the sequence SEQUENCE is empty, nil otherwise."
+  (if (listp sequence)
+      (null sequence)
+    (= 0 (seq-length sequence))))
+
+(defun seq-sort (predicate sequence)
+  "Return a sorted sequence comparing using PREDICATE the elements of SEQUENCE.
+The result is a sequence of the same type as SEQUENCE."
+  (if (listp sequence)
+      (sort (seq-copy sequence) predicate)
+    (let ((result (seq-sort predicate (append sequence nil))))
+      (seq-into result (type-of sequence)))))
+
+(defun seq-sort-by (function pred sequence)
+  "Sort SEQUENCE using PRED as a comparison function.
+Elements of SEQUENCE are transformed by FUNCTION before being
+sorted.  FUNCTION must be a function of one argument."
+  (seq-sort (lambda (a b)
+              (funcall pred
+                       (funcall function a)
+                       (funcall function b)))
+            sequence))
+
+(defun seq-contains (sequence elt &optional testfn)
+  "Return the first element in SEQUENCE that equals to ELT.
+Equality is defined by TESTFN if non-nil or by `equal' if nil."
+  (seq-some (lambda (e)
+                (funcall (or testfn #'equal) elt e))
+              sequence))
+
+(defun seq-position (sequence elt &optional testfn)
+  "Return the index of the first element in SEQUENCE that is equal to ELT.
+Equality is defined by TESTFN if non-nil or by `equal' if nil."
+  (let ((index 0))
+    (catch 'seq--break
+      (seq-doseq (e sequence)
+        (when (funcall (or testfn #'equal) e elt)
+          (throw 'seq--break index))
+        (setq index (1+ index)))
+      nil)))
+
+(defun seq-uniq (sequence &optional testfn)
+  "Return a list of the elements of SEQUENCE with duplicates removed.
+TESTFN is used to compare elements, or `equal' if TESTFN is nil."
+  (let ((result '()))
+    (seq-doseq (elt sequence)
+      (unless (seq-contains result elt testfn)
+        (setq result (cons elt result))))
+    (nreverse result)))
+
+(defun seq-subseq (sequence start &optional end)
+  "Return the subsequence of SEQUENCE from START to END.
+If END is omitted, it defaults to the length of the sequence.
+If START or END is negative, it counts from the end."
+  (cond ((or (stringp sequence) (vectorp sequence)) (substring sequence start 
end))
+        ((listp sequence)
+         (let (len (errtext (format "Bad bounding indices: %s, %s" start end)))
+           (and end (< end 0) (setq end (+ end (setq len (seq-length 
sequence)))))
+           (if (< start 0) (setq start (+ start (or len (setq len (seq-length 
sequence))))))
+           (when (> start 0)
+             (setq sequence (nthcdr (1- start) sequence))
+             (or sequence (error "%s" errtext))
+             (setq sequence (cdr sequence)))
+           (if end
+               (let ((res nil))
+                 (while (and (>= (setq end (1- end)) start) sequence)
+                   (push (pop sequence) res))
+                 (or (= (1+ end) start) (error "%s" errtext))
+                 (nreverse res))
+             (seq-copy sequence))))
+        (t (error "Unsupported sequence: %s" sequence))))
+
+(defun seq-concatenate (type &rest seqs)
+  "Concatenate, into a sequence of type TYPE, the sequences SEQS.
+TYPE must be one of following symbols: vector, string or list.
+
+\n(fn TYPE SEQUENCE...)"
+  (pcase type
+    (`vector (apply #'vconcat seqs))
+    (`string (apply #'concat seqs))
+    (`list (apply #'append (append seqs '(nil))))
+    (_ (error "Not a sequence type name: %S" type))))
+
+(defun seq-mapcat (function sequence &optional type)
+  "Concatenate the result of applying FUNCTION to each element of SEQUENCE.
+The result is a sequence of type TYPE, or a list if TYPE is nil."
+  (apply #'seq-concatenate (or type 'list)
+         (seq-map function sequence)))
+
+(defun seq-mapn (function sequence &rest seqs)
+  "Like `seq-map' but FUNCTION is mapped over all SEQS.
+The arity of FUNCTION must match the number of SEQS, and the
+mapping stops on the shortest sequence.
+Return a list of the results.
+
+\(fn FUNCTION SEQS...)"
+  (let ((result nil)
+        (seqs (seq-map (lambda (s) (seq-into s 'list))
+                       (cons sequence seqs))))
+    (while (not (memq nil seqs))
+      (push (apply function (seq-map #'car seqs)) result)
+      (setq seqs (seq-map #'cdr seqs)))
+    (nreverse result)))
+
+(defun seq-partition (sequence n)
+  "Return a list of the elements of SEQUENCE grouped into sub-sequences of 
length N.
+The last sequence may contain less than N elements.  If N is a
+negative integer or 0, nil is returned."
+  (unless (< n 1)
+    (let ((result '()))
+      (while (not (seq-empty-p sequence))
+        (push (seq-take sequence n) result)
+        (setq sequence (seq-drop sequence n)))
+      (nreverse result))))
+
+(defun seq-intersection (seq1 seq2 &optional testfn)
+  "Return a list of the elements that appear in both SEQ1 and SEQ2.
+Equality is defined by TESTFN if non-nil or by `equal' if nil."
+  (seq-reduce (lambda (acc elt)
+                (if (seq-contains seq2 elt testfn)
+                    (cons elt acc)
+                  acc))
+              (seq-reverse seq1)
+              '()))
+
+(defun seq-difference (seq1 seq2 &optional testfn)
+  "Return a list of the elements that appear in SEQ1 but not in SEQ2.
+Equality is defined by TESTFN if non-nil or by `equal' if nil."
+  (seq-reduce (lambda (acc elt)
+                (if (not (seq-contains seq2 elt testfn))
+                    (cons elt acc)
+                  acc))
+              (seq-reverse seq1)
+              '()))
+
+(defun seq-group-by (function sequence)
+  "Apply FUNCTION to each element of SEQUENCE.
+Separate the elements of SEQUENCE into an alist using the results as
+keys.  Keys are compared using `equal'."
+  (seq-reduce
+   (lambda (acc elt)
+     (let* ((key (funcall function elt))
+            (cell (assoc key acc)))
+       (if cell
+           (setcdr cell (push elt (cdr cell)))
+         (push (list key elt) acc))
+       acc))
+   (seq-reverse sequence)
+   nil))
+
+(defalias 'seq-reverse
+  (if (ignore-errors (reverse [1 2]))
+      #'reverse
+    (lambda (sequence)
+      "Return the reversed copy of list, vector, or string SEQUENCE.
+See also the function `nreverse', which is used more often."
+      (let ((result '()))
+        (seq-map (lambda (elt) (push elt result))
+                 sequence)
+        (if (listp sequence)
+            result
+          (seq-into result (type-of sequence)))))))
+
+(defun seq-into (sequence type)
+  "Convert the sequence SEQUENCE into a sequence of type TYPE.
+TYPE can be one of the following symbols: vector, string or list."
+  (pcase type
+    (`vector (vconcat sequence))
+    (`string (concat sequence))
+    (`list (append sequence nil))
+    (_ (error "Not a sequence type name: %S" type))))
+
+(defun seq-min (sequence)
+  "Return the smallest element of SEQUENCE.
+SEQUENCE must be a sequence of numbers or markers."
+  (apply #'min (seq-into sequence 'list)))
+
+(defun seq-max (sequence)
+    "Return the largest element of SEQUENCE.
+SEQUENCE must be a sequence of numbers or markers."
+  (apply #'max (seq-into sequence 'list)))
+
+(defun seq--drop-list (list n)
+  "Return a list from LIST without its first N elements.
+This is an optimization for lists in `seq-drop'."
+  (nthcdr n list))
+
+(defun seq--take-list (list n)
+  "Return a list from LIST made of its first N elements.
+This is an optimization for lists in `seq-take'."
+  (let ((result '()))
+    (while (and list (> n 0))
+      (setq n (1- n))
+      (push (pop list) result))
+    (nreverse result)))
+
+(defun seq--drop-while-list (predicate list)
+  "Return a list from the first element for which (PREDICATE element) is nil 
in LIST.
+This is an optimization for lists in `seq-drop-while'."
+  (while (and list (funcall predicate (car list)))
+    (setq list (cdr list)))
+  list)
+
+(defun seq--take-while-list (predicate list)
+  "Return the successive elements for which (PREDICATE element) is non-nil in 
LIST.
+This is an optimization for lists in `seq-take-while'."
+  (let ((result '()))
+    (while (and list (funcall predicate (car list)))
+      (push (pop list) result))
+    (nreverse result)))
+
+(defun seq--count-successive (predicate sequence)
+  "Return the number of successive elements for which (PREDICATE element) is 
non-nil in SEQUENCE."
+  (let ((n 0)
+        (len (seq-length sequence)))
+    (while (and (< n len)
+                (funcall predicate (seq-elt sequence n)))
+      (setq n (+ 1 n)))
+    n))
+
+;; Helper function for the Backward-compatible version of `seq-let'
+;; for Emacs<25.1.
+(defun seq--make-bindings (args sequence &optional bindings)
+  "Return a list of bindings of the variables in ARGS to the elements of a 
sequence.
+if BINDINGS is non-nil, append new bindings to it, and return
+BINDINGS."
+  (let ((index 0)
+        (rest-marker nil))
+    (seq-doseq (name args)
+      (unless rest-marker
+        (pcase name
+          ((pred seqp)
+           (setq bindings (seq--make-bindings (seq--elt-safe args index)
+                                              `(seq--elt-safe ,sequence ,index)
+                                              bindings)))
+          (`&rest
+           (progn (push `(,(seq--elt-safe args (1+ index))
+                          (seq-drop ,sequence ,index))
+                        bindings)
+                  (setq rest-marker t)))
+          (_
+           (push `(,name (seq--elt-safe ,sequence ,index)) bindings))))
+      (setq index (1+ index)))
+    bindings))
+
+(defun seq--elt-safe (sequence n)
+  "Return element of SEQUENCE at the index N.
+If no element is found, return nil."
+  (when (or (listp sequence)
+            (and (sequencep sequence)
+                 (> (seq-length sequence) n)))
+    (seq-elt sequence n)))
+
+(defun seq--activate-font-lock-keywords ()
+  "Activate font-lock keywords for some symbols defined in seq."
+  (font-lock-add-keywords 'emacs-lisp-mode
+                          '("\\<seq-doseq\\>" "\\<seq-let\\>")))
+
+(defalias 'seq-copy #'copy-sequence)
+(defalias 'seq-elt #'elt)
+(defalias 'seq-length #'length)
+(defalias 'seq-do #'mapc)
+(defalias 'seq-each #'seq-do)
+(defalias 'seq-map #'mapcar)
+(defalias 'seqp #'sequencep)
+
+(unless (fboundp 'elisp--font-lock-flush-elisp-buffers)
+  ;; In Emacs≥25, (via elisp--font-lock-flush-elisp-buffers and a few others)
+  ;; we automatically highlight macros.
+  (add-hook 'emacs-lisp-mode-hook #'seq--activate-font-lock-keywords))
+
+(provide 'seq-24)
+;;; seq-24.el ends here
diff --git a/packages/seq/seq-25.el b/packages/seq/seq-25.el
new file mode 100644
index 0000000..a497f70
--- /dev/null
+++ b/packages/seq/seq-25.el
@@ -0,0 +1,498 @@
+;;; seq-25.el --- seq.el implementation for Emacs 25.x -*- lexical-binding: t 
-*-
+
+;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
+
+;; Author: Nicolas Petton <address@hidden>
+;; Keywords: sequences
+
+;; Maintainer: 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:
+
+;; Sequence-manipulation functions that complement basic functions
+;; provided by subr.el.
+;;
+;; All functions are prefixed with "seq-".
+;;
+;; All provided functions work on lists, strings and vectors.
+;;
+;; Functions taking a predicate or iterating over a sequence using a
+;; function as argument take the function as their first argument and
+;; the sequence as their second argument.  All other functions take
+;; the sequence as their first argument.
+;;
+;; seq.el can be extended to support new type of sequences.  Here are
+;; the generic functions that must be implemented by new seq types:
+;; - `seq-elt'
+;; - `seq-length'
+;; - `seq-do'
+;; - `seqp'
+;; - `seq-subseq'
+;; - `seq-into-sequence'
+;; - `seq-copy'
+;; - `seq-into'
+
+;;; Code:
+
+;; When loading seq.el in Emacs 24.x, this file gets byte-compiled, even if
+;; never used.  This takes care of byte-compilation warnings is emitted, by
+;; emitting nil in the macro expansion in Emacs 24.x.
+(defmacro seq--when-emacs-25-p (&rest body)
+  "Execute BODY if in Emacs>=25.x."
+  (declare (indent (lambda (&rest x) 0)) (debug t))
+  (when (version<= "25" emacs-version)
+    `(progn ,@body)))
+
+(seq--when-emacs-25-p
+
+(require 'cl-generic)
+(require 'cl-lib) ;; for cl-subseq
+
+(defmacro seq-doseq (spec &rest body)
+  "Loop over a sequence.
+Evaluate BODY with VAR bound to each element of SEQUENCE, in turn.
+
+Similar to `dolist' but can be applied to lists, strings, and vectors.
+
+\(fn (VAR SEQUENCE) BODY...)"
+  (declare (indent 1) (debug ((symbolp form &optional form) body)))
+  `(seq-do (lambda (,(car spec))
+             ,@body)
+           ,(cadr spec)))
+
+(pcase-defmacro seq (&rest patterns)
+  "Build a `pcase' pattern that matches elements of SEQUENCE.
+
+The `pcase' pattern will match each element of PATTERNS against the
+corresponding element of SEQUENCE.
+
+Extra elements of the sequence are ignored if fewer PATTERNS are
+given, and the match does not fail."
+  `(and (pred seqp)
+        ,@(seq--make-pcase-bindings patterns)))
+
+(defmacro seq-let (args sequence &rest body)
+  "Bind the variables in ARGS to the elements of SEQUENCE, then evaluate BODY.
+
+ARGS can also include the `&rest' marker followed by a variable
+name to be bound to the rest of SEQUENCE."
+  (declare (indent 2) (debug t))
+  `(pcase-let ((,(seq--make-pcase-patterns args) ,sequence))
+     ,@body))
+
+
+;;; Basic seq functions that have to be implemented by new sequence types
+(cl-defgeneric seq-elt (sequence n)
+  "Return Nth element of SEQUENCE."
+  (elt sequence n))
+
+;; Default gv setters for `seq-elt'.
+;; It can be a good idea for new sequence implementations to provide a
+;; "gv-setter" for `seq-elt'.
+(cl-defmethod (setf seq-elt) (store (sequence array) n)
+  (aset sequence n store))
+
+(cl-defmethod (setf seq-elt) (store (sequence cons) n)
+  (setcar (nthcdr n sequence) store))
+
+(cl-defgeneric seq-length (sequence)
+  "Return the number of elements of SEQUENCE."
+  (length sequence))
+
+(cl-defgeneric seq-do (function sequence)
+  "Apply FUNCTION to each element of SEQUENCE, presumably for side effects.
+Return SEQUENCE."
+  (mapc function sequence))
+
+(defalias 'seq-each #'seq-do)
+
+(cl-defgeneric seqp (sequence)
+  "Return non-nil if SEQUENCE is a sequence, nil otherwise."
+  (sequencep sequence))
+
+(cl-defgeneric seq-copy (sequence)
+  "Return a shallow copy of SEQUENCE."
+  (copy-sequence sequence))
+
+(cl-defgeneric seq-subseq (sequence start &optional end)
+  "Return the sequence of elements of SEQUENCE from START to END.
+END is exclusive.
+
+If END is omitted, it defaults to the length of the sequence.  If
+START or END is negative, it counts from the end.  Signal an
+error if START or END are outside of the sequence (i.e too large
+if positive or too small if negative)."
+  (cl-subseq sequence start end))
+
+
+(cl-defgeneric seq-map (function sequence)
+  "Return the result of applying FUNCTION to each element of SEQUENCE."
+  (let (result)
+    (seq-do (lambda (elt)
+              (push (funcall function elt) result))
+            sequence)
+    (nreverse result)))
+
+(defun seq-map-indexed (function sequence)
+  "Return the result of applying FUNCTION to each element of SEQUENCE.
+Unlike `seq-map', FUNCTION takes two arguments: the element of
+the sequence, and its index within the sequence."
+  (let ((index 0))
+    (seq-map (lambda (elt)
+               (prog1
+                   (funcall function elt index)
+                 (setq index (1+ index))))
+             sequence)))
+
+;; faster implementation for sequences (sequencep)
+(cl-defmethod seq-map (function (sequence sequence))
+  (mapcar function sequence))
+
+(cl-defgeneric 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)))
+
+(cl-defgeneric seq-drop (sequence n)
+  "Remove the first N elements of SEQUENCE and return the result.
+The result is a sequence of the same type as SEQUENCE.
+
+If N is a negative integer or zero, SEQUENCE is returned."
+  (if (<= n 0)
+      sequence
+    (let ((length (seq-length sequence)))
+      (seq-subseq sequence (min n length) length))))
+
+(cl-defgeneric seq-take (sequence n)
+  "Take the first N elements of SEQUENCE and return the result.
+The result is a sequence of the same type as SEQUENCE.
+
+If N is a negative integer or zero, an empty sequence is
+returned."
+  (seq-subseq sequence 0 (min (max n 0) (seq-length sequence))))
+
+(cl-defgeneric seq-drop-while (pred sequence)
+  "Remove the successive elements of SEQUENCE for which PRED returns non-nil.
+PRED is a function of one argument.  The result is a sequence of
+the same type as SEQUENCE."
+  (seq-drop sequence (seq--count-successive pred sequence)))
+
+(cl-defgeneric seq-take-while (pred sequence)
+  "Take the successive elements of SEQUENCE for which PRED returns non-nil.
+PRED is a function of one argument.  The result is a sequence of
+the same type as SEQUENCE."
+  (seq-take sequence (seq--count-successive pred sequence)))
+
+(cl-defgeneric seq-empty-p (sequence)
+  "Return non-nil if the SEQUENCE is empty, nil otherwise."
+  (= 0 (seq-length sequence)))
+
+(cl-defgeneric seq-sort (pred sequence)
+  "Sort SEQUENCE using PRED as comparison function.
+The result is a sequence of the same type as SEQUENCE."
+  (let ((result (seq-sort pred (append sequence nil))))
+    (seq-into result (type-of sequence))))
+
+(defun seq-sort-by (function pred sequence)
+  "Sort SEQUENCE using PRED as a comparison function.
+Elements of SEQUENCE are transformed by FUNCTION before being
+sorted.  FUNCTION must be a function of one argument."
+  (seq-sort (lambda (a b)
+              (funcall pred
+                       (funcall function a)
+                       (funcall function b)))
+            sequence))
+
+(cl-defmethod seq-sort (pred (list list))
+  (sort (seq-copy list) pred))
+
+(cl-defgeneric seq-reverse (sequence)
+  "Return a sequence with elements of SEQUENCE in reverse order."
+  (let ((result '()))
+    (seq-map (lambda (elt)
+               (push elt result))
+             sequence)
+    (seq-into result (type-of sequence))))
+
+;; faster implementation for sequences (sequencep)
+(cl-defmethod seq-reverse ((sequence sequence))
+  (reverse sequence))
+
+(cl-defgeneric seq-concatenate (type &rest sequences)
+  "Concatenate SEQUENCES into a single sequence of type TYPE.
+TYPE must be one of following symbols: vector, string or list.
+
+\n(fn TYPE SEQUENCE...)"
+  (apply #'cl-concatenate type (seq-map #'seq-into-sequence sequences)))
+
+(cl-defgeneric seq-into-sequence (sequence)
+  "Convert SEQUENCE into a sequence.
+
+The default implementation is to signal an error if SEQUENCE is not a
+sequence, specific functions should be implemented for new types
+of sequence."
+  (unless (sequencep sequence)
+    (error "Cannot convert %S into a sequence" sequence))
+  sequence)
+
+(cl-defgeneric seq-into (sequence type)
+  "Concatenate the elements of SEQUENCE into a sequence of type TYPE.
+TYPE can be one of the following symbols: vector, string or
+list."
+  (pcase type
+    (`vector (vconcat sequence))
+    (`string (concat sequence))
+    (`list (append sequence nil))
+    (_ (error "Not a sequence type name: %S" type))))
+
+(cl-defgeneric seq-filter (pred sequence)
+  "Return a list of all the elements for which (PRED element) is non-nil in 
SEQUENCE."
+  (let ((exclude (make-symbol "exclude")))
+    (delq exclude (seq-map (lambda (elt)
+                             (if (funcall pred elt)
+                                 elt
+                               exclude))
+                           sequence))))
+
+(cl-defgeneric seq-remove (pred sequence)
+  "Return a list of all the elements for which (PRED element) is nil in 
SEQUENCE."
+  (seq-filter (lambda (elt) (not (funcall pred elt)))
+              sequence))
+
+(cl-defgeneric seq-reduce (function sequence initial-value)
+  "Reduce the function FUNCTION across SEQUENCE, starting with INITIAL-VALUE.
+
+Return the result of calling FUNCTION with INITIAL-VALUE and the
+first element of SEQUENCE, then calling FUNCTION with that result and
+the second element of SEQUENCE, then with that result and the third
+element of SEQUENCE, etc.
+
+If SEQUENCE is empty, return INITIAL-VALUE and FUNCTION is not called."
+  (if (seq-empty-p sequence)
+      initial-value
+    (let ((acc initial-value))
+      (seq-doseq (elt sequence)
+        (setq acc (funcall function acc elt)))
+      acc)))
+
+(cl-defgeneric seq-every-p (pred sequence)
+  "Return non-nil if (PRED element) is non-nil for all elements of SEQUENCE."
+  (catch 'seq--break
+    (seq-doseq (elt sequence)
+      (or (funcall pred elt)
+          (throw 'seq--break nil)))
+    t))
+
+(cl-defgeneric seq-some (pred sequence)
+  "Return the first value for which if (PRED element) is non-nil for in 
SEQUENCE."
+  (catch 'seq--break
+    (seq-doseq (elt sequence)
+      (let ((result (funcall pred elt)))
+        (when result
+          (throw 'seq--break result))))
+    nil))
+
+(cl-defgeneric seq-find (pred sequence &optional default)
+  "Return the first element for which (PRED element) is non-nil in SEQUENCE.
+If no element is found, return DEFAULT.
+
+Note that `seq-find' has an ambiguity if the found element is
+identical to DEFAULT, as it cannot be known if an element was
+found or not."
+  (catch 'seq--break
+    (seq-doseq (elt sequence)
+      (when (funcall pred elt)
+        (throw 'seq--break elt)))
+    default))
+
+(cl-defgeneric seq-count (pred sequence)
+  "Return the number of elements for which (PRED element) is non-nil in 
SEQUENCE."
+  (let ((count 0))
+    (seq-doseq (elt sequence)
+      (when (funcall pred elt)
+        (setq count (+ 1 count))))
+    count))
+
+(cl-defgeneric seq-contains (sequence elt &optional testfn)
+  "Return the first element in SEQUENCE that is equal to ELT.
+Equality is defined by TESTFN if non-nil or by `equal' if nil."
+  (seq-some (lambda (e)
+              (funcall (or testfn #'equal) elt e))
+            sequence))
+
+(cl-defgeneric seq-position (sequence elt &optional testfn)
+  "Return the index of the first element in SEQUENCE that is equal to ELT.
+Equality is defined by TESTFN if non-nil or by `equal' if nil."
+  (let ((index 0))
+    (catch 'seq--break
+      (seq-doseq (e sequence)
+        (when (funcall (or testfn #'equal) e elt)
+          (throw 'seq--break index))
+        (setq index (1+ index)))
+      nil)))
+
+(cl-defgeneric seq-uniq (sequence &optional testfn)
+  "Return a list of the elements of SEQUENCE with duplicates removed.
+TESTFN is used to compare elements, or `equal' if TESTFN is nil."
+  (let ((result '()))
+    (seq-doseq (elt sequence)
+      (unless (seq-contains result elt testfn)
+        (setq result (cons elt result))))
+    (nreverse result)))
+
+(cl-defgeneric seq-mapcat (function sequence &optional type)
+  "Concatenate the result of applying FUNCTION to each element of SEQUENCE.
+The result is a sequence of type TYPE, or a list if TYPE is nil."
+  (apply #'seq-concatenate (or type 'list)
+         (seq-map function sequence)))
+
+(cl-defgeneric seq-partition (sequence n)
+  "Return a list of the elements of SEQUENCE grouped into sub-sequences of 
length N.
+The last sequence may contain less than N elements.  If N is a
+negative integer or 0, nil is returned."
+  (unless (< n 1)
+    (let ((result '()))
+      (while (not (seq-empty-p sequence))
+        (push (seq-take sequence n) result)
+        (setq sequence (seq-drop sequence n)))
+      (nreverse result))))
+
+(cl-defgeneric seq-intersection (sequence1 sequence2 &optional testfn)
+  "Return a list of the elements that appear in both SEQUENCE1 and SEQUENCE2.
+Equality is defined by TESTFN if non-nil or by `equal' if nil."
+  (seq-reduce (lambda (acc elt)
+                (if (seq-contains sequence2 elt testfn)
+                    (cons elt acc)
+                  acc))
+              (seq-reverse sequence1)
+              '()))
+
+(cl-defgeneric seq-difference (sequence1 sequence2 &optional testfn)
+  "Return a list of the elements that appear in SEQUENCE1 but not in SEQUENCE2.
+Equality is defined by TESTFN if non-nil or by `equal' if nil."
+  (seq-reduce (lambda (acc elt)
+                (if (not (seq-contains sequence2 elt testfn))
+                    (cons elt acc)
+                  acc))
+              (seq-reverse sequence1)
+              '()))
+
+(cl-defgeneric seq-group-by (function sequence)
+  "Apply FUNCTION to each element of SEQUENCE.
+Separate the elements of SEQUENCE into an alist using the results as
+keys.  Keys are compared using `equal'."
+  (seq-reduce
+   (lambda (acc elt)
+     (let* ((key (funcall function elt))
+            (cell (assoc key acc)))
+       (if cell
+           (setcdr cell (push elt (cdr cell)))
+         (push (list key elt) acc))
+       acc))
+   (seq-reverse sequence)
+   nil))
+
+(cl-defgeneric seq-min (sequence)
+  "Return the smallest element of SEQUENCE.
+SEQUENCE must be a sequence of numbers or markers."
+  (apply #'min (seq-into sequence 'list)))
+
+(cl-defgeneric seq-max (sequence)
+  "Return the largest element of SEQUENCE.
+SEQUENCE must be a sequence of numbers or markers."
+  (apply #'max (seq-into sequence 'list)))
+
+(defun seq--count-successive (pred sequence)
+  "Return the number of successive elements for which (PRED element) is 
non-nil in SEQUENCE."
+  (let ((n 0)
+        (len (seq-length sequence)))
+    (while (and (< n len)
+                (funcall pred (seq-elt sequence n)))
+      (setq n (+ 1 n)))
+    n))
+
+;;; Optimized implementations for lists
+
+(cl-defmethod seq-drop ((list list) n)
+  "Optimized implementation of `seq-drop' for lists."
+  (nthcdr n list))
+
+(cl-defmethod seq-take ((list list) n)
+  "Optimized implementation of `seq-take' for lists."
+  (let ((result '()))
+    (while (and list (> n 0))
+      (setq n (1- n))
+      (push (pop list) result))
+    (nreverse result)))
+
+(cl-defmethod seq-drop-while (pred (list list))
+  "Optimized implementation of `seq-drop-while' for lists."
+  (while (and list (funcall pred (car list)))
+    (setq list (cdr list)))
+  list)
+
+(cl-defmethod seq-empty-p ((list list))
+  "Optimized implementation of `seq-empty-p' for lists."
+  (null list))
+
+
+(defun seq--make-pcase-bindings (args)
+  "Return a list of bindings of the variables in ARGS to the elements of a 
sequence."
+  (let ((bindings '())
+        (index 0)
+        (rest-marker nil))
+    (seq-doseq (name args)
+      (unless rest-marker
+        (pcase name
+          (`&rest
+           (progn (push `(app (pcase--flip seq-drop ,index)
+                              ,(seq--elt-safe args (1+ index)))
+                        bindings)
+                  (setq rest-marker t)))
+          (_
+           (push `(app (pcase--flip seq--elt-safe ,index) ,name) bindings))))
+      (setq index (1+ index)))
+    bindings))
+
+(defun seq--make-pcase-patterns (args)
+  "Return a list of `(seq ...)' pcase patterns from the argument list ARGS."
+  (cons 'seq
+        (seq-map (lambda (elt)
+                   (if (seqp elt)
+                       (seq--make-pcase-patterns elt)
+                     elt))
+                 args)))
+
+;; TODO: make public?
+(defun seq--elt-safe (sequence n)
+  "Return element of SEQUENCE at the index N.
+If no element is found, return nil."
+  (ignore-errors (seq-elt sequence n))))
+
+(provide 'seq-25)
+;;; seq-25.el ends here
diff --git a/packages/seq/seq.el b/packages/seq/seq.el
index 58f6903..9f96ec8 100644
--- a/packages/seq/seq.el
+++ b/packages/seq/seq.el
@@ -1,10 +1,10 @@
 ;;; seq.el --- Sequence manipulation functions  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
 
 ;; Author: Nicolas Petton <address@hidden>
 ;; Keywords: sequences
-;; Version: 1.11
+;; Version: 2.16
 ;; Package: seq
 
 ;; Maintainer: address@hidden
@@ -37,447 +37,12 @@
 ;; function as argument take the function as their first argument and
 ;; the sequence as their second argument.  All other functions take
 ;; the sequence as their first argument.
-;;
-;; All functions are tested in test/automated/seq-tests.el
 
 ;;; Code:
 
-(defmacro seq-doseq (spec &rest body)
-  "Loop over a sequence.
-Similar to `dolist' but can be applied to lists, strings, and vectors.
-
-Evaluate BODY with VAR bound to each element of SEQ, in turn.
-
-\(fn (VAR SEQ) BODY...)"
-  (declare (indent 1) (debug ((symbolp form &optional form) body)))
-  (let ((length (make-symbol "length"))
-        (seq (make-symbol "seq"))
-        (index (make-symbol "index")))
-    `(let* ((,seq ,(cadr spec))
-            (,length (if (listp ,seq) nil (seq-length ,seq)))
-            (,index (if ,length 0 ,seq)))
-       (while (if ,length
-                  (< ,index ,length)
-                (consp ,index))
-         (let ((,(car spec) (if ,length
-                                (prog1 (seq-elt ,seq ,index)
-                                  (setq ,index (+ ,index 1)))
-                              (pop ,index))))
-           ,@body)))))
-
-(if (fboundp 'pcase-defmacro)
-    ;; Implementation of `seq-let' based on a `pcase'
-    ;; pattern. Requires Emacs>=25.1.
-    (progn
-      (pcase-defmacro seq (&rest args)
-        "pcase pattern matching sequence elements.
-Matches if the object is a sequence (list, string or vector), and
-binds each element of ARGS to the corresponding element of the
-sequence."
-        `(and (pred seq-p)
-              ,@(seq--make-pcase-bindings args)))
-
-      (defmacro seq-let (args seq &rest body)
-        "Bind the variables in ARGS to the elements of SEQ then evaluate BODY.
-
-ARGS can also include the `&rest' marker followed by a variable
-name to be bound to the rest of SEQ."
-        (declare (indent 2) (debug t))
-        `(pcase-let ((,(seq--make-pcase-patterns args) ,seq))
-           ,@body)))
-
-  ;; Implementation of `seq-let' compatible with Emacs<25.1.
-  (defmacro seq-let (args seq &rest body)
-    "Bind the variables in ARGS to the elements of SEQ then evaluate BODY.
-
-ARGS can also include the `&rest' marker followed by a variable
-name to be bound to the rest of SEQ."
-    (declare (indent 2) (debug t))
-    (let ((seq-var (make-symbol "seq")))
-      `(let* ((,seq-var ,seq)
-              ,@(seq--make-bindings args seq-var))
-         ,@body))))
-
-(defun seq-drop (seq n)
-  "Return a subsequence of SEQ without its first N elements.
-The result is a sequence of the same type as SEQ.
-
-If N is a negative integer or zero, SEQ is returned."
-  (if (<= n 0)
-      seq
-    (if (listp seq)
-        (seq--drop-list seq n)
-      (let ((length (seq-length seq)))
-        (seq-subseq seq (min n length) length)))))
-
-(defun seq-take (seq n)
-  "Return a subsequence of SEQ with its first N elements.
-The result is a sequence of the same type as SEQ.
-
-If N is a negative integer or zero, an empty sequence is
-returned."
-  (if (listp seq)
-      (seq--take-list seq n)
-    (seq-subseq seq 0 (min (max n 0) (seq-length seq)))))
-
-(defun seq-drop-while (pred seq)
-  "Return a sequence from the first element for which (PRED element) is nil in 
SEQ.
-The result is a sequence of the same type as SEQ."
-  (if (listp seq)
-      (seq--drop-while-list pred seq)
-    (seq-drop seq (seq--count-successive pred seq))))
-
-(defun seq-take-while (pred seq)
-  "Return the successive elements for which (PRED element) is non-nil in SEQ.
-The result is a sequence of the same type as SEQ."
-  (if (listp seq)
-      (seq--take-while-list pred seq)
-    (seq-take seq (seq--count-successive pred seq))))
-
-(defun seq-filter (pred seq)
-  "Return a list of all the elements for which (PRED element) is non-nil in 
SEQ."
-  (let ((exclude (make-symbol "exclude")))
-    (delq exclude (seq-map (lambda (elt)
-                             (if (funcall pred elt)
-                                 elt
-                               exclude))
-                           seq))))
-
-(defun seq-remove (pred seq)
-  "Return a list of all the elements for which (PRED element) is nil in SEQ."
-  (seq-filter (lambda (elt) (not (funcall pred elt)))
-              seq))
-
-(defun seq-reduce (function seq initial-value)
-  "Reduce the function FUNCTION across SEQ, starting with INITIAL-VALUE.
-
-Return the result of calling FUNCTION with INITIAL-VALUE and the
-first element of SEQ, then calling FUNCTION with that result and
-the second element of SEQ, then with that result and the third
-element of SEQ, etc.
-
-If SEQ is empty, return INITIAL-VALUE and FUNCTION is not called."
-  (if (seq-empty-p seq)
-      initial-value
-    (let ((acc initial-value))
-      (seq-doseq (elt seq)
-        (setq acc (funcall function acc elt)))
-      acc)))
-
-(defun seq-some (pred seq)
-  "Return the first value for which if (PRED element) is non-nil for in SEQ."
-  (catch 'seq--break
-    (seq-doseq (elt seq)
-      (let ((result (funcall pred elt)))
-        (when result
-          (throw 'seq--break result))))
-    nil))
-
-(defun seq-find (pred seq &optional default)
-  "Return the first element for which (PRED element) is non-nil in SEQ.
-If no element is found, return DEFAULT.
-
-Note that `seq-find' has an ambiguity if the found element is
-identical to DEFAULT, as it cannot be known if an element was
-found or not."
-  (catch 'seq--break
-    (seq-doseq (elt seq)
-      (when (funcall pred elt)
-        (throw 'seq--break elt)))
-    default))
-
-(defun seq-every-p (pred seq)
-  "Return non-nil if (PRED element) is non-nil for all elements of the 
sequence SEQ."
-  (catch 'seq--break
-    (seq-doseq (elt seq)
-      (or (funcall pred elt)
-          (throw 'seq--break nil)))
-    t))
-
-(defun seq-count (pred seq)
-  "Return the number of elements for which (PRED element) is non-nil in SEQ."
-  (let ((count 0))
-    (seq-doseq (elt seq)
-      (when (funcall pred elt)
-        (setq count (+ 1 count))))
-    count))
-
-(defun seq-empty-p (seq)
-  "Return non-nil if the sequence SEQ is empty, nil otherwise."
-  (if (listp seq)
-      (null seq)
-    (= 0 (seq-length seq))))
-
-(defun seq-sort (pred seq)
-  "Return a sorted sequence comparing using PRED the elements of SEQ.
-The result is a sequence of the same type as SEQ."
-  (if (listp seq)
-      (sort (seq-copy seq) pred)
-    (let ((result (seq-sort pred (append seq nil))))
-      (seq-into result (type-of seq)))))
-
-(defun seq-contains (seq elt &optional testfn)
-  "Return the first element in SEQ that equals to ELT.
-Equality is defined by TESTFN if non-nil or by `equal' if nil."
-  (seq-some (lambda (e)
-                (funcall (or testfn #'equal) elt e))
-              seq))
-
-(defun seq-position (seq elt &optional testfn)
-  "Return the index of the first element in SEQ that is equal to ELT.
-Equality is defined by TESTFN if non-nil or by `equal' if nil."
-  (let ((index 0))
-    (catch 'seq--break
-      (seq-doseq (e seq)
-        (when (funcall (or testfn #'equal) e elt)
-          (throw 'seq--break index))
-        (setq index (1+ index)))
-      nil)))
-
-(defun seq-uniq (seq &optional testfn)
-  "Return a list of the elements of SEQ with duplicates removed.
-TESTFN is used to compare elements, or `equal' if TESTFN is nil."
-  (let ((result '()))
-    (seq-doseq (elt seq)
-      (unless (seq-contains result elt testfn)
-        (setq result (cons elt result))))
-    (nreverse result)))
-
-(defun seq-subseq (seq start &optional end)
-  "Return the subsequence of SEQ from START to END.
-If END is omitted, it defaults to the length of the sequence.
-If START or END is negative, it counts from the end."
-  (cond ((or (stringp seq) (vectorp seq)) (substring seq start end))
-        ((listp seq)
-         (let (len (errtext (format "Bad bounding indices: %s, %s" start end)))
-           (and end (< end 0) (setq end (+ end (setq len (seq-length seq)))))
-           (if (< start 0) (setq start (+ start (or len (setq len (seq-length 
seq))))))
-           (when (> start 0)
-             (setq seq (nthcdr (1- start) seq))
-             (or seq (error "%s" errtext))
-             (setq seq (cdr seq)))
-           (if end
-               (let ((res nil))
-                 (while (and (>= (setq end (1- end)) start) seq)
-                   (push (pop seq) res))
-                 (or (= (1+ end) start) (error "%s" errtext))
-                 (nreverse res))
-             (seq-copy seq))))
-        (t (error "Unsupported sequence: %s" seq))))
-
-(defun seq-concatenate (type &rest seqs)
-  "Concatenate, into a sequence of type TYPE, the sequences SEQS.
-TYPE must be one of following symbols: vector, string or list.
-
-\n(fn TYPE SEQUENCE...)"
-  (pcase type
-    (`vector (apply #'vconcat seqs))
-    (`string (apply #'concat seqs))
-    (`list (apply #'append (append seqs '(nil))))
-    (t (error "Not a sequence type name: %S" type))))
-
-(defun seq-mapcat (function seq &optional type)
-  "Concatenate the result of applying FUNCTION to each element of SEQ.
-The result is a sequence of type TYPE, or a list if TYPE is nil."
-  (apply #'seq-concatenate (or type 'list)
-         (seq-map function seq)))
-
-(defun seq-partition (seq n)
-  "Return a list of the elements of SEQ grouped into sub-sequences of length N.
-The last sequence may contain less than N elements.  If N is a
-negative integer or 0, nil is returned."
-  (unless (< n 1)
-    (let ((result '()))
-      (while (not (seq-empty-p seq))
-        (push (seq-take seq n) result)
-        (setq seq (seq-drop seq n)))
-      (nreverse result))))
-
-(defun seq-intersection (seq1 seq2 &optional testfn)
-  "Return a list of the elements that appear in both SEQ1 and SEQ2.
-Equality is defined by TESTFN if non-nil or by `equal' if nil."
-  (seq-reduce (lambda (acc elt)
-                (if (seq-contains seq2 elt testfn)
-                    (cons elt acc)
-                  acc))
-              (seq-reverse seq1)
-              '()))
-
-(defun seq-difference (seq1 seq2 &optional testfn)
-  "Return a list of the elements that appear in SEQ1 but not in SEQ2.
-Equality is defined by TESTFN if non-nil or by `equal' if nil."
-  (seq-reduce (lambda (acc elt)
-                (if (not (seq-contains seq2 elt testfn))
-                    (cons elt acc)
-                  acc))
-              (seq-reverse seq1)
-              '()))
-
-(defun seq-group-by (function seq)
-  "Apply FUNCTION to each element of SEQ.
-Separate the elements of SEQ into an alist using the results as
-keys.  Keys are compared using `equal'."
-  (seq-reduce
-   (lambda (acc elt)
-     (let* ((key (funcall function elt))
-            (cell (assoc key acc)))
-       (if cell
-           (setcdr cell (push elt (cdr cell)))
-         (push (list key elt) acc))
-       acc))
-   (seq-reverse seq)
-   nil))
-
-(defalias 'seq-reverse
-  (if (ignore-errors (reverse [1 2]))
-      #'reverse
-    (lambda (seq)
-      "Return the reversed copy of list, vector, or string SEQ.
-See also the function `nreverse', which is used more often."
-      (let ((result '()))
-        (seq-map (lambda (elt) (push elt result))
-                 seq)
-        (if (listp seq)
-            result
-          (seq-into result (type-of seq)))))))
-
-(defun seq-into (seq type)
-  "Convert the sequence SEQ into a sequence of type TYPE.
-TYPE can be one of the following symbols: vector, string or list."
-  (pcase type
-    (`vector (vconcat seq))
-    (`string (concat seq))
-    (`list (append seq nil))
-    (t (error "Not a sequence type name: %S" type))))
-
-(defun seq-min (seq)
-  "Return the smallest element of SEQ.
-SEQ must be a sequence of numbers or markers."
-  (apply #'min (seq-into seq 'list)))
-
-(defun seq-max (seq)
-    "Return the largest element of SEQ.
-SEQ must be a sequence of numbers or markers."
-  (apply #'max (seq-into seq 'list)))
-
-(defun seq--drop-list (list n)
-  "Return a list from LIST without its first N elements.
-This is an optimization for lists in `seq-drop'."
-  (while (and list (> n 0))
-    (setq list (cdr list)
-          n (1- n)))
-  list)
-
-(defun seq--take-list (list n)
-  "Return a list from LIST made of its first N elements.
-This is an optimization for lists in `seq-take'."
-  (let ((result '()))
-    (while (and list (> n 0))
-      (setq n (1- n))
-      (push (pop list) result))
-    (nreverse result)))
-
-(defun seq--drop-while-list (pred list)
-  "Return a list from the first element for which (PRED element) is nil in 
LIST.
-This is an optimization for lists in `seq-drop-while'."
-  (while (and list (funcall pred (car list)))
-    (setq list (cdr list)))
-  list)
-
-(defun seq--take-while-list (pred list)
-  "Return the successive elements for which (PRED element) is non-nil in LIST.
-This is an optimization for lists in `seq-take-while'."
-  (let ((result '()))
-    (while (and list (funcall pred (car list)))
-      (push (pop list) result))
-    (nreverse result)))
-
-(defun seq--count-successive (pred seq)
-  "Return the number of successive elements for which (PRED element) is 
non-nil in SEQ."
-  (let ((n 0)
-        (len (seq-length seq)))
-    (while (and (< n len)
-                (funcall pred (seq-elt seq n)))
-      (setq n (+ 1 n)))
-    n))
-
-(defun seq--make-pcase-bindings (args)
-  "Return a list of bindings of the variables in ARGS to the elements of a 
sequence."
-  (let ((bindings '())
-        (index 0)
-        (rest-marker nil))
-    (seq-doseq (name args)
-      (unless rest-marker
-        (pcase name
-          (`&rest
-           (progn (push `(app (pcase--flip seq-drop ,index)
-                              ,(seq--elt-safe args (1+ index)))
-                        bindings)
-                  (setq rest-marker t)))
-          (t
-           (push `(app (pcase--flip seq--elt-safe ,index) ,name) bindings))))
-      (setq index (1+ index)))
-    bindings))
-
-(defun seq--make-pcase-patterns (args)
-  "Return a list of `(seq ...)' pcase patterns from the argument list ARGS."
-  (cons 'seq
-        (seq-map (lambda (elt)
-                   (if (seq-p elt)
-                       (seq--make-pcase-patterns elt)
-                     elt))
-                 args)))
-
-;; Helper function for the Backward-compatible version of `seq-let'
-;; for Emacs<25.1.
-(defun seq--make-bindings (args seq &optional bindings)
-  "Return a list of bindings of the variables in ARGS to the elements of a 
sequence.
-if BINDINGS is non-nil, append new bindings to it, and return
-BINDINGS."
-  (let ((index 0)
-        (rest-marker nil))
-    (seq-doseq (name args)
-      (unless rest-marker
-        (pcase name
-          ((pred seq-p)
-           (setq bindings (seq--make-bindings (seq--elt-safe args index)
-                                              `(seq--elt-safe ,seq ,index)
-                                              bindings)))
-          (`&rest
-           (progn (push `(,(seq--elt-safe args (1+ index))
-                          (seq-drop ,seq ,index))
-                        bindings)
-                  (setq rest-marker t)))
-          (t
-           (push `(,name (seq--elt-safe ,seq ,index)) bindings))))
-      (setq index (1+ index)))
-    bindings))
-
-(defun seq--elt-safe (seq n)
-  "Return element of SEQ at the index N.
-If no element is found, return nil."
-  (when (or (listp seq)
-            (and (sequencep seq)
-                 (> (seq-length seq) n)))
-    (seq-elt seq n)))
-
-(defun seq--activate-font-lock-keywords ()
-  "Activate font-lock keywords for some symbols defined in seq."
-  (font-lock-add-keywords 'emacs-lisp-mode
-                          '("\\<seq-doseq\\>" "\\<seq-let\\>")))
-
-(defalias 'seq-copy #'copy-sequence)
-(defalias 'seq-elt #'elt)
-(defalias 'seq-length #'length)
-(defalias 'seq-do #'mapc)
-(defalias 'seq-each #'seq-do)
-(defalias 'seq-map #'mapcar)
-(defalias 'seq-p #'sequencep)
-
-(unless (fboundp 'elisp--font-lock-flush-elisp-buffers)
-  ;; In Emacs≥25, (via elisp--font-lock-flush-elisp-buffers and a few others)
-  ;; we automatically highlight macros.
-  (add-hook 'emacs-lisp-mode-hook #'seq--activate-font-lock-keywords))
+(if (version< emacs-version "25")
+    (require 'seq-24)
+  (require 'seq-25))
 
 (provide 'seq)
 ;;; seq.el ends here
diff --git a/packages/seq/tests/seq-tests.el b/packages/seq/tests/seq-tests.el
index 8f2dfbb..cf3da78 100644
--- a/packages/seq/tests/seq-tests.el
+++ b/packages/seq/tests/seq-tests.el
@@ -22,7 +22,7 @@
 
 ;;; Commentary:
 
-;; Tests for sequences.el
+;; Tests for seq.el
 
 ;;; Code:
 
@@ -92,6 +92,16 @@ Evaluate BODY for each created sequence.
   (with-test-sequences (seq '())
     (should (seq-empty-p (seq-take-while #'test-sequences-oddp seq)))))
 
+(ert-deftest test-seq-map-indexed ()
+  (should (equal (seq-map-indexed (lambda (elt i)
+                                    (list elt i))
+                                  nil)
+                 nil))
+  (should (equal (seq-map-indexed (lambda (elt i)
+                                    (list elt i))
+                                  '(a b c d))
+                 '((a 0) (b 1) (c 2) (d 3)))))
+
 (ert-deftest test-seq-filter ()
   (with-test-sequences (seq '(6 7 8 9 10))
     (should (equal (seq-filter #'test-sequences-evenp seq) '(6 8 10)))
@@ -322,5 +332,23 @@ Evaluate BODY for each created sequence.
     (should (= (seq-position seq 'a #'eq) 0))
     (should (null (seq-position seq (make-symbol "a") #'eq)))))
 
+(ert-deftest test-seq-mapn ()
+  (should-error (seq-mapn #'identity))
+  (with-test-sequences (seq '(1 2 3 4 5 6 7))
+    (should (equal (append seq nil)
+                   (seq-mapn #'identity seq)))
+    (should (equal (seq-mapn #'1+ seq)
+                   (seq-map #'1+ seq)))
+
+    (with-test-sequences (seq-2 '(10 20 30 40 50))
+      (should (equal (seq-mapn #'+ seq seq-2)
+                     '(11 22 33 44 55)))
+      (should (equal (seq-mapn #'+ seq seq-2 nil) nil)))))
+
+(ert-deftest test-seq-sort-by ()
+  (let ((seq ["x" "xx" "xxx"]))
+    (should (equal (seq-sort-by #'seq-length #'> seq)
+                   ["xxx" "xx" "x"]))))
+
 (provide 'seq-tests)
 ;;; seq-tests.el ends here
diff --git a/packages/shen-mode/inf-shen.el b/packages/shen-mode/inf-shen.el
index bf554da..53df955 100644
--- a/packages/shen-mode/inf-shen.el
+++ b/packages/shen-mode/inf-shen.el
@@ -294,7 +294,7 @@ Prefix argument means switch to the Shen buffer afterwards."
   (interactive "r\nP")
   (let ((before-input (marker-position (process-mark (inferior-shen-proc))))
         result)
-    
+
     (run-hook-with-args 'shen-pre-eval-hook start end)
     (comint-send-region (inferior-shen-proc) start end)
     (comint-send-string (inferior-shen-proc) "\n")
@@ -432,7 +432,7 @@ With argument, positions cursor at end of buffer."
 
 (defvar shen-prev-l/c-dir/file nil
   "Record last directory and file used in loading or compiling.
-This holds a cons cell of the form `(DIRECTORY . FILE)'
+This holds a cons cell of the form (DIRECTORY . FILE)
 describing the last `shen-load-file' or `shen-compile-file' command.")
 
 (defvar shen-source-modes '(shen-mode)
diff --git a/packages/sisu-mode/sisu-mode.el b/packages/sisu-mode/sisu-mode.el
index 9d287f1..6bfbb4b 100644
--- a/packages/sisu-mode/sisu-mode.el
+++ b/packages/sisu-mode/sisu-mode.el
@@ -1,16 +1,17 @@
 ;;; sisu-mode.el --- Major mode for SiSU markup text
 
-;; Copyright (C) 2011  Free Software Foundation, Inc.
+;; Copyright (C) 2011, 2016  Free Software Foundation, Inc.
 
-;; Author: Ambrose Kofi Laing (& Ralph Amissah)
-;; Keywords: text, processes, tools
-;; Version: 3.0.3
-;; License: GPLv3
-;; Home URL: SiSU:   http://www.jus.uio.no/sisu
+;; Author: Ralph Amissah & Ambrose Kofi Laing
+;; Maintainer: Ralph Amissah <address@hidden>
+;; Keywords: text, syntax, processes, tools
+;; Version:   7.1.8
+;; URL: http://www.sisudoc.org/
 ;; originally looked at (based on) doc-mode, with kind permission of the author
 ;;   Author: SUN, Tong <address@hidden>, (c)2001-6, all right reserved
 ;;   Version: $Date: 2006/01/19 03:13:41 $ $Revision: 1.14 $
 ;;   Home URL: http://xpt.sourceforge.net/
+;; with contributions from Kevin Ryde and Stefan Monnier
 
 ;; 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
@@ -110,19 +111,19 @@
 (defvar sisu-title-3 'sisu-title-3-face)
 (defvar sisu-title-4 'sisu-title-4-face)
 
-(defvar general-font-lock-red1 font-lock-warning-face)
-(defvar general-font-lock-red2 font-lock-comment-face)
-(defvar general-font-lock-red3 font-lock-string-face)
+(defvar sisu-general-font-lock-red1 font-lock-warning-face)
+(defvar sisu-general-font-lock-red2 font-lock-comment-face)
+(defvar sisu-general-font-lock-red3 font-lock-string-face)
 
-(defvar general-font-lock-green1 font-lock-type-face)
-(defvar general-font-lock-green2 font-lock-constant-face)
+(defvar sisu-general-font-lock-green1 font-lock-type-face)
+(defvar sisu-general-font-lock-green2 font-lock-constant-face)
 
-(defvar general-font-lock-blue1 font-lock-keyword-face)
-(defvar general-font-lock-blue2 font-lock-function-name-face)
-(defvar general-font-lock-blue3 font-lock-builtin-face)
+(defvar sisu-general-font-lock-blue1 font-lock-keyword-face)
+(defvar sisu-general-font-lock-blue2 font-lock-function-name-face)
+(defvar sisu-general-font-lock-blue3 font-lock-builtin-face)
 
-(defvar general-font-lock-yellow1 font-lock-variable-name-face)
-(defvar general-font-lock-yellow2 font-lock-comment-face)
+(defvar sisu-general-font-lock-yellow1 font-lock-variable-name-face)
+(defvar sisu-general-font-lock-yellow2 font-lock-comment-face)
 
 ;; == sisu-mode settings
 
@@ -136,200 +137,313 @@
 (defconst sisu-font-lock-keywords
   (eval-when-compile
     (list
-
-     ;;grouped text
-     (cons "^group\{\\|^\}group"       'general-font-lock-red2)
-     (cons "^block\{\\|^\}block"       'general-font-lock-red2)
-     (cons "^code\{\\|^\}code"         'general-font-lock-red2)
-     (cons "^poem\{\\|^\}poem"         'general-font-lock-red2)
-     (cons "^alt\{\\|^\}alt"           'general-font-lock-red2)
-     (cons "^table\{.+\\|^\}table"     'general-font-lock-red2)
-     (cons "^\{table[^}]+\}"           'general-font-lock-red2)
-
-     ;; footnote/endnote
-       ;(cons "\~\{.+?\}\~"  'general-font-lock-green1)
-     (cons "\~\{\\*\\*\\|\~\{\\*\\|\~\{\\|\}\~"   'general-font-lock-red2)
-     (cons "\~\\[\\+\\|\~\\[\\*\\|\~\\[\\|\\]\~"  'general-font-lock-red2)
-
-     (cons "\~\\^ \\|^\\^\~ " 'general-font-lock-red2)
-
-     (list (concat
-      "\\(\*\~\\)"
-      "\\([^ \r\t\n]+\\)")
-     '(1 general-font-lock-red1 t)
-     '(2 general-font-lock-blue2 t))
-
-     ;; emphasis (can be program configured to be bold italics or underscore)
-     (list (concat
-      "\\([*]\{\\)"
-      "\\([^\}]+\\)"
-      "\\(\}[*]\\)")
-     '(1 general-font-lock-red1 t)
-     '(2 general-font-lock-red1 t)
-     '(3 general-font-lock-red1 t))
-
-     ;; bold
-     (list (concat
-      "\\([!]\{\\)"
-      "\\([^\}]+\\)"
-      "\\(\}[!]\\)")
-     '(1 general-font-lock-red1 t)
-     '(2 general-font-lock-red1 t)
-     '(3 general-font-lock-red1 t))
-     (cons "\\*[^ ]+\\*"               'general-font-lock-red1)
-     (cons "^!_ .+"                    'general-font-lock-red1)
-
-     ;;; italics
-     (list (concat
-      "\\([/]\{\\)"
-      "\\([^\}]+\\)"
-      "\\(\}[/]\\)")
-     '(1 general-font-lock-red1 t)
-     '(2 general-font-lock-blue1 t)
-           '(3 general-font-lock-red1 t))
-
-     ;; underscore
-     (list (concat
-      "\\([_]\{\\)"
-      "\\([^\}]+\\)"
-      "\\(\}[_]\\)")
-     '(1 general-font-lock-red1 t)
-     '(2 general-font-lock-red1 t)
-           '(3 general-font-lock-red1 t))
-
-     ;; monospace
-     (list (concat
-      "\\([#]\{\\)"
-      "\\([^\}]+\\)"
-      "\\(\}[#]\\)")
-     '(1 general-font-lock-red1 t)
-     '(2 general-font-lock-red1 t)
-           '(3 general-font-lock-red1 t))
-
-     ;; citation
-     (list (concat
-      "\\([\"]\{\\)"
-      "\\([^\}]+\\)"
-      "\\(\}[\"]\\)")
-     '(1 general-font-lock-red1 t)
-     '(2 general-font-lock-red1 t)
-           '(3 general-font-lock-red1 t))
-
-     ;; inserted text
-     (list (concat
-      "\\([\+]\{\\)"
-      "\\([^\}]+\\)"
-      "\\(\}[\+]\\)")
-     '(1 general-font-lock-red1 t)
-     '(2 general-font-lock-red1 t)
-           '(3 general-font-lock-red1 t))
-
-     ;; strike through
-     (list (concat
-      "\\(\\-\{\\)"
-      "\\([^\}]+\\)"
-      "\\(\}\\-\\)")
-     '(1 general-font-lock-red1 t)
-     '(2 general-font-lock-red1 t)
-           '(3 general-font-lock-red1 t))
-
-     ;; superscript
-     (list (concat
-      "\\(\\^\{\\)"
-      "\\([^\}]+\\)"
-      "\\(\}\\^\\)")
-     '(1 general-font-lock-red1 t)
-     '(2 general-font-lock-red1 t)
-           '(3 general-font-lock-red1 t))
-
-     ;; subscript
-     (list (concat
-      "\\([,]\{\\)"
-      "\\([^\}]+\\)"
-      "\\(\}[,]\\)")
-     '(1 general-font-lock-red1 t)
-     '(2 general-font-lock-red1 t)
-           '(3 general-font-lock-red1 t))
-
-     ;;numbered list
-     (cons "^# \\|^_# "                'general-font-lock-red1)
-
-     ;;bullet text
-     (cons "^_\\*[1-9] \\|^_\\* "      'general-font-lock-red1)
-
-     ;;indented text
-     (cons "^_[1-9] "                  'general-font-lock-red1)
-
-     ;;url
-     (cons "\\(^\\|[ ]\\)http:[/][/][^ \t\n\r<]+" 'general-font-lock-blue2)
-
-;; \\|\$
-
-     ;; Comment Lines
-     (cons "^% .*"                     'general-font-lock-blue1)
-     ;; line break
-     (cons "<br>"                      'general-font-lock-red1)
-
-     ;; Section titles
-     (list "^\\(\\([1-8]\\|:?[A-C]\\)\\~\\)\\(.*\\)"
-     '(1 sisu-title-1 t)
-     '(3 sisu-title-2 t))
-
-     ;; hyper-links
-     (list (concat
-      "\\(\{~^\\|\{\\)"
-      "\\([^\}\{]+\\)"
-      "\\(\}http:[/][/][^ \r\n\t<]+\\)")
-     '(1 general-font-lock-blue2 t)
-     '(2 general-font-lock-red1 t)
-     '(3 general-font-lock-blue2 t))
-
-     ;; book index
-     (cons "^\=\{.+\}"                 'general-font-lock-green1)
-
-     ;; numbers
-     (cons "\\<[.0-9]+\\>"             'general-font-lock-green2)
-
-     ;; bullets sisu_normal (nearly copied regexp)
-     (cons "^_\\([1-9*]\\|[1-9]\\*\\) " 'general-font-lock-blue2)
-
-     ;; image links
-     (list (concat
-      "\\(\{\\)"
-      "\\([^\}\{]+\\)"
-      "\\(\}image\\)")
-     '(1 general-font-lock-blue2 t)
-     '(2 general-font-lock-red1 t)
-           '(3 general-font-lock-blue2 t))
-
-     ;; insert file links
-     (list (concat
-      "\\(<< \\)"
-      "\\([^ \r\t\n]+\\.ss\\)"
-      "\\(i\\|t\\)")
-     '(1 general-font-lock-blue2 t)
-     '(2 general-font-lock-blue2 t)
-           '(3 general-font-lock-blue2 t))
-
-     ;; raw keywords
-     (list (concat
-      "^\\(address@hidden("
-      "title\\|"
-      "creator\\|"
-      "date\\|"
-      "publisher\\|"
-      "rights\\|"
-      "classify\\|"
-      "original\\|"
-      "notes\\|"
-      "links\\|"
-      "make\\|"
-      "\\):\\)\\(.*\\)")
-     '(1 sisu-title-2 keep)
-     '(3 sisu-title-3 keep))
-
-     ))
- "Default expressions to highlight in AsciiSisu mode.")
+      ;;grouped text ---------
+      ;(cons "^```[ ]code\\(.\\|\n\\)+?\n```\n"      
'sisu-general-font-lock-red2)
+      (cons "^```[ ]+code.*?$\\|^```$"  'sisu-general-font-lock-red2)
+      (cons "^```[ ]+table.*?$\\|^```$" 'sisu-general-font-lock-red2)
+      (cons "^```[ ]+group$\\|^```$"    'sisu-general-font-lock-red2)
+      (cons "^```[ ]+block$\\|^```$"    'sisu-general-font-lock-red2)
+      (cons "^```[ ]+poem$\\|^```$"     'sisu-general-font-lock-red2)
+      (cons "^```[ ]+alt$\\|^```$"      'sisu-general-font-lock-red2)
+      ;;grouped text ---------
+      (cons "^group{\\|^}group"       'sisu-general-font-lock-red2)
+      (cons "^block{\\|^}block"       'sisu-general-font-lock-red2)
+      (cons "^code{\\|^}code"         'sisu-general-font-lock-red2)
+      (cons "^poem{\\|^}poem"         'sisu-general-font-lock-red2)
+      (cons "^alt{\\|^}alt"           'sisu-general-font-lock-red2)
+      (cons "^table{.+\\|^}table"     'sisu-general-font-lock-red2)
+      (cons "^{table[^}]+}"           'sisu-general-font-lock-red2)
+
+      (list
+        (concat
+          "^\`\\{3\\}[ ]+code.*?$"
+          "\\(.\\|\n\\)+?"
+          "\`\\{3\\}$"
+        )
+        '(1 sisu-general-font-lock-red2 t)
+        '(2 nil t)
+        '(3 sisu-general-font-lock-red2 t)
+      )
+      (list
+        (concat
+          "^\`\\{3\\}[ ]+table.*?$"
+          "\\(.\\|\n\\)+?"
+          "\`\\{3\\}$"
+        )
+        '(1 sisu-general-font-lock-red2 t)
+        '(2 nil t)
+        '(3 sisu-general-font-lock-red2 t)
+      )
+      (list
+        (concat
+          "^\`\\{3\\}[ ]+\\(group\\|block\\|alt\\|poem\\)$"
+          "\\(.\\|\n\\)+?"
+          "^\`\\{3\\}$"
+        )
+        '(1 sisu-general-font-lock-red2 t)
+        '(2 nil t)
+        '(3 sisu-general-font-lock-red2 t)
+      )
+
+      ;; footnote/endnote ----
+      ;(cons "\~{.+?}\~"  'sisu-general-font-lock-green1)
+      (cons "\~{\\*\\*\\|\~{\\*\\|\~{\\|}\~"   'sisu-general-font-lock-red2)
+      (cons "\~\\[\\+\\|\~\\[\\*\\|\~\\[\\|\\]\~"  
'sisu-general-font-lock-red2)
+      (cons "\~\\^ \\|^\\^\~ " 'sisu-general-font-lock-red2)
+      (list
+        (concat
+          "\\(\*\~\\)"
+          "\\([^ \r\t\n]+\\)"
+        )
+        '(1 sisu-general-font-lock-red1 t)
+        '(2 sisu-general-font-lock-blue2 t)
+      )
+
+      ;; emphasis (can be program configured to be bold italics or underscore)
+      (list
+        (concat
+          "\\([*]{\\)"
+          "\\([^}]+\\)"
+          "\\(}[*]\\)"
+        )
+        '(1 sisu-general-font-lock-red1 t)
+        '(2 sisu-general-font-lock-red1 t)
+        '(3 sisu-general-font-lock-red1 t)
+      )
+
+      ;; bold ----------------
+      (list
+        (concat
+          "\\([!]{\\)"
+          "\\([^}]+\\)"
+          "\\(}[!]\\)"
+        )
+        '(1 sisu-general-font-lock-red1 t)
+        '(2 sisu-general-font-lock-red1 t)
+        '(3 sisu-general-font-lock-red1 t)
+      )
+      (cons "\\*[^ ]+\\*"               'sisu-general-font-lock-red1)
+      (cons "^!_ .+"                    'sisu-general-font-lock-red1)
+
+      ;; italics -------------
+      (list
+        (concat
+          "\\([/]{\\)"
+          "\\([^}]+\\)"
+          "\\(}[/]\\)"
+        )
+        '(1 sisu-general-font-lock-red1 t)
+        '(2 sisu-general-font-lock-blue1 t)
+        '(3 sisu-general-font-lock-red1 t)
+      )
+
+      ;; underscore ----------
+      (list
+        (concat
+          "\\([_]{\\)"
+          "\\([^}]+\\)"
+          "\\(\}[_]\\)"
+        )
+        '(1 sisu-general-font-lock-red1 t)
+        '(2 sisu-general-font-lock-red1 t)
+        '(3 sisu-general-font-lock-red1 t)
+      )
+
+      ;; monospace -----------
+      (list
+        (concat
+          "\\([#]{\\)"
+          "\\([^}]+\\)"
+          "\\(}[#]\\)"
+        )
+        '(1 sisu-general-font-lock-red1 t)
+        '(2 sisu-general-font-lock-red1 t)
+        '(3 sisu-general-font-lock-red1 t)
+      )
+
+      ;; citation ------------
+      (list
+        (concat
+          "\\([\"]{\\)"
+          "\\([^}]+\\)"
+          "\\(}[\"]\\)"
+        )
+        '(1 sisu-general-font-lock-red1 t)
+        '(2 sisu-general-font-lock-red1 t)
+        '(3 sisu-general-font-lock-red1 t)
+      )
+
+      ;; inserted text -------
+      (list
+        (concat
+          "\\([\+]{\\)"
+          "\\([^}]+\\)"
+          "\\(}[\+]\\)"
+        )
+        '(1 sisu-general-font-lock-red1 t)
+        '(2 sisu-general-font-lock-red1 t)
+        '(3 sisu-general-font-lock-red1 t)
+      )
+
+      ;; strike through ------
+      (list
+        (concat
+          "\\(\\-{\\)"
+          "\\([^}]+\\)"
+          "\\(}\\-\\)"
+        )
+        '(1 sisu-general-font-lock-red1 t)
+        '(2 sisu-general-font-lock-red1 t)
+        '(3 sisu-general-font-lock-red1 t)
+      )
+
+      ;; superscript ---------
+      (list
+        (concat
+          "\\(\\^{\\)"
+          "\\([^}]+\\)"
+          "\\(}\\^\\)"
+        )
+        '(1 sisu-general-font-lock-red1 t)
+        '(2 sisu-general-font-lock-red1 t)
+        '(3 sisu-general-font-lock-red1 t)
+      )
+
+      ;; subscript -----------
+      (list
+        (concat
+          "\\([,]{\\)"
+          "\\([^}]+\\)"
+          "\\(}[,]\\)"
+        )
+        '(1 sisu-general-font-lock-red1 t)
+        '(2 sisu-general-font-lock-red1 t)
+        '(3 sisu-general-font-lock-red1 t)
+      )
+
+      ;; numbered list
+      (cons "^# \\|^_# "                'sisu-general-font-lock-red1)
+
+      ;; bullet text
+      (cons "^_\\*[1-9] \\|^_\\* "      'sisu-general-font-lock-red1)
+
+      ;; indented text
+      (cons "^_[1-9] "                  'sisu-general-font-lock-red1)
+      (cons "^_[1-9]! "                 'sisu-general-font-lock-red1)
+
+      ;; hanging indented text [proposed enable when implemented]
+      (cons "^__[1-9] "                'sisu-general-font-lock-red1)
+      (cons "^_[0-9]_[0-9] "           'sisu-general-font-lock-red1)
+      (cons "^__[1-9]! "               'sisu-general-font-lock-red1)
+      (cons "^_[0-9]_[0-9]! "          'sisu-general-font-lock-red1)
+
+      ;; url
+      (cons "\\(^\\|[ ]\\)http:[/][/][^ \t\n\r<]+" 
'sisu-general-font-lock-blue2)
+
+      ;; Comment Lines
+      (cons "^% .*"                     'sisu-general-font-lock-blue1)
+
+      ;; page break
+      (cons "^\\(-\\\\\\\\-\\|=\\\\\\\\=\\|-\\.\\.-\\)" 
'sisu-general-font-lock-red2)
+
+      ;; line break
+      (cons " \\\\\\\\ "                'sisu-general-font-lock-red1)
+
+      ;; line break (depreciated)
+      (cons "<br>"                      'sisu-general-font-lock-red1)
+
+      ;; Section titles
+      (list "^\\(\\([1-4]\\|:?[A-D]\\)\\~\\)\\(.*\\)"
+        '(1 sisu-title-1 t)
+        '(3 sisu-title-2 t)
+      )
+
+      ;; hyper-links
+      (list
+        (concat
+          "\\({~^\\|{\\)"
+          "\\([^}{]+\\)"
+          "\\(}http:[/][/][^ \r\n\t<]+\\)"
+        )
+        '(1 sisu-general-font-lock-blue2 t)
+        '(2 sisu-general-font-lock-red1 t)
+        '(3 sisu-general-font-lock-blue2 t)
+      )
+
+      ;; book index
+      (list
+        (concat
+          "^\\(\={\\)"
+          "\\([^}{]+\\)"
+          "\\(}\\)$"
+        )
+        '(1 sisu-general-font-lock-green1 t)
+        '(2 nil t)
+        '(3 sisu-general-font-lock-green1 t)
+      )
+
+      ;(cons "^\={.+}"                 'sisu-general-font-lock-green1)
+
+      ;; numbers
+      (cons "\\<[.0-9]+\\>"             'sisu-general-font-lock-green2)
+
+      ;; bullets sisu_normal (nearly copied regexp)
+      (cons "^_\\([1-9*]\\|[1-9]\\*\\) " 'sisu-general-font-lock-blue2)
+
+      ;; image links
+      (list
+        (concat
+          "\\({\\)"
+          "\\([^}{]+\\)"
+          "\\(}image\\)"
+        )
+        '(1 sisu-general-font-lock-blue2 t)
+        '(2 sisu-general-font-lock-red1 t)
+        '(3 sisu-general-font-lock-blue2 t)
+      )
+
+      ;; insert file links
+      (list
+        (concat
+          "\\(<< \\)"
+          "\\([^ \r\t\n]+\\.ss\\)"
+          "\\(i\\|t\\)"
+        )
+        '(1 sisu-general-font-lock-blue2 t)
+        '(2 sisu-general-font-lock-blue2 t)
+        '(3 sisu-general-font-lock-blue2 t)
+      )
+
+      ;; raw keywords
+      (list
+        (concat
+          "^\\(address@hidden("
+          "creator\\|"
+          "title\\|"
+          "date\\|"
+          "rights\\|"
+          "publisher\\|"
+          "classify\\|"
+          "identifier\\|"
+          "original\\|"
+          "notes\\|"
+          "links\\|"
+          "make\\|"
+          "\\):\\)\\(.*\\)"
+        )
+        '(1 sisu-title-2 keep)
+        '(3 sisu-title-3 keep)
+      )
+    )
+  )
+  "Default expressions to highlight in AsciiSisu mode."
+)
+
+;; outline mode evil "folding" if available
+;; (define-key evil-normal-state-map ",0"   'show-all)
+;; (define-key evil-normal-state-map ",-"   'hide-body)
+;; (define-key evil-normal-state-map ",+"   'show-subtree)
+;; (define-key evil-normal-state-map ",="   'show-subtree)
 
 ;;}}}
 
@@ -338,10 +452,10 @@
 ;;;###autoload
 (define-derived-mode sisu-mode text-mode "SiSU"
   "Major mode for editing SiSU files.
-SiSU (http://www.sisudoc.org/) is a document structuring and
-publishing framework.  This major mode handles SiSU markup."
+SiSU document structuring, publishing in multiple formats and search.
+URL `http://www.sisudoc.org/'"
   (modify-syntax-entry ?\'  ".")
-  ;(flyspell-mode nil)
+  ;;(flyspell-mode nil)
 
   (make-local-variable 'paragraph-start)
   (setq paragraph-start (concat "$\\|>" page-delimiter))
@@ -350,19 +464,25 @@ publishing framework.  This major mode handles SiSU 
markup."
   (make-local-variable 'paragraph-ignore-fill-prefix)
   (setq paragraph-ignore-fill-prefix t)
 
+  (set (make-local-variable 'outline-regexp)
+       "^\\(\\([1-4]\\|:?[A-D]\\)\\~\\|address@hidden:\\( \\|$\\)\\)")
+
   (make-local-variable 'require-final-newline)
   (setq require-final-newline t)
 
   (make-local-variable 'font-lock-defaults)
   (setq font-lock-defaults
-  '(sisu-font-lock-keywords
-    nil        ; KEYWORDS-ONLY: no
-    nil        ; CASE-FOLD: no
-    ((?_ . "w"))      ; SYNTAX-ALIST
-    ))
-  (run-hooks 'sisu-mode-hook))
-
-;;;###autoload (add-to-list 'auto-mode-alist '("\\.sisu\\'" . sisu-mode))
+        '(sisu-font-lock-keywords
+          nil                           ; KEYWORDS-ONLY: no
+          nil                           ; CASE-FOLD: no
+          ((?_ . "w"))                  ; SYNTAX-ALIST
+          ))
+  ;; Enable outlining.
+  ;; TODO with outlining make sure linum (line numbering) is off,
+  ;; else performance penalty, sucks bigtime
+  (outline-minor-mode 1))
+
+;;;###autoload (add-to-list 'auto-mode-alist '("\\.ss[imt]\\'" . sisu-mode))
 
 (provide 'sisu-mode)
 
diff --git a/packages/sm-c-mode/sm-c-mode.el b/packages/sm-c-mode/sm-c-mode.el
index 54b9a54..deaf952 100644
--- a/packages/sm-c-mode/sm-c-mode.el
+++ b/packages/sm-c-mode/sm-c-mode.el
@@ -1,6 +1,6 @@
 ;;; sm-c-mode.el --- Experimental C major mode based on SMIE  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2015  Free Software Foundation, Inc.
+;; Copyright (C) 2015, 2016  Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <address@hidden>
 ;; Version: 0
@@ -266,6 +266,8 @@ E.g. a #define nested within 2 #ifs will be turned into \"# 
 define\"."
     (modify-syntax-entry ?\" "\"" st)
     (modify-syntax-entry ?\' "\"" st)
     (modify-syntax-entry ?= "." st)
+    (modify-syntax-entry ?+ "." st)
+    (modify-syntax-entry ?- "." st)
     (modify-syntax-entry ?< "." st)
     (modify-syntax-entry ?> "." st)
     st))
@@ -812,7 +814,7 @@ if INNER is non-nil, it stops at the innermost one."
 ;;; Font-lock support
 
 (defconst sm-c--comment-regexp
-  "/\\(?:/.*\n\\|\\*\\(?:[^*]+\\(?:\\*+[^/*]\\)*\\)*\\*/\\)")
+  "/\\(?:/.*\n\\|\\*[^*]*\\(?:\\*+[^/*][^*]*\\)*\\*+/\\)")
 
 (defconst sm-c--defun-regexp
   (let* ((spc0 (concat "\\(?:\n?[ \t]\\|" sm-c--comment-regexp "\\)*"))
@@ -825,9 +827,9 @@ if INNER is non-nil, it stops at the innermost one."
                                 (1 "")))))
       (concat
        "^\\(?:"
-       (repeat '* "\\*" spc0)
-       (repeat '* id (repeat 1 spc1 "\\|" spc0 "\\*" spc0))
-       "\\(" id "\\)[ \t\n]*("
+       (repeat '* "\\*" spc0)                               ;Pointer symbols.
+       (repeat '* id (repeat 1 spc1 "\\|" spc0 "\\*" spc0)) ;Type(s).
+       "\\(" id "\\)[ \t\n]*("                              ;Function name.
        "\\|"
        "[ \t]*#[ \t]*define[ \t]+\\(?1:" id "\\)("
        "\\)"))))
diff --git a/packages/smart-yank/smart-yank.el 
b/packages/smart-yank/smart-yank.el
new file mode 100644
index 0000000..f61acc2
--- /dev/null
+++ b/packages/smart-yank/smart-yank.el
@@ -0,0 +1,192 @@
+;;; smart-yank.el --- A different approach of yank pointer handling  -*- 
lexical-binding: t -*-
+
+;; Copyright (C) 2016 Free Software Foundation, Inc
+
+;; Author: Michael Heerdegen <address@hidden>
+;; Maintainer: Michael Heerdegen <address@hidden>
+;; Created: 14 May 2016
+;; Keywords: convenience
+;; Compatibility: GNU Emacs 24
+;; Version: 0.1.1
+;; Package-Requires: ((emacs "24"))
+
+
+;; 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:
+;;
+;; Introduction
+;; ============
+;;
+;; This library implements the global minor mode `smart-yank-mode'
+;; that changes the way Emacs handles the `kill-ring-yank-pointer' in
+;; a way that some people prefer over the default behavior.
+;;
+;; Normally, only a kill command resets the yank pointer.  With
+;; `smart-yank-mode' enabled, any command except yank commands resets
+;; it.
+;;
+;; In addition, when yanking any "older" element from the kill-ring
+;; with yank-pop (and not replacing it with a subsequent yank-pop), it
+;; is automatically moved to the "first position" so `yank' invoked
+;; later will yank this element again.
+;;
+;; Finally, `yank-pop' (normally bound to M-y) is replaced with
+;; `smart-yank-yank-pop' that is a bit more sophisticated:
+;;
+;; - When _not_ called after a `yank', instead of raising an error
+;;   like `yank-pop', yank the next-to-the-last kill.
+;;
+;; - Hit M-y twice in fast succession (delay < 0.2 secs by default)
+;;   when you got lost.  This will remove the yanked text.  If you
+;;   bind a command to `smart-yank-browse-kill-ring-command', this
+;;   command will be called too (typically something like
+;;   `browse-kill-ring').
+;;
+;;
+;; Example: you want to manually replace some words in some buffer
+;; with a new word "foo".  With `smart-yank-mode' enabled, you can do
+;; it like this:
+;;
+;;   1. Put "foo" into the kill ring.
+;;   2. Move to the next word to be replaced.
+;;   3. M-d M-y
+;;   4. Back to 2, iterate.
+;;
+;;
+;; Setup
+;; =====
+;;
+;; Just enable `smart-yank-mode' and you are done.
+
+
+
+;;; Code:
+
+;;;; Configuration stuff
+
+(defgroup smart-yank nil
+  "A different approach of yank pointer handling."
+  :group 'killing)
+
+(defcustom smart-yank-yank-pop-multikey-delay .2
+  "Max delay between two \\[smart-yank-yank-pop] invocations revealing special 
behavior.
+See `smart-yank-yank-pop' for details."
+  :type 'number)
+
+(defcustom smart-yank-browse-kill-ring-command nil
+  "Command to invoke when hitting \\[smart-yank-yank-pop] twice (fast)."
+  :type '(choice (const :tag "None" nil)
+                 (const browse-kill-ring)
+                 (const helm-show-kill-ring)
+                 (function :tag "Other Function")))
+
+(defvar smart-yank-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map [remap yank-pop] #'smart-yank-yank-pop)
+    map)
+  "Map used by `smart-yank-mode'.")
+
+
+;;;; Internals
+
+(defun smart-yank--stopwatch ()
+  "Return a fresh stopwatch.
+This is a function accepting zero arguments that upon each call
+will return the time difference from its last call in seconds.
+When called the first time it will return nil."
+  (let ((last-invocation nil))
+    (lambda ()
+      (prog1 (and last-invocation
+                   (time-to-seconds (time-subtract (current-time) 
last-invocation)))
+         (setq last-invocation (current-time))))))
+
+(defun smart-yank-reset-yank-pointer ()
+  (unless (eq last-command #'yank)
+    (setq kill-ring-yank-pointer kill-ring)))
+
+(defun smart-yank--before-ad (&rest _args)
+  "Before advice function for `yank'.
+
+Reset `kill-ring-yank-pointer'.  For yank-pop, move the really
+yanked text \"to the beginning\" of the kill ring."
+  (unless (eq kill-ring kill-ring-yank-pointer)
+    (let ((last-yank (car kill-ring-yank-pointer)))
+      (when last-yank
+        (setq kill-ring (cons last-yank (delete last-yank kill-ring)))
+        (smart-yank-reset-yank-pointer)))))
+
+(defalias 'smart-yank-yank-pop
+  (let ((r (smart-yank--stopwatch)))
+    (lambda (&optional arg)
+      "\"smart-yank\"'s private version of `yank-pop'.
+
+When called directly after a `yank' command (including itself),
+call `yank-pop'.
+
+If its key was hit two times in fast succession - i.e. with a
+delay less than `smart-yank-yank-pop-multikey-delay' - delete any
+yanked text; in addition call
+`smart-yank-browse-kill-ring-command' when set.
+
+When not called after a yank, yank the next-to-the-last
+`kill-ring' entry; with prefix arg, call the
+`smart-yank-browse-kill-ring-command'."
+      (interactive "P")
+      (let ((diff (funcall r)))
+        (cond
+         ((not (eq last-command 'yank)) (if arg (call-interactively 
smart-yank-browse-kill-ring-command)
+                                          (rotate-yank-pointer 1)
+                                          (yank)))
+         ((or (not diff)
+              (> diff smart-yank-yank-pop-multikey-delay))
+          (call-interactively #'yank-pop))
+         (t                             (funcall (or yank-undo-function 
#'delete-region)
+                                                 (region-beginning) 
(region-end))
+                                        (when 
smart-yank-browse-kill-ring-command
+                                          (call-interactively 
smart-yank-browse-kill-ring-command))))))))
+
+(declare-function smart-yank-yank-pop 'smart-yank)
+
+
+;;;; User stuff
+
+;;;###autoload
+(define-minor-mode smart-yank-mode
+  "Alter the behavior of yank commands in several ways.
+
+Turning on this mode has the following effects:
+
+ - Makes any command except yank commands reset the
+  `kill-ring-yank-pointer', instead of only killing commands.
+
+ - Remaps `yank-pop' to `smart-yank-yank-pop'.
+
+ - When yanking an older element from the `kill-ring' with
+   \\[smart-yank-yank-pop] (and not replacing it with a subsequent 
\\[smart-yank-yank-pop]), the
+   element is automatically \"moved to the first position\" of
+   the `kill-ring' so that `yank' invoked later will again yank
+   this element."
+  :global t
+  (if smart-yank-mode
+      (advice-add 'yank :before #'smart-yank--before-ad)
+    (advice-remove 'yank #'smart-yank--before-ad)))
+
+
+(provide 'smart-yank)
+
+;;; smart-yank.el ends here
diff --git a/packages/sml-mode/sml-mode.el b/packages/sml-mode/sml-mode.el
index 85fcdcf..f4adf11 100644
--- a/packages/sml-mode/sml-mode.el
+++ b/packages/sml-mode/sml-mode.el
@@ -1,8 +1,8 @@
 ;;; sml-mode.el --- Major mode for editing (Standard) ML  -*- lexical-binding: 
t; coding: utf-8 -*-
 
-;; Copyright (C) 1989,1999,2000,2004,2007,2010-2015  Free Software Foundation, 
Inc.
+;; Copyright (C) 1989,1999,2000,2004,2007,2010-2016  Free Software Foundation, 
Inc.
 
-;; Maintainer: (Stefan Monnier) <address@hidden>
+;; Maintainer: Stefan Monnier <address@hidden>
 ;; Version: 6.7
 ;; Keywords: SML
 ;; Author:     Lars Bo Nielsen
@@ -12,6 +12,7 @@
 ;;             Matthew Morley <address@hidden>
 ;;             Matthias Blume <address@hidden>
 ;;             (Stefan Monnier) <address@hidden>
+;; Package-Requires: ((emacs "24") (cl-lib "0.5"))
 
 ;; This file is part of GNU Emacs.
 
@@ -113,7 +114,7 @@
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 (require 'smie nil 'noerror)
 (require 'electric)
 
@@ -218,8 +219,8 @@ notion of \"the end of an outline\".")
 
 
 (defconst sml-=-starter-syms
-  (list* "|" "val" "fun" "and" "datatype" "type" "abstype" "eqtype"
-        sml-module-head-syms)
+  `("|" "val" "fun" "and" "datatype" "type" "abstype" "eqtype"
+    . ,sml-module-head-syms)
   "Symbols that can be followed by a `='.")
 (defconst sml-=-starter-re
   (concat "\\S.|\\S.\\|" (sml-syms-re (cdr sml-=-starter-syms)))
@@ -256,8 +257,8 @@ notion of \"the end of an outline\".")
   (defconst sml-id-re "\\sw\\(?:\\sw\\|\\s_\\)*"))
 
 (defconst sml-tyvarseq-re
-  (concat "\\(?:\\(?:'+" sml-id-re "\\|(\\(?:[,']\\|" sml-id-re
-          "\\|\\s-\\)+)\\)\\s-+\\)?"))
+  (concat "\\(?:\\(?:'+" sml-id-re "\\|(\\(?:[,' \t\n]+" sml-id-re
+          "\\)+)\\)\\s-+\\)?"))
 
 ;;; Font-lock settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
@@ -344,7 +345,7 @@ Regexp match data 0 points to the chars."
     (,(concat "\\_<\\(signature\\)\\s-+\\(" sml-id-re "\\)")
      (1 font-lock-keyword-face)
      (2 font-lock-interface-def-face))
-    
+
     (,sml-keywords-regexp . font-lock-keyword-face)
     ,@(sml-font-lock-symbols-keywords))
   "Regexps matching standard SML keywords.")
@@ -500,7 +501,7 @@ Regexp match data 0 points to the chars."
     ;;      and bar = Bar of string
     (save-excursion
       (let ((max (line-end-position 0))
-            (data (smie-backward-sexp "and"))
+            (_data (smie-backward-sexp "and"))
             (startcol (save-excursion
                         (forward-comment (- (point)))
                         (current-column)))
@@ -721,7 +722,7 @@ Assumes point is right before the | symbol."
   "The inferior-process buffer to which to send code.")
 (make-variable-buffer-local 'sml-prog-proc--buffer)
 
-(defstruct (sml-prog-proc-descriptor
+(cl-defstruct (sml-prog-proc-descriptor
             (:constructor sml-prog-proc-make)
             (:predicate nil)
             (:copier nil))
@@ -890,10 +891,10 @@ Prefix arg AND-GO also means to switch to the 
read-eval-loop buffer afterwards."
      ;; Look for files to determine the default command.
      (while (and (stringp dir)
                  (progn
-                   (dolist (cf (sml-prog-proc--prop compile-commands-alist))
+                   (cl-dolist (cf (sml-prog-proc--prop compile-commands-alist))
                      (when (file-exists-p (expand-file-name (cdr cf) dir))
                        (setq cmd (concat cmd "\"; " (car cf)))
-                       (return nil)))
+                       (cl-return nil)))
                    (not cmd)))
        (let ((newdir (file-name-directory (directory-file-name dir))))
         (setq dir (unless (equal newdir dir) newdir))
@@ -916,10 +917,10 @@ Prefix arg AND-GO also means to switch to the 
read-eval-loop buffer afterwards."
      ;; ;; now look for command's file to determine the directory
      ;; (setq dir default-directory)
      ;; (while (and (stringp dir)
-     ;;            (dolist (cf (sml-prog-proc--prop compile-commands-alist) t)
+     ;;            (cl-dolist (cf (sml-prog-proc--prop compile-commands-alist) 
t)
      ;;              (when (and (equal cmd (car cf))
      ;;                         (file-exists-p (expand-file-name (cdr cf) 
dir)))
-     ;;                (return nil))))
+     ;;                (cl-return nil))))
      ;;   (let ((newdir (file-name-directory (directory-file-name dir))))
      ;;     (setq dir (unless (equal newdir dir) newdir))))
      ;; (setq dir (or dir default-directory))
@@ -981,7 +982,7 @@ commands with the same file.")
 
 (defvar sml-use-command "use \"%s\""
   "Template for loading a file into the inferior SML process.
-Set to \"use \\\"%s\\\"\" for SML/NJ or Edinburgh ML; 
+Set to \"use \\\"%s\\\"\" for SML/NJ or Edinburgh ML;
 set to \"PolyML.use \\\"%s\\\"\" for Poly/ML, etc.")
 
 (defvar sml-cd-command "OS.FileSys.chDir \"%s\""
@@ -1097,7 +1098,7 @@ on which to run CMD using `remote-shell-program'.
     (setq sml-host-name host)
     ;; For remote execution, use `remote-shell-program'
     (when (> (length host) 0)
-      (setq args (list* host "cd" default-directory ";" cmd args))
+      (setq args `(,host "cd" ,default-directory ";" ,cmd . ,args))
       (setq cmd remote-shell-program))
     ;; Go for it.
     (save-current-buffer
@@ -1114,7 +1115,7 @@ on which to run CMD using `remote-shell-program'.
       (current-buffer))))
 
 (defun sml-send-function (&optional and-go)
-  "Send current paragraph to the inferior SML process. 
+  "Send current paragraph to the inferior SML process.
 With a prefix argument AND-GO switch to the repl buffer as well."
   (interactive "P")
   (save-excursion
@@ -1140,7 +1141,7 @@ With a prefix argument AND-GO switch to the repl buffer 
as well."
   ;; always obvious to spot it).
   ;;
   ;; Sample messages:
-  ;; 
+  ;;
   ;; Data.sml:31.9-33.33 Error: right-hand-side of clause doesn't agree with 
function result type [tycon mismatch]
   ;;   expression:  Hstring
   ;;   result type:  Hstring * int
@@ -1462,7 +1463,7 @@ Depending on the context insert the name of function, a 
\"=>\" etc."
       (end-of-line)
       (while (and (> count 0)
                  (setq name (sml-beginning-of-defun)))
-       (decf count)
+       (cl-decf count)
        (setq fullname (if fullname (concat name "." fullname) name))
        ;; Skip all other declarations that we find at the same level.
        (sml-skip-siblings))
@@ -1475,8 +1476,8 @@ Depending on the context insert the name of function, a 
\"=>\" etc."
   "Alist of code templates.
 You can extend this alist to your heart's content.  For each additional
 template NAME in the list, declare a keyboard macro or function (or
-interactive command) called 'sml-form-NAME'.
-If 'sml-form-NAME' is a function it takes no arguments and should
+interactive command) called `sml-form-NAME'.
+If `sml-form-NAME' is a function it takes no arguments and should
 insert the template at point\; if this is a command it may accept any
 sensible interactive call arguments\; keyboard macros can't take
 arguments at all.
@@ -1568,7 +1569,7 @@ If a prefix argument is given insert a NEWLINE and indent 
first, or
 just move to the proper indentation if the line is blank\; otherwise
 insert at point (which forces indentation to current column).
 
-The default form to insert is 'whatever you inserted last time'
+The default form to insert is whatever you inserted last time
 \(just hit return when prompted\)\; otherwise the command reads with
 completion from `sml-forms-alist'."
   (interactive
diff --git a/packages/sotlisp/sotlisp.el b/packages/sotlisp/sotlisp.el
index 09728cb..2ceb382 100644
--- a/packages/sotlisp/sotlisp.el
+++ b/packages/sotlisp/sotlisp.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/Malabarba/speed-of-thought-lisp
 ;; Keywords: convenience, lisp
 ;; Package-Requires: ((emacs "24.1"))
-;; Version: 1.4.1
+;; Version: 1.5.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
@@ -33,12 +33,12 @@
 ;;
 ;; A large number of abbrevs which expand function
 ;; initials to their name.  A few examples:
-;; 
+;;
 ;; - wcb -> with-current-buffer
 ;; - i -> insert
 ;; - r -> require '
 ;; - a -> and
-;; 
+;;
 ;; However, these are defined in a way such that they ONLY expand in a
 ;; place where you would use a function, so hitting SPC after "(r"
 ;; expands to "(require '", but hitting SPC after "(delete-region r"
@@ -52,32 +52,32 @@
 ;; thought-flow" way of writing.  The bindings are as follows, I
 ;; understand these don't fully adhere to conventions, and I'd
 ;; appreciate suggestions on better bindings.
-;; 
+;;
 ;; - M-RET :: Break line, and insert "()" with point in the middle.
 ;; - C-RET :: Do `forward-up-list', then do M-RET.
-;; 
+;;
 ;; Hitting RET followed by a `(' was one of the most common key sequences
 ;; for me while writing elisp, so giving it a quick-to-hit key was a
 ;; significant improvement.
-;; 
+;;
 ;; - C-c f :: Find function under point.  If it is not defined, create a
 ;; definition for it below the current function and leave point inside.
 ;; - C-c v :: Same, but for variable.
-;; 
+;;
 ;; With these commands, you just write your code as you think of it.  Once
 ;; you hit a "stop-point" of sorts in your tought flow, you hit `C-c f/v`
 ;; on any undefined functions/variables, write their definitions, and hit
 ;; `C-u C-SPC` to go back to the main function.
-;; 
+;;
 ;;; Small Example
 ;;
 ;; With the above (assuming you use something like paredit or
 ;; electric-pair-mode), if you write:
 ;;
 ;;   ( w t b M-RET i SPC text
-;; 
+;;
 ;; You get
-;; 
+;;
 ;;   (with-temp-buffer (insert text))
 
 ;;; Code:
@@ -98,7 +98,17 @@
   "Non-nil if point is at the start of a sexp.
 Specially, avoids matching inside argument lists."
   (and (eq (char-before) ?\()
-       (not (sotlisp--looking-back "(\\(defun\\s-+.*\\|lambda\\s-+\\)("))
+       (not (sotlisp--looking-back 
"(\\(defun\\s-+.*\\|\\(lambda\\|dolist\\|dotimes\\)\\s-+\\)("))
+       (save-excursion
+         (forward-char -1)
+         (condition-case er
+             (progn
+               (backward-up-list)
+               (forward-sexp -1)
+               (not
+                (looking-at-p (rx (* (or (syntax word) (syntax symbol) "-"))
+                                  "let" symbol-end))))
+           (error t)))
        (not (string-match (rx (syntax symbol)) (string last-command-event)))))
 
 (defun sotlisp--function-quote-p ()
@@ -252,11 +262,13 @@ The space char is not included.  Any \"$\" are also 
removed."
     ("dfv" . "defvar $ t\n  \"\"")
     ("dk" . "define-key ")
     ("dl" . "dolist (it $)")
+    ("dt" . "dotimes (it $)")
     ("dmp" . "derived-mode-p '")
     ("dm" . "defmacro $ ()\n  \"\"\n  ")
     ("dr" . "delete-region ")
     ("dv" . "defvar $ t\n  \"\"")
     ("e" . "error \"$\"")
+    ("ef" . "executable-find ")
     ("efn" . "expand-file-name ")
     ("eol" . "end-of-line")
     ("f" . "format \"$\"")
@@ -340,7 +352,7 @@ The space char is not included.  Any \"$\" are also 
removed."
     ("sf" . "search-forward $ nil 'noerror")
     ("sfr" . "search-forward-regexp $ nil 'noerror")
     ("sic" . "self-insert-command")
-    ("sl" . "string<")
+    ("sl" . "setq-local ")
     ("sm" . "string-match \"$\"")
     ("smd" . "save-match-data")
     ("sn" . "symbol-name ")
@@ -354,6 +366,8 @@ The space char is not included.  Any \"$\" are also 
removed."
     ("sw" . "selected-window$")
     ("syp" . "symbolp ")
     ("tap" . "thing-at-point 'symbol")
+    ("tf" . "thread-first ")
+    ("tl" . "thread-last ")
     ("u" . "unless ")
     ("ul" . "up-list")
     ("up" . "unwind-protect\n(progn $)")
@@ -374,14 +388,14 @@ The space char is not included.  Any \"$\" are also 
removed."
 (defun sotlisp-define-function-abbrev (name expansion)
   "Define a function abbrev expanding NAME to EXPANSION.
 This abbrev will only be expanded in places where a function name is
-sensible.  Roughly, this is right after a `(' or a `#''.
+sensible.  Roughly, this is right after a `(' or a `#\\=''.
 
 If EXPANSION is any string, it doesn't have to be the just the
 name of a function.  In particular:
   - if it contains a `$', this char will not be inserted and
     point will be moved to its position after expansion.
   - if it contains a space, only a substring of it up to the
-first space is inserted when expanding after a `#'' (this is done
+first space is inserted when expanding after a `#\\='' (this is done
 by defining two different abbrevs).
 
 For instance, if one defines
@@ -390,7 +404,7 @@ For instance, if one defines
 then triggering `expand-abbrev' after \"d\" expands in the
 following way:
    (d    => (delete-char 1
-   #'d   => #'delete-char"
+   #\\='d   => #\\='delete-char"
   (define-abbrev emacs-lisp-mode-abbrev-table
     name t #'sotlisp--expand-function
     ;; Don't override user abbrevs
@@ -455,7 +469,10 @@ If `speed-of-thought-mode' is already on, call ON."
                            #'comment-or-uncomment-sexp
                          #'sotlisp-comment-or-uncomment-sexp))
     ("\C-cf"    . sotlisp-find-or-define-function)
-    ("\C-cv"    . sotlisp-find-or-define-variable)))
+    ("\C-cv"    . sotlisp-find-or-define-variable))
+  (if sotlisp-mode
+      (abbrev-mode 1)
+    (kill-local-variable 'abbrev-mode)))
 
 (defun sotlisp-turn-on-everywhere ()
   "Call-once function to turn on sotlisp everywhere.
@@ -640,7 +657,7 @@ With a prefix argument, defines a `defvar' instead of a 
`defcustom'."
           (skip-chars-backward "\r\n[:blank:]")
           (setq p (point-marker))
           (backward-up-list)))
-      ;; Re-comment everything before it. 
+      ;; Re-comment everything before it.
       (ignore-errors
         (comment-region beg p))
       ;; And everything after it.
diff --git a/packages/spinner/spinner.el b/packages/spinner/spinner.el
index 63ead1e..24e9cea 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.7
+;; Version: 1.7.1
 ;; URL: https://github.com/Malabarba/spinner.el
 ;; Keywords: processes mode-line
 
@@ -131,9 +131,8 @@ 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))))
+    (apply #'vector (mapcar (lambda (n) (substring whole-string n (+ n width)))
+                            (number-sequence (+ width 3) 0 -1)))))
 
 (defvar spinner-current nil
   "Spinner curently being displayed on the `mode-line-process'.")
@@ -159,7 +158,7 @@ below).
 If TYPE is nil, the frames of this spinner are given by the first
 element of `spinner-types'.
 If TYPE is a symbol, it specifies an element of `spinner-types'.
-If TYPE is 'random, use a random element of `spinner-types'.
+If TYPE is `random', use a random element of `spinner-types'.
 If TYPE is a list, it should be a list of symbols, and a random
 one is chosen as the spinner type.
 If TYPE is a vector, it should be a vector of strings and these
@@ -276,7 +275,7 @@ stop the SPINNER's timer."
 If TYPE-OR-OBJECT is an object created with `make-spinner',
 simply activate it.  This method is designed for minor modes, so
 they can use the spinner as part of their lighter by doing:
-    '(:eval (spinner-print THE-SPINNER))
+    \\='(:eval (spinner-print THE-SPINNER))
 To stop this spinner, call `spinner-stop' on it.
 
 If TYPE-OR-OBJECT is anything else, a buffer-local spinner is
diff --git a/packages/stream/stream.el b/packages/stream/stream.el
index 567a9e3..ef19918 100644
--- a/packages/stream/stream.el
+++ b/packages/stream/stream.el
@@ -1,10 +1,10 @@
 ;;; stream.el --- Implementation of streams  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2015 Free Software Foundation, Inc.
+;; Copyright (C) 2016 Free Software Foundation, Inc.
 
 ;; Author: Nicolas Petton <address@hidden>
 ;; Keywords: stream, laziness, sequences
-;; Version: 2.1.0
+;; Version: 2.2.2
 ;; Package-Requires: ((emacs "25"))
 ;; Package: stream
 
@@ -49,6 +49,17 @@
 ;; (defun fib (a b)
 ;;  (stream-cons a (fib b (+ a b))))
 ;; (fib 0 1)
+;;
+;; A note for developers: Please make sure to implement functions that
+;; process streams (build new streams out of given streams) in a way
+;; that no new elements in any argument stream are generated.  This is
+;; most likely an error since it changes the argument stream.  For
+;; example, a common error is to call `stream-empty-p' on an input
+;; stream and build the stream to return depending on the result.
+;; Instead, delay such tests until elements are requested from the
+;; resulting stream.  A way to achieve this is to wrap such tests into
+;; `stream-make' or `stream-delay'.  See the implementations of
+;; `stream-append' or `seq-drop-while' for example.
 
 ;;; Code:
 
@@ -148,11 +159,10 @@ range is infinite."
 
 (defun streamp (stream)
   "Return non-nil if STREAM is a stream, nil otherwise."
-  (and (consp stream)
-       (eq (car stream) stream--identifier)))
+  (eq (car-safe stream) stream--identifier))
 
 (defun stream-empty ()
-  "Return an empty stream."
+  "Return a new empty stream."
   (list stream--identifier (thunk-delay nil)))
 
 (defun stream-empty-p (stream)
@@ -197,10 +207,10 @@ elements in the STREAMS in order."
 
 (cl-generic-define-generalizer stream--generalizer
   11
-  (lambda (name)
+  (lambda (name &rest _)
     `(when (streamp ,name)
        'stream))
-  (lambda (tag)
+  (lambda (tag &rest _)
     (when (eq tag 'stream)
       '(stream))))
 
@@ -230,8 +240,19 @@ This function will eagerly consume the entire stream."
       (setq stream (stream-rest stream)))
     len))
 
-(cl-defmethod seq-subseq ((stream stream) start end)
-  (seq-take (seq-drop stream start) (- end start)))
+(cl-defmethod seq-subseq ((stream stream) start &optional end)
+  "Return a stream of elements of STREAM from START to END.
+
+END is exclusive.  If END is omitted, include all elements from
+START on.  Both START and END must be non-negative.  Since
+streams are a delayed type of sequences, don't signal an error if
+START or END are larger than the number of elements (the returned
+stream will simply be accordingly shorter, or even empty)."
+  (when (or (< start 0) (and end (< end 0)))
+    (error "seq-subseq: only non-negative indexes allowed for streams"))
+  (let ((stream-from-start (seq-drop stream start)))
+    (if end (seq-take stream-from-start (- end start))
+      stream-from-start)))
 
 (cl-defmethod seq-into-sequence ((stream stream))
   "Convert STREAM into a sequence."
@@ -317,10 +338,124 @@ kind of nonlocal exit."
        (cons (stream-first stream)
              (seq-filter pred (stream-rest stream)))))))
 
+(defmacro stream-delay (expr)
+  "Return a new stream to be obtained by evaluating EXPR.
+EXPR will be evaluated once when an element of the resulting
+stream is requested for the first time, and must return a stream.
+EXPR will be evaluated in the lexical environment present when
+calling this function."
+  (let ((stream (make-symbol "stream")))
+    `(stream-make (let ((,stream ,expr))
+                    (if (stream-empty-p ,stream)
+                        nil
+                      (cons (stream-first ,stream)
+                            (stream-rest ,stream)))))))
+
 (cl-defmethod seq-copy ((stream stream))
   "Return a shallow copy of STREAM."
-  (stream-cons (stream-first stream)
-               (stream-rest stream)))
+  (stream-delay stream))
+
+
+;;; More stream operations
+
+(defun stream-scan (function init stream)
+  "Return a stream of successive reduced values for STREAM.
+
+If the elements of a stream s are s_1, s_2, ..., the elements
+S_1, S_2, ... of the stream returned by \(stream-scan f init s\)
+are defined recursively by
+
+  S_1     = init
+  S_(n+1) = (funcall f S_n s_n)
+
+as long as s_n exists.
+
+Example:
+
+   (stream-scan #\\='* 1 (stream-range 1))
+
+returns a stream of the factorials."
+  (let ((res init))
+    (stream-cons
+     res
+     (seq-map (lambda (el) (setq res (funcall function res el)))
+              stream))))
+
+(defun stream-flush (stream)
+  "Request all elements from STREAM in order for side effects only."
+  (while (not (stream-empty-p stream))
+    (cl-callf stream-rest stream)))
+
+(defun stream-iterate-function (function value)
+  "Return a stream of repeated applications of FUNCTION to VALUE.
+The returned stream starts with VALUE.  Any successive element
+will be found by calling FUNCTION on the preceding element."
+  (stream-cons
+   value
+   (stream-iterate-function function (funcall function value))))
+
+(defun stream-concatenate (stream-of-streams)
+  "Concatenate all streams in STREAM-OF-STREAMS and return the result.
+All elements in STREAM-OF-STREAMS must be streams.  The result is
+a stream."
+  (stream-make
+   (while (and (not (stream-empty-p stream-of-streams))
+               (stream-empty-p (stream-first stream-of-streams)))
+     (cl-callf stream-rest stream-of-streams))
+   (if (stream-empty-p stream-of-streams)
+       nil
+     (cons
+      (stream-first (stream-first stream-of-streams))
+      (stream-concatenate
+       (stream-cons (stream-rest (stream-first stream-of-streams))
+                    (stream-rest stream-of-streams)))))))
+
+(defun stream-of-directory-files-1 (directory &optional nosort recurse 
follow-links)
+  "Helper for `stream-of-directory-files'."
+  (stream-delay
+   (if (file-accessible-directory-p directory)
+       (let (files dirs (reverse-fun (if nosort #'identity #'nreverse)))
+         (dolist (file (directory-files directory t nil nosort))
+           (let ((is-dir (file-directory-p file)))
+             (unless (and is-dir
+                          (member (file-name-nondirectory (directory-file-name 
file))
+                                  '("." "..")))
+               (push file files)
+               (when (and is-dir
+                          (or follow-links (not (file-symlink-p file)))
+                          (if (functionp recurse) (funcall recurse file) 
recurse))
+                 (push file dirs)))))
+         (apply #'stream-append
+                (stream (funcall reverse-fun files))
+                (mapcar
+                 (lambda (dir) (stream-of-directory-files-1 dir nosort recurse 
follow-links))
+                 (funcall reverse-fun dirs))))
+     (stream-empty))))
+
+(defun stream-of-directory-files (directory &optional full nosort recurse 
follow-links filter)
+  "Return a stream of names of files in DIRECTORY.
+Call `directory-files' to list file names in DIRECTORY and make
+the result a stream.  Don't include files named \".\" or \"..\".
+The arguments FULL and NOSORT are directly passed to
+`directory-files'.
+
+Third 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 stream 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.
+
+If FILTER is non-nil, it should be a predicate accepting one
+argument, an absolute file name.  It is used to limit the
+resulting stream to the files fulfilling this predicate."
+  (let* ((stream (stream-of-directory-files-1 directory nosort recurse 
follow-links))
+         (filtered-stream (if filter (seq-filter filter stream) stream)))
+    (if full filtered-stream
+      (seq-map (lambda (file) (file-relative-name file directory)) 
filtered-stream))))
 
 (provide 'stream)
 ;;; stream.el ends here
diff --git a/packages/stream/tests/stream-tests.el 
b/packages/stream/tests/stream-tests.el
index 88edf91..e79c3ef 100644
--- a/packages/stream/tests/stream-tests.el
+++ b/packages/stream/tests/stream-tests.el
@@ -112,8 +112,14 @@
     (should (stream-empty-p (stream-rest (stream-rest rest))))))
 
 (ert-deftest stream-seq-subseq-test ()
-  ;; TODO
-  )
+  (should (equal (seq-into (seq-subseq (stream (list 0 1 2 3 4)) 1 3) 'list)
+                           (seq-subseq         (list 0 1 2 3 4)  1 3)))
+  (should (= (stream-first (seq-subseq (stream-range 0) 5))
+             5))
+  (should (= (stream-first (seq-subseq (seq-subseq (stream-range 0) 5) 5))
+             10))
+
+  (should-error (seq-subseq (stream-range 0) -1)))
 
 (ert-deftest stream-seq-into-test ()
   (should (streamp (seq-into (stream-empty) 'stream)))
@@ -171,10 +177,40 @@
   (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-delay-test ()
+  (should (streamp (stream-delay (stream-range))))
+  (should (= 0 (stream-first (stream-delay (stream-range)))))
+  (should (= 1 (stream-first (stream-rest (stream-delay (stream-range))))))
+  (should (let ((stream (stream-range 3 7)))
+            (equal (seq-into (stream-delay stream) 'list)
+                   (seq-into               stream  'list))))
+  (should (null (seq-into (stream-delay (stream-empty)) 'list)))
+  (should (let* ((evaluated nil)
+                 (one-plus (lambda (el)
+                             (setq evaluated t)
+                             (1+ el)))
+                 (stream (seq-map one-plus (stream '(1)))))
+            (equal '(nil 2 t)
+                   (list evaluated (stream-first stream) evaluated))))
+  (should (let* ((a 0)
+                 (set-a (lambda (x) (setq a x)))
+                 (s (stream-delay (stream (list a))))
+                 res1 res2)
+            (funcall set-a 5)
+            (setq res1 (stream-first s))
+            (funcall set-a 11)
+            (setq res2 (stream-first s))
+            (and (equal res1 5)
+                 (equal res2 5)))))
+
 (ert-deftest stream-seq-copy-test ()
   (should (streamp (seq-copy (stream-range))))
   (should (= 0 (stream-first (seq-copy (stream-range)))))
-  (should (= 1 (stream-first (stream-rest (seq-copy (stream-range)))))))
+  (should (= 1 (stream-first (stream-rest (seq-copy (stream-range))))))
+  (should (let ((stream (stream-range 3 7)))
+            (equal (seq-into (seq-copy stream) 'list)
+                   (seq-into stream 'list))))
+  (should (null (seq-into (seq-copy (stream-empty)) 'list))))
 
 (ert-deftest stream-range-test ()
   (should (stream-empty-p (stream-range 0 0)))
@@ -198,12 +234,6 @@
   (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))
@@ -212,5 +242,60 @@
     (should (= 2 (stream-first str)))
     (should (null (stream-pop stream-empty)))))
 
+(ert-deftest stream-scan-test ()
+  (should (eq (seq-elt (stream-scan #'* 1 (stream-range 1)) 4) 24)))
+
+(ert-deftest stream-flush-test ()
+  (should (let* ((times 0)
+                 (count (lambda () (cl-incf times))))
+            (letrec ((make-test-stream (lambda () (stream-cons (progn (funcall 
count) nil)
+                                                          (funcall 
make-test-stream)))))
+              (stream-flush (seq-take (funcall make-test-stream) 5))
+              (eq times 5)))))
+
+(ert-deftest stream-iterate-function-test ()
+  (should (equal (list 0 1 2) (seq-into-sequence (seq-take 
(stream-iterate-function #'1+ 0) 3)))))
+
+(ert-deftest stream-concatenate-test ()
+  (should (equal (seq-into-sequence
+                  (stream-concatenate
+                   (stream (list (stream (list 1 2 3))
+                                 (stream (list))
+                                 (stream (list 4))
+                                 (stream (list 5 6 7 8 9))))))
+                 (list 1 2 3 4 5 6 7 8 9))))
+
+;; Tests whether calling stream processing functions ("transducers")
+;; doesn't generate elements from argument streams
+
+(defvar this-delayed-stream-function nil)
+
+(defun make-delayed-test-stream ()
+  (stream-make
+   (cons (prog1 1 (error "`%s' not completely delayed" 
this-delayed-stream-function))
+         (make-delayed-test-stream))))
+
+(defmacro deftest-for-delayed-evaluation (call)
+  (let ((function (car call)))
+    `(ert-deftest ,(intern (concat (symbol-name function) "-delayed-test")) ()
+       (let ((this-delayed-stream-function ',function))
+         (should (prog1 t ,call))))))
+
+(deftest-for-delayed-evaluation (streamp        (make-delayed-test-stream)))
+(deftest-for-delayed-evaluation (seqp           (make-delayed-test-stream)))
+(deftest-for-delayed-evaluation (stream-append  (make-delayed-test-stream) 
(make-delayed-test-stream)))
+(deftest-for-delayed-evaluation (seq-take (make-delayed-test-stream) 2))
+(deftest-for-delayed-evaluation (seq-drop (make-delayed-test-stream) 2))
+(deftest-for-delayed-evaluation (seq-take-while #'numberp 
(make-delayed-test-stream)))
+(deftest-for-delayed-evaluation (seq-take-until #'numberp 
(make-delayed-test-stream)))
+(deftest-for-delayed-evaluation (seq-map #'identity 
(make-delayed-test-stream)))
+(deftest-for-delayed-evaluation (seq-filter #'cl-evenp 
(make-delayed-test-stream)))
+(deftest-for-delayed-evaluation (stream-delay (make-delayed-test-stream)))
+(deftest-for-delayed-evaluation (seq-copy (make-delayed-test-stream)))
+(deftest-for-delayed-evaluation (seq-subseq (make-delayed-test-stream) 2))
+(deftest-for-delayed-evaluation (stream-scan #'* 1 (make-delayed-test-stream)))
+(deftest-for-delayed-evaluation (stream-concatenate (stream (list 
(make-delayed-test-stream)
+                                                                  
(make-delayed-test-stream)))))
+
 (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 3603651..bf0147c 100644
--- a/packages/svg-clock/svg-clock.el
+++ b/packages/svg-clock/svg-clock.el
@@ -73,9 +73,9 @@
 
 (defun svg-clock--create-def-elements (foreground background)
   "Return a list of SVG elements using the colors FOREGROUND and BACKGROUND.
-The elements are supposed to be added to an SVG object as 'defs'.
-The SVG may then 'use': 'clock-face, 'second-hand, 'minute-hand
-and 'hour-hand.  The clock-face has a size of 1x1."
+The elements are supposed to be added to an SVG object as `defs'.
+The SVG may then `use': `clock-face', `second-hand', `minute-hand'
+and `hour-hand'.  The clock-face has a size of 1x1."
   (list (svg-clock-symbol 'tickshort
                           (svg-clock-line .5 .02 .5 .04
                                           `(stroke . ,foreground)
diff --git a/packages/swiper/Makefile b/packages/swiper/Makefile
deleted file mode 100644
index b3857c9..0000000
--- a/packages/swiper/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-emacs ?= emacs
-
-LOAD = -l colir.el -l ivy.el -l swiper.el
-
-.PHONY: all compile clean
-
-all: test
-
-test:
-       $(emacs) -batch $(LOAD) -l ivy-test.el -f ert-run-tests-batch-and-exit
-
-compile:
-       $(emacs) -batch $(LOAD) --eval "(mapc #'byte-compile-file '(\"ivy.el\" 
\"swiper.el\" \"counsel.el\"))"
-
-clean:
-       rm -f *.elc
diff --git a/packages/swiper/README.md b/packages/swiper/README.md
deleted file mode 100644
index 0d80f8d..0000000
--- a/packages/swiper/README.md
+++ /dev/null
@@ -1,51 +0,0 @@
-[![Build 
Status](https://travis-ci.org/abo-abo/swiper.svg?branch=master)](https://travis-ci.org/abo-abo/swiper)
-
-## Swiper
-
-Package for GNU Emacs that gives you an overview as you search for a regex
-
-![swiper.png](http://oremacs.com/download/swiper.png)
-
-The package uses the `ivy` back end for the overview, see also
-[swiper-helm](https://github.com/abo-abo/swiper-helm).
-
-## Screenshots
-
-![ivy-swiper-1.png](http://oremacs.com/download/ivy-swiper-1.png)
-
-There's also a ten minute [video 
demo](https://www.youtube.com/watch?v=VvnJQpTFVDc).
-
-## Ivy
-
-Ivy is a generic completion method for Emacs, similar to
-`icomplete-mode`. It aims to be more efficient, more simple, and more
-pleasant to use than the alternatives. It's also highly customizable
-and very small.
-
-To try it, just call <kbd>M-x</kbd> `ivy-mode`, and all generic
-completion, including file and buffer names, will be done with Ivy.
-
-## Installation
-
-You can install the package from MELPA / GNU ELPA.
-Here is some typical configuration:
-
-```elisp
-(ivy-mode 1)
-(setq ivy-use-virtual-buffers t)
-(global-set-key "\C-s" 'swiper)
-(global-set-key (kbd "C-c C-r") '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)
-```
diff --git a/packages/swiper/counsel.el b/packages/swiper/counsel.el
deleted file mode 100644
index 9c86ec0..0000000
--- a/packages/swiper/counsel.el
+++ /dev/null
@@ -1,1301 +0,0 @@
-;;; counsel.el --- Various completion functions using Ivy -*- lexical-binding: 
t -*-
-
-;; Copyright (C) 2015  Free Software Foundation, Inc.
-
-;; Author: Oleh Krehel <address@hidden>
-;; URL: https://github.com/abo-abo/swiper
-;; Version: 0.1.0
-;; Package-Requires: ((emacs "24.1") (swiper "0.4.0"))
-;; Keywords: completion, matching
-
-;; This file is part of GNU Emacs.
-
-;; This file 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, 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.
-
-;; For a full copy of the GNU General Public License
-;; see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-;;
-;; Just call one of the interactive functions in this file to complete
-;; the corresponding thing using `ivy'.
-;;
-;; Currently available: Elisp symbols, Clojure symbols, Git files.
-
-;;; Code:
-
-(require 'swiper)
-(require 'etags)
-
-(defvar counsel-completion-beg nil
-  "Completion bounds start.")
-
-(defvar counsel-completion-end nil
-  "Completion bounds end.")
-
-;;;###autoload
-(defun counsel-el ()
-  "Elisp completion at point."
-  (interactive)
-  (let* ((bnd (unless (and (looking-at ")")
-                           (eq (char-before) ?\())
-                (bounds-of-thing-at-point
-                 'symbol)))
-         (str (if bnd
-                  (buffer-substring-no-properties
-                   (car bnd)
-                   (cdr bnd))
-                ""))
-         (ivy-height 7)
-         (funp (eq (char-before (car bnd)) ?\())
-         symbol-names)
-    (if bnd
-        (progn
-          (setq counsel-completion-beg
-                (move-marker (make-marker) (car bnd)))
-          (setq counsel-completion-end
-                (move-marker (make-marker) (cdr bnd))))
-      (setq counsel-completion-beg nil)
-      (setq counsel-completion-end nil))
-    (if (string= str "")
-        (mapatoms
-         (lambda (x)
-           (when (symbolp x)
-             (push (symbol-name x) symbol-names))))
-      (setq symbol-names
-            (all-completions str obarray
-                             (and funp
-                                  (lambda (x)
-                                    (or (functionp x)
-                                        (macrop x)
-                                        (special-form-p x)))))))
-    (ivy-read "Symbol name: " symbol-names
-              :predicate (and funp #'functionp)
-              :initial-input str
-              :action #'counsel--el-action)))
-
-(declare-function slime-symbol-start-pos "ext:slime")
-(declare-function slime-symbol-end-pos "ext:slime")
-(declare-function slime-contextual-completions "ext:slime-c-p-c")
-
-;;;###autoload
-(defun counsel-cl ()
-  "Common Lisp completion at point."
-  (interactive)
-  (setq counsel-completion-beg (slime-symbol-start-pos))
-  (setq counsel-completion-end (slime-symbol-end-pos))
-  (ivy-read "Symbol name: "
-            (car (slime-contextual-completions
-                  counsel-completion-beg
-                  counsel-completion-end))
-            :action #'counsel--el-action))
-
-(defun counsel--el-action (symbol)
-  "Insert SYMBOL, erasing the previous one."
-  (when (stringp symbol)
-    (with-ivy-window
-      (when counsel-completion-beg
-        (delete-region
-         counsel-completion-beg
-         counsel-completion-end))
-      (setq counsel-completion-beg
-            (move-marker (make-marker) (point)))
-      (insert symbol)
-      (setq counsel-completion-end
-            (move-marker (make-marker) (point))))))
-
-(declare-function deferred:sync! "ext:deferred")
-(declare-function jedi:complete-request "ext:jedi-core")
-(declare-function jedi:ac-direct-matches "ext:jedi")
-
-(defun counsel-jedi ()
-  "Python completion at point."
-  (interactive)
-  (let ((bnd (bounds-of-thing-at-point 'symbol)))
-    (if bnd
-        (progn
-          (setq counsel-completion-beg (car bnd))
-          (setq counsel-completion-end (cdr bnd)))
-      (setq counsel-completion-beg nil)
-      (setq counsel-completion-end nil)))
-  (deferred:sync!
-   (jedi:complete-request))
-  (ivy-read "Symbol name: " (jedi:ac-direct-matches)
-            :action #'counsel--py-action))
-
-(defun counsel--py-action (symbol)
-  "Insert SYMBOL, erasing the previous one."
-  (when (stringp symbol)
-    (with-ivy-window
-      (when counsel-completion-beg
-        (delete-region
-         counsel-completion-beg
-         counsel-completion-end))
-      (setq counsel-completion-beg
-            (move-marker (make-marker) (point)))
-      (insert symbol)
-      (setq counsel-completion-end
-            (move-marker (make-marker) (point)))
-      (when (equal (get-text-property 0 'symbol symbol) "f")
-        (insert "()")
-        (setq counsel-completion-end
-              (move-marker (make-marker) (point)))
-        (backward-char 1)))))
-
-(defvar counsel-describe-map
-  (let ((map (make-sparse-keymap)))
-    (define-key map (kbd "C-.") #'counsel-find-symbol)
-    (define-key map (kbd "C-,") #'counsel--info-lookup-symbol)
-    map))
-
-(defun counsel-find-symbol ()
-  "Jump to the definition of the current symbol."
-  (interactive)
-  (ivy-exit-with-action #'counsel--find-symbol))
-
-(defun counsel--info-lookup-symbol ()
-  "Lookup the current symbol in the info docs."
-  (interactive)
-  (ivy-exit-with-action #'counsel-info-lookup-symbol))
-
-(defun counsel--find-symbol (x)
-  "Find symbol definition that corresponds to string X."
-  (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 ((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)))
-               (find-library
-                (prin1-to-string sym)))
-              (t
-               (error "Couldn't fild definition of %s"
-                      sym)))))))
-
-(defvar counsel-describe-symbol-history nil
-  "History for `counsel-describe-variable' and `counsel-describe-function'.")
-
-(defun counsel-symbol-at-point ()
-  "Return current symbol at point as a string."
-  (let ((s (thing-at-point 'symbol)))
-    (and (stringp s)
-         (if (string-match "\\`[`']?\\(.*?\\)'?\\'" s)
-             (match-string 1 s)
-           s))))
-
-(defun counsel-variable-list ()
-  "Return the list of all currently bound variables."
-  (let (cands)
-    (mapatoms
-     (lambda (vv)
-       (when (or (get vv 'variable-documentation)
-                 (and (boundp vv) (not (keywordp vv))))
-         (push (symbol-name vv) cands))))
-    cands))
-
-;;;###autoload
-(defun counsel-describe-variable ()
-  "Forward to `describe-variable'."
-  (interactive)
-  (let ((enable-recursive-minibuffers t))
-    (ivy-read
-     "Describe variable: "
-     (counsel-variable-list)
-     :keymap counsel-describe-map
-     :preselect (counsel-symbol-at-point)
-     :history 'counsel-describe-symbol-history
-     :require-match t
-     :sort t
-     :action (lambda (x)
-               (describe-variable
-                (intern x)))
-     :caller 'counsel-describe-variable)))
-
-(ivy-set-actions
- 'counsel-describe-variable
- '(("i" counsel-info-lookup-symbol "info")
-   ("d" counsel--find-symbol "definition")))
-
-(ivy-set-actions
- 'counsel-describe-function
- '(("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'."
-  (interactive)
-  (let ((enable-recursive-minibuffers t))
-    (ivy-read "Describe function: "
-              (let (cands)
-                (mapatoms
-                 (lambda (x)
-                   (when (fboundp x)
-                     (push (symbol-name x) cands))))
-                cands)
-              :keymap counsel-describe-map
-              :preselect (counsel-symbol-at-point)
-              :history 'counsel-describe-symbol-history
-              :require-match t
-              :sort t
-              :action (lambda (x)
-                        (describe-function
-                         (intern x)))
-              :caller 'counsel-describe-function)))
-
-(defvar info-lookup-mode)
-(declare-function info-lookup->completions "info-look")
-(declare-function info-lookup->mode-value "info-look")
-(declare-function info-lookup-select-mode "info-look")
-(declare-function info-lookup-change-mode "info-look")
-(declare-function info-lookup "info-look")
-
-;;;###autoload
-(defun counsel-info-lookup-symbol (symbol &optional mode)
-  "Forward to (`info-describe-symbol' SYMBOL MODE) with ivy completion."
-  (interactive
-   (progn
-     (require 'info-look)
-     (let* ((topic 'symbol)
-            (mode (cond (current-prefix-arg
-                         (info-lookup-change-mode topic))
-                        ((info-lookup->mode-value
-                          topic (info-lookup-select-mode))
-                         info-lookup-mode)
-                        ((info-lookup-change-mode topic))))
-            (completions (info-lookup->completions topic mode))
-            (enable-recursive-minibuffers t)
-            (value (ivy-read
-                    "Describe symbol: "
-                    (mapcar #'car completions)
-                    :sort t)))
-       (list value info-lookup-mode))))
-  (require 'info-look)
-  (info-lookup 'symbol symbol mode))
-
-(defvar counsel-unicode-char-history nil
-  "History for `counsel-unicode-char'.")
-
-;;;###autoload
-(defun counsel-unicode-char ()
-  "Insert a Unicode character at point."
-  (interactive)
-  (let ((minibuffer-allow-text-properties t))
-    (setq counsel-completion-beg (point))
-    (setq counsel-completion-end (point))
-    (ivy-read "Unicode name: "
-              (mapcar (lambda (x)
-                        (propertize
-                         (format "% -60s%c" (car x) (cdr x))
-                         'result (cdr x)))
-                      (ucs-names))
-              :action (lambda (char)
-                        (with-ivy-window
-                          (delete-region counsel-completion-beg 
counsel-completion-end)
-                          (setq counsel-completion-beg (point))
-                          (insert-char (get-text-property 0 'result char))
-                          (setq counsel-completion-end (point))))
-              :history 'counsel-unicode-char-history)))
-
-(declare-function cider-sync-request:complete "ext:cider-client")
-;;;###autoload
-(defun counsel-clj ()
-  "Clojure completion at point."
-  (interactive)
-  (counsel--generic
-   (lambda (str)
-     (mapcar
-      #'cl-caddr
-      (cider-sync-request:complete str ":same")))))
-
-;;;###autoload
-(defun counsel-git ()
-  "Find file in the current Git repository."
-  (interactive)
-  (let* ((default-directory (locate-dominating-file
-                             default-directory ".git"))
-         (cands (split-string
-                 (shell-command-to-string
-                  "git ls-files --full-name --")
-                 "\n"
-                 t))
-         (action `(lambda (x)
-                    (let ((default-directory ,default-directory))
-                      (find-file x)))))
-    (ivy-read "Find file: " cands
-              :action action)))
-
-(defvar counsel--git-grep-dir nil
-  "Store the base git directory.")
-
-(defvar counsel--git-grep-count nil
-  "Store the line count in current repository.")
-
-(defun counsel-more-chars (n)
-  "Return two fake candidates prompting for at least N input."
-  (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 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)
-        (counsel--gg-candidates (ivy--regex string))
-        nil))))
-
-(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
-    (counsel-git-grep-action ivy--current)
-    (recenter-top-bottom)))
-
-(defun counsel-git-grep-action (x)
-  (when (string-match "\\`\\(.*?\\):\\([0-9]+\\):\\(.*\\)\\'" x)
-    (with-ivy-window
-      (let ((file-name (match-string-no-properties 1 x))
-            (line-number (match-string-no-properties 2 x)))
-        (find-file (expand-file-name file-name counsel--git-grep-dir))
-        (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)))))))
-
-(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 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 "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)
-      (error "Not in a git repository")
-    (setq counsel--git-grep-count (counsel--gg-count "" t))
-    (ivy-read "git grep: " 'counsel-git-grep-function
-              :initial-input initial-input
-              :matcher #'counsel-git-grep-matcher
-              :dynamic-collection (> counsel--git-grep-count 20000)
-              :keymap counsel-git-grep-map
-              :action #'counsel-git-grep-action
-              :unwind #'swiper--cleanup
-              :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."
-  :type 'boolean
-  :group 'ivy)
-
-(declare-function ffap-guesser "ffap")
-
-(defvar counsel-find-file-map (make-sparse-keymap))
-
-;;;###autoload
-(defun counsel-find-file ()
-  "Forward to `find-file'."
-  (interactive)
-  (ivy-read "Find file: " 'read-file-name-internal
-            :matcher #'counsel--find-file-matcher
-            :action
-            (lambda (x)
-              (with-ivy-window
-                (find-file (expand-file-name x ivy--directory))))
-            :preselect (when counsel-find-file-at-point
-                         (require 'ffap)
-                         (ffap-guesser))
-            :require-match 'confirm-after-completion
-            :history 'file-name-history
-            :keymap counsel-find-file-map))
-
-(defcustom counsel-find-file-ignore-regexp nil
-  "A regexp of files to ignore while in `counsel-find-file'.
-These files are un-ignored if `ivy-text' matches them.
-The common way to show all files is to start `ivy-text' with a dot.
-Possible value: \"\\(?:\\`[#.]\\)\\|\\(?:[#~]\\'\\)\"."
-  :group 'ivy)
-
-(defun counsel--find-file-matcher (regexp candidates)
-  "Return REGEXP-matching CANDIDATES.
-Skip some dotfiles unless `ivy-text' requires them."
-  (let ((res (cl-remove-if-not
-              (lambda (x)
-                (string-match regexp x))
-              candidates)))
-    (if (or (null counsel-find-file-ignore-regexp)
-            (string-match counsel-find-file-ignore-regexp ivy-text))
-        res
-      (cl-remove-if
-       (lambda (x)
-         (string-match counsel-find-file-ignore-regexp x))
-       res))))
-
-(defun counsel-git-grep-matcher (regexp candidates)
-  (or (and (equal regexp ivy--old-re)
-           ivy--old-cands)
-      (prog1
-          (setq ivy--old-cands
-                (cl-remove-if-not
-                 (lambda (x)
-                   (ignore-errors
-                     (when (string-match "^[^:]+:[^:]+:" x)
-                       (setq x (substring x (match-end 0)))
-                       (if (stringp regexp)
-                           (string-match regexp x)
-                         (let ((res t))
-                           (dolist (re regexp)
-                             (setq res
-                                   (and res
-                                        (ignore-errors
-                                          (if (cdr re)
-                                              (string-match (car re) x)
-                                            (not (string-match (car re) 
x)))))))
-                           res)))))
-                 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))
-         (buff (get-buffer counsel--process)))
-    (when proc
-      (delete-process proc))
-    (when buff
-      (kill-buffer buff))
-    (setq proc (start-process-shell-command
-                counsel--process
-                counsel--process
-                cmd))
-    (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")
-      (progn
-        (with-current-buffer (process-buffer process)
-          (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")
-        (progn
-          (setq ivy--all-candidates '("Error"))
-          (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
-                nil nil
-                shell-command-switch
-                (format "%s %s"
-                        (if (eq system-type 'darwin)
-                                    "open"
-                                  "xdg-open")
-                        (shell-quote-argument x))))
-
-(declare-function dired-jump "dired-x")
-(defun counsel-locate-action-dired (x)
-  "Use `dired-jump' on X."
-  (dired-jump nil x))
-
-(defvar counsel-locate-history nil
-  "History for `counsel-locate'.")
-
-(defcustom counsel-locate-options (if (eq system-type 'darwin)
-                                      '("-i")
-                                    '("-i" "--regex"))
-  "Command line options for `locate`."
-  :group 'ivy
-  :type  '(repeat string))
-
-(ivy-set-actions
- 'counsel-locate
- '(("x" counsel-locate-action-extern "xdg-open")
-   ("d" counsel-locate-action-dired "dired")))
-
-(defun counsel-unquote-regex-parens (str)
-  (replace-regexp-in-string
-   "\\\\)" ")"
-   (replace-regexp-in-string
-    "\\\\(" "("
-    str)))
-
-(defun counsel-locate-function (str &rest _u)
-  (if (< (length str) 3)
-      (counsel-more-chars 3)
-    (counsel--async-command
-     (format "locate %s '%s'"
-             (mapconcat #'identity counsel-locate-options " ")
-             (counsel-unquote-regex-parens
-              (ivy--regex str))))
-    '("" "working...")))
-
-(defun counsel-delete-process ()
-  (let ((process (get-process " *counsel*")))
-    (when process
-      (delete-process process))))
-
-;;;###autoload
-(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)
-                      (with-ivy-window
-                        (when file
-                          (find-file file))))
-            :unwind #'counsel-delete-process))
-
-(defun counsel--generic (completion-fn)
-  "Complete thing at point with COMPLETION-FN."
-  (let* ((bnd (bounds-of-thing-at-point 'symbol))
-         (str (if bnd
-                  (buffer-substring-no-properties
-                   (car bnd) (cdr bnd))
-                ""))
-         (candidates (funcall completion-fn str))
-         (ivy-height 7)
-         (res (ivy-read (format "pattern (%s): " str)
-                        candidates)))
-    (when (stringp res)
-      (when bnd
-        (delete-region (car bnd) (cdr bnd)))
-      (insert res))))
-
-(defun counsel-directory-parent (dir)
-  "Return the directory parent of directory DIR."
-  (concat (file-name-nondirectory
-           (directory-file-name dir)) "/"))
-
-(defun counsel-string-compose (prefix str)
-  "Make PREFIX the display prefix of STR though text properties."
-  (let ((str (copy-sequence str)))
-    (put-text-property
-     0 1 'display
-     (concat prefix (substring str 0 1))
-     str)
-    str))
-
-;;;###autoload
-(defun counsel-load-library ()
-  "Load a selected the Emacs Lisp library.
-The libraries are offered from `load-path'."
-  (interactive)
-  (let ((dirs load-path)
-        (suffix (concat (regexp-opt '(".el" ".el.gz") t) "\\'"))
-        (cands (make-hash-table :test #'equal))
-        short-name
-        old-val
-        dir-parent
-        res)
-    (dolist (dir dirs)
-      (when (file-directory-p dir)
-        (dolist (file (file-name-all-completions "" dir))
-          (when (string-match suffix file)
-            (unless (string-match "pkg.elc?$" file)
-              (setq short-name (substring file 0 (match-beginning 0)))
-              (if (setq old-val (gethash short-name cands))
-                  (progn
-                    ;; assume going up directory once will resolve name clash
-                    (setq dir-parent (counsel-directory-parent (cdr old-val)))
-                    (puthash short-name
-                             (cons
-                              (counsel-string-compose dir-parent (car old-val))
-                              (cdr old-val))
-                             cands)
-                    (setq dir-parent (counsel-directory-parent dir))
-                    (puthash (concat dir-parent short-name)
-                             (cons
-                              (propertize
-                               (counsel-string-compose
-                                dir-parent short-name)
-                               'full-name (expand-file-name file dir))
-                              dir)
-                             cands))
-                (puthash short-name
-                         (cons (propertize
-                                short-name
-                                'full-name (expand-file-name file dir))
-                               dir) cands)))))))
-    (maphash (lambda (_k v) (push (car v) res)) cands)
-    (ivy-read "Load library: " (nreverse res)
-              :action (lambda (x)
-                        (load-library
-                         (get-text-property 0 'full-name x)))
-              :keymap counsel-describe-map)))
-
-(defvar counsel-gg-state nil
-  "The current state of candidates / count sync.")
-
-(defun counsel--gg-candidates (regex)
-  "Return git grep candidates for REGEX."
-  (setq counsel-gg-state -2)
-  (counsel--gg-count regex)
-  (let* ((default-directory counsel--git-grep-dir)
-         (counsel-gg-process " *counsel-gg*")
-         (proc (get-process counsel-gg-process))
-         (buff (get-buffer counsel-gg-process)))
-    (when proc
-      (delete-process proc))
-    (when buff
-      (kill-buffer buff))
-    (setq proc (start-process-shell-command
-                counsel-gg-process
-                counsel-gg-process
-                (concat
-                 (format counsel-git-grep-cmd regex)
-                 " | head -n 200")))
-    (set-process-sentinel
-     proc
-     #'counsel--gg-sentinel)))
-
-(defun counsel--gg-sentinel (process event)
-  (if (string= event "finished\n")
-      (progn
-        (with-current-buffer (process-buffer process)
-          (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)))
-    (if (string= event "exited abnormally with code 1\n")
-        (progn
-          (setq ivy--all-candidates '("Error"))
-          (setq ivy--old-cands ivy--all-candidates)
-          (ivy--exhibit)))))
-
-(defun counsel--gg-count (regex &optional no-async)
-  "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
-         (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))
-      (let ((proc (get-process counsel-ggc-process))
-            (buff (get-buffer counsel-ggc-process)))
-        (when proc
-          (delete-process proc))
-        (when buff
-          (kill-buffer buff))
-        (setq proc (start-process-shell-command
-                    counsel-ggc-process
-                    counsel-ggc-process
-                    cmd))
-        (set-process-sentinel
-         proc
-         #'(lambda (process event)
-             (when (string= event "finished\n")
-               (with-current-buffer (process-buffer process)
-                 (setq ivy--full-length (string-to-number (buffer-string))))
-               (when (= 0 (cl-incf counsel-gg-state))
-                 (ivy--exhibit)))))))))
-
-(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)
-        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)
-(declare-function smex-initialize "ext:smex")
-(declare-function smex-detect-new-commands "ext:smex")
-(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'.
-Optional INITIAL-INPUT is the initial input in the minibuffer."
-  (interactive)
-  (unless initial-input
-    (setq initial-input (cdr (assoc this-command
-                                    ivy-initial-inputs-alist))))
-  (let* ((store ivy-format-function)
-         (ivy-format-function
-          (lambda (cand-pairs)
-            (funcall
-             store
-             (with-ivy-window
-               (mapcar #'counsel--M-x-transformer cand-pairs)))))
-         (cands obarray)
-         (pred 'commandp)
-         (sort t))
-    (when (require 'smex nil 'noerror)
-      (unless smex-initialized-p
-        (smex-initialize))
-      (smex-detect-new-commands)
-      (smex-update)
-      (setq cands smex-ido-cache)
-      (setq pred nil)
-      (setq sort nil))
-    (ivy-read (counsel--M-x-prompt) cands
-              :predicate pred
-              :require-match t
-              :history 'extended-command-history
-              :action
-              (lambda (cmd)
-                (when (featurep 'smex)
-                  (smex-rank (intern cmd)))
-                (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
-              :caller 'counsel-M-x)))
-
-(declare-function powerline-reset "ext:powerline")
-
-(defun counsel--load-theme-action (x)
-  "Disable current themes and load theme X."
-  (condition-case nil
-      (progn
-        (mapc #'disable-theme custom-enabled-themes)
-        (load-theme (intern x))
-        (when (fboundp 'powerline-reset)
-          (powerline-reset)))
-    (error "Problem loading theme %s" x)))
-
-;;;###autoload
-(defun counsel-load-theme ()
-  "Forward to `load-theme'.
-Usable with `ivy-resume', `ivy-next-line-and-call' and
-`ivy-previous-line-and-call'."
-  (interactive)
-  (ivy-read "Load custom theme: "
-            (mapcar 'symbol-name
-                    (custom-available-themes))
-            :action #'counsel--load-theme-action))
-
-(defvar rhythmbox-library)
-(declare-function rhythmbox-load-library "ext:helm-rhythmbox")
-(declare-function dbus-call-method "dbus")
-(declare-function rhythmbox-song-uri "ext:helm-rhythmbox")
-(declare-function helm-rhythmbox-candidates "ext:helm-rhythmbox")
-
-(defun counsel-rhythmbox-enqueue-song (song)
-  "Let Rhythmbox enqueue SONG."
-  (let ((service "org.gnome.Rhythmbox3")
-        (path "/org/gnome/Rhythmbox3/PlayQueue")
-        (interface "org.gnome.Rhythmbox3.PlayQueue"))
-    (dbus-call-method :session service path interface
-                      "AddToQueue" (rhythmbox-song-uri song))))
-
-(defvar counsel-rhythmbox-history nil
-  "History for `counsel-rhythmbox'.")
-
-;;;###autoload
-(defun counsel-rhythmbox ()
-  "Choose a song from the Rhythmbox library to play or enqueue."
-  (interactive)
-  (unless (require 'helm-rhythmbox nil t)
-    (error "Please install `helm-rhythmbox'"))
-  (unless rhythmbox-library
-    (rhythmbox-load-library)
-    (while (null rhythmbox-library)
-      (sit-for 0.1)))
-  (ivy-read "Rhythmbox: "
-            (helm-rhythmbox-candidates)
-            :history 'counsel-rhythmbox-history
-            :action
-            '(1
-              ("p" helm-rhythmbox-play-song "Play song")
-              ("e" counsel-rhythmbox-enqueue-song "Enqueue song"))
-            :caller 'counsel-rhythmbox))
-
-(defvar counsel-org-tags nil
-  "Store the current list of tags.")
-
-(defvar org-outline-regexp)
-(defvar org-indent-mode)
-(defvar org-indent-indentation-per-level)
-(defvar org-tags-column)
-(declare-function org-get-tags-string "org")
-(declare-function org-move-to-column "org-compat")
-
-(defun counsel-org-change-tags (tags)
-  (let ((current (org-get-tags-string))
-        (col (current-column))
-        level)
-    ;; Insert new tags at the correct column
-    (beginning-of-line 1)
-    (setq level (or (and (looking-at org-outline-regexp)
-                         (- (match-end 0) (point) 1))
-                    1))
-    (cond
-      ((and (equal current "") (equal tags "")))
-      ((re-search-forward
-        (concat "\\([ \t]*" (regexp-quote current) "\\)[ \t]*$")
-        (point-at-eol) t)
-       (if (equal tags "")
-           (delete-region
-            (match-beginning 0)
-            (match-end 0))
-         (goto-char (match-beginning 0))
-         (let* ((c0 (current-column))
-                ;; compute offset for the case of org-indent-mode active
-                (di (if (bound-and-true-p org-indent-mode)
-                        (* (1- org-indent-indentation-per-level) (1- level))
-                      0))
-                (p0 (if (equal (char-before) ?*) (1+ (point)) (point)))
-                (tc (+ org-tags-column (if (> org-tags-column 0) (- di) di)))
-                (c1 (max (1+ c0) (if (> tc 0) tc (- (- tc) (string-width 
tags)))))
-                (rpl (concat (make-string (max 0 (- c1 c0)) ?\ ) tags)))
-           (replace-match rpl t t)
-           (and c0 indent-tabs-mode (tabify p0 (point)))
-           tags)))
-      (t (error "Tags alignment failed")))
-    (org-move-to-column col)))
-
-(defun counsel-org--set-tags ()
-  (counsel-org-change-tags
-   (if counsel-org-tags
-       (format ":%s:"
-               (mapconcat #'identity counsel-org-tags ":"))
-     "")))
-
-(defvar org-agenda-bulk-marked-entries)
-
-(declare-function org-get-at-bol "org")
-(declare-function org-agenda-error "org-agenda")
-
-(defun counsel-org-tag-action (x)
-  (if (member x counsel-org-tags)
-      (progn
-        (setq counsel-org-tags (delete x counsel-org-tags)))
-    (unless (equal x "")
-      (setq counsel-org-tags (append counsel-org-tags (list x)))
-      (unless (member x ivy--all-candidates)
-        (setq ivy--all-candidates (append ivy--all-candidates (list x))))))
-  (let ((prompt (counsel-org-tag-prompt)))
-    (setf (ivy-state-prompt ivy-last) prompt)
-    (setq ivy--prompt (concat "%-4d " prompt)))
-  (cond ((memq this-command '(ivy-done
-                              ivy-alt-done
-                              ivy-immediate-done))
-         (if (eq major-mode 'org-agenda-mode)
-             (if (null org-agenda-bulk-marked-entries)
-                 (let ((hdmarker (or (org-get-at-bol 'org-hd-marker)
-                                     (org-agenda-error))))
-                   (with-current-buffer (marker-buffer hdmarker)
-                     (goto-char hdmarker)
-                     (counsel-org--set-tags)))
-               (let ((add-tags (copy-sequence counsel-org-tags)))
-                 (dolist (m org-agenda-bulk-marked-entries)
-                   (with-current-buffer (marker-buffer m)
-                     (save-excursion
-                       (goto-char m)
-                       (setq counsel-org-tags
-                             (delete-dups
-                              (append (split-string (org-get-tags-string) ":" 
t)
-                                      add-tags)))
-                       (counsel-org--set-tags))))))
-           (counsel-org--set-tags)))
-        ((eq this-command 'ivy-call)
-         (delete-minibuffer-contents))))
-
-(defun counsel-org-tag-prompt ()
-  (format "Tags (%s): "
-          (mapconcat #'identity counsel-org-tags ", ")))
-
-(defvar org-setting-tags)
-(defvar org-last-tags-completion-table)
-(defvar org-tag-persistent-alist)
-(defvar org-tag-alist)
-(defvar org-complete-tags-always-offer-all-agenda-tags)
-
-(declare-function org-at-heading-p "org")
-(declare-function org-back-to-heading "org")
-(declare-function org-get-buffer-tags "org")
-(declare-function org-global-tags-completion-table "org")
-(declare-function org-agenda-files "org")
-(declare-function org-agenda-set-tags "org-agenda")
-
-;;;###autoload
-(defun counsel-org-tag ()
-  "Add or remove tags in org-mode."
-  (interactive)
-  (save-excursion
-    (if (eq major-mode 'org-agenda-mode)
-        (if org-agenda-bulk-marked-entries
-            (setq counsel-org-tags nil)
-          (let ((hdmarker (or (org-get-at-bol 'org-hd-marker)
-                              (org-agenda-error))))
-            (with-current-buffer (marker-buffer hdmarker)
-              (goto-char hdmarker)
-              (setq counsel-org-tags
-                    (split-string (org-get-tags-string) ":" t)))))
-      (unless (org-at-heading-p)
-        (org-back-to-heading t))
-      (setq counsel-org-tags (split-string (org-get-tags-string) ":" t)))
-    (let ((org-setting-tags t)
-          (org-last-tags-completion-table
-           (append org-tag-persistent-alist
-                   (or org-tag-alist (org-get-buffer-tags))
-                   (and
-                    (or org-complete-tags-always-offer-all-agenda-tags
-                        (eq major-mode 'org-agenda-mode))
-                    (org-global-tags-completion-table
-                     (org-agenda-files))))))
-      (ivy-read (counsel-org-tag-prompt)
-                (lambda (str &rest _unused)
-                  (delete-dups
-                   (all-completions str 'org-tags-completion-function)))
-                :history 'org-tags-history
-                :action 'counsel-org-tag-action))))
-
-;;;###autoload
-(defun counsel-org-tag-agenda ()
-  "Set tags for the current agenda item."
-  (interactive)
-  (let ((store (symbol-function 'org-set-tags)))
-    (unwind-protect
-         (progn
-           (fset 'org-set-tags
-                 (symbol-function 'counsel-org-tag))
-           (org-agenda-set-tags nil nil))
-      (fset 'org-set-tags store))))
-
-(defun counsel-ag-function (string &optional _pred &rest _unused)
-  "Grep in the current directory for STRING."
-  (if (< (length string) 3)
-      (counsel-more-chars 3)
-    (let ((default-directory counsel--git-grep-dir)
-          (regex (counsel-unquote-regex-parens
-                  (setq ivy--old-re
-                        (ivy--regex string)))))
-      (counsel--async-command
-       (format "ag --vimgrep %S" regex))
-      nil)))
-
-;;;###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 (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 (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."
-  (if (< (length string) 3)
-      (counsel-more-chars 3)
-    (counsel--async-command
-     (format "recoll -t -b '%s'" string))
-    nil))
-
-;; This command uses the recollq command line tool that comes together
-;; with the recoll (the document indexing database) source:
-;;     http://www.lesbonscomptes.com/recoll/download.html
-;; You need to build it yourself (together with recoll):
-;;     cd ./query && make && sudo cp recollq /usr/local/bin
-;; You can try the GUI version of recoll with:
-;;     sudo apt-get install recoll
-;; Unfortunately, that does not install recollq.
-(defun counsel-recoll (&optional initial-input)
-  "Search for a string in the recoll database.
-You'll be given a list of files that match.
-Selecting a file will launch `swiper' for that file.
-INITIAL-INPUT can be given as the initial minibuffer input."
-  (interactive)
-  (ivy-read "recoll: " 'counsel-recoll-function
-            :initial-input initial-input
-            :dynamic-collection t
-            :history 'counsel-git-grep-history
-            :action (lambda (x)
-                      (when (string-match "file://\\(.*\\)\\'" x)
-                        (let ((file-name (match-string 1 x)))
-                          (find-file file-name)
-                          (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)
-
-;;;###autoload
-(defun counsel-yank-pop ()
-  "Ivy replacement for `yank-pop'."
-  (interactive)
-  (if (eq last-command 'yank)
-      (progn
-        (setq counsel-completion-end (point))
-        (setq counsel-completion-beg
-              (save-excursion
-                (search-backward (car kill-ring))
-                (point))))
-    (setq counsel-completion-beg (point))
-    (setq counsel-completion-end (point)))
-  (let ((candidates (cl-remove-if
-                     (lambda (s)
-                       (or (< (length s) 3)
-                           (string-match "\\`[\n[:blank:]]+\\'" s)))
-                     (delete-dups kill-ring))))
-    (when counsel-yank-pop-truncate
-      (setq candidates
-            (mapcar (lambda (s)
-                      (if (string-match "\\`\\(.*\n.*\n.*\n.*\\)\n" s)
-                          (progn
-                            (let ((s (copy-sequence s)))
-                              (put-text-property
-                               (match-end 1)
-                               (length s)
-                               'display
-                               " [...]"
-                               s)
-                              s))
-                        s))
-                    candidates)))
-    (ivy-read "kill-ring: " candidates
-              :action 'counsel-yank-pop-action)))
-
-(defun counsel-yank-pop-action (s)
-  "Insert S into the buffer, overwriting the previous yank."
-  (with-ivy-window
-    (delete-region counsel-completion-beg
-                   counsel-completion-end)
-    (insert (substring-no-properties s))
-    (setq counsel-completion-end (point))))
-
-(provide 'counsel)
-
-;;; counsel.el ends here
diff --git a/packages/swiper/doc/ivy.org b/packages/swiper/doc/ivy.org
deleted file mode 100644
index b26b00e..0000000
--- a/packages/swiper/doc/ivy.org
+++ /dev/null
@@ -1,476 +0,0 @@
-#+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
deleted file mode 100644
index b06c68c..0000000
--- a/packages/swiper/doc/ivy.texi
+++ /dev/null
@@ -1,591 +0,0 @@
-\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
deleted file mode 100644
index 547b4f0..0000000
--- a/packages/swiper/doc/style.css
+++ /dev/null
@@ -1,107 +0,0 @@
-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/systemd/systemctl.el b/packages/systemd/systemctl.el
new file mode 100644
index 0000000..b4f21e5
--- /dev/null
+++ b/packages/systemd/systemctl.el
@@ -0,0 +1,317 @@
+;;; systemctl.el --- Emacs interface to Systemd     -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2016  Free Software Foundation, Inc.
+
+;; Author: Mario Lang <address@hidden>
+;; 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:
+
+;; This library provides a front end to Systemd.
+;;
+;; Use `M-x systemctl-list-units RET' to see a list of all known
+;; Systemd units and their status on localhost.  With a prefix
+;; argument (`C-u M-x systemctl-list-units RET') you will be prompted
+;; for a remote host to connect to.
+;;
+;; In systemctl-list-units-mode, `RET' will visit all relevant
+;; configuration fragments for the unit at point (the equivalent of
+;; "systemctl cat some.service").  With a `C-u' prefix argument, it
+;; will prompt for a new override.conf file to create (somewhat
+;; equivalent to "systemctl edit some.service").  Contrary to the
+;; command-line "systemctl" tool, systemctl.el allows viewing and
+;; editing of remote unit files thanks to TRAMP.
+;;
+;; Key bindings `s t a r t' and `s t o p' can be used to start and stop
+;; services.  Similarily, `e n a b l e' and `d i s a b l e' can be used to
+;; permanently enable and disable unit files.
+
+;;; Granting access to non-root users:
+
+;; Some operations are obviously not allowed when executed from within a
+;; non-root Emacs session.  If you want to explicitly grant access to certain
+;; users, you can create a polkit localauthority configuration file.
+;; Below is an example.  You might want to change the group name, or use
+;; "unix-user" instead.
+;;
+;; /etc/polkit-1/localauthority/50-local.d/10-systemd.pkla:
+;;
+;; [Normal Staff Permissions]
+;; Identity=unix-group:sudo
+;; Action=org.freedesktop.systemd1.*
+;; ResultAny=no
+;; ResultInactive=no
+;; ResultActive=yes
+
+;;; Todo:
+
+;; * Have someone with window/frame-fu see if there is a better way to
+;;   visit N files in a frame, each in a separate window.  The current approach
+;;   feels a bit crude, see `systemctl-edit-unit-files'.
+;; * Optionally automatically reload the Systemd daemon when a unit buffer is
+;;   saved.
+;; * Detect if we are not root, and use the sudo method to edit
+;;   system files on localhost.
+;; * Add support for local and remote systemd user sessions.
+;; * Figure out what's necessary to support local and remote containers.
+;; * Menu entries for `systemctl-list-units-mode'.
+
+;;; Code:
+
+(require 'systemd)
+(require 'tabulated-list)
+(require 'tramp)
+
+(defgroup systemctl nil
+  "Interface to Systemd.")
+
+(defcustom systemctl-default-override-file-name "override.conf"
+  "Default file name for new override.conf files."
+  :group 'systemctl
+  :type 'string)
+
+(defcustom systemctl-list-units-format
+  (vector (list "Unit" 22 t)
+          (list "Loaded" 9 t)
+          (list "Active" 8 t)
+          (list "State" 8 t)
+          (list "Description" 50 nil))
+  "Column format specification for the `systemctl-list-units' command."
+  :group 'systemctl
+  :type '(vector (list :tag "Unit"
+                       (string :tag "Title")
+                       (number :tag "Width")
+                       (boolean :tag "Sortable"))
+                 (list :tag "Loaded"
+                       (string :tag "Title")
+                       (number :tag "Width")
+                       (boolean :tag "Sortable"))
+                 (list :tag "Active"
+                       (string :tag "Title")
+                       (number :tag "Width")
+                       (boolean :tag "Sortable"))
+                 (list :tag "State"
+                       (string :tag "Title")
+                       (number :tag "Width")
+                       (boolean :tag "Sortable"))
+                 (list :tag "Description"
+                       (string :tag "Title")
+                       (number :tag "Width")
+                       (boolean :tag "Sortable"))))
+
+(defcustom systemctl-tramp-method "scpx"
+  "The TRAMP method to use when remotely accessing Systemd Unit files."
+  :group 'systemctl
+  :type (cons 'choice
+             (mapcar (lambda (method)
+                       (list 'const (car method)))
+                     tramp-methods)))
+
+(defvar-local systemctl-bus :system
+  "Default D-Bus bus to use when accessing Systemd.
+You should use the function `systemctl-bus' to retrieve the value of this
+variable to make sure the bus is properly initialized in case it is pointing
+to a remote machine.")
+
+(defvar systemctl-list-units-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\C-m" #'systemctl-edit-unit-files)
+    (define-key map "f" #'systemctl-find-fragment)
+    (define-key map "start" #'systemctl-start)
+    (define-key map "stop"  #'systemctl-stop)
+    (define-key map "enable" #'systemctl-enable)
+    (define-key map "disable" #'systemctl-disable)
+    map)
+  "Keymap for `systemctl-list-units-mode'.")
+
+(defun systemctl-bus ()
+  (when (stringp systemctl-bus)
+    (dbus-init-bus systemctl-bus))
+  systemctl-bus)
+      
+(defun systemctl-list-units-entries ()
+  "Retrieve a list of units known to Systemd.
+See `systemctl-list-units-format' and `tabulated-list-entries'."
+  (mapcar (lambda (desc)
+            (list (nth 6 desc)
+                  (vector (nth 0 desc)
+                          (nth 2 desc)
+                          (nth 3 desc)
+                          (nth 4 desc)
+                          (nth 1 desc))))
+          (systemd-ListUnits (systemctl-bus))))
+
+(defun systemctl-unescape-unit-name (string)
+  (while (string-match "\\\\x\\([0-9a-f]\\{2\\}\\)" string)
+    (setq string
+          (replace-match (string (string-to-number (match-string 1 string) 16))
+                         t t string)))
+  string)
+
+(defun systemctl-list-units-print-entry (id cols)
+  "Insert a Systemd Units List entry at point.
+See `tabulated-list-printer'."
+  (let ((beg (point))
+        (x (max tabulated-list-padding 0))
+        (inhibit-read-only t))
+    (when (> x 0) (insert (make-string x ?\s)))
+    (dotimes (n (length tabulated-list-format))
+      (let ((desc (aref cols n)))
+        (when (= n 0)
+          (setq desc (systemctl-unescape-unit-name desc)))
+        (setq x (tabulated-list-print-col n desc x))))
+    (insert ?\n)
+    (put-text-property beg (point) 'tabulated-list-id id)
+    (put-text-property beg (point) 'tabulated-list-entry cols)))
+
+(define-derived-mode systemctl-list-units-mode tabulated-list-mode
+  "Systemd-Units"
+  "Major mode for displaying a list of Systemd Units."
+  (setq tabulated-list-entries #'systemctl-list-units-entries
+        tabulated-list-format    systemctl-list-units-format
+        tabulated-list-printer #'systemctl-list-units-print-entry)
+  (tabulated-list-init-header))
+  
+;;;###autoload
+(defun systemctl-list-units (&optional host)
+  "Display a list of all Systemd Units."
+  (interactive
+   (list (when (equal current-prefix-arg '(4))
+           (read-string "Remote host: "))))
+  
+  (with-current-buffer (let ((buffer-name (if host
+                                             (format "*Systemd Units (%s)*"
+                                                     host)
+                                           "*Systemd Units*")))
+                        (get-buffer-create buffer-name))
+    (systemctl-list-units-mode)
+    (when host
+      (setq systemctl-bus (systemd-remote-bus host)
+           default-directory (systemctl-file-name "/etc/systemd/")))
+    (tabulated-list-print)
+    (pop-to-buffer (current-buffer))))
+
+(defun systemctl-list-units-get-unit ()
+  (when (eq major-mode 'systemctl-list-units-mode)
+    (let ((entry (tabulated-list-get-entry)))
+      (when entry
+       (aref entry 0)))))
+
+(defun systemctl-start (unit)
+  "Start Systemd UNIT."
+  (interactive (list (or (systemctl-list-units-get-unit)
+                         (read-string "Unit: "))))
+  (systemd-StartUnit (systemctl-bus) unit "replace")
+  (when (eq major-mode 'systemctl-list-units-mode)
+    (tabulated-list-revert)))
+
+(defun systemctl-stop (unit)
+  (interactive (list (or (systemctl-list-units-get-unit)
+                         (read-string "Unit: "))))
+  (systemd-StopUnit (systemctl-bus) unit "replace")
+  (when (eq major-mode 'systemctl-list-units-mode)
+    (tabulated-list-revert)))
+
+(defun systemctl-enable (unit)
+  "Enable Systemd UNIT."
+  (interactive (list (or (systemctl-list-units-get-unit)
+                         (read-string "Unit: "))))
+  (pcase (systemd-EnableUnitFiles (systemctl-bus) (list unit) nil nil)
+    (`(,carries-install-info ,changes)
+     (if changes
+        (pcase-dolist (`(,type ,from ,to) changes)
+          (message "%s %s -> %s" type from to))
+       (message "No changes")))))
+
+(defun systemctl-disable (unit)
+  "Disable Systemd UNIT."
+  (interactive (list (or (systemctl-list-units-get-unit)
+                         (read-string "Unit: "))))
+  (let ((changes (systemd-DisableUnitFiles (systemctl-bus) (list unit) nil)))
+    (if changes
+       (pcase-dolist (`(,type ,from ,to) changes)
+         (message "%s %s -> %s" type from to))
+      (message "No changes"))))
+
+(defun systemctl-reload ()
+  "Reload all unit files."
+  (interactive)
+  (systemd-Reload (systemctl-bus)))
+
+(defun systemctl-file-name (file-name)
+  (if (and (stringp systemctl-bus)
+          (string-match "unixexec:path=ssh,.*argv2=\\([^,]*\\),"
+                        systemctl-bus))
+      (let ((host (systemd-unescape-dbus-address
+                  (match-string 1 systemctl-bus))))
+       (concat "/" systemctl-tramp-method ":" host ":" file-name))
+    file-name))
+
+(defun systemctl-find-fragment (unit)
+  (interactive
+   (list (or (and (eq major-mode 'systemctl-list-units-mode)
+                 (tabulated-list-get-id))
+            (systemd-GetUnit (systemctl-bus) (read-string "Unit: ")))))
+  (let ((fragment-path (systemd-unit-FragmentPath (systemctl-bus) unit)))
+    (when fragment-path
+      (find-file (systemctl-file-name fragment-path)))))
+
+(defun systemctl-edit-unit-files (unit &optional override-file)
+  "Visit all configuration files related to UNIT simultaneously.
+If optional OVERRIDE-FILE is specified, or if a prefix argument has been
+given interactively, open a (new) override file."
+  (interactive
+   (let* ((unit (if (tabulated-list-get-entry)
+                   (systemctl-unescape-unit-name (aref 
(tabulated-list-get-entry) 0))
+                 (read-string "Unit: ")))
+         (unit-path (or (tabulated-list-get-id)
+                        (systemd-GetUnit (systemctl-bus) unit)))
+         (override-file
+          (when (equal current-prefix-arg '(4))
+            (read-file-name "Override file: "
+                            (systemctl-file-name
+                             (concat "/etc/systemd/system/" unit ".d/"))
+                            nil nil
+                            systemctl-default-override-file-name))))
+     (list unit-path override-file)))
+  (let ((files (mapcar #'systemctl-file-name
+                      (systemd-unit-DropInPaths (systemctl-bus) unit))))
+    (when override-file
+      (push override-file files))
+    (let ((path (systemd-unit-FragmentPath (systemctl-bus) unit)))
+      (when (not (string= path ""))
+       (setq files (nconc files
+                          (list (systemctl-file-name path))))))
+    (let ((path (systemd-unit-SourcePath (systemctl-bus) unit)))
+      (when (not (string= path ""))
+       (setq files (nconc files
+                          (list (systemctl-file-name path))))))
+    (if files
+       (let ((buffers (mapcar #'find-file-noselect files)))
+         (pop-to-buffer (pop buffers))
+         (when buffers
+           (delete-other-windows)
+           (dolist (buffer buffers)
+             (let ((window (split-window (car (last (window-list))))))
+               (shrink-window-if-larger-than-buffer)
+               (set-window-buffer window buffer)))
+           (dolist (window (window-list))
+             (shrink-window-if-larger-than-buffer window))))
+      (when (called-interactively-p 'interactive)
+       (message "No configuration files associated with `%s'." unit)))))
+
+(provide 'systemctl)
+;;; systemctl.el ends here
diff --git a/packages/systemd/systemd-codegen.el 
b/packages/systemd/systemd-codegen.el
new file mode 100644
index 0000000..2fe1160
--- /dev/null
+++ b/packages/systemd/systemd-codegen.el
@@ -0,0 +1,258 @@
+;;; systemd-codegen.el --- D-Bus Introspection      -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2016  Free Software Foundation, Inc.
+
+;; Author: Mario Lang <address@hidden>
+;; 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:
+
+;; This library is used to automatically generate D-Bus bindings for systemd
+;; and related components via introspection.
+;;
+;; The macro `systemd-codegen-define' can be used to generate Lisp code 
according
+;; to the currently available introspection data.  This can be useful for
+;; development.
+;;
+;; To avoid a dependency on systemd at compile time, 
`systemd-codegen-to-string'
+;; is provided to statically generate all the Lisp code for the currently 
running
+;; version of systemd.
+;;
+;; `systemd-codegen-to-string' is used to generate the bulk of the content of
+;; systemd.el.
+
+;;; Code:
+
+(require 'cl-lib)
+(require 'dbus)
+
+(defvar systemd-codegen-interfaces
+  '(("org.freedesktop.systemd1.Manager"
+     :prefix "systemd"
+     :interface systemd-dbus-interface-manager)
+    ("org.freedesktop.systemd1.Automount"
+     :prefix "systemd-automount"
+     :interface systemd-dbus-interface-automount)
+    ("org.freedesktop.systemd1.BusName"
+     :prefix "systemd-bus-name"
+     :interface systemd-dbus-interface-bus-name)
+    ("org.freedesktop.systemd1.Device"
+     :prefix "systemd-device"
+     :interface systemd-dbus-interface-device)
+    ("org.freedesktop.systemd1.Mount"
+     :prefix "systemd-mount"
+     :interface systemd-dbus-interface-mount)
+    ("org.freedesktop.systemd1.Path"
+     :prefix "systemd-path"
+     :interface systemd-dbus-interface-path)
+    ("org.freedesktop.systemd1.Service"
+     :prefix "systemd-service"
+     :interface systemd-dbus-interface-service)
+    ("org.freedesktop.systemd1.Scope"
+     :prefix "systemd-scope"
+     :interface systemd-dbus-interface-scope)
+    ("org.freedesktop.systemd1.Slice"
+     :prefix "systemd-slice"
+     :interface systemd-dbus-interface-slice)
+    ("org.freedesktop.systemd1.Socket"
+     :prefix "systemd-socket"
+     :interface systemd-dbus-interface-socket)
+    ("org.freedesktop.systemd1.Swap"
+     :prefix "systemd-swap"
+     :interface systemd-dbus-interface-swap)
+    ("org.freedesktop.systemd1.Target"
+     :prefix "systemd-target"
+     :interface systemd-dbus-interface-target)
+    ("org.freedesktop.systemd1.Timer"
+     :prefix "systemd-timer"
+     :interface systemd-dbus-interface-timer)
+    ("org.freedesktop.systemd1.Unit"
+     :prefix "systemd-unit"
+     :interface systemd-dbus-interface-unit)
+    ("org.freedesktop.login1.Manager"
+     :prefix "systemd-logind"
+     :interface systemd-dbus-interface-logind-mamanger)
+    ("org.freedesktop.login1.Seat"
+     :prefix "systemd-logind-seat"
+     :interface systemd-dbus-interface-logind-seat)
+    ("org.freedesktop.login1.Session"
+     :prefix "systemd-logind-session"
+     :interface systemd-dbus-interface-logind-session)
+    ("org.freedesktop.login1.User"
+     :prefix "systemd-logind-user"
+     :interface systemd-dbus-interface-logind-user)
+    ("org.freedesktop.network1.Manager"
+     :prefix "systemd-networkd"
+     :interface systemd-dbus-interface-networkd-manager)
+    ("org.freedesktop.network1.Link"
+     :prefix "systemd-networkd-link"
+     :interface systemd-dbus-interface-networkd-link)
+    ("org.freedesktop.network1.Network"
+     :prefix "systemd-networkd-network"
+     :interface systemd-dbus-interface-networkd-network)
+    ("org.freedesktop.resolve1.Manager"
+     :prefix "systemd-resolved"
+     :interface systemd-dbus-interface-resolved-manager)
+    ("org.freedesktop.resolve1.Link"
+     :prefix "systemd-resolved-link"
+     :interface systemd-dbus-interface-resolved-link)
+    ("org.freedesktop.hostname1"
+     :prefix "systemd-hostnamed"
+     :interface systemd-dbus-interface-hostnamed)
+    ("org.freedesktop.locale1"
+     :prefix "systemd-localed"
+     :interface systemd-dbus-interface-localed)
+    ("org.freedesktop.timedate1"
+     :prefix "systemd-timedated"
+     :interface systemd-dbus-interface-timedated)
+    ("org.freedesktop.machine1.Manager"
+     :prefix "systemd-machined"
+     :interface systemd-dbus-interface-machined-mananger)
+    ("org.freedesktop.machine1.Image"
+     :prefix "systemd-machined-image"
+     :interface systemd-dbus-interface-machined-image)
+    ("org.freedesktop.machine1.Machine"
+     :prefix "systemd-machined-machine"
+     :interface systemd-dbus-interface-machined-machine)))
+
+(defun systemd-codegen-introspect (service path &optional interfaces)
+  (let ((xml (dbus-introspect-xml :system service path)))
+    (dolist (item
+            (and (eq (car-safe xml) 'node)
+                 (xml-node-children xml))
+            (sort interfaces (lambda (a b) (string-lessp (car a) (car b)))))
+      (cond
+       ((and (listp item) (eq 'interface (car-safe item)))
+       (let* ((interface (xml-get-attribute-or-nil item 'name))
+              (interface-info (cdr (assoc interface 
systemd-codegen-interfaces)))
+              (prefix (plist-get interface-info :prefix))
+              (object-interface (not (string-match "\\(\\.Manager\\|1\\)$" 
interface)))
+              (service (pcase service
+                         ("org.freedesktop.systemd1" 'systemd-dbus-service)
+                         (_ service)))
+              (path (pcase path
+                      ("/org/freedesktop/systemd1" 'systemd-dbus-path)
+                      (_ path)))
+              forms)
+         (when (and prefix (not (assoc interface interfaces)))
+           (push `(defconst ,(plist-get interface-info :interface) ,interface) 
forms)
+           (setq
+            interfaces
+            (append
+             interfaces
+             (list
+              (cons
+               interface
+               (let ((interface (plist-get interface-info :interface)))
+                 (dolist (interface-item (cddr item) (nreverse forms))
+                   (cond
+                    ((eq 'property (car-safe interface-item))
+                     (let* ((property (xml-get-attribute interface-item 'name))
+                            (name (intern (concat prefix "-" property)))
+                            (readwrite
+                             (string-equal
+                              "readwrite"
+                              (xml-get-attribute interface-item 'access)))
+                            (arglist `(bus
+                                       ,@(when object-interface
+                                           '(path)))))
+                       (push `(defun ,name ,arglist
+                                ,(if readwrite
+                                     "Use `setf' to set the value of this 
property."
+                                   "Read only property.")
+                                (dbus-get-property
+                                 bus ,service
+                                 ,(if object-interface 'path path)
+                                 ,interface ,property))
+                             forms)
+                       (when readwrite
+                         (push (list 'gv-define-setter name (cons 'value 
arglist)
+                                     (list '\`
+                                           (list 'dbus-set-property
+                                                 '(\, bus)
+                                                 service
+                                                 (if object-interface
+                                                     '(\, path)
+                                                   path)
+                                                 interface property
+                                                 '(\, value))))
+                               forms))))
+
+                    ((eq 'method (car-safe interface-item))
+                     (let* ((method (xml-get-attribute interface-item 'name))
+                            (name (intern (concat prefix "-" method)))
+                            (args (cl-remove-if-not
+                                   (lambda (arg)
+                                     (string= "in"
+                                              (xml-get-attribute
+                                               arg 'direction)))
+                                   (xml-get-children interface-item 'arg)))
+                            (arglist `(bus ,@(when object-interface '(path))
+                                           ,@(when args '(&rest args)))))
+                       (push `(defun ,name ,arglist
+                                (,@(if args
+                                       '(apply #'dbus-call-method)
+                                     '(dbus-call-method))
+                                 bus ,service
+                                 ,(if object-interface 'path path)
+                                 ,interface ,method
+                                 ,@(when args '(args))))
+                             forms)))))))))))))
+       ((and (listp item) (eq 'node (xml-node-name item)))
+       (let ((name (xml-get-attribute-or-nil item 'name)))
+         (setq interfaces (systemd-codegen-introspect
+                           service (concat path "/" name) interfaces))))))))
+
+(defmacro systemd-codegen-define (suffix)
+  (cons 'progn (cl-mapcan #'cdr (systemd-codegen-introspect
+                                (concat "org.freedesktop." suffix)
+                                (concat "/org/freedesktop/" suffix)))))
+
+(defun systemd-codegen-to-string (suffix)
+  (with-temp-buffer
+    (pcase-dolist (`(,interface . ,forms)
+                  (systemd-codegen-introspect
+                   (concat "org.freedesktop." suffix)
+                   (concat "/org/freedesktop/" suffix)))
+      (insert ";;; " interface "\n\n")
+      (dolist (form forms)
+       (pp form (current-buffer))
+       (insert "\n")))
+    (delete-char -1)
+    (emacs-lisp-mode)
+    (goto-char (point-min))
+    (while (re-search-forward "^(\\(defun\\|gv-define-setter\\)" nil t)
+      (goto-char (match-beginning 0))
+      (down-list 1) (forward-sexp 2) (delete-char 4) (up-list 1))
+    (goto-char (point-min))
+    (while (re-search-forward "(dbus-\\(get\\|set\\)-property" nil t)
+      (goto-char (match-beginning 0))
+      (down-list 1) (forward-sexp 4) (insert "\n") (up-list -1) (indent-sexp)
+      (up-list 1))
+    (goto-char (point-min))
+    (while (re-search-forward "(apply #'dbus-call-method" nil t)
+      (goto-char (match-beginning 0))
+      (down-list 1) (forward-sexp 5) (insert "\n") (up-list -1) (indent-sexp)
+      (up-list 1))
+    (goto-char (point-min))
+    (while (re-search-forward "(dbus-call-method" nil t)
+      (goto-char (match-beginning 0))
+      (down-list 1) (forward-sexp 4) (insert "\n") (up-list -1) (indent-sexp)
+      (up-list 1))
+    (buffer-string)))
+
+(provide 'systemd-codegen)
+;;; systemd-codegen.el ends here
diff --git a/packages/systemd/systemd-mode.el b/packages/systemd/systemd-mode.el
new file mode 100644
index 0000000..f799661
--- /dev/null
+++ b/packages/systemd/systemd-mode.el
@@ -0,0 +1,200 @@
+;;; systemd-mode.el --- Major modes for systemd unit files  -*- 
lexical-binding: t; -*-
+
+;; Copyright (C) 2016  Free Software Foundation, Inc.
+
+;; Author: Mario Lang <address@hidden>
+;; Keywords: files
+
+;; 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/>.
+
+;;; Todo:
+
+;; * Add support for systemd-networkd .link and .network files.
+
+;;; Code:
+
+(require 'conf-mode)
+
+(defvar systemd-unit-font-lock-keywords
+  '(;; [section]
+    ("^[ \t]*\\[\\(Unit\\|Service\\)\\]"
+     1 'font-lock-type-face)
+    ;; var=val
+    ("^[ \t]*\\(.+?\\)[ \t]*="
+     1 'font-lock-variable-name-face))
+  "Keywords to highlight in Conf mode.")
+
+(defvar-local systemd-unit-mode-sections '("Unit" "Install"))
+
+(defvar systemd-unit-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\t" #'completion-at-point)
+    map))
+
+(define-derived-mode systemd-unit-mode conf-unix-mode "Systemd-Unit"
+  (conf-mode-initialize "#" systemd-unit-font-lock-keywords)
+  (add-hook 'completion-at-point-functions #'systemd-mode-completion-at-point
+           nil t)
+  (setq-local completion-ignore-case t))
+
+;;;###autoload
+(define-derived-mode systemd-automount-mode systemd-unit-mode 
"Systemd-AutoMount"
+  "Major mode for editing systemd .automount unit files"
+  (add-to-list 'systemd-unit-mode-sections "AutoMount"))
+
+;;;###autoload
+(define-derived-mode systemd-mount-mode systemd-unit-mode "Systemd-Mount"
+  "Major mode for editing systemd .mount unit files"
+  (add-to-list 'systemd-unit-mode-sections "Mount"))
+
+;;;###autoload
+(define-derived-mode systemd-path-mode systemd-unit-mode "Systemd-Path"
+  "Major mode for editing systemd .path unit files"
+  (add-to-list 'systemd-unit-mode-sections "Path"))
+
+;;;###autoload
+(define-derived-mode systemd-service-mode systemd-unit-mode "Systemd-Service"
+  "Major mode for editing systemd .service unit files."
+  (add-to-list 'systemd-unit-mode-sections "Service"))
+
+;;;###autoload
+(define-derived-mode systemd-socket-mode systemd-unit-mode "Systemd-Socket"
+  "Major mode for editing systemd .socket unit files."
+  (add-to-list 'systemd-unit-mode-sections "Socket"))
+
+;;;###autoload
+(define-derived-mode systemd-swap-mode systemd-unit-mode "Systemd-Swap"
+  "Major mode for editing systemd .swap unit files."
+  (add-to-list 'systemd-unit-mode-sections "Swap"))
+
+;;;###autoload
+(define-derived-mode systemd-timer-mode systemd-unit-mode "Systemd-Timer"
+  "Major mode for editing systemd .timer unit files."
+  (add-to-list 'systemd-unit-mode-sections "Timer"))
+
+(defvar systemd-mode-section-keywords-alist
+  '(("AutoMount"
+     "Where" "DirectoryMode" "TimeoutIdleSec")
+    ("Device")
+    ("Mount"
+     "What" "Where" "Type" "Options" "SloppyOptions" "DirectoryMode"
+     "TimeoutSec")
+    ("Path"
+     "PathExists" "PathExistsGlob" "PathChanged" "PathModified"
+     "DirectoryNotEmpty" "Unit" "MakeDirectory" "DirectoryMode")
+    ("Service"
+     "Type" "RemainAfterExit" "GuessMainPID" "PIDFile" "BusName"
+     "ExecStart" "ExecStartPre" "ExecStartPost" "ExecReload"
+     "ExecStop" "ExecStopPost" "RestartSec" "TimeoutStartSec"
+     "TimeoutStopSec" "TimeoutSec" "RuntimeMaxSec" "WatchdogSec"
+     "Restart" "SuccessExitStatus" "RestartPreventExitStatus"
+     "RestartForceExitStatus" "PermissionsStartOnly"
+     "RootDirectoryStartOnly" "NonBlocking" "NotifyAccess" "Sockets"
+     "FailureAction" "FileDescriptorStoreMax" "USBFunctionDescriptors"
+     "USBFunctionStrings")
+    ("Slice")
+    ("Socket"
+     "ListenStream" "ListenDatagram" "ListenSequentialPacket"
+     "ListenFIFO" "ListenSpecial" "ListenNetlink" "ListenMessageQueue"
+     "ListenUSBFunction" "SocketProtocol" "BindIPv6Only"
+     "Backlog" "BindToDevice" "SocketUser" "SocketGroup"
+     "SocketMode" "DirectoryMode" "Accept" "Writable" "MaxConnections"
+     "KeepAlive" "KeepAliveTimeSec" "KeepAliveIntervalSec"
+     "KeepAliveProbes" "NoDelay" "Priority" "DeferAcceptSec"
+     "ReceiveBuffer" "SendBuffer" "IPTOS" "IPTTL" "Mark" "ReusePort"
+     "SmackLabel" "SmackLabelIPIn" "SmackLabelIPOut"
+     "SELinuxContextFromNet" "PipeSize" "MessageQueueMaxMessages"
+     "MessageQueueMessageSize" "FreeBind" "Transparent" "Broadcast"
+     "PassCredentials" "PassSecurity" "TCPCongestion" "ExecStartPre"
+     "ExecStartPost" "ExecStopPre" "ExecStopPost" "TimeoutSec"
+     "Service" "RemoveOnStop" "Symlinks" "FileDescriptorName"
+     "TriggerLimitIntervalSec" "TriggerLimitBurst")
+    ("Swap"
+     "What" "Priority" "Options" "TimeoutSec")
+    ("Target")
+    ("Timer"
+     "OnActiveSec" "OnBootSec" "OnStartupSec" "OnUnitActiveSec"
+     "OnUnitInactiveSec" "OnCalendar" "AccuracySec" "RandomizedDelaySec"
+     "Unit" "Persistent" "WakeSystem" "RemainAfterElapse")
+    ("Unit"
+     "Description" "Documentation" "Requires" "Requisite" "Wants" "BindsTo"
+     "PartOf" "Conflicts" "Before" "After" "OnFailure" "PropagatesReloadTo"
+     "ReloadPropagatedFrom" "JoinsNamespaceOf" "RequiresMountsFor"
+     "OnFailureJobMode" "IgnoreOnIsolate" "StopWhenUnneeded" 
"RefuseManualStart"
+     "RefuseManualStop" "AllowIsolate" "DefaultDependencies"
+     "JobTimeoutSec" "JobTimeoutAction" "JobTimeoutRebootArgument"
+     "StartLimitIntervalSec" "StartLimitBurst"
+     "StartLimitAction" "RebootArgument"
+     "ConditionArchitecture" "ConditionVirtualization" "ConditionHost"
+     "ConditionKernelCommandLine" "ConditionSecurity" "ConditionCapability"
+     "ConditionACPower" "ConditionNeedsUpdate" "ConditionFirstBoot"
+     "ConditionPathExists" "ConditionPathExistsGlob" "ConditionPathIsDirectory"
+     "ConditionPathIsSymbolicLink" "ConditionPathIsMountPoint"
+     "ConditionPathIsReadWrite" "ConditionDirectoryNotEmpty"
+     "ConditionFileNotEmpty" "ConditionFileIsExecutable"
+     "AssertArchitecture" "AssertVirtualization" "AssertHost"
+     "AssertKernelCommandLine" "AssertSecurity" "AssertCapability"
+     "AssertACPower" "AssertNeedsUpdate" "AssertFirstBoot" "AssertPathExists"
+     "AssertPathExistsGlob" "AssertPathIsDirectory" "AssertPathIsSymbolicLink"
+     "AssertPathIsMountPoint" "AssertPathIsReadWrite" "AssertDirectoryNotEmpty"
+     "AssertFileNotEmpty" "AssertFileIsExecutable"
+     "SourcePath")
+    ("Install"
+     "Alias" "WantedBy" "RequiredBy" "Also" "DefaultInstance")))
+
+(defvar systemd-mode-section-regexp "^[ \t]*\\[\\([[:alpha:]]+\\)]")
+
+(defun systemd-mode-completion-at-point ()
+  (if (save-excursion (re-search-backward systemd-mode-section-regexp nil t))
+      (let ((section (match-string-no-properties 1)))
+       (if (member-ignore-case section systemd-unit-mode-sections)
+           (let ((keywords (cdr (assoc-string
+                                 section systemd-mode-section-keywords-alist 
t))))
+             (when keywords
+               (let ((end (point)))
+                 (save-excursion
+                   (skip-chars-backward "[:alpha:]")
+                   (let ((start (point)))
+                     (skip-chars-backward " \t")
+                     (when (eq (line-beginning-position) (point))
+                       (list start end (mapcar (lambda (str) (concat str "="))
+                                                 keywords))))))))
+         (display-warning major-mode
+                          (format "Unexpected section [%s]." section)
+                          :warning)
+         nil))))
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.automount\\'" . systemd-automount-mode))
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.mount\\'" . systemd-mount-mode))
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.path\\'" . systemd-path-mode))
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.service\\'" . systemd-service-mode))
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.socket\\'" . systemd-socket-mode))
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.swap\\'" . systemd-swap-mode))
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.timer\\'" . systemd-timer-mode))
+
+(provide 'systemd-mode)
+;;; systemd-mode.el ends here
diff --git a/packages/systemd/systemd.el b/packages/systemd/systemd.el
new file mode 100644
index 0000000..ac940b1
--- /dev/null
+++ b/packages/systemd/systemd.el
@@ -0,0 +1,4802 @@
+;;; systemd.el --- Interface to Systemd             -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2016  Free Software Foundation, Inc.
+
+;; Author: Mario Lang <address@hidden>
+;; Keywords: comm
+;; Version: 0
+;; Package-Requires: ((cl-lib "0.5"))
+
+;; 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 provides D-Bus bindings, major modes and interactive commands
+;; for working with systemd from within Emacs.
+;;
+;; systemd-mode.el provides major modes for all systemd unit file types.
+;;
+;; systemctl.el provides interactive commands for managing units and
+;; their status.  Similar to the command-line "systemctl" tool,
+;; working with remote hosts is supported.  TRAMP is used to visit
+;; configuration files of remote instances of systemd.
+;;
+;; Last, but not least, this library, systemd.el, provides
+;; semi-autogenerated functions and generalized setters for the
+;; systemd D-Bus API.  They have been generated using tools from
+;; systemd-codegen.el.
+
+;;; Code:
+
+(require 'dbus)
+(require 'gv)
+
+(defun systemd-escape-dbus-address (string)
+  (apply #'concat (mapcar (lambda (c)
+                            (if (or (and (>= c ?a) (<= c ?z))
+                                    (and (>= c ?A) (<= c ?Z))
+                                    (and (>= c ?0) (<= c ?9))
+                                    (= c ?-) (= c ?_)
+                                    (= c ?/) (= c ?\\)
+                                    (= c ?.))
+                                (string c)
+                              (format "%%%02x" c)))
+                          string)))
+
+(defun systemd-unescape-dbus-address (string)
+  (while (string-match "%\\([0-9a-f]\\{2\\}\\)" string)
+    (setq string
+         (replace-match
+          (string (string-to-number (match-string 1 string) 16)) t t string)))
+  string)
+
+(defun systemd-remote-bus (host &optional bus)
+  "Construct a D-Bus bus address suitable for connecting to a remote D-Bus
+instance (via ssh) running on HOST.  Optional argument BUS specifies
+the D-Bus instance to connect to on the remote host.  The keywords
+:system and :session indicate to connect to the remote system or session
+bus, respectively.  If a string is given, that particular D-Bus address is used
+on the remote host.  When not specified, the remote system bus is used."
+  (setq bus
+       (pcase bus
+         ((or `nil `:system)
+          "unix:path=/run/dbus/system_bus_socket")
+         (`:session
+          (with-temp-buffer
+            (let ((default-directory (concat "/scpx:" host ":")))
+              (process-file "/bin/sh" nil t nil "-c" "[ -e 
$XDG_RUNTIME_DIR/bus ] && echo -n $XDG_RUNTIME_DIR/bus")
+              (when (not (zerop (buffer-size)))
+                (buffer-string)))))
+         (_ bus)))
+  (unless bus
+    (error "Unable to determine remote session bus address."))
+  (concat "unixexec:"
+          "path=ssh"
+          ",argv1=-xT"
+          ",argv2=" (systemd-escape-dbus-address host)
+          ",argv3=systemd-stdio-bridge"
+          ",argv4=" (systemd-escape-dbus-address (concat "--bus-path=" bus))))
+
+(defconst systemd-dbus-service "org.freedesktop.systemd1")
+(defconst systemd-dbus-path "/org/freedesktop/systemd1")
+
+;;; org.freedesktop.systemd1.Automount
+
+(defconst systemd-dbus-interface-automount 
"org.freedesktop.systemd1.Automount")
+
+(defun systemd-automount-Where (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-automount "Where"))
+
+(defun systemd-automount-DirectoryMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-automount "DirectoryMode"))
+
+(defun systemd-automount-Result (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-automount "Result"))
+
+(defun systemd-automount-TimeoutIdleUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-automount "TimeoutIdleUSec"))
+
+;;; org.freedesktop.systemd1.BusName
+
+(defconst systemd-dbus-interface-bus-name "org.freedesktop.systemd1.BusName")
+
+(defun systemd-bus-name-Name (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-bus-name "Name"))
+
+(defun systemd-bus-name-TimeoutUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-bus-name "TimeoutUSec"))
+
+(defun systemd-bus-name-ControlPID (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-bus-name "ControlPID"))
+
+(defun systemd-bus-name-Result (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-bus-name "Result"))
+
+(defun systemd-bus-name-Activating (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-bus-name "Activating"))
+
+(defun systemd-bus-name-AcceptFileDescriptors (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-bus-name "AcceptFileDescriptors"))
+
+;;; org.freedesktop.systemd1.Device
+
+(defconst systemd-dbus-interface-device "org.freedesktop.systemd1.Device")
+
+(defun systemd-device-SysFSPath (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-device "SysFSPath"))
+
+;;; org.freedesktop.systemd1.Manager
+
+(defconst systemd-dbus-interface-manager "org.freedesktop.systemd1.Manager")
+
+(defun systemd-Version (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "Version"))
+
+(defun systemd-Features (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "Features"))
+
+(defun systemd-Virtualization (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "Virtualization"))
+
+(defun systemd-Architecture (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "Architecture"))
+
+(defun systemd-Tainted (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "Tainted"))
+
+(defun systemd-FirmwareTimestamp (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "FirmwareTimestamp"))
+
+(defun systemd-FirmwareTimestampMonotonic (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager 
"FirmwareTimestampMonotonic"))
+
+(defun systemd-LoaderTimestamp (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "LoaderTimestamp"))
+
+(defun systemd-LoaderTimestampMonotonic (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "LoaderTimestampMonotonic"))
+
+(defun systemd-KernelTimestamp (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "KernelTimestamp"))
+
+(defun systemd-KernelTimestampMonotonic (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "KernelTimestampMonotonic"))
+
+(defun systemd-InitRDTimestamp (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "InitRDTimestamp"))
+
+(defun systemd-InitRDTimestampMonotonic (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "InitRDTimestampMonotonic"))
+
+(defun systemd-UserspaceTimestamp (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "UserspaceTimestamp"))
+
+(defun systemd-UserspaceTimestampMonotonic (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager 
"UserspaceTimestampMonotonic"))
+
+(defun systemd-FinishTimestamp (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "FinishTimestamp"))
+
+(defun systemd-FinishTimestampMonotonic (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "FinishTimestampMonotonic"))
+
+(defun systemd-SecurityStartTimestamp (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "SecurityStartTimestamp"))
+
+(defun systemd-SecurityStartTimestampMonotonic (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager 
"SecurityStartTimestampMonotonic"))
+
+(defun systemd-SecurityFinishTimestamp (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "SecurityFinishTimestamp"))
+
+(defun systemd-SecurityFinishTimestampMonotonic (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager 
"SecurityFinishTimestampMonotonic"))
+
+(defun systemd-GeneratorsStartTimestamp (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "GeneratorsStartTimestamp"))
+
+(defun systemd-GeneratorsStartTimestampMonotonic (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager 
"GeneratorsStartTimestampMonotonic"))
+
+(defun systemd-GeneratorsFinishTimestamp (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager 
"GeneratorsFinishTimestamp"))
+
+(defun systemd-GeneratorsFinishTimestampMonotonic (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager 
"GeneratorsFinishTimestampMonotonic"))
+
+(defun systemd-UnitsLoadStartTimestamp (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "UnitsLoadStartTimestamp"))
+
+(defun systemd-UnitsLoadStartTimestampMonotonic (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager 
"UnitsLoadStartTimestampMonotonic"))
+
+(defun systemd-UnitsLoadFinishTimestamp (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "UnitsLoadFinishTimestamp"))
+
+(defun systemd-UnitsLoadFinishTimestampMonotonic (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager 
"UnitsLoadFinishTimestampMonotonic"))
+
+(defun systemd-LogLevel (bus)
+  "Use `setf' to set the value of this property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "LogLevel"))
+
+(gv-define-setter systemd-LogLevel (value bus)
+  `(dbus-set-property ,bus systemd-dbus-service systemd-dbus-path
+                     systemd-dbus-interface-manager "LogLevel" ,value))
+
+(defun systemd-LogTarget (bus)
+  "Use `setf' to set the value of this property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "LogTarget"))
+
+(gv-define-setter systemd-LogTarget (value bus)
+  `(dbus-set-property ,bus systemd-dbus-service systemd-dbus-path
+                     systemd-dbus-interface-manager "LogTarget" ,value))
+
+(defun systemd-NNames (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "NNames"))
+
+(defun systemd-NFailedUnits (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "NFailedUnits"))
+
+(defun systemd-NJobs (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "NJobs"))
+
+(defun systemd-NInstalledJobs (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "NInstalledJobs"))
+
+(defun systemd-NFailedJobs (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "NFailedJobs"))
+
+(defun systemd-Progress (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "Progress"))
+
+(defun systemd-Environment (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "Environment"))
+
+(defun systemd-ConfirmSpawn (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "ConfirmSpawn"))
+
+(defun systemd-ShowStatus (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "ShowStatus"))
+
+(defun systemd-UnitPath (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "UnitPath"))
+
+(defun systemd-DefaultStandardOutput (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultStandardOutput"))
+
+(defun systemd-DefaultStandardError (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultStandardError"))
+
+(defun systemd-RuntimeWatchdogUSec (bus)
+  "Use `setf' to set the value of this property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "RuntimeWatchdogUSec"))
+
+(gv-define-setter systemd-RuntimeWatchdogUSec (value bus)
+  `(dbus-set-property ,bus systemd-dbus-service systemd-dbus-path
+                     systemd-dbus-interface-manager "RuntimeWatchdogUSec" 
,value))
+
+(defun systemd-ShutdownWatchdogUSec (bus)
+  "Use `setf' to set the value of this property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "ShutdownWatchdogUSec"))
+
+(gv-define-setter systemd-ShutdownWatchdogUSec (value bus)
+  `(dbus-set-property ,bus systemd-dbus-service systemd-dbus-path
+                     systemd-dbus-interface-manager "ShutdownWatchdogUSec" 
,value))
+
+(defun systemd-ControlGroup (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "ControlGroup"))
+
+(defun systemd-SystemState (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "SystemState"))
+
+(defun systemd-ExitCode (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "ExitCode"))
+
+(defun systemd-DefaultTimerAccuracyUSec (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultTimerAccuracyUSec"))
+
+(defun systemd-DefaultTimeoutStartUSec (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultTimeoutStartUSec"))
+
+(defun systemd-DefaultTimeoutStopUSec (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultTimeoutStopUSec"))
+
+(defun systemd-DefaultRestartUSec (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultRestartUSec"))
+
+(defun systemd-DefaultStartLimitIntervalSec (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager 
"DefaultStartLimitIntervalSec"))
+
+(defun systemd-DefaultStartLimitBurst (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultStartLimitBurst"))
+
+(defun systemd-DefaultCPUAccounting (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultCPUAccounting"))
+
+(defun systemd-DefaultBlockIOAccounting (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultBlockIOAccounting"))
+
+(defun systemd-DefaultMemoryAccounting (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultMemoryAccounting"))
+
+(defun systemd-DefaultTasksAccounting (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultTasksAccounting"))
+
+(defun systemd-DefaultLimitCPU (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitCPU"))
+
+(defun systemd-DefaultLimitCPUSoft (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitCPUSoft"))
+
+(defun systemd-DefaultLimitFSIZE (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitFSIZE"))
+
+(defun systemd-DefaultLimitFSIZESoft (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitFSIZESoft"))
+
+(defun systemd-DefaultLimitDATA (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitDATA"))
+
+(defun systemd-DefaultLimitDATASoft (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitDATASoft"))
+
+(defun systemd-DefaultLimitSTACK (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitSTACK"))
+
+(defun systemd-DefaultLimitSTACKSoft (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitSTACKSoft"))
+
+(defun systemd-DefaultLimitCORE (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitCORE"))
+
+(defun systemd-DefaultLimitCORESoft (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitCORESoft"))
+
+(defun systemd-DefaultLimitRSS (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitRSS"))
+
+(defun systemd-DefaultLimitRSSSoft (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitRSSSoft"))
+
+(defun systemd-DefaultLimitNOFILE (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitNOFILE"))
+
+(defun systemd-DefaultLimitNOFILESoft (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitNOFILESoft"))
+
+(defun systemd-DefaultLimitAS (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitAS"))
+
+(defun systemd-DefaultLimitASSoft (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitASSoft"))
+
+(defun systemd-DefaultLimitNPROC (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitNPROC"))
+
+(defun systemd-DefaultLimitNPROCSoft (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitNPROCSoft"))
+
+(defun systemd-DefaultLimitMEMLOCK (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitMEMLOCK"))
+
+(defun systemd-DefaultLimitMEMLOCKSoft (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitMEMLOCKSoft"))
+
+(defun systemd-DefaultLimitLOCKS (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitLOCKS"))
+
+(defun systemd-DefaultLimitLOCKSSoft (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitLOCKSSoft"))
+
+(defun systemd-DefaultLimitSIGPENDING (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitSIGPENDING"))
+
+(defun systemd-DefaultLimitSIGPENDINGSoft (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager 
"DefaultLimitSIGPENDINGSoft"))
+
+(defun systemd-DefaultLimitMSGQUEUE (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitMSGQUEUE"))
+
+(defun systemd-DefaultLimitMSGQUEUESoft (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitMSGQUEUESoft"))
+
+(defun systemd-DefaultLimitNICE (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitNICE"))
+
+(defun systemd-DefaultLimitNICESoft (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitNICESoft"))
+
+(defun systemd-DefaultLimitRTPRIO (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitRTPRIO"))
+
+(defun systemd-DefaultLimitRTPRIOSoft (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitRTPRIOSoft"))
+
+(defun systemd-DefaultLimitRTTIME (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitRTTIME"))
+
+(defun systemd-DefaultLimitRTTIMESoft (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultLimitRTTIMESoft"))
+
+(defun systemd-DefaultTasksMax (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "DefaultTasksMax"))
+
+(defun systemd-TimerSlackNSec (bus)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service systemd-dbus-path
+                    systemd-dbus-interface-manager "TimerSlackNSec"))
+
+(defun systemd-GetUnit (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "GetUnit" args))
+
+(defun systemd-GetUnitByPID (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "GetUnitByPID" args))
+
+(defun systemd-LoadUnit (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "LoadUnit" args))
+
+(defun systemd-StartUnit (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "StartUnit" args))
+
+(defun systemd-StartUnitReplace (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "StartUnitReplace" args))
+
+(defun systemd-StopUnit (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "StopUnit" args))
+
+(defun systemd-ReloadUnit (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "ReloadUnit" args))
+
+(defun systemd-RestartUnit (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "RestartUnit" args))
+
+(defun systemd-TryRestartUnit (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "TryRestartUnit" args))
+
+(defun systemd-ReloadOrRestartUnit (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "ReloadOrRestartUnit" args))
+
+(defun systemd-ReloadOrTryRestartUnit (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "ReloadOrTryRestartUnit" args))
+
+(defun systemd-KillUnit (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "KillUnit" args))
+
+(defun systemd-ResetFailedUnit (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "ResetFailedUnit" args))
+
+(defun systemd-SetUnitProperties (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "SetUnitProperties" args))
+
+(defun systemd-StartTransientUnit (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "StartTransientUnit" args))
+
+(defun systemd-GetUnitProcesses (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "GetUnitProcesses" args))
+
+(defun systemd-GetJob (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "GetJob" args))
+
+(defun systemd-CancelJob (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "CancelJob" args))
+
+(defun systemd-ClearJobs (bus)
+  (dbus-call-method bus systemd-dbus-service systemd-dbus-path
+                   systemd-dbus-interface-manager "ClearJobs"))
+
+(defun systemd-ResetFailed (bus)
+  (dbus-call-method bus systemd-dbus-service systemd-dbus-path
+                   systemd-dbus-interface-manager "ResetFailed"))
+
+(defun systemd-ListUnits (bus)
+  (dbus-call-method bus systemd-dbus-service systemd-dbus-path
+                   systemd-dbus-interface-manager "ListUnits"))
+
+(defun systemd-ListUnitsFiltered (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "ListUnitsFiltered" args))
+
+(defun systemd-ListUnitsByPatterns (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "ListUnitsByPatterns" args))
+
+(defun systemd-ListUnitsByNames (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "ListUnitsByNames" args))
+
+(defun systemd-ListJobs (bus)
+  (dbus-call-method bus systemd-dbus-service systemd-dbus-path
+                   systemd-dbus-interface-manager "ListJobs"))
+
+(defun systemd-Subscribe (bus)
+  (dbus-call-method bus systemd-dbus-service systemd-dbus-path
+                   systemd-dbus-interface-manager "Subscribe"))
+
+(defun systemd-Unsubscribe (bus)
+  (dbus-call-method bus systemd-dbus-service systemd-dbus-path
+                   systemd-dbus-interface-manager "Unsubscribe"))
+
+(defun systemd-Dump (bus)
+  (dbus-call-method bus systemd-dbus-service systemd-dbus-path
+                   systemd-dbus-interface-manager "Dump"))
+
+(defun systemd-CreateSnapshot (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "CreateSnapshot" args))
+
+(defun systemd-RemoveSnapshot (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "RemoveSnapshot" args))
+
+(defun systemd-Reload (bus)
+  (dbus-call-method bus systemd-dbus-service systemd-dbus-path
+                   systemd-dbus-interface-manager "Reload"))
+
+(defun systemd-Reexecute (bus)
+  (dbus-call-method bus systemd-dbus-service systemd-dbus-path
+                   systemd-dbus-interface-manager "Reexecute"))
+
+(defun systemd-Exit (bus)
+  (dbus-call-method bus systemd-dbus-service systemd-dbus-path
+                   systemd-dbus-interface-manager "Exit"))
+
+(defun systemd-Reboot (bus)
+  (dbus-call-method bus systemd-dbus-service systemd-dbus-path
+                   systemd-dbus-interface-manager "Reboot"))
+
+(defun systemd-PowerOff (bus)
+  (dbus-call-method bus systemd-dbus-service systemd-dbus-path
+                   systemd-dbus-interface-manager "PowerOff"))
+
+(defun systemd-Halt (bus)
+  (dbus-call-method bus systemd-dbus-service systemd-dbus-path
+                   systemd-dbus-interface-manager "Halt"))
+
+(defun systemd-KExec (bus)
+  (dbus-call-method bus systemd-dbus-service systemd-dbus-path
+                   systemd-dbus-interface-manager "KExec"))
+
+(defun systemd-SwitchRoot (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "SwitchRoot" args))
+
+(defun systemd-SetEnvironment (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "SetEnvironment" args))
+
+(defun systemd-UnsetEnvironment (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "UnsetEnvironment" args))
+
+(defun systemd-UnsetAndSetEnvironment (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "UnsetAndSetEnvironment" args))
+
+(defun systemd-ListUnitFiles (bus)
+  (dbus-call-method bus systemd-dbus-service systemd-dbus-path
+                   systemd-dbus-interface-manager "ListUnitFiles"))
+
+(defun systemd-ListUnitFilesByPatterns (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "ListUnitFilesByPatterns" args))
+
+(defun systemd-GetUnitFileState (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "GetUnitFileState" args))
+
+(defun systemd-EnableUnitFiles (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "EnableUnitFiles" args))
+
+(defun systemd-DisableUnitFiles (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "DisableUnitFiles" args))
+
+(defun systemd-ReenableUnitFiles (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "ReenableUnitFiles" args))
+
+(defun systemd-LinkUnitFiles (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "LinkUnitFiles" args))
+
+(defun systemd-PresetUnitFiles (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "PresetUnitFiles" args))
+
+(defun systemd-PresetUnitFilesWithMode (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "PresetUnitFilesWithMode" args))
+
+(defun systemd-MaskUnitFiles (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "MaskUnitFiles" args))
+
+(defun systemd-UnmaskUnitFiles (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "UnmaskUnitFiles" args))
+
+(defun systemd-RevertUnitFiles (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "RevertUnitFiles" args))
+
+(defun systemd-SetDefaultTarget (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "SetDefaultTarget" args))
+
+(defun systemd-GetDefaultTarget (bus)
+  (dbus-call-method bus systemd-dbus-service systemd-dbus-path
+                   systemd-dbus-interface-manager "GetDefaultTarget"))
+
+(defun systemd-PresetAllUnitFiles (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "PresetAllUnitFiles" args))
+
+(defun systemd-AddDependencyUnitFiles (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "AddDependencyUnitFiles" args))
+
+(defun systemd-SetExitCode (bus &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service systemd-dbus-path
+        systemd-dbus-interface-manager "SetExitCode" args))
+
+;;; org.freedesktop.systemd1.Mount
+
+(defconst systemd-dbus-interface-mount "org.freedesktop.systemd1.Mount")
+
+(defun systemd-mount-Where (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "Where"))
+
+(defun systemd-mount-What (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "What"))
+
+(defun systemd-mount-Options (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "Options"))
+
+(defun systemd-mount-Type (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "Type"))
+
+(defun systemd-mount-TimeoutUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "TimeoutUSec"))
+
+(defun systemd-mount-ControlPID (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "ControlPID"))
+
+(defun systemd-mount-DirectoryMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "DirectoryMode"))
+
+(defun systemd-mount-SloppyOptions (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "SloppyOptions"))
+
+(defun systemd-mount-Result (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "Result"))
+
+(defun systemd-mount-ExecMount (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "ExecMount"))
+
+(defun systemd-mount-ExecUnmount (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "ExecUnmount"))
+
+(defun systemd-mount-ExecRemount (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "ExecRemount"))
+
+(defun systemd-mount-Slice (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "Slice"))
+
+(defun systemd-mount-ControlGroup (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "ControlGroup"))
+
+(defun systemd-mount-MemoryCurrent (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "MemoryCurrent"))
+
+(defun systemd-mount-CPUUsageNSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "CPUUsageNSec"))
+
+(defun systemd-mount-TasksCurrent (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "TasksCurrent"))
+
+(defun systemd-mount-GetProcesses (bus path)
+  (dbus-call-method bus systemd-dbus-service path
+                   systemd-dbus-interface-mount "GetProcesses"))
+
+(defun systemd-mount-Delegate (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "Delegate"))
+
+(defun systemd-mount-CPUAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "CPUAccounting"))
+
+(defun systemd-mount-CPUShares (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "CPUShares"))
+
+(defun systemd-mount-StartupCPUShares (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "StartupCPUShares"))
+
+(defun systemd-mount-CPUQuotaPerSecUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "CPUQuotaPerSecUSec"))
+
+(defun systemd-mount-IOAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "IOAccounting"))
+
+(defun systemd-mount-IOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "IOWeight"))
+
+(defun systemd-mount-StartupIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "StartupIOWeight"))
+
+(defun systemd-mount-IODeviceWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "IODeviceWeight"))
+
+(defun systemd-mount-IOReadBandwidthMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "IOReadBandwidthMax"))
+
+(defun systemd-mount-IOWriteBandwidthMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "IOWriteBandwidthMax"))
+
+(defun systemd-mount-IOReadIOPSMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "IOReadIOPSMax"))
+
+(defun systemd-mount-IOWriteIOPSMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "IOWriteIOPSMax"))
+
+(defun systemd-mount-BlockIOAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "BlockIOAccounting"))
+
+(defun systemd-mount-BlockIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "BlockIOWeight"))
+
+(defun systemd-mount-StartupBlockIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "StartupBlockIOWeight"))
+
+(defun systemd-mount-BlockIODeviceWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "BlockIODeviceWeight"))
+
+(defun systemd-mount-BlockIOReadBandwidth (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "BlockIOReadBandwidth"))
+
+(defun systemd-mount-BlockIOWriteBandwidth (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "BlockIOWriteBandwidth"))
+
+(defun systemd-mount-MemoryAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "MemoryAccounting"))
+
+(defun systemd-mount-MemoryLimit (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "MemoryLimit"))
+
+(defun systemd-mount-DevicePolicy (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "DevicePolicy"))
+
+(defun systemd-mount-DeviceAllow (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "DeviceAllow"))
+
+(defun systemd-mount-TasksAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "TasksAccounting"))
+
+(defun systemd-mount-TasksMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "TasksMax"))
+
+(defun systemd-mount-Environment (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "Environment"))
+
+(defun systemd-mount-EnvironmentFiles (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "EnvironmentFiles"))
+
+(defun systemd-mount-PassEnvironment (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "PassEnvironment"))
+
+(defun systemd-mount-UMask (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "UMask"))
+
+(defun systemd-mount-LimitCPU (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitCPU"))
+
+(defun systemd-mount-LimitCPUSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitCPUSoft"))
+
+(defun systemd-mount-LimitFSIZE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitFSIZE"))
+
+(defun systemd-mount-LimitFSIZESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitFSIZESoft"))
+
+(defun systemd-mount-LimitDATA (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitDATA"))
+
+(defun systemd-mount-LimitDATASoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitDATASoft"))
+
+(defun systemd-mount-LimitSTACK (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitSTACK"))
+
+(defun systemd-mount-LimitSTACKSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitSTACKSoft"))
+
+(defun systemd-mount-LimitCORE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitCORE"))
+
+(defun systemd-mount-LimitCORESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitCORESoft"))
+
+(defun systemd-mount-LimitRSS (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitRSS"))
+
+(defun systemd-mount-LimitRSSSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitRSSSoft"))
+
+(defun systemd-mount-LimitNOFILE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitNOFILE"))
+
+(defun systemd-mount-LimitNOFILESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitNOFILESoft"))
+
+(defun systemd-mount-LimitAS (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitAS"))
+
+(defun systemd-mount-LimitASSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitASSoft"))
+
+(defun systemd-mount-LimitNPROC (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitNPROC"))
+
+(defun systemd-mount-LimitNPROCSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitNPROCSoft"))
+
+(defun systemd-mount-LimitMEMLOCK (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitMEMLOCK"))
+
+(defun systemd-mount-LimitMEMLOCKSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitMEMLOCKSoft"))
+
+(defun systemd-mount-LimitLOCKS (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitLOCKS"))
+
+(defun systemd-mount-LimitLOCKSSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitLOCKSSoft"))
+
+(defun systemd-mount-LimitSIGPENDING (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitSIGPENDING"))
+
+(defun systemd-mount-LimitSIGPENDINGSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitSIGPENDINGSoft"))
+
+(defun systemd-mount-LimitMSGQUEUE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitMSGQUEUE"))
+
+(defun systemd-mount-LimitMSGQUEUESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitMSGQUEUESoft"))
+
+(defun systemd-mount-LimitNICE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitNICE"))
+
+(defun systemd-mount-LimitNICESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitNICESoft"))
+
+(defun systemd-mount-LimitRTPRIO (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitRTPRIO"))
+
+(defun systemd-mount-LimitRTPRIOSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitRTPRIOSoft"))
+
+(defun systemd-mount-LimitRTTIME (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitRTTIME"))
+
+(defun systemd-mount-LimitRTTIMESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "LimitRTTIMESoft"))
+
+(defun systemd-mount-WorkingDirectory (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "WorkingDirectory"))
+
+(defun systemd-mount-RootDirectory (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "RootDirectory"))
+
+(defun systemd-mount-OOMScoreAdjust (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "OOMScoreAdjust"))
+
+(defun systemd-mount-Nice (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "Nice"))
+
+(defun systemd-mount-IOScheduling (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "IOScheduling"))
+
+(defun systemd-mount-CPUSchedulingPolicy (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "CPUSchedulingPolicy"))
+
+(defun systemd-mount-CPUSchedulingPriority (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "CPUSchedulingPriority"))
+
+(defun systemd-mount-CPUAffinity (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "CPUAffinity"))
+
+(defun systemd-mount-TimerSlackNSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "TimerSlackNSec"))
+
+(defun systemd-mount-CPUSchedulingResetOnFork (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "CPUSchedulingResetOnFork"))
+
+(defun systemd-mount-NonBlocking (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "NonBlocking"))
+
+(defun systemd-mount-StandardInput (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "StandardInput"))
+
+(defun systemd-mount-StandardOutput (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "StandardOutput"))
+
+(defun systemd-mount-StandardError (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "StandardError"))
+
+(defun systemd-mount-TTYPath (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "TTYPath"))
+
+(defun systemd-mount-TTYReset (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "TTYReset"))
+
+(defun systemd-mount-TTYVHangup (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "TTYVHangup"))
+
+(defun systemd-mount-TTYVTDisallocate (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "TTYVTDisallocate"))
+
+(defun systemd-mount-SyslogPriority (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "SyslogPriority"))
+
+(defun systemd-mount-SyslogIdentifier (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "SyslogIdentifier"))
+
+(defun systemd-mount-SyslogLevelPrefix (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "SyslogLevelPrefix"))
+
+(defun systemd-mount-SyslogLevel (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "SyslogLevel"))
+
+(defun systemd-mount-SyslogFacility (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "SyslogFacility"))
+
+(defun systemd-mount-SecureBits (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "SecureBits"))
+
+(defun systemd-mount-CapabilityBoundingSet (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "CapabilityBoundingSet"))
+
+(defun systemd-mount-AmbientCapabilities (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "AmbientCapabilities"))
+
+(defun systemd-mount-User (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "User"))
+
+(defun systemd-mount-Group (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "Group"))
+
+(defun systemd-mount-SupplementaryGroups (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "SupplementaryGroups"))
+
+(defun systemd-mount-PAMName (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "PAMName"))
+
+(defun systemd-mount-ReadWriteDirectories (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "ReadWriteDirectories"))
+
+(defun systemd-mount-ReadOnlyDirectories (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "ReadOnlyDirectories"))
+
+(defun systemd-mount-InaccessibleDirectories (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "InaccessibleDirectories"))
+
+(defun systemd-mount-MountFlags (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "MountFlags"))
+
+(defun systemd-mount-PrivateTmp (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "PrivateTmp"))
+
+(defun systemd-mount-PrivateNetwork (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "PrivateNetwork"))
+
+(defun systemd-mount-PrivateDevices (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "PrivateDevices"))
+
+(defun systemd-mount-ProtectHome (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "ProtectHome"))
+
+(defun systemd-mount-ProtectSystem (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "ProtectSystem"))
+
+(defun systemd-mount-SameProcessGroup (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "SameProcessGroup"))
+
+(defun systemd-mount-UtmpIdentifier (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "UtmpIdentifier"))
+
+(defun systemd-mount-UtmpMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "UtmpMode"))
+
+(defun systemd-mount-SELinuxContext (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "SELinuxContext"))
+
+(defun systemd-mount-AppArmorProfile (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "AppArmorProfile"))
+
+(defun systemd-mount-SmackProcessLabel (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "SmackProcessLabel"))
+
+(defun systemd-mount-IgnoreSIGPIPE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "IgnoreSIGPIPE"))
+
+(defun systemd-mount-NoNewPrivileges (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "NoNewPrivileges"))
+
+(defun systemd-mount-SystemCallFilter (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "SystemCallFilter"))
+
+(defun systemd-mount-SystemCallArchitectures (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "SystemCallArchitectures"))
+
+(defun systemd-mount-SystemCallErrorNumber (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "SystemCallErrorNumber"))
+
+(defun systemd-mount-Personality (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "Personality"))
+
+(defun systemd-mount-RestrictAddressFamilies (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "RestrictAddressFamilies"))
+
+(defun systemd-mount-RuntimeDirectoryMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "RuntimeDirectoryMode"))
+
+(defun systemd-mount-RuntimeDirectory (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "RuntimeDirectory"))
+
+(defun systemd-mount-KillMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "KillMode"))
+
+(defun systemd-mount-KillSignal (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "KillSignal"))
+
+(defun systemd-mount-SendSIGKILL (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "SendSIGKILL"))
+
+(defun systemd-mount-SendSIGHUP (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-mount "SendSIGHUP"))
+
+;;; org.freedesktop.systemd1.Path
+
+(defconst systemd-dbus-interface-path "org.freedesktop.systemd1.Path")
+
+(defun systemd-path-Unit (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-path "Unit"))
+
+(defun systemd-path-Paths (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-path "Paths"))
+
+(defun systemd-path-MakeDirectory (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-path "MakeDirectory"))
+
+(defun systemd-path-DirectoryMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-path "DirectoryMode"))
+
+(defun systemd-path-Result (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-path "Result"))
+
+;;; org.freedesktop.systemd1.Scope
+
+(defconst systemd-dbus-interface-scope "org.freedesktop.systemd1.Scope")
+
+(defun systemd-scope-Controller (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "Controller"))
+
+(defun systemd-scope-TimeoutStopUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "TimeoutStopUSec"))
+
+(defun systemd-scope-Result (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "Result"))
+
+(defun systemd-scope-Abandon (bus path)
+  (dbus-call-method bus systemd-dbus-service path
+                   systemd-dbus-interface-scope "Abandon"))
+
+(defun systemd-scope-Slice (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "Slice"))
+
+(defun systemd-scope-ControlGroup (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "ControlGroup"))
+
+(defun systemd-scope-MemoryCurrent (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "MemoryCurrent"))
+
+(defun systemd-scope-CPUUsageNSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "CPUUsageNSec"))
+
+(defun systemd-scope-TasksCurrent (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "TasksCurrent"))
+
+(defun systemd-scope-GetProcesses (bus path)
+  (dbus-call-method bus systemd-dbus-service path
+                   systemd-dbus-interface-scope "GetProcesses"))
+
+(defun systemd-scope-Delegate (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "Delegate"))
+
+(defun systemd-scope-CPUAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "CPUAccounting"))
+
+(defun systemd-scope-CPUShares (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "CPUShares"))
+
+(defun systemd-scope-StartupCPUShares (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "StartupCPUShares"))
+
+(defun systemd-scope-CPUQuotaPerSecUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "CPUQuotaPerSecUSec"))
+
+(defun systemd-scope-IOAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "IOAccounting"))
+
+(defun systemd-scope-IOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "IOWeight"))
+
+(defun systemd-scope-StartupIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "StartupIOWeight"))
+
+(defun systemd-scope-IODeviceWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "IODeviceWeight"))
+
+(defun systemd-scope-IOReadBandwidthMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "IOReadBandwidthMax"))
+
+(defun systemd-scope-IOWriteBandwidthMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "IOWriteBandwidthMax"))
+
+(defun systemd-scope-IOReadIOPSMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "IOReadIOPSMax"))
+
+(defun systemd-scope-IOWriteIOPSMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "IOWriteIOPSMax"))
+
+(defun systemd-scope-BlockIOAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "BlockIOAccounting"))
+
+(defun systemd-scope-BlockIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "BlockIOWeight"))
+
+(defun systemd-scope-StartupBlockIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "StartupBlockIOWeight"))
+
+(defun systemd-scope-BlockIODeviceWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "BlockIODeviceWeight"))
+
+(defun systemd-scope-BlockIOReadBandwidth (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "BlockIOReadBandwidth"))
+
+(defun systemd-scope-BlockIOWriteBandwidth (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "BlockIOWriteBandwidth"))
+
+(defun systemd-scope-MemoryAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "MemoryAccounting"))
+
+(defun systemd-scope-MemoryLimit (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "MemoryLimit"))
+
+(defun systemd-scope-DevicePolicy (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "DevicePolicy"))
+
+(defun systemd-scope-DeviceAllow (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "DeviceAllow"))
+
+(defun systemd-scope-TasksAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "TasksAccounting"))
+
+(defun systemd-scope-TasksMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "TasksMax"))
+
+(defun systemd-scope-KillMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "KillMode"))
+
+(defun systemd-scope-KillSignal (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "KillSignal"))
+
+(defun systemd-scope-SendSIGKILL (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "SendSIGKILL"))
+
+(defun systemd-scope-SendSIGHUP (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-scope "SendSIGHUP"))
+
+;;; org.freedesktop.systemd1.Service
+
+(defconst systemd-dbus-interface-service "org.freedesktop.systemd1.Service")
+
+(defun systemd-service-Type (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "Type"))
+
+(defun systemd-service-Restart (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "Restart"))
+
+(defun systemd-service-PIDFile (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "PIDFile"))
+
+(defun systemd-service-NotifyAccess (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "NotifyAccess"))
+
+(defun systemd-service-RestartUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "RestartUSec"))
+
+(defun systemd-service-TimeoutStartUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "TimeoutStartUSec"))
+
+(defun systemd-service-TimeoutStopUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "TimeoutStopUSec"))
+
+(defun systemd-service-RuntimeMaxUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "RuntimeMaxUSec"))
+
+(defun systemd-service-WatchdogUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "WatchdogUSec"))
+
+(defun systemd-service-WatchdogTimestamp (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "WatchdogTimestamp"))
+
+(defun systemd-service-WatchdogTimestampMonotonic (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service 
"WatchdogTimestampMonotonic"))
+
+(defun systemd-service-FailureAction (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "FailureAction"))
+
+(defun systemd-service-PermissionsStartOnly (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "PermissionsStartOnly"))
+
+(defun systemd-service-RootDirectoryStartOnly (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "RootDirectoryStartOnly"))
+
+(defun systemd-service-RemainAfterExit (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "RemainAfterExit"))
+
+(defun systemd-service-GuessMainPID (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "GuessMainPID"))
+
+(defun systemd-service-MainPID (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "MainPID"))
+
+(defun systemd-service-ControlPID (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "ControlPID"))
+
+(defun systemd-service-BusName (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "BusName"))
+
+(defun systemd-service-FileDescriptorStoreMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "FileDescriptorStoreMax"))
+
+(defun systemd-service-NFileDescriptorStore (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "NFileDescriptorStore"))
+
+(defun systemd-service-StatusText (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "StatusText"))
+
+(defun systemd-service-StatusErrno (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "StatusErrno"))
+
+(defun systemd-service-Result (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "Result"))
+
+(defun systemd-service-USBFunctionDescriptors (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "USBFunctionDescriptors"))
+
+(defun systemd-service-USBFunctionStrings (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "USBFunctionStrings"))
+
+(defun systemd-service-ExecMainStartTimestamp (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "ExecMainStartTimestamp"))
+
+(defun systemd-service-ExecMainStartTimestampMonotonic (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service 
"ExecMainStartTimestampMonotonic"))
+
+(defun systemd-service-ExecMainExitTimestamp (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "ExecMainExitTimestamp"))
+
+(defun systemd-service-ExecMainExitTimestampMonotonic (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service 
"ExecMainExitTimestampMonotonic"))
+
+(defun systemd-service-ExecMainPID (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "ExecMainPID"))
+
+(defun systemd-service-ExecMainCode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "ExecMainCode"))
+
+(defun systemd-service-ExecMainStatus (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "ExecMainStatus"))
+
+(defun systemd-service-ExecStartPre (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "ExecStartPre"))
+
+(defun systemd-service-ExecStart (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "ExecStart"))
+
+(defun systemd-service-ExecStartPost (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "ExecStartPost"))
+
+(defun systemd-service-ExecReload (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "ExecReload"))
+
+(defun systemd-service-ExecStop (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "ExecStop"))
+
+(defun systemd-service-ExecStopPost (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "ExecStopPost"))
+
+(defun systemd-service-Slice (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "Slice"))
+
+(defun systemd-service-ControlGroup (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "ControlGroup"))
+
+(defun systemd-service-MemoryCurrent (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "MemoryCurrent"))
+
+(defun systemd-service-CPUUsageNSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "CPUUsageNSec"))
+
+(defun systemd-service-TasksCurrent (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "TasksCurrent"))
+
+(defun systemd-service-GetProcesses (bus path)
+  (dbus-call-method bus systemd-dbus-service path
+                   systemd-dbus-interface-service "GetProcesses"))
+
+(defun systemd-service-Delegate (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "Delegate"))
+
+(defun systemd-service-CPUAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "CPUAccounting"))
+
+(defun systemd-service-CPUShares (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "CPUShares"))
+
+(defun systemd-service-StartupCPUShares (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "StartupCPUShares"))
+
+(defun systemd-service-CPUQuotaPerSecUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "CPUQuotaPerSecUSec"))
+
+(defun systemd-service-IOAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "IOAccounting"))
+
+(defun systemd-service-IOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "IOWeight"))
+
+(defun systemd-service-StartupIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "StartupIOWeight"))
+
+(defun systemd-service-IODeviceWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "IODeviceWeight"))
+
+(defun systemd-service-IOReadBandwidthMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "IOReadBandwidthMax"))
+
+(defun systemd-service-IOWriteBandwidthMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "IOWriteBandwidthMax"))
+
+(defun systemd-service-IOReadIOPSMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "IOReadIOPSMax"))
+
+(defun systemd-service-IOWriteIOPSMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "IOWriteIOPSMax"))
+
+(defun systemd-service-BlockIOAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "BlockIOAccounting"))
+
+(defun systemd-service-BlockIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "BlockIOWeight"))
+
+(defun systemd-service-StartupBlockIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "StartupBlockIOWeight"))
+
+(defun systemd-service-BlockIODeviceWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "BlockIODeviceWeight"))
+
+(defun systemd-service-BlockIOReadBandwidth (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "BlockIOReadBandwidth"))
+
+(defun systemd-service-BlockIOWriteBandwidth (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "BlockIOWriteBandwidth"))
+
+(defun systemd-service-MemoryAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "MemoryAccounting"))
+
+(defun systemd-service-MemoryLimit (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "MemoryLimit"))
+
+(defun systemd-service-DevicePolicy (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "DevicePolicy"))
+
+(defun systemd-service-DeviceAllow (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "DeviceAllow"))
+
+(defun systemd-service-TasksAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "TasksAccounting"))
+
+(defun systemd-service-TasksMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "TasksMax"))
+
+(defun systemd-service-Environment (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "Environment"))
+
+(defun systemd-service-EnvironmentFiles (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "EnvironmentFiles"))
+
+(defun systemd-service-PassEnvironment (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "PassEnvironment"))
+
+(defun systemd-service-UMask (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "UMask"))
+
+(defun systemd-service-LimitCPU (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitCPU"))
+
+(defun systemd-service-LimitCPUSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitCPUSoft"))
+
+(defun systemd-service-LimitFSIZE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitFSIZE"))
+
+(defun systemd-service-LimitFSIZESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitFSIZESoft"))
+
+(defun systemd-service-LimitDATA (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitDATA"))
+
+(defun systemd-service-LimitDATASoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitDATASoft"))
+
+(defun systemd-service-LimitSTACK (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitSTACK"))
+
+(defun systemd-service-LimitSTACKSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitSTACKSoft"))
+
+(defun systemd-service-LimitCORE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitCORE"))
+
+(defun systemd-service-LimitCORESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitCORESoft"))
+
+(defun systemd-service-LimitRSS (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitRSS"))
+
+(defun systemd-service-LimitRSSSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitRSSSoft"))
+
+(defun systemd-service-LimitNOFILE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitNOFILE"))
+
+(defun systemd-service-LimitNOFILESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitNOFILESoft"))
+
+(defun systemd-service-LimitAS (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitAS"))
+
+(defun systemd-service-LimitASSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitASSoft"))
+
+(defun systemd-service-LimitNPROC (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitNPROC"))
+
+(defun systemd-service-LimitNPROCSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitNPROCSoft"))
+
+(defun systemd-service-LimitMEMLOCK (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitMEMLOCK"))
+
+(defun systemd-service-LimitMEMLOCKSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitMEMLOCKSoft"))
+
+(defun systemd-service-LimitLOCKS (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitLOCKS"))
+
+(defun systemd-service-LimitLOCKSSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitLOCKSSoft"))
+
+(defun systemd-service-LimitSIGPENDING (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitSIGPENDING"))
+
+(defun systemd-service-LimitSIGPENDINGSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitSIGPENDINGSoft"))
+
+(defun systemd-service-LimitMSGQUEUE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitMSGQUEUE"))
+
+(defun systemd-service-LimitMSGQUEUESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitMSGQUEUESoft"))
+
+(defun systemd-service-LimitNICE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitNICE"))
+
+(defun systemd-service-LimitNICESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitNICESoft"))
+
+(defun systemd-service-LimitRTPRIO (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitRTPRIO"))
+
+(defun systemd-service-LimitRTPRIOSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitRTPRIOSoft"))
+
+(defun systemd-service-LimitRTTIME (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitRTTIME"))
+
+(defun systemd-service-LimitRTTIMESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "LimitRTTIMESoft"))
+
+(defun systemd-service-WorkingDirectory (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "WorkingDirectory"))
+
+(defun systemd-service-RootDirectory (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "RootDirectory"))
+
+(defun systemd-service-OOMScoreAdjust (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "OOMScoreAdjust"))
+
+(defun systemd-service-Nice (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "Nice"))
+
+(defun systemd-service-IOScheduling (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "IOScheduling"))
+
+(defun systemd-service-CPUSchedulingPolicy (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "CPUSchedulingPolicy"))
+
+(defun systemd-service-CPUSchedulingPriority (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "CPUSchedulingPriority"))
+
+(defun systemd-service-CPUAffinity (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "CPUAffinity"))
+
+(defun systemd-service-TimerSlackNSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "TimerSlackNSec"))
+
+(defun systemd-service-CPUSchedulingResetOnFork (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "CPUSchedulingResetOnFork"))
+
+(defun systemd-service-NonBlocking (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "NonBlocking"))
+
+(defun systemd-service-StandardInput (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "StandardInput"))
+
+(defun systemd-service-StandardOutput (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "StandardOutput"))
+
+(defun systemd-service-StandardError (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "StandardError"))
+
+(defun systemd-service-TTYPath (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "TTYPath"))
+
+(defun systemd-service-TTYReset (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "TTYReset"))
+
+(defun systemd-service-TTYVHangup (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "TTYVHangup"))
+
+(defun systemd-service-TTYVTDisallocate (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "TTYVTDisallocate"))
+
+(defun systemd-service-SyslogPriority (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "SyslogPriority"))
+
+(defun systemd-service-SyslogIdentifier (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "SyslogIdentifier"))
+
+(defun systemd-service-SyslogLevelPrefix (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "SyslogLevelPrefix"))
+
+(defun systemd-service-SyslogLevel (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "SyslogLevel"))
+
+(defun systemd-service-SyslogFacility (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "SyslogFacility"))
+
+(defun systemd-service-SecureBits (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "SecureBits"))
+
+(defun systemd-service-CapabilityBoundingSet (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "CapabilityBoundingSet"))
+
+(defun systemd-service-AmbientCapabilities (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "AmbientCapabilities"))
+
+(defun systemd-service-User (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "User"))
+
+(defun systemd-service-Group (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "Group"))
+
+(defun systemd-service-SupplementaryGroups (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "SupplementaryGroups"))
+
+(defun systemd-service-PAMName (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "PAMName"))
+
+(defun systemd-service-ReadWriteDirectories (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "ReadWriteDirectories"))
+
+(defun systemd-service-ReadOnlyDirectories (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "ReadOnlyDirectories"))
+
+(defun systemd-service-InaccessibleDirectories (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "InaccessibleDirectories"))
+
+(defun systemd-service-MountFlags (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "MountFlags"))
+
+(defun systemd-service-PrivateTmp (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "PrivateTmp"))
+
+(defun systemd-service-PrivateNetwork (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "PrivateNetwork"))
+
+(defun systemd-service-PrivateDevices (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "PrivateDevices"))
+
+(defun systemd-service-ProtectHome (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "ProtectHome"))
+
+(defun systemd-service-ProtectSystem (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "ProtectSystem"))
+
+(defun systemd-service-SameProcessGroup (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "SameProcessGroup"))
+
+(defun systemd-service-UtmpIdentifier (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "UtmpIdentifier"))
+
+(defun systemd-service-UtmpMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "UtmpMode"))
+
+(defun systemd-service-SELinuxContext (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "SELinuxContext"))
+
+(defun systemd-service-AppArmorProfile (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "AppArmorProfile"))
+
+(defun systemd-service-SmackProcessLabel (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "SmackProcessLabel"))
+
+(defun systemd-service-IgnoreSIGPIPE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "IgnoreSIGPIPE"))
+
+(defun systemd-service-NoNewPrivileges (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "NoNewPrivileges"))
+
+(defun systemd-service-SystemCallFilter (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "SystemCallFilter"))
+
+(defun systemd-service-SystemCallArchitectures (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "SystemCallArchitectures"))
+
+(defun systemd-service-SystemCallErrorNumber (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "SystemCallErrorNumber"))
+
+(defun systemd-service-Personality (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "Personality"))
+
+(defun systemd-service-RestrictAddressFamilies (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "RestrictAddressFamilies"))
+
+(defun systemd-service-RuntimeDirectoryMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "RuntimeDirectoryMode"))
+
+(defun systemd-service-RuntimeDirectory (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "RuntimeDirectory"))
+
+(defun systemd-service-KillMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "KillMode"))
+
+(defun systemd-service-KillSignal (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "KillSignal"))
+
+(defun systemd-service-SendSIGKILL (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "SendSIGKILL"))
+
+(defun systemd-service-SendSIGHUP (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-service "SendSIGHUP"))
+
+;;; org.freedesktop.systemd1.Slice
+
+(defconst systemd-dbus-interface-slice "org.freedesktop.systemd1.Slice")
+
+(defun systemd-slice-Slice (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "Slice"))
+
+(defun systemd-slice-ControlGroup (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "ControlGroup"))
+
+(defun systemd-slice-MemoryCurrent (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "MemoryCurrent"))
+
+(defun systemd-slice-CPUUsageNSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "CPUUsageNSec"))
+
+(defun systemd-slice-TasksCurrent (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "TasksCurrent"))
+
+(defun systemd-slice-GetProcesses (bus path)
+  (dbus-call-method bus systemd-dbus-service path
+                   systemd-dbus-interface-slice "GetProcesses"))
+
+(defun systemd-slice-Delegate (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "Delegate"))
+
+(defun systemd-slice-CPUAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "CPUAccounting"))
+
+(defun systemd-slice-CPUShares (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "CPUShares"))
+
+(defun systemd-slice-StartupCPUShares (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "StartupCPUShares"))
+
+(defun systemd-slice-CPUQuotaPerSecUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "CPUQuotaPerSecUSec"))
+
+(defun systemd-slice-IOAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "IOAccounting"))
+
+(defun systemd-slice-IOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "IOWeight"))
+
+(defun systemd-slice-StartupIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "StartupIOWeight"))
+
+(defun systemd-slice-IODeviceWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "IODeviceWeight"))
+
+(defun systemd-slice-IOReadBandwidthMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "IOReadBandwidthMax"))
+
+(defun systemd-slice-IOWriteBandwidthMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "IOWriteBandwidthMax"))
+
+(defun systemd-slice-IOReadIOPSMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "IOReadIOPSMax"))
+
+(defun systemd-slice-IOWriteIOPSMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "IOWriteIOPSMax"))
+
+(defun systemd-slice-BlockIOAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "BlockIOAccounting"))
+
+(defun systemd-slice-BlockIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "BlockIOWeight"))
+
+(defun systemd-slice-StartupBlockIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "StartupBlockIOWeight"))
+
+(defun systemd-slice-BlockIODeviceWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "BlockIODeviceWeight"))
+
+(defun systemd-slice-BlockIOReadBandwidth (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "BlockIOReadBandwidth"))
+
+(defun systemd-slice-BlockIOWriteBandwidth (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "BlockIOWriteBandwidth"))
+
+(defun systemd-slice-MemoryAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "MemoryAccounting"))
+
+(defun systemd-slice-MemoryLimit (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "MemoryLimit"))
+
+(defun systemd-slice-DevicePolicy (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "DevicePolicy"))
+
+(defun systemd-slice-DeviceAllow (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "DeviceAllow"))
+
+(defun systemd-slice-TasksAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "TasksAccounting"))
+
+(defun systemd-slice-TasksMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-slice "TasksMax"))
+
+;;; org.freedesktop.systemd1.Socket
+
+(defconst systemd-dbus-interface-socket "org.freedesktop.systemd1.Socket")
+
+(defun systemd-socket-BindIPv6Only (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "BindIPv6Only"))
+
+(defun systemd-socket-Backlog (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "Backlog"))
+
+(defun systemd-socket-TimeoutUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "TimeoutUSec"))
+
+(defun systemd-socket-BindToDevice (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "BindToDevice"))
+
+(defun systemd-socket-SocketUser (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SocketUser"))
+
+(defun systemd-socket-SocketGroup (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SocketGroup"))
+
+(defun systemd-socket-SocketMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SocketMode"))
+
+(defun systemd-socket-DirectoryMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "DirectoryMode"))
+
+(defun systemd-socket-Accept (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "Accept"))
+
+(defun systemd-socket-Writable (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "Writable"))
+
+(defun systemd-socket-KeepAlive (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "KeepAlive"))
+
+(defun systemd-socket-KeepAliveTimeUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "KeepAliveTimeUSec"))
+
+(defun systemd-socket-KeepAliveIntervalUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "KeepAliveIntervalUSec"))
+
+(defun systemd-socket-KeepAliveProbes (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "KeepAliveProbes"))
+
+(defun systemd-socket-DeferAcceptUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "DeferAcceptUSec"))
+
+(defun systemd-socket-NoDelay (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "NoDelay"))
+
+(defun systemd-socket-Priority (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "Priority"))
+
+(defun systemd-socket-ReceiveBuffer (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "ReceiveBuffer"))
+
+(defun systemd-socket-SendBuffer (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SendBuffer"))
+
+(defun systemd-socket-IPTOS (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "IPTOS"))
+
+(defun systemd-socket-IPTTL (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "IPTTL"))
+
+(defun systemd-socket-PipeSize (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "PipeSize"))
+
+(defun systemd-socket-FreeBind (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "FreeBind"))
+
+(defun systemd-socket-Transparent (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "Transparent"))
+
+(defun systemd-socket-Broadcast (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "Broadcast"))
+
+(defun systemd-socket-PassCredentials (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "PassCredentials"))
+
+(defun systemd-socket-PassSecurity (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "PassSecurity"))
+
+(defun systemd-socket-RemoveOnStop (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "RemoveOnStop"))
+
+(defun systemd-socket-Listen (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "Listen"))
+
+(defun systemd-socket-Symlinks (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "Symlinks"))
+
+(defun systemd-socket-Mark (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "Mark"))
+
+(defun systemd-socket-MaxConnections (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "MaxConnections"))
+
+(defun systemd-socket-MessageQueueMaxMessages (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "MessageQueueMaxMessages"))
+
+(defun systemd-socket-MessageQueueMessageSize (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "MessageQueueMessageSize"))
+
+(defun systemd-socket-ReusePort (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "ReusePort"))
+
+(defun systemd-socket-SmackLabel (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SmackLabel"))
+
+(defun systemd-socket-SmackLabelIPIn (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SmackLabelIPIn"))
+
+(defun systemd-socket-SmackLabelIPOut (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SmackLabelIPOut"))
+
+(defun systemd-socket-ControlPID (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "ControlPID"))
+
+(defun systemd-socket-Result (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "Result"))
+
+(defun systemd-socket-NConnections (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "NConnections"))
+
+(defun systemd-socket-NAccepted (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "NAccepted"))
+
+(defun systemd-socket-FileDescriptorName (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "FileDescriptorName"))
+
+(defun systemd-socket-SocketProtocol (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SocketProtocol"))
+
+(defun systemd-socket-TriggerLimitIntervalUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "TriggerLimitIntervalUSec"))
+
+(defun systemd-socket-TriggerLimitBurst (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "TriggerLimitBurst"))
+
+(defun systemd-socket-ExecStartPre (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "ExecStartPre"))
+
+(defun systemd-socket-ExecStartPost (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "ExecStartPost"))
+
+(defun systemd-socket-ExecStopPre (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "ExecStopPre"))
+
+(defun systemd-socket-ExecStopPost (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "ExecStopPost"))
+
+(defun systemd-socket-Slice (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "Slice"))
+
+(defun systemd-socket-ControlGroup (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "ControlGroup"))
+
+(defun systemd-socket-MemoryCurrent (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "MemoryCurrent"))
+
+(defun systemd-socket-CPUUsageNSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "CPUUsageNSec"))
+
+(defun systemd-socket-TasksCurrent (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "TasksCurrent"))
+
+(defun systemd-socket-GetProcesses (bus path)
+  (dbus-call-method bus systemd-dbus-service path
+                   systemd-dbus-interface-socket "GetProcesses"))
+
+(defun systemd-socket-Delegate (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "Delegate"))
+
+(defun systemd-socket-CPUAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "CPUAccounting"))
+
+(defun systemd-socket-CPUShares (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "CPUShares"))
+
+(defun systemd-socket-StartupCPUShares (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "StartupCPUShares"))
+
+(defun systemd-socket-CPUQuotaPerSecUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "CPUQuotaPerSecUSec"))
+
+(defun systemd-socket-IOAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "IOAccounting"))
+
+(defun systemd-socket-IOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "IOWeight"))
+
+(defun systemd-socket-StartupIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "StartupIOWeight"))
+
+(defun systemd-socket-IODeviceWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "IODeviceWeight"))
+
+(defun systemd-socket-IOReadBandwidthMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "IOReadBandwidthMax"))
+
+(defun systemd-socket-IOWriteBandwidthMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "IOWriteBandwidthMax"))
+
+(defun systemd-socket-IOReadIOPSMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "IOReadIOPSMax"))
+
+(defun systemd-socket-IOWriteIOPSMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "IOWriteIOPSMax"))
+
+(defun systemd-socket-BlockIOAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "BlockIOAccounting"))
+
+(defun systemd-socket-BlockIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "BlockIOWeight"))
+
+(defun systemd-socket-StartupBlockIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "StartupBlockIOWeight"))
+
+(defun systemd-socket-BlockIODeviceWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "BlockIODeviceWeight"))
+
+(defun systemd-socket-BlockIOReadBandwidth (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "BlockIOReadBandwidth"))
+
+(defun systemd-socket-BlockIOWriteBandwidth (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "BlockIOWriteBandwidth"))
+
+(defun systemd-socket-MemoryAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "MemoryAccounting"))
+
+(defun systemd-socket-MemoryLimit (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "MemoryLimit"))
+
+(defun systemd-socket-DevicePolicy (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "DevicePolicy"))
+
+(defun systemd-socket-DeviceAllow (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "DeviceAllow"))
+
+(defun systemd-socket-TasksAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "TasksAccounting"))
+
+(defun systemd-socket-TasksMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "TasksMax"))
+
+(defun systemd-socket-Environment (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "Environment"))
+
+(defun systemd-socket-EnvironmentFiles (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "EnvironmentFiles"))
+
+(defun systemd-socket-PassEnvironment (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "PassEnvironment"))
+
+(defun systemd-socket-UMask (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "UMask"))
+
+(defun systemd-socket-LimitCPU (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitCPU"))
+
+(defun systemd-socket-LimitCPUSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitCPUSoft"))
+
+(defun systemd-socket-LimitFSIZE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitFSIZE"))
+
+(defun systemd-socket-LimitFSIZESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitFSIZESoft"))
+
+(defun systemd-socket-LimitDATA (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitDATA"))
+
+(defun systemd-socket-LimitDATASoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitDATASoft"))
+
+(defun systemd-socket-LimitSTACK (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitSTACK"))
+
+(defun systemd-socket-LimitSTACKSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitSTACKSoft"))
+
+(defun systemd-socket-LimitCORE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitCORE"))
+
+(defun systemd-socket-LimitCORESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitCORESoft"))
+
+(defun systemd-socket-LimitRSS (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitRSS"))
+
+(defun systemd-socket-LimitRSSSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitRSSSoft"))
+
+(defun systemd-socket-LimitNOFILE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitNOFILE"))
+
+(defun systemd-socket-LimitNOFILESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitNOFILESoft"))
+
+(defun systemd-socket-LimitAS (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitAS"))
+
+(defun systemd-socket-LimitASSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitASSoft"))
+
+(defun systemd-socket-LimitNPROC (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitNPROC"))
+
+(defun systemd-socket-LimitNPROCSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitNPROCSoft"))
+
+(defun systemd-socket-LimitMEMLOCK (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitMEMLOCK"))
+
+(defun systemd-socket-LimitMEMLOCKSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitMEMLOCKSoft"))
+
+(defun systemd-socket-LimitLOCKS (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitLOCKS"))
+
+(defun systemd-socket-LimitLOCKSSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitLOCKSSoft"))
+
+(defun systemd-socket-LimitSIGPENDING (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitSIGPENDING"))
+
+(defun systemd-socket-LimitSIGPENDINGSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitSIGPENDINGSoft"))
+
+(defun systemd-socket-LimitMSGQUEUE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitMSGQUEUE"))
+
+(defun systemd-socket-LimitMSGQUEUESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitMSGQUEUESoft"))
+
+(defun systemd-socket-LimitNICE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitNICE"))
+
+(defun systemd-socket-LimitNICESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitNICESoft"))
+
+(defun systemd-socket-LimitRTPRIO (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitRTPRIO"))
+
+(defun systemd-socket-LimitRTPRIOSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitRTPRIOSoft"))
+
+(defun systemd-socket-LimitRTTIME (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitRTTIME"))
+
+(defun systemd-socket-LimitRTTIMESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "LimitRTTIMESoft"))
+
+(defun systemd-socket-WorkingDirectory (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "WorkingDirectory"))
+
+(defun systemd-socket-RootDirectory (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "RootDirectory"))
+
+(defun systemd-socket-OOMScoreAdjust (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "OOMScoreAdjust"))
+
+(defun systemd-socket-Nice (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "Nice"))
+
+(defun systemd-socket-IOScheduling (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "IOScheduling"))
+
+(defun systemd-socket-CPUSchedulingPolicy (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "CPUSchedulingPolicy"))
+
+(defun systemd-socket-CPUSchedulingPriority (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "CPUSchedulingPriority"))
+
+(defun systemd-socket-CPUAffinity (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "CPUAffinity"))
+
+(defun systemd-socket-TimerSlackNSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "TimerSlackNSec"))
+
+(defun systemd-socket-CPUSchedulingResetOnFork (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "CPUSchedulingResetOnFork"))
+
+(defun systemd-socket-NonBlocking (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "NonBlocking"))
+
+(defun systemd-socket-StandardInput (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "StandardInput"))
+
+(defun systemd-socket-StandardOutput (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "StandardOutput"))
+
+(defun systemd-socket-StandardError (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "StandardError"))
+
+(defun systemd-socket-TTYPath (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "TTYPath"))
+
+(defun systemd-socket-TTYReset (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "TTYReset"))
+
+(defun systemd-socket-TTYVHangup (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "TTYVHangup"))
+
+(defun systemd-socket-TTYVTDisallocate (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "TTYVTDisallocate"))
+
+(defun systemd-socket-SyslogPriority (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SyslogPriority"))
+
+(defun systemd-socket-SyslogIdentifier (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SyslogIdentifier"))
+
+(defun systemd-socket-SyslogLevelPrefix (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SyslogLevelPrefix"))
+
+(defun systemd-socket-SyslogLevel (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SyslogLevel"))
+
+(defun systemd-socket-SyslogFacility (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SyslogFacility"))
+
+(defun systemd-socket-SecureBits (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SecureBits"))
+
+(defun systemd-socket-CapabilityBoundingSet (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "CapabilityBoundingSet"))
+
+(defun systemd-socket-AmbientCapabilities (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "AmbientCapabilities"))
+
+(defun systemd-socket-User (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "User"))
+
+(defun systemd-socket-Group (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "Group"))
+
+(defun systemd-socket-SupplementaryGroups (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SupplementaryGroups"))
+
+(defun systemd-socket-PAMName (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "PAMName"))
+
+(defun systemd-socket-ReadWriteDirectories (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "ReadWriteDirectories"))
+
+(defun systemd-socket-ReadOnlyDirectories (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "ReadOnlyDirectories"))
+
+(defun systemd-socket-InaccessibleDirectories (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "InaccessibleDirectories"))
+
+(defun systemd-socket-MountFlags (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "MountFlags"))
+
+(defun systemd-socket-PrivateTmp (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "PrivateTmp"))
+
+(defun systemd-socket-PrivateNetwork (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "PrivateNetwork"))
+
+(defun systemd-socket-PrivateDevices (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "PrivateDevices"))
+
+(defun systemd-socket-ProtectHome (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "ProtectHome"))
+
+(defun systemd-socket-ProtectSystem (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "ProtectSystem"))
+
+(defun systemd-socket-SameProcessGroup (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SameProcessGroup"))
+
+(defun systemd-socket-UtmpIdentifier (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "UtmpIdentifier"))
+
+(defun systemd-socket-UtmpMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "UtmpMode"))
+
+(defun systemd-socket-SELinuxContext (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SELinuxContext"))
+
+(defun systemd-socket-AppArmorProfile (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "AppArmorProfile"))
+
+(defun systemd-socket-SmackProcessLabel (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SmackProcessLabel"))
+
+(defun systemd-socket-IgnoreSIGPIPE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "IgnoreSIGPIPE"))
+
+(defun systemd-socket-NoNewPrivileges (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "NoNewPrivileges"))
+
+(defun systemd-socket-SystemCallFilter (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SystemCallFilter"))
+
+(defun systemd-socket-SystemCallArchitectures (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SystemCallArchitectures"))
+
+(defun systemd-socket-SystemCallErrorNumber (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SystemCallErrorNumber"))
+
+(defun systemd-socket-Personality (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "Personality"))
+
+(defun systemd-socket-RestrictAddressFamilies (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "RestrictAddressFamilies"))
+
+(defun systemd-socket-RuntimeDirectoryMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "RuntimeDirectoryMode"))
+
+(defun systemd-socket-RuntimeDirectory (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "RuntimeDirectory"))
+
+(defun systemd-socket-KillMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "KillMode"))
+
+(defun systemd-socket-KillSignal (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "KillSignal"))
+
+(defun systemd-socket-SendSIGKILL (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SendSIGKILL"))
+
+(defun systemd-socket-SendSIGHUP (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-socket "SendSIGHUP"))
+
+;;; org.freedesktop.systemd1.Swap
+
+(defconst systemd-dbus-interface-swap "org.freedesktop.systemd1.Swap")
+
+(defun systemd-swap-What (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "What"))
+
+(defun systemd-swap-Priority (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "Priority"))
+
+(defun systemd-swap-Options (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "Options"))
+
+(defun systemd-swap-TimeoutUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "TimeoutUSec"))
+
+(defun systemd-swap-ControlPID (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "ControlPID"))
+
+(defun systemd-swap-Result (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "Result"))
+
+(defun systemd-swap-ExecActivate (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "ExecActivate"))
+
+(defun systemd-swap-ExecDeactivate (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "ExecDeactivate"))
+
+(defun systemd-swap-Slice (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "Slice"))
+
+(defun systemd-swap-ControlGroup (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "ControlGroup"))
+
+(defun systemd-swap-MemoryCurrent (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "MemoryCurrent"))
+
+(defun systemd-swap-CPUUsageNSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "CPUUsageNSec"))
+
+(defun systemd-swap-TasksCurrent (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "TasksCurrent"))
+
+(defun systemd-swap-GetProcesses (bus path)
+  (dbus-call-method bus systemd-dbus-service path
+                   systemd-dbus-interface-swap "GetProcesses"))
+
+(defun systemd-swap-Delegate (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "Delegate"))
+
+(defun systemd-swap-CPUAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "CPUAccounting"))
+
+(defun systemd-swap-CPUShares (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "CPUShares"))
+
+(defun systemd-swap-StartupCPUShares (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "StartupCPUShares"))
+
+(defun systemd-swap-CPUQuotaPerSecUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "CPUQuotaPerSecUSec"))
+
+(defun systemd-swap-IOAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "IOAccounting"))
+
+(defun systemd-swap-IOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "IOWeight"))
+
+(defun systemd-swap-StartupIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "StartupIOWeight"))
+
+(defun systemd-swap-IODeviceWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "IODeviceWeight"))
+
+(defun systemd-swap-IOReadBandwidthMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "IOReadBandwidthMax"))
+
+(defun systemd-swap-IOWriteBandwidthMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "IOWriteBandwidthMax"))
+
+(defun systemd-swap-IOReadIOPSMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "IOReadIOPSMax"))
+
+(defun systemd-swap-IOWriteIOPSMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "IOWriteIOPSMax"))
+
+(defun systemd-swap-BlockIOAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "BlockIOAccounting"))
+
+(defun systemd-swap-BlockIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "BlockIOWeight"))
+
+(defun systemd-swap-StartupBlockIOWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "StartupBlockIOWeight"))
+
+(defun systemd-swap-BlockIODeviceWeight (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "BlockIODeviceWeight"))
+
+(defun systemd-swap-BlockIOReadBandwidth (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "BlockIOReadBandwidth"))
+
+(defun systemd-swap-BlockIOWriteBandwidth (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "BlockIOWriteBandwidth"))
+
+(defun systemd-swap-MemoryAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "MemoryAccounting"))
+
+(defun systemd-swap-MemoryLimit (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "MemoryLimit"))
+
+(defun systemd-swap-DevicePolicy (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "DevicePolicy"))
+
+(defun systemd-swap-DeviceAllow (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "DeviceAllow"))
+
+(defun systemd-swap-TasksAccounting (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "TasksAccounting"))
+
+(defun systemd-swap-TasksMax (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "TasksMax"))
+
+(defun systemd-swap-Environment (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "Environment"))
+
+(defun systemd-swap-EnvironmentFiles (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "EnvironmentFiles"))
+
+(defun systemd-swap-PassEnvironment (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "PassEnvironment"))
+
+(defun systemd-swap-UMask (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "UMask"))
+
+(defun systemd-swap-LimitCPU (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitCPU"))
+
+(defun systemd-swap-LimitCPUSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitCPUSoft"))
+
+(defun systemd-swap-LimitFSIZE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitFSIZE"))
+
+(defun systemd-swap-LimitFSIZESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitFSIZESoft"))
+
+(defun systemd-swap-LimitDATA (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitDATA"))
+
+(defun systemd-swap-LimitDATASoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitDATASoft"))
+
+(defun systemd-swap-LimitSTACK (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitSTACK"))
+
+(defun systemd-swap-LimitSTACKSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitSTACKSoft"))
+
+(defun systemd-swap-LimitCORE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitCORE"))
+
+(defun systemd-swap-LimitCORESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitCORESoft"))
+
+(defun systemd-swap-LimitRSS (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitRSS"))
+
+(defun systemd-swap-LimitRSSSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitRSSSoft"))
+
+(defun systemd-swap-LimitNOFILE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitNOFILE"))
+
+(defun systemd-swap-LimitNOFILESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitNOFILESoft"))
+
+(defun systemd-swap-LimitAS (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitAS"))
+
+(defun systemd-swap-LimitASSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitASSoft"))
+
+(defun systemd-swap-LimitNPROC (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitNPROC"))
+
+(defun systemd-swap-LimitNPROCSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitNPROCSoft"))
+
+(defun systemd-swap-LimitMEMLOCK (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitMEMLOCK"))
+
+(defun systemd-swap-LimitMEMLOCKSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitMEMLOCKSoft"))
+
+(defun systemd-swap-LimitLOCKS (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitLOCKS"))
+
+(defun systemd-swap-LimitLOCKSSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitLOCKSSoft"))
+
+(defun systemd-swap-LimitSIGPENDING (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitSIGPENDING"))
+
+(defun systemd-swap-LimitSIGPENDINGSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitSIGPENDINGSoft"))
+
+(defun systemd-swap-LimitMSGQUEUE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitMSGQUEUE"))
+
+(defun systemd-swap-LimitMSGQUEUESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitMSGQUEUESoft"))
+
+(defun systemd-swap-LimitNICE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitNICE"))
+
+(defun systemd-swap-LimitNICESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitNICESoft"))
+
+(defun systemd-swap-LimitRTPRIO (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitRTPRIO"))
+
+(defun systemd-swap-LimitRTPRIOSoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitRTPRIOSoft"))
+
+(defun systemd-swap-LimitRTTIME (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitRTTIME"))
+
+(defun systemd-swap-LimitRTTIMESoft (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "LimitRTTIMESoft"))
+
+(defun systemd-swap-WorkingDirectory (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "WorkingDirectory"))
+
+(defun systemd-swap-RootDirectory (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "RootDirectory"))
+
+(defun systemd-swap-OOMScoreAdjust (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "OOMScoreAdjust"))
+
+(defun systemd-swap-Nice (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "Nice"))
+
+(defun systemd-swap-IOScheduling (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "IOScheduling"))
+
+(defun systemd-swap-CPUSchedulingPolicy (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "CPUSchedulingPolicy"))
+
+(defun systemd-swap-CPUSchedulingPriority (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "CPUSchedulingPriority"))
+
+(defun systemd-swap-CPUAffinity (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "CPUAffinity"))
+
+(defun systemd-swap-TimerSlackNSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "TimerSlackNSec"))
+
+(defun systemd-swap-CPUSchedulingResetOnFork (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "CPUSchedulingResetOnFork"))
+
+(defun systemd-swap-NonBlocking (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "NonBlocking"))
+
+(defun systemd-swap-StandardInput (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "StandardInput"))
+
+(defun systemd-swap-StandardOutput (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "StandardOutput"))
+
+(defun systemd-swap-StandardError (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "StandardError"))
+
+(defun systemd-swap-TTYPath (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "TTYPath"))
+
+(defun systemd-swap-TTYReset (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "TTYReset"))
+
+(defun systemd-swap-TTYVHangup (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "TTYVHangup"))
+
+(defun systemd-swap-TTYVTDisallocate (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "TTYVTDisallocate"))
+
+(defun systemd-swap-SyslogPriority (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "SyslogPriority"))
+
+(defun systemd-swap-SyslogIdentifier (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "SyslogIdentifier"))
+
+(defun systemd-swap-SyslogLevelPrefix (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "SyslogLevelPrefix"))
+
+(defun systemd-swap-SyslogLevel (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "SyslogLevel"))
+
+(defun systemd-swap-SyslogFacility (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "SyslogFacility"))
+
+(defun systemd-swap-SecureBits (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "SecureBits"))
+
+(defun systemd-swap-CapabilityBoundingSet (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "CapabilityBoundingSet"))
+
+(defun systemd-swap-AmbientCapabilities (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "AmbientCapabilities"))
+
+(defun systemd-swap-User (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "User"))
+
+(defun systemd-swap-Group (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "Group"))
+
+(defun systemd-swap-SupplementaryGroups (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "SupplementaryGroups"))
+
+(defun systemd-swap-PAMName (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "PAMName"))
+
+(defun systemd-swap-ReadWriteDirectories (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "ReadWriteDirectories"))
+
+(defun systemd-swap-ReadOnlyDirectories (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "ReadOnlyDirectories"))
+
+(defun systemd-swap-InaccessibleDirectories (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "InaccessibleDirectories"))
+
+(defun systemd-swap-MountFlags (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "MountFlags"))
+
+(defun systemd-swap-PrivateTmp (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "PrivateTmp"))
+
+(defun systemd-swap-PrivateNetwork (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "PrivateNetwork"))
+
+(defun systemd-swap-PrivateDevices (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "PrivateDevices"))
+
+(defun systemd-swap-ProtectHome (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "ProtectHome"))
+
+(defun systemd-swap-ProtectSystem (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "ProtectSystem"))
+
+(defun systemd-swap-SameProcessGroup (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "SameProcessGroup"))
+
+(defun systemd-swap-UtmpIdentifier (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "UtmpIdentifier"))
+
+(defun systemd-swap-UtmpMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "UtmpMode"))
+
+(defun systemd-swap-SELinuxContext (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "SELinuxContext"))
+
+(defun systemd-swap-AppArmorProfile (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "AppArmorProfile"))
+
+(defun systemd-swap-SmackProcessLabel (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "SmackProcessLabel"))
+
+(defun systemd-swap-IgnoreSIGPIPE (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "IgnoreSIGPIPE"))
+
+(defun systemd-swap-NoNewPrivileges (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "NoNewPrivileges"))
+
+(defun systemd-swap-SystemCallFilter (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "SystemCallFilter"))
+
+(defun systemd-swap-SystemCallArchitectures (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "SystemCallArchitectures"))
+
+(defun systemd-swap-SystemCallErrorNumber (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "SystemCallErrorNumber"))
+
+(defun systemd-swap-Personality (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "Personality"))
+
+(defun systemd-swap-RestrictAddressFamilies (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "RestrictAddressFamilies"))
+
+(defun systemd-swap-RuntimeDirectoryMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "RuntimeDirectoryMode"))
+
+(defun systemd-swap-RuntimeDirectory (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "RuntimeDirectory"))
+
+(defun systemd-swap-KillMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "KillMode"))
+
+(defun systemd-swap-KillSignal (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "KillSignal"))
+
+(defun systemd-swap-SendSIGKILL (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "SendSIGKILL"))
+
+(defun systemd-swap-SendSIGHUP (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-swap "SendSIGHUP"))
+
+;;; org.freedesktop.systemd1.Target
+
+(defconst systemd-dbus-interface-target "org.freedesktop.systemd1.Target")
+
+;;; org.freedesktop.systemd1.Timer
+
+(defconst systemd-dbus-interface-timer "org.freedesktop.systemd1.Timer")
+
+(defun systemd-timer-Unit (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-timer "Unit"))
+
+(defun systemd-timer-TimersMonotonic (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-timer "TimersMonotonic"))
+
+(defun systemd-timer-TimersCalendar (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-timer "TimersCalendar"))
+
+(defun systemd-timer-NextElapseUSecRealtime (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-timer "NextElapseUSecRealtime"))
+
+(defun systemd-timer-NextElapseUSecMonotonic (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-timer "NextElapseUSecMonotonic"))
+
+(defun systemd-timer-LastTriggerUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-timer "LastTriggerUSec"))
+
+(defun systemd-timer-LastTriggerUSecMonotonic (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-timer "LastTriggerUSecMonotonic"))
+
+(defun systemd-timer-Result (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-timer "Result"))
+
+(defun systemd-timer-AccuracyUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-timer "AccuracyUSec"))
+
+(defun systemd-timer-RandomizedDelayUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-timer "RandomizedDelayUSec"))
+
+(defun systemd-timer-Persistent (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-timer "Persistent"))
+
+(defun systemd-timer-WakeSystem (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-timer "WakeSystem"))
+
+(defun systemd-timer-RemainAfterElapse (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-timer "RemainAfterElapse"))
+
+;;; org.freedesktop.systemd1.Unit
+
+(defconst systemd-dbus-interface-unit "org.freedesktop.systemd1.Unit")
+
+(defun systemd-unit-Id (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "Id"))
+
+(defun systemd-unit-Names (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "Names"))
+
+(defun systemd-unit-Following (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "Following"))
+
+(defun systemd-unit-Requires (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "Requires"))
+
+(defun systemd-unit-Requisite (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "Requisite"))
+
+(defun systemd-unit-Wants (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "Wants"))
+
+(defun systemd-unit-BindsTo (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "BindsTo"))
+
+(defun systemd-unit-PartOf (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "PartOf"))
+
+(defun systemd-unit-RequiredBy (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "RequiredBy"))
+
+(defun systemd-unit-RequisiteOf (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "RequisiteOf"))
+
+(defun systemd-unit-WantedBy (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "WantedBy"))
+
+(defun systemd-unit-BoundBy (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "BoundBy"))
+
+(defun systemd-unit-ConsistsOf (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "ConsistsOf"))
+
+(defun systemd-unit-Conflicts (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "Conflicts"))
+
+(defun systemd-unit-ConflictedBy (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "ConflictedBy"))
+
+(defun systemd-unit-Before (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "Before"))
+
+(defun systemd-unit-After (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "After"))
+
+(defun systemd-unit-OnFailure (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "OnFailure"))
+
+(defun systemd-unit-Triggers (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "Triggers"))
+
+(defun systemd-unit-TriggeredBy (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "TriggeredBy"))
+
+(defun systemd-unit-PropagatesReloadTo (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "PropagatesReloadTo"))
+
+(defun systemd-unit-ReloadPropagatedFrom (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "ReloadPropagatedFrom"))
+
+(defun systemd-unit-JoinsNamespaceOf (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "JoinsNamespaceOf"))
+
+(defun systemd-unit-RequiresMountsFor (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "RequiresMountsFor"))
+
+(defun systemd-unit-Documentation (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "Documentation"))
+
+(defun systemd-unit-Description (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "Description"))
+
+(defun systemd-unit-LoadState (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "LoadState"))
+
+(defun systemd-unit-ActiveState (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "ActiveState"))
+
+(defun systemd-unit-SubState (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "SubState"))
+
+(defun systemd-unit-FragmentPath (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "FragmentPath"))
+
+(defun systemd-unit-SourcePath (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "SourcePath"))
+
+(defun systemd-unit-DropInPaths (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "DropInPaths"))
+
+(defun systemd-unit-UnitFileState (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "UnitFileState"))
+
+(defun systemd-unit-UnitFilePreset (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "UnitFilePreset"))
+
+(defun systemd-unit-StateChangeTimestamp (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "StateChangeTimestamp"))
+
+(defun systemd-unit-StateChangeTimestampMonotonic (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit 
"StateChangeTimestampMonotonic"))
+
+(defun systemd-unit-InactiveExitTimestamp (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "InactiveExitTimestamp"))
+
+(defun systemd-unit-InactiveExitTimestampMonotonic (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit 
"InactiveExitTimestampMonotonic"))
+
+(defun systemd-unit-ActiveEnterTimestamp (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "ActiveEnterTimestamp"))
+
+(defun systemd-unit-ActiveEnterTimestampMonotonic (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit 
"ActiveEnterTimestampMonotonic"))
+
+(defun systemd-unit-ActiveExitTimestamp (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "ActiveExitTimestamp"))
+
+(defun systemd-unit-ActiveExitTimestampMonotonic (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit 
"ActiveExitTimestampMonotonic"))
+
+(defun systemd-unit-InactiveEnterTimestamp (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "InactiveEnterTimestamp"))
+
+(defun systemd-unit-InactiveEnterTimestampMonotonic (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit 
"InactiveEnterTimestampMonotonic"))
+
+(defun systemd-unit-CanStart (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "CanStart"))
+
+(defun systemd-unit-CanStop (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "CanStop"))
+
+(defun systemd-unit-CanReload (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "CanReload"))
+
+(defun systemd-unit-CanIsolate (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "CanIsolate"))
+
+(defun systemd-unit-Job (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "Job"))
+
+(defun systemd-unit-StopWhenUnneeded (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "StopWhenUnneeded"))
+
+(defun systemd-unit-RefuseManualStart (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "RefuseManualStart"))
+
+(defun systemd-unit-RefuseManualStop (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "RefuseManualStop"))
+
+(defun systemd-unit-AllowIsolate (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "AllowIsolate"))
+
+(defun systemd-unit-DefaultDependencies (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "DefaultDependencies"))
+
+(defun systemd-unit-OnFailureJobMode (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "OnFailureJobMode"))
+
+(defun systemd-unit-IgnoreOnIsolate (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "IgnoreOnIsolate"))
+
+(defun systemd-unit-NeedDaemonReload (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "NeedDaemonReload"))
+
+(defun systemd-unit-JobTimeoutUSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "JobTimeoutUSec"))
+
+(defun systemd-unit-JobTimeoutAction (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "JobTimeoutAction"))
+
+(defun systemd-unit-JobTimeoutRebootArgument (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "JobTimeoutRebootArgument"))
+
+(defun systemd-unit-ConditionResult (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "ConditionResult"))
+
+(defun systemd-unit-AssertResult (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "AssertResult"))
+
+(defun systemd-unit-ConditionTimestamp (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "ConditionTimestamp"))
+
+(defun systemd-unit-ConditionTimestampMonotonic (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "ConditionTimestampMonotonic"))
+
+(defun systemd-unit-AssertTimestamp (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "AssertTimestamp"))
+
+(defun systemd-unit-AssertTimestampMonotonic (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "AssertTimestampMonotonic"))
+
+(defun systemd-unit-Conditions (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "Conditions"))
+
+(defun systemd-unit-Asserts (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "Asserts"))
+
+(defun systemd-unit-LoadError (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "LoadError"))
+
+(defun systemd-unit-Transient (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "Transient"))
+
+(defun systemd-unit-StartLimitIntervalSec (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "StartLimitIntervalSec"))
+
+(defun systemd-unit-StartLimitBurst (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "StartLimitBurst"))
+
+(defun systemd-unit-StartLimitAction (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "StartLimitAction"))
+
+(defun systemd-unit-RebootArgument (bus path)
+  "Read only property."
+  (dbus-get-property bus systemd-dbus-service path
+                    systemd-dbus-interface-unit "RebootArgument"))
+
+(defun systemd-unit-Start (bus path &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service path
+        systemd-dbus-interface-unit "Start" args))
+
+(defun systemd-unit-Stop (bus path &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service path
+        systemd-dbus-interface-unit "Stop" args))
+
+(defun systemd-unit-Reload (bus path &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service path
+        systemd-dbus-interface-unit "Reload" args))
+
+(defun systemd-unit-Restart (bus path &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service path
+        systemd-dbus-interface-unit "Restart" args))
+
+(defun systemd-unit-TryRestart (bus path &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service path
+        systemd-dbus-interface-unit "TryRestart" args))
+
+(defun systemd-unit-ReloadOrRestart (bus path &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service path
+        systemd-dbus-interface-unit "ReloadOrRestart" args))
+
+(defun systemd-unit-ReloadOrTryRestart (bus path &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service path
+        systemd-dbus-interface-unit "ReloadOrTryRestart" args))
+
+(defun systemd-unit-Kill (bus path &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service path
+        systemd-dbus-interface-unit "Kill" args))
+
+(defun systemd-unit-ResetFailed (bus path)
+  (dbus-call-method bus systemd-dbus-service path
+                   systemd-dbus-interface-unit "ResetFailed"))
+
+(defun systemd-unit-SetProperties (bus path &rest args)
+  (apply #'dbus-call-method bus systemd-dbus-service path
+        systemd-dbus-interface-unit "SetProperties" args))
+
+(provide 'systemd)
+;;; systemd.el ends here
diff --git a/packages/temp-buffer-browse/temp-buffer-browse.el 
b/packages/temp-buffer-browse/temp-buffer-browse.el
index 70871af..0a63ac2 100644
--- a/packages/temp-buffer-browse/temp-buffer-browse.el
+++ b/packages/temp-buffer-browse/temp-buffer-browse.el
@@ -1,9 +1,10 @@
 ;;; temp-buffer-browse.el --- temp buffer browse mode  -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2013-2014  Free Software Foundation, Inc.
+;; Copyright (C) 2013-2016  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
-;; Version: 1.4
+;; Version: 1.5
+;; Package-Requires: ((emacs "24"))
 ;; Keywords: convenience
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -96,6 +97,9 @@
     (define-key map [backspace] down)
     map))
 
+(defvar temp-buffer-browse--last-exit #'ignore
+  "The \"exit-function\" of the last call to `set-transient-map'.")
+
 ;;;###autoload
 (defun temp-buffer-browse-activate ()
   "Activate temporary key bindings for current window.
@@ -133,17 +137,24 @@ scroll down and close the temp buffer window, 
respectively."
       ;; negative priority.
       (unless (bound-and-true-p adaptive-wrap-prefix-mode)
         (overlay-put o 'wrap-prefix (overlay-get o 'line-prefix)))
-      (set-transient-map
-       temp-buffer-browse-map
-       (lambda ()
-         ;; When any error happens the keymap is active forever.
-         (with-demoted-errors
-           (or (and (window-live-p temp-buffer-browse--window)
-                    (not (member (this-command-keys) '("\C-m" [return])))
-                    (eq this-command (lookup-key temp-buffer-browse-map
-                                                 (this-command-keys))))
-               (ignore (overlay-put o 'line-prefix nil)
-                       (overlay-put o 'wrap-prefix nil)))))))))
+      ;; Workaround for bug http://debbugs.gnu.org/24149.
+      (funcall temp-buffer-browse--last-exit)
+      (setq temp-buffer-browse--last-exit
+            (set-transient-map
+             temp-buffer-browse-map
+             (lambda ()
+               ;; If uncaught any error will make the keymap active
+               ;; forever.
+               (condition-case err
+                   (or (and (window-live-p temp-buffer-browse--window)
+                            (not (member (this-command-keys) '("\C-m" 
[return])))
+                            (eq this-command (lookup-key temp-buffer-browse-map
+                                                         (this-command-keys))))
+                       (ignore (setq temp-buffer-browse--last-exit #'ignore)
+                               (overlay-put o 'line-prefix nil)
+                               (overlay-put o 'wrap-prefix nil)))
+                 (error (message "%s:%s" this-command (error-message-string 
err))
+                        nil))))))))
 
 ;;;###autoload
 (define-minor-mode temp-buffer-browse-mode nil
diff --git a/packages/test-simple/Carton b/packages/test-simple/Carton
deleted file mode 100644
index b039f40..0000000
--- a/packages/test-simple/Carton
+++ /dev/null
@@ -1,4 +0,0 @@
-(source "melpa" "http://melpa.milkbox.net/packages/";)
-
-(package "test-simple" "0.2.1"
-        "Unit tests for GNU emacs that work interactively and in batch")
diff --git a/packages/test-simple/Cask b/packages/test-simple/Cask
new file mode 100644
index 0000000..ee870dc
--- /dev/null
+++ b/packages/test-simple/Cask
@@ -0,0 +1,4 @@
+(source gnu)
+(source melpa)
+
+(package-file "test-simple.el")
diff --git a/packages/test-simple/Makefile.am b/packages/test-simple/Makefile.am
index a1c318c..abf9c32 100644
--- a/packages/test-simple/Makefile.am
+++ b/packages/test-simple/Makefile.am
@@ -9,7 +9,7 @@ lisp_files := $(wildcard *.el)
 lisp_LISP = $(lisp_files)
 test_files := $(wildcard test/*.el)
 
-EXTRA_DIST = $(lisp_files) $(test_files) README THANKS README.md COPYING
+EXTRA_DIST = $(lisp_files) $(test_files) README THANKS README.md
 
 CHECK_FILES = $(notdir $(test_files:.el=.run))
 
diff --git a/packages/test-simple/README.md b/packages/test-simple/README.md
index 7a473b0..431e054 100644
--- a/packages/test-simple/README.md
+++ b/packages/test-simple/README.md
@@ -67,5 +67,20 @@ Now let's try from a command line:
     ......
     0 failures in 6 assertions (0.000723 seconds)
 
+You can run noninteractive tests inside Emacs by `test-simple-run`.
+Add the following at a test file:
+
+    ;;;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+
+Press C-x C-e at the `test-simple-run` line to run this test file.
+Then press C-x C-z, which is customizable by `test-simple-runner-key`, to run 
it more.
+If you have installed `bpr` package, use it by default because it only pops up 
window when the running program exits abnormally.
+
+`test-simple-run` can be called interactively.
+In this case, the command line is set above as the simplest case.
+But you run test with dependency, you must use the sexp comment form.
+
+    ;;;; (test-simple-run "emacs -batch -L %s -L %s -l %s" 
(file-name-directory (locate-library "test-simple.elc")) (file-name-directory 
(locate-library "foo")) buffer-file-name)
+
 *Author:*  Rocky Bernstein <address@hidden> <br>
 
[![endorse](https://api.coderwall.com/rocky/endorsecount.png)](https://coderwall.com/rocky)
diff --git a/packages/test-simple/THANKS b/packages/test-simple/THANKS
index 4dae07d..a0e7ef1 100644
--- a/packages/test-simple/THANKS
+++ b/packages/test-simple/THANKS
@@ -1 +1,2 @@
 Lars Andersen (expez) - Getting this packaged and put on to Melpa.
+rubyikitch: Greatly improved noninteractive testing.
diff --git a/packages/test-simple/example/test-gcd.el 
b/packages/test-simple/example/gcd-tests.el
similarity index 90%
rename from packages/test-simple/example/test-gcd.el
rename to packages/test-simple/example/gcd-tests.el
index 8ffdce8..b4e58d6 100644
--- a/packages/test-simple/example/test-gcd.el
+++ b/packages/test-simple/example/gcd-tests.el
@@ -1,4 +1,4 @@
-;;; test-simple.el --- Simple Unit Test Framework for Emacs Lisp
+;;; gcd-tests.el
 ;; Copyright (C) 2015 Free Software Foundation, Inc
 
 ;; Author: Rocky Bernstein <address@hidden>
@@ -19,6 +19,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program.  If not, see
 ;; <http://www.gnu.org/licenses/>.
+;;;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
 (require 'test-simple)
 
 (test-simple-start)
diff --git a/packages/test-simple/test-simple.el 
b/packages/test-simple/test-simple.el
index e7e4164..1914ac0 100644
--- a/packages/test-simple/test-simple.el
+++ b/packages/test-simple/test-simple.el
@@ -1,13 +1,13 @@
-;;; test-simple.el --- Simple Unit Test Framework for Emacs Lisp
+;;; test-simple.el --- Simple Unit Test Framework for Emacs Lisp -*- 
lexical-binding: t -*-
 ;; Rewritten from Phil Hagelberg's behave.el by rocky
 
-;; Copyright (C) 2015 Free Software Foundation, Inc
+;; Copyright (C) 2015, 2016 Free Software Foundation, Inc
 
 ;; Author: Rocky Bernstein <address@hidden>
 ;; URL: http://github.com/rocky/emacs-test-simple
 ;; Keywords: unit-test
 ;; Package-Requires: ((cl-lib "0"))
-;; Version: 1.1
+;; Version: 1.2.0
 
 ;; This program is free software: you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
@@ -36,7 +36,7 @@
 ;;   add customized assert failure messages, or add summary messages
 ;;   before a group of tests.
 ;;
-;; * Accomodates both interactive and non-interactive use.
+;; * Accommodates both interactive and non-interactive use.
 ;;    - For interactive use, one can use `eval-last-sexp', `eval-region',
 ;;      and `eval-buffer'.  One can `edebug' the code.
 ;;    -  For non-interactive use, run:
@@ -64,17 +64,17 @@
 ;;   (assert-equal 8 (gcd 8 32) "gcd(8,32)")
 ;;   (end-tests) ;; Stop the clock and print a summary
 ;;
-;; Edit (with Emacs of course) test-gcd.el and run M-x eval-current-buffer
+;; Edit (with Emacs of course) gcd-tests.el and run M-x eval-current-buffer
 ;;
 ;; You should see in buffer *test-simple*:
 ;;
-;;    test-gcd.el
+;;    gcd-tests.el
 ;;    ......
 ;;    0 failures in 6 assertions (0.002646 seconds)
 ;;
 ;; Now let us try from a command line:
 ;;
-;;    $ emacs --batch --no-site-file --no-splash --load test-gcd.el
+;;    $ emacs --batch --no-site-file --no-splash --load gcd-tests.el
 ;;    Loading /src/external-vcs/emacs-test-simple/example/gcd.el (source)...
 ;;    *scratch*
 ;;    ......
@@ -91,6 +91,26 @@
 
 (eval-when-compile (require 'cl-lib))
 
+(defgroup test-simple nil
+  "Simple Unit Test Framework for Emacs Lisp"
+  :group 'lisp)
+
+(defcustom test-simple-runner-interface (if (fboundp 'bpr-spawn)
+                                            'bpr-spawn
+                                          'compile)
+  "Function with one string argument when running tests non-interactively.
+Command line started with `emacs --batch' is passed as the argument.
+
+`bpr-spawn', which is in bpr package, is preferable because of no window popup.
+If bpr is not installed, fall back to `compile'."
+  :type 'function
+  :group 'test-simple)
+
+(defcustom test-simple-runner-key "C-x C-z"
+  "Key to run non-interactive test after defining command line by 
`test-simple-run'."
+  :type 'string
+  :group 'test-simple)
+
 (defvar test-simple-debug-on-error nil
   "If non-nil raise an error on the first failure.")
 
@@ -156,13 +176,13 @@ clears out information from the previous run."
 ;; Assertion tests
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defmacro assert-raises (error-condition body &optional fail-message test-info)
+(defmacro assert-raises (error-condition body &optional fail-message)
   (let ((fail-message (or fail-message
                          (format "assert-raises did not get expected %s"
                                  error-condition))))
     (list 'condition-case nil
          (list 'progn body
-               (list 'assert-t nil fail-message test-info))
+               (list 'assert-t nil fail-message))
          (list error-condition '(assert-t t)))))
 
 (defun assert-op (op expected actual &optional fail-message test-info)
@@ -175,7 +195,7 @@ clears out information from the previous run."
                  (format "Message: %s" fail-message)
                ""))
             (expect-message
-             (format "\n  Expected: %s\n  Got: %s" expected actual))
+             (format "\n  Expected: %S\n  Got: %S" expected actual))
             (test-info-mess
              (if (boundp 'test-info)
                  (test-info-description test-info)
@@ -217,14 +237,12 @@ clears out information from the previous run."
     (progn (test-simple-msg ".") t)))
 
 (defun assert-t (actual &optional fail-message test-info)
-  "Expectation is that ACTUAL is not nil."
-  (assert-nil (not actual) fail-message test-info "assert-t"))
-
-(defun assert-nil (actual &optional fail-message test-info _assert-type)
-  "Expectation is that ACTUAL is nil.
-FAIL-MESSAGE is an optional additional message to be displayed.
-Since several assertions funnel down to this one, ASSERT-TYPE is an
-optional type."
+  "expectation is that ACTUAL is not nil."
+  (assert-nil (not actual) fail-message test-info))
+
+(defun assert-nil (actual &optional fail-message test-info)
+  "expectation is that ACTUAL is nil. FAIL-MESSAGE is an optional
+additional message to be displayed."
   (unless test-info (setq test-info test-simple-info))
   (cl-incf (test-info-assert-count test-info))
   (if actual
@@ -321,5 +339,37 @@ optional type."
   (goto-char (point-max))
   (test-simple-msg (test-simple-summary-line test-info)))
 
+;;;###autoload
+(defun test-simple-run (&rest command-line-formats)
+  "Register command line to run tests non-interactively and bind key to run 
test.
+After calling this function, you can run test by key specified by 
`test-simple-runner-key'.
+
+It is preferable to write at the first line of test files as a comment, e.g,
+;;;; (test-simple-run \"emacs -batch -L %s -l %s\" (file-name-directory 
(locate-library \"test-simple.elc\")) buffer-file-name)
+
+Calling this function interactively, COMMAND-LINE-FORMATS is set above."
+  (interactive)
+  (setq command-line-formats
+        (or command-line-formats
+            (list "emacs -batch -L %s -l %s"
+                  (file-name-directory (locate-library "test-simple.elc"))
+                  buffer-file-name)))
+  (let ((func (lambda ()
+                (interactive)
+                (funcall test-simple-runner-interface
+                         (apply 'format command-line-formats)))))
+    (global-set-key (kbd test-simple-runner-key) func)
+    (funcall func)))
+
+(defun test-simple-noninteractive-kill-emacs-hook ()
+  "Emacs exits abnormally when noninteractive test fails."
+  (when (and noninteractive test-simple-info
+             (<= 1 (test-info-failure-count test-simple-info)))
+    (let (kill-emacs-hook)
+     (kill-emacs 1))))
+(when noninteractive
+  (add-hook 'kill-emacs-hook 'test-simple-noninteractive-kill-emacs-hook))
+
+
 (provide 'test-simple)
 ;;; test-simple.el ends here
diff --git a/packages/test-simple/test/test-basic.el 
b/packages/test-simple/test/test-basic.el
index f14a385..723779a 100644
--- a/packages/test-simple/test/test-basic.el
+++ b/packages/test-simple/test/test-basic.el
@@ -22,7 +22,7 @@
 (assert-t (memq 'test-simple features) "'test-simple provided")
 
 (assert-nil nil "assert-nil failure test")
-(assert-nil nil "Knights if ni")
+(assert-nil nil "Knights of ni")
 (assert-equal 5 (+ 1 4) "assert-equal")
 (assert-raises error (error "you should not see this") "assert-raises")
 
diff --git a/packages/timerfunctions/timerfunctions.el 
b/packages/timerfunctions/timerfunctions.el
index dc4bb9f..20dc1df 100644
--- a/packages/timerfunctions/timerfunctions.el
+++ b/packages/timerfunctions/timerfunctions.el
@@ -55,7 +55,7 @@ provided a `tf-with-timeout-check'.")
 
 
 (defconst timerfunctions-introduction
-  "timerfunctions.el contains some 'enhanced' versions of a few timer.el
+  "timerfunctions.el contains some “enhanced” versions of a few timer.el
 functions.  It is also used by vel.el, idledo.el etc.
 
  Suppose you want Emacs to run an action every REDOSECS for
@@ -349,7 +349,7 @@ user as well.  Arguments are INHIBITP, TAG and TIMEDOUTVAR."
 
 Provides ability to inhibit timeout during parts of the body.
 Note that most of the time, you may not need this functionality
-at all unless you want to be very 'clean' about things---you
+at all unless you want to be very “clean” about things---you
 could get by with the regular with-timeout and not using
 sit-for's in the body.  Or with the regular with-timeout and
 using unwind-protect.
@@ -374,7 +374,7 @@ be detected.  Furthermore:
 
 During the execution of the body, we SHALL NOT time out when INHIBITP
 evals to non-nil.  Thus, for example, you might initially setq a
-variable my-var as nil, supply inhibitp as 'my-var, and then you may
+variable my-var as nil, supply inhibitp as `my-var', and then you may
 setq my-var to t or nil within the body of tf-with-timeout to enable
 or disable timeout.  The best use of this functionality is to setq
 inhibitp to t when during parts of loops where you do not want the
@@ -390,7 +390,7 @@ Here's an example:
 
 
  (let ((myinhibit t))
-  (tf-with-timeout 'myinhibit 'mytag 'mytimedoutvar
+  (tf-with-timeout \\='myinhibit \\='mytag \\='mytimedoutvar
                   (2 2)
                   (setq a nil)
                   (setq b nil)
@@ -419,7 +419,7 @@ But perhaps you do not want to include (sleep-for 0.02) 
because that
 wastes precious cpu time.  Simple, don't include it, just after a long
 inhibited body, you can include a timeout check within the body
 instead of (sleep-for 0.02):
- (tf-with-timeout-check 'mytag 'mytimedoutvar 'myinhibitp)
+ (tf-with-timeout-check \\='mytag \\='mytimedoutvar \\='myinhibitp)
 
 Moreover, if that is the main check you rely on, you it perhaps makes
 sense to increase the value of tf-with-timeout-repeat-sec, so that
diff --git a/packages/tiny/tiny-test.el b/packages/tiny/tiny-test.el
index 3d9ec54..4503aa6 100644
--- a/packages/tiny/tiny-test.el
+++ b/packages/tiny/tiny-test.el
@@ -25,7 +25,7 @@
 (require 'tiny nil t)
 
 (defun with-text-value (txt fn &rest args)
-  "Return the result of (apply 'FN ARGS), in a temp buffer with TXT,
+  "Return the result of (apply FN ARGS), in a temp buffer with TXT,
 with point at the end of TXT."
   (with-temp-buffer
     (insert txt)
diff --git a/packages/tiny/tiny.el b/packages/tiny/tiny.el
index 90c89d5..5523e60 100644
--- a/packages/tiny/tiny.el
+++ b/packages/tiny/tiny.el
@@ -262,10 +262,10 @@ m[START][SEPARATOR]END[EXPR]|[FORMAT]
 * END       - integer (required)
 * EXPR      - Lisp expression: function body with argument x (defaults to x)
   Parens are optional if it's unambiguous:
-  - `(* 2 (+ x 3))'  <-> *2+x3
-  - `(exp x)'        <-> expx
+  - `(* 2 (+ x 3))'   <-> *2+x3
+  - `(exp x)'         <-> expx
   A closing paren may be added to resolve ambiguity:
-  - `(* 2 (+ x 3) x) <-> *2+x3)
+  - `(* 2 (+ x 3) x)' <-> *2+x3)
 * FORMAT    - string, `format'-style (defaults to \"%s\")
   | separator can be omitted if FORMAT starts with %.
 
diff --git a/packages/tramp-theme/README b/packages/tramp-theme/README
new file mode 100644
index 0000000..093c1f0
--- /dev/null
+++ b/packages/tramp-theme/README
@@ -0,0 +1,11 @@
+This is a custom theme for remote buffers.
+
+It is not an own custom theme by itself.  Rather, it is a custom
+theme to run on top of other custom themes.  It shall be loaded
+always as the last custom theme, because it inherits existing
+settings.
+
+This custom theme extends `mode-line-buffer-identification' by the
+name of the remote host.  It also allows to change faces according
+to the value of `default-directory' of a buffer.  See
+`tramp-theme-face-remapping-alist' for customization options.
diff --git a/packages/tramp-theme/tramp-theme.el 
b/packages/tramp-theme/tramp-theme.el
new file mode 100644
index 0000000..2bf9e9b
--- /dev/null
+++ b/packages/tramp-theme/tramp-theme.el
@@ -0,0 +1,168 @@
+;;; tramp-theme.el --- Custom theme for remote buffers
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Michael Albinus <address@hidden>
+;; Keywords: convenience, faces
+;; Package: tramp-theme
+;; Version: 0.1.1
+;; Package-Requires: ((emacs "24.1"))
+
+;; This file is not part of GNU Emacs.
+
+;; 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 GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This is not an own custom theme by itself.  Rather, it is a custom
+;; theme to run on top of other custom themes.  It shall be loaded
+;; always as the last custom theme, because it inherits existing
+;; settings.
+
+;; This custom theme extends `mode-line-buffer-identification' by the
+;; name of the remote host.  It also allows to change faces according
+;; to the value of `default-directory' of a buffer.  See
+;; `tramp-theme-face-remapping-alist' for customization options.
+
+;;; Code:
+
+;; This is needed for the customized variables.
+(require 'dired)
+(require 'em-dirs)
+
+(deftheme tramp
+  "A custom theme to decorate buffers when they are remote.
+It can be combined with other custom themes.")
+
+(defcustom tramp-theme-face-remapping-alist
+  `((nil "^root$"
+    (mode-line-buffer-id
+     (:inherit mode-line-buffer-id
+      :inverse-video
+      ;; If the face uses already :inverse-video, we deactivate it.
+      ;; Happens on displays of type 'tty, for example.
+      ,(null
+       (face-inverse-video-p
+        'mode-line-buffer-id nil '(mode-line default)))))))
+  "Face remapping for decoration of a remote buffer.
+This is an alist of items (HOST USER REMAPPING-LIST).  HOST and
+USER are regular expressions, or nil.  REMAPPING-LIST must be an
+alist of face remappings as used by `face-remapping-alist'.  If
+USER matches the remote user part of `default-directory', and
+HOST matches the remote host part of `default-directory',
+REMAPPING-LIST is applied to the current buffer.
+
+For instance, the following settings change the background color
+to \"Red\" for frames connected to the remote host \"foo\", it
+changes the background color to \"Green\" for frames connected to
+the remote host \"bar\", and it inverses the fringe face for
+frames using the remote user \"root\":
+
+    ((nil \"^root$\" (fringe (:inherit fringe :inverse-video t)))
+     (\"^foo$\" nil (default (:background \"Red\")))
+     (\"^bar$\" nil (default (:background \"Green\"))))
+
+Per default, `mode-line-buffer-identification' is displayed
+inverse for buffers which are editable with \"root\" permissions."
+  :group 'tramp
+  :type `(repeat (list (choice :tag "Host regexp" regexp (const nil))
+                      (choice :tag "User regexp" regexp (const nil))
+                      (list :tag "Face Remapping"
+                            face (plist :value-type sexp)))))
+
+(defun tramp-theme-original-value (variable)
+  "Return the original value of VARIABLE before loading `tramp-theme'."
+  (let ((theme-value (get variable 'theme-value)))
+    (or (cdr (car (delete (assoc 'tramp theme-value) theme-value)))
+       (get variable 'tramp-theme-original-value))))
+
+(defun tramp-theme-mode-line-buffer-identification ()
+  "Return a list suitable for `mode-line-buffer-identification'.
+It indicates the remote host being used, if any."
+  (append
+   (when (custom-theme-enabled-p 'tramp)
+     (let ((host (file-remote-p default-directory 'host))
+          (user (file-remote-p default-directory 'user))
+           remapping-alist)
+       ;; Apply `tramp-theme-face-remapping-alist'.
+       (dolist (elt tramp-theme-face-remapping-alist)
+        (when (and (string-match (or (nth 0 elt) "") (or host ""))
+                   (string-match (or (nth 1 elt) "") (or user "")))
+          (setq remapping-alist (cons (nth 2 elt) remapping-alist))))
+       (setq-local face-remapping-alist (nreverse remapping-alist))
+
+       ;; The extended string.
+       (when host
+        ;; Do not use FQDN.
+        (when (string-match "^[^0-9][^.]*\\(\\..*\\)" host)
+          (setq host (substring host 0 (match-beginning 1))))
+        (list
+         (propertize
+          (concat (propertize host 'help-echo (purecopy "Host name")) ": ")
+          'face 'mode-line-buffer-id 'mouse-face 'mode-line-highlight)))))
+
+   ;; That's the original definition.
+   (tramp-theme-original-value 'mode-line-buffer-identification)))
+
+(defun tramp-theme-hook-function ()
+  "Modify `mode-line-buffer-indication'.
+Used in different hooks, in order to accelerate the redisplay."
+  (setq
+   mode-line-buffer-identification
+   (tramp-theme-mode-line-buffer-identification)))
+
+(unless (custom-theme-enabled-p 'tramp)
+  ;; Save the original value.
+  (unless (get 'mode-line-buffer-identification 'tramp-theme-original-value)
+    (put 'mode-line-buffer-identification
+        'tramp-theme-original-value
+        mode-line-buffer-identification))
+
+  (custom-theme-set-variables
+   'tramp
+   ;; Extend `mode-line-buffer-identification' by host name.
+   '(mode-line-buffer-identification
+     '(:eval (tramp-theme-mode-line-buffer-identification)))
+   ;; `dired-mode' overwrites `mode-line-buffer-identification'.  We
+   ;; want to use our own extension.
+   '(dired-mode-hook
+     (cons
+      'tramp-theme-hook-function
+      (delete 'tramp-theme-hook-function dired-mode-hook)))
+   ;; Redisplay doesn't happen immediately.  So we trigger it via
+   ;; `find-file-hook' and `eshell-directory-change-hook'.
+   '(find-file-hook
+     (cons
+      'tramp-theme-hook-function
+      (delete 'tramp-theme-hook-function find-file-hook)))
+   '(eshell-directory-change-hook
+     (cons
+      'tramp-theme-hook-function
+      (delete 'tramp-theme-hook-function eshell-directory-change-hook)))))
+
+;;;###autoload
+(when load-file-name
+  (add-to-list
+   'custom-theme-load-path
+   (file-name-as-directory (file-name-directory load-file-name))))
+
+(provide-theme 'tramp)
+
+;;; TODO:
+
+;; * Use a :type for `tramp-theme-face-remapping-alist' which allows
+;;   to edit the faces.  Maybe use (widget-get custom-face-edit :args)
+;;   for this.
+
+;;; tramp-theme.el ends here
diff --git a/packages/transcribe/transcribe.el 
b/packages/transcribe/transcribe.el
index 684e505..e7aa6f9 100644
--- a/packages/transcribe/transcribe.el
+++ b/packages/transcribe/transcribe.el
@@ -1,9 +1,9 @@
 ;;; transcribe.el --- Package for audio transcriptions
 
-;; Copyright 2014-2015  Free Software Foundation, Inc.
+;; Copyright 2014-2016  Free Software Foundation, Inc.
 
 ;; Author: David Gonzalez Gandara <address@hidden>
-;; Version: 1.0.2
+;; Version: 1.5.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
@@ -22,43 +22,44 @@
 
 ;; 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, 
+;; 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 
+;; Transcribe is a tool to make audio transcriptions for discourse analysis
+;; in the classroom.
+;; 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 
+;; The analysis functions 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 
+;; 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 
+;;     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 
+;;     <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 
+;;     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 
+;;     <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)
@@ -75,10 +76,12 @@
 
 ;;; Code:
 
-(if t (require 'emms-setup))
-;(require 'emms-player-mpd)
-;(setq emms-player-mpd-server-name "localhost")
-;(setq emms-player-mpd-server-port "6600")
+(require 'xml)
+
+;; (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)
@@ -91,21 +94,54 @@
 (if t (require 'emms-playing-time))
 (emms-playing-time 1)
 
-(defvar transcribe-function-list '("initiating" "responding" "control" 
"expresive" "interpersonal"))
+(defvar transcribe-function-list '("initiating" "responding" "control" 
"expressive" "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)
+;; (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 
+  "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") 
+  (shell-command (concat (expand-file-name  "analyze_episodes2.py")
                   " -e " episode " -p " person " -i " buffer-file-name )))
 
+(defun transcribe-raw-to-buffer ()
+  "EXPERIMENTAL - Convert the xml tagged transcription to raw transcription, 
with the names
+   and the persons and the utterances only. The raw transcription will be send 
to buffer called
+   `Raw Output'."
+  (interactive)
+  (let* ((xml (xml-parse-region (point-min) (point-max)))
+    (results (car xml))
+    (episodes (xml-get-children results 'episode)))
+
+    (dolist (episode episodes)
+      (let* ((transcription (xml-get-children episode 'transcription)))
+
+        (dolist (turn transcription)
+          (dolist (intervention (xml-node-children turn))
+            (if (listp intervention)
+              (progn
+                (with-current-buffer "Raw Output"
+                  (insert (format "%s\t" (line-number-at-pos)))
+                  (insert (format "%s:\t" (car intervention)))
+                  (dolist (utterance (nthcdr 2 intervention))
+                    (if (listp utterance)
+                       (progn
+                         (insert (format "%s "  (nth 2 utterance))))
+
+                         (insert (format "%s" utterance))))))
+
+                       (with-current-buffer "Raw Output"
+                         (insert (format "%s" (line-number-at-pos)))
+                         (insert (format "%s" intervention))))))))))
+
 (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."
+  "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.
+   It writes two output files, one for L2 utterances and one for L1
+   utterances, so that they can be used with external programs. Output will
+   be inserted in `Statistics Output' buffer."
   (interactive "sepisodenumber: \nspersonid:")
   (let* ((interventionsl2 '())
      (interventionsl1 '())
@@ -114,69 +150,158 @@
      (episodes (xml-get-children results 'episode))
      (asunitsl2 0.0000)
      (asunitsl1 0.0000)
-     (shifts nil)
+     (shifts 0.0000);; TODO implement
+     (initiating 0.0000)
+     (responding 0.0000)
+     (control 0.0000)
+     (expressive 0.0000)
+     (interpersonal 0.0000)
      (clausesl1 0.0000)
-     (errorsl1 0.0000)
+     ;; (errorsl1 0.0000);; TODO implement
      (clausesl2 0.0000)
      (errorsl2 0.0000)
      (duration nil)
+     (role nil)
+     (context nil)
+     (demand nil)
+     ;; (clausesmessage nil)
      (number nil))
-         
+
      (dolist (episode episodes)
-       (let*((numbernode (xml-get-children episode 'number)))
-                 
+       (let*((numbernode (xml-get-children episode 'number))
+         (tasknode (xml-get-children episode 'task)))
+
          (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 (task tasknode)
+              (let* ((rolenode (xml-get-children task 'role))
+                (contextnode (xml-get-children task 'context))
+                (demandnode (xml-get-children task 'demand)))
+
+                (setq role (nth 2 (car rolenode)))
+                (setq context (nth 2 (car contextnode)))
+                (setq demand (nth 2 (car demandnode)))
+                ;; (with-current-buffer "Statistics Output"
+                   ;; (insert (format "role: %s; context: %s; demand: %s\n" 
role context demand)))
+                ))
+
              (dolist (turn transcription)
-               (let* ((interventionnode (xml-get-children turn 
+               (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) 
+                          (attrs (nth 1 l2turn))
+                          (clausesl2nodeinc (cdr (assq 'clauses attrs)))
+                          (errorsl2inc (cdr (assq 'errors attrs)))
+                          (function (cdr (assq 'function attrs))))
+
+                          (when (string-equal function "initiating")
+                            (setq initiating (+ initiating 1)))
+                          (when (string-equal function "responding")
+                            (setq responding (+ responding 1)))
+                          (when (string-equal function "control")
+                            (setq control (+ control 1)))
+                          (when (string-equal function "expressive")
+                            (setq expressive (+ expressive 1)))
+                          (when (string-equal function "interpersonal")
+                            (setq interpersonal (+ interpersonal 1)))
+                          (when attrs
+                            (setq clausesl2 (+ clausesl2 (string-to-number
+                             clausesl2nodeinc)))
+                            (setq errorsl2 (+ errorsl2 (string-to-number
+                             errorsl2inc))))
+                          (when l2
+                            ;; (add-to-list 'interventionsl2 l2)
+                            (when (string-match "@*" l2) (setq shifts (1+ 
shifts)))
+                            (cl-pushnew l2 interventionsl2 :test #'equal)
                             (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 
+                           (setq clausesl1 (+ clausesl1 (string-to-number
                               clausesl1nodeinc))))
-                         (when (not (equal l1 nil)) 
-                           (add-to-list 'interventionsl1 l1) 
+                         (when l1
+                           ;; (add-to-list 'interventionsl1 l1)
+                           (when (string-match "@*" l1) (setq shifts (1+ 
shifts)))
+                           (cl-pushnew l1 interventionsl1 :test #'equal)
                            (setq asunitsl1 (1+ asunitsl1)))))))))))))
   (reverse interventionsl2)
+  ;; (write-region (format "%s" interventionsl2) nil (format 
"transcribe-output-%s-%s-l2.txt" episodenumber personid))
+  ;; Write raw interventions to file will be supported by a different function
   (reverse interventionsl1)
-  ;(print interventions) ;uncomment to display all the interventions on screen
+  ;; (write-region (format "%s" interventionsl1) nil (format 
"transcribe-output-%s-%s-l1.txt" episodenumber personid))
+  ;; (print interventionsl2) ;uncomment to display all the interventions on 
screen
   (let((asunitspersecondl2 (/ asunitsl2 (string-to-number duration)))
     (clausesperasunitl2 (/ clausesl2 asunitsl2))
+    (errorsperasunitl2 (/ errorsl2 asunitsl2))
     (asunitspersecondl1 (/ asunitsl1 (string-to-number duration)))
-    (clausesperasunitl1 (/ clausesl1 asunitsl1)))
-  
+    ;; (clausesperasunitl1 (/ clausesl1 asunitsl1))
+    (initiatingperasunitl2 (/ initiating asunitsl2))
+    (respondingperasunitl2 (/ responding asunitsl2))
+    (controlperasunitl2 (/ control asunitsl2))
+    (expressiveperasunitl2 (/ expressive asunitsl2))
+    (interpersonalperasunitl2 (/ interpersonal asunitsl2))
+    (shiftsperasunit (/ shifts (+ asunitsl1 asunitsl2))))
+    
+    ;; Get rid of divisions by zero
+    (when (= asunitsl2 0)
+      (setq initiatingperasunitl2 0.0)
+      (setq respondingperasunitl2 0.0)
+      (setq controlperasunitl2 0.0)
+      (setq expressiveperasunitl2 0.0)
+      (setq interpersonalperasunitl2 0.0)
+      (setq shiftsperasunit 0.0))
+
+    ;; (princ clausesmessage)
     (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)))))
+    (with-current-buffer "Statistics Output"
+      (insert (format 
"%s,%s,%s,0,0,%s,%s,%s,%s,%s,QUAL-L2,%s,%s,%s,%s,%s,%s,aux,level,subject,yearofclil,month\n"
 personid episodenumber duration role context demand asunitspersecondl2 
asunitspersecondl1 initiatingperasunitl2 respondingperasunitl2 
controlperasunitl2 expressiveperasunitl2 interpersonalperasunitl2 
shiftsperasunit)))
+    (princ (format "L2(Asunits/second): %s, L2(clauses/Asunit): %s, 
L2(errors/Asunit):%s, L1(Asunits/second): %s\n"
+          asunitspersecondl2 clausesperasunitl2 errorsperasunitl2 
asunitspersecondl1))
+    (princ (format "Functions/unit: Initiating: %s, Responding: %s, Control: 
%s, Expressive: %s, Interpersonal: %s" initiatingperasunitl2 
respondingperasunitl2 controlperasunitl2 expressiveperasunitl2 
interpersonalperasunitl2)))))
 
-(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))
+(defun transcribe-analyze-all ()
+  "Analyze all file and output to `Statistics Output' buffer. The buffer will
+   lost all previous data. The data in the buffer can be saved to a file and be
+   passed to R for statistical analysis."
+  (interactive)
+  (let* ((xml (xml-parse-region (point-min) (point-max)))
+     (results (car xml))
+     (episodes (xml-get-children results 'episode)))
+
+     (with-current-buffer "Statistics Output"
+       (erase-buffer)
+       (insert 
"person,episode,duration,C-UNITS(L2),C-UNITS(L1),role,context,demand,QUAN-L2,QUAN-L1,QUAL-L2,initiating,responding,control,expressive,interpersonal,shifts,aux,level,subjects,yearofCLIL,month\n"))
+     (dolist (episode episodes)
+       (let* ((numbernode (xml-get-children episode 'number))
+         (participantsnode (xml-get-children episode 'participants))
+         ;; (transcription (xml-get-children episode 'transcription))
+         (number (nth 2 (car numbernode)))
+         (participantsstring (nth 2 (car participantsnode)))
+         (participants (split-string participantsstring)))
+
+         (dolist (participant participants)
+           (transcribe-analyze number participant))))))
+
+
+(defun transcribe-xml-tag-person (xmltag move)
+  "This function allows the automatic insertion of a speaker xml tag and 
places the cursor."
+  (interactive (list(read-string "Person:")(completing-read "move:" 
transcribe-move-list))) 
+  (end-of-line)
+  (insert (format "\n<%s move=\"%s\"></%s>" xmltag move xmltag))
   (backward-char 3)
   (backward-char (string-width xmltag)))
 
@@ -194,40 +319,42 @@
        (end (region-end)))
   (goto-char beginning)
   (insert (format "<%s>" xmltag))
-  (goto-char end)
+  (goto-char (+ (+ end (string-width xmltag)) 2))
   (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:"))) 
+  (interactive (list(completing-read "attribute 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))) 
+  "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))) 
+  "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 ()
+(defun transcribe-xml-tag-l1 (function)
   "Inserts a l1 tag and places the cursor"
-  (interactive)
-  (insert "<l1 clauses=\"1\" errors=\"0\" function=\"\"></l1>")
+  (interactive (list(completing-read "function:" transcribe-function-list)))
+  (re-search-forward "</l.>" (line-end-position) t)
+  (insert (format "<l1 clauses=\"1\" errors=\"0\" function=\"%s\"></l1>" 
function))
   (backward-char 5))
 
-(defun transcribe-xml-tag-l2 ()
+(defun transcribe-xml-tag-l2 (function)
   "Inserts a l2 tag and places the cursor"
-  (interactive)
-  (insert "<l2 clauses=\"1\" errors=\"0\" function=\"\"></l2>")
+  (interactive (list(completing-read "function:" transcribe-function-list)))
+  (re-search-forward "</l.>" (line-end-position) t)
+  (insert  (format "<l2 clauses=\"1\" errors=\"0\" function=\"%s\"></l2>" 
function))
   (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)))
+  (insert (format "</%s><%s>" xmltag xmltag)))
 
 (defun transcribe-display-audio-info ()
   (interactive)
@@ -236,31 +363,64 @@
 
 
 (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
+      
"<episode>\n<number>DATE-NUMBER</number>\n<duration></duration>\n<comment></comment>\n<subject>Subject
 (level)</subject>\n<participants></participants>\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
+
+
+(defvar transcribe-mode-map
+   (let ((map (make-sparse-keymap)))
+    (define-key map (kbd "C-x C-p") 'emms-play-file)
+    (define-key map (kbd "C-x C-a") 'transcribe-analyze)
+    (define-key map (kbd "C-x C-n") 'NewEpisode)
+    (define-key map (kbd "C-x <down>") 'emms-stop)
+    (define-key map (kbd "C-x <right>") 'emms-seek-forward)
+    (define-key map (kbd "C-x <left>") 'emms-seek-backward)
+    (define-key map (kbd "<f2>") 'transcribe-add-attribute-move)
+    (define-key map (kbd "<f3>") 'transcribe-add-attribute-function)
+    (define-key map (kbd "<f4>") 'transcribe-add-attribute)
+    (define-key map (kbd "<f5>") 'emms-pause)
+    (define-key map (kbd "<f8>") 'emms-seek)
+    (define-key map (kbd "<f9>") 'transcribe-xml-tag)
+    (define-key map (kbd "<f10>") 'transcribe-xml-tag-person)
+    (define-key map (kbd "<f11>") 'transcribe-xml-tag-l1)
+    (define-key map (kbd "<f12>") 'transcribe-xml-tag-l2)
+    map)
+  "Keymap for Transcribe minor mode.")
+
+
+(easy-menu-define transcribe-mode-menu transcribe-mode-map
+  "Menu for Transcribe mode"
+  '("Transcribe"
+    ["Raw Output" transcribe-raw-to-buffer]
+    "---"
+    ["Analyze" transcribe-analyze]
+    ["Analyze all" transcribe-analyze-all]
+    "---"
+    ["Add transcription header" NewEpisode]
+    ["Add move attribute" transcribe-add-attribute-move]
+    ["Add function attribute" transcribe-add-attribute-function]
+    ["Add L1 intervention" transcribe-xml-tag-l1]
+    ["Add L2 intervention" transcribe-xml-tag-l2]
+    ["Add move" transcribe-xml-tag-person]
+    "---"
+    ["Play audio file" emms-play-file]
+    ))
+
 
 ;;;###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))
+  transcribe-mode-map
+  (generate-new-buffer "Statistics Output")
+  (generate-new-buffer "Raw Output")
+;;  (with-current-buffer "Raw Output"
+;;    (linum-mode t)
+;;    (setq linum-format "%d "))
+  (with-current-buffer "Statistics Output"
+    ;; (insert 
"person,episode,duration,C-UNITS(L2),C-UNITS(L1),role,context,demand,QUAN-L2,QUAN-L1,QUAL-L2,segmented,aux,level,subjects,yearofCLIL,month\n")
+  )
+  ;; TODO: save the students present in transcription in list so that we can 
use that list for transcribe-analyze-all
 )
 
 (provide 'transcribe)
diff --git a/packages/trie/trie.el b/packages/trie/trie.el
index d428fda..71ef128 100644
--- a/packages/trie/trie.el
+++ b/packages/trie/trie.el
@@ -397,7 +397,7 @@ If START or END is negative, it counts from the end."
 (defun trie--position (item list)
   "Find the first occurrence of ITEM in LIST.
 Return the index of the matching item, or nil of not found.
-Comparison is done with 'equal."
+Comparison is done with `equal'."
   (let ((i 0))
     (catch 'found
       (while (progn
@@ -916,7 +916,7 @@ trie, and its associated data.
 
 Optional argument TYPE (one of the symbols vector, lisp or
 string; defaults to vector) sets the type of sequence passed to
-FUNCTION. If TYPE is 'string, it must be possible to apply the
+FUNCTION. If TYPE is `string', it must be possible to apply the
 function `string' to the individual elements of key sequences
 stored in TRIE.
 
@@ -963,7 +963,7 @@ Note that if you don't care about the order in which 
FUNCTION is
 applied, just that the resulting list is in the correct order,
 then
 
-  (trie-mapf function 'cons trie type (not reverse))
+  (trie-mapf function \\='cons trie type (not reverse))
 
 is more efficient.
 
@@ -1390,7 +1390,7 @@ included in the results, and does not count towards 
MAXNUM.
 
 RESULTFUN defines a function used to process results before
 adding them to the final result list. If specified, it should
-accept two arguments: a key and its associated data. It's return
+accept two arguments: a key and its associated data. Its return
 value is what gets added to the final result list, instead of the
 default key-data cons cell."
 
@@ -1551,7 +1551,7 @@ results, and does not count towards MAXNUM.
 
 RESULTFUN defines a function used to process results before
 adding them to the final result list. If specified, it should
-accept two arguments: a key and its associated data. It's return
+accept two arguments: a key and its associated data. Its return
 value is what gets added to the final result list, instead of the
 default key-data cons cell."
 
diff --git a/packages/url-http-ntlm/url-http-ntlm.el 
b/packages/url-http-ntlm/url-http-ntlm.el
new file mode 100644
index 0000000..58622ad
--- /dev/null
+++ b/packages/url-http-ntlm/url-http-ntlm.el
@@ -0,0 +1,316 @@
+;;; url-http-ntlm.el --- NTLM authentication for the url library
+
+;; Copyright (C) 2008, 2016 Free Software Foundation, Inc.
+
+;; Author: Tom Schutzer-Weissmann <address@hidden>
+;; Maintainer: Thomas Fitzsimmons <address@hidden>
+;; Version: 2.0.2
+;; Keywords: comm, data, processes, hypermedia
+;; Homepage: https://code.google.com/p/url-http-ntlm/
+;; Package-Requires: ((cl-lib "0.5") (ntlm "2.0.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 provides a NTLM handler for the URL package.
+;;
+;; Installation:
+;;
+;; M-x package-install RET url-http-ntlm RET
+;;
+;; Acknowledgements:
+;;
+;; Taro Kawagishi <address@hidden> wrote ntlm.el and md4.el,
+;; which are parts of FLIM (Faithful Library about Internet Message).
+;;
+;; http://stuff.mit.edu/afs/sipb/contrib/emacs/packages/flim-1.14.7/ntlm.el
+;; http://stuff.mit.edu/afs/sipb/contrib/emacs/packages/flim-1.14.7/md4.el
+
+;;; Code:
+(require 'url-auth)
+(require 'url-http)
+(require 'url-util)
+(require 'mail-parse)
+(require 'cl-lib)
+(require 'ntlm)
+
+;; Remove authorization after redirect.
+(when (and (boundp 'emacs-major-version)
+          (< emacs-major-version 25))
+  (defvar url-http-ntlm--parsing-headers nil)
+  (defadvice url-http-parse-headers (around clear-authorization activate)
+    (let ((url-http-ntlm--parsing-headers t))
+      ad-do-it))
+  (defadvice url-http-handle-authentication (around clear-authorization
+                                                   activate)
+    (let ((url-http-ntlm--parsing-headers nil))
+      ad-do-it))
+  (defadvice url-retrieve-internal (before clear-authorization activate)
+    (when (and url-http-ntlm--parsing-headers
+              (eq url-request-extra-headers url-http-extra-headers))
+      ;; This retrieval is presumably in response to a redirect.
+      ;; Do not automatically include an authorization header in the
+      ;; redirect.  If needed it will be regenerated by the relevant
+      ;; auth scheme when the new request happens.
+      (setq url-http-extra-headers
+           (cl-remove "Authorization"
+                      url-http-extra-headers :key #'car :test #'equal))
+      (setq url-request-extra-headers url-http-extra-headers))))
+
+
+;;; Private variables.
+(defvar url-http-ntlm--auth-storage nil
+  "Authentication storage.
+An alist that maps a server name to a pair of \(<username> <ntlm
+hashes>\).
+
+The hashes are built using `ntlm-get-password-hashes'.")
+
+(defvar url-http-ntlm--last-args nil
+  "The last `url-http-ntlm--get-stage' arguments and result.
+This is used to detect multiple calls.")
+(make-variable-buffer-local 'url-http-ntlm--last-args)
+
+(defvar url-http-ntlm--loop-timer-counter nil
+  "A hash table used to detect NTLM negotiation errors.
+Keys are urls, entries are (START-TIME . COUNTER).")
+
+(defvar url-http-ntlm--default-users nil
+  "An alist that stores one default username per server.")
+
+
+;;; Private functions.
+(defun url-http-ntlm--detect-loop (url)
+  "Detect potential infinite loop when NTLM fails on URL."
+  (when (not url-http-ntlm--loop-timer-counter)
+    (setq url-http-ntlm--loop-timer-counter (make-hash-table :test 'equal)))
+  (let* ((url-string (url-recreate-url url))
+        (last-entry (gethash url-string url-http-ntlm--loop-timer-counter))
+        (start-time (car last-entry))
+        (counter (cdr last-entry)))
+    (if last-entry
+       (progn
+         (if (< (-  (float-time) start-time) 10.0)
+             (if (< counter 20)
+                 ;; Still within time window, so increment count.
+                 (puthash url-string (cons start-time (1+ counter))
+                          url-http-ntlm--loop-timer-counter)
+               ;; Error detected, so remove entry and clear.
+               (url-http-ntlm--authorization url-string :clear)
+               (remhash url-string url-http-ntlm--loop-timer-counter)
+               (error
+                (format (concat "Access rate to %s is too high,"
+                                " indicating an NTLM failure;"
+                                " to debug, re-run with url-debug set to 1")
+                        url-string)))
+           ;; Timeout expired, so reset counter.
+           (puthash url-string (cons (float-time) 0)
+                    url-http-ntlm--loop-timer-counter)))
+      ;; New access, so initialize counter to 0.
+      (puthash url-string (cons (float-time) 0)
+              url-http-ntlm--loop-timer-counter))))
+
+(defun url-http-ntlm--ensure-user (url)
+  "Return URL with its user slot set.
+If URL's user slot is nil, set it to the last user that made a
+request to the host in URL's server slot."
+  (let ((new-url url))
+    (if (url-user new-url)
+       new-url
+      (setf (url-user new-url)
+           (cdr (assoc (url-host new-url) url-http-ntlm--default-users)))
+      new-url)))
+
+(defun url-http-ntlm--ensure-keepalive ()
+  "Report an error if `url-http-attempt-keepalives' is not set."
+  (cl-assert url-http-attempt-keepalives
+            nil
+            (concat "NTLM authentication won't work unless"
+                    " `url-http-attempt-keepalives' is set!")))
+
+(defun url-http-ntlm--clean-headers ()
+  "Remove Authorization element from `url-http-extra-headers' alist."
+  (cl-declare (special url-http-extra-headers))
+  (setq url-http-extra-headers
+       (url-http-ntlm--rmssoc "Authorization" url-http-extra-headers)))
+
+(defun url-http-ntlm--get-stage (args)
+  "Determine what stage of the NTLM handshake we are at.
+PROMPT and ARGS come from `url-ntlm-auth''s caller,
+`url-get-authentication'.  Their meaning depends on the current
+implementation - this function is well and truly coupled.
+
+`url-get-authentication' calls `url-ntlm-auth' once when checking
+what authentication schemes are supported (PROMPT and ARGS are
+nil), and then twice for every stage of the handshake: the first
+time PROMPT is nil, the second, t; ARGS contains the server
+response's \"WWW-Authenticate\" header, munged by
+`url-parse-args'."
+  (cl-declare (special url-http-extra-headers))
+  (let* ((response-rxp    "^NTLM TlRMTVNTUAADAAA")
+        (challenge-rxp    "^TLRMTVNTUAACAAA")
+        (auth-header      (assoc "Authorization" url-http-extra-headers))
+        (case-fold-search t)
+        stage)
+    (url-debug 'url-http-ntlm "Buffer: %s" (current-buffer))
+    (url-debug 'url-http-ntlm "Arguments: %s" args)
+    (url-debug 'url-http-ntlm "Previous arguments: %s" 
url-http-ntlm--last-args)
+    (if (eq args (car url-http-ntlm--last-args))
+       ;; multiple calls, return the same argument we returned last time
+       (progn
+         (url-debug 'url-http-ntlm "Returning previous result: %s"
+                    (cdr url-http-ntlm--last-args))
+         (cdr url-http-ntlm--last-args))
+      (let ((stage
+            (cond ((and auth-header (string-match response-rxp
+                                                  (cdr auth-header)))
+                   :error)
+                  ((and (= (length args) 2)
+                        (cl-destructuring-bind (challenge ntlm) args
+                          (and (string-equal "ntlm" (car ntlm))
+                               (string-match challenge-rxp
+                                             (car challenge)))))
+                   :response)
+                  (t
+                   :request))))
+       (url-http-ntlm--clean-headers)
+       (setq url-http-ntlm--last-args (cons args stage))
+       stage))))
+
+(defun url-http-ntlm--authorization (url &optional clear realm)
+  "Get or clear NTLM authentication details for URL.
+If CLEAR is non-nil, clear any saved credentials for server.
+Otherwise, return the credentials, prompting the user if
+necessary.  REALM appears in the prompt.
+
+If URL contains a username and a password, they are used and
+stored credentials are not affected."
+  (let* ((href   (if (stringp url)
+                    (url-generic-parse-url url)
+                  url))
+        (type   (url-type href))
+        (user   (url-user href))
+        (server (url-host href))
+        (port   (url-portspec href))
+        (pass   (url-password href))
+        (stored (assoc (list type user server port)
+                       url-http-ntlm--auth-storage))
+        (both   (and user pass)))
+    (if clear
+       ;; clear
+       (unless both
+         (setq url-http-ntlm--default-users
+               (url-http-ntlm--rmssoc server url-http-ntlm--default-users))
+         (setq url-http-ntlm--auth-storage
+               (url-http-ntlm--rmssoc '(type user* server port)
+                                      url-http-ntlm--auth-storage))
+         nil)
+      ;; get
+      (if (or both
+             (and stored user (not (equal user (cl-second (car stored)))))
+             (not stored))
+         (let* ((user* (or user
+                           (url-do-auth-source-search server type :user)
+                           (read-string (url-auth-user-prompt url realm)
+                                        (or user (user-real-login-name)))))
+                (pass* (if both
+                           pass
+                         (or (url-do-auth-source-search server type :secret)
+                             (read-passwd (format "Password [for %s]: "
+                                                  (url-recreate-url url))))))
+                (key   (list type user* server port))
+                (entry `(,key . (,(ntlm-get-password-hashes pass*)))))
+           (unless both
+             (setq url-http-ntlm--default-users
+                   (cons
+                    `(,server . ,user*)
+                    (url-http-ntlm--rmssoc server
+                                           url-http-ntlm--default-users)))
+             (setq url-http-ntlm--auth-storage
+                   (cons entry
+                         (url-http-ntlm--rmssoc
+                          key
+                          url-http-ntlm--auth-storage))))
+           entry)
+       stored))))
+
+(defun url-http-ntlm--get-challenge ()
+  "Return the NTLM Type-2 message in the WWW-Authenticate header.
+Return nil if the NTLM Type-2 message is not present."
+  (save-restriction
+    (mail-narrow-to-head)
+    (let ((www-authenticate (mail-fetch-field "www-authenticate")))
+      (when (string-match "NTLM\\s-+\\(\\S-+\\)"
+                         www-authenticate)
+       (base64-decode-string (match-string 1 www-authenticate))))))
+
+(defun url-http-ntlm--rmssoc (key alist)
+  "Remove all elements whose `car' match KEY from ALIST."
+  (cl-remove key alist :key 'car :test 'equal))
+
+(defun url-http-ntlm--string (data)
+  "Return DATA encoded as an NTLM string."
+  (concat "NTLM " (base64-encode-string data :nobreak)))
+
+
+;;; Public function called by `url-get-authentication'.
+;;;###autoload
+(defun url-ntlm-auth (url &optional prompt overwrite realm args)
+  "Return an NTLM HTTP authorization header.
+Get the contents of the Authorization header for a HTTP response
+using NTLM authentication, to access URL.  Because NTLM is a
+two-step process, this function expects to be called twice, first
+to generate the NTLM type 1 message (request), then to respond to
+the server's type 2 message (challenge) with a suitable response.
+
+PROMPT, OVERWRITE, and REALM are ignored.
+
+ARGS is expected to contain the WWW-Authentication header from
+the server's last response.  These are used by
+`url-http-get-stage' to determine what stage we are at."
+  (url-http-ntlm--ensure-keepalive)
+  (let* ((user-url (url-http-ntlm--ensure-user url))
+        (stage (url-http-ntlm--get-stage args)))
+    (url-debug 'url-http-ntlm "Stage: %s" stage)
+    (cl-case stage
+      ;; NTLM Type 1 message: the request
+      (:request
+       (url-http-ntlm--detect-loop user-url)
+       (cl-destructuring-bind (&optional key hash)
+          (url-http-ntlm--authorization user-url nil realm)
+        (when (cl-third key)
+          (url-http-ntlm--string
+           (ntlm-build-auth-request (cl-second key) (cl-third key))))))
+      ;; NTLM Type 3 message: the response
+      (:response
+       (url-http-ntlm--detect-loop user-url)
+       (let ((challenge (url-http-ntlm--get-challenge)))
+        (cl-destructuring-bind (key hash)
+            (url-http-ntlm--authorization user-url nil realm)
+          (url-http-ntlm--string
+           (ntlm-build-auth-response challenge
+                                     (cl-second key)
+                                     hash)))))
+      (:error
+       (url-http-ntlm--authorization user-url :clear)))))
+
+
+;;; Register `url-ntlm-auth' HTTP authentication method.
+;;;###autoload
+(url-register-auth-scheme "ntlm" nil 8)
+
+(provide 'url-http-ntlm)
+
+;;; url-http-ntlm.el ends here
diff --git a/packages/validate/validate.el b/packages/validate/validate.el
new file mode 100644
index 0000000..7ca4b0a
--- /dev/null
+++ b/packages/validate/validate.el
@@ -0,0 +1,210 @@
+;;; validate.el --- Schema validation for Emacs-lisp  -*- lexical-binding: t; 
-*-
+
+;; Copyright (C) 2016  Free Software Foundation, Inc.
+
+;; Author: Artur Malabarba <address@hidden>
+;; Keywords: lisp
+;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
+;; Version: 0.5
+
+;;; Commentary:
+;;
+;; This library offers two functions that perform schema validation.
+;; Use this is your Elisp packages to provide very informative error
+;; messages when your users accidentally misconfigure a variable.
+;; For instance, if everything is fine, these do the same thing:
+;;
+;;   1.  (validate-variable 'cider-known-endpoints)
+;;   2.  cider-known-endpoints
+;;
+;; However, if the user has misconfigured this variable, option
+;; 1. will immediately give them an informative error message, while
+;; option 2. won't say anything and will lead to confusing errors down
+;; the line.
+;;
+;; The format and language of the schemas is the same one used in the
+;; `:type' property of a `defcustom'.
+;;
+;;     See: (info "(elisp) Customization Types")
+;;
+;; Both functions throw a `user-error' if the value in question
+;; doesn't match the schema, and return the value itself if it
+;; matches.  The function `validate-variable' verifies whether the value of a
+;; custom variable matches its custom-type, while `validate-value' checks an
+;; arbitrary value against an arbitrary schema.
+;;
+;; Missing features: `:inline', `plist', `coding-system', `color',
+;; `hook', `restricted-sexp'.
+
+;;; License:
+;;
+;; 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 'cl-lib)
+(require 'seq)
+(require 'cus-edit)
+
+(defun validate--check-list-contents (values schemas)
+  "Check that all VALUES match all SCHEMAS."
+  (if (not (= (length values) (length schemas)))
+      "wrong number of elements"
+    (seq-find #'identity (seq-mapn #'validate--check values schemas))))
+
+(defun validate--indent-by-2 (x)
+  (replace-regexp-in-string "^" "  " x))
+
+(defun validate--check (value schema)
+  "Return nil if VALUE matches SCHEMA.
+If they don't match, return an explanation."
+  (let ((args (cdr-safe schema))
+        (expected-type (or (car-safe schema) schema))
+        (props nil))
+    (while (and (keywordp (car args)) (cdr args))
+      (setq props `(,(pop args) ,(pop args) ,@props)))
+    (setq args (or (plist-get props :args)
+                   args))
+    (let ((r
+           (cl-labels ((wtype           ;wrong-type
+                        (tt) (unless (funcall (intern (format "%sp" tt)) value)
+                               (format "not a %s" tt))))
+             ;; TODO: hook (top-level only).
+             (cl-case expected-type
+               ((sexp other) nil)
+               (variable (cond ((wtype 'symbol))
+                               ((not (boundp value)) "this symbol has no 
variable binding")))
+               ((integer number float string character symbol function boolean 
face)
+                (wtype expected-type))
+               (regexp (cond ((ignore-errors (string-match value "") t) nil)
+                             ((wtype 'string))
+                             (t "not a valid regexp")))
+               (repeat (cond
+                        ((or (not args) (cdr args)) (error "`repeat' needs 
exactly one argument"))
+                        ((wtype 'list))
+                        (t (let ((subschema (car args)))
+                             (seq-some (lambda (v) (validate--check v 
subschema)) value)))))
+               ((const function-item variable-item) (unless (eq value (car 
args))
+                                                      "not the expected 
value"))
+               (file (cond ((wtype 'string))
+                           ((file-exists-p value) nil)
+                           ((plist-get props :must-match) "file does not 
exist")
+                           ((not (file-writable-p value)) "file is not 
accessible")))
+               (directory (cond ((wtype 'string))
+                                ((file-directory-p value) nil)
+                                ((file-exists-p value) "path is not a 
directory")
+                                ((not (file-writable-p value)) "directory is 
not accessible")))
+               (key-sequence (and (wtype 'string)
+                                  (wtype 'vector)))
+               ;; TODO: `coding-system', `color'
+               (coding-system (wtype 'symbol))
+               (color (wtype 'string))
+               (cons (or (wtype 'cons)
+                         (validate--check (car value) (car args))
+                         (validate--check (cdr value) (cadr args))))
+               ((list group) (or (wtype 'list)
+                                 (validate--check-list-contents value args)))
+               (vector (or (wtype 'vector)
+                           (validate--check-list-contents value args)))
+               (alist (let ((value-type (plist-get props :value-type))
+                            (key-type (plist-get props :key-type)))
+                        (cond ((not value-type) (error "`alist' needs a 
:value-type"))
+                              ((not key-type) (error "`alist' needs a 
:key-type"))
+                              ((wtype 'list))
+                              (t (validate--check value
+                                          `(repeat (cons ,key-type 
,value-type)))))))
+               ;; TODO: `plist'
+               ((choice radio) (if (not (cdr args))
+                                   (error "`choice' needs at least one 
argument")
+                                 (let ((gather (mapcar (lambda (x) 
(validate--check value x)) args)))
+                                   (when (seq-every-p #'identity gather)
+                                     (concat "all of the options failed\n"
+                                             (mapconcat 
#'validate--indent-by-2 gather "\n"))))))
+               ;; TODO: `restricted-sexp'
+               (set (or (wtype 'list)
+                        (let ((failed (list t)))
+                          (dolist (schema args)
+                            (let ((elem (seq-find (lambda (x) (not 
(validate--check x schema)))
+                                                value
+                                                failed)))
+                              (unless (eq elem failed)
+                                (setq value (remove elem value)))))
+                          (when value
+                            (concat "the following values don't match any of 
the options:\n  "
+                                    (mapconcat (lambda (x) (format "%s" x)) 
value "\n  "))))))))))
+      (when r
+        (let ((print-length 4)
+              (print-level 2))
+          (format "Looking for `%S' in `%S' failed because:\n%s"
+                  schema value
+                  (if (string-match "\\`Looking" r)
+                      r
+                    (validate--indent-by-2 r))))))))
+
+
+;;; Exposed API
+;;;###autoload
+(defun validate-value (value schema &optional noerror)
+  "Check that VALUE matches SCHEMA.
+If it matches return VALUE, otherwise signal a `user-error'.
+
+If NOERROR is non-nil, return t to indicate a match and nil to
+indicate a failure."
+  (let ((report (validate--check value schema)))
+    (if report
+        (unless noerror
+          (user-error report))
+      value)))
+
+;;;###autoload
+(defun validate-variable (symbol &optional noerror)
+  "Check that SYMBOL's value matches its schema.
+SYMBOL must be the name of a custom option with a defined
+`custom-type'. If SYMBOL has a value and a type, they are checked
+with `validate-value'. NOERROR is passed to `validate-value'."
+  (let* ((val (symbol-value symbol))
+         (type (custom-variable-type symbol)))
+    (if type
+        (validate-value val type)
+      (if noerror val
+        (error "Variable `%s' has no custom-type." symbol)))))
+
+;;;###autoload
+(defun validate-mark-safe-local (symbol)
+  "Mark SYMBOL as a safe local if its custom type is obeyed."
+  (put symbol 'safe-local-variable
+       (lambda (val)
+         (validate-value val (custom-variable-type symbol) 'noerror))))
+
+(defmacro validate-setq (&rest svs)
+  "Like `setq', but throw an error if validation fails.
+VALUE is validated against SYMBOL's custom type.
+
+\(fn [SYM VAL] ...)"
+  (let ((out))
+    (while svs
+      (let ((symbol (pop svs))
+            (value (if (not svs)
+                       (error "`validate-setq' takes an even number of 
arguments")
+                     (pop svs))))
+        (push `(if (boundp ',symbol)
+                   (setq ,symbol (validate-value ,value (custom-variable-type 
',symbol)))
+                 (user-error "Trying to validate a variable that's not defined 
yet: `%s'.\nYou need to require the package before validating"
+                             ',symbol))
+              out)))
+    `(progn ,@(reverse out))))
+
+(provide 'validate)
+;;; validate.el ends here
diff --git a/packages/wcheck-mode/wcheck-mode.el 
b/packages/wcheck-mode/wcheck-mode.el
index ae7e917..c97f09b 100644
--- a/packages/wcheck-mode/wcheck-mode.el
+++ b/packages/wcheck-mode/wcheck-mode.el
@@ -360,12 +360,12 @@ regexp-end
 
     The default values for the regular expressions are
 
-        \\=\\<'*         (regexp-start)
+        \\=\\<\\='*         (regexp-start)
         \\w+?         (regexp-body)
-        '*\\=\\>         (regexp-end)
+        \\='*\\=\\>         (regexp-end)
 
     Effectively they match a series of word characters defined in
-    the effective syntax table. Single quotes (') at the start
+    the effective syntax table. Single quotes (\\=') at the start
     and end of a word are excluded. This is probably a good thing
     when using `wcheck-mode' as a spelling checker.
 
@@ -377,7 +377,7 @@ regexp-discard
     to define exceptions to the `regexp-body' match. The default
     value is
 
-        \\`'+\\'
+        \\\\=`\\='+\\\\='
 
     which discards the body string if it consists only of single
     quotes. This was chosen as the default because the default
@@ -623,10 +623,10 @@ Here's an example value for the variable:
      (connection . nil)
      (face . wcheck-default-face)
      (syntax . text-mode-syntax-table)
-     (regexp-start . \"\\\\=\\<'*\")
+     (regexp-start . \"\\\\=\\<\\='*\")
      (regexp-body . \"\\\\w+?\")
-     (regexp-end . \"'*\\\\=\\>\")
-     (regexp-discard . \"\\\\`'+\\\\'\")
+     (regexp-end . \"\\='*\\\\=\\>\")
+     (regexp-discard . \"\\\\\\=`\\='+\\\\\\='\")
      (case-fold . nil)
      (read-or-skip-faces
       ((emacs-lisp-mode c-mode) read
diff --git a/packages/web-server/examples/010-current-buffer.el 
b/packages/web-server/examples/010-current-buffer.el
index 8a651ac..bb68974 100644
--- a/packages/web-server/examples/010-current-buffer.el
+++ b/packages/web-server/examples/010-current-buffer.el
@@ -1,7 +1,7 @@
 ;;; current-buffer.el --- Show the current Emacs buffer
-;; Copyright (C) 2014  Free Software Foundation, Inc.
+;; Copyright (C) 2014, 2016  Free Software Foundation, Inc.
 
-(require 'htmlize)
+(if t (require 'htmlize))               ;Don't require during compilation.
 
 (ws-start
  (lambda (request)
diff --git a/packages/web-server/examples/011-org-agenda.el 
b/packages/web-server/examples/011-org-agenda.el
index 6bca980..8e2ee8b 100644
--- a/packages/web-server/examples/011-org-agenda.el
+++ b/packages/web-server/examples/011-org-agenda.el
@@ -1,7 +1,7 @@
 ;;; org-agenda.el --- display the Org-mode agenda
-;; Copyright (C) 2014  Free Software Foundation, Inc.
+;; Copyright (C) 2014, 2016  Free Software Foundation, Inc.
 
-(require 'htmlize)
+(if t (require 'htmlize))               ;Don't require during compilation.
 
 (ws-start
  (lambda (request)
diff --git a/packages/web-server/examples/015-auto-mode-server.el 
b/packages/web-server/examples/015-auto-mode-server.el
index 5a36a93..c9ae294 100644
--- a/packages/web-server/examples/015-auto-mode-server.el
+++ b/packages/web-server/examples/015-auto-mode-server.el
@@ -1,9 +1,9 @@
-;;; auto-mode-server.el --- files with fontification from the `auto-mode-alist'
-;; Copyright (C) 2014  Free Software Foundation, Inc.
+;;; auto-mode-server.el --- files with fontification from the 
`auto-mode-alist'  -*- lexical-binding:t -*-
+;; Copyright (C) 2014, 2016  Free Software Foundation, Inc.
 
-(require 'htmlize)
+(if t (require 'htmlize))               ;Don't require during compilation.
 
-(lexical-let ((docroot default-directory))
+(let ((docroot default-directory))
   (ws-start
    (lambda (request)
      (with-slots (process headers) request
diff --git a/packages/web-server/web-server.el 
b/packages/web-server/web-server.el
index 41ff18d..1c06304 100644
--- a/packages/web-server/web-server.el
+++ b/packages/web-server/web-server.el
@@ -106,9 +106,9 @@ function MATCH and the `ws-response-header' convenience
 function.
 
   (ws-start
-   '(((lambda (_) t) .
+   \\='(((lambda (_) t) .
       (lambda (proc request)
-        (ws-response-header proc 200 '(\"Content-type\" . \"text/plain\"))
+        (ws-response-header proc 200 \\='(\"Content-type\" . \"text/plain\"))
         (process-send-string proc \"hello world\")
         t)))
    8080)
@@ -562,7 +562,7 @@ supplied any subsequent data written to PROC using 
`ws-send' will
 be encoded appropriately including sending the appropriate data
 upon the end of transmission for chunked transfer encoding.
 
-For example with the header `(\"Content-Encoding\" . \"gzip\")',
+For example with the header (\"Content-Encoding\" . \"gzip\"),
 any data subsequently written to PROC using `ws-send' will be
 compressed using the command specified in `ws-gzip-cmd'."
   ;; update process to reflect any Content or Transfer encodings
diff --git a/packages/websocket/websocket-functional-test.el 
b/packages/websocket/websocket-functional-test.el
index 6a9481f..e447015 100644
--- a/packages/websocket/websocket-functional-test.el
+++ b/packages/websocket/websocket-functional-test.el
@@ -1,6 +1,6 @@
 ;;; websocket-functional-test.el --- Simple functional testing
 
-;; Copyright (c) 2013  Free Software Foundation, Inc.
+;; Copyright (c) 2013, 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
@@ -51,11 +51,11 @@
 (defvar wstest-ws
   (websocket-open
    "ws://127.0.0.1:9999"
-   :on-message (lambda (websocket frame)
+   :on-message (lambda (_websocket frame)
                  (push (websocket-frame-payload frame) wstest-msgs)
                  (message "ws frame: %S" (websocket-frame-payload frame))
                  (error "Test error (expected)"))
-   :on-close (lambda (websocket) (setq wstest-closed t))))
+   :on-close (lambda (_websocket) (setq wstest-closed t))))
 
 (defun wstest-pop-to-debug ()
   "Open websocket log buffer. Not used in testing. Just for debugging."
@@ -71,7 +71,7 @@
 
 (sleep-for 0.1)
 (assert (equal (car wstest-msgs) "You said: Hi!"))
-(setf (websocket-on-error wstest-ws) (lambda (ws type err)))
+(setf (websocket-on-error wstest-ws) (lambda (_ws _type _err)))
 (websocket-send-text wstest-ws "Hi after error!")
 (sleep-for 0.1)
 (assert (equal (car wstest-msgs) "You said: Hi after error!"))
@@ -79,7 +79,10 @@
 (websocket-close wstest-ws)
 (assert (null (websocket-openp wstest-ws)))
 
-(stop-process wstest-server-proc)
+(if (not (eq system-type 'windows-nt))
+    ; Windows doesn't have support for the SIGSTP signal, so we'll just kill
+    ; the process.
+    (stop-process wstest-server-proc))
 (kill-process wstest-server-proc)
 
 ;; Make sure the processes are closed.  This happens asynchronously,
@@ -91,17 +94,19 @@
 ;; Remote server test, with wss ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(when (>= (string-to-int (substring emacs-version 0 2)) 24)
+(when (>= (string-to-number (substring emacs-version 0 2)) 24)
   (message "Testing with wss://echo.websocket.org")
+  (when (eq system-type 'windows-nt)
+    (message "Windows users must have gnutls DLLs in the emacs bin 
directory."))
   (setq wstest-ws
         (websocket-open
          "wss://echo.websocket.org"
-         :on-open (lambda (websocket)
+         :on-open (lambda (_websocket)
                     (message "Websocket opened"))
-         :on-message (lambda (websocket frame)
+         :on-message (lambda (_websocket frame)
                        (push (websocket-frame-payload frame) wstest-msgs)
                        (message "ws frame: %S" (websocket-frame-payload 
frame)))
-         :on-close (lambda (websocket)
+         :on-close (lambda (_websocket)
                      (message "Websocket closed")
                      (setq wstest-closed t)))
         wstest-msgs nil)
@@ -121,29 +126,30 @@
 (message "Testing with emacs websocket server.")
 (message "If this does not pass, make sure your firewall allows the 
connection.")
 (setq wstest-closed nil)
-(setq server-conn (websocket-server
-                   9998
-                   :on-message (lambda (ws frame)
-                                 (message "Server received text!")
-                                 (websocket-send-text ws
-                                  (websocket-frame-payload frame)))
-                   :on-open (lambda (websocket) "Client connection opened!")
-                   :on-close (lambda (websocket)
-                               (setq wstest-closed t))))
-
-(setq wstest-msgs nil
-      wstest-ws
-      (websocket-open
-       "ws://localhost:9998"
-       :on-message (lambda (websocket frame)
-                     (push (websocket-frame-payload frame) wstest-msgs)
-                     (message "ws frame: %S" (websocket-frame-payload 
frame)))))
+(let ((server-conn (websocket-server
+                    9998
+                    :host 'local
+                    :on-message (lambda (ws frame)
+                                  (message "Server received text!")
+                                  (websocket-send-text ws
+                                                       
(websocket-frame-payload frame)))
+                    :on-open (lambda (_websocket) "Client connection opened!")
+                    :on-close (lambda (_websocket)
+                                (setq wstest-closed t)))))
+
+  (setq wstest-msgs nil
+        wstest-ws
+        (websocket-open
+         "ws://localhost:9998"
+         :on-message (lambda (_websocket frame)
+                       (push (websocket-frame-payload frame) wstest-msgs)
+                       (message "ws frame: %S" (websocket-frame-payload 
frame)))))
 
-(assert (websocket-openp wstest-ws))
-(websocket-send-text wstest-ws "Hi to self!")
-(sleep-for 0.3)
-(assert (equal (car wstest-msgs) "Hi to self!"))
-(websocket-server-close server-conn)
+  (assert (websocket-openp wstest-ws))
+  (websocket-send-text wstest-ws "Hi to self!")
+  (sleep-for 0.3)
+  (assert (equal (car wstest-msgs) "Hi to self!"))
+  (websocket-server-close server-conn))
 (assert wstest-closed)
 (websocket-close wstest-ws)
 
diff --git a/packages/websocket/websocket.el b/packages/websocket/websocket.el
index 1b0b294..8db83c2 100644
--- a/packages/websocket/websocket.el
+++ b/packages/websocket/websocket.el
@@ -4,7 +4,7 @@
 
 ;; Author: Andrew Hyatt <address@hidden>
 ;; Keywords: Communication, Websocket, Server
-;; Version: 1.5
+;; Version: 1.6
 ;;
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
@@ -62,8 +62,8 @@ the additional helper APIs are not visible to the caller.
 
 A websocket struct is created with `websocket-open'.
 
-`ready-state' contains one of 'connecting, 'open, or
-'closed, depending on the state of the websocket.
+`ready-state' contains one of `connecting', `open', or
+`closed', depending on the state of the websocket.
 
 The W3C API \"bufferedAmount\" call is not currently implemented,
 since there is no elisp API to get the buffered amount from the
@@ -450,10 +450,11 @@ ERR should be a cons of error symbol and error data."
 The only acceptable one to websocket is responce code 101.
 A t value will be returned on success, and an error thrown
 if not."
-  (string-match "HTTP/1.1 \\([[:digit:]]+\\)" output)
+  (unless (string-match "^HTTP/1.1 \\([[:digit:]]+\\)" output)
+    (signal 'websocket-invalid-header "Invalid HTTP status line"))
   (unless (equal "101" (match-string 1 output))
-       (signal 'websocket-received-error-http-response
-               (string-to-number (match-string 1 output))))
+    (signal 'websocket-received-error-http-response
+           (string-to-number (match-string 1 output))))
   t)
 
 (defun websocket-parse-repeated-field (output field)
@@ -609,7 +610,7 @@ the car of which is a string naming the extension, and the 
cdr of
 which is the list of parameter strings to use for that extension.
 The parameter strings are of the form \"key=value\" or \"value\".
 EXTENSIONS can be NIL if none are in use.  An example value would
-be '(\"deflate-stream\" . (\"mux\" \"max-channels=4\")).
+be (\"deflate-stream\" . (\"mux\" \"max-channels=4\")).
 
 Cookies that are set via `url-cookie-store' will be used during
 communication with the server, and cookies received from the
@@ -639,7 +640,7 @@ or `on-close', and the error as the third argument. Do NOT
 rethrow the error, or else you may miss some websocket messages.
 You similarly must not generate any other errors in this method.
 If you want to debug errors, set
-`websocket-callback-debug-on-error' to `t', but this also can be
+`websocket-callback-debug-on-error' to t, but this also can be
 dangerous is the debugger is quit out of.  If not specified,
 `websocket-default-error-handler' is used.
 
@@ -746,19 +747,21 @@ connection is invalid, the connection will be closed."
     (setf (websocket-inflight-input websocket) nil)
     ;; If we've received the complete header, check to see if we've
     ;; received the desired handshake.
-    (when (and (eq 'connecting (websocket-ready-state websocket))
-               (setq header-end-pos (string-match "\r\n\r\n" text))
+    (when (and (eq 'connecting (websocket-ready-state websocket)))
+      (if (and (setq header-end-pos (string-match "\r\n\r\n" text))
                (setq start-point (+ 4 header-end-pos)))
-      (condition-case err
           (progn
-            (websocket-verify-response-code text)
-            (websocket-verify-headers websocket text)
-            (websocket-process-headers (websocket-url websocket) text))
-        (error
-         (websocket-close websocket)
-         (signal (car err) (cdr err))))
-      (setf (websocket-ready-state websocket) 'open)
-      (websocket-try-callback 'websocket-on-open 'on-open websocket))
+            (condition-case err
+                (progn
+                  (websocket-verify-response-code text)
+                  (websocket-verify-headers websocket text)
+                  (websocket-process-headers (websocket-url websocket) text))
+              (error
+               (websocket-close websocket)
+               (signal (car err) (cdr err))))
+            (setf (websocket-ready-state websocket) 'open)
+            (websocket-try-callback 'websocket-on-open 'on-open websocket))
+        (setf (websocket-inflight-input websocket) text)))
     (when (eq 'open (websocket-ready-state websocket))
       (websocket-process-input-on-open-ws
        websocket (substring text (or start-point 0))))))
@@ -820,6 +823,11 @@ of populating the list of server extensions to WEBSOCKET."
 
 (defun* websocket-server (port &rest plist)
   "Open a websocket server on PORT.
+If the plist contains a `:host' HOST pair, this value will be
+used to configure the addresses the socket listens on. The symbol
+`local' specifies the local host. If unspecified or nil, the
+socket will listen on all addresses.
+
 This also takes a plist of callbacks: `:on-open', `:on-message',
 `:on-close' and `:on-error', which operate exactly as documented
 in the websocket client function `websocket-open'.  Returns the
@@ -833,6 +841,7 @@ connection, which should be kept in order to pass to
                 :log 'websocket-server-accept
                 :filter-multibyte nil
                 :plist plist
+                :host (plist-get plist :host)
                 :service port)))
     conn))
 
@@ -849,7 +858,7 @@ connection, which should be kept in order to pass to
       (setq websocket-server-websockets (remove ws 
websocket-server-websockets))))
   (delete-process conn))
 
-(defun websocket-server-accept (server client message)
+(defun websocket-server-accept (server client _message)
   "Accept a new websocket connection from a client."
   (let ((ws (websocket-inner-create
              :server-conn server
diff --git a/packages/wisi/NEWS b/packages/wisi/NEWS
index 9e8ad77..4a9f690 100644
--- a/packages/wisi/NEWS
+++ b/packages/wisi/NEWS
@@ -7,6 +7,10 @@ Please send wisi bug reports to address@hidden, with
 'wisi' in the subject. If possible, use M-x report-emacs-bug.
 
 
+* wisi 1.1.3
+
+** improve use of quotes in doc strings.
+
 * wisi 1.1.2
 20 Jan 2016
 
diff --git a/packages/wisi/README b/packages/wisi/README
index 098b476..3c27c32 100644
--- a/packages/wisi/README
+++ b/packages/wisi/README
@@ -1,4 +1,4 @@
-Emacs wisi package 1.1.2
+Emacs wisi package 1.1.3
 
 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 b70a1ae..5c788e7 100644
--- a/packages/wisi/wisi-compile.el
+++ b/packages/wisi/wisi-compile.el
@@ -21,7 +21,7 @@
 ;;
 
 ;;; Commentary:
-;; 
+;;
 
 ;;;; History: first experimental version Jan 2013
 ;;
@@ -144,18 +144,18 @@ 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:
 
-'error
+`error'
 
-'accept
+`accept'
 
 integer - shift; gives new state
 
-'(nonterm . index) - reduce by nonterm production index.
+(nonterm . index) - reduce by nonterm production index.
 
-'(integer (nonterm . index)) - a shift/reduce conflict
-'((nonterm . index) (nonterm . index)) - a reduce/reduce conflict
+(integer (nonterm . index)) - a shift/reduce conflict
+((nonterm . index) (nonterm . index)) - a reduce/reduce conflict
 
-The first item in the alist must have the key 'default (not a
+The first item in the alist must have the key `default' (not a
 terminal token); it is used when no other item matches the
 current token.
 
diff --git a/packages/wisi/wisi-parse.el b/packages/wisi/wisi-parse.el
index b9da937..a16a81d 100644
--- a/packages/wisi/wisi-parse.el
+++ b/packages/wisi/wisi-parse.el
@@ -269,20 +269,20 @@ point at which that max was spawned.")
 (defun wisi-parsers-active (parser-states active-count)
   "Return the type of parser cycle to execute.
 PARSER-STATES[*].active is the last action a parser took. If it
-was 'shift, that parser used the input token, and should not be
+was `shift', that parser used the input token, and should not be
 executed again until another input token is available, after all
 parsers have shifted the current token or terminated.
 
 Returns one of:
 
-'accept : all PARSER-STATES have active set to nil or 'accept -
+`accept' : all PARSER-STATES have active set to nil or `accept' -
 done parsing
 
-'shift : all PARSER-STATES have active set to nil, 'accept, or
-'shift - get a new token, execute 'shift parsers.
+`shift' : all PARSER-STATES have active set to nil, `accept', or
+`shift' - get a new token, execute `shift' parsers.
 
-'reduce : some PARSER-STATES have active set to 'reduce - no new
-token, execute 'reduce parsers."
+`reduce' : some PARSER-STATES have active set to `reduce' - no new
+token, execute `reduce' parsers."
   (let ((result nil)
        (i 0)
        (shift-count 0)
@@ -336,7 +336,7 @@ token, execute 'reduce parsers."
 (defun wisi-parse-elim-identical (parser-states active-parser-count)
   "Check for parsers in PARSER-STATES that have reached identical states 
eliminate one.
 Return new ACTIVE-PARSER-COUNT. Assumes all parsers have active
-nil, 'shift, or 'accept."
+nil, `shift', or `accept'."
   ;; parser-states passed by reference; active-parser-count by copy
   ;; see test/ada_mode-slices.adb for example
   (dotimes (parser-i (1- (length parser-states)))
diff --git a/packages/wisi/wisi.el b/packages/wisi/wisi.el
index 0b29b3e..7b7f55e 100644
--- a/packages/wisi/wisi.el
+++ b/packages/wisi/wisi.el
@@ -7,7 +7,7 @@
 ;; Keywords: parser
 ;;  indentation
 ;;  navigation
-;; Version: 1.1.2
+;; Version: 1.1.3
 ;; package-requires: ((cl-lib "0.4") (emacs "24.2"))
 ;; URL: http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html
 ;;
@@ -197,7 +197,7 @@
 (defvar-local wisi-string-quote-escape-doubled nil
   "Non-nil if a string delimiter is escaped by doubling it (as in Ada).")
 (defvar-local wisi-string-quote-escape nil
-  "Cons '(delim . character) where 'character' escapes quotes in strings 
delimited by 'delim'.")
+  "Cons (delim . character) where `character' escapes quotes in strings 
delimited by `delim'.")
 (defvar-local wisi-string-single-term nil) ;; string delimited by single quotes
 (defvar-local wisi-symbol-term nil)
 (defvar-local wisi-number-term nil)
@@ -787,7 +787,7 @@ PAIRS is a vector of the form [TOKEN-NUMBER CLASS 
TOKEN-NUMBER
 CLASS ...] where TOKEN-NUMBER is the (1 indexed) token number in
 the production, CLASS is the wisi class of that token. Use in a
 grammar action as:
-  (wisi-statement-action [1 'statement-start 7 'statement-end])"
+  (wisi-statement-action [1 \\='statement-start 7 \\='statement-end])"
   (save-excursion
     (let ((first-item t)
          first-keyword-mark
diff --git a/packages/yasnippet/.gitmodules b/packages/yasnippet/.gitmodules
index e9a0388..a8cc391 100644
--- a/packages/yasnippet/.gitmodules
+++ b/packages/yasnippet/.gitmodules
@@ -1,7 +1,7 @@
 [submodule "snippets"]
         path = snippets
         url = https://github.com/AndreaCrotti/yasnippet-snippets.git
-       branch = master
+        branch = master
 [submodule "yasmate"]
         path = yasmate
         url = https://github.com/capitaomorte/yasmate.git
diff --git a/packages/yasnippet/.travis.yml b/packages/yasnippet/.travis.yml
index 4bd7940..72aa314 100644
--- a/packages/yasnippet/.travis.yml
+++ b/packages/yasnippet/.travis.yml
@@ -1,24 +1,28 @@
-language: emacs
+language: generic
+sudo: false
+git:
+  submodules: false
 
 env:
-  - "EMACS=emacs23"
-  - "EMACS=emacs24"
+  - EMACS_VERSION=23.4
+  - EMACS_VERSION=24.3
+  - EMACS_VERSION=24.5
+  - EMACS_VERSION=25-prerelease
 
 install:
-  - if [ "$EMACS" = "emacs23" ]; then
-        sudo apt-get -qq update &&
-        sudo apt-get -qq -f install &&
-        sudo apt-get -qq install emacs23-nox &&
-        curl -LO 
https://raw.githubusercontent.com/ohler/ert/c619b56c5bc6a866e33787489545b87d79973205/lisp/emacs-lisp/ert.el
 &&
-        curl -LO 
https://raw.githubusercontent.com/ohler/ert/c619b56c5bc6a866e33787489545b87d79973205/lisp/emacs-lisp/ert-x.el
 &&
-        curl -Lo cl-lib.el http://elpa.gnu.org/packages/cl-lib-0.5.el;
+  - curl -LO 
https://github.com/npostavs/emacs-travis/releases/download/bins/emacs-bin-${EMACS_VERSION}.tar.gz
+  - tar -xaf emacs-bin-${EMACS_VERSION}.tar.gz -C /
+  # Configure $PATH: Emacs installed to /tmp/emacs
+  - export PATH=/tmp/emacs/bin:${PATH}
+  - if ! emacs -Q --batch --eval "(require 'cl-lib)" ; then
+        curl -Lo cl-lib.el http://elpa.gnu.org/packages/cl-lib-0.5.el ;
     fi
-  - if [ "$EMACS" = "emacs24" ]; then
-        sudo add-apt-repository -y ppa:cassou/emacs &&
-        sudo apt-get -qq update &&
-        sudo apt-get -qq -f install &&
-        sudo apt-get -qq install emacs24-nox;
+  - if ! emacs -Q --batch --eval "(require 'ert)" ; then
+        curl -LO 
https://raw.githubusercontent.com/ohler/ert/c619b56c5bc6a866e33787489545b87d79973205/lisp/emacs-lisp/ert.el
 &&
+        curl -LO 
https://raw.githubusercontent.com/ohler/ert/c619b56c5bc6a866e33787489545b87d79973205/lisp/emacs-lisp/ert-x.el
 ;
     fi
+  - emacs --version
 
 script:
-  - rake compile; rake tests
+  - rake compile
+  - rake tests
diff --git a/packages/yasnippet/NEWS b/packages/yasnippet/NEWS
new file mode 100644
index 0000000..7f4dec6
--- /dev/null
+++ b/packages/yasnippet/NEWS
@@ -0,0 +1,277 @@
+Yasnippet NEWS -- history of user-visible changes.
+
+Copyright (C) 2016 Free Software Foundation, Inc.
+See the end of the file for license conditions.
+
+
+* 0.10.0 (June 11th, 2016)
+
+** Changes and New Features
+
+*** Yasnippet now prints far fewer message by default.
+See Github #682, #683.
+
+*** `yas-wrap-around-region' can be set to a register.
+The register's content will be used.  This is like the old `cua'
+option, but can be used with any register and doesn't require enabling
+cua-mode.
+
+*** Clearing of snippet fields is now decided by the command's effect.
+The `delete-selection' property is no longer consulted.  See Github #662.
+
+*** Empty lines in snippet expansion are no longer indented.
+See Github #679.
+
+*** All lines from mirror output are now indented.
+See Github #665.
+
+*** New variable yas-alias-to-yas/prefix-p
+See Github #696, #699.
+
+*** New function yas-next-field-will-exit-p
+See Github #561.
+
+*** `snippet-mode' is now autoloaded.
+
+** Fixed Bugs
+
+*** Fix incompatibility with Emacs 25 and haskell-mode.
+This should also help other modes with a non-nil syntax-propertize
+function.  See Github #687.
+
+*** Text property changes no longer disable snippets.
+This prevents cc-mode based modes from causing premature exit of
+snippets.  See Github #677.
+
+*** Fields are now transformed correctly after `yas-next-field'.
+See Github #381.
+
+*** The $> construct is now escaped correctly, and documented.
+See Github #640.
+
+*** Avoid corruption of snippet content when loading from files.
+See Github #707 and Emacs bug #23659.
+
+*** `yas-wrap-around-region' now works for snippets with fields
+farther down the buffer than $0.  See Github #636.
+
+*** The active region is deleted when using `yas-expand'.
+This makes it consistent with `yas-insert-snippet'.  See Github #523.
+
+*** Fix mirror+autofill interaction.
+See Github #643 and http://emacs.stackexchange.com/q/19206/5296.
+
+*** Snippet insertion no longer adds irrelevant strings to kill ring.
+See Github #675.
+
+
+* 0.9.1 (April 3rd, 2016)
+
+** Changes and New Features
+
+*** Noam Postavsky is now the official yasnippet maintainer.
+
+*** `yas-visit-snippet-file' now works for compiled snippets (see Github #597).
+
+*** New function `yas-lookup-snippet' (see Github #595, #596).
+
+*** .emacs.d/snippets directory is now created automatically.
+If that value is present in `yas-snippet-dirs' (see Github #648).
+
+*** Default value for `yas-snippet-dirs' now uses `user-emacs-directory'
+instead of hardcoding "~/emacs.d" (see Github #632).
+
+*** `yas-visit-snippet-file' no longer overrides `yas-prompt-functions',
+see Github #576.
+
+*** The defaults for prompting have changed.
+`yas-x-prompt' is no longer present in the default value of
+`yas-prompt-functions'.
+
+The new function `yas-maybe-ido-prompt' (which performs ido prompting
+if `ido-mode' is enabled) replaces `yas-ido-prompt' (which always
+performs ido prompting).  Previously the behaviour was dependent on
+the Emacs version being used.
+
+*** The default value of `yas-buffer-local-condition' now works for 
`yas-insert-snippet' too.
+See Github #305.
+
+*** The default value of `yas-new-snippet-default' no longer inserts 
`require-final-newline: nil'.
+It was redundant, since `mode: snippet' already accomplishes the same.
+`binding: ${4:direct-keybinding}}' is also removed, as it is hardly
+ever wanted.
+
+*** Snippet fields are only cleared by commands with `delete-selection' 
property,
+See Github #515, #644.
+
+*** `yas-initialize' (and backward compat alias `yas/initialize') are restored,
+but marked obsolete, use (yas-global-mode +1) instead.  See Github
+#546, #569.
+
+*** `yas-key-syntaxes' is much more powerful and accepts functions.
+Enables use cases when discovering keys based on buffer syntax is not
+good enough.  See issue #497.
+
+*** Documentation rewritten in org-mode and updated.
+A tremendous effort by Noam Postavsky.  Hopefully easier to maintain
+and navigate.  Available at <http://capitaomorte.github.io/yasnippet>.
+
+*** Snippets are now maintained in their own repo.
+Snippets live in Andrea Crotti's
+<https://github.com/andreacrotti/yasnippet-snippets>.  See README.md
+for more details.
+
+*** Textmate snippet importer moved to separate `yasmate' repo.
+URL is <https://github.com/capitaomorte/yasmate>.  See README.md for
+more details.
+
+*** `yas-snippet-dirs' now allows symbols as aliases to directories.
+The added level of indirection should allow more esoteric
+configurations (see Github #495).
+
+*** `yas-reload-all' can now jit-load when called interactively.
+
+*** New `yas-after-reload-hook' run after `yas-reload-all'.
+See <https://github.com/pezra/rspec-mode/pull/75> for the discussion
+leading up to this change.
+
+*** New functions `yas-activate-extra-mode' and `yas-deactivate-extra-mode'.
+These are preferable to setting `yas-extra-modes' directly in the mode
+hook (see issue #420 for more information).
+
+*** New variable `yas-new-snippet-default'.
+The default snippet suggested on `yas-new-snippet' can now be
+customized.
+
+** Fixed bugs
+
+*** `yas-expand' now sets `this-command' when falling back to another command.
+Previously it was setting `this-original-command', which does not
+match the documented semantics.  See Github #587.
+
+*** Github #537: Be lenient to extensions operating on snippet fields.
+
+*** Github #619: Parents of extra modes are now activated too.
+
+*** Github #549: `yas-verbosity' is now applied to `load' calls too.
+
+*** Github #607; avoid obscure Emacs bug triggered by overlays in *Messages* 
buffer.
+It was triggered by yasnippet+flycheck+highlight-parentheses.  See
+also <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21824>
+
+*** Github #617; fix x prompt when snippet inserts many lines.
+
+*** Github #618; avoid breakage if `scan-sexp' modifies match data.
+Which it does in Emacs 25.
+
+*** Github #562: Deleting inner numberless snippet caused an error.
+
+*** Github #418, #536: Fix navigation to zero-length fields at snippet end.
+
+*** Github #527, #525 and #526: Attempt to prevent "fallback loops"
+when interactiing with other extensions that use similar fallback
+mechanisms.
+
+
+* 0.8.0 (August 2012)
+
+** Changes and New Features
+
+*** All YASnippet symbols now prefixed with `yas-'.  Keep old `yas/' versions 
as aliases.
+
+*** Yasnippet is now Free Software Foundation's copyright.
+
+*** `yas-dont-activate' can be a list of functions.
+
+*** Snippets are loaded just-in-time .
+Thanks to Matthew Fidler for a lot of input with the implementation.
+
+*** yasnippet-bundle.el is no longer available.
+Use `yas-compile-directory' instead if you need the speed advantage.
+
+*** New functions `yas-compile-directory' and `yas-recompile-all'.
+This feature is still undocumented.  Generate a
+.yas-compiled-snippets.el file in the directory passed where snippets
+are compiled into emacs-lisp code.
+
+*** New `yas-verbosity' variable.
+
+*** Interactively calling `yas-exit-snippet' exits most recently inserted 
snippet.
+
+*** Using filenames as snippet triggers is deprecated.
+
+*** Default value of `yas-show-menu-p' is `abbreviate'.
+
+*** `yas-visit-snippet' ignores `yas-prompt-functions'.
+
+*** `yas-buffer-local-condition' restricted to trigger-key expansions by 
default.
+
+*** `yas-load-snippet-buffer' (`C-c C-c') in `snippet-mode' has been much 
improved.
+
+*** New variable `yas-expand-only-for-last-commands', thanks Erik Postma.
+
+*** New variable `yas-extra-modes' aliases old `yas/mode-symbol'.
+
+*** New `yas-describe-tables' command.
+
+*** New `yas-define-condition-cache' macro.
+This defines an optimised function for placing in a `# condition:'
+directive that will run at most once per snippet-expansion attempt.
+
+*** Mirrors can occur inside fields.
+
+*** New `# type: command' directive.
+This feature is still largely undocumented.
+
+*** A hidden .yas-setup.el is loaded if found in a snippet directory.
+
+*** `yas-wrap-around-region' can now also be `cua' (undocumented feature).
+
+*** Make menu groups automatically using new .yas-make-groups file.
+
+*** Per-snippet keybindings using `# keybinding:' directive.
+
+*** More friendly `yas-expand-snippet' calling convention.
+This breaks backward compatibility.
+
+*** The `# env:' directive is now `# expand-env:'.
+
+*** Setup multiple parent modes using new .yas-parents file.
+
+** Fixed bugs
+
+*** Github #281: jit-load snippets in the correct order.
+
+*** Github #245: primary field transformations work inside nested fields.
+
+*** Github #242: stop using the deprecated `assoc' library.
+
+*** Github #233: show direct snippet keybindings in the menu.
+
+*** Github #194, Googlecode 192: Compatibility with `fci-mode'.
+
+*** Github #147, Googlecode 145: Snippets comments were getting inserted.
+
+*** Github #141, Googlecode 139: searching buffer in embedded elisp works 
slightly better.
+Issue is still open for analysis, though
+
+*** Github #95, Googlecode 193: no more stack overflow in org-mode.
+
+
+----------------------------------------------------------------------
+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.
+
+
+Local variables:
+coding: utf-8
+mode: outline
+paragraph-separate: "[         ]*$"
+end:
diff --git a/packages/yasnippet/README.mdown b/packages/yasnippet/README.mdown
index 6646557..a3062ea 100644
--- a/packages/yasnippet/README.mdown
+++ b/packages/yasnippet/README.mdown
@@ -1,4 +1,4 @@
-[![Build 
Status](https://travis-ci.org/capitaomorte/yasnippet.png)](https://travis-ci.org/capitaomorte/yasnippet)
+[![Build 
Status](https://travis-ci.org/joaotavora/yasnippet.png)](https://travis-ci.org/joaotavora/yasnippet)
 
 # Intro
 
@@ -161,7 +161,7 @@ request).
 
 Finally, thank you very much for using YASnippet!
 
-[docs]: http://capitaomorte.github.com/yasnippet/
+[docs]: http://joaotavora.github.io/yasnippet/
 [issues]: https://github.com/capitaomorte/yasnippet/issues
 [googlecode tracker]: http://code.google.com/p/yasnippet/issues/list
 [forum]: http://groups.google.com/group/smart-snippet
diff --git a/packages/yasnippet/Rakefile b/packages/yasnippet/Rakefile
index 2965eb9..f88237b 100644
--- a/packages/yasnippet/Rakefile
+++ b/packages/yasnippet/Rakefile
@@ -45,8 +45,12 @@ task :release => [:package, 'doc:archive'] do
 end
 
 desc "Generate document"
-task :doc do
-  sh "#{$EMACS} -Q -L . --batch -l doc/yas-doc-helper.el" +
+task :doc, [:htmlize] do |t, args|
+  load_path = '-L .'
+  if args[:htmlize]
+    load_path += " -L #{args[:htmlize]}"
+  end
+  sh "#{$EMACS} -Q #{load_path} --batch -l doc/yas-doc-helper.el" +
     " -f yas--generate-html-batch"
 end
 
@@ -94,7 +98,8 @@ end
 desc "Compile yasnippet.el into yasnippet.elc"
 
 rule '.elc' => '.el' do |t|
-  sh "#{$EMACS} --batch -L . --eval \"(byte-compile-file 
\\\"#{t.source}\\\")\""
+  sh "#{$EMACS} --batch -L . --eval \"(setq byte-compile-error-on-warn t)\"" +
+     " -f batch-byte-compile #{t.source}"
 end
 task :compile => FileList["yasnippet.el"].ext('elc')
 
diff --git a/packages/yasnippet/doc/snippet-development.org 
b/packages/yasnippet/doc/snippet-development.org
index 9e8f901..4fd293d 100644
--- a/packages/yasnippet/doc/snippet-development.org
+++ b/packages/yasnippet/doc/snippet-development.org
@@ -8,52 +8,48 @@
 
 There are some ways you can quickly find a snippet file or create a new one:
 
--  =M-x yas-new-snippet=
+-  =M-x yas-new-snippet=, key bindind: =C-c & C-n=
 
-   Creates a new buffer with a template for making a new snippet.
-   The buffer is in =snippet-mode= (see below). When you are done
-   editing the new snippet, use =C-c C-c= to save it. This will
-   prompt for a directory two steps: first, the snippet table
-   (with a default based on the major mode you started in), and then
-   then snippet collection directory (defaults to the first directory
-   in =yas-snippet-dirs=. (See [[file:snippet-organization.org][Organizing 
Snippets]]
-   for more detail on how snippets are organized.)
+   Creates a new buffer with a template for making a new snippet.  The
+   buffer is in =snippet-mode= (see [[snippet-mode][below]]).  When you are 
done editing
+   the new snippet, use [[yas-load-snippet-buffer-and-close][=C-c C-c=]] to 
save it.
 
--  =M-x yas-find-snippets=
-
-   Lets you find the snippet file in the directory the snippet was
-   loaded from (if it exists) like =find-file-other-window=. The
-   directory searching logic is similar to =M-x yas-new-snippet=.
-
--  =M-x yas-visit-snippet-file=
+-  =M-x yas-visit-snippet-file=, key binding: =C-c & C-v=
 
    Prompts you for possible snippet expansions like
    [[sym:yas-insert-snippet][=yas-insert-snippet=]], but instead of expanding 
it, takes you directly
    to the snippet definition's file, if it exists.
 
-Once you find this file it will be set to =snippet-mode= (see ahead) and
-you can start editing your snippet.
+Once you find this file it will be set to =snippet-mode= (see 
[[snippet-mode][ahead]])
+and you can start editing your snippet.
 
-** Using the =snippet-mode= major mode
+** Using the =snippet-mode= major mode <<snippet-mode>>
 
 There is a major mode =snippet-mode= to edit snippets. You can set the
 buffer to this mode with =M-x snippet-mode=. It provides reasonably
 useful syntax highlighting.
 
-Two commands are defined in this mode:
+Three commands are defined in this mode:
+
+-  =M-x yas-load-snippet-buffer=, key binding: =C-c C-l=
 
--  =M-x yas-load-snippet-buffer=
+   Prompts for a snippet table (with a default based on snippet's
+   major mode) and loads the snippet currently being edited.
 
-     When editing a snippet, this loads the snippet into the correct
-     mode and menu. Bound to =C-c C-c= by default while in
-     =snippet-mode=.
+-  =M-x yas-load-snippet-buffer-and-close=, key binding: =C-c C-c=
+   <<yas-load-snippet-buffer-and-close>>
 
--  =M-x yas-tryout-snippet=
+   Like =yas-load-snippet-buffer=, but also saves the snippet and
+   calls =quit-window=.  The destination is decided based on the
+   chosen snippet table and snippet collection directly (defaulting to
+   the first directory in =yas-snippet-dirs= (see 
[[file:snippet-organization.org][Organizing Snippets]]
+   for more detail on how snippets are organized).
 
-     When editing a snippet, this opens a new empty buffer, sets it to
-     the appropriate major mode and inserts the snippet there, so you
-     can see what it looks like. This is bound to =C-c C-t= while in
-     =snippet-mode=.
+-  =M-x yas-tryout-snippet=, key binding: =C-c C-t=
+
+   When editing a snippet, this opens a new empty buffer, sets it to
+   the appropriate major mode and inserts the snippet there, so you
+   can see what it looks like.
 
 There are also /snippets for writing snippets/: =vars=, =$f= and =$m=
 :-).
@@ -194,7 +190,7 @@ previous snippet.
 This is optional and has no effect whatsoever on snippet functionality,
 but it looks nice.
 
-* <<Template syntax>>
+* Template Syntax
 
 The syntax of the snippet template is simple but powerful, very similar
 to TextMate's.
@@ -262,10 +258,10 @@ like this:
 
 They acts as the default value for a tab stop. But when you firstly
 type at a tab stop, the default value will be replaced by your typing.
-The number can be omitted if you don't want to create [[mirrors]] or
-[[transformations]] for this field.
+The number can be omitted if you don't want to create 
[[mirrors-fields][mirrors]] or
+[[mirror-transformations][transformations]] for this field.
 
-** <<Mirrors>>
+** Mirrors <<mirrors-fields>>
 
 We refer the tab stops with placeholders as a /field/. A field can have
 mirrors. Its mirrors will get updated when you change the text of a
@@ -285,7 +281,7 @@ The tab stops with the same number to the field act as its 
mirrors. If
 none of the tab stops has an initial value, the first one is selected as
 the field and others mirrors.
 
-** Mirrors with <<transformations>>
+** Mirrors with transformations <<mirror-transformations>>
 
 If the value of an =${n:=-construct starts with and contains =$(=,
 then it is interpreted as a mirror for field =n= with a
@@ -422,3 +418,9 @@ the exit marker.
 By the way, =C-d= will only clear the field if you cursor is at the
 beginning of the field /and/ it hasn't been changed yet. Otherwise, it
 performs the normal Emacs =delete-char= command.
+
+** Indentation markers
+
+If [[sym:yas-indent-line][=yas-indent-line=]] is *not* set to '=auto=, it's 
still possible to
+indent specific lines by adding an indentation marker, =$>=, somewhere
+on the line.
diff --git a/packages/yasnippet/doc/snippet-expansion.org 
b/packages/yasnippet/doc/snippet-expansion.org
index fdc02cc..f57df95 100644
--- a/packages/yasnippet/doc/snippet-expansion.org
+++ b/packages/yasnippet/doc/snippet-expansion.org
@@ -83,6 +83,19 @@ snippets for the major mode, prefix this command with =C-u=.
 The prompting methods used are again controlled by
 [[sym:yas-prompt-functions][=yas-prompt-functions=]].
 
+*** Inserting region or register contents into snippet
+
+It's often useful to inject already written text in the middle of a
+snippet.  The variable 
[[sym:yas-wrap-around-region][=yas-wrap-around-region=]] when to t substitute
+the region contents into the =$0= placeholder of a snippet expanded by
+[[#yas-insert-snippet][=yas-insert-snippet=]].  Setting it to a character 
value (e.g. =?0=)
+will insert the contents of corresponding register.
+
+Older (versions 0.9.1 and below) of Yasnippet, supported a setting of
+=cua= that is equivalent to =?0= but only worked with =cua-mode=
+turned on.  This setting is still supported for backwards
+compatibility, but is now entirely equivalent to =?0=.
+
 ** Snippet keybinding
 
 See the section of the =# binding:= directive in
diff --git a/packages/yasnippet/doc/snippet-organization.org 
b/packages/yasnippet/doc/snippet-organization.org
index 0f5de52..746cff0 100644
--- a/packages/yasnippet/doc/snippet-organization.org
+++ b/packages/yasnippet/doc/snippet-organization.org
@@ -108,9 +108,11 @@
    Yet another way to create a nice snippet menu is to write into
    =.yas-make-groups= a menu definition. TODO
 
-* TODO The =.yas-setup.el= file
+* The =.yas-setup.el= file
 
-** TODO
+  If there is file named =.yas-setup.el= in a mode's snippet
+  subdirectory, it is loaded along with the snippets.  Utility
+  functions used by the snippets can be put here.
 
 * The =.yas-compiled-snippet.el= file
 
@@ -127,5 +129,3 @@
 
   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/stylesheets/manual.css 
b/packages/yasnippet/doc/stylesheets/manual.css
index f2677c5..9580347 100644
--- a/packages/yasnippet/doc/stylesheets/manual.css
+++ b/packages/yasnippet/doc/stylesheets/manual.css
@@ -24,3 +24,36 @@ code {
     margin-left: 5%;
     margin-right: 10%;
 }
+
+/* Styles for htmlize.el fontification.  */
+
+.org-comment        { color: #005000; }    /* font-lock-comment-face */
+.org-keyword        { font-weight: bold; } /* font-lock-keyword-face */
+.org-string         { color: #8b0000; }    /* font-lock-string-face */
+.org-warning        { color: #ff8c00;
+                      font-weight: bold; } /* warning */
+.org-warning-1      { color: #ff0000;
+                      font-weight: bold; } /* font-lock-warning-face */
+.org-preprocessor   { color: #483d8b; }    /* font-lock-preprocessor-face */
+.org-constant       { color: #008b8b; }    /* font-lock-constant-face */
+.org-function-name  { color: #0000ff; }    /* font-lock-function-name-face */
+.org-type           { color: #228b22; }    /* font-lock-type-face */
+.org-variable-name  { color: #a0522d; }    /* font-lock-variable-name-face */
+
+.org-rst-adornment  { color: #a020f0; }            /* rst-adornment */
+.org-rst-block      { color: #a020f0; }            /* rst-block */
+.org-rst-comment    { color: #b22222; }            /* rst-comment */
+.org-rst-definition { color: #0000ff; }            /* rst-definition */
+.org-rst-directive  { color: #483d8b; }            /* rst-directive */
+.org-rst-emphasis1  { font-style: italic; }        /* rst-emphasis1 */
+.org-rst-emphasis2  { font-weight: bold; }         /* rst-emphasis2 */
+.org-rst-external   { color: #228b22; }            /* rst-external */
+.org-rst-level-1    { background-color: #d9d9d9; } /* rst-level-1 */
+.org-rst-level-2    { background-color: #c7c7c7; } /* rst-level-2 */
+.org-rst-level-3    { background-color: #b5b5b5; } /* rst-level-3 */
+.org-rst-level-4    { background-color: #a3a3a3; } /* rst-level-4 */
+.org-rst-level-5    { background-color: #919191; } /* rst-level-5 */
+.org-rst-level-6    { background-color: #7f7f7f; } /* rst-level-6 */
+.org-rst-literal    { color: #8b2252; }            /* rst-literal */
+.org-rst-reference  { color: #a0522d; }            /* rst-reference */
+.org-rst-transition { color: #a020f0; }            /* rst-transition */
diff --git a/packages/yasnippet/doc/yas-doc-helper.el 
b/packages/yasnippet/doc/yas-doc-helper.el
old mode 100755
new mode 100644
index f4cd49b..8459eb7
--- a/packages/yasnippet/doc/yas-doc-helper.el
+++ b/packages/yasnippet/doc/yas-doc-helper.el
@@ -155,7 +155,8 @@
   (let ((org-publish-use-timestamps-flag nil)
         (org-export-copy-to-kill-ring nil)
         (org-confirm-babel-evaluate nil)
-        (make-backup-files nil))
+        (make-backup-files nil)
+        (org-html-htmlize-output-type 'css))
     (org-publish "yasnippet" 'force)))
 
 
diff --git a/packages/yasnippet/yasnippet-tests.el 
b/packages/yasnippet/yasnippet-tests.el
index 648e4f3..47b6e1f 100644
--- a/packages/yasnippet/yasnippet-tests.el
+++ b/packages/yasnippet/yasnippet-tests.el
@@ -68,6 +68,26 @@
     (should (string= (yas--buffer-contents)
                      "bla from another BLA"))))
 
+(ert-deftest mirror-with-transformation-and-autofill ()
+  "Test interaction of autofill with mirror transforms"
+  (let ((words "one two three four five")
+        filled-words)
+    (with-temp-buffer
+      (c-mode)      ; In `c-mode' filling comments works by narrowing.
+      (yas-minor-mode +1)
+      (setq fill-column 10)
+      (auto-fill-mode +1)
+      (yas-expand-snippet "/* $0\n */")
+      (yas-mock-insert words)
+      (setq filled-words (delete-and-extract-region (point-min) (point-max)))
+      (yas-expand-snippet "/* $1\n */\n$2$2")
+      (should (string= (yas--buffer-contents)
+                       "/* \n */\n"))
+      (yas-mock-insert words)
+      (should (string= (yas--buffer-contents)
+                       (concat filled-words "\n"))))))
+
+
 (ert-deftest primary-field-transformation ()
   (with-temp-buffer
     (yas-minor-mode 1)
@@ -143,6 +163,98 @@
 ;;     (should (string= (yas--buffer-contents)
 ;;                      "brother from another mother!"))))
 
+(ert-deftest dont-clear-on-partial-deletion-issue-515 ()
+  "Ensure fields are not cleared when user doesn't really mean to."
+  (with-temp-buffer
+    (yas-minor-mode 1)
+    (yas-expand-snippet "my ${1:kid brother} from another ${2:mother}")
+
+    (ert-simulate-command '(kill-word 1))
+    (ert-simulate-command '(delete-char 1))
+
+    (should (string= (yas--buffer-contents)
+                     "my brother from another mother"))
+    (should (looking-at "brother"))
+
+    (ert-simulate-command '(yas-next-field))
+    (should (looking-at "mother"))
+    (ert-simulate-command '(yas-prev-field))
+    (should (looking-at "brother"))))
+
+(ert-deftest do-clear-on-yank-issue-515 ()
+  "A yank should clear an unmodified field."
+  (with-temp-buffer
+    (yas-minor-mode 1)
+    (yas-expand-snippet "my ${1:kid brother} from another ${2:mother}")
+    (yas-mock-yank "little sibling")
+    (should (string= (yas--buffer-contents)
+                     "my little sibling from another mother"))
+    (ert-simulate-command '(yas-next-field))
+    (ert-simulate-command '(yas-prev-field))
+    (should (looking-at "little sibling"))))
+
+(ert-deftest basic-indentation ()
+  (with-temp-buffer
+    (ruby-mode)
+    (yas-minor-mode 1)
+    (set (make-local-variable 'yas-indent-line) 'auto)
+    (set (make-local-variable 'yas-also-auto-indent-first-line) t)
+    (yas-expand-snippet "def ${1:method}${2:(${3:args})}\n$0\nend")
+    ;; Note that empty line is not indented.
+    (should (string= "def method(args)
+
+end" (buffer-string)))
+    (cl-loop repeat 3 do (ert-simulate-command '(yas-next-field)))
+    (yas-mock-insert (make-string (random 5) ?\ )) ; purposedly mess up 
indentation
+    (yas-expand-snippet "class << ${self}\n  $0\nend")
+    (ert-simulate-command '(yas-next-field))
+    (should (string= "def method(args)
+  class << self
+    
+  end
+end" (buffer-string)))
+    (should (= 4 (current-column)))))
+
+(ert-deftest indentation-markers ()
+  "Test a snippet with indentation markers (`$<')."
+  (with-temp-buffer
+    (ruby-mode)
+    (yas-minor-mode 1)
+    (set (make-local-variable 'yas-indent-line) nil)
+    (yas-expand-snippet "def ${1:method}${2:(${3:args})}\n$>Indent\nNo 
indent\\$>\nend")
+    (should (string= "def method(args)
+  Indent
+No indent$>
+end" (buffer-string)))))
+
+
+(ert-deftest navigate-a-snippet-with-multiline-mirrors-issue-665 ()
+  "In issue 665, a multi-line mirror is attempted.
+
+Indentation doesn't (yet) happen on these mirrors, but let this
+test guard against any misnavigations that might be introduced by
+an incorrect implementation of mirror auto-indentation"
+  (with-temp-buffer
+    (ruby-mode)
+    (yas-minor-mode 1)
+    (yas-expand-snippet "def initialize(${1:params})\n$2${1:$(
+mapconcat #'(lambda (arg)
+                 (format \"@%s = %s\" arg arg))
+             (split-string yas-text \", \")
+             \"\n\")}\nend")
+    (yas-mock-insert "bla, ble, bli")
+    (ert-simulate-command '(yas-next-field))
+    (let ((expected (mapconcat #'identity
+                               '("@bla = bla"
+                                 "[[:blank:address@hidden = ble"
+                                 "[[:blank:address@hidden = bli")
+                               "\n")))
+      (should (looking-at expected))
+      (yas-mock-insert "blo")
+      (ert-simulate-command '(yas-prev-field))
+      (ert-simulate-command '(yas-next-field))
+      (should (looking-at (concat "blo" expected))))))
+
 
 ;;; Snippet expansion and character escaping
 ;;; Thanks to @zw963 (Billy) for the testing
@@ -372,7 +484,7 @@ TODO: correct this bug!"
            (yas-should-expand '(("foo-barbaz" . "OKfoo-barbazOK"))))
          (let ((yas-key-syntaxes
                 (cons #'(lambda (_start-point)
-                          (unless (looking-back "-")
+                          (unless (eq ?- (char-before))
                             (backward-char)
                             'again))
                       yas-key-syntaxes))
@@ -801,7 +913,7 @@ add the snippets associated with the given mode."
 (defun yas-should-expand (keys-and-expansions)
   (dolist (key-and-expansion keys-and-expansions)
     (yas-exit-all-snippets)
-    (narrow-to-region (point) (point))
+    (erase-buffer)
     (insert (car key-and-expansion))
     (let ((yas-fallback-behavior nil))
       (ert-simulate-command '(yas-expand)))
@@ -815,7 +927,7 @@ add the snippets associated with the given mode."
 (defun yas-should-not-expand (keys)
   (dolist (key keys)
     (yas-exit-all-snippets)
-    (narrow-to-region (point) (point))
+    (erase-buffer)
     (insert key)
     (let ((yas-fallback-behavior nil))
       (ert-simulate-command '(yas-expand)))
@@ -829,6 +941,10 @@ add the snippets associated with the given mode."
     (let ((last-command-event (aref string i)))
       (ert-simulate-command '(self-insert-command 1)))))
 
+(defun yas-mock-yank (string)
+  (let ((interprogram-paste-function (lambda () string)))
+    (ert-simulate-command '(yank nil))))
+
 (defun yas-make-file-or-dirs (ass)
   (let ((file-or-dir-name (car ass))
         (content (cdr ass)))
diff --git a/packages/yasnippet/yasnippet.el b/packages/yasnippet/yasnippet.el
index dcec0e2..9c741a6 100644
--- a/packages/yasnippet/yasnippet.el
+++ b/packages/yasnippet/yasnippet.el
@@ -1,13 +1,15 @@
 ;;; 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>, Noam 
Postavsky <address@hidden>
+;; Copyright (C) 2008-2016 Free Software Foundation, Inc.
+;; 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
+;; Version: 0.10.0
 ;; X-URL: http://github.com/capitaomorte/yasnippet
 ;; Keywords: convenience, emulation
 ;; URL: http://github.com/capitaomorte/yasnippet
+;; Package-Requires: ((cl-lib "0.5"))
 ;; EmacsWiki: YaSnippetMode
 
 ;; This program is free software: you can redistribute it and/or modify
@@ -154,10 +156,10 @@
 (defvar yas-installed-snippets-dir nil)
 (setq yas-installed-snippets-dir
       (when load-file-name
-        (concat (file-name-directory load-file-name) "snippets")))
+        (expand-file-name "snippets" (file-name-directory load-file-name))))
 
 (defconst yas--default-user-snippets-dir
-  (concat user-emacs-directory "snippets"))
+  (expand-file-name "snippets" user-emacs-directory))
 
 (defcustom yas-snippet-dirs (remove nil
                                     (list yas--default-user-snippets-dir
@@ -173,8 +175,9 @@ snippets.
 
 The first directory is taken as the default for storing snippet's
 created with `yas-new-snippet'. "
-  :type '(choice (string :tag "Single directory (string)")
-                 (repeat :args (string) :tag "List of directories (strings)"))
+  :type '(choice (directory :tag "Single directory")
+                 (repeat :tag "List of directories"
+                         (choice (directory) (variable))))
   :group 'yasnippet
   :require 'yasnippet
   :set #'(lambda (symbol new)
@@ -199,13 +202,10 @@ created with `yas-new-snippet'. "
                  (t
                   (error "[yas] invalid element %s in `yas-snippet-dirs'" 
e)))))
 
-(defvaralias 'yas/root-directory 'yas-snippet-dirs)
-
 (defcustom yas-new-snippet-default "\
-# -*- mode: snippet; require-final-newline: nil -*-
+# -*- mode: snippet -*-
 # name: $1
-# key: ${2:${1:$(yas--key-from-desc yas-text)}}${3:
-# binding: ${4:direct-keybinding}}
+# key: ${2:${1:$(yas--key-from-desc yas-text)}}
 # --
 $0"
   "Default snippet to use when creating a new snippet.
@@ -213,8 +213,7 @@ If nil, don't use any snippet."
   :type 'string
   :group 'yasnippet)
 
-(defcustom yas-prompt-functions '(yas-x-prompt
-                                  yas-dropdown-prompt
+(defcustom yas-prompt-functions '(yas-dropdown-prompt
                                   yas-completing-prompt
                                   yas-maybe-ido-prompt
                                   yas-no-prompt)
@@ -240,7 +239,7 @@ nil.
 - To signal that the user quit the prompting process, you can
 signal `quit' with
 
-  (signal 'quit \"user quit!\")."
+  (signal \\='quit \"user quit!\")."
   :type '(repeat function)
   :group 'yasnippet)
 
@@ -328,7 +327,7 @@ menu and the modes set in `yas--extra-modes' are listed.
 
 - If set to `full', every submenu is listed
 
-- If set to `nil', hide the menu.
+- If set to nil, hide the menu.
 
 Any other non-nil value, every submenu is listed."
   :type '(choice (const :tag "Full"  full)
@@ -345,11 +344,16 @@ Any other non-nil value, every submenu is listed."
   :group 'yasnippet)
 
 (defcustom yas-wrap-around-region nil
-  "If non-nil, snippet expansion wraps around selected region.
-
-The wrapping occurs just before the snippet's exit marker.  This
-can be overridden on a per-snippet basis."
-  :type 'boolean
+  "What to insert for snippet's $0 field.
+
+If set to a character, insert contents of corresponding register.
+If non-nil insert region contents.  This can be overridden on a
+per-snippet basis.  A value of `cua' is considered equivalent to
+`?0' for backwards compatibility."
+  :type '(choice (character :tag "Insert from register")
+                 (const t :tag "Insert region contents")
+                 (const nil :tag "Don't insert anything")
+                 (const cua)) ; backwards compat
   :group 'yasnippet)
 
 (defcustom yas-good-grace t
@@ -373,13 +377,19 @@ Leave this set at nil (the default) to be able to trigger 
an
 expansion simply by placing the cursor after a valid tab trigger,
 using whichever commands.
 
-Optionally, set this to something like '(self-insert-command) if
+Optionally, set this to something like (self-insert-command) if
 you to wish restrict expansion to only happen when the last
 letter of the snippet tab trigger was typed immediately before
 the trigger key itself."
   :type '(repeat function)
   :group 'yasnippet)
 
+(defcustom yas-alias-to-yas/prefix-p t
+  "If non-nil make aliases for the old style yas/ prefixed symbols.
+It must be set to nil before loading yasnippet to take effect."
+  :type 'boolean
+  :group 'yasnippet)
+
 ;; Only two faces, and one of them shouldn't even be used...
 ;;
 (defface yas-field-highlight-face
@@ -427,7 +437,7 @@ is tried, unless a function element returned the symbol 
`again',
 in which case it is called again from the previous position and
 may once more reposition point.
 
-For example, if `yas-key-syntaxes'' value is '(\"w\" \"w_\"),
+For example, if `yas-key-syntaxes' has the value (\"w\" \"w_\"),
 trigger keys composed exclusively of \"word\"-syntax characters
 are looked for first. Failing that, longer keys composed of
 \"word\" or \"symbol\" syntax are looked for. Therefore,
@@ -494,7 +504,7 @@ snippet expansion is attempted:
 
           * Otherwise, the snippet is not considered.
 
-    * If it evaluates to the symbol 'always, all snippets are
+    * If it evaluates to the symbol `always', all snippets are
       considered for expansion, regardless of any conditions.
 
     * If it evaluates to t or some other non-nil value
@@ -506,14 +516,14 @@ snippet expansion is attempted:
 
 Here's an example preventing snippets from being expanded from
 inside comments, in `python-mode' only, with the exception of
-snippets returning the symbol 'force-in-comment in their
+snippets returning the symbol `force-in-comment' in their
 conditions.
 
- (add-hook 'python-mode-hook
-           '(lambda ()
+ (add-hook \\='python-mode-hook
+           (lambda ()
               (setq yas-buffer-local-condition
-                    '(if (python-in-string/comment)
-                         '(require-snippet-condition . force-in-comment)
+                    \\='(if (python-in-string/comment)
+                         \\='(require-snippet-condition . force-in-comment)
                        t))))
 
 The default value is similar, it filters out potential snippet
@@ -524,7 +534,7 @@ snippet itself contains a condition that returns the symbol
 
 ;;; Internal variables
 
-(defvar yas--version "0.8.0beta")
+(defconst yas--version "0.10.0")
 
 (defvar yas--menu-table (make-hash-table)
   "A hash table of MAJOR-MODE symbols to menu keymaps.")
@@ -543,7 +553,7 @@ snippet itself contains a condition that returns the symbol
 
 (defconst yas--backquote-lisp-expression-regexp
   "`\\([^`]*\\)`"
-  "A regexp to recognize a \"`lisp-expression`\" expression." )
+  "A regexp to recognize a \"\\=`lisp-expression\\=`\" expression." )
 
 (defconst yas--transform-mirror-regexp
   "${\\(?:\\([0-9]+\\):\\)?$\\([ \t\n]*([^}]*\\)"
@@ -690,7 +700,7 @@ snippet itself contains a condition that returns the symbol
 
 This variable probably makes more sense as buffer-local, so
 ensure your use `make-local-variable' when you set it.")
-(define-obsolete-variable-alias 'yas-extra-modes 'yas--extra-modes "0.8.1")
+(define-obsolete-variable-alias 'yas-extra-modes 'yas--extra-modes "0.9.1")
 
 (defvar yas--tables (make-hash-table)
   "A hash table of mode symbols to `yas--table' objects.")
@@ -729,22 +739,24 @@ defined direct keybindings to the command
            yas--tables))
 
 (defun yas--modes-to-activate (&optional mode)
-  "Compute list of mode symbols that are active for `yas-expand'
-and friends."
+  "Compute list of mode symbols that are active for `yas-expand' and friends."
+  (defvar yas--dfs)        ;We rely on dynbind.  We could use `letrec' instead!
   (let* ((explored (if mode (list mode) ; Building up list in reverse.
                      (cons major-mode (reverse yas--extra-modes))))
-         (dfs
+         (yas--dfs
           (lambda (mode)
             (cl-loop for neighbour
                      in (cl-list* (get mode 'derived-mode-parent)
-                                  (ignore-errors (symbol-function mode))
+                                  ;; NOTE: `fboundp' check is redundant
+                                  ;; since Emacs 24.4.
+                                  (and (fboundp mode) (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)
+                     (funcall yas--dfs neighbour)))))
+    (mapc yas--dfs explored)
     (nreverse explored)))
 
 (defvar yas-minor-mode-hook nil
@@ -768,7 +780,7 @@ Key bindings:
   ;; The indicator for the mode line.
   " yas"
   :group 'yasnippet
-  (cond (yas-minor-mode
+  (cond ((and yas-minor-mode (featurep 'yasnippet))
          ;; Install the direct keymaps in `emulation-mode-map-alists'
          ;; (we use `add-hook' even though it's not technically a hook,
          ;; but it works). Then define variables named after modes to
@@ -776,8 +788,8 @@ Key bindings:
          ;;
          ;; Also install the post-command-hook.
          ;;
-         (add-hook 'emulation-mode-map-alists 'yas--direct-keymaps)
-         (add-hook 'post-command-hook 'yas--post-command-handler nil t)
+         (cl-pushnew 'yas--direct-keymaps emulation-mode-map-alists)
+         (add-hook 'post-command-hook #'yas--post-command-handler nil t)
          ;; Set the `yas--direct-%s' vars for direct keymap expansion
          ;;
          (dolist (mode (yas--modes-to-activate))
@@ -790,8 +802,9 @@ Key bindings:
         (t
          ;; Uninstall the direct keymaps and the post-command hook
          ;;
-         (remove-hook 'post-command-hook 'yas--post-command-handler t)
-         (remove-hook 'emulation-mode-map-alists 'yas--direct-keymaps))))
+         (remove-hook 'post-command-hook #'yas--post-command-handler t)
+         (setq emulation-mode-map-alists
+               (remove 'yas--direct-keymaps emulation-mode-map-alists)))))
 
 (defun yas-activate-extra-mode (mode)
   "Activates the snippets for the given `mode' in the buffer.
@@ -823,21 +836,20 @@ activate snippets associated with that mode."
        (remove mode
                yas--extra-modes)))
 
-(defvar yas-dont-activate '(minibufferp)
-  "If non-nil don't let `yas-global-mode' affect some buffers.
-
-If a function of zero arguments, then its result is used.
+(define-obsolete-variable-alias 'yas-dont-activate
+  'yas-dont-activate-functions "0.9.2")
+(defvar yas-dont-activate-functions (list #'minibufferp)
+  "Special hook to control which buffers `yas-global-mode' affects.
+Functions are called with no argument, and should return non-nil to prevent
+`yas-global-mode' from enabling yasnippet in this buffer.
 
-If a list of functions, then all functions must return nil to
-activate yas for this buffer.
-
-In Emacsen <= 23, this variable is buffer-local.  Because
+In Emacsen < 24, this variable is buffer-local.  Because
 `yas-minor-mode-on' is called by `yas-global-mode' after
 executing the buffer's major mode hook, setting this variable
 there is an effective way to define exceptions to the \"global\"
 activation behaviour.
 
-In Emacsen > 23, only the global value is used.  To define
+In Emacsen >= 24, only the global value is used.  To define
 per-mode exceptions to the \"global\" activation behaviour, call
 `yas-minor-mode' with a negative argument directily in the major
 mode's hook.")
@@ -849,14 +861,14 @@ mode's hook.")
 (defun yas-minor-mode-on ()
   "Turn on YASnippet minor mode.
 
-Honour `yas-dont-activate', which see."
+Honour `yas-dont-activate-functions', which see."
   (interactive)
-  ;; Check `yas-dont-activate'
-  (unless (cond ((functionp yas-dont-activate)
-                 (funcall yas-dont-activate))
-                ((consp yas-dont-activate)
-                 (some #'funcall yas-dont-activate))
-                (yas-dont-activate))
+  (unless (or
+           ;; The old behavior used for Emacs<24 was to set
+           ;; `yas-dont-activate-functions' to t buffer-locally.
+           (not (or (listp yas-dont-activate-functions)
+                    (functionp yas-dont-activate-functions)))
+           (run-hook-with-args-until-success 'yas-dont-activate-functions))
     (yas-minor-mode 1)))
 
 ;;;###autoload
@@ -868,22 +880,28 @@ Honour `yas-dont-activate', which see."
   "Run `yas-reload-all' when `yas-global-mode' is on."
   (when yas-global-mode (yas-reload-all)))
 
-(add-hook 'yas-global-mode-hook 'yas--global-mode-reload-with-jit-maybe)
+(add-hook 'yas-global-mode-hook #'yas--global-mode-reload-with-jit-maybe)
 
 
 ;;; Major mode stuff
 
 (defvar yas--font-lock-keywords
   (append '(("^#.*$" . font-lock-comment-face))
-          lisp-font-lock-keywords-2
-          '(("$\\([0-9]+\\)"
+          (with-temp-buffer
+            (let ((prog-mode-hook nil)
+                  (emacs-lisp-mode-hook nil))
+              (ignore-errors (emacs-lisp-mode)))
+            (font-lock-set-defaults)
+            (if (eq t (car-safe font-lock-keywords))
+                ;; They're "compiled", so extract the source.
+                (cadr font-lock-keywords)
+              font-lock-keywords))
+          '(("\\$\\([0-9]+\\)"
              (0 font-lock-keyword-face)
              (1 font-lock-string-face t))
-            ("${\\([0-9]+\\):?"
+            ("\\${\\([0-9]+\\):?"
              (0 font-lock-keyword-face)
              (1 font-lock-warning-face t))
-            ("${" . font-lock-keyword-face)
-            ("$[0-9]+?" . font-lock-preprocessor-face)
             ("\\(\\$(\\)" 1 font-lock-preprocessor-face)
             ("}"
              (0 font-lock-keyword-face)))))
@@ -905,6 +923,7 @@ Honour `yas-dont-activate', which see."
   "The keymap used when `snippet-mode' is active.")
 
 
+;;;###autoload
 (define-derived-mode snippet-mode text-mode "Snippet"
   "A mode for editing yasnippets"
   (setq font-lock-defaults '(yas--font-lock-keywords))
@@ -1349,7 +1368,7 @@ return an expression that when evaluated will issue an 
error."
                        (read-kbd-macro keybinding 'need-vector))))
           res)
       (error
-       (yas--message 3 "warning: keybinding \"%s\" invalid since %s."
+       (yas--message 2 "warning: keybinding \"%s\" invalid since %s."
                 keybinding (error-message-string err))
        nil))))
 
@@ -1476,10 +1495,7 @@ Here's a list of currently recognized directives:
   (let* ((dominating-dir (locate-dominating-file file
                                                  ".yas-make-groups"))
          (extra-path (and dominating-dir
-                          (replace-regexp-in-string (concat "^"
-                                                            (expand-file-name 
dominating-dir))
-                                                    ""
-                                                    (expand-file-name file))))
+                          (file-relative-name file dominating-dir)))
          (extra-dir (and extra-path
                          (file-name-directory extra-path)))
          (group (and extra-dir
@@ -1490,17 +1506,17 @@ Here's a list of currently recognized directives:
 
 (defun yas--subdirs (directory &optional filep)
   "Return subdirs or files of DIRECTORY according to FILEP."
-  (remove-if (lambda (file)
-               (or (string-match "^\\."
-                                 (file-name-nondirectory file))
-                   (string-match "^#.*#$"
-                                 (file-name-nondirectory file))
-                   (string-match "~$"
-                                 (file-name-nondirectory file))
-                   (if filep
-                       (file-directory-p file)
-                     (not (file-directory-p file)))))
-             (directory-files directory t)))
+  (cl-remove-if (lambda (file)
+                  (or (string-match "\\`\\."
+                                    (file-name-nondirectory file))
+                      (string-match "\\`#.*#\\'"
+                                    (file-name-nondirectory file))
+                      (string-match "~\\'"
+                                    (file-name-nondirectory file))
+                      (if filep
+                          (file-directory-p file)
+                        (not (file-directory-p file)))))
+                (directory-files directory t)))
 
 (defun yas--make-menu-binding (template)
   (let ((mode (yas--table-mode (yas--template-table template))))
@@ -1687,14 +1703,14 @@ the current buffers contents."
   (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--message 3 "%s has no load file, using 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 (<= yas-verbosity 2))
+      (load file 'noerror (<= yas-verbosity 4))
     (let ((elfile (concat file ".el")))
       (when (file-exists-p elfile)
         (insert ";;; contents of the .yas-setup.el support file:\n;;;\n")
@@ -1750,7 +1766,7 @@ With prefix argument USE-JIT do jit-loading of snippets."
           (cl-loop for buffer in (buffer-list)
                    do (with-current-buffer buffer
                         (when (eq major-mode mode-sym)
-                          (yas--message 3 "Discovered there was already %s in 
%s" buffer mode-sym)
+                          (yas--message 4 "Discovered there was already %s in 
%s" buffer mode-sym)
                           (push buffer impatient-buffers)))))))
     ;; ...after TOP-LEVEL-DIR has been completely loaded, call
     ;; `yas--load-pending-jits' in these impatient buffers.
@@ -1772,10 +1788,10 @@ With prefix argument USE-JIT do jit-loading of 
snippets."
           (insert (format ";;; Do not edit! File generated at %s\n"
                           (current-time-string)))))
     ;; Normal case.
-    (unless (file-exists-p (concat directory "/" ".yas-skip"))
+    (unless (file-exists-p (expand-file-name ".yas-skip" 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)
+                   (progn (yas--message 4 "Loaded compiled snippets from %s" 
directory) t))
+        (yas--message 4 "Loading snippet files from %s" directory)
         (yas--load-directory-2 directory mode-sym)))))
 
 (defun yas--load-directory-2 (directory mode-sym)
@@ -1789,7 +1805,10 @@ With prefix argument USE-JIT do jit-loading of snippets."
     (with-temp-buffer
       (dolist (file (yas--subdirs directory 'no-subdirs-just-files))
         (when (file-readable-p file)
-          (insert-file-contents file nil nil nil t)
+          ;; Erase the buffer instead of passing non-nil REPLACE to
+          ;; `insert-file-contents' (avoids Emacs bug #23659).
+          (erase-buffer)
+          (insert-file-contents file)
           (push (yas--parse-template file)
                 snippet-defs))))
     (when snippet-defs
@@ -1813,8 +1832,8 @@ prompt the user to select one."
         (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)))
+                   (yas--message 4 "Loaded %s" directory)
+                 (yas--message 4 "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))
@@ -1879,9 +1898,9 @@ prefix argument."
       (yas-direct-keymaps-reload)
 
       (run-hooks 'yas-after-reload-hook)
-      (yas--message 3 "Reloaded everything%s...%s."
-                   (if no-jit "" " (snippets will load just-in-time)")
-                   (if errors " (some errors, check *Messages*)" "")))))
+      (yas--message (if errors 2 3) "Reloaded everything%s...%s."
+                    (if no-jit "" " (snippets will load just-in-time)")
+                    (if errors " (some errors, check *Messages*)" "")))))
 
 (defvar yas-after-reload-hook nil
   "Hooks run after `yas-reload-all'.")
@@ -1891,7 +1910,7 @@ prefix argument."
     (let ((funs (reverse (gethash mode yas--scheduled-jit-loads))))
       ;; must reverse to maintain coherence with `yas-snippet-dirs'
       (dolist (fun funs)
-        (yas--message  3 "Loading for `%s', just-in-time: %s!" mode fun)
+        (yas--message 4 "Loading for `%s', just-in-time: %s!" mode fun)
         (funcall fun))
       (remhash mode yas--scheduled-jit-loads))))
 
@@ -1947,7 +1966,7 @@ This works by stubbing a few functions, then calling
 
 ;;; Apropos snippet menu:
 ;;
-;; The snippet menu keymaps are store by mode in hash table called
+;; The snippet menu keymaps are stored by mode in hash table called
 ;; `yas--menu-table'. They are linked to the main menu in
 ;; `yas--menu-keymap-get-create' and are initially created empty,
 ;; reflecting the table hierarchy.
@@ -1969,9 +1988,9 @@ This works by stubbing a few functions, then calling
 ;;   duplicate entries. The `yas--template' objects are created in
 ;;   `yas-define-menu', holding nothing but the menu entry,
 ;;   represented by a pair of ((menu-item NAME :keys KEYS) TYPE) and
-;;   stored in `yas--template-menu-binding-pair'. The (menu-item ...)
+;;   stored in `yas--template-menu-binding-pair'.  The (menu-item ...)
 ;;   part is then stored in the menu keymap itself which make the item
-;;   appear to the user. These limitations could probably be revised.
+;;   appear to the user.  These limitations could probably be revised.
 ;;
 ;; * The `yas--template-perm-group' slot is only used in
 ;;   `yas-describe-tables'.
@@ -2044,7 +2063,7 @@ MENU is a list, its elements can be:
   SUBMENU has the same form as MENU.  NAME is also added to the
   list of groups of the snippets defined thereafter.
 
-OMIT-ITEMS is a list of snippet uuid's that will always be
+OMIT-ITEMS is a list of snippet uuids that will always be
 omitted from MODE's menu, even if they're manually loaded."
   (let* ((table (yas--table-get-create mode))
          (hash (yas--table-uuidhash table)))
@@ -2086,7 +2105,7 @@ omitted from MODE's menu, even if they're manually 
loaded."
            (define-key menu-keymap (vector (gensym))
              '(menu-item "----")))
           (t
-           (yas--message 3 "Don't know anything about menu entry %s" (first 
e))))))
+           (yas--message 1 "Don't know anything about menu entry %s" (first 
e))))))
 
 (defun yas--define (mode key template &optional name condition group)
   "Define a snippet.  Expanding KEY into TEMPLATE.
@@ -2160,9 +2179,13 @@ object satisfying `yas--field-p' to restrict the 
expansion to."
                                     (yas--templates-for-key-at-point))
                                 (yas--templates-for-key-at-point))))
     (if templates-and-pos
-        (yas--expand-or-prompt-for-template (first templates-and-pos)
-                                            (second templates-and-pos)
-                                            (third templates-and-pos))
+        (yas--expand-or-prompt-for-template
+         (nth 0 templates-and-pos)
+         ;; Delete snippet key and active region when expanding.
+         (min (if (use-region-p) (region-beginning) most-positive-fixnum)
+              (nth 1 templates-and-pos))
+         (max (if (use-region-p) (region-end) most-negative-fixnum)
+              (nth 2 templates-and-pos)))
       (yas--fallback))))
 
 (defun yas-expand-from-keymap ()
@@ -2345,7 +2368,7 @@ by condition."
                             (car where)
                             (cdr where)
                             (yas--template-expand-env yas--current-template))
-      (yas--message 3 "No snippets can be inserted here!"))))
+      (yas--message 1 "No snippets can be inserted here!"))))
 
 (defun yas-visit-snippet-file ()
   "Choose a snippet to edit, selection like `yas-insert-snippet'.
@@ -2409,13 +2432,11 @@ tables (or optional TABLE).
 Returns a list of elements (TABLE . DIRS) where TABLE is a
 `yas--table' object and DIRS is a list of all possible directories
 where snippets of table might exist."
-  (let ((main-dir (replace-regexp-in-string
-                   "/+$" ""
-                   (or (first (or (yas-snippet-dirs)
-                                  (setq yas-snippet-dirs (list 
yas--default-user-snippets-dir)))))))
-        (tables (or (and table
-                         (list table))
-                    (yas--get-snippet-tables))))
+  (let ((main-dir (car (or (yas-snippet-dirs)
+                           (setq yas-snippet-dirs
+                                 (list yas--default-user-snippets-dir)))))
+        (tables (if table (list table)
+                  (yas--get-snippet-tables))))
     ;; HACK! the snippet table created here is actually registered!
     ;;
     (unless (or table (gethash major-mode yas--tables))
@@ -2425,7 +2446,7 @@ where snippets of table might exist."
     (mapcar #'(lambda (table)
                 (cons table
                       (mapcar #'(lambda (subdir)
-                                  (concat main-dir "/" subdir))
+                                  (expand-file-name subdir main-dir))
                               (yas--guess-snippet-directories-1 table))))
             tables)))
 
@@ -2530,10 +2551,8 @@ neither do the elements of PARENTS."
 
 (defun yas-load-snippet-buffer (table &optional interactive)
   "Parse and load current buffer's snippet definition into TABLE.
-
-TABLE is a symbol naming a passed to `yas--table-get-create'.
-
-When called interactively, prompt for the table name."
+TABLE is a symbol name passed to `yas--table-get-create'.  When
+called interactively, prompt for the table name."
   (interactive (list (yas--read-table) t))
   (cond
    ;;  We have `yas--editing-template', this buffer's content comes from a
@@ -2558,11 +2577,10 @@ When called interactively, prompt for the table name."
                   (yas--table-name (yas--template-table 
yas--editing-template)))))
 
 (defun yas-load-snippet-buffer-and-close (table &optional kill)
-  "Load the snippet with `yas-load-snippet-buffer', possibly
-  save, then `quit-window' if saved.
-
-If the snippet is new, ask the user whether (and where) to save
-it. If the snippet already has a file, just save it.
+  "Load and save the snippet, then `quit-window' if saved.
+Loading is performed by `yas-load-snippet-buffer'.  If the
+snippet is new, ask the user whether (and where) to save it.  If
+the snippet already has a file, just save it.
 
 The prefix argument KILL is passed to `quit-window'.
 
@@ -2587,9 +2605,10 @@ and `kill-buffer' instead."
         (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)))
+            (write-file (expand-file-name
+                         (read-file-name (format "File name to create in %s? " 
chosen)
+                                         chosen default-file-name)
+                         chosen))
             (setf (yas--template-load-file yas--editing-template) 
buffer-file-name))))))
   (when buffer-file-name
     (save-buffer)
@@ -2609,10 +2628,10 @@ and `kill-buffer' instead."
           (and parsed
                (fboundp test-mode)
                (yas--make-template :table       nil ;; no tables for ephemeral 
snippets
-                                   :key         (first parsed)
-                                   :content     (second parsed)
-                                   :name        (third parsed)
-                                   :expand-env  (sixth parsed)))))
+                                   :key         (nth 0 parsed)
+                                   :content     (nth 1 parsed)
+                                   :name        (nth 2 parsed)
+                                   :expand-env  (nth 5 parsed)))))
     (cond (yas--current-template
            (let ((buffer-name (format "*testing snippet: %s*" 
(yas--template-name yas--current-template))))
              (kill-buffer (get-buffer-create buffer-name))
@@ -2629,7 +2648,7 @@ and `kill-buffer' instead."
                         (require 'yasnippet-debug nil t))
                (add-hook 'post-command-hook 'yas-debug-snippet-vars nil t))))
           (t
-           (yas--message 3 "Cannot test snippet for unknown major mode")))))
+           (yas--message 1 "Cannot test snippet for unknown major mode")))))
 
 (defun yas-active-keys ()
   "Return all active trigger keys for current buffer and point."
@@ -2662,7 +2681,7 @@ and `kill-buffer' instead."
       (setq buffer-read-only nil)
       (erase-buffer)
       (cond ((not by-name-hash)
-             (insert "YASnippet tables: \n")
+             (insert "YASnippet tables:\n")
              (while (and table-lists
                          continue)
                (dolist (table (car table-lists))
@@ -2718,31 +2737,32 @@ and `kill-buffer' instead."
          (setq group (truncate-string-to-width group 25 0 ?  "..."))
          (insert (make-string 100 ?-) "\n")
          (dolist (p templates)
-           (let ((name (truncate-string-to-width (propertize (format 
"\\\\snippet `%s'" (yas--template-name p))
-                                                             'yasnippet p)
-                                                 50 0 ? "..."))
-                 (group (prog1 group
-                          (setq group (make-string (length group) ? ))))
-                 (condition-string (let ((condition (yas--template-condition 
p)))
-                                     (if (and condition
-                                              original-buffer)
-                                         (with-current-buffer original-buffer
-                                           (if (yas--eval-condition condition)
-                                               "(y)"
-                                             "(s)"))
-                                       "(a)"))))
-             (insert group " ")
-             (insert condition-string " ")
-             (insert name
-                     (if (string-match "\\.\\.\\.$" name)
-                         "'"
-                       " ")
-                     " ")
-             (insert (truncate-string-to-width (or (yas--template-key p) "")
-                                               15 0 ?  "...") " ")
-             (insert (truncate-string-to-width (key-description 
(yas--template-keybinding p))
-                                               15 0 ?  "...") " ")
-             (insert "\n"))))
+           (let* ((name (truncate-string-to-width (propertize (format 
"\\\\snippet `%s'" (yas--template-name p))
+                                                              'yasnippet p)
+                                                  50 0 ? "..."))
+                  (group (prog1 group
+                           (setq group (make-string (length group) ? ))))
+                  (condition-string (let ((condition (yas--template-condition 
p)))
+                                      (if (and condition
+                                               original-buffer)
+                                          (with-current-buffer original-buffer
+                                            (if (yas--eval-condition condition)
+                                                "(y)"
+                                              "(s)"))
+                                        "(a)")))
+                  (key-description-string (key-description 
(yas--template-keybinding p)))
+                  (template-key-padding (if (string= key-description-string 
"") nil ? )))
+             (insert group " "
+                     condition-string " "
+                     name (if (string-match "\\.\\.\\.$" name)
+                              "'" " ")
+                     " "
+                     (truncate-string-to-width (or (yas--template-key p) "")
+                                               15 0 template-key-padding "...")
+                     (or template-key-padding "")
+                     (truncate-string-to-width key-description-string
+                                               15 0 nil "...")
+                     "\n"))))
      groups-hash)))
 
 
@@ -2955,7 +2975,6 @@ If there is a transform but it returns nil, return the 
empty
 string iff EMPTY-ON-NIL-P is true."
   (let* ((yas-text (yas--field-text-for-display field))
          (yas-modified-p (yas--field-modified-p field))
-         (yas-moving-away-p nil)
          (transform (if (yas--mirror-p field-or-mirror)
                         (yas--mirror-transform field-or-mirror)
                       (yas--field-transform field-or-mirror)))
@@ -3058,38 +3077,41 @@ Otherwise delegate to `yas-next-field'."
             (yas-next-field))))
     (yas-next-field)))
 
+(defun yas-next-field-will-exit-p (&optional arg)
+  "Return non-nil if (yas-next-field ARG) would exit the current snippet."
+  (let ((snippet (car (yas--snippets-at-point)))
+        (active (overlay-get yas--active-field-overlay 'yas--field)))
+    (when snippet
+      (not (yas--find-next-field arg snippet active)))))
+
+(defun yas--find-next-field (n snippet active)
+  "Return the Nth field after the ACTIVE one in SNIPPET."
+  (let ((live-fields (cl-remove-if
+                      (lambda (field)
+                        (and (not (eq field active))
+                             (yas--field-probably-deleted-p snippet field)))
+                      (yas--snippet-fields snippet))))
+    (if (>= n 0) (nth n (memq active live-fields))
+      (car (last (memq active (reverse live-fields)) (- n))))))
+
 (defun yas-next-field (&optional arg)
   "Navigate to the ARGth next field.
 
 If there's none, exit the snippet."
   (interactive)
-  (let* ((arg (or arg
-                  1))
-         (snippet (first (yas--snippets-at-point)))
+  (unless arg (setq arg 1))
+  (let* ((snippet (car (yas--snippets-at-point)))
          (active-field (overlay-get yas--active-field-overlay 'yas--field))
-         (live-fields (remove-if #'(lambda (field)
-                                     (and (not (eq field active-field))
-                                          (yas--field-probably-deleted-p 
snippet field)))
-                                 (yas--snippet-fields snippet)))
-         (active-field-pos (position active-field live-fields))
-         (target-pos (and active-field-pos (+ arg active-field-pos)))
-         (target-field (and target-pos (nth target-pos live-fields))))
-    ;; First check if we're moving out of a field with a transform
-    ;;
-    (when (and active-field
-               (yas--field-transform active-field))
-      (let* ((yas-moving-away-p t)
-             (yas-text (yas--field-text-for-display active-field))
-             (yas-modified-p (yas--field-modified-p active-field)))
-        ;; primary field transform: exit call to field-transform
-        (yas--eval-lisp (yas--field-transform active-field))))
+         (target-field (yas--find-next-field arg snippet active-field)))
+    ;; Apply transform to active field.
+    (when active-field
+      (let ((yas-moving-away-p t))
+        (when (yas--field-update-display active-field)
+          (yas--update-mirrors snippet))))
     ;; Now actually move...
-    (cond ((and target-pos (>= target-pos (length live-fields)))
-           (yas-exit-snippet snippet))
-          (target-field
-           (yas--move-to-field snippet target-field))
-          (t
-           nil))))
+    (if target-field
+        (yas--move-to-field snippet target-field)
+      (yas-exit-snippet snippet))))
 
 (defun yas--place-overlays (snippet field)
   "Correctly place overlays for SNIPPET's FIELD."
@@ -3206,7 +3228,7 @@ This renders the snippet as ordinary text."
   (condition-case error
       (run-hooks hook-var)
     (error
-     (yas--message 3 "%s error: %s" hook-var (error-message-string error)))))
+     (yas--message 2 "%s error: %s" hook-var (error-message-string error)))))
 
 
 (defun yas--check-commit-snippet ()
@@ -3343,15 +3365,17 @@ Otherwise deletes a character normally by calling 
`delete-char'."
           (t
            (call-interactively 'delete-char)))))
 
-(defun yas--skip-and-clear (field)
-  "Deletes the region of FIELD and sets it's modified state to t."
+(defun yas--skip-and-clear (field &optional from)
+  "Deletes the region of FIELD and sets it's modified state to t.
+If given, FROM indicates position to start at instead of FIELD's beginning."
   ;; Just before skipping-and-clearing the field, mark its children
   ;; fields as modified, too. If the children have mirrors-in-fields
   ;; this prevents them from updating erroneously (we're skipping and
   ;; deleting!).
   ;;
   (yas--mark-this-and-children-modified field)
-  (delete-region (yas--field-start field) (yas--field-end field)))
+  (unless (= (yas--field-start field) (yas--field-end field))
+    (delete-region (or from (yas--field-start field)) (yas--field-end field))))
 
 (defun yas--mark-this-and-children-modified (field)
   (setf (yas--field-modified-p field) t)
@@ -3385,27 +3409,33 @@ Move the overlay, or create it if it does not exit."
     (overlay-put yas--active-field-overlay 'insert-behind-hooks
                  '(yas--on-field-overlay-modification))))
 
-(defun yas--on-field-overlay-modification (overlay after? _beg _end &optional 
_length)
+(defun yas--skip-and-clear-field-p (field beg _end length)
+  "Tell if newly modified FIELD should be cleared and skipped.
+BEG, END and LENGTH like overlay modification hooks."
+  (and (= length 0) ; A 0 pre-change length indicates insertion.
+       (= beg (yas--field-start field)) ; Insertion at field start?
+       (not (yas--field-modified-p field))))
+
+(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 point is at
 field start.  This hook does nothing if an undo is in progress."
-  (unless (or yas--inhibit-overlay-hooks
+  (unless (or (not after?)
+              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))
+    (let* ((inhibit-modification-hooks t)
+           (field (overlay-get overlay 'yas--field))
            (snippet (overlay-get yas--active-field-overlay 'yas--snippet)))
-      (cond (after?
-             (yas--advance-end-maybe field (overlay-end overlay))
-             (save-excursion
-               (yas--field-update-display field))
-             (yas--update-mirrors snippet))
-            (field
-             (when (and (eq this-command 'self-insert-command)
-                        (not (yas--field-modified-p field))
-                        (= (point) (yas--field-start field)))
-               (yas--skip-and-clear field))
-             (setf (yas--field-modified-p field) t))))))
+      (when (yas--skip-and-clear-field-p field beg end length)
+        ;; We delete text starting from the END of insertion.
+        (yas--skip-and-clear field end))
+      (setf (yas--field-modified-p field) t)
+      (yas--advance-end-maybe field (overlay-end overlay))
+      (save-excursion
+        (yas--field-update-display field))
+      (yas--update-mirrors snippet))))
 
 ;;; Apropos protection overlays:
 ;;
@@ -3449,15 +3479,14 @@ Move the overlays, or create them if they do not exit."
              ;; (overlay-put ov 'evaporate t)
              (overlay-put ov 'modification-hooks 
'(yas--on-protection-overlay-modification)))))))
 
-(defun yas--on-protection-overlay-modification (_overlay after? _beg _end 
&optional _length)
-  "Signals a snippet violation, then issues error.
-
-The error should be ignored in `debug-ignored-errors'"
+(defun yas--on-protection-overlay-modification (_overlay after? beg end 
&optional length)
+  "Commit the snippet if the protection overlay is being killed."
   (unless (or yas--inhibit-overlay-hooks
-              after?
+              (not after?)
+              (= length (- end beg)) ; deletion or insertion
               (yas--undo-in-progress))
     (let ((snippets (yas--snippets-at-point)))
-      (yas--message 3 "Comitting snippets. Action would destroy a protection 
overlay.")
+      (yas--message 2 "Committing snippets. Action would destroy a protection 
overlay.")
       (cl-loop for snippet in snippets
                do (yas--commit-snippet snippet)))))
 
@@ -3546,14 +3575,21 @@ considered when expanding the snippet."
              ;; them mostly to make the undo information
              ;;
              (setq yas--start-column (current-column))
-             (let ((yas--inhibit-overlay-hooks t))
+             (let ((yas--inhibit-overlay-hooks t)
+                   ;; Avoid major-mode's syntax propertizing function,
+                   ;; since we mess with the syntax-table and also
+                   ;; insert things that are not valid in the
+                   ;; major-mode language syntax anyway.
+                   (syntax-propertize-function nil))
                (setq snippet
                      (if expand-env
                          (eval `(let* ,expand-env
                                   (insert content)
                                   (yas--snippet-create start (point))))
                        (insert content)
-                       (yas--snippet-create start (point))))))
+                       (yas--snippet-create start (point)))))
+             ;; Invalidate any syntax-propertizing done while 
`syntax-propertize-function' was nil
+             (syntax-ppss-flush-cache start))
 
            ;; stacked-expansion: This checks for stacked expansion, save the
            ;; `yas--previous-active-field' and advance its boundary.
@@ -3593,7 +3629,7 @@ considered when expanding the snippet."
              (when first-field
                (sit-for 0) ;; fix issue 125
                (yas--move-to-field snippet first-field)))
-           (yas--message 3 "snippet expanded.")
+           (yas--message 4 "snippet expanded.")
            t))))
 
 (defun yas--take-care-of-redo (_beg _end snippet)
@@ -3800,6 +3836,9 @@ cons cells to this var.")
 backquoted Lisp expressions should be inserted at the end of
 expansion.")
 
+(defvar yas--indent-markers nil
+  "List of markers for manual indentation.")
+
 (defun yas--snippet-parse-create (snippet)
   "Parse a recently inserted snippet template, creating all
 necessary fields, mirrors and exit points.
@@ -3819,6 +3858,9 @@ Meant to be called in a narrowed buffer, does various 
passes"
     ;; protect escaped characters
     ;;
     (yas--protect-escapes)
+    ;; Parse indent markers: `$>'.
+    (goto-char parse-start)
+    (yas--indent-parse-create)
     ;; parse fields with {}
     ;;
     (goto-char parse-start)
@@ -3836,7 +3878,22 @@ Meant to be called in a narrowed buffer, does various 
passes"
     (yas--calculate-adjacencies snippet)
     ;; Delete $-constructs
     ;;
-    (save-restriction (widen) (yas--delete-regions yas--dollar-regions))
+    (save-restriction
+      (widen)
+      (yas--delete-regions yas--dollar-regions))
+    ;; Make sure to do this insertion *after* deleting the dollar
+    ;; regions, otherwise we invalidate the calculated positions of
+    ;; all the fields following $0.
+    (let ((exit (yas--snippet-exit snippet)))
+      (goto-char (if exit (yas--exit-marker exit) (point-max))))
+    (when (eq yas-wrap-around-region 'cua)
+      (setq yas-wrap-around-region ?0))
+    (cond ((and yas-wrap-around-region yas-selected-text)
+           (insert yas-selected-text))
+          ((and (characterp yas-wrap-around-region)
+                (get-register yas-wrap-around-region))
+           (insert (prog1 (get-register yas-wrap-around-region)
+                     (set-register yas-wrap-around-region nil)))))
     ;; restore backquoted expression values
     ;;
     (yas--restore-backquotes)
@@ -3852,8 +3909,9 @@ Meant to be called in a narrowed buffer, does various 
passes"
     (goto-char parse-start)
     (yas--indent snippet)))
 
-(defun yas--indent-according-to-mode (snippet-markers)
-  "Indent current line according to mode, preserving SNIPPET-MARKERS."
+(defun yas--indent-region (from to snippet)
+  "Indent the lines between FROM and TO with `indent-according-to-mode'.
+The SNIPPET's markers are preserved."
   ;;; Apropos indenting problems....
   ;;
   ;; `indent-according-to-mode' uses whatever `indent-line-function'
@@ -3866,54 +3924,53 @@ Meant to be called in a narrowed buffer, does various 
passes"
   ;; `front-advance' property set to nil.
   ;;
   ;; This is why I have these `trouble-markers', they are the ones at
-  ;; they are the ones at the first non-whitespace char at the line
-  ;; (i.e. at `yas--real-line-beginning'. After indentation takes place
-  ;; we should be at the correct to restore them to. All other
-  ;; non-trouble-markers have been *pushed* and don't need special
-  ;; attention.
-  ;;
-  (goto-char (yas--real-line-beginning))
-  (let ((trouble-markers (remove-if-not #'(lambda (marker)
-                                            (= marker (point)))
-                                        snippet-markers)))
-    (save-restriction
-      (widen)
-      (condition-case _
-          (indent-according-to-mode)
-        (error (yas--message 3 "Warning: `yas--indent-according-to-mode' 
having problems running %s" indent-line-function)
-               nil)))
-    (mapc #'(lambda (marker)
-              (set-marker marker (point)))
-          trouble-markers)))
+  ;; the first non-whitespace char at the line.  After indentation
+  ;; takes place we should be at the correct to restore them.  All
+  ;; other non-trouble-markers should have been *pushed* and don't
+  ;; need special attention.
+  (let* ((snippet-markers (yas--collect-snippet-markers snippet))
+         (to (set-marker (make-marker) to)))
+    (save-excursion
+      (goto-char from)
+      (save-restriction
+        (widen)
+        ;; Indent each non-empty line.
+        (cl-loop if (/= (line-beginning-position) (line-end-position)) do
+                 (back-to-indentation)
+                 (let ((trouble-markers ; The markers at (point).
+                        (cl-remove (point) snippet-markers :test #'/=)))
+                   (unwind-protect
+                       (indent-according-to-mode)
+                     (dolist (marker trouble-markers)
+                       (set-marker marker (point)))))
+                 while (and (zerop (forward-line 1))
+                            (< (point) to)))))))
 
 (defvar yas--indent-original-column nil)
 (defun yas--indent (snippet)
-  (let ((snippet-markers (yas--collect-snippet-markers snippet)))
-    ;; Look for those $>
-    (save-excursion
-      (while (re-search-forward "$>" nil t)
-        (delete-region (match-beginning 0) (match-end 0))
-        (when (not (eq yas-indent-line 'auto))
-          (yas--indent-according-to-mode snippet-markers))))
-    ;; Now do stuff for 'fixed and 'auto
-    (save-excursion
-      (cond ((eq yas-indent-line 'fixed)
-             (while (and (zerop (forward-line))
-                         (zerop (current-column)))
-               (indent-to-column yas--indent-original-column)))
-            ((eq yas-indent-line 'auto)
-             (let ((end (set-marker (make-marker) (point-max)))
-                   (indent-first-line-p yas-also-auto-indent-first-line))
-               (while (and (zerop (if indent-first-line-p
-                                      (prog1
-                                          (forward-line 0)
-                                        (setq indent-first-line-p nil))
-                                    (forward-line 1)))
-                           (not (eobp))
-                           (<= (point) end))
-                 (yas--indent-according-to-mode snippet-markers))))
-            (t
-             nil)))))
+  ;; Indent lines that had indent markers (`$>') on them.
+  (save-excursion
+    (dolist (marker yas--indent-markers)
+      (unless (eq yas-indent-line 'auto)
+        (goto-char marker)
+        (yas--indent-region (line-beginning-position)
+                            (line-end-position)
+                            snippet))
+      ;; Finished with this marker.
+      (set-marker marker nil))
+    (setq yas--indent-markers nil))
+  ;; Now do stuff for `fixed' and `auto'.
+  (save-excursion
+    (cond ((eq yas-indent-line 'fixed)
+           (while (and (zerop (forward-line))
+                       (zerop (current-column)))
+             (indent-to-column yas--indent-original-column)))
+          ((eq yas-indent-line 'auto)
+           (unless yas-also-auto-indent-first-line
+             (forward-line 1))
+           (yas--indent-region (line-beginning-position)
+                               (point-max)
+                               snippet)))))
 
 (defun yas--collect-snippet-markers (snippet)
   "Make a list of all the markers used by SNIPPET."
@@ -3930,15 +3987,6 @@ Meant to be called in a narrowed buffer, does various 
passes"
         (push (yas--exit-marker snippet-exit) markers)))
     markers))
 
-(defun yas--real-line-beginning ()
-  (let ((c (char-after (line-beginning-position)))
-        (n (line-beginning-position)))
-    (while (or (eql c ?\ )
-               (eql c ?\t))
-      (cl-incf n)
-      (setq c (char-after n)))
-    n))
-
 (defun yas--escape-string (escaped)
   (concat "YASESCAPE" (format "%d" escaped) "PROTECTGUARD"))
 
@@ -3971,7 +4019,7 @@ With optional string TEXT do it in string instead of the 
buffer."
     changed-text))
 
 (defun yas--save-backquotes ()
-  "Save all the \"`(lisp-expression)`\"-style expressions
+  "Save all the \"\\=`(lisp-expression)\\=`\"-style expressions
 with their evaluated value into `yas--backquote-markers-and-strings'."
   (while (re-search-forward yas--backquote-lisp-expression-regexp nil t)
     (let ((current-string (match-string-no-properties 1)) transformed)
@@ -4015,6 +4063,16 @@ with their evaluated value into 
`yas--backquote-markers-and-strings'."
     (set-marker-insertion-type marker nil)
     marker))
 
+(defun yas--indent-parse-create ()
+  "Parse the \"$>\" indentation markers just inserted."
+  (setq yas--indent-markers ())
+  (while (search-forward "$>" nil t)
+    (delete-region (match-beginning 0) (match-end 0))
+    ;; Mark the beginning of the line.
+    (push (yas--make-marker (line-beginning-position))
+          yas--indent-markers))
+  (setq yas--indent-markers (nreverse yas--indent-markers)))
+
 (defun yas--field-parse-create (snippet &optional parent-field)
   "Parse most field expressions in SNIPPET, except for the simple one \"$n\".
 
@@ -4117,21 +4175,10 @@ When multiple expressions are found, only the last one 
counts."
   (while (re-search-forward yas--simple-mirror-regexp nil t)
     (let ((number (string-to-number (match-string-no-properties 1))))
       (cond ((zerop number)
-
              (setf (yas--snippet-exit snippet)
                    (yas--make-exit (yas--make-marker (match-end 0))))
-             (save-excursion
-               (goto-char (match-beginning 0))
-               (when yas-wrap-around-region
-                 (cond (yas-selected-text
-                        (insert yas-selected-text))
-                       ((and (eq yas-wrap-around-region 'cua)
-                             cua-mode
-                             (get-register ?0))
-                        (insert (prog1 (get-register ?0)
-                                  (set-register ?0 nil))))))
-               (push (cons (point) (yas--exit-marker (yas--snippet-exit 
snippet)))
-                     yas--dollar-regions)))
+             (push (cons (match-beginning 0) (yas--exit-marker 
(yas--snippet-exit snippet)))
+                   yas--dollar-regions))
             (t
              (let ((field (yas--snippet-find-field snippet number)))
                (if field
@@ -4180,43 +4227,45 @@ When multiple expressions are found, only the last one 
counts."
 
 (defun yas--update-mirrors (snippet)
   "Update all the mirrors of SNIPPET."
-  (save-excursion
-    (dolist (field-and-mirror (sort
-                               ;; make a list of ((F1 . M1) (F1 . M2) (F2 . 
M3) (F2 . M4) ...)
-                               ;; where F is the field that M is mirroring
-                               ;;
-                               (mapcan #'(lambda (field)
-                                           (mapcar #'(lambda (mirror)
-                                                       (cons field mirror))
-                                                   (yas--field-mirrors field)))
-                                       (yas--snippet-fields snippet))
-                               ;; then sort this list so that entries with 
mirrors with parent
-                               ;; fields appear before. This was important for 
fixing #290, and
-                               ;; luckily also handles the case where a mirror 
in a field causes
-                               ;; another mirror to need reupdating
-                               ;;
-                               #'(lambda (field-and-mirror1 field-and-mirror2)
-                                   (> (yas--calculate-mirror-depth (cdr 
field-and-mirror1))
-                                      (yas--calculate-mirror-depth (cdr 
field-and-mirror2))))))
-      (let* ((field (car field-and-mirror))
-             (mirror (cdr field-and-mirror))
-             (parent-field (yas--mirror-parent-field mirror)))
-        ;; before updating a mirror with a parent-field, maybe advance
-        ;; its start (#290)
-        ;;
-        (when parent-field
-          (yas--advance-start-maybe mirror (yas--fom-start parent-field)))
-        ;; update this mirror
-        ;;
-        (yas--mirror-update-display mirror field)
-        ;; `yas--place-overlays' is needed if the active field and
-        ;; protected overlays have been changed because of insertions
-        ;; in `yas--mirror-update-display'
-        ;;
-        (when (eq field (yas--snippet-active-field snippet))
-          (yas--place-overlays snippet field))))))
-
-(defun yas--mirror-update-display (mirror field)
+  (save-restriction
+    (widen)
+    (save-excursion
+      (dolist (field-and-mirror
+               (sort
+                ;; make a list of ((F1 . M1) (F1 . M2) (F2 . M3) (F2 . M4) ...)
+                ;; where F is the field that M is mirroring
+                ;;
+                (cl-mapcan #'(lambda (field)
+                               (mapcar #'(lambda (mirror)
+                                           (cons field mirror))
+                                       (yas--field-mirrors field)))
+                           (yas--snippet-fields snippet))
+                ;; then sort this list so that entries with mirrors with parent
+                ;; fields appear before. This was important for fixing #290, 
and
+                ;; luckily also handles the case where a mirror in a field 
causes
+                ;; another mirror to need reupdating
+                ;;
+                #'(lambda (field-and-mirror1 field-and-mirror2)
+                    (> (yas--calculate-mirror-depth (cdr field-and-mirror1))
+                       (yas--calculate-mirror-depth (cdr 
field-and-mirror2))))))
+        (let* ((field (car field-and-mirror))
+               (mirror (cdr field-and-mirror))
+               (parent-field (yas--mirror-parent-field mirror)))
+          ;; before updating a mirror with a parent-field, maybe advance
+          ;; its start (#290)
+          ;;
+          (when parent-field
+            (yas--advance-start-maybe mirror (yas--fom-start parent-field)))
+          ;; update this mirror
+          ;;
+          (yas--mirror-update-display mirror field snippet)
+          ;; `yas--place-overlays' is needed since the active field and
+          ;; protected overlays might have been changed because of insertions
+          ;; in `yas--mirror-update-display'.
+          (let ((active-field (yas--snippet-active-field snippet)))
+            (when active-field (yas--place-overlays snippet 
active-field))))))))
+
+(defun yas--mirror-update-display (mirror field snippet)
   "Update MIRROR according to FIELD (and mirror transform)."
 
   (let* ((mirror-parent-field (yas--mirror-parent-field mirror))
@@ -4235,7 +4284,11 @@ When multiple expressions are found, only the last one 
counts."
         (set-marker (yas--mirror-end mirror) (point))
         (yas--advance-start-maybe (yas--mirror-next mirror) (point))
         ;; super-special advance
-        (yas--advance-end-of-parents-maybe mirror-parent-field (point))))))
+        (yas--advance-end-of-parents-maybe mirror-parent-field (point)))
+      (let ((yas--inhibit-overlay-hooks t))
+        (yas--indent-region (yas--mirror-start mirror)
+                            (yas--mirror-end mirror)
+                            snippet)))))
 
 (defun yas--field-update-display (field)
   "Much like `yas--mirror-update-display', but for fields."
@@ -4309,7 +4362,7 @@ object satisfying `yas--field-p' to restrict the 
expansion to.")))
      '(yas--expand-from-keymap-doc t))
 (defun yas--expand-from-keymap-doc (context)
   "A doc synthesizer for `yas--expand-from-keymap-doc'."
-  (add-hook 'temp-buffer-show-hook 'yas--snippet-description-finish-runonce)
+  (add-hook 'temp-buffer-show-hook #'yas--snippet-description-finish-runonce)
   (concat "Expand/run snippets from keymaps, possibly falling back to original 
binding.\n"
           (when (and context (eq this-command 'describe-key))
             (let* ((vec (this-single-command-keys))
@@ -4344,7 +4397,8 @@ object satisfying `yas--field-p' to restrict the 
expansion to.")))
 (defun yas--snippet-description-finish-runonce ()
   "Final adjustments for the help buffer when snippets are concerned."
   (yas--create-snippet-xrefs)
-  (remove-hook 'temp-buffer-show-hook 
'yas--snippet-description-finish-runonce))
+  (remove-hook 'temp-buffer-show-hook
+               #'yas--snippet-description-finish-runonce))
 
 (defun yas--create-snippet-xrefs ()
   (save-excursion
@@ -4354,12 +4408,12 @@ object satisfying `yas--field-p' to restrict the 
expansion to.")))
                                          'yasnippet)))
         (when template
           (help-xref-button 1 'help-snippet-def template)
-          (kill-region (match-end 1) (match-end 0))
-          (kill-region (match-beginning 0) (match-beginning 1)))))))
+          (delete-region (match-end 1) (match-end 0))
+          (delete-region (match-beginning 0) (match-beginning 1)))))))
 
 ;;; Utils
 
-(defvar yas-verbosity 4
+(defvar yas-verbosity 3
   "Log level for `yas--message' 4 means trace most anything, 0 means nothing.")
 
 (defun yas--message (level message &rest args)
@@ -4550,14 +4604,17 @@ and return the directory.  Return nil if not found."
 
 They are mapped to \"yas/*\" variants.")
 
-(dolist (sym yas--backported-syms)
-  (let ((backported (intern (replace-regexp-in-string "^yas-" "yas/" 
(symbol-name sym)))))
-    (when (boundp sym)
-      (make-obsolete-variable backported sym "yasnippet 0.8")
-      (defvaralias backported sym))
-    (when (fboundp sym)
-      (make-obsolete backported sym "yasnippet 0.8")
-      (defalias backported sym))))
+(when yas-alias-to-yas/prefix-p
+  (dolist (sym yas--backported-syms)
+    (let ((backported (intern (replace-regexp-in-string "\\`yas-" "yas/" 
(symbol-name sym)))))
+      (when (boundp sym)
+        (make-obsolete-variable backported sym "yasnippet 0.8")
+        (defvaralias backported sym))
+      (when (fboundp sym)
+        (make-obsolete backported sym "yasnippet 0.8")
+        (defalias backported sym))))
+  (make-obsolete 'yas/root-directory 'yas-snippet-dirs "yasnippet 0.8")
+  (defvaralias 'yas/root-directory 'yas-snippet-dirs))
 
 (defvar yas--exported-syms
   (let (exported)
@@ -4566,7 +4623,7 @@ They are mapped to \"yas/*\" variants.")
                                   (not (get atom 'byte-obsolete-variable)))
                              (and (fboundp atom)
                                   (not (get atom 'byte-obsolete-info))))
-                         (string-match-p "^yas-[^-]" (symbol-name atom)))
+                         (string-match-p "\\`yas-[^-]" (symbol-name atom)))
                     (push atom exported))))
     exported)
   "Exported yasnippet symbols.
diff --git a/packages/ztree/ztree-diff-model.el 
b/packages/ztree/ztree-diff-model.el
index b4ad75f..a9c99ae 100644
--- a/packages/ztree/ztree-diff-model.el
+++ b/packages/ztree/ztree-diff-model.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2013-2016  Free Software Foundation, Inc.
 ;;
 ;; Author: Alexey Veretennikov <address@hidden>
-;; 
+;;
 ;; Created: 2013-11-11
 ;;
 ;; Keywords: files tools
@@ -196,7 +196,7 @@ left and right parts existing."
 
 (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))
@@ -236,7 +236,7 @@ Argument DIFF different status to be assigned to all 
created nodes."
 
 (defun ztree-diff-model-update-diff (old new)
   "Get the diff status depending if OLD or NEW is not nil.
-If the OLD is 'ignore, do not change anything"
+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
@@ -259,14 +259,14 @@ setting status from the NODE, unless they have an ignore 
status"
     ;; otherwise only update status when the child status is not ignore
     (mapc (lambda (child)
             (when (or (eql status 'ignore)
-                      (not 
+                      (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.
@@ -387,7 +387,7 @@ 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)) 
+  (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 ed3d5f9..cfd0c96 100644
--- a/packages/ztree/ztree-diff.el
+++ b/packages/ztree/ztree-diff.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2013-2016  Free Software Foundation, Inc.
 ;;
 ;; Author: Alexey Veretennikov <address@hidden>
-;; 
+;;
 ;; Created: 2013-11-11
 ;;
 ;; Keywords: files tools
@@ -33,7 +33,7 @@
 
 (defconst ztree-diff-hidden-files-regexp "^\\."
   "Hidden files regexp.
-By default all filest starting with dot '.', including . and ..")
+By default all filest starting with dot `.', including . and ..")
 
 (defface ztreep-diff-header-face
   '((((type tty pc) (class color)) :foreground "lightblue" :weight bold)
@@ -478,7 +478,7 @@ unless it is a parent node."
             (eql diff 'diff))
         ;; or it is ignored but we show ignored for now
         (and (eql diff 'ignore)
-             ztree-diff-show-filtered-files) 
+             ztree-diff-show-filtered-files)
         ;; or they are same but we show same for now
         (and (eql diff 'same)
              ztree-diff-show-equal-files))))
@@ -499,7 +499,7 @@ unless it is a parent node."
 
 
 (defun ztree-diff-update-wait-message (&optional msg)
-  "Update the wait mesage with one more '.' progress indication."
+  "Update the wait mesage with one more `.' progress indication."
   (if msg
       (setq ztree-diff-wait-message msg)
     (when ztree-diff-wait-message
@@ -547,7 +547,7 @@ Argument DIR2 right directory."
     (ztree-diff-update-wait-message (concat "Comparing " dir1 " and " dir2 " 
..."))
     (ztree-diff-node-recreate model)
     (message "Done.")
-    
+
     (ztree-refresh-buffer)))
 
 
diff --git a/packages/ztree/ztree-dir.el b/packages/ztree/ztree-dir.el
index d3d3b25..53617f9 100644
--- a/packages/ztree/ztree-dir.el
+++ b/packages/ztree/ztree-dir.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2013-2016  Free Software Foundation, Inc.
 ;;
 ;; Author: Alexey Veretennikov <address@hidden>
-;; 
+;;
 ;; Created: 2013-11-11
 ;;
 ;; Keywords: files tools
@@ -28,7 +28,7 @@
 ;;; Commentary:
 ;;
 ;; Add the following to your .emacs file:
-;; 
+;;
 ;; (push (substitute-in-file-name "path-to-ztree-directory") load-path)
 ;; (require 'ztree-dir)
 ;;
@@ -53,11 +53,11 @@
 
 (defconst ztree-hidden-files-regexp "^\\."
   "Hidden files regexp.
-By default all filest starting with dot '.', including . and ..")
+By default all filest starting with dot `.', including . and ..")
 
 ;;
 ;; Configurable variables
-;; 
+;;
 
 (defvar ztree-dir-move-focus nil
   "If set to true moves the focus to opened window when the
@@ -118,8 +118,8 @@ One could add own filters in the following way:
   "Determines if the file with FILENAME should be visible."
   (let ((name (ztree-file-short-name filename)))
     (and (not (or (string= name ".") (string= name "..")))
-         (or 
-          ztree-dir-show-filtered-files 
+         (or
+          ztree-dir-show-filtered-files
           (not (cl-find-if (lambda (rx) (string-match rx name)) 
ztree-dir-filter-list))))))
 
 
@@ -133,7 +133,7 @@ Otherwise, the ztree window is used to find the file."
            (find-file-other-window node))
           (hard
            (save-selected-window (find-file-other-window node)))
-          (t 
+          (t
            (find-file node)))))
 
 
diff --git a/packages/ztree/ztree-util.el b/packages/ztree/ztree-util.el
index ec49457..9f458d6 100644
--- a/packages/ztree/ztree-util.el
+++ b/packages/ztree/ztree-util.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2013-2016  Free Software Foundation, Inc.
 ;;
 ;; Author: Alexey Veretennikov <address@hidden>
-;; 
+;;
 ;; Created: 2013-11-11
 ;;
 ;; Keywords: files tools
@@ -44,7 +44,7 @@ Taken from http://www.emacswiki.org/emacs/ElispCookbook#toc39";
 
 
 (defun ztree-printable-string (string)
-  "Strip newline character from file names, like 'Icon\n.
+  "Strip newline character from file names, like `Icon\n'.
 Argument STRING string to process.'."
   (replace-regexp-in-string "\n" "" string))
 
diff --git a/packages/ztree/ztree-view.el b/packages/ztree/ztree-view.el
index 3244ccc..f1a9afd 100644
--- a/packages/ztree/ztree-view.el
+++ b/packages/ztree/ztree-view.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2013-2016  Free Software Foundation, Inc.
 ;;
 ;; Author: Alexey Veretennikov <address@hidden>
-;; 
+;;
 ;; Created: 2013-11-11
 ;;
 ;; Keywords: files tools
@@ -73,7 +73,7 @@ If ith value is i - it is the root line")
 Used in order to not to use cl package and `lexical-let'")
 
 (defvar-local ztree-line-tree-properties nil
-  "Hash with key - line number, value - property ('left, 'right, 'both).
+  "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")
 
@@ -95,8 +95,8 @@ For example if the node is a directory")
   "Function returning list of node contents.")
 
 (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
+  "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")
 
 (defvar-local ztree-node-face-fun nil
@@ -321,7 +321,7 @@ Argument NODE node which contents will be returned."
                  #'(lambda (f) (not (funcall ztree-node-is-expandable-fun f)))
                  nodes)
                 comp))))
-                
+
 
 (defun ztree-draw-char (c x y &optional face)
   "Draw char C at the position (1-based) (X Y).
@@ -352,7 +352,7 @@ 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.
+  "Draw a vertical line of `|' characters from Y1 row to Y2 in X column.
 Optional argument FACE face to draw line with."
   (let ((ver-line-char (ztree-vertical-line-char))
         (count (abs (- y1 y2))))
@@ -367,7 +367,7 @@ Optional argument FACE face to draw line with."
         (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.
+  "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 ((ver-line-char (ztree-vertical-line-char))
@@ -558,7 +558,7 @@ 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)
                        (let ((sign (concat "[" (if exp "-" "+") "]")))
-                         (insert (propertize sign 
+                         (insert (propertize sign
                                              'font-lock-face
                                              ztreep-expand-sign-face)))))
         ;; face to use. if FACE is not null, use it, otherwise



reply via email to

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