emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] xwidget_mvp 67ef998 3/4: upstream merge


From: Joakim Verona
Subject: [Emacs-diffs] xwidget_mvp 67ef998 3/4: upstream merge
Date: Thu, 22 Oct 2015 21:17:05 +0000

branch: xwidget_mvp
commit 67ef998fa37eee0649c3c00cf537271b1296a73a
Merge: 4041499 644d31a
Author: Joakim Verona <address@hidden>
Commit: Joakim Verona <address@hidden>

    upstream merge
---
 ChangeLog.2                           |  560 +++++++++++++++++++++++++++++++-
 Makefile.in                           |   25 +-
 admin/MAINTAINERS                     |  583 +--------------------------------
 admin/charsets/mapconv                |    5 +-
 admin/merge-gnulib                    |    6 +-
 admin/merge-pkg-config                |    6 +-
 admin/notes/unicode                   |   11 +-
 admin/quick-install-emacs             |   34 +-
 build-aux/gitlog-to-emacslog          |   10 +-
 configure.ac                          |  417 ++++++++++++------------
 doc/lispref/objects.texi              |    4 +-
 doc/lispref/two-volume.make           |   47 ++--
 doc/misc/autotype.texi                |    2 +-
 doc/misc/calc.texi                    |   13 +
 lib-src/rcs2log                       |   20 +-
 lisp/Makefile.in                      |    9 +-
 lisp/calc/calc-aent.el                |    8 +-
 lisp/calc/calc-prog.el                |   20 +-
 lisp/calc/calc-yank.el                |  134 +++++++-
 lisp/calc/calc.el                     |  160 +++++-----
 lisp/calendar/calendar.el             |    4 +-
 lisp/cedet/ede.el                     |  117 +++----
 lisp/cedet/ede/emacs.el               |   28 +-
 lisp/cedet/ede/linux.el               |   29 +-
 lisp/cedet/ede/pconf.el               |    4 +-
 lisp/emacs-lisp/package.el            |   20 +-
 lisp/emacs-lisp/tabulated-list.el     |    4 +-
 lisp/font-lock.el                     |    4 +-
 lisp/gnus/auth-source.el              |   42 ++--
 lisp/indent.el                        |   22 ++-
 lisp/international/characters.el      |  105 ++++++-
 lisp/language/misc-lang.el            |    7 +-
 lisp/net/tramp-sh.el                  |    2 +-
 lisp/progmodes/cc-mode.el             |    5 +-
 lisp/progmodes/prog-mode.el           |    6 +-
 lisp/progmodes/prolog.el              |   11 +-
 lisp/term.el                          |   86 ++----
 lisp/textmodes/css-mode.el            |    2 +-
 lisp/textmodes/reftex-cite.el         |   52 ++--
 lisp/textmodes/reftex.el              |    9 +-
 lisp/textmodes/tex-mode.el            |   16 +-
 make-dist                             |   24 +-
 src/Makefile.in                       |    2 +-
 src/alloc.c                           |    2 +-
 src/bidi.c                            |   18 +-
 src/buffer.c                          |    2 +-
 src/cmds.c                            |   21 +-
 src/conf_post.h                       |    5 +
 src/data.c                            |    7 +-
 src/emacs.c                           |    1 +
 src/frame.c                           |    2 +-
 src/gtkutil.c                         |    4 +-
 src/image.c                           |   44 +--
 src/indent.c                          |    6 +-
 src/intervals.c                       |    9 +-
 src/keymap.c                          |   10 +-
 src/puresize.h                        |   27 +-
 src/syntax.c                          |    1 +
 src/window.c                          |   15 +-
 src/xfaces.c                          |    9 +-
 src/xfns.c                            |  293 +++++++++--------
 src/xftfont.c                         |    3 +-
 src/xmenu.c                           |    2 +-
 src/xselect.c                         |    6 +-
 src/xterm.c                           |  234 ++++++++++++--
 src/xterm.h                           |   47 +++
 test/automated/cmds-tests.el          |   34 ++
 test/automated/package-test.el        |    6 +
 test/automated/tabulated-list-test.el |  118 +++++++
 test/etags/make-src/Makefile          |    8 +-
 70 files changed, 2119 insertions(+), 1490 deletions(-)

diff --git a/ChangeLog.2 b/ChangeLog.2
index 94c8508..9e04ab0 100644
--- a/ChangeLog.2
+++ b/ChangeLog.2
@@ -1,3 +1,561 @@
+2015-10-11  Ken Raeburn  <address@hidden>
+
+       Handle an opaque-move X11 window manager operation more efficiently.
+
+       * src/xterm.c (handle_one_xevent): If a ConfigureNotify event is
+       followed by more ConfigureNotify events for the same window, process
+       only the last one.
+
+2015-10-11  Ken Raeburn  <address@hidden>
+
+       Fix cursor setting for tip frame; re-enable cursor generation.
+
+       * src/xfns.c (x_create_tip_frame): Include the cursor in the window
+       attributes sent when creating the new X window.  Don't skip setting
+       the pointerColor parameter.
+
+2015-10-11  Ken Raeburn  <address@hidden>
+
+       Rewrite x_set_mouse_color to sync less.
+
+       We can track serial numbers of X requests and correlate error events
+       with the associated requests.  This way we can identify errors for
+       specific calls without having to use XSync after every one.
+
+       * src/xfns.c (enum mouse_cursor): New type.
+       (struct mouse_cursor_types, struct mouse_cursor_data): New types.
+       (mouse_cursor_types): New array listing the Lisp variables and default
+       cursor appearances for each cursor type.
+       (x_set_mouse_color_handler): New function; checks error event serial
+       number against submitted requests.
+       (x_set_mouse_color): Updated to use the new error handler callback,
+       and to be more table-driven, to simplify repetitious code.
+
+2015-10-11  Ken Raeburn  <address@hidden>
+
+       Add x_catch_errors_with_handler.
+
+       * src/xterm.c (struct x_error_message_stack): Add new fields for a
+       callback function and associated data pointer.
+       (x_error_catcher): If the callback function is set, call it after
+       saving the error message string.
+       (x_catch_errors_with_handler): Renamed from x_catch_errors but now
+       accepts a callback function and data pointer.
+       (x_catch_errors): Now a wrapper function.
+       * src/xterm.h (x_special_error_handler): New typedef.
+       (x_catch_errors_with_handler): Declare.
+
+2015-10-11  Ken Raeburn  <address@hidden>
+
+       Introduce x_uncatch_errors_after_check to reduce XSync calls.
+
+       Both x_had_errors_p and x_check_errors call XSync, so if they're
+       immediately followed by x_uncatch_errors, its XSync call will be
+       redundant, resulting in a wasted round trip to the X server.
+
+       * src/xterm.c (x_uncatch_errors_after_check): New routine; a copy of
+       x_uncatch_errors without the XSync call.
+       (XTmouse_position, x_wm_supports):
+       * src/xfns.c (x_set_mouse_color):
+       * src/xmenu.c (Fx_menu_bar_open_internal):
+       * src/xselect.c (x_own_selection, x_get_foreign_selection):
+       (Fx_get_atom_name): Call it instead of x_uncatch_errors.
+       * src/xterm.h (x_uncatch_errors_after_check): Declare.
+
+2015-10-10  Jay Belanger  <address@hidden>
+
+       Document the optional prefix to `calc-yank'.
+
+       * doc/misc/calc.texi (Yanking into the Stack): Document the optional
+       prefix to `calc-yank'.
+       * lisp/calc/calc-yank.el (calc-yank): Ensure that things killed from
+       the Calc buffer are yanked back unchanged.
+
+2015-10-10  Mark Oteiza  <address@hidden>
+
+       * lisp/calendar/calendar.el: Display buffer before executing body.
+
+       In each use of this macro, the modeline is derived from a window width
+       calculation, which will be wrong if (display-buffer) splits the window
+       horizontally.
+
+2015-10-10  Paul Eggert  <address@hidden>
+
+       Use ‘echo’ safely with ‘\’ or leading ‘-’
+
+       POSIX says that ‘echo FOO’ produces implementation-defined output
+       if FOO contains leading ‘-’, or ‘\’ anywhere, so don’t assume GNU
+       behavior in that case.
+       * Makefile.in (removenullpaths): Remove.
+       (epaths-force): Rewrite to avoid the need for ‘echo’.
+       (install-etc): Be clearer about escaping the shell metacharacters
+       ‘\’ and ‘$’.
+       * Makefile.in (install-arch-indep, install-etcdoc):
+       * admin/charsets/mapconv, admin/merge-gnulib, admin/merge-pkg-config:
+       * admin/quick-install-emacs, build-aux/gitlog-to-emacslog:
+       * configure.ac, lib-src/rcs2log, make-dist:
+       * src/Makefile.in (lisp.mk):
+       Don’t assume ‘echo’ outputs ‘\’ and leading ‘-’ unscathed.
+       For example, use ‘printf '%s\n' "$foo"’ rather than ‘echo "$foo"’
+       if $foo can contain arbitrary characters.
+       * lisp/Makefile.in (TAGS): Use ‘ls’, not ‘echo’, to avoid ‘\’ issues.
+       * doc/lispref/two-volume.make (vol1.pdf):
+       * test/etags/make-src/Makefile (web ftp publish):
+       Use ‘printf’ rather than ‘echo -e’.
+
+2015-10-10  Kaushal Modi  <address@hidden>
+
+       Allow numbers with different radixes to be yanked.
+
+       * lisp/calc/calc-yank.el (calc-yank): Allow radixes besides the
+       default base 10.
+
+2015-10-10  Paul Eggert  <address@hidden>
+
+       Improve CHECK_IMPURE and PURE_P speedup
+
+       * src/data.c (Faset): Use XVECTOR and XSTRING rather than XPNTR.
+
+2015-10-10  Jay Belanger  <address@hidden>
+
+       Use events instead of chars to keep track of steps.
+
+       * lisp/calc/calc-prog.el (calc-kbd-loop): Use events instead of chars
+       to keep track of steps.
+
+2015-10-10  Paul Eggert  <address@hidden>
+
+       Fix --enable-gcc-warnings problem with older GCC
+
+       * src/puresize.h: Add INLINE_HEADER_BEGIN, INLINE_HEADER_END.
+       This is for building with --enable-gcc-warnings with
+       GCC 4.6 through 5.0.
+
+2015-10-10  Eli Zaretskii  <address@hidden>
+
+       Fix vertical-motion in truncated lines that end in a stretch
+
+       * src/indent.c (Fvertical_motion): Expect overshoot when point is
+       beyond window margin and lines are truncated, even if we have a
+       stretch at point.  (Bug#21468)
+
+2015-10-10  Eli Zaretskii  <address@hidden>
+
+       Avoid link-time errors due to inline functions
+
+       * src/emacs.c: Include puresize.h, to avoid link-time errors in
+       unoptimized builds due to PURE_P and CHECK_IMPURE, which are now
+       inline functions.
+
+2015-10-10  Andreas Schwab  <address@hidden>
+
+       * src/data.c (Faset): Fix last change.
+
+2015-10-10  Paul Eggert  <address@hidden>
+
+       CHECK_IMPURE and PURE_P speedup
+
+       * src/intervals.c (create_root_interval):
+       Do CHECK_IMPURE only for strings; not needed for buffers.
+       Prefer ! STRINGP to BUFFERP, for a tad more speed.
+       * src/puresize.h (CHECK_IMPURE, PURE_P):
+       Now inline functions instead of macros.
+       (PURE_P): Don’t use XPNTR; that is now the caller’s responsibility.
+       All callers changed.
+       (CHECK_IMPURE): New argument PTR, to save us the work of running XPNTR.
+       All callers changed.
+
+2015-10-09  Noah Friedman  <address@hidden>
+
+       (tramp-open-connection-setup-interactive-shell): Send -onlcr as well.
+
+2015-10-09  Stefan Monnier  <address@hidden>
+
+       * lisp/progmodes/cc-mode.el (c-after-font-lock-init): Only *move*
+
+       our after-change-function, rather than re-adding it if it was removed.
+
+2015-10-09  Stefan Monnier  <address@hidden>
+
+       * lisp/cedet/ede: Silence some compiler warnings
+
+       * lisp/cedet/ede.el: Require cl-lib.  Silence some compiler warnings.
+       (ede-menu-obj-of-class-p): Use cl-some rather than `eval'.
+       (ede-apply-object-keymap, ede-reset-all-buffers)
+       (ede-auto-add-to-target): Use dolist.
+       (ede-new, ede-flush-deleted-projects, ede-global-list-sanity-check):
+       Use field names rather than initarg names in `oref'.
+       (ede-load-project-file): Remove unused var `file'.
+       (ede-map-any-target-p): Use cl-some rather than ede-map-targets.
+       (ede-set): Remove unused var `a'.
+
+       * lisp/cedet/ede/emacs.el: Silence some compiler warnings.
+       (ede-project-autoload): Avoid the old-style "name" argument.
+       (ede-emacs-find-matching-target): Use field names rather than initarg
+       names in `oref'.
+
+       * lisp/cedet/ede/linux.el: Silence some compiler warnings.
+       (ede-linux-load, ede-project-autoload): Avoid the old-style "name" 
argument.
+       (ede-linux-find-matching-target): Use field names rather than initarg
+       names in `oref'.
+
+2015-10-09  Stefan Monnier  <address@hidden>
+
+       * lisp/textmodes/reftex.el: Silence byte-compiler warnings.
+
+2015-10-09  Stefan Monnier  <address@hidden>
+
+       * lisp/progmodes/prolog.el: Avoid indenting too much, after ":-"
+
+       (prolog-smie-rules): Try and avoid indenting too far after ":-".
+
+2015-10-09  Eli Zaretskii  <address@hidden>
+
+       Update case-table and categories of recently added characters
+
+       * lisp/international/characters.el: Update information about Latin
+       Extended-C, Latin Extended-D, Latin Extended-E, Cyrillic Extended,
+       Georgian, Glagolitic, Deseret, Old Hungarian, and Warang Citi
+       blocks.  (Byug#21654)
+
+2015-10-09  Martin Rudalics  <address@hidden>
+
+       In adjust_frame_size don't count minibuffer height twice (Bug#21643)
+
+       * src/frame.c (adjust_frame_size): In minibuffer-only windows
+       don't count minibuffer height twice.  (Bug#21643)
+
+2015-10-09  Eli Zaretskii  <address@hidden>
+
+       Avoid inflooping in font-lock
+
+       * lisp/font-lock.el (font-lock-extend-region-wholelines): Bind
+       inhibit-field-text-motion around the call to
+       line-beginning-position, to avoid inflooping.  (Bug#21615)
+
+2015-10-09  Tassilo Horn  <address@hidden>
+
+       Refactor duplicated code; ensure default is in completions
+
+       * lisp/textmodes/reftex-cite.el (reftex--query-search-regexps): New 
function.
+       (reftex-extract-bib-entries): Use it.
+       (reftex-extract-bib-entries-from-thebibliography): Use it.
+
+2015-10-09  Vincent Belaïche  <address@hidden>
+
+       Typo in example
+
+       * autotype.texi (Skeletons as Abbrevs): "if" -> "ifst" in the example.
+
+2015-10-08  Stefan Monnier  <address@hidden>
+
+       * lisp/calc/calc.el: Silence byte-compiler warnings
+
+       (calc-scan-for-dels): Use ignore-errors.
+       (calc-dispatch, calc-do-dispatch): Make unused arg optional.
+       (calc-read-key-sequence): Remove unused var `prompt2'.
+       (calc-kill-stack-buffer): Remove unused var `buflist'.
+       (calc): Remove unused var `oldbuf'.
+       (calc-refresh): Use inhibit-read-only.
+       (calc-can-abbrev-vectors): Declare.
+       (calc-record): Remove unused var `mainbuf'.
+       (math-sub-bignum): Remove unused var `sum'.
+       (math-svo-c, math-svo-wid, math-svo-off): Declare.
+
+2015-10-08  Daiki Ueno  <address@hidden>
+
+       Use g_clear_error instead of g_error_free
+
+       * src/image.c: Define g_clear_error instead of g_error_free.
+       (init_svg_functions): Resolve symbol g_clear_error instead of
+       g_error_free.
+       (svg_load_image): Use g_clear_error instead of g_error_free, to
+       suppress GLib warnings when ERR is not set.  See bug#21641.
+
+2015-10-08  Paul Eggert  <address@hidden>
+
+       * src/image.c (image_size_error): Simplify.
+
+2015-10-08  Paul Eggert  <address@hidden>
+
+       Fix problems caught with --enable-gcc-warnings
+
+       * src/image.c (lookup_rgb_color):
+       * src/xfns.c (x_defined_color):
+       * src/xterm.c (x_parse_color):
+       Remove unused locals.
+
+2015-10-08  Jay Belanger  <address@hidden>
+
+       * lisp/calc/calc.el (calc-digit-start-entry): Fix typo.
+
+2015-10-08  Jay Belanger  <address@hidden>
+
+       Format initial input uniformly.
+
+       * lisp/calc/calc.el (calc-digit-start-entry): New function.
+       * lisp/calc/calc.el (calcDigit-start):
+       * lisp/calc/calc-aent.el (calc-alg-digit-entry):
+       Use `calc-digit-start-entry' to format input.
+
+2015-10-08  Ken Raeburn  <address@hidden>
+
+       Disable non-working pointerColor setting for X tooltip frame.
+
+       It generates a bunch of server traffic, but there's some bug wherein
+       the new mouse cursor settings don't seem to get used.  In most
+       situations the cursor isn't likely to be seen anyway, so it's not
+       urgent to fix.
+
+       * src/xfns.c (x_create_tip_frame): Don't set pointerColor.
+
+2015-10-08  Ken Raeburn  <address@hidden>
+
+       Reduce some unnecessary X calls.
+
+       * src/xfns.c (x_real_pos_and_offsets): Remove a redundant XGetGeometry
+       call.  If border width is wanted, get it from the XGetGeometry call
+       instead of calling XGetWindowAttributes on the same window.  Skip some
+       X calls if we've already detected an error from the X server.
+       * src/xterm.c (x_wm_supports): Delete x_sync before x_had_errors_p.
+       (handle_one_xevent): Delete XSync call before x_uncatch_errors.
+
+2015-10-08  Ken Raeburn  <address@hidden>
+
+       Reduce color allocation/query traffic in the TrueColor case.
+
+       When working with an X visual with TrueColor class, pixel values can
+       be generated from the RGB values according to mask value provided by
+       the server on connection.  Some of the image-handling code was already
+       doing this.
+
+       * src/xterm.h (x_make_truecolor_pixel): New function; code taken from
+       lookup_rgb_color.
+       (x_mutable_colormap): New function.
+       * src/image.c (lookup_rgb_color): Move pixel composition code to
+       x_make_truecolor_pixel.
+       (x_kill_gs_process): Call x_mutable_colormap.
+       * src/xfaces.c (x_free_colors, x_free_dpy_colors): Call
+       x_mutable_colormap.
+       * src/xftfont.c (xftfont_get_colors): Call x_query_colors.
+       * src/xterm.c (x_query_colors): For a TrueColor display, decompose the
+       pixel value into RGB values directly, and don't send a request to the
+       server.
+       (x_alloc_nearest_color): For a TrueColor display, construct the pixel
+       value with x_make_truecolor_pixel.
+       (x_copy_color): For an immutable color map, just return the provided
+       pixel value.
+
+2015-10-08  Ken Raeburn  <address@hidden>
+
+       Cache XParseColor results in the X display info structure.
+
+       With repeated lookups of foreground and background colors for multiple
+       faces per frame, we issue a lot of redundant color name lookups to the
+       X server, waiting every time for the response.  On a remote network
+       with, say, 30ms round-trip time, this can add nearly a full second to
+       creation of a new frame.
+
+       * src/gtkutil.c (xg_check_special_colors): Call x_parse_color.
+       * src/image.c (get_spec_bg_or_alpha_as_argb):
+       (xpm_init_color_cache, xpm_lookup_color):
+       * src/xfns.c (x_defined_color):
+       * src/xterm.c (x_parse_color): New function; caches color names not
+       starting with "#" in the display-info structure.
+       (x_delete_display): Delete the cache content.
+       * src/xterm.h (struct color_name_cache_entry): New type.
+       (x_parse_color): Declare.
+       (struct x_display_info): Add a new field for the cache.
+
+2015-10-07  Stefan Monnier  <address@hidden>
+
+       * src/syntax.c (syms_of_syntax): Make syntax-propertize--done local
+
+2015-10-07  Eli Zaretskii  <address@hidden>
+
+       Fix segfault in image_size_error
+
+       * src/image.c (image_size_error): Pass a Lisp string to
+       image_error, not a C string.  (Bug#21641)
+
+2015-10-07  Simen Heggestøyl  <address@hidden>
+
+       Highlight CSS variable definitions
+
+       * lisp/textmodes/css-mode.el (css-nmstart-re): Tweak regexp to accept
+       CSS variables.  (Bug#21638)
+
+2015-10-07  Artur Malabarba  <address@hidden>
+
+       * test/automated/tabulated-list-test.el: New file
+
+       Test bug#21639 and some basic functionality.
+
+2015-10-07  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/tabulated-list.el (tabulated-list-sort):
+
+       Check if column can be sorted before trying.  (Bug#21639)
+
+2015-10-07  Nicolas Richard  <address@hidden>
+
+       Add test for `self-insert-command' (bug#21633)
+
+       * test/automated/cmds-tests.el: New file.
+
+2015-10-07  Martin Rudalics  <address@hidden>
+
+       In resize_frame_windows don't set a top position when resizing 
horizontally.
+
+       * src/window.c (resize_frame_windows): Don't set root window's
+       top position when resizing horizontally.
+
+2015-10-07  Artur Malabarba  <address@hidden>
+
+       * lisp/progmodes/prog-mode.el (prettify-symbols-alist):
+
+       Document more possible values.
+
+2015-10-06  Stefan Monnier  <address@hidden>
+
+       * lisp/textmodes/tex-mode.el: Use lexical-binding
+
+2015-10-06  Stefan Monnier  <address@hidden>
+
+       * lisp/indent.el (indent--default-inside-comment): New function
+
+       (indent-for-tab-command): Use it for `noindent' indentation.
+
+2015-10-06  Paul Eggert  <address@hidden>
+
+       Fix bug in GC_CHECK_MARKED_OBJECTS check
+
+       * src/alloc.c (mark_object): Fix bug in checking code.
+       When GC_CHECK_MARKED_OBJECTS is defined, the bug caused
+       CHECK_ALLOCATED_AND_LIVE_SYMBOL to repeatedly do the
+       CHECK_ALLOCATED and CHECK_LIVE tests for the first symbol in each
+       bucket.  The bug did not affect behavior either in the normal case
+       where GC_CHECK_MARKED_OBJECTS is not defined, or where Emacs does
+       not have an internal error that a properly-written
+       CHECK_ALLOCATED_AND_LIVE_SYMBOL would detect.
+
+2015-10-06  Tassilo Horn  <address@hidden>
+
+       Add prettified version of \\Bbb{Q}.
+
+       * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Add
+       prettified version for \\Bbb{Q}.
+
+2015-10-06  Artur Malabarba  <address@hidden>
+
+       * test/automated/package-test.el (package-test-install-single):
+
+       Add a test for bug#21625.
+
+2015-10-06  Aaron Ecay  <address@hidden>
+
+       lisp/emacs-lisp/package.el (package-install): Fix name error
+
+       * lisp/emacs-lisp/package.el (package-install): Fix error when pkg is
+         not a package-desc object.  Also clarify documentation.  (Bug#21625)
+
+2015-10-06  Eli Zaretskii  <address@hidden>
+
+       Fix display of characters adjacent to ZWJ and ZWNJ
+
+       * src/bidi.c (bidi_resolve_neutral): Treat all Bn (a.k.a. "control")
+       characters the same as directional formatting controls.
+       (bidi_level_of_next_char): Include all Bn characters in rule L1,
+       as mandated by the UBA.
+
+2015-10-06  Andreas Schwab  <address@hidden>
+
+       Don't use XFASTINT on a negative number
+
+       * src/cmds.c (Fself_insert_command): Don't use XFASTINT on a negative
+       number.  (Bug#21633)
+
+2015-10-05  Xue Fuqiao  <address@hidden>
+
+       * doc/lispref/objects.texi (Window Type): Add a cross reference.
+
+       * src/buffer.c (syms_of_buffer): Typo fix.  (Bug#21622)
+
+2015-10-05  Eli Zaretskii  <address@hidden>
+
+       Fix composition-function-table for Arabic and Syriac
+
+       * lisp/language/misc-lang.el (composition-function-table): Fix
+       entries for Arabic and Syriac.
+
+2015-10-05  Damien Cassou  <address@hidden>
+
+       Add first unit tests for auth-source.el
+
+       * test/automated/auth-source-tests.el: New file.
+
+2015-10-05  Eli Zaretskii  <address@hidden>
+
+       Remove redundant redisplay code
+
+       * src/xdisp.c (redisplay_internal, try_cursor_movement)
+       (try_window_reusing_current_matrix, try_window_id): Remove
+       redundant restrictions on redisplay optimizations based on the
+       frame's 'redisplay' flag.  See
+       http://osdir.com/ml/general/2015-10/msg02110.html for the relevant
+       discussions.
+
+2015-10-04  Stefan Monnier  <address@hidden>
+
+       * src/xdisp.c (windows_or_buffers_changed): Improve docstring
+
+2015-10-04  Xue Fuqiao  <address@hidden>
+
+       Update tutorials/TUTORIAL.cn
+
+       * etc/tutorials/TUTORIAL.cn: Improve translation.
+
+2015-10-04  YAMAMOTO Mitsuharu  <address@hidden>
+
+       * src/macfont.m (macfont_encode_char, syms_of_macfont): Remove unused 
vars.
+
+2015-10-04  Stefan Merten  <address@hidden>
+
+       Pull in version numbers from rst.el upstream release.
+
+               * lisp/textmodes/rst.el (rst-cvs-header, rst-svn-rev)
+               (rst-svn-timestamp, rst-official-version)
+               (rst-official-cvs-rev, rst-package-emacs-version-alist):
+               Update version numbers.
+
+2015-10-04  Eli Zaretskii  <address@hidden>
+
+       * test/automated/coding-tests.el: New file.
+
+2015-10-04  Michael Albinus  <address@hidden>
+
+       Improve XEmacs compatibility of Tramp
+
+       * lisp/net/tramp-compat.el (directory-listing-before-filename-regexp):
+       Declare if it doesn't exist.
+       (file-remote-p): Remove defalias, which was necessary for GNU Emacs 21.
+       (redisplay): Make it an alias if it doesn't exist.
+
+       * lisp/net/tramp.el (tramp-get-remote-tmpdir): Don't use
+       `file-remote-p' (due to XEmacs compatibility).
+
+       * lisp/net/trampver.el (locate-dominating-file)
+       (tramp-compat-replace-regexp-in-string): Autoload.
+       (tramp-repository-get-version): Do not dupe byte-compiler.
+
+2015-09-02  K. Handa  <address@hidden>
+
+       fix for the case that M17N_FLT_USE_NEW_FEATURE is not defined
+
+       * ftfont.c (ftfont_drive_otf) [not M17N_FLT_USE_NEW_FEATURE]:
+       Adjusted for the change of type of elements in the array
+       MFLTGlyphString.glyphs.
+
 2015-10-04  Eli Zaretskii  <address@hidden>
            Michael Heerdegen  <address@hidden>
 
@@ -14528,7 +15086,7 @@
 
 This file records repository revisions from
 commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to
-commit 2021680e9dcd277a4ebbdb613d535e6edc86f384 (inclusive).
+commit ce402dd77fe39c3a6d968e23d7a4a20f2b04ccf0 (inclusive).
 See ChangeLog.1 for earlier changes.
 
 ;; Local Variables:
diff --git a/Makefile.in b/Makefile.in
index 4ee84f9..1245f76 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -314,8 +314,6 @@ etc-emacsver:
          ${srcdir}/build-aux/move-if-change emacsver.tex.$$$$ \
          ${srcdir}/etc/refcards/emacsver.tex
 
-removenullpaths=sed -e 's/^:*//' -e 's/:*$$//g' -e 's/::*/:/g'
-
 # Generate epaths.h from epaths.in.  This target is invoked by 'configure'.
 # See comments in configure.ac for why it is done this way, as opposed
 # to just letting configure generate epaths.h from epaths.in in a
@@ -324,20 +322,18 @@ epaths-force:
        @for dir in '$(abs_srcdir)' '$(lispdir)' '$(archlibdir)'; do \
          case $$dir in \
            *:*) \
-             echo >&2 "Build or installation directory '$$dir'"; \
+             printf >&2 "Build or installation directory '%s'\\n" "$$dir"; \
              echo >&2 "cannot contain ':'."; \
              exit 1;; \
          esac; \
        done
-       @(standardlisppath=`echo "${standardlisppath}" | ${removenullpaths}` ; \
-         locallisppath=`echo "${locallisppath}" | ${removenullpaths}` ; \
-         buildlisppath=`echo "${buildlisppath}" | ${removenullpaths}` ; \
-         x_default_search_path=`echo ${x_default_search_path}`; \
-         gamedir=`echo ${gamedir}`; \
+       @(gamedir='${gamedir}'; \
          sed < ${srcdir}/src/epaths.in > epaths.h.$$$$         \
-         -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'"$${standardlisppath}"'";' \
-         -e 's;\(#.*PATH_SITELOADSEARCH\).*$$;\1 "'"$${locallisppath}"'";' \
-         -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'"$${buildlisppath}"'";' \
+         -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "${standardlisppath}";' \
+         -e 's;\(#.*PATH_SITELOADSEARCH\).*$$;\1 "${locallisppath}";' \
+         -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "${buildlisppath}";' \
+         -e '/^#define PATH_[^ ]*SEARCH /s/\([":]\):*/\1/g'            \
+         -e '/^#define PATH_[^ ]*SEARCH /s/:"/"/'                      \
          -e 's;\(#.*PATH_EXEC\).*$$;\1 "${archlibdir}";'               \
          -e 's;\(#.*PATH_INFO\).*$$;\1 "${infodir}";'                  \
          -e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";'                   \
@@ -577,7 +573,7 @@ install-arch-indep: lisp install-info install-man 
${INSTALL_ARCH_INDEP_EXTRA}
          fi; \
          rm -rf "$${dest}" ; \
          umask 022; ${MKDIR_P} "$${dest}" ; \
-         echo "Copying $${dir} to $${dest}..." ; \
+         printf 'Copying %s to %s...\n' "$$dir" "$$dest" ; \
          (cd $${dir}; tar -chf - . ) \
            | (cd "$${dest}"; umask 022; \
               tar -xvf - && cat > /dev/null) || exit 1; \
@@ -632,7 +628,8 @@ install-etcdoc: src install-arch-indep
        if [ "`cd ./etc; /bin/pwd`" != "$$exp_etcdocdir" ]; \
        then \
           docfile="DOC"; \
-          echo "Copying etc/$${docfile} to $(DESTDIR)${etcdocdir} ..." ; \
+          printf 'Copying %s to %s ...\n' "etc/$$docfile" \
+            "$(DESTDIR)${etcdocdir}"; \
           ${INSTALL_DATA} etc/$${docfile} 
"$(DESTDIR)${etcdocdir}/$${docfile}"; \
           $(set_installuser); \
             chown $${installuser} "$(DESTDIR)${etcdocdir}/$${docfile}" || true 
; \
@@ -721,7 +718,7 @@ install-etc:
          for icon in $${dir}/${EMACS_ICON}[.-]*; do \
            [ -r $${icon} ] || continue ; \
            ext=`echo "$${icon}" | sed -e 's|.*\.||'`; \
-           dest=`echo "$${icon}" | sed -e 's|.*/||' -e "s|\.$${ext}$$||" -e 
's/$(EMACS_ICON)/emacs/' -e '$(TRANSFORM)'`.$${ext} ; \
+           dest=`echo "$${icon}" | sed -e 's|.*/||' -e "s|\\.$${ext}\$$||" -e 
's/$(EMACS_ICON)/emacs/' -e '$(TRANSFORM)'`.$${ext} ; \
            ( cd "$${thisdir}"; \
              ${INSTALL_DATA} ${iconsrcdir}/$${icon} 
"$(DESTDIR)${icondir}/$${dir}/$${dest}" ) \
            || exit 1; \
diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS
index 8b7647e..322803b 100644
--- a/admin/MAINTAINERS
+++ b/admin/MAINTAINERS
@@ -5,20 +5,12 @@ what parts of the Emacs distribution.  The areas can be 
defined
 "arbitrarily", but should provide fairly well-defined boundaries so
 that there are not too many ambiguities.
 
-The list below consists of 3 parts.  First, the list of areas that
-someone wants to be maintaining (i.e. has a particularly keen interest
-for it); then the list of areas that someone is willing to maintain,
-although he would not necessarily mind if someone else was the
-official maintainer; and finally the list of areas for which no
-maintainer has been found so far.
-
 ==============================================================================
-1.
+1. Areas that someone wants to be maintaining (i.e. has a particularly
+keen interest in).  There's no need to list files where you are
+mentioned in the file's header.
 ==============================================================================
 
-Jason Rumney
-       W32
-
 Eli Zaretskii
 
        src/bidi.c
@@ -54,17 +46,6 @@ Stefan Monnier
        minibuffer completion
        lisp/outline.el
 
-Miles Bader
-       src/xfaces.c
-       field-property related stuff
-       lisp/comint.el
-       lisp/shell.el
-       [other comint-related packages]
-       lisp/button.el
-       lisp/image-file.el
-       lisp/minibuf-eldef.el
-       lisp/rfn-eshadow.el
-
 Jay Belanger
         Calc
             lisp/calc/*
@@ -146,7 +127,8 @@ Ulf Jasper
            test/automated/icalendar-tests.el
 
 ==============================================================================
-2.
+2. Areas that someone is willing to maintain, although he would not
+necessarily mind if someone else was the official maintainer.
 ==============================================================================
 
 Kelvin White
@@ -204,12 +186,6 @@ Stefan Monnier
        lisp/progmodes/tcl.el
        lisp/emacs-lisp/easymenu.el
 
-Miles Bader
-       src/eval.c
-       src/bytecode.c
-       src/editfns.c
-       lisp/textmodes/refill.el
-
 Artur Malabarba
         lisp/isearch.el
 
@@ -258,555 +234,6 @@ Vibhav Pant
        lisp/net/browse-url.el
        lisp/erc/*
 
-==============================================================================
-3.
-==============================================================================
-
-admin/admin.el
-admin/authors.el
-admin/build-configs
-admin/bzrmerge.el
-admin/charsets/*
-admin/check-doc-strings
-admin/cus-test.el
-admin/diff-tar-files
-admin/find-gc.el
-admin/gitmerge.el
-admin/make-emacs
-admin/quick-install-emacs
-admin/unidata/blocks.awk
-etc/edt-user.el
-etc/forms/forms-d2.el
-etc/forms/forms-pass.el
-etc/nxml/*
-etc/themes/*
-leim/*
-lisp/abbrev.el
-lisp/align.el
-lisp/allout-widgets.el
-lisp/allout.el
-lisp/ansi-color.el
-lisp/apropos.el
-lisp/array.el
-lisp/autoarg.el
-lisp/autoinsert.el
-lisp/autorevert.el
-lisp/avoid.el
-lisp/battery.el
-lisp/bindings.el
-lisp/bookmark.el
-lisp/bs.el
-lisp/buff-menu.el
-lisp/calculator.el
-lisp/calendar/*
-lisp/case-table.el
-lisp/cdl.el
-lisp/cedet/*
-lisp/chistory.el
-lisp/cmuscheme.el
-lisp/color.el
-lisp/completion.el
-lisp/composite.el
-lisp/cus-dep.el
-lisp/cus-edit.el
-lisp/cus-face.el
-lisp/cus-start.el
-lisp/cus-theme.el
-lisp/custom.el
-lisp/dabbrev.el
-lisp/delim-col.el
-lisp/delsel.el
-lisp/descr-text.el
-lisp/desktop.el
-lisp/dframe.el
-lisp/dired-aux.el
-lisp/dired-x.el
-lisp/dired.el
-lisp/dirtrack.el
-lisp/disp-table.el
-lisp/dnd.el
-lisp/dom.el
-lisp/double.el
-lisp/dynamic-setting.el
-lisp/ebuff-menu.el
-lisp/echistory.el
-lisp/edmacro.el
-lisp/ehelp.el
-lisp/elec-pair.el
-lisp/electric.el
-lisp/elide-head.el
-lisp/emacs-lisp/advice.el
-lisp/emacs-lisp/autoload.el
-lisp/emacs-lisp/avl-tree.el
-lisp/emacs-lisp/backquote.el
-lisp/emacs-lisp/benchmark.el
-lisp/emacs-lisp/bindat.el
-lisp/emacs-lisp/byte-opt.el
-lisp/emacs-lisp/byte-run.el
-lisp/emacs-lisp/bytecomp.el
-lisp/emacs-lisp/cconv.el
-lisp/emacs-lisp/chart.el
-lisp/emacs-lisp/check-declare.el
-lisp/emacs-lisp/checkdoc.el
-lisp/emacs-lisp/cl-extra.el
-lisp/emacs-lisp/cl-generic.el
-lisp/emacs-lisp/cl-indent.el
-lisp/emacs-lisp/cl-lib.el
-lisp/emacs-lisp/cl-macs.el
-lisp/emacs-lisp/cl-preloaded.el
-lisp/emacs-lisp/cl-seq.el
-lisp/emacs-lisp/cl.el
-lisp/emacs-lisp/copyright.el
-lisp/emacs-lisp/crm.el
-lisp/emacs-lisp/cursor-sensor.el
-lisp/emacs-lisp/debug.el
-lisp/emacs-lisp/derived.el
-lisp/emacs-lisp/disass.el
-lisp/emacs-lisp/easy-mmode.el
-lisp/emacs-lisp/edebug.el
-lisp/emacs-lisp/eieio-base.el
-lisp/emacs-lisp/eieio-compat.el
-lisp/emacs-lisp/eieio-core.el
-lisp/emacs-lisp/eieio-custom.el
-lisp/emacs-lisp/eieio-datadebug.el
-lisp/emacs-lisp/eieio-opt.el
-lisp/emacs-lisp/eieio-speedbar.el
-lisp/emacs-lisp/eieio.el
-lisp/emacs-lisp/eldoc.el
-lisp/emacs-lisp/elint.el
-lisp/emacs-lisp/elp.el
-lisp/emacs-lisp/ert-x.el
-lisp/emacs-lisp/ert.el
-lisp/emacs-lisp/ewoc.el
-lisp/emacs-lisp/find-func.el
-lisp/emacs-lisp/float-sup.el
-lisp/emacs-lisp/generator.el
-lisp/emacs-lisp/generic.el
-lisp/emacs-lisp/gv.el
-lisp/emacs-lisp/helper.el
-lisp/emacs-lisp/inline.el
-lisp/emacs-lisp/lisp-mnt.el
-lisp/emacs-lisp/lisp-mode.el
-lisp/emacs-lisp/lisp.el
-lisp/emacs-lisp/macroexp.el
-lisp/emacs-lisp/map-ynp.el
-lisp/emacs-lisp/nadvice.el
-lisp/emacs-lisp/package-x.el
-lisp/emacs-lisp/pcase.el
-lisp/emacs-lisp/pp.el
-lisp/emacs-lisp/re-builder.el
-lisp/emacs-lisp/regexp-opt.el
-lisp/emacs-lisp/regi.el
-lisp/emacs-lisp/ring.el
-lisp/emacs-lisp/rx.el
-lisp/emacs-lisp/shadow.el
-lisp/emacs-lisp/smie.el
-lisp/emacs-lisp/syntax.el
-lisp/emacs-lisp/tabulated-list.el
-lisp/emacs-lisp/tcover-ses.el
-lisp/emacs-lisp/tcover-unsafep.el
-lisp/emacs-lisp/testcover.el
-lisp/emacs-lisp/timer.el
-lisp/emacs-lisp/tq.el
-lisp/emacs-lisp/trace.el
-lisp/emacs-lisp/unsafep.el
-lisp/emacs-lisp/warnings.el
-lisp/emacs-lock.el
-lisp/emulation/*
-lisp/env.el
-lisp/epa-dired.el
-lisp/epa-file.el
-lisp/epa-hook.el
-lisp/epa-mail.el
-lisp/epa.el
-lisp/epg-config.el
-lisp/epg.el
-lisp/eshell/*
-lisp/expand.el
-lisp/ezimage.el
-lisp/face-remap.el
-lisp/facemenu.el
-lisp/faces.el
-lisp/ffap.el
-lisp/filecache.el
-lisp/files-x.el
-lisp/files.el
-lisp/filesets.el
-lisp/find-cmd.el
-lisp/find-dired.el
-lisp/find-file.el
-lisp/find-lisp.el
-lisp/finder.el
-lisp/flow-ctrl.el
-lisp/foldout.el
-lisp/follow.el
-lisp/font-core.el
-lisp/font-lock.el
-lisp/format-spec.el
-lisp/format.el
-lisp/forms.el
-lisp/frame.el
-lisp/frameset.el
-lisp/fringe.el
-lisp/generic-x.el
-lisp/gnus/*
-lisp/gs.el
-lisp/help-at-pt.el
-lisp/help-fns.el
-lisp/help-macro.el
-lisp/help-mode.el
-lisp/help.el
-lisp/hex-util.el
-lisp/hfy-cmap.el
-lisp/hi-lock.el
-lisp/hilit-chg.el
-lisp/hippie-exp.el
-lisp/hl-line.el
-lisp/htmlfontify.el
-lisp/ibuf-ext.el
-lisp/ibuf-macs.el
-lisp/ibuffer.el
-lisp/icomplete.el
-lisp/ido.el
-lisp/ielm.el
-lisp/iimage.el
-lisp/image-dired.el
-lisp/image-mode.el
-lisp/image.el
-lisp/imenu.el
-lisp/indent.el
-lisp/info-look.el
-lisp/info-xref.el
-lisp/informat.el
-lisp/international/*
-lisp/isearch.el
-lisp/isearchb.el
-lisp/jit-lock.el
-lisp/jka-cmpr-hook.el
-lisp/jka-compr.el
-lisp/json.el
-lisp/kermit.el
-lisp/kmacro.el
-lisp/language/*
-lisp/leim/*
-lisp/linum.el
-lisp/loadhist.el
-lisp/loadup.el
-lisp/locate.el
-lisp/lpr.el
-lisp/macros.el
-lisp/mail/binhex.el
-lisp/mail/blessmail.el
-lisp/mail/emacsbug.el
-lisp/mail/feedmail.el
-lisp/mail/footnote.el
-lisp/mail/hashcash.el
-lisp/mail/mail-extr.el
-lisp/mail/mail-hist.el
-lisp/mail/mail-utils.el
-lisp/mail/mailabbrev.el
-lisp/mail/mailalias.el
-lisp/mail/mailclient.el
-lisp/mail/mailheader.el
-lisp/mail/metamail.el
-lisp/mail/mspools.el
-lisp/mail/reporter.el
-lisp/mail/rfc2368.el
-lisp/mail/rfc822.el
-lisp/mail/sendmail.el
-lisp/mail/smtpmail.el
-lisp/mail/supercite.el
-lisp/mail/uce.el
-lisp/mail/undigest.el
-lisp/mail/unrmail.el
-lisp/mail/uudecode.el
-lisp/makesum.el
-lisp/man.el
-lisp/master.el
-lisp/mb-depth.el
-lisp/md4.el
-lisp/mh-e/*
-lisp/midnight.el
-lisp/minibuffer.el
-lisp/misc.el
-lisp/misearch.el
-lisp/mouse-copy.el
-lisp/mouse-drag.el
-lisp/mouse.el
-lisp/mpc.el
-lisp/msb.el
-lisp/mwheel.el
-lisp/net/ange-ftp.el
-lisp/net/dig.el
-lisp/net/dns.el
-lisp/net/eudcb-bbdb.el
-lisp/net/eudcb-ldap.el
-lisp/net/eudcb-mab.el
-lisp/net/eudc-bob.el
-lisp/net/eudcb-ph.el
-lisp/net/eudc.el
-lisp/net/eudc-export.el
-lisp/net/eudc-hotlist.el
-lisp/net/eudc-vars.el
-lisp/net/eww.el
-lisp/net/gnutls.el
-lisp/net/goto-addr.el
-lisp/net/hmac-def.el
-lisp/net/hmac-md5.el
-lisp/net/imap.el
-lisp/net/ldap.el
-lisp/net/mairix.el
-lisp/net/netrc.el
-lisp/net/net-utils.el
-lisp/net/network-stream.el
-lisp/net/nsm.el
-lisp/net/ntlm.el
-lisp/net/pinentry.el
-lisp/net/quickurl.el
-lisp/net/rcirc.el
-lisp/net/rfc2104.el
-lisp/net/rlogin.el
-lisp/net/sasl-cram.el
-lisp/net/sasl-digest.el
-lisp/net/sasl.el
-lisp/net/sasl-ntlm.el
-lisp/net/sasl-scram-rfc.el
-lisp/net/shr-color.el
-lisp/net/shr.el
-lisp/net/snmp-mode.el
-lisp/net/soap-client.el
-lisp/net/soap-inspect.el
-lisp/net/socks.el
-lisp/net/telnet.el
-lisp/net/tls.el
-lisp/net/webjump.el
-lisp/newcomment.el
-lisp/novice.el
-lisp/nxml/*
-lisp/obsolete/*
-lisp/paren.el
-lisp/password-cache.el
-lisp/pcmpl-cvs.el
-lisp/pcmpl-gnu.el
-lisp/pcmpl-linux.el
-lisp/pcmpl-rpm.el
-lisp/pcmpl-unix.el
-lisp/pcmpl-x.el
-lisp/pcomplete.el
-lisp/play/*
-lisp/printing.el
-lisp/proced.el
-lisp/profiler.el
-lisp/progmodes/ada-mode.el
-lisp/progmodes/ada-prj.el
-lisp/progmodes/ada-stmt.el
-lisp/progmodes/ada-xref.el
-lisp/progmodes/antlr-mode.el
-lisp/progmodes/asm-mode.el
-lisp/progmodes/autoconf.el
-lisp/progmodes/bat-mode.el
-lisp/progmodes/bug-reference.el
-lisp/progmodes/cc-align.el
-lisp/progmodes/cc-awk.el
-lisp/progmodes/cc-bytecomp.el
-lisp/progmodes/cc-cmds.el
-lisp/progmodes/cc-defs.el
-lisp/progmodes/cc-engine.el
-lisp/progmodes/cc-fonts.el
-lisp/progmodes/cc-guess.el
-lisp/progmodes/cc-langs.el
-lisp/progmodes/cc-menus.el
-lisp/progmodes/cc-mode.el
-lisp/progmodes/cc-styles.el
-lisp/progmodes/cc-vars.el
-lisp/progmodes/cfengine.el
-lisp/progmodes/cmacexp.el
-lisp/progmodes/compile.el
-lisp/progmodes/cperl-mode.el
-lisp/progmodes/cpp.el
-lisp/progmodes/cwarn.el
-lisp/progmodes/dcl-mode.el
-lisp/progmodes/ebnf-abn.el
-lisp/progmodes/ebnf-bnf.el
-lisp/progmodes/ebnf-dtd.el
-lisp/progmodes/ebnf-ebx.el
-lisp/progmodes/ebnf-iso.el
-lisp/progmodes/ebnf-otz.el
-lisp/progmodes/ebnf-yac.el
-lisp/progmodes/ebnf2ps.el
-lisp/progmodes/ebrowse.el
-lisp/progmodes/elisp-mode.el
-lisp/progmodes/etags.el
-lisp/progmodes/executable.el
-lisp/progmodes/f90.el
-lisp/progmodes/flymake.el
-lisp/progmodes/fortran.el
-lisp/progmodes/glasses.el
-lisp/progmodes/grep.el
-lisp/progmodes/gud.el
-lisp/progmodes/hideif.el
-lisp/progmodes/hideshow.el
-lisp/progmodes/icon.el
-lisp/progmodes/idlw-complete-structtag.el
-lisp/progmodes/idlw-help.el
-lisp/progmodes/idlw-shell.el
-lisp/progmodes/idlw-toolbar.el
-lisp/progmodes/idlwave.el
-lisp/progmodes/inf-lisp.el
-lisp/progmodes/js.el
-lisp/progmodes/ld-script.el
-lisp/progmodes/m4-mode.el
-lisp/progmodes/make-mode.el
-lisp/progmodes/mantemp.el
-lisp/progmodes/meta-mode.el
-lisp/progmodes/mixal-mode.el
-lisp/progmodes/modula2.el
-lisp/progmodes/octave.el
-lisp/progmodes/opascal.el
-lisp/progmodes/pascal.el
-lisp/progmodes/prog-mode.el
-lisp/progmodes/prolog.el
-lisp/progmodes/ps-mode.el
-lisp/progmodes/python.el
-lisp/progmodes/scheme.el
-lisp/progmodes/sh-script.el
-lisp/progmodes/simula.el
-lisp/progmodes/sql.el
-lisp/progmodes/subword.el
-lisp/progmodes/vera-mode.el
-lisp/progmodes/verilog-mode.el
-lisp/progmodes/vhdl-mode.el
-lisp/progmodes/which-func.el
-lisp/progmodes/xscheme.el
-lisp/ps-bdf.el
-lisp/ps-def.el
-lisp/ps-mule.el
-lisp/ps-print.el
-lisp/ps-samp.el
-lisp/recentf.el
-lisp/rect.el
-lisp/register.el
-lisp/repeat.el
-lisp/replace.el
-lisp/reposition.el
-lisp/reveal.el
-lisp/rot13.el
-lisp/ruler-mode.el
-lisp/savehist.el
-lisp/saveplace.el
-lisp/sb-image.el
-lisp/scroll-all.el
-lisp/scroll-bar.el
-lisp/scroll-lock.el
-lisp/select.el
-lisp/server.el
-lisp/ses.el
-lisp/shadowfile.el
-lisp/simple.el
-lisp/skeleton.el
-lisp/sort.el
-lisp/soundex.el
-lisp/speedbar.el
-lisp/strokes.el
-lisp/subr.el
-lisp/t-mouse.el
-lisp/tabify.el
-lisp/talk.el
-lisp/tar-mode.el
-lisp/tempo.el
-lisp/term.el
-lisp/term/AT386.el
-lisp/term/bobcat.el
-lisp/term/common-win.el
-lisp/term/cygwin.el
-lisp/term/iris-ansi.el
-lisp/term/linux.el
-lisp/term/lk201.el
-lisp/term/news.el
-lisp/term/ns-win.el
-lisp/term/rxvt.el
-lisp/term/screen.el
-lisp/term/sun.el
-lisp/term/tvi970.el
-lisp/term/vt100.el
-lisp/term/vt200.el
-lisp/term/wyse50.el
-lisp/term/x-win.el
-lisp/term/xterm.el
-lisp/textmodes/artist.el
-lisp/textmodes/bib-mode.el
-lisp/textmodes/bibtex-style.el
-lisp/textmodes/bibtex.el
-lisp/textmodes/conf-mode.el
-lisp/textmodes/dns-mode.el
-lisp/textmodes/enriched.el
-lisp/textmodes/fill.el
-lisp/textmodes/makeinfo.el
-lisp/textmodes/nroff-mode.el
-lisp/textmodes/page-ext.el
-lisp/textmodes/page.el
-lisp/textmodes/paragraphs.el
-lisp/textmodes/picture.el
-lisp/textmodes/po.el
-lisp/textmodes/refbib.el
-lisp/textmodes/refer.el
-lisp/textmodes/remember.el
-lisp/textmodes/rst.el
-lisp/textmodes/sgml-mode.el
-lisp/textmodes/table.el
-lisp/textmodes/texinfmt.el
-lisp/textmodes/texinfo.el
-lisp/textmodes/texnfo-upd.el
-lisp/textmodes/text-mode.el
-lisp/textmodes/tildify.el
-lisp/textmodes/two-column.el
-lisp/textmodes/underline.el
-lisp/thingatpt.el
-lisp/thumbs.el
-lisp/time-stamp.el
-lisp/time.el
-lisp/timezone.el
-lisp/tmm.el
-lisp/tool-bar.el
-lisp/tooltip.el
-lisp/tree-widget.el
-lisp/tutorial.el
-lisp/type-break.el
-lisp/uniquify.el
-lisp/url/*
-lisp/userlock.el
-lisp/vcursor.el
-lisp/version.el
-lisp/view.el
-lisp/vt-control.el
-lisp/vt100-led.el
-lisp/wdired.el
-lisp/wid-browse.el
-lisp/wid-edit.el
-lisp/widget.el
-lisp/windmove.el
-lisp/window.el
-lisp/winner.el
-lisp/woman.el
-lisp/x-dnd.el
-lisp/xml.el
-lisp/xt-mouse.el
-lwlib/*
-oldXMenu/*
-src/bitmaps/
-src/cygw32.c
-src/cygw32.h
-src/macfont.m
-src/nsfns.m
-src/nsfont.m
-src/nsimage.m
-src/nsmenu.m
-src/nsselect.m
-src/nsterm.m
-test/automated/*
-test/cedet/*
-test/rmailmm.el
-
 
 ;;; Local Variables:
 ;;;   coding: utf-8
diff --git a/admin/charsets/mapconv b/admin/charsets/mapconv
index 32ba642..3747ae2 100755
--- a/admin/charsets/mapconv
+++ b/admin/charsets/mapconv
@@ -64,7 +64,7 @@ case "$3" in
     KANJI-DATABASE)
        
SOURCE="http://kanji-database.cvs.sourceforge.net/viewvc/*checkout*/kanji-database/kanji-database/data/cns2ucsdkw.txt?revision=1.4";;;
     *)
-       echo "Unknown file type: $3";
+       printf 'Unknown file type: %s\n' "$3"
        exit 1;;
 esac
 
@@ -147,7 +147,6 @@ elif [ "$3" = "KANJI-DATABASE" ] ; then
        | sed -e 's/...\(....\) U+\([0-9A-F]*\).*/0x\1 0x\2/' \
        | sort | ${AWKPROG}
 else
-    echo "Invalid arguments: $3"
+    printf 'Invalid arguments: %s\n' "$3"
     exit 1
 fi
-
diff --git a/admin/merge-gnulib b/admin/merge-gnulib
index 963c3a0..818dc1a 100755
--- a/admin/merge-gnulib
+++ b/admin/merge-gnulib
@@ -71,7 +71,7 @@ case $gnulib_srcdir in
 esac
 case $src in
   -*)
-    echo >&2 "$0: usage: $0 [GNULIB_SRCDIR [SRCDIR]]
+    printf '%s\n' >&2 "$0: usage: $0 [GNULIB_SRCDIR [SRCDIR]]
 
     SRCDIR is the Emacs source directory (default: working directory).
     GNULIB_SRCDIR is the Gnulib source directory (default: SRCDIR/../gnulib)."
@@ -79,7 +79,7 @@ case $src in
 esac
 
 test -x "$src"autogen.sh || {
-  echo >&2 "$0: '${src:-.}' is not an Emacs source directory."
+  printf '%s\n' >&2 "$0: '${src:-.}' is not an Emacs source directory."
   exit 1
 }
 
@@ -88,7 +88,7 @@ git clone -- "$GNULIB_URL" "$gnulib_srcdir" ||
 exit
 
 test -x "$gnulib_srcdir"/gnulib-tool || {
-  echo >&2 "$0: '$gnulib_srcdir' is not a Gnulib source directory."
+  printf '%s\n' >&2 "$0: '$gnulib_srcdir' is not a Gnulib source directory."
   exit 1
 }
 
diff --git a/admin/merge-pkg-config b/admin/merge-pkg-config
index 2ee633d..3029372 100755
--- a/admin/merge-pkg-config
+++ b/admin/merge-pkg-config
@@ -49,15 +49,15 @@
 
   test -n "$dir"
 } || {
-  echo >&2 "$0: cannot find pkg.m4"
+  printf >&2 '%s\n' "$0: cannot find pkg.m4"
   exit 1
 }
 
 test -d m4 || {
-  echo >&2 "$0: please run this command in the main source directory"
+  printf >&2 '%s\n' "$0: please run this command in the main source directory"
   exit 1
 }
 
-echo >&2 "$0: copying $dir/pkg.m4 to m4/pkg.m4"
+printf >&2 '%s\n' "$0: copying $dir/pkg.m4 to m4/pkg.m4"
 
 cp $dir/pkg.m4 m4
diff --git a/admin/notes/unicode b/admin/notes/unicode
index bdef4cb..3901f60 100644
--- a/admin/notes/unicode
+++ b/admin/notes/unicode
@@ -27,10 +27,11 @@ so will cause aborts in redisplay.
 
 Next, review the changes in UnicodeData.txt vs the previous version
 used by Emacs.  Any changes, be it introduction of new scripts or
-addition of codepoints to existing scripts, need corresponding changes
-in the data used for filling char-script-table, see characters.el
-around line 1300.  Other databases and settings in characters.el, such
-as the data for char-width-table, might also need changes.
+addition of codepoints to existing scripts, might need corresponding
+changes in the data used for filling the category-table, case-table,
+and char-width-table.  The additional scripts should cause automatic
+updates in charscript.el, but it is a good idea to look at the results
+and see if any changes in admin/unidata/blocks.awk are required.
 
 Any new scripts added by UnicodeData.txt will also need updates to
 script-representative-chars defined in fontset.el.  Other databases in
@@ -39,7 +40,7 @@ fontset.el might also need to be updated as needed.
 Problems, fixmes and other unicode-related issues
 -------------------------------------------------------------
 
-Notes by fx to record various things of variable importance.  handa
+Notes by fx to record various things of variable importance.  Handa
 needs to check them -- don't take too seriously, especially with
 regard to completeness.
 
diff --git a/admin/quick-install-emacs b/admin/quick-install-emacs
index 55510fb..4de7416 100755
--- a/admin/quick-install-emacs
+++ b/admin/quick-install-emacs
@@ -121,11 +121,11 @@ EOF
     -[!-]?*)
       # split concatenated single-letter options apart
       FIRST="$1"; shift
-      set -- `echo $FIRST | sed 's/-\(.\)\(.*\)/-\1 -\2/'` "$@"
+      set -- `printf '%s\n' "$FIRST" | sed 's/-\(.\)\(.*\)/-\1 -\2/'` "$@"
       ;;
     -*)
-      echo 1>&2 "$me: unrecognized option '$1'"
-      echo 1>&2 "$TRY"
+      printf '%s\n' >&2 "$me: unrecognized option '$1'"
+      printf '%s\n' >&2 "$TRY"
       exit 1
       ;;
     *)
@@ -140,17 +140,18 @@ case $# in
   1) BUILD="$1";;
   2) BUILD="$1"; prefix="$2";;
   *)
-    echo 1>&2 "$USAGE"
-    echo 1>&2 "$TRY"
+    printf '%s\n' >&2 "$USAGE"
+    printf '%s\n' >&2 "$TRY"
     exit 1
     ;;
 esac
 
 if test ! -d "$BUILD"; then
-  echo 1>&2 "$me: $BUILD: Build tree not found"
+  printf '%s\n' >&2 "$me: $BUILD: Build tree not found"
   exit 2
 elif test ! -r "$BUILD/config.status"; then
-  echo 1>&2 "$me: $BUILD: Not a proper build tree, config.status not found"
+  printf '%s\n' >&2 \
+    "$me: $BUILD: Not a proper build tree, config.status not found"
   exit 2
 fi
 
@@ -160,7 +161,8 @@ get_config_var ()
   { sed -n "s/^S[[]\"$1\"[]]=\"\([^\"]*\)\"/\1/p" $CONFIG_STATUS | sed q | 
grep ''; } ||
   { sed -n "s/^s\(.\)@address@hidden(|#_!!_#|\)*\(.*\)\1.*$/\3/p" 
$CONFIG_STATUS | sed q | grep ''; } ||
   {
-    echo 1>&2 "$me: $1: Configuration variable not found in $CONFIG_STATUS"
+    printf '%s\n' >&2 \
+      "$me: $1: Configuration variable not found in $CONFIG_STATUS"
     exit 4
   }
 }
@@ -172,7 +174,7 @@ test x"$ARCH" = x && { ARCH="`get_config_var host`" || exit 
4 ; }
 VERSION=`
   sed -n 's/^AC_INIT(emacs,[    ]*\([^  )]*\).*/\1/p' <$SRC/configure.ac
 ` || exit 4
-test -n "$VERSION" || { echo >&2 "$me: no version in configure.ac"; exit 4; }
+test -n "$VERSION" || { printf '%s\n' >&2 "$me: no version in configure.ac"; 
exit 4; }
 
 DST_SHARE="$prefix/share/emacs/$VERSION"
 DST_BIN="$prefix/bin"
@@ -209,7 +211,7 @@ maybe_mkdir "$DST_INFO"
 PRUNED=""
 if test x"$PRUNE" != xno; then
   for D in `ls -1t $BUILD/src/emacs-$VERSION.* | sed 1d`; do
-    echo $REMOVE_CMD $D
+    printf '%s\n' "$REMOVE_CMD $D"
     PRUNED="$PRUNED $D"
   done
 fi
@@ -219,7 +221,7 @@ test x"$PRUNE" = xonly && exit 0
 maybe_emit_copy ()
 {
   if test "$FORCE" = yes || ! cmp -s $1 $2; then
-    echo $LINK_CMD $1 $2
+    printf '%s\n' "$LINK_CMD $1 $2"
   fi
 }
 
@@ -240,7 +242,7 @@ for SUBDIR in lisp leim etc lib-src info; do
   # defaults
   SHARED=no
   FORCED=''
-  AVOID_PAT="`echo "($AVOID)" | tr ' ' '|'`"
+  AVOID_PAT="`printf '%s\n' "($AVOID)" | tr ' ' '|'`"
 
   # Set subdir-specific values
   case $SUBDIR in
@@ -255,7 +257,7 @@ for SUBDIR in lisp leim etc lib-src info; do
       ;;
     lib-src)
       DST="$DST_LIBEXEC"
-      AVOID_PAT="`echo "($AVOID ($PUBLIC_LIBSRC_BINARIES)\$)" | tr ' ' '|'`"
+      AVOID_PAT="`printf '%s\n' "($AVOID ($PUBLIC_LIBSRC_BINARIES)\$)" | tr ' 
' '|'`"
       ;;
     info)
       DST="$DST_INFO"
@@ -267,10 +269,10 @@ for SUBDIR in lisp leim etc lib-src info; do
     if [ -d $PFX/$SUBDIR ]; then
       for DIR in `(cd $PFX/$SUBDIR; find . -type d -print | sed 
'address@hidden/@@')`; do
        if [ -d $DST/$DIR ]; then
-         echo Directory $DST/$DIR exists
+         printf '%s\n' "Directory $DST/$DIR exists"
        else
-         echo Directory $DST/$DIR non-existent
-         if [ "`echo $DIR | egrep -v "$AVOID_PAT"`" ]; then
+         printf '%s\n' "Directory $DST/$DIR non-existent"
+         if [ "`printf '%s\n' "$DIR" | grep -Ev "$AVOID_PAT"`" ]; then
            maybe_mkdir $DST/$DIR
          fi
        fi
diff --git a/build-aux/gitlog-to-emacslog b/build-aux/gitlog-to-emacslog
index 51ef2a7..3d61ba1 100755
--- a/build-aux/gitlog-to-emacslog
+++ b/build-aux/gitlog-to-emacslog
@@ -35,14 +35,14 @@ while [ $# -gt 0 ]; do
       -f|--force) force=1 ;;
       -n|--nmax) nmax="$2"; shift ;;
       -o|--output) output="$2" ; shift ;;
-      *) echo "Unrecognized argument: $1" >&2; exit 1 ;;
+      *) printf '%s\n' "Unrecognized argument: $1" >&2; exit 1 ;;
   esac
   shift
 done
 
 if [ ! -f ChangeLog.$nmax ]; then
-    echo "Can't find ChangeLog.$nmax" >&2
-    echo "Must be run from the top source directory" >&2
+    printf '%s\n' "Can't find ChangeLog.$nmax" >&2
+    printf '%s\n' "Must be run from the top source directory" >&2
     exit 1
 fi
 
@@ -52,7 +52,7 @@ fi
     gen_origin_line=`
       grep -E '^commit [0-9a-f]+ [(]inclusive[)]' ChangeLog.$nmax
     ` || {
-       echo "ChangeLog.$nmax lacks a 'commit ... (inclusive)' line" >&2
+       printf '%s\n' "ChangeLog.$nmax lacks a 'commit ... (inclusive)' line" 
>&2
        exit 1
     }
     set $gen_origin_line
@@ -63,7 +63,7 @@ fi
 new_origin=`git log --pretty=format:%H 'HEAD^!'` || exit
 
 if [ -f "$output" ]; then
-    [ ! "$force" ] && echo "$output exists" >&2 && exit 1
+    [ ! "$force" ] && printf '%s\n' "$output exists" >&2 && exit 1
     rm -f "$output" || exit 1
 fi
 
diff --git a/configure.ac b/configure.ac
index 51f4fc6..ac4d76f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -158,14 +158,14 @@ case $host in
       fi
       cc_target=`$cc -v 2>&1 | sed -n 's/Target: //p'`
       case "$cc_target" in
-          *-*) host=$cc_target
+         *-*) host=$cc_target
              ;;
-          "") AC_MSG_ERROR([Impossible to obtain $cc compiler target.
+         "") AC_MSG_ERROR([Impossible to obtain $cc compiler target.
 Please explicitly provide --host.])
-              ;;
+             ;;
          *) AC_MSG_WARN([Compiler reported non-standard target.
 Defaulting to $host.])
-              ;;
+             ;;
       esac
       AC_MSG_RESULT([$host])
   fi
@@ -404,7 +404,7 @@ gamegroup=
 case ${with_gameuser} in
   no) ;;
   "" | yes) gamegroup=games ;;
-  :*) gamegroup=`echo "${with_gameuser}" | sed -e "s/://"` ;;
+  :*) gamegroup=${with_gameuser#:} ;;
   *) gameuser=${with_gameuser} ;;
 esac
 
@@ -420,14 +420,14 @@ test "X$GNUSTEP_CONFIG_FILE" = "X" && \
 
 AC_ARG_ENABLE(ns-self-contained,
 [AS_HELP_STRING([--disable-ns-self-contained],
-                [disable self contained build under NeXTstep])],
+               [disable self contained build under NeXTstep])],
    EN_NS_SELF_CONTAINED=$enableval,
    EN_NS_SELF_CONTAINED=yes)
 
 locallisppathset=no
 AC_ARG_ENABLE(locallisppath,
 [AS_HELP_STRING([--enable-locallisppath=PATH],
-                [directories Emacs should search for lisp files specific
+               [directories Emacs should search for lisp files specific
                 to this site])],
 if test "${enableval}" = "no"; then
   locallisppath=
@@ -443,7 +443,7 @@ AC_ARG_ENABLE(checking,
                 Flags are: stringbytes, stringoverrun, stringfreelist,
                 xmallocoverrun, conslist, glyphs])],
 [ac_checking_flags="${enableval}"],[])
-IFS="${IFS=    }"; ac_save_IFS="$IFS"; IFS="$IFS,"
+IFS="${IFS=    }"; ac_save_IFS="$IFS"; IFS="$IFS,"
 for check in $ac_checking_flags
 do
        case $check in
@@ -451,17 +451,17 @@ do
        yes)            ac_enable_checking=1 ;;
        no)             ac_enable_checking= ;
                        ac_gc_check_stringbytes= ;
-                       ac_gc_check_string_overrun= ;
-                       ac_gc_check_string_free_list= ;
-                       ac_xmalloc_overrun= ;
-                       ac_gc_check_cons_list= ;
+                       ac_gc_check_string_overrun= ;
+                       ac_gc_check_string_free_list= ;
+                       ac_xmalloc_overrun= ;
+                       ac_gc_check_cons_list= ;
                        ac_glyphs_debug= ;;
        all)            ac_enable_checking=1 ;
                        ac_gc_check_stringbytes=1 ;
-                       ac_gc_check_string_overrun=1 ;
-                       ac_gc_check_string_free_list=1 ;
-                       ac_xmalloc_overrun=1 ;
-                       ac_gc_check_cons_list=1 ;
+                       ac_gc_check_string_overrun=1 ;
+                       ac_gc_check_string_free_list=1 ;
+                       ac_xmalloc_overrun=1 ;
+                       ac_gc_check_cons_list=1 ;
                        ac_glyphs_debug=1 ;;
        # these enable particular checks
        stringbytes)    ac_gc_check_stringbytes=1 ;;
@@ -508,7 +508,7 @@ fi
 
 AC_ARG_ENABLE(check-lisp-object-type,
 [AS_HELP_STRING([--enable-check-lisp-object-type],
-                [enable compile time checks for the Lisp_Object data type.
+               [enable compile time checks for the Lisp_Object data type.
                This is useful for development for catching certain types of 
bugs.])],
 if test "${enableval}" != "no"; then
    AC_DEFINE(CHECK_LISP_OBJECT_TYPE, 1,
@@ -523,8 +523,8 @@ dnl 
http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00393.html
 AC_ARG_ENABLE(profiling,
 [AS_HELP_STRING([--enable-profiling],
                [build emacs with low-level, gprof profiling support.
-                Mainly useful for debugging Emacs itself.  May not work on
-                all platforms.  Stops profiler.el working.])],
+               Mainly useful for debugging Emacs itself.  May not work on
+               all platforms.  Stops profiler.el working.])],
 [ac_enable_profiling="${enableval}"],[])
 if test x$ac_enable_profiling != x ; then
    PROFILING_CFLAGS="-DPROFILING=1 -pg"
@@ -839,7 +839,7 @@ if test "$ac_test_CFLAGS" != set; then
       test -z "$CFLAGS" || CFLAGS="$CFLAGS "
       CFLAGS=${CFLAGS}-O
       AC_CACHE_CHECK([whether $CC accepts -O],
-        [emacs_cv_prog_cc_o],
+       [emacs_cv_prog_cc_o],
        [AC_LINK_IFELSE([AC_LANG_PROGRAM()],
           [emacs_cv_prog_cc_o=yes],
           [emacs_cv_prog_cc_o=no])])
@@ -851,7 +851,7 @@ fi
 
 AC_ARG_ENABLE([gcc-warnings],
   [AS_HELP_STRING([--enable-gcc-warnings],
-                  [turn on lots of GCC warnings/errors. This is intended for
+                 [turn on lots of GCC warnings/errors. This is intended for
                   developers, and may generate false alarms when used
                   with older or non-GNU development tools.])],
   [case $enableval in
@@ -869,7 +869,7 @@ AC_CACHE_CHECK([whether the compiler is clang], 
[emacs_cv_clang],
          #ifndef __clang__
            error "not clang";
          #endif
-        ]])],
+       ]])],
      [emacs_cv_clang=yes],
      [emacs_cv_clang=no])])
 
@@ -911,7 +911,7 @@ else
   nw="$nw -Winline"                 # OK to ignore 'inline'
   nw="$nw -Wjump-misses-init"       # We sometimes safely jump over init.
   nw="$nw -Wstrict-overflow"        # OK to optimize assuming that
-                                    # signed overflow has undefined behavior
+                                   # signed overflow has undefined behavior
   nw="$nw -Wsync-nand"              # irrelevant here, and provokes ObjC 
warning
   nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
   nw="$nw -Wbad-function-cast"      # These casts are no worse than others.
@@ -971,7 +971,7 @@ else
   [/* Enable compile-time and run-time bounds-checking, and some warnings,
       without upsetting glibc 2.15+. */
    #if (defined GNULIB_PORTCHECK && !defined _FORTIFY_SOURCE \
-        && defined __OPTIMIZE__ && __OPTIMIZE__)
+       && defined __OPTIMIZE__ && __OPTIMIZE__)
    # define _FORTIFY_SOURCE 2
    #endif
   ])
@@ -994,7 +994,7 @@ edit_cflags="
 
 AC_ARG_ENABLE(link-time-optimization,
 [AS_HELP_STRING([--enable-link-time-optimization],
-                [build emacs with link-time optimization.
+               [build emacs with link-time optimization.
                 This requires GCC 4.5.0 or later, or clang.
                 (Note that clang support is experimental - see INSTALL.)
                 It also makes Emacs harder to debug, and when we tried it
@@ -1025,8 +1025,8 @@ if test "${enableval}" != "no"; then
       old_CFLAGS=$CFLAGS
       CFLAGS="$CFLAGS $LTO"
       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
-         [ac_lto_supported=yes], [ac_lto_supported=no])
-         CFLAGS="$old_CFLAGS"
+        [ac_lto_supported=yes], [ac_lto_supported=no])
+        CFLAGS="$old_CFLAGS"
    fi
    AC_MSG_RESULT([$ac_lto_supported])
    if test "$ac_lto_supported" = "yes"; then
@@ -1038,12 +1038,12 @@ if test "${enableval}" != "no"; then
         ARFLAGS="cru --plugin $GOLD_PLUGIN"
         RANLIB="$RANLIB --plugin $GOLD_PLUGIN"
       else
-        dnl The following is needed for GCC 4.9.0.  The GCC 4.9.0 release notes
-        dnl suggest that instead of -ffat-lto-objects we should use gcc-ar and
-        dnl gcc-ranlib in place of ar and ranlib, but gcc-ar makes /usr/bin/ar
-        dnl dump core on Fedora 20, so play it safe for now.
-        gl_COMPILER_OPTION_IF([-ffat-lto-objects],
-          [CFLAGS="$CFLAGS -ffat-lto-objects"])
+       dnl The following is needed for GCC 4.9.0.  The GCC 4.9.0 release notes
+       dnl suggest that instead of -ffat-lto-objects we should use gcc-ar and
+       dnl gcc-ranlib in place of ar and ranlib, but gcc-ar makes /usr/bin/ar
+       dnl dump core on Fedora 20, so play it safe for now.
+       gl_COMPILER_OPTION_IF([-ffat-lto-objects],
+         [CFLAGS="$CFLAGS -ffat-lto-objects"])
       fi
    fi
 fi)
@@ -1543,17 +1543,17 @@ if test "${with_sound}" != "no"; then
       CFLAGS="$ALSA_CFLAGS $CFLAGS"
       LIBS="$ALSA_LIBS $LIBS"
       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <asoundlib.h>]], 
[[snd_lib_error_set_handler (0);]])],
-                      emacs_alsa_normal=yes,
-                   emacs_alsa_normal=no)
+                     emacs_alsa_normal=yes,
+                   emacs_alsa_normal=no)
       if test "$emacs_alsa_normal" != yes; then
-        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <alsa/asoundlib.h>]],
-                       [[snd_lib_error_set_handler (0);]])],
-                       emacs_alsa_subdir=yes,
-                    emacs_alsa_subdir=no)
-        if test "$emacs_alsa_subdir" != yes; then
-          AC_MSG_ERROR([pkg-config found alsa, but it does not compile.  See 
config.log for error messages.])
-        fi
-        ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
+       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <alsa/asoundlib.h>]],
+                      [[snd_lib_error_set_handler (0);]])],
+                      emacs_alsa_subdir=yes,
+                    emacs_alsa_subdir=no)
+       if test "$emacs_alsa_subdir" != yes; then
+         AC_MSG_ERROR([pkg-config found alsa, but it does not compile.  See 
config.log for error messages.])
+       fi
+       ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
       fi
 
       CFLAGS="$SAVE_CFLAGS"
@@ -1576,9 +1576,9 @@ if test "${with_sound}" != "no"; then
        dnl defined __FreeBSD__ || defined __NetBSD__ || defined __linux__
        dnl Adjust the --with-sound help text if you change this.
        gnu-linux|freebsd|netbsd|mingw32|cygwin)
-         AC_DEFINE(HAVE_SOUND, 1, [Define to 1 if you have sound support.])
-         HAVE_SOUND=yes
-         ;;
+        AC_DEFINE(HAVE_SOUND, 1, [Define to 1 if you have sound support.])
+        HAVE_SOUND=yes
+        ;;
      esac
   fi
 
@@ -1595,13 +1595,13 @@ AC_CHECK_HEADERS_ONCE(
 
 AC_MSG_CHECKING(if personality LINUX32 can be set)
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/personality.h>]], 
[[personality (PER_LINUX32)]])],
-               emacs_cv_personality_linux32=yes,
+              emacs_cv_personality_linux32=yes,
               emacs_cv_personality_linux32=no)
 AC_MSG_RESULT($emacs_cv_personality_linux32)
 
 if test $emacs_cv_personality_linux32 = yes; then
   AC_DEFINE(HAVE_PERSONALITY_LINUX32, 1,
-            [Define to 1 if personality LINUX32 can be set.])
+           [Define to 1 if personality LINUX32 can be set.])
 fi
 
 # Note that Solaris has sys/sysinfo.h which defines struct
@@ -1610,17 +1610,17 @@ fi
 if test "$ac_cv_header_sys_sysinfo_h" = yes; then
   AC_MSG_CHECKING([if Linux sysinfo may be used])
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/sysinfo.h>]],
-                                     [[struct sysinfo si;
-                                       si.totalram = 0;
-                                       sysinfo (&si)]])],
+                                    [[struct sysinfo si;
+                                      si.totalram = 0;
+                                      sysinfo (&si)]])],
     emacs_cv_linux_sysinfo=yes, emacs_cv_linux_sysinfo=no)
   AC_MSG_RESULT($emacs_cv_linux_sysinfo)
   if test $emacs_cv_linux_sysinfo = yes; then
     AC_DEFINE([HAVE_LINUX_SYSINFO], 1, [Define to 1 if you have Linux sysinfo 
function.])
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/sysinfo.h>]],
-                                       [[struct sysinfo si; return 
si.mem_unit]])],
+                                      [[struct sysinfo si; return 
si.mem_unit]])],
       AC_DEFINE(LINUX_SYSINFO_UNIT, 1,
-                [Define to 1 if Linux sysinfo sizes are in multiples of 
mem_unit bytes.]))
+               [Define to 1 if Linux sysinfo sizes are in multiples of 
mem_unit bytes.]))
   fi
 fi
 
@@ -1629,11 +1629,11 @@ dnl it doesn't define 'bool'.
 AC_CHECK_HEADERS(term.h, , , -)
 AC_HEADER_TIME
 AC_CHECK_DECLS([sys_siglist], [], [], [[#include <signal.h>
-                                     ]])
+                                     ]])
 if test $ac_cv_have_decl_sys_siglist != yes; then
   # For Tru64, at least:
   AC_CHECK_DECLS([__sys_siglist], [], [], [[#include <signal.h>
-                                         ]])
+                                         ]])
 fi
 AC_HEADER_SYS_WAIT
 
@@ -1705,15 +1705,17 @@ fi
 LD_SWITCH_X_SITE_RPATH=
 if test "${x_libraries}" != NONE; then
   if test -n "${x_libraries}"; then
-    LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
-    LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ 
-Wl,-rpath,/g"`
+    LD_SWITCH_X_SITE=-L`AS_ECHO(["$x_libraries"]) | sed -e 's/:/ -L/g'`
+    LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`
+      AS_ECHO(["$x_libraries"]) | sed -e 's/:/ -Wl,-rpath,/g'
+    `
   fi
   x_default_search_path=""
   x_search_path=${x_libraries}
   if test -z "${x_search_path}"; then
     x_search_path=/usr/lib
   fi
-  for x_library in `echo ${x_search_path}: | \
+  for x_library in `AS_ECHO(["$x_search_path:"]) | \
                    sed -e "s/:/ /g" -e p -e "s:/lib[[^ /]]* :/share :g"`; do
     x_search_path="\
 ${x_library}/X11/%L/%T/%N%C%S:\
@@ -1732,15 +1734,15 @@ fi
 AC_SUBST(LD_SWITCH_X_SITE_RPATH)
 
 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
-  C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
+  C_SWITCH_X_SITE=$isystem`AS_ECHO(["$x_includes"]) | sed -e "s/:/ $isystem/g"`
 fi
 
 if test x"${x_includes}" = x; then
   bitmapdir=/usr/include/X11/bitmaps
 else
   # accumulate include directories that have X11 bitmap subdirectories
-  bmd_acc="dummyval"
-  for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
+  bmd_acc=
+  for bmd in `AS_ECHO(["$x_includes"]) | sed -e 's/:/ /g'`; do
     if test -d "${bmd}/X11/bitmaps"; then
       bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
     fi
@@ -1748,9 +1750,7 @@ else
       bmd_acc="${bmd_acc}:${bmd}/bitmaps"
     fi
   done
-  if test ${bmd_acc} != "dummyval"; then
-    bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
-  fi
+  bitmapdir=${bmdacc#:}
 fi
 
 test "${with_ns}" = maybe && test "${opsys}" != darwin && with_ns=no
@@ -1780,11 +1780,23 @@ if test "${with_ns}" != no; then
   elif test -f $GNUSTEP_CONFIG_FILE; then
      NS_IMPL_GNUSTEP=yes
      dnl FIXME sourcing this several times in subshells seems inefficient.
-     GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo 
$GNUSTEP_SYSTEM_HEADERS)"
-     GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo 
$GNUSTEP_SYSTEM_LIBRARIES)"
+     GNUSTEP_SYSTEM_HEADERS=$(
+       . $GNUSTEP_CONFIG_FILE
+       AS_ECHO(["$GNUSTEP_SYSTEM_HEADERS"])
+     )
+     GNUSTEP_SYSTEM_LIBRARIES=$(
+       . $GNUSTEP_CONFIG_FILE
+       AS_ECHO(["$GNUSTEP_SYSTEM_LIBRARIES"])
+     )
      dnl I seemed to need these as well with GNUstep-startup 0.25.
-     GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo 
$GNUSTEP_LOCAL_HEADERS)"
-     GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo 
$GNUSTEP_LOCAL_LIBRARIES)"
+     GNUSTEP_LOCAL_HEADERS=$(
+       . $GNUSTEP_CONFIG_FILE
+       AS_ECHO(["$GNUSTEP_LOCAL_HEADERS"])
+     )
+     GNUSTEP_LOCAL_LIBRARIES=$(
+       . $GNUSTEP_CONFIG_FILE
+       AS_ECHO(["$GNUSTEP_LOCAL_LIBRARIES"])
+     )
      test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
        GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
      test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
@@ -1807,7 +1819,7 @@ fail;
      if test $emacs_cv_objc_exceptions = yes; then
        dnl _NATIVE_OBJC_EXCEPTIONS is used by the GNUstep headers.
        AC_DEFINE(_NATIVE_OBJC_EXCEPTIONS, 1,
-         [Define if GNUstep uses ObjC exceptions.])
+        [Define if GNUstep uses ObjC exceptions.])
        GNU_OBJC_CFLAGS="-fobjc-exceptions"
      fi
   fi
@@ -1832,7 +1844,7 @@ Either fix this, or re-configure with the option 
'--without-ns'.])])
   if test "${NS_IMPL_COCOA}" = "yes"; then
     AC_MSG_CHECKING([for OSX 10.6 or newer])
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AppKit/AppKit.h>],
-                                     [
+                                    [
 #ifdef MAC_OS_X_VERSION_MAX_ALLOWED
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
  ; /* OK */
@@ -1904,8 +1916,8 @@ if test "${with_w32}" != no; then
   case "${opsys}" in
     cygwin)
       AC_CHECK_HEADER([windows.h], [HAVE_W32=yes],
-             [AC_MSG_ERROR(['--with-w32' was specified, but windows.h
-                   cannot be found.])])
+            [AC_MSG_ERROR(['--with-w32' was specified, but windows.h
+                  cannot be found.])])
     ;;
     mingw32)
     ## Using --with-w32 with MinGW is a no-op, but we allow it.
@@ -1945,7 +1957,7 @@ if test "${HAVE_W32}" = "yes"; then
     AC_MSG_ERROR([Non-toolkit scroll bars are not implemented for w32 build.])
   fi
   AC_CHECK_TOOL(WINDRES, [windres],
-                [AC_MSG_ERROR([No resource compiler found.])])
+               [AC_MSG_ERROR([No resource compiler found.])])
   W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
   W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
   EMACSRES="emacs.res"
@@ -2032,16 +2044,16 @@ case "${window_system}" in
       athena | lucid ) USE_X_TOOLKIT=LUCID ;;
       motif ) USE_X_TOOLKIT=MOTIF ;;
       gtk ) with_gtk=yes
-            term_header=gtkutil.h
+           term_header=gtkutil.h
 dnl Don't set this for GTK.  A lot of tests below assumes Xt when
 dnl USE_X_TOOLKIT is set.
-            USE_X_TOOLKIT=none ;;
+           USE_X_TOOLKIT=none ;;
       gtk2 ) with_gtk2=yes
-             term_header=gtkutil.h
-             USE_X_TOOLKIT=none ;;
+            term_header=gtkutil.h
+            USE_X_TOOLKIT=none ;;
       gtk3 ) with_gtk3=yes
-             term_header=gtkutil.h
-             USE_X_TOOLKIT=none ;;
+            term_header=gtkutil.h
+            USE_X_TOOLKIT=none ;;
       no ) USE_X_TOOLKIT=none ;;
 dnl If user did not say whether to use a toolkit, make this decision later:
 dnl use the toolkit if we have gtk, or X11R5 or newer.
@@ -2060,8 +2072,12 @@ if test "$window_system" = none && test "X$with_x" != 
"Xno"; then
    AC_CHECK_PROG(HAVE_XSERVER, X, true, false)
    if test "$HAVE_XSERVER" = true ||
       test -n "$DISPLAY" ||
-      test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
-        AC_MSG_ERROR([You seem to be running X, but no X development libraries
+      {
+       for emacs_libX11 in /usr/lib/libX11.*; do break; done
+       test "$emacs_libX11" != '/usr/lib/libX11.*'
+      }
+   then
+       AC_MSG_ERROR([You seem to be running X, but no X development libraries
 were found.  You should install the relevant development files for X
 and for the toolkit you want, such as Gtk+ or Motif.  Also make
 sure you have development files for image handling, i.e.
@@ -2294,11 +2310,11 @@ if test "${HAVE_X11}" = "yes"; then
       if test "${xgnu_linux_second_failure}" = "yes"; then
        # If we get the same failure with -b, there is no use adding -b.
        # So leave it out.  This plays safe.
-        AC_MSG_RESULT(no)
+       AC_MSG_RESULT(no)
       else
        LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
        C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
-        AC_MSG_RESULT(yes)
+       AC_MSG_RESULT(yes)
       fi
       CPPFLAGS=$OLD_CPPFLAGS
       LIBS=$OLD_LIBS
@@ -2341,8 +2357,8 @@ fail;
     case "$opsys" in
       sol2-*) : ;;
       *) AC_DEFINE(HAVE_X11R6_XIM, 1,
-           [Define if you have usable X11R6-style XIM support.])
-         ;;
+          [Define if you have usable X11R6-style XIM support.])
+        ;;
     esac
   else
     AC_MSG_RESULT(before 6)
@@ -2516,7 +2532,7 @@ if test "${HAVE_GTK}" = "yes"; then
   dnl  AC_CHECK_DECL checks for a macro, so check for GTK_TYPE_FILE_SELECTION.
   HAVE_GTK_FILE_SELECTION=no
   AC_CHECK_DECL(GTK_TYPE_FILE_SELECTION, HAVE_GTK_FILE_SELECTION=yes,
-                   HAVE_GTK_FILE_SELECTION=no, [AC_INCLUDES_DEFAULT
+                  HAVE_GTK_FILE_SELECTION=no, [AC_INCLUDES_DEFAULT
 #include <gtk/gtk.h>])
   if test "$HAVE_GTK_FILE_SELECTION" = yes; then
     AC_CHECK_FUNCS(gtk_file_selection_new)
@@ -2525,7 +2541,7 @@ if test "${HAVE_GTK}" = "yes"; then
   dnl Same as above for gtk_handle_box.
   HAVE_GTK_HANDLE_BOX=no
   AC_CHECK_DECL(GTK_TYPE_HANDLE_BOX, HAVE_GTK_HANDLE_BOX=yes,
-                   HAVE_GTK_HANDLE_BOX=no, [AC_INCLUDES_DEFAULT
+                  HAVE_GTK_HANDLE_BOX=no, [AC_INCLUDES_DEFAULT
 #include <gtk/gtk.h>])
   if test "$HAVE_GTK_HANDLE_BOX" = yes; then
     AC_CHECK_FUNCS(gtk_handle_box_new)
@@ -2534,7 +2550,7 @@ if test "${HAVE_GTK}" = "yes"; then
   dnl Same as above for gtk_tearoff_menu_item.
   HAVE_GTK_TEAROFF_MENU_ITEM=no
   AC_CHECK_DECL(GTK_TYPE_TEAROFF_MENU_ITEM, HAVE_GTK_TEAROFF_MENU_ITEM=yes,
-                   HAVE_GTK_TEAROFF_MENU_ITEM=no, [AC_INCLUDES_DEFAULT
+                  HAVE_GTK_TEAROFF_MENU_ITEM=no, [AC_INCLUDES_DEFAULT
 #include <gtk/gtk.h>])
   if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then
     AC_CHECK_FUNCS(gtk_tearoff_menu_item_new)
@@ -2542,9 +2558,9 @@ if test "${HAVE_GTK}" = "yes"; then
 
   dnl Check for functions introduced in 2.14 and later.
   AC_CHECK_FUNCS(gtk_widget_get_window gtk_widget_set_has_window \
-                 gtk_dialog_get_action_area gtk_widget_get_sensitive \
-                 gtk_widget_get_mapped gtk_adjustment_get_page_size \
-                 gtk_orientable_set_orientation \
+                gtk_dialog_get_action_area gtk_widget_get_sensitive \
+                gtk_widget_get_mapped gtk_adjustment_get_page_size \
+                gtk_orientable_set_orientation \
                 gtk_window_set_has_resize_grip)
 
  term_header=gtkutil.h
@@ -2571,7 +2587,7 @@ then
   if test "${with_gtk3}" = "yes"; then
     PKG_CHECK_MODULES(WEBKIT, $WEBKIT_MODULES, HAVE_WEBKIT=yes, HAVE_WEBKIT=no)
     if test $HAVE_WEBKIT = yes; then
-        AC_DEFINE([HAVE_WEBKIT_OSR], 1,
+       AC_DEFINE([HAVE_WEBKIT_OSR], 1,
          [Define to 1 if you have webkit_osr support.])
     fi
   fi
@@ -2605,7 +2621,7 @@ if test "${with_dbus}" = "yes"; then
      AC_CHECK_FUNCS(dbus_watch_get_unix_fd \
                    dbus_type_is_valid \
                    dbus_validate_bus_name \
-                    dbus_validate_path \
+                   dbus_validate_path \
                    dbus_validate_interface \
                    dbus_validate_member)
      LIBS=$OLD_LIBS
@@ -2627,7 +2643,7 @@ if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" 
= "yes"; then
       LIBS="$LIBS $GSETTINGS_LIBS"
       AC_MSG_CHECKING([whether GSettings is in gio])
       AC_LINK_IFELSE(
-         [AC_LANG_PROGRAM(
+        [AC_LANG_PROGRAM(
             [[/* Check that gsettings really is present.  */
             #include <glib-object.h>
             #include <gio/gio.h>
@@ -2640,7 +2656,7 @@ if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" 
= "yes"; then
       AC_MSG_RESULT([$HAVE_GSETTINGS])
 
       if test "$HAVE_GSETTINGS" = "yes"; then
-        AC_DEFINE(HAVE_GSETTINGS, 1, [Define to 1 if using GSettings.])
+       AC_DEFINE(HAVE_GSETTINGS, 1, [Define to 1 if using GSettings.])
        SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
        SETTINGS_LIBS="$GSETTINGS_LIBS"
       fi
@@ -2786,7 +2802,7 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test 
x"${USE_X_TOOLKIT}" = xLUCID; then
 #include <X11/Xaw3d/Simple.h>]],
       [[]])],
       [AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb,
-                    emacs_cv_xaw3d=yes, emacs_cv_xaw3d=no)],
+                   emacs_cv_xaw3d=yes, emacs_cv_xaw3d=no)],
       emacs_cv_xaw3d=no)])
   else
     emacs_cv_xaw3d=no
@@ -2798,7 +2814,7 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test 
x"${USE_X_TOOLKIT}" = xLUCID; then
     HAVE_XAW3D=yes
     LUCID_LIBW=-lXaw3d
     AC_DEFINE(HAVE_XAW3D, 1,
-              [Define to 1 if you have the Xaw3d library (-lXaw3d).])
+             [Define to 1 if you have the Xaw3d library (-lXaw3d).])
   else
     AC_MSG_CHECKING(for xaw3d)
     AC_MSG_RESULT(no)
@@ -2992,13 +3008,13 @@ XPointer *client_data;
 /* If we're not using GCC, it's probably not XFree86, and this is
    probably right, but we can't use something like --pedantic-errors.  */
 extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
-                                           char*, XIMProc, XPointer*);
+                                          char*, XIMProc, XPointer*);
 #endif
 (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, 
callback,
    client_data);]])],
     [emacs_cv_arg6_star=yes])
   AH_TEMPLATE(XRegisterIMInstantiateCallback_arg6,
-         [Define to the type of the 6th arg of XRegisterIMInstantiateCallback,
+        [Define to the type of the 6th arg of XRegisterIMInstantiateCallback,
 either XPointer or XPointer*.])dnl
   if test "$emacs_cv_arg6_star" = yes; then
     AC_DEFINE(XRegisterIMInstantiateCallback_arg6, [XPointer*])
@@ -3042,7 +3058,7 @@ if test "${HAVE_X11}" = "yes"; then
        LIBS="$XFT_LIBS $LIBS"
        AC_CHECK_HEADER(X11/Xft/Xft.h,
          AC_CHECK_LIB(Xft, XftFontOpen, HAVE_XFT=yes, , $XFT_LIBS) , ,
-          [[#include <X11/X.h>]])
+         [[#include <X11/X.h>]])
 
        if test "${HAVE_XFT}" = "yes"; then
          AC_DEFINE(HAVE_XFT, 1, [Define to 1 if you have the Xft library.])
@@ -3163,12 +3179,12 @@ no_return_alloc_pixels
       ], HAVE_XPM=no, HAVE_XPM=yes)
 
       if test "${HAVE_XPM}" = "yes"; then
-        REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
+       REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
        AC_MSG_RESULT(yes)
       else
        AC_MSG_RESULT(no)
-        CPPFLAGS="$SAVE_CPPFLAGS"
-        LDFLAGS="$SAVE_LDFLAGS"
+       CPPFLAGS="$SAVE_CPPFLAGS"
+       LDFLAGS="$SAVE_LDFLAGS"
       fi
     fi
   fi
@@ -3239,7 +3255,7 @@ if test "${with_jpeg}" != "no"; then
      for emacs_cv_jpeglib in yes -ljpeg no; do
        case $emacs_cv_jpeglib in
         yes) ;;
-         no) break;;
+        no) break;;
         *) LIBS="$LIBS $emacs_cv_jpeglib";;
        esac
        AC_LINK_IFELSE(
@@ -3397,12 +3413,12 @@ if test "${opsys}" = "mingw32"; then
     AC_DEFINE(HAVE_GIF, 1, [Define to 1 if you have a gif (or ungif) library.])
   fi
 elif test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
-        || test "${HAVE_W32}" = "yes"; then
+       || test "${HAVE_W32}" = "yes"; then
   AC_CHECK_HEADER(gif_lib.h,
 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
 # Earlier versions can crash Emacs, but version 5.0 removes 
EGifPutExtensionLast.
     [AC_CHECK_LIB(gif, GifMakeMapObject, HAVE_GIF=yes,
-        [AC_CHECK_LIB(gif, EGifPutExtensionLast, HAVE_GIF=yes, 
HAVE_GIF=maybe)])])
+       [AC_CHECK_LIB(gif, EGifPutExtensionLast, HAVE_GIF=yes, 
HAVE_GIF=maybe)])])
 
   if test "$HAVE_GIF" = yes; then
     LIBGIF=-lgif
@@ -3591,7 +3607,7 @@ if test "${with_xml2}" != "no"; then
   if test "${HAVE_LIBXML2}" = "yes"; then
     if test "${opsys}" != "mingw32"; then
       AC_CHECK_LIB(xml2, htmlReadMemory, HAVE_LIBXML2=yes, HAVE_LIBXML2=no,
-        [$LIBXML2_LIBS])
+       [$LIBXML2_LIBS])
     else
       LIBXML2_LIBS=""
     fi
@@ -3646,7 +3662,7 @@ else
   dnl This works for files generally, not just executables.
   dnl Should we look elsewhere for it?  Maybe examine /etc/ld.so.conf?
   AC_CHECK_PROG(liblockfile, liblockfile.so, yes, no,
-                /usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH)
+               /usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH)
   if test $ac_cv_prog_liblockfile = yes; then
     AC_MSG_ERROR([Shared liblockfile found but can't link against it.
 This probably means that movemail could lose mail.
@@ -4001,8 +4017,8 @@ if test "${with_kerberos}" != no; then
     else
       AC_CHECK_LIB(des, des_cbc_encrypt, have_des=yes, have_des=no)
       if test $have_des = yes; then
-        DESLIB=-ldes
-        LIBS="$DESLIB $LIBS"
+       DESLIB=-ldes
+       LIBS="$DESLIB $LIBS"
       fi
     fi
     AC_CHECK_LIB(krb4, krb_get_cred, have_krb4=yes, have_krb4=no)
@@ -4012,8 +4028,8 @@ if test "${with_kerberos}" != no; then
     else
       AC_CHECK_LIB(krb, krb_get_cred, have_krb=yes, have_krb=no)
       if test $have_krb = yes; then
-        KRB4LIB=-lkrb
-        LIBS="$KRB4LIB $LIBS"
+       KRB4LIB=-lkrb
+       LIBS="$KRB4LIB $LIBS"
       fi
     fi
   fi
@@ -4021,7 +4037,7 @@ if test "${with_kerberos}" != no; then
   if test "${with_kerberos5}" != no; then
     AC_CHECK_HEADERS(krb5.h,
       [AC_CHECK_MEMBERS([krb5_error.text, krb5_error.e_text],,,
-                       [#include <krb5.h>])])
+                       [#include <krb5.h>])])
   else
     AC_CHECK_HEADERS(krb.h,,
                     [AC_CHECK_HEADERS(kerberosIV/krb.h,,
@@ -4400,14 +4416,14 @@ case $opsys in
       AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptyname = 0; sigset_t blocked; 
sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask 
(SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) 
ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if 
(!ptyname) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, 
"%s", ptyname); }])
       dnl if HAVE_POSIX_OPENPT
       if test "x$ac_cv_func_posix_openpt" = xyes; then
-        AC_DEFINE(PTY_OPEN, [do { fd = posix_openpt (O_RDWR | O_CLOEXEC | 
O_NOCTTY); if (fd < 0 && errno == EINVAL) fd = posix_openpt (O_RDWR | 
O_NOCTTY); } while (false)])
-        AC_DEFINE(PTY_NAME_SPRINTF, [])
+       AC_DEFINE(PTY_OPEN, [do { fd = posix_openpt (O_RDWR | O_CLOEXEC | 
O_NOCTTY); if (fd < 0 && errno == EINVAL) fd = posix_openpt (O_RDWR | 
O_NOCTTY); } while (false)])
+       AC_DEFINE(PTY_NAME_SPRINTF, [])
       dnl if HAVE_GETPT
       elif test "x$ac_cv_func_getpt" = xyes; then
-        AC_DEFINE(PTY_OPEN, [fd = getpt ()])
-        AC_DEFINE(PTY_NAME_SPRINTF, [])
+       AC_DEFINE(PTY_OPEN, [fd = getpt ()])
+       AC_DEFINE(PTY_NAME_SPRINTF, [])
       else
-        AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");])
+       AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");])
       fi
     else
       AC_DEFINE(FIRST_PTY_LETTER, ['p'])
@@ -4514,8 +4530,8 @@ case $opsys in
 # error "not ia64"
 #endif
       ]], [[]])], AC_DEFINE(GC_MARK_SECONDARY_STACK(),
-        [do { extern void *__libc_ia64_register_backing_store_base; 
__builtin_ia64_flushrs (); mark_memory 
(__libc_ia64_register_backing_store_base, __builtin_ia64_bsp ());} while 
(false)],
-        [Mark a secondary stack, like the register stack on the ia64.]), [])
+       [do { extern void *__libc_ia64_register_backing_store_base; 
__builtin_ia64_flushrs (); mark_memory 
(__libc_ia64_register_backing_store_base, __builtin_ia64_bsp ());} while 
(false)],
+       [Mark a secondary stack, like the register stack on the ia64.]), [])
     ;;
 
   hpux*)
@@ -4568,9 +4584,9 @@ AC_CACHE_CHECK([for _setjmp], [emacs_cv_func__setjmp],
   [AC_LINK_IFELSE(
      [AC_LANG_PROGRAM(
        [[#include <setjmp.h>
-         #ifdef __MINGW32__
-         # define _longjmp longjmp
-         #endif
+        #ifdef __MINGW32__
+        # define _longjmp longjmp
+        #endif
        ]],
        [[jmp_buf j;
         if (! _setjmp (j))
@@ -4588,7 +4604,7 @@ AC_CACHE_CHECK([for sigsetjmp], [emacs_cv_func_sigsetjmp],
        [[#include <setjmp.h>
        ]],
        [[sigjmp_buf j;
-         if (! sigsetjmp (j, 1))
+        if (! sigsetjmp (j, 1))
           siglongjmp (j, 1);]])],
      [emacs_cv_func_sigsetjmp=yes],
      [emacs_cv_func_sigsetjmp=no])])
@@ -4757,11 +4773,13 @@ CPPFLAGS="$REAL_CPPFLAGS"
 LIBS="$REAL_LIBS"
 
 ## Hack to detect a buggy GCC version.
-if test "x$GCC" = xyes \
-   && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
-   && test x"`echo $CFLAGS | grep '\-O@<:@23@:>@'`" != x \
-   && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
-   AC_MSG_ERROR([GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'.])
+if test "$GCC" = yes && \
+   $CC --version 2> /dev/null | grep 'gcc.* 4.5.0' >/dev/null; then
+  case $CFLAGS in
+    *-fno-optimize-sibling-calls*) ;;
+    *-O@<:@23@:>@*)
+      AC_MSG_ERROR([GCC 4.5.0 has problems compiling Emacs; see 
etc/PROBLEMS.]);;
+  esac
 fi
 
 version=$PACKAGE_VERSION
@@ -4816,7 +4834,7 @@ AC_SUBST(OTHER_FILES)
 
 if test -n "${term_header}"; then
     AC_DEFINE_UNQUOTED(TERM_HEADER, "${term_header}",
-        [Define to the header for the built-in window system.])
+       [Define to the header for the built-in window system.])
 fi
 
 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION,  "${canonical}",
@@ -4866,20 +4884,20 @@ if test "${USE_X_TOOLKIT}" != "none" ; then
     MOTIF_LIBW=-lXm
     case "$opsys" in
       gnu-linux)
-        ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is 
needed.
-        MOTIF_LIBW="$MOTIF_LIBW -lXpm"
-        ;;
+       ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
+       MOTIF_LIBW="$MOTIF_LIBW -lXpm"
+       ;;
 
       unixware)
-        ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
-        ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
-        MOTIF_LIBW="MOTIF_LIBW -lXimp"
-        ;;
+       ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
+       ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
+       MOTIF_LIBW="MOTIF_LIBW -lXimp"
+       ;;
 
       aix4-2)
-        ## address@hidden says -li18n is needed by -lXm.
-        MOTIF_LIBW="$MOTIF_LIBW -li18n"
-        ;;
+       ## address@hidden says -li18n is needed by -lXm.
+       MOTIF_LIBW="$MOTIF_LIBW -li18n"
+       ;;
     esac
     MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
   fi
@@ -5018,7 +5036,7 @@ LIBS=$SAVE_LIBS
 if test "${opsys}" = "mingw32"; then
   CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I \${abs_top_srcdir}/nt/inc"
   # Remove unneeded switches from the value of CC that goes to Makefiles
-  CC=`echo $CC | sed -e "s,$GCC_TEST_OPTIONS,,"`
+  CC=`AS_ECHO(["$CC"]) | sed -e "s,$GCC_TEST_OPTIONS,,"`
 fi
 
 case "$opsys" in
@@ -5038,7 +5056,7 @@ case "$opsys" in
    if test "$HAVE_NS" = "yes"; then
      libs_nsgui="-framework AppKit"
      if test "$NS_IMPL_COCOA" = "yes"; then
-        libs_nsgui="$libs_nsgui -framework IOKit"
+       libs_nsgui="$libs_nsgui -framework IOKit"
      fi
    else
      libs_nsgui=
@@ -5166,7 +5184,8 @@ else
   ACL_SUMMARY=no
 fi
 
-echo "
+emacs_standard_dirs='Standard dirs'
+AS_ECHO(["
 Configured for '${canonical}'.
 
   Where should the build process find the source code?    ${srcdir}
@@ -5175,18 +5194,9 @@ Configured for '${canonical}'.
   Should Emacs use a relocating allocator for buffers?    ${REL_ALLOC}
   Should Emacs use mmap(2) for buffer allocation?         $use_mmap_for_buffers
   What window system should Emacs use?                    ${window_system}
-  What toolkit should Emacs use?                          ${USE_X_TOOLKIT}"
-
-if test -n "${x_includes}"; then
-echo "  Where do we find X Windows header files?                ${x_includes}"
-else
-echo "  Where do we find X Windows header files?                Standard dirs"
-fi
-if test -n "${x_libraries}"; then
-echo "  Where do we find X Windows libraries?                   ${x_libraries}"
-else
-echo "  Where do we find X Windows libraries?                   Standard dirs"
-fi
+  What toolkit should Emacs use?                          ${USE_X_TOOLKIT}
+  Where do we find X Windows header files?                
${x_includes:-$emacs_standard_dirs}
+  Where do we find X Windows libraries?                   
${x_libraries:-$emacs_standard_dirs}"])
 
 optsep=
 emacs_config_features=
@@ -5204,10 +5214,10 @@ for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO 
IMAGEMAGICK SOUND GPM DBUS \
     esac
     case $opt in
       X_TOOLKIT)
-        case $val in
-          GTK*|LUCID|MOTIF) opt=$val ;;
-          *) continue ;;
-        esac
+       case $val in
+         GTK*|LUCID|MOTIF) opt=$val ;;
+         *) continue ;;
+       esac
       ;;
     esac
     AS_VAR_APPEND([emacs_config_features], ["$optsep$opt"])
@@ -5216,61 +5226,56 @@ done
 AC_DEFINE_UNQUOTED(EMACS_CONFIG_FEATURES, "${emacs_config_features}",
   [Summary of some of the main features enabled by configure.])
 
-echo "  Does Emacs use -lXaw3d?                                 ${HAVE_XAW3D}"
-echo "  Does Emacs use -lXpm?                                   ${HAVE_XPM}"
-echo "  Does Emacs use -ljpeg?                                  ${HAVE_JPEG}"
-echo "  Does Emacs use -ltiff?                                  ${HAVE_TIFF}"
-echo "  Does Emacs use a gif library?                           ${HAVE_GIF} 
$LIBGIF"
-echo "  Does Emacs use a png library?                           ${HAVE_PNG} 
$LIBPNG"
-echo "  Does Emacs use -lrsvg-2?                                ${HAVE_RSVG}"
-echo "  Does Emacs use cairo?                                   ${USE_CAIRO}"
-echo "  Does Emacs use imagemagick?                             
${HAVE_IMAGEMAGICK}"
-
-echo "  Does Emacs support sound?                               ${HAVE_SOUND}"
-
-echo "  Does Emacs use -lgpm?                                   ${HAVE_GPM}"
-echo "  Does Emacs use -ldbus?                                  ${HAVE_DBUS}"
-echo "  Does Emacs use -lgconf?                                 ${HAVE_GCONF}"
-echo "  Does Emacs use GSettings?                               
${HAVE_GSETTINGS}"
-echo "  Does Emacs use a file notification library?             
${NOTIFY_SUMMARY}"
-echo "  Does Emacs use access control lists?                    ${ACL_SUMMARY}"
-echo "  Does Emacs use -lselinux?                               
${HAVE_LIBSELINUX}"
-echo "  Does Emacs use -lgnutls?                                ${HAVE_GNUTLS}"
-echo "  Does Emacs use -lxml2?                                  
${HAVE_LIBXML2}"
-
-echo "  Does Emacs use -lfreetype?                              
${HAVE_FREETYPE}"
-echo "  Does Emacs use -lm17n-flt?                              
${HAVE_M17N_FLT}"
-echo "  Does Emacs use -lotf?                                   ${HAVE_LIBOTF}"
-echo "  Does Emacs use -lxft?                                   ${HAVE_XFT}"
-echo "  Does Emacs directly use zlib?                           ${HAVE_ZLIB}"
-
-echo "  Does Emacs use toolkit scroll bars?                     
${USE_TOOLKIT_SCROLL_BARS}"
-
-echo "  Does Emacs support Xwidgets?                            
${HAVE_XWIDGETS}"
-echo "       Does xwidgets support webkit(requires gtk3)?       ${HAVE_WEBKIT}"
-echo "       Does xwidgets support gobject introspection?       ${HAVE_GIR}"
-echo
+AS_ECHO(["  Does Emacs use -lXaw3d?                                 
${HAVE_XAW3D}
+  Does Emacs use -lXpm?                                   ${HAVE_XPM}
+  Does Emacs use -ljpeg?                                  ${HAVE_JPEG}
+  Does Emacs use -ltiff?                                  ${HAVE_TIFF}
+  Does Emacs use a gif library?                           ${HAVE_GIF} $LIBGIF
+  Does Emacs use a png library?                           ${HAVE_PNG} $LIBPNG
+  Does Emacs use -lrsvg-2?                                ${HAVE_RSVG}
+  Does Emacs use cairo?                                   ${USE_CAIRO}
+  Does Emacs use imagemagick?                             ${HAVE_IMAGEMAGICK}
+  Does Emacs support sound?                               ${HAVE_SOUND}
+  Does Emacs use -lgpm?                                   ${HAVE_GPM}
+  Does Emacs use -ldbus?                                  ${HAVE_DBUS}
+  Does Emacs use -lgconf?                                 ${HAVE_GCONF}
+  Does Emacs use GSettings?                               ${HAVE_GSETTINGS}
+  Does Emacs use a file notification library?             ${NOTIFY_SUMMARY}
+  Does Emacs use access control lists?                    ${ACL_SUMMARY}
+  Does Emacs use -lselinux?                               ${HAVE_LIBSELINUX}
+  Does Emacs use -lgnutls?                                ${HAVE_GNUTLS}
+  Does Emacs use -lxml2?                                  ${HAVE_LIBXML2}
+  Does Emacs use -lfreetype?                              ${HAVE_FREETYPE}
+  Does Emacs use -lm17n-flt?                              ${HAVE_M17N_FLT}
+  Does Emacs use -lotf?                                   ${HAVE_LIBOTF}
+  Does Emacs use -lxft?                                   ${HAVE_XFT}
+  Does Emacs directly use zlib?                           ${HAVE_ZLIB}
+  Does Emacs use toolkit scroll bars?                     
${USE_TOOLKIT_SCROLL_BARS}
+  Does Emacs support Xwidgets?                            ${HAVE_XWIDGETS}
+      Does xwidgets support webkit(requires gtk3)?        ${HAVE_WEBKIT}
+      Does xwidgets support gobject introspection?        ${HAVE_GIR}
+"])
 
 if test -n "${EMACSDATA}"; then
-   echo "  Environment variable EMACSDATA set to:                  $EMACSDATA"
+   AS_ECHO(["  Environment variable EMACSDATA set to:                  
$EMACSDATA"])
 fi
 if test -n "${EMACSDOC}"; then
-   echo "  Environment variable EMACSDOC set to:                   $EMACSDOC"
+   AS_ECHO(["  Environment variable EMACSDOC set to:                   
$EMACSDOC"])
 fi
 
 echo
 
 if test "$HAVE_NS" = "yes"; then
    echo
-   echo "You must run \"${MAKE-make} install\" in order to test the built 
application.
+   AS_ECHO(["You must run \"${MAKE-make} install\" in order to test the built 
application.
 The installed application will go to nextstep/Emacs.app and can be
-run or moved from there."
+run or moved from there."])
    if test "$EN_NS_SELF_CONTAINED" = "yes"; then
       echo "The application will be fully self-contained."
     else
-      echo "The lisp resources for the application will be installed under 
${prefix}.
+      AS_ECHO(["The lisp resources for the application will be installed under 
${prefix}.
 You may need to run \"${MAKE-make} install\" with sudo.  The application will 
fail
-to run if these resources are not installed."
+to run if these resources are not installed."])
    fi
    echo
 fi
@@ -5278,16 +5283,18 @@ fi
 if test "${opsys}" = "cygwin"; then
   case `uname -r` in
     1.5.*) AC_MSG_WARN([[building Emacs on Cygwin 1.5 is not supported.]])
-           echo
+          echo
           ;;
   esac
 fi
 
 # Remove any trailing slashes in these variables.
-[test "${prefix}" != NONE &&
-  prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
-test "${exec_prefix}" != NONE &&
-  exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`]
+case $prefix in
+  */) prefix=`AS_DIRNAME(["$prefix."])`;;
+esac
+case $exec_prefix in
+  */) exec_prefix=`AS_DIRNAME(["$exec_prefix."])`;;
+esac
 
 if test "$HAVE_NS" = "yes"; then
   if test "$NS_IMPL_GNUSTEP" = yes; then
@@ -5365,7 +5372,7 @@ dnl is not yet set, sigh.  Or we could use 
../$srcdir/src/.gdbinit,
 dnl or a symlink?
 AC_CONFIG_COMMANDS([src/.gdbinit], [
 if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
-  echo "source $ac_abs_top_srcdir/src/.gdbinit" > src/.gdbinit
+  AS_ECHO(["source $ac_abs_top_srcdir/src/.gdbinit"]) > src/.gdbinit
 fi
 ])
 
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index c650572..3cd4a38 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -1502,8 +1502,8 @@ in one window, no window, or several windows.
   Though many windows may exist simultaneously, at any time one window
 is designated the @dfn{selected window}.  This is the window where the
 cursor is (usually) displayed when Emacs is ready for a command.  The
-selected window usually displays the current buffer, but this is not
-necessarily the case.
+selected window usually displays the current buffer (@pxref{Current
+Buffer}), but this is not necessarily the case.
 
   Windows are grouped on the screen into frames; each window belongs to
 one and only one frame.  @xref{Frame Type}.
diff --git a/doc/lispref/two-volume.make b/doc/lispref/two-volume.make
index 64799d8..bdcdb2f 100644
--- a/doc/lispref/two-volume.make
+++ b/doc/lispref/two-volume.make
@@ -26,9 +26,9 @@ tex2 = sed '/address@hidden/a\
 
 # elisp.texi specially defines \tocreadfilename when VOL1 or VOL2 is
 # set, so we can use our premade .toc's.
-# 
+#
 vol1.pdf: elisp1med-fns-ready elisp1med-aux-ready elisp1med-toc-ready
-       @echo -e "\f Final TeX run for volume 1..."
+       @printf '\f Final TeX run for volume 1...\n'
        cp elisp1med-toc-ready elisp1-toc-ready.toc
        cp elisp1med-fns-ready vol1.fns
        cp elisp1med-aux-ready vol1.aux
@@ -42,27 +42,27 @@ vol2.pdf: elisp2med-fns-ready elisp2med-aux-ready 
elisp2med-toc-ready
        $(tex2)
 
 #  intermediate toc files.
-# 
+#
 # vol1 toc: volume 1, page break, volume 2 (with II: prepended).
 elisp1med-toc-ready: elisp1med-init elisp2med-init
        echo '@address@hidden 1}}{10001}{vol1}{}' >$@
        cat elisp1med-toc >>$@
        echo '@page' >>$@
        echo '@address@hidden 2}}{10001}{vol2}{}' >>$@
-       sed 's/{\([^}]*\)}$$/{II:\1}/' elisp2med-toc >>$@       
+       sed 's/{\([^}]*\)}$$/{II:\1}/' elisp2med-toc >>$@
 #
 # vol2 toc: volume 1 (with I: prepended), page break, volume 2.
 elisp2med-toc-ready: elisp1med-init elisp2med-init
        echo '@address@hidden 1}}{10001}{vol1}{}' >$@
-       sed 's/{\([^}]*\)}$$/{I:\1}/' elisp1med-toc >>$@        
+       sed 's/{\([^}]*\)}$$/{I:\1}/' elisp1med-toc >>$@
        echo '@page' >>$@
        echo '@address@hidden 2}}{10001}{vol2}{}' >>$@
        cat elisp2med-toc >>$@
 
 
 #  intermediate aux files.
-# 
-# append vol2's fixed aux to normal vol1.  
+#
+# append vol2's fixed aux to normal vol1.
 elisp1med-aux-ready: elisp2med-aux-vol-added
        cat elisp1med-aux $< >$@
 #
@@ -78,7 +78,7 @@ elisp2med-aux-vol-added: elisp2med-init
        sed 's/-pg}{\(.*\)}$$/-pg}{\1, address@hidden/' elisp2med-aux >$@
 
 #  intermediate index (fns) file.
-# 
+#
 elisp1med-fns-ready: elisp1med-fn-vol-added elisp2med-fn-vol-added
        cat elisp2med-fn-vol-added >>vol1.fn
        texindex vol1.fn
@@ -103,17 +103,17 @@ elisp2med-fn-vol-added: elisp2med-init
 # -----------------------------------------------------------------------------
 
 #  intermediate TeX runs.
-# 
+#
 # this generates what would be the final versions -- except the page
 # numbers aren't right.  The process of adding the I: and II: changes
 # the page breaks, so a few index entries, at least are wrong.  (In
 # 2007, x-meta-keysym in vol.II ended up on page 374 when the index had
 # it on page 375 from the initial run.)
-# 
+#
 # So, we start all over again, from these fns/aux/toc files.
-# 
+#
 elisp1med-init: elisp1-fns-ready elisp1-aux-ready elisp1init-toc-ready 
$(texinfodir)/texinfo.tex
-       @echo -e "\f Intermediate TeX run for volume 1..."
+       @printf '\f Intermediate TeX run for volume 1...\n'
        cp elisp1init-toc-ready elisp1-toc-ready.toc
        cp elisp1-fns-ready vol1.fns
        cp elisp1-aux-ready vol1.aux
@@ -134,26 +134,26 @@ elisp2med-init: elisp2-fns-ready elisp2-aux-ready 
elisp2init-toc-ready $(texinfo
 
 
 #  initial toc files.
-# 
+#
 # vol1 toc: volume 1, page break, volume 2 (with II: prepended).
 elisp1init-toc-ready: elisp1-init elisp2-init
        echo '@address@hidden 1}}{10001}{vol1}{}' >$@
        cat elisp1-toc >>$@
        echo '@page' >>$@
        echo '@address@hidden 2}}{10001}{vol2}{}' >>$@
-       sed 's/{\([^}]*\)}$$/{II:\1}/' elisp2-toc >>$@  
+       sed 's/{\([^}]*\)}$$/{II:\1}/' elisp2-toc >>$@
 #
 # vol2 toc: volume 1 (with I: prepended), page break, volume 2.
 elisp2init-toc-ready: elisp1-init elisp2-init
        echo '@address@hidden 1}}{10001}{vol1}{}' >$@
-       sed 's/{\([^}]*\)}$$/{I:\1}/' elisp1-toc >>$@   
+       sed 's/{\([^}]*\)}$$/{I:\1}/' elisp1-toc >>$@
        echo '@page' >>$@
        echo '@address@hidden 2}}{10001}{vol2}{}' >>$@
        cat elisp2-toc >>$@
 
 
 #  initial aux files.
-# 
+#
 # append vol2's fixed aux to normal vol1.  The initial runs saved
 # elisp1-aux and elisp2-aux.
 elisp1-aux-ready: elisp2-aux-vol-added
@@ -171,7 +171,7 @@ elisp2-aux-vol-added: elisp2-init
        sed 's/-pg}{\(.*\)}$$/-pg}{\1, address@hidden/' elisp2-aux >$@
 
 #  initial index (fns) file.
-# 
+#
 # Append other volume's index entries to this one's.
 # Index entries in this volume will then take precedence.
 elisp1-fns-ready: elisp1-fn-vol-added elisp2-fn-vol-added
@@ -195,14 +195,14 @@ elisp2-fn-vol-added: elisp2-init
 
 
 #  initial TeX runs.
-# 
+#
 # We use the .fn, .aux, and .toc files created here in subsequent
 # processing.  The page numbers generated here will not be correct yet,
 # but we run texindex and TeX a second time just to get them closer.
 # Otherwise it might take even longer for them to converge.
-# 
+#
 elisp1-init: elisp.texi
-       @echo -e "\f Initial TeX run for volume 1..."
+       @printf '\f Initial TeX run for volume 1...\n'
        rm -f vol1.aux vol1.toc
        $(tex1)
        texindex vol1.??
@@ -220,17 +220,16 @@ elisp2-init: elisp.texi
        touch $@
 
 # COPYING CONDITIONS
-# 
+#
 # 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 of the License, or
 # (at your option) any later version.
-# 
+#
 # This file 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 file.  If not, see <http://www.gnu.org/licenses/>.
- 
diff --git a/doc/misc/autotype.texi b/doc/misc/autotype.texi
index a147d4b..f7c1fa1 100644
--- a/doc/misc/autotype.texi
+++ b/doc/misc/autotype.texi
@@ -200,7 +200,7 @@ the output from @kbd{M-x list-abbrevs} to make it look like 
this:
 
 @example
 (c-mode-abbrev-table)
-"if"           0    ""         c-if
+"ifst"           0    ""         c-if
 @end example
 
 @noindent
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi
index ecf2ef9..43eb7af 100644
--- a/doc/misc/calc.texi
+++ b/doc/misc/calc.texi
@@ -29903,6 +29903,19 @@ number in its displayed form, 3.142.  (Since the 
default display modes
 show all objects to their full precision, this feature normally makes no
 difference.)
 
+The @kbd{C-y} command can be given a prefix, which will interpret the
+text being yanked with a different radix.  If the text being yanked can be
+interpreted as a binary, octal, hexadecimal, or decimal number, then a
+prefix of @kbd{2}, @kbd{8}, @kbd{6} or @kbd{0} will have Calc
+interpret the yanked text as a number in the appropriate base.  For example,
+if @samp{111} has just been killed and is yanked into Calc with a command
+of @kbd{C-2 C-y}, then the number @samp{7} will be put on the stack.
+If you use the plain prefix @kbd{C-u}, then you will be prompted for a
+base to use, which can be any integer from 2 to 36.  If Calc doesn't
+allow the text being yanked to be read in a different base (such as if
+the text is an algebraic expression), then the prefix will have no
+effect.
+
 @node Saving Into Registers, Inserting From Registers, Yanking Into Stack, 
Kill and Yank
 @section Saving into Registers
 
diff --git a/lib-src/rcs2log b/lib-src/rcs2log
index d1bd369..4ee303d 100755
--- a/lib-src/rcs2log
+++ b/lib-src/rcs2log
@@ -130,7 +130,8 @@ do
                case $1 in
                -n)     case ${2?}${3?}${4?} in
                        *"$tab"* | *"$nl"*)
-                               echo >&2 "$0: -n '$2' '$3' '$4': tabs, newlines 
not allowed"
+                               printf '%s\n' >&2 \
+                                 "$0: -n '$2' '$3' '$4': tabs, newlines not 
allowed"
                                exit 1;;
                        esac
                        login=$2
@@ -140,7 +141,7 @@ do
                        # If $2 is not tab-separated, use colon for separator.
                        case ${2?} in
                        *"$nl"*)
-                               echo >&2 "$0: -u '$2': newlines not allowed"
+                               printf '%s\n' >&2 "$0: -u '$2': newlines not 
allowed"
                                exit 1;;
                        *"$tab"*)
                                t=$tab;;
@@ -149,7 +150,7 @@ do
                        esac
                        case $2 in
                        *"$t"*"$t"*"$t"*)
-                               echo >&2 "$0: -u '$2': too many fields"
+                               printf '%s\n' >&2 "$0: -u '$2': too many fields"
                                exit 1;;
                        *"$t"*"$t"*)
                                uf="[^$t]*$t" # An unselected field, followed 
by a separator.
@@ -161,7 +162,7 @@ do
                                        expr "X$2" : "$uf$uf$sf"
                                `;;
                        *)
-                               echo >&2 "$0: -u '$2': not enough fields"
+                               printf '%s\n' >&2 "$0: -u '$2': not enough 
fields"
                                exit 1;;
                        esac
                        shift;;
@@ -186,9 +187,9 @@ do
        --version)
                set $Id
                rcs2logVersion=$3
-               echo >&2 "rcs2log (GNU Emacs) $rcs2logVersion$nl$Copyright"
+               printf '%s\n' >&2 "rcs2log (GNU Emacs) 
$rcs2logVersion$nl$Copyright"
                exit 0;;
-       -*)     echo >&2 "Usage: $0 [OPTION]... [FILE ...]$nl$Help"
+       -*)     printf '%s\n' >&2 "Usage: $0 [OPTION]... [FILE ...]$nl$Help"
                case $1 in
                --help) exit 0;;
                *) exit 1;;
@@ -303,7 +304,8 @@ case $rlogfile in
                        esac
                        if test ! -d "$repository"
                        then
-                               echo >&2 "$0: $repository: bad repository (see 
CVS/Repository)"
+                               printf '%s\n' >&2 \
+                                 "$0: $repository: bad repository (see 
CVS/Repository)"
                                exit 1
                        fi
                        pository=$repository;;
@@ -330,7 +332,7 @@ case $rlogfile in
                                T?*)
                                        rlog_options=-r`expr "$CVSTAG" : 
'T\(.*\)'`;;
                                *)
-                                       echo >&2 "$0: invalid CVS/Tag"; exit 1;;
+                                       printf '%s\n' >&2 "$0: invalid 
CVS/Tag"; exit 1;;
                                esac
                        fi;;
                esac
@@ -595,7 +597,7 @@ case $hostname in
        hostname=`(
                hostname || uname -n || uuname -l || cat /etc/whoami
        ) 2>/dev/null` || {
-               echo >&2 "$0: cannot deduce hostname"
+               printf '%s\n' >&2 "$0: cannot deduce hostname"
                exit 1
        }
 
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 15d4d37..ed1246b 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -221,7 +221,7 @@ lisptagsfiles2 = $(srcdir)/*/*.el
 lisptagsfiles3 = $(srcdir)/*/*/*.el
 lisptagsfiles4 = $(srcdir)/*/*/*/*.el
 
-## The echo | sed | xargs is to stop the command line getting too long
+## The ls | sed | xargs is to stop the command line getting too long
 ## on MS Windows, when the MSYS Bash passes it to a MinGW compiled
 ## etags.  It might be better to use find in a similar way to
 ## compile-main.  But maybe this is not even necessary any more now
@@ -229,10 +229,9 @@ lisptagsfiles4 = $(srcdir)/*/*/*/*.el
 TAGS: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
        rm -f $@
        touch $@
-       echo $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) 
$(lisptagsfiles4) | \
-         sed -e 's,$(srcdir)/[^ ]*loaddefs[^ ]*,,g' \
-           -e 's,$(srcdir)/ldefs-boot[^ ]*,,' \
-           -e 's,$(srcdir)/[^ ]*esh-groups.el[^ ]*,,' | \
+       ls $(lisptagsfiles1) $(lisptagsfiles2) \
+          $(lisptagsfiles3) $(lisptagsfiles4) | \
+           sed -e '/loaddefs/d; /\/ldefs-boot/d; /esh-groups\.el/d' | \
            xargs $(XARGS_LIMIT) "$(ETAGS)" -a -o $@
 
 
diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el
index 6336c33..f4754c7 100644
--- a/lisp/calc/calc-aent.el
+++ b/lisp/calc/calc-aent.el
@@ -30,6 +30,7 @@
 (require 'calc-macs)
 
 ;; Declare functions which are defined elsewhere.
+(declare-function calc-digit-start-entry "calc" ())
 (declare-function calc-refresh-evaltos "calc-ext" (&optional which-var))
 (declare-function calc-execute-kbd-macro "calc-prog" (mac arg &rest prefix))
 (declare-function math-is-true "calc-ext" (expr))
@@ -450,12 +451,7 @@ The value t means abort and give an error message.")
 ;;;###autoload
 (defun calc-alg-digit-entry ()
   (calc-alg-entry
-   (cond ((eq last-command-event ?e)
-         (if (> calc-number-radix 14) (format "%d.^" calc-number-radix) "1e"))
-        ((eq last-command-event ?#) (format "%d#" calc-number-radix))
-        ((eq last-command-event ?_) "-")
-        ((eq last-command-event ?@) "0@ ")
-        (t (char-to-string last-command-event)))))
+   (calc-digit-start-entry)))
 
 ;; The variable calc-digit-value is initially declared in calc.el,
 ;; but can be set by calcDigit-algebraic and calcDigit-edit.
diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el
index 57af0d2..8d97bc6 100644
--- a/lisp/calc/calc-prog.el
+++ b/lisp/calc/calc-prog.el
@@ -1287,37 +1287,37 @@ Redefine the corresponding command."
   (setq rpt-count (if rpt-count (prefix-numeric-value rpt-count) 1000000))
   (let* ((count 0)
         (parts nil)
-        (body "")
+        (body (vector))
         (open last-command-event)
         (counter initial)
         ch)
     (or executing-kbd-macro
        (message "Reading loop body..."))
     (while (>= count 0)
-      (setq ch (read-char))
-      (if (= ch -1)
+      (setq ch (read-event))
+      (if (eq ch -1)
          (error "Unterminated Z%c in keyboard macro" open))
-      (if (= ch ?Z)
+      (if (eq ch ?Z)
          (progn
-           (setq ch (read-char)
-                 body (concat body "Z" (char-to-string ch)))
+           (setq ch (read-event)
+                 body (vconcat body (vector ?Z ch)))
            (cond ((memq ch '(?\< ?\( ?\{))
                   (setq count (1+ count)))
                  ((memq ch '(?\> ?\) ?\}))
                   (setq count (1- count)))
                  ((and (= ch ?/)
                        (= count 0))
-                  (setq parts (nconc parts (list (concat (substring body 0 -2)
-                                                         "Z]")))
+                  (setq parts (nconc parts (list (vconcat (substring body 0 -2)
+                                                         (vector ?Z ?\])  )))
                         body ""))
                  ((eq ch 7)
                   (keyboard-quit))))
-       (setq body (concat body (char-to-string ch)))))
+       (setq body (vconcat body (vector ch)))))
     (if (/= ch (cdr (assq open '( (?\< . ?\>) (?\( . ?\)) (?\{ . ?\}) ))))
        (error "Mismatched Z%c and Z%c in keyboard macro" open ch))
     (or executing-kbd-macro
        (message "Looping..."))
-    (setq body (concat (substring body 0 -2) "Z]"))
+    (setq body (vconcat (substring body 0 -2) (vector ?Z ?\])   ))
     (and (not executing-kbd-macro)
         (= rpt-count 1000000)
         (null parts)
diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el
index 5694a4e..5105ba9 100644
--- a/lisp/calc/calc-yank.el
+++ b/lisp/calc/calc-yank.el
@@ -107,29 +107,131 @@
   (interactive "r")
   (calc-kill-region top bot t))
 
+(defun math-number-regexp (radix-num)
+  "Return a regexp which will match a Calc number base RADIX-NUM."
+  (let* ((digit-range
+          (cond
+           ;; radix 2 to 10
+           ((and (<= 2 radix-num)
+                 (>= 10 radix-num))
+            (concat "[0-"
+                    (number-to-string (1- radix-num))
+                    "]"))
+           ;; radix 11
+           ((= 11 radix-num) "[0-9aA]")
+           ;; radix 12+
+           (t
+            (concat "[0-9"
+                    "a-" (format "%c" (+ (- ?a 11) radix-num))
+                    "A-" (format "%c" (+ (- ?A 11) radix-num))
+                    "]"))))
+         (integer-regexp (concat digit-range "+"))
+         (decimal-regexp (concat digit-range "+\\." digit-range "*")))
+    (concat
+     " *\\("
+     ;; "e" notation
+     "[-_+]?" decimal-regexp "[eE][-+]?[0-9]+"
+     "\\|"
+     "[-_+]?" integer-regexp "[eE][-+]?[0-9]+"
+     "\\|"
+     ;; Integer+fractions
+     "[-_+]?" integer-regexp "*[:/]" integer-regexp "[:/]" integer-regexp
+     "\\|"
+     ;; Fractions
+     "[-_+]?" integer-regexp "[:/]" integer-regexp
+     "\\|"
+     ;; Decimal point
+     "[-_+]?" decimal-regexp
+     "\\|"
+     ;; Integers
+     "[-_+]?" integer-regexp
+     "\\) *\\(\n\\|\\'\\)")))
+
 ;; This function uses calc-last-kill if possible to get an exact result,
 ;; otherwise it just parses the yanked string.
 ;; Modified to use Emacs 19 extended concept of kill-ring. -- daveg 12/15/96
 ;;;###autoload
-(defun calc-yank ()
-  (interactive)
+(defun calc-yank (radix)
+  "Yank a value into the Calculator buffer.
+
+Valid numeric prefixes for RADIX: 0, 2, 6, 8
+No radix notation is prepended for any other numeric prefix.
+
+If RADIX is 2, prepend \"2#\"  - Binary.
+If RADIX is 8, prepend \"8#\"  - Octal.
+If RADIX is 0, prepend \"10#\" - Decimal.
+If RADIX is 6, prepend \"16#\" - Hexadecimal.
+
+If RADIX is a non-nil list (created using \\[universal-argument]), the user
+will be prompted to enter the radix in the minibuffer.
+
+If RADIX is nil or if the yanked string already has a calc radix prefix, the
+yanked string will be passed on directly to the Calculator buffer without any
+alteration."
+  (interactive "P")
   (calc-wrapper
    (calc-pop-push-record-list
     0 "yank"
-    (let ((thing (if (fboundp 'current-kill)
-                    (current-kill 0 t)
-                  (car kill-ring-yank-pointer))))
-      (if (eq (car-safe calc-last-kill) thing)
-         (cdr calc-last-kill)
-       (if (stringp thing)
-           (let ((val (math-read-exprs (calc-clean-newlines thing))))
-             (if (eq (car-safe val) 'error)
-                 (progn
-                   (setq val (math-read-exprs thing))
-                   (if (eq (car-safe val) 'error)
-                       (error "Bad format in yanked data")
-                     val))
-               val))))))))
+    (let* (radix-num
+           radix-notation
+           valid-num-regexp
+           (thing-raw
+            (if (fboundp 'current-kill)
+                (current-kill 0 t)
+              (car kill-ring-yank-pointer)))
+           (thing
+            (if (or (null radix)
+                    ;; Match examples: -2#10, 10\n(10#10,01)
+                    (string-match-p "^[-(]*[0-9]\\{1,2\\}#" thing-raw))
+                thing-raw
+              (progn
+                (if (listp radix)
+                    (progn
+                      (setq radix-num
+                            (read-number
+                             "Set radix for yanked content (2-36): "))
+                      (when (not (and (integerp radix-num)
+                                      (<= 2 radix-num)
+                                      (>= 36 radix-num)))
+                        (error (concat "The radix has to be an "
+                                       "integer between 2 and 36."))))
+                  (setq radix-num
+                        (cond ((eq radix 2) 2)
+                              ((eq radix 8) 8)
+                              ((eq radix 0) 10)
+                              ((eq radix 6) 16)
+                              (t (message
+                                  (concat "No radix prepended "
+                                          "for invalid *numeric* "
+                                          "prefix %0d.")
+                                  radix)
+                                 nil))))
+                (if radix-num
+                    (progn
+                      (setq radix-notation
+                            (concat (number-to-string radix-num) "#"))
+                      (setq valid-num-regexp
+                            (math-number-regexp radix-num))
+                      ;; Ensure that the radix-notation is prefixed
+                      ;; correctly even for multi-line yanks like below,
+                      ;;   111
+                      ;;   1111
+                      (replace-regexp-in-string
+                       valid-num-regexp
+                       (concat radix-notation "\\&")
+                       thing-raw))
+                  thing-raw)))))
+      (if (eq (car-safe calc-last-kill) thing-raw)
+          (cdr calc-last-kill)
+        (if (stringp thing)
+            (let ((val (math-read-exprs (calc-clean-newlines thing))))
+              (if (eq (car-safe val) 'error)
+                  (progn
+                    (setq val (math-read-exprs thing))
+                    (if (eq (car-safe val) 'error)
+                        (error "Bad format in yanked data")
+                      val))
+                val))))))))
 
 ;;; The Calc set- and get-register commands are modified versions of functions
 ;;; in register.el
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index de7bfb8..e44226d 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -1105,20 +1105,18 @@ Used by `calc-user-invocation'.")
   "The key map for entering Calc digits.")
 
 (mapc (lambda (x)
-       (condition-case err
-           (progn
-             (define-key calc-digit-map x 'calcDigit-backspace)
-             (define-key calc-mode-map x 'calc-pop)
-             (define-key calc-mode-map
-                (if (and (vectorp x) (featurep 'xemacs))
-                    (if (= (length x) 1)
-                        (vector (if (consp (aref x 0))
-                                    (cons 'meta (aref x 0))
-                                  (list 'meta (aref x 0))))
-                      "\e\C-d")
-                  (vconcat "\e" x))
-               'calc-pop-above))
-         (error nil)))
+       (ignore-errors
+          (define-key calc-digit-map x 'calcDigit-backspace)
+          (define-key calc-mode-map x 'calc-pop)
+          (define-key calc-mode-map
+            (if (and (vectorp x) (featurep 'xemacs))
+                (if (= (length x) 1)
+                    (vector (if (consp (aref x 0))
+                                (cons 'meta (aref x 0))
+                              (list 'meta (aref x 0))))
+                  "\e\C-d")
+              (vconcat "\e" x))
+            'calc-pop-above)))
       (if calc-scan-for-dels
          (append (where-is-internal 'delete-backward-char global-map)
                  (where-is-internal 'backward-delete-char global-map)
@@ -1189,25 +1187,24 @@ Used by `calc-user-invocation'.")
 ;;;###autoload (define-key ctl-x-map "*" 'calc-dispatch)
 
 ;;;###autoload
-(defun calc-dispatch (&optional arg)
+(defun calc-dispatch (&optional _arg)
   "Invoke the GNU Emacs Calculator.  See \\[calc-dispatch-help] for details."
-  (interactive "P")
+  (interactive)
 ;  (sit-for echo-keystrokes)
-  (condition-case err   ; look for other keys bound to calc-dispatch
-      (let ((keys (this-command-keys)))
-       (unless (or (not (stringp keys))
-                   (string-match "\\`\C-u\\|\\`\e[-0-9#]\\|`[\M--\M-0-\M-9]" 
keys)
-                   (eq (lookup-key calc-dispatch-map keys) 
'calc-same-interface))
-         (when (and (string-match "address@hidden" keys)
-                    (symbolp
-                     (lookup-key calc-dispatch-map (substring keys 0 1))))
-           (define-key calc-dispatch-map (substring keys 0 1) nil))
-         (define-key calc-dispatch-map keys 'calc-same-interface)))
-    (error nil))
-  (calc-do-dispatch arg))
+  (ignore-errors                   ; look for other keys bound to calc-dispatch
+    (let ((keys (this-command-keys)))
+      (unless (or (not (stringp keys))
+                  (string-match "\\`\C-u\\|\\`\e[-0-9#]\\|`[\M--\M-0-\M-9]" 
keys)
+                  (eq (lookup-key calc-dispatch-map keys) 
'calc-same-interface))
+        (when (and (string-match "address@hidden" keys)
+                   (symbolp
+                    (lookup-key calc-dispatch-map (substring keys 0 1))))
+          (define-key calc-dispatch-map (substring keys 0 1) nil))
+        (define-key calc-dispatch-map keys 'calc-same-interface))))
+  (calc-do-dispatch))
 
 (defvar calc-dispatch-help nil)
-(defun calc-do-dispatch (arg)
+(defun calc-do-dispatch (&optional _arg)
   "Start the Calculator."
   (let ((key (calc-read-key-sequence
              (if calc-dispatch-help
@@ -1225,8 +1222,7 @@ Used by `calc-user-invocation'.")
 
 (defun calc-read-key-sequence (prompt map)
   "Read keys, with prompt PROMPT and keymap MAP."
-  (let ((prompt2 (format "%s " (key-description (this-command-keys))))
-       (glob (current-global-map))
+  (let ((glob (current-global-map))
        (loc (current-local-map)))
     (or (input-pending-p) (message "%s" prompt))
     (let ((key (calc-read-key t))
@@ -1254,7 +1250,6 @@ embedded information from the appropriate buffers and 
tidy up
 the trail buffer."
   (let ((cb (current-buffer))
         (info-list nil)
-        (buflist)
 ;        (plural nil)
         (cea calc-embedded-active))
     ;; Get a list of all buffers using this buffer for
@@ -1448,42 +1443,41 @@ commands given here will actually operate on the 
*Calculator* stack."
       (set-buffer (window-buffer)))
     (if (derived-mode-p 'calc-mode)
        (calc-quit)
-      (let ((oldbuf (current-buffer)))
-       (calc-create-buffer)
-       (setq calc-was-keypad-mode nil)
-       (if (or (eq full-display t)
-               (and (null full-display) calc-full-mode))
-           (switch-to-buffer (current-buffer) t)
-         (if (get-buffer-window (current-buffer))
-             (select-window (get-buffer-window (current-buffer)))
-            (if calc-window-hook
-                (run-hooks 'calc-window-hook)
-              (let ((w (get-largest-window)))
-                (if (and pop-up-windows
-                         (> (window-height w)
-                            (+ window-min-height calc-window-height 2)))
-                    (progn
-                      (setq w (split-window w
-                                            (- (window-height w)
-                                               calc-window-height 2)
-                                            nil))
-                      (set-window-buffer w (current-buffer))
-                      (select-window w))
-                  (pop-to-buffer (current-buffer)))))))
-       (with-current-buffer (calc-trail-buffer)
-         (and calc-display-trail
-              (= (window-width) (frame-width))
-              (calc-trail-display 1 t)))
-       (message "Welcome to the GNU Emacs Calculator!  Press `?' or `h' for 
help, `q' to quit")
-       (run-hooks 'calc-start-hook)
-       (and (windowp full-display)
-            (window-point full-display)
-            (select-window full-display))
-       (calc-check-defines)
-       (when (and calc-said-hello interactive)
-         (sit-for 2)
-         (message ""))
-       (setq calc-said-hello t)))))
+      (calc-create-buffer)
+      (setq calc-was-keypad-mode nil)
+      (if (or (eq full-display t)
+              (and (null full-display) calc-full-mode))
+          (switch-to-buffer (current-buffer) t)
+        (if (get-buffer-window (current-buffer))
+            (select-window (get-buffer-window (current-buffer)))
+          (if calc-window-hook
+              (run-hooks 'calc-window-hook)
+            (let ((w (get-largest-window)))
+              (if (and pop-up-windows
+                       (> (window-height w)
+                          (+ window-min-height calc-window-height 2)))
+                  (progn
+                    (setq w (split-window w
+                                          (- (window-height w)
+                                             calc-window-height 2)
+                                          nil))
+                    (set-window-buffer w (current-buffer))
+                    (select-window w))
+                (pop-to-buffer (current-buffer)))))))
+      (with-current-buffer (calc-trail-buffer)
+        (and calc-display-trail
+             (= (window-width) (frame-width))
+             (calc-trail-display 1 t)))
+      (message "Welcome to the GNU Emacs Calculator!  Press `?' or `h' for 
help, `q' to quit")
+      (run-hooks 'calc-start-hook)
+      (and (windowp full-display)
+           (window-point full-display)
+           (select-window full-display))
+      (calc-check-defines)
+      (when (and calc-said-hello interactive)
+        (sit-for 2)
+        (message ""))
+      (setq calc-said-hello t))))
 
 ;;;###autoload
 (defun full-calc (&optional interactive)
@@ -1999,9 +1993,9 @@ See calc-keypad for details."
   (interactive)
   (and (derived-mode-p 'calc-mode)
        (not calc-executing-macro)
-       (let* ((buffer-read-only nil)
+       (let* ((inhibit-read-only t)
              (save-point (point))
-             (save-mark (condition-case err (mark) (error nil)))
+             (save-mark (ignore-errors (mark)))
              (save-aligned (looking-at "\\.$"))
              (thing calc-stack)
              (calc-any-evaltos nil))
@@ -2102,11 +2096,12 @@ the United States."
        (setq calc-trail-pointer (point-marker))))
   calc-trail-buffer)
 
+(defvar calc-can-abbrev-vectors)
+
 (defun calc-record (val &optional prefix)
   (setq calc-aborted-prefix nil)
   (or calc-executing-macro
-      (let* ((mainbuf (current-buffer))
-            (buf (calc-trail-buffer))
+      (let* ((buf (calc-trail-buffer))
             (calc-display-raw nil)
             (calc-can-abbrev-vectors t)
             (fval (if val
@@ -2309,6 +2304,14 @@ the United States."
 
 
 ;;;; Reading a number using the minibuffer.
+(defun calc-digit-start-entry ()
+  (cond ((eq last-command-event ?e)
+         (if (> calc-number-radix 14) (format "%d.^" calc-number-radix) "1e"))
+        ((eq last-command-event ?#) (format "%d#" calc-number-radix))
+        ((eq last-command-event ?_) "-")
+        ((eq last-command-event ?@) "0@ ")
+        (t (char-to-string last-command-event))))
+
 (defvar calc-buffer)
 (defvar calc-prev-char)
 (defvar calc-prev-prev-char)
@@ -2319,7 +2322,6 @@ the United States."
    (if (or calc-algebraic-mode
           (and (> calc-number-radix 14) (eq last-command-event ?e)))
        (calc-alg-digit-entry)
-     (calc-unread-command)
      (setq calc-aborted-prefix nil)
      (let* ((calc-digit-value nil)
            (calc-prev-char nil)
@@ -2337,7 +2339,8 @@ the United States."
                     (unwind-protect
                         (progn
                           (define-key global-map "\e" nil)
-                          (read-from-minibuffer "Calc: " "" calc-digit-map))
+                          (read-from-minibuffer
+                            "Calc: " (calc-digit-start-entry) calc-digit-map))
                       (define-key global-map "\e" old-esc))))))
        (or calc-digit-value (setq calc-digit-value (math-read-number buf)))
        (if (stringp calc-digit-value)
@@ -3044,7 +3047,7 @@ largest Emacs integer.")
 (defun math-sub-bignum (a b)   ; [l l l]
   (if b
       (if a
-         (let* ((a (copy-sequence a)) (aa a) (borrow nil) sum diff)
+         (let* ((a (copy-sequence a)) (aa a) (borrow nil) diff)
            (while (and aa b)
              (if borrow
                  (if (>= (setq diff (- (car aa) (car b))) 1)
@@ -3198,7 +3201,8 @@ largest Emacs integer.")
                 aa a)
           (while (progn
                    (setcar ss (% (setq prod (+ (+ (car ss) (* (car aa) d))
-                                               c)) math-bignum-digit-size))
+                                               c))
+                                  math-bignum-digit-size))
                    (setq aa (cdr aa)))
             (setq c (/ prod math-bignum-digit-size)
                   ss (or (cdr ss) (setcdr ss (list 0)))))
@@ -3433,6 +3437,10 @@ largest Emacs integer.")
 ;; to math-stack-value-offset, but are used by math-stack-value-offset-fancy
 ;; in calccomp.el.
 
+(defvar math-svo-c)
+(defvar math-svo-wid)
+(defvar math-svo-off)
+
 (defun math-stack-value-offset (math-svo-c)
   (let* ((num (if calc-line-numbering 4 0))
         (math-svo-wid (calc-window-width))
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index f188b68..6c1b4c2 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1107,11 +1107,11 @@ with disabled undo.  Leaves point at point-min, 
displays BUFFER."
      (setq buffer-read-only nil
            buffer-undo-list t)
      (erase-buffer)
+     (display-buffer ,buffer)
      ,@body
      (goto-char (point-min))
      (set-buffer-modified-p nil)
-     (setq buffer-read-only t)
-     (display-buffer ,buffer)))
+     (setq buffer-read-only t)))
 
 ;; The following are in-line for speed; they can be called thousands of times
 ;; when looking up holidays or processing the diary.  Here, for example, are
diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el
index 27d7abe..76ec356 100644
--- a/lisp/cedet/ede.el
+++ b/lisp/cedet/ede.el
@@ -40,6 +40,7 @@
 ;;  (global-ede-mode t)
 
 (require 'cedet)
+(require 'cl-lib)
 (require 'eieio)
 (require 'cl-generic)
 (require 'eieio-speedbar)
@@ -259,10 +260,10 @@ Argument LIST-O-O is the list of objects to choose from."
 (defun ede-menu-obj-of-class-p (class)
   "Return non-nil if some member of `ede-object' is a child of CLASS."
   (if (listp ede-object)
-      (eval (cons 'or (mapcar (lambda (o) (obj-of-class-p o class)) 
ede-object)))
+      (cl-some (lambda (o) (obj-of-class-p o class)) ede-object)
     (obj-of-class-p ede-object class)))
 
-(defun ede-build-forms-menu (menu-def)
+(defun ede-build-forms-menu (_menu-def)
   "Create a sub menu for building different parts of an EDE system.
 Argument MENU-DEF is the menu definition to use."
   (easy-menu-filter-return
@@ -306,7 +307,7 @@ Argument MENU-DEF is the menu definition to use."
        (append newmenu (list [ "Make distribution" ede-make-dist t ]))
        )))))
 
-(defun ede-target-forms-menu (menu-def)
+(defun ede-target-forms-menu (_menu-def)
   "Create a target MENU-DEF based on the object belonging to this buffer."
   (easy-menu-filter-return
    (easy-menu-create-menu
@@ -327,7 +328,7 @@ Argument MENU-DEF is the menu definition to use."
             ;; This is bad, but I'm not sure what else to do.
             (oref (car obj) menu)))))))))
 
-(defun ede-project-forms-menu (menu-def)
+(defun ede-project-forms-menu (_menu-def)
   "Create a target MENU-DEF based on the object belonging to this buffer."
   (easy-menu-filter-return
    (easy-menu-create-menu
@@ -353,7 +354,7 @@ Argument MENU-DEF is the menu definition to use."
               menu)
        )))))
 
-(defun ede-configuration-forms-menu (menu-def)
+(defun ede-configuration-forms-menu (_menu-def)
   "Create a submenu for selecting the default configuration for this project.
 The current default is in the current object's CONFIGURATION-DEFAULT slot.
 All possible configurations are in CONFIGURATIONS.
@@ -388,7 +389,7 @@ but can also be used interactively."
           (eieio-object-name (ede-current-project))
           newconfig))
 
-(defun ede-customize-forms-menu (menu-def)
+(defun ede-customize-forms-menu (_menu-def)
   "Create a menu of the project, and targets that can be customized.
 Argument MENU-DEF is the definition of the current menu."
   (easy-menu-filter-return
@@ -411,7 +412,7 @@ Argument MENU-DEF is the definition of the current menu."
                        targ)))))))
 
 
-(defun ede-apply-object-keymap (&optional default)
+(defun ede-apply-object-keymap (&optional _default)
   "Add target specific keybindings into the local map.
 Optional argument DEFAULT indicates if this should be set to the default
 version of the keymap."
@@ -419,14 +420,13 @@ version of the keymap."
        (proj ede-object-project))
     (condition-case nil
        (let ((keys (ede-object-keybindings object)))
-         ;; Add keys for the project to whatever is in the current object
-         ;; so long as it isn't the same.
-         (when (not (eq object proj))
-           (setq keys (append keys (ede-object-keybindings proj))))
-         (while keys
-           (local-set-key (concat "\C-c." (car (car keys)))
-                          (cdr (car keys)))
-           (setq keys (cdr keys))))
+         (dolist (key
+                   ;; Add keys for the project to whatever is in the current
+                   ;; object so long as it isn't the same.
+                   (if (eq object proj)
+                       keys
+                     (append keys (ede-object-keybindings proj))))
+           (local-set-key (concat "\C-c." (car key)) (cdr key))))
       (error nil))))
 
 ;;; Menu building methods for building
@@ -550,19 +550,15 @@ Sets buffer local variables for EDE."
 (defun ede-reset-all-buffers ()
   "Reset all the buffers due to change in EDE."
   (interactive)
-  (let ((b (buffer-list)))
-    (while b
-      (when (buffer-file-name (car b))
-       (with-current-buffer (car b)
-         ;; Reset all state variables
-         (setq ede-object nil
-               ede-object-project nil
-               ede-object-root-project nil)
-         ;; Now re-initialize this buffer.
-         (ede-initialize-state-current-buffer)
-         )
-       )
-      (setq b (cdr b)))))
+  (dolist (b (buffer-list))
+    (when (buffer-file-name b)
+      (with-current-buffer b
+        ;; Reset all state variables
+        (setq ede-object nil
+              ede-object-project nil
+              ede-object-root-project nil)
+        ;; Now re-initialize this buffer.
+        (ede-initialize-state-current-buffer)))))
 
 ;;;###autoload
 (define-minor-mode global-ede-mode
@@ -626,13 +622,10 @@ of objects with the `ede-want-file-p' method."
   (if (or (eq ede-auto-add-method 'never)
          (ede-ignore-file (buffer-file-name)))
       nil
-    (let (wants desires)
-      ;; Find all the objects.
-      (setq wants (oref (ede-current-project) targets))
-      (while wants
-       (if (ede-want-file-p (car wants) (buffer-file-name))
-           (setq desires (cons (car wants) desires)))
-       (setq wants (cdr wants)))
+    (let (desires)
+      (dolist (want (oref (ede-current-project) targets));Find all the objects.
+       (if (ede-want-file-p want (buffer-file-name))
+            (push want desires)))
       (if desires
          (cond ((or (eq ede-auto-add-method 'ask)
                     (and (eq ede-auto-add-method 'multi-ask)
@@ -754,7 +747,7 @@ Optional argument NAME is the name to give this project."
                                  (r nil))
                             (while l
                               (if cs
-                                  (if (eq (oref (car l) :class-sym)
+                                  (if (eq (oref (car l) class-sym)
                                           cs)
                                       (setq r (cons (car l) r)))
                                 (if (oref (car l) new-p)
@@ -804,7 +797,7 @@ Optional argument NAME is the name to give this project."
                 ))
         (inits (oref obj initializers)))
     ;; Force the name to match for new objects.
-    (eieio-object-set-name-string nobj (oref nobj :name))
+    (eieio-object-set-name-string nobj (oref nobj name))
     ;; Handle init args.
     (while inits
       (eieio-oset nobj (car inits) (car (cdr inits)))
@@ -858,7 +851,7 @@ Different projects accept different arguments ARGS.
 Typically you can specify NAME, target TYPE, and AUTOADD, where AUTOADD is
 a string \"y\" or \"n\", which answers the y/n question done interactively."
   (interactive)
-  (apply 'project-new-target (ede-current-project) args)
+  (apply #'project-new-target (ede-current-project) args)
   (when (and buffer-file-name
             (not (file-directory-p buffer-file-name)))
     (setq ede-object nil)
@@ -1004,21 +997,21 @@ Argument PROMPT is the prompt to use when querying the 
user for a target."
   "Make sure placeholder THIS is replaced with the real thing, and pass 
through."
   (project-add-file this file))
 
-(cl-defmethod project-add-file ((ot ede-target) file)
+(cl-defmethod project-add-file ((ot ede-target) _file)
   "Add the current buffer into project project target OT.
 Argument FILE is the file to add."
   (error "add-file not supported by %s" (eieio-object-name ot)))
 
-(cl-defmethod project-remove-file ((ot ede-target) fnnd)
+(cl-defmethod project-remove-file ((ot ede-target) _fnnd)
   "Remove the current buffer from project target OT.
 Argument FNND is an argument."
   (error "remove-file not supported by %s" (eieio-object-name ot)))
 
-(cl-defmethod project-edit-file-target ((ot ede-target))
+(cl-defmethod project-edit-file-target ((_ot ede-target))
   "Edit the target OT associated with this file."
   (find-file (oref (ede-current-project) file)))
 
-(cl-defmethod project-new-target ((proj ede-project) &rest args)
+(cl-defmethod project-new-target ((proj ede-project) &rest _args)
   "Create a new target.  It is up to the project PROJ to get the name."
   (error "new-target not supported by %s" (eieio-object-name proj)))
 
@@ -1030,12 +1023,12 @@ Argument FNND is an argument."
   "Delete the current target OT from its parent project."
   (error "add-file not supported by %s" (eieio-object-name ot)))
 
-(cl-defmethod project-compile-project ((obj ede-project) &optional command)
+(cl-defmethod project-compile-project ((obj ede-project) &optional _command)
   "Compile the entire current project OBJ.
 Argument COMMAND is the command to use when compiling."
   (error "compile-project not supported by %s" (eieio-object-name obj)))
 
-(cl-defmethod project-compile-target ((obj ede-target) &optional command)
+(cl-defmethod project-compile-target ((obj ede-target) &optional _command)
   "Compile the current target OBJ.
 Argument COMMAND is the command to use for compiling the target."
   (error "compile-target not supported by %s" (eieio-object-name obj)))
@@ -1095,7 +1088,7 @@ Flush the dead projects from the project cache."
   (interactive)
   (let ((dead nil))
     (dolist (P ede-projects)
-      (when (not (file-exists-p (oref P :file)))
+      (when (not (file-exists-p (oref P file)))
        (add-to-list 'dead P)))
     (dolist (D dead)
       (ede-delete-project-from-global-list D))
@@ -1108,9 +1101,9 @@ Flush the dead projects from the project cache."
   (interactive)
   (let ((scanned nil))
     (dolist (P ede-projects)
-      (if (member (oref P :directory) scanned)
-         (error "Duplicate project (by dir) found in %s!" (oref P :directory))
-       (push (oref P :directory) scanned)))
+      (if (member (oref P directory) scanned)
+         (error "Duplicate project (by dir) found in %s!" (oref P directory))
+       (push (oref P directory) scanned)))
     (unless ede--disable-inode
       (setq scanned nil)
       (dolist (P ede-projects)
@@ -1135,8 +1128,7 @@ Optional ROOTRETURN will return the root project for DIR."
 
     ;; Do the load
     ;;(message "EDE LOAD : %S" file)
-    (let* ((file dir)
-          (path (file-name-as-directory (expand-file-name dir)))
+    (let* ((path (file-name-as-directory (expand-file-name dir)))
           (detect (or detectin (ede-directory-project-cons path)))
           (autoloader nil)
           (toppath nil)
@@ -1302,7 +1294,7 @@ could become slow in time."
 Handles complex path issues."
   (member (ede-convert-path this (buffer-file-name buffer)) source))
 
-(cl-defmethod ede-buffer-mine ((this ede-project) buffer)
+(cl-defmethod ede-buffer-mine ((_this ede-project) _buffer)
   "Return non-nil if object THIS lays claim to the file in BUFFER."
   nil)
 
@@ -1375,7 +1367,7 @@ See also `ede-map-all-subprojects'."
   "For object THIS, execute PROC on THIS and all subprojects.
 This function also applies PROC to sub-sub projects.
 See also `ede-map-subprojects'."
-  (apply 'append
+  (apply #'append
         (list (funcall allproc this))
         (ede-map-subprojects
          this
@@ -1392,7 +1384,7 @@ See also `ede-map-subprojects'."
 (cl-defmethod ede-map-any-target-p ((this ede-project) proc)
   "For project THIS, map PROC to all targets and return if any non-nil.
 Return the first non-nil value returned by PROC."
-  (eval (cons 'or (ede-map-targets this proc))))
+  (cl-some proc (oref this targets)))
 
 
 ;;; Some language specific methods.
@@ -1401,15 +1393,15 @@ Return the first non-nil value returned by PROC."
 ;; configuring items for Semantic.
 
 ;; Generic paths
-(cl-defmethod ede-system-include-path ((this ede-project))
+(cl-defmethod ede-system-include-path ((_this ede-project))
   "Get the system include path used by project THIS."
   nil)
 
-(cl-defmethod ede-system-include-path ((this ede-target))
+(cl-defmethod ede-system-include-path ((_this ede-target))
   "Get the system include path used by project THIS."
   nil)
 
-(cl-defmethod ede-source-paths ((this ede-project) mode)
+(cl-defmethod ede-source-paths ((_this ede-project) _mode)
   "Get the base to all source trees in the current project for MODE.
 For example, <root>/src for sources of c/c++, Java, etc,
 and <root>/doc for doc sources."
@@ -1437,20 +1429,20 @@ and <root>/doc for doc sources."
        (message "Choosing preprocessor syms for project %s"
                 (eieio-object-name (car objs)))))))
 
-(cl-defmethod ede-system-include-path ((this ede-project))
+(cl-defmethod ede-system-include-path ((_this ede-project))
   "Get the system include path used by project THIS."
   nil)
 
-(cl-defmethod ede-preprocessor-map ((this ede-project))
+(cl-defmethod ede-preprocessor-map ((_this ede-project))
   "Get the pre-processor map for project THIS."
   nil)
 
-(cl-defmethod ede-preprocessor-map ((this ede-target))
+(cl-defmethod ede-preprocessor-map ((_this ede-target))
   "Get the pre-processor map for project THIS."
   nil)
 
 ;; Java
-(cl-defmethod ede-java-classpath ((this ede-project))
+(cl-defmethod ede-java-classpath ((_this ede-project))
   "Return the classpath for this project."
   ;; @TODO - Can JDEE add something here?
   nil)
@@ -1463,8 +1455,7 @@ and <root>/doc for doc sources."
 If VARIABLE is not project local, just use set.  Optional argument PROJ
 is the project to use, instead of `ede-current-project'."
   (interactive "sVariable: \nxExpression: ")
-  (let ((p (or proj (ede-toplevel)))
-       a)
+  (let ((p (or proj (ede-toplevel))))
     ;; Make the change
     (ede-make-project-local-variable variable p)
     (ede-set-project-local-variable variable value p)
@@ -1514,7 +1505,7 @@ It does not apply the value to buffers."
       (make-local-variable (car v))
       (set (car v) (cdr v)))))
 
-(cl-defmethod ede-commit-local-variables ((proj ede-project))
+(cl-defmethod ede-commit-local-variables ((_proj ede-project))
   "Commit change to local variables in PROJ."
   nil)
 
diff --git a/lisp/cedet/ede/emacs.el b/lisp/cedet/ede/emacs.el
index ca58810..c3caf98 100644
--- a/lisp/cedet/ede/emacs.el
+++ b/lisp/cedet/ede/emacs.el
@@ -41,7 +41,7 @@
 
 ;; @TODO - get rid of this.  Stuck in loaddefs right now.
 
-(defun ede-emacs-project-root (&optional dir)
+(defun ede-emacs-project-root (&optional _dir)
   "Get the root directory for DIR."
   nil)
 
@@ -99,7 +99,7 @@ m4_define(\\[SXEM4CS_BETA_VERSION\\], \\[\\([0-9]+\\)\\])")
   "Project Type for the Emacs source code."
   :method-invocation-order :depth-first)
 
-(defun ede-emacs-load (dir &optional rootproj)
+(defun ede-emacs-load (dir &optional _rootproj)
   "Return an Emacs Project object if there is a match.
 Return nil if there isn't one.
 Argument DIR is the directory it is created for.
@@ -116,14 +116,14 @@ ROOTPROJ is nil, since there is only one project."
 
 ;;;###autoload
 (ede-add-project-autoload
- (ede-project-autoload "emacs"
-                      :name "EMACS ROOT"
-                      :file 'ede/emacs
-                      :proj-file "src/emacs.c"
-                      :load-type 'ede-emacs-load
-                      :class-sym 'ede-emacs-project
-                      :new-p nil
-                      :safe-p t)
+ (make-instance 'ede-project-autoload
+                :name "EMACS ROOT"
+                :file 'ede/emacs
+                :proj-file "src/emacs.c"
+                :load-type 'ede-emacs-load
+                :class-sym 'ede-emacs-project
+                :new-p nil
+                :safe-p t)
  'unique)
 
 (defclass ede-emacs-target-c (ede-target)
@@ -142,7 +142,7 @@ All directories need at least one target.")
 All directories need at least one target.")
 
 (cl-defmethod initialize-instance ((this ede-emacs-project)
-                               &rest fields)
+                                   &rest _fields)
   "Make sure the targets slot is bound."
   (cl-call-next-method)
   (unless (slot-boundp this 'targets)
@@ -151,7 +151,7 @@ All directories need at least one target.")
 ;;; File Stuff
 ;;
 (cl-defmethod ede-project-root-directory ((this ede-emacs-project)
-                                      &optional file)
+                                          &optional _file)
   "Return the root for THIS Emacs project with file."
   (ede-up-directory (file-name-directory (oref this file))))
 
@@ -160,7 +160,7 @@ All directories need at least one target.")
   this)
 
 (cl-defmethod ede-find-subproject-for-directory ((proj ede-emacs-project)
-                                             dir)
+                                                 _dir)
   "Return PROJ, for handling all subdirs below DIR."
   proj)
 
@@ -171,7 +171,7 @@ All directories need at least one target.")
   (let ((match nil))
     (dolist (T targets)
       (when (and (object-of-class-p T class)
-                (string= (oref T :path) dir))
+                (string= (oref T path) dir))
        (setq match T)
       ))
     match))
diff --git a/lisp/cedet/ede/linux.el b/lisp/cedet/ede/linux.el
index 6887d38..edfa364 100644
--- a/lisp/cedet/ede/linux.el
+++ b/lisp/cedet/ede/linux.el
@@ -189,7 +189,7 @@ until Linux is built for the first time."
              (cons bdir "include/generated/uapi"))))
 
 ;;;###autoload
-(defun ede-linux-load (dir &optional rootproj)
+(defun ede-linux-load (dir &optional _rootproj)
   "Return an Linux Project object if there is a match.
 Return nil if there isn't one.
 Argument DIR is the directory it is created for.
@@ -198,8 +198,7 @@ ROOTPROJ is nil, since there is only one project."
   (let* ((bdir (ede-linux--get-build-directory dir))
         (arch (ede-linux--get-architecture dir bdir))
         (include-path (ede-linux--include-path dir bdir arch)))
-    (ede-linux-project
-     "Linux"
+    (make-instance 'ede-linux-project
      :name "Linux"
      :version (ede-linux-version dir)
      :directory (file-name-as-directory dir)
@@ -211,14 +210,14 @@ ROOTPROJ is nil, since there is only one project."
 
 ;;;###autoload
 (ede-add-project-autoload
- (ede-project-autoload "linux"
-                      :name "LINUX ROOT"
-                      :file 'ede/linux
-                      :proj-file "scripts/ver_linux"
-                      :load-type 'ede-linux-load
-                      :class-sym 'ede-linux-project
-                      :new-p nil
-                      :safe-p t)
+ (make-instance 'ede-project-autoload
+                :name "LINUX ROOT"
+                :file 'ede/linux
+                :proj-file "scripts/ver_linux"
+                :load-type 'ede-linux-load
+                :class-sym 'ede-linux-project
+                :new-p nil
+                :safe-p t)
  'unique)
 
 (defclass ede-linux-target-c (ede-target)
@@ -232,7 +231,7 @@ All directories need at least one target.")
 All directories need at least one target.")
 
 (cl-defmethod initialize-instance ((this ede-linux-project)
-                               &rest fields)
+                                   &rest _fields)
   "Make sure the targets slot is bound."
   (cl-call-next-method)
   (unless (slot-boundp this 'targets)
@@ -241,7 +240,7 @@ All directories need at least one target.")
 ;;; File Stuff
 ;;
 (cl-defmethod ede-project-root-directory ((this ede-linux-project)
-                                      &optional file)
+                                          &optional _file)
   "Return the root for THIS Linux project with file."
   (ede-up-directory (file-name-directory (oref this file))))
 
@@ -250,7 +249,7 @@ All directories need at least one target.")
   this)
 
 (cl-defmethod ede-find-subproject-for-directory ((proj ede-linux-project)
-                                             dir)
+                                                 _dir)
   "Return PROJ, for handling all subdirs below DIR."
   proj)
 
@@ -261,7 +260,7 @@ All directories need at least one target.")
   (let ((match nil))
     (dolist (T targets)
       (when (and (object-of-class-p T class)
-                (string= (oref T :path) dir))
+                (string= (oref T path) dir))
        (setq match T)
       ))
     match))
diff --git a/lisp/cedet/ede/pconf.el b/lisp/cedet/ede/pconf.el
index a831087..664e91d 100644
--- a/lisp/cedet/ede/pconf.el
+++ b/lisp/cedet/ede/pconf.el
@@ -93,11 +93,11 @@ don't do it.  A value of nil means to just do it.")
     (ede-map-all-subprojects
      this
      (lambda (sp)
-       (ede-map-targets sp 'ede-proj-flush-autoconf)))
+       (ede-map-targets sp #'ede-proj-flush-autoconf)))
     (ede-map-all-subprojects
      this
      (lambda (sp)
-       (ede-map-targets this 'ede-proj-tweak-autoconf)))
+       (ede-map-targets this #'ede-proj-tweak-autoconf)))
     ;; Now save
     (save-buffer)
     (setq postcmd "autoreconf -f -i;")
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index eb66e8f..89f2a1a 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1887,7 +1887,7 @@ add a call to it along with some explanatory comments."
 ;;;###autoload
 (defun package-install (pkg &optional dont-select)
   "Install the package PKG.
-PKG can be a package-desc or the package name of one the available packages
+PKG can be a package-desc or a symbol naming one of the available packages
 in an archive in `package-archives'.  Interactively, prompt for its name.
 
 If called interactively or if DONT-SELECT nil, add PKG to
@@ -1918,15 +1918,15 @@ to install it but still mark it as selected."
                 pkg)))
     (unless (or dont-select (package--user-selected-p name))
       (package--save-selected-packages
-       (cons name package-selected-packages))))
-  (if-let ((transaction
-            (if (package-desc-p pkg)
-                (unless (package-installed-p pkg)
-                  (package-compute-transaction (list pkg)
-                                               (package-desc-reqs pkg)))
-              (package-compute-transaction () (list (list pkg))))))
-      (package-download-transaction transaction)
-    (message "`%s' is already installed" (package-desc-full-name pkg))))
+       (cons name package-selected-packages)))
+    (if-let ((transaction
+              (if (package-desc-p pkg)
+                  (unless (package-installed-p pkg)
+                    (package-compute-transaction (list pkg)
+                                                 (package-desc-reqs pkg)))
+                (package-compute-transaction () (list (list pkg))))))
+        (package-download-transaction transaction)
+      (message "`%s' is already installed" name))))
 
 (defun package-strip-rcs-id (str)
   "Strip RCS version ID from the version string STR.
diff --git a/lisp/emacs-lisp/tabulated-list.el 
b/lisp/emacs-lisp/tabulated-list.el
index 47ecd2b..4bd8a19 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -520,7 +520,9 @@ With a numeric prefix argument N, sort the Nth column."
                  (car (aref tabulated-list-format n))
                (get-text-property (point)
                                   'tabulated-list-column-name))))
-    (tabulated-list--sort-by-column-name name)))
+    (if (nth 2 (assoc name (append tabulated-list-format nil)))
+        (tabulated-list--sort-by-column-name name)
+      (user-error "Cannot sort by %s" name))))
 
 (defun tabulated-list--sort-by-column-name (name)
   (when (and name (derived-mode-p 'tabulated-list-mode))
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index e2660bf..21cf3ae 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1166,7 +1166,9 @@ Put first the functions more likely to cause a change and 
cheaper to compute.")
   (let ((changed nil))
     (goto-char font-lock-beg)
     (unless (bolp)
-      (setq changed t font-lock-beg (line-beginning-position)))
+      (setq changed t font-lock-beg
+            (let ((inhibit-field-text-motion t))
+              (line-beginning-position))))
     (goto-char font-lock-end)
     (unless (bolp)
       (unless (eq font-lock-end
diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el
index 32e22eb..75e6d04 100644
--- a/lisp/gnus/auth-source.el
+++ b/lisp/gnus/auth-source.el
@@ -340,12 +340,12 @@ If the value is not a list, symmetric encryption will be 
used."
 ;; (let ((auth-source-debug nil)) (auth-source-do-debug "hello"))
 (defun auth-source-do-debug (&rest msg)
   (when auth-source-debug
-    (apply 'auth-source-do-warn msg)))
+    (apply #'auth-source-do-warn msg)))
 
 (defun auth-source-do-trivia (&rest msg)
   (when (or (eq auth-source-debug 'trivia)
             (functionp auth-source-debug))
-    (apply 'auth-source-do-warn msg)))
+    (apply #'auth-source-do-warn msg)))
 
 (defun auth-source-do-warn (&rest msg)
   (apply
@@ -365,7 +365,7 @@ Only one of CHOICES will be returned.  The PROMPT is 
augmented
 with \"[a/b/c] \" if CHOICES is \(?a ?b ?c)."
   (when choices
     (let* ((prompt-choices
-            (apply 'concat (loop for c in choices
+            (apply #'concat (loop for c in choices
                                  collect (format "%c/" c))))
            (prompt-choices (concat "[" (substring prompt-choices 0 -1) "] "))
            (full-prompt (concat prompt prompt-choices))
@@ -685,7 +685,7 @@ actually useful.  So the caller must arrange to call this 
function.
 
 The token's :secret key can hold a function.  In that case you
 must call it to obtain the actual value."
-  (let* ((backends (mapcar 'auth-source-backend-parse auth-sources))
+  (let* ((backends (mapcar #'auth-source-backend-parse auth-sources))
          (max (or max 1))
          (ignored-keys '(:require :create :delete :max))
          (keys (loop for i below (length spec) by 2
@@ -902,7 +902,7 @@ while \(:host t) would find all host entries."
 ;; (auth-source-pick-first-password :port "imap")
 (defun auth-source-pick-first-password (&rest spec)
   "Pick the first secret found from applying SPEC to `auth-source-search'."
-  (let* ((result (nth 0 (apply 'auth-source-search (plist-put spec :max 1))))
+  (let* ((result (nth 0 (apply #'auth-source-search (plist-put spec :max 1))))
          (secret (plist-get result :secret)))
 
     (if (functionp secret)
@@ -1011,8 +1011,8 @@ Note that the MAX parameter is used so we can exit the 
parse early."
             (auth-source--aput
              auth-source-netrc-cache file
              (list :mtime (nth 5 (file-attributes file))
-                   :secret (lexical-let ((v (mapcar '1+ (buffer-string))))
-                             (lambda () (apply 'string (mapcar '1- v)))))))
+                   :secret (lexical-let ((v (mapcar #'1+ (buffer-string))))
+                             (lambda () (apply #'string (mapcar #'1- v)))))))
           (goto-char (point-min))
           (let ((entries (auth-source-netrc-parse-entries check max))
                 alist)
@@ -1152,7 +1152,7 @@ FILE is the file from which we obtained this token."
   (let ((context (epg-make-context 'OpenPGP))
         (pp-escape-newlines nil)
         cipher)
-    (epg-context-set-armor context t)
+    (setf (epg-context-armor context) t)
     (epg-context-set-passphrase-callback
      context
      (cons #'auth-source-token-passphrase-callback-function
@@ -1241,7 +1241,7 @@ See `auth-source-search' for details on SPEC."
                      ;; to get the updated data.
 
                      ;; the result will be returned, even if the search fails
-                     (apply 'auth-source-netrc-search
+                     (apply #'auth-source-netrc-search
                             (plist-put spec :create nil)))))
     results))
 
@@ -1591,7 +1591,7 @@ authentication tokens:
          ;; build a search spec without the ignored keys
          ;; if a search key is nil or t (match anything), we skip it
          (search-specs (auth-source-secrets-listify-pattern
-                        (apply 'append (mapcar
+                        (apply #'append (mapcar
                                       (lambda (k)
                                         (if (or (null (plist-get spec k))
                                                 (eq t (plist-get spec k)))
@@ -1605,7 +1605,7 @@ authentication tokens:
          (items
           (loop for search-spec in search-specs
                nconc
-               (loop for item in (apply 'secrets-search-items coll search-spec)
+               (loop for item in (apply #'secrets-search-items coll 
search-spec)
                   unless (and (stringp label)
                               (not (string-match label item)))
                   collect item)))
@@ -1620,7 +1620,7 @@ authentication tokens:
                             (lexical-let ((v (secrets-get-secret coll item)))
                               (lambda () v)))
                            ;; rewrite the entry from ((k1 v1) (k2 v2)) to plist
-                           (apply 'append
+                           (apply #'append
                                   (mapcar (lambda (entry)
                                             (list (car entry) (cdr entry)))
                                           (secrets-get-attributes coll 
item)))))
@@ -1628,7 +1628,7 @@ authentication tokens:
          ;; ensure each item has each key in `returned-keys'
          (items (mapcar (lambda (plist)
                           (append
-                           (apply 'append
+                           (apply #'append
                                   (mapcar (lambda (req)
                                             (if (plist-get plist req)
                                                 nil
@@ -1722,7 +1722,7 @@ entries for git.gnus.org:
                             collect (nth i spec)))
          ;; build a search spec without the ignored keys
          ;; if a search key is nil or t (match anything), we skip it
-         (search-spec (apply 'append (mapcar
+         (search-spec (apply #'append (mapcar
                                       (lambda (k)
                                         (if (or (null (plist-get spec k))
                                                 (eq t (plist-get spec k)))
@@ -1733,7 +1733,7 @@ entries for git.gnus.org:
          (returned-keys (mm-delete-duplicates (append
                                                '(:host :login :port :secret)
                                                search-keys)))
-         (items (apply 'auth-source-macos-keychain-search-items
+         (items (apply #'auth-source-macos-keychain-search-items
                        coll
                        type
                        max
@@ -1742,7 +1742,7 @@ entries for git.gnus.org:
          ;; ensure each item has each key in `returned-keys'
          (items (mapcar (lambda (plist)
                           (append
-                           (apply 'append
+                           (apply #'append
                                   (mapcar (lambda (req)
                                             (if (plist-get plist req)
                                                 nil
@@ -1782,7 +1782,7 @@ entries for git.gnus.org:
         (setq args (append args (list coll))))
 
       (with-temp-buffer
-        (apply 'call-process "/usr/bin/security" nil t nil args)
+        (apply #'call-process "/usr/bin/security" nil t nil args)
         (goto-char (point-min))
         (while (not (eobp))
           (cond
@@ -1850,7 +1850,7 @@ entries for git.gnus.org:
                             collect (nth i spec)))
          ;; build a search spec without the ignored keys
          ;; if a search key is nil or t (match anything), we skip it
-         (search-spec (apply 'append (mapcar
+         (search-spec (apply #'append (mapcar
                                       (lambda (k)
                                         (let ((v (plist-get spec k)))
                                           (if (or (null v)
@@ -1881,7 +1881,7 @@ entries for git.gnus.org:
          ;; ensure each item has each key in `returned-keys'
          (items (mapcar (lambda (plist)
                           (append
-                           (apply 'append
+                           (apply #'append
                                   (mapcar (lambda (req)
                                             (if (plist-get plist req)
                                                 nil
@@ -1903,7 +1903,7 @@ entries for git.gnus.org:
                    ;; to get the updated data.
 
                    ;; the result will be returned, even if the search fails
-                   (apply 'auth-source-plstore-search
+                   (apply #'auth-source-plstore-search
                           (plist-put spec :create nil)))))
      ((and delete
            item-names)
@@ -2103,7 +2103,7 @@ MODE can be \"login\" or \"password\"."
            host port username)
           found)                        ; return the found data
       ;; else, if not found, search with a max of 1
-      (let ((choice (nth 0 (apply 'auth-source-search
+      (let ((choice (nth 0 (apply #'auth-source-search
                                   (append '(:max 1) search)))))
         (when choice
           (dolist (m mode)
diff --git a/lisp/indent.el b/lisp/indent.el
index 18c1fd4..cba8f75 100644
--- a/lisp/indent.el
+++ b/lisp/indent.el
@@ -86,6 +86,22 @@ that case, indent by aligning to the previous non-blank 
line."
     ;; The normal case.
     (funcall indent-line-function)))
 
+(defun indent--default-inside-comment ()
+  (unless (or (> (current-column) (current-indentation))
+              (eq this-command last-command))
+    (let ((ppss (syntax-ppss)))
+      (when (nth 4 ppss)
+        (indent-line-to
+         (save-excursion
+           (forward-line -1)
+           (skip-chars-forward " \t")
+           (when (< (1- (point)) (nth 8 ppss) (line-end-position))
+             (goto-char (nth 8 ppss))
+             (when (looking-at comment-start-skip)
+               (goto-char (match-end 0))))
+           (current-column)))
+        t))))
+
 (defun indent-for-tab-command (&optional arg)
   "Indent the current line or region, or insert a tab, as appropriate.
 This function either inserts a tab, or indents the current line,
@@ -124,7 +140,11 @@ prefix argument is ignored."
          (old-indent (current-indentation)))
 
       ;; Indent the line.
-      (funcall indent-line-function)
+      (or (not (eq (funcall indent-line-function) 'noindent))
+          (indent--default-inside-comment)
+          (when (or (<= (current-column) (current-indentation))
+                    (not (eq tab-always-indent 'complete)))
+            (funcall (default-value 'indent-line-function))))
 
       (cond
        ;; If the text was already indented right, try completion.
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index 310384a..e4f7e7c 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -649,6 +649,68 @@ with L, LRE, or LRO Unicode bidi character type.")
         (set-case-syntax-pair c (1+ c) tbl))
     (setq c (1+ c)))
 
+  ;; Latin Extended-C
+  (setq c #x2C60)
+  (while (<= c #x2C7F)
+    (modify-category-entry c ?l)
+    (setq c (1+ c)))
+
+  (let ((pair-ranges '((#x2C60 . #x2C61)
+                       (#x2C67 . #x2C6C)
+                       (#x2C72 . #x2C73)
+                       (#x2C75 . #x2C76))))
+    (dolist (elt pair-ranges)
+      (let ((from (car elt)) (to (cdr elt)))
+        (while (< from to)
+          (set-case-syntax-pair from (1+ from) tbl)
+          (setq from (+ from 2))))))
+
+  (set-case-syntax-pair ?Ɫ ?ɫ tbl)
+  (set-case-syntax-pair ?Ᵽ ?ᵽ tbl)
+  (set-case-syntax-pair ?Ɽ ?ɽ tbl)
+  (set-case-syntax-pair ?Ɑ ?ɑ tbl)
+  (set-case-syntax-pair ?Ɱ ?ɱ tbl)
+  (set-case-syntax-pair ?Ɐ ?ɐ tbl)
+  (set-case-syntax-pair ?Ɒ ?ɒ tbl)
+  (set-case-syntax-pair ?Ȿ ?ȿ tbl)
+  (set-case-syntax-pair ?Ɀ ?ɀ tbl)
+
+  ;; Latin Extended-D
+  (setq c #xA720)
+  (while (<= c #xA7FF)
+    (modify-category-entry c ?l)
+    (setq c (1+ c)))
+
+  (let ((pair-ranges '((#xA722 . #xA72F)
+                       (#xA732 . #xA76F)
+                       (#xA779 . #xA77C)
+                       (#xA77E . #xA787)
+                       (#xA78B . #xA78E)
+                       (#xA790 . #xA793)
+                       (#xA796 . #xA7A9)
+                       (#xA7B4 . #xA7B7))))
+    (dolist (elt pair-ranges)
+      (let ((from (car elt)) (to (cdr elt)))
+        (while (< from to)
+          (set-case-syntax-pair from (1+ from) tbl)
+          (setq from (+ from 2))))))
+
+  (set-case-syntax-pair ?Ᵹ ?ᵹ tbl)
+  (set-case-syntax-pair ?Ɦ ?ɦ tbl)
+  (set-case-syntax-pair ?Ɜ ?ɜ tbl)
+  (set-case-syntax-pair ?Ɡ ?ɡ tbl)
+  (set-case-syntax-pair ?Ɬ ?ɬ tbl)
+  (set-case-syntax-pair ?Ʞ ?ʞ tbl)
+  (set-case-syntax-pair ?Ʇ ?ʇ tbl)
+  (set-case-syntax-pair ?Ʝ ?ʝ tbl)
+  (set-case-syntax-pair ?Ꭓ ?ꭓ tbl)
+
+  ;; Latin Extended-E
+  (setq c #xAB30)
+  (while (<= c #xAB64)
+    (modify-category-entry c ?l)
+    (setq c (1+ c)))
+
   ;; Greek
   (modify-category-entry '(#x0370 . #x03ff) ?g)
   (setq c #x0370)
@@ -724,14 +786,29 @@ with L, LRE, or LRO Unicode bidi character type.")
     (and (zerop (% c 2))
         (or (and (>= c #x0460) (<= c #x0480))
             (and (>= c #x048c) (<= c #x04be))
-            (and (>= c #x04d0) (<= c #x04f4)))
+            (and (>= c #x04d0) (<= c #x052e)))
         (set-case-syntax-pair c (1+ c) tbl))
     (setq c (1+ c)))
   (set-case-syntax-pair ?Ӂ ?ӂ tbl)
   (set-case-syntax-pair ?Ӄ ?ӄ tbl)
   (set-case-syntax-pair ?Ӈ ?ӈ tbl)
   (set-case-syntax-pair ?Ӌ ?ӌ tbl)
-  (set-case-syntax-pair ?Ӹ ?ӹ tbl)
+
+  (modify-category-entry '(#xA640 . #xA69F) ?y)
+  (setq c #xA640)
+  (while (<= c #xA66C)
+    (set-case-syntax-pair c (+ c 1) tbl)
+    (setq c (+ c 2)))
+  (setq c #xA680)
+  (while (<= c #xA69A)
+    (set-case-syntax-pair c (+ c 1) tbl)
+    (setq c (+ c 2)))
+
+  ;; Georgian
+  (setq c #x10A0)
+  (while (<= c #x10CD)
+    (set-case-syntax-pair c (+ c #x1C60) tbl)
+    (setq c (1+ c)))
 
   ;; general punctuation
   (setq c #x2000)
@@ -792,6 +869,12 @@ with L, LRE, or LRO Unicode bidi character type.")
     (modify-category-entry (+ c 26) ?l)
     (setq c (1+ c)))
 
+  ;; Glagolitic
+  (setq c #x2C00)
+  (while (<= c #x2C2E)
+    (set-case-syntax-pair c (+ c 48) tbl)
+    (setq c (1+ c)))
+
   ;; Coptic
   (let ((pair-ranges '((#x2C80 . #x2CE2)
                       (#x2CEB . #x2CF2))))
@@ -814,6 +897,24 @@ with L, LRE, or LRO Unicode bidi character type.")
     (modify-category-entry (+ c #x20) ?l)
     (setq c (1+ c)))
 
+  ;; Deseret
+  (setq c #x10400)
+  (while (<= c #x10427)
+    (set-case-syntax-pair c (+ c 28) tbl)
+    (setq c (1+ c)))
+
+  ;; Old Hungarian
+  (setq c #x10c80)
+  (while (<= c #x10cb2)
+    (set-case-syntax-pair c (+ c #x40) tbl)
+    (setq c (1+ c)))
+
+  ;; Warang Citi
+  (setq c #x118a0)
+  (while (<= c #x118bf)
+    (set-case-syntax-pair c (+ c #x20) tbl)
+    (setq c (1+ c)))
+
   ;; Combining diacritics
   (modify-category-entry '(#x300 . #x362) ?^)
   ;; Combining marks
diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el
index b56d31f..c03fd42 100644
--- a/lisp/language/misc-lang.el
+++ b/lisp/language/misc-lang.el
@@ -77,9 +77,10 @@ and Italian.")))
 
 (set-char-table-range
  composition-function-table
- '(#x600 . #x6FF)
- (list ["\u200D?[\u0600-\u074F]+[\u200D\u200C]*[\u0600-\u074F]+\u200D?"
-       0 font-shape-gstring]))
+ '(#x600 . #x74F)
+ (list (vector "[\u0600-\u074F\u200C\u200D]+" 0 'font-shape-gstring)
+       (vector "[\u200C\u200D][\u0600-\u074F\u200C\u200D]+"
+               1 'font-shape-gstring)))
 
 (provide 'misc-lang)
 
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 433b2ba..7d24b54 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4153,7 +4153,7 @@ process to set up.  VEC specifies the connection."
 
     ;; Disable tab and echo expansion.
     (tramp-message vec 5 "Setting up remote shell environment")
-    (tramp-send-command vec "stty tab0 -inlcr -echo kill '^U' erase '^H'" t)
+    (tramp-send-command vec "stty tab0 -inlcr -onlcr -echo kill '^U' erase 
'^H'" t)
     ;; Check whether the echo has really been disabled.  Some
     ;; implementations, like busybox of embedded GNU/Linux, don't
     ;; support disabling.
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 5c68de4..1b6a233 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1307,8 +1307,9 @@ Note that the style variables are always made local to 
the buffer."
 (defun c-after-font-lock-init ()
   ;; Put on `font-lock-mode-hook'.  This function ensures our after-change
   ;; function will get executed before the font-lock one.
-  (remove-hook 'after-change-functions 'c-after-change t)
-  (add-hook 'after-change-functions 'c-after-change nil t))
+  (when (memq #'c-after-change after-change-functions)
+    (remove-hook 'after-change-functions #'c-after-change t)
+    (add-hook 'after-change-functions #'c-after-change nil t)))
 
 (defun c-font-lock-init ()
   "Set up the font-lock variables for using the font-lock support in CC Mode.
diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el
index 6696356..b459cbf 100644
--- a/lisp/progmodes/prog-mode.el
+++ b/lisp/progmodes/prog-mode.el
@@ -132,7 +132,11 @@ narrowing is in effect."
   "Alist of symbol prettifications.
 Each element looks like (SYMBOL . CHARACTER), where the symbol
 matching SYMBOL (a string, not a regexp) will be shown as
-CHARACTER instead.")
+CHARACTER instead.
+
+CHARACTER can be a character or it can be a list or vector, in
+which case it will be used to compose the new symbol as per the
+third argument of `compose-region'.")
 
 (defun prettify-symbols-default-compose-p (start end _match)
   "Return true iff the symbol MATCH should be composed.
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index 81aeb8d..61d3a3c 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -988,7 +988,16 @@ This is really kludgy, and unneeded (i.e. obsolete) in 
Emacs>=24."
             (smie-indent-backward-token) ;Skip !
             (equal ":-" (car (smie-indent-backward-token))))
           (smie-rule-parent prolog-indent-width)))
-    (`(:after . ,(or `":-" `"-->")) prolog-indent-width)))
+    (`(:after . ":-")
+     (if (bolp)
+         (save-excursion
+           (smie-indent-forward-token)
+           (skip-chars-forward " \t")
+           (if (eolp)
+               prolog-indent-width
+             (min prolog-indent-width (current-column))))
+       prolog-indent-width))
+    (`(:after . "-->") prolog-indent-width)))
 
 
 ;;-------------------------------------------------------------------
diff --git a/lisp/term.el b/lisp/term.el
index e5ae553..41577c9 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -245,86 +245,48 @@
 ;;             ----------------------------------------
 ;;
 ;;  Notice: for directory/host/user tracking you need to have something
-;; like this in your shell startup script ( this is for tcsh but should
-;; be quite easy to port to other shells )
+;; like this in your shell startup script (this is for a POSIXish shell
+;; like Bash but should be quite easy to port to other shells)
 ;;
 ;;             ----------------------------------------
 ;;
-;;
-;;      set os = `uname`
-;;      set host = `hostname`
-;;      set date = `date`
+;;  # Set HOSTNAME if not already set.
+;;     : ${HOSTNAME=$(uname -n)}
 ;;
 ;;  # su does not change this but I'd like it to
 ;;
-;;      set user = `whoami`
+;;     USER=$(whoami)
 ;;
 ;;  # ...
 ;;
-;;      if ( eterm =~ $TERM ) then
-;;
-;;             echo 
--------------------------------------------------------------
-;;             echo Hello $user
-;;             echo Today is $date
-;;             echo We are on $host running $os under Emacs term mode
-;;             echo 
--------------------------------------------------------------
-;;
-;;             setenv EDITOR emacsclient
-;;
-;;   # Notice: $host and $user have been set before to 'hostname' and 'whoami'
-;;   # this is necessary because, f.e., certain versions of 'su' do not change
-;;   # $user, YMMV: if you don't want to fiddle with them define a couple
-;;   # of new variables and use these instead.
-;;   # NOTICE that there is a space between "AnSiT?" and $whatever NOTICE
-;;
-;;   # These are because we want the real cwd in the messages, not the login
-;;   # time one !
-;;
-;;             set cwd_hack='$cwd'
-;;             set host_hack='$host'
-;;             set user_hack='$user'
+;;     case $TERM in
+;;         eterm*)
 ;;
-;;   # Notice that the ^[ character is an ESC, not two chars.  You can
-;;   # get it in various ways, for example by typing
-;;   # echo -e '\033' > escape.file
-;;   # or by using your favorite editor
+;;             printf '%s\n' \
+;;              -------------------------------------------------------------- 
\
+;;              "Hello $user" \
+;;              "Today is $(date)" \
+;;              "We are on $HOSTNAME running $(uname) under Emacs term mode" \
+;;              --------------------------------------------------------------
 ;;
-;;             foreach temp (cd pushd)
-;;                     alias $temp "$temp \!* ; echo 'AnSiTc' $cwd_hack"
-;;             end
-;;             alias popd 'popd ;echo "AnSiTc" $cwd'
+;;             export EDITOR=emacsclient
 ;;
-;;   # Every command that can modify the user/host/directory should be aliased
-;;   # as follows for the tracking mechanism to work.
+;;             # The \033 stands for ESC.
+;;             # There is a space between "AnSiT?" and $whatever.
 ;;
-;;             foreach temp ( rlogin telnet rsh sh ksh csh tcsh zsh bash tcl 
su )
-;;                     alias $temp "$temp \!* ; echo 'AnSiTh' $host_hack ; \
-;;                                     echo 'AnSiTu' $user_hack ;echo 
'AnSiTc' $cwd_hack"
-;;             end
+;;             cd()    { command cd    "$@"; printf '\033AnSiTc %s\n' "$PWD"; }
+;;             pushd() { command pushd "$@"; printf '\033AnSiTc %s\n' "$PWD"; }
+;;             popd()  { command popd  "$@"; printf '\033AnSiTc %s\n' "$PWD"; }
 ;;
-;;   # Start up & use color ls
+;;             printf '\033AnSiTc %s\n' "$PWD"
+;;             printf '\033AnSiTh %s\n' "$HOSTNAME"
+;;             printf '\033AnSiTu %s\n' "$USER"
 ;;
-;;             echo "AnSiTh" $host
-;;             echo "AnSiTu" $user
-;;             echo "AnSiTc" $cwd
-;;
-;;   # some housekeeping
-;;
-;;             unset cwd_hack
-;;             unset host_hack
-;;             unset user_hack
-;;             unset temp
-;;
-;;             eval `/bin/dircolors /home/marco/.emacs_dircolors`
-;;    endif
+;;             eval $(dircolors $HOME/.emacs_dircolors)
+;;     esac
 ;;
 ;;  # ...
 ;;
-;;  # Let's not clutter user space
-;;
-;;      unset os
-;;      unset date
-;;
 ;;
 
 ;;; Original Commentary:
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 5f4eebd..3e84b43 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -215,7 +215,7 @@
 (defconst css-escapes-re
   "\\\\\\(?:[^\000-\037\177]\\|[0-9a-fA-F]+[ \n\t\r\f]?\\)")
 (defconst css-nmchar-re (concat "\\(?:[-[:alnum:]]\\|" css-escapes-re "\\)"))
-(defconst css-nmstart-re (concat "\\(?:[[:alpha:]]\\|" css-escapes-re "\\)"))
+(defconst css-nmstart-re (concat "\\(?:--\\)?\\(?:[[:alpha:]]\\|" 
css-escapes-re "\\)"))
 (defconst css-ident-re ;; (concat css-nmstart-re css-nmchar-re "*")
   ;; Apparently, "at rules" names can start with a dash, e.g. @-moz-keyframes.
   (concat css-nmchar-re "+"))
diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el
index 8f3f2cc..a35d411 100644
--- a/lisp/textmodes/reftex-cite.el
+++ b/lisp/textmodes/reftex-cite.el
@@ -177,6 +177,28 @@ If RETURN is non-nil, just return the entry and restore 
point."
           (progn (forward-list 1) (point)))
       (error (min (point-max) (+ 300 (point)))))))
 
+(defun reftex--query-search-regexps (default)
+  "Query for regexps for searching entries using DEFAULT as default.
+Return a list of regular expressions."
+  (split-string
+   (completing-read
+    (concat
+     "Regex { && Regex...}: "
+     "[" default "]: ")
+    ;; Ensure default is always in the completion list.
+    (let ((def (when default (list default)))
+          (coll (if reftex-mode
+                    (if (fboundp 'LaTeX-bibitem-list)
+                        (LaTeX-bibitem-list)
+                      (cdr (assoc 'bibview-cache
+                                  (symbol-value reftex-docstruct-symbol))))
+                  nil)))
+      (if (and def (member def coll))
+          coll
+        (cons def coll)))
+    nil nil nil 'reftex-cite-regexp-hist)
+   "[ \t]*&&[ \t]*"))
+
 ;;; Parse bibtex buffers
 (defun reftex-extract-bib-entries (buffers)
   "Extract bib entries which match regexps from BUFFERS.
@@ -189,20 +211,7 @@ Return list with entries."
 
     ;; Read a regexp, completing on known citation keys.
     (setq default (regexp-quote (reftex-get-bibkey-default)))
-    (setq re-list
-          (split-string
-           (completing-read
-            (concat
-             "Regex { && Regex...}: "
-             "[" default "]: ")
-            (if reftex-mode
-                (if (fboundp 'LaTeX-bibitem-list)
-                    (or (LaTeX-bibitem-list) '(""))
-                  (cdr (assoc 'bibview-cache
-                              (symbol-value reftex-docstruct-symbol))))
-              nil)
-            nil nil nil 'reftex-cite-regexp-hist)
-           "[ \t]*&&[ \t]*"))
+    (setq re-list (reftex--query-search-regexps default))
 
     (if (or (null re-list ) (equal re-list '("")))
         (setq re-list (list default)))
@@ -394,20 +403,7 @@ The environment should be located in FILES."
 
     ;; Read a regexp, completing on known citation keys.
     (setq default (regexp-quote (reftex-get-bibkey-default)))
-    (setq re-list
-          (split-string
-           (completing-read
-            (concat
-             "Regex { && Regex...}: "
-             "[" default "]: ")
-            (if reftex-mode
-                (if (fboundp 'LaTeX-bibitem-list)
-                    (LaTeX-bibitem-list)
-                  (cdr (assoc 'bibview-cache
-                              (symbol-value reftex-docstruct-symbol))))
-              nil)
-            nil nil nil 'reftex-cite-regexp-hist)
-           "[ \t]*&&[ \t]*"))
+    (setq re-list (reftex--query-search-regexps default))
 
     (if (or (null re-list ) (equal re-list '("")))
         (setq re-list (list default)))
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index fb96c6c..6641523 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -1705,7 +1705,7 @@ When DIE is non-nil, throw an error if file not found."
 (defvar message-stack)
 (if (and (featurep 'xemacs)
          (not (fboundp 'current-message)))
-    (defun current-message (&optional frame)
+    (defun current-message (&optional _frame)
       (cdr (car message-stack))))
 
 (defun reftex-visited-files (list)
@@ -2047,7 +2047,7 @@ IGNORE-WORDS List of words which should be removed from 
the string."
             (message "Sorry: cannot refontify RefTeX Select buffer."))))
       (rename-buffer oldname))))
 
-(defun reftex-select-font-lock-fontify-region (beg end &optional loudly)
+(defun reftex-select-font-lock-fontify-region (beg end &optional _loudly)
   ;; Fontify a region, but only lines starting with a dot.
   (let ((func (if (fboundp 'font-lock-default-fontify-region)
                   'font-lock-default-fontify-region
@@ -2059,7 +2059,7 @@ IGNORE-WORDS List of words which should be removed from 
the string."
       (funcall func beg1 end1 nil)
       (goto-char end1))))
 
-(defun reftex-select-font-lock-unfontify (&rest ignore) t)
+(defun reftex-select-font-lock-unfontify (&rest _ignore) t)
 
 (defun reftex-verified-face (&rest faces)
   ;; Return the first valid face in FACES, or nil if none is valid.
@@ -2341,6 +2341,7 @@ output buffer into your mail program, as it gives us 
important
 information about your RefTeX version and configuration."
   (interactive)
   (require 'reporter)
+  (defvar reporter-prompt-for-summary-p)
   (let ((reporter-prompt-for-summary-p "Bug report subject: "))
     (reporter-submit-bug-report
      "address@hidden, address@hidden"
@@ -2446,7 +2447,7 @@ of ENTRY-LIST is a list of cons cells (\"MACRONAME\" . 
LEVEL).  See
 
 ;;;***
 
-;;;### (autoloads nil "reftex-cite" "reftex-cite.el" 
"751df6ee674ea533b755e8cda4ad1cf8")
+;;;### (autoloads nil "reftex-cite" "reftex-cite.el" 
"7eaa61c05a6578999ea68f1be0fbcf49")
 ;;; Generated autoloads from reftex-cite.el
 
 (autoload 'reftex-default-bibliography "reftex-cite" "\
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index cbeded2..45afafc 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -1,4 +1,4 @@
-;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands
+;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 1985-1986, 1989, 1992, 1994-1999, 2001-2015 Free
 ;; Software Foundation, Inc.
@@ -368,7 +368,7 @@ An alternative value is \" . \", if you use a font with a 
narrow period."
                              (match-end 1))
                             latex-section-alist))))
          (backward-char 1)
-         (condition-case err
+         (condition-case nil
              (progn
                ;; Using sexps allows some use of matching {...} inside
                ;; titles.
@@ -937,7 +937,7 @@ Inherits `shell-mode-map' with a few additions.")
     ,@tex-face-alist)
   "Alist of face and LaTeX font name for facemenu.")
 
-(defun tex-facemenu-add-face-function (face end)
+(defun tex-facemenu-add-face-function (face _end)
   (or (cdr (assq face tex-face-alist))
       (or (and (consp face)
               (consp (car face))
@@ -1982,7 +1982,7 @@ In the tex shell buffer this command behaves like 
`comint-send-input'."
   (display-buffer (tex-shell-buf))
   (tex-recenter-output-buffer nil))
 
-(defun tex-shell-sentinel (proc msg)
+(defun tex-shell-sentinel (proc _msg)
   (cond ((null (buffer-name (process-buffer proc)))
         ;; buffer killed
         (set-process-buffer proc nil)
@@ -2762,10 +2762,11 @@ Runs the shell command defined by 
`tex-show-queue-command'."
     st)
   "Syntax table used while computing indentation.")
 
-(defun latex-indent (&optional arg)
+(defun latex-indent (&optional _arg)
   (if (and (eq (get-text-property (if (and (eobp) (bolp))
                                       (max (point-min) (1- (point)))
-                                    (line-beginning-position)) 'face)
+                                    (line-beginning-position))
+                                  'face)
               'tex-verbatim))
       'noindent
     (with-syntax-table tex-latex-indent-syntax-table
@@ -3375,6 +3376,7 @@ There might be text before point."
     ("\\wr" . ?≀)
     ("\\Bbb{N}" . ?ℕ)                  ; AMS commands for blackboard bold
     ("\\Bbb{P}" . ?ℙ)                  ; Also sometimes \mathbb.
+    ("\\Bbb{Q}" . ?ℚ)
     ("\\Bbb{R}" . ?ℝ)
     ("\\Bbb{Z}" . ?ℤ)
     ("--" . ?–)
@@ -3407,7 +3409,7 @@ There might be text before point."
     ("\\textreferencemark" . ?※))
   "A `prettify-symbols-alist' usable for (La)TeX modes.")
 
-(defun tex--prettify-symbols-compose-p (start end _match)
+(defun tex--prettify-symbols-compose-p (_start end _match)
   (let* ((after-char (char-after end))
          (after-syntax (char-syntax after-char)))
     (not (or
diff --git a/make-dist b/make-dist
index 79db904..48a2836 100755
--- a/make-dist
+++ b/make-dist
@@ -110,7 +110,7 @@ while [ $# -gt 0 ]; do
      ;;
 
     "--help")
-      echo "Usage: ${progname} [options]"
+      printf '%s\n' "Usage: ${progname} [options]"
       echo ""
       echo "  --bzip2  use bzip2 instead of gzip"
       echo "  --clean-up       delete staging directories when done"
@@ -128,7 +128,7 @@ while [ $# -gt 0 ]; do
     ;;
 
     * )
-      echo "${progname}: Unrecognized argument: $1" >&2
+      printf '%s\n' "${progname}: Unrecognized argument: $1" >&2
       exit 1
     ;;
   esac
@@ -137,9 +137,9 @@ done
 
 ### Make sure we're running in the right place.
 if [ ! -d src -o ! -f src/lisp.h -o ! -d lisp -o ! -f lisp/subr.el ]; then
-  echo "${progname}: Can't find 'src/lisp.h' and 'lisp/subr.el'." >&2
-  echo "${progname} must be run in the top directory of the Emacs" >&2
-  echo "distribution tree.  cd to that directory and try again." >&2
+  printf '%s\n' "${progname}: Can't find 'src/lisp.h' and 'lisp/subr.el'." >&2
+  printf '%s\n' "${progname} must be run in the top directory of the Emacs" >&2
+  printf '%s\n' "distribution tree.  cd to that directory and try again." >&2
   exit 1
 fi
 
@@ -155,7 +155,7 @@ then
       /*) ;;
       *)
        if [ ! -f "$EMACS" ]; then
-         echo "$0: You must set the EMACS environment variable " \
+         printf '%s\n' "$0: You must set the EMACS environment variable " \
               "to an absolute file name." 2>&1
          exit 1
        fi;;
@@ -168,7 +168,8 @@ version=`
   sed -n 's/^AC_INIT(GNU Emacs,[        ]*\([^  ,)]*\).*/\1/p' <configure.ac
 ` || version=
 if [ ! "${version}" ]; then
-  echo "${progname}: can't find current Emacs version in './src/emacs.c'" >&2
+  printf '%s\n' \
+    "${progname}: can't find current Emacs version in './src/emacs.c'" >&2
   exit 1
 fi
 
@@ -195,7 +196,7 @@ fi
 ### Make sure the subdirectory is available.
 tempparent="make-dist.tmp.$$"
 if [ -d ${tempparent} ]; then
-  echo "${progname}: staging directory '${tempparent}' already exists.
+  printf '%s\n' "${progname}: staging directory '${tempparent}' already exists.
 Perhaps a previous invocation of '${progname}' failed to clean up after
 itself.  Check that directories whose names are of the form
 'make-dist.tmp.NNNNN' don't contain any important information, remove
@@ -530,7 +531,7 @@ for subdir in . etc leim lib lib-src lisp lwlib msdos nt 
src; do
 done
 
 if [ "${newer}" ]; then
-  echo "Removing files older than $newer"
+  printf '%s\n' "Removing files older than $newer"
   ## We remove .elc files unconditionally, on the theory that anyone picking
   ## up an incremental distribution already has a running Emacs to byte-compile
   ## them with.
@@ -544,8 +545,9 @@ find ${tempparent} \( -name '*~' -o -name '#*#' -o -name 
'.*ignore' -o -name '=*
 if [ "${make_tar}" = yes ]; then
   echo "Looking for $default_gzip"
   found=0
-  temppath=`echo $PATH | sed -e 's/^:/.:/' -e 's/::/:.:/g' -e 's/:$/:./' \
-     -e 's/:/ /g'`
+  temppath=`printf '%s\n' "$PATH" |
+    sed -e 's/^:/.:/' -e 's/::/:.:/g' -e 's/:$/:./' -e 's/:/ /g'
+  `
   for dir in ${temppath}; do
     [ -x ${dir}/$default_gzip ] || continue
     found=1; break
diff --git a/src/Makefile.in b/src/Makefile.in
index ad2dd05..875a317 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -453,7 +453,7 @@ all: emacs$(EXEEXT) $(OTHER_FILES)
 shortlisp =
 lisp.mk: $(lispsource)/loadup.el
        @rm -f $@
-       ${AM_V_GEN}( echo "shortlisp = \\"; \
+       ${AM_V_GEN}( printf 'shortlisp = \\\n'; \
        sed -n 's/^[ \t]*(load "\([^"]*\)".*/\1/p' $< | \
          sed -e 's/$$/.elc \\/' -e 's/\.el\.elc/.el/'; \
        echo "" ) > $@
diff --git a/src/alloc.c b/src/alloc.c
index 3ab2a6e..5fc40d1 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6217,7 +6217,7 @@ mark_object (Lisp_Object arg)
          MARK_STRING (XSTRING (ptr->name));
        MARK_INTERVAL_TREE (string_intervals (ptr->name));
        /* Inner loop to mark next symbol in this bucket, if any.  */
-       ptr = ptr->next;
+       po = ptr = ptr->next;
        if (ptr)
          goto nextsym;
       }
diff --git a/src/bidi.c b/src/bidi.c
index 9427b81..e3b1f54 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -2948,7 +2948,7 @@ bidi_resolve_neutral (struct bidi_it *bidi_it)
                            we are already at paragraph end.  */
        && (is_neutral || bidi_isolate_fmt_char (type)))
       /* N1-N2/Retaining */
-      || (type == WEAK_BN && bidi_explicit_dir_char (bidi_it->ch)))
+      || type == WEAK_BN)
     {
       if (bidi_it->next_for_neutral.type != UNKNOWN_BT)
        {
@@ -2978,6 +2978,7 @@ bidi_resolve_neutral (struct bidi_it *bidi_it)
         entering the expensive loop in the "else" clause.  */
       else if (current_level == 0
               && bidi_it->prev_for_neutral.type == STRONG_L
+              && type != WEAK_BN
               && !bidi_explicit_dir_char (bidi_it->ch)
               && !bidi_isolate_fmt_char (type))
        type = bidi_resolve_neutral_1 (bidi_it->prev_for_neutral.type,
@@ -2991,6 +2992,7 @@ bidi_resolve_neutral (struct bidi_it *bidi_it)
               && (bidi_it->prev_for_neutral.type == STRONG_R
                   || bidi_it->prev_for_neutral.type == WEAK_EN
                   || bidi_it->prev_for_neutral.type == WEAK_AN)
+              && type != WEAK_BN
               && !bidi_explicit_dir_char (bidi_it->ch)
               && !bidi_isolate_fmt_char (type))
        type = bidi_resolve_neutral_1 (bidi_it->prev_for_neutral.type,
@@ -3216,6 +3218,7 @@ bidi_level_of_next_char (struct bidi_it *bidi_it)
      it belongs to a sequence of WS characters preceding a newline
      or a TAB or a paragraph separator.  */
   if ((bidi_it->orig_type == NEUTRAL_WS
+       || bidi_it->orig_type == WEAK_BN
        || bidi_isolate_fmt_char (bidi_it->orig_type))
       && bidi_it->next_for_ws.charpos < bidi_it->charpos)
     {
@@ -3249,11 +3252,14 @@ bidi_level_of_next_char (struct bidi_it *bidi_it)
 
   /* Resolve implicit levels.  */
   if (bidi_it->orig_type == NEUTRAL_B /* L1 */
-          || bidi_it->orig_type == NEUTRAL_S
-          || bidi_it->ch == '\n' || bidi_it->ch == BIDI_EOB
-          || (bidi_it->orig_type == NEUTRAL_WS
-              && (bidi_it->next_for_ws.type == NEUTRAL_B
-                  || bidi_it->next_for_ws.type == NEUTRAL_S)))
+      || bidi_it->orig_type == NEUTRAL_S
+      || bidi_it->ch == '\n' || bidi_it->ch == BIDI_EOB
+      || ((bidi_it->orig_type == NEUTRAL_WS
+          || bidi_it->orig_type == WEAK_BN
+          || bidi_isolate_fmt_char (bidi_it->orig_type)
+          || bidi_explicit_dir_char (bidi_it->ch))
+         && (bidi_it->next_for_ws.type == NEUTRAL_B
+             || bidi_it->next_for_ws.type == NEUTRAL_S)))
     level = bidi_it->level_stack[0].level;
   else if ((level & 1) == 0) /* I1 */
     {
diff --git a/src/buffer.c b/src/buffer.c
index 677a408..0b15ca1 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -6244,7 +6244,7 @@ If nil, only shows a cursor in the selected window.
 If t, displays a cursor related to the usual cursor type
 (a solid box becomes hollow, a bar becomes a narrower bar).
 You can also specify the cursor type as in the `cursor-type' variable.
-Use Custom to set this variable and update the display."  */);
+Use Custom to set this variable and update the display.  */);
 
   DEFVAR_LISP ("kill-buffer-query-functions", Vkill_buffer_query_functions,
               doc: /* List of functions called with no args to query before 
killing a buffer.
diff --git a/src/cmds.c b/src/cmds.c
index ccc6891..39c5af9 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -307,8 +307,8 @@ At the end, it runs `post-self-insert-hook'.  */)
 {
   CHECK_NUMBER (n);
 
-  if (XFASTINT (n) < 0)
-    error ("Negative repetition argument %"pI"d", XFASTINT (n));
+  if (XINT (n) < 0)
+    error ("Negative repetition argument %"pI"d", XINT (n));
 
   if (XFASTINT (n) < 2)
     remove_excessive_undo_boundaries ();
@@ -316,14 +316,15 @@ At the end, it runs `post-self-insert-hook'.  */)
   /* Barf if the key that invoked this was not a character.  */
   if (!CHARACTERP (last_command_event))
     bitch_at_user ();
-  else {
-    int character = translate_char (Vtranslation_table_for_input,
-                                   XINT (last_command_event));
-    int val = internal_self_insert (character, XFASTINT (n));
-    if (val == 2)
-      nonundocount = 0;
-    frame_make_pointer_invisible (SELECTED_FRAME ());
-  }
+  else
+    {
+      int character = translate_char (Vtranslation_table_for_input,
+                                     XINT (last_command_event));
+      int val = internal_self_insert (character, XFASTINT (n));
+      if (val == 2)
+       nonundocount = 0;
+      frame_make_pointer_invisible (SELECTED_FRAME ());
+    }
 
   return Qnil;
 }
diff --git a/src/conf_post.h b/src/conf_post.h
index 785e5d7..2c3eee5 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -316,6 +316,11 @@ extern int emacs_setenv_TZ (char const *);
 
    before including config.h or any other .h file.
    Other .c files should not define INLINE.
+   For Emacs, this is done by having emacs.c first '#define INLINE
+   EXTERN_INLINE' and then include every .h file that uses INLINE.
+
+   The INLINE_HEADER_BEGIN and INLINE_HEADER_END suppress bogus
+   warnings in some GCC versions; see ../m4/extern-inline.m4.
 
    C99 compilers compile functions like 'incr' as C99-style extern
    inline functions.  Buggy GCC implementations do something similar with
diff --git a/src/data.c b/src/data.c
index eda6110..b85d8a7 100644
--- a/src/data.c
+++ b/src/data.c
@@ -560,7 +560,7 @@ DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0,
   (register Lisp_Object cell, Lisp_Object newcar)
 {
   CHECK_CONS (cell);
-  CHECK_IMPURE (cell);
+  CHECK_IMPURE (cell, XCONS (cell));
   XSETCAR (cell, newcar);
   return newcar;
 }
@@ -570,7 +570,7 @@ DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0,
   (register Lisp_Object cell, Lisp_Object newcdr)
 {
   CHECK_CONS (cell);
-  CHECK_IMPURE (cell);
+  CHECK_IMPURE (cell, XCONS (cell));
   XSETCDR (cell, newcdr);
   return newcdr;
 }
@@ -2215,10 +2215,10 @@ bool-vector.  IDX starts at 0.  */)
   CHECK_NUMBER (idx);
   idxval = XINT (idx);
   CHECK_ARRAY (array, Qarrayp);
-  CHECK_IMPURE (array);
 
   if (VECTORP (array))
     {
+      CHECK_IMPURE (array, XVECTOR (array));
       if (idxval < 0 || idxval >= ASIZE (array))
        args_out_of_range (array, idx);
       ASET (array, idxval, newelt);
@@ -2238,6 +2238,7 @@ bool-vector.  IDX starts at 0.  */)
     {
       int c;
 
+      CHECK_IMPURE (array, XSTRING (array));
       if (idxval < 0 || idxval >= SCHARS (array))
        args_out_of_range (array, idx);
       CHECK_CHARACTER (newelt);
diff --git a/src/emacs.c b/src/emacs.c
index aabb2f2..85a5a82 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -85,6 +85,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #include "syntax.h"
 #include "sysselect.h"
 #include "systime.h"
+#include "puresize.h"
 
 #include "gnutls.h"
 
diff --git a/src/frame.c b/src/frame.c
index f1a78fb..77ead08 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -396,7 +396,7 @@ adjust_frame_size (struct frame *f, int new_width, int 
new_height, int inhibit,
   int old_windows_width = WINDOW_PIXEL_WIDTH (r);
   int old_windows_height
     = (WINDOW_PIXEL_HEIGHT (r)
-       + (FRAME_HAS_MINIBUF_P (f)
+       + ((FRAME_HAS_MINIBUF_P (f) && !FRAME_MINIBUF_ONLY_P (f))
          ? WINDOW_PIXEL_HEIGHT (XWINDOW (FRAME_MINIBUF_WINDOW (f)))
          : 0));
   int new_windows_width, new_windows_height;
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 725e330..34e81b5 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -583,9 +583,7 @@ xg_check_special_colors (struct frame *f,
              (unsigned) (col.red * 65535),
              (unsigned) (col.green * 65535),
              (unsigned) (col.blue * 65535));
-    success_p = (XParseColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f),
-                             buf, color)
-                != 0);
+    success_p = x_parse_color (f, buf, color) != 0;
 #else
     GtkStyle *gsty = gtk_widget_get_style (FRAME_GTK_WIDGET (f));
     GdkColor *grgb = get_bg
diff --git a/src/image.c b/src/image.c
index b586c53..c702782 100644
--- a/src/image.c
+++ b/src/image.c
@@ -647,7 +647,7 @@ image_error (const char *format, ...)
 static void
 image_size_error (void)
 {
-  image_error ("Invalid image size (see `%s')", "max-image-size");
+  image_error ("Invalid image size (see `max-image-size')");
 }
 
 
@@ -1107,10 +1107,7 @@ get_spec_bg_or_alpha_as_argb (struct image *img,
   XColor xbgcolor;
   Lisp_Object bg = image_spec_value (img->spec, QCbackground, NULL);
 
-  if (STRINGP (bg) && XParseColor (FRAME_X_DISPLAY (f),
-                                   FRAME_X_COLORMAP (f),
-                                   SSDATA (bg),
-                                   &xbgcolor))
+  if (STRINGP (bg) && x_parse_color (f, SSDATA (bg), &xbgcolor))
     bgcolor = xcolor_to_argb32 (xbgcolor);
 
   return bgcolor;
@@ -3240,7 +3237,10 @@ static struct xpm_cached_color *xpm_cache_color (struct 
frame *, char *,
 /* An entry in a hash table used to cache color definitions of named
    colors.  This cache is necessary to speed up XPM image loading in
    case we do color allocations ourselves.  Without it, we would need
-   a call to XParseColor per pixel in the image.  */
+   a call to XParseColor per pixel in the image.
+
+   FIXME Now that we're using x_parse_color and its cache, reevaluate
+   the need for this caching layer.  */
 
 struct xpm_cached_color
 {
@@ -3275,8 +3275,7 @@ xpm_init_color_cache (struct frame *f, XpmAttributes 
*attrs)
       XColor color;
 
       for (i = 0; i < attrs->numsymbols; ++i)
-       if (XParseColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f),
-                        attrs->colorsymbols[i].value, &color))
+       if (x_parse_color (f, attrs->colorsymbols[i].value, &color))
          {
            color.pixel = lookup_rgb_color (f, color.red, color.green,
                                            color.blue);
@@ -3355,8 +3354,7 @@ xpm_lookup_color (struct frame *f, char *color_name, 
XColor *color)
 
   if (p != NULL)
     *color = p->color;
-  else if (XParseColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f),
-                       color_name, color))
+  else if (x_parse_color (f, color_name, color))
     {
       color->pixel = lookup_rgb_color (f, color->red, color->green,
                                       color->blue);
@@ -4432,8 +4430,6 @@ lookup_rgb_color (struct frame *f, int r, int g, int b)
   dpyinfo = FRAME_DISPLAY_INFO (f);
   if (dpyinfo->red_bits > 0)
     {
-      unsigned long pr, pg, pb;
-
       /* Apply gamma-correction like normal color allocation does.  */
       if (f->gamma)
        {
@@ -4443,15 +4439,7 @@ lookup_rgb_color (struct frame *f, int r, int g, int b)
          r = color.red, g = color.green, b = color.blue;
        }
 
-      /* Scale down RGB values to the visual's bits per RGB, and shift
-        them to the right position in the pixel color.  Note that the
-        original RGB values are 16-bit values, as usual in X.  */
-      pr = (r >> (16 - dpyinfo->red_bits))   << dpyinfo->red_offset;
-      pg = (g >> (16 - dpyinfo->green_bits)) << dpyinfo->green_offset;
-      pb = (b >> (16 - dpyinfo->blue_bits))  << dpyinfo->blue_offset;
-
-      /* Assemble the pixel color.  */
-      return pr | pg | pb;
+      return x_make_truecolor_pixel (dpyinfo, r, g, b);
     }
 
   for (p = ct_table[i]; p; p = p->next)
@@ -9003,7 +8991,7 @@ DEF_DLL_FN (int, gdk_pixbuf_get_bits_per_sample, (const 
GdkPixbuf *));
 DEF_DLL_FN (void, g_type_init, (void));
 #  endif
 DEF_DLL_FN (void, g_object_unref, (gpointer));
-DEF_DLL_FN (void, g_error_free, (GError *));
+DEF_DLL_FN (void, g_clear_error, (GError **));
 
 static bool
 init_svg_functions (void)
@@ -9041,7 +9029,7 @@ init_svg_functions (void)
   LOAD_DLL_FN (gobject, g_type_init);
 #  endif
   LOAD_DLL_FN (gobject, g_object_unref);
-  LOAD_DLL_FN (glib, g_error_free);
+  LOAD_DLL_FN (glib, g_clear_error);
 
   return 1;
 }
@@ -9057,7 +9045,7 @@ init_svg_functions (void)
 #  undef gdk_pixbuf_get_pixels
 #  undef gdk_pixbuf_get_rowstride
 #  undef gdk_pixbuf_get_width
-#  undef g_error_free
+#  undef g_clear_error
 #  undef g_object_unref
 #  undef g_type_init
 #  undef rsvg_handle_close
@@ -9075,7 +9063,7 @@ init_svg_functions (void)
 #  define gdk_pixbuf_get_pixels fn_gdk_pixbuf_get_pixels
 #  define gdk_pixbuf_get_rowstride fn_gdk_pixbuf_get_rowstride
 #  define gdk_pixbuf_get_width fn_gdk_pixbuf_get_width
-#  define g_error_free fn_g_error_free
+#  define g_clear_error fn_g_clear_error
 #  define g_object_unref fn_g_object_unref
 #  define g_type_init fn_g_type_init
 #  define rsvg_handle_close fn_rsvg_handle_close
@@ -9330,7 +9318,7 @@ svg_load_image (struct frame *f,         /* Pointer to 
emacs frame structure.  *
   /* FIXME: Use error->message so the user knows what is the actual
      problem with the image.  */
   image_error ("Error parsing SVG image `%s'", img->spec);
-  g_error_free (err);
+  g_clear_error (&err);
   return 0;
 }
 
@@ -9543,7 +9531,6 @@ void
 x_kill_gs_process (Pixmap pixmap, struct frame *f)
 {
   struct image_cache *c = FRAME_IMAGE_CACHE (f);
-  int class;
   ptrdiff_t i;
   struct image *img;
 
@@ -9569,8 +9556,7 @@ x_kill_gs_process (Pixmap pixmap, struct frame *f)
   /* On displays with a mutable colormap, figure out the colors
      allocated for the image by looking at the pixels of an XImage for
      img->pixmap.  */
-  class = FRAME_X_VISUAL (f)->class;
-  if (class != StaticColor && class != StaticGray && class != TrueColor)
+  if (x_mutable_colormap (FRAME_X_VISUAL (f)))
     {
       XImagePtr ximg;
 
diff --git a/src/indent.c b/src/indent.c
index 584f217..330065b 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2082,7 +2082,11 @@ whether or not it is currently displayed in some window. 
 */)
        }
       else
        it_overshoot_count =
-         !(it.method == GET_FROM_IMAGE || it.method == GET_FROM_STRETCH);
+         (!(it.method == GET_FROM_IMAGE
+            || it.method == GET_FROM_STRETCH)
+           /* We will overshoot if lines are truncated and PT lies
+              beyond the right margin of the window.  */
+           || it.line_wrap == TRUNCATE);
 
       if (start_x_given)
        {
diff --git a/src/intervals.c b/src/intervals.c
index 78e0f50..1c8dd41 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -91,11 +91,9 @@ create_root_interval (Lisp_Object parent)
 {
   INTERVAL new;
 
-  CHECK_IMPURE (parent);
-
   new = make_interval ();
 
-  if (BUFFERP (parent))
+  if (! STRINGP (parent))
     {
       new->total_length = (BUF_Z (XBUFFER (parent))
                           - BUF_BEG (XBUFFER (parent)));
@@ -103,15 +101,16 @@ create_root_interval (Lisp_Object parent)
       set_buffer_intervals (XBUFFER (parent), new);
       new->position = BEG;
     }
-  else if (STRINGP (parent))
+  else
     {
+      CHECK_IMPURE (parent, XSTRING (parent));
       new->total_length = SCHARS (parent);
       eassert (TOTAL_LENGTH (new) >= 0);
       set_string_intervals (parent, new);
       new->position = 0;
     }
   eassert (LENGTH (new) > 0);
-  
+
   set_interval_object (new, parent);
 
   return new;
diff --git a/src/keymap.c b/src/keymap.c
index 6a8d129..81091f0 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -341,7 +341,7 @@ Return PARENT.  PARENT should be nil or another keymap.  */)
         If we came to the end, add the parent in PREV.  */
       if (!CONSP (list) || KEYMAPP (list))
        {
-         CHECK_IMPURE (prev);
+         CHECK_IMPURE (prev, XCONS (prev));
          XSETCDR (prev, parent);
          return parent;
        }
@@ -750,7 +750,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object 
idx, Lisp_Object def)
 
   /* If we are preparing to dump, and DEF is a menu element
      with a menu item indicator, copy it to ensure it is not pure.  */
-  if (CONSP (def) && PURE_P (def)
+  if (CONSP (def) && PURE_P (XCONS (def))
       && (EQ (XCAR (def), Qmenu_item) || STRINGP (XCAR (def))))
     def = Fcons (XCAR (def), XCDR (def));
 
@@ -798,7 +798,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object 
idx, Lisp_Object def)
          {
            if (NATNUMP (idx) && XFASTINT (idx) < ASIZE (elt))
              {
-               CHECK_IMPURE (elt);
+               CHECK_IMPURE (elt, XVECTOR (elt));
                ASET (elt, XFASTINT (idx), def);
                return def;
              }
@@ -851,7 +851,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object 
idx, Lisp_Object def)
              }
            else if (EQ (idx, XCAR (elt)))
              {
-               CHECK_IMPURE (elt);
+               CHECK_IMPURE (elt, XCONS (elt));
                XSETCDR (elt, def);
                return def;
              }
@@ -895,7 +895,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object 
idx, Lisp_Object def)
        }
       else
        elt = Fcons (idx, def);
-      CHECK_IMPURE (insertion_point);
+      CHECK_IMPURE (insertion_point, XCONS (insertion_point));
       XSETCDR (insertion_point, Fcons (elt, XCDR (insertion_point)));
     }
   }
diff --git a/src/puresize.h b/src/puresize.h
index b72fb6c..c61b31f 100644
--- a/src/puresize.h
+++ b/src/puresize.h
@@ -16,6 +16,8 @@ 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/>.  */
 
+INLINE_HEADER_BEGIN
+
 /* Define PURESIZE, the number of bytes of pure Lisp code to leave space for.
 
    At one point, this was defined in config.h, meaning that changing
@@ -70,16 +72,23 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #define PURESIZE  (BASE_PURESIZE * PURESIZE_RATIO * PURESIZE_CHECKING_RATIO)
 #endif
 
-/* Signal an error if OBJ is pure.  */
-#define CHECK_IMPURE(obj) \
-  { if (PURE_P (obj))    \
-      pure_write_error (obj); }
-
 extern _Noreturn void pure_write_error (Lisp_Object);
-
-/* Define PURE_P.  */
 
 extern EMACS_INT pure[];
 
-#define PURE_P(obj) \
-  ((uintptr_t) XPNTR (obj) - (uintptr_t) pure <= PURESIZE)
+/* True if PTR is pure.  */
+INLINE bool
+PURE_P (void *ptr)
+{
+  return (uintptr_t) (ptr) - (uintptr_t) pure <= PURESIZE;
+}
+
+/* Signal an error if OBJ is pure.  PTR is OBJ untagged.  */
+INLINE void
+CHECK_IMPURE (Lisp_Object obj, void *ptr)
+{
+  if (PURE_P (ptr))
+    pure_write_error (obj);
+}
+
+INLINE_HEADER_END
diff --git a/src/syntax.c b/src/syntax.c
index cacdf18..6bfb3b7 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -3672,6 +3672,7 @@ See the info node `(elisp)Syntax Properties' for a 
description of the
              doc: /* Position up to which syntax-table properties have been 
set.  */);
   syntax_propertize__done = -1;
   DEFSYM (Qinternal__syntax_propertize, "internal--syntax-propertize");
+  Fmake_variable_buffer_local (intern ("syntax-propertize--done"));
 
   words_include_escapes = 0;
   DEFVAR_BOOL ("words-include-escapes", words_include_escapes,
diff --git a/src/window.c b/src/window.c
index 6d98f29..a2d1538 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3974,7 +3974,6 @@ resize_frame_windows (struct frame *f, int size, bool 
horflag, bool pixelwise)
   /* old_size is the old size of the frame's root window.  */
   int old_size = horflag ? r->total_cols : r->total_lines;
   int old_pixel_size = horflag ? r->pixel_width : r->pixel_height;
-  int old_pixel_top = r->pixel_top;
   /* new_size is the new size of the frame's root window.  */
   int new_size, new_pixel_size;
   int unit = horflag ? FRAME_COLUMN_WIDTH (f) : FRAME_LINE_HEIGHT (f);
@@ -4004,11 +4003,8 @@ resize_frame_windows (struct frame *f, int size, bool 
horflag, bool pixelwise)
       new_pixel_size = new_size * unit;
     }
 
-  r->top_line = FRAME_TOP_MARGIN (f);
-  r->pixel_top = FRAME_TOP_MARGIN_HEIGHT (f);
-
   if (new_pixel_size == old_pixel_size
-      && r->pixel_top == old_pixel_top)
+      && (horflag || r->pixel_top == FRAME_TOP_MARGIN_HEIGHT (f)))
     ;
   else if (WINDOW_LEAF_P (r))
     /* For a leaf root window just set the size.  */
@@ -4019,6 +4015,9 @@ resize_frame_windows (struct frame *f, int size, bool 
horflag, bool pixelwise)
       }
     else
       {
+       r->top_line = FRAME_TOP_MARGIN (f);
+       r->pixel_top = FRAME_TOP_MARGIN_HEIGHT (f);
+
        r->total_lines = new_size;
        r->pixel_height = new_pixel_size;
       }
@@ -4026,6 +4025,12 @@ resize_frame_windows (struct frame *f, int size, bool 
horflag, bool pixelwise)
     {
       Lisp_Object delta;
 
+      if (!horflag)
+       {
+         r->top_line = FRAME_TOP_MARGIN (f);
+         r->pixel_top = FRAME_TOP_MARGIN_HEIGHT (f);
+       }
+
       if (pixelwise)
        XSETINT (delta, new_pixel_size - old_pixel_size);
       else
diff --git a/src/xfaces.c b/src/xfaces.c
index 8cf0b42..a3d122f 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -454,11 +454,9 @@ DEFUN ("dump-colors", Fdump_colors, Sdump_colors, 0, 0, 0,
 void
 x_free_colors (struct frame *f, unsigned long *pixels, int npixels)
 {
-  int class = FRAME_DISPLAY_INFO (f)->visual->class;
-
   /* If display has an immutable color map, freeing colors is not
      necessary and some servers don't allow it.  So don't do it.  */
-  if (class != StaticColor && class != StaticGray && class != TrueColor)
+  if (x_mutable_colormap (FRAME_X_VISUAL (f)))
     {
 #ifdef DEBUG_X_COLORS
       unregister_colors (pixels, npixels);
@@ -471,7 +469,7 @@ x_free_colors (struct frame *f, unsigned long *pixels, int 
npixels)
 
 #ifdef USE_X_TOOLKIT
 
-/* Free colors used on frame F.  PIXELS is an array of NPIXELS pixel
+/* Free colors used on display DPY.  PIXELS is an array of NPIXELS pixel
    color values.  Interrupt input must be blocked when this function
    is called.  */
 
@@ -480,11 +478,10 @@ x_free_dpy_colors (Display *dpy, Screen *screen, Colormap 
cmap,
                   unsigned long *pixels, int npixels)
 {
   struct x_display_info *dpyinfo = x_display_info_for_display (dpy);
-  int class = dpyinfo->visual->class;
 
   /* If display has an immutable color map, freeing colors is not
      necessary and some servers don't allow it.  So don't do it.  */
-  if (class != StaticColor && class != StaticGray && class != TrueColor)
+  if (x_mutable_colormap (dpyinfo->visual))
     {
 #ifdef DEBUG_X_COLORS
       unregister_colors (pixels, npixels);
diff --git a/src/xfns.c b/src/xfns.c
index fc6111c..fefd8e8 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -250,19 +250,15 @@ x_real_pos_and_offsets (struct frame *f,
 
   if (! had_errors)
     {
-      unsigned int ign;
+      unsigned int bw, ign;
       Window child, rootw;
 
       /* Get the real coordinates for the WM window upper left corner */
       XGetGeometry (FRAME_X_DISPLAY (f), win,
-                    &rootw, &real_x, &real_y, &ow, &oh, &ign, &ign);
+                    &rootw, &real_x, &real_y, &ow, &oh, &bw, &ign);
 
       if (outer_border)
-        {
-          XWindowAttributes atts;
-          XGetWindowAttributes (FRAME_X_DISPLAY (f), win, &atts);
-          *outer_border = atts.border_width;
-        }
+        *outer_border = bw;
 
       /* Translate real coordinates to coordinates relative to our
          window.  For our window, the upper left corner is 0, 0.
@@ -309,8 +305,7 @@ x_real_pos_and_offsets (struct frame *f,
       had_errors = x_had_errors_p (FRAME_X_DISPLAY (f));
     }
 
-
-  if (dpyinfo->root_window == f->output_data.x->parent_desc)
+  if (!had_errors && dpyinfo->root_window == f->output_data.x->parent_desc)
     {
       /* Try _NET_FRAME_EXTENTS if our parent is the root window.  */
       rc = XGetWindowProperty (dpy, win, dpyinfo->Xatom_net_frame_extents,
@@ -321,20 +316,16 @@ x_real_pos_and_offsets (struct frame *f,
       if (rc == Success && actual_type == target_type && !x_had_errors_p (dpy)
           && actual_size == 4 && actual_format == 32)
         {
-          unsigned int ign;
-          Window rootw;
           long *fe = (long *)tmp_data;
 
-          XGetGeometry (FRAME_X_DISPLAY (f), win,
-                        &rootw, &real_x, &real_y, &ign, &ign, &ign, &ign);
           outer_x = -fe[0];
           outer_y = -fe[2];
           real_x -= fe[0];
           real_y -= fe[2];
         }
-    }
 
-  if (tmp_data) XFree (tmp_data);
+      if (tmp_data) XFree (tmp_data);
+    }
 
   x_uncatch_errors ();
 
@@ -446,7 +437,6 @@ x_defined_color (struct frame *f, const char *color_name,
                 XColor *color, bool alloc_p)
 {
   bool success_p = false;
-  Display *dpy = FRAME_X_DISPLAY (f);
   Colormap cmap = FRAME_X_COLORMAP (f);
 
   block_input ();
@@ -454,7 +444,7 @@ x_defined_color (struct frame *f, const char *color_name,
   success_p = xg_check_special_colors (f, color_name, color);
 #endif
   if (!success_p)
-    success_p = XParseColor (dpy, cmap, color_name, color) != 0;
+    success_p = x_parse_color (f, color_name, color) != 0;
   if (success_p && alloc_p)
     success_p = x_alloc_nearest_color (f, cmap, color);
   unblock_input ();
@@ -675,15 +665,95 @@ x_set_background_color (struct frame *f, Lisp_Object arg, 
Lisp_Object oldval)
     }
 }
 
+/* This array must stay in sync with the mouse_cursor_types array below!  */
+enum mouse_cursor {
+  mouse_cursor_text,
+  mouse_cursor_nontext,
+  mouse_cursor_hourglass,
+  mouse_cursor_mode,
+  mouse_cursor_hand,
+  mouse_cursor_horizontal_drag,
+  mouse_cursor_vertical_drag,
+  mouse_cursor_max
+};
+
+struct mouse_cursor_types {
+  /* Printable name for error messages (optional).  */
+  const char *name;
+
+  /* Lisp variable controlling the cursor shape.  */
+  /* FIXME: A couple of these variables are defined in the C code but
+     are not actually accessible from Lisp.  They should probably be
+     made accessible or removed.  */
+  Lisp_Object *shape_var_ptr;
+
+  /* The default shape.  */
+  int default_shape;
+};
+
+/* This array must stay in sync with enum mouse_cursor above!  */
+static const struct mouse_cursor_types mouse_cursor_types[] = {
+  { "text",      &Vx_pointer_shape,                XC_xterm             },
+  { "nontext",   &Vx_nontext_pointer_shape,        XC_left_ptr          },
+  { "hourglass", &Vx_hourglass_pointer_shape,      XC_watch             },
+  { "modeline",  &Vx_mode_pointer_shape,           XC_xterm             },
+  { NULL,        &Vx_sensitive_text_pointer_shape, XC_hand2             },
+  { NULL,        &Vx_window_horizontal_drag_shape, XC_sb_h_double_arrow },
+  { NULL,        &Vx_window_vertical_drag_shape,   XC_sb_v_double_arrow },
+};
+
+struct mouse_cursor_data {
+  /* Last index for which XCreateFontCursor has been called, and thus
+     the last index for which x_request_serial[] is valid.  */
+  int last_cursor_create_request;
+
+  /* Last index for which an X error event was received in response to
+     attempting to create the cursor.  */
+  int error_cursor;
+
+  /* Cursor numbers chosen.  */
+  unsigned int cursor_num[mouse_cursor_max];
+
+  /* Allocated Cursor values, or zero for failed attempts.  */
+  Cursor cursor[mouse_cursor_max];
+
+  /* X serial numbers for the first request sent by XCreateFontCursor.
+     Note that there may be more than one request sent.  */
+  unsigned long x_request_serial[mouse_cursor_max];
+
+  /* If an error has been received, a pointer to where the current
+     error-message text is stored.  */
+  char *error_string;
+};
+
+static void
+x_set_mouse_color_handler (Display *dpy, XErrorEvent *event,
+                          char *error_string, void *data)
+{
+  struct mouse_cursor_data *cursor_data = data;
+  int i;
+
+  cursor_data->error_cursor = -1;
+  cursor_data->error_string = error_string;
+  for (i = 0; i < cursor_data->last_cursor_create_request; i++)
+    {
+      if (event->serial >= cursor_data->x_request_serial[i])
+       cursor_data->error_cursor = i;
+    }
+  if (cursor_data->error_cursor >= 0)
+    /* If we failed to allocate it, don't try to free it.  */
+    cursor_data->cursor[cursor_data->error_cursor] = 0;
+}
+
 static void
 x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   struct x_output *x = f->output_data.x;
   Display *dpy = FRAME_X_DISPLAY (f);
-  Cursor cursor, nontext_cursor, mode_cursor, hand_cursor;
-  Cursor hourglass_cursor, horizontal_drag_cursor, vertical_drag_cursor;
+  struct mouse_cursor_data cursor_data = { -1, -1 };
   unsigned long pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
   unsigned long mask_color = FRAME_BACKGROUND_PIXEL (f);
+  int i;
 
   /* Don't let pointers be invisible.  */
   if (mask_color == pixel)
@@ -695,137 +765,93 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, 
Lisp_Object oldval)
   unload_color (f, x->mouse_pixel);
   x->mouse_pixel = pixel;
 
+  for (i = 0; i < mouse_cursor_max; i++)
+    {
+      Lisp_Object shape_var = *mouse_cursor_types[i].shape_var_ptr;
+      if (!NILP (shape_var))
+       {
+         CHECK_TYPE_RANGED_INTEGER (unsigned, shape_var);
+         cursor_data.cursor_num[i] = XINT (shape_var);
+       }
+      else
+       cursor_data.cursor_num[i] = mouse_cursor_types[i].default_shape;
+    }
+
   block_input ();
 
   /* It's not okay to crash if the user selects a screwy cursor.  */
-  x_catch_errors (dpy);
+  x_catch_errors_with_handler (dpy, x_set_mouse_color_handler, &cursor_data);
 
-  if (!NILP (Vx_pointer_shape))
+  for (i = 0; i < mouse_cursor_max; i++)
     {
-      CHECK_NUMBER (Vx_pointer_shape);
-      cursor = XCreateFontCursor (dpy, XINT (Vx_pointer_shape));
+      cursor_data.x_request_serial[i] = XNextRequest (dpy);
+      cursor_data.last_cursor_create_request = i;
+      cursor_data.cursor[i] = XCreateFontCursor (dpy,
+                                                cursor_data.cursor_num[i]);
     }
-  else
-    cursor = XCreateFontCursor (dpy, XC_xterm);
-  x_check_errors (dpy, "bad text pointer cursor: %s");
 
-  if (!NILP (Vx_nontext_pointer_shape))
+  /* Now sync up and process all received errors from cursor
+     creation.  */
+  if (x_had_errors_p (dpy))
     {
-      CHECK_NUMBER (Vx_nontext_pointer_shape);
-      nontext_cursor
-       = XCreateFontCursor (dpy, XINT (Vx_nontext_pointer_shape));
-    }
-  else
-    nontext_cursor = XCreateFontCursor (dpy, XC_left_ptr);
-  x_check_errors (dpy, "bad nontext pointer cursor: %s");
+      const char *bad_cursor_name = NULL;
+      /* Bounded by X_ERROR_MESSAGE_SIZE in xterm.c.  */
+      size_t message_length = strlen (cursor_data.error_string);
+      char *xmessage = alloca (1 + message_length);
+      memcpy (xmessage, cursor_data.error_string, message_length);
 
-  if (!NILP (Vx_hourglass_pointer_shape))
-    {
-      CHECK_NUMBER (Vx_hourglass_pointer_shape);
-      hourglass_cursor
-       = XCreateFontCursor (dpy, XINT (Vx_hourglass_pointer_shape));
-    }
-  else
-    hourglass_cursor = XCreateFontCursor (dpy, XC_watch);
-  x_check_errors (dpy, "bad hourglass pointer cursor: %s");
+      x_uncatch_errors ();
 
-  if (!NILP (Vx_mode_pointer_shape))
-    {
-      CHECK_NUMBER (Vx_mode_pointer_shape);
-      mode_cursor = XCreateFontCursor (dpy, XINT (Vx_mode_pointer_shape));
-    }
-  else
-    mode_cursor = XCreateFontCursor (dpy, XC_xterm);
-  x_check_errors (dpy, "bad modeline pointer cursor: %s");
+      /* Free any successfully created cursors.  */
+      for (i = 0; i < mouse_cursor_max; i++)
+       if (cursor_data.cursor[i] != 0)
+         XFreeCursor (dpy, cursor_data.cursor[i]);
 
-  if (!NILP (Vx_sensitive_text_pointer_shape))
-    {
-      CHECK_NUMBER (Vx_sensitive_text_pointer_shape);
-      hand_cursor
-       = XCreateFontCursor (dpy, XINT (Vx_sensitive_text_pointer_shape));
+      /* This should only be able to fail if the server's serial
+        number tracking is broken.  */
+      if (cursor_data.error_cursor >= 0)
+       bad_cursor_name = mouse_cursor_types[cursor_data.error_cursor].name;
+      if (bad_cursor_name)
+       error ("bad %s pointer cursor: %s", bad_cursor_name, xmessage);
+      else
+       error ("can't set cursor shape: %s", xmessage);
     }
-  else
-    hand_cursor = XCreateFontCursor (dpy, XC_hand2);
 
-  if (!NILP (Vx_window_horizontal_drag_shape))
-    {
-      CHECK_TYPE_RANGED_INTEGER (unsigned, Vx_window_horizontal_drag_shape);
-      horizontal_drag_cursor
-       = XCreateFontCursor (dpy, XINT (Vx_window_horizontal_drag_shape));
-    }
-  else
-    horizontal_drag_cursor
-      = XCreateFontCursor (dpy, XC_sb_h_double_arrow);
+  x_uncatch_errors_after_check ();
 
-  if (!NILP (Vx_window_vertical_drag_shape))
-    {
-      CHECK_NUMBER (Vx_window_vertical_drag_shape);
-      vertical_drag_cursor
-       = XCreateFontCursor (dpy, XINT (Vx_window_vertical_drag_shape));
-    }
-  else
-    vertical_drag_cursor
-      = XCreateFontCursor (dpy, XC_sb_v_double_arrow);
+  {
+    XColor colors[2]; /* 0=foreground, 1=background */
 
-  /* Check and report errors with the above calls.  */
-  x_check_errors (dpy, "can't set cursor shape: %s");
-  x_uncatch_errors ();
+    colors[0].pixel = x->mouse_pixel;
+    colors[1].pixel = mask_color;
+    x_query_colors (f, colors, 2);
 
-  {
-    XColor fore_color, back_color;
-
-    fore_color.pixel = x->mouse_pixel;
-    x_query_color (f, &fore_color);
-    back_color.pixel = mask_color;
-    x_query_color (f, &back_color);
-
-    XRecolorCursor (dpy, cursor, &fore_color, &back_color);
-    XRecolorCursor (dpy, nontext_cursor, &fore_color, &back_color);
-    XRecolorCursor (dpy, mode_cursor, &fore_color, &back_color);
-    XRecolorCursor (dpy, hand_cursor, &fore_color, &back_color);
-    XRecolorCursor (dpy, hourglass_cursor, &fore_color, &back_color);
-    XRecolorCursor (dpy, horizontal_drag_cursor, &fore_color, &back_color);
-    XRecolorCursor (dpy, vertical_drag_cursor, &fore_color, &back_color);
+    for (i = 0; i < mouse_cursor_max; i++)
+      XRecolorCursor (dpy, cursor_data.cursor[i], &colors[0], &colors[1]);
   }
 
   if (FRAME_X_WINDOW (f) != 0)
-    XDefineCursor (dpy, FRAME_X_WINDOW (f),
-                   f->output_data.x->current_cursor = cursor);
-
-  if (cursor != x->text_cursor
-      && x->text_cursor != 0)
-    XFreeCursor (dpy, x->text_cursor);
-  x->text_cursor = cursor;
-
-  if (nontext_cursor != x->nontext_cursor
-      && x->nontext_cursor != 0)
-    XFreeCursor (dpy, x->nontext_cursor);
-  x->nontext_cursor = nontext_cursor;
-
-  if (hourglass_cursor != x->hourglass_cursor
-      && x->hourglass_cursor != 0)
-    XFreeCursor (dpy, x->hourglass_cursor);
-  x->hourglass_cursor = hourglass_cursor;
-
-  if (mode_cursor != x->modeline_cursor
-      && x->modeline_cursor != 0)
-    XFreeCursor (dpy, f->output_data.x->modeline_cursor);
-  x->modeline_cursor = mode_cursor;
-
-  if (hand_cursor != x->hand_cursor
-      && x->hand_cursor != 0)
-    XFreeCursor (dpy, x->hand_cursor);
-  x->hand_cursor = hand_cursor;
-
-  if (horizontal_drag_cursor != x->horizontal_drag_cursor
-      && x->horizontal_drag_cursor != 0)
-    XFreeCursor (dpy, x->horizontal_drag_cursor);
-  x->horizontal_drag_cursor = horizontal_drag_cursor;
-
-  if (vertical_drag_cursor != x->vertical_drag_cursor
-      && x->vertical_drag_cursor != 0)
-    XFreeCursor (dpy, x->vertical_drag_cursor);
-  x->vertical_drag_cursor = vertical_drag_cursor;
+    {
+      f->output_data.x->current_cursor = cursor_data.cursor[mouse_cursor_text];
+      XDefineCursor (dpy, FRAME_X_WINDOW (f),
+                    f->output_data.x->current_cursor);
+    }
+
+#define INSTALL_CURSOR(FIELD, SHORT_INDEX)                             \
+  eassert (x->FIELD != cursor_data.cursor[mouse_cursor_ ## SHORT_INDEX]); \
+  if (x->FIELD != 0)                                                   \
+    XFreeCursor (dpy, x->FIELD);                                       \
+  x->FIELD = cursor_data.cursor[mouse_cursor_ ## SHORT_INDEX];
+
+  INSTALL_CURSOR (text_cursor, text);
+  INSTALL_CURSOR (nontext_cursor, nontext);
+  INSTALL_CURSOR (hourglass_cursor, hourglass);
+  INSTALL_CURSOR (modeline_cursor, mode);
+  INSTALL_CURSOR (hand_cursor, hand);
+  INSTALL_CURSOR (horizontal_drag_cursor, horizontal_drag);
+  INSTALL_CURSOR (vertical_drag_cursor, vertical_drag);
+
+#undef INSTALL_CURSOR
 
   XFlush (dpy);
   unblock_input ();
@@ -5315,7 +5341,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
     Atom type = FRAME_DISPLAY_INFO (f)->Xatom_net_window_type_tooltip;
 
     block_input ();
-    mask = CWBackPixel | CWOverrideRedirect | CWEventMask;
+    mask = CWBackPixel | CWOverrideRedirect | CWEventMask | CWCursor;
     if (DoesSaveUnders (dpyinfo->screen))
       mask |= CWSaveUnder;
 
@@ -5325,6 +5351,9 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
     attrs.override_redirect = True;
     attrs.save_under = True;
     attrs.background_pixel = FRAME_BACKGROUND_PIXEL (f);
+    attrs.cursor =
+      f->output_data.x->current_cursor
+      = f->output_data.x->text_cursor;
     /* Arrange for getting MapNotify and UnmapNotify events.  */
     attrs.event_mask = StructureNotifyMask;
     tip_window
diff --git a/src/xftfont.c b/src/xftfont.c
index a1846e8..851edb6 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -111,8 +111,7 @@ xftfont_get_colors (struct frame *f, struct face *face, GC 
gc,
          colors[0].pixel = fg->pixel = xgcv.foreground;
          if (bg)
            colors[1].pixel = bg->pixel = xgcv.background;
-         XQueryColors (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), colors,
-                       bg ? 2 : 1);
+         x_query_colors (f, colors, bg ? 2 : 1);
          fg->color.alpha = 0xFFFF;
          fg->color.red = colors[0].red;
          fg->color.green = colors[0].green;
diff --git a/src/xmenu.c b/src/xmenu.c
index f183c70..192ed89 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -325,7 +325,7 @@ If FRAME is nil or not given, use the selected frame.  */)
                              /* Child of win.  */
                              &child);
       error_p = x_had_errors_p (FRAME_X_DISPLAY (f));
-      x_uncatch_errors ();
+      x_uncatch_errors_after_check ();
 
       if (! error_p)
         {
diff --git a/src/xselect.c b/src/xselect.c
index 9aaa10c..9a7e697 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -316,7 +316,7 @@ x_own_selection (Lisp_Object selection_name, Lisp_Object 
selection_value,
   x_catch_errors (display);
   XSetSelectionOwner (display, selection_atom, selecting_window, timestamp);
   x_check_errors (display, "Can't set selection: %s");
-  x_uncatch_errors ();
+  x_uncatch_errors_after_check ();
   unblock_input ();
 
   /* Now update the local cache */
@@ -1179,7 +1179,7 @@ x_get_foreign_selection (Lisp_Object selection_symbol, 
Lisp_Object target_type,
   XConvertSelection (display, selection_atom, type_atom, target_property,
                     requestor_window, requestor_time);
   x_check_errors (display, "Can't convert selection: %s");
-  x_uncatch_errors ();
+  x_uncatch_errors_after_check ();
 
   /* Prepare to block until the reply has been read.  */
   reading_selection_window = requestor_window;
@@ -2364,7 +2364,7 @@ If the value is 0 or the atom is not known, return the 
empty string.  */)
   x_catch_errors (dpy);
   name = atom ? XGetAtomName (dpy, atom) : empty;
   had_errors_p = x_had_errors_p (dpy);
-  x_uncatch_errors ();
+  x_uncatch_errors_after_check ();
 
   if (!had_errors_p)
     ret = build_string (name);
diff --git a/src/xterm.c b/src/xterm.c
index 5507693..d32ca0f 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2200,6 +2200,50 @@ x_query_colors (struct frame *f, XColor *colors, int 
ncolors)
 {
   struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
 
+  if (dpyinfo->red_bits > 0)
+    {
+      /* For TrueColor displays, we can decompose the RGB value
+        directly.  */
+      int i;
+      unsigned int rmult, gmult, bmult;
+      unsigned int rmask, gmask, bmask;
+
+      rmask = (1 << dpyinfo->red_bits) - 1;
+      gmask = (1 << dpyinfo->green_bits) - 1;
+      bmask = (1 << dpyinfo->blue_bits) - 1;
+      /* If we're widening, for example, 8 bits in the pixel value to
+        16 bits for the separate-color representation, we want to
+        extrapolate the lower bits based on those bits available --
+        in other words, we'd like 0xff to become 0xffff instead of
+        the 0xff00 we'd get by just zero-filling the lower bits.
+
+         We generate a 32-bit scaled-up value and shift it, in case
+         the bit count doesn't divide 16 evently (e.g., when dealing
+         with a 3-3-2 bit RGB display), to get more of the lower bits
+         correct.
+
+         Should we cache the multipliers in dpyinfo?  Maybe
+         special-case the 8-8-8 common case?  */
+      rmult = 0xffffffff / rmask;
+      gmult = 0xffffffff / gmask;
+      bmult = 0xffffffff / bmask;
+
+      for (i = 0; i < ncolors; ++i)
+       {
+         unsigned int r, g, b;
+         unsigned long pixel = colors[i].pixel;
+
+         r = (pixel >> dpyinfo->red_offset) & rmask;
+         g = (pixel >> dpyinfo->green_offset) & gmask;
+         b = (pixel >> dpyinfo->blue_offset) & bmask;
+
+         colors[i].red = (r * rmult) >> 16;
+         colors[i].green = (g * gmult) >> 16;
+         colors[i].blue = (b * bmult) >> 16;
+       }
+      return;
+    }
+
   if (dpyinfo->color_cells)
     {
       int i;
@@ -2210,9 +2254,10 @@ x_query_colors (struct frame *f, XColor *colors, int 
ncolors)
          eassert (dpyinfo->color_cells[pixel].pixel == pixel);
          colors[i] = dpyinfo->color_cells[pixel];
        }
+      return;
     }
-  else
-    XQueryColors (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), colors, ncolors);
+
+  XQueryColors (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), colors, ncolors);
 }
 
 
@@ -2226,6 +2271,51 @@ x_query_color (struct frame *f, XColor *color)
 }
 
 
+/* On frame F, translate the color name to RGB values.  Use cached
+   information, if possible.
+
+   Note that there is currently no way to clean old entries out of the
+   cache.  However, it is limited to names in the server's database,
+   and names we've actually looked up; list-colors-display is probably
+   the most color-intensive case we're likely to hit.  */
+
+Status x_parse_color (struct frame *f, const char *color_name,
+                     XColor *color)
+{
+  Display *dpy = FRAME_X_DISPLAY (f);
+  Colormap cmap = FRAME_X_COLORMAP (f);
+  struct color_name_cache_entry *cache_entry;
+
+  if (color_name[0] == '#')
+    {
+      /* The hex form is parsed directly by XParseColor without
+        talking to the X server.  No need for caching.  */
+      return XParseColor (dpy, cmap, color_name, color);
+    }
+
+  for (cache_entry = FRAME_DISPLAY_INFO (f)->color_names; cache_entry;
+       cache_entry = cache_entry->next)
+    {
+      if (!xstrcasecmp(cache_entry->name, color_name))
+       {
+         *color = cache_entry->rgb;
+         return 1;
+       }
+    }
+
+  if (XParseColor (dpy, cmap, color_name, color) == 0)
+    /* No caching of negative results, currently.  */
+    return 0;
+
+  cache_entry = xzalloc (sizeof *cache_entry);
+  cache_entry->rgb = *color;
+  cache_entry->name = xstrdup (color_name);
+  cache_entry->next = FRAME_DISPLAY_INFO (f)->color_names;
+  FRAME_DISPLAY_INFO (f)->color_names = cache_entry;
+  return 1;
+}
+
+
 /* Allocate the color COLOR->pixel on DISPLAY, colormap CMAP.  If an
    exact match can't be allocated, try the nearest color available.
    Value is true if successful.  Set *COLOR to the color
@@ -2298,15 +2388,27 @@ x_alloc_nearest_color_1 (Display *dpy, Colormap cmap, 
XColor *color)
 }
 
 
-/* Allocate the color COLOR->pixel on frame F, colormap CMAP.  If an
-   exact match can't be allocated, try the nearest color available.
-   Value is true if successful.  Set *COLOR to the color
-   allocated.  */
+/* Allocate the color COLOR->pixel on frame F, colormap CMAP, after
+   gamma correction.  If an exact match can't be allocated, try the
+   nearest color available.  Value is true if successful.  Set *COLOR
+   to the color allocated.  */
 
 bool
 x_alloc_nearest_color (struct frame *f, Colormap cmap, XColor *color)
 {
+  struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
+
   gamma_correct (f, color);
+
+  if (dpyinfo->red_bits > 0)
+    {
+      color->pixel = x_make_truecolor_pixel (dpyinfo,
+                                            color->red,
+                                            color->green,
+                                            color->blue);
+      return true;
+    }
+
   return x_alloc_nearest_color_1 (FRAME_X_DISPLAY (f), cmap, color);
 }
 
@@ -2320,8 +2422,16 @@ x_copy_color (struct frame *f, unsigned long pixel)
 {
   XColor color;
 
+  /* If display has an immutable color map, freeing colors is not
+     necessary and some servers don't allow it.  Since we won't free a
+     color once we've allocated it, we don't need to re-allocate it to
+     maintain the server's reference count.  */
+  if (!x_mutable_colormap (FRAME_X_VISUAL (f)))
+    return pixel;
+
   color.pixel = pixel;
   block_input ();
+  /* The color could still be found in the color_cells array.  */
   x_query_color (f, &color);
   XAllocColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), &color);
   unblock_input ();
@@ -4891,7 +5001,7 @@ XTmouse_position (struct frame **fp, int insist, 
Lisp_Object *bar_window,
        if (x_had_errors_p (FRAME_X_DISPLAY (*fp)))
          f1 = 0;
 
-       x_uncatch_errors ();
+       x_uncatch_errors_after_check ();
 
        /* If not, is it one of our scroll bars?  */
        if (! f1)
@@ -7379,6 +7489,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
      says that a portable program can't use this, but Stephen Gildea assures
      me that letting the compiler initialize it to zeros will work okay.  */
   static XComposeStatus compose_status;
+  XEvent configureEvent;
+  XEvent next_event;
 
   USE_SAFE_ALLOCA;
 
@@ -7439,9 +7551,6 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                                        the only valid choice.  */
                                     RevertToParent,
                                     event->xclient.data.l[1]);
-                    /* This is needed to detect the error
-                       if there is an error.  */
-                    XSync (d, False);
                     x_uncatch_errors ();
                   }
                 /* Not certain about handling scroll bars here */
@@ -8291,17 +8400,41 @@ handle_one_xevent (struct x_display_info *dpyinfo,
       }
 
     case ConfigureNotify:
-      f = x_top_window_to_frame (dpyinfo, event->xconfigure.window);
+      /* An opaque move can generate a stream of events as the window
+         is dragged around.  If the connection round trip time isn't
+         really short, they may come faster than we can respond to
+         them, given the multiple queries we can do to check window
+         manager state, translate coordinates, etc.
+
+         So if this ConfigureNotify is immediately followed by another
+         for the same window, use the info from the latest update, and
+         consider the events all handled.  */
+      /* Opaque resize may be trickier; ConfigureNotify events are
+         mixed with Expose events for multiple windows.  */
+      configureEvent = *event;
+      while (XPending (dpyinfo->display))
+        {
+          XNextEvent (dpyinfo->display, &next_event);
+          if (next_event.type != ConfigureNotify
+              || next_event.xconfigure.window != event->xconfigure.window)
+            {
+              XPutBackEvent (dpyinfo->display, &next_event);
+              break;
+            }
+          else
+           configureEvent = next_event;
+        }
+      f = x_top_window_to_frame (dpyinfo, configureEvent.xconfigure.window);
 #ifdef USE_CAIRO
       if (f) x_cr_destroy_surface (f);
 #endif
 #ifdef USE_GTK
       if (!f
           && (f = any)
-          && event->xconfigure.window == FRAME_X_WINDOW (f))
+          && configureEvent.xconfigure.window == FRAME_X_WINDOW (f))
         {
-          xg_frame_resized (f, event->xconfigure.width,
-                            event->xconfigure.height);
+          xg_frame_resized (f, configureEvent.xconfigure.width,
+                            configureEvent.xconfigure.height);
 #ifdef USE_CAIRO
           x_cr_destroy_surface (f);
 #endif
@@ -8310,24 +8443,26 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 #endif
       if (f)
         {
-         x_net_wm_state (f, event->xconfigure.window);
+         x_net_wm_state (f, configureEvent.xconfigure.window);
 
 #ifdef USE_X_TOOLKIT
           /* Tip frames are pure X window, set size for them.  */
           if (! NILP (tip_frame) && XFRAME (tip_frame) == f)
             {
-              if (FRAME_PIXEL_HEIGHT (f) != event->xconfigure.height
-                  || FRAME_PIXEL_WIDTH (f) != event->xconfigure.width)
+              if (FRAME_PIXEL_HEIGHT (f) != configureEvent.xconfigure.height
+                  || FRAME_PIXEL_WIDTH (f) != configureEvent.xconfigure.width)
                 SET_FRAME_GARBAGED (f);
-              FRAME_PIXEL_HEIGHT (f) = event->xconfigure.height;
-              FRAME_PIXEL_WIDTH (f) = event->xconfigure.width;
+              FRAME_PIXEL_HEIGHT (f) = configureEvent.xconfigure.height;
+              FRAME_PIXEL_WIDTH (f) = configureEvent.xconfigure.width;
             }
 #endif
 
 #ifndef USE_X_TOOLKIT
 #ifndef USE_GTK
-          int width = FRAME_PIXEL_TO_TEXT_WIDTH (f, event->xconfigure.width);
-          int height = FRAME_PIXEL_TO_TEXT_HEIGHT (f, 
event->xconfigure.height);
+          int width =
+           FRAME_PIXEL_TO_TEXT_WIDTH (f, configureEvent.xconfigure.width);
+          int height =
+           FRAME_PIXEL_TO_TEXT_HEIGHT (f, configureEvent.xconfigure.height);
 
           /* In the toolkit version, change_frame_size
              is called by the code that handles resizing
@@ -8338,8 +8473,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
              to check the pixel dimensions as well.  */
           if (width != FRAME_TEXT_WIDTH (f)
               || height != FRAME_TEXT_HEIGHT (f)
-              || event->xconfigure.width != FRAME_PIXEL_WIDTH (f)
-              || event->xconfigure.height != FRAME_PIXEL_HEIGHT (f))
+              || configureEvent.xconfigure.width != FRAME_PIXEL_WIDTH (f)
+              || configureEvent.xconfigure.height != FRAME_PIXEL_HEIGHT (f))
             {
               change_frame_size (f, width, height, false, true, false, true);
              x_clear_under_internal_border (f);
@@ -9097,6 +9232,8 @@ x_text_icon (struct frame *f, const char *icon_name)
 struct x_error_message_stack {
   char string[X_ERROR_MESSAGE_SIZE];
   Display *dpy;
+  x_special_error_handler handler;
+  void *handler_data;
   struct x_error_message_stack *prev;
 };
 static struct x_error_message_stack *x_error_message;
@@ -9111,6 +9248,9 @@ x_error_catcher (Display *display, XErrorEvent *event)
   XGetErrorText (display, event->error_code,
                 x_error_message->string,
                 X_ERROR_MESSAGE_SIZE);
+  if (x_error_message->handler)
+    x_error_message->handler (display, event, x_error_message->string,
+                             x_error_message->handler_data);
 }
 
 /* Begin trapping X errors for display DPY.  Actually we trap X errors
@@ -9124,10 +9264,14 @@ x_error_catcher (Display *display, XErrorEvent *event)
    Calling x_check_errors signals an Emacs error if an X error has
    occurred since the last call to x_catch_errors or x_check_errors.
 
-   Calling x_uncatch_errors resumes the normal error handling.  */
+   Calling x_uncatch_errors resumes the normal error handling.
+   Calling x_uncatch_errors_after_check is similar, but skips an XSync
+   to the server, and should be used only immediately after
+   x_had_errors_p or x_check_errors.  */
 
 void
-x_catch_errors (Display *dpy)
+x_catch_errors_with_handler (Display *dpy, x_special_error_handler handler,
+                            void *handler_data)
 {
   struct x_error_message_stack *data = xmalloc (sizeof *data);
 
@@ -9136,10 +9280,37 @@ x_catch_errors (Display *dpy)
 
   data->dpy = dpy;
   data->string[0] = 0;
+  data->handler = handler;
+  data->handler_data = handler_data;
   data->prev = x_error_message;
   x_error_message = data;
 }
 
+void
+x_catch_errors (Display *dpy)
+{
+  x_catch_errors_with_handler (dpy, NULL, NULL);
+}
+
+/* Undo the last x_catch_errors call.
+   DPY should be the display that was passed to x_catch_errors.
+
+   This version should be used only if the immediately preceding
+   X-protocol-related thing was x_check_errors or x_had_error_p, both
+   of which issue XSync calls, so we don't need to re-sync here.  */
+
+void
+x_uncatch_errors_after_check (void)
+{
+  struct x_error_message_stack *tmp;
+
+  block_input ();
+  tmp = x_error_message;
+  x_error_message = x_error_message->prev;
+  xfree (tmp);
+  unblock_input ();
+}
+
 /* Undo the last x_catch_errors call.
    DPY should be the display that was passed to x_catch_errors.  */
 
@@ -9833,10 +10004,9 @@ x_wm_supports (struct frame *f, Atom want_atom)
 
   /* Check if window exists. */
   XSelectInput (dpy, wmcheck_window, StructureNotifyMask);
-  x_sync (f);
   if (x_had_errors_p (dpy))
     {
-      x_uncatch_errors ();
+      x_uncatch_errors_after_check ();
       unblock_input ();
       return false;
     }
@@ -12133,6 +12303,7 @@ static void
 x_delete_display (struct x_display_info *dpyinfo)
 {
   struct terminal *t;
+  struct color_name_cache_entry *color_entry, *next_color_entry;
 
   /* Close all frames and delete the generic struct terminal for this
      X display.  */
@@ -12162,6 +12333,15 @@ x_delete_display (struct x_display_info *dpyinfo)
          tail->next = tail->next->next;
     }
 
+  for (color_entry = dpyinfo->color_names;
+       color_entry;
+       color_entry = next_color_entry)
+    {
+      next_color_entry = color_entry->next;
+      xfree (color_entry->name);
+      xfree (color_entry);
+    }
+
   xfree (dpyinfo->x_id_name);
   xfree (dpyinfo->x_dnd_atoms);
   xfree (dpyinfo->color_cells);
diff --git a/src/xterm.h b/src/xterm.h
index 6165906..f7d2803 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -153,6 +153,17 @@ struct x_gc_ext_data
 #endif
 
 
+struct color_name_cache_entry
+{
+  struct color_name_cache_entry *next;
+  XColor rgb;
+  char *name;
+};
+
+Status x_parse_color (struct frame *f, const char *color_name,
+                     XColor *color);
+
+
 /* For each X display, we have a structure that records
    information about it.  */
 
@@ -385,6 +396,9 @@ struct x_display_info
   struct xim_inst_t *xim_callback_data;
 #endif
 
+  /* A cache mapping color names to RGB values.  */
+  struct color_name_cache_entry *color_names;
+
   /* If non-null, a cache of the colors in the color map.  Don't
      use this directly, call x_color_cells instead.  */
   XColor *color_cells;
@@ -1010,12 +1024,18 @@ XrmDatabase x_load_resources (Display *, const char *, 
const char *,
 
 /* Defined in xterm.c */
 
+typedef void (*x_special_error_handler)(Display *, XErrorEvent *, char *,
+                                       void *);
+
 extern bool x_text_icon (struct frame *, const char *);
 extern void x_catch_errors (Display *);
+extern void x_catch_errors_with_handler (Display *, x_special_error_handler,
+                                        void *);
 extern void x_check_errors (Display *, const char *)
   ATTRIBUTE_FORMAT_PRINTF (2, 0);
 extern bool x_had_errors_p (Display *);
 extern void x_uncatch_errors (void);
+extern void x_uncatch_errors_after_check (void);
 extern void x_clear_errors (Display *);
 extern void xembed_request_focus (struct frame *);
 extern void x_ewmh_activate_frame (struct frame *);
@@ -1071,6 +1091,33 @@ x_display_set_last_user_time (struct x_display_info 
*dpyinfo, Time t)
   dpyinfo->last_user_time = t;
 }
 
+INLINE unsigned long
+x_make_truecolor_pixel (struct x_display_info *dpyinfo, int r, int g, int b)
+{
+  unsigned long pr, pg, pb;
+
+  /* Scale down RGB values to the visual's bits per RGB, and shift
+     them to the right position in the pixel color.  Note that the
+     original RGB values are 16-bit values, as usual in X.  */
+  pr = (r >> (16 - dpyinfo->red_bits))   << dpyinfo->red_offset;
+  pg = (g >> (16 - dpyinfo->green_bits)) << dpyinfo->green_offset;
+  pb = (b >> (16 - dpyinfo->blue_bits))  << dpyinfo->blue_offset;
+
+  /* Assemble the pixel color.  */
+  return pr | pg | pb;
+}
+
+/* If display has an immutable color map, freeing colors is not
+   necessary and some servers don't allow it, so we won't do it.  That
+   also allows us to make other optimizations relating to server-side
+   reference counts.  */
+INLINE bool
+x_mutable_colormap (Visual *visual)
+{
+  int class = visual->class;
+  return (class != StaticColor && class != StaticGray && class != TrueColor);
+}
+
 extern void x_set_sticky (struct frame *, Lisp_Object, Lisp_Object);
 extern bool x_wm_supports (struct frame *, Atom);
 extern void x_wait_for_event (struct frame *, int);
diff --git a/test/automated/cmds-tests.el b/test/automated/cmds-tests.el
new file mode 100644
index 0000000..7e742a1
--- /dev/null
+++ b/test/automated/cmds-tests.el
@@ -0,0 +1,34 @@
+;;; cmds-tests.el --- Testing some Emacs commands
+
+;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
+
+;; Author: Nicolas Richard <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:
+
+;;
+
+;;; Code:
+
+
+(ert-deftest self-insert-command-with-negative-argument ()
+  "Test `self-insert-command' with a negative argument."
+  (let ((last-command-event ?a))
+    (should-error (self-insert-command -1))))
+
+(provide 'cmds-tests)
+;;; cmds-tests.el ends here
diff --git a/test/automated/package-test.el b/test/automated/package-test.el
index ae10a9b..de41c3b 100644
--- a/test/automated/package-test.el
+++ b/test/automated/package-test.el
@@ -205,6 +205,12 @@ Must called from within a `tar-mode' buffer."
     (should (package-install-from-buffer))
     (package-initialize)
     (should (package-installed-p 'simple-single))
+    ;; Check if we properly report an "already installed".
+    (package-install 'simple-single)
+    (with-current-buffer "*Messages*"
+      (should (string-match "^[`‘']simple-single[’'] is already 
installed\n?\\'"
+                            (buffer-string))))
+    (should (package-installed-p 'simple-single))
     (let* ((simple-pkg-dir (file-name-as-directory
                             (expand-file-name
                              "simple-single-1.3"
diff --git a/test/automated/tabulated-list-test.el 
b/test/automated/tabulated-list-test.el
new file mode 100644
index 0000000..5731db4
--- /dev/null
+++ b/test/automated/tabulated-list-test.el
@@ -0,0 +1,118 @@
+;;; tabulated-list-test.el --- Tests for emacs-lisp/tabulated-list.el  -*- 
lexical-binding: t; -*-
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Artur Malabarba <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/>.
+
+;;; Code:
+
+(require 'tabulated-list)
+(require 'ert)
+
+(defconst tabulated-list--test-entries
+  '(("zzzz-game" ["zzzz-game" "zzzz-game" "2113" "installed" " play zzzz in 
Emacs"])
+    ("4clojure"  ["4clojure" "4clojure" "1507" "obsolete" " Open and evaluate 
4clojure.com questions"])
+    ("abc-mode"  ["abc-mode" "abc-mode" "944" "available" " Major mode for 
editing abc music files"])
+    ("mode"      ["mode" "mode" "1128" "installed" " A simple mode for editing 
Actionscript 3 files"])))
+
+(defun tabulated-list--test-sort-car (a b)
+  (string< (car a) (car b)))
+
+(defconst tabulated-list--test-format
+  [("name" 10 tabulated-list--test-sort-car)
+   ("name-2" 10 t)
+   ("Version" 9 nil)
+   ("Status" 10 )
+   ("Description" 0 nil)])
+
+(defmacro tabulated-list--test-with-buffer (&rest body)
+  `(with-temp-buffer
+     (tabulated-list-mode)
+     (setq tabulated-list-entries (copy-alist tabulated-list--test-entries))
+     (setq tabulated-list-format tabulated-list--test-format)
+     (setq tabulated-list-padding 7)
+     (tabulated-list-init-header)
+     (tabulated-list-print)
+     ,@body))
+
+
+;;; Tests
+(ert-deftest tabulated-list-print ()
+  (tabulated-list--test-with-buffer
+   ;; Basic printing.
+   (should (string= (buffer-substring-no-properties (point-min) (point-max))
+                    "       zzzz-game  zzzz-game  2113      installed   play 
zzzz in Emacs
+       4clojure   4clojure   1507      obsolete    Open and evaluate 
4clojure.com questions
+       abc-mode   abc-mode   944       available   Major mode for editing abc 
music files
+       mode       mode       1128      installed   A simple mode for editing 
Actionscript 3 files\n"))
+   ;; Preseve position.
+   (forward-line 3)
+   (let ((pos (thing-at-point 'line)))
+     (pop tabulated-list-entries)
+     (tabulated-list-print t)
+     (should (equal (thing-at-point 'line) pos))
+     (should (string= (buffer-substring-no-properties (point-min) (point-max))
+                      "       4clojure   4clojure   1507      obsolete    Open 
and evaluate 4clojure.com questions
+       abc-mode   abc-mode   944       available   Major mode for editing abc 
music files
+       mode       mode       1128      installed   A simple mode for editing 
Actionscript 3 files\n"))
+     ;; Check the UPDATE argument
+     (pop tabulated-list-entries)
+     (setf (cdr (car tabulated-list-entries)) (list ["x" "x" "944" "available" 
" XX"]))
+     (tabulated-list-print t t)
+     (should (string= (buffer-substring-no-properties (point-min) (point-max))
+                      "       x          x          944       available   XX
+       mode       mode       1128      installed   A simple mode for editing 
Actionscript 3 files\n"))
+     (should (equal (thing-at-point 'line) pos)))))
+
+(ert-deftest tabulated-list-sort ()
+  (tabulated-list--test-with-buffer
+   ;; Basic sorting
+   (goto-char (point-min))
+   (skip-chars-forward "[:blank:]")
+   (tabulated-list-sort)
+   (let ((text (buffer-substring-no-properties (point-min) (point-max))))
+     (should (string= text "       4clojure   4clojure   1507      obsolete    
Open and evaluate 4clojure.com questions
+       abc-mode   abc-mode   944       available   Major mode for editing abc 
music files
+       mode       mode       1128      installed   A simple mode for editing 
Actionscript 3 files
+       zzzz-game  zzzz-game  2113      installed   play zzzz in Emacs\n"))
+
+     (skip-chars-forward "^[:blank:]")
+     (skip-chars-forward "[:blank:]")
+     (should (equal (get-text-property (point) 'tabulated-list-column-name)
+                    "name-2"))
+     (tabulated-list-sort)
+     ;; Check a `t' as the sorting predicate.
+     (should (string= text (buffer-substring-no-properties (point-min) 
(point-max))))
+     ;; Invert.
+     (tabulated-list-sort 1)
+     (should (string= (buffer-substring-no-properties (point-min) (point-max))
+                      "       zzzz-game  zzzz-game  2113      installed   play 
zzzz in Emacs
+       mode       mode       1128      installed   A simple mode for editing 
Actionscript 3 files
+       abc-mode   abc-mode   944       available   Major mode for editing abc 
music files
+       4clojure   4clojure   1507      obsolete    Open and evaluate 
4clojure.com questions\n"))
+     ;; Again
+     (tabulated-list-sort 1)
+     (should (string= text (buffer-substring-no-properties (point-min) 
(point-max)))))
+   ;; Check that you can't sort some cols.
+   (skip-chars-forward "^[:blank:]")
+   (skip-chars-forward "[:blank:]")
+   (should-error (tabulated-list-sort) :type 'user-error)
+   (should-error (tabulated-list-sort 4) :type 'user-error)))
+
+(provide 'tabulated-list-test)
+;;; tabulated-list-test.el ends here
diff --git a/test/etags/make-src/Makefile b/test/etags/make-src/Makefile
index daf605d..016c633 100644
--- a/test/etags/make-src/Makefile
+++ b/test/etags/make-src/Makefile
@@ -15,7 +15,7 @@ ERLSRC=gs_dialog.erl lines.erl lists.erl
 FORTHSRC=test-forth.fth
 FSRC=entry.for entry.strange_suffix entry.strange
 HTMLSRC=softwarelibero.html index.shtml algrthms.html software.html
-JAVASRC=AWTEMul.java KeyEve.java SMan.java SysCol.java TG.java 
+JAVASRC=AWTEMul.java KeyEve.java SMan.java SysCol.java TG.java
 LUASRC=allegro.lua
 MAKESRC=Makefile
 OBJCSRC=Subprocess.h Subprocess.m PackInsp.h PackInsp.m
@@ -120,9 +120,9 @@ rsyncfromfly:
        rsync --exclude "*~" --exclude core --exclude etags -zauRv 
fly:gnu/etags/ ../..
 
 web ftp publish:
-       @-echo -e \\ttesting with debugging enabled...; $(MAKE) quiettest
-       @-echo -e \\ttesting standalone...; $(MAKE) standalone quiettest
-       @-echo -e \\ttesting fast versions...; $(MAKE) fastetags fastctags 
quiettest
+       @-printf '\ttesting with debugging enabled...\n'; $(MAKE) quiettest
+       @-printf '\ttesting standalone...\n'; $(MAKE) standalone quiettest
+       @-printf '\ttesting fast versions...\n'; $(MAKE) fastetags fastctags 
quiettest
        @$(MAKE) /home/www/pub/etags.c.gz
        @$(MAKE) /home/www/pub/software/unix/etags.tar.gz
 



reply via email to

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