Paul Eggert [Sat, 18 Mar 2017 04:24:24 +0000 (21:24 -0700)]
Port out-of-source builds to windows-nt
Problem reported by Angelo Graziosi in:
http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00431.html
* lib/Makefile.in: Prepend $(srcdir) to ../nt/gnulib-cfg.mk,
to handle out-of-source builds if windows-nt.
Paul Eggert [Fri, 17 Mar 2017 18:33:48 +0000 (11:33 -0700)]
Fixups for GNU Make switchover
This fixes some minor problems introduced in the recent switch to GNU
Make, discovered by further testing. Without some of these changes
'make -j' would sometimes have race conditions caused by missing
dependencies. (Bug#26100)
* .gitignore: Remove src/stamp-h.in, src/stamp-h1.
* Makefile.in ($(MAKEFILE_NAME)): Depend on configure, not
src/config.in, since the former's timestamp now represents
the latter's.
($(srcdir)/configure): Use plain ./autogen.sh, for consistency
with other autogen.sh invocations.
($(srcdir)/src/stamp-h.in):
Remove rule, as this file is no longer created.
* Makefile.in (top_distclean):
* src/Makefile.in (bootstrap-clean):
No need to remove stamp-h1, as that was an Automake byproduct
and Automake is no longer in use.
* lib/Makefile.in, src/Makefile.in:
(AUTOCONF_INPUTS, $(top_srcdir)/configure): Remove.
(../config.status, Makefile): Simplify by limiting dependencies
to files we care about and files in the repository, and by
using just one file to represent the timestamps on multiple
targets updated by the same rule.
* autogen.sh: Do not create or use src/stamp-h.in.
Instead, have 'find' test the two output files directly.
Paul Eggert [Fri, 17 Mar 2017 18:33:47 +0000 (11:33 -0700)]
Switch from Automake to GNU Make
Emacs assumes GNU Make, and GNU Make has much of the functionality of
Automake built-in. The Emacs build process uses Automake primarily
because Emacs uses some Gnulib code and Gnulib formerly required
Automake. Now that Gnulib no longer requires Automake, Emacs can
stop using Automake and this should simplify Emacs maintenance
in the future (Bug#26100). Although this patch may look long, most of
it is generated automatically: the changes to build-aux/config.guess,
build-aux/config.sub, build-aux/install-sh, and lib/gnulib.mk.in are
all done by admin/merge-gnulib.
* .gitignore: Remove build-aux/ar-lib, build-aux/compile,
build-aux/config.guess, build-aux/config.sub, build-aux/depcomp,
build-aux/install-sh, build-aux/missing, and lib/Makefile.in,
as they are no longer built by autogen.sh.
Add lib/gnulib.mk, as it is now built by 'configure'.
Remove nt/gnulib.mk, as it is no longer built by 'make'.
* INSTALL.REPO, README, admin/make-tarball.txt:
Remove mention of Automake.
* Makefile.in (AUTOCONF, AUTOMAKE, AUTOHEADER, ACLOCAL, lib)
(AUTOCONF_INPUTS, ACLOCAL_PATH, ACLOCAL_INPUTS)
($(srcdir)/aclocal.m4, AUTOMAKE_INPUTS)
($(srcdir)/lib/Makefile.in, $(srcdir)/nt/gnulib.mk, am--refresh):
Remove.
($(MAKEFILE_NAME)): Depend on lib/gnulib.mk.in.
($(srcdir)/configure, $(srcdir)/src/stamp-h.in)
($(srcdir)/src/config.in):
Use autogen.sh instead of doing it by hand.
* admin/merge-gnulib (AVOIDED_MODULES, avoided_flags)):
New vars, to simplify processing of avoided modules.
(GNULIB_TOOL_FLAGS): Move --avoid flags into AVOIDED_MODULES.
Add --gnu-make, and change makefile name to gnulib.mk.in.
Copy config.guess, config.sub, and install-sh too, since
Automake no longer does that for us.
* admin/notes/copyright:
* admin/update_autogen (genfiles):
Update list of files.
Remove hack for nt/gnulib.mk, a file that is no longer needed.
* autogen.sh (progs): Remove Automake.
(automake_min): Remove.
Build aclocal.m4 so that autoreconf need not use aclocal.
* build-aux/config.guess, build-aux/config.sub:
* build-aux/install-sh:
New files, copied from Gnulib. These are now updated by
admin/merge-gnulib instead by autogen.sh.
* configure.ac (AC_PROG_MAKE_SET, ACLOCAL_PATH, AM_CONDITIONAL):
Remove.
(AM_INIT_AUTOMAKE, AM_SILENT_RULES): Remove call.
(AC_PROG_CC_C_O): Call this instead of AM_PROG_CC_C_O.
(BUILDING_FOR_WINDOWSNT, HYBRID_MALLOC_LIB): Remove; no longer needed.
(--disable-silent-rules): New option, since Automake no longer
does this for us.
(AM_V, AM_DEFAULT_V): Set unconditionally, and do not bother
with AM_SUBST_NOTMAKE.
(AC_PROG_INSTALL): Add call.
(MAKEINFO): Do not bother with the 'missing' program.
(MAKEINFO, SYSTEM_TYPE): AC_SUBST.
(AC_CONFIG_FILES): Add Makefile, lib/gnulib.mk.
(SUBDIR_MAKEFILES): Remove duplication.
* lib/Makefile.am: Remove, replacing with:
* lib/Makefile.in: New file, with the old Makefile.am contents
and with the following changes:
(AUTOMAKE_OPTIONS, BUILT_SOURCES, CLEANFILES, EXTRA_DIST)
(MOSTLYCLEANDIRS, MOSTLYCLEANFILES, noinst_LIBRARIES, SUFFIXES)
(AM_CFLAGS, DEFAULT_INCLUDES, libegnu_a_SOURCES, libegnu_a_LIBADD)
(EXTRA_libegnu_a_SOURCES, libegnu_a_SHORTNAME, libegnu_a_CPPFLAGS):
Remove.
(VPATH, abs_top_builddir, top_builddir, top_srcdir, all, AM_V_AR)
(AM_V_CC, AM_V_GEN, AM_V_at, DEPDIR, DEPFLAGS, MKDEPDIR, SYSTEM_TYPE)
(libgnu.a, libegnu.a, ETAGS, $(ETAGS), tags, TAGS, clean)
(mostlyclean, distclean, bootstrap-clean, maintainer-clean):
New macros and rules, since Automake no longer does them.
Include ../nt/gnulib-cfg.mk if SYSTEM_TYPE is windows-nt,
instead of including ../nt/gnulib.mk if BUILDING_FOR_WINDOWS_NT.
Include dependency files if AUTO_DEPEND.
(ALL_CFLAGS, AUTOCONF_INPUTS, libgnu_a_OBJECTS, libegnu_a_OBJECTS):
New macros.
(bootstrap-clean): Depend on distclean, not maintainer-clean,
and remove gnulib.mk.
(AUTOCONF_INPUTS, $(top_srcdir)/configure, ../config.status, Makefile):
New macros and rules, copied from ../Makefile.in.
($(libegnu_a_OBJECTS), $(libgnu_a_OBJECTS)): Depend on BUILT_SOURCES.
(.c.o, e-%.o): New generic rules.
* lib/gnulib.mk: Remove.
* lib/gnulib.mk.in: New file, which is built by autogen.sh
and contains much of what used to be in lib/gnulib.mk.
* m4/gnulib-common.m4: Copy from gnulib.
* make-dist: Do not distribute build-aux/compile, build-aux/depcomp,
build-aux/missing, build-aux/ar-lib, lib/Makefile.am, nt/gnulib.mk,
nt/gnulib-modules-to-delete.cfg. Distribute lib/Makefile.in,
lib/gnulib.mk.in, and nt/gnulib-cfg.mk instead.
* nt/Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0)
(am__v_GEN_1, ${srcdir}/gnulib.mk): Remove.
* nt/gnulib-cfg.mk: New file, which supersedes ...
* nt/gnulib-modules-to-delete.cfg: ... this file, which is removed.
* src/Makefile.in (ACLOCAL_INPUTS): Remove.
(AUTOCONF_INPUTS): Merge ACLOCAL_INPUTS into it.
($(top_srcdir)/configure, ../config.status, config.in Makefile):
Defer to parent Makefile.
Paul Eggert [Fri, 17 Mar 2017 06:50:37 +0000 (23:50 -0700)]
Emacs 'movemail' is now a configure-time option
The new configure option --with-mailutils lets the builder say
that Emacs should assume that GNU Mailutils is installed, instead
of continuing to build and install its own limited and insecure
substitute for 'movemail'.
* INSTALL, etc/NEWS, etc/PROBLEMS: Mention --with-mailutils.
* configure.ac: Add --with-mailutils option.
(with_mailutils): New variable.
Do not bother configuring 'movemail' when not building it.
Warn about issues relating to --with-mailutils.
* doc/emacs/rmail.texi (Movemail): Mention --with-mailutils.
(Movemail, Remote Mailboxes): Document port numbers in
POP and IMAP URLs.
* lib-src/Makefile.in (with_mailutils): New macro.
(UTILITIES): Use it.
Mark Oteiza [Wed, 15 Mar 2017 04:42:25 +0000 (00:42 -0400)]
Replace more nested ifs with cond
This is a continuation of 0db5ba4 "Replace nested ifs with cond".
* lisp/play/dunnet.el (dun-special-object, dun-inven, dun-drop):
(dun-drop-check, dun-swim, dun-break): Use when and cond where
appropriate.
(dun-examine): Fix indentation.
(dun-doverb): Use when.
(dun-read-line): Refactor.
Noam Postavsky [Tue, 14 Mar 2017 13:23:08 +0000 (09:23 -0400)]
Recomplexify ‘delete-trailing-whitespace’ by treating \n as whitespace again
Mostly reverts "Simplify ‘delete-trailing-whitespace’ by not treating
\n as whitespace" from 2016-07-04. Setting \n to non-whitespace
causes the regex engine to backtrack a lot when searching for
"\\s-+$" (Bug#26079).
* lisp/simple.el (delete-trailing-whitespace): Don't change newline
syntax, search for "\\s-$" and then skip backward over trailing
whitespace.
Paul Eggert [Tue, 14 Mar 2017 20:44:11 +0000 (13:44 -0700)]
Merge from gnulib
This incorporates:
2017-03-14 snippets: move unadjusted snippet sources to lib
2017-03-14 gnulib-tool: fix typo in comment output
2017-03-14 snippets: work around GNU Make 3.82 VPATH
2017-03-13 gnulib-tool: minor --gnu-make fixups
2017-03-12 gnulib-tool: new option --gnu-make
* .gitignore: Remove lib/arg-nonnull.h, lib/c++defs.h,
lib/warn-on-use.h. Change exception from
build-aux/snippet/_Noreturn.h to lib/_Noreturn.h.
* admin/authors.el (authors-renamed-files-regexps):
* admin/notes/copyright, make-dist:
The snippet files moved from build-aux/snippet to lib.
* lib/_Noreturn.h: Rename from build-aux/snippet/_Noreturn.h.
* lib/arg-nonnull.h: Rename from build-aux/snippet/arg-nonnull.h.
* lib/c++defs.h: Rename from build-aux/snippet/c++defs.h.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/warn-on-use.h: Rename from build-aux/snippet/warn-on-use.h.
Tino Calancha [Tue, 14 Mar 2017 07:12:29 +0000 (16:12 +0900)]
Show ancestor buffer in 3way merges
Add an option ediff-show-ancestor', to control if the ancestor buffer
must be shown in 3way merges (Bug#25493); set it non-nil by default.
Add a toggle to change this option interactively; the original
value of the option is restored on exit.
Update the window setup so that the ancestor buffer is
shown in 3way merges when ediff-show-ancestor is non-nil.
Any operation on ediff windows must take in account the
ancestor window as well, when this is shown.
* lisp/vc/ediff-init.el (ediff-show-ancestor): New option.
(ediff--show-ancestor-orig): New defvar.
* lisp/vc/ediff-wind.el (ediff-window-Ancestor): New defvar.
(ediff-setup-windows-plain-merge, ediff-setup-windows-multiframe-merge):
Display ancestor buffer if ediff-show-ancestor is non-nil.
(ediff-keep-window-config): Expect ancestor window in
ediff-window-config-saved.
(ediff-window-alist): Add entry for the ancestor window.
* lisp/vc/ediff-util.el (ediff-setup-control-buffer):
ediff-window-config-saved contains ancestor window.
(ediff-show-ancestor): Delete this command.
(ediff-setup-keymap): Bind ediff-toggle-show-ancestor to '/' for merge jobs.
(ediff-update-diffs): Compute new diffs using ancestor buffer in 3way merges;
don't cheat it to think that is performing a comparison, that trick is not
necessary anymore: simply call 'ediff-setup-diff-regions-function'
with file-A, file-B and the file ancestor.
(ediff-recenter): Update doc string. Consider the ancestor buffer.
(ediff--check-ancestor-exists): New defun.
(ediff-toggle-show-ancestor): New command; toggle ediff-show-ancestor.
(ediff--restore-options-on-exit): Restore ediff-show-ancestor on exit.
(ediff-scroll-vertically, ediff-scroll-horizontally)
(ediff-operate-on-windows): Consider the ancestor as well.
* lisp/vc/ediff-help.el (ediff-long-help-message-merge):
List ediff-toggle-show-ancestor.
* doc/misc/ediff.texi (Introduction, Quick Help Commands): Update manual.
; * etc/NEWS: Announce these changes.
Tino Calancha [Tue, 14 Mar 2017 06:19:20 +0000 (15:19 +0900)]
diff-mode: Improve default faces for buffer ancestor
* lisp/vc/ediff-init.el (ediff-current-diff-Ancestor)
(ediff-fine-diff-Ancestor): Use defaults consistent with
faces for 'ediff-buffer-A' and 'ediff-buffer-B'.
Michael Albinus [Mon, 13 Mar 2017 17:05:59 +0000 (18:05 +0100)]
Require method in remote file name syntax
* lisp/minibuffer.el (completion--nth-completion):
Do not bind `non-essential'.
* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
* lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Do not call
`tramp-check-proper-method-and-host'.
* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Better traces.
(tramp-maybe-open-connection): Do not use argument for
´tramp-completion-mode-p'.
* lisp/net/tramp.el (tramp-default-method-marker): New defconst.
(tramp-prefix-format, tramp-postfix-method-format)
(tramp-prefix-ipv6-format, tramp-postfix-ipv6-format)
(tramp-prefix-port-format, tramp-postfix-host-format)
(tramp-file-name-regexp, tramp-completion-file-name-regexp):
Use `eq' instead of `eqal'.
(tramp-method-regexp, tramp-domain-regexp)
(tramp-remote-file-name-spec-regexp)
(tramp-file-name-regexp-unified)
(tramp-completion-file-name-regexp-unified)
(tramp-completion-file-name-regexp-separate): Adapt regexp.
(tramp-completion-file-name-handler-alist)
(tramp-run-real-handler): Autoload them.
(tramp-find-method): Handle `tramp-default-method-marker'.
(tramp-check-proper-method-and-host)
(tramp-completion-run-real-handler): Remove them.
(tramp-error-with-buffer, tramp-connectable-p): Do not use
argument for ´tramp-completion-mode-p'.
(tramp-find-foreign-file-name-handler): Remove COMPLETION
argument. Do not apply heuristic for completion.
(tramp-file-name-handler): Do not modify `non-essential'.
(tramp-completion-file-name-handler): Change implementation.
(tramp-autoload-file-name-handler)
(tramp-completion-handle-file-name-all-completions):
Call `tramp-run-real-handler'.
(tramp-completion-mode-p): Do not autoload. Remove argument.
Do not apply heuristic for completion.
(tramp-completion-dissect-file-name): Simplify implementation.
(tramp-handle-file-name-as-directory): Call `tramp-connectable-p'.
* test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax)
(tramp-test02-file-name-dissect)
(tramp-test03-file-name-defaults)
(tramp-test06-directory-file-name): Adapt to the new syntax.
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp--test-check-files): Deactivate temporarily tests with
quoted file names.
(tramp-test16-directory-files, tramp-test17-insert-directory):
Adapt tests.
(tramp-test24-file-name-completion): Do not check for
completion mode.
(tramp-test31-make-auto-save-file-name): Deactivate temporarily
two tests.
Paul Eggert [Sun, 12 Mar 2017 19:04:10 +0000 (12:04 -0700)]
Install update-game-score only on request
Most distributions do not install update-game-score properly
due to setuid/setgid complications, so install it only when
the installer specifies a user or group (Bug#25895).
* .gitattributes: Remove lib-src/update-game-score.exe.manifest.
* Makefile.in (gameuser, gamegroup, use_gamedir, PATH_GAME):
New vars.
(epaths-force): Use PATH_GAME.
(uninstall): Remove snake-scores and tetris-scores only if shared.
* configure.ac: Default --with-gameuser to 'no'.
(UPDATE_MANIFEST): Remove.
* etc/NEWS: Mention this.
* lib-src/Makefile.in (UPDATE_MANIFEST): Remove.
(use_gamedir): New macro.
(UTILITIES): Remove update-game-score unless use_gamedir.
(SCRIPTS): Remove $(UPDATE_MANIFEST).
($(DESTDIR)${archlibdir}): Install game directory program and data
only if use_gamedir.
* lib-src/update-game-score.exe.manifest: Remove, as
update-game-score is no longer installed on MS-Windows.
* lisp/play/gamegrid.el (gamegrid-add-score-with-update-game-score):
Use auxiliary program only if setuid or setgid.
* make-dist: Do not distribute update-game-score.exe.manifest.
* src/callproc.c (init_callproc):
Set Vshared_game_score_directory based on PATH_GAME, not DOS_NT.
(syms_of_callproc): Remove unnecessary initialization of
Vshared_game_score_directory.
Eli Zaretskii [Sun, 12 Mar 2017 15:36:41 +0000 (17:36 +0200)]
Teach etags to process ENUM_BF correctly
* lib-src/etags.c (sym_type): New enumeration value st_C_enum_bf.
(hash): Regenerated values for asso_values[] array.
(in_word_set): Update values of TOTAL_KEYWORDS and
MAX_HASH_VALUE. Add "ENUM_BF" to the wordlist[] array.
(in_enum_bf): New file-global variable.
(consider_token): Skip ENUM_BF if not in a macro definition.
(C_entries): Reset the in_enum_bf flag when past its closing
parenthesis.
* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6:
* test/manual/etags/CTAGS.good: Adapt to changes in etags.
Paul Eggert [Sun, 12 Mar 2017 08:02:52 +0000 (00:02 -0800)]
Remove some stray gnulib files
* admin/merge-gnulib: rm m4/gnulib-tool.m4 too.
(GNULIB_MODULES): Remove unsetenv, as it is not needed and
the --avoid=unsetenv option avoided most of it anyway.
* lib/unsetenv.c, m4/gnulib-tool.m4, m4/setenv.m4: Remove.
* lib/gnulib.mk: Regenerate.
Eli Zaretskii [Sat, 11 Mar 2017 08:25:05 +0000 (10:25 +0200)]
Avoid aborts/assertion violations due to 'vim-empty-lines-mode'
* src/xdisp.c (handle_single_display_spec): If position to be
restored after processing the display property comes from an
overlay, protect against that overlay's end point being outside of
the narrowed region.
Reported by Filipe Silva <filipe.silva@gmail.com> in
http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00176.html.
Paul Eggert [Fri, 10 Mar 2017 17:30:30 +0000 (09:30 -0800)]
Tweak X toolkit code to pacify modern GCC
* lwlib/lwlib-Xaw.c, lwlib/lwlib-Xm.c, lwlib/lwlib.c:
Don’t include <stdlib.h>, since this code now calls emacs_abort
rather than abort.
* lwlib/lwlib-Xaw.c (make_dialog, xaw_generic_callback)
(wm_delete_window):
* lwlib/lwlib-Xm.c (make_menu_in_widget, do_call):
* lwlib/lwlib.c (instantiate_widget_instance, lw_make_widget):
* lwlib/xlwmenu.c (abort_gracefully, draw_separator)
(separator_height, XlwMenuInitialize):
Use emacs_abort, not abort. Without this change, some calls
to ‘abort’ were invalid, as stdlib.h was not always included.
* src/widget.c (resources, emacsFrameClassRec):
* src/xfns.c (x_window) [USE_X_TOOLKIT]:
* src/xmenu.c (create_and_show_popup_menu) [USE_X_TOOLKIT]:
* src/xterm.c (emacs_options) [USE_X_TOOLKIT}:
(x_term_init) [USE_X_TOOLKIT]:
Cast string constants to char * to pacify --enable-gcc-warnings.
Paul Eggert [Fri, 10 Mar 2017 03:01:19 +0000 (19:01 -0800)]
Simplify checks for xdg-open and xdg-email
browse-url's xdg-open detection was too picky on some GNU/Linux
desktops; see Bug#25778. Simplify the code by assuming xdg-open works
if it is executable, as nowadays this is more likely to be correct than
trying to use heuristics from a few years ago. Don't test for nohup: it
is ineffective nowadays, as xdg-open's child uses the default action for
SIGHUP even if xdg-open's invoker ignores SIGHUP. While we're at it,
allow for Wayland here, as "emacs -nw" might be running in a non-X
Wayland terminal.
* lisp/mail/emacsbug.el (report-emacs-bug-can-use-xdg-email):
* lisp/net/browse-url.el (browse-url-can-use-xdg-open):
Simplify to a test for DISPLAY and whether the helper program is
executable. Allow WAYLAND_DISPLAY as an option.
Paul Eggert [Wed, 8 Mar 2017 05:23:08 +0000 (21:23 -0800)]
min and max should not return markers
Problem reported by Glenn Morris in:
http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00147.html
* src/data.c (minmax_driver): Convert any marker result to an
integer, since some callers assume this.
* test/src/data-tests.el (data-tests-max, data-tests-min):
Test for this.
Eli Zaretskii [Tue, 7 Mar 2017 16:37:58 +0000 (18:37 +0200)]
Support browsing URLs with embedded spaces on MS-Windows
* lisp/net/browse-url.el (browse-url-default-windows-browser):
Unhex %XX hex-encoded characters, as w32-shell-execute doesn't
support that in file:// URLs. (Bug#26014)
Paul Eggert [Tue, 7 Mar 2017 16:29:19 +0000 (08:29 -0800)]
Define copysign on all platforms
* configure.ac (copysign): Remove test.
* src/floatfns.c (signbit): New macro, if not already defined.
(Fcopysign): Use it instead of copysign.
(Fcopysign, syms_of_floatfns): Define the function on all platforms.
This commit has been reverted because the new mechanism was too
sensitive to changes in the lisp source, generation of new ldefs-boot
files was platform specific and resulted in warnings about undefined
variables.
This commit has been reverted because the new mechanism was too
sensitive to changes in the lisp source, generation of new ldefs-boot
files was platform specific and resulted in warnings about undefined
variables.
This commit has been reverted because the new mechanism was too
sensitive to changes in the lisp source, generation of new ldefs-boot
files was platform specific and resulted in warnings about undefined
variables.
This commit has been reverted because the new mechanism was too
sensitive to changes in the lisp source, generation of new ldefs-boot
files was platform specific and resulted in warnings about undefined
variables.
This commit has been reverted because the new mechanism was too
sensitive to changes in the lisp source, generation of new ldefs-boot
files was platform specific and resulted in warnings about undefined
variables.
This commit has been reverted because the new mechanism was too
sensitive to changes in the lisp source, generation of new ldefs-boot
files was platform specific and resulted in warnings about undefined
variables.
Paul Eggert [Mon, 6 Mar 2017 23:14:32 +0000 (15:14 -0800)]
min and max now return one of their arguments
* doc/lispref/numbers.texi (Comparison of Numbers):
* etc/NEWS: Document this.
* src/data.c (Amax, Amin): Remove constants. All uses removed.
(minmax_driver): New function.
(Fmax, Fmin): Use it instead of arith_driver.
* test/src/data-tests.el (data-tests-max, data-tests-min): New tests.
Eli Zaretskii [Mon, 6 Mar 2017 16:22:53 +0000 (18:22 +0200)]
A better fix for bug#25845
* src/xdisp.c (font_for_underline_metrics): New function.
* src/dispextern.h: Add its prototype.
* src/xterm.c (x_draw_glyph_string):
* src/w32term.c (x_draw_glyph_string):
* src/nsterm.m (ns_draw_text_decoration): Call it. This avoids
having identical code 3 times in 3 different files.
Eli Zaretskii [Sun, 5 Mar 2017 15:49:22 +0000 (17:49 +0200)]
Fix display of cursor on underlined text
* src/nsterm.m (ns_draw_text_decoration):
* src/xterm.c (x_draw_glyph_string):
* src/w32term.c (x_draw_glyph_string): Compute the position and
thickness of the underline by looking for the first glyph of the
run of underlined glyphs that includes the glyph string we are
drawing. (Bug#25845)
martin rudalics [Sun, 5 Mar 2017 11:26:26 +0000 (12:26 +0100)]
In `window--display-buffer' fix behavior reported in Bug#25946
* lisp/window.el (window--display-buffer): Set the dedicated
status of the window used and clear its history of previous
buffers also for the case that the window already shows the
buffer to be displayed. (Bug#25946)