From: Paul Eggert Date: Mon, 2 May 2016 01:14:22 +0000 (-0700) Subject: Merge from origin/emacs-25 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/595195a10e5dd568bf249f5fb6778ae3d7037cd5?hp=d8affa3dc5267c5da120ac09e14a81e0afed8fe8 Merge from origin/emacs-25 d8affa3 Use ‘T *restrict’ proto, not ‘T[restrict]’ d38d2a8 Fix documentation of 'url-retrieve-synchronously' 586b213 * lisp/url/url.el (url-retrieve-synchronously): Doc fix. (Bu... # Conflicts: # doc/misc/url.texi # lisp/url/url.el --- diff --git a/.dir-locals.el b/.dir-locals.el index 9853d7b5d8..1aa71ff6f1 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -1,7 +1,10 @@ ((nil . ((tab-width . 8) (sentence-end-double-space . t) (fill-column . 70))) - (c-mode . ((c-file-style . "GNU"))) + (c-mode . ((c-file-style . "GNU") + (c-noise-macro-with-parens-names . ("IF_LINT")) + (eval . (c-make-noise-macro-regexps)) + )) (objc-mode . ((c-file-style . "GNU"))) (log-edit-mode . ((log-edit-font-lock-gnu-style . t) (log-edit-setup-add-author . t))) diff --git a/.gitattributes b/.gitattributes index 5ccf9a5eab..13e58a87e9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -47,6 +47,52 @@ doc/misc/texinfo.tex -whitespace=blank-at-eol *.tiff binary etc/e/eterm-color binary +# Git's builtin diff hunk header styles. +*.ada diff=ada +*.[ch] diff=cpp +*.cc diff=cpp +*.cpp diff=cpp +*.hh diff=cpp +*.for diff=fortran +*.html diff=html +*.shtml diff=html +*.xml diff=html +*.java diff=java +*.m diff=objc +*.perl diff=perl +*.pl diff=perl +*.php diff=php +*.py diff=python +*.rb diff=ruby +*.ruby diff=ruby +*.tex diff=tex + # Hooks for non-default diff hunk headers; see autogen.sh. *.el diff=elisp +*.ac diff=m4 +*.m4 diff=m4 +*.mk diff=make +*[Mm]akefile diff=make +Makefile.in diff=make +*.sh diff=shell *.texi diff=texinfo +# +# Diff hunk header special-case file names. +admin/build-configs diff=perl +admin/charsets/mapconv diff=shell +admin/diff-tar-files diff=shell +admin/make-emacs diff=perl +admin/merge-gnulib diff=shell +admin/merge-pkg-config diff=shell +admin/quick-install-emacs diff=shell +admin/update-copyright diff=shell +admin/update_autogen diff=shell +build-aux/git-hooks/commit-msg diff=shell +build-aux/git-hooks/pre-commit diff=shell +build-aux/gitlog-to-emacslog diff=shell +build-aux/make-info-dir diff=shell +build-aux/move-if-change diff=shell +build-aux/msys-to-w32 diff=shell +build-aux/update-subdirs diff=shell +lib-src/rcs2log diff=shell +/make-dist diff=shell diff --git a/.gitignore b/.gitignore index 7c8b74336d..94c4ba8e4b 100644 --- a/.gitignore +++ b/.gitignore @@ -43,10 +43,10 @@ Makefile makefile !etc/refcards/Makefile !modules/mod-test/Makefile -!test/automated/data/flymake/Makefile -!test/indent/Makefile -!test/etags/Makefile -!test/etags/make-src/Makefile +!test/lisp/progmodes/flymake-resources/Makefile +!test/manual/indent/Makefile +!test/manual/etags/Makefile +!test/manual/etags/make-src/Makefile /*.cache /confdefs.h /config.status @@ -116,6 +116,7 @@ lisp/leim/quail/quick-b5.el lisp/leim/quail/quick-cns.el lisp/leim/quail/tsang-b5.el lisp/leim/quail/tsang-cns.el +lisp/mh-e/mh-autoloads.el lisp/subdirs.el # Dependencies. @@ -151,11 +152,13 @@ src/*.map # Tests. test/indent/*.new -test/biditest.txt -test/etags/srclist -test/etags/regexfile -test/etags/ETAGS -test/etags/CTAGS +test/manual/biditest.txt +test/manual/etags/srclist +test/manual/etags/regexfile +test/manual/etags/ETAGS +test/manual/etags/CTAGS +# Generated by test/make-test-deps.emacs-lisp +test/make-test-deps.mk # ctags, etags. TAGS diff --git a/CONTRIBUTE b/CONTRIBUTE index 5102b4fe4f..e39c665f21 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -233,6 +233,17 @@ above, are recorded by the tracker with the corresponding bugs/issues. GNU ELPA has a 'debbugs' package that allows accessing the tracker database from Emacs. +Bugs needs regular attention. A large backlog of bugs is +disheartening to the developers, and a culture of ignoring bugs is +harmful to users, who expect software that works. Bugs have to be +regularly looked at and acted upon. Not all bugs are critical, but at +the least, each bug needs to be regularly re-reviewed to make sure it +is still reproducible. + +The process of going through old or new bugs and acting on them is +called bug triage. This process is described in the file +admin/notes/bug-triage. + ** Documenting your changes Any change that matters to end-users should have an entry in etc/NEWS. @@ -264,10 +275,9 @@ If your test lasts longer than some few seconds, mark it in its 'ert-deftest' definition with ":tags '(:expensive-test)". To run tests on the entire Emacs tree, run "make check" from the -top-level directory. Most tests are in the directory -"test/automated". From the "test/automated" directory, run "make -" to run the tests for .el(c). See "test/README" -for more information. +top-level directory. Most tests are in the directory "test/". From +the "test/" directory, run "make " to run the tests for +.el(c). See "test/README" for more information. ** Understanding Emacs internals diff --git a/ChangeLog.2 b/ChangeLog.2 index eb336c767e..04ecc82901 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -1,11 +1,11 @@ -2016-03-02 Michael Albinus +2016-03-04 Michael Albinus Fix Bug#22859 * lisp/filenotify.el (file-notify-callback): Return a `deleted' event in case of kqueue and file1 is nil. (Bug#22859) -2016-03-01 Eli Zaretskii +2016-03-04 Eli Zaretskii Fix reordering of bidi text in an isolate inside an override @@ -15,7 +15,7 @@ isolate when the FSI...PDI text is inside a directional override. (Bug#22786) -2016-03-01 Alan Mackenzie +2016-03-04 Alan Mackenzie Document c-guess-basic-syntax in the CC Mode manual. @@ -24,20 +24,20 @@ (Custom Line-Up): Add a note on using c-guess-basic-syntax with a pxref to Syntactic Analysis. -2016-03-01 Michael Albinus +2016-03-04 Michael Albinus Fix targets in test/automated/Makefile.in * test/automated/Makefile.in: Use $(SELECTOR_DEFAULT) also for empty target and target all. -2016-03-01 Leo Liu +2016-03-04 Leo Liu Comment on last change to define-derived-mode * lisp/emacs-lisp/derived.el (define-derived-mode): Add comment. -2016-03-01 Lars Ingebrigtsen +2016-03-04 Lars Ingebrigtsen Allow binding `url-mime-accept-string' @@ -48,14 +48,14 @@ (cherry picked from commit 144bb0cf322b9756d29def3e27a42303e2edce43) -2016-03-01 Lars Ingebrigtsen +2016-03-04 Lars Ingebrigtsen Also allow setting the paragraph direction to nil * lisp/net/eww.el (eww-toggle-paragraph-direction): Also allow setting the paragraph direction to nil ("auto"). -2016-02-29 Anders Lindgren +2016-03-04 Anders Lindgren Made the new OS X visible bell more visible. @@ -63,7 +63,7 @@ "caution" image five times, as the image in its original size was hard to see. -2016-02-29 Lars Ingebrigtsen +2016-03-04 Lars Ingebrigtsen Use the correct background color when filling nested @@ -74,7 +74,7 @@ (cherry picked from commit cad0bc70558f9c28c808711c5295dec9fc5ad6e5) -2016-02-29 Lars Ingebrigtsen +2016-03-04 Lars Ingebrigtsen Make
in
  • not insert extra newlines @@ -85,7 +85,7 @@ (cherry picked from commit 379a846b8548dc32a9019ef0a37c02f62cd9bad1) -2016-02-29 Dmitry Gutov +2016-03-04 Dmitry Gutov Uncomment the next-error-function integration in xref @@ -93,18 +93,18 @@ Uncomment the next-error-function integration (http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20489#110). -2016-02-29 Dmitry Gutov +2016-03-04 Dmitry Gutov Remove the word "valid", to avoid ambiguity * doc/emacs/maintaining.texi (Identifier Search) (Looking Up Identifiers): Remove the word "valid" (bug#22692). -2016-02-28 Michael Albinus +2016-03-04 Michael Albinus Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25 -2016-02-28 Michael Albinus +2016-03-04 Michael Albinus Set auto-revert-use-notify to nil in global-auto-revert-mode. (Bug#22814) @@ -114,25 +114,25 @@ * lisp/autorevert.el (global-auto-revert-mode): Set `auto-revert-use-notify' to nil. (Bug#22814) -2016-02-28 Paul Eggert +2016-03-04 Paul Eggert * etc/TODO: Minor quoting and grammar fixes. -2016-02-28 Friedrich Beckmann (tiny change) +2016-03-04 Friedrich Beckmann (tiny change) Fix ModelSim error parsing * lisp/progmodes/vhdl-mode.el (vhdl-compiler-alist): Fix ModelSim error parsing (bug#5768). -2016-02-28 Lars Ingebrigtsen +2016-03-04 Lars Ingebrigtsen Make parse-time-string-chars faster * lisp/calendar/parse-time.el (parse-time-string-chars): Clean up the code (backport:). -2016-02-28 Lars Ingebrigtsen +2016-03-04 Lars Ingebrigtsen Add a eww command to toggle paragraph direction @@ -141,25 +141,25 @@ * doc/misc/eww.texi (Advanced): Mention the `D' command. -2016-02-27 Glenn Morris +2016-03-04 Glenn Morris * nextstep/WISHLIST: Merge into etc/TODO and remove. * etc/TODO: Merge in items from nextstep/WISHLIST. * nextstep/README: Update for this change. -2016-02-27 Andreas Schwab +2016-03-04 Andreas Schwab Fix char signedness issue in bidi code * src/dispextern.h (struct bidi_t): Change type of resolved_level and isolate_level to signed char. (Bug#22830) -2016-02-27 Andreas Schwab +2016-03-04 Andreas Schwab * lib-src/pop.c (socket_connection): Fix format string. -2016-02-27 Eli Zaretskii +2016-03-04 Eli Zaretskii Avoid inflooping in thing-at-point-looking-at @@ -168,22 +168,22 @@ (Bug#22756) Describe the argument DISTANCE in the doc string. -2016-02-27 Leo Liu +2016-03-04 Leo Liu * lisp/emacs-lisp/derived.el (define-derived-mode): Revert indent change. -2016-02-26 Michael Albinus +2016-03-04 Michael Albinus etc/PROBLEMS: Mention problems with using file descriptors * etc/PROBLEMS: Mention problems with using file descriptors of kqueue file notification library. -2016-02-26 Kaushal Modi +2016-03-04 Kaushal Modi * lisp/apropos.el (apropos-variable): Doc fix. (Bug#22813). -2016-02-25 Eli Zaretskii +2016-03-04 Eli Zaretskii Remove unneeded workaround in xftfont.c @@ -191,7 +191,7 @@ XftTextExtents8 behavior, as it is no longer needed. Suggested by Fangwen Yu . (Bug#22383) -2016-02-25 Stefan Monnier +2016-03-04 Stefan Monnier * lisp/saveplace.el (save-place-local-mode): New minor mode @@ -199,42 +199,42 @@ (save-place--setup-hooks): New function. (save-place-mode): Use it. -2016-02-25 Eli Zaretskii +2016-03-04 Eli Zaretskii Fix redisplay on a TTY after 'make-frame' * src/xdisp.c (clear_garbaged_frames): Don't clear/redraw a garbaged TTY frame if it is not the selected frame. (Bug#22794) -2016-02-25 Alan Mackenzie +2016-03-04 Alan Mackenzie Make double-click-1 work with unbalanced parens in CC Mode. Fixes bug#5560. * lisp/mouse.el (mouse-start-end): check the syntax of alleged parens with `syntax-after' to ensure syntax-table text properties are respected. -2016-02-25 Magnus Henoch +2016-03-04 Magnus Henoch Input method polish-slash should not use keyboard translation * lisp/leim/quail/latin-pre.el ("polish-slash"): Input method polish-slash should not use keyboard translation (bug#19081). -2016-02-25 Chris Feng +2016-03-04 Chris Feng Fix an assertion * src/dispnew.c (clear_glyph_matrix_rows): Test matrix->nrows == 0 (which implies start == 0) separately. -2016-02-24 Eli Zaretskii +2016-03-04 Eli Zaretskii Fix 'toggle-save-place' * lisp/saveplace.el (toggle-save-place): Set up hooks necessary to support save-place in the buffer. Autoload the command. -2016-02-24 Stefan Monnier +2016-03-04 Stefan Monnier * src/keyboard.c: Don't inadvertently set immediate_echo (bug#22581) @@ -242,7 +242,7 @@ immediate_echo when we don't want any echo-keystrokes. (echo_keystrokes_p): Move earlier. -2016-02-24 Chris Zheng (tiny change) +2016-03-04 Chris Zheng (tiny change) Minor fixes in calculator.el @@ -251,14 +251,14 @@ (calculator-last-input): Fix a bug with pressing F1. (Bug#20764) -2016-02-24 Anders Lindgren +2016-03-04 Anders Lindgren Update HISTORY section in readme for the NextStep interface. * nextstep/README: Update HISTORY after suggestion from former maintainer Adrian Robert. -2016-02-24 Eli Zaretskii +2016-03-04 Eli Zaretskii Improve documentation of 'save-place-mode' @@ -268,7 +268,7 @@ * etc/NEWS: Mention the need to call 'save-place-mode' for turning on the mode in all buffers. -2016-02-24 Chris Feng (tiny change) +2016-03-04 Chris Feng (tiny change) Allocate glyph matrices for the initial frame @@ -276,11 +276,11 @@ * src/dispnew.c (clear_glyph_matrix_rows): matrix->nrows can be 0. -2016-02-24 Lars Ingebrigtsen +2016-03-04 Lars Ingebrigtsen Fix white space in last checkin -2016-02-24 Dima Kogan +2016-03-04 Dima Kogan Make `insert-pair' always leave the cursor where documented @@ -289,14 +289,14 @@ after the opening character. This was not true if the pair was inserted to surround a region (bug#16949). -2016-02-24 Kaushal Modi +2016-03-04 Kaushal Modi etc/NEWS: Mention the new second parameter to `package-install' * etc/NEWS: Mention the new second parameter to `package-install' (bug#22784). -2016-02-24 John F. Trudeau (tiny change) +2016-03-04 John F. Trudeau (tiny change) Highlight assignments in Makefiles more correctly @@ -309,21 +309,21 @@ (cherry picked from commit bbd86c5642bd62c43d72391669f28eaa14459fd5) -2016-02-23 Eli Zaretskii +2016-03-04 Eli Zaretskii Improve documentation of focus-related hooks * doc/lispref/commands.texi (Focus Events): Mention focus-related hooks. (Bug#21728) -2016-02-23 Eli Zaretskii +2016-03-04 Eli Zaretskii Further improve doc string of 'disable-point-adjustment' * src/keyboard.c (syms_of_keyboard): : Clarify doc strings. (Bug#22771) -2016-02-23 Michael Albinus +2016-03-04 Michael Albinus Further adaptions in file-notify-tests.el for w32notify @@ -336,7 +336,7 @@ (file-notify-test08-watched-file-in-watched-dir): Adapt expected events for w32notify. -2016-02-23 Jan Tatarik +2016-03-04 Jan Tatarik Don't bug out on localised dates in gnus-icalendar @@ -344,7 +344,7 @@ (gnus-icalendar-event:org-timestamp): Don't bug out on localised dates. -2016-02-23 Drew Adams +2016-03-04 Drew Adams (ls-lisp-insert-directory): Make -B work @@ -355,7 +355,7 @@ (cherry picked from commit ef52e66efd78aac4c4e5bd5e11870e5ba3b37a1e) -2016-02-23 Vaidheeswaran C +2016-03-04 Vaidheeswaran C Make buttons in header lines work @@ -366,14 +366,14 @@ (cherry picked from commit c11e565a6b6d09fa39d4c3ef65bef08190eaecc1) -2016-02-23 Christopher Wellons +2016-03-04 Christopher Wellons Make setf for frame-height/width work again * lisp/emacs-lisp/cl-lib.el (frame-height): Make setf for frame-height/width work again (bug#21979). -2016-02-23 Łukasz Stelmach +2016-03-04 Łukasz Stelmach Encode header strings before printing @@ -385,7 +385,7 @@ (cherry picked from commit 3cedbdcc71ebefc12bd20ec84f74251fe99ee7d0) -2016-02-23 Nicolas Richard +2016-03-04 Nicolas Richard (cl-union): Do not ignore :test argument when lists are equal. @@ -393,7 +393,7 @@ * test/automated/cl-seq-tests.el: New file (bug#22729). -2016-02-23 Lars Ingebrigtsen +2016-03-04 Lars Ingebrigtsen Add `isearch' to `basic-faces' @@ -403,7 +403,7 @@ * lisp/replace.el (match): Add `isearch' to the `basic-faces' group, too (bug#22760). -2016-02-23 Dmitry Gutov +2016-03-04 Dmitry Gutov Make $, : and @ "prefix characters" in ruby-mode @@ -416,14 +416,14 @@ (ruby-font-lock-keywords): Adjust the constants matcher for `:' not being a symbol constituent anymore. -2016-02-23 Dmitry Gutov +2016-03-04 Dmitry Gutov Make find-tag-default-bounds more strict * lisp/subr.el (find-tag-default-bounds): Delegate to bounds-of-thing-at-point (bug#22692). -2016-02-22 Michael Albinus +2016-03-04 Michael Albinus Minor fixes in filenotify.el @@ -432,7 +432,7 @@ (file-notify--event-watched-file): Use cl-caadr. (file-notify-callback): Handle also `ignore' events from inotify. -2016-02-22 Michael Albinus +2016-03-04 Michael Albinus Additional fixes for file notification @@ -450,14 +450,14 @@ (file-notify-test07-backup): Adapt expected events for gfilenotify. (file-notify-test08-watched-file-in-watched-dir): Improve. -2016-02-22 Eli Zaretskii +2016-03-04 Eli Zaretskii Fix documentation of 'global-disable-point-adjustment' * src/keyboard.c (syms_of_keyboard) : Doc fixes. (Bug#22771) -2016-02-22 Daiki Ueno +2016-03-04 Daiki Ueno Set file modes of pinentry socket for extra safety @@ -466,21 +466,21 @@ This is just for extra safety since the parent directory is already protected with `server-ensure-safe-dir'. -2016-02-22 Daiki Ueno +2016-03-04 Daiki Ueno Clarify GnuPG version compatibility chapter * doc/misc/epa.texi (GnuPG version compatibility): Make the gpg-agent description a bit clearer. -2016-02-22 Daiki Ueno +2016-03-04 Daiki Ueno Revert "Change the default socket location for pinentry" This reverts commit e34fbdee8aca84b98393b06b2450837d175999ca. It turned out that the address is fixed in Pinentry itself. -2016-02-21 Dmitry Gutov +2016-03-04 Dmitry Gutov Kill off xref--display-history @@ -492,7 +492,7 @@ (xref--show-pos-in-buf): Update accordingly. (xref--xref-buffer-mode-map): Remove xref-quit binding. -2016-02-21 Dmitry Gutov +2016-03-04 Dmitry Gutov Keep the xref buffer visible until the user quits it explicitly @@ -516,7 +516,7 @@ (xref--find-xrefs, xref--find-definitions): Rename WINDOW argument to DISPLAY-ACTION as well. -2016-02-21 Daiki Ueno +2016-03-04 Daiki Ueno Change the default socket location for pinentry @@ -527,14 +527,14 @@ This is just for extra safety since the parent directory is already protected with `server-ensure-safe-dir'. -2016-02-21 Daiki Ueno +2016-03-04 Daiki Ueno Mention how to enable pinentry feature * etc/NEWS: Mention "gpgconf --reload gpg-agent". * lisp/net/pinentry.el: Likewise. -2016-02-21 Paul Eggert +2016-03-04 Paul Eggert Sync with gnulib @@ -542,7 +542,7 @@ 2016-02-10 stdalign: port to older HP and IBM cc * doc/misc/texinfo.tex, lib/stdalign.in.h: Copy from gnulib. -2016-02-21 David Engster +2016-03-04 David Engster Remove `semanticdb-save-all-db-idle' from `auto-save-hook' @@ -552,7 +552,7 @@ already be called in the `semantic-idle-work-core-handler', which runs when Emacs is actually idle. -2016-02-21 David Engster +2016-03-04 David Engster Restore point when writing semantic table to disk @@ -560,7 +560,7 @@ `semantic-fetch-tags' in `save-excursion', since it might move point in current buffer. (Bug #22287) -2016-02-21 Daiki Ueno +2016-03-04 Daiki Ueno Mention pinentry.el in epa manual @@ -569,7 +569,7 @@ to enable pinentry.el. (Caching Passphrases): Add xref to the compatibility chapter. -2016-02-21 Michael Albinus +2016-03-04 Michael Albinus Fix Bug#22736 @@ -581,13 +581,13 @@ (file-notify-test08-watched-file-in-watched-dir): Bind `file-notify--test-tmpfile' temporarily in `dir-callback'. -2016-02-21 Wieland Hoffmann (tiny change) +2016-03-04 Wieland Hoffmann (tiny change) Grammar fix in doc string * lisp/custom.el (defgroup): Grammar fix in doc string. -2016-02-20 Daiki Ueno +2016-03-04 Daiki Ueno Naming fix for consistency @@ -595,14 +595,14 @@ `epg-configuration-find' to be consistent with other epg-* functions. Change all callers. -2016-02-20 Daiki Ueno +2016-03-04 Daiki Ueno Prefer customized value for GnuPG executable * lisp/epg-config.el (epg-configuration-find): Don't check GPG configuration if it is already set with custom. (Bug#22747) -2016-02-20 Eli Zaretskii +2016-03-04 Eli Zaretskii Fix memory reservation on MS-Windows @@ -611,7 +611,7 @@ no one can use, since memory reservation must produce 64KB-aligned addresses. (Bug#22526) -2016-02-20 Anders Lindgren +2016-03-04 Anders Lindgren Update NextStep readme and add wish list. @@ -621,11 +621,11 @@ * nextstep/WISHLIST: New file containing list of issues and ideas associated with the NS port of Emacs. -2016-02-20 Michael Albinus +2016-03-04 Michael Albinus Report also result in `file-notify--test-event-handler' -2016-02-20 Michael Albinus +2016-03-04 Michael Albinus Improve file-notify-test08-watched-file-in-watched-dir @@ -639,7 +639,7 @@ `file-notify--test-results'. (file-notify-test08-watched-file-in-watched-dir): Fix docstring. -2016-02-20 Stephen Berman +2016-03-04 Stephen Berman Fix todo-mode item date editing bugs @@ -651,14 +651,14 @@ (todo-read-date): When using the numerical month date component make sure to use `*' for an arbitrary month instead of its numerical value. -2016-02-20 Eli Zaretskii +2016-03-04 Eli Zaretskii Fix "[:upper:]" for non-ASCII characters * src/regex.c (re_match_2_internal): Support [:upper:] and [:lower:] for non-ASCII characters. (Bug#18150) -2016-02-20 Lars Ingebrigtsen +2016-03-04 Lars Ingebrigtsen Allow customising the article mode cursor behavior @@ -667,7 +667,7 @@ * lisp/gnus/gnus-art.el (gnus-article-show-cursor): New variable. (gnus-article-mode): Use it. -2016-02-20 Ari Roponen +2016-03-04 Ari Roponen Use pop-to-buffer-same-window in woman.el @@ -675,7 +675,7 @@ the wrong buffer by using `pop-to-buffer-same-window' (bug#22332). (WoMan-find-buffer): Ditto. -2016-02-20 Tassilo Horn +2016-03-04 Tassilo Horn New filenotify test for bug#22736 @@ -683,25 +683,25 @@ (file-notify-test08-watched-file-in-watched-dir): (file-notify--test-desc1): New filenotify test for bug#22736 -2016-02-20 Marcin Borkowski +2016-03-04 Marcin Borkowski Report critical battery errors * lisp/battery.el (battery-pmset): Report critical battery errors (bug#18157). -2016-02-19 Kaushal Modi (tiny change) +2016-03-04 Kaushal Modi (tiny change) Make eww message toggling message clearer * lisp/net/eww.el (eww-toggle-fonts): Make the message clearer. -2016-02-19 Mark Oteiza +2016-03-04 Mark Oteiza * lisp/calc/calc-units.el (math-standard-units): Update to 2014 CODATA adjustment. -2016-02-18 Martin Rudalics +2016-03-04 Martin Rudalics Fix bugs in window resizing code @@ -711,21 +711,21 @@ with preserved size would not get resized. Also now signal an error when the window cannot be shrunk or enlarged as requested. -2016-02-17 Eli Zaretskii +2016-03-04 Eli Zaretskii Fix decoding DOS EOL in a unibyte buffer * src/coding.c (decode_eol): Loop over bytes, not characters. (Bug#5251) -2016-02-17 Alan Mackenzie +2016-03-04 Alan Mackenzie Correct c-parse-state cache manipulation error. * lisp/progmodes/cc-engine.el (c-invalidate-state-cache-1): Correct a comparison bound. Amend comments. -2016-02-17 Daiki Ueno +2016-03-04 Daiki Ueno Take advantage of new GnuPG version check function @@ -733,7 +733,7 @@ (package-refresh-contents): Use `epg-configuration-find' to check if EPG is usable. -2016-02-17 Daiki Ueno +2016-03-04 Daiki Ueno Make GnuPG version check robuster @@ -751,7 +751,7 @@ (epg-configuration): Mark as obsolete. * lisp/epg.el (epg-context): Use `epg-configuration-find'. -2016-02-17 Paul Eggert +2016-03-04 Paul Eggert Fix x-load-color-file pointer signedness @@ -759,43 +759,43 @@ For sscanf and int *, use %d, not %u. Problem found on Ubuntu 15.10 x32, which lacks X support. -2016-02-17 Paul Eggert +2016-03-04 Paul Eggert * lisp/time-stamp.el (time-stamp-time-zone): Fix doc string punct. -2016-02-16 Mark Oteiza +2016-03-04 Mark Oteiza Follow convention for greek letter constants. * lisp/calc/calc-units.el (math-standard-units): Add "sigma" and alias σ to it. -2016-02-16 Mark Oteiza +2016-03-04 Mark Oteiza Add Stefan-Boltzmann constant to calc units table. * lisp/calc/calc-units.el (math-standard-units): Add Stefan-Boltzmann constant. -2016-02-16 Mark Oteiza +2016-03-04 Mark Oteiza * lisp/calc/calc-units.el (math-build-units-table-buffer): Use special-mode. -2016-02-16 Glenn Morris +2016-03-04 Glenn Morris Avoid loading cl-lib for term/xterm.elc, eg in -Q -nw. (Bug#22669) * lisp/emacs-lisp/cl-generic.el (cl--generic-dispatchers): Prefill with relevant elements for term/xterm. -2016-02-16 Tassilo Horn +2016-03-04 Tassilo Horn Fix soffice UserInstallation-URL for Windows * lisp/doc-view.el (doc-view-odf->pdf-converter-soffice): Fix UserInstallation-URL when calling soffice on Windows. -2016-02-16 Lars Ingebrigtsen +2016-03-04 Lars Ingebrigtsen Fix display of
     elements
     
    @@ -803,7 +803,7 @@
     	parsing so that 
     elements don't render with ^M at the end
     	of the lines.
     
    -2016-02-15  Eli Zaretskii  
    +2016-03-04  Eli Zaretskii  
     
     	Minor fixes in global-auto-composition-mode
     
    @@ -812,7 +812,7 @@
     	* lisp/composite.el (global-auto-composition-mode): Make it a
     	globalized mode.  (Bug#22682)
     
    -2016-02-15  Alan Mackenzie  
    +2016-03-04  Alan Mackenzie  
     
     	Allow arithmetic operators inside C++ template constructs.
     
    @@ -830,14 +830,14 @@
     	multichar operator in place of the former c->-op-without->-cont-regexp.
     	Add code to skip forwards over a balanced parenthesized expression.
     
    -2016-02-15  Eli Zaretskii  
    +2016-03-04  Eli Zaretskii  
     
     	Avoid crashes in semi-malformed 'condition-case'
     
     	* src/eval.c (internal_lisp_condition_case): Treat a handler
     	'(nil)' as if it were '(nil nil)'.  (Bug#22675)
     
    -2016-02-15  Alan Mackenzie  
    +2016-03-04  Alan Mackenzie  
     
     	Allow arithmetic operators inside C++ template constructs.
     
    @@ -854,21 +854,21 @@
     	multichar operator in place of the former c->-op-without->-cont-regexp.
     	Add code to skip forwards over a balanced parenthesized expression.
     
    -2016-02-15  Eli Zaretskii  
    +2016-03-04  Eli Zaretskii  
     
     	Fix regression with 'recent-keys' and keyboard macros
     
     	* src/keyboard.c (record_char): Don't record in 'recent_keys'
     	events that come from executing keyboard macros.  (Bug#22674)
     
    -2016-02-15  Eli Zaretskii  
    +2016-03-04  Eli Zaretskii  
     
     	Fix wording in a doc-view.el comment
     
     	* lisp/doc-view.el (doc-view--current-cache-dir): Don't use
     	"illegal" for something that is not against the law.
     
    -2016-02-15  Paul Eggert  
    +2016-03-04  Paul Eggert  
     
     	CONTRIBUTE cleanups and updates
     
    @@ -883,7 +883,7 @@
     	* admin/notes/git-workflow: Change emacs-24 to emacs-25,
     	and trunk to master.  This file still needs work.
     
    -2016-02-14  Paul Eggert  
    +2016-03-04  Paul Eggert  
     
     	Port USE_STACK_LISP_OBJECTS fix to Clang
     
    @@ -891,7 +891,7 @@
     	Recent versions of Clang claim to be GCC 4.2.1 but do not have
     	the GCC bug.
     
    -2016-02-14  Paul Eggert  
    +2016-03-04  Paul Eggert  
     
     	Port to x86 GCC 4.3.1 and earlier
     
    @@ -899,28 +899,28 @@
     	* src/lisp.h (USE_STACK_LISP_OBJECTS): Default to false
     	for GCC 4.3.1 and earlier.
     
    -2016-02-14  Eli Zaretskii  
    +2016-03-04  Eli Zaretskii  
     
     	Fix point movement under 'scroll-conservatively'
     
     	* src/xdisp.c (redisplay_window): Correct a typo in computing the
     	effective number of text lines in a window.  (Bug#22637)
     
    -2016-02-14  Thomas Plass  
    +2016-03-04  Thomas Plass  
     
     	Replace colon in file name (not legal on Windows)
     
     	* lisp/doc-view.el (doc-view--current-cache-dir): Replace colon in file
     	name (not legal on Windows). [tiny change]
     
    -2016-02-14  Eli Zaretskii  
    +2016-03-04  Eli Zaretskii  
     
     	Fix a typo in edt.texi
     
     	* doc/misc/edt.texi: Fix a typo in an email address.  Reported by
     	"Herbert J. Skuhra" .
     
    -2016-02-14  Eli Zaretskii  
    +2016-03-04  Eli Zaretskii  
     
     	Make 'mmap_realloc' on MS-Windows more reliable
     
    @@ -934,14 +934,14 @@
     	if the call to VirtualAlloc to commit more pages fails.
     	(Bug#22526)
     
    -2016-02-14  Oscar Fuentes  
    +2016-03-04  Oscar Fuentes  
     
     	Grep alias `all' shall not match parent directory
     
     	* lisp/progmodes/grep.el (grep-files-aliases): Don't match parent
     	  directory for `all'. Fixes bug#22577
     
    -2016-02-13  Nicolas Petton  
    +2016-03-04  Nicolas Petton  
     
     	Bump version to 25.0.91
     
    @@ -949,22 +949,23 @@
     	* configure.ac:
     	* msdos/sed2v2.inp: Bump version to 25.0.91.
     
    -2016-02-13  Nicolas Petton  
    +2016-03-04  Nicolas Petton  
     
     	* etc/AUTHORS: Update the AUTHORS file
     
    -2016-02-13  Glenn Morris  
    +2016-03-04  Glenn Morris  
    +2016-02-15  Glenn Morris  
     
     	* lisp/dired-aux.el: Require cl-lib.  (Bug#22613)
     
    -2016-02-13  Eli Zaretskii  
    +2016-02-15  Eli Zaretskii  
     
     	Index tilde characters in names of backup files
     
     	* doc/emacs/files.texi (Backup Names): Improve indexing.
     	(Bug#22625)
     
    -2016-02-13  Eli Zaretskii  
    +2016-02-15  Eli Zaretskii  
     
     	Document deprecation of hi-lock-mode's 'C-x w' bindings
     
    @@ -973,11 +974,11 @@
     
     	* etc/NEWS: Mark the deprecation entry as documented.
     
    -2016-02-13  Stefan Monnier  
    +2016-02-15  Stefan Monnier  
     
     	Announce that the `C-x w' bindings are deprecated
     
    -2016-02-13  Paul Eggert  
    +2016-02-15  Paul Eggert  
     
     	Suppress GNUstep hardening
     
    @@ -989,7 +990,7 @@
     	(GNU_OBJC_CFLAGS): Omit options like
     	‘-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1’.
     
    -2016-02-12  Eli Zaretskii  
    +2016-02-15  Eli Zaretskii  
     
     	Fix redisplay after a large insertion
     
    @@ -997,7 +998,7 @@
     	"optimization 3" if the cursor ends up in a partially visible
     	glyph row.  (Bug22637)
     
    -2016-02-12  Andreas Schwab  
    +2016-02-15  Andreas Schwab  
     
     	Revert "Fix gnus-group-get-new-news-this-group on group with closed server"
     
    @@ -1006,11 +1007,11 @@
     		* lisp/gnus/nnimap.el (nnimap-change-group): Revert last
     		change.  (Bug#22634)
     
    -2016-02-11  Paul Eggert  
    +2016-02-15  Paul Eggert  
     
     	* lib-src/make-docfile.c: Include stdarg.h.
     
    -2016-02-11  Alan Mackenzie  
    +2016-02-15  Alan Mackenzie  
     
     	Extend gpm-mouse-mode's doc string and doc to point out limitations.
     
    @@ -1020,7 +1021,7 @@
     	* doc/emacs/frames.texi (Text-Only Mouse): Note the inability to transfer text
     	between Emacs and other progrmas which use GPM.
     
    -2016-02-11  Eli Zaretskii  
    +2016-02-15  Eli Zaretskii  
     
     	Revert "Backport: * lisp/isearch.el: Turn char-folding off by default"
     
    @@ -1028,7 +1029,7 @@
     
     	This reverts commit 12c50e82c9b432b2fc31f8fb2215f43ceea80822.
     
    -2016-02-11  Lars Ingebrigtsen  
    +2016-02-15  Lars Ingebrigtsen  
     
     	Revert "Support integer image rotation and respect EXIF rotations"
     
    @@ -1036,7 +1037,7 @@
     
     	This change does not work on Fedora.
     
    -2016-02-11  Lars Ingebrigtsen  
    +2016-02-15  Lars Ingebrigtsen  
     
     	Revert "Document EXIF image rotation"
     
    @@ -1044,7 +1045,7 @@
     
     	This change does not work on Fedora, for instance.
     
    -2016-02-11  Paul Eggert  
    +2016-02-15  Paul Eggert  
     
     	Document OS X LANG default
     
    @@ -1052,7 +1053,7 @@
     	Document OS X Language and Region system preference.
     	Suggested by Alan Third.
     
    -2016-02-11  Alan Third  
    +2016-02-15  Alan Third  
     
     	Set locale when run from OS X GUI
     
    @@ -1060,7 +1061,7 @@
     	* src/nsterm.m (ns_init_locale): Get locale from OS and set LANG.
     	* src/nsterm.h: Include ns_init_locale.
     
    -2016-02-10  Paul Eggert  
    +2016-02-15  Paul Eggert  
     
     	make-docfile cleanup for I/O, etc.
     
    @@ -1083,7 +1084,7 @@
     	(search_lisp_doc_at_eol): Don't worry about ungetc of EOF; it's
     	portable now.
     
    -2016-02-10  Paul Eggert  
    +2016-02-15  Paul Eggert  
     
     	Memory-management cleanup in make-docfile
     
    @@ -1107,7 +1108,7 @@
     	(write_globals, scan_c_stream, scan_lisp_file): Avoid memory leak.
     	(scan_c_stream): Check for add_global failure.
     
    -2016-02-10  Kevin Gallagher  
    +2016-02-15  Kevin Gallagher  
     
     	Kevin Gallagher has new email address
     
    @@ -1119,7 +1120,7 @@
     	* etc/edt-user.el:
     	* doc/misc/edt.texi: Update Kevin Gallagher's email address.
     
    -2016-02-10  Eli Zaretskii  
    +2016-02-15  Eli Zaretskii  
     
     	Improve doc strings of 'forward/backward-word-strictly'
     
    @@ -1131,7 +1132,7 @@
     	* src/syntax.c (Fforward_word): Refer to 'forward-word-strictly'
     	in the doc string.  (Bug#22560)
     
    -2016-02-10  Michael Albinus  
    +2016-02-15  Michael Albinus  
     
     	Describe Makefile test targets in test/README
     
    @@ -1140,19 +1141,19 @@
     	* Makefile.in:
     	* test/README: Describe Makefile test targets.
     
    -2016-02-10  Artur Malabarba  
    +2016-02-15  Artur Malabarba  
     
     	Backport: * lisp/isearch.el: Turn char-folding off by default
     
     	(search-default-mode): Set default value to nil.
     
    -2016-02-10  Lars Ingebrigtsen  
    +2016-02-15  Lars Ingebrigtsen  
     
     	Document EXIF image rotation
     
     	* doc/lispref/display.texi (ImageMagick Images): Mention EXIF rotation.
     
    -2016-02-10  Dima Kogan  
    +2016-02-15  Dima Kogan  
     
     	Support integer image rotation and respect EXIF rotations
     
    @@ -1163,14 +1164,14 @@
     	pre-rotated.  All information such as width/height is reported for the
     	rotated image.
     
    -2016-02-10  Matthew Carter  
    +2016-02-15  Matthew Carter  
     
     	Quote table names for postgres listings (sql-mode)
     
     	* lisp/progmodes/sql.el (sql-postgres-completion-object): Avoid passing
     	  unquoted table names to the completion list.
     
    -2016-02-10  Juri Linkov  
    +2016-02-15  Juri Linkov  
     
     	* lisp/replace.el (replace-match-maybe-edit): Make arg `backward' optional.
     
    @@ -1178,14 +1179,14 @@
     	(replace-search, replace-highlight): Make arg `backward' optional.
     	(Bug#18388)
     
    -2016-02-10  Juri Linkov  
    +2016-02-15  Juri Linkov  
     
     	* lisp/simple.el (next-line-or-history-element): Reset temporary-goal-column.
     
     	(previous-line-or-history-element): Reset temporary-goal-column.
     	Use end-of-visual-line instead of line-end-position.  (Bug#22544)
     
    -2016-02-10  Paul Eggert  
    +2016-02-15  Paul Eggert  
     
     	Suppress ACL ops if configured with --disable-acl
     
    @@ -1193,14 +1194,14 @@
     	* src/fileio.c [!USE_ACL]: Do not include sys/acl.h.
     	(Ffile_acl, Fset_file_acl) [!USE_ACL]: Return nil in this case.
     
    -2016-02-09  Katsumi Yamaoka  
    +2016-02-15  Katsumi Yamaoka  
     
     	Mention web bugs
     
     	* doc/misc/emacs-mime.texi (Display Customization):
     	Mention web bugs in the mm-html-blocked-images section.
     
    -2016-02-09  Katsumi Yamaoka  
    +2016-02-15  Katsumi Yamaoka  
     
     	Make mm-html-blocked-images default to "" again
     
    @@ -1210,32 +1211,32 @@
     	* doc/misc/emacs-mime.texi (Display Customization):
     	Mention that mm-html-blocked-images defaults to "".
     
    -2016-02-09  Paul Eggert  
    +2016-02-15  Paul Eggert  
     
     	Minor alignas cleanup
     
     	* src/lisp.h (alignas): Remove now-redundant #ifdef that was left
     	over from the old way of doing things, before Bug#20862 was fixed.
     
    -2016-02-09  Paul Eggert  
    +2016-02-15  Paul Eggert  
     
     	Add lmalloc commentary and tweak laligned
     
     	* src/alloc.c (laligned): Help compiler in a tiny way by putting
     	the more-commonly-failing disjunct first.
     
    -2016-02-09  Eli Zaretskii  
    +2016-02-15  Eli Zaretskii  
     
     	Clarify documentation of key binding conventions
     
     	* doc/lispref/tips.texi (Key Binding Conventions): Clarify which
     	"punctuation characters" are reserved after "C-c".  (Bug#22604)
     
    -2016-02-09  Oscar Fuentes  
    +2016-02-15  Oscar Fuentes  
     
     	* etc/NEWS: mention the `vc-faces' customization group
     
    -2016-02-09  Paul Eggert  
    +2016-02-15  Paul Eggert  
     
     	Sync with gnulib
     
    @@ -1245,11 +1246,11 @@
     	* doc/misc/texinfo.tex, lib/stdalign.in.h, m4/acl.m4, m4/getgroups.m4:
     	Copy from gnulib.
     
    -2016-02-09  Michael Albinus  
    +2016-02-15  Michael Albinus  
     
     	* CONTRIBUTE: Add more examples for $(SELECTOR) make variable.
     
    -2016-02-09  Katsumi Yamaoka  
    +2016-02-15  Katsumi Yamaoka  
     
     	Make mm-html-inhibit-images and mm-html-blocked-images default to nil
     
    @@ -1262,7 +1263,7 @@
     	* etc/NEWS (Gnus): Document mm-html-inhibit-images and
     	mm-html-blocked-images.
     
    -2016-02-09  Paul Eggert  
    +2016-02-15  Paul Eggert  
     
     	Increase success rate of fallback lmalloc
     
    @@ -1270,14 +1271,14 @@
     	larger and larger sizes, to increase the probability that
     	the allocator will return a Lisp-aligned pointer.
     
    -2016-02-09  Lars Ingebrigtsen  
    +2016-02-15  Lars Ingebrigtsen  
     
     	Make backgrounds extend to the end of the lines in shr
     
     	* lisp/net/shr.el (shr-face-background): Faces can also be on
     	the form `(:background "#fff)' (bug#22547).
     
    -2016-02-09  Lars Ingebrigtsen  
    +2016-02-15  Lars Ingebrigtsen  
     
     	Make the `R' command get the correct relative s
     
    @@ -1288,26 +1289,26 @@
     
     	Backport:
     
    -2016-02-09  Mike Kupfer  
    +2016-02-15  Mike Kupfer  
     
     	Fix typos in emacs-mime.texi and gnus.texi
     
     	* doc/misc/emacs-mime.texi (Display Customization):
     	* doc/misc/gnus.texi (HTML): Fix typo.
     
    -2016-02-09  Katsumi Yamaoka  
    +2016-02-15  Katsumi Yamaoka  
     
     	* doc/misc/emacs-mime.texi (Display Customization):
     	Doc fix for mm-html-inhibit-images.
     
    -2016-02-09  Lars Ingebrigtsen  
    +2016-02-15  Lars Ingebrigtsen  
     
     	Fix message-cross-post-followup-to group names
     
     	* lisp/gnus/message.el (message-cross-post-followup-to): Don't
     	insert group names like "nntp+foo:zot", because those aren't valid.
     
    -2016-02-09  David Edmondson  
    +2016-02-15  David Edmondson  
     
     	Compare recipient and keys case-insensitively
     
    @@ -1315,11 +1316,11 @@
     	recipient address with that from a key, do so in a case insensitive
     	manner (bug#22603).
     
    -2016-02-08  Glenn Morris  
    +2016-02-15  Glenn Morris  
     
     	* lisp/gnus/mm-decode.el (mm-alist-to-plist): Doc fix.
     
    -2016-02-08  Katsumi Yamaoka  
    +2016-02-15  Katsumi Yamaoka  
     
     	Refactor HTML images handling of Gnus and mm-* (a part of bug#21650)
     
    @@ -1345,7 +1346,7 @@
     	* lisp/gnus/mm-view.el (mm-setup-w3m): Use mm-html-inhibit-images
     	instead of mm-inline-text-html-with-images.
     
    -2016-02-08  Paul Eggert  
    +2016-02-15  Paul Eggert  
     
     	Port to FreeBSD 11-CURRENT i386
     
    @@ -1359,7 +1360,7 @@
     	* src/lisp.h (NONPOINTER_BITS): Remove.  All uses removed.
     	No longer needed now that alloc.c uses lmalloc and lrealloc.
     
    -2016-02-08  Michael Albinus  
    +2016-02-15  Michael Albinus  
     
     	Some fixes in file-notify-tests.el
     
    @@ -1371,7 +1372,7 @@
     	backends fire two `changed' events.  Backup by rename doesn't
     	work for kqueue.
     
    -2016-02-07  Michael Albinus  
    +2016-02-15  Michael Albinus  
     
     	Fix Bug#22557
     
    @@ -1391,7 +1392,7 @@
     	backup file.
     	(file-notify-test07-backup): New test.
     
    -2016-02-07  Paul Eggert  
    +2016-02-15  Paul Eggert  
     
     	Fix test for dladdr
     
    @@ -1400,8151 +1401,12513 @@
     	* configure.ac (dladdr): Link with LIBMODULES when checking for
     	this function.
     
    -2016-02-07  Andreas Schwab  
    +2016-02-15  Andreas Schwab  
     
     	Fix gnus-group-get-new-news-this-group on group with closed server
     
     	* lisp/gnus/nnimap.el (nnimap-change-group): Lookup server
     	method and pass to nnimap-open-server.
     
    -2016-02-07  Artur Malabarba  
    +2016-02-15  Artur Malabarba  
    +2016-02-14  Nicolas Petton  
     
    -	* lisp/comint.el (comint-prompt-read-only): Clean tabs in docstring
    +	* doc/lispref/sequences.texi: Add documentation for seq-map-indexed
     
    -	While tabs in code are mostly fine because the Emacs sources have a
    -	.dir-locals file specifying tab-width, the same is not true of tabs in
    -	code examples inside docstrings.  The docstring is printed on a *Help*
    -	buffer, which can be created on any directory and won't necessarily have
    -	the same tab-width set.
    +2016-02-14  Nicolas Petton  
     
    -2016-02-07  Lars Ingebrigtsen  
    +	New function seq-map-indexed
     
    -	Don't inloop gnus-uu-mark-thread on the last thread
    +	* lisp/emacs-lisp/seq.el (seq-map-indexed): New function.
    +	* test/lisp/emacs-lisp/seq-tests.el: Add tests for seq-map-indexed.
     
    -	* lisp/gnus/gnus-uu.el (gnus-uu-mark-thread): Don't infloop on the
    -	final thread in the summary buffer (bug#16666).
    +2016-02-14  Lars Ingebrigtsen  
     
    -2016-02-06  Lars Ingebrigtsen  
    +	* lisp/gnus/mm-util.el: Remove the mm-string-as-multibyte alias.
     
    -	Display non-ASCII group names better in prompts
    +2016-02-14  Lars Ingebrigtsen  
     
    -	* lisp/gnus/gnus-sum.el (gnus-articles-to-read): To decode the
    -	group name, we have to do that before we remove the prefix.
    +	Fix problem with wrong encoding of non-ASCII message bodies
     
    -2016-02-06  Lars Ingebrigtsen  
    +	* lisp/gnus/mml.el (mml-generate-mime-1): Disable
    +	multibyteness before encoding the data.
     
    -	Default to gpg2 instead of gpg
    +2016-02-14  Lars Ingebrigtsen  
     
    -	* lisp/epg-config.el (epg-gpg-program): Prefer gpg2 over gpg, if
    -	it exists.  This fixes many problems with using the GPG
    -	authentication agent.
    +	Remove codepage setup code from mm-util
     
    -2016-02-06  David Edmondson  
    +	* lisp/gnus/mm-util.el (mm-codepage-setup): Remove.
    +	(mm-codepage-iso-8859-list): Remove.
    +	(mm-codepage-ibm-list, mm-setup-codepage-iso-8859)
    +	(mm-setup-codepage-ibm): Remove.
    +	(mm-charset-eval-alist): Remove the code pages from the
    +	default value.
     
    -	src/process.c Correctly convert AF_INET6 addresses
    +2016-02-14  Lars Ingebrigtsen  
     
    -	* src/process.c (conv_lisp_to_sockaddr): AF_INET6 addresses are
    -	converted to a list of 16 bit quantities by
    -	conv_sockaddr_to_lisp(). conv_lisp_to_sockaddr() should follow the
    -	same scheme rather than expecting a (longer) list of 8 bit
    -	quantities.
    +	Remove compat code for older Emacsen
     
    -	Backport:
    +	* lisp/gnus/gnus-art.el (gnus-button-url-regexp): Remove
    +	XEmacs compat code.
     
    -	(cherry picked from commit 55ce3c30d617c38eb086d5ad4ffbd881c20c559c)
    +	* lisp/gnus/gnus-sync.el (gnus-sync-json-alist-p): Remove
    +	unused compat function.
    +	(gnus-sync-json-plist-p): Ditto.
     
    -2016-02-06  Artur Malabarba  
    +	* lisp/gnus/message.el (message-default-charset): Make obsolete.
    +	(message-info): Remove compat code.
    +	(message-setup-fill-variables): Remove kludge needed earlier
    +	to not overwrite `normal-auto-fill-function'.
    +	(message-split-line): Remove compat code.
     
    -	* lisp/isearch.el (isearch-define-mode-toggle): Improve logic
    +	* lisp/gnus/mm-view.el (mm-display-inline-fontify): Remove
    +	compat code.
     
    -2016-02-06  Artur Malabarba  
    +2016-02-14  Lars Ingebrigtsen  
     
    -	* lisp/menu-bar.el (menu-bar-options-menu): New search submenu
    +	Remove some compat functions from gmm-utils.el
     
    -	(menu-bar-search-options-menu): New variable
    +	* lisp/gnus/gmm-utils.el (gmm-tool-bar-from-list): Remove
    +	compat code.
    +	(gmm-image-search-load-path): Remove.
    +	(gmm-image-load-path-for-library): Remove.
     
    -2016-02-06  Artur Malabarba  
    +2016-02-14  Lars Ingebrigtsen  
     
    -	* lisp/isearch.el (search-default-mode)
    +	Remove the gmm-lazy and nnmail-lazy compat widgets
     
    -	(isearch-regexp-function): Improve docstrings.
    +	* lisp/gnus/gmm-utils.el (gmm-lazy): Remove.
     
    -2016-02-06  Artur Malabarba  
    +	* lisp/gnus/nnmail.el (nnmail-lazy): Remove.
     
    -	* lisp/isearch.el: Rename search-default-regexp-mode to search-default-mode
    +2016-02-13  Lars Ingebrigtsen  
     
    -	(search-default-mode): New variable.
    -	(isearch-mode, isearch-define-mode-toggle)
    -	(isearch--describe-regexp-mode): Update accordingly.
    -	* lisp/menu-bar.el (nonincremental-search-forward): Update accordingly.
    -	* etc/NEWS: Update accordingly.
    -	* doc/emacs/search.texi: Update accordingly.
    +	Clean up nnimap-request-move-article slightly
     
    -2016-02-06  Oscar Fuentes  
    +	* lisp/gnus/nnheader.el (subr-x): Require.
     
    -	Use monitor's resolution for positioning tooltips
    +	* lisp/gnus/nnimap.el (nnimap-request-move-article): Clean up
    +	the code slightly.
     
    -	* src/xfns.c (compute_tip_xy): Use the resolution of the monitor where
    -	  the mouse pointer is to avoid placing the tooltip over the border of
    -	  the monitor on multi-head displays. Fixes bug#22549.
    +2016-02-13  Lars Ingebrigtsen  
     
    -2016-02-06  Eli Zaretskii  
    +	Use open-network-stream instead of open-protocol-stream
     
    -	Fix file-notify-test on MS-Windows
    +	* lisp/gnus/nnimap.el: Use open-network-stream instead of
    +	open-protocol-stream.
     
    -	* test/automated/file-notify-tests.el (file-notify--test-timeout):
    -	Reduce w32notify timeout to 10 sec.
    -	(file-notify-test06-many-events): Call read-event after each
    -	rename, to keep the w32notify backend happy in batch mode.
    -	(Bug#22534)
    +	* lisp/gnus/nntp.el: Ditto.
     
    -2016-02-06  Eli Zaretskii  
    +	* lisp/gnus/pop3.el: Ditto.
     
    -	Fix issues found by auditing w32notify code
    +	* lisp/gnus/sieve-manage.el: Ditto.
     
    -	* src/w32inevt.c (handle_file_notifications): Count the number of
    -	events to be returned.
    -	* src/w32notify.c (send_notifications): Don't copy to the file
    -	notification buffer more than it can hold.  (Bug#22534)
    +	* lisp/net/network-stream.el (open-protocol-stream): Make obsolete.
     
    -2016-02-06  Eli Zaretskii  
    +2016-02-13  Lars Ingebrigtsen  
     
    -	Extend etags Ruby support for accessors
    +	Remove compat code that relies on (featurep 'mule)
     
    -	* lib-src/etags.c (Ruby_functions): Support accessors defined with
    -	parentheses.  (Bug#22563)
    +	* lisp/gnus/gnus-group.el (gnus-group-name-decode): Remove
    +	compat code.
     
    -	* test/etags/ruby-src/test1.ru (A::B): Add tests for accessors
    -	defined with parentheses.
    -	* test/etags/ETAGS.good_1:
    -	* test/etags/ETAGS.good_2:
    -	* test/etags/ETAGS.good_3:
    -	* test/etags/ETAGS.good_4:
    -	* test/etags/ETAGS.good_5:
    -	* test/etags/ETAGS.good_6:
    -	* test/etags/CTAGS.good: Adapt to changes in Ruby tests.
    +	* lisp/gnus/gnus-start.el (gnus-read-descriptions-file):
    +	Remove compat code.
     
    -2016-02-06  Lars Ingebrigtsen  
    +	* lisp/gnus/mm-bodies.el (mm-decode-body, mm-decode-string):
    +	Remove compat code.
     
    -	Update publicsuffix.txt.
    +	* lisp/gnus/mm-view.el (mm-w3m-standalone-supports-m17n-p):
    +	Remove compat code.
    +	(mm-w3m-standalone-supports-m17n-p): Ditto.
     
    -	* etc/publicsuffix.txt: Updated from
    -	https://publicsuffix.org/list/public_suffix_list.dat.
    +2016-02-13  Lars Ingebrigtsen  
     
    -2016-02-06  Lars Ingebrigtsen  
    +	Remove compat functions from starttls.el
     
    -	Ensure that Gnus dribble handling allows removing entries
    +	* lisp/gnus/starttls.el
    +	(starttls-set-process-query-on-exit-flag): Remove.
     
    -	* lisp/gnus/gnus-start.el (gnus-dribble-enter): Ensure that each
    -	entry is on a single line.
    +2016-02-13  Lars Ingebrigtsen  
     
    -2016-02-05  OGAWA Hirofumi    (tiny change)
    +	Remove compat functions from smime.el
     
    -	Be consistent when using encoded strings in nnimap data
    +	* lisp/gnus/smime.el (smime-replace-in-string): Remove.
    +	(smime-make-temp-file): Remove.
     
    -	* lisp/gnus/nnimap.el (nnimap-encode-gnus-group): New function
    -	(nnimap-request-list): Use it.
    -	(nnimap-request-newgroups): Ditto.
    +2016-02-13  Lars Ingebrigtsen  
     
    -2016-02-05  OGAWA Hirofumi    (tiny change)
    +	Remove compat code from smiley
     
    -	Display the decoded Gnus group name
    +	* lisp/gnus/smiley.el (smiley-style): Remove compat code.
     
    -	* lisp/gnus/gnus-sum.el (gnus-summary-read-group-1): Use the
    -	decoded group name in the message.
    +2016-02-13  Lars Ingebrigtsen  
     
    -2016-02-05  Lars Ingebrigtsen  
    +	Remove compat code from rfc2047
     
    -	Use completion-ignore-case instead of defining command
    +	* lisp/gnus/rfc2047.el (rfc2047-encode-message-header): Remove
    +	compat code.
    +	(rfc2047-decode-string): Ditto.
     
    -	* lisp/erc/erc.el (erc-mode): Set completion-ignore-case so
    -	that we get case-insensitive completion.
    -	(erc-completion-at-point): Remove.
    +2016-02-13  Lars Ingebrigtsen  
     
    -2016-02-05  Eli Zaretskii  
    +	Remove compat function from pop3
     
    -	Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25
    +	* lisp/gnus/pop3.el (pop3-set-process-query-on-exit-flag): Remove.
     
    -2016-02-05  Michael Albinus  
    +2016-02-13  Lars Ingebrigtsen  
     
    -	* test/automated/file-notify-tests.el (file-notify-test06-many-events):
    +	Remove compat code in Gnus backends
     
    -	Reduce the number of iterations to 250 in case of w32notify.
    +	* lisp/gnus/nndiary.el (nndiary-error): Remove.
     
    -2016-02-05  Eli Zaretskii  
    +	* lisp/gnus/nndraft.el (nndraft-request-associate-buffer): Ditto.
     
    -	Fix problems caused by new implementation of sub-word mode
    +	* lisp/gnus/nnfolder.el (nnfolder-read-folder): Ditto.
     
    -	* lisp/subr.el (forward-word-strictly, backward-word-strictly):
    -	New functions.
    -	(word-move-empty-char-table): New variable.
    +	* lisp/gnus/nnheader.el (nnheader-find-file-noselect): Ditto.
     
    -	* etc/NEWS: Mention 'forward-word-strictly' and
    -	'backward-word-strictly'.
    +	* lisp/gnus/nnimap.el (nnimap-log-buffer): Remove compat code.
     
    -	* doc/lispref/positions.texi (Word Motion): Document
    -	'find-word-boundary-function-table', 'forward-word-strictly', and
    -	'backward-word-strictly'.  (Bug#22560)
    +2016-02-13  Lars Ingebrigtsen  
     
    -	* src/syntax.c (syms_of_syntax)
    -	: Doc fix.
    +	Remove compat code from some mml files
     
    -	* lisp/wdired.el (wdired-xcase-word):
    -	* lisp/textmodes/texnfo-upd.el (texinfo-copy-node-name)
    -	(texinfo-copy-section-title, texinfo-start-menu-description)
    -	(texinfo-copy-menu-title, texinfo-specific-section-type)
    -	(texinfo-insert-node-lines, texinfo-copy-next-section-title):
    -	* lisp/textmodes/texinfo.el (texinfo-clone-environment)
    -	(texinfo-insert-@end):
    -	* lisp/textmodes/texinfmt.el (texinfo-format-scan)
    -	(texinfo-anchor, texinfo-multitable-widths)
    -	(texinfo-multitable-item):
    -	* lisp/textmodes/tex-mode.el (latex-env-before-change):
    -	* lisp/textmodes/flyspell.el (texinfo-mode-flyspell-verify):
    -	* lisp/skeleton.el (skeleton-insert):
    -	* lisp/simple.el (count-words):
    -	* lisp/progmodes/vhdl-mode.el (vhdl-beginning-of-libunit)
    -	(vhdl-beginning-of-defun, vhdl-beginning-of-statement-1)
    -	(vhdl-update-sensitivity-list, vhdl-template-block)
    -	(vhdl-template-break, vhdl-template-case, vhdl-template-default)
    -	(vhdl-template-default-indent, vhdl-template-for-loop)
    -	(vhdl-template-if-then-use, vhdl-template-bare-loop)
    -	(vhdl-template-nature, vhdl-template-procedural)
    -	(vhdl-template-process, vhdl-template-selected-signal-asst)
    -	(vhdl-template-type, vhdl-template-variable)
    -	(vhdl-template-while-loop, vhdl-beginning-of-block)
    -	(vhdl-hooked-abbrev, vhdl-port-copy, vhdl-hs-forward-sexp-func):
    -	* lisp/progmodes/verilog-mode.el (verilog-backward-sexp)
    -	(verilog-forward-sexp, verilog-beg-of-statement)
    -	(verilog-set-auto-endcomments, verilog-backward-token)
    -	(verilog-do-indent):
    -	* lisp/progmodes/vera-mode.el (vera-guess-basic-syntax)
    -	(vera-indent-block-closing):
    -	* lisp/progmodes/simula.el (simula-context)
    -	(simula-backward-up-level, simula-forward-down-level)
    -	(simula-previous-statement, simula-next-statement)
    -	(simula-skip-comment-backward, simula-calculate-indent)
    -	(simula-find-if, simula-electric-keyword):
    -	* lisp/progmodes/sh-script.el (sh-smie--rc-newline-semi-p):
    -	* lisp/progmodes/ruby-mode.el (ruby-smie--redundant-do-p)
    -	(ruby-smie--forward-token, ruby-smie--backward-token)
    -	(ruby-singleton-class-p, ruby-calculate-indent)
    -	(ruby-forward-sexp, ruby-backward-sexp):
    -	* lisp/progmodes/ps-mode.el (ps-run-goto-error):
    -	* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function)
    -	(perl-syntax-propertize-special-constructs)
    -	(perl-backward-to-start-of-continued-exp):
    -	* lisp/progmodes/pascal.el (pascal-indent-declaration):
    -	* lisp/progmodes/octave.el (octave-function-file-p):
    -	* lisp/progmodes/mantemp.el (mantemp-insert-cxx-syntax):
    -	* lisp/progmodes/js.el (js--forward-function-decl):
    -	* lisp/progmodes/idlwave.el (idlwave-show-begin-check)
    -	(idlwave-beginning-of-block, idlwave-end-of-block)
    -	(idlwave-block-jump-out, idlwave-determine-class):
    -	* lisp/progmodes/icon.el (icon-is-continuation-line)
    -	(icon-backward-to-start-of-continued-exp, end-of-icon-defun):
    -	* lisp/progmodes/hideif.el (hide-ifdef-define):
    -	* lisp/progmodes/f90.el (f90-change-keywords):
    -	* lisp/progmodes/cperl-mode.el (cperl-electric-pod)
    -	(cperl-linefeed, cperl-electric-terminator)
    -	(cperl-find-pods-heres, cperl-fix-line-spacing)
    -	(cperl-invert-if-unless):
    -	* lisp/progmodes/cc-engine.el (c-forward-<>-arglist-recur):
    -	* lisp/progmodes/cc-align.el (c-lineup-java-inher):
    -	* lisp/progmodes/ada-mode.el (ada-compile-goto-error)
    -	(ada-adjust-case-skeleton, ada-create-case-exception)
    -	(ada-create-case-exception-substring)
    -	(ada-case-read-exceptions-from-file, ada-after-keyword-p)
    -	(ada-scan-paramlist, ada-get-current-indent, ada-get-indent-end)
    -	(ada-get-indent-if, ada-get-indent-block-start)
    -	(ada-get-indent-loop, ada-get-indent-type)
    -	(ada-search-prev-end-stmt, ada-check-defun-name)
    -	(ada-goto-decl-start, ada-goto-matching-start)
    -	(ada-goto-matching-end, ada-looking-at-semi-or)
    -	(ada-looking-at-semi-private, ada-in-paramlist-p)
    -	(ada-search-ignore-complex-boolean, ada-move-to-start)
    -	(ada-move-to-end, ada-which-function, ada-gen-treat-proc):
    -	* lisp/net/quickurl.el (quickurl-grab-url):
    -	* lisp/mail/sendmail.el (mail-do-fcc):
    -	* lisp/mail/rmail.el (rmail-resend):
    -	* lisp/mail/mailabbrev.el (mail-abbrev-complete-alias):
    -	* lisp/mail/mail-extr.el (mail-extract-address-components):
    -	* lisp/json.el (json-read-keyword):
    -	* lisp/files.el (insert-directory):
    -	* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
    -	* lisp/completion.el (symbol-under-point, symbol-before-point)
    -	(symbol-before-point-for-complete, next-cdabbrev)
    -	(add-completions-from-c-buffer):
    -	* lisp/cedet/semantic/texi.el (semantic-up-context)
    -	(semantic-beginning-of-context):
    -	* lisp/cedet/semantic/bovine/el.el (semantic-get-local-variables):
    -	use 'forward-word-strictly' and 'backward-word-strictly' instead
    -	of 'forward-word' and 'backward-word'.
    +	* lisp/gnus/mml-sec.el (mml-secure-passphrase-cache-expiry):
    +	Remove compat code.
     
    -2016-02-05  Lars Ingebrigtsen  
    +	* lisp/gnus/mml-smime.el (mml-smime-openssl-sign-query):
    +	Always use `mail-extract-address-components', since this isn't
    +	time critical.
    +	(mml-smime-get-dns-cert): Ditto.
     
    -	Fix doc string of tls-program
    +	* lisp/gnus/mml.el (mml-preview): Remove compat code.
     
    -	* lisp/net/tls.el (tls-program): Document the %t parameter (bug#22559).
    +2016-02-13  Lars Ingebrigtsen  
     
    -2016-02-05  Lars Ingebrigtsen  
    +	Remove compat code and compat functions from mm-util.el
     
    -	Restore window conf in nsm
    +	* lisp/gnus/mm-util.el (mm-mime-mule-charset-alist): Remove
    +	compat code.
    +	(mm-coding-system-priorities)
    +	(mm-mule-charset-to-mime-charset, mm-charset-after)
    +	(mm-mime-charset, mm-iso-8859-x-to-15-region): Remove compat code.
    +	(mm-detect-coding-region): Define unconditionally.
    +	(mm-detect-mime-charset-region): Ditto.
    +	(mm-coding-system-to-mime-charset): It's 'mime-charset now.
    +	(coding-system-name)
    +	(find-file-coding-system-for-read-from-filename)
    +	(find-operation-coding-system): Remove aliases.
     
    -	* lisp/net/nsm.el (nsm-query-user): Restore the window configuration.
    +2016-02-13  Lars Ingebrigtsen  
     
    -	Backport:
    +	Remove some compat code from mm-*.el
     
    -2016-02-05  Mark Oteiza  
    +	* lisp/gnus/mm-bodies.el (mm-decode-body): Ditto.
     
    -	* etc/NEWS: Document new mpc.el features
    +	* lisp/gnus/mm-decode.el (mm-tmp-directory)
    +	(mm-valid-image-format-p): Remove compat code.
     
    -2016-02-04  Leo Liu  
    +	* lisp/gnus/mm-url.el (mm-url-insert-file-contents): Remove
    +	"Connection" "Close" workaround for older Emacsen.
     
    -	* lisp/custom.el (defface): Revert indentation change.  (Bug#22524)
    +2016-02-13  Lars Ingebrigtsen  
     
    -2016-02-04  Alan Mackenzie  
    +	Remove compat code and functions from message.el
     
    -	Correctly fontify C++ initializations which "look like" functions.
    +	* lisp/gnus/message.el (message-send-mail-function): Remove
    +	compat code.
    +	(message-dont-reply-to-names, message-mode)
    +	(message-setup-fill-variables, message-fill-paragraph)
    +	(message-remove-blank-cited-lines, message-make-from)
    +	(message-forward-rmail-make-body, message-tool-bar-gnome)
    +	(message-tab): Remove compat code.
    +	(message-completion-in-region): Remove.
    +	(message-read-from-minibuffer): Remove compat code.
     
    -	Fixes bug#7579.
    +2016-02-13  Lars Ingebrigtsen  
     
    -	lisp/progmodes/cc-engine.el (c-forward-declarator): Add extra optional
    -	parameter to enable handling of "anonymous" declarators in declarations.
    +	Declare rfc1843 instead of autoloading
     
    -	lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Check more rigorously
    -	whether a "(" opens a parameter list of a function, or an initialization of a
    -	variable.
    +	* lisp/gnus/gnus-art.el (rfc1843-decode-region): Declare
    +	instead of autoload.
     
    -2016-02-04  Ulf Jasper  
    +2016-02-13  Eli Zaretskii  
     
    -	Improve newsticker-treeview-selection-face
    +	Avoid signaling an error in 'dired-do-find-regexp-and-replace'
     
    -	* lisp/net/newst-treeview.el (newsticker-treeview-selection-face): Improve
    -	readability for dark background.
    +	* lisp/dired-aux.el: Require cl-lib, so that 'cl-mapcan' is
    +	autoloaded correctly.  (Bug#22613)
     
    -2016-02-04  Eli Zaretskii  
    +2016-02-13  Eli Zaretskii  
     
    -	Minor fix in tagging Ruby accessors by etags
    +	Fix network-stream-tests.el for MS-Windows
     
    -	* lib-src/etags.c (Ruby_functions): Don't tag accessors whose
    -	names are not literal symbols.  (Bug#22241)
    +	* test/lisp/net/network-stream-tests.el
    +	(connect-to-tls-ipv6-nowait): Skip for MS-Windows builds.
    +	(connect-to-tls-ipv4-wait): Add a 0.1 sleep-for.
     
    -2016-02-04  Paul Eggert  
    +2016-02-13  Lars Ingebrigtsen  
     
    -	Spelling fixes
    +	Remove some Message compat functions
     
    -2016-02-04  Dmitry Gutov  
    +	* lisp/gnus/message.el (message-kill-all-overlays): Define
    +	unconditionally.
    +	(message-window-inside-pixel-edges): Remove.
    +	(mail-dont-reply-to): Remove.
     
    -	Remove 'def X' from the example
    +2016-02-13  Lars Ingebrigtsen  
     
    -	* test/etags/ruby-src/test1.ru (A::B): Remove 'def X'
    -	(http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00167.html).
    -	* test/etags/CTAGS.good:
    -	* test/etags/ETAGS.good_1:
    -	* test/etags/ETAGS.good_2:
    -	* test/etags/ETAGS.good_3:
    -	* test/etags/ETAGS.good_4:
    -	* test/etags/ETAGS.good_5:
    -	* test/etags/ETAGS.good_6: Adjust accordingly.
    +	Remove some Gnus compat code
     
    -2016-02-04  Vasilij Schneidermann    (tiny change)
    +	* lisp/gnus/gnus-art.el (gnus-mime-inline-part): Remove compat code.
    +	(gnus-mm-display-part): Ditto.
     
    -	Allow sending empty hidden values in eww
    +	* lisp/gnus/gnus-start.el (gnus-dribble-read-file): Remove
    +	compat code.
     
    -	* lisp/net/eww.el (eww-tag-input): Allow sending empty hidden
    -	values (bug#22388).
    +2016-02-13  Lars Ingebrigtsen  
     
    -	(cherry picked from commit 5898da8210af7953e638ddf7821c05260979c3f0)
    +	Sort groups before inserting them into the group buffer
     
    -	Backport:
    +	* lisp/gnus/gnus-group.el (gnus-group-describe-all-groups):
    +	Sort groups before inserting them.
     
    -2016-02-04  David Edmondson  
    +2016-02-13  Lars Ingebrigtsen  
     
    -	Make erc work better when encountering unknown prefix chars
    +	Make "unseen" tracking work again in Gnus
     
    -	* lisp/erc/erc.el (erc-channel-receive-names): Output a warning
    -	instead of erroring out on unknown prefix chars (bug#22380).
    +	* lisp/gnus/gnus-sum.el (gnus-update-marks): Make "unseen"
    +	tracking work again.
     
    -2016-02-04  Lars Ingebrigtsen  
    +2016-02-13  Lars Ingebrigtsen  
     
    -	Make erc completion case-insensitive again
    +	Remove Gnus compat functions defined in gnus.el
     
    -	* lisp/erc/erc.el (erc-completion-at-point): Make erc completion
    -	case-insensitive again (bug#11360).
    +	* lisp/gnus/gnus.el (gnus-extent-detached-p): Remove.
    +	(gnus-extent-start-open, gnus-character-to-event)
    +	(gnus-assq-delete-all, gnus-add-text-properties)
    +	(gnus-put-text-property, gnus-key-press-event-p):
     
    -2016-02-04  Carlos Pita    (tiny change)
    +2016-02-13  Lars Ingebrigtsen  
     
    -	Make complection in erc use consistent casing
    +	Remove compat code from gnus-uu and win
     
    -	* lisp/erc/erc-pcomplete.el (pcomplete-erc-all-nicks): Make
    -	case in the complection consistent (bug#18509).
    +	* lisp/gnus/gnus-util.el (gnus-image-type-available-p): Remove
    +	compat code.
     
    -2016-02-04  Francis Litterio  
    +	* lisp/gnus/gnus-uu.el (gnus-uu-tmp-dir): Remove compat code.
     
    -	Make /QUIT in erc more robust
    +	* lisp/gnus/gnus-win.el (gnus-frames-on-display-list): Remove.
     
    -	* lisp/erc/erc.el (erc-kill-query-buffers): Don't bug out if we're
    -	issuing /QUIT to disconnected servers (bug#22099).
    +2016-02-13  Lars Ingebrigtsen  
     
    -2016-02-04  Kevin Brubeck Unhammer    (tiny change)
    +	Remove several gnus-util compat functions
     
    -	Make tracking faces in Emacs work more reliably
    +	* lisp/gnus/gnus-util.el (gnus-set-process-query-on-exit-flag): Remove.
    +	(gnus-read-shell-command): Remove.
    +	(gnus-match-substitute-replacement): Remove.
    +	(gnus-string-match-p): Remove.
    +	(gnus-string-prefix-p): Remove.
     
    -	* lisp/erc/erc-track.el (erc-faces-in): Always return lists of
    -	faces to avoid later ambiguity (bug#22424).
    +2016-02-13  Lars Ingebrigtsen  
     
    -2016-02-04  Lars Ingebrigtsen  
    +	Remove the gnus-merge alias
     
    -	Make shr not bug out on images on non-graphical displays
    +	* lisp/gnus/gnus-util.el (gnus-merge): Remove.
     
    -	* lisp/net/shr.el (shr-put-image): Don't bug out on alt-less
    -	images on non-graphical displays (bug#22327).
    +2016-02-13  Lars Ingebrigtsen  
     
    -2016-02-04  Lars Ingebrigtsen  
    +	Remove the gnus-union alias
     
    -	Fix bookmark display widths
    +	* lisp/gnus/gnus-util.el (gnus-union): Remove.
     
    -	* lisp/net/eww.el (eww-list-bookmarks): Pop to the buffer before
    -	preparing it so that the widths are computed correctly (bug#22328).
    +2016-02-13  Lars Ingebrigtsen  
     
    -2016-02-04  Lars Ingebrigtsen  
    +	Remove the gnus-delete-alist alias
     
    -	Fix typo in eww-make-unique-file-name
    +	* lisp/gnus/gnus-util.el (gnus-run-mode-hooks): Remove compat code.
    +	(gnus-delete-alist): Remove.
     
    -	* lisp/net/eww.el (eww-make-unique-file-name): Make this function
    -	actually work.
    +2016-02-13  Lars Ingebrigtsen  
     
    -2016-02-03  Lars Ingebrigtsen  
    +	Remove the gnus-float-time alias
     
    -	Make it possible to TAB to input fields
    +	* lisp/gnus/gnus-util.el (gnus-completion-styles): Remove
    +	compat code.
    +	(gnus-float-time): Remove.
     
    -	* lisp/net/eww.el (eww-tag-input): Make it possible to TAB to
    -	input fields (bug#22540).
    +2016-02-13  Lars Ingebrigtsen  
     
    -2016-02-03  Lars Ingebrigtsen  
    +	Remove compat code from gnus-srvr, start and sum
     
    -	Insert complete alt texts when images are disabled
    +	* lisp/gnus/gnus-srvr.el (gnus-browse-foreign-server): Remove
    +	compat code.
     
    -	* lisp/net/shr.el (shr-tag-img): When images are disabled, insert
    -	the complete alt/title string (bug#22293).
    +	* lisp/gnus/gnus-start.el (gnus-check-reasonable-setup):
    +	Remove compat code.
     
    -2016-02-03  Lars Ingebrigtsen  
    +	* lisp/gnus/gnus-sum.el (gnus-summary-display-arrow)
    +	(gnus-summary-make-menu-bar, gnus-summary-make-tool-bar)
    +	(gnus-recenter)
    +	(gnus-summary-limit-strange-charsets-predicate)
    +	(gnus-summary-show-thread): Remove compat code.
     
    -	Allow eww text fields to grow
    +2016-02-13  Lars Ingebrigtsen  
     
    -	* lisp/net/eww.el (eww-process-text-input): Allow text fields to
    -	grow when typing in stuff that's longer than the original width.
    +	Remove compat code from gnus-spec.el
     
    -2016-02-03  Dima Kogan  
    +	* lisp/gnus/gnus-spec.el (gnus-lrm-string-p): Remove compat code.
    +	(gnus-balloon-face-function): Remove compat code.
     
    -	Make erc work when subword-mode is switched on
    +2016-02-13  Lars Ingebrigtsen  
     
    -	* lisp/erc/erc-backend.el (erc-forward-word, erc-word-at-arg-p)
    -	(erc-bounds-of-word-at-point): New functions to do word-based
    -	things when subword-mode is switched on.
    +	Fix compat change in last check-in
     
    -	* lisp/erc/erc-button.el (erc-button-add-nickname-buttons): Use them
    -	(bug#17558).
    +	* lisp/gnus/gnus-group.el
    +	(gnus-group-name-charset-group-alist): `find-coding-system'
    +	doesn't exist in Emacs.
     
    -2016-02-03  Teemu Likonen  
    +2016-02-13  Lars Ingebrigtsen  
     
    -	Fix IMAP doc example
    +	Always use url-queue
     
    -	* doc/misc/gnus.texi (Client-Side IMAP Splitting): Fix example.
    +	* lisp/gnus/gnus-html.el (gnus-html-schedule-image-fetching):
    +	Always use url-queue.
     
    -2016-02-03  Paul Eggert  
    +2016-02-13  Lars Ingebrigtsen  
     
    -	Quoting fixes in doc strings and diagnostics
    +	Remove compat functions from gnus-html.el
     
    -	* lisp/emacs-lisp/bytecomp.el (byte-compile-setq, byte-compile-funcall):
    -	* lisp/gnus/mml-smime.el (mml-smime-get-dns-cert)
    -	(mml-smime-get-ldap-cert):
    -	Follow user style preference when quoting diagnostics.
    +	* lisp/gnus/gnus-html.el (gnus-html-encode-url-chars): Remove.
     
    -2016-02-03  Noam Postavsky  
    +2016-02-13  Lars Ingebrigtsen  
     
    -	Fix warning message in hack-local-variables
    +	Remove compat code from gnus-group.el
     
    -	* lisp/files.el (hack-local-variables): use 'thisbuf' to reference
    -	the original buffer name in the warning message.  (Bug#21681)
    +	* lisp/gnus/gnus-group.el (gnus-group-name-charset-group-alist)
    +	(gnus-group-make-tool-bar, gnus-group-update-tool-bar): Remove compat code.
     
    -2016-02-03  Eli Zaretskii  
    +2016-02-13  Lars Ingebrigtsen  
     
    -	Etags: yet another improvement in Ruby tags
    +	Define gnus-diary-kill-entire-line unconditionally
     
    -	* lib-src/etags.c (Ruby_functions): Handle continuation lines in
    -	Ruby accessor definitions.  (Bug#22241)
    +	* lisp/gnus/gnus-diary.el (gnus-diary-kill-entire-line):
    +	Define unconditionally.
     
    -	* test/etags/ruby-src/test1.ru (A::B#X): Add some more tests for
    -	accessors and multiline definitions.
    -	* test/etags/ETAGS.good_1:
    -	* test/etags/ETAGS.good_2:
    -	* test/etags/ETAGS.good_3:
    -	* test/etags/ETAGS.good_4:
    -	* test/etags/ETAGS.good_5:
    -	* test/etags/ETAGS.good_6:
    -	* test/etags/CTAGS.good: Adapt to changes in Ruby tags.
    +2016-02-13  Lars Ingebrigtsen  
     
    -2016-02-03  Eli Zaretskii  
    +	Remove compat code from gnus-cache and gnus-bookmark
     
    -	Fix x-popup-menu on TTYs without a mouse
    +	* lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-mode-map): Ditto.
     
    -	* src/menu.c (Fx_popup_menu): Be sure to initialize 'x' and 'y'
    -	for the TTY case without a mouse.  (Bug#22538)
    +	* lisp/gnus/gnus-cache.el (gnus-cache-decoded-group-name):
    +	Remove compat code.
     
    -2016-02-03  Nicolas Petton  
    +2016-02-13  Lars Ingebrigtsen  
     
    -	* lisp/emacs-lisp/map.el: Improvements to the docstring of the pcase macro
    +	Remove compat code from gnus-art.el
     
    -2016-02-02  Lars Ingebrigtsen  
    +	* lisp/gnus/gnus-art.el (gnus-article-prepare)
    +	(gnus-mime-copy-part, gnus-output-to-file)
    +	(gnus-article-reply-with-original)
    +	(gnus-button-handle-apropos-variable)
    +	(gnus-button-handle-apropos-documentation):
     
    -	Use pop-to-buffer-same-window in eww
    +2016-02-13  Lars Ingebrigtsen  
     
    -	* lisp/net/eww.el: pop-to-buffer-same-window throughout instead of
    -	switch-to-buffer (bug#22244).
    +	Remove compat code from gnus-agent.el
     
    -2016-02-02  Paul Eggert  
    +	* lisp/gnus/gnus-agent.el (gnus-agent-make-mode-line-string):
    +	Remove compat code.
     
    -	* autogen.sh: Revert all recent changes.
    +2016-02-13  Lars Ingebrigtsen  
     
    -2016-02-02  Glenn Morris  
    +	Rewrite gmm-labels usage to use cl-labels
     
    -	* make-dist: Updates related to nt/.
    +	* lisp/gnus/gmm-utils.el (gmm-tool-bar-style): Remove compat code.
    +	(gmm-labels): Remove.
     
    -	* make-dist: Add modules/.
    +2016-02-13  Lars Ingebrigtsen  
     
    -	* make-dist: Update for super-special file that can't live in etc/.
    +	Remove compat code from canlock.el
     
    -2016-02-02  Eli Zaretskii  
    +	* lisp/gnus/canlock.el (defmacro): Remove
     
    -	Fix failure to compile ns-win.el in parallel builds
    +2016-02-13  Lars Ingebrigtsen  
     
    -	* src/Makefile.in ($(lispsource)/term/ns-win.elc): Add order-only
    -	dependency on $(lispsource)/international/charprop.el.
    -	(Bug#22501)
    +	Remove compat code from auth-source
     
    -2016-02-02  Eli Zaretskii  
    +	* lisp/gnus/auth-source.el (auth-source-read-char-choice):
    +	Remove compat code.
     
    -	Fix names of tags generated for Ruby accessors
    +2016-02-13  Lars Ingebrigtsen  
     
    -	* lib-src/etags.c (Ruby_functions): Don't include the leading
    -	colon ':' in tags for Ruby accessors and aliases.  (Bug#22241)
    +	Fix gnus-group.el compilation warnings about unprefixed variables
     
    -	* test/etags/ETAGS.good_1:
    -	* test/etags/ETAGS.good_2:
    -	* test/etags/ETAGS.good_3:
    -	* test/etags/ETAGS.good_4:
    -	* test/etags/ETAGS.good_5:
    -	* test/etags/ETAGS.good_6:
    -	* test/etags/CTAGS.good: Adapt to changes in Ruby tags.
    +	* lisp/gnus/gnus-group.el (gnus-group-update-eval-form): Avoid
    +	compilation warnings by passing in the dynamic variables as
    +	explicit lexical parameters to `eval'.
     
    -2016-02-02  Eli Zaretskii  
    +2016-02-13  Lars Ingebrigtsen  
     
    -	Fix file-name recognition in 'etags'
    +	Fix the :tracker slot name
     
    -	* lib-src/etags.c (get_language_from_filename): If FILE includes a
    -	leading directory, compare only its basename to the known file
    -	names in lang_names[].
    +	* lisp/gnus/registry.el (registry-lookup-secondary): The
    +	`tracker' slot is called `tracker', not `:tracker'.
     
    -	* test/etags/Makefile (RBSRC): Adapt to recent test1.ruby
    -	renaming.
    -	* test/etags/ETAGS.good_1:
    -	* test/etags/ETAGS.good_2:
    -	* test/etags/ETAGS.good_3:
    -	* test/etags/ETAGS.good_4:
    -	* test/etags/ETAGS.good_5:
    -	* test/etags/ETAGS.good_6:
    -	* test/etags/CTAGS.good: Adapt to changes in Ruby file names and
    -	to the results in Makefile due to the above etags.c fix.
    +2016-02-12  Lars Ingebrigtsen  
     
    -2016-02-02  Eli Zaretskii  
    +	Fix compilation warnings in gnus-art.el
     
    -	Change Ruby file names and extensions recognized by 'etags'
    +	* lisp/gnus/gnus-art.el (rfc1843-decode-region): Autoload.
    +	(gnus-article-hide): Avoid compilation warnings.
     
    -	* lib-src/etags.c : New variable, holds names
    -	of Ruby files.
    -	: Treat .rb, .ru, and .rbw as Ruby extensions.
    -	: Add Ruby_filenames to the Ruby entry.
    -	* test/etags/ruby-src/test1.ru: Renamed from test1.ruby.
    -	(Bug#22241)
    +2016-02-12  Lars Ingebrigtsen  
     
    -2016-02-02  Eli Zaretskii  
    +	Fix compilation warning in gnus-score.el
     
    -	More improvements for Ruby support in 'etags'
    +	* lisp/gnus/gnus-score.el (gnus-art): Require to silence byte
    +	compiler.
     
    -	* lib-src/etags.c (Ruby_functions): Tag Ruby accessors and
    -	alias_method.  Identify constants even if the assignment is not
    -	followed by whitespace.  (Bug#22241)
    +2016-02-12  Andreas Schwab  
     
    -	* test/etags/ruby-src/test1.ru: Add tests for constants,
    -	accessors, and alias_method.
    -	* test/etags/ETAGS.good_1:
    -	* test/etags/ETAGS.good_2:
    -	* test/etags/ETAGS.good_3:
    -	* test/etags/ETAGS.good_4:
    -	* test/etags/ETAGS.good_5:
    -	* test/etags/ETAGS.good_6:
    -	* test/etags/CTAGS.good: Adapt to changes in Ruby tests.
    +	Revert "Fix gnus-group-get-new-news-this-group on group with closed server"
     
    -2016-02-02  Paul Eggert  
    +	This reverts commit 9dc77e37aa84c6df9b3ddb4609f3c09201b0580e.
     
    -	Add --git-config option to autogen.sh
    +	This makes nnimap groups not be activated.
     
    -	* autogen.sh: New options --git-config, --help.
    -	(git_config): New shell var.  Alter function to respect this var.
    +2016-02-12  Lars Ingebrigtsen  
     
    -2016-02-02  Lars Ingebrigtsen  
    +	Fix encoding problem introduced by previous patch series
     
    -	Fix editing undo changes in eww fields
    +	* lisp/gnus/rfc2047.el: Ditto (bug#22648).
     
    -	* eww.el (eww-tag-form): Don't overwrite initial form data in text
    -	fields.
    -	(eww-process-text-input): Make `M-t' at the end of text fields work
    -	better (bug#19085).
    +	* lisp/gnus/rfc2231.el: Fix problem created by the
    +	mm-replace-in-string conversion.
     
    -2016-02-01  Lars Ingebrigtsen  
    +2016-02-12  Lars Ingebrigtsen  
     
    -	Allow the user more control of popping up the eww window
    +	Revert "Avoid defvarring prefix-less variables"
     
    -	* eww.el (eww): Use pop-to-buffer-same-window (suggested by
    -	Michael Heerdegen) (bug#22244).
    +	This reverts commit 303390bda34f98b400798d5383cf0d722e35ba19.
     
    -2016-02-01  Lars Ingebrigtsen  
    +	The defvars are needed if we're doing lexical-binding
     
    -	Make eww-browse-url with new-window parameter work again
    +2016-02-12  Glenn Morris  
     
    -	* eww.el (eww-browse-url): Stay in the same buffer if we're
    -	already in a eww mode buffer so that eww-browse-url with a
    -	new-window parameter works (bug#22244).
    +	* test/lisp/url/url-auth-tests.el (url-auth-test-digest-auth):
    +	Make it pass.
     
    -2016-02-01  Lars Ingebrigtsen  
    +	* test/lisp/url/url-auth-tests.el
    +	(url-auth-test-digest-auth-retrieve-cache): Fix obvious typo.
     
    -	Clean up eww code slightly
    +2016-02-12  Lars Ingebrigtsen  
     
    -	* eww.el (eww-browse-url): Clean up code slightly.
    +	Finish up cl-defmethoding registry,el
     
    -2016-02-01  Lars Ingebrigtsen  
    +	* lisp/gnus/registry.el (initialize-instance): Use cl-defmethod.
     
    -	Don't insert nil faces in shr
    +2016-02-12  Lars Ingebrigtsen  
     
    -	* shr.el (shr-insert-table): Don't add nil faces, because that
    -	will show up in *Messages* as "Invalid face reference: nil [32
    -	times]".
    +	Revert the gnus-replace-in-string change, fix arguments, reapply
     
    -2016-02-01  Glenn Morris  
    +2016-02-12  Lars Ingebrigtsen  
     
    -	Improve the custom type of some user options.
    +	Silence more message.el compilation warnings
     
    -	* lisp/autoinsert.el (auto-insert-alist):
    -	* lisp/replace.el (query-replace-from-to-separator):
    -	* lisp/gnus/gnus-art.el (gnus-hidden-properties):
    -	* lisp/gnus/gnus-gravatar.el (gnus-gravatar-properties):
    -	* lisp/gnus/gnus-picon.el (gnus-picon-properties):
    -	* lisp/progmodes/prolog.el (prolog-keywords, prolog-types)
    -	(prolog-mode-specificators, prolog-determinism-specificators)
    -	(prolog-directives, prolog-program-name, prolog-program-switches)
    -	(prolog-consult-string, prolog-compile-string, prolog-eof-string)
    -	(prolog-prompt-regexp): Improve custom type.
    +	* lisp/gnus/message.el (message-generate-headers): Don't use
    +	variable values directly to get the header values, because
    +	that breaks with lexical binding (without unprefixed defvars).
     
    -2016-02-01  Glenn Morris  
    +2016-02-12  Lars Ingebrigtsen  
     
    -	Mark some risky calendar variables.
    +	Fix various compilation warnings in message.el
     
    -	* lisp/calendar/cal-china.el (chinese-calendar-time-zone):
    -	Remove risky setting for deleted obsolete alias.
    -	(calendar-chinese-standard-time-zone-name)
    -	(calendar-chinese-daylight-saving-start)
    -	(calendar-chinese-daylight-saving-end):
    -	* lisp/calendar/calendar.el (calendar-iso-date-display-form)
    -	(calendar-european-date-display-form)
    -	(calendar-american-date-display-form, calendar-date-display-form):
    -	* lisp/calendar/diary-lib.el (diary-remind-message)
    -	(diary-header-line-format):
    -	* lisp/calendar/solar.el (calendar-time-display-form)
    -	(calendar-location-name): Mark as risky.
    +	* lisp/gnus/message.el (message-fix-before-sending): Use
    +	read-multiple-choice instead of gnus-multiple-choice.
    +	(mm-util): Require.
    +	(rfc2047): Require.
    +	(message-remove-blank-cited-lines): Use message instead of
    +	gnus-message.
    +	(message-send): Use y-or-n-p instead of gnus-y-or-n-p.
     
    -2016-02-01  Simen Heggestøyl  
    +2016-02-12  Lars Ingebrigtsen  
     
    -	Highlight two additional SCSS keywords
    +	Silence compilation warning in mm-view
     
    -	* lisp/textmodes/css-mode.el (css-bang-ids): New defconst holding CSS
    -	identifiers on the form !foo.
    -	(scss-bang-ids): New defconst holding SCSS identifiers on the form
    -	!foo.
    -	(css--font-lock-keywords): Highlight the new SCSS bang identifiers in
    -	`font-lock-builtin-face'.
    +	* lisp/gnus/mm-view.el (mm-display-inline-fontify): Silence
    +	compilation warning.
     
    -	* test/indent/css-mode.css: Add bang rule test case.
    +2016-02-12  Lars Ingebrigtsen  
     
    -	* test/indent/scss-mode.scss: Add test cases for the introduced bang
    -	rules.
    +	Fix epg-related compilation warnings in mml-sec
     
    -2016-02-01  Karl Fogel  
    +	* lisp/gnus/mml-sec.el: Fix compilation warnings from the epg
    +	library.
     
    -	Recommend enabling integrity-checking in git
    +2016-02-12  Lars Ingebrigtsen  
     
    -	* admin/notes/git-workflow:  Recommend setting transfer.fsckObjects.
    +	rmail-dont-reply-to-names is obsolete
     
    -	This is related to the autogen.sh changes made by Paul Eggert in
    -	commit d766ca8f (2016-02-01) and commit cedd7cad (2016-02-01), and to
    -	my edits today to http://www.emacswiki.org/emacs/GitForEmacsDevs and
    -	to emacswiki.org/emacs/GitQuickStartForEmacsDevs.  See also the thread
    -	"Recommend these .gitconfig settings for git integrity." at
    -	https://lists.gnu.org/archive/html/emacs-devel/2016-01/threads.html#01802.
    +	* lisp/gnus/nnmail.el (nnmail-fancy-expiry-target): Don't bind
    +	the obsolete `rmail-dont-reply-to-names' variable.
     
    -2016-02-01  Martin Rudalics  
    +2016-02-12  Lars Ingebrigtsen  
     
    -	Some corrections in Elisp manual
    +	Partially revert the defmethod->cl-defmethod change in registry.el
     
    -	* doc/lispref/buffers.texi (Read Only Buffers): Describe optional
    -	argument POSITION.
    -	* doc/lispref/debugging.texi (Error Debugging): `debug-on-signal'
    -	is an option.
    -	* doc/lispref/display.texi (Refresh Screen): Describe optional
    -	argument FRAME of `redraw-frame'.
    -	(Attribute Functions): Describe optional argument CHARACTER of
    -	`face-font'.
    -	(Defining Images): `image-load-path' is an option.
    -	(Beeping): `ring-bell-function' is an option.
    -	* doc/lispref/frames.texi (Size and Position): The PIXELWISE
    -	argument of `set-frame-size' is optional.
    -	(Raising and Lowering): The TERMINAL argument of `tty-top-frame'
    -	is optional.
    -	* doc/lispref/keymaps.texi (Controlling Active Maps): Fix doc of
    -	`set-transient-map'.
    -	* doc/lispref/minibuf.texi (Text from Minibuffer):
    -	`read-regexp-defaults-function' is an option.
    -	(Minibuffer Contents): `delete-minibuffer-contents' is a command.
    -	* doc/lispref/modes.texi (Mode Line Variables):
    -	`mode-line-position' and `mode-line-modes' are variables, not
    -	options.
    -	* doc/lispref/strings.texi (Creating Strings): The START argument
    -	of `substring' is optional.
    -	* doc/lispref/text.texi (Buffer Contents): Describe optional
    -	argument NO-PROPERTIES of `thing-at-point'.
    -	(User-Level Deletion): Both arguments of
    -	`delete-trailing-whitespace' are optional.
    -	(Margins): Use @key{RET} instead of @kbd{RET}.
    -	* doc/lispref/windows.texi (Display Action Functions): Write
    -	non-@code{nil} instead of non-nil.
    -	(Choosing Window Options): The WINDOW arg of
    -	`split-window-sensibly' is optional.
    -	(Choosing Window Options): Write non-@code{nil} instead of
    -	non-nil.
    -	(Window Start and End): Both args of `window-group-end' are
    -	optional.
    +	* lisp/gnus/registry.el (initialize-instance): Use defmethod,
    +	since cl-defmethod doesn't work with :after.
    +	(initialize-instance): Ditto, but with :before.
     
    -	* src/buffer.c (Fbarf_if_buffer_read_only): Rename argument POS
    -	to POSITION to keep consisteny with doc-string.
    +2016-02-12  Lars Ingebrigtsen  
     
    -2016-02-01  Paul Eggert  
    +	Avoid obsolete function in plstore
     
    -	Chatter when autogen.sh changes Git configuration
    +	* lisp/gnus/plstore.el (plstore--insert-buffer): Use setf
    +	instead of the obsolete epg-context-set-armor.
     
    -	* autogen.sh (git_config): New function.  Use it instead of ‘git config’.
    +2016-02-12  Lars Ingebrigtsen  
     
    -2016-02-01  Kyle Meyer  
    +	Use cl-defmethod in registry.el
     
    -	* lisp/org/org-compat.el (org-font-lock-ensure): Fix bogus test (bug#22399)
    +	* lisp/gnus/registry.el: Use cl-defmethod instead of the
    +	obsolete defmethod.
     
    -2016-01-31  Paul Eggert  
    +2016-02-12  Lars Ingebrigtsen  
     
    -	Omit unnecessary history from Lisp intro
    +	Make sieve-manage require sasl
     
    -	* doc/lispintro/emacs-lisp-intro.texi (Review, Digression into C)
    -	(Conclusion): Reword so as not to talk about earlier versions
    -	of Emacs in what should be an intro.
    +	* lisp/gnus/sieve-manage.el: Fix compilation warning by
    +	requiring sasl.
     
    -2016-01-31  Paul Eggert  
    +2016-02-12  Lars Ingebrigtsen  
     
    -	* etc/HISTORY: Add some more history, plus git tags.
    +	Avoid defvarring prefix-less variable
     
    -2016-01-31  Paul Eggert  
    +	* lisp/gnus/mm-uu.el (mm-uu-entry): Rename from `entry'.
     
    -	Improve elisp “Security Considerations” doc
    +2016-02-12  Lars Ingebrigtsen  
     
    -	* doc/lispref/os.texi (Security Considerations):
    -	Mention call-process and rename-file as opposed to shell commands.
    -	Add some more cross-references.
    +	* lisp/gnus/mailcap.el: Remove usage of mailcap-delete-duplicates.
     
    -2016-01-31  Paul Eggert  
    +2016-02-12  Lars Ingebrigtsen  
     
    -	autogen.sh now arranges for git to check hashes
    +	Don't use the obsolete char-valid-p function
     
    -	Suggested by Karl Fogel in:
    -	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01802.html
    -	* autogen.sh: Do "git config transfer.fsckObjects true".
    +	* lisp/gnus/mm-url.el (mm-url-decode-entities): Don't use the
    +	obsolete char-valid-p function.
     
    -2016-01-31  Paul Eggert  
    +2016-02-12  Lars Ingebrigtsen  
     
    -	Fix (c & 040) typo in emergency escapes
    +	Fix missed translation in a previous commit
     
    -	* src/keyboard.c (handle_interrupt): Fix recently-introduced
    -	typo (040 should have been ~040) that silently suppressed
    -	auto-saves after emergency escapes.  Redo comparison to avoid
    -	similar problems.
    +	* lisp/gnus/mailcap.el (mailcap-mime-types): Fix missed
    +	translation of mailcap-delete-duplicates.
     
    -2016-01-31  Eli Zaretskii  
    +2016-02-12  Lars Ingebrigtsen  
     
    -	Fix display of overlay strings with 'display' and 'box' property
    +	Avoid using mm-make-temp-file
     
    -	* src/xdisp.c (get_next_display_element): Take the box face from
    -	display stack level that comes from a buffer, not an overlay
    -	string.  (Bug#22499)
    +	* lisp/gnus/mail-source.el (mail-source-delete-crash-box): Ditto.
     
    -2016-01-31  Andreas Schwab  
    +	* lisp/gnus/mm-decode.el (mm-display-external): Ditto.
     
    -	Fix imap-starttls-open
    +	* lisp/gnus/mml-smime.el (mml-smime-openssl-encrypt): Ditto.
     
    -	* lisp/net/imap.el (imap-starttls-open): Log imap process
    -	output.  Call imap-parse-greeting.  (Bug#22500)
    +2016-02-12  Lars Ingebrigtsen  
     
    -2016-01-31  Andreas Schwab  
    +	Fix compilation warning in gnus-start
     
    -	Fix return value of imap-starttls-open
    +	* lisp/gnus/gnus-start.el (gnus-slave-save-newsrc): Avoid
    +	mm-make-temp-file.
     
    -	* lisp/net/imap.el (imap-starttls-open): Fix return value.
    +2016-02-12  Lars Ingebrigtsen  
     
    -2016-01-31  John Wiegley  
    +	Avoid the obsoleted defmethod
     
    -	Correct reference to DARWIN_OS preprocessor symbol
    +	* lisp/gnus/gnus-icalendar.el: Use cl-defmethod instead of
    +	defmethod.
     
    -	* src/alloc.c: Correct a preprocessor reference to DARWIN_OS, which may
    -	  not be defined.
    +2016-02-12  Lars Ingebrigtsen  
     
    -2016-01-30  Paul Eggert  
    +	Avoid defvarring prefix-less variables
     
    -	Spelling fix
    +	* lisp/gnus/gnus-group.el (gnus-group-update-eval-form): We
    +	don't need to `defvar' the short variables to allow `eval' to
    +	use them.
     
    -	Spelling fixes
    +2016-02-12  Lars Ingebrigtsen  
     
    -2016-01-30  Paul Eggert  
    +	nnweb doesn't need unibyte buffers
     
    -	Pacify GCC on C library without glibc API
    +	* lisp/gnus/nnweb.el (nnweb-retrieve-headers)
    +	(nnweb-read-overview, nnweb-request-article)
    +	(nnweb-google-reference): Unibyte buffers are not needed here.
     
    -	Without this change, with --enable-gcc-warnings GCC would complain
    -	“error: redundant redeclaration of ‘aligned_alloc’”.
    -	* configure.ac: Simplify aligned_alloc testing.
    -	* src/alloc.c (aligned_alloc): Don’t use if DARWIN_OS,
    -	since the simplified configure.ac no longer checks for that.
    -	Don’t declare if HAVE_ALIGNED_ALLOC.
    -	Correct misspelling of HAVE_ALIGNED_ALLOC in ifdef.
    +2016-02-12  Lars Ingebrigtsen  
     
    -2016-01-30  Artur Malabarba  
    +	Encode before sending from nnspool
     
    -	Backport: * lisp/files.el: Remove support for extra .dir-locals file
    +	* lisp/gnus/nnspool.el (nnspool-request-post): Encode data
    +	before sending it to the news server.
     
    -	(dir-locals-file-2, dir-locals--all-files): Remove.
    -	(dir-locals-collect-variables, dir-locals-file, dir-locals-find-file)
    -	(dir-locals-read-from-file, hack-dir-local-variables): Revert changes.
    +2016-02-11  Lars Ingebrigtsen  
     
    -	* lisp/files-x.el (modify-dir-local-variable): Revert changes.
    +	nnrss buffers don't have to be unibyte
     
    -	* lisp/help-fns.el (describe-variable): Revert changes.
    +	* lisp/gnus/nnrss.el (nnrss-insert): The buffer doesn't have
    +	to be unibyte just to receive data, I think.
     
    -	* doc/emacs/custom.texi (Directory Variables): Revert changes.
    +2016-02-11  Lars Ingebrigtsen  
     
    -	* etc/NEWS: Revert changes.
    +	Don't use mm-with-unibyte-current-buffer in mml2015
     
    -2016-01-30  Glenn Morris  
    +	* lisp/gnus/mml2015.el (mml2015-mailcrypt-encrypt): Don't use
    +	mm-with-unibyte-current-buffer.
     
    -	* lisp/net/browse-url.el (browse-url-default-browser):
    -	Lower priority of non-free Chrome.
    +2016-02-11  Lars Ingebrigtsen  
     
    -2016-01-30  Glenn Morris  
    +	Don't use mm-with-unibyte-current in mml1991
     
    -	Improve the custom type of some user options.
    +	* lisp/gnus/mml1991.el (mml1991-epg-sign): Don't use
    +	mm-with-unibyte-current.
     
    -	* lisp/desktop.el (desktop-minor-mode-table):
    -	* lisp/man.el (Man-frame-parameters):
    -	* lisp/midnight.el (midnight-delay):
    -	* lisp/speedbar.el (speedbar-select-frame-method):
    -	* lisp/tooltip.el (tooltip-frame-parameters):
    -	* lisp/tree-widget.el (tree-widget-space-width):
    -	* lisp/type-break.el (type-break-keystroke-threshold):
    -	* lisp/woman.el (woman-imenu-generic-expression):
    -	* lisp/cedet/ede.el (ede-debug-program-function):
    -	* lisp/cedet/ede/project-am.el (project-am-debug-target-function):
    -	* lisp/emulation/viper-keym.el (viper-toggle-key):
    -	* lisp/erc/erc-networks.el (erc-server-alist):
    -	* lisp/gnus/message.el (message-deletable-headers, message-signature):
    -	* lisp/mail/mailalias.el (mail-directory-stream):
    -	* lisp/play/tetris.el (tetris-x-colors):
    -	* lisp/progmodes/gud.el (gud-tooltip-modes): Improve custom type.
    +2016-02-11  Lars Ingebrigtsen  
     
    -2016-01-30  Simen Heggestøyl  
    +	Don't use mm-with-unibyte-current in mml1991
     
    -	Highlight CSS variables with variable name face
    +	* lisp/gnus/mml1991.el (mml1991-pgg-sign): Don't use
    +	mm-with-unibyte-current.
     
    -	* lisp/textmodes/css-mode.el (css-nmstart-re): Don't match variables.
    -	(css--font-lock-keywords): Highlight variables in
    -	`font-lock-variable-name-face'.
    +2016-02-11  Lars Ingebrigtsen  
     
    -2016-01-30  Glenn Morris  
    +	Don't use mm-with-unibyte-buffer in utf7
     
    -	* lisp/gnus/gnus-kill.el (gnus-winconf-kill-file): Not user-serviceable.
    +	* lisp/gnus/utf7.el (utf7-fragment-encode): Don't use
    +	mm-with-unibyte-buffer.
     
    -2016-01-30  Glenn Morris  
    +2016-02-11  Lars Ingebrigtsen  
     
    -	Mark some user options that can get evalled as risky.
    +	Remove XEmacs compat code from Gnus helper libraries
     
    -	* lisp/allout.el (allout-title):
    -	* lisp/emacs-lisp/edebug.el (edebug-global-break-condition):
    -	* lisp/gnus/message.el (message-mailer-swallows-blank-line):
    -	* lisp/progmodes/gud.el (gud-tooltip-display):
    -	* lisp/vc/ediff-mult.el (ediff-default-filtering-regexp):
    -	Mark as risky.
    +	* lisp/gnus/plstore.el (plstore-called-interactively-p): Remove.
     
    -2016-01-30  Eli Zaretskii  
    +	* lisp/gnus/pop3.el (pop3-make-date): Remove XEmacs compat.
     
    -	Disable DebPrint in sys_read on MS-Windows
    +	* lisp/gnus/sieve-mode.el: Remove XEmacs compat.
     
    -	* src/w32.c (sys_read): Disable a debugging print that is normal
    -	when non-blocking reads are retried.
    +	* lisp/gnus/spam-stat.el (spam-stat-called-interactively-p): Remove.
     
    -2016-01-30  Martin Rudalics  
    +2016-02-11  Lars Ingebrigtsen  
     
    -	;Fix ChangeLog entry
    +	Remove XEmacs compat code from Gnus backends
     
    -2016-01-30  Eli Zaretskii  
    +	* lisp/gnus/mm-view.el (mm-inline-image-xemacs): Remove.
    +	(mm-inline-image): Rename from mm-inline-image-emacs.
     
    -	Fix typos in Introduction to Emacs Lisp manual
    +	* lisp/gnus/mml.el: Remove XEmacs compat code.
     
    -	* doc/lispintro/emacs-lisp-intro.texi (Emacs Initialization)
    -	(kill-new function, Digression into C)
    -	(Complete forward-sentence, Divide and Conquer, Find a File)
    -	(lengths-list-many-files, Columns of a graph, defcustom)
    -	(recursive-count-words): Fix typos.  Reported by Daniel Bastos
    -	.
    +	* lisp/gnus/nnheader.el: Remove XEmacs compat code.
     
    -2016-01-30  Nicolas Petton  
    +	* lisp/gnus/nnimap.el (nnimap-open-connection-1): Remove
    +	XEmacs compat code.
     
    -	Bump version to 25.0.90
    +	* lisp/gnus/nnir.el (nnir-run-gmane): Remove XEmacs compat code.
     
    -	* README:
    -	* configure.ac:
    -	* msdos/sed2v2.inp: Bump version to 25.0.90.
    +	* lisp/gnus/nnmail.el (nnmail-pathname-coding-system): Remove
    +	XEmacs compat code.
     
    -2016-01-30  Nicolas Petton  
    +	* lisp/gnus/nnmairix.el: Remove XEmacs compat code.
     
    -	* etc/AUTHORS: Update the AUTHORS file
    +	* lisp/gnus/nnrss.el: Remove XEmacs compat code.
     
    -2016-01-30  Nicolas Petton  
    +	* lisp/gnus/nntp.el: Remove XEmacs compat code.
     
    -	Bump version to 25.0.90
    +2016-02-11  Lars Ingebrigtsen  
     
    -	* README:
    -	* configure.ac:
    -	* msdos/sed2v2.inp: Bump version to 25.0.90.
    +	Remove XEmacs compat functions from mm-util.el
    +
    +	* lisp/gnus/mm-util.el (mm-special-display-p): Remove.
    +	(mm-decode-coding-string, mm-encode-coding-string)
    +	(mm-decode-coding-region, mm-encode-coding-region): Remove.
    +	(mm-string-to-multibyte): Remove.
    +	(mm-char-or-char-int-p): Remove.
    +	(mm-ucs-to-char): Remove compat versions of the function.
    +	(mm-read-coding-system): Remove.
    +	(mm-coding-system-p): Remove compat code.
    +	(mm-enrich-utf-8-by-mule-ucs): Remove.
    +	(mm-enable-multibyte, mm-disable-multibyte): Remove compat versions.
    +	(mm-delete-duplicates): Remove.
    +	(mm-multibyte-p): Remove compat versions.
    +	(mm-xemacs-find-mime-charset-1): Remove.
    +	(mm-xemacs-find-mime-charset): Remove.
    +	(mm-make-temp-file): Made obsolete.
    +	(mm-find-buffer-file-coding-system): Remove XEmacs compat.
     
    -2016-01-30  Nicolas Petton  
    +2016-02-11  Lars Ingebrigtsen  
     
    -	* etc/AUTHORS: Update the AUTHORS file
    +	Remove Message and mm-decode XEmacs compat code
     
    -2016-01-30  Nicolas Petton  
    +	* lisp/gnus/message.el: Remove XEmacs compat code.
     
    -	authors.el updates
    +	* lisp/gnus/mm-decode.el (mm-create-image-xemacs): Remove.
     
    -	* admin/authors.el (authors-renamed-files-alist): Additions.
    +	* lisp/gnus/mm-util.el: Remove some XEmacs compat code.
     
    -2016-01-30  Nicolas Petton  
    +2016-02-11  Lars Ingebrigtsen  
     
    -	Make it possible to run make change-history on emacs-25
    +	Remove som XEmacs compat code from message.el
     
    -	* Makefile.in: Check if the current branch is emacs-25 instead of
    -	  master.
    +	* lisp/gnus/message.el: Remove some XEmacs compat code.
     
    -2016-01-30  lu4nx  
    +2016-02-11  Lars Ingebrigtsen  
     
    -	Support Go language in 'etags'
    +	Remove XEmacs compat code from ietf-drums.el
     
    -	* lib-src/etags.c : Fix documentation of Ruby tags.
    -	: New help.
    -	: New variable.
    -	(Go_functions): New function.
    -	: Add entry for Go.  (Bug#22370)
    +	* lisp/gnus/ietf-drums.el (ietf-drums-syntax-table): Drop
    +	XEmacs compat.
     
    -	* doc/emacs/maintaining.texi (Tag Syntax): Document Go support.
    -	* doc/man/etags.1: Mention Go support.
    +2016-02-11  Lars Ingebrigtsen  
     
    -	* etc/NEWS: Mention Go support.
    +	Remove XEmacs compat code from gravatar.el
     
    -	* test/etags/go-src/test.go:
    -	* test/etags/go-src/test1.go: New test files.
    -	* test/etags/Makefile (GOSRC): New variable.
    -	(SRCS): Add $(GOSRC).
    -	* test/etags/ETAGS.good_1:
    -	* test/etags/ETAGS.good_2:
    -	* test/etags/ETAGS.good_3:
    -	* test/etags/ETAGS.good_4:
    -	* test/etags/ETAGS.good_5:
    -	* test/etags/ETAGS.good_6:
    -	* test/etags/CTAGS.good: Adapt to addition of Go tests.
    +	* lisp/gnus/gravatar.el: Remove XEmacs compat code from
    +	gravatar.el.
     
    -2016-01-30  Eli Zaretskii  
    +2016-02-11  Lars Ingebrigtsen  
     
    -	Improve Ruby support in 'etags'
    +	Remove more XEmacs compat code from Gnus
     
    -	* lib-src/etags.c (Ruby_functions): Tag constants.  Don't tag
    -	singleton classes.  Remove class qualifiers from tags generated
    -	for method and constant names.  (Bug#22241)
    +	* lisp/gnus/gnus-util.el (gnus-bound-and-true-p): Remove.
    +	(gnus-timer--function): Remove.
     
    -	* doc/emacs/maintaining.texi (Tag Syntax): Mention that constants
    -	are tagged by etags in Ruby.
    +	* lisp/gnus/gnus-uu.el (gnus-uu-save-article): Remove XEmacs
    +	19.2 compat.
     
    -	* etc/NEWS: Mention that constants are tagged by etags in Ruby.
    +	* lisp/gnus/gnus-win.el: Remove XEmacs compat code.
     
    -	* test/etags/ruby-src/test1.ru: Add more tests.
    -	* test/etags/ETAGS.good_1:
    -	* test/etags/ETAGS.good_2:
    -	* test/etags/ETAGS.good_3:
    -	* test/etags/ETAGS.good_4:
    -	* test/etags/ETAGS.good_5:
    -	* test/etags/ETAGS.good_6:
    -	* test/etags/CTAGS.good: Adapt to the changes in etags and in Ruby
    -	tests.
    +2016-02-11  Lars Ingebrigtsen  
     
    -2016-01-30  Eli Zaretskii  
    +	Remove more XEmacs compat functions from gnus-util.el
     
    -	Adjust etags test results to changes in copyright years
    +	* lisp/gnus/gnus-util.el (gnus-put-display-table): Remove.
    +	(gnus-get-display-table): Remove.
    +	(gnus-format-message): Remove.
     
    -	* test/etags/CTAGS.good:
    -	* test/etags/ETAGS.good_1:
    -	* test/etags/ETAGS.good_2:
    -	* test/etags/ETAGS.good_3:
    -	* test/etags/ETAGS.good_4:
    -	* test/etags/ETAGS.good_5:
    -	* test/etags/ETAGS.good_6: Adjust to shift in characters and
    -	in line numbers.
    +2016-02-11  Lars Ingebrigtsen  
     
    -2016-01-30  Andreas Schwab  
    +	Remove more XEmacs compat functions from Gnus
     
    -	Revert "Re-enable checks in member, memql, delete to complain about non-lists"
    +	* lisp/gnus/gnus-util.el (gnus-next-char-property-change): Remove.
    +	(gnus-previous-char-property-change): Remove.
    +	(gnus-graphic-display-p): Remove.
    +	(gnus-select-frame-set-input-focus): Remove.
     
    -	This reverts commit f524e8b7f12d9b5a8b92084e5385429fe7b085b9.
    +2016-02-11  Lars Ingebrigtsen  
     
    -2016-01-30  Nicolas Petton  
    +	Remove more XEmacs compat code from gnus-util
     
    -	Make it possible to run make change-history on emacs-25
    +	* lisp/gnus/gnus-util.el (gnus-make-local-hook): Remove (and
    +	all its usages).
    +	(gnus-invisible-p): Remove.
     
    -	* Makefile.in: Check if the current branch is emacs-25 instead of
    -	  master.
    +2016-02-11  Lars Ingebrigtsen  
     
    -2016-01-30  Dmitry Gutov  
    +	Remove gnus-make-local-hook
     
    -	Don't fiddle with DEFAULT
    +	* lisp/gnus/gnus-util.el (gnus-make-local-hook): Remove (and
    +	all its usages).
     
    -	* lisp/progmodes/project.el (project--completing-read-strict):
    -	Don't change DEFAULT, whether is has any matches in
    -	COLLECTION, or not.
    +2016-02-11  Lars Ingebrigtsen  
     
    -2016-01-30  Eli Zaretskii  
    +	gnus-replace-in-string -> replace-regexp-in-string
     
    -	Document xwidget commands and functions
    +	* lisp/gnus/gnus-util.el (gnus-replace-in-string): Declare
    +	obsolete.  Transform all usages of it into
    +	replace-regexp-in-string.
     
    -	* doc/lispref/display.texi (Xwidgets): New section, describes some
    -	of the xwidget primitives.
    -	* doc/lispref/display.texi (Display): Update the chapter menu.
    -	* doc/emacs/misc.texi (Embedded WebKit Widgets): New section.
    -	* doc/emacs/emacs.texi (Top): Update the master menu to include
    -	the xwidget node.
    +	* lisp/gnus/mailcap.el (mailcap-replace-in-string): Remove.
     
    -2016-01-30  Lars Ingebrigtsen  
    +2016-02-10  Lars Ingebrigtsen  
     
    -	Build fix for shr.el
    +	Remove Gnus XEmacs compat
     
    -	* shr.el (seq): Require.
    +	* lisp/gnus/gnus-start.el (gnus-dribble-enter): Remove comment
    +	about code that doesn't work in XEmacs.
     
    -2016-01-30  Dmitry Gutov  
    +	* lisp/gnus/gnus-sum.el: Remove XEmacs compat.
     
    -	Improve project-find-file yet again!
    +	* lisp/gnus/gnus-topic.el: Remove XEmacs compat.
     
    -	* lisp/progmodes/project.el (project--completing-read-strict):
    -	New function.
    -	(project-find-file-in): Use it.
    -	(project-file-completion-table): Move the default
    -	implementation inside the cl-defgeneric form.
    -	(http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01720.html)
    +2016-02-10  Lars Ingebrigtsen  
     
    -2016-01-30  Dmitry Gutov  
    +	Remove compat functions in gnus-spec.el
     
    -	Don't pass DIR to 'hg status'
    +	* lisp/gnus/gnus-spec.el (gnus-string-width-function): Remove.
    +	(gnus-substring-function): Remove.
    +	(gnus-use-correct-string-widths): Remove.
    +	(gnus-make-format-preserve-properties): Remove.
    +	(gnus-xmas-format): Remove.
     
    -	* lisp/vc/vc-hg.el (vc-hg-dir-status-files):
    -	Don't pass DIR to 'hg status' (bug#22481).
    +	* lisp/gnus/gnus-srvr.el (gnus-server-mode): Remove XEmacs compat.
     
    -2016-01-30  Stephen Leake  
    +2016-02-10  Lars Ingebrigtsen  
     
    -	Fix typo in previous commits
    +	Remove Gnus XEmacs compat functions
     
    -	* lisp/progmodes/project.el (project-find-file-in):
    -	* lisp/vc/vc-mtn.el (vc-mtn-find-ignore-file): Fix typo in previous
    -	commit.
    +	* lisp/gnus/gnus-registry.el: Remove XEmacs compat.
     
    -2016-01-30  Stephen Leake  
    +	* lisp/gnus/gnus-salt.el: Remove XEmacs compat.
     
    -	Improve project-find-file
    +	* lisp/gnus/gnus-score.el (gnus-decay-score): Remove XEmacs compat.
     
    -	* lisp/progmodes/project.el (project-file-completion-table): New.
    -	(project-find-file, project-or-external-find-file): Default to filename
    -	at point.
    -	(project-file-completion-table): New, split out from
    -	project--find-file-in.
    -	(project-find-file-in): Renamed from project--find-file-in, use
    -	project-file-completion-table.
    +2016-02-10  Lars Ingebrigtsen  
     
    -	* lisp/progmodes/xref.el (ede-minor-mode): New declaration.
    -	(xref--find-ignores-arguments): Add doc string.
    +	Remove Gnus XEmacs compatibility
     
    -2016-01-30  Stephen Leake  
    +	* lisp/gnus/gnus-demon.el (gnus-demon-idle-since): Remove
    +	XEmacs compat.
     
    -	Implement vc-mtn-find-ignore-file, fix some doc strings
    +	* lisp/gnus/gnus-dired.el: Remove XEmacs compat.
     
    -	* lisp/cedet/cedet-global.el (cedet-gnu-global-root): Improve doc string.
    +	* lisp/gnus/gnus-draft.el: Remove XEmacs compat.
     
    -	* lisp/cedet/ede/locate.el (initialize-instance): Improve doc string.
    +	* lisp/gnus/gnus-gravatar.el (gnus-gravatar-insert): Remove
    +	XEmacs compat.
     
    -	* lisp/vc/vc-git.el (vc-git-find-ignore-file): Fix doc string.
    +	* lisp/gnus/gnus-group.el: Remove XEmacs compat.
     
    -	* lisp/vc/vc-mtn.el (vc-mtn-find-ignore-file): New function.
    +	* lisp/gnus/gnus-html.el: Remove XEmacs compat.
     
    -2016-01-29  Vincent Belaïche  
    +	* lisp/gnus/gnus-ml.el: Remove XEmacs compat.
     
    -	Correct a whole bunch of bugs coming with renamed cell relocation.
    +	* lisp/gnus/gnus-picon.el (gnus-picon-style): Remove XEmacs comment.
     
    -	This is the same change as commit on master branch. See
    -	http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=badcd38aa86ed7973f2be2743c405710973a0bdd
    +2016-02-10  Lars Ingebrigtsen  
     
    -	* lisp/ses.el (ses-localvars): rename variable
    -	`ses--renamed-cell-symb-list' into `ses--in-killing-named-cell-list'
    -	and adjust the comment about it.
    -	(ses-plist-delq): new defun.
    -	(ses--ses-buffer-list): new defvar.
    -	(ses--unbind-cell-name): new defun.
    -	(ses-relocate-symbol): Do not relocate symbol when it is a named cell.
    -	(ses-relocate-formula): Undo change of
    -	2011-12-27T19:30:39Z!vincentb1@users.sourceforge.net that was
    -	preventing relocation for named cell --- now doing this is delegated
    -	to function `ses-relocate-symbol'.
    -	(ses-relocate-range): In docstring, undo change of
    -	2016-01-03T07:31:52Z!johnw@newartisans.com, `ses-range' must remain
    -	lower case as it is not a variable.
    -	(ses-relocate-all): Cell name relocation : 1) check that cell is a
    -	renamed cell by testing `ses-cell' property to :ses-named, rather than
    -	comparing name to corresponding standard name. Set rowcol of renamed
    -	cell into the hashmap --- `ses-cell' property must not be used for
    -	that as the same name can be used for different locations in different
    -	SES sheets ; 2) use `local-variable-if-set-p' rather than `boundp' and
    -	`local-variable-p' to check if cell name is already in use in this
    -	sheet or needs initialization.
    -	(ses-relocate-all): Cell value relocation : 1) like for name
    -	relocation use the `ses-cell' property rather than comparing actual
    -	name to corresponding standard name. 2) Correct bug introduced in
    -	2011-12-27T19:30:39Z!vincentb1@users.sourceforge.net, as the test was
    -	made the other way round than the intention --- ie value relocation
    -	was disabled for standard cell, not for renamed cell as was the
    -	intention.
    -	(ses-relocate-all): Add loop for unbinding deleted renamed cells
    -	names.
    -	(ses-killbuffer-hook): new defun.
    -	(ses-mode): Add the ses--ses-buffer-list maintenance mechanism ---
    -	kill buffer hook, plus pushing current buffer if new in list.
    -	(ses-delete-row, ses-delete-column): Collect deleted renamed cells
    -	into `ses--in-killing-named-cell-list'.
    -	(ses-rename-cell): Remove update of variable
    -	`ses--renamed-cell-symb-list', this variable is renamed to
    -	`ses--in-killing-named-cell-list', and its setting is done in
    -	functions `ses-delete-row' and , `ses-delete-column' now.
    -	(ses-rename-cell): Make cell new name a buffer local variable.
    -	(ses-rename-cell): Change correction of
    -	2015-12-30T23:10:37Z!vincentb1@users.sourceforge.net concerning
    -	computation of the range over which `cursor-intangible' property was
    -	to be updated. This correction was ok for non spilling cells, but not
    -	for cells spilling over following blank cells. Simply use
    -	`next-single-property-change' rather than computing the end column
    -	from column widths.
    +	Don't use image-map if it isn't defined
     
    -2016-01-29  Andreas Schwab  
    +	* lisp/net/shr.el (shr-image-map): Only use image-map as a
    +	parent if it's defined (bug#22614).
     
    -	Re-enable checks in member, memql, delete to complain about non-lists
    +2016-02-10  Lars Ingebrigtsen  
     
    -	* src/fns.c (Fmember, Fmemql, Fdelete): Revert 2007-10-16 change.
    +	Check for MagickAutoOrientImage
     
    -2016-01-29  Martin Rudalics  
    +	* configure.ac: Check for MagickAutoOrientImage.
     
    -	Minor doc(-string) tweaks
    +	* src/image.c (imagemagick_load_image): Don't use
    +	MagickAutoOrientImage unless it's available.
     
    -	* lisp/window.el (window-in-direction): Fix doc-string typo.
    -	* doc/lispref/frames.texi (Frame Font): Mention canonical
    -	character width/height.
    -	* doc/lispref/windows.texi (Windows and Frames): Clarify
    -	handling of minibuffer window for `window-in-direction'.
    -	(Window Sizes): Minor tweaks in descriptions of
    -	`window-max-chars-per-line', `window-min-width' and
    -	`window-min-size'.
    -	(Deleting Windows): Minor tweak in `delete-window' description.
    -	(Selecting Windows): Clarify window use time description.
    -	(Cyclic Window Ordering): Minor tweak.
    -	(Switching Buffers): Clarify description of
    -	`switch-to-buffer-in-dedicated-window'.
    +2016-02-10  Lars Ingebrigtsen  
     
    -2016-01-29  Eli Zaretskii  
    +	Document EXIF image rotation
     
    -	Minor improvements to 'pcase' documentation
    +	* doc/lispref/display.texi (ImageMagick Images): Mention EXIF rotation.
     
    -	* doc/lispref/control.texi (Pattern matching case statement):
    -	Improve the documentation of 'pcase' per comments.  See two
    -	discussion threads on emacs-devel@gnu.org for the details:
    -	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01335.html
    -	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01336.html.
    +2016-02-10  Dima Kogan  
     
    -2016-01-29  Glenn Morris  
    +	Support integer image rotation and respect EXIF rotations
     
    -	Don't use eval to quieten prolog.el compilation.
    +	* src/image.c (imagemagick_load_image): Allow integer rotations in
    +	addition to floating point rotations (bug#22591).
    +	* src/image.c (imagemagick_load_image): Images that have an
    +	orientation given in EXIF and have no explicit :rotation tag are now
    +	pre-rotated.  All information such as width/height is reported for the
    +	rotated image.
     
    -	* lisp/progmodes/prolog.el (pltrace-on, pltrace-off): Declare.
    -	(prolog-enable-sicstus-sd, prolog-disable-sicstus-sd): Don't use eval.
    +2016-02-10  Wolfgang Jenkner  
     
    -2016-01-29  Glenn Morris  
    +	* lisp/net/shr.el (image-map): Defvar it.  (Bug#22614)
     
    -	Mark some risky prolog variables.
    +2016-02-10  Lars Ingebrigtsen  
     
    -	* lisp/progmodes/prolog.el (prolog-system-version)
    -	(prolog-keywords, prolog-types, prolog-mode-specificators)
    -	(prolog-determinism-specificators, prolog-directives)
    -	(prolog-program-name, prolog-program-switches)
    -	(prolog-consult-string, prolog-compile-string)
    -	(prolog-eof-string, prolog-prompt-regexp, prolog-help-function):
    -	Mark anything processed by prolog-find-value-by-system as risky.
    +	* lisp/gnus/gnus-cite.el: Remove XEmacs compat code.
     
    -2016-01-28  Glenn Morris  
    +2016-02-09  Lars Ingebrigtsen  
     
    -	* lisp/custom.el (defcustom): Doc fix.
    +	Remove compat code from gnus-bookmark.el
     
    -	* doc/lispref/customize.texi (Variable Definitions):
    -	Defcustom should always have a type.
    +	* lisp/gnus/gnus-bookmark.el (gnus-bookmark-mouse-available-p): Remove.
    +	(gnus-bookmark-remove-properties): Remove.
     
    -2016-01-28  Glenn Morris  
    +2016-02-09  Lars Ingebrigtsen  
     
    -	* lisp/cedet/semantic/db-file.el (semanticdb-persistent-path):
    -	Fix :type.
    +	Remove XEmacs compat code from gnus-a*.el
     
    -	* lisp/emacs-lisp/package.el (package-load-list): Improve :type.
    +	* lisp/gnus/gnus-agent.el: Remove compat code.
     
    -2016-01-28  Michael Albinus  
    +	* lisp/gnus/gnus-art.el: Remove compat code.
     
    -	Fix Bug#22452
    +	* lisp/gnus/gnus-async.el: Remove compat code.
     
    -	* 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):
    -	Mark it as connected.
    +2016-02-09  Lars Ingebrigtsen  
     
    -	* lisp/net/tramp.el (tramp-handle-file-remote-p): Check also, if
    -	connection property "connected" is set.  (Bug#22452)
    +	Remove gmm compat functions
     
    -2016-01-27  Glenn Morris  
    +	* lisp/gnus/gmm-utils.el (gmm-image-search-load-path): Remove.
    +	(gmm-write-region): Remove.
    +	(gmm-called-interactively-p): Remove.
     
    -	* lisp/xwidget.el (xwidget-query-on-exit-flag): Declare.
    +2016-02-09  Lars Ingebrigtsen  
     
    -	* lisp/xwidget.el (xwidget-webkit-browse-url): Give explicit error
    -	if not compiled with xwidgets.
    +	* lisp/gnus/ecomplete.el: Remove XEmacs compat code.
     
    -2016-01-27  Paul Eggert  
    +2016-02-09  Lars Ingebrigtsen  
     
    -	C-u C-x = example doc fix
    +	Remove compat code from compface.el
     
    -	* doc/emacs/mule.texi (International Chars):
    -	Adjust example to match current behavior of C-u C-x =.
    +	* lisp/gnus/compface.el: Remove XEmacs compat code throughout.
     
    -2016-01-27  Paul Eggert  
    +2016-02-09  Lars Ingebrigtsen  
     
    -	malloc.h hygiene
    +	Remove the now empty gnus-ems.el and references to it
     
    -	This attempts to future-proof Emacs a bit against possible glibc
    -	changes, by having Emacs use  declarations rather than
    -	coding them up by hand.  Problem noted by Florian Weimer in:
    -	https://sourceware.org/ml/libc-alpha/2016-01/msg00777.html
    -	Implement this mainly by moving malloc.h-related functions from
    -	emacs.c (which does not include ) to alloc.c (which does).
    -	* src/alloc.c (my_heap_start) [DOUG_LEA_MALLOC || GNU_LINUX]:
    -	New function.
    -	The remaining changes to this file apply only if DOUG_LEA_MALLOC.
    -	(alloc_unexec_pre, alloc_unexec_post): New functions.
    -	(malloc_initialize_hook): Use my_heap_start and alloc_unexec_post.
    -	(__MALLOC_HOOK_VOLATILE): New macro, if not already defined.
    -	(__malloc_initialize_hook): Use it.
    -	(malloc_state_ptr, malloc_initialize_hook, __malloc_initialize_hook):
    -	Move here from ...
    -	* src/emacs.c: ... here.
    -	(malloc_get_state, malloc_set_state): Remove extern decls.
    -	(my_heap_start) [DOUG_LEA_MALLOC || GNU_LINUX]: Remove static var.
    -	All uses changed to similarly-named new function.
    -	(Fdump_emacs): Use new functions alloc_unexec_pre, alloc_unexec_post.
    -	* src/lisp.h (my_heap_start, alloc_unexec_pre, alloc_unexec_post):
    -	New decls.
    +2016-02-09  Lars Ingebrigtsen  
     
    -2016-01-26  Eli Zaretskii  
    +	Remove Gnus compat names for mouse bindings
     
    -	* doc/emacs/mark.texi (Using Region): Clarify wording.  (Bug#22467)
    +	* lisp/gnus/gnus-ems.el (gnus-widget-button-keymap): Remove.
    +	(gnus-down-mouse-2): Remove.
    +	(gnus-down-mouse-3): Remove.
     
    -2016-01-26  Paul Eggert  
    +2016-02-09  Lars Ingebrigtsen  
     
    -	Remove never-set var handle_user_signal_hook
    +	Drop Gnus compat functions
     
    -	* src/keyboard.c, src/keyboard.h (handle_user_signal_hook):
    -	Remove never-set var.  All uses removed.
    +	* lisp/gnus/gnus-ems.el (gnus-mule-max-width-function): Remove.
     
    -2016-01-26  K. Handa  
    +	* lisp/gnus/gnus-util.el (gnus-kill-all-overlays): Move here.
     
    -	Backport:fix previous change of src/ftfont.c (ftfont_shape_by_flt)
    +	* lisp/gnus/gnus.el (gnus-mode-line-modified): Remove.
     
    -	* src/ftfont.c (ftfont_shape_by_flt): Fix previous change.  Access the
    -	second glyph only when there are enough glyphs.
    +2016-02-09  Lars Ingebrigtsen  
     
    -	(cherry picked from commit 9835757013569673854b692ccbb58bfb3c3ed1f7)
    +	Get rid of gnus-ems-redefine
     
    -2016-01-26  K. Handa  
    +	* lisp/gnus/gnus-ems.el (gnus-mouse-face-prop): Remove.
     
    -	support rendering of wider range of combinging characters by ftfont backend
    +2016-02-09  Lars Ingebrigtsen  
     
    -	* lisp/language/hebrew.el (hebrew-shape-gstring): If the font backend
    -	supports rendering of combining characters, call
    -	font-shape-gstring.
    +	* lisp/gnus/gnus-spec.el: Move definition here from gnus-ems.el.
     
    -	* src/font.c (Ffont_get): Handle `combining-capability' property.
    -	(syms_of_font): New symbol ":combining-capability'.
    +2016-02-09  Lars Ingebrigtsen  
     
    -	* src/font.h (struct font_driver): New member combining_capability.
    +	Remove Gnus compat code
     
    -	* src/ftfont.c: Include "category.h".
    -	(ftfont_driver): Initialize combining_capability to
    -	ftfont_combining_capability.
    -	(ftfont_shape_by_flt): If OTF is null, try to find a suitable
    -	FLT in advance.
    -	(ftfont_combining_capability): New function.
    +	* lisp/gnus/gnus-ems.el (gnus-ems-redefine): Remove
    +	transitional code from ten years ago.
     
    -	(cherry picked from commit 536f48e9a2251b9e654ea974bd90ff2f40218753)
    +2016-02-09  Lars Ingebrigtsen  
     
    -2016-01-26  Anders Lindgren  
    +	Allow interactively scaling past :max-width etc
     
    -	Fixed NextStep fullscreen issue (bug#22468)
    +	* lisp/image.el (image--current-scaling)
    +	(image--image-without-parameters): New functions.
    +	(image--change-size): Use them to allow changing the size of a
    +	image even if it has :width/:max-width (etc.) already set.
     
    -	When in fullscreen mode, `[screen visibleFrame]' sometimes
    -	includes, sometimes excludes the menu bar. This could cause
    -	a frame to be placed too low when in fullscreen mode.
    +2016-02-09  Lars Ingebrigtsen  
     
    -	* src/nsterm.m (ns_menu_bar_should_be_hidden): Trace.
    -	(constrain_frame_rect): New parameter, isFullscreen, when true don't
    -	query the height of the menu bar.
    -	(ns_constrain_all_frames): Pass `false' (isFullscreen) to
    -	`constrain_frame_rect'.
    -	([EmacsView initFrameFromEmacs:]): Trace.
    -	([EmacsView isFullscreen]): Trace.
    -	([EmacsWindow constrainFrameRect:toScreen:]): Pass fullscreen
    -	state to `constrain_frame_rect'.
    +	* lisp/gnus/mm-decode.el (shr-image-map): Compilation fix.
     
    -2016-01-26  Artur Malabarba  
    +2016-02-09  Lars Ingebrigtsen  
     
    -	* lisp/files.el: Use a fixed file name for the second dir-locals file
    +	Allow accessing the image commands via shr
     
    -	(dir-locals-file): Revert to its original fixed value.
    -	(dir-locals-file-2): New const.
    -	(dir-locals--all-files): Don't use `file-name-all-completions'.
    -	Instead, just check for the 2 dir-locals files and return a list
    -	of the ones that exit (if any).
    +	* lisp/gnus/mm-decode.el (mm-convert-shr-links): Allow
    +	accessing the image commands.
     
    -	* etc/NEWS: Document the change.
    +	* lisp/net/shr.el (shr-image-map): New map used for images.
    +	(shr-urlify): Don't overwrite image maps when applying URL maps.
     
    -	* doc/emacs/custom.texi (Directory Variables): Document the change.
    +2016-02-09  Lars Ingebrigtsen  
     
    -	* doc/lispref/variables.texi (Directory Local Variables): Update
    -	accordingly.
    +	Use a sparse image keymap
     
    -2016-01-26  Artur Malabarba  
    +	* lisp/image.el (image-map): Use a sparse keymap.
     
    -	* lisp/files-x.el (modify-dir-local-variable): Small rewrite
    +2016-02-09  Lars Ingebrigtsen  
     
    -	Change a variable name to be more meaningful, and reorder some of
    -	the code with no change in behaviour.
    +	Put a keymap on images created with insert-image and friends
     
    -2016-01-26  Artur Malabarba  
    +	* lisp/image.el (image-save): New command.
    +	(image-rotate): Ditto.
    +	(image-map): New keymap.
    +	(insert-image): Put the image-map on all images.
    +	(insert-sliced-image): Ditto.
    +	* doc/lispref/display.texi (Showing Images): Document the
    +	image map.
     
    -	* lisp/files.el (dir-locals-find-file): Refactor return values
    +2016-02-09  Lars Ingebrigtsen  
     
    -	Returning a cache remains unchanged, but the case of returning a
    -	file (or pattern) is now changed to return the contaning
    -	directory.
    +	Fix some folding issues in read-multiple-choice
     
    -	(dir-locals-read-from-file): Rename to `dir-locals-read-from-dir'
    -	and make obsolete.
    -	(dir-locals-read-from-dir): Simplify accordingly.
    -	(hack-dir-local-variables): Simplify accordingly and rename a
    -	variable.
    +	* lisp/subr.el (read-multiple-choice): Fix folding when you
    +	have many items.
     
    -2016-01-26  Glenn Morris  
    +2016-02-09  Lars Ingebrigtsen  
     
    -	* lisp/textmodes/flyspell.el (flyspell--prev-meta-tab-binding):
    -	Declare.
    +	Fix typo in last checkin
     
    -	* configure.ac (USE_CAIRO): Rename to more standard HAVE_CAIRO.
    +2016-02-09  Lars Ingebrigtsen  
     
    -	* configure.ac (--with-cairo): Say it's experimental.
    +	Remove Gnus compat functions
     
    -	* lisp/xwidget.el (xwidget-webkit-scroll-behavior):
    -	Rename using American spelling.  Update all uses.
    +	* lisp/gnus/gnus-ems.el (gnus-mark-active-p)
    +	(gnus-region-active-p, gnus-select-lowest-window)
    +	(gnus-summary-display-table, gnus-max-width-function): Remove
    +	compat functions.
     
    -2016-01-26  Glenn Morris  
    +2016-02-09  Lars Ingebrigtsen  
     
    -	Yet more xwidget doc fixes.
    +	Move non-compat Gnus functions to gnus-util.el
     
    -	* lisp/xwidget.el (xwidget-webkit-scroll-behaviour)
    -	(xwidget-insert, xwidget-webkit-browse-url)
    -	(xwidget-webkit-scroll-up, xwidget-webkit-scroll-down)
    -	(xwidget-webkit-scroll-forward, xwidget-webkit-scroll-backward)
    -	(xwidget-webkit-insert-string, xwidget-webkit-show-named-element)
    -	(xwidget-webkit-show-id-element)
    -	(xwidget-webkit-show-id-or-named-element)
    -	(xwidget-webkit-adjust-size, xwidget-webkit-current-url)
    -	(xwidget-webkit-execute-script-rv)
    -	(xwidget-webkit-copy-selection-as-kill, xwidget-get)
    -	(xwidget-put):  Doc fixes.
    -	(xwidget-webkit-insert-string, xwidget-webkit-show-named-element)
    -	(xwidget-webkit-show-id-element)
    -	(xwidget-webkit-show-id-or-named-element): Prompt fixes.
    +	* lisp/gnus/gnus-util.el (gnus-remove-image, gnus-put-image)
    +	(gnus-create-image, gnus-image-type-available-p): Move here
    +	from gnus-ems.el, since these aren't compat functions.
     
    -2016-01-25  Ted Zlatanov  
    +2016-02-09  Paul Eggert  
     
    -	* lisp/gnus/gnus-art.el (gnus-blocked-images):
    -	Add explicit nil choice and tags.
    +	Omit valloc decl if redundant
     
    -2016-01-25  Paul Eggert  
    +	* src/gmalloc.c (valloc): Omit decl if malloc.h is included,
    +	to pacify --enable-gcc-warnings.
     
    -	Spelling fixes
    +2016-02-09  Wolfgang Jenkner  
     
    -2016-01-25  Stefan Monnier  
    +	Restore the calloc family.
     
    -	(font-lock-ensure-function): Fix bug#22399
    +	* src/gmalloc.c (calloc, gcalloc, hybrid_calloc): Restore definitions.
    +	They were lost in a4817d8 but calloc is still (marginally) used in
    +	code statically liked with emacs, so hybrid_calloc is needed.
    +	Also, in the non-hybrid case, we can't get rid of calloc anyway as
    +	other libraries liked with emacs may need it.
    +	* src/conf_post.h: Restore redefinition of calloc to hybrid_calloc.
     
    -	* lisp/font-lock.el (font-lock-ensure-function): Fix handling when
    -	font-lock-mode is not enabled (bug#22399).
    +2016-02-09  Lars Ingebrigtsen  
     
    -2016-01-25  Alan Mackenzie  
    +	Remove some Gnus compat functions
     
    -	Expunge "allow" + infinitive from source and doc, part 2.
    +	* lisp/gnus/gnus-ems.el (gnus-string-mark-left-to-right)
    +	(gnus-window-inside-pixel-edges, gnus-set-process-plist)
    +	(gnus-process-plist, gnus-process-get, gnus-process-put): Remove.
     
    -	Do the same for "permit", "enable", "prevent", and (where appropriate)
    -	"require".
    +2016-02-09  Paul Eggert  
     
    -	doc/misc/reftex.texi:
    -	doc/misc/url.texi:
    -	lib/get-permissions.c:
    -	lib/strftime.c:
    -	lisp/org/org-element.el:
    -	lisp/org/org-mobile.el:
    -	lisp/textmodes/reftex-vars.el:
    -	src/bidi.c:
    -	src/emacs.c:
    -	src/xdisp.c:
    -	test/etags/c-src/emacs/src/lisp.h:
    +	-
     
    -	Expunge the likes of "This allows to do something" from the above files.
    +	-
     
    -2016-01-25  Artur Malabarba  
    +2016-02-09  Paul Eggert  
     
    -	* lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode): Redundant line
    +	Merge from origin/emacs-25
     
    -	`special-mode' is already read-only.
    +	4feb962 * lisp/comint.el (comint-prompt-read-only): Clean tabs in docstring
    +	cc419fb Don't inloop gnus-uu-mark-thread on the last thread
    +	51c77a2 Display non-ASCII group names better in prompts
    +	f93d669 Default to gpg2 instead of gpg
     
    -2016-01-25  Artur Malabarba  
    +2016-02-09  Paul Eggert  
     
    -	* lisp/emacs-lisp/ert.el (ert--results-move): Change error to user-error
    +	Merge from origin/emacs-25
    +
    +	9ffe7dd * lisp/isearch.el (isearch-define-mode-toggle): Improve logic
    +	16140f7 * lisp/menu-bar.el (menu-bar-options-menu): New search submenu
    +	3db6adb * lisp/isearch.el (search-default-mode)
    +	4ea1ea7 * lisp/isearch.el: Rename search-default-regexp-mode to search-default-mode
    +	c77ffc8 Use monitor's resolution for positioning tooltips
    +	49e5749 Fix file-notify-test on MS-Windows
    +	be1d874 Fix issues found by auditing w32notify code
    +	87ae218 Extend etags Ruby support for accessors
    +	aa35257 Update publicsuffix.txt.
    +	6816bff Ensure that Gnus dribble handling allows removing entries
    +	691feae Be consistent when using encoded strings in nnimap data
    +	3ed423b Display the decoded Gnus group name
    +	5428b5b Use completion-ignore-case instead of defining command
     
    -2016-01-25  Paul Eggert  
    +2016-02-09  Paul Eggert  
     
    -	Port "$@" to OpenIndiana ksh93
    +	Merge from origin/emacs-25
     
    -	In http://lists.gnu.org/archive/html/bug-autoconf/2015-12/msg00000.html
    -	Pavel Raiskup reports that ${1+"$@"} runs afoul of a bug in /bin/sh
    -	(derived from ksh 93t+ 2010-03-05).  ${1+"$@"} works around an ancient
    -	bug in long-dead shells, so remove the workaround.
    -	* admin/check-doc-strings, configure.ac, lib-src/rcs2log:
    -	Use plain "$@" rather than ${1+"$@"}.
    +	1eaf68f * test/automated/file-notify-tests.el (file-notify-test06-many-events):
    +	d333716 ; * etc/NEWS: Expand news entry for scss-mode
    +	c32c16f ; Better document changes in ls-lisp default behavior
    +	dc6eed2 Fix doc string of tls-program
     
    -2016-01-25  Paul Eggert  
    +2016-02-09  Paul Eggert  
     
    -	* src/xwidget.c (Fxwidget_set_adjustment): Fix doc string quoting typo.
    +	Merge from origin/emacs-25
     
    -2016-01-25  Paul Eggert  
    +	2c117fc * etc/NEWS: Document new mpc.el features
    +	71a0496 * lisp/custom.el (defface): Revert indentation change.  (Bug#22524)
    +	9dfece1 Correctly fontify C++ initializations which "look like" functions.
    +	4485222 Improve newsticker-treeview-selection-face
    +	4236944 Minor fix in tagging Ruby accessors by etags
    +	35fc77d Spelling fixes
    +	3dda110 Remove 'def X' from the example
     
    -	Improve wording for SMB support
    +2016-02-09  Paul Eggert  
     
    -	* doc/misc/tramp.texi (External methods): Improve and modernize
    -	wording for discussion of smbclient.  There is no longer any
    -	need to mention the laundry list of old MS Windows implementations
    -	of SMB and CIFS, nor to mention CIFS.  Also, give a URL for Samba.
    +	Minor alignas cleanup
     
    -2016-01-24  Paul Eggert  
    +	* src/lisp.h (alignas): Remove now-redundant #ifdef that was left
    +	over from the old way of doing things, before Bug#20862 was fixed.
     
    -	Merge from gnulib
    +2016-02-09  Paul Eggert  
     
    -	This incorporates:
    -	2016-01-24 openat_proc_name: fix last '/' overwritten on OS/2 kLIBC
    -	2016-01-24 closedir, dirfd, opendir: port to OpenSolaris 5.10
    -	2016-01-15 detect utimes() correctly on OS/2 kLIBC
    -	2016-01-15 openat_proc_name: port to OS/2 kLIBC
    -	2016-01-14 stdint: check _INTPTR_T_DECLARED for intptr_t etc.
    -	2016-01-14 opendir, closedir, dirfd, fdopendir: port to OS/2 kLIBC
    -	2016-01-14 dup, dup2, fcntl: support a directory fd on OS/2 kLIBC
    -	2016-01-14 binary-io: don't put fd in binary mode if a console on EMX
    -	2016-01-14 sig2str: list all signals on FreeBSD >= 7
    -	2016-01-13 acl-permissions: port to USE_ACL==0 platforms
    -	2016-01-12 mktime: rename macro to avoid glibc clash
    -	2016-01-12 Port "$@" to OpenIndiana ksh93
    -	2016-01-12 Port Universal Time settings to strict POSIX
    -	* build-aux/gitlog-to-changelog, build-aux/update-copyright:
    -	* doc/misc/texinfo.tex, lib/acl-internal.c, lib/acl-internal.h:
    -	* lib/binary-io.h, lib/dirent.in.h, lib/dirfd.c, lib/dup2.c:
    -	* lib/fcntl.c, lib/fdopendir.c, lib/mktime.c, lib/openat-proc.c:
    -	* lib/sig2str.h, lib/stdint.in.h, m4/dirfd.m4, m4/dup2.m4:
    -	* m4/fcntl.m4, m4/utimes.m4:
    -	Copy from gnulib.
    -	* m4/gnulib-comp.m4: Regenerate.
    +	Add lmalloc commentary and tweak laligned
     
    -2016-01-24  Alan Mackenzie  
    +	* src/alloc.c (laligned): Help compiler in a tiny way by putting
    +	the more-commonly-failing disjunct first.
     
    -	Expunge "allow" + infinitive without direct object from source and doc.
    +2016-02-09  Eli Zaretskii  
     
    -	Do the same for "permit", "enable", and "prevent".
    +	Clarify documentation of key binding conventions
     
    -	* doc/emacs/mule.texi:
    -	* doc/lispref/control.texi:
    -	* doc/lispref/display.texi:
    -	* doc/lispref/frames.texi:
    -	* doc/lispref/functions.texi:
    -	* doc/lispref/nonascii.texi:
    -	* doc/lispref/streams.texi:
    -	* doc/lispref/windows.texi:
    -	* doc/misc/dbus.texi:
    -	* doc/misc/eww.texi:
    -	* doc/misc/flymake.texi:
    -	* doc/misc/octave-mode.texi:
    -	* doc/misc/org.texi:
    -	* doc/misc/reftex.texi:
    -	* doc/misc/tramp.texi:
    -	* doc/misc/wisent.texi:
    -	* etc/NEWS:
    -	* lisp/autorevert.el:
    -	* lisp/cedet/mode-local.el:
    -	* lisp/cedet/semantic/senator.el:
    -	* lisp/cedet/semantic/wisent.el:
    -	* lisp/dos-fns.el:
    -	* lisp/frameset.el:
    -	* lisp/gnus/gnus-agent.el:
    -	* lisp/gnus/mm-util.el:
    -	* lisp/international/characters.el:
    -	* lisp/ldefs-boot.el:
    -	* lisp/mail/mailclient.el:
    -	* lisp/man.el:
    -	* lisp/mh-e/mh-search.el:
    -	* lisp/net/tramp-cmds.el:
    -	* lisp/net/tramp-gvfs.el:
    -	* lisp/org/org-crypt.el:
    -	* lisp/org/org-element.el:
    -	* lisp/org/org-feed.el:
    -	* lisp/org/org.el:
    -	* lisp/org/ox-ascii.el:
    -	* lisp/org/ox-icalendar.el:
    -	* lisp/org/ox-publish.el:
    -	* lisp/org/ox.el:
    -	* lisp/play/gamegrid.el:
    -	* lisp/play/gomoku.el:
    -	* lisp/progmodes/antlr-mode.el:
    -	* lisp/progmodes/python.el:
    -	* lisp/progmodes/vhdl-mode.el:
    -	* lisp/strokes.el:
    -	* lisp/textmodes/ispell.el:
    -	* lisp/tree-widget.el:
    -	* lisp/vc/pcvs.el:
    -	* lisp/window.el:
    -	* src/lisp.h:
    -	* src/w32.c:
    -	* src/w32heap.c:
    -	* src/w32term.c:
    -	* src/window.c:
    -	* src/xfaces.c:
    +	* doc/lispref/tips.texi (Key Binding Conventions): Clarify which
    +	"punctuation characters" are reserved after "C-c".  (Bug#22604)
     
    -	Replace solecisms like "This allow to do something" with a correct
    -	alternative, such as "This allow you to do something", "This allows
    -	something to be done" or "This allows the doing of something".
    +2016-02-09  Oscar Fuentes  
     
    -2016-01-24  l3thal  
    +	* etc/NEWS: mention the `vc-faces' customization group
     
    -	Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25
    +2016-02-09  Paul Eggert  
     
    -2016-01-24  Kelvin White  
    +	Sync with gnulib
     
    -	Add NEWS entry for asynchronous reconnect in ERC
    +	This incorporates:
    +	2016-02-09 stdalign: port to clang 3.7.0
    +	2016-02-06 misc: port better to gcc -fsanitize=address
    +	* doc/misc/texinfo.tex, lib/stdalign.in.h, m4/acl.m4, m4/getgroups.m4:
    +	Copy from gnulib.
     
    -2016-01-24  l3thal  
    +2016-02-09  Michael Albinus  
     
    -	Add NEWS entry for asynchronous reconnect in ERC
    +	* CONTRIBUTE: Add more examples for $(SELECTOR) make variable.
     
    -2016-01-24  Kelvin White  
    +2016-02-09  Katsumi Yamaoka  
     
    -	browse-url.el: Add 'google-chrome' to supported browsers.
    +	Make mm-html-inhibit-images and mm-html-blocked-images default to nil
     
    -2016-01-24  Paul Eggert  
    +	* lisp/gnus/mm-decode.el (mm-html-inhibit-images)
    +	(mm-html-blocked-images): Default to nil.
     
    -	Port Tramp manual to latest Texinfo
    +	* doc/misc/emacs-mime.texi (Display Customization): Mention that
    +	mm-html-inhibit-images and mm-html-blocked-images default to nil.
     
    -	Otherwise, 'make pdf' did not work (Bug#22416).
    -	* doc/misc/tramp.texi (xxx, yyy): Remove macros.
    -	(trampfn): Specialize to the case where METHOD is nonempty.
    -	The 2nd argument is now user@host, not 2nd user and 3rd host args.
    -	All uses changed.
    -	(trampf): New macro.
    +	* etc/NEWS (Gnus): Document mm-html-inhibit-images and
    +	mm-html-blocked-images.
     
    -2016-01-24  Lars Ingebrigtsen  
    +2016-02-08  Paul Eggert  
     
    -	* eww.el (eww-render): Protect against empty content-types.
    +	Increase success rate of fallback lmalloc
     
    -2016-01-24  Nicolas Petton  
    +	* src/alloc.c (lmalloc, lrealloc): Reallocate with (typically)
    +	larger and larger sizes, to increase the probability that
    +	the allocator will return a Lisp-aligned pointer.
     
    -	authors.el updates
    +2016-02-08  Lars Ingebrigtsen  
     
    -	* admin/authors.el (authors-ignored-files, authors-renamed-files-alist):
    -	  Additions.
    +	Make backgrounds extend to the end of the lines in shr
     
    -2016-01-24  Dmitry Gutov  
    +	* lisp/net/shr.el (shr-face-background): Faces can also be on
    +	the form `(:background "#fff)' (bug#22547).
     
    -	Rename xref-query-replace to xref-query-replace-in-results
    +2016-02-08  Lars Ingebrigtsen  
     
    -	* lisp/progmodes/xref.el(xref-query-replace):
    -	Rename to xref-query-replace-in-results.
    -	(http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01240.html)
    +	Make the `R' command get the correct relative s
     
    -	* lisp/progmodes/xref.el (xref--xref-buffer-mode-map):
    -	* lisp/dired-aux.el (dired-do-find-regexp-and-replace):
    -	* doc/emacs/dired.texi (Operating on Files):
    -	* doc/emacs/maintaining.texi (Xref Commands)
    -	(Identifier Search, Identifier Search): Update accordingly.
    +	* lisp/net/eww.el (eww-readable): Preserve the base URL so
    +	that image expansions are fetched from the right place (bug#22605).
     
    -2016-01-24  Dmitry Gutov  
    +	(cherry picked from commit 8722e849f75ceafb82a1c17105e8ab76077a8ebc)
     
    -	Update cl-defgeneric and cl-defmethod docstrings
    +	Backport:
     
    -	* lisp/emacs-lisp/cl-generic.el: Remove outdated TODO item.
    -	(cl-defgeneric): Rename BODY to DEFAULT-BODY.
    -	(cl-defmethod): Mention that multiple dispatch arguments are
    -	allowed.  Document supported types.  (Bug#22336)
    +2016-02-08  Mike Kupfer  
     
    -2016-01-23  Dmitry Gutov  
    +	Fix typos in emacs-mime.texi and gnus.texi
     
    -	Comment out next-error-function integration in xref
    +	* doc/misc/emacs-mime.texi (Display Customization):
    +	* doc/misc/gnus.texi (HTML): Fix typo.
     
    -	* lisp/progmodes/xref.el (xref--xref-buffer-mode):
    -	Comment out next-error-function integration
    -	(http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01286.html).
    +2016-02-08  Katsumi Yamaoka  
     
    -2016-01-23  John Wiegley  
    +	* doc/misc/emacs-mime.texi (Display Customization):
    +	Doc fix for mm-html-inhibit-images.
     
    -	Correct a use of "which" in intro.texi
    +2016-02-08  Lars Ingebrigtsen  
     
    -2016-01-23  Alan Mackenzie  
    +	Fix message-cross-post-followup-to group names
     
    -	Distinguish the two meanings of Java's keyword "default".  Fixes bug #22358.
    +	* lisp/gnus/message.el (message-cross-post-followup-to): Don't
    +	insert group names like "nntp+foo:zot", because those aren't valid.
     
    -	* lisp/progmodes/cc-engine.el (c-guess-basic-syntax CASE 14): Check the
    -	context of case labels (including "default") more rigorously.
    -	(c-guess-basic-syntax CASE 15): Consequential amendment.
    +2016-02-08  David Edmondson  
     
    -	* lisp/progmodes/cc-langs.el (c-modifier-kwds): Add "default" to Java's value.
    +	Compare recipient and keys case-insensitively
     
    -2016-01-23  Oscar Fuentes  
    +	* lisp/gnus/mml2015.el: (mml-secure-check-user-id): When comparing a
    +	recipient address with that from a key, do so in a case insensitive
    +	manner (bug#22603).
     
    -	Don't operate on menu bar of nonexistent frame
    +2016-02-08  Glenn Morris  
     
    -	* src/xfns.c (Fx_hide_tip) [USE_LUCID]: Check that the current frame
    -	is valid before redisplaying its menu. Fixes bug#22438.
    +	* lisp/gnus/mm-decode.el (mm-alist-to-plist): Doc fix.
     
    -2016-01-23  Anders Lindgren  
    +2016-02-08  Katsumi Yamaoka  
     
    -	Unbreak the GNUstep build.
    +	Refactor HTML images handling of Gnus and mm-* (a part of bug#21650)
     
    -	* src/nsterm.m ([EmacsBell init]): In GNUstep, don't use the
    -	predefined "caution" image. Add trace.
    -	(x_set_window_size): Remove unused variables `cols' and `rows'.
    -	(ns_draw_fringe_bitmap): Exclude assignment of `fromRect' when
    -	GNUstep is used.
    -	([EmacsView updateFrameSize:]): Remove unused variable `win'.
    -	([EmacsWindow zoom:]): Remove unused variable `f'.
    +	* doc/misc/emacs-mime.texi (Display Customization):
    +	Remove mm-inline-text-html-with-images; add documentations for
    +	mm-html-inhibit-images and mm-html-blocked-images.
     
    -2016-01-23  Eli Zaretskii  
    -	    John Wiegley  
    -	    Michael Heerdegen  
    +	* lisp/gnus/gnus-art.el (gnus-article-show-images):
    +	No need to bind mm-inline-text-html-with-images.
    +	(gnus-bind-safe-url-regexp): Rename to gnus-bind-mm-vars.
    +	(gnus-bind-mm-vars): Rename from gnus-bind-safe-url-regexp;
    +	bind mm-html-inhibit-images and mm-html-blocked-images.
    +	(gnus-mime-view-all-parts, gnus-mime-view-part-internally)
    +	(gnus-mm-display-part, gnus-mime-display-single)
    +	(gnus-mime-display-alternative): Use gnus-bind-mm-vars.
     
    -	Improve documentation of 'pcase'
    +	* lisp/gnus/mm-decode.el (mm-inline-text-html-with-images): Remove.
    +	(mm-html-inhibit-images, mm-html-blocked-images): New user options.
    +	(mm-shr): Bind shr-inhibit-images and shr-blocked-images with
    +	mm-html-inhibit-images and mm-html-blocked-images respectively
    +	instead of gnus-inhibit-images and gnus-blocked-images.
     
    -	* doc/lispref/control.texi (Pattern matching case statement):
    -	Reorganize, expand, and improve wording.
    +	* lisp/gnus/mm-view.el (mm-setup-w3m): Use mm-html-inhibit-images
    +	instead of mm-inline-text-html-with-images.
     
    -	* etc/NEWS: Mention that 'pcase' changes are documented.
    +2016-02-08  Paul Eggert  
     
    -2016-01-23  Paul Eggert  
    +	Port to FreeBSD 11-CURRENT i386
     
    -	* etc/NEWS: Say that Cairo is experimental.
    +	Problem reported by Herbert J. Skuhra in:
    +	http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00354.html
    +	Instead of trying
    +	* src/alloc.c (lmalloc, lrealloc, laligned): New functions.
    +	(xmalloc, xzalloc, xrealloc, lisp_malloc): Use them.
    +	(__alignof__) [!__GNUC__ && !__alignof__]: New macro.
    +	(MALLOC_IS_GC_ALIGNED): New macro.
    +	* src/lisp.h (NONPOINTER_BITS): Remove.  All uses removed.
    +	No longer needed now that alloc.c uses lmalloc and lrealloc.
     
    -2016-01-23  Paul Eggert  
    +2016-02-08  Michael Albinus  
     
    -	Report error for PNG under Cairo
    +	Some fixes in file-notify-tests.el
     
    -	* src/image.c (lookup_rgb_color): Signal a file error instead
    -	of dumping core when mishandling an image.
    +	* test/automated/file-notify-tests.el
    +	(file-notify--test-with-events-check)
    +	(file-notify--test-with-events-explainer): New defuns.
    +	(file-notify--test-with-events): Use it.
    +	(file-notify-test07-backup): Fix docstring.  Some of the
    +	backends fire two `changed' events.  Backup by rename doesn't
    +	work for kqueue.
     
    -2016-01-23  Arash Esbati  
    +2016-02-07  Michael Albinus  
     
    -	Delete a spurious backquote (tiny change)
    +	Fix Bug#22557
     
    -	* lisp/textmodes/reftex-ref.el (reftex-label): Delete a
    -	spurious backquote which raises an error with emacs 25.
    +	* lisp/filenotify.el (file-notify-callback): Do not send a
    +	`stopped' event in case of backup by renaming.  (Bug#22557)
     
    -2016-01-23  Paul Eggert  
    +	* test/automated/Makefile.in: Use $(SELECTOR_EXPENSIVE) for
    +	all targets but check and check-maybe.
     
    -	Pacify --enable-gcc-warnings --with-cairo
    +	* test/automated/file-notify-tests.el
    +	(file-notify--test-read-event-timeout): New defconst.
    +	(file-notify--deftest-remote, file-notify--wait-for-events)
    +	(file-notify-test02-events)
    +	(file-notify-test04-file-validity)
    +	(file-notify-test06-many-events): Use it.
    +	(file-notify--test-cleanup): Make it more robust.  Delete also
    +	backup file.
    +	(file-notify-test07-backup): New test.
     
    -	Problem reported by Alexander Kuleshov in:
    -	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01289.html
    -	* src/gtkutil.c (xg_get_page_setup):
    -	Use switch rather than if-then-else.
    -	* src/image.c (COLOR_TABLE_SUPPORT):
    -	Define directly rather than via #define and optional later #undef.
    -	(lookup_rgb_color) [USE_CAIRO && ENABLE_CHECKING]:
    -	Crash when the pixel is undefined, as there is a genuine bug
    -	here (Bug#22442).
    -	* src/image.c (tiff_load, gif_load, svg_load_image)
    -	(x_kill_gs_process) [USE_CAIRO]:
    -	* src/xterm.c (x_draw_fringe_bitmap) [USE_CAIRO]:
    -	Omit unused locals, or move them to where they’re needed.
    -	(x_clear_area1): Now ATTRIBUTE_UNUSED.
    +2016-02-07  Paul Eggert  
     
    -2016-01-23  Eli Zaretskii  
    +	Fix test for dladdr
     
    -	Update documentation for Dired search and replace
    +	Problem reported by Andreas Schwab in:
    +	http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00327.html
    +	* configure.ac (dladdr): Link with LIBMODULES when checking for
    +	this function.
     
    -	* doc/emacs/dired.texi (Operating on Files): Update descriptions
    -	of 'A' and 'Q' now bound to 'dired-do-find-regexp' and
    -	'dired-do-find-regexp-and-replace'.
    +2016-02-07  Andreas Schwab  
     
    -	* etc/NEWS: Mention xref-related changes in Dired.
    +	Fix gnus-group-get-new-news-this-group on group with closed server
     
    -2016-01-23  Paul Eggert  
    +	* lisp/gnus/nnimap.el (nnimap-change-group): Lookup server
    +	method and pass to nnimap-open-server.
     
    -	Port recent xdisp.c fix to picky C compilers
    +2016-02-07  Artur Malabarba  
     
    -	* src/xdisp.c (dump_glyph): Redo the call to fprintf to avoid
    -	putting #if inside the arguments to a standard function, which
    -	the C standard says has undefined behavior.
    +	* lisp/comint.el (comint-prompt-read-only): Clean tabs in docstring
     
    -2016-01-22  Alan Mackenzie  
    +	While tabs in code are mostly fine because the Emacs sources have a
    +	.dir-locals file specifying tab-width, the same is not true of tabs in
    +	code examples inside docstrings.  The docstring is printed on a *Help*
    +	buffer, which can be created on any directory and won't necessarily have
    +	the same tab-width set.
     
    -	Prevent spurious recognition of K&R argument declarations.  Fixes bug #2203
    +2016-02-07  Lars Ingebrigtsen  
     
    -	* lisp/progmodes/cc-engine.el (c-forward-declarator): New function.
    -	(c-in-knr-argdecl): Before recognizing a K&R argument declaration, check it is
    -	contained in the preceding arg list.
    +	Don't inloop gnus-uu-mark-thread on the last thread
     
    -	* lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Use the new function
    -	`c-forward-declarator' in place of inline code.
    +	* lisp/gnus/gnus-uu.el (gnus-uu-mark-thread): Don't infloop on the
    +	final thread in the summary buffer (bug#16666).
     
    -2016-01-22  Eli Zaretskii  
    +2016-02-06  Lars Ingebrigtsen  
     
    -	Fix the build with --enable-checking=glyphs
    +	Display non-ASCII group names better in prompts
     
    -	* src/xdisp.c (dump_glyph): Don't refer to glyph->u.xwidget in a
    -	build without xwidget support.
    +	* lisp/gnus/gnus-sum.el (gnus-articles-to-read): To decode the
    +	group name, we have to do that before we remove the prefix.
     
    -2016-01-22  Eli Zaretskii  
    +2016-02-06  Lars Ingebrigtsen  
     
    -	Document cl-generic.el
    +	Default to gpg2 instead of gpg
     
    -	* doc/lispref/functions.texi (Generic Functions): New section.
    -	(Bug#22336)
    -	(Functions): Update the chapter menu.
    -	* doc/lispref/elisp.texi: Update the master menu.
    +	* lisp/epg-config.el (epg-gpg-program): Prefer gpg2 over gpg, if
    +	it exists.  This fixes many problems with using the GPG
    +	authentication agent.
     
    -2016-01-22  Paul Eggert  
    +2016-02-06  David Edmondson  
     
    -	xwidgets style cleanup
    +	src/process.c Correctly convert AF_INET6 addresses
     
    -	Adjust the newly-added Xwidgets code so that it uses a more-typical
    -	Emacs style.  This should not affect behavior, except that in
    -	a few places it adds runtime checks that Lisp arguments are of
    -	the proper type, and in one place it uses more-precise arithmetic.
    -	* src/buffer.c, src/dispnew.c, src/emacs.c, src/emacsgtkfixed.c:
    -	* src/emacs.c, src/print.c, src/window.c, src/xdisp.c, src/xterm.c:
    -	Include xwidget.h unconditionally.
    -	* src/buffer.c (Fkill_buffer):
    -	* src/dispnew.c (update_window):
    -	* src/emacs.c (main):
    -	* src/print.c (print_object):
    -	* src/window.c (Fdelete_window_internal):
    -	* src/xdisp.c (handle_single_display_spec, push_it, pop_it)
    -	(get_next_element, set_iterator_to_next, next_element_from_xwidget)
    -	(dump_glyph, calc_pixel_width_or_height, BUILD_GLYPH_STRINGS_XW)
    -	(BUILD_GLYPH_STRINGS, x_produce_glyphs, get_window_cursor_type):
    -	* src/xterm.c (x_draw_glyph_string, x_draw_bar_cursor):
    -	Call xwidget functions and macros without worrying about
    -	HAVE_XWIDGETS when the code is a no-op on non-xwidget
    -	platforms.
    -	* src/dispextern.h (XWIDGET_GLYPH, struct glyph_string.xwidget)
    -	(IT_XWIDGET, GET_FROM_XWIDGET, struct it.u.xwidget)
    -	(struct it.xwidget):
    -	* src/lisp.h (PVEC_XWIDGET, PVEC_XWIDGET_VIEW):
    -	Always define.
    -	* src/emacsgtkfixed.h: Omit unnecessary comment.
    -	* src/keyboard.c: Fix spacing.
    -	* src/xdisp.c (BUILD_XWIDGET_GLYPH_STRING, produce_xwidget_glyph):
    -	Define to be a no-op if not HAVE_XWIDGETS.
    -	* src/xwidget.c: Include xwidget.h first (after config.h)
    -	to make sure that it can stand by itself.
    -	(Fmake_xwidget, Fxwidget_webkit_execute_script):
    -	Fix typo in doc string.
    -	(Fmake_xwidget): Check type of args.
    -	(Fmake_xwidget, offscreen_damage_event)
    -	(webkit_document_load_finished_cb, webkit_download_cb)
    -	(webkit_new_window_policy_decision_requested_cb)
    -	(webkit_navigation_policy_decision_requested_cb)
    -	(xwidget_osr_draw_cb, xwidget_osr_event_forward)
    -	(xwidget_osr_event_set_embedder, xwidget_init_view):
    -	Omit unnecessary casts.
    -	* src/xwidget.c (Fmake_xwidget, xwidget_hidden)
    -	(xwidget_show_view, xwidget_hide_view)
    -	(x_draw_xwidget_glyph_string, xwidget_start_redisplay, xwidget_touch)
    -	(xwidget_touched):
    -	* src/xwidget.h (struct xwidget.kill_without_query)
    -	(struct xwidget_view.redisplayed, struct xwidget_view.hidden):
    -	Use bool for boolean.
    -	* src/xwidget.c (store_xwidget_event_string, Fxwidget_size_request):
    -	Simplify by using list functions.
    -	(WEBKIT_FN_INIT): Omit unnecessary test for nil.
    -	(Fxwidget_resize): Check type of integer args
    -	before doing any work.  Check that they are nonnegative.
    -	(Fxwidget_set_adjustment): Check type of integer arg.
    -	Avoid redundant call to gtk_scrolled_window_get_vadjustment.
    -	Simplify.  Use double, not float.
    -	(Fxwidget_info, Fxwidget_view_info): Simplify by using CALLN.
    -	(valid_xwidget_spec_p): Simplify.
    -	(xwidget_spec_value): Omit unused arg FOUND.  All callers changed.
    -	* src/xwidget.h: Include lisp.h first, so that includers do
    -	not need to worry about doing that before including this file.
    -	Make this .h file safe to include even on non-HAVE_XWIDGETS
    -	configurations, to simplify the includers.
    -	(x_draw_xwidget_glyph_string, syms_of_xwidget, valid_xwidget_spec_p)
    -	(xwidget_end_redisplay, lookup_xwidget)
    -	(xwidget_view_delete_all_in_window, kill_buffer_xwidgets):
    -	Now a no-op if !HAVE_XWIDGETS, to simplify callers.
    -	(struct glyph_matrix, struct glyph_string, struct xwidget)
    -	(struct xwidget_view, struct window):
    -	New forward or incomplete decls, so that includers need not
    -	assume the corresponding .h files are already included, or that
    -	HAVE_XWIDGETS is defined.
    -	(struct xwidget_type, xwidget_from_id): Remove; unused.
    -
    -2016-01-22  Michael Albinus  
    -
    -	Backport kqueue integration from master
    -
    -	* configure.ac (--with-file-notification): Add kqueue.
    -	(top): Remove special test for "${HAVE_NS}" and
    -	${with_file_notification}, this is handled inside gfilenotify
    -	tests.  Add kqueue tests.  Use NOTIFY_CFLAGS and NOTIFY_LIBS
    -	instead of library specific variables.  Add error message for
    -	gfile on Nextstep.
    -
    -	* doc/lispref/os.texi (File Notifications): Add kqueue as backend.
    -	Fix some glitches in the example.
    -
    -	* etc/NEWS: Mention kqueue.
    -
    -	* lisp/filenotify.el (file-notify--library)
    -	(file-notify-descriptors, file-notify-callback)
    -	(file-notify-add-watch, file-notify-rm-watch)
    -	(file-notify-valid-p): Add kqueue support.
    -	(file-notify--rm-descriptor): Remove WHAT arg.
    -
    -	* src/Makefile.in: Use NOTIFY_CFLAGS and NOTIFY_LIBS.
    -
    -	* src/emacs.c (main): Call globals_of_kqueue and syms_of_kqueue.
    -
    -	* src/inotify.c (inotifyevent_to_event): Extract file name from
    -	watch_object if the event doesn't provide it.
    -	(Finotify_add_watch): Add file name to watch_object.
    -
    -	* src/keyboard.c (make_lispy_event): Check also for HAVE_KQUEUE.
    -
    -	* src/kqueue.c: New file.
    -
    -	* src/lisp.h: Declare extern globals_of_kqueue and syms_of_kqueue.
    -
    -	* test/automated/file-notify-tests.el
    -	(file-notify--test-expected-events): Remove.
    -	(file-notify--test-cleanup): Do not set that variable.
    -	(file-notify--test-timeout) Use different timeouts for
    -	different libraries.
    -	(file-notify--test-library): New defun.
    -	(file-notify--test-event-test): Make stronger checks.
    -	(file-notify--test-with-events): EVENTS can also be a list of
    -	lists.  Flush outstanding events before running the body.
    -	Make timeout heuristically depend on the number of events.
    -	(file-notify-test01-add-watch, file-notify-test02-events)
    -	(file-notify-test04-file-validity, file-notify-test05-dir-validity):
    -	Rewrite in order to call file monitors but directory monitors.
    -	(file-notify-test02-events, file-notify-test04-file-validity): Do
    -	not skip cygwin tests.  Add additional test for file creation.
    -	Adapt expected result for different backends.
    -	(file-notify-test03-autorevert): Some of the tests don't work for
    -	w32notify.
    -	(file-notify-test06-many-events): New test.
    -
    -2016-01-22  John Wiegley  
    -
    -	Further corrections to the pcase docstring
    -
    -2016-01-22  Eli Zaretskii  
    -
    -	* doc/emacs/anti.texi (Antinews): Rewrite for Emacs 25.
    -
    -2016-01-22  Stephen Leake  
    -
    -	In xref-collect-references, force backends to respect the 'dir' arg
    -
    -	* lisp/progmodes/xref.el (xref-collect-references): Force symref backends
    -	to use `default-directory'.
    +	* src/process.c (conv_lisp_to_sockaddr): AF_INET6 addresses are
    +	converted to a list of 16 bit quantities by
    +	conv_sockaddr_to_lisp(). conv_lisp_to_sockaddr() should follow the
    +	same scheme rather than expecting a (longer) list of 8 bit
    +	quantities.
     
    -2016-01-22  John Wiegley  
    +	Backport:
     
    -	Minor correction to pcase docstring
    +	(cherry picked from commit 55ce3c30d617c38eb086d5ad4ffbd881c20c559c)
     
    -2016-01-22  John Wiegley  
    +2016-02-06  Artur Malabarba  
     
    -	Write a new docstring for the pcase macro
    +	* lisp/isearch.el (isearch-define-mode-toggle): Improve logic
     
    -	* lisp/emacs-lisp/pcase.el (pcase): Write a new docstring.
    +2016-02-06  Artur Malabarba  
     
    -2016-01-21  Stephen Berman  
    +	* lisp/menu-bar.el (menu-bar-options-menu): New search submenu
     
    -	Avoid byte-compiler warning in todo-mode (bug#21953)
    +	(menu-bar-search-options-menu): New variable
     
    -	* lisp/calendar/todo-mode.el (todo-convert-legacy-files): Add limit argument
    -	to looking-back to comply with advertised-calling-convention.
    +2016-02-06  Artur Malabarba  
     
    -2016-01-21  Stephen Berman  
    +	* lisp/isearch.el (search-default-mode)
     
    -	Fix desktop support in todo-mode and doc-view (bug#22377)
    +	(isearch-regexp-function): Improve docstrings.
     
    -	* lisp/calendar/todo-mode.el (todo-restore-desktop-buffer):
    -	* lisp/doc-view.el (doc-view-restore-desktop-buffer): Return current buffer.
    +2016-02-06  Artur Malabarba  
     
    -	* lisp/calendar/todo-mode.el (todo-modes-set-2):
    -	* lisp/doc-view.el (doc-view-mode): Set desktop-save-buffer unconditionally.
    +	* lisp/isearch.el: Rename search-default-regexp-mode to search-default-mode
     
    -2016-01-21  Paul Eggert  
    +	(search-default-mode): New variable.
    +	(isearch-mode, isearch-define-mode-toggle)
    +	(isearch--describe-regexp-mode): Update accordingly.
    +	* lisp/menu-bar.el (nonincremental-search-forward): Update accordingly.
    +	* etc/NEWS: Update accordingly.
    +	* doc/emacs/search.texi: Update accordingly.
     
    -	No need to configure gobject-introspection
    +2016-02-06  Oscar Fuentes  
     
    -	It wasn’t needed for the recently-installed xwidget_mvp code; see:
    -	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01154.html
    -	* configure.ac (DOES_XWIDGETS_USE_GIR, GIR_REQUIRED, GIR_MODULES):
    -	(HAVE_GIR):
    -	* src/Makefile.in (GIR_LIBS, GIR_CFLAGS):
    -	Remove.  All uses removed.
    -	* configure.ac (emacs_config_features): Don’t worry about GIR.
    +	Use monitor's resolution for positioning tooltips
     
    -2016-01-20  Paul Eggert  
    +	* src/xfns.c (compute_tip_xy): Use the resolution of the monitor where
    +	  the mouse pointer is to avoid placing the tooltip over the border of
    +	  the monitor on multi-head displays. Fixes bug#22549.
     
    -	Don’t export C symbols not used elsewhere
    +2016-02-06  Eli Zaretskii  
     
    -	These were recently added, mostly as part of xwidget code.
    -	* src/emacsgtkfixed.c (emacs_fixed_get_type): Now static.
    -	(EMACS_FIXED, EMACS_FIXED_GET_CLASS):
    -	Now static functions here, not macros in emacsgtkfixed.h.
    -	* src/emacsgtkfixed.h (EMACS_TYPE_FIXED):
    -	Remove.  All uses replaced by definiens.
    -	(EMACS_FIXED, EMACS_FIXED_GET_CLASS):
    -	Remove; these are now static functions in emacsgtkfixed.c.
    -	(EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS):
    -	Remove; unused.
    -	(emacs_fixed_get_type): Remove decl; no longer extern.
    -	* src/xwidget.c (offscreen_damage_event)
    -	(webkit_mime_type_policy_typedecision_requested_cb)
    -	(webkit_new_window_policy_decision_requested_cb)
    -	(webkit_navigation_policy_decision_requested_cb)
    -	(xwidget_spec_value, xwidget_view_lookup)
    -	(xwidget_start_redisplay, xwidget_touch):
    -	Now static.
    -	* src/xwidget.h (xwidget_start_redisplay, xwidget_touch):
    -	Remove decls.
    +	Fix file-notify-test on MS-Windows
     
    -2016-01-20  Dmitry Gutov  
    +	* test/automated/file-notify-tests.el (file-notify--test-timeout):
    +	Reduce w32notify timeout to 10 sec.
    +	(file-notify-test06-many-events): Call read-event after each
    +	rename, to keep the w32notify backend happy in batch mode.
    +	(Bug#22534)
     
    -	Support squiggly heredocs in ruby-mode
    +2016-02-06  Eli Zaretskii  
     
    -	* lisp/progmodes/ruby-mode.el (ruby-here-doc-beg-re):
    -	Support squiggly heredocs added in Ruby 2.3.
    +	Fix issues found by auditing w32notify code
     
    -	* test/indent/ruby.rb: Add squiggly example.
    +	* src/w32inevt.c (handle_file_notifications): Count the number of
    +	events to be returned.
    +	* src/w32notify.c (send_notifications): Don't copy to the file
    +	notification buffer more than it can hold.  (Bug#22534)
     
    -2016-01-20  Glenn Morris  
    +2016-02-06  Eli Zaretskii  
     
    -	* configure.ac (emacs_config_features): Remove WEBKIT.
    +	Extend etags Ruby support for accessors
     
    -2016-01-20  Paul Eggert  
    +	* lib-src/etags.c (Ruby_functions): Support accessors defined with
    +	parentheses.  (Bug#22563)
     
    -	Port to platforms with gtk3 but not webkitgtk3
    +	* test/etags/ruby-src/test1.ru (A::B): Add tests for accessors
    +	defined with parentheses.
    +	* test/etags/ETAGS.good_1:
    +	* test/etags/ETAGS.good_2:
    +	* test/etags/ETAGS.good_3:
    +	* test/etags/ETAGS.good_4:
    +	* test/etags/ETAGS.good_5:
    +	* test/etags/ETAGS.good_6:
    +	* test/etags/CTAGS.good: Adapt to changes in Ruby tests.
     
    -	I ran into this problem on my Fedora 23 installation;
    -	Emacs configured but did not build when --with-xwidgets was specified.
    -	* configure.ac (HAVE_WEBKIT, HAVE_GIR): Omit unnecessary initializations.
    -	(DOES_XWIDGETS_USE_GIR): New var.
    -	If --with-xwidgets is specified, report an error if not
    -	doable, to be consistent with the other --with options.
    -	Require webkitgtk3 to use Xwidgets, as the Xwidgets code does
    -	not work at all without webkitgtk3.  Simplify use of
    -	EMACS_CHECK_MODULES.  Output message about gobject
    -	introspection only if xwidgets are used.
    -	* etc/NEWS: Users need webkitgtk3, not merely webkit.
    -	* src/xwidget.c (syms_of_xwidget): Don’t worry about HAVE_WEBKIT_OSR,
    -	since this file is no longer compiled if webkitgtk3 is not available.
    +2016-02-06  Lars Ingebrigtsen  
     
    -2016-01-20  Eli Zaretskii  
    +	Update publicsuffix.txt.
     
    -	Fix doc string of 'isearch-search-fun-function'
    +	* etc/publicsuffix.txt: Updated from
    +	https://publicsuffix.org/list/public_suffix_list.dat.
     
    -	* lisp/isearch.el (isearch-search-fun-function)
    -	(isearch-search-string): Doc fixes.  (Bug#22411)
    +2016-02-06  Lars Ingebrigtsen  
     
    -2016-01-20  Stefan Monnier  
    +	Ensure that Gnus dribble handling allows removing entries
     
    -	* lisp/xwidget.el: Nitpicks
    +	* lisp/gnus/gnus-start.el (gnus-dribble-enter): Ensure that each
    +	entry is on a single line.
     
    -	* lisp/xwidget.el (xwidget-log, xwidget-webkit-callback):
    -	Use with-current-buffer rather than save-excursion + set-buffer.
    +2016-02-05  OGAWA Hirofumi    (tiny change)
     
    -2016-01-20  Glenn Morris  
    +	Be consistent when using encoded strings in nnimap data
     
    -	Don't hard-code 1 as point-min.
    +	* lisp/gnus/nnimap.el (nnimap-encode-gnus-group): New function
    +	(nnimap-request-list): Use it.
    +	(nnimap-request-newgroups): Ditto.
     
    -	* lisp/image-mode.el (image-display-size):
    -	* lisp/xwidget.el (xwidget-webkit-last-session)
    -	(xwidget-webkit-current-session): Don't hard-code 1 as point-min.
    +2016-02-05  OGAWA Hirofumi    (tiny change)
     
    -2016-01-20  Glenn Morris  
    +	Display the decoded Gnus group name
     
    -	* lisp/xwidget.el: Add declarations to silence non-xwidget compilation.
    +	* lisp/gnus/gnus-sum.el (gnus-summary-read-group-1): Use the
    +	decoded group name in the message.
     
    -2016-01-20  Glenn Morris  
    +2016-02-05  Lars Ingebrigtsen  
     
    -	Trivial doc copyedits.
    +	Use completion-ignore-case instead of defining command
     
    -	* src/xwidget.c (Fmake_xwidget, Fget_buffer_xwidgets)
    -	(Fxwidget_webkit_get_title, Fxwidget_resize)
    -	(Fxwidget_set_adjustment, Fxwidgetp, Fxwidget_view_p)
    -	(Fxwidget_info, Fxwidget_view_lookup)
    -	(Fset_xwidget_query_on_exit_flag): Trivial doc copyedits.
    +	* lisp/erc/erc.el (erc-mode): Set completion-ignore-case so
    +	that we get case-insensitive completion.
    +	(erc-completion-at-point): Remove.
     
    -2016-01-20  Glenn Morris  
    +2016-02-05  Eli Zaretskii  
     
    -	Avoid advising image-display-size for xwidgets.
    +	Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25
     
    -	* lisp/xwidget.el (xwidget-image-display-size): Remove.
    -	(image-display-size): Remove advice.
    -	* lisp/image-mode.el (xwidget-info, xwidget-at): Declare.
    -	(image-display-size): Incorporate xwidget code directly.
    +2016-02-05  Michael Albinus  
     
    -2016-01-20  Glenn Morris  
    +	* test/automated/file-notify-tests.el (file-notify-test06-many-events):
     
    -	Avoid breaking non-xwidget Emacs that happen to load xwidget.el.
    +	Reduce the number of iterations to 250 in case of w32notify.
     
    -	* lisp/xwidget.el (window-configuration-change-hook)
    -	(kill-buffer-query-functions): Only modify these hooks if
    -	compiled with xwidget support.
    +2016-02-05  Eli Zaretskii  
     
    -2016-01-20  Glenn Morris  
    +	Fix problems caused by new implementation of sub-word mode
     
    -	* lisp/xwidget.el (xwidget-webkit-scroll-behaviour): Fix custom spec.
    +	* lisp/subr.el (forward-word-strictly, backward-word-strictly):
    +	New functions.
    +	(word-move-empty-char-table): New variable.
     
    -2016-01-19  Glenn Morris  
    +	* etc/NEWS: Mention 'forward-word-strictly' and
    +	'backward-word-strictly'.
     
    -	* configure.ac (WEBKIT, GIR, CAIRO): Use EMACS_CHECK_MODULES, not PKG_.
    +	* doc/lispref/positions.texi (Word Motion): Document
    +	'find-word-boundary-function-table', 'forward-word-strictly', and
    +	'backward-word-strictly'.  (Bug#22560)
     
    -	* configure.ac (emacs_config_features): Add XWIDGETS, WEBKIT, GIR.
    +	* src/syntax.c (syms_of_syntax)
    +	: Doc fix.
     
    -	* configure.ac (HAVE_WEBKIT_OSR): Remove broken, duplicated gtk3 test.
    +	* lisp/wdired.el (wdired-xcase-word):
    +	* lisp/textmodes/texnfo-upd.el (texinfo-copy-node-name)
    +	(texinfo-copy-section-title, texinfo-start-menu-description)
    +	(texinfo-copy-menu-title, texinfo-specific-section-type)
    +	(texinfo-insert-node-lines, texinfo-copy-next-section-title):
    +	* lisp/textmodes/texinfo.el (texinfo-clone-environment)
    +	(texinfo-insert-@end):
    +	* lisp/textmodes/texinfmt.el (texinfo-format-scan)
    +	(texinfo-anchor, texinfo-multitable-widths)
    +	(texinfo-multitable-item):
    +	* lisp/textmodes/tex-mode.el (latex-env-before-change):
    +	* lisp/textmodes/flyspell.el (texinfo-mode-flyspell-verify):
    +	* lisp/skeleton.el (skeleton-insert):
    +	* lisp/simple.el (count-words):
    +	* lisp/progmodes/vhdl-mode.el (vhdl-beginning-of-libunit)
    +	(vhdl-beginning-of-defun, vhdl-beginning-of-statement-1)
    +	(vhdl-update-sensitivity-list, vhdl-template-block)
    +	(vhdl-template-break, vhdl-template-case, vhdl-template-default)
    +	(vhdl-template-default-indent, vhdl-template-for-loop)
    +	(vhdl-template-if-then-use, vhdl-template-bare-loop)
    +	(vhdl-template-nature, vhdl-template-procedural)
    +	(vhdl-template-process, vhdl-template-selected-signal-asst)
    +	(vhdl-template-type, vhdl-template-variable)
    +	(vhdl-template-while-loop, vhdl-beginning-of-block)
    +	(vhdl-hooked-abbrev, vhdl-port-copy, vhdl-hs-forward-sexp-func):
    +	* lisp/progmodes/verilog-mode.el (verilog-backward-sexp)
    +	(verilog-forward-sexp, verilog-beg-of-statement)
    +	(verilog-set-auto-endcomments, verilog-backward-token)
    +	(verilog-do-indent):
    +	* lisp/progmodes/vera-mode.el (vera-guess-basic-syntax)
    +	(vera-indent-block-closing):
    +	* lisp/progmodes/simula.el (simula-context)
    +	(simula-backward-up-level, simula-forward-down-level)
    +	(simula-previous-statement, simula-next-statement)
    +	(simula-skip-comment-backward, simula-calculate-indent)
    +	(simula-find-if, simula-electric-keyword):
    +	* lisp/progmodes/sh-script.el (sh-smie--rc-newline-semi-p):
    +	* lisp/progmodes/ruby-mode.el (ruby-smie--redundant-do-p)
    +	(ruby-smie--forward-token, ruby-smie--backward-token)
    +	(ruby-singleton-class-p, ruby-calculate-indent)
    +	(ruby-forward-sexp, ruby-backward-sexp):
    +	* lisp/progmodes/ps-mode.el (ps-run-goto-error):
    +	* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function)
    +	(perl-syntax-propertize-special-constructs)
    +	(perl-backward-to-start-of-continued-exp):
    +	* lisp/progmodes/pascal.el (pascal-indent-declaration):
    +	* lisp/progmodes/octave.el (octave-function-file-p):
    +	* lisp/progmodes/mantemp.el (mantemp-insert-cxx-syntax):
    +	* lisp/progmodes/js.el (js--forward-function-decl):
    +	* lisp/progmodes/idlwave.el (idlwave-show-begin-check)
    +	(idlwave-beginning-of-block, idlwave-end-of-block)
    +	(idlwave-block-jump-out, idlwave-determine-class):
    +	* lisp/progmodes/icon.el (icon-is-continuation-line)
    +	(icon-backward-to-start-of-continued-exp, end-of-icon-defun):
    +	* lisp/progmodes/hideif.el (hide-ifdef-define):
    +	* lisp/progmodes/f90.el (f90-change-keywords):
    +	* lisp/progmodes/cperl-mode.el (cperl-electric-pod)
    +	(cperl-linefeed, cperl-electric-terminator)
    +	(cperl-find-pods-heres, cperl-fix-line-spacing)
    +	(cperl-invert-if-unless):
    +	* lisp/progmodes/cc-engine.el (c-forward-<>-arglist-recur):
    +	* lisp/progmodes/cc-align.el (c-lineup-java-inher):
    +	* lisp/progmodes/ada-mode.el (ada-compile-goto-error)
    +	(ada-adjust-case-skeleton, ada-create-case-exception)
    +	(ada-create-case-exception-substring)
    +	(ada-case-read-exceptions-from-file, ada-after-keyword-p)
    +	(ada-scan-paramlist, ada-get-current-indent, ada-get-indent-end)
    +	(ada-get-indent-if, ada-get-indent-block-start)
    +	(ada-get-indent-loop, ada-get-indent-type)
    +	(ada-search-prev-end-stmt, ada-check-defun-name)
    +	(ada-goto-decl-start, ada-goto-matching-start)
    +	(ada-goto-matching-end, ada-looking-at-semi-or)
    +	(ada-looking-at-semi-private, ada-in-paramlist-p)
    +	(ada-search-ignore-complex-boolean, ada-move-to-start)
    +	(ada-move-to-end, ada-which-function, ada-gen-treat-proc):
    +	* lisp/net/quickurl.el (quickurl-grab-url):
    +	* lisp/mail/sendmail.el (mail-do-fcc):
    +	* lisp/mail/rmail.el (rmail-resend):
    +	* lisp/mail/mailabbrev.el (mail-abbrev-complete-alias):
    +	* lisp/mail/mail-extr.el (mail-extract-address-components):
    +	* lisp/json.el (json-read-keyword):
    +	* lisp/files.el (insert-directory):
    +	* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
    +	* lisp/completion.el (symbol-under-point, symbol-before-point)
    +	(symbol-before-point-for-complete, next-cdabbrev)
    +	(add-completions-from-c-buffer):
    +	* lisp/cedet/semantic/texi.el (semantic-up-context)
    +	(semantic-beginning-of-context):
    +	* lisp/cedet/semantic/bovine/el.el (semantic-get-local-variables):
    +	use 'forward-word-strictly' and 'backward-word-strictly' instead
    +	of 'forward-word' and 'backward-word'.
     
    -2016-01-19  Katsumi Yamaoka  
    +2016-02-05  Lars Ingebrigtsen  
     
    -	* lisp/gnus/nnir.el (nnir-request-update-mark):
    -	Default to the original mark.
    -	cf. 
    -	and 
    +	Fix doc string of tls-program
     
    -2016-01-19  Glenn Morris  
    +	* lisp/net/tls.el (tls-program): Document the %t parameter (bug#22559).
     
    -	* lisp/xwidget.el (report-xwidget-bug): Remove.
    +2016-02-05  Mark Oteiza  
     
    -	(top-level): No longer require reporter.
    +	* etc/NEWS: Document new mpc.el features
     
    -2016-01-19  Joakim Verona  
    -	    Grégoire Jadi  
    +2016-02-04  Leo Liu  
     
    -	Support for the new Xwidget feature.
    +	* lisp/custom.el (defface): Revert indentation change.  (Bug#22524)
     
    -	* configure.ac:
    -	(HAVE_XWIDGETS, WIDGET_OBJ, EMACS_CONFIG_FEATURES):
    -	* src/xterm.c (x_draw_glyph_string, x_draw_bar_cursor):
    -	* src/xdisp.c:
    -	(handle_display_spec, handle_single_display_spec, push_it)
    -	(pop_it, set_iterator_to_next, dump_glyph)
    -	(calc_pixel_width_or_height, fill_xwidget_glyph_string)
    -	(BUILD_XWIDGET_GLYPH_STRING, BUILD_GLYPH_STRINGS)
    -	(produce_xwidget_glyph, x_produce_glyphs)
    -	(get_window_cursor_type):
    -	* src/window.c (Fdelete_window_internal):
    -	* src/termhooks.h (e):
    -	* src/print.c (print_object):
    -	* src/lisp.h (ptrdiff_t):
    -	* src/keyboard.c (kbd_buffer_get_event, make_lispy_event)
    -	(syms_of_keyboard):
    -	* src/emacs.c (main):
    -	* src/dispnew.c (update_window, scrolling_window):
    -	* src/dispextern.h (g, i):
    -	* Makefile.in (XWIDGETS_OBJ, WEBKIT_CFLAGS, WEBKIT_LIBS)
    -	(GIR_LIBS, ALL_CFLAGS, base_obj, LIBES):
    -	* src/keyboard.c (kbd_buffer_get_event):
    -	* src/emacsgtkfixed.c (emacs_fixed_gtk_widget_size_allocate)
    -	(emacs_fixed_class_init): Add case for an xwidget view.
    +2016-02-04  Alan Mackenzie  
     
    -	* src/xwidget.c, src/xwidget.h, lisp/xwidget.el: New files for xwidgets
    +	Correctly fontify C++ initializations which "look like" functions.
     
    +	Fixes bug#7579.
     
    -	Various improvements to the Xwidget feature.
    -	* src/xwidget.c:
    -	* src/emacsgtkfixed.c:
    -	* lisp/xwidget.el:
    +	lisp/progmodes/cc-engine.el (c-forward-declarator): Add extra optional
    +	parameter to enable handling of "anonymous" declarators in declarations.
     
    -2016-01-19  Eli Zaretskii  
    +	lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Check more rigorously
    +	whether a "(" opens a parameter list of a function, or an initialization of a
    +	variable.
     
    -	Improve documentation of 'alist-get'
    +2016-02-04  Ulf Jasper  
     
    -	* doc/lispref/variables.texi (Setting Generalized Variables): Add
    -	'alist-get' to the list of functions that can appear in PLACE
    -	argument of 'setf'.
    +	Improve newsticker-treeview-selection-face
     
    -2016-01-19  Eli Zaretskii  
    +	* newst-treeview.el (newsticker-treeview-selection-face): Improve
    +	readability for dark background.
     
    -	Minor copyedits of doc/emacs/maintaining.texi
    +2016-02-04  Eli Zaretskii  
     
    -	* doc/emacs/maintaining.texi (List Identifiers): More accurate
    -	description of "C-M-i" wrt tags tables.
    -	(Tags Tables): Move the definition of "tag" to a footnote.
    +	Minor fix in tagging Ruby accessors by etags
     
    -2016-01-19  Eli Zaretskii  
    +	* lib-src/etags.c (Ruby_functions): Don't tag accessors whose
    +	names are not literal symbols.  (Bug#22241)
     
    -	Unbreak the Cygwin-w32 build
    +2016-02-04  Paul Eggert  
     
    -	* src/w32fns.c (globals_of_w32fns): Move the initialization of
    -	resetstkoflw into a part that isn't compiled on Cygwin.
    -	(Bug#22403)
    +	Spelling fixes
     
    -2016-01-19  Lars Magne Ingebrigtsen  
    +2016-02-04  Dmitry Gutov  
     
    -	* shr.el (shr-table-body): Allow tables to have text children.
    +	Remove 'def X' from the example
     
    -2016-01-19  Phillip Lord  
    +	* test/etags/ruby-src/test1.ru (A::B): Remove 'def X'
    +	(http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00167.html).
    +	* test/etags/CTAGS.good:
    +	* test/etags/ETAGS.good_1:
    +	* test/etags/ETAGS.good_2:
    +	* test/etags/ETAGS.good_3:
    +	* test/etags/ETAGS.good_4:
    +	* test/etags/ETAGS.good_5:
    +	* test/etags/ETAGS.good_6: Adjust accordingly.
     
    -	Cope with multiple overlapping faces.
    +2016-02-09  Eli Zaretskii  
     
    -	* lisp/htmlfontify.el (hfy-face-to-style-i): Treat inheritance right to
    -	  left.
    -	  (hfy-face-resolve-face): Handle font specification as well as font
    -	  name. Documentation update. (Bug#21990)
    +	Fix network-stream-tests on MS-Windows
     
    -2016-01-19  Paul Eggert  
    +	* test/lisp/net/network-stream-tests.el (make-local-unix-server):
    +	Skip if local sockets are not supported.
     
    -	Fix spurious escapes in describe-input-method
    +2016-02-09  Michael Albinus  
     
    -	Problem reported by Vincent Belaïche (Bug#22309).
    -	* lisp/international/mule-cmds.el (describe-language-environment):
    -	* lisp/international/quail.el (quail-help):
    -	Apply substitute-command-keys to doc strings before displaying them.
    +	* admin/notes/bug-triage: Fix bug priorities.  Explain colors in debbugs-gnu.
     
    -2016-01-19  Paul Eggert  
    +2016-02-09  Eli Zaretskii  
     
    -	Minor improvements to (random t) documentation
    +	Disable 'timer-list'
     
    -	* doc/lispref/numbers.texi (Random Numbers):
    -	* src/fns.c (Frandom):
    -	Omit unnecessary details about randomness fallback.
    -	Say that it is a fallback.
    +	* lisp/emacs-lisp/timer-list.el: Make 'timer-list' a disabled
    +	command.
     
    -2016-01-19  Dmitry Gutov  
    +2016-02-09  Paul Eggert  
     
    -	Rename methods in Ruby etags example file
    +	Avoid aligned_alloc static/extern collision
     
    -	* test/etags/ruby-src/test.rb: Rename the example methods to
    -	correspond to the common terminology used in Ruby.
    -	* test/etags/CTAGS.good:
    -	* test/etags/ETAGS.good_1:
    -	* test/etags/ETAGS.good_2:
    -	* test/etags/ETAGS.good_3:
    -	* test/etags/ETAGS.good_4:
    -	* test/etags/ETAGS.good_5:
    -	* test/etags/ETAGS.good_6: Adjust accordingly.
    +	* src/alloc.c (aligned_alloc): Define to private name when a
    +	static function, to avoid collision with lisp.h extern decl.
    +	Reported by John Yates in:
    +	http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00439.html
     
    -2016-01-19  Dmitry Gutov  
    +2016-02-08  Michal Nazarewicz  
     
    -	Propertize backtick in 'def `(abc)' as symbol constituent
    +	Make `message-beginning-of-line' aware of folded headers
     
    -	* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
    -	Propertize backtick in 'def `(abc)' as symbol constituent.
    -	(ruby-syntax-propertize-function):
    -	Rename to ruby-syntax-propertize.
    +	* lisp/gnus/message.pl (message-beginning-of-header): New function which
    +	moves point to the beginning of a mail header.  The function is aware of
    +	folded headers and with non-nil argument looks for the true beginning of
    +	a header while with nil argument moves to the indented text of header's
    +	value.
    +	(message-beginning-of-line): Function is now aware of folded headers and
    +	either moves point to the indention of a header or, in visual-line-mode,
    +	searches for the beginning of the header.
     
    -2016-01-18  Eli Zaretskii  
    +2016-02-08  Michal Nazarewicz  
     
    -	Fix scrolling under scroll-preserve-screen-position on TTY
    +	Optimise ‘point in message header’ check
     
    -	* src/window.c (window_scroll_line_based): When setting point to
    -	preserve screen coordinates, don't let cursor enter either of the
    -	two scroll margins.  (Bug#22395)
    +	* lisp/gnus/message.el (message-point-in-header-p): Replace two unbound
    +	regular expression matches with a single bound string match thus
    +	reducing amount of work the function is doing.
     
    -2016-01-18  Lars Magne Ingebrigtsen  
    +2016-02-08  Lars Ingebrigtsen  
     
    -	Fix shr table rendering of nested tables
    +	Make the `R' command get the correct relative s
     
    -	* shr.el (shr-table-body): Don't include all tbodies in nested
    -	tables in the levels above.
    +	* lisp/net/eww.el (eww-readable): Preserve the base URL so
    +	that image expansions are fetched from the right place (bug#22605).
     
    -2016-01-18  Dmitry Gutov  
    +2016-02-08  Lars Ingebrigtsen  
     
    -	* lisp/progmodes/project.el (project--read-regexp): Quote the identifier.
    +	Add a mode to list and cancel timers
     
    -2016-01-18  Dmitry Gutov  
    +	* doc/lispref/os.texi (Timers): Menton `timer-list'.
     
    -	Add xref-based replacements for Dired search commands
    +	* lisp/emacs-lisp/timer-list.el: New file.
     
    -	* lisp/dired-aux.el (dired-do-find-regexp)
    -	(dired-do-find-regexp-and-replace): New commands.
    -	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00864.html
    +2016-02-08  Lars Ingebrigtsen  
     
    -	* lisp/dired.el (dired-mode-map): Change bindings for `A' and
    -	`Q' to the new commands.
    +	Add new commands to allow changing the size of images
     
    -	* lisp/progmodes/xref.el (xref-query-replace)
    -	(xref-collect-matches): Add progress reporters.
    -	(xref--find-ignores-arguments): Return nil for zero ignores.
    -	(xref--show-xrefs): Add an optional argument.
    -	(xref-collect-matches): Drop the assert.  'find' accepts a
    -	regular file in place of directory argument, too.
    +	* lisp/image.el (image-increase-size, image-decrease-size):
    +	New commands.
    +	(image-change-size): New function.
     
    -2016-01-18  Alan Mackenzie  
    +2016-02-08  Lars Ingebrigtsen  
     
    -	* doc/lispref/frames.texi (Position Parameters): Say they don't exist on TTYs.
    +	Allow the image scale to be a floating point number
     
    -2016-01-18  Eli Zaretskii  
    +	* src/image.c (compute_image_size): The scale can be a
    +	floating point number.
     
    -	Improve user documentation of Xref
    +2016-02-08  Lars Ingebrigtsen  
     
    -	* doc/emacs/maintaining.texi (Xref, Find Identifiers)
    -	(Looking Up Identifiers, Identifier Search, List Identifiers):
    -	Adjudicate comments by Dmitry Gutov .  See
    -	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00650.html
    -	for the details.
    +	Add an IPv6 test
     
    -2016-01-18  Eli Zaretskii  
    +	* test/lisp/net/network-stream-tests.el
    +	(connect-to-tls-ipv6-nowait): Add an ipv6 test, too.
     
    -	Fix scrolling under scroll-preserve-screen-position and margins
    +2016-02-08  Lars Ingebrigtsen  
     
    -	* src/window.c (window_scroll_pixel_based): When setting point to
    -	preserve screen coordinates, don't let cursor enter either of the
    -	two scroll margins.  Fix incorrect usage of
    -	WINDOW_WANTS_HEADER_LINE_P and use WINDOW_HEADER_LINE_HEIGHT
    -	instead of CURRENT_HEADER_LINE_HEIGHT.  (Bug#22395)
    +	Use gnutls-serv instead of openssh
     
    -2016-01-18  Eli Zaretskii  
    +	* test/lisp/net/network-stream-tests.el (make-tls-server): Use
    +	gnutls-serv instead of openssh.
     
    -	Unbreak the MS-Windows build
    +2016-02-08  Daniel Colascione  
     
    -	* src/sysdep.c (emacs_gnutls_global_init, gnutls_rnd): Disable for
    -	WINDOWSNT, to avoid link failure.  (Bug#22202)
    +	Performance improvements for vc-hg
     
    -2016-01-18  Alan Mackenzie  
    +	Teach vc-hg how to read some Mercurial internal data structures,
    +	allowing us to avoid the need to run hg status -A, which is very slow
    +	for large repositories.  Fall back to running hg if anything looks
    +	funny.  vc-hg now puts the _working directory_ revision in the
    +	modeline instead of the file revision, which greatly improves
    +	performance and which allows us to again skip running hg in the case
    +	that we have an active bookmark.
     
    -	Desktop: protect users against inadvertant upgrading of desktop file.
    +	* lisp/vc/vc-hg.el (vc-hg-state): Try calling `vc-hg-statefast'
    +	(vc-hg-symbolic-revision-styles)
    +	(vc-hg-use-file-version-for-mode-line-version)
    +	(vc-hg-parse-hg-data-structures): New user preferences
    +	(vc-hg--active-bookmark-internal, vc-hg--run-log)
    +	(vc-hg--symbolic-revision, vc-hg-mode-line-string)
    +	(vc-hg--read-u8, vc-hg--read-u32-be)
    +	(vc-hg--raw-dirstate-search, vc-hg--cached-dirstate-search)
    +	(vc-hg--parts-to-string, vc-hg--pcre-to-elisp-re)
    +	(vc-hg--glob-to-pcre, vc-hg--hgignore-add-pcre)
    +	(vc-hg--hgignore-add-glob, vc-hg--hgignore-add-path)
    +	(vc-hg--slurp-hgignore-1, vc-hg--slurp-hgignore)
    +	(vc-hg--ignore-patterns-valid-p)
    +	(vc-hg--ignore-patterns-ignored-p, vc-hg--time-to-fixnum)
    +	(vc-hg--file-ignored-p, vc-hg--read-repo-requirements)
    +	(vc-hg--requirements-understood-p, vc-hg--dirstate-scan-cache)
    +	(vc-hg-state-fast): New functions.
    +	(vc-hg--hgignore-patterns, vc-hg--hgignore-filenames)
    +	(vc-hg--cached-ignore-patterns, vc-hg--dirstate-scan-cache)
    +	(vc-hg--dirstate-scan-cache): New internal variables.
    +	* lisp/vc/vc-hooks.el (vc-refresh-state): Invoke vc find-file-hook
    +	before updating modeline.
     
    -	An upgraded (version 208) desktop file cannot be read in Emacs < 25.
    +2016-02-07  Lars Ingebrigtsen  
     
    -	* etc/NEWS: Add an entry about upgrading a desktop file.
    +	Skip TLS tests if we don't have openssl
     
    -	* lisp/desktop.el (desktop-file-version): Amend doc string.
    -	(desktop-native-file-version, desktop-io-file-version): new variables.
    -	(desktop-clear): Set desktop-io-file-version to nil.
    -	(desktop-buffer-info): make the presence of the last item on the list
    -	conditional on (>= desktop-io-file-version 208).
    -	(desktop-save): Add extra parameter VERSION to take user's C-u or C-u C-u.
    -	Amend the doc string.  Add code to determine the output file version.
    -	(desktop-create-buffer): Set desktop-io-file-version to the input file's
    -	version.
    +	* test/lisp/net/network-stream-tests.el (connect-to-tls): Skip
    +	TLS tests if we don't have openssl and GnuTLS.
     
    -2016-01-18  Paul Eggert  
    +2016-02-07  Lars Ingebrigtsen  
     
    -	Initialize GnuTLS before calling gnutls_rnd
    +	Automatically scale images up on high-density screens
     
    -	* src/gnutls.c (emacs_gnutls_global_init): Now extern.
    -	Don’t set gnutls_global_initialized if gnutls_global_init fails.
    -	* src/sysdep.c: Include "gnutls.h", and 
    -	if 2.12 or later, which has gnutls_rnd.
    -	(emacs_gnutls_global_init, gnutls_rnd): New fallback
    -	placeholder macros if before 2.12.
    -	(init_random): Initialize gnutls globals before trying to
    -	use gnutls_rnd.
    +	* doc/lispref/display.texi (ImageMagick Images): Mention :scale.
    +	(Defining Images): Mention image-scaling-factor.
     
    -2016-01-18  Andreas Schwab  
    +	* lisp/image.el (image-compute-scaling-factor): New function
    +	(bug#22172).
    +	(create-image): Use it.
    +	(image-scaling-factor): New variable.
     
    -	Don't use GnuTLS before it is initialized
    +	* src/image.c (compute_image_size): Take :scale into account.
     
    -		* src/sysdep.c (init_random): Don't use gnutls_rnd.
    +2016-02-07  Lars Ingebrigtsen  
     
    -2016-01-17  Paul Eggert  
    +	Ensure progress when fetching from the queue
     
    -	Port cleanup attribute to OpenBSD
    +	* lisp/url/url-queue.el (url-queue-check-progress): Ensure
    +	that we have progress when fetching queued requests (bug#22576).
     
    -	The OpenBSD C compiler issues false alarms about strcpy, strcat, and
    -	sprintf, and this messes up 'configure' when it tests for the cleanup
    -	attribute.  Work around the problem by using __has_attribute directly.
    -	Problem reported by Joakim Jalap (Bug#22385).
    -	* configure.ac: Don’t use AX_GCC_VAR_ATTRIBUTE.
    -	* m4/ax_gcc_var_attribute.m4: Remove.
    -	* src/conf_post.h (__has_attribute): Provide a substitute, for
    -	non-GCC or older GCC compilers.  All uses changed to assume
    -	the substitute.  Check for the cleanup attribute.
    -	* src/emacs-module.c (module_has_cleanup): Just use __has_attribute.
    +2016-02-07  Lars Ingebrigtsen  
     
    -2016-01-17  Paul Eggert  
    +	Make mail-extract-address-components return the user name more
     
    -	Prefer GnuTLS when acquiring random seed
    +	* lisp/mail/mail-extr.el (mail-extract-address-components):
    +	Return the name even if it's the same as the mailbox name (if
    +	`mail-extr-ignore-single-names' isn't set) (bug#22594).
     
    -	This attempts to improve on the fix for Bug#22202.
    -	* configure.ac (HAVE_DEV_URANDOM): Remove.
    -	Check /dev/urandom existence at run time, not at build time,
    -	since the device could exist in the former but not the latter.
    -	* src/sysdep.c [HAVE_GNUTLS]: Include gnutls/gnutls.h.
    -	(gnutls_rnd) [GNUTLS_VERSION_NUMBER < 0x020c00]: New fallback macro.
    -	(random_seed): New typedef.
    -	(set_random_seed): New static function.
    -	(seed_random): Use them.
    -	(init_random): Use random_seed instead of uintmax_t, so as to
    -	not consume more entropy than needed.  Prefer gnutls_rnd if it
    -	works; this avoids a redundant open of /dev/urandom on
    -	GNU/Linux with modern GnuTLS.
    +2016-02-07  Lars Ingebrigtsen  
     
    -2016-01-16  Eli Zaretskii  
    +	Message no longer warns about unknown top level domains
     
    -	Improve documentation of dynamic modules
    +2016-02-07  Jarno Malmari  
     
    -	* doc/lispref/loading.texi (How Programs Do Loading): Update the
    -	description of searching for files in 'load' when Emacs was built
    -	with support for dynamic modules.
    +	Add tests for url-auth
     
    -2016-01-16  Eli Zaretskii  
    +	* test/lisp/url/url-auth-tests.el: New file.
     
    -	* INSTALL: Document --with-modules.
    +2016-02-07  Lars Ingebrigtsen  
     
    -2016-01-16  Eli Zaretskii  
    +	Add a TLS connection test
     
    -	Document 'function-put'
    +	* test/lisp/net/network-stream-tests.el (connect-to-tls): Add
    +	a TLS connection test.
     
    -	* doc/lispref/symbols.texi (Symbol Plists): Document
    -	'function-put'.  Update documentation of 'function-get'.
    +2016-02-07  Lars Ingebrigtsen  
     
    -2016-01-16  Eli Zaretskii  
    +	Add more network tests
     
    -	Document 'funcall-interactively'
    +	* test/lisp/net/network-stream-tests.el (echo-server-nowait):
    +	New test.
     
    -	* doc/lispref/commands.texi (Interactive Call): Document
    -	'funcall-interactively'.
    -	* doc/lispref/functions.texi (Calling Functions): Mention
    -	'funcall-interactively' and provide a cross-reference.
    +2016-02-07  Lars Ingebrigtsen  
     
    -2016-01-16  Eli Zaretskii  
    +	Add network tests
     
    -	* doc/lispref/lists.texi (Association Lists): Document 'alist-get'.
    +	* test/lisp/net/network-stream-tests.el: New suite of network tests.
     
    -	* doc/lispref/strings.texi (Text Comparison): Document 'string-greaterp'.
    +2016-02-07  Foo  
     
    -2016-01-16  Eli Zaretskii  
    +	Allow various Gnus and Message address variables to be functions
     
    -	Document renaming of selection-related functions
    +	* doc/misc/gnus.texi (To From Newsgroups):
    +	gnus-ignored-from-addresses can be a function.
     
    -	* doc/lispref/frames.texi (Window System Selections): Rename "x-*"
    -	functions into the corresponding "gui-*" functions.  Make the
    -	description slightly less X-centric.
    +	* doc/misc/message.texi (Wide Reply):
    +	message-dont-reply-to-names can be a function.
     
    -2016-01-16  Eli Zaretskii  
    +	* lisp/gnus/gnus-icalendar.el (gnus-icalendar-identities):
    +	message-alternative-emails can be a function.
     
    -	* doc/lispref/macros.texi (Expansion): Document 'macroexpand-1'.
    +	* lisp/gnus/gnus-notifications.el (gnus-notifications):
    +	message-alternative-emails can be a function (bug#22315).
     
    -2016-01-16  Eli Zaretskii  
    +	* lisp/gnus/gnus-sum.el
    +	(gnus-summary-from-or-to-or-newsgroups):
    +	gnus-ignored-from-addresses can be a function (bug#22315).
     
    -	Document 'define-inline'
    +2016-02-07  Lars Ingebrigtsen  
     
    -	* doc/lispref/functions.texi (Defining Functions): Document
    -	'define-inline' and related macros.
    +	Fix typo in Gnus regexp
     
    -	* lisp/emacs-lisp/inline.el (inline-letevals): Doc fix.
    +	* lisp/gnus/gnus-art.el (gnus-button-valid-fqdn-regexp): Fix
    +	typo in last change to this regexp (bug#22592).
     
    -2016-01-16  Artur Malabarba  
    +2016-02-07  Paul Eggert  
     
    -	* lisp/files.el (dir-locals--all-files): Respect absolute file-names
    +	Port to FreeBSD x86
     
    -	* lisp/help-fns.el (describe-variable): Fix a left-over parenthesis
    +	Reported by Herbert J. Skuhra in:
    +	http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00336.html
    +	* src/lisp.h (NONPOINTER_BITS) [__FreeBSD__]: Zero in this case too,
    +	since malloc always returns a multiple of 8 in FreeBSD.
     
    -2016-01-16  Artur Malabarba  
    +2016-02-07  Alan Mackenzie  
     
    -	* lisp/dired-x.el (dired-omit-here-always): Use add-dir-local-variable
    +	On leaving CC Mode, clean up by removing character properties.
     
    -	instead of manually writing a dir-locals file.
    +	* lisp/progmodes/cc-mode.el (c-leave-cc-mode-mode): Remove from the buffer
    +	all instances of the text properties/extents category, syntax-table,
    +	c-is-sws, c-in-sws, c-type, and c-awk-NL-prop.
     
    -2016-01-16  Artur Malabarba  
    +2016-02-06  Lars Ingebrigtsen  
     
    -	* lisp/files.el (dir-locals--all-files): Use completion instead of wildcards
    +	* lisp/gnus/gnus-art.el (gnus-button-valid-fqdn-regexp): Don't use
    +	the no-longer-existing message-valid-fqdn-regexp variable.
     
    -	(dir-locals-file)
    -	* lisp/files-x.el (modify-dir-local-variable)
    -	* lisp/dos-fns.el (dosified-file-name)
    -	* lisp/help-fns.el (describe-variable): Change accordingly.
    +2016-02-06  Lars Ingebrigtsen  
     
    -2016-01-16  Jussi Lahdenniemi    (tiny change)
    +	Remove message-valid-fqdn-regexp, since it changes too much now
    +	* lisp/gnus/message.el (message-valid-fqdn-regexp): Remove.
    +	(message-bogus-recipient-p): Don't use it any more.
    +	(message-make-fqdn): Ditto.  Suggested by Lars-Johan Liman.
     
    -	Fix incompatbilities with MS-Windows 2000 and older
    +2016-02-06  Paul van der Walt    (tiny change)
     
    -	* src/w32.c : New global variable.
    -	(filename_to_utf16, filename_from_ansi, check_windows_init_file):
    -	Use it instead of the literal MB_ERR_INVALID_CHARS.
    -	(maybe_load_unicows_dll): Initialize multiByteToWideCharFlags as
    -	appropriate for the underlying OS version.  For details, see
    -	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00835.html.
    -	* src/w32.h: Declare multiByteToWideCharFlags.
    -	* src/w32fns.c (Fx_file_dialog, Fw32_shell_execute)
    -	(add_tray_notification): Use multiByteToWideCharFlags instead of
    -	the literal MB_ERR_INVALID_CHARS.
    -	(_resetstkoflw_proc): New typedef.
    -	(w32_reset_stack_overflow_guard): Call _resetstkoflw via a
    -	pointer, as this function is absent in msvcrt.dll shipped with W2K
    -	and older systems.
    +	* lisp/gnus/message.el (message-subject-re-regexp): Also match
    +	"Re :" as a "Re:" prefix (commonly used in France).
     
    -2016-01-16  Eli Zaretskii  
    +2016-02-06  Adam Sjøgren  
     
    -	Mention in PROBLEMS an issue with MS-Windows NT4
    +	* lisp/net/shr.el (shr-tag-del, shr-tag-ins): New functions.
     
    -	* etc/PROBLEMS (MS-Windows): Mention the problem with Shell32.dll
    -	on Windows NT4.  For the details, see
    -	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00835.html.
    +2016-02-06  David Edmondson  
     
    -2016-01-16  Jussi Lahdenniemi    (tiny change)
    +	src/process.c Correctly convert AF_INET6 addresses
    +	* src/process.c (conv_lisp_to_sockaddr): AF_INET6 addresses are
    +	converted to a list of 16 bit quantities by
    +	conv_sockaddr_to_lisp().  conv_lisp_to_sockaddr() should follow the
    +	same scheme rather than expecting a (longer) list of 8 bit
    +	quantities.
     
    -	Ensure 8-byte aligned memory allocation on MS-Windows 9X
    +2016-02-06  Martin Jesper Low Madsen    (tiny change)
     
    -	* src/w32heap.c (init_heap): Redirect malloc, realloc, and free to
    -	special functions on Windows 9X.  Refuse to dump Emacs on Windows 9X.
    -	(malloc_after_dump_9x, realloc_after_dump_9x)
    -	(free_after_dump_9x): New functions.  (Bug#22379)  See also
    -	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00852.html
    -	for more details about the original problem.
    +	* lisp/gnus/auth-source.el (auth-source-macos-keychain-search):
    +	Search for all host/port (or protocol) combinations for a match in
    +	the OS X keychain.
     
    -	* nt/inc/ms-w32.h (malloc_after_dump_9x, realloc_after_dump_9x)
    -	(free_after_dump_9x): Add prototypes.
    +2016-02-06  Lars Ingebrigtsen  
     
    -2016-01-16  Eli Zaretskii  
    +	Remove nonsensical setting of gnus-newsgroup-unseen
     
    -	Fix tests for active region in hideif.el
    +	* lisp/gnus/gnus-sum.el (gnus-update-marks): Remove nonsensical
    +	setting of gnus-newsgroup-unseen.
     
    -	* lisp/progmodes/hideif.el (hif-evaluate-macro, hide-ifdef-block): Use
    -	'use-region-p' to test whether to operate on region, instead of
    -	testing 'mark-active'.
    +2016-02-05  Lars Ingebrigtsen  
     
    -2016-01-16  Eli Zaretskii  
    +	Use underline on all terminals that support it
     
    -	Fix interactive specs in some hideif.el commands
    +	* lisp/subr.el (read-multiple-choice): Use
    +	display-supports-face-attributes-p instead of
    +	display-graphic-p to determine whether we can use underlining.
     
    -	* lisp/progmodes/hideif.el (hif-evaluate-macro)
    -	(hide-ifdef-undef, show-ifdef-block): Don't use '(interactive "r")'
    -	in commands that should only act on the region if it's active.
    +2016-02-05  Lars Ingebrigtsen  
     
    -2016-01-15  Phillip Lord  
    +	Make the nsm query say what it did after the user interaction
     
    -	Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25
    +	* lisp/net/nsm.el (nsm-query): Issue a message about
    +	aborting/accepting messages (suggested by N. Jackson)
    +	(bug#22531).
     
    -2016-01-15  Phillip Lord  
    +2016-02-05  Paul Eggert  
     
    -	Enable test selector from command line
    +	Omit XLI (init) == 0 optimization in make-vector
     
    -	* test/automated/Makefile.in: Change variable manipulation to avoid
    -	  over-writing selector.
    +	* src/alloc.c (Fmake_vector): Simplify by omitting the (XLI (init)
    +	== 0) case, as this optimization is probably not worth the hassle.
    +	Just for the record, the test for that case could have been
    +	(XLI (init) % ((EMACS_UINT) -1 / UCHAR_MAX) == 0) (!),
    +	assuming the typical platform with no padding bits and where
    +	conversion to int omits the most significant bits.
     
    -2016-01-15  Alan Mackenzie  
    +2016-02-05  Paul Eggert  
     
    -	Don't confuse "::" with ":" when trying to parse member initializers.
    +	* autogen.sh: Port to dash (Bug#22556).
     
    -	* lisp/progmodes/cc-engine.el (c-back-over-member-initializers): Check
    -	more robustly for ":" token when searching backwards for it.
    +2016-02-05  Michael Albinus  
     
    -	* lisp/progmodes/cc-langs.el (c-:$-multichar-token-regexp): New language
    -	variable.
    +	Minor cleanup for Tramp "doas".
     
    -2016-01-15  Eli Zaretskii  
    +	* doc/misc/tramp.texi (Inline methods): Add "doas" method.
     
    -	Ensure positive number of glyphs for margins of positive width
    +	* etc/NEWS: Add Tramp connection method "doas".
     
    -	* src/dispnew.c (margin_glyphs_to_reserve): Always return a
    -	positive value when a non-zero width of the marginal area was
    -	requested.  (Bug#22356)
    +	* lisp/net/tramp-sh.el (tramp-methods) :
    +	Add `tramp-remote-shell-args'.
     
    -2016-01-15  Eli Zaretskii  
    +2016-02-05  Xi Lu  
     
    -	Fix crashes when mini-window has non-zero margins
    +	* lisp/net/tramp-sh.el (tramp-methods) : Add.  (Bug#22542)
     
    -	* src/window.c (resize_frame_windows): Use 'new_size' to set
    -	minibuffer window's 'total_cols' value, as 'size' might be in
    -	pixels.  (Bug#22356)
    +	(tramp-default-user-alist): Add rule for "doas".
    +	(top): Completion function for "doas" is
    +	`tramp-completion-function-alist-su'.
     
    -2016-01-15  Alan Mackenzie  
    +2016-02-05  Lars Ingebrigtsen  
     
    -	In comment-dwim with style `extra-line', respect indent-tabs-mode.
    +	Restore the window configuration
     
    -	This fixes bug #22369.
    +	* lisp/net/nsm.el (nsm-query-user): Restore the window
    +	configuration (bug#22532).
     
    -	* lisp/newcomment.el (comment-make-bol-ws): New function.
    -	(comment-make-extra-lines): Use new function instead of a crude `make-string'.
    +2016-02-04  Lars Ingebrigtsen  
     
    -2016-01-15  Eli Zaretskii  
    +	Use an X popup in read-multiple-choice if running from a mouse command
     
    -	Make 'random' seeds cryptographically secure if possible
    +	* lisp/subr.el (read-multiple-choice): Use an X popup if
    +	called from a mouse action (bug#19368).
     
    -	* configure.ac: Check for "/dev/urandom".
    +2016-02-04  Lars Ingebrigtsen  
     
    -	* src/sysdep.c (init_random) [HAVE_DEV_URANDOM]: Read the stream
    -	for the seed from "/dev/urandom".
    -	[WINDOWSNT]: Obtain the stream for the seed from w32 APIs.
    -	* src/fns.c (Frandom): Update the doc string to indicate that
    -	system entropy is used when available.
    -	* src/w32.c: Include wincrypt.h.
    -	(w32_init_crypt_random, w32_init_random): New functions, use the
    -	CryptGenRandom API.
    -	(globals_of_w32): Initialize w32_crypto_hprov handle to zero.
    -	* src/w32.h (w32_init_random): Add prototype.
    +	Display cursor in echo area when prompting
     
    -	* doc/lispref/numbers.texi (Random Numbers): Document more details
    -	about 't' as the argument to 'random'.
    +	* lisp/subr.el (read-multiple-choice): Display the cursor in
    +	the echo area when prompting (bug#19368).
     
    -	* etc/NEWS: Mention that '(random t)' now uses a cryptographically
    -	strong seed if possible.
    +2016-02-04  Lars Ingebrigtsen  
     
    -	(Bug#22202)
    +	Make NSM prompting clearer
     
    -2016-01-15  Eli Zaretskii  
    +	* lisp/net/nsm.el (nsm-query-user): Use read-multiple-choice
    +	to prompt in a nicer way (bug#19368).
     
    -	Unhide the --no-line-directive option to 'etags'
    +2016-02-04  Lars Ingebrigtsen  
     
    -	* lib-src/etags.c (print_help): Un-undocument the --no-line-directive
    -	option.  (Bug#22306)
    +	Underline read-multiple-choice-face
     
    -	* doc/man/etags.1: Document the --no-line-directive option.
    +	* lisp/faces.el (read-multiple-choice-face): Also underline
    +	the choice.
     
    -2016-01-15  Alan J Third    (tiny change)
    +2016-02-04  Lars Ingebrigtsen  
     
    -	Fix picture-mode wrt double-width characters
    +	Make the read-multiple-choice prompt a bit prettier
     
    -	* lisp/textmodes/picture.el (picture-insert): Check the width of
    -	the character being replaced, not just that of the replacement.
    -	(Bug#1808)
    +	* doc/lispref/commands.texi (Reading One Event): Mention
    +	read-multiple-choice-face.
     
    -2016-01-15  Eric Abrahamsen  
    +	* lisp/subr.el (read-multiple-choice): Make the prompting a bit
    +	prettier.
     
    -	Honor docstring of gnus-group-get-new-news
    +2016-02-04  Paul Eggert  
     
    -	* lisp/gnus/gnus-start.el (gnus-get-unread-articles): If the prefix arg is t,
    -	but non-numeric, unconditionally consider all groups to need updating.
    +	Prefer memcpy and memset to doing it by hand
     
    -2016-01-14  Simen Heggestøyl  
    +	* src/alloc.c (Fmake_vector):
    +	* src/ccl.c (setup_ccl_program):
    +	Use memset to clear array.
    +	* src/alloc.c (Fvector, Fmake_byte_code):
    +	* src/charset.c (Fdefine_charset_internal):
    +	Use memcpy to copy array.
     
    -	Disallow parenthesis in non-pseudo CSS selectors
    +2016-02-04  Nicolas Petton  
     
    -	* lisp/textmodes/css-mode.el (css--font-lock-keywords): Disallow
    -	parenthesis in selectors except for in the function notation that
    -	might appear right after a pseudo-class.
    -	* test/indent/scss-mode.scss: Add a test for it.
    +	Do not ignore redirections of 301, 302 and 307 status codes
     
    -2016-01-14  Katsumi Yamaoka  
    +	The current version of HTTP/1.1 (RFC 7231) no longer requires
    +	confirmation on 301, 302 or 307 status codes, therefore we do not have
    +	to ignore redirects for other requests than GET and HEAD.
     
    -	* lisp/gnus/nntp.el (nntp-request-newgroups): Simplify
    +	* lisp/url/url-http.el (url-http-parse-headers): Do not ignore 301, 302
    +	and 307 redirects for other requests than GET and HEAD.
     
    -2016-01-14  Michael Albinus  
    +2016-02-04  Mark Oteiza  
     
    -	check-maybe shall run only default tests
    +	* lisp/net/eww.el (eww-switch-to-buffer): Use pop-to-buffer-same-window instead.
     
    -	* test/automated/Makefile.in (check, check-expensive): Depend on
    -	mostlyclean.
    -	(check-maybe): Re-run only default tests.
    -	(check-doit): Use code of check-maybe.
    -	(mostlyclean): Move *.log files away.
    +2016-02-04  Paul Eggert  
     
    -2016-01-14  Mark Oteiza  
    +	Simplify USE_ALIGNED_ALLOC
     
    -	* lisp/thingatpt.el (thing-at-point-uri-schemes): Add "magnet:"
    +	* src/alloc.c (USE_ALIGNED_ALLOC): Simplify, now that we’ve merged
    +	in the emacs-25 changes.  Omit no-longer-needed decl for aligned_alloc.
     
    -2016-01-14  Dmitry Gutov  
    +2016-02-04  Eric Abrahamsen  
     
    -	Un-obsolete tags-loop-continue
    +	Honor docstring of gnus-group-get-new-news
     
    -	* lisp/progmodes/etags.el (tags-loop-continue): Un-obsolete.
    -	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00682.html
    +	* lisp/gnus/gnus-start.el (gnus-get-unread-articles): If the prefix arg
    +	is t, but non-numeric, unconditionally consider all groups to need
    +	updating.
     
    -2016-01-13  Eli Zaretskii  
    +2016-02-04  Lars Ingebrigtsen  
     
    -	Document obsoletion of 'intangible' and 'point-entered/left'
    +	New function read-multiple-choice
    +
    +	* doc/lispref/commands.texi (Reading One Event): Document
    +	read-multiple-choice.
    +
    +	* lisp/faces.el (read-multiple-choice-face): New face.
    +
    +	* lisp/subr.el (read-multiple-choice): New function.
    +
    +2016-02-04  John Wiegley  
    +
    +	Merge from origin/emacs-25
    +
    +	ee73997 Make erc work better when encountering unknown prefix chars
    +	b99141d Make erc completion case-insensitive again
    +	66c4620 Make complection in erc use consistent casing
    +	8c562b2 Make /QUIT in erc more robust
    +	d93d2c5 Make tracking faces in Emacs work more reliably
    +	af6ab7e Make shr not bug out on images on non-graphical displays
    +	3311f40 Fix bookmark display widths
    +	d90ab1e Fix typo in eww-make-unique-file-name
    +	7f81825 Make it possible to TAB to input fields
    +	a43a1dc Insert complete alt texts when images are disabled
    +	56ed4e1 Allow eww text fields to grow
    +	66b315c Make erc work when subword-mode is switched on
    +	255b68f Fix IMAP doc example
    +	91557f5 Quoting fixes in doc strings and diagnostics
    +	2c0dc9f Fix warning message in hack-local-variables
    +	504696d Etags: yet another improvement in Ruby tags
    +	8784ebf Fix x-popup-menu on TTYs without a mouse
    +	8b87ecb * lisp/emacs-lisp/map.el: Improvements to the docstring of the
    +	        pcase macro
    +	6191003 Use pop-to-buffer-same-window in eww
    +	fe321fd * autogen.sh: Revert all recent changes.
    +	74ebd4a * make-dist: Updates related to nt/.
    +	737193a * make-dist: Add modules/.
    +	3696bf2 * make-dist: Update for super-special file that can't live in etc/.
    +	a4278e2 Fix failure to compile ns-win.el in parallel builds
    +	860da4d Fix names of tags generated for Ruby accessors
    +	f6213ce Fix file-name recognition in 'etags'
    +	e42e662 Change Ruby file names and extensions recognized by 'etags'
    +	58bfb6a More improvements for Ruby support in 'etags'
    +	c04e911 Add --git-config option to autogen.sh
    +	5713466 Fix editing undo changes in eww fields
    +	51362d6 Allow the user more control of popping up the eww window
    +	ee0fbd8 Make eww-browse-url with new-window parameter work again
    +	9c3142d Clean up eww code slightly
    +	cb035f3 Don't insert nil faces in shr
    +	4c3fae3 ; * lisp/progmodes/prolog.el: Remove some obsolete commentary.
    +	93f2153 Improve the custom type of some user options.
    +	9f60d7e Mark some risky calendar variables.
    +	1d07dcd Highlight two additional SCSS keywords
    +	ee8b466 Recommend enabling integrity-checking in git
    +	e639e10 Some corrections in Elisp manual
    +	d766ca8 Chatter when autogen.sh changes Git configuration
    +	3b734e1 * org/org-compat.el (org-font-lock-ensure): Fix bogus test (bug#22399)
    +	43cb9f8 Omit unnecessary history from Lisp intro
    +	2fbd1da * etc/HISTORY: Add some more history, plus git tags.
    +	c90e1b4 Improve elisp “Security Considerations” doc
    +	cedd7ca autogen.sh now arranges for git to check hashes
    +	86ce76b ; Fix ChangeLog.2 commit ID.
    +	7b1d2b1 Fix (c & 040) typo in emergency escapes
    +	a8273da Fix display of overlay strings with 'display' and 'box' property
    +	fc48106 Fix imap-starttls-open
    +	cdecbed Fix return value of imap-starttls-open
    +	20c7e34 ; * etc/NEWS: Fix renamed command name
    +	98bdbdb Correct reference to DARWIN_OS preprocessor symbol
    +	b250d29 Spelling fix
    +	b920a0e Spelling fixes
    +	93b144b Pacify GCC on C library without glibc API
    +
    +2016-02-04  John Wiegley  
    +
    +	Merge from origin/emacs-25
    +
    +	ea26c8a * lisp/net/browse-url.el (browse-url-default-browser): Lower
    +	        priority of non-free Chrome.
    +	0fac75f Improve the custom type of some user options.
    +	2df0e04 Highlight CSS variables with variable name face
    +	3cf5e81 * lisp/gnus/gnus-kill.el (gnus-winconf-kill-file): Not
    +	        user-serviceable.
    +	2a5233c Mark some user options that can get evalled as risky.
    +	39b166f Disable DebPrint in sys_read on MS-Windows
    +	9fd0189 ;Fix ChangeLog entry
    +	4bb7233 Fix typos in Introduction to Emacs Lisp manual
     
    -	* doc/lispref/text.texi (Special Properties): Document the new
    -	properties 'cursor-intangible' and 'cursor-sensor-functions'.
    -	Document the obsolete status of 'intangible', 'pointer-left',
    -	and 'point-entered' properties, and of 'inhibit-point-motion-hooks'.
    -	* doc/lispref/display.texi (Overlay Properties): Document that
    -	'intangible' overlay property is obsolete.
    +2016-02-04  Vasilij Schneidermann    (tiny change)
     
    -	* lisp/emacs-lisp/cursor-sensor.el (cursor-sensor-mode): Doc fix.
    +	Allow sending empty hidden values in eww
     
    -2016-01-13  Eli Zaretskii  
    +	* lisp/net/eww.el (eww-tag-input): Allow sending empty hidden
    +	values (bug#22388).
     
    -	Updater documentation of 'looking-back'
    +	(cherry picked from commit 5898da8210af7953e638ddf7821c05260979c3f0)
     
    -	* doc/lispref/searching.texi (Regexp Search): Update documentation
    -	of 'looking-back'.  Fix markup.
    +	Backport:
     
    -2016-01-13  Eli Zaretskii  
    +2016-02-04  David Edmondson  
     
    -	Document 'pre-redisplay-functions'
    +	Make erc work better when encountering unknown prefix chars
     
    -	* doc/lispref/hooks.texi (Standard Hooks):
    -	* doc/lispref/display.texi (Forcing Redisplay): Document
    -	'pre-redisplay-functions'.
    +	* lisp/erc/erc.el (erc-channel-receive-names): Output a warning
    +	instead of erroring out on unknown prefix chars (bug#22380).
     
    -2016-01-13  Eli Zaretskii  
    +2016-02-04  Mark Oteiza  
     
    -	Document the new deafault value of 'load-read-function'
    +	Add a new command to switch between erc buffers
     
    -	* doc/lispref/loading.texi (How Programs Do Loading): Document the
    -	change in the default value of 'load-read-function'.
    +	* doc/misc/eww.texi: Document eww-switch-to-buffer and its keybinding
    +	* etc/NEWS: Mention new command
    +	* lisp/net/eww.el (eww-mode-map): Bind eww-switch-to-buffer to "s"
    +	(eww-mode-map): Add menu item
    +	(eww-switch-to-buffer): New command
     
    -2016-01-13  Eli Zaretskii  
    +2016-02-04  David Edmondson  
     
    -	Document 'bufferpos-to-filepos' and 'filepos-to-bufferpos'
    +	Make erc work better when encountering unknown prefix chars
     
    -	* doc/lispref/nonascii.texi (Text Representations): Document
    -	'bufferpos-to-filepos' and 'filepos-to-bufferpos'.
    +	* lisp/erc/erc.el (erc-channel-receive-names): Output a warning
    +	instead of erroring out on unknown prefix chars (bug#22380).
     
    -2016-01-13  Eli Zaretskii  
    +2016-02-04  Vasilij Schneidermann    (tiny change)
     
    -	Document the new prefix-command hooks
    +	Allow sending empty hidden values in eww
     
    -	* doc/lispref/hooks.texi (Standard Hooks): Document
    -	`prefix-command-echo-keystrokes-functions' and
    -	`prefix-command-preserve-state-hook'.
    +	* lisp/net/eww.el (eww-tag-input): Allow sending empty hidden
    +	values (bug#22388).
     
    -2016-01-13  Paul Eggert  
    +2016-02-04  Lars Ingebrigtsen  
     
    -	Fix one more misuse of time-stamp-time-zone
    +	Make erc completion case-insensitive again
     
    -	* test/etags/html-src/softwarelibero.html: Use "UTC0" rather
    -	than the unportable "GMT" for time zone.
    +	* lisp/erc/erc.el (erc-completion-at-point): Make erc completion
    +	case-insensitive again (bug#11360).
     
    -2016-01-13  Paul Eggert  
    +2016-02-04  Carlos Pita    (tiny change)
     
    -	Fix NNTP NEWGROUPS off-by-a-few-hours bug
    +	Make complection in erc use consistent casing
     
    -	* lisp/gnus/nntp.el (nntp-request-newgroups): Format string
    -	in Universal Time, since we’re telling the server “GMT”.
    +	* lisp/erc/erc-pcomplete.el (pcomplete-erc-all-nicks): Make
    +	case in the complection consistent (bug#18509).
     
    -2016-01-13  Paul Eggert  
    +2016-02-04  Francis Litterio  
     
    -	Update publicsuffix.txt from upstream
    +	Make /QUIT in erc more robust
     
    -	* etc/publicsuffix.txt: Update from
    -	https://publicsuffix.org/list/effective_tld_names.dat
    -	dated 2016-01-12 11:52:01 UTC.
    +	* lisp/erc/erc.el (erc-kill-query-buffers): Don't bug out if we're
    +	issuing /QUIT to disconnected servers (bug#22099).
     
    -2016-01-13  Glenn Morris  
    +2016-02-04  Kevin Brubeck Unhammer    (tiny change)
     
    -	Fix some declarations.
    +	Make tracking faces in Emacs work more reliably
     
    -	* lisp/descr-text.el (internal-char-font):
    -	* lisp/cedet/mode-local.el (xref-item-location):
    -	* lisp/gnus/mml-smime.el (epg-key-sub-key-list)
    -	(epg-sub-key-capability, epg-sub-key-validity):
    -	* lisp/international/mule-util.el (internal-char-font):
    -	Fix declarations.
    +	* lisp/erc/erc-track.el (erc-faces-in): Always return lists of
    +	faces to avoid later ambiguity (bug#22424).
     
    -2016-01-13  Glenn Morris  
    +2016-02-04  Lars Ingebrigtsen  
     
    -	Fix some custom types.
    +	Make shr not bug out on images on non-graphical displays
     
    -	* lisp/gnus/gnus-fun.el (gnus-x-face-omit-files, gnus-face-omit-files):
    -	* lisp/gnus/gnus.el (gnus-valid-select-methods):
    -	* lisp/mail/rmail.el (rmail-get-coding-function):
    -	* lisp/net/newst-treeview.el (newsticker-groups-filename):
    -	* lisp/progmodes/hideif.el (hide-ifdef-exclude-define-regexp):
    -	* lisp/textmodes/tildify.el (tildify-space-predicates):
    -	* lisp/url/url-tramp.el (url-tramp-protocols):
    -	Fix custom types.
    +	* lisp/net/shr.el (shr-put-image): Don't bug out on alt-less
    +	images on non-graphical displays (bug#22327).
     
    -2016-01-13  Glenn Morris  
    +2016-02-04  Andrew Hyatt  
     
    -	Add some missing version tags.
    +	Remove packages obsoleted before Emacs 24.
     
    -	* lisp/electric.el (electric-quote-comment)
    -	(electric-quote-string, electric-quote-paragraph):
    -	* lisp/epg-config.el (epg-gpgconf-program):
    -	* lisp/rect.el (rectangle-preview):
    -	* lisp/emacs-lisp/check-declare.el (check-declare-ext-errors):
    -	* lisp/emacs-lisp/package.el (package-selected-packages)
    -	(package-hidden-regexps):
    -	* lisp/erc/erc.el (erc-network-hide-list, erc-channel-hide-list):
    -	* lisp/eshell/em-term.el (eshell-destroy-buffer-when-process-dies):
    -	* lisp/gnus/mml-sec.el (mml1991-signers, mml2015-signers)
    -	(mml-smime-signers, mml1991-encrypt-to-self, mml2015-encrypt-to-self)
    -	(mml-smime-encrypt-to-self, mml2015-sign-with-sender)
    -	(mml-smime-sign-with-sender, mml2015-always-trust)
    -	(mml-secure-fail-when-key-problem, mml-secure-key-preferences):
    -	* lisp/net/browse-url.el (browse-url-conkeror-new-window-is-buffer)
    -	(browse-url-conkeror-arguments):
    -	* lisp/net/newst-reader.el (newsticker-download-logos):
    -	* lisp/progmodes/gud.el (gud-guiler-command-name):
    -	* lisp/progmodes/prog-mode.el (prettify-symbols-unprettify-at-point):
    -	* lisp/progmodes/project.el (project-vc):
    -	* lisp/progmodes/python.el (python-indent-guess-indent-offset-verbose)
    -	(python-shell-remote-exec-path, python-shell-first-prompt-hook)
    -	(python-shell-completion-native-disabled-interpreters)
    -	(python-shell-completion-native-enable)
    -	(python-shell-completion-native-output-timeout)
    -	(python-shell-completion-native-try-output-timeout):
    -	* lisp/progmodes/xref.el (xref):
    -	* lisp/term/screen.el (xterm-screen-extra-capabilities):
    -	* lisp/term/xterm.el (xterm-max-cut-length):
    -	Add missing version tags.
    +	In accordance with the policy discussed in the emacs-devel list,
    +	packages that have been obsoleted for a full major release cycle are up
    +	for deletion.
     
    -2016-01-13  Glenn Morris  
    +	This removes almost all packages that are now eligible for deletion,
    +	with the exception of "cl-compat", which seems it is likely to still be
    +	used, and "optional", which offers some functionality that doesn't have
    +	a replacement yet.
     
    -	* test/automated/core-elisp-tests.el
    -	(core-elisp-tests-1-defvar-in-let): Add a custom type.
    +2016-02-04  Lars Ingebrigtsen  
     
    -2016-01-13  Glenn Morris  
    +	Fix bookmark display widths
     
    -	* src/buffer.c (syms_of_buffer) : Doc fix.
    +	* lisp/net/eww.el (eww-list-bookmarks): Pop to the buffer before
    +	preparing it so that the widths are computed correctly (bug#22328).
     
    -	Remove comments that do not apply since 2005-08-09.  (Bug#22349)
    +2016-02-04  Lars Ingebrigtsen  
     
    -2016-01-12  Paul Eggert  
    +	Fix typo in eww-make-unique-file-name
     
    -	Merge from gnulib
    +	* lisp/net/eww.el (eww-make-unique-file-name): Make this function
    +	actually work.
     
    -	This mostly just changes "UTC" to "UTC0" for POSIX conformance.
    -	It also updates to the latest version of texinfo.tex.
    -	* build-aux/gitlog-to-changelog, build-aux/move-if-change:
    -	* build-aux/update-copyright, doc/misc/texinfo.tex:
    -	Update from gnulib.
    +2016-02-03  Lars Ingebrigtsen  
     
    -2016-01-12  Eli Zaretskii  
    +	Make it possible to TAB to input fields
     
    -	Update documentation of 'process-running-child-p'
    +	* lisp/net/eww.el (eww-tag-input): Make it possible to TAB to
    +	input fields (bug#22540).
     
    -	* doc/lispref/processes.texi (Input to Processes): Document the
    -	changes in return value of 'process-running-child-p'.
    +2016-02-03  Lars Ingebrigtsen  
     
    -2016-01-12  Eli Zaretskii  
    +	Insert complete alt texts when images are disabled
     
    -	Update documentation of 'deactivate-mark'.
    +	* lisp/net/shr.el (shr-tag-img): When images are disabled, insert
    +	the complete alt/title string (bug#22293).
     
    -	* doc/lispref/markers.texi (The Mark): Document that
    -	'deactivate-mark' is now buffer-local when set.
    +2016-02-03  Lars Ingebrigtsen  
     
    -2016-01-12  Eli Zaretskii  
    +	Allow eww text fields to grow
     
    -	Update documentation of 'completion-table-dynamic'
    +	* lisp/net/eww.el (eww-process-text-input): Allow text fields to
    +	grow when typing in stuff that's longer than the original width.
     
    -	* doc/lispref/minibuf.texi (Programmed Completion): Document the
    -	new optional argument to 'completion-table-dynamic'.
    +2016-02-03  Dima Kogan  
     
    -2016-01-12  Eli Zaretskii  
    +	Make erc work when subword-mode is switched on
     
    -	Document changes in 'read-buffer' and 'read-buffer-function'
    +	* lisp/erc/erc-backend.el (erc-forward-word, erc-word-at-arg-p)
    +	(erc-bounds-of-word-at-point): New functions to do word-based
    +	things when subword-mode is switched on.
     
    -	* doc/lispref/minibuf.texi (High-Level Completion): Document the
    -	4th argument to 'read-buffer' and 'read-buffer-function'.
    +	* lisp/erc/erc-button.el (erc-button-add-nickname-buttons): Use them
    +	(bug#17558).
     
    -2016-01-12  Paul Eggert  
    +2016-02-03  Teemu Likonen  
     
    -	Fix time-stamp-time-zone bugs introduced in July
    +	Fix IMAP doc example
     
    -	This fixes a bug introduced when the July changes to
    -	format-time-string installed, as the changes were not
    -	correctly handled in this module (Bug#22302).
    -	Also, document time stamp time zones.
    -	* lisp/time-stamp.el (time-stamp-time-zone): Document values better.
    -	(time-stamp--format): New private function.
    -	(time-stamp-string, time-stamp-string-preprocess)
    -	(time-stamp-do-number): Use it.
    -	* doc/emacs/files.texi (Time Stamps): Mention time zones.
    -	* doc/misc/autotype.texi (Timestamps): Document time-stamp-time-zone.
    +	* doc/misc/gnus.texi (Client-Side IMAP Splitting): Fix example.
     
    -2016-01-12  Eli Zaretskii  
    +2016-02-03  Paul Eggert  
     
    -	Make piping to subprocesses more robust on MS-Windows
    +	Quoting fixes in doc strings and diagnostics
     
    -	* src/w32.c (sys_write): Don't write to a pipe more stuff than its
    -	buffer can hold.  Don't return -1 if something has been written to
    -	the pipe.  Zero out 'errno' before calling '_write', to avoid
    -	returning a stale value.  (Bug#22344)
    -	* src/w32proc.c (syms_of_ntproc) : New variable.
    -	* src/w32.c (pipe2): Use it to request a user-defined size for the
    -	pipe being created.
    +	* lisp/emacs-lisp/bytecomp.el (byte-compile-setq, byte-compile-funcall):
    +	* lisp/gnus/mml-smime.el (mml-smime-get-dns-cert)
    +	(mml-smime-get-ldap-cert):
    +	Follow user style preference when quoting diagnostics.
     
    -	* etc/NEWS: Mention 'w32-pipe-buffer-size'.
    +2016-02-03  Paul Eggert  
     
    -	* doc/emacs/msdos.texi (Windows Processes): Document
    -	'w32-pipe-buffer-size'.
    +	Mention context when resume from emergency escape
     
    -2016-01-11  Dmitry Gutov  
    +	That way, if the user has been doing something else for a while,
    +	they are reminded of the situation when restarting Emacs,
    +	and are more likely to understand the two questions.
    +	* doc/emacs/trouble.texi (Emergency Escape): Document this.
    +	* src/keyboard.c (handle_interrupt): Implement this.
     
    -	test/automated/vc-hg.el: Support out-of-tree build
    +2016-02-03  Noam Postavsky  
     
    -	* test/automated/vc-hg.el
    -	(vc-hg-annotate-extract-revision-at-line-with-filename)
    -	(vc-hg-annotate-extract-revision-at-line-with-both):
    -	Don't refer to source-directory.
    -	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00755.html
    +	Fix warning message in hack-local-variables
     
    -2016-01-11  Michael Albinus  
    +	* lisp/files.el (hack-local-variables): use 'thisbuf' to reference
    +	the original buffer name in the warning message.  (Bug#21681)
     
    -	Minor change in tramp-tests.el
    +2016-02-03  Eli Zaretskii  
     
    -	* test/automated/tramp-tests.el (tramp-test29-vc-registered):
    -	Use `dired-uncache' instead of a Tramp internal function.
    +	Etags: yet another improvement in Ruby tags
     
    -2016-01-11  Peter Feigl  
    +	* lib-src/etags.c (Ruby_functions): Handle continuation lines in
    +	Ruby accessor definitions.  (Bug#22241)
     
    -	* etc/HELLO: Add Armenian and Mongolian greetings.
    +	* test/etags/ruby-src/test1.ru (A::B#X): Add some more tests for
    +	accessors and multiline definitions.
    +	* test/etags/ETAGS.good_1:
    +	* test/etags/ETAGS.good_2:
    +	* test/etags/ETAGS.good_3:
    +	* test/etags/ETAGS.good_4:
    +	* test/etags/ETAGS.good_5:
    +	* test/etags/ETAGS.good_6:
    +	* test/etags/CTAGS.good: Adapt to changes in Ruby tags.
     
    -	(Bug#22346)
    +2016-02-03  Eli Zaretskii  
     
    -2016-01-11  Alan Mackenzie  
    +	Fix x-popup-menu on TTYs without a mouse
     
    -	Java Mode: Fontify identifiers in the presence of annotations.
    +	* src/menu.c (Fx_popup_menu): Be sure to initialize 'x' and 'y'
    +	for the TTY case without a mouse.  (Bug#22538)
     
    -	* lisp/progmodes/cc-engine.el (c-forward-annotation): Tidy up the coding:
    -	Don't move point when the defun fails.
    -	(c-forward-decl-or-cast-1): Correct a usage of match data.
    -
    -	* lisp/progmodes/cc-fonts.el (c-font-lock-maybe-decl-faces): Remove.
    -	(c-font-lock-declarations): Use the new c-maybe-decl-faces in place of the
    -	removed variable.
    -
    -	* lisp/progmodes/cc-langs.el (c-maybe-decl-faces): New language variable.
    -
    -2016-01-11  Eli Zaretskii  
    +2016-02-03  Nicolas Petton  
     
    -	Avoid an infloop when we run out of memory
    +	* lisp/emacs-lisp/map.el: Improvements to the docstring of the pcase macro
     
    -	* src/alloc.c (garbage_collect_1): Don't bother saving and
    -	restoring the echo-area message if we are GC'ing after running out
    -	of memory.  This avoids an infloop due to repeated attempts to
    -	allocate memory for the cons cell needed to save the message,
    -	which signals the memory-full error, which attempts to save the
    -	echo-area message, which signals memory-full again, etc.
    +2016-02-03  Paul Eggert  
     
    -2016-01-11  Eli Zaretskii  
    +	Port aligned_alloc decl to Cygwin.
     
    -	Avoid unnecessary failures of auto-saving after fatal error
    +	Problem reported by Ken Brown (Bug#22522#38).
    +	* configure.ac (aligned_alloc): Check for decl too.
    +	* src/lisp.h (aligned_alloc): Declare if not already declared.
     
    -	* src/w32.c (map_w32_filename): Avoid non-trivial system calls for
    -	the benefit of FAT volumes if we are called as part of shutting
    -	down due to a fatal error, which probably means we are trying to
    -	auto-save the session.
    -	* src/lread.c (check_obarray): Don't bother making the obarray
    -	valid if we are shutting down due to a fatal error.  This avoids
    -	interfering with auto-saving the crashed session.
    +2016-02-03  Paul Eggert  
     
    -2016-01-11  Paul Eggert  
    +	autogen.sh now configures git only on request
     
    -	Simplify HAVE_MODULES use in mark_maybe_pointer
    +	* autogen.sh (do_autoconf, do_git): New vars.
    +	Support new arguments --help, all, autoconf, git.
    +	By default, just do autoconf-related configuration, not git.
    +	Prefer 'echo' to 'cat <
    +2016-02-02  Lars Ingebrigtsen  
     
    -	Revert attempt to use 'noexcept' in typedef
    +	Use pop-to-buffer-same-window in eww
     
    -	This use of 'noexcept' runs afoul of the C++11 standard.
    -	Problem reported by Philipp Stephani in:
    -	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00706.html
    -	* src/emacs-module.c (emacs_finalizer_function):
    -	Move this typedef here ...
    -	* src/emacs-module.h: ... from here, and use only the C
    -	version of the typedef.  The typedef is now private since it
    -	is never used in the .h file now and anyway it seemed to be
    -	causing more confusion than it cured.
    -	(make_user_ptr, get_user_finalizer, set_user_finalizer):
    -	Open-code the type instead.
    +	* lisp/net/eww.el: pop-to-buffer-same-window throughout instead of
    +	switch-to-buffer (bug#22244).
     
    -2016-01-10  Eli Zaretskii  
    +2016-02-02  Paul Eggert  
     
    -	Update documentation of 'indirect-function'
    +	* autogen.sh: Revert all recent changes.
     
    -	* doc/lispref/eval.texi (Function Indirection): Update the
    -	documentation of 'indirect-function'.
    +2016-02-02  Paul Eggert  
     
    -2016-01-10  Eli Zaretskii  
    +	Build with C11 if available
     
    -	Update documentation for obsoleting 'syntax-begin-function'
    +	* admin/merge-gnulib (GNULIB_MODULES): Add std-gnu11.
    +	* m4/std-gnu11.m4: New file, from gnulib.
    +	* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
     
    -	* doc/lispref/syntax.texi (Position Parse): Undocument
    -	'syntax-begin-function' that is now obsolete.
    +2016-02-02  Paul Eggert  
     
    -2016-01-10  Eli Zaretskii  
    +	Update gnulib copy
     
    -	Document new features if Eshell
    +	* doc/misc/texinfo.tex: Copy from gnulib.
     
    -	* doc/misc/eshell.texi (Input/Output): Document the new
    -	'#' syntax.
    -	(Input/Output): Document 'eshell-destroy-buffer-when-process-dies'.
    -	Disable "Key Index" generation, as there are no @kindex entries in
    -	this manual.
    +2016-02-02  Glenn Morris  
     
    -2016-01-10  Michael Albinus  
    +	* make-dist: Updates related to nt/.
     
    -	Handle too long commands in Tramp
    +	* make-dist: Add modules/.
     
    -	* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
    -	(tramp-do-file-attributes-with-ls): Send sequence of commands, in
    -	order to not exceed shell command line limit.
    +	* make-dist: Update for super-special file that can't live in etc/.
     
    -	* test/automated/tramp-tests.el (tramp--test-darwin-p): Remove.
    -	(tramp--test-utf8): Include Arabic file name, again.
    +2016-02-02  Eli Zaretskii  
     
    -2016-01-10  Paul Eggert  
    +	Fix failure to compile ns-win.el in parallel builds
     
    -	* .gitattributes: *.cur and *.pif are binary files too.
    +	* src/Makefile.in ($(lispsource)/term/ns-win.elc): Add order-only
    +	dependency on $(lispsource)/international/charprop.el.
    +	(Bug#22501)
     
    -2016-01-10  Stefan Monnier  
    +2016-02-02  Eli Zaretskii  
     
    -	* src/alloc.c (mark_maybe_pointer): HAVE_MODULES may be undefined
    +	Fix names of tags generated for Ruby accessors
     
    -2016-01-10  Stefan Monnier  
    +	* lib-src/etags.c (Ruby_functions): Don't include the leading
    +	colon ':' in tags for Ruby accessors and aliases.  (Bug#22241)
     
    -	* lisp/progmodes/sh-script.el (sh-smie-sh-rules): Improve indentation inside $(...)
    +	* test/etags/ETAGS.good_1:
    +	* test/etags/ETAGS.good_2:
    +	* test/etags/ETAGS.good_3:
    +	* test/etags/ETAGS.good_4:
    +	* test/etags/ETAGS.good_5:
    +	* test/etags/ETAGS.good_6:
    +	* test/etags/CTAGS.good: Adapt to changes in Ruby tags.
     
    -	* lisp/progmodes/sh-script.el (sh-smie-sh-rules): Improve indentation
    -	within $(...).
    -	* test/indent/shell.sh: Add corresponding test.
    +2016-02-02  Glenn Morris  
     
    -2016-01-10  Stefan Monnier  
    +	* lisp/vc/add-log.el (change-log-directory-files, find-change-log):
    +	Doc tweaks.
     
    -	* src/alloc.c (mark_maybe_pointer): Also check wide-int's emacs_value
    +2016-02-02  Eli Zaretskii  
     
    -	(mark_memory): Simplify loop.  Don't assume a pointer-sized word can be
    -	cast to Lisp_Object.
    +	Fix file-name recognition in 'etags'
     
    -2016-01-10  Dmitry Gutov  
    +	* lib-src/etags.c (get_language_from_filename): If FILE includes a
    +	leading directory, compare only its basename to the known file
    +	names in lang_names[].
     
    -	Use short date for 'hg annotate', and output the author
    +	* test/etags/Makefile (RBSRC): Adapt to recent test1.ruby
    +	renaming.
    +	* test/etags/ETAGS.good_1:
    +	* test/etags/ETAGS.good_2:
    +	* test/etags/ETAGS.good_3:
    +	* test/etags/ETAGS.good_4:
    +	* test/etags/ETAGS.good_5:
    +	* test/etags/ETAGS.good_6:
    +	* test/etags/CTAGS.good: Adapt to changes in Ruby file names and
    +	to the results in Makefile due to the above etags.c fix.
     
    -	* lisp/vc/vc-hg.el (vc-hg-annotate-command):
    -	Change '-d' to '-dq'.  (Bug#21805)
    -	(vc-hg-annotate-switches): Default to "-u" "--follow".
    -	(vc-hg-annotate-re): Update to recognize the short date format
    -	and the optional username.
    -	(vc-hg-annotate-time)
    -	(vc-hg-annotate-extract-revision-at-line): Update accordingly.
    +2016-02-02  Eli Zaretskii  
     
    -	* test/automated/vc-hg.el: New file.
    +	Change Ruby file names and extensions recognized by 'etags'
     
    -2016-01-10  Paul Eggert  
    +	* lib-src/etags.c : New variable, holds names
    +	of Ruby files.
    +	: Treat .rb, .ru, and .rbw as Ruby extensions.
    +	: Add Ruby_filenames to the Ruby entry.
    +	* test/etags/ruby-src/test1.ru: Renamed from test1.ruby.
    +	(Bug#22241)
     
    -	Spelling fix
    +2016-02-02  Paul Eggert  
     
    -2016-01-09  Eli Zaretskii  
    +	Port better to platforms lacking aligned_alloc
     
    -	Document user-level functions in project.el
    +	Problem reported by Ken Brown (Bug#22522).
    +	* src/lisp.h (hybrid_aligned_alloc)
    +	[HYBRID_MALLOC && !HAVE_ALIGNED_ALLOC]: New decl.
     
    -	* lisp/progmodes/project.el (project-find-file)
    -	(project-or-external-find-file): Add doc strings.
    +2016-02-02  Paul Eggert  
     
    -2016-01-09  Eli Zaretskii  
    +	Port malloc.h hygiene fix to LTO
     
    -	Document the user-level features of the Xref package
    +	* src/alloc.c (__malloc_initialize_hook):
    +	Make it externally visible (Bug#22522).
     
    -	* doc/emacs/maintaining.texi (Maintaining): Add a list of
    -	described features.
    -	(Xref): New section, made out of thoroughly rewritten "Tags"
    -	section.
    -	(Find Identifiers, Looking Up Identifiers, Xref Commands)
    -	(Identifier Search, List Identifiers): New subsections,
    -	incorporating the old tags commands and the new xref commands.
    -	(Tags Tables, Tag Syntax, Create Tags Table, Etags Regexps):
    -	Section and subsections demoted to a lower level.
    -	* doc/emacs/search.texi (Search):
    -	* doc/emacs/windows.texi (Pop Up Window):
    -	* doc/emacs/frames.texi (Creating Frames):
    -	* doc/emacs/programs.texi (Imenu, Symbol Completion):
    -	* doc/emacs/building.texi (Grep Searching):
    -	* doc/emacs/dired.texi (Operating on Files):
    -	* doc/emacs/glossary.texi (Glossary): All references to tags changed.
    +2016-02-02  Eli Zaretskii  
     
    -2016-01-09  Stefan Monnier  
    +	More improvements for Ruby support in 'etags'
     
    -	* doc/lispref/loading.texi: Add `define-type' entry for load-history
    +	* lib-src/etags.c (Ruby_functions): Tag Ruby accessors and
    +	alias_method.  Identify constants even if the assignment is not
    +	followed by whitespace.  (Bug#22241)
     
    -	* doc/lispref/loading.texi (Where Defined): Remove incorrect
    -	cl-defmethod description, and add missing define-type entry.
    +	* test/etags/ruby-src/test1.ruby: Add tests for constants,
    +	accessors, and alias_method.
    +	* test/etags/ETAGS.good_1:
    +	* test/etags/ETAGS.good_2:
    +	* test/etags/ETAGS.good_3:
    +	* test/etags/ETAGS.good_4:
    +	* test/etags/ETAGS.good_5:
    +	* test/etags/ETAGS.good_6:
    +	* test/etags/CTAGS.good: Adapt to changes in Ruby tests.
     
    -2016-01-09  Eli Zaretskii  
    +2016-02-02  Paul Eggert  
     
    -	Improve doc strings and prompts in xref.el
    +	Add --git-config option to autogen.sh
     
    -	* lisp/progmodes/xref.el (xref-backend-functions)
    -	(xref-find-definitions): Doc fixes.
    -	(xref-query-replace): Doc fix.  Improve prompts for arguments.
    +	* autogen.sh: New options --git-config, --help.
    +	(git_config): New shell var.  Alter function to respect this var.
     
    -2016-01-09  Alan Mackenzie  
    +2016-02-02  Lars Ingebrigtsen  
     
    -	Allow the use of `font-lock-extend-region-multiline' in CC Mode.
    +	Fix editing undo changes in eww fields
     
    -	* lisp/progmodes/cc-mode.el (c-font-lock-init): Remove
    -	`font-lock-extend-regions-wholelines' from
    -	`font-lock-extend-region-functions' rather than setting the latter to
    -	nil.
    +	* eww.el (eww-tag-form): Don't overwrite initial form data in text
    +	fields.
    +	(eww-process-text-input): Make `M-t' at the end of text fields work
    +	better (bug#19085).
     
    -2016-01-09  Michael Albinus  
    +2016-02-01  Lars Ingebrigtsen  
     
    -	Fix coding system for Tramp on OS X.
    +	Allow the user more control of popping up the eww window
     
    -	* lisp/net/tramp-compat.el: Require ucs-normalize.
    +	* eww.el (eww): Use pop-to-buffer-same-window (suggested by
    +	Michael Heerdegen) (bug#22244).
     
    -	* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
    -	Set coding system to `utf-8-hfs' for Mac OS X.
    +2016-02-01  Lars Ingebrigtsen  
     
    -	* test/automated/tramp-tests.el (tramp-test29-vc-registered):
    -	Flush directory properties when needed.
    -	(tramp--test-utf8): Include Chinese file name, again.
    +	Make eww-browse-url with new-window parameter work again
     
    -2016-01-09  Eli Zaretskii  
    +	* eww.el (eww-browse-url): Stay in the same buffer if we're
    +	already in a eww mode buffer so that eww-browse-url with a
    +	new-window parameter works (bug#22244).
     
    -	Update 'load-history' docs
    +2016-02-01  Lars Ingebrigtsen  
     
    -	* doc/lispref/loading.texi (Where Defined): Update the list of
    -	forms in 'load-history' by adding the forms created for the
    -	'cl-generic' generics.  (Bug#21422)
    +	Clean up eww code slightly
     
    -2016-01-09  Paul Eggert  
    +	* eww.el (eww-browse-url): Clean up code slightly.
     
    -	Fix (error ...) error
    +2016-02-01  Lars Ingebrigtsen  
     
    -	Problem reported by Glenn Morris in:
    -	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00561.html
    -	* lisp/vc/add-log.el (change-log-goto-source): Fix typos
    -	introduced in my Aug 28 change, where I got confused by the
    -	two meanings of (error ...).
    +	Don't insert nil faces in shr
     
    -2016-01-08  Alan Mackenzie  
    +	* shr.el (shr-insert-table): Don't add nil faces, because that
    +	will show up in *Messages* as "Invalid face reference: nil [32
    +	times]".
     
    -	Correctly analyze brace arguments in templated C++ function declarations.
    +2016-02-01  Glenn Morris  
     
    -	* lisp/progmodes/cc-defs.el (c-go-list-forward, c-go-list-backward): add
    -	POS and LIMIT parameters, like the other c-go-list-* functions have.
    +	Make find-change-log prefer a VCS root, if no ChangeLog exists.
     
    -	* lisp/progmodes/cc-engine.el (c-restore-<>-properties): Check backwards
    -	for a ?\( rather than a ?<.  (c-looking-at-inexpr-block): Handle names
    -	followed by template specifiers.
    +	* lisp/vc/add-log.el (change-log-directory-files): New option.
    +	(find-change-log): Respect change-log-directory-files.
    +	* doc/emacs/maintaining.texi (Change Log Commands):
    +	Mention change-log-directory-files.
     
    -2016-01-08  Glenn Morris  
    +2016-02-01  Glenn Morris  
     
    -	* lisp/cedet/mode-local.el (describe-function-orig-buffer): Declare.
    +	Improve the custom type of some user options.
     
    -	* lisp/ffap.el (ffap-latex-mode): Avoid free variable.
    +	* lisp/autoinsert.el (auto-insert-alist):
    +	* lisp/replace.el (query-replace-from-to-separator):
    +	* lisp/gnus/gnus-art.el (gnus-hidden-properties):
    +	* lisp/gnus/gnus-gravatar.el (gnus-gravatar-properties):
    +	* lisp/gnus/gnus-picon.el (gnus-picon-properties):
    +	* lisp/progmodes/prolog.el (prolog-keywords, prolog-types)
    +	(prolog-mode-specificators, prolog-determinism-specificators)
    +	(prolog-directives, prolog-program-name, prolog-program-switches)
    +	(prolog-consult-string, prolog-compile-string, prolog-eof-string)
    +	(prolog-prompt-regexp): Improve custom type.
     
    -2016-01-08  Mark Oteiza  
    +2016-02-01  Glenn Morris  
     
    -	* lisp/play/dunnet.el (dun-fix-screen): Avoid `end-of-buffer`.
    +	Mark some risky calendar variables.
     
    -2016-01-08  Alan Mackenzie  
    +	* lisp/calendar/cal-china.el (chinese-calendar-time-zone):
    +	Remove risky setting for deleted obsolete alias.
    +	(calendar-chinese-standard-time-zone-name)
    +	(calendar-chinese-daylight-saving-start)
    +	(calendar-chinese-daylight-saving-end):
    +	* lisp/calendar/calendar.el (calendar-iso-date-display-form)
    +	(calendar-european-date-display-form)
    +	(calendar-american-date-display-form, calendar-date-display-form):
    +	* lisp/calendar/diary-lib.el (diary-remind-message)
    +	(diary-header-line-format):
    +	* lisp/calendar/solar.el (calendar-time-display-form)
    +	(calendar-location-name): Mark as risky.
     
    -	Respect fontification region calculated by major mode.  Fixes bug #22316.
    +2016-02-01  Simen Heggestøyl  
     
    -	* lisp/font-lock.el (font-lock-extend-jit-lock-region-after-change): when a
    -	fontification region has been calculated by a function on
    -	font-lock-extend-after-change-region-function use this region rather than
    -	changing the end position to somewhere else.
    +	Highlight two additional SCSS keywords
     
    -2016-01-08  Eli Zaretskii  
    +	* lisp/textmodes/css-mode.el (css-bang-ids): New defconst holding CSS
    +	identifiers on the form !foo.
    +	(scss-bang-ids): New defconst holding SCSS identifiers on the form
    +	!foo.
    +	(css--font-lock-keywords): Highlight the new SCSS bang identifiers in
    +	`font-lock-builtin-face'.
     
    -	Improve documentation of Delete Selection mode
    +	* test/indent/css-mode.css: Add bang rule test case.
     
    -	* lisp/delsel.el (delete-selection-mode)
    -	(delete-selection-helper): Update and expand the doc strings.
    -	(Bug#22296)
    +	* test/indent/scss-mode.css: Add test cases for the introduced bang
    +	rules.
     
    -	* doc/emacs/mark.texi (Using Region): Document the behavior of
    -	delete commands in Delete Selection mode.  (Bug#22296)
    +2016-02-01  Karl Fogel  
     
    -	* doc/lispref/markers.texi (The Mark): Document how to add the
    -	support for Delete Selection mode to Lisp programs. (Bug#22296)
    +	Recommend enabling integrity-checking in git
     
    -2016-01-08  Dmitry Gutov  
    +	* admin/notes/git-workflow:  Recommend setting transfer.fsckObjects.
     
    -	Fix two project-find-file issues
    +	This is related to the autogen.sh changes made by Paul Eggert in
    +	commit d766ca8f (2016-02-01) and commit cedd7cad (2016-02-01), and to
    +	my edits today to http://www.emacswiki.org/emacs/GitForEmacsDevs and
    +	to emacswiki.org/emacs/GitQuickStartForEmacsDevs.  See also the thread
    +	"Recommend these .gitconfig settings for git integrity." at
    +	https://lists.gnu.org/archive/html/emacs-devel/2016-01/threads.html#01802.
     
    -	* lisp/progmodes/project.el (project--value-in-dir):
    -	Temporarily set enable-local-variables to :all.
    -	(project-find-file, project-or-external-find-file):
    -	All autoloads.
    -	(project--find-file-in): Require xref.
    +2016-02-01  Martin Rudalics  
     
    -2016-01-08  Eli Zaretskii  
    +	Some corrections in Elisp manual
     
    -	Clarify doc string of 'dired-current-directory'
    +	* doc/lispref/buffers.texi (Read Only Buffers): Describe optional
    +	argument POSITION.
    +	* doc/lispref/debugging.texi (Error Debugging): `debug-on-signal'
    +	is an option.
    +	* doc/lispref/display.texi (Refresh Screen): Describe optional
    +	argument FRAME of `redraw-frame'.
    +	(Attribute Functions): Describe optional argument CHARACTER of
    +	`face-font'.
    +	(Defining Images): `image-load-path' is an option.
    +	(Beeping): `ring-bell-function' is an option.
    +	* doc/lispref/frames.texi (Size and Position): The PIXELWISE
    +	argument of `set-frame-size' is optional.
    +	(Raising and Lowering): The TERMINAL argument of `tty-top-frame'
    +	is optional.
    +	* doc/lispref/keymaps.texi (Controlling Active Maps): Fix doc of
    +	`set-transient-map'.
    +	* doc/lispref/minibuf.texi (Text from Minibuffer):
    +	`read-regexp-defaults-function' is an option.
    +	(Minibuffer Contents): `delete-minibuffer-contents' is a command.
    +	* doc/lispref/modes.texi (Mode Line Variables):
    +	`mode-line-position' and `mode-line-modes' are variables, not
    +	options.
    +	* doc/lispref/strings.texi (Creating Strings): The START argument
    +	of `substring' is optional.
    +	* doc/lispref/text.texi (Buffer Contents): Describe optional
    +	argument NO-PROPERTIES of `thing-at-point'.
    +	(User-Level Deletion): Both arguments of
    +	`delete-trailing-whitespace' are optional.
    +	(Margins): Use @key{RET} instead of @kbd{RET}.
    +	* doc/lispref/windows.texi (Display Action Functions): Write
    +	non-@code{nil} instead of non-nil.
    +	(Choosing Window Options): The WINDOW arg of
    +	`split-window-sensibly' is optional.
    +	(Choosing Window Options): Write non-@code{nil} instead of
    +	non-nil.
    +	(Window Start and End): Both args of `window-group-end' are
    +	optional.
     
    -	* lisp/dired.el (dired-current-directory): Doc fix: clarify that
    -	the return value might not end in a slash when called with the
    -	optional argument non-nil.  (Bug#6273)
    +	* src/buffer.c (Fbarf_if_buffer_read_only): Rename argument POS
    +	to POSITION to keep consisteny with doc-string.
     
    -2016-01-08  Eli Zaretskii  
    +2016-02-01  Paul Eggert  
     
    -	Use the face of preceding text for displaying the ellipsis
    +	Double static heap size.
     
    -	* src/xdisp.c (setup_for_ellipsis): Use the face of the preceding
    -	text in it->saved_face_id for displaying the ellipsis, and ignore
    -	the face, if any, of the invisible text.  (Bug#22320)
    +	* src/sheap.h (STATIC_HEAP_SIZE): Double it, since it was too
    +	small on FreeBSD (Bug#22086).
     
    -2016-01-08  Michael Albinus  
    +2016-02-01  Paul Eggert  
     
    -	Suppress Chinese file name test for OSX in tramp-tests.el
    +	Chatter when autogen.sh changes Git configuration
     
    -	* test/automated/tramp-tests.el (tramp--test-utf8):
    -	Remove instrumentation.  Suppress Chinese file name test for OSX.
    +	* autogen.sh (git_config): New function.  Use it instead of ‘git config’.
     
    -2016-01-08  Glenn Morris  
    +2016-02-01  Kyle Meyer  
     
    -	* admin/admin.el (set-version): Also handle the NEWS file.
    +	* org/org-compat.el (org-font-lock-ensure): Fix bogus test (bug#22399)
     
    -2016-01-08  Dmitry Gutov  
    +2016-02-01  Michael Albinus  
     
    -	apropos-library: Skip obvious duplicates; don't error on generics
    +	Fix Bug#20821
     
    -	* lisp/apropos.el (apropos-library): Skip "was an autoload"
    -	entries, to avoid obvious duplicates.  For each cl-defmethod
    -	entry, take just its function symbol (bug#21422).
    +	* lisp/net/tramp.el (tramp-file-name-handler):
    +	* lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name):
    +	Use `tramp-drop-volume-letter'.  (Bug#20821)
     
    -2016-01-07  Dmitry Gutov  
    +2016-01-31  Paul Eggert  
     
    -	Add project-find-file and project-or-external-find-file
    +	Omit unnecessary history from Lisp intro
     
    -	* lisp/minibuffer.el (completion-category-defaults):
    -	Add `project-file' category.
    +	* doc/lispintro/emacs-lisp-intro.texi (Review, Digression into C)
    +	(Conclusion): Reword so as not to talk about earlier versions
    +	of Emacs in what should be an intro.
     
    -	* lisp/progmodes/project.el (project-find-file)
    -	(project-or-external-find-file): New commands.
    -	(project--find-file-in): New private function.
    +2016-01-31  Paul Eggert  
     
    -	* lisp/progmodes/xref.el (xref-collect-matches): Use
    -	`expand-file-name' on DIR, to expand the tildes.
    -	(xref--find-ignores-arguments): Extract from
    -	`xref--rgrep-command'.
    +	* etc/HISTORY: Add some more history, plus git tags.
     
    -2016-01-07  Leo Liu  
    +2016-01-31  Paul Eggert  
     
    -	Add defvar-local to lisp-imenu-generic-expression
    +	Improve elisp “Security Considerations” doc
     
    -	* lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): Add
    -	  defvar-local.
    +	* doc/lispref/os.texi (Security Considerations):
    +	Mention call-process and rename-file as opposed to shell commands.
    +	Add some more cross-references.
     
    -2016-01-07  Leo Liu  
    +2016-01-31  Paul Eggert  
     
    -	Revert commit b1e3d14845517bfa9fa5d6d3840f3ab3160306fd
    +	autogen.sh now arranges for git to check hashes
     
    -	* lisp/emacs-lisp/easy-mmode.el (define-minor-mode):
    -	  Don't declare (indent 1).
    +	Suggested by Karl Fogel in:
    +	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01802.html
    +	* autogen.sh: Do "git config transfer.fsckObjects true".
     
    -2016-01-07  Glenn Morris  
    +2016-01-31  Dave Barker  
     
    -	* lisp/emacs-lisp/autoload.el (autoload-find-destination): Doc fix.
    +	Add ability to give rcirc servers an alias name
     
    -2016-01-07  Glenn Morris  
    +	* lisp/net/rcirc.el (rcirc-server-alist): Add :server-alias
    +	customization option.
    +	(rcirc, rcirc-connect): Take server alias into account.
     
    -	* lisp/emacs-lisp/autoload.el (autoload-find-destination):
    +2016-01-31  Paul Eggert  
     
    -	Avoid specifying the length of a time object (it has not been "2"
    -	for some time).
    +	Fix (c & 040) typo in emergency escapes
     
    -2016-01-06  Andreas Schwab  
    +	* src/keyboard.c (handle_interrupt): Fix recently-introduced
    +	typo (040 should have been ~040) that silently suppressed
    +	auto-saves after emergency escapes.  Redo comparison to avoid
    +	similar problems.
     
    -	Properly encode/decode base64Binary data in SOAP
    +2016-01-31  Paul Eggert  
     
    -		* lisp/net/soap-client.el (soap-encode-xs-basic-type): Encode
    -		base64Binary value as utf-8.
    -		(soap-decode-xs-basic-type): Decode base64Binary value as utf-8.
    +	Port new hybrid malloc to FreeBSD
     
    -2016-01-06  Eli Zaretskii  
    +	Problem reported by Wolfgang Jenkner in: http://bugs.gnu.org/22086#118
    +	* src/gmalloc.c (__malloc_initialize_hook, __after_morecore_hook)
    +	(__morecore) [HYBRID_MALLOC]: Define in this case too.
     
    -	Obey coding-system-for-write when writing stdout/stderr in batch
    +2016-01-31  Wolfgang Jenkner  
     
    -	* src/print.c (printchar_to_stream):
    -	* src/xdisp.c (message_to_stderr): If coding-system-for-write has
    -	a non-nil value, use it to encode output in preference to
    -	locale-coding-system.  See the discussions in
    -	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00048.html
    -	for the details.
    +	* configure.ac: Stop using mmap for buffers for FreeBSD.
     
    -	* doc/lispref/os.texi (Terminal Output): Document how to send
    -	non-ASCII text via 'send-string-to-terminal'.
    -	(Batch Mode): Document how text written to standard streams is
    -	encoded.  Fix inaccuracy regarding which output streams are used
    -	by output functions in batch mode.
    +2016-01-31  Eli Zaretskii  
     
    -2016-01-06  Xue Fuqiao  
    +	Fix display of overlay strings with 'display' and 'box' property
     
    -	* doc/misc/efaq.texi (Packages that do not come with Emacs):
    -	Update the URI of MELPA and marmalade-repo.  Reported by CHENG Gao
    -	 in
    -	https://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00390.html.
    +	* src/xdisp.c (get_next_display_element): Take the box face from
    +	display stack level that comes from a buffer, not an overlay
    +	string.  (Bug#22499)
     
    -2016-01-06  Maksim Golubev    (tiny change)
    +2016-01-31  Andreas Schwab  
     
    -	* lisp/progmodes/opascal.el (opascal-mode-syntax-table):
    +	Fix imap-starttls-open
     
    -	Fix backslash.  (Bug#22224)
    +	* lisp/net/imap.el (imap-starttls-open): Log imap process
    +	output.  Call imap-parse-greeting.  (Bug#22500)
     
    -2016-01-06  Federico Beffa    (tiny change)
    +2016-01-31  Michael Albinus  
     
    -	* lisp/progmodes/xscheme.el (xscheme-prompt-for-expression-exit):
    +	Merge changes from Tramp repository
     
    -	Make it actually work.  (Bug#22265)
    +	* doc/misc/Makefile.in (${buildinfodir}/tramp.info tramp.html):
    +	No EXTRA_OPTS needed.
     
    -2016-01-05  Alan Mackenzie  
    +	* doc/misc/tramp.texi: Merge changes from Emacsemacs-25
    +	branch, especially for @trampfn{}.
    +	(Top): Move @ifnottex down.
    +	(History): XEmacs support has been removed.
    +	(GVFS based methods, Remote processes): Do not use emacsgvfs flag.
    +	(Auto-save and Backup): Use both syntax versions.
    +	(File name Syntax): Remark on IPv6 adresses is valid for
    +	unified syntax only.
     
    -	Remove function wrongly on AWK Mode value of context fontification hook.
    +	* doc/misc/trampver.texi: Do not set emacsgvfs flag.
     
    -	* lisp/progmodes/cc-langs.el (c-before-context-fontification-functions):
    -	swap order of entries so that awk's entry isn't superseded by the default.
    +2016-01-31  Andreas Schwab  
     
    -	* lisp/progmodes/cc-mode.el (c-before-context-fl-expand-region): Correct
    -	to handle nil value of c-before-context-fontification-functions.
    +	Fix return value of imap-starttls-open
     
    -2016-01-05  Paul Eggert  
    +	* lisp/net/imap.el (imap-starttls-open): Fix return value.
     
    -	* src/buffer.c: Stick with ASCII in doc string.
    +2016-01-31  John Wiegley  
     
    -2016-01-05  Paul Eggert  
    +	Correct reference to DARWIN_OS preprocessor symbol
     
    -	Reword transient-mark-mode doc string
    +	* src/alloc.c: Correct a preprocessor reference to DARWIN_OS, which may
    +	  not be defined.
     
    -	* src/buffer.c (syms_of_buffer): Reword doc string to avoid confusion.
    -	The value 'lambda (literally) can be interpreted as (quote lambda),
    -	which is not intended here; we want just the lambda symbol.
    +2016-01-30  Paul Eggert  
     
    -2016-01-05  Eli Zaretskii  
    +	Spelling fixes
     
    -	Update doc string of 'selective-display'
    +	Spelling fix
     
    -	* src/buffer.c (syms_of_buffer) : Say that
    -	using it with the value of 't' is obsolete.  (Bug#1092)
    +	Spelling fixes
     
    -2016-01-05  Alan Mackenzie  
    +2016-01-30  Glenn Morris  
     
    -	Make C++ buffers writeable when writing their initial text properties.
    +	* lisp/vc/add-log.el (find-change-log): Use locate-dominating-file.
     
    -	This is a correction to yesterday's CC Mode patch.
    +2016-01-30  Matthew Carter  
     
    -	* lisp/progmodes/cc-engine.el (c-before-change-check-<>-operators): Put
    -	c-save-buffer-state around the function rather than a mere `let'.
    +	Quote table names for postgres listings (sql-mode)
     
    -2016-01-05  Michael Albinus  
    +	* lisp/progmodes/sql.el (sql-postgres-completion-object): Avoid passing
    +	  unquoted table names to the completion list.
     
    -	Additional changes for "make check-expensive"
    +2016-01-30  Glenn Morris  
     
    -	* CONTRIBUTE : Encourage use of ":tags '(:expensive-test)".
    -	Explain make target `check-expensive'.
    +	Change Smerge "Mine" and "Other" for "Upper" and "Lower.  (Bug#20878)
    +
    +	* lisp/vc/smerge-mode.el (smerge-diff-switches)
    +	(smerge-context-menu, smerge-match-conflict, smerge-swap): Doc fixes.
    +	(smerge-upper, smerge-upper-face, smerge-keep-upper)
    +	(smerge-diff-base-upper): Rename from smerge-mine, smerge-mine-face,
    +	smerge-keep-mine, smerge-diff-base-mine.  Update all uses.
    +	(smerge-mine-face, smerge-other-face): Remove obsolete face aliases.
    +	(smerge-lower, smerge-lower-face, smerge-lower-re, smerge-keep-lower)
    +	(smerge-diff-base-lower): Rename from smerge-other, smerge-other-face,
    +	smerge-other-re, smerge-keep-other, smerge-diff-base-lower.
    +	Update all uses.
    +	(smerge-basic-map): Add "l" and "u" bindings.
    +	(smerge-mode-menu): Update menu bindings for renaming.
    +	(smerge-font-lock-keywords): Update face names.
    +	(smerge-match-names): Update names.
    +	(smerge-diff-upper-lower): Rename from smerge-diff-mine-other.
    +	(smerge-match-conflict, smerge-ediff): Rename local variables.
    +	(smerge-makeup-conflict): Relabel markers.
    +	(smerge-parsep-re): Use renamed variables.
     
    -	* etc/NEWS: Mention new make target `check-expensive'.
    +2016-01-30  Paul Eggert  
     
    -	* test/automated/Makefile.in (check-doit): New target.
    -	(check, check-expensive): Use it.
    +	Port recent my_edata change to MS-Windows
     
    -2016-01-04  Alan Mackenzie  
    +	* src/lastfile.c (my_edata): Also define if WINDOWSNT.
     
    -	Apply text properties for <, > in new after-change function (C++ Java Modes).
    +2016-01-30  Paul Eggert  
     
    -	These are category/syntax-table properties to give < and > paren syntax.
    -	Also apply certain `c-type' text properties to the insides of <..> constructs
    -	to ensure that identifiers contained by them get fontified.  This patch fixes
    -	bug #681.
    +	Pacify GCC on C library without glibc API
     
    -	* lisp/progmodes/cc-cmds.el (c-electric-lt-gt): Reformulate due to new
    -	after-change action.
    +	Without this change, with --enable-gcc-warnings GCC would complain
    +	“error: redundant redeclaration of ‘aligned_alloc’”.
    +	* configure.ac: Simplify aligned_alloc testing.
    +	* src/alloc.c (aligned_alloc): Don’t use if DARWIN_OS,
    +	since the simplified configure.ac no longer checks for that.
    +	Don’t declare if HAVE_ALIGNED_ALLOC.
    +	Correct misspelling of HAVE_ALIGNED_ALLOC in ifdef.
     
    -	* lisp/progmodes/cc-engine.el (c-before-change-check-<>-operators): Expand
    -	change region to include s which might not be already marked as
    -	parens, rather than just when paren text properties are removed.
    -	(c-restore-<>-properties): New after-change function, which applies text
    -	properties marking < and > with paren syntax.
    +2016-01-30  Paul Eggert  
     
    -	* lisp/progmodes/cc-fonts.el (c-font-lock-declarations): Ensure `c-type'
    -	properties are applied to the interiors of <...> constructs, to ensure
    -	fontification of identifiers there.
    +	Tell Automake the new lib/Makefile.am is OK
     
    -	* lisp/progmodes/cc-langs.el (c-before-font-lock-functions): Add
    -	c-restore-<>-properties to this list for C++ and Java.
    +	* lib/Makefile.am (AUTOMAKE_OPTIONS): Add -Wno-portability.
     
    -	* lisp/progmodes/cc-mode.el (c-common-init): When invoking
    -	c-before-font-lock-functions, exclude c-restore-<>-properties from the
    -	functions invoked.
    -	(c-before-change): Initialize c-new-BEG/END here (rather than c-after-change)
    -	to allow modification by before-change functions.
    -	(c-after-change): Amend c-new-END here, rather than initializing it and
    -	c-new-BEG.
    +2016-01-30  Paul Eggert  
     
    -2016-01-04  Michael Albinus  
    +	Make it easy to override preferred-branch test
     
    -	Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25
    +	* Makefile.in (preferred-branch-is-current):
    +	Rename from emacs-25-branch-is-current.  All uses changed.
    +	(PREFERRED_BRANCH): New macro.
     
    -2016-01-04  Michael Albinus  
    +2016-01-30  Glenn Morris  
     
    -	Introduce check-expensive tests.
    +	* lisp/net/browse-url.el (browse-url-default-browser):
    +	Lower priority of non-free Chrome.
     
    -	* Makefile.in (check-expensive):
    -	* test/automated/Makefile.in (check-expensive): New target.
    +2016-01-30  Glenn Morris  
     
    -	* test/automated/auto-revert-tests.el
    -	(auto-revert-test01-auto-revert-several-files):
    -	* test/automated/file-notify-tests.el (file-notify--deftest-remote):
    -	* test/automated/tramp-tests.el (tramp-test26-process-file)
    -	(tramp-test27-start-file-process, tramp-test28-shell-command)
    -	(tramp-test29-vc-registered)
    -	(tramp-test31-special-characters-with-stat)
    -	(tramp-test31-special-characters-with-perl)
    -	(tramp-test31-special-characters-with-ls)
    -	(tramp-test32-utf8-with-stat, tramp-test32-utf8-with-perl)
    -	(tramp-test32-utf8-with-ls, tramp-test33-asynchronous-requests)
    -	(tramp-test35-unload): Tag the tests as :expensive-test.
    +	Improve the custom type of some user options.
     
    -2016-01-04  Lars Magne Ingebrigtsen  
    +	* lisp/desktop.el (desktop-minor-mode-table):
    +	* lisp/man.el (Man-frame-parameters):
    +	* lisp/midnight.el (midnight-delay):
    +	* lisp/speedbar.el (speedbar-select-frame-method):
    +	* lisp/tooltip.el (tooltip-frame-parameters):
    +	* lisp/tree-widget.el (tree-widget-space-width):
    +	* lisp/type-break.el (type-break-keystroke-threshold):
    +	* lisp/woman.el (woman-imenu-generic-expression):
    +	* lisp/cedet/ede.el (ede-debug-program-function):
    +	* lisp/cedet/ede/project-am.el (project-am-debug-target-function):
    +	* lisp/emulation/viper-keym.el (viper-toggle-key):
    +	* lisp/erc/erc-networks.el (erc-server-alist):
    +	* lisp/gnus/message.el (message-deletable-headers, message-signature):
    +	* lisp/mail/mailalias.el (mail-directory-stream):
    +	* lisp/play/tetris.el (tetris-x-colors):
    +	* lisp/progmodes/gud.el (gud-tooltip-modes): Improve custom type.
     
    -	shr-tag-video bug fix
    +2016-01-30  Simen Heggestøyl  
     
    -	* shr.el (shr-tag-video): Protect against the `poster' being
    -	empty.
    +	Highlight CSS variables with variable name face
     
    -2016-01-04  Michael Albinus  
    +	* lisp/textmodes/css-mode.el (css-nmstart-re): Don't match variables.
    +	(css--font-lock-keywords): Highlight variables in
    +	`font-lock-variable-name-face'.
     
    -	Minor fixes in tramp-tests.el
    +2016-01-30  Glenn Morris  
     
    -	* test/automated/tramp-tests.el (tramp-test26-process-file):
    -	Move point properly.
    -	(tramp-test29-vc-registered): Work with relative file names.
    +	* lisp/gnus/gnus-kill.el (gnus-winconf-kill-file): Not user-serviceable.
     
    -2016-01-04  Eli Zaretskii  
    +2016-01-30  Glenn Morris  
     
    -	Ensure redisplay when 'truncate-lines' is set
    +	Mark some user options that can get evalled as risky.
     
    -	* lisp/frame.el (redisplay--variables): Add 'truncate-lines'.
    -	(Bug#22303)
    +	* lisp/allout.el (allout-title):
    +	* lisp/emacs-lisp/edebug.el (edebug-global-break-condition):
    +	* lisp/gnus/message.el (message-mailer-swallows-blank-line):
    +	* lisp/progmodes/gud.el (gud-tooltip-display):
    +	* lisp/vc/ediff-mult.el (ediff-default-filtering-regexp):
    +	Mark as risky.
     
    -2016-01-04  Eli Zaretskii  
    +2016-01-30  Eli Zaretskii  
     
    -	Fix a doc string of 'transient-mark-mode'
    +	Disable DebPrint in sys_read on MS-Windows
     
    -	* src/buffer.c (syms_of_buffer) : Prevent
    -	"lambda" in doc string from becoming a link to lambda expressions.
    +	* src/w32.c (sys_read): Disable a debugging print that is normal
    +	when non-blocking reads are retried.
     
    -2016-01-04  Eli Zaretskii  
    +2016-01-30  Martin Rudalics  
     
    -	MS-Windows followup to latest gnulib update
    +	;Fix ChangeLog entry
     
    -	* nt/gnulib.mk (EXTRA_DIST): Add ignore-value.h.
    +2016-01-30  Eli Zaretskii  
     
    -2016-01-04  Paul Eggert  
    +	Fix typos in Introduction to Emacs Lisp manual
     
    -	Spelling fix
    +	* doc/lispintro/emacs-lisp-intro.texi (Emacs Initialization)
    +	(kill-new function, Digression into C)
    +	(Complete forward-sentence, Divide and Conquer, Find a File)
    +	(lengths-list-many-files, Columns of a graph, defcustom)
    +	(recursive-count-words): Fix typos.  Reported by Daniel Bastos
    +	.
     
    -2016-01-04  Jens Lechtenboerger  
    +2016-01-30  Paul Eggert  
     
    -	Do secure signed Bcc handling
    +	Shrink static heap a bit
     
    -	* lisp/gnus/message.el (message-send): Do secure signed Bcc handling
    -	(bug#18718).
    +	* src/sheap.h: Include lisp.h, for Lisp_Object.
    +	(STATIC_HEAP_SIZE): Now an enum constant, not a macro.
    +	Make it 2 MiB * sizeof (Lisp_Object), which is a bit more
    +	conservative than the old value.
    +	(Bug#22086)
     
    -2016-01-04  Paul Eggert  
    +2016-01-30  Paul Eggert  
     
    -	Avoid stdio in SIGINT handler
    +	Fix extern symbols defined and not used
     
    -	* admin/merge-gnulib (GNULIB_MODULES): Add ignore-value.
    -	* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
    -	* lib/ignore-value.h: New file, from gnulib.
    -	* src/keyboard.c: Include it.
    -	(write_stdout, read_stdin): New functions.
    -	(handle_interrupt): Use them instead of printf and getchar,
    -	and avoid fflush when handling signals.
    +	* src/alloc.c: Always include .
    +	(malloc_warning) [!SIGDANGER && (SYSTEM_MALLOC || HYBRID_MALLOC)]:
    +	Do not define; unused.
    +	* src/emacs.c, src/lisp.h (might_dump) [!DOUG_LEA_MALLOC]: Now static.
    +	* src/gmalloc.c (gdefault_morecore): Rename from __default_morecore,
    +	to avoid collision with glibc.  Now static.  All uses changed.
    +	* src/lastfile.c (my_edata): Define only if
    +	((!defined SYSTEM_MALLOC && !defined HYBRID_MALLOC && !defined
    +	WINDOWSNT) \ || defined CYGWIN || defined DARWIN_OS).
    +	(Bug#22086)
     
    -2016-01-04  Paul Eggert  
    +2016-01-30  Paul Eggert  
     
    -	* doc/misc/texinfo.tex: Revert unwanted copyright change.
    +	Build lib/e-*.o only on platforms that need it
    +
    +	* configure.ac (hybrid malloc): Simplify configuration.
    +	(SHEAP_OBJ): Remove; no longer needed.
    +	(HYBRID_MALLOC): New var. Subst it.
    +	(HYBRID_MALLOC_LIB): New Automake conditional.
    +	* lib/Makefile.am (noinst_LIBRARIES): Add libegnu.a only if
    +	HYBRID_MALLOC_LIB.
    +	(libegnu_a_CPPFLAGS): Omit AM_CPPFLAGS; not needed.
    +	(MOSTLYCLEANFILES): Add libegnu.a.
    +	* src/Makefile.in (SHEAP_OBJ): Remove.
    +	(HYBRID_MALLOC): New macro.
    +	(base_obj): Use it to conditionally add sheap.o.
    +	(LIBEGNU_ARCHIVE): New macro.
    +	($(LIBEGNU_ARCHIVE)): New rule, replacing $(lib)/libegnu.a.
    +	All uses of the latter replaced by the former.
    +	* src/alloc.c (USE_ALIGNED_ALLOC): Simplify configuration.
    +	Correct misspelling ALIGNED_ALLOC to HAVE_ALIGNED_ALLOC.
    +	* src/gmalloc.c: Update comment.
    +	* src/lisp.h (aligned_alloc)
    +	[!DOUG_LEA_MALLOC && !HYBRID_MALLOC && !SYSTEM_MALLOC]:
    +	New decl.
    +	(Bug#22086)
     
    -2016-01-03  Artur Malabarba  
    +2016-01-30  Paul Eggert  
     
    -	* lisp/align.el (align): Simplify a lambda
    +	Include  when advisable
    +
    +	This should help insulate us better from future glibc changes.
    +	It is good hygiene to include .h files for APIs that Emacs uses.
    +	Fix type clashes between Emacs and GNU  (Bug#22086).
    +	* configure.ac: Check for malloc.h.
    +	* src/alloc.c: Include  depending on HAVE_MALLOC_H,
    +	not on DOUG_LEA_MALLOC.
    +	* src/emacs.c, src/gmalloc.c (malloc_enable_thread):
    +	Remove decl (now in lisp.h).
    +	* src/gmalloc.c: Include stddef.h earlier, for ptrdiff_t.
    +	[emacs]: Include lisp.h.
    +	[HAVE_MALLOC_H]: Include .
    +	(__MALLOC_HOOK_VOLATILE): New macro, if not already defined.
    +	(__after_morecore_hook, __malloc_initialize_hook, __morecore)
    +	(__default_morecore):
    +	[!HAVE_MALLOC_H]: New decls near non-inclusion of .
    +	(calloc): Make it clear that the macro should not be used.
    +	Remove unused decl.
    +	(malloc_info): New macro, to avoid clash with glibc .
    +	(__morecore, __default_morecore, __after_morecore_hook)
    +	(__malloc_extra_blocks, __malloc_initialize_hook, __free_hook)
    +	(__malloc_hook, __realloc_hook, __memalign_hook, memory_warnings):
    +	Remove later decls.
    +	(gmalloc_hook, gfree_hook, grealloc_hook):
    +	Rename from __malloc_hook, __free_hook, __realloc_hook to
    +	avoid type collision with glibc .  All uses changed.
    +	(gmalloc_hook):
    +	(__malloc_extra_blocks) [DOUG_LEA_MALLOC||HYBRID_MALLOC||SYSTEM_MALLOC]:
    +	Now static.
    +	(gmalloc_hook, __malloc_extra_blocks): Define even if [!HYBRID_MALLOC].
    +	(__malloc_initialize_hook, __after_morecore_hook):
    +	Declare with types compatible with glibc.
    +	(__memalign_hook, hybrid_calloc) [HYBRID_MALLOC]:
    +	Remove.  All uses removed.
    +	* src/lisp.h (__malloc_extra_blocks, malloc_enable_thread): New decls.
    +	* src/ralloc.c, src/vm-limit.c:
    +	Simplify includes and include  if available.
     
    -	* lisp/align.el (align): Fix arg order in call to `align-region'
    +2016-01-30  Paul Eggert  
     
    -2016-01-03  Eli Zaretskii  
    +	* src/alloc.c: Include "sheap.h".
     
    -	Fix compilation next-error in buffers with selective-display
    +	(alloc_unexec_pre, alloc_unexec_post) [HYBRID_MALLOC]:
    +	Set and clear bss_sbrk_did_unexec, on all platforms not just Cygwin.
    +	* src/lisp.h (alloc_unexec_pre, alloc_unexec_post) [!DOUG_LEA_MALLOC]:
    +	Declare unconditionally.
    +	* src/unexcw.c, src/unexelf.c (bss_sbrk_did_unexec): Remove decl.
    +	(unexec): Don’t set or clear bss_sbrk_did_unexec;
    +	the caller now does this.
    +	(Bug#22086)
     
    -	* lisp/progmodes/compile.el (compilation-beginning-of-line): New
    -	function.
    -	(compilation-internal-error-properties)
    -	(compilation-next-error-function, compilation-set-window): Use
    -	it.  (Bug#1092)
    +2016-01-30  Paul Eggert  
     
    -2016-01-03  Lars Magne Ingebrigtsen  
    +	Pacify --enable-gcc-warnings when HYBRID_MALLOC
     
    -	* lisp/net/nsm.el (nsm-check-protocol): Fix typo in the message.
    +	* src/buffer.c (init_buffer):
    +	* src/emacs.c (main):
    +	* src/xsmfns.c (smc_save_yourself_CB, x_session_initialize):
    +	Use emacs_get_current_dir_name, not get_current_dir_name.
    +	* src/conf_post.h (aligned_alloc) [HYBRID_MALLOC && emacs]: New macro.
    +	(HYBRID_GET_CURRENT_DIR_NAME, get_current_dir_name): Remove.
    +	* src/emacs.c: Include "sheap.h".
    +	(report_sheap_usage): Remove decl.
    +	(Fdump_emacs) [HYBRID_MALLOC]: Report usage directly.
    +	Don't assume ptrdiff_t can be printed as int.
    +	* src/gmalloc.c [HYBRID_MALLOC]:
    +	Include "sheap.h" rather than declaring its contents by hand.
    +	(get_current_dir_name, gget_current_dir_name)
    +	(hybrid_get_current_dir_name): Remove.
    +	(emacs_abort): Remove duplicate decl.
    +	(aligned_alloc): Undef, like malloc etc.
    +	(ALLOCATED_BEFORE_DUMPING): Now a static function, not a macro.
    +	Make it a bit more efficient.
    +	(malloc_find_object_address): Remove unused decl.
    +	(enum mcheck_status, mcheck, mprobe, mtrace, muntrace, struct mstats)
    +	(mstats, memory_warnings): Declare only if GC_MCHECK.
    +	* src/lisp.h (emacs_get_current_dir_name):
    +	New decl, replacing get_current_dir_name.
    +	* src/sheap.c: Include sheap.h first.
    +	(STATIC_HEAP_SIZE): Remove; now in sheap.h.
    +	(debug_sheap): Now static.
    +	(bss_sbrk_buffer_end): Remove; no longer used.
    +	(bss_sbrk_ptr): Now static and private.
    +	(bss_sbrk_did_unexec): Now bool.
    +	(BLOCKSIZE): Remove, to avoid GCC warning about its not being used.
    +	(bss_sbrk): Don't treat request_size 0 as special, since the code
    +	works without this being a special case.
    +	Avoid overflow if request size exceeds INT_MAX.
    +	(report_sheap_usage): Remove; now done in emacs.c.
    +	* src/sheap.h: New file.
    +	* src/sysdep.c (get_current_dir_name): Remove macro.
    +	Include "sheap.h".
    +	(emacs_get_current_dir_name): Rename function from
    +	get_current_dir_name.  Handle HYBRID_MALLOC here;
    +	this is simpler.
    +	(Bug#22086)
     
    -2016-01-03  Lars Magne Ingebrigtsen  
    +2016-01-30  Paul Eggert  
     
    -	Add SHA1 warnings for high network security settings
    +	Report static heap usage on non-Cygwin, too
     
    -	* lisp/net/nsm.el (nsm-check-protocol): When using high security, warn
    -	about SHA1 certificates, which are now believed to be open to
    -	spoofing.
    +	* src/emacs.c (Fdump_emacs) [HYBRID_MALLOC]: Report sheap usage here ...
    +	* src/unexcw.c (unexec): ... instead of here, since sheap can be used
    +	on platforms other than Cygwin (Bug#22086).
     
    -2016-01-03  Jens Lechtenboerger  
    +2016-01-30  Paul Eggert  
     
    -	Refactor mml-smime.el, mml1991.el, mml2015.el
    +	Pacify GCC on extern decls
     
    -	(Maybe this is the last merge from Gnus git to Emacs git)
    +	* src/unexelf.c (bss_sbrk_did_unexec): Move decl to top level
    +	to pacify recent GCC (Bug#22086).
     
    -	Cf. discussion on ding mailing list, messages in
    -	.
    -	Common code from the three files mml-smime.el, mml1991.el, and
    -	mml2015.el is moved to mml-sec.el.  Auxiliary functions are added
    -	to gnus-util.el.
    +2016-01-30  Wolfgang Jenkner  
     
    -	The code is supported by test cases with necessary test keys.
    +	Add musl patch to support HYBRID_MALLOC on elf systems
     
    -	Documentation in message.texi is updated.
    +	* src/gmalloc.c: Adjust for HYBRID_MALLOC in the non CYGWIN case.
    +	(__default_morecore): Here, in particular.
    +	* configure.ac: Define HYBRID_MALLOC when unexelf.o is used.
    +	New variable SHEAP_OBJ.
    +	* src/Makefile.in: Use it.
    +	(Bug#22086)
     
    -	* doc/misc/message.texi (Security, Using S/MIME):
    -	Update for refactoring mml-smime.el, mml1991.el, mml2015.el.
    -	(Using OpenPGP): Rename from "Using PGP/MIME"; update contents.
    -	(Passphrase caching, Encrypt-to-self, Bcc Warning): New sections.
    +2016-01-30  Rich Felker    (tiny change)
     
    -	* lisp/gnus/gnus-util.el (gnus-test-list, gnus-subsetp, gnus-setdiff):
    -	New functions.
    +	unexelf.c hook to support HYBRID_MALLOC on ELF
     
    -	* lisp/gnus/mml-sec.el: Require gnus-util and epg.
    -	(epa--select-keys): Autoload.
    -	(mml-signencrypt-style-alist, mml-secure-cache-passphrase): Doc fix.
    -	(mml-secure-openpgp-signers): New user option;
    -	make mml1991-signers and mml2015-signers obsolete aliases to it.
    -	(mml-secure-smime-signers): New user option;
    -	make mml-smime-signers an obsolete alias to it.
    -	(mml-secure-openpgp-encrypt-to-self): New user option;
    -	make mml1991-encrypt-to-self and mml2015-encrypt-to-self obsolete
    -	aliases to it.
    -	(mml-secure-smime-encrypt-to-self): New user option;
    -	make mml-smime-encrypt-to-self an obsolete alias to it.
    -	(mml-secure-openpgp-sign-with-sender): New user option;
    -	make mml2015-sign-with-sender an obsolete alias to it.
    -	(mml-secure-smime-sign-with-sender): New user option;
    -	make mml-smime-sign-with-sender an obsolete alias to it.
    -	(mml-secure-openpgp-always-trust): New user option;
    -	make mml2015-always-trust an obsolete alias to it.
    -	(mml-secure-fail-when-key-problem, mml-secure-key-preferences):
    -	New user options.
    -	(mml-secure-cust-usage-lookup, mml-secure-cust-fpr-lookup)
    -	(mml-secure-cust-record-keys, mml-secure-cust-remove-keys)
    -	(mml-secure-add-secret-key-id, mml-secure-clear-secret-key-id-list)
    -	(mml-secure-cache-passphrase-p, mml-secure-cache-expiry-interval)
    -	(mml-secure-passphrase-callback, mml-secure-check-user-id)
    -	(mml-secure-secret-key-exists-p, mml-secure-check-sub-key)
    -	(mml-secure-find-usable-keys, mml-secure-select-preferred-keys)
    -	(mml-secure-fingerprint, mml-secure-filter-keys)
    -	(mml-secure-normalize-cust-name, mml-secure-select-keys)
    -	(mml-secure-select-keys-1, mml-secure-signer-names, mml-secure-signers)
    -	(mml-secure-self-recipients, mml-secure-recipients)
    -	(mml-secure-epg-encrypt, mml-secure-epg-sign): New functions.
    +	* src/unexelf.c (unexec) [HYBRID_MALLOC]:
    +	Define bss_sbrk_did_unexec (Bug#22086).
     
    -	* lisp/gnus/mml-smime.el: Require epg;
    -	refactor declaration and autoloading of epg functions.
    -	(mml-smime-use): Doc fix.
    -	(mml-smime-cache-passphrase, mml-smime-passphrase-cache-expiry):
    -	Obsolete.
    -	(mml-smime-get-dns-cert, mml-smime-get-ldap-cert):
    -	Use format instead of gnus-format-message.
    -	(mml-smime-epg-secret-key-id-list): Remove variable.
    -	(mml-smime-epg-passphrase-callback, mml-smime-epg-find-usable-key)
    -	(mml-smime-epg-find-usable-secret-key): Remove functions.
    -	(mml-smime-epg-sign, mml-smime-epg-encrypt): Refactor.
    +2016-01-30  Wolfgang Jenkner  
     
    -	* lisp/gnus/mml1991.el (mml1991-cache-passphrase)
    -	(mml1991-passphrase-cache-expiry): Obsolete.
    -	(mml1991-epg-secret-key-id-list): Remove variable.
    -	(mml1991-epg-passphrase-callback, mml1991-epg-find-usable-key)
    -	(mml1991-epg-find-usable-secret-key): Remove functions.
    -	(mml1991-epg-sign, mml1991-epg-encrypt): Refactor.
    +	Link temacs with gnulib compiled with -Demacs
     
    -	* lisp/gnus/mml2015.el (mml2015-cache-passphrase)
    -	(mml2015-passphrase-cache-expiry): Obsolete.
    -	(mml2015-epg-secret-key-id-list): Remove variable.
    -	(mml2015-epg-passphrase-callback, mml2015-epg-check-user-id)
    -	(mml2015-epg-check-sub-key, mml2015-epg-find-usable-key)
    -	(mml2015-epg-find-usable-secret-key): Remove functions.
    -	(mml2015-epg-decrypt, mml2015-epg-clear-decrypt, mml2015-epg-sign)
    -	(mml2015-epg-encrypt): Refactor.
    +	This is done to support HYBRID_MALLOC, since some static variables
    +	(e.g., last_environ in putenv.c) hold pointers to memory malloced
    +	before dumping (Bug#22086).
    +	* lib/Makefile.am: Add incantation to install libegnu.a.
    +	* src/Makefile.in ($(lib)/libgnu.a): Replace with libegnu.a
    +	(temacs$(EXEEXT)): Use it.
     
    -2016-01-02  Glenn Morris  
    +2016-01-30  Wolfgang Jenkner  
     
    -	* lisp/progmodes/fortran.el (fortran-make-syntax-propertize-function):
    +	Internal linkage for gmalloc etc. if HYBRID_MALLOC
     
    -	Explicitly ignore case.  (Bug#22262)
    +	This avoids clashes with symbols if the after-dump malloc is
    +	derived from Doug Lea's implementation (Bug#22086).
     
    -2016-01-02  Stefan Monnier  
    +	* src/gmalloc.c (emacs_abort, __morecore, __default_morecore):
    +	Move declarations up.  For HYBRID_MALLOC, turn all `extern'
    +	declarations below to `static' ones.
    +	(aligned_alloc): Declare for !MSDOS as well.
    +	(heapsize, _fraghead): Move resp. copy declaration downwards.
    +	For HYBRID_MALLOC, conditionalize out the other definitions,
    +	since the previous `static' declarations double as tentative
    +	definitions, anyway.
    +	(_malloc, _free, _realloc, __free_hook, _aligned_blocks)
    +	(__realloc_hook, __memalign_hook): Conditionalize out.
    +	(cfree, memalign, valloc): Ditto.
     
    -	(semantic-symref-derive-find-filepatterns): Return a list
    +2016-01-30  Paul Eggert  
     
    -	* lisp/cedet/semantic/symref/grep.el
    -	(semantic-symref-derive-find-filepatterns): Return a list.
    -	(semantic-symref-perform-search): Quote the result here once and for all.
    +	Merge from origin/emacs-25
     
    -2016-01-02  Eli Zaretskii  
    +	3f481ad Rename xref-query-replace to xref-query-replace-in-results
    +	62f4ed4 Update cl-defgeneric and cl-defmethod docstrings
    +	2111e0e Comment out next-error-function integration in xref
    +	4e11ad3 Correct a use of "which" in intro.texi
    +	a1865bc Distinguish the two meanings of Java's keyword "default".  Fixes bug #22358.
    +	76045f7 Don't operate on menu bar of nonexistent frame
    +	c32f3bc Unbreak the GNUstep build.
     
    -	Fix xref-find-references on MS-Windows
    +2016-01-30  Andreas Schwab  
     
    -	* lisp/cedet/semantic/symref/grep.el
    -	(semantic-symref-derive-find-filepatterns): Use
    -	'shell-quote-argument' instead of manually quoting in a way that
    -	only works with Posix shells.  (Bug#22289)
    +	Re-enable checks in member, memql, delete to complain about non-lists
     
    -2016-01-02  Eli Zaretskii  
    +	* src/fns.c (Fmember, Fmemql, Fdelete): Revert 2007-10-16 change.
     
    -	Document new features of tildify-mode
    +2016-02-04  Martin Rudalics  
     
    -	* lisp/textmodes/tildify.el (tildify-foreach-ignore-environments)
    -	(tildify-mode): Spelling fixes in doc strings.
    +	Minor doc(-string) tweaks
     
    -	* etc/NEWS: Reformat the tildify-mode entry.
    +	* lisp/window.el (window-in-direction): Fix doc-string typo.
    +	* doc/lispref/frames.texi (Frame Font): Mention canonical
    +	character width/height.
    +	* doc/lispref/windows.texi (Windows and Frames): Clarify
    +	handling of minibuffer window for `window-in-direction'.
    +	(Window Sizes): Minor tweaks in descriptions of
    +	`window-max-chars-per-line', `window-min-width' and
    +	`window-min-size'.
    +	(Deleting Windows): Minor tweak in `delete-window' description.
    +	(Selecting Windows): Clarify window use time description.
    +	(Cyclic Window Ordering): Minor tweak.
    +	(Switching Buffers): Clarify description of
    +	`switch-to-buffer-in-dedicated-window'.
     
    -2016-01-02  Eli Zaretskii  
    +2016-02-04  Eli Zaretskii  
     
    -	Document new features of Whitespace mode
    +	Remove some useless-use-of eval.
     
    -	* doc/emacs/display.texi (Useless Whitespace): Document
    -	'whitespace-toggle-options' and the new 'big-indent' style.
    -	Document 'whitespace-big-indent-regexp'.  Document the Global
    -	Whitespace mode.
    +	* lisp/gnus/gnus.el (gnus-load-hook): Don't use eval.
    +	* lisp/gnus/nnrss.el (xml): Simply require it.
    +	(xml-rpc-method-call): Use declare-function.
     
    -2016-01-02  Eli Zaretskii  
    +2016-01-28  Glenn Morris  
     
    -	Improve documentation of new Hide-IfDef features
    +	Don't use eval to quieten prolog.el compilation.
     
    -	* etc/NEWS: Expand and reword Hide-IfDef section.
    +	* lisp/progmodes/prolog.el (pltrace-on, pltrace-off): Declare.
    +	(prolog-enable-sicstus-sd, prolog-disable-sicstus-sd): Don't use eval.
     
    -2016-01-02  Leo Liu  
    +2016-01-28  Glenn Morris  
     
    -	Fix regression in font-locking cl-assert and cl-check-type
    +	Mark some risky prolog variables.
     
    -	* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): Fix
    -	  el-errs-re.
    +	* lisp/progmodes/prolog.el (prolog-system-version)
    +	(prolog-keywords, prolog-types, prolog-mode-specificators)
    +	(prolog-determinism-specificators, prolog-directives)
    +	(prolog-program-name, prolog-program-switches)
    +	(prolog-consult-string, prolog-compile-string)
    +	(prolog-eof-string, prolog-prompt-regexp, prolog-help-function):
    +	Mark anything processed by prolog-find-value-by-system as risky.
     
    -2016-01-01  Paul Eggert  
    +2016-01-28  Glenn Morris  
     
    -	Spelling and grammar fixes
    +	* lisp/custom.el (defcustom): Doc fix.
     
    -2016-01-01  Paul Eggert  
    +	* doc/lispref/customize.texi (Variable Definitions):
    +	Defcustom should always have a type.
     
    -	Fix copyright years by hand
    +2016-01-28  Glenn Morris  
     
    -	These are dates that admin/update-copyright did not update, or
    -	updated incorrectly.
    +	* lisp/emacs-lisp/bytecomp.el (byte-compile-nogroup-warn):
    +	Warn if defcustom has no type.  (Bug#16276)
     
    -2016-01-01  Paul Eggert  
    +	* lisp/cedet/semantic/db-file.el (semanticdb-persistent-path):
    +	Fix :type.
     
    -	Update copyright year to 2016
    +	* lisp/emacs-lisp/package.el (package-load-list): Improve :type.
     
    -	Run admin/update-copyright.
    +2016-01-28  Michael Albinus  
     
    -2016-01-01  Paul Eggert  
    +	Fix Bug#22452
     
    -	Merge from gnulib
    +	* 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):
    +	Mark it as connected.
     
    -	This mostly just updates copyright dates of gnulib files.
    -	It also updates to the latest version of texinfo.tex.
    +	* lisp/net/tramp.el (tramp-handle-file-remote-p): Check also, if
    +	connection property "connected" is set.  (Bug#22452)
     
    -2015-12-31  Mark Oteiza  
    +2016-01-27  Glenn Morris  
     
    -	lisp/emacs-lisp/chart.el (chart-new-buffer): Move to silence byte compiler.
    +	* test/lisp/vc/vc-hg.el: Move from test/automated/.
     
    -2015-12-31  Mark Oteiza  
    +	* lisp/xwidget.el (xwidget-query-on-exit-flag): Declare.
     
    -	Port chart.el methods to cl-generic.
    +	* lisp/xwidget.el (xwidget-webkit-browse-url): Give explicit error
    +	if not compiled with xwidgets.
     
    -	cl-call-next-method cannot be used inside EIEIO's defmethod.
    -	* lisp/emacs-lisp/chart.el: Require cl-generic at compile time.
    -	* lisp/emacs-lisp/chart.el (initialize-instance, chart-draw):
    -	(chart-draw-title, chart-size-in-dir, chart-draw-axis):
    -	(chart-axis-draw, chart-translate-xpos, chart-translate-ypos):
    -	(chart-translate-namezone, chart-draw-data, chart-add-sequence):
    -	(chart-trim, chart-sort): Use cl-defmethod instead of defmethod.
    +2016-01-26  Paul Eggert  
     
    -2015-12-31  Brian Burns  
    +	C-u C-x = example doc fix
     
    -	Add nt/INSTALL.W64 build instructions
    +	* doc/emacs/mule.texi (International Chars):
    +	Adjust example to match current behavior of C-u C-x =.
     
    -	* nt/INSTALL.W64: New file.
    -	* nt/INSTALL: Point to INSTALL.W64 for 64-bit build instructions.
    +2016-01-26  Paul Eggert  
     
    -2015-12-31  Joakim Jalap  
    +	malloc.h hygiene
     
    -	Add new input method 'programmer-dvorak'
    +	This attempts to future-proof Emacs a bit against possible glibc
    +	changes, by having Emacs use  declarations rather than
    +	coding them up by hand.  Problem noted by Florian Weimer in:
    +	https://sourceware.org/ml/libc-alpha/2016-01/msg00777.html
    +	Implement this mainly by moving malloc.h-related functions from
    +	emacs.c (which does not include ) to alloc.c (which does).
    +	* src/alloc.c (my_heap_start) [DOUG_LEA_MALLOC || GNU_LINUX]:
    +	New function.
    +	The remaining changes to this file apply only if DOUG_LEA_MALLOC.
    +	(alloc_unexec_pre, alloc_unexec_post): New functions.
    +	(malloc_initialize_hook): Use my_heap_start and alloc_unexec_post.
    +	(__MALLOC_HOOK_VOLATILE): New macro, if not already defined.
    +	(__malloc_initialize_hook): Use it.
    +	(malloc_state_ptr, malloc_initialize_hook, __malloc_initialize_hook):
    +	Move here from ...
    +	* src/emacs.c: ... here.
    +	(malloc_get_state, malloc_set_state): Remove extern decls.
    +	(my_heap_start) [DOUG_LEA_MALLOC || GNU_LINUX]: Remove static var.
    +	All uses changed to similarly-named new function.
    +	(Fdump_emacs): Use new functions alloc_unexec_pre, alloc_unexec_post.
    +	* src/lisp.h (my_heap_start, alloc_unexec_pre, alloc_unexec_post):
    +	New decls.
     
    -	* lisp/leim/quail/programmer-dvorak.el ("programmer-dvorak"): New
    -	input method.
    +2016-01-26  Eli Zaretskii  
     
    -	* etc/NEWS: Mention it.
    +	* doc/emacs/mark.texi (Using Region): Clarify wording.  (Bug#22467)
     
    -2015-12-31  Eli Zaretskii  
    +2016-01-26  Paul Eggert  
     
    -	Allow to invoke original M-TAB binding in 'flyspell-prog-mode'
    +	Remove never-set var handle_user_signal_hook
     
    -	* lisp/textmodes/flyspell.el (flyspell-prog-mode): Record the
    -	original M-TAB binding in a buffer-local variable.
    -	(flyspell-auto-correct-word): Invoke the original binding of M-TAB
    -	if that is recorded, when point is in a place where flyspell
    -	should not be active (e.g., because the user turned on
    -	'flyspell-prog-mode').  (Bug#18533)
    +	* src/keyboard.c, src/keyboard.h (handle_user_signal_hook):
    +	Remove never-set var.  All uses removed.
     
    -2015-12-31  Eli Zaretskii  
    +2016-01-26  Anders Lindgren  
     
    -	Fix EWW rendering of long RTL lines
    +	Fixed NextStep fullscreen issue (bug#22468)
     
    -	* lisp/net/shr.el (shr-insert-document): Undo any previous hscroll
    -	of the selected window before filling its lines.  (Bug#22250)
    +	When in fullscreen mode, `[screen visibleFrame]' sometimes
    +	includes, sometimes excludes the menu bar. This could cause
    +	a frame to be placed too low when in fullscreen mode.
     
    -2015-12-31  Vincent Belaïche  
    +	* src/nsterm.m (ns_menu_bar_should_be_hidden): Trace.
    +	(constrain_frame_rect): New parameter, isFullscreen, when true don't
    +	query the height of the menu bar.
    +	(ns_constrain_all_frames): Pass `false' (isFullscreen) to
    +	`constrain_frame_rect'.
    +	([EmacsView initFrameFromEmacs:]): Trace.
    +	([EmacsView isFullscreen]): Trace.
    +	([EmacsWindow constrainFrameRect:toScreen:]): Pass fullscreen
    +	state to `constrain_frame_rect'.
     
    -	fix  bug#21054
    +2016-01-25  Artur Malabarba  
     
    -	* lisp/ses.el (ses-check-curcell): Call `ses-set-curcell' unconditionally
    +	* lisp/files.el: Use a fixed file name for the second dir-locals file
     
    -2015-12-31  YAMAMOTO Mitsuharu  
    +	(dir-locals-file): Revert to its original fixed value.
    +	(dir-locals-file-2): New const.
    +	(dir-locals--all-files): Don't use `file-name-all-completions'.
    +	Instead, just check for the 2 dir-locals files and return a list
    +	of the ones that exit (if any).
     
    -	Clean up cairo printing code
    +	* etc/NEWS: Document the change.
     
    -	* src/gtkutil.c (xg_get_page_setup): Use listn.
    -	* src/xfns.c (Fx_export_frames, Fx_print_frames_dialog): Doc fix.  Use
    -	decode_window_system_frame and FRAME_VISIBLE_P.
    -	(Fx_print_frames_dialog): Use redisplay_preserve_echo_area instead
    -	of Fdisplay.
    -	* src/xterm.c (x_cr_export_frames): Use redisplay_preserve_echo_area
    -	instead of Fdisplay.  Temporarily unblock_input around QUIT.
    +	* doc/emacs/custom.texi (Directory Variables): Document the change.
     
    -2015-12-31  YAMAMOTO Mitsuharu  
    +	* doc/lispref/variables.texi (Directory Local Variables): Update
    +	accordingly.
     
    -	Move variables to inner loop, preparing for Mac port merge
    +2016-01-25  Artur Malabarba  
     
    -	* src/keyboard.c (command_loop_1): Move variables `cmd',
    -	`keybuf', and `i' to inner loop.
    +	* lisp/files-x.el (modify-dir-local-variable): Small rewrite
     
    -2015-12-31  YAMAMOTO Mitsuharu  
    +	Change a variable name to be more meaningful, and reorder some of
    +	the code with no change in behaviour.
     
    -	Add handle_user_signal_hook
    +2016-01-25  Artur Malabarba  
     
    -	* src/keyboard.h (handle_user_signal_hook): New declaration.
    -	* src/keyboard.c (handle_user_signal_hook): New variable.
    -	(handle_user_signal): Call it.
    +	* lisp/files.el (dir-locals-find-file): Refactor return values
     
    -2015-12-31  YAMAMOTO Mitsuharu  
    +	Returning a cache remains unchanged, but the case of returning a
    +	file (or pattern) is now changed to return the contaning
    +	directory.
     
    -	Avoid writing to purespace
    +	(dir-locals-read-from-file): Rename to `dir-locals-read-from-dir'
    +	and make obsolete.
    +	(dir-locals-read-from-dir): Simplify accordingly.
    +	(hack-dir-local-variables): Simplify accordingly and rename a
    +	variable.
     
    -	* src/alloc.c (Fmake_string): Don't write to empty string contents.
    -	(allocate_vector): Don't write to empty vector size.
    -	* src/character.h (CHECK_CHARACTER_CAR, CHECK_CHARACTER_CDR):
    -	Don't call unnecessary XSETCAR or XSETCDR.
    -	* src/lisp.h (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE): Don't
    -	write to empty string size_byte.
    +2016-01-25  Glenn Morris  
     
    -2015-12-31  YAMAMOTO Mitsuharu  
    +	* lisp/textmodes/flyspell.el (flyspell--prev-meta-tab-binding):
    +	Declare.
     
    -	Remove unused variable
    +	* configure.ac (USE_CAIRO): Rename to more standard HAVE_CAIRO.
     
    -	* lisp/international/mule-cmds.el: Remove unused variable
    -	`mac-system-coding-system'.
    +	* configure.ac (--with-cairo): Say it's experimental.
     
    -2015-12-31  YAMAMOTO Mitsuharu  
    +	* lisp/xwidget.el (xwidget-webkit-scroll-behavior):
    +	Rename using American spelling.  Update all uses.
     
    -	* configure.ac: Find libxml2 headers in Xcode SDK dir on Darwin.
    +2016-01-25  Glenn Morris  
     
    -2015-12-31  YAMAMOTO Mitsuharu  
    +	Yet more xwidget doc fixes.
     
    -	Use posix_openpt instead of openpty on Darwin
    +	* lisp/xwidget.el (xwidget-webkit-scroll-behaviour)
    +	(xwidget-insert, xwidget-webkit-browse-url)
    +	(xwidget-webkit-scroll-up, xwidget-webkit-scroll-down)
    +	(xwidget-webkit-scroll-forward, xwidget-webkit-scroll-backward)
    +	(xwidget-webkit-insert-string, xwidget-webkit-show-named-element)
    +	(xwidget-webkit-show-id-element)
    +	(xwidget-webkit-show-id-or-named-element)
    +	(xwidget-webkit-adjust-size, xwidget-webkit-current-url)
    +	(xwidget-webkit-execute-script-rv)
    +	(xwidget-webkit-copy-selection-as-kill, xwidget-get)
    +	(xwidget-put):  Doc fixes.
    +	(xwidget-webkit-insert-string, xwidget-webkit-show-named-element)
    +	(xwidget-webkit-show-id-element)
    +	(xwidget-webkit-show-id-or-named-element): Prompt fixes.
     
    -	* configure.ac (PTY_ITERATION, FIRST_PTY_LETTER, PTY_OPEN)
    -	(PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF): Remove
    -	Darwin-specific definitions.  Use posix_openpt instead.
    +2016-01-25  Ted Zlatanov  
     
    -2015-12-30  Shakthi Kannan  
    +	* lisp/gnus/gnus-art.el (gnus-blocked-images):
    +	Add explicit nil choice and tags.
     
    -	Document support for ':documentation' in Lisp mode
    +2016-01-25  Paul Eggert  
     
    -	* lisp/emacs-lisp/lisp-mode.el (lisp-string-in-doc-position-p)
    -	(lisp-string-after-doc-keyword-p)
    -	(lisp-font-lock-syntactic-face-function): Add doc strings.
    +	Spelling fixes
     
    -2015-12-30  Shakthi Kannan  
    +2016-01-25  Stefan Monnier  
     
    -	Document new features of TeX mode
    +	(rng-c-fix-escaped-newlines): Use subst-char-in-string
     
    -	* doc/emacs/text.texi (TeX Print): Document
    -	'tex-print-file-extension'.
    -	* doc/emacs/programs.texi (Misc for Programs): Document support
    -	for Prettify Symbols mode in TeX mode.
    +	* lisp/nxml/rng-cmpct.el (rng-c-fix-escaped-newlines):
    +	Use subst-char-in-string.
     
    -2015-12-30  Eli Zaretskii  
    +2016-01-25  Stefan Monnier  
     
    -	Clarify docs of hscroll in RTL text
    +	* lisp/textmodes/sgml-mode.el (sgml-forward-sexp): New function
     
    -	* doc/lispref/windows.texi (Horizontal Scrolling): Clarify the
    -	meaning of a window's horizontal scroll amount for RTL paragraphs.
    +	(sgml-cursor-sensor, sgml-pretty-print, sgml-parse-tag-backward)
    +	(sgml-calculate-indent): Use it.
     
    -2015-12-30  Eli Zaretskii  
    +2016-01-25  Stefan Monnier  
     
    -	Fix rendering of HTML pages that use character composition
    +	* lisp/org: Fix some compiler warnings
     
    -	* src/indent.c (Fvertical_motion): Fix the case when point starts
    -	in the middle of a composition, as in shr-vertical-motion.
    -	(Bug#22250)
    +	* lisp/org/ob-core.el (org-babel-check-confirm-evaluate)
    +	(org-babel-map-src-blocks): Don't emit warnings if added vars are not used.
    +	(*this*): Declare as dyn-bound.
    +	(org-babel-expand-src-block, org-babel-load-in-session)
    +	(org-babel-switch-to-session-with-code, org-babel-get-rownames):
    +	Mark unused args.
    +	(org-babel-combine-header-arg-lists): Remove unused var `args'.
    +	(org-babel-find-named-block): Remove unused var `msg'.
     
    -2015-12-30  Eli Zaretskii  
    +	* lisp/org/org-src.el (org-inhibit-startup, org-src-fontify-natively):
    +	Declare as dyn-bound.
    +	(org-edit-src-code): Remove unused var `lfmt'.
    +	(org-edit-fixed-width-region): Remove unused var `preserve-indentation'.
     
    -	Avoid some compiler warnings in w32.c
    +2016-01-25  Stefan Monnier  
     
    -	* src/w32.c (codepage_for_filenames, crlf_to_lf)
    -	(ansi_encode_filename, socket_to_fd, sys_write)
    -	(check_windows_init_file): Avoid compiler warnings about
    -	differences in pointer signedness.
    +	* lisp/font-lock.el: Use #' to quote function symbols
     
    -2015-12-30  Dmitry Gutov  
    +2016-01-25  Stefan Monnier  
     
    -	Undo ill-advised change
    +	(font-lock-ensure-function): Fix bug#22399
     
    -	* lisp/progmodes/xref.el (xref-collect-matches): Undo
    -	ill-advised change.  The hits come in the order that `find'
    -	produces them in, which isn't alphabetical.
    +	* lisp/font-lock.el (font-lock-ensure-function): Fix handling when
    +	font-lock-mode is not enabled (bug#22399).
     
    -2015-12-30  Dmitry Gutov  
    +2016-01-25  Alan Mackenzie  
     
    -	Unbreak completion in python-mode buffers
    +	Expunge "allow" + infinitive from source and doc, part 2.
     
    -	* lisp/progmodes/python.el (python-shell-completion-at-point):
    -	Unbreak in python-mode buffers.
    +	Do the same for "permit", "enable", "prevent", and (where appropriate)
    +	"require".
     
    -2015-12-29  Eli Zaretskii  
    +	doc/misc/reftex.texi:
    +	doc/misc/url.texi:
    +	lib/get-permissions.c:
    +	lib/strftime.c:
    +	lisp/org/org-element.el:
    +	lisp/org/org-mobile.el:
    +	lisp/textmodes/reftex-vars.el:
    +	src/bidi.c:
    +	src/emacs.c:
    +	src/xdisp.c:
    +	test/etags/c-src/emacs/src/lisp.h:
     
    -	Fix typos in CC Mode manual
    +	Expunge the likes of "This allows to do something" from the above files.
     
    -	* doc/misc/cc-mode.texi (c-offsets-alist, Style Variables): Fix
    -	typos.  (Bug#22267)
    +2016-01-25  Artur Malabarba  
     
    -2015-12-29  Eli Zaretskii  
    +	* lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode): Redundant line
     
    -	Avoid assertion violations in compact_font_cache_entry
    +	`special-mode' is already read-only.
     
    -	* src/alloc.c (compact_font_cache_entry): Don't use VECTORP to
    -	avoid assertion violation in ASIZE.  (Bug#22263)
    +2016-01-25  Artur Malabarba  
     
    -2015-12-29  Eli Zaretskii  
    +	* lisp/emacs-lisp/ert.el (ert--results-move): Change error to user-error
     
    -	Fix filling text with bidirectional characters in shr.el
    +2016-01-24  Paul Eggert  
     
    -	* lisp/net/shr.el (shr-insert-document): Bind
    -	bidi-display-reordering to nil while filling lines.  This is
    -	required for when a line includes characters whose bidi
    -	directionality is opposite to the base paragraph direction,
    -	because columns are counted in the logical order.  (Bug#22250)
    +	Port "$@" to OpenIndiana ksh93
     
    -2015-12-29  Martin Rudalics  
    +	In http://lists.gnu.org/archive/html/bug-autoconf/2015-12/msg00000.html
    +	Pavel Raiskup reports that ${1+"$@"} runs afoul of a bug in /bin/sh
    +	(derived from ksh 93t+ 2010-03-05).  ${1+"$@"} works around an ancient
    +	bug in long-dead shells, so remove the workaround.
    +	* admin/check-doc-strings, configure.ac, lib-src/rcs2log:
    +	Use plain "$@" rather than ${1+"$@"}.
     
    -	* src/xfns.c (x_create_tip_frame): Process alpha parameter.
    +2016-01-24  Paul Eggert  
     
    -2015-12-29  Michael Albinus  
    +	* src/xwidget.c (Fxwidget_set_adjustment): Fix doc string quoting typo.
     
    -	Sync with Tramp 2.2.13
    +2016-01-24  Paul Eggert  
     
    -	* doc/misc/trampver.texi: Change version to "2.2.13.25.1".
    +	Improve wording for SMB support
     
    -	* lisp/net/tramp-compat.el (tramp-compat-delete-dups):
    -	Use `tramp-compat-funcall'.
    +	* doc/misc/tramp.texi (External methods): Improve and modernize
    +	wording for discussion of smbclient.  There is no longer any
    +	need to mention the laundry list of old MS Windows implementations
    +	of SMB and CIFS, nor to mention CIFS.  Also, give a URL for Samba.
     
    -	* lisp/net/tramp-gvfs.el (tramp-gvfs-parse-device-names):
    -	Make `split-string' call compatible with older Emacsen.
    +2016-01-24  Paul Eggert  
     
    -	* lisp/net/trampver.el: Change version to "2.2.13.25.1".
    +	Merge from gnulib
     
    -2015-12-29  Lambda Coder  
    +	This incorporates:
    +	2016-01-24 openat_proc_name: fix last '/' overwritten on OS/2 kLIBC
    +	2016-01-24 closedir, dirfd, opendir: port to OpenSolaris 5.10
    +	2016-01-15 detect utimes() correctly on OS/2 kLIBC
    +	2016-01-15 openat_proc_name: port to OS/2 kLIBC
    +	2016-01-14 stdint: check _INTPTR_T_DECLARED for intptr_t etc.
    +	2016-01-14 opendir, closedir, dirfd, fdopendir: port to OS/2 kLIBC
    +	2016-01-14 dup, dup2, fcntl: support a directory fd on OS/2 kLIBC
    +	2016-01-14 binary-io: don't put fd in binary mode if a console on EMX
    +	2016-01-14 sig2str: list all signals on FreeBSD >= 7
    +	2016-01-13 acl-permissions: port to USE_ACL==0 platforms
    +	2016-01-12 mktime: rename macro to avoid glibc clash
    +	2016-01-12 Port "$@" to OpenIndiana ksh93
    +	2016-01-12 Port Universal Time settings to strict POSIX
    +	* build-aux/gitlog-to-changelog, build-aux/update-copyright:
    +	* doc/misc/texinfo.tex, lib/acl-internal.c, lib/acl-internal.h:
    +	* lib/binary-io.h, lib/dirent.in.h, lib/dirfd.c, lib/dup2.c:
    +	* lib/fcntl.c, lib/fdopendir.c, lib/mktime.c, lib/openat-proc.c:
    +	* lib/sig2str.h, lib/stdint.in.h, m4/dirfd.m4, m4/dup2.m4:
    +	* m4/fcntl.m4, m4/utimes.m4:
    +	Copy from gnulib.
    +	* m4/gnulib-comp.m4: Regenerate.
     
    -	* doc/misc/tramp.texi: Editorial revisions to the Tramp manual
    +2016-01-24  Alan Mackenzie  
     
    -2015-12-29  Lars Ingebrigtsen  
    +	Expunge "allow" + infinitive without direct object from source and doc.
     
    -	Mention that tls.el is secure by default, and will fail
    +	Do the same for "permit", "enable", and "prevent".
     
    -2015-12-29  Lars Ingebrigtsen  
    +	* doc/emacs/mule.texi:
    +	* doc/lispref/control.texi:
    +	* doc/lispref/display.texi:
    +	* doc/lispref/frames.texi:
    +	* doc/lispref/functions.texi:
    +	* doc/lispref/nonascii.texi:
    +	* doc/lispref/streams.texi:
    +	* doc/lispref/windows.texi:
    +	* doc/misc/dbus.texi:
    +	* doc/misc/eww.texi:
    +	* doc/misc/flymake.texi:
    +	* doc/misc/octave-mode.texi:
    +	* doc/misc/org.texi:
    +	* doc/misc/reftex.texi:
    +	* doc/misc/tramp.texi:
    +	* doc/misc/wisent.texi:
    +	* etc/NEWS:
    +	* lisp/autorevert.el:
    +	* lisp/cedet/mode-local.el:
    +	* lisp/cedet/semantic/senator.el:
    +	* lisp/cedet/semantic/wisent.el:
    +	* lisp/dos-fns.el:
    +	* lisp/frameset.el:
    +	* lisp/gnus/gnus-agent.el:
    +	* lisp/gnus/mm-util.el:
    +	* lisp/international/characters.el:
    +	* lisp/ldefs-boot.el:
    +	* lisp/mail/mailclient.el:
    +	* lisp/man.el:
    +	* lisp/mh-e/mh-search.el:
    +	* lisp/net/tramp-cmds.el:
    +	* lisp/net/tramp-gvfs.el:
    +	* lisp/org/org-crypt.el:
    +	* lisp/org/org-element.el:
    +	* lisp/org/org-feed.el:
    +	* lisp/org/org.el:
    +	* lisp/org/ox-ascii.el:
    +	* lisp/org/ox-icalendar.el:
    +	* lisp/org/ox-publish.el:
    +	* lisp/org/ox.el:
    +	* lisp/play/gamegrid.el:
    +	* lisp/play/gomoku.el:
    +	* lisp/progmodes/antlr-mode.el:
    +	* lisp/progmodes/python.el:
    +	* lisp/progmodes/vhdl-mode.el:
    +	* lisp/strokes.el:
    +	* lisp/textmodes/ispell.el:
    +	* lisp/tree-widget.el:
    +	* lisp/vc/pcvs.el:
    +	* lisp/window.el:
    +	* src/lisp.h:
    +	* src/w32.c:
    +	* src/w32heap.c:
    +	* src/w32term.c:
    +	* src/window.c:
    +	* src/xfaces.c:
     
    -	Make tls.el use trustfiles by default
    +	Replace solecisms like "This allow to do something" with a correct
    +	alternative, such as "This allow you to do something", "This allows
    +	something to be done" or "This allows the doing of something".
     
    -	* lisp/net/tls.el (tls-program): Add a certfile by default (bug#21227).
    -	(open-tls-stream): Insert the trustfile by looking at
    -	`gnutls-trustfiles'.
    +2016-01-24  l3thal  
     
    -2015-12-29  Lars Ingebrigtsen  
    +	Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25
     
    -	Refactor out gnutls-trustfiles
    +2016-01-24  Kelvin White  
     
    -	* lisp/net/gnutls.el (gnutls-trustfiles): Refactor out for reuse by tls.el.
    +	Add NEWS entry for asynchronous reconnect in ERC
     
    -2015-12-29  Lars Ingebrigtsen  
    +2016-01-24  l3thal  
     
    -	Remove --insecure from gnutls-cli invocation
    +	Add NEWS entry for asynchronous reconnect in ERC
     
    -	* tls.el (tls-program): Default to using secure TLS
    -	connections (bug#19284).
    +2016-01-24  Kelvin White  
     
    -2015-12-29  Paul Eggert  
    +	browse-url.el: Add 'google-chrome' to supported browsers.
     
    -	Spelling fix
    +2016-01-24  Paul Eggert  
     
    -2015-12-29  Paul Eggert  
    +	Port Tramp manual to latest Texinfo
     
    -	Port report-emacs-bug to deterministic builds
    +	Otherwise, 'make pdf' did not work (Bug#22416).
    +	* doc/misc/tramp.texi (xxx, yyy): Remove macros.
    +	(trampfn): Specialize to the case where METHOD is nonempty.
    +	The 2nd argument is now user@host, not 2nd user and 3rd host args.
    +	All uses changed.
    +	(trampf): New macro.
     
    -	* lisp/mail/emacsbug.el (report-emacs-bug): Future-proof the
    -	recent "built on" change to deterministic builds where
    -	emacs-build-system will be nil.  See:
    -	http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg01369.html
    +2016-01-24  Lars Ingebrigtsen  
     
    -2015-12-29  Jose A. Ortega Ruiz    (tiny change)
    +	* eww.el (eww-render): Protect against empty content-types.
     
    -	Fix URL auth error message
    +2016-01-24  Nicolas Petton  
     
    -	* lisp/url/url-http.el (url-http-handle-authentication): Make the error
    -	message more correct (bug#20069).
    +	authors.el updates
     
    -2015-12-28  Lars Ingebrigtsen  
    +	* admin/authors.el (authors-ignored-files, authors-renamed-files-alist):
    +	  Additions.
     
    -	shr link traversal fixup
    +2016-01-23  Dmitry Gutov  
     
    -	* shr.el (shr-next-link): Don't bug out on adjacent links.
    +	Rename xref-query-replace to xref-query-replace-in-results
     
    -	Backport:
    +	* lisp/progmodes/xref.el(xref-query-replace):
    +	Rename to xref-query-replace-in-results.
    +	(http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01240.html)
     
    -	(cherry picked from commit 1efc5f8b09273c359683ce13be95fb5df7a84311)
    +	* lisp/progmodes/xref.el (xref--xref-buffer-mode-map):
    +	* lisp/dired-aux.el (dired-do-find-regexp-and-replace):
    +	* doc/emacs/dired.texi (Operating on Files):
    +	* doc/emacs/maintaining.texi (Xref Commands)
    +	(Identifier Search, Identifier Search): Update accordingly.
     
    -2015-12-28  Tom Tromey  
    +2016-01-23  Dmitry Gutov  
     
    -	set :safe on css-indent-offset
    +	Update cl-defgeneric and cl-defmethod docstrings
     
    -	* lisp/textmodes/css-mode.el (css-indent-offset): Add :safe 'integerp.
    +	* lisp/emacs-lisp/cl-generic.el: Remove outdated TODO item.
    +	(cl-defgeneric): Rename BODY to DEFAULT-BODY.
    +	(cl-defmethod): Mention that multiple dispatch arguments are
    +	allowed.  Document supported types.  (Bug#22336)
     
    -2015-12-28  Lars Ingebrigtsen  
    +2016-01-23  Dmitry Gutov  
     
    -	* eww.el (eww-mode): Remove superfluous bidi reset.
    +	Comment out next-error-function integration in xref
     
    -2015-12-28  James Stout    (tiny change)
    +	* lisp/progmodes/xref.el (xref--xref-buffer-mode):
    +	Comment out next-error-function integration
    +	(http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01286.html).
     
    -	Make chunked encoding trailer detection more compliant
    +2016-01-23  John Wiegley  
     
    -	* lisp/url/url-http.el
    -	(url-http-chunked-encoding-after-change-function): Make
    -	trailer detection more compliant (bug#16345).
    +	Correct a use of "which" in intro.texi
     
    -2015-12-28  Martin Rudalics  
    +2016-01-23  Alan Mackenzie  
     
    -	Fix Bug#10873 in `report-emacs-bug'
    +	Distinguish the two meanings of Java's keyword "default".  Fixes bug #22358.
     
    -	* lisp/mail/emacsbug.el (report-emacs-bug): If
    -	`report-emacs-bug-no-explanations' is nil, make sure we can show
    -	mail and warnings buffer on this frame (Bug#10873).
    +	* lisp/progmodes/cc-engine.el (c-guess-basic-syntax CASE 14): Check the
    +	context of case labels (including "default") more rigorously.
    +	(c-guess-basic-syntax CASE 15): Consequential amendment.
     
    -2015-12-28  Lars Ingebrigtsen  
    +	* lisp/progmodes/cc-langs.el (c-modifier-kwds): Add "default" to Java's value.
     
    -	Always reset the bidi direction
    +2016-01-23  Oscar Fuentes  
     
    -	* eww.el (eww-display-html): Always reset the bidi direction
    -	to `left-to-right' (bug#22257).
    +	Don't operate on menu bar of nonexistent frame
     
    -2015-12-28  Alan Mackenzie  
    +	* src/xfns.c (Fx_hide_tip) [USE_LUCID]: Check that the current frame
    +	is valid before redisplaying its menu. Fixes bug#22438.
     
    -	Allow line comments ending with escaped NL to be continued to the next line.
    +2016-01-23  Anders Lindgren  
     
    -	Use this in C, C++, and Objective C Modes.  Fixes bug#22246
    +	Unbreak the GNUstep build.
     
    -	* src/syntax.c (comment-end-can-be-escaped): New buffer local variable.
    -	(forw-comment, back-comment): On encountering an end of comment character,
    -	test whether it is escaped when `comment-end-can-be-escaped' is non-nil.
    +	* src/nsterm.m ([EmacsBell init]): In GNUstep, don't use the
    +	predefined "caution" image. Add trace.
    +	(x_set_window_size): Remove unused variables `cols' and `rows'.
    +	(ns_draw_fringe_bitmap): Exclude assignment of `fromRect' when
    +	GNUstep is used.
    +	([EmacsView updateFrameSize:]): Remove unused variable `win'.
    +	([EmacsWindow zoom:]): Remove unused variable `f'.
     
    -	* doc/lispref/syntax.texi (Control Parsing): Describe
    -	`comment-end-can-be-escaped'.
    +2016-01-23  Eli Zaretskii  
    +	    John Wiegley  
    +	    Michael Heerdegen  
     
    -	* etc/NEWS (Lisp Changes): Describe `comment-end-can-be-escaped'.
    +	Improve documentation of 'pcase'
     
    -	* lisp/progmodes/cc-langs.el: New c-lang-setvar `comment-end-can-be-escaped'.
    +	* doc/lispref/control.texi (Pattern matching case statement):
    +	Reorganize, expand, and improve wording.
     
    -2015-12-28  Dmitry Gutov  
    +	* etc/NEWS: Mention that 'pcase' changes are documented.
     
    -	Rename project-library-roots to project-external-roots
    +2016-01-23  Paul Eggert  
     
    -	* lisp/progmodes/project.el (project-library-roots): Rename to
    -	project-external-roots.
    -	(project-library-roots-function): Rename to
    -	project-vc-external-roots-function.  Only use it in the VC
    -	backend, for now.  Update project-external-roots accordingly.
    -	(project-vc-library-roots): Remove.
    -	(project-or-libraries-find-regexp):
    -	Rename to project-or-external-find-regexp.
    +	* etc/NEWS: Say that Cairo is experimental.
     
    -	* lisp/progmodes/elisp-mode.el (elisp-library-roots):
    -	Rename to elisp-load-path-roots.
    +2016-01-23  Paul Eggert  
     
    -	* lisp/progmodes/etags.el (etags-library-roots): Remove.  Use
    -	an anonymous function for the default value of
    -	project-vc-external-roots-function.
    +	Report error for PNG under Cairo
     
    -2015-12-27  Deniz Dogan  
    +	* src/image.c (lookup_rgb_color): Signal a file error instead
    +	of dumping core when mishandling an image.
     
    -	Clear erc user list upon disconnection
    +2016-01-23  Arash Esbati  
     
    -	* lisp/erc/erc-backend.el (erc-process-sentinel): Clear channel user
    -	lists upon disconnection.  This prevents invalid channel
    -	user lists when reconnecting (bug#10947).
    +	Delete a spurious backquote (tiny change)
     
    -2015-12-27  Lars Ingebrigtsen  
    +	* lisp/textmodes/reftex-ref.el (reftex-label): Delete a
    +	spurious backquote which raises an error with emacs 25.
     
    -	Don't bug out in erc after waking from sleep
    +2016-01-23  Paul Eggert  
     
    -	* lisp/erc/erc-backend.el (erc-server-send-ping): If the server has
    -	closed connection, this may already have been detected and
    -	`erc-server-last-received-time' has been set to nil (bug#13608).
    +	Pacify --enable-gcc-warnings --with-cairo
     
    -2015-12-27  David Edmondson  
    +	Problem reported by Alexander Kuleshov in:
    +	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01289.html
    +	* src/gtkutil.c (xg_get_page_setup):
    +	Use switch rather than if-then-else.
    +	* src/image.c (COLOR_TABLE_SUPPORT):
    +	Define directly rather than via #define and optional later #undef.
    +	(lookup_rgb_color) [USE_CAIRO && ENABLE_CHECKING]:
    +	Crash when the pixel is undefined, as there is a genuine bug
    +	here (Bug#22442).
    +	* src/image.c (tiff_load, gif_load, svg_load_image)
    +	(x_kill_gs_process) [USE_CAIRO]:
    +	* src/xterm.c (x_draw_fringe_bitmap) [USE_CAIRO]:
    +	Omit unused locals, or move them to where they’re needed.
    +	(x_clear_area1): Now ATTRIBUTE_UNUSED.
     
    -	Proxy error in erc with multiple clients
    +2016-01-22  Eli Zaretskii  
     
    -	* lisp/erc/erc.el (erc-channel-receive-names): Fix errors
    -	generated when multiple IRC clients talk to a single IRC proxy
    -	(bug#19034).
    +	Update documentation for Dired search and replace
     
    -	Backport:
    +	* doc/emacs/dired.texi (Operating on Files): Update descriptions
    +	of 'A' and 'Q' now bound to 'dired-do-find-regexp' and
    +	'dired-do-find-regexp-and-replace'.
     
    -	(cherry picked from commit 507e98a54d1aa37823c64993d6b59257a82fe8f4)
    +	* etc/NEWS: Mention xref-related changes in Dired.
     
    -2015-12-27  Dima Kogan  
    +2016-01-22  Paul Eggert  
     
    -	Ensure that we don't have several timers in erc
    +	Port recent xdisp.c fix to picky C compilers
     
    -	* lisp/erc/erc-backend.el (erc-server-setup-periodical-ping): Checks
    -	for existing timers in the alist before adding new ones.  If a
    -	timer already exists, it is cancelled and
    -	overwritten. (bug#19292).
    +	* src/xdisp.c (dump_glyph): Redo the call to fprintf to avoid
    +	putting #if inside the arguments to a standard function, which
    +	the C standard says has undefined behavior.
     
    -2015-12-27  Jens Lechtenboerger  
    +2016-01-22  Alan Mackenzie  
     
    -	Fix mml-sec build warnings
    +	Prevent spurious recognition of K&R argument declarations.  Fixes bug #2203
     
    -	* lisp/gnus/mml-sec.el: Fix warnings by adding autoloads
    -	(bug#18718).
    +	* cc-engine.el (c-forward-declarator): New function.
    +	(c-in-knr-argdecl): Before recognizing a K&R argument declaration, check it is
    +	contained in the preceding arg list.
     
    -	Backport:
    +	* cc-fonts.el (c-font-lock-declarators): Use the new function
    +	`c-forward-declarator' in place of inline code.
     
    -	(cherry picked from commit 3603097f62f5f4aa5451716e9ac380161f6829e2)
    +2016-01-22  Eli Zaretskii  
     
    -2015-12-27  Lars Ingebrigtsen  
    +	Fix the build with --enable-checking=glyphs
     
    -	Don't insert erc logs at the end
    +	* src/xdisp.c (dump_glyph): Don't refer to glyph->u.xwidget in a
    +	build without xwidget support.
     
    -	* lisp/erc/erc-log.el (erc-log-setup-logging): Insert the previous log
    -	at the start of the buffer, not at the end (bug#20496).
    +2016-01-22  Eli Zaretskii  
     
    -2015-12-27  Lars Ingebrigtsen  
    +	Document cl-generic.el
     
    -	(eww-setup-buffer): Restore left-to-right defaults
    +	* doc/lispref/functions.texi (Generic Functions): New section.
    +	(Bug#22336)
    +	(Functions): Update the chapter menu.
    +	* doc/lispref/elisp.texi: Update the master menu.
     
    -	* eww.el (eww-setup-buffer): Restore left-to-right defaults.
    +2016-01-22  Paul Eggert  
     
    -	Backport:
    +	xwidgets style cleanup
     
    -	(cherry picked from commit 96c874b96b617c124d500a94de761a61f2a08685)
    +	Adjust the newly-added Xwidgets code so that it uses a more-typical
    +	Emacs style.  This should not affect behavior, except that in
    +	a few places it adds runtime checks that Lisp arguments are of
    +	the proper type, and in one place it uses more-precise arithmetic.
    +	* src/buffer.c, src/dispnew.c, src/emacs.c, src/emacsgtkfixed.c:
    +	* src/emacs.c, src/print.c, src/window.c, src/xdisp.c, src/xterm.c:
    +	Include xwidget.h unconditionally.
    +	* src/buffer.c (Fkill_buffer):
    +	* src/dispnew.c (update_window):
    +	* src/emacs.c (main):
    +	* src/print.c (print_object):
    +	* src/window.c (Fdelete_window_internal):
    +	* src/xdisp.c (handle_single_display_spec, push_it, pop_it)
    +	(get_next_element, set_iterator_to_next, next_element_from_xwidget)
    +	(dump_glyph, calc_pixel_width_or_height, BUILD_GLYPH_STRINGS_XW)
    +	(BUILD_GLYPH_STRINGS, x_produce_glyphs, get_window_cursor_type):
    +	* src/xterm.c (x_draw_glyph_string, x_draw_bar_cursor):
    +	Call xwidget functions and macros without worrying about
    +	HAVE_XWIDGETS when the code is a no-op on non-xwidget
    +	platforms.
    +	* src/dispextern.h (XWIDGET_GLYPH, struct glyph_string.xwidget)
    +	(IT_XWIDGET, GET_FROM_XWIDGET, struct it.u.xwidget)
    +	(struct it.xwidget):
    +	* src/lisp.h (PVEC_XWIDGET, PVEC_XWIDGET_VIEW):
    +	Always define.
    +	* src/emacsgtkfixed.h: Omit unnecessary comment.
    +	* src/keyboard.c: Fix spacing.
    +	* src/xdisp.c (BUILD_XWIDGET_GLYPH_STRING, produce_xwidget_glyph):
    +	Define to be a no-op if not HAVE_XWIDGETS.
    +	* src/xwidget.c: Include xwidget.h first (after config.h)
    +	to make sure that it can stand by itself.
    +	(Fmake_xwidget, Fxwidget_webkit_execute_script):
    +	Fix typo in doc string.
    +	(Fmake_xwidget): Check type of args.
    +	(Fmake_xwidget, offscreen_damage_event)
    +	(webkit_document_load_finished_cb, webkit_download_cb)
    +	(webkit_new_window_policy_decision_requested_cb)
    +	(webkit_navigation_policy_decision_requested_cb)
    +	(xwidget_osr_draw_cb, xwidget_osr_event_forward)
    +	(xwidget_osr_event_set_embedder, xwidget_init_view):
    +	Omit unnecessary casts.
    +	* src/xwidget.c (Fmake_xwidget, xwidget_hidden)
    +	(xwidget_show_view, xwidget_hide_view)
    +	(x_draw_xwidget_glyph_string, xwidget_start_redisplay, xwidget_touch)
    +	(xwidget_touched):
    +	* src/xwidget.h (struct xwidget.kill_without_query)
    +	(struct xwidget_view.redisplayed, struct xwidget_view.hidden):
    +	Use bool for boolean.
    +	* src/xwidget.c (store_xwidget_event_string, Fxwidget_size_request):
    +	Simplify by using list functions.
    +	(WEBKIT_FN_INIT): Omit unnecessary test for nil.
    +	(Fxwidget_resize): Check type of integer args
    +	before doing any work.  Check that they are nonnegative.
    +	(Fxwidget_set_adjustment): Check type of integer arg.
    +	Avoid redundant call to gtk_scrolled_window_get_vadjustment.
    +	Simplify.  Use double, not float.
    +	(Fxwidget_info, Fxwidget_view_info): Simplify by using CALLN.
    +	(valid_xwidget_spec_p): Simplify.
    +	(xwidget_spec_value): Omit unused arg FOUND.  All callers changed.
    +	* src/xwidget.h: Include lisp.h first, so that includers do
    +	not need to worry about doing that before including this file.
    +	Make this .h file safe to include even on non-HAVE_XWIDGETS
    +	configurations, to simplify the includers.
    +	(x_draw_xwidget_glyph_string, syms_of_xwidget, valid_xwidget_spec_p)
    +	(xwidget_end_redisplay, lookup_xwidget)
    +	(xwidget_view_delete_all_in_window, kill_buffer_xwidgets):
    +	Now a no-op if !HAVE_XWIDGETS, to simplify callers.
    +	(struct glyph_matrix, struct glyph_string, struct xwidget)
    +	(struct xwidget_view, struct window):
    +	New forward or incomplete decls, so that includers need not
    +	assume the corresponding .h files are already included, or that
    +	HAVE_XWIDGETS is defined.
    +	(struct xwidget_type, xwidget_from_id): Remove; unused.
     
    -2015-12-27  Lars Ingebrigtsen  
    +2016-01-22  John Wiegley  
     
    -	Don't join erc channels doubly
    +	Further corrections to the pcase docstring
     
    -	* lisp/erc/erc-join.el (erc-autojoin-channels): Don't join channels
    -	more than once (if you have several nicks) (bug#20695).
    +2016-01-22  Eli Zaretskii  
     
    -2015-12-27  Eli Zaretskii  
    +	* doc/emacs/anti.texi (Antinews): Rewrite for Emacs 25.
     
    -	Avoid leaving "ghost" of mouse pointer on MS-Windows
    +2016-01-21  Stephen Leake  
     
    -	* src/w32term.c (frame_set_mouse_pixel_position):
    -	* src/w32fns.c (Fw32_mouse_absolute_pixel_position): Momentarily
    -	disable "mouse trails" when moving the mouse pointer.  (Bug#22247)
    -	* src/w32term.c (frame_set_mouse_pixel_position): Include
    -	w32common.h.
    +	In xref-collect-references, force backends to respect the 'dir' arg
     
    -2015-12-27  Krzysztof Jurewicz    (tiny change)
    +	* lisp/progmodes/xref.el (xref-collect-references): Force symref backends
    +	to use `default-directory'.
     
    -	Fix auth source lookups from erc with port numbers
    +2016-01-21  John Wiegley  
     
    -	* lisp/erc/erc.el (erc-open): `auth-source' wants strings, not port
    -	numbers (bug#20541).
    +	Minor correction to pcase docstring
     
    -2015-12-27  Fran Litterio  
    +2016-01-21  John Wiegley  
     
    -	Run erc-kill-channel-hook always on exit
    +	Write a new docstring for the pcase macro
     
    -	* lisp/erc/erc.el (erc-kill-buffer-function): Run erc-kill-channel-hook
    -	when erc-kill-queries-on-quit is set (bug#21187).
    +	* lisp/emacs-lisp/pcase.el (pcase): Write a new docstring.
     
    -2015-12-27  Paul Eggert  
    +2016-01-21  Stephen Berman  
     
    -	Spelling fix
    +	Avoid byte-compiler warning in todo-mode (bug#21953)
     
    -	* test/automated/url-parse-tests.el:
    -	(url-generic-parse-url/same-document-reference):
    -	Rename from url-generic-parse-url/same-decument-reference.
    +	* todo-mode.el (todo-convert-legacy-files): Add limit argument
    +	to looking-back to comply with advertised-calling-convention.
     
    -2015-12-27  Paul Eggert  
    +2016-01-21  Stephen Berman  
     
    -	Reword initial *scratch* for brevity, appearance
    +	Fix desktop support in todo-mode and doc-view (bug#22377)
     
    -	* lisp/startup.el (initial-scratch-message):
    -	Reword to avoid apostrophes, and to make it shorter.
    -	See the thread starting in:
    -	http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg01241.html
    +	* lisp/calendar/todo-mode.el (todo-restore-desktop-buffer):
    +	* lisp/doc-view.el (doc-view-restore-desktop-buffer): Return current buffer.
     
    -2015-12-26  Leo Liu  
    +	* lisp/calendar/todo-mode.el (todo-modes-set-2):
    +	* lisp/doc-view.el (doc-view-mode): Set desktop-save-buffer unconditionally.
     
    -	Add ert-deftest to lisp-mode.el
    +2016-01-20  Paul Eggert  
     
    -	* lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression,
    -	  lisp-el-font-lock-keywords-1): Add ert-deftest.
    +	No need to configure gobject-introspection
     
    -2015-12-26  Lars Ingebrigtsen  
    +	It wasn’t needed for the recently-installed xwidget_mvp code; see:
    +	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01154.html
    +	* configure.ac (DOES_XWIDGETS_USE_GIR, GIR_REQUIRED, GIR_MODULES):
    +	(HAVE_GIR):
    +	* src/Makefile.in (GIR_LIBS, GIR_CFLAGS):
    +	Remove.  All uses removed.
    +	* configure.ac (emacs_config_features): Don’t worry about GIR.
     
    -	Mark imap changes as not needing doc changes
    +2016-01-20  Paul Eggert  
     
    -	* lisp/net/imap.el (imap-ssl-open): Remove
    +	Don’t export C symbols not used elsewhere
     
    -2015-12-26  Lars Ingebrigtsen  
    +	These were recently added, mostly as part of xwidget code.
    +	* src/emacsgtkfixed.c (emacs_fixed_get_type): Now static.
    +	(EMACS_FIXED, EMACS_FIXED_GET_CLASS):
    +	Now static functions here, not macros in emacsgtkfixed.h.
    +	* src/emacsgtkfixed.h (EMACS_TYPE_FIXED):
    +	Remove.  All uses replaced by definiens.
    +	(EMACS_FIXED, EMACS_FIXED_GET_CLASS):
    +	Remove; these are now static functions in emacsgtkfixed.c.
    +	(EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS):
    +	Remove; unused.
    +	(emacs_fixed_get_type): Remove decl; no longer extern.
    +	* src/xwidget.c (offscreen_damage_event)
    +	(webkit_mime_type_policy_typedecision_requested_cb)
    +	(webkit_new_window_policy_decision_requested_cb)
    +	(webkit_navigation_policy_decision_requested_cb)
    +	(xwidget_spec_value, xwidget_view_lookup)
    +	(xwidget_start_redisplay, xwidget_touch):
    +	Now static.
    +	* src/xwidget.h (xwidget_start_redisplay, xwidget_touch):
    +	Remove decls.
     
    -	Use built-in encryption in imap.el
    +2016-01-20  Dmitry Gutov  
     
    -	* lisp/net/imap.el (imap-ssl-program): Remove (bug#21134).
    -	(imap-starttls-open): Use open-network-stream instead of starttls.el.
    -	(imap-tls-open): Use open-network-stream instead of tls.el.
    +	Support squiggly heredocs in ruby-mode
     
    -2015-12-26  Eli Zaretskii  
    +	* lisp/progmodes/ruby-mode.el (ruby-here-doc-beg-re):
    +	Support squiggly heredocs added in Ruby 2.3.
     
    -	Don't try using /bin/sh in artist.el on MS-Windows
    +	* test/indent/ruby.rb: Add squiggly example.
     
    -	* lisp/textmodes/artist.el (artist-figlet-get-font-list-windows):
    -	New function.
    -	(artist-figlet-choose-font): Use it on MS-Windows and MS-DOS.
    -	(Bug#20167)
    +2016-01-20  Glenn Morris  
     
    -2015-12-26  Wolfgang Jenkner  
    +	* configure.ac (emacs_config_features): Remove WEBKIT.
     
    -	Always define gmalloc etc. in src/gmalloc.c
    +2016-01-20  Paul Eggert  
     
    -	This is a work-around to prevent the compiler from using semantic
    -	knowledge about malloc for optimization purposes.  E.g., gcc 5.2
    -	with -O2 replaces most of calloc's definition by a call to calloc;
    -	see Bug#22085.
    -	* src/gmalloc.c [!HYBRID_MALLOC] (malloc, realloc, calloc)
    -	(aligned_alloc, free): Do not undef.  Instead, define these as
    -	functions (perhaps renamed to gmalloc etc.) in terms of gmalloc etc.
    +	Port to platforms with gtk3 but not webkitgtk3
     
    -2015-12-26  Eli Zaretskii  
    +	I ran into this problem on my Fedora 23 installation;
    +	Emacs configured but did not build when --with-xwidgets was specified.
    +	* configure.ac (HAVE_WEBKIT, HAVE_GIR): Omit unnecessary initializations.
    +	(DOES_XWIDGETS_USE_GIR): New var.
    +	If --with-xwidgets is specified, report an error if not
    +	doable, to be consistent with the other --with options.
    +	Require webkitgtk3 to use Xwidgets, as the Xwidgets code does
    +	not work at all without webkitgtk3.  Simplify use of
    +	EMACS_CHECK_MODULES.  Output message about gobject
    +	introspection only if xwidgets are used.
    +	* etc/NEWS: Users need webkitgtk3, not merely webkit.
    +	* src/xwidget.c (syms_of_xwidget): Don’t worry about HAVE_WEBKIT_OSR,
    +	since this file is no longer compiled if webkitgtk3 is not available.
     
    -	Fix documentation of browse-url browser-related functions
    +2016-01-20  Eli Zaretskii  
     
    -	* lisp/net/browse-url.el (browse-url)
    -	(browse-url-default-browser, browse-url-default-windows-browser)
    -	(browse-url-default-macosx-browser, browse-url-chromium)
    -	(browse-url-kde, browse-url-text-xterm): Clarify the usage of ARGS
    -	and NEW-WINDOW arguments in these functions.  (Bug#19421)
    +	Fix doc string of 'isearch-search-fun-function'
     
    -2015-12-26  Paul Eggert  
    +	* lisp/isearch.el (isearch-search-fun-function)
    +	(isearch-search-string): Doc fixes.  (Bug#22411)
     
    -	Propagate Bug#14412 fix to backtrace_eval_unrewind
    +2016-01-19  Stefan Monnier  
     
    -	* src/eval.c (unbind_to): Redo so that the FALLTHROUGH!! comment
    -	becomes accurate again. This shouldn’t affect behavior.
    -	(backtrace_eval_unrewind): Apply the recent unbind_to fix here, too.
    +	* lisp/xwidget.el: Nitpicks
     
    -2015-12-26  Eli Zaretskii  
    +	* lisp/xwidget.el (xwidget-log, xwidget-webkit-callback):
    +	Use with-current-buffer rather than save-excursion + set-buffer.
     
    -	Don't produce non-ASCII characters in *scratch*
    +2016-01-19  Glenn Morris  
     
    -	* lisp/startup.el (initial-scratch-message): Quote apostrophes to
    -	avoid producing non-ASCII characters in the *scratch* buffer's
    -	commentary.
    +	Don't hard-code 1 as point-min.
     
    -2015-12-26  Eli Zaretskii  
    +	* lisp/image-mode.el (image-display-size):
    +	* lisp/xwidget.el (xwidget-webkit-last-session)
    +	(xwidget-webkit-current-session): Don't hard-code 1 as point-min.
     
    -	Document changes in 'compare-windows'
    +2016-01-19  Glenn Morris  
     
    -	* lisp/vc/compare-w.el (compare-windows-removed)
    -	(compare-windows-added): Doc fix.
    +	* lisp/xwidget.el: Add declarations to silence non-xwidget compilation.
     
    -	* doc/emacs/files.texi (Comparing Files): Document the changes in
    -	window selection by 'compare-windows'.
    +2016-01-19  Glenn Morris  
     
    -2015-12-26  Eli Zaretskii  
    +	Trivial doc copyedits.
     
    -	Document 'vc-annotate-background-mode'
    +	* src/xwidget.c (Fmake_xwidget, Fget_buffer_xwidgets)
    +	(Fxwidget_webkit_get_title, Fxwidget_resize)
    +	(Fxwidget_set_adjustment, Fxwidgetp, Fxwidget_view_p)
    +	(Fxwidget_info, Fxwidget_view_lookup)
    +	(Fset_xwidget_query_on_exit_flag): Trivial doc copyedits.
     
    -	* doc/emacs/maintaining.texi (Old Revisions): Document
    -	'vc-annotate-background-mode'.
    +2016-01-19  Glenn Morris  
     
    -2015-12-26  Eli Zaretskii  
    +	Avoid advising image-display-size for xwidgets.
     
    -	Document 'vc-region-history'
    +	* lisp/xwidget.el (xwidget-image-display-size): Remove.
    +	(image-display-size): Remove advice.
    +	* lisp/image-mode.el (xwidget-info, xwidget-at): Declare.
    +	(image-display-size): Incorporate xwidget code directly.
     
    -	* doc/emacs/maintaining.texi (VC Change Log): Document
    -	'vc-region-history'.
    +2016-01-19  Glenn Morris  
     
    -2015-12-26  Eli Zaretskii  
    +	Avoid breaking non-xwidget Emacs that happen to load xwidget.el.
     
    -	Improve documentation of 'vc-push'
    +	* lisp/xwidget.el (window-configuration-change-hook)
    +	(kill-buffer-query-functions): Only modify these hooks if
    +	compiled with xwidget support.
     
    -	* doc/emacs/maintaining.texi (Pulling / Pushing): Expand and
    -	improve the documentation of 'vc-push'.
    +2016-01-19  Glenn Morris  
     
    -	* lisp/vc/vc.el (vc-pull, vc-push): Doc fix.
    +	* lisp/xwidget.el (xwidget-webkit-scroll-behaviour): Fix custom spec.
     
    -2015-12-26  Alain Schneble  
    +	* configure.ac (WEBKIT, GIR, CAIRO): Use EMACS_CHECK_MODULES, not PKG_.
     
    -	Include the tests for the URL parsing fixes
    +	* configure.ac (emacs_config_features): Add XWIDGETS, WEBKIT, GIR.
     
    -2015-12-26  Alain Schneble  
    +	* configure.ac (HAVE_WEBKIT_OSR): Remove broken, duplicated gtk3 test.
     
    -	Make relative URL parsing and resolution consistent with RFC 3986 (bug#22044)
    +2016-01-19  Katsumi Yamaoka  
     
    -	* test/automated/url-parse-tests.el: Add tests covering url-generic-parse-url.
    -	* test/automated/url-expand-tests.el: Add tests covering url-expand-file-name.
    -	* lisp/url/url-parse.el (url-generic-parse-url): Keep empty fragment
    -	information in URL-struct.
    -	* lisp/url/url-parse.el (url-path-and-query): Do not artificially turn empty
    -	path and query into nil path and query, respectively.
    -	* lisp/url/url-expand.el (url-expander-remove-relative-links): Do not turn
    -	empty path into an absolute ("/") path.
    -	* lisp/url/url-expand.el (url-expand-file-name): Properly resolve
    -	fragment-only URIs. Do not just return them unchanged.
    -	* lisp/url/url-expand.el (url-default-expander): An empty path in the relative
    -	reference URI should not drop the last segment.
    +	* lisp/gnus/nnir.el (nnir-request-update-mark):
    +	Default to the original mark.
    +	cf. 
    +	and 
     
    -	Backport:
    +2016-01-19  Glenn Morris  
     
    -	(cherry picked from commit b792ecea1715e080ad8e232d3d154b8a25d2edfb)
    +	* lisp/xwidget.el (report-xwidget-bug): Remove.
     
    -2015-12-26  Eli Zaretskii  
    +	(top-level): No longer require reporter.
     
    -	Document 'url-user-agent'.
    +2016-01-19  Joakim Verona  
    +	    Grégoire Jadi  
     
    -	* lisp/url/url-http.el (url-user-agent): Move from here...
    -	* lisp/url/url-vars.el (url-user-agent): ...to here.  This is to
    -	keep all the URL defcustoms in one place, and also have it defined
    -	whenever the URL library is loaded.
    +	Support for the new Xwidget feature.
     
    -	* doc/misc/url.texi (Customization): Document 'url-user-agent'.
    +	* configure.ac:
    +	(HAVE_XWIDGETS, WIDGET_OBJ, EMACS_CONFIG_FEATURES):
    +	* xterm.c (x_draw_glyph_string, x_draw_bar_cursor):
    +	* xdisp.c:
    +	(handle_display_spec, handle_single_display_spec, push_it)
    +	(pop_it, set_iterator_to_next, dump_glyph)
    +	(calc_pixel_width_or_height, fill_xwidget_glyph_string)
    +	(BUILD_XWIDGET_GLYPH_STRING, BUILD_GLYPH_STRINGS)
    +	(produce_xwidget_glyph, x_produce_glyphs)
    +	(get_window_cursor_type):
    +	* window.c (Fdelete_window_internal):
    +	* termhooks.h (e):
    +	* print.c (print_object):
    +	* lisp.h (ptrdiff_t):
    +	* keyboard.c (kbd_buffer_get_event, make_lispy_event)
    +	(syms_of_keyboard):
    +	* emacs.c (main):
    +	* dispnew.c (update_window, scrolling_window):
    +	* dispextern.h (g, i):
    +	* Makefile.in (XWIDGETS_OBJ, WEBKIT_CFLAGS, WEBKIT_LIBS)
    +	(GIR_LIBS, ALL_CFLAGS, base_obj, LIBES):
    +	* keyboard.c (kbd_buffer_get_event):
    +	* emacsgtkfixed.c (emacs_fixed_gtk_widget_size_allocate)
    +	(emacs_fixed_class_init): Add case for an xwidget view.
     
    -2015-12-26  Eli Zaretskii  
    +	* xwidget.c, xwidget.h, xwidget.el: New files for xwidgets
     
    -	Document protocols supported by URL library via Tramp
     
    -	* doc/misc/url.texi (Tramp): New node, describes the URL schemes
    -	supported via Tramp.
    -	(Supported URL Types, file/ftp, rlogin/telnet/tn3270): Mention
    -	Tramp.
    +	Various improvements to the Xwidget feature.
    +	* xwidgets.c:
    +	* emacsgtkfixed.c:
    +	* xwidget.el:
     
    -2015-12-26  Eli Zaretskii  
    +2016-01-19  Eli Zaretskii  
     
    -	Document changes in Shell-script mode
    +	Improve documentation of 'alist-get'
     
    -	* lisp/progmodes/sh-script.el (sh-mode, sh-set-shell): Document
    -	the 'sh-shell' file-local variable.
    -	(top level): Add an auto-load form to avoid byte-compiler warning
    -	about 'comint-send-string'.
    +	* doc/lispref/variables.texi (Setting Generalized Variables): Add
    +	'alist-get' to the list of functions that can appear in PLACE
    +	argument of 'setf'.
     
    -2015-12-26  Eli Zaretskii  
    +2016-01-19  Eli Zaretskii  
     
    -	Fix documentation of 'ses-define-local-printer'
    +	Minor copyedits of doc/emacs/maintaining.texi
     
    -	* doc/misc/ses.texi (Printer functions): Fix whitespace between
    -	sentences and punctuation.  Add an index entry for
    -	'ses-define-local-printer'.
    +	* doc/emacs/maintaining.texi (List Identifiers): More accurate
    +	description of "C-M-i" wrt tags tables.
    +	(Tags Tables): Move the definition of "tag" to a footnote.
     
    -2015-12-26  Shakthi Kannan  
    +2016-01-19  Eli Zaretskii  
     
    -	Document 'ert-summarize-tests-batch-and-exit'
    +	Unbreak the Cygwin-w32 build
     
    -	* doc/misc/ert.texi (Running Tests in Batch Mode): Document
    -	'ert-summarize-tests-batch-and-exit'.
    -
    -2015-12-26  Eli Zaretskii  
    -
    -	Avoid assertion violation in unbind_to
    -
    -	* src/eval.c (unbind_to) : Avoid assertion violation
    -	if we get here with an object that is not a symbol.  (Bug#14412)
    -
    -2015-12-25  Andreas Schwab  
    -
    -	Don't treat /foo/bar:mumble as ange-ftp address
    -
    -		* lisp/net/browse-url.el (browse-url-filename-alist): Match colons
    -		only in the first component.  (bug#5362)
    -
    -2015-12-25  Lars Ingebrigtsen  
    -
    -	Follow  redirects in eww
    -
    -	Merge conflict, but I think I resolved it.
    -
    -	    Follow meta refresh tags in eww
    -
    -	    * eww.el (eww-tag-meta): Follow meta refresh tags (bug#22234).
    -
    -	Backport:
    +	* src/w32fns.c (globals_of_w32fns): Move the initialization of
    +	resetstkoflw into a part that isn't compiled on Cygwin.
    +	(Bug#22403)
     
    -2015-12-25  Lars Ingebrigtsen  
    +2016-01-19  Lars Magne Ingebrigtsen  
     
    -	Allow http://user:pass@foo/ URLs again
    +	* shr.el (shr-table-body): Allow tables to have text children.
     
    -	* lisp/url/url-auth.el (url-basic-auth): Allow explicit
    -	user/passwords in URLs (bug#19046).
    +2016-01-19  Phillip Lord  
     
    -	Backport:
    +	Cope with multiple overlapping faces.
     
    -	(cherry picked from commit b563715a2db265517d5a77f165a42afa1e233fdd)
    +	* lisp/htmlfontify.el (hfy-face-to-style-i): Treat inheritance right to
    +	  left.
    +	  (hfy-face-resolve-face): Handle font specification as well as font
    +	  name. Documentation update. (Bug#21990)
     
    -2015-12-25  Samer Masterson  
    +2016-01-18  Paul Eggert  
     
    -	Autoload url-insert-buffer-contents
    +	Fix spurious escapes in describe-input-method
     
    -	* lisp/url/url-handlers.el: Add autoload cookie so that
    -	`package-list-packages' doesn't bug out (bug#21927) (tiny change)
    +	Problem reported by Vincent Belaïche (Bug#22309).
    +	* lisp/international/mule-cmds.el (describe-language-environment):
    +	* lisp/international/quail.el (quail-help):
    +	Apply substitute-command-keys to doc strings before displaying them.
     
    -	Backport:
    +2016-01-30  Nicolas Petton  
     
    -	(cherry picked from commit 7a7b5b492ff9929eecd90c4564db6fbf3b192323)
    +	Bump version to 25.0.90
     
    -2015-12-25  Eli Zaretskii  
    +	* README:
    +	* configure.ac:
    +	* msdos/sed2v2.inp: Bump version to 25.0.90.
     
    -	Make sure *scratch* etc. use forward slashes in its default-directory
    +2016-01-30  Nicolas Petton  
     
    -	* lisp/startup.el (normal-top-level): On MS-Windows, convert
    -	backslashes to forward slashes while decoding default-directory
    -	of the initially-created buffers.
    +	* etc/AUTHORS: Update the AUTHORS file
     
    -2015-12-25  Lars Ingebrigtsen  
    +2016-01-30  Nicolas Petton  
     
    -	More eww file name coding fixes
    +	authors.el updates
     
    -	* eww.el (eww-decode-url-file-name): Use the base coding
    -	system to check for encodability.
    +	* admin/authors.el (authors-renamed-files-alist): Additions.
     
    -	Backport:
    +2016-01-30  Nicolas Petton  
     
    -	(cherry picked from commit a8627008abe4ab339df19b417776da28b3ce0fc7)
    +	Make it possible to run make change-history on emacs-25
     
    -2015-12-25  Lars Ingebrigtsen  
    +	* Makefile.in: Check if the current branch is emacs-25 instead of
    +	  master.
     
    -	Always save eww history
    +2016-01-30  lu4nx  
     
    -	* eww.el (eww-setup-buffer): Always save history, even when
    -	called from outside the eww buffer (bug#19638).
    +	Support Go language in 'etags'
     
    -	Backport:
    +	* lib-src/etags.c : Fix documentation of Ruby tags.
    +	: New help.
    +	: New variable.
    +	(Go_functions): New function.
    +	: Add entry for Go.  (Bug#22370)
     
    -	(cherry picked from commit 2a0f18d9b6ce0ccce3d9c4a4a3b5743bae71b41e)
    +	* doc/emacs/maintaining.texi (Tag Syntax): Document Go support.
    +	* doc/man/etags.1: Mention Go support.
     
    -2015-12-25  Lars Ingebrigtsen  
    +	* etc/NEWS: Mention Go support.
     
    -	Default web pages to right-to-left
    +	* test/etags/go-src/test.go:
    +	* test/etags/go-src/test1.go: New test files.
    +	* test/etags/Makefile (GOSRC): New variable.
    +	(SRCS): Add $(GOSRC).
    +	* test/etags/ETAGS.good_1:
    +	* test/etags/ETAGS.good_2:
    +	* test/etags/ETAGS.good_3:
    +	* test/etags/ETAGS.good_4:
    +	* test/etags/ETAGS.good_5:
    +	* test/etags/ETAGS.good_6:
    +	* test/etags/CTAGS.good: Adapt to addition of Go tests.
     
    -	* eww.el (eww-mode): Most web pages are left-to-right, so make
    -	that the default (bug#19801).
    +2016-01-30  Eli Zaretskii  
     
    -	* shr.el (shr-tag-html): Respect "dir" attributes
    -	(left-to-right, right-to-left).
    +	Improve Ruby support in 'etags'
     
    -	Backport:
    +	* lib-src/etags.c (Ruby_functions): Tag constants.  Don't tag
    +	singleton classes.  Remove class qualifiers from tags generated
    +	for method and constant names.  (Bug#22241)
     
    -	(cherry picked from commit 9e089ec8a380ec3758fcf1564c5f86dc92c68c2a)
    +	* doc/emacs/maintaining.texi (Tag Syntax): Mention that constants
    +	are tagged by etags in Ruby.
     
    -2015-12-25  Lars Ingebrigtsen  
    +	* etc/NEWS: Mention that constants are tagged by etags in Ruby.
     
    -	Make toggling checkboxes work again
    +	* test/etags/ruby-src/test1.ruby: Add more tests.
    +	* test/etags/ETAGS.good_1:
    +	* test/etags/ETAGS.good_2:
    +	* test/etags/ETAGS.good_3:
    +	* test/etags/ETAGS.good_4:
    +	* test/etags/ETAGS.good_5:
    +	* test/etags/ETAGS.good_6:
    +	* test/etags/CTAGS.good: Adapt to the changes in etags and in Ruby
    +	tests.
     
    -	* eww.el (eww-update-field): Make toggling checkboxes work
    -	again (bug#21881).
    +2016-01-30  Eli Zaretskii  
     
    -	Backport:
    +	Adjust etags test results to changes in copyright years
     
    -	(cherry picked from commit 5e56f606952e5e81b4d3a93ea70e791b74b33041)
    +	* test/etags/CTAGS.good:
    +	* test/etags/ETAGS.good_1:
    +	* test/etags/ETAGS.good_2:
    +	* test/etags/ETAGS.good_3:
    +	* test/etags/ETAGS.good_4:
    +	* test/etags/ETAGS.good_5:
    +	* test/etags/ETAGS.good_6: Adjust to shift in characters and
    +	in line numbers.
     
    -2015-12-25  Lars Ingebrigtsen  
    +2016-01-30  Andreas Schwab  
     
    -	Don't store cookies with empty names
    +	Revert "Re-enable checks in member, memql, delete to complain about non-lists"
     
    -	* lisp/url/url-cookie.el (url-cookie-store): Refuse to store
    -	cookies with empty names (bug#21936).
    +	This reverts commit f524e8b7f12d9b5a8b92084e5385429fe7b085b9.
     
    -	Backport:
    +2016-01-30  Nicolas Petton  
     
    -	(cherry picked from commit 9f0fd7cb1aec3eb9e2e0f7b8854c30870286d96c)
    +	Make it possible to run make change-history on emacs-25
     
    -2015-12-25  Lars Ingebrigtsen  
    +	* Makefile.in: Check if the current branch is emacs-25 instead of
    +	  master.
     
    -	Stop rendering HTML before specdlr exhaustion
    +2016-01-30  Dmitry Gutov  
     
    -	Fixes: 22117
    +	Don't fiddle with DEFAULT
     
    -	* shr.el (shr-descend): Stop rendering before we run out of
    -	specpdl room (bug#22117).
    +	* lisp/progmodes/project.el (project--completing-read-strict):
    +	Don't change DEFAULT, whether is has any matches in
    +	COLLECTION, or not.
     
    -	Backport:
    +2016-01-30  Eli Zaretskii  
     
    -	(cherry picked from commit 248da292fe46224b0b5a79b632c89cf4de2c2081)
    +	Document xwidget commands and functions
     
    -2015-12-25  Lars Ingebrigtsen  
    +	* doc/lispref/display.texi (Xwidgets): New section, describes some
    +	of the xwidget primitives.
    +	* doc/lispref/display.texi (Display): Update the chapter menu.
    +	* doc/emacs/misc.texi (Embedded WebKit Widgets): New section.
    +	* doc/emacs/emacs.texi (Top): Update the master menu to include
    +	the xwidget node.
     
    -	Use cl-reduce, not reduce.
    +2016-01-30  Lars Ingebrigtsen  
     
    -	Backport:
    +	Build fix for shr.el
     
    -	(cherry picked from commit fe4606f93b91ff3d046aee0cf21ecc277af7a786)
    +	* shr.el (seq): Require.
     
    -2015-12-25  Lars Ingebrigtsen  
    +2016-01-30  Dmitry Gutov  
     
    -	Allow several  tags in shr
    +	Improve project-find-file yet again!
     
    -	* shr.el (shr-table-body): New function to find the real body
    -	of a table.
    -	(shr-tag-table): Use it to render several  tags in a
    -	table (bug#22170).
    +	* lisp/progmodes/project.el (project--completing-read-strict):
    +	New function.
    +	(project-find-file-in): Use it.
    +	(project-file-completion-table): Move the default
    +	implementation inside the cl-defgeneric form.
    +	(http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01720.html)
     
    -	Backport:
    +2016-01-30  Dmitry Gutov  
     
    -	(cherry picked from commit cdaf33029d6620073833876d76056045ecfbc7c4)
    +	Don't pass DIR to 'hg status'
     
    -2015-12-25  Lars Ingebrigtsen  
    +	* lisp/vc/vc-hg.el (vc-hg-dir-status-files):
    +	Don't pass DIR to 'hg status' (bug#22481).
     
    -	Make prettier unique file names in eww
    +2016-01-30  Stephen Leake  
     
    -	(eww-make-unique-file-name): Make unique file names by making
    -	files like foo(2).jpg instead of foo(1)(2).jpg.
    +	Fix typo in previous commits
     
    -	Backport:
    +	* lisp/progmodes/project.el (project-find-file-in):
    +	* lisp/vc/vc-mtn.el (vc-mtn-find-ignore-file): Fix typo in previous
    +	commit.
     
    -	(cherry picked from commit edfdd0a6cbdfa9e5e4bd0553e2b489401ca39266)
    +2016-01-30  Stephen Leake  
     
    -2015-12-25  Lars Ingebrigtsen  
    +	Improve project-find-file
     
    -	Decode hex-encoded URLs before using them as file names
    +	* lisp/progmodes/project.el (project-file-completion-table): New.
    +	(project-find-file, project-or-external-find-file): Default to filename
    +	at point.
    +	(project-file-completion-table): New, split out from
    +	project--find-file-in.
    +	(project-find-file-in): Renamed from project--find-file-in, use
    +	project-file-completion-table.
     
    -	* eww.el (eww-decode-url-file-name): New function.
    -	(eww-download-callback): Use it to decode file names before
    -	saving them.
    +	* lisp/progmodes/xref.el (ede-minor-mode): New declaration.
    +	(xref--find-ignores-arguments): Add doc string.
     
    -	Backport:
    +2016-01-30  Stephen Leake  
     
    -	(cherry picked from commit af22a010d87516c2a646572fb27512c03057784f)
    +	Implement vc-mtn-find-ignore-file, fix some doc strings
     
    -2015-12-25  Ashish SHUKLA  
    +	* lisp/cedet/cedet-global.el (cedet-gnu-global-root): Improve doc string.
     
    -	Add FreeBSD cert bundle
    +	* lisp/cedet/ede/locate.el (initialize-instance): Improve doc string.
     
    -	* doc/misc/emacs-gnutls.texi (Help For Users): Document
    -	FreeBSD bundle.
    +	* lisp/vc/vc-git.el (vc-git-find-ignore-file): Fix doc string.
     
    -	* lisp/net/gnutls.el (gnutls-trustfiles): Add FreeBSD cert bundle.
    +	* lisp/vc/vc-mtn.el (vc-mtn-find-ignore-file): New function.
     
    -	Backport:
    +2016-01-23  Michael Albinus  
     
    -	(cherry picked from commit 60c0f1a18ad88d6dc1a8f4ee5d9d18940eaeb6f7)
    +	Improve user name completion in Tramp
     
    -2015-12-25  Lars Ingebrigtsen  
    +	* lisp/net/tramp.el (tramp-parse-passwd, tramp-parse-etc-group):
    +	Call also "getent passwd" or "getent group", if possible.
    +	(tramp-parse-putty): Cache the result.
     
    -	Ignore invalid SVG images
    +2016-01-22  Michael Albinus  
     
    -	* shr.el (shr-tag-svg): Ignore SVG images that have no width
    -	or height, because these can't be displayed by ImageMagick,
    -	anyway.
    +	* etc/NEWS: Move kqueue entries to Emacs 25.1 sections.
     
    -	Backport:
    +2016-01-20  Glenn Morris  
     
    -	(cherry picked from commit 821107d53c2e390240d25c036b99ebbf9b4a93b6)
    +	Remove handling of non-string time-stamp formats, obsolete for 20 years.
     
    -2015-12-25  Lars Ingebrigtsen  
    +	* lisp/time-stamp.el (time-stamp-format): Doc fix.
    +	(time-stamp-old-format-warn, time-stamp-fconcat): Remove.
    +	(time-stamp-string): Ignore non-string formats.
     
    -	shr table rendering fix
    +2016-01-20  Eli Zaretskii  
     
    -	* shr.el (shr-tag-table): Allow rendering body-less tables
    -	that have headers.
    +	Anoter fix for problematic merge from emacs-25
     
    -	Backport:
    +	* src/w32fns.c (globals_of_w32fns): Move initialization of
    +	resetstkoflw to a non-Cygwin part.
     
    -	(cherry picked from commit b05471e42c17e02c56c87d7599ada0c124a5fe09)
    +2016-01-20  Michael Albinus  
     
    -2015-12-25  Eli Zaretskii  
    +	* test/Makefile.in (mostlyclean): Use ${LOGFILES}.
     
    -	Restore info about the build host in bug reports
    +2016-01-20  Eli Zaretskii  
     
    -	* lisp/mail/emacsbug.el (report-emacs-bug): Report the system on
    -	which Emacs was built.  This is important information for
    -	investigating bug reports reported by users who don't build their
    -	Emacs.
    +	Fix MS-Windows build broken by a botched merge from emacs-25
     
    -2015-12-25  Eli Zaretskii  
    +	* src/w32.c (w32_crypto_hprov): New static variable.
    +	(globals_of_w32): Initialize w32_crypto_hprov.
    +	(w32_init_crypt_random, w32_init_random): New functions.
    +	Include wincrypt.h.
    +	* src/w32.h (w32_init_random): Add prototype.
     
    -	Fix bootstrap broken by changes related to OS X file-name encoding
    +2016-01-20  Vincent Belaïche  
     
    -	* lisp/international/ucs-normalize.el (eval-when-compile): Make
    -	sure char-code-property-alist includes elements that allow access
    -	to 'decomposition' and 'canonical-combining-class' Unicode
    -	properties, as compiling ucs-normalize.el requires that.
    -	* lisp/loadup.el (featurep 'ns): Load ucs-normalize and ns-win
    -	only of charprop.el was already loaded.
    +	Correct a whole bunch of bugs coming with renamed cell relocation.
     
    -	* src/Makefile.in ($(lispsource)/international/ucs-normalize.elc):
    -	New order-only dependency.
    +	* lisp/ses.el (ses-localvars): rename variable
    +	`ses--renamed-cell-symb-list' into `ses--in-killing-named-cell-list'
    +	and adjust the comment about it.
    +	(ses-plist-delq): new defun.
    +	(ses--ses-buffer-list): new defvar.
    +	(ses--unbind-cell-name): new defun.
    +	(ses-relocate-symbol): Do not relocate symbol when it is a named cell.
    +	(ses-relocate-formula): Undo change of
    +	2011-12-27T19:30:39Z!vincentb1@users.sourceforge.net that was
    +	preventing relocation for named cell --- now doing this is delegated
    +	to function `ses-relocate-symbol'.
    +	(ses-relocate-range): In docstring, undo change of
    +	2016-01-03T07:31:52Z!johnw@newartisans.com, `ses-range' must remain
    +	lower case as it is not a variable.
    +	(ses-relocate-all): Cell name relocation : 1) check that cell is a
    +	renamed cell by testing `ses-cell' property to :ses-named, rather than
    +	comparing name to corresponding standard name. Set rowcol of renamed
    +	cell into the hashmap --- `ses-cell' property must not be used for
    +	that as the same name can be used for different locations in different
    +	SES sheets ; 2) use `local-variable-if-set-p' rather than `boundp' and
    +	`local-variable-p' to check if cell name is already in use in this
    +	sheet or needs initialization.
    +	(ses-relocate-all): Cell value relocation : 1) like for name
    +	relocation use the `ses-cell' property rather than comparing actual
    +	name to corresponding standard name. 2) Correct bug introduced in
    +	2011-12-27T19:30:39Z!vincentb1@users.sourceforge.net, as the test was
    +	made the other way round than the intention --- ie value relocation
    +	was disabled for standard cell, not for renamed cell as was the
    +	intention.
    +	(ses-relocate-all): Add loop for unbinding deleted renamed cells
    +	names.
    +	(ses-killbuffer-hook): new defun.
    +	(ses-mode): Add the ses--ses-buffer-list maintenance mechanism ---
    +	kill buffer hook, plus pushing current buffer if new in list.
    +	(ses-delete-row, ses-delete-column): Collect deleted renamed cells
    +	into `ses--in-killing-named-cell-list'.
    +	(ses-rename-cell): Remove update of variable
    +	`ses--renamed-cell-symb-list', this variable is renamed to
    +	`ses--in-killing-named-cell-list', and its setting is done in
    +	functions `ses-delete-row' and , `ses-delete-column' now.
    +	(ses-rename-cell): Make cell new name a buffer local variable.
    +	(ses-rename-cell): Change correction of
    +	2015-12-30T23:10:37Z!vincentb1@users.sourceforge.net concerning
    +	computation of the range over which `cursor-intangible' property was
    +	to be updated. This correction was ok for non spilling cells, but not
    +	for cells spilling over following blank cells. Simply use
    +	`next-single-property-change' rather than computing the end column
    +	from column widths.
     
    -2015-12-25  Leo Liu  
    +2016-01-19  John Wiegley  
     
    -	* lisp/ido.el (ido-add-virtual-buffers-to-list): Use bookmark-get-filename.
    +	Merge from origin/emacs-25
     
    -2015-12-25  Michael Albinus  
    +	3ae7934 ; * etc/NEWS: Mark entries that don't need further treatment.
    +	6165c36 * lisp/files.el (dir-locals--all-files): Respect absolute file-names
    +	2ffdf15 * lisp/help-fns.el (describe-variable): Fix a left-over parenthesis
    +	71ecd62 * lisp/dired-x.el (dired-omit-here-always): Use add-dir-local-variable
    +	f0b82b3 * lisp/files.el (dir-locals--all-files): Use completion instead of wildcards
    +	86e4513 Fix incompatbilities with MS-Windows 2000 and older
    +	4e96521 Mention in PROBLEMS an issue with MS-Windows NT4
    +	15c23aa Ensure 8-byte aligned memory allocation on MS-Windows 9X
    +	39afa42 Fix tests for active region in hideif.el
    +	05df666 Fix interactive specs in some hideif.el commands
     
    -	Make tramp-test29-vc-registered more robust
    +2016-01-19  John Wiegley  
     
    -	* test/automated/tramp-tests.el (tramp-test29-vc-registered):
    -	Move `bzr' case down.  Skip test when `vc-create-repo' fails.
    -	Remove instrumentation.
    +	-
     
    -2015-12-24  YAMAMOTO Mitsuharu  
    +2016-01-19  Paul Eggert  
     
    -	* lisp/term/x-win.el (x-gtk-stock-map): Fix typo.
    +	Avoid stdio in SIGINT handler
     
    -2015-12-24  Katsumi Yamaoka  
    +	* admin/merge-gnulib (GNULIB_MODULES): Add ignore-value.
    +	* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
    +	* lib/ignore-value.h: New file, from gnulib.
    +	* src/keyboard.c: Include it.
    +	(write_stdout, read_stdin): New functions.
    +	(handle_interrupt): Use them instead of printf and getchar,
    +	and avoid fflush when handling signals.
     
    -	Fix `gnus-union' so as to behave like `cl-union'
    +2016-01-19  Jens Lechtenboerger  
     
    -	* lisp/gnus/gnus-group.el (gnus-group-prepare-flat):
    -	Make gnus-union use `equal' to compare items in lists.
    +	Refactor mml-smime.el, mml1991.el, mml2015.el
     
    -	* lisp/gnus/gnus-util.el (gnus-union):
    -	Make it behave like cl-union partially.
    +	(Maybe this is the last merge from Gnus git to Emacs git)
     
    -2015-12-23  Paul Eggert  
    +	Cf. discussion on ding mailing list, messages in
    +	.
    +	Common code from the three files mml-smime.el, mml1991.el, and
    +	mml2015.el is moved to mml-sec.el.  Auxiliary functions are added
    +	to gnus-util.el.
     
    -	Fix dired.c typo with ptrdiff_t vs Lisp_Object
    +	The code is supported by test cases with necessary test keys.
     
    -	* src/dired.c (file_name_completion): Don't assume Lisp_Object is
    -	an integer type, fixing a problem introduced in the recent fix for
    -	Bug#22169.
    +	Documentation in message.texi is updated.
     
    -2015-12-23  Eli Zaretskii  
    +	* doc/misc/message.texi (Security, Using S/MIME):
    +	Update for refactoring mml-smime.el, mml1991.el, mml2015.el.
    +	(Using OpenPGP): Rename from "Using PGP/MIME"; update contents.
    +	(Passphrase caching, Encrypt-to-self, Bcc Warning): New sections.
     
    -	Document default process sentinel more prominently
    +	* lisp/gnus/gnus-util.el (gnus-test-list, gnus-subsetp, gnus-setdiff):
    +	New functions.
     
    -	* doc/lispref/processes.texi (Asynchronous Processes): Mention the
    -	defaults for process filter and sentinel.  Provide cross-references.
    -	(Process Information): Provide cross-references to where filters
    -	and sentinels are described.
    -	(Filter Functions): Add an index entry for "default filter".
    -	(Sentinels): Add a few status messages not documented previously.
    -	Resolve the "killed" confusion.  Document and describe the default
    -	sentinel.  (Bug#22220)
    +	* lisp/gnus/mml-sec.el: Require gnus-util and epg.
    +	(epa--select-keys): Autoload.
    +	(mml-signencrypt-style-alist, mml-secure-cache-passphrase): Doc fix.
    +	(mml-secure-openpgp-signers): New user option;
    +	make mml1991-signers and mml2015-signers obsolete aliases to it.
    +	(mml-secure-smime-signers): New user option;
    +	make mml-smime-signers an obsolete alias to it.
    +	(mml-secure-openpgp-encrypt-to-self): New user option;
    +	make mml1991-encrypt-to-self and mml2015-encrypt-to-self obsolete
    +	aliases to it.
    +	(mml-secure-smime-encrypt-to-self): New user option;
    +	make mml-smime-encrypt-to-self an obsolete alias to it.
    +	(mml-secure-openpgp-sign-with-sender): New user option;
    +	make mml2015-sign-with-sender an obsolete alias to it.
    +	(mml-secure-smime-sign-with-sender): New user option;
    +	make mml-smime-sign-with-sender an obsolete alias to it.
    +	(mml-secure-openpgp-always-trust): New user option;
    +	make mml2015-always-trust an obsolete alias to it.
    +	(mml-secure-fail-when-key-problem, mml-secure-key-preferences):
    +	New user options.
    +	(mml-secure-cust-usage-lookup, mml-secure-cust-fpr-lookup)
    +	(mml-secure-cust-record-keys, mml-secure-cust-remove-keys)
    +	(mml-secure-add-secret-key-id, mml-secure-clear-secret-key-id-list)
    +	(mml-secure-cache-passphrase-p, mml-secure-cache-expiry-interval)
    +	(mml-secure-passphrase-callback, mml-secure-check-user-id)
    +	(mml-secure-secret-key-exists-p, mml-secure-check-sub-key)
    +	(mml-secure-find-usable-keys, mml-secure-select-preferred-keys)
    +	(mml-secure-fingerprint, mml-secure-filter-keys)
    +	(mml-secure-normalize-cust-name, mml-secure-select-keys)
    +	(mml-secure-select-keys-1, mml-secure-signer-names, mml-secure-signers)
    +	(mml-secure-self-recipients, mml-secure-recipients)
    +	(mml-secure-epg-encrypt, mml-secure-epg-sign): New functions.
     
    -2015-12-23  Eli Zaretskii  
    +	* lisp/gnus/mml-smime.el: Require epg;
    +	refactor declaration and autoloading of epg functions.
    +	(mml-smime-use): Doc fix.
    +	(mml-smime-cache-passphrase, mml-smime-passphrase-cache-expiry):
    +	Obsolete.
    +	(mml-smime-get-dns-cert, mml-smime-get-ldap-cert):
    +	Use format instead of gnus-format-message.
    +	(mml-smime-epg-secret-key-id-list): Remove variable.
    +	(mml-smime-epg-passphrase-callback, mml-smime-epg-find-usable-key)
    +	(mml-smime-epg-find-usable-secret-key): Remove functions.
    +	(mml-smime-epg-sign, mml-smime-epg-encrypt): Refactor.
     
    -	Fix file-name completion on OS X
    +	* lisp/gnus/mml1991.el (mml1991-cache-passphrase)
    +	(mml1991-passphrase-cache-expiry): Obsolete.
    +	(mml1991-epg-secret-key-id-list): Remove variable.
    +	(mml1991-epg-passphrase-callback, mml1991-epg-find-usable-key)
    +	(mml1991-epg-find-usable-secret-key): Remove functions.
    +	(mml1991-epg-sign, mml1991-epg-encrypt): Refactor.
     
    -	* src/dired.c (file_name_completion): Reject false matches due to
    -	file-name-coding-systems that decompose characters when encoding
    -	file names, by comparing decoded file names as well.  (Bug#22169)
    -	(syms_of_dired) : New DEFSYM.
    +	* lisp/gnus/mml2015.el (mml2015-cache-passphrase)
    +	(mml2015-passphrase-cache-expiry): Obsolete.
    +	(mml2015-epg-secret-key-id-list): Remove variable.
    +	(mml2015-epg-passphrase-callback, mml2015-epg-check-user-id)
    +	(mml2015-epg-check-sub-key, mml2015-epg-find-usable-key)
    +	(mml2015-epg-find-usable-secret-key): Remove functions.
    +	(mml2015-epg-decrypt, mml2015-epg-clear-decrypt, mml2015-epg-sign)
    +	(mml2015-epg-encrypt): Refactor.
     
    -	* lisp/international/ucs-normalize.el (utf-8-hfs): Give it a
    -	non-nil 'decomposed-characters' property.
    +2016-01-19  Paul Eggert  
     
    -2015-12-23  Anders Lindgren  
    +	Merge from gnulib
     
    -	File-name completion of non-ASCII characters on OS X (bug#22169)
    +	This mostly just updates copyright dates of gnulib files.
    +	It also updates to the latest version of texinfo.tex.
     
    -	The coding system `utf-8-nfd', locally defined in ns-win.el,
    -	didn't provide a :pre-write-conversion method, causing file name
    -	completion of non-ASCII characters to fail.  Solved by using the
    -	`utf-8-hfs' coding system provided by `ucs-normalize'.
    +2016-01-19  YAMAMOTO Mitsuharu  
     
    -	* lisp/loadup.el: Load international/ucs-normalize (when building
    -	for ns).
    +	Move variables to inner loop, preparing for Mac port merge
     
    -	* lisp/term/ns-win.el (utf-8-nfd): Made `utf-8-nfd' as alias for
    -	`utf-8-hfs' and removed the old implementation.  Set `utf-8-hfs'
    -	as the file name coding system.
    +	* src/keyboard.c (command_loop_1): Move variables `cmd',
    +	`keybuf', and `i' to inner loop.
     
    -	* src/nsfns.m (ns-convert-utf8-nfd-to-nfc): Removed.
    +2016-01-19  Paul Eggert  
     
    -2015-12-23  Tom Tromey  
    +	Minor improvements to (random t) documentation
     
    -	Fix bug #18588 by making bug-reference-bug-regexp more lenient
    +	* doc/lispref/numbers.texi (Random Numbers):
    +	* src/fns.c (Frandom):
    +	Omit unnecessary details about randomness fallback.
    +	Say that it is a fallback.
     
    -	* lisp/progmodes/bug-reference.el (bug-reference-bug-regexp): Accept
    -	"bug NNNN".  (Bug #18588)
    +2016-01-19  Dmitry Gutov  
     
    -2015-12-23  Tom Tromey  
    +	Rename methods in Ruby etags example file
     
    -	add some cl-* aliases to lisp-mode imenu
    +	* test/etags/ruby-src/test.rb: Rename the example methods to
    +	correspond to the common terminology used in Ruby.
    +	* test/etags/CTAGS.good:
    +	* test/etags/ETAGS.good_1:
    +	* test/etags/ETAGS.good_2:
    +	* test/etags/ETAGS.good_3:
    +	* test/etags/ETAGS.good_4:
    +	* test/etags/ETAGS.good_5:
    +	* test/etags/ETAGS.good_6: Adjust accordingly.
     
    -	* (lisp-imenu-generic-expression): Add cl-define-compiler-macro,
    -	cl-defgeneric, and cl-defmethod.
    +2016-01-18  Dmitry Gutov  
     
    -2015-12-22  Tom Tromey  
    +	Propertize backtick in 'def `(abc)' as symbol constituent
     
    -	Make a variable buffer-local
    +	* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
    +	Propertize backtick in 'def `(abc)' as symbol constituent.
    +	(ruby-syntax-propertize-function):
    +	Rename to ruby-syntax-propertize.
     
    -	* lisp/generic-x.el (generic-rul-mode-setup-function): Make
    -	font-lock-syntax-table buffer-local.  (Bug #21627)
    +2016-01-18  Eli Zaretskii  
     
    -2015-12-22  Eli Zaretskii  
    +	Fix scrolling under scroll-preserve-screen-position on TTY
     
    -	Fix decoding of text in URLs retrieved by EWW
    +	* src/window.c (window_scroll_line_based): When setting point to
    +	preserve screen coordinates, don't let cursor enter either of the
    +	two scroll margins.  (Bug#22395)
     
    -	* lisp/net/eww.el (eww-render): Pass 'charset' to
    -	'eww-display-raw'.  Use the value of 'last-coding-system-used', if
    -	non-nil, to set 'buffer-file-coding-system' of the buffer where we
    -	show the URL.
    -	(eww-display-html, eww-display-raw): Decode the text correctly,
    -	using the charset found in the headers, and defaulting to UTF-8.
    -	If the user told us to use a specific encoding, override the
    -	charset from the headers.  (Bug#22222)
    +2016-01-18  Lars Magne Ingebrigtsen  
     
    -2015-12-22  Alan Mackenzie  
    +	Fix shr table rendering of nested tables
     
    -	Fix a coding error in c-forward-<>-arglist-recur.  Fixes bug#22156
    +	* shr.el (shr-table-body): Don't include all tbodies in nested
    +	tables in the levels above.
     
    -	* lisp/progmodes/cc-engine.el (c-forward-<>-arglist-recur): Remove unused
    -	variable `tmp'.
    -	After a failed search for a matching ">", restore point before continuing.
    +2016-01-18  Dmitry Gutov  
     
    -2015-12-22  Michael Albinus  
    +	* lisp/progmodes/project.el (project--read-regexp): Quote the identifier.
     
    -	Instrument Tramp tests
    +2016-01-18  Dmitry Gutov  
     
    -	* test/automated/tramp-tests.el (tramp-test29-vc-registered)
    -	(tramp--test-utf8): Instrument tests.
    +	Add xref-based replacements for Dired search commands
     
    -2015-12-22  Martin Rudalics  
    +	* lisp/dired-aux.el (dired-do-find-regexp)
    +	(dired-do-find-regexp-and-replace): New commands.
    +	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00864.html
     
    -	Fix `display-buffer' call in `display-message-or-buffer' (Bug#22221)
    +	* lisp/dired.el (dired-mode-map): Change bindings for `A' and
    +	`Q' to the new commands.
     
    -	* lisp/simple.el (display-message-or-buffer): Call
    -	`display-buffer' with ACTION instead of NOT-THIS-WINDOW
    -	(Bug#22221).
    +	* lisp/progmodes/xref.el (xref-query-replace)
    +	(xref-collect-matches): Add progress reporters.
    +	(xref--find-ignores-arguments): Return nil for zero ignores.
    +	(xref--show-xrefs): Add an optional argument.
    +	(xref-collect-matches): Drop the assert.  'find' accepts a
    +	regular file in place of directory argument, too.
     
    -2015-12-22  Juri Linkov  
    +2016-01-18  Alan Mackenzie  
     
    -	* lisp/saveplace.el (toggle-save-place, save-place-to-alist)
    +	* doc/lispref/frames.texi (Position Parameters): Say they don't exist on TTYs.
     
    -	(save-places-to-alist, save-place-dired-hook):
    -	Check for dired-subdir-alist.  (Bug#19851)
    +2016-01-18  Eli Zaretskii  
     
    -2015-12-21  Paul Eggert  
    +	Improve user documentation of Xref
     
    -	Add FIXME comment re stack overflow and modules
    +	* doc/emacs/maintaining.texi (Xref, Find Identifiers)
    +	(Looking Up Identifiers, Identifier Search, List Identifiers):
    +	Adjudicate comments by Dmitry Gutov .  See
    +	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00650.html
    +	for the details.
     
    -2015-12-21  Paul Eggert  
    +2016-01-18  Eli Zaretskii  
     
    -	Revert some recent emacs-module commentary
    +	Fix scrolling under scroll-preserve-screen-position and margins
     
    -	Most of the recently-added commentary was incorrect, due to the
    -	possibility of stack overflow.
    +	* src/window.c (window_scroll_pixel_based): When setting point to
    +	preserve screen coordinates, don't let cursor enter either of the
    +	two scroll margins.  Fix incorrect usage of
    +	WINDOW_WANTS_HEADER_LINE_P and use WINDOW_HEADER_LINE_HEIGHT
    +	instead of CURRENT_HEADER_LINE_HEIGHT.  (Bug#22395)
     
    -2015-12-21  Paul Eggert  
    +2016-01-18  Eli Zaretskii  
     
    -	Spelling fix: prefer "cooperate" to "co-operate"
    +	Unbreak the MS-Windows build
     
    -2015-12-21  Paul Eggert  
    +	* src/sysdep.c (emacs_gnutls_global_init, gnutls_rnd): Disable for
    +	WINDOWSNT, to avoid link failure.  (Bug#22202)
     
    -	Port undo fixes to -fno-common
    +2016-01-18  Alan Mackenzie  
     
    -	Port recent fix for Bug#21968 to platforms like 'gcc -fno-common'.
    -	* src/keyboard.c, src/keyboard.h (point_before_last_command_or_undo)
    -	(buffer_before_last_command_or_undo):
    -	Declare in keyboard.h, and define in keyboard.c,
    -	instead of assuming the traditional Unix relaxed ref-def linkage.
    +	Desktop: protect users against inadvertant upgrading of desktop file.
     
    -2015-12-20  Philipp Stephani  
    +	An upgraded (version 208) desktop file cannot be read in Emacs < 25.
     
    -	Improve commentary for emacs-module.c
    +	* etc/NEWS: Add an entry about upgrading a desktop file.
     
    -	* src/lisp.h: Document emacs-module.c assumptions about EQ and NILP.
    -	* src/emacs-module.c (module_non_local_exit_get): Document that we
    -	cannot use the current implementation.
    -	(module_is_not_nil, module_eq): Document assumptions about EQ and
    -	NILP.
    +	* lisp/desktop.el (desktop-file-version): Amend doc string.
    +	(desktop-native-file-version, desktop-io-file-version): new variables.
    +	(desktop-clear): Set desktop-io-file-version to nil.
    +	(desktop-buffer-info): make the presence of the last item on the list
    +	conditional on (>= desktop-io-file-version 208).
    +	(desktop-save): Add extra parameter VERSION to take user's C-u or C-u C-u.
    +	Amend the doc string.  Add code to determine the output file version.
    +	(desktop-create-buffer): Set desktop-io-file-version to the input file's
    +	version.
     
    -2015-12-20  Michael Albinus  
    +2016-01-17  Paul Eggert  
     
    -	Suppress test on Mac OS X
    +	Initialize GnuTLS before calling gnutls_rnd
     
    -	* test/automated/tramp-tests.el (tramp--test-darwin-p): New defun.
    -	(tramp--test-utf8): Use it.
    +	* src/gnutls.c (emacs_gnutls_global_init): Now extern.
    +	Don’t set gnutls_global_initialized if gnutls_global_init fails.
    +	* src/sysdep.c: Include "gnutls.h", and 
    +	if 2.12 or later, which has gnutls_rnd.
    +	(emacs_gnutls_global_init, gnutls_rnd): New fallback
    +	placeholder macros if before 2.12.
    +	(init_random): Initialize gnutls globals before trying to
    +	use gnutls_rnd.
     
    -2015-12-20  Alan Mackenzie  
    +2016-01-17  Andreas Schwab  
     
    -	Merge branch 'scratch/follow' into emacs-25
    +	Don't use GnuTLS before it is initialized
     
    -	This allows Isearch, etc., to work well when Follow Mode is active.
    +		* src/sysdep.c (init_random): Don't use gnutls_rnd.
     
    -2015-12-19  Michael Albinus  
    +2016-01-17  Bill Wohler  
     
    -	* lisp/net/tramp-sh.el (tramp-get-ls-command-with-w-option): Improve check.
    +	* mh-e.el (mh-version): Add +git to version.
     
    -2015-12-19  Eli Zaretskii  
    +2016-01-17  Paul Eggert  
     
    -	Fix last commit
    +	Port cleanup attribute to OpenBSD
     
    -	* doc/emacs/rmail.texi (Rmail Deletion): Document new behavior of 'u'
    -	with numeric argument.
    +	The OpenBSD C compiler issues false alarms about strcpy, strcat, and
    +	sprintf, and this messes up 'configure' when it tests for the cleanup
    +	attribute.  Work around the problem by using __has_attribute directly.
    +	Problem reported by Joakim Jalap (Bug#22385).
    +	* configure.ac: Don’t use AX_GCC_VAR_ATTRIBUTE.
    +	* m4/ax_gcc_var_attribute.m4: Remove.
    +	* src/conf_post.h (__has_attribute): Provide a substitute, for
    +	non-GCC or older GCC compilers.  All uses changed to assume
    +	the substitute.  Check for the cleanup attribute.
    +	* src/emacs-module.c (module_has_cleanup): Just use __has_attribute.
     
    -2015-12-19  Eli Zaretskii  
    +2016-01-17  Paul Eggert  
     
    -	Document new features of Rmail
    +	Prefer GnuTLS when acquiring random seed
     
    -	* doc/emacs/rmail.texi (Rmail Summary Edit, Rmail Deletion):
    -	Document new behavior of 'd' and 'C-d' with numeric argument.
    -	(Rmail Display): Document the rendering of HTML MIME parts.
    +	This attempts to improve on the fix for Bug#22202.
    +	* configure.ac (HAVE_DEV_URANDOM): Remove.
    +	Check /dev/urandom existence at run time, not at build time,
    +	since the device could exist in the former but not the latter.
    +	* src/sysdep.c [HAVE_GNUTLS]: Include gnutls/gnutls.h.
    +	(gnutls_rnd) [GNUTLS_VERSION_NUMBER < 0x020c00]: New fallback macro.
    +	(random_seed): New typedef.
    +	(set_random_seed): New static function.
    +	(seed_random): Use them.
    +	(init_random): Use random_seed instead of uintmax_t, so as to
    +	not consume more entropy than needed.  Prefer gnutls_rnd if it
    +	works; this avoids a redundant open of /dev/urandom on
    +	GNU/Linux with modern GnuTLS.
     
    -2015-12-19  Eli Zaretskii  
    +2016-01-16  Eli Zaretskii  
     
    -	Improve documentation of new cl-lib functions
    +	Improve documentation of dynamic modules
     
    -	* doc/misc/cl.texi (Predicates on Numbers, Numerical Functions):
    -	Fix wording.
    +	* doc/lispref/loading.texi (How Programs Do Loading): Update the
    +	description of searching for files in 'load' when Emacs was built
    +	with support for dynamic modules.
     
    -2015-12-19  Eli Zaretskii  
    +2016-01-16  Eli Zaretskii  
     
    -	Document the new feature of 'minibuffer-with-setup-hook'
    +	* INSTALL: Document --with-modules.
     
    -	* lisp/files.el (minibuffer-with-setup-hook): Clarify how FUN is
    -	added to `minibuffer-setup-hook'.
    +2016-01-16  Eli Zaretskii  
     
    -2015-12-19  Eli Zaretskii  
    +	Document 'function-put'
     
    -	Document new features of Font Lock
    +	* doc/lispref/symbols.texi (Symbol Plists): Document
    +	'function-put'.  Update documentation of 'function-get'.
     
    -	* doc/lispref/modes.texi (Other Font Lock Variables): Document
    -	'font-lock-flush-function' and 'font-lock-ensure-function'.
    -	(Font Lock Basics): Document the basic fontification functions
    -	referenced in "Other Font Lock Variables".
    +2016-01-16  Eli Zaretskii  
     
    -	* lisp/font-lock.el (font-lock-flush, font-lock-ensure): Doc fix.
    +	Document 'funcall-interactively'
     
    -2015-12-19  Eli Zaretskii  
    +	* doc/lispref/commands.texi (Interactive Call): Document
    +	'funcall-interactively'.
    +	* doc/lispref/functions.texi (Calling Functions): Mention
    +	'funcall-interactively' and provide a cross-reference.
     
    -	Document new features of Rectangle mode
    +2016-01-16  Eli Zaretskii  
     
    -	* doc/emacs/killing.texi (Rectangles): Document "C-x C-x" in
    -	rectangle-mark-mode.
    +	* doc/lispref/lists.texi (Association Lists): Document 'alist-get'.
     
    -2015-12-19  Eli Zaretskii  
    +	* doc/lispref/strings.texi (Text Comparison): Document 'string-greaterp'.
     
    -	Manual followup to last change
    +2016-01-16  Eli Zaretskii  
     
    -	* doc/lispref/display.texi (Displaying Messages): Sync with the
    -	doc string.  (Bug#22210)
    +	Document renaming of selection-related functions
     
    -2015-12-19  Eli Zaretskii  
    +	* doc/lispref/frames.texi (Window System Selections): Rename "x-*"
    +	functions into the corresponding "gui-*" functions.  Make the
    +	description slightly less X-centric.
     
    -	Clarify doc string of 'display-message-or-buffer'
    +2016-01-16  Eli Zaretskii  
     
    -	* lisp/simple.el (display-message-or-buffer): Doc fix.  Suggested
    -	by Sebastian Wiesner .  (Bug#22210)
    +	* doc/lispref/macros.texi (Expansion): Document 'macroexpand-1'.
     
    -2015-12-19  Eli Zaretskii  
    +2016-01-16  Eli Zaretskii  
     
    -	* doc/emacs/emacs.texi (Top): Update top-level menus.
    +	Document 'define-inline'
     
    -	* doc/lispref/elisp.texi (Top): Update top-level menus.
    +	* doc/lispref/functions.texi (Defining Functions): Document
    +	'define-inline' and related macros.
     
    -2015-12-19  Eli Zaretskii  
    +	* lisp/emacs-lisp/inline.el (inline-letevals): Doc fix.
     
    -	Document how to avoid file-local variables that aren't
    +2016-01-16  Artur Malabarba  
     
    -	* doc/emacs/custom.texi (Specifying File Variables): Describe how
    -	to prevent Emacs from interpreting unrelated text as file-local
    -	variables.  (Bug#22166)
    +	* lisp/files.el (dir-locals--all-files): Respect absolute file-names
     
    -2015-12-19  Dave Thomas    (tiny change)
    +	* lisp/help-fns.el (describe-variable): Fix a left-over parenthesis
     
    -	Fix a typo in eterm-color's termcap entry
    +2016-01-16  Artur Malabarba  
     
    -	* lisp/term.el (term-termcap-format): Fix a typo in the "ue="
    -	entry.  (Bug#22184)
    +	* lisp/dired-x.el (dired-omit-here-always): Use add-dir-local-variable
     
    -2015-12-19  Eli Zaretskii  
    +	instead of manually writing a dir-locals file.
     
    -	Allow 'browse-url-emacs' visit non-existent URLs
    +2016-01-16  Artur Malabarba  
     
    -	* lisp/url/url-handlers.el (url-insert-file-contents): Don't
    -	signal an error if VISIT is non-nil, to more faithfully emulate
    -	the behavior of 'insert-file-contents'.  (Bug#22160)
    +	* lisp/files.el (dir-locals--all-files): Use completion instead of wildcards
     
    -2015-12-19  Paul Eggert  
    +	(dir-locals-file)
    +	* lisp/files-x.el (modify-dir-local-variable)
    +	* lisp/dos-fns.el (dosified-file-name)
    +	* lisp/help-fns.el (describe-variable): Change accordingly.
     
    -	Remove SunOS 4.x cruft
    +2016-01-16  Jussi Lahdenniemi    (tiny change)
     
    -	Support for SunOS 4.x was removed in Emacs 23 but some cruft was left behind.
    -	* lib-src/pop.c [sun]: Remove no-longer-needed include.
    -	* lwlib/xlwmenu.c (SUNSO41): Remove.
    +	Fix incompatbilities with MS-Windows 2000 and older
     
    -2015-12-19  Paul Eggert  
    +	* src/w32.c : New global variable.
    +	(filename_to_utf16, filename_from_ansi, check_windows_init_file):
    +	Use it instead of the literal MB_ERR_INVALID_CHARS.
    +	(maybe_load_unicows_dll): Initialize multiByteToWideCharFlags as
    +	appropriate for the underlying OS version.  For details, see
    +	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00835.html.
    +	* src/w32.h: Declare multiByteToWideCharFlags.
    +	* src/w32fns.c (Fx_file_dialog, Fw32_shell_execute)
    +	(add_tray_notification): Use multiByteToWideCharFlags instead of
    +	the literal MB_ERR_INVALID_CHARS.
    +	(_resetstkoflw_proc): New typedef.
    +	(w32_reset_stack_overflow_guard): Call _resetstkoflw via a
    +	pointer, as this function is absent in msvcrt.dll shipped with W2K
    +	and older systems.
     
    -	Merge from gnulib
    +2016-01-16  Eli Zaretskii  
     
    -	This mostly commentary fixes.
    -	* doc/misc/texinfo.tex, lib/intprops.h: Copy from gnulib.
    -	* lib/gnulib.mk: Regenerate with new gnulib-tool.
    +	Mention in PROBLEMS an issue with MS-Windows NT4
     
    -2015-12-18  Michael Albinus  
    +	* etc/PROBLEMS (MS-Windows): Mention the problem with Shell32.dll
    +	on Windows NT4.  For the details, see
    +	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00835.html.
     
    -	Minor fixes in Tramp
    +2016-01-16  Jussi Lahdenniemi    (tiny change)
     
    -	* lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls):
    -	Reorder ls arguments.
    +	Ensure 8-byte aligned memory allocation on MS-Windows 9X
     
    -	* lisp/net/tramp.el (tramp-dissect-file-name): Fix docstring.
    +	* src/w32heap.c (init_heap): Redirect malloc, realloc, and free to
    +	special functions on Windows 9X.  Refuse to dump Emacs on Windows 9X.
    +	(malloc_after_dump_9x, realloc_after_dump_9x)
    +	(free_after_dump_9x): New functions.  (Bug#22379)  See also
    +	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00852.html
    +	for more details about the original problem.
     
    -2015-12-18  Michael Albinus  
    -
    -	Make tramp a built-in package
    +	* nt/inc/ms-w32.h (malloc_after_dump_9x, realloc_after_dump_9x)
    +	(free_after_dump_9x): Add prototypes.
     
    -	* lisp/finder.el (finder-compile-keywords): Update
    -	`package--builtins' also when Version: keyword is available.
    +2016-01-16  Eli Zaretskii  
     
    -	* lisp/net/trampver.el: Add Version: keyword.
    -	(tramp-version): Change it to "2.2.13.25.1", in order to be
    -	compatible with `version-to-list'.
    +	Fix tests for active region in hideif.el
     
    -2015-12-18  Lele Gaifax  
    +	* lisp/progmodes/hideif.el (hif-evaluate-macro, hide-ifdef-block): Use
    +	'use-region-p' to test whether to operate on region, instead of
    +	testing 'mark-active'.
     
    -	* etc/tutorials/TUTORIAL.it: Update and fix typos.
    +2016-01-16  Eli Zaretskii  
     
    -2015-12-18  Alan Mackenzie  
    +	Fix interactive specs in some hideif.el commands
     
    -	Rename `recenter-group' to `recenter-window-group'
    +	* lisp/progmodes/hideif.el (hif-evaluate-macro)
    +	(hide-ifdef-undef, show-ifdef-block): Don't use '(interactive "r")'
    +	in commands that should only act on the region if it's active.
     
    -	* doc/lispref/windows.texi (Textual Scrolling)
    -	* lisp/window.el (top level, recenter-group)
    -	* lisp/follow.el (follow-mode)
    -	* lisp/isearch.el (isearch-back-into-window): Rename `recenter-group' to
    -	`recenter-window-group' and `recenter-group-function' to
    -	`recenter-window-group-function'.
    +2016-01-15  Phillip Lord  
     
    -2015-12-18  Eli Zaretskii  
    +	Enable test selector from command line
     
    -	Fix vertical-motion in tabulated-list mode
    +	* test/automated/Makefile.in: Change variable manipulation to avoid
    +	  over-writing selector.
     
    -	* src/indent.c (Fvertical_motion): When moving from line beginning
    -	to point under line truncation, assume overshoot by one line only
    -	if point actually lies beyond the window's right margin.
    -	(Bug#22194)
    +2016-01-15  Alan Mackenzie  
     
    -2015-12-18  Martin Rudalics  
    +	Don't confuse "::" with ":" when trying to parse member initializers.
     
    -	Don't have help functions call x-display-pixel-width/-height on ttys
    +	* lisp/progmodes/cc-engine.el (c-back-over-member-initializers): Check
    +	more robustly for ":" token when searching backwards for it.
     
    -	* lisp/help.el (temp-buffer-max-height, temp-buffer-max-width):
    -	Don't call x-display-pixel-width/-height on ttys.
    +	* lisp/progmodes/cc-langs (c-:$-multichar-token-regexp): New language
    +	variable.
     
    -2015-12-18  Dmitry Gutov  
    +2016-01-15  Eli Zaretskii  
     
    -	Use 'hg id' in vc-hg-previous-revision
    +	Ensure positive number of glyphs for margins of positive width
     
    -	* lisp/vc/vc-hg.el (vc-hg-previous-revision):
    -	Use 'hg id' to retrieve it (bug#22032).
    +	* src/dispnew.c (margin_glyphs_to_reserve): Always return a
    +	positive value when a non-zero width of the marginal area was
    +	requested.  (Bug#22356)
     
    -2015-12-17  Alan Mackenzie  
    +2016-01-15  Eli Zaretskii  
     
    -	* lisp/follow.el (follow-sit-for): Remove (it's redundant).
    +	Fix crashes when mini-window has non-zero margins
     
    -2015-12-17  Eli Zaretskii  
    +	* src/window.c (resize_frame_windows): Use 'new_size' to set
    +	minibuffer window's 'total_cols' value, as 'size' might be in
    +	pixels.  (Bug#22356)
     
    -	Fix a typo in the Emacs manual
    +2016-01-15  Alan Mackenzie  
     
    -	* doc/emacs/trouble.texi (Sending Patches): Fix a typo.  Reported
    -	by Lele Gaifax .  (Bug#22193)
    +	In comment-dwim with style `extra-line', respect indent-tabs-mode.
     
    -2015-12-17  Eli Zaretskii  
    +	This fixes bug #22369.
     
    -	Fix parsing netrc entries with ports
    +	* lisp/newcomment.el (comment-make-bol-ws): New function.
    +	(comment-make-extra-lines): Use new function instead of a crude `make-string'.
     
    -	* lisp/gnus/auth-source.el (auth-source-ensure-strings): Don't
    -	make a list out of 't'.  (Bug#22188)
    +2016-01-15  Eli Zaretskii  
     
    -	* test/automated/auth-source-tests.el
    -	(auth-source-test-netrc-parse-entry): New test.
    +	Make 'random' seeds cryptographically secure if possible
     
    -2015-12-17  Paul Eggert  
    +	* configure.ac: Check for "/dev/urandom".
     
    -	Fix typo in Doug Lea malloc configure log
    +	* src/sysdep.c (init_random) [HAVE_DEV_URANDOM]: Read the stream
    +	for the seed from "/dev/urandom".
    +	[WINDOWSNT]: Obtain the stream for the seed from w32 APIs.
    +	* src/fns.c (Frandom): Update the doc string to indicate that
    +	system entropy is used when available.
    +	* src/w32.c: Include wincrypt.h.
    +	(w32_init_crypt_random, w32_init_random): New functions, use the
    +	CryptGenRandom API.
    +	(globals_of_w32): Initialize w32_crypto_hprov handle to zero.
    +	* src/w32.h (w32_init_random): Add prototype.
     
    -	* configure.ac (emacs_cv_var_doug_lea_malloc):
    -	Fix typo that confused the log output of 'configure'.
    +	* doc/lispref/numbers.texi (Random Numbers): Document more details
    +	about 't' as the argument to 'random'.
     
    -2015-12-16  Nicolas Petton  
    +	* etc/NEWS: Mention that '(random t)' now uses a cryptographically
    +	strong seed if possible.
     
    -	* etc/NEWS: Mention the new pcase patterns `seq' and `map'.
    +	(Bug#22202)
     
    -2015-12-16  Alan Mackenzie  
    +2016-01-15  Eli Zaretskii  
     
    -	* etc/NEWS: Move entry on pcase to correct section
    +	Unhide the --no-line-directive option to 'etags'
     
    -	(Accidentally omitted from previous commit)
    +	* lib-src/etags.c (print_help): Un-undocument the --no-line-directive
    +	option.  (Bug#22306)
     
    -2015-12-16  Alan Mackenzie  
    +	* doc/man/etags.1: Document the --no-line-directive option.
     
    -	Add documentation for changes to Show Paren mode.
    +2016-01-15  Alan J Third    (tiny change)
     
    -	* lisp/paren.el (show-paren-highlight-openparen): Enhance doc string.
    +	Fix picture-mode wrt double-width characters
     
    -	* doc/emacs/programs.texi (Matching): Add descriptions of some pertinent user
    -	options, including the new show-paren-when-point-inside-paren and
    -	show-paren-when-point-in-periphery.
    +	* lisp/textmodes/picture.el (picture-insert): Check the width of
    +	the character being replaced, not just that of the replacement.
    +	(Bug#1808)
     
    -	* etc/NEWS (.. Specialized Modes ...): Add an entry for Show Paren mode.
    -	Move an entry on pcase to the Lisp Changes section.
    +2016-01-15  Eric Abrahamsen  
     
    -2015-12-16  Eli Zaretskii  
    +	Honor docstring of gnus-group-get-new-news
     
    -	Document Eldoc changes
    +	* lisp/gnus/gnus-start.el (gnus-get-unread-articles): If the prefix arg is t,
    +	but non-numeric, unconditionally consider all groups to need updating.
     
    -	* doc/emacs/programs.texi (Lisp Doc): Document Global Eldoc mode.
    +2016-01-14  Simen Heggestøyl  
     
    -2015-12-16  Eli Zaretskii  
    +	Disallow parenthesis in non-pseudo CSS selectors
     
    -	Fix invocation of Python and Guile interpreters from gdb-mi
    +	* lisp/textmodes/css-mode.el (css--font-lock-keywords): Disallow
    +	parenthesis in selectors except for in the function notation that
    +	might appear right after a pseudo-class.
    +	* test/indent/scss-mode.scss: Add a test for it.
     
    -	* lisp/progmodes/gdb-mi.el (gdb-control-commands-regexp): Add
    -	commands for interactive Python and Guile interpreters.
    -	(gdb-send): Recognize various ways of exiting from Python and
    -	Guile interpreters and returning to GDB.  For details, see
    -	http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00693.html
    -	and http://stackoverflow.com/questions/31514741.
    +2016-01-14  Katsumi Yamaoka  
     
    -2015-12-16  Paul Eggert  
    +	* lisp/gnus/nntp.el (nntp-request-newgroups): Simplify
     
    -	Remove attempt to use C11 threads
    +2016-01-14  Michael Albinus  
     
    -	C11 threads are not needed for Emacs now, and their use is causing
    -	hassles on FreeBSD 10.x.  Problem reported by Ashish SHUKLA in:
    -	http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00648.html
    -	* configure.ac: Do not check for C11 threads. Remove unnecessary
    -	fiddling with CPPFLAGS when configuring pthreads.
    -	* src/emacs-module.c (main_thread, check_main_thread)
    -	(module_init): Do not worry about C11 threads.
    +	check-maybe shall run only default tests
     
    -2015-12-15  Michael Albinus  
    +	* test/automated/Makefile.in (check, check-expensive): Depend on
    +	mostlyclean.
    +	(check-maybe): Re-run only default tests.
    +	(check-doit): Use code of check-maybe.
    +	(mostlyclean): Move *.log files away.
     
    -	Set utf8 encoding with stty in Tramp
    +2016-01-13  Mark Oteiza  
     
    -	* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
    -	Move up uname check.  Handle Mac OS X eol encoding.  Set utf8
    -	encoding with stty.
    +	* lisp/thingatpt.el (thing-at-point-uri-schemes): Add "magnet:"
     
    -2015-12-15  Alan Mackenzie  
    +2016-01-13  Dmitry Gutov  
     
    -	Tidy up documentation associated with window groups.
    +	Un-obsolete tags-loop-continue
     
    -	* doc/lispref/windows.texi (Basic Windows): Add an @anchor for "Window
    -	Groups".  Correct example function to `window-group-start'.
    -	(Window Start and End, Textual scrolling): Point to the new anchor.  State
    -	that (most of) the args in window group functions have the same meaning as for
    -	the corresponding window primitives.
    +	* lisp/progmodes/etags.el (tags-loop-continue): Un-obsolete.
    +	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00682.html
     
    -	* doc/lispref/positions.texi (Screen Lines).  Same as above.
    +2016-01-13  Eli Zaretskii  
     
    -2015-12-15  Michael Albinus  
    +	Document obsoletion of 'intangible' and 'point-entered/left'
     
    -	Complete last commit
    +	* doc/lispref/text.texi (Special Properties): Document the new
    +	properties 'cursor-intangible' and 'cursor-sensor-functions'.
    +	Document the obsolete status of 'intangible', 'pointer-left',
    +	and 'point-entered' properties, and of 'inhibit-point-motion-hooks'.
    +	* doc/lispref/display.texi (Overlay Properties): Document that
    +	'intangible' overlay property is obsolete.
     
    -	* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
    -	Move uname check up.  Handle Mac OS X eol encoding.
    +	* lisp/emacs-lisp/cursor-sensor.el (cursor-sensor-mode): Doc fix.
     
    -2015-12-15  Michael Albinus  
    +2016-01-13  Eli Zaretskii  
     
    -	Handle Mac OS X eol encoding in Tramp
    +	Updater documentation of 'looking-back'
     
    -	* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
    -	Handle Mac OS X eol encoding.
    +	* doc/lispref/searching.texi (Regexp Search): Update documentation
    +	of 'looking-back'.  Fix markup.
     
    -2015-12-15  YAMAMOTO Mitsuharu  
    +2016-01-13  Eli Zaretskii  
     
    -	Fix variable name typo in compute_tip_xy
    +	Document 'pre-redisplay-functions'
     
    -	* src/w32fns.c (compute_tip_xy):
    -	* src/xfns.c (compute_tip_xy): Modify *root_x instead of *root_y
    -	when `right' is integer.
    +	* doc/lispref/hooks.texi (Standard Hooks):
    +	* doc/lispref/display.texi (Forcing Redisplay): Document
    +	'pre-redisplay-functions'.
     
    -2015-12-14  foudfou  
    +2016-01-13  Eli Zaretskii  
     
    -	* lisp/ibuffer.el: Add ability to (un-)mark or delete buffers in the region.
    +	Document the new deafault value of 'load-read-function'
     
    -2015-12-14  Tassilo Horn  
    +	* doc/lispref/loading.texi (How Programs Do Loading): Document the
    +	change in the default value of 'load-read-function'.
     
    -	Revert "Fix rx matcher overflow without limiting"
    +2016-01-13  Eli Zaretskii  
     
    -	This reverts commit fe27e037663d36be3e5741c2ce86ab4ee8017db1.
    +	Document 'bufferpos-to-filepos' and 'filepos-to-bufferpos'
     
    -2015-12-14  Alan Mackenzie  
    +	* doc/lispref/nonascii.texi (Text Representations): Document
    +	'bufferpos-to-filepos' and 'filepos-to-bufferpos'.
     
    -	Ispell: Bind isearch-regexp-function to nil around call to isearch..-new-loop
    +2016-01-13  Eli Zaretskii  
     
    -	* lisp/textmodes/ispell.el (ispell-highlight-spelling-error-overlay): bind
    -	isearch-regexp-function to nil around call to isearch-lazy-highligh-new-loop.
    +	Document the new prefix-command hooks
     
    -2015-12-14  Tassilo Horn  
    +	* doc/lispref/hooks.texi (Standard Hooks): Document
    +	`prefix-command-echo-keystrokes-functions' and
    +	`prefix-command-preserve-state-hook'.
     
    -	Fix rx matcher overflow without limiting
    +2016-01-13  Paul Eggert  
     
    -	* lisp/textmodes/reftex-vars.el (reftex-label-regexps): Improve last
    -	change to the regexp without imposing a limit on the length of the
    -	options.
    +	Fix one more misuse of time-stamp-time-zone
     
    -2015-12-14  Alan Mackenzie  
    +	* test/etags/html-src/softwarelibero.html: Use "UTC0" rather
    +	than the unportable "GMT" for time zone.
     
    -	Enhance ispell-skip-region-alist by generating part of it at runtime.
    +2016-01-13  Paul Eggert  
     
    -	* lisp/textmodes/ispell.el (ispell--\\w-filter, ispell--make-\\w-expression)
    -	(ispell--make-filename-or-URL-re): New functions which generate a regexp.
    -	(ispell-skip-region-alist): Remove the bit that matches a filename/URL, etc.
    -	(ispell-begin-skip-region-regexp, ispell-skip-region-list, ispell-message):
    -	Include the result of ispell--make-filename-or-URL-re in regexps.
    +	Fix NNTP NEWGROUPS off-by-a-few-hours bug
     
    -2015-12-14  Glenn Morris  
    +	* lisp/gnus/nntp.el (nntp-request-newgroups): Format string
    +	in Universal Time, since we’re telling the server “GMT”.
     
    -	* build-aux/gitlog-to-emacslog: Ignore more pointless merge commits.
    +2016-01-12  Paul Eggert  
     
    -2015-12-14  Alan Mackenzie  
    +	Update publicsuffix.txt from upstream
     
    -	Replace GROUP argument in six window primitives by new functions.
    -
    -	* doc/lispref/windows.texi (Window Start and End, Textual Scrolling)
    -	* doc/lispref/positions.texi (Screen Lines): Remove optional GROUP argument
    -	from description of six window functions.  Add in description of new functions
    -	window-group-start, window-group-end, set-window-group-start,
    -	pos-visible-in-window-group-p, recenter-group and move-to-window-group-line,
    -	together with the six variables indirecting to the pertinent group
    -	functions.
    -
    -	* src/window.c
    -	* src/keyboard.c: Revert the commit from 2015-11-11 12:02:48, in so far as it
    -	applies to these two files, which added the GROUP argument to six window
    -	primitives.
    +	* etc/publicsuffix.txt: Update from
    +	https://publicsuffix.org/list/effective_tld_names.dat
    +	dated 2016-01-12 11:52:01 UTC.
     
    -	* lisp/follow.el (follow-mode): Use updated variable names for the indirected
    -	functions.
    +2016-01-12  Glenn Morris  
     
    -	* lisp/isearch.el (isearch-update, isearch-done, isearch-string-out-of-window)
    -	(isearch-back-into-window, isearch-lazy-highlight-new-loop)
    -	(isearch-lazy-highlight-search, isearch-lazy-highlight-update): Replace calls
    -	to window primitives (e.g. window-start) with a GROUP argument by calls to
    -	new functions (e.g. window-group-start).
    +	Fix some declarations.
     
    -	* lisp/ispell.el (ispell-command-loop): Replace call to
    -	pos-visible-in-window-p with pos-visible-in-window-group-p.
    +	* lisp/descr-text.el (internal-char-font):
    +	* lisp/cedet/mode-local.el (xref-item-location):
    +	* lisp/gnus/mml-smime.el (epg-key-sub-key-list)
    +	(epg-sub-key-capability, epg-sub-key-validity):
    +	* lisp/international/mule-util.el (internal-char-font):
    +	Fix declarations.
     
    -	* lisp/window.el (window-group-start, window-group-end)
    -	(set-window-group-start, recenter-group, pos-visible-in-window-group-p)
    -	(selected-window-group, move-to-window-group-line): New functions.
    -	(window-group-start-function, window-group-end-function)
    -	(set-window-group-start-function, recenter-group-function)
    -	(pos-visible-in-window-group-p-function, selected-window-group-function)
    -	(move-to-window-group-line-function): New variables.
    +2016-01-12  Glenn Morris  
     
    -2015-12-14  Vitorio Miguel    (tiny change)
    +	Fix some custom types.
     
    -	* etc/tutorials/TUTORIAL.pt_BR: Fix a typo.  (Bug#22165)
    +	* lisp/gnus/gnus-fun.el (gnus-x-face-omit-files, gnus-face-omit-files):
    +	* lisp/gnus/gnus.el (gnus-valid-select-methods):
    +	* lisp/mail/rmail.el (rmail-get-coding-function):
    +	* lisp/net/newst-treeview.el (newsticker-groups-filename):
    +	* lisp/progmodes/hideif.el (hide-ifdef-exclude-define-regexp):
    +	* lisp/textmodes/tildify.el (tildify-space-predicates):
    +	* lisp/url/url-tramp.el (url-tramp-protocols):
    +	Fix custom types.
     
    -2015-12-13  Eli Zaretskii  
    +2016-01-12  Glenn Morris  
     
    -	Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25
    +	Add some missing version tags.
     
    -2015-12-13  Tassilo Horn  
    +	* lisp/electric.el (electric-quote-comment)
    +	(electric-quote-string, electric-quote-paragraph):
    +	* lisp/epg-config.el (epg-gpgconf-program):
    +	* lisp/rect.el (rectangle-preview):
    +	* lisp/emacs-lisp/check-declare.el (check-declare-ext-errors):
    +	* lisp/emacs-lisp/package.el (package-selected-packages)
    +	(package-hidden-regexps):
    +	* lisp/erc/erc.el (erc-network-hide-list, erc-channel-hide-list):
    +	* lisp/eshell/em-term.el (eshell-destroy-buffer-when-process-dies):
    +	* lisp/gnus/mml-sec.el (mml1991-signers, mml2015-signers)
    +	(mml-smime-signers, mml1991-encrypt-to-self, mml2015-encrypt-to-self)
    +	(mml-smime-encrypt-to-self, mml2015-sign-with-sender)
    +	(mml-smime-sign-with-sender, mml2015-always-trust)
    +	(mml-secure-fail-when-key-problem, mml-secure-key-preferences):
    +	* lisp/net/browse-url.el (browse-url-conkeror-new-window-is-buffer)
    +	(browse-url-conkeror-arguments):
    +	* lisp/net/newst-reader.el (newsticker-download-logos):
    +	* lisp/progmodes/gud.el (gud-guiler-command-name):
    +	* lisp/progmodes/prog-mode.el (prettify-symbols-unprettify-at-point):
    +	* lisp/progmodes/project.el (project-vc):
    +	* lisp/progmodes/python.el (python-indent-guess-indent-offset-verbose)
    +	(python-shell-remote-exec-path, python-shell-first-prompt-hook)
    +	(python-shell-completion-native-disabled-interpreters)
    +	(python-shell-completion-native-enable)
    +	(python-shell-completion-native-output-timeout)
    +	(python-shell-completion-native-try-output-timeout):
    +	* lisp/progmodes/xref.el (xref):
    +	* lisp/term/screen.el (xterm-screen-extra-capabilities):
    +	* lisp/term/xterm.el (xterm-max-cut-length):
    +	Add missing version tags.
     
    -	Improve regex to not trigger stack overflow
    +2016-01-12  Glenn Morris  
     
    -	* lisp/textmodes/reftex-vars.el (reftex-label-regexps): Improve regex in
    -	order not to trigger a stack overflow in regex matcher with unbalanced
    -	brackets (bug#22146).
    +	* test/automated/core-elisp-tests.el
    +	(core-elisp-tests-1-defvar-in-let): Add a custom type.
     
    -2015-12-13  Eli Zaretskii  
    +2016-01-12  Glenn Morris  
     
    -	Fix visiting files with raw-text
    +	* src/buffer.c (syms_of_buffer) : Doc fix.
     
    -	* src/fileio.c (Finsert_file_contents): Fix setting buffer unibyte
    -	when some stuff was actually read.  (Bug#22162)
    +	Remove comments that do not apply since 2005-08-09.  (Bug#22349)
     
    -2015-12-13  Tassilo Horn  
    +2016-01-12  Paul Eggert  
     
    -	Fix regex matching keyval labels
    +	Merge from gnulib
     
    -	* lisp/textmodes/reftex-vars.el (reftex-label-regexps): Fix regexp
    -	matching keyval labels.
    +	This mostly just changes "UTC" to "UTC0" for POSIX conformance.
    +	It also updates to the latest version of texinfo.tex.
    +	* build-aux/gitlog-to-changelog, build-aux/move-if-change:
    +	* build-aux/update-copyright, doc/misc/texinfo.tex:
    +	Update from gnulib.
     
    -2015-12-13  Michael Albinus  
    +2016-01-12  Eli Zaretskii  
     
    -	* lisp/ido.el (ido-file-name-all-completions-1): Do not raise an error
    +	Update documentation of 'process-running-child-p'
     
    -	... in case of Tramp.  (Bug#20821)
    +	* doc/lispref/processes.texi (Input to Processes): Document the
    +	changes in return value of 'process-running-child-p'.
     
    -2015-12-13  Paul Eggert  
    +2016-01-12  Eli Zaretskii  
     
    -	Fix performance regression with gcc -O0
    +	Update documentation of 'deactivate-mark'.
     
    -	This fixes the smaller performance hit that I noted in:
    -	https://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00357.html
    -	* src/alloc.c (macro_XPNTR_OR_SYMBOL_OFFSET, macro_XPNTR):
    -	* src/puresize.h (puresize_h_PURE_P)
    -	(puresize_h_CHECK_IMPURE):
    -	New macros, with the old contents of the functions.
    -	* src/alloc.c (XPNTR_OR_SYMBOL_OFFSET, XPNTR):
    -	* src/puresize.h (PURE_P, CHECK_IMPURE):
    -	Use the new macros.  Also macros, if DEFINE_KEY_OPS_AS_MACROS.
    -	* src/conf_post.h (ATTRIBUTE_UNUSED):
    -	* src/lisp.h (DEFINE_KEY_OPS_AS_MACROS): New macros.
    +	* doc/lispref/markers.texi (The Mark): Document that
    +	'deactivate-mark' is now buffer-local when set.
     
    -2015-12-12  Artur Malabarba  
    +2016-01-12  Eli Zaretskii  
     
    -	* lisp/emacs-lisp/package.el (package-unpack): Security check
    +	Update documentation of 'completion-table-dynamic'
     
    -	Check that we received the package we were offered.
    +	* doc/lispref/minibuf.texi (Programmed Completion): Document the
    +	new optional argument to 'completion-table-dynamic'.
     
    -2015-12-12  Artur Malabarba  
    +2016-01-12  Eli Zaretskii  
     
    -	* lisp/emacs-lisp/package.el (package--compile): Don't activate
    +	Document changes in 'read-buffer' and 'read-buffer-function'
     
    -	`package-unpack' takes care of all activations now (other than
    -	`package-initialize).  `package--compile' now only compiles.
    +	* doc/lispref/minibuf.texi (High-Level Completion): Document the
    +	4th argument to 'read-buffer' and 'read-buffer-function'.
     
    -2015-12-12  Eli Zaretskii  
    +2016-01-12  Paul Eggert  
     
    -	Document the new bindings of  and  in the minibuffer
    +	Fix time-stamp-time-zone bugs introduced in July
     
    -	* doc/emacs/mini.texi (Minibuffer History): Describe the new
    -	bindings of  and  in the minibuffer.
    +	This fixes a bug introduced when the July changes to
    +	format-time-string installed, as the changes were not
    +	correctly handled in this module (Bug#22302).
    +	Also, document time stamp time zones.
    +	* lisp/time-stamp.el (time-stamp-time-zone): Document values better.
    +	(time-stamp--format): New private function.
    +	(time-stamp-string, time-stamp-string-preprocess)
    +	(time-stamp-do-number): Use it.
    +	* doc/emacs/files.texi (Time Stamps): Mention time zones.
    +	* doc/misc/autotype.texi (Timestamps): Document time-stamp-time-zone.
     
    -2015-12-12  Eli Zaretskii  
    +2016-01-12  Eli Zaretskii  
     
    -	Document new features of Ido
    +	Make piping to subprocesses more robust on MS-Windows
     
    -	* doc/misc/ido.texi (Misc): Document 'C-S-b'.
    +	* src/w32.c (sys_write): Don't write to a pipe more stuff than its
    +	buffer can hold.  Don't return -1 if something has been written to
    +	the pipe.  Zero out 'errno' before calling '_write', to avoid
    +	returning a stale value.  (Bug#22344)
    +	* src/w32proc.c (syms_of_ntproc) : New variable.
    +	* src/w32.c (pipe2): Use it to request a user-defined size for the
    +	pipe being created.
     
    -2015-12-12  Martin Rudalics  
    +	* etc/NEWS: Mention 'w32-pipe-buffer-size'.
     
    -	Fix frame height calculations with added menu bar on Windows (Bug#22105)
    +	* doc/emacs/msdos.texi (Windows Processes): Document
    +	'w32-pipe-buffer-size'.
     
    -	* doc/lispref/frames.texi (Parameter Access): Mention pitfalls
    -	when simultaneously specifying multiple parameters for
    -	`modify-frame-parameters' that all may change the frame's size.
    -	* src/w32fns.c (x_set_menu_bar_lines): Don't set
    -	windows_or_buffers_changed here.
    -	(my_create_tip_window, Fx_show_tip): Call AdjustWindowRect
    -	with third argument false.
    -	* src/w32menu.c (set_frame_menubar): Set
    -	windows_or_buffers_changed here.
    -	* src/w32term.c (x_set_window_size): Determine third argument of
    -	AdjustWindowRect from whether the frame has a menu bar and not
    -	from whether it wants one.
    +2016-01-16  Stefan Monnier  
     
    -2015-12-12  Eli Zaretskii  
    +	* lisp/emacs-lisp/syntax.el (syntax-ppss-table): New var
     
    -	Document the change in interactive shell mode
    +	(syntax-ppss):
    +	* lisp/font-lock.el (font-lock-fontify-syntactically-region): Use it.
     
    -	* doc/emacs/misc.texi (Interactive Shell): Document that the
    -	'*shell*' buffer by default displays in a new window.
    +2016-01-16  Stefan Monnier  
     
    -2015-12-12  Eli Zaretskii  
    +	lisp/nxml: Use syntax-tables for comments
     
    -	Document new features of package.el
    +	* lisp/nxml/nxml-mode.el (nxml-set-face): Prepend.
    +	(nxml-mode): Set syntax-ppss-table.
    +	Use sgml-syntax-propertize-function for syntax-propertize-function.
    +	Let font-lock highlight strings and comments.
    +	(nxml-degrade): Don't touch "nxml-inside" property any more.
    +	(nxml-after-change, nxml-after-change1): Remove functions.
    +	(comment): Don't set fontify rule any more.
    +	(nxml-fontify-attribute): Don't highlight the value any more.
    +	(nxml-namespace-attribute-value-delimiter, nxml-namespace-attribute-value)
    +	(nxml-comment-delimiter, nxml-comment-content): Remove faces.
     
    -	* doc/emacs/package.texi (Package Menu): Document the 'external'
    -	status and the new menu commands.
    -	(Package Installation): Document archive priorities.
    +	* lisp/nxml/nxml-rap.el (nxml-scan-end): Remove.
    +	(nxml-get-inside, nxml-inside-start, nxml-inside-end): Use syntax-ppss.
    +	(nxml-clear-inside, nxml-set-inside): Remove.
    +	(nxml-scan-after-change): Remove function.
    +	(nxml-scan-prolog, nxml-tokenize-forward): Simplify.
    +	(nxml-ensure-scan-up-to-date): Use syntax-propertize.
    +	(nxml-move-outside-backwards):
    +	* lisp/nxml/nxml-outln.el (nxml-section-tag-backward): Adjust to new
    +	nxml-inside-start behavior.
     
    -	* lisp/emacs-lisp/package.el (package-archive-priorities): Doc fix.
    -	(package-menu-hide-low-priority): Doc fix.
    +	* lisp/nxml/nxml-util.el (nxml-debug-set-inside)
    +	(nxml-debug-clear-inside): Remove macros.
     
    -2015-12-12  Eli Zaretskii  
    +	* lisp/nxml/xmltok.el (xmltok-forward-special): Remove function.
    +	(xmltok-scan-after-comment-open): Simplify.
     
    -	Update and document new features of xterm support
    +2016-01-16  Stefan Monnier  
     
    -	* doc/emacs/frames.texi (Text-Only Mouse): Document that
    -	track-mouse is supported by newer xterm versions.
    +	* elisp-mode.el (elisp--font-lock-flush-elisp-buffers): Fix comment
     
    -2015-12-12  Eli Zaretskii  
    +2016-01-16  Stefan Monnier  
     
    -	Document new features of Prettify Mode
    +	* lisp/nxml: Use standard completion; it also works for company-mode
     
    -	* doc/emacs/programs.texi (Misc for Programs): Document
    -	'prettify-symbols-compose-predicate' and
    -	'prettify-symbols-unprettify-at-point'.
    +	* lisp/nxml/nxml-mode.el (nxml-complete): Obsolete.
    +	(nxml-completion-at-point-function): Remove.
    +	(nxml-mode): Don't set completion-at-point-functions.
    +	* lisp/nxml/rng-nxml.el (rng-nxml-mode-init): Set it here instead.
    +	(rng-completion-at-point): Rename from rng-complete and mark it
    +	non-interactive.  It is now to be used as completion-at-point-function.
    +	(rng-complete-tag, rng-complete-end-tag, rng-complete-attribute-name)
    +	(rng-complete-attribute-value): Don't perform completion, but return
    +	completion data instead.
    +	(rng-complete-qname-function, rng-generate-qname-list): Add a few
    +	arguments, previously passed via dynamic coping.
    +	(rng-strings-to-completion-table): Rename from
    +	rng-strings-to-completion-alist.  Don't return an alist.  Don't both
    +	sorting and uniquifying.
     
    -	* lisp/progmodes/prog-mode.el (prettify-symbols-alist)
    -	(prettify-symbols-default-compose-p)
    -	(prettify-symbols-compose-predicate)
    -	(prettify-symbols--compose-symbol): Doc fixes.
    +	* lisp/nxml/rng-util.el (rng-complete-before-point): Delete function.
    +	(rng-completion-exact-p, rng-quote-string): Delete functions.
     
    -2015-12-12  Eli Zaretskii  
    +	* lisp/nxml/rng-valid.el (rng-recover-start-tag-open)
    +	(rng-missing-attributes-message, rng-missing-element-message)
    +	(rng-mark-missing-end-tags): Use explicit ".." in formats rather than
    +	calling rng-quote-string everywhere.
     
    -	Document multi-mode indentation facilities
    +2016-01-16  Stefan Monnier  
     
    -	* doc/lispref/text.texi (Mode-Specific Indent): Document
    -	'prog-indentation-context', 'prog-first-column', and 'prog-widen'.
    +	Use sgml-electric-tag-pair-mode also in nxml-mode
     
    -	* lisp/progmodes/prog-mode.el (prog-indentation-context)
    -	(prog-widen): Doc fixes.
    +	* lisp/nxml/rng-nxml.el: Require sgml-mode.
    +	(rng-nxml-easy-menu): Add entry for sgml-electric-tag-pair-mode.
    +	(rng-complete-qname-function): Use complete-with-action.
     
    -2015-12-12  Eli Zaretskii  
    +	* lisp/textmodes/sgml-mode.el (sgml-electric-tag-pair-before-change-function):
    +	Let-bind forward-sexp-function, since nxml-mode binds it to
    +	something incompatible.
     
    -	Document 'vc-refresh-state'
    +	* lisp/nxml/nxml-mode.el: Use setq-local and defvar-local.
     
    -	* doc/emacs/maintaining.texi (Version Control): Document
    -	'vc-refresh-state'.
    +2016-01-15  Stefan Monnier  
     
    -	* lisp/vc/vc-hooks.el (vc-refresh-state): Doc fix.
    +	* xmltok.el: Mark the "sole --" rather than the comment opener
     
    -2015-12-12  Eli Zaretskii  
    +	* lisp/nxml/xmltok.el (xmltok-scan-after-comment-open): Put the error
    +	marker on the "sole --" rather than on the comment opener.
     
    -	Fix echo for "C-u"
    +2016-01-15  Sam Steingold  
     
    -	* src/keyboard.c (command_loop_1): Undo last change.  It caused
    -	duplicate echo of C-u.  (Bug#22107)
    +	replace `tramp-compat-split-string' (removed) with `split-string'
     
    -2015-12-11  Eli Zaretskii  
    +	(python-shell-tramp-refresh-process-environment)
    +	(python-shell-calculate-pythonpath): use `split-string'
    +	instead of defunct `tramp-compat-split-string'
     
    -	Avoid errors when creating files under SVN in new directory
    +2016-01-15  Stefan Monnier  
     
    -	* lisp/vc/vc-svn.el (vc-svn-registered): Use
    -	file-accessible-directory-p, to avoid cd'ing to a non-existing
    -	directory, which signals an error on some systems.  (Bug#21984)
    -	(vc-svn-checkin): Call log-edit-extract-headers with 2 arguments.
    -	Use declare-function to avoid byte-compiler warnings.
    +	Update nXML to use Emacs's Unicode support, and lexical-binding
     
    -2015-12-11  Eli Zaretskii  
    +	* etc/nxml/*.el: Remove obsolete char-name files.
    +	* lisp/nxml/xsd-regexp.el (xsdre-range-list-difference): Remove unused
    +	var `next'.
    +	* lisp/nxml/rng-nxml.el (rng-set-state-after): Don't assume point-min==1.
    +	* lisp/nxml/rng-match.el (rng-update-match-state): Simplify.
    +	* lisp/nxml/nxml-outln.el (nxml-outline-state-transform-exceptions)
    +	(nxml-target-section-pos, nxml-depth-in-target-section)
    +	(nxml-outline-state-transform-alist)
    +	(nxml-outline-display-section-tag-function): Move decl before first use.
    +	* lisp/nxml/nxml-mode.el (nxml-char-name-ignore-case)
    +	(nxml-char-name-alist, nxml-char-name-table)
    +	(nxml-autoload-char-name-set-list, nxml-named-char-history): Remove vars.
    +	(nxml-enable-char-name-set, nxml-disable-char-name-set)
    +	(nxml-char-name-set-enabled-p, nxml-autoload-char-name-set)
    +	(nxml-define-char-name-set, nxml-get-char-name): Remove functions.
    +	(nxml-insert-named-char): Use read-char-by-name instead.
    +	(nxml-char-ref-display-extra): Use get-char-code-property.
    +	* lisp/nxml/nxml-maint.el (nxml-create-unicode-char-name-sets):
    +	Remove function.
    +	* lisp/nxml/nxml-glyph.el, lisp/nxml/nxml-uchnm.el: Remove files.
     
    -	Improve Lua support in etags
    +2016-01-15  Michael Albinus  
     
    -	* lib-src/etags.c (Lua_functions): Skip spaces before looking for
    -	"function".
    +	Add "sg" method to Tramp
     
    -	* etc/NEWS: Mention improved Lua support by 'etags'.
    +	* doc/misc/tramp.texi (Inline methods): Add "sg" method.
    +	(Customizing Completion): Add function `tramp-parse-etc-group'.
     
    -	* test/etags/lua-src/test.lua (test): Add tests for indented
    -	function definitions.
    -	* test/etags/ETAGS.good_1:
    -	* test/etags/ETAGS.good_2:
    -	* test/etags/ETAGS.good_3:
    -	* test/etags/ETAGS.good_4:
    -	* test/etags/ETAGS.good_5:
    -	* test/etags/ETAGS.good_6:
    -	* test/etags/CTAGS.good: Adapt to the modified Lua tests.
    +	* lisp/net/tramp-sh.el (tramp-methods) : Add.  (Bug#22329)
    +	(tramp-completion-function-alist-sg): New defconst.
    +	(top): Completion function for "sg" is
    +	`tramp-completion-function-alist-sg'.
     
    -2015-12-11  Eli Zaretskii  
    +	* lisp/net/tramp.el (tramp-completion-function-alist): Adapt docstring.
    +	(tramp-parse-etc-group, tramp-parse-etc-group-group): New defuns.
     
    -	Fix 'this-command-keys' wrt prefix argument
    +2016-01-14  Michael Albinus  
     
    -	* src/keyboard.c (command_loop_1): Restore the feature whereby C-u
    -	was part of this-command-keys, but not of this-single-command-keys.
    -	(Bug#22107)
    +	Remove XEmacs compatibility in Tramp
    +
    +	* doc/misc/tramp.texi: Replace flags by their hard coded name.
    +	Remove unused flags and the enclosed alternative text for XEmacs.
    +
    +	* doc/misc/trampver.texi: Use "Tramp" CamelCase.  Rename "emacs"
    +	and "xemacs" flags to "unified" and "separate".  Remove flags
    +	"emacsgw", "emacsname", "emacsdir", "ftppackagename",
    +	"emacsothername", "emacsotherdir" and "emacsotherfilename".
    +	(trampver):
    +	* lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre".
    +
    +	* lisp/net/tramp.el (bkup-backup-directory-info)
    +	(directory-sep-char, ls-lisp-use-insert-directory-program)
    +	(outline-regexp, tramp-backup-directory-alist)
    +	(tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax)
    +	(tramp-file-name-regexp-unified)
    +	(tramp-file-name-regexp-separate)
    +	(tramp-completion-file-name-regexp-unified)
    +	(tramp-completion-file-name-regexp-separate, tramp-chunksize)
    +	(tramp-get-method-parameter, tramp-find-method, tramp-find-user)
    +	(tramp-debug-message, tramp-progress-reporter-update)
    +	(with-tramp-progress-reporter)
    +	(tramp-rfn-eshadow-setup-minibuffer)
    +	(rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook)
    +	(tramp-rfn-eshadow-update-overlay)
    +	(rfn-eshadow-update-overlay-hook, tramp-default-file-modes)
    +	(tramp-file-name-for-operation)
    +	(tramp-completion-file-name-handler)
    +	(tramp-autoload-file-name-handler, tramp-completion-mode-p)
    +	(tramp-handle-directory-files)
    +	(tramp-handle-directory-files-and-attributes)
    +	(tramp-handle-dired-uncache, tramp-handle-find-backup-file-name)
    +	(tramp-handle-insert-file-contents, tramp-handle-load)
    +	(tramp-handle-shell-command)
    +	(tramp-handle-verify-visited-file-modtime)
    +	(tramp-handle-file-notify-valid-p, tramp-accept-process-output)
    +	(tramp-check-for-regexp, tramp-wait-for-regexp)
    +	(tramp-send-string, tramp-mode-string-to-int)
    +	(tramp-get-local-gid, tramp-check-cached-permissions)
    +	(tramp-get-remote-tmpdir, tramp-make-tramp-temp-file)
    +	(auto-save-file-name-transforms)
    +	(tramp-handle-make-auto-save-file-name, tramp-read-passwd)
    +	(tramp-clear-passwd, tramp-time-diff):
    +	* lisp/net/tramp-adb.el (directory-listing-before-filename-regexp)
    +	(directory-sep-char, tramp-adb-file-name-handler-alist)
    +	(tramp-adb-parse-device-names)
    +	(tramp-adb-handle-expand-file-name)
    +	(tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash)
    +	(tramp-adb-handle-file-local-copy)
    +	(tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes)
    +	(tramp-adb-handle-rename-file, tramp-adb-handle-process-file)
    +	(tramp-adb-handle-shell-command)
    +	(tramp-adb-handle-start-file-process, tramp-adb-get-device)
    +	(tramp-adb-maybe-open-connection):
    +	* lisp/net/tramp-cache.el (tramp-persistency-file-name)
    +	(tramp-cache-print):
    +	* lisp/net/tramp-cmds.el (tramp-cleanup-all-connections)
    +	(tramp-bug, tramp-reporter-dump-variable)
    +	(tramp-load-report-modules, tramp-append-tramp-buffers):
    +	* lisp/net/tramp-compat.el (tramp-compat-funcall)
    +	(tramp-advice-file-expand-wildcards)
    +	(tramp-compat-temporary-file-directory)
    +	(tramp-compat-make-temp-file, tramp-compat-copy-file)
    +	(tramp-compat-delete-directory, )
    +	(tramp-compat-process-running-p):
    +	* lisp/net/tramp-ftp.el (tramp-methods) :
    +	(tramp-default-method-alist, tramp-foreign-file-name-handler-alist):
    +	* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist)
    +	(tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file)
    +	(tramp-gvfs-handle-file-local-copy)
    +	(tramp-gvfs-handle-file-name-all-completions)
    +	(tramp-gvfs-handle-file-notify-add-watch)
    +	(tramp-gvfs-monitor-file-process-filter)
    +	(tramp-gvfs-handle-file-readable-p)
    +	(tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region)
    +	(tramp-gvfs-file-name, tramp-gvfs-handler-askquestion)
    +	(tramp-gvfs-maybe-open-connection)
    +	(tramp-gvfs-parse-device-names):
    +	* lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel)
    +	(tramp-gw-open-connection, tramp-gw-open-network-stream):
    +	* lisp/net/tramp-sh.el (directory-sep-char)
    +	(tramp-sh-file-name-handler-alist)
    +	(tramp-sh-handle-file-truename)
    +	(tramp-sh-handle-set-visited-file-modtime)
    +	(tramp-sh-handle-verify-visited-file-modtime)
    +	(tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times)
    +	(tramp-sh-handle-file-acl)
    +	(tramp-sh-handle-file-name-all-completions)
    +	(tramp-sh-handle-copy-file, tramp-sh-handle-rename-file)
    +	(tramp-do-copy-or-rename-file-directly)
    +	(tramp-do-copy-or-rename-file-out-of-band)
    +	(dired-compress-file-suffixes, dired-remove-file)
    +	(tramp-sh-handle-dired-compress-file)
    +	(tramp-sh-handle-insert-directory)
    +	(tramp-sh-handle-expand-file-name)
    +	(tramp-sh-handle-start-file-process)
    +	(tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy)
    +	(tramp-sh-handle-write-region, tramp-sh-handle-vc-registered)
    +	(tramp-sh-handle-file-notify-add-watch)
    +	(tramp-sh-gvfs-monitor-dir-process-filter)
    +	(tramp-sh-inotifywait-process-filter, tramp-maybe-send-script)
    +	(tramp-find-executable)
    +	(tramp-open-connection-setup-interactive-shell)
    +	(tramp-find-inline-encoding, tramp-compute-multi-hops)
    +	(tramp-maybe-open-connection, tramp-convert-file-attributes)
    +	(tramp-get-remote-path, tramp-get-remote-touch):
    +	* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist)
    +	(tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file)
    +	(tramp-smb-handle-delete-directory)
    +	(tramp-smb-handle-directory-files, tramp-smb-handle-file-acl)
    +	(tramp-smb-handle-make-directory-internal)
    +	(tramp-smb-handle-process-file, tramp-smb-handle-rename-file)
    +	(tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes)
    +	(tramp-smb-handle-write-region, tramp-smb-get-file-entries)
    +	(tramp-smb-get-cifs-capabilities)
    +	(tramp-smb-maybe-open-connection):
    +	* lisp/net/trampver.el (tramp-repository-get-version):
    +	Remove XEmacs compat code.
    +
    +	* lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag)
    +	(reporter-dump-variable): Declare functions.
    +
    +	* lisp/net/tramp.el (tramp-bkup-backup-directory-info)
    +	(tramp-advice-minibuffer-electric-separator)
    +	(tramp-advice-minibuffer-electric-tilde)
    +	(tramp-handle-unhandled-file-name-directory):
    +	* lisp/net/tramp-compat.el (tramp-compat-with-temp-message)
    +	(tramp-compat-font-lock-add-keywords)
    +	(tramp-compat-load, tramp-compat-number-sequence)
    +	(tramp-compat-split-string, tramp-compat-delete-dups):
    +	* lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally):
    +	Remove.
     
    -	* lisp/simple.el (internal-echo-keystrokes-prefix): Add
    -	commentary about the function's return value.
    +	* lisp/net/tramp-sh.el (tramp-methods) : This does not work
    +	recursively.
     
    -2015-12-11  Eli Zaretskii  
    +2016-01-14  K. Handa  
     
    -	* lisp/files.el (load-library): Doc fix.  (Bug#22140)
    +	fix previous change of src/ftfont.c (ftfont_shape_by_flt)
     
    -2015-12-11  Eli Zaretskii  
    +	* src/ftfont.c (ftfont_shape_by_flt): Fix previous change.  Access the
    +	second glyph only when there are enough glyphs.
     
    -	Improve and document Ruby support in 'etags'
    +2016-01-13  Glenn Morris  
     
    -	* lib-src/etags.c (Ruby_suffixes): Add ".ruby".
    -	(Ruby_functions): Support "module" and overloaded operators.
    -	(Ruby_help): Mention "module".
    +	* src/buffer.c (Fset_buffer_major_mode): Allow default major-mode,
     
    -	* test/etags/ruby-src/test.rb:
    -	* test/etags/ruby-src/test1.ru: New files.
    -	* test/etags/Makefile (RBSRC): New tests.
    -	(SRCS): Add ${RBSRC}.
    -	* test/etags/ETAGS.good_1:
    -	* test/etags/ETAGS.good_2:
    -	* test/etags/ETAGS.good_3:
    -	* test/etags/ETAGS.good_4:
    -	* test/etags/ETAGS.good_5:
    -	* test/etags/ETAGS.good_6:
    -	* test/etags/CTAGS.good: Adapt to the new Ruby tests.
    +	or its hook, to move point.  (Bug#22348)
     
    -	* doc/man/etags.1: Mention Ruby support.
    -	* etc/NEWS: Mention Ruby support.
    +2016-01-12  Michael Albinus  
     
    -2015-12-11  Xi Lu  
    +	Merge missing commit from emacs-25 branch
     
    -	Initial support for Ruby in 'etags'
    +	* test/Makefile.in (SELECTOR_DEFAULT, SELECTOR_EXPENSIVE, SELECTOR):
    +	New variables.
    +	(check-expensive, check-doit): New targets.
     
    -	* lib-src/etags.c : New variable.
    -	(lang_names): Add an entry for Ruby.
    -	(Ruby_functions): New function.  (Bug#22116)
    +	* Makefile.in (check-expensive): New target.
     
    -2015-12-11  Eli Zaretskii  
    +	* test/lisp/autorevert-tests.el
    +	(auto-revert-test01-auto-revert-several-files):
    +	* test/lisp/filenotify-tests.el (file-notify--deftest-remote)
    +	(file-notify-test06-many-events):
    +	* test/lisp/net/tramp-tests.el (tramp-test26-process-file)
    +	(tramp-test27-start-file-process, tramp-test28-shell-command)
    +	(tramp-test29-vc-registered)
    +	(tramp-test31-special-characters-with-stat)
    +	(tramp-test31-special-characters-with-perl)
    +	(tramp-test31-special-characters-with-ls)
    +	(tramp-test32-utf8-with-stat, tramp-test32-utf8-with-perl)
    +	(tramp-test32-utf8-with-ls, tramp-test33-asynchronous-requests)
    +	(tramp-test35-unload): Tag the tests as :expensive-test.
     
    -	Clarify documentation of 'modify-frame-parameters'
    +2016-01-12  John Wiegley  
    +
    +	Merge from origin/emacs-25
    +
    +	1f6898d test/automated/vc-hg.el: Support out-of-tree build
    +	3adb56e Minor change in tramp-tests.el
    +	2b535ba ; * etc/NEWS: Update the js.el entry.
    +	76b518c * etc/HELLO: Add Armenian and Mongolian greetings.
    +	b51f1ef Java Mode: Fontify identifiers in the presence of annotations.
    +	36b9539 Avoid an infloop when we run out of memory
    +	2006752 Avoid unnecessary failures of auto-saving after fatal error
    +	eef6784 Simplify HAVE_MODULES use in mark_maybe_pointer
    +	552694a Revert attempt to use 'noexcept' in typedef
    +	6ad0d39 Update documentation of 'indirect-function'
    +	c6a5314 ; * etc/NEWS: Move entry of 'inhibit-point-motion-hooks'.
    +	303141a Update documentation for obsoleting 'syntax-begin-function'
    +	4e6f61c ; * etc/NEWS: Mark documented and not-to-be-documented entries.
    +	e667bbb Document new features if Eshell
    +	9c4e4e0 ; * etc/NEWS: Update EUDC entries.
    +	1089dc9 Handle too long commands in Tramp
    +	684eb58 * .gitattributes: *.cur and *.pif are binary files too.
    +	d2c7fda * src/alloc.c (mark_maybe_pointer): HAVE_MODULES may be undefined
    +	bd3f53d * sh-script.el (sh-smie-sh-rules): Improve indentation inside $(...)
    +	09b2b8a * src/alloc.c (mark_maybe_pointer): Also check wide-int's emacs_value
    +	cca0f93 ; Account for spaces before the filename
    +	c71e1e8 Use short date for 'hg annotate', and output the author
    +	f50027b Spelling fix
    +	c7dff67 ; * etc/NEWS: Fix the Xref entries that got separated.
    +	cc140bc Document user-level functions in project.el
    +	f8208b6 Document the user-level features of the Xref package
    +	b131fb8 * loading.texi: Add `define-type' entry for load-history
    +	db3c2a8 Improve doc strings and prompts in xref.el
    +	f6117ef Allow the use of `font-lock-extend-region-multiline' in CC Mode.
    +	90fd798 Fix coding system for Tramp on OS X.
    +	e985a0e ; * etc/NEWS: Mark the 'check-expensive' entry not to be documented.
    +	9dfcbf0 Update 'load-history' docs
    +	207e191 Fix (error ...) error
    +	457738f Correctly analyze brace arguments in templated C++ function declarations.
    +	d57724a * lisp/cedet/mode-local.el (describe-function-orig-buffer): Declare.
    +	2a9532d * lisp/ffap.el (ffap-latex-mode): Avoid free variable.
    +	1a6b084 * lisp/play/dunnet.el (dun-fix-screen): Avoid `end-of-buffer`.
    +	8be046f Respect fontification region calculated by major mode.  Fixes bug #22316.
    +	4b37cba Improve documentation of Delete Selection mode
    +	a034dd3 Fix two project-find-file issues
    +	30abf29 Clarify doc string of 'dired-current-directory'
    +	e990bb2 Use the face of preceding text for displaying the ellipsis
    +	5810ac3 Suppress Chinese file name test for OSX in tramp-tests.el
    +	eeb710a ; * lisp/startup.el: Sentences end with two spaces.
    +	428b3de * admin/admin.el (set-version): Also handle the NEWS file.
    +	648de81 ; Add NEWS entry for project.el
    +	671862f apropos-library: Skip obvious duplicates; don't error on generics
    +	51668a5 ; Grammar fix
    +	ed41d11 Add project-find-file and project-or-external-find-file
    +	056da45 ; Improve commentary in 'setup_for_ellipsis'
    +	269d008 ; Improve docstring for `inhibit-startup-echo-area-message'
    +
    +2016-01-12  John Wiegley  
    +
    +	Merge from origin/emacs-25
    +
    +	ce4a052 Add defvar-local to lisp-imenu-generic-expression
    +	a0121bc Revert commit b1e3d14845517bfa9fa5d6d3840f3ab3160306fd
    +	76fe2d5 * lisp/emacs-lisp/autoload.el (autoload-find-destination): Doc fix.
    +	1ae088f * lisp/emacs-lisp/autoload.el (autoload-find-destination):
    +	b6b47af Properly encode/decode base64Binary data in SOAP
    +	c632466 Obey coding-system-for-write when writing stdout/stderr in batch
    +	2f32cb5 * doc/misc/efaq.texi (Packages that do not come with Emacs):
    +	        Update the URI of MELPA and marmalade-repo.
    +	        Reported by CHENG Goa  in
    +	        https://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00390.html.
    +	d2937aa * lisp/progmodes/opascal.el (opascal-mode-syntax-table):
    +	5330c25 * lisp/progmodes/xscheme.el (xscheme-prompt-for-expression-exit):
    +	7380990 Remove function wrongly on AWK Mode value of context
    +	fontification hook.
    +	d400753 * src/buffer.c: Stick with ASCII in doc string.
    +	221240c Reword transient-mark-mode doc string
    +	977d3ea Update doc string of 'selective-display'
    +	229c3fa Make C++ buffers writeable when writing their initial text
    +	        properties.
    +	f5c762c Additional changes for "make check-expensive"
    +	1729cf3 ; * admin/MAINTAINERS: Remove myself.
    +	33219d3 Apply text properties for <, > in new after-change function
    +	        (C++ Java Modes).
    +
    +2016-01-12  John Wiegley  
    +
    +	Merge from origin/emacs-25
    +
    +	9fb185a shr-tag-video bug fix
    +	6300655 Minor fixes in tramp-tests.el
    +	50575b1 Ensure redisplay when 'truncate-lines' is set
    +	0d9e80d Fix a doc string of 'transient-mark-mode'
    +	0000ae5 MS-Windows followup to latest gnulib update
    +	4bc5e02 Spelling fix
    +	f1093f7 Do secure signed Bcc handling
    +
    +2016-01-12  John Wiegley  
    +
    +	Merge from origin/emacs-25
    +
    +	861022f * doc/misc/texinfo.tex: Revert unwanted copyright change.
    +	46e47a5 ; * etc/refcards/ru-refcard.tex (cyear): Update via M-x set-copyright.
    +	71ea138 * lisp/align.el (align): Simplify a lambda
    +	5618a50 * lisp/align.el (align): Fix arg order in call to `align-region'
    +	1f680db Fix compilation next-error in buffers with selective-display
    +	d20a948 * nsm.el (nsm-check-protocol): Fix typo in the message.
    +	1da116f Add SHA1 warnings for high network security settings
    +	e48bacd ; * etc/NEWS: Typo fix.
    +
    +2016-01-12  John Wiegley  
    +
    +	Merge from origin/emacs-25
    +
    +	43662a2 ; Clarify that xref is still experimental
    +	0a6e6ca ; * admin/release-process: Remove some obsolete records.
    +	c2e9e3d * lisp/progmodes/fortran.el (fortran-make-syntax-propertize-function):
    +	8637f3d (semantic-symref-derive-find-filepatterns): Return a list
    +	0a7ad07 ; Re-arrange xref-related entries in NEWS.
    +	fe903ef Fix xref-find-references on MS-Windows
    +	55a28d8 ; Fixed visual bell artifact problem on NextStep.
    +	d064034 Document new features of tildify-mode
    +	964bea7 Document new features of Whitespace mode
    +	cd68f47 Improve documentation of new Hide-IfDef features
    +	723b8bf Fix regression in font-locking cl-assert and cl-check-type
    +
    +2016-01-12  John Wiegley  
    +
    +	Merge from origin/emacs-25
    +
    +	ef33bc7 Spelling and grammar fixes
    +	9c3dbab Fix copyright years by hand
    +	0e96320 Update copyright year to 2016
    +
    +2016-01-12  John Wiegley  
    +
    +	Merge from origin/emacs-25
    +
    +	9ee6ecb lisp/emacs-lisp/chart.el (chart-new-buffer): Move to silence byte compiler.
    +	526d80c Port chart.el methods to cl-generic.
    +	410bb69 Add nt/INSTALL.W64 build instructions
    +	8f5b524 Add new input method 'programmer-dvorak'
    +	6d11f6e Allow to invoke original M-TAB binding in 'flyspell-prog-mode'
    +	bb83bb1 Fix EWW rendering of long RTL lines
    +	b1a8509 fix  bug#21054
    +	ce5ad12 Clean up cairo printing code
    +
    +2016-01-12  John Wiegley  
    +
    +	Merge from origin/emacs-25
    +
    +	6ee327d Add handle_user_signal_hook
    +	47580e0 Avoid writing to purespace
    +	0588be7 Remove unused variable
    +	89e7483 * configure.ac: Find libxml2 headers in Xcode SDK dir on Darwin.
    +	3b95e9c Use posix_openpt instead of openpty on Darwin
    +	86312ff Document support for ':documentation' in Lisp mode
    +	c930e75b Document new features of TeX mode
    +	7c83d84 Clarify docs of hscroll in RTL text
    +	4c8f8db Fix rendering of HTML pages that use character composition
    +	a8d37ca Avoid some compiler warnings in w32.c
    +	ce106f3de Undo ill-advised change
    +	be0bba4 Unbreak completion in python-mode buffers
     
    -	* doc/lispref/frames.texi (Parameter Access): Clarify what "ignored
    -	PARMs" mean for 'modify-frame-parameters'.
    +2016-01-11  Dmitry Gutov  
     
    -	* src/frame.c (Fmodify_frame_parameters): Clarify what "ignored
    -	PARMs" mean for this function.  (Bug#22104)
    +	test/automated/vc-hg.el: Support out-of-tree build
     
    -2015-12-11  Eli Zaretskii  
    +	* test/automated/vc-hg.el
    +	(vc-hg-annotate-extract-revision-at-line-with-filename)
    +	(vc-hg-annotate-extract-revision-at-line-with-both):
    +	Don't refer to source-directory.
    +	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00755.html
     
    -	Fix setting buffer unibyte when reading from a device
    +2016-01-11  Michael Albinus  
     
    -	* src/fileio.c (Finsert_file_contents): Call Fset_buffer_multibyte
    -	to make a (possibly non-empty) buffer unibyte.  (Bug#22096)
    +	Minor change in tramp-tests.el
     
    -2015-12-11  Eli Zaretskii  
    +	* test/automated/tramp-tests.el (tramp-test29-vc-registered):
    +	Use `dired-uncache' instead of a Tramp internal function.
     
    -	Clarify documentation of 'values'
    +2016-01-11  Peter Feigl  
     
    -	* doc/lispref/eval.texi (Eval): Clarify that 'values' are not
    -	updated by any evaluation commands in 'lisp-interaction-mode'.
    -	(Bug#22056)
    +	* etc/HELLO: Add Armenian and Mongolian greetings.
     
    -2015-12-11  Anders Lindgren  
    +	(Bug#22346)
     
    -	Fixed subversion vc error when opening file in new directory (bug#21984).
    +2016-01-11  Alan Mackenzie  
     
    -	* lisp/vc/vc-svn.el (vc-svn-registered): Check if directory exists.
    +	Java Mode: Fontify identifiers in the presence of annotations.
     
    -2015-12-09  Eli Zaretskii  
    +	* lisp/progmodes/cc-engine.el (c-forward-annotation): Tidy up the coding:
    +	Don't move point when the defun fails.
    +	(c-forward-decl-or-cast-1): Correct a usage of match data.
     
    -	Yet another fix for when point ends up in invisible text
    +	* lisp/progmodes/cc-fonts.el (c-font-lock-maybe-decl-faces): Remove.
    +	(c-font-lock-declarations): Use the new c-maybe-decl-faces in place of the
    +	removed variable.
     
    -	* src/xdisp.c (redisplay_window): When someone forced
    -	window-start, and honoring that failed to show the cursor, try
    -	moving out of invisible text, before falling back to the middle of
    -	the window.  (Bug#22098)
    +	* lisp/progmodes/cc-langs.el (c-maybe-decl-faces): New language variable.
     
    -2015-12-09  Michael Albinus  
    +2016-01-11  Eli Zaretskii  
     
    -	Fix error in Tramp perl script for cygwin
    +	Avoid an infloop when we run out of memory
     
    -	* lisp/net/tramp-sh.el (tramp-perl-file-truename): Do not raise an
    -	error if file doesn't exist.
    +	* src/alloc.c (garbage_collect_1): Don't bother saving and
    +	restoring the echo-area message if we are GC'ing after running out
    +	of memory.  This avoids an infloop due to repeated attempts to
    +	allocate memory for the cons cell needed to save the message,
    +	which signals the memory-full error, which attempts to save the
    +	echo-area message, which signals memory-full again, etc.
     
    -2015-12-09  YAMAMOTO Mitsuharu  
    +2016-01-11  Eli Zaretskii  
     
    -	Remove font workaround for limited outdated versions
    +	Avoid unnecessary failures of auto-saving after fatal error
     
    -	* src/macfont.m (mac_font_descriptor_get_adjusted_weight): Remove
    -	workaround for HiraginoSans-W7 on OS X 10.11 and 10.11.1.
    +	* src/w32.c (map_w32_filename): Avoid non-trivial system calls for
    +	the benefit of FAT volumes if we are called as part of shutting
    +	down due to a fatal error, which probably means we are trying to
    +	auto-save the session.
    +	* src/lread.c (check_obarray): Don't bother making the obarray
    +	valid if we are shutting down due to a fatal error.  This avoids
    +	interfering with auto-saving the crashed session.
     
    -2015-12-09  Anders Lindgren  
    +2016-01-11  Paul Eggert  
     
    -	Don't add "." to load path (bug#21104)
    +	Simplify HAVE_MODULES use in mark_maybe_pointer
     
    -	When configured with --enable-locallisppath=no, which is the
    -	default for OS X, the load-path incorrectly was populated with ".".
    +	* src/alloc.c (HAVE_MODULES): Now a constant 0 if not defined,
    +	so that later code can use 'if' rather than '#ifdef'.
    +	(mark_maybe_pointer): Simplify based on HAVE_MODULES now
    +	always working.
     
    -	* src/lread.c (init_lread): Don't call `decode_env_path' when
    -	PATH_SITELOADSEARCH is empty.
    +2016-01-11  Paul Eggert  
     
    -2015-12-08  Artur Malabarba  
    +	Revert attempt to use 'noexcept' in typedef
     
    -	* lisp/emacs-lisp/package.el (package--with-response-buffer):
    +	This use of 'noexcept' runs afoul of the C++11 standard.
    +	Problem reported by Philipp Stephani in:
    +	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00706.html
    +	* src/emacs-module.c (emacs_finalizer_function):
    +	Move this typedef here ...
    +	* src/emacs-module.h: ... from here, and use only the C
    +	version of the typedef.  The typedef is now private since it
    +	is never used in the .h file now and anyway it seemed to be
    +	causing more confusion than it cured.
    +	(make_user_ptr, get_user_finalizer, set_user_finalizer):
    +	Open-code the type instead.
     
    -	Search for the blank-line in the right buffer.
    +2016-01-10  Eli Zaretskii  
     
    -2015-12-08  Glenn Morris  
    +	Update documentation of 'indirect-function'
     
    -	* test/automated/simple-test.el (undo-auto-boundary-timer): Update
    -	for recent change.
    +	* doc/lispref/eval.texi (Function Indirection): Update the
    +	documentation of 'indirect-function'.
     
    -2015-12-08  Glenn Morris  
    +2016-01-10  Eli Zaretskii  
     
    -	Fix some display-warning usage.
    +	Update documentation for obsoleting 'syntax-begin-function'
     
    -	* lisp/files.el (hack-local-variables, hack-dir-local-variables):
    -	* lisp/calendar/diary-lib.el (diary-include-files, diary-sexp-entry):
    -	* lisp/calendar/holidays.el (calendar-holiday-list):
    -	* lisp/mail/rmailout.el (rmail-output-read-file-name):
    -	Fix display-warning usage.
    +	* doc/lispref/syntax.texi (Position Parse): Undocument
    +	'syntax-begin-function' that is now obsolete.
     
    -2015-12-08  Glenn Morris  
    +2016-01-10  Eli Zaretskii  
     
    -	* lisp/calendar/cal-html.el: Require diary-lib.
    +	Document new features if Eshell
     
    -	(cal-html-list-diary-entries): Handle no diary.  (Bug#21994)
    +	* doc/misc/eshell.texi (Input/Output): Document the new
    +	'#' syntax.
    +	(Input/Output): Document 'eshell-destroy-buffer-when-process-dies'.
    +	Disable "Key Index" generation, as there are no @kindex entries in
    +	this manual.
     
    -2015-12-08  Thomas Fitzsimmons  
    +2016-01-10  Michael Albinus  
     
    -	Add Obsolete-since header to eudcb-ph.el
    +	Handle too long commands in Tramp
     
    -	* lisp/obsolete/eudcb-ph.el: Add Obsolete-since header.
    +	* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
    +	(tramp-do-file-attributes-with-ls): Send sequence of commands, in
    +	order to not exceed shell command line limit.
     
    -2015-12-07  Paul Eggert  
    +	* test/automated/tramp-tests.el (tramp--test-darwin-p): Remove.
    +	(tramp--test-utf8): Include Arabic file name, again.
     
    -	Spelling fixes
    +2016-01-10  Paul Eggert  
     
    -	* doc/misc/calc.texi (Predefined Units): Use the bland modern
    -	scientific style for spelling the units “ampere” and
    -	“angstrom” rather than the older style “Ampere” and
    -	“Ångstrom”.  The latter spelling was wrong anyway (it should
    -	have been “Ångström”).
    -	* lisp/emacs-lisp/ert.el (ert--explain-equal-rec):
    -	Fix misspelling of ‘atom’ in code.
    +	* .gitattributes: *.cur and *.pif are binary files too.
     
    -2015-12-07  Eli Zaretskii  
    +2016-01-10  Stefan Monnier  
     
    -	Improve documentation of kill commands
    +	* src/alloc.c (mark_maybe_pointer): HAVE_MODULES may be undefined
     
    -	* lisp/simple.el (region-extract-function, delete-backward-char)
    -	(delete-forward-char, kill-region, copy-region-as-kill)
    -	(kill-ring-save): Better document the optional argument REGION in
    -	the doc strings.  Mention in the doc strings that text put in the
    -	kill-ring can be filtered by 'filter-buffer-substring'.
    +2016-01-10  Stefan Monnier  
     
    -	* doc/lispref/text.texi (Kill Functions): Mention that functions
    -	described in this subsection can filter text they put in the
    -	kill-ring.  Add a cross-reference to "Buffer Contents" and an
    -	index entry.  Document the optional argument 'region' and its
    -	effect.
    -	(Bug#21315)
    +	* sh-script.el (sh-smie-sh-rules): Improve indentation inside $(...)
     
    -2015-12-07  Alan Mackenzie  
    +	* lisp/progmodes/sh-script.el (sh-smie-sh-rules): Improve indentation
    +	within $(...).
    +	* test/indent/shell.sh: Add corresponding test.
     
    -	Further progress making Isearch, Ispell, Replace work with Follow Mode.
    +2016-01-09  Stefan Monnier  
     
    -	* lisp/follow.el: (follow-mode): Remove references to sit*-for-function, which
    -	no longer exists.  Add follow-post-command-hook to  three special purpose
    -	hooks at setup, and remove them at tear down.
    +	* src/alloc.c (mark_maybe_pointer): Also check wide-int's emacs_value
     
    -	* lisp/isearch.el: (isearch-update): invoke isearch-update-post-hook before
    -	isearch-lazy-highlight-new-loop.
    -	(isearch-lazy-highlight-new-loop): Restore this function to what it previously
    -	was, merging the functionality of isearch-lazy-highlight-maybe-new-loop into
    -	it.
    -	(isearch-lazy-highlight-maybe-new-loop): function removed.
    +	(mark_memory): Simplify loop.  Don't assume a pointer-sized word can be
    +	cast to Lisp_Object.
     
    -	* lisp/replace.el: (replace-update-post-hook): New hook variable.
    -	(perform-replace): Add second (nil) argument to looking-back.  Invoke
    -	replace-update-post-hook before calling replace-highlight.
    +2016-01-09  Dmitry Gutov  
     
    -	* lisp/textmodes/ispell.el: (ispell-update-post-hook): New hook variable.
    -	(ispell-command-loop): invoke ispell-update-post-hook.  Add GROUP argument to
    -	call of pos-visible-in-window-p.
    -	(ispell-display-buffer): Place *Choices* window at the top of the last window
    -	in a window group.
    +	Use short date for 'hg annotate', and output the author
     
    -2015-12-07  Alan Mackenzie  
    +	* lisp/vc/vc-hg.el (vc-hg-annotate-command):
    +	Change '-d' to '-dq'.  (Bug#21805)
    +	(vc-hg-annotate-switches): Default to "-u" "--follow".
    +	(vc-hg-annotate-re): Update to recognize the short date format
    +	and the optional username.
    +	(vc-hg-annotate-time)
    +	(vc-hg-annotate-extract-revision-at-line): Update accordingly.
     
    -	Amend doc of `mapconcat': it can take sequences, not merely strings.
    +	* test/automated/vc-hg.el: New file.
     
    -	* doc/lispref/functions.texi (Mapping Functions): Amend the doc of `mapconcat'
    -	to say that SEPARATOR and the results from FUNCTION may be any character
    -	sequences, not just strings.  Add an @xref to "Sequences Arrays Vectors".
    +2016-01-09  Paul Eggert  
     
    -2015-12-07  Michael Albinus  
    +	Spelling fix
     
    -	Fix an utf8 problem for Tramp on BSD
    +2016-01-09  Eli Zaretskii  
     
    -	* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
    -	Make lax check for utf8.
    -	(tramp-get-remote-locale): Add "en_US.UTF-8" as candidate.
    +	Document user-level functions in project.el
     
    -2015-12-07  Thomas Fitzsimmons  
    +	* lisp/progmodes/project.el (project-find-file)
    +	(project-or-external-find-file): Add doc strings.
     
    -	Make eudcb-ph.el obsolete
    +2016-01-09  Eli Zaretskii  
     
    -	* doc/misc/eudc.texi: Bump version to 1.40.0.
    -	Remove PH/QI sections and mentions.
    -	* lisp/obsolete/eudcb-ph.el: Make obsolete.
    -	* lisp/net/eudc-vars.el (eudc-known-protocols): Remove ph.
    -	(eudc-ph-bbdb-conversion-alist): Make obsolete.
    -	* etc/NEWS: Mention this.  (Bug#21191)
    +	Document the user-level features of the Xref package
     
    -2015-12-07  Paul Eggert  
    +	* doc/emacs/maintaining.texi (Maintaining): Add a list of
    +	described features.
    +	(Xref): New section, made out of thoroughly rewritten "Tags"
    +	section.
    +	(Find Identifiers, Looking Up Identifiers, Xref Commands)
    +	(Identifier Search, List Identifiers): New subsections,
    +	incorporating the old tags commands and the new xref commands.
    +	(Tags Tables, Tag Syntax, Create Tags Table, Etags Regexps):
    +	Section and subsections demoted to a lower level.
    +	* doc/emacs/search.texi (Search):
    +	* doc/emacs/windows.texi (Pop Up Window):
    +	* doc/emacs/frames.texi (Creating Frames):
    +	* doc/emacs/programs.texi (Imenu, Symbol Completion):
    +	* doc/emacs/building.texi (Grep Searching):
    +	* doc/emacs/dired.texi (Operating on Files):
    +	* doc/emacs/glossary.texi (Glossary): All references to tags changed.
     
    -	Remove overenthusiastic eassert
    +2016-01-09  Stefan Monnier  
     
    -	* src/lisp.h (XSYMBOL): Remove eassert incorrectly added in
    -	previous change.  It breaks on MS-Windows --with-wide-int.
    -	Problem reported by Eli Zaretskii in:
    -	http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00275.html
    +	* loading.texi: Add `define-type' entry for load-history
     
    -2015-12-06  Paul Eggert  
    +	* doc/lispref/loading.texi (Where Defined): Remove incorrect
    +	cl-defmethod description, and add missing define-type entry.
     
    -	Pacify gcc -Wparentheses
    +2016-01-09  Eli Zaretskii  
     
    -	* src/xdisp.c (row_containing_pos): Reparenthesize.
    +	Improve doc strings and prompts in xref.el
     
    -2015-12-06  Paul Eggert  
    +	* lisp/progmodes/xref.el (xref-backend-functions)
    +	(xref-find-definitions): Doc fixes.
    +	(xref-query-replace): Doc fix.  Improve prompts for arguments.
     
    -	Port mod-test to 32-bit Emacs --without-wide-int
    +2016-01-09  Alan Mackenzie  
     
    -	* modules/mod-test/test.el (mod-test-sum-test):
    -	Bring back the 2**29 tests, but port them to 32-bit Emacs
    -	--without-wide-int.
    +	Allow the use of `font-lock-extend-region-multiline' in CC Mode.
     
    -2015-12-06  Michael Albinus  
    +	* lisp/progmodes/cc-mode.el (c-font-lock-init): Remove
    +	`font-lock-extend-regions-wholelines' from
    +	`font-lock-extend-region-functions' rather than setting the latter to
    +	nil.
     
    -	Fix minor Tramp problems found on BSD
    +2016-01-09  Michael Albinus  
     
    -	* lisp/net/tramp-sh.el (tramp-perl-file-truename): Do not append
    -	trailing slash.  Quote apostrophes.
    -	(tramp-sh-handle-file-truename): Do not append trailing slash in
    -	the "ls" case.
    -	(tramp-get-ls-command-with-w-option): New defun.
    -	(tramp-do-file-attributes-with-ls)
    -	(tramp-do-directory-files-and-attributes-with-stat): Use it.
    +	Fix coding system for Tramp on OS X.
     
    -	* test/automated/tramp-tests.el
    -	(tramp-test31-special-characters-with-perl)
    -	(tramp-test31-special-characters-with-ls)
    -	(tramp-test32-utf8-with-perl, tramp-test32-utf8-with-ls):
    -	Suppress also readlink.
    +	* lisp/net/tramp-compat.el: Require ucs-normalize.
     
    -2015-12-06  Eli Zaretskii  
    +	* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
    +	Set coding system to `utf-8-hfs' for Mac OS X.
     
    -	Fix cursor display when invisible text is at line beginning
    +	* test/automated/tramp-tests.el (tramp-test29-vc-registered):
    +	Flush directory properties when needed.
    +	(tramp--test-utf8): Include Chinese file name, again.
     
    -	* src/xdisp.c (redisplay_window): When scrolling fails to show
    -	point, prefer using the desired matrix if possible for finding the
    -	fallback glyph row for displaying the cursor.  (Bug#22098)
    -	(row_containing_pos): Exit the loop as soon as we hit the first
    -	disabled glyph row.  Otherwise we risk accessing garbled data and
    -	departing to the no-no land.
    +2016-01-09  Eli Zaretskii  
     
    -2015-12-06  Paul Eggert  
    +	Update 'load-history' docs
     
    -	Improve module interface when WIDE_EMACS_INT
    +	* doc/lispref/loading.texi (Where Defined): Update the list of
    +	forms in 'load-history' by adding the forms created for the
    +	'cl-generic' generics.  (Bug#21422)
     
    -	* src/emacs-module.c (plain_values): New constant.
    -	(module_nil): Now a constant.
    -	(Finternal_module_call, value_to_lisp_bits, lisp_to_value_bits)
    -	(syms_of_module): Use if, not #ifdef, so that both sides are
    -	checked at compile-time, and so that GCC doesn’t complain
    -	about an unused var in the typical case.  Also, depend on
    -	plain_values, not on WIDE_EMACS_INT; the code shouldn’t assume
    -	that WIDE_EMACS_INT implies !USE_LSB_TAG.
    -	(value_to_lisp_bits, lisp_to_value_bits): New functions.
    -	Sign-extend integers rather than zero-extending them, as small
    -	negative integers are more likely.
    -	(value_to_lisp, lisp_to_value): Rewrite in terms of the new *_bits
    -	functions.
    -	(HAVE_STRUCT_ATTRIBUTE_ALIGNED): Define to 0 if not already defined.
    -	(mark_modules): Remove.  All uses removed.
    -	(lisp_to_value): Don’t assume Fcons returns a pointer aligned
    -	to GCALIGNMENT.
    -	(syms_of_module): Check that module_nil converts to Qnil.
    -	* src/lisp.h (lisp_h_XSYMBOL, XSYMBOL): Use signed conversion, since
    -	we prefer signed to unsigned when either will do.
    -	(TAG_PTR): Sign-extend pointers when USE_LSB_TAG, as this is
    -	a bit better for emacs-module.c.
    +2016-01-08  Paul Eggert  
     
    -2015-12-06  Paul Eggert  
    +	Fix (error ...) error
     
    -	Port mod-test to x86-64 GNU/Linux running 32-bit
    +	Problem reported by Glenn Morris in:
    +	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00561.html
    +	* lisp/vc/add-log.el (change-log-goto-source): Fix typos
    +	introduced in my Aug 28 change, where I got confused by the
    +	two meanings of (error ...).
     
    -	* modules/mod-test/test.el (mod-test-sum-test):
    -	Don’t attempt to match descriptions to operating systems.
    -	It didn’t work on Fedora x86-64 running a 32-bit executable,
    -	and it’s not worth the trouble anyway.
    -	Port to 32-bit platforms by removing an assumption about
    -	fixnum widths.
    +2016-01-08  Alan Mackenzie  
     
    -2015-12-06  Michael Albinus  
    +	Correctly analyze brace arguments in templated C++ function declarations.
     
    -	Fix auto-revert-tests.el when filenotify isn't used
    +	* lisp/progmodes/cc-defs.el (c-go-list-forward, c-go-list-backward): add
    +	POS and LIMIT parameters, like the other c-go-list-* functions have.
     
    -	* test/automated/auto-revert-tests.el (auto-revert--wait-for-revert):
    -	Make it working also when filenotify isn't used.
    +	* lisp/progmodes/cc-engine.el (c-restore-<>-properties): Check backwards
    +	for a ?\( rather than a ?<.  (c-looking-at-inexpr-block): Handle names
    +	followed by template specifiers.
     
    -2015-12-06  Juri Linkov  
    +2016-01-08  Glenn Morris  
     
    -	* lisp/textmodes/ispell.el (ispell-highlight-spelling-error-overlay):
    +	* lisp/cedet/mode-local.el (describe-function-orig-buffer): Declare.
     
    -	Let-bind isearch-regexp-function to nil.  (Bug#22097)
    +	* lisp/ffap.el (ffap-latex-mode): Avoid free variable.
     
    -2015-12-05  Artur Malabarba  
    +2016-01-08  Mark Oteiza  
     
    -	* lisp/emacs-lisp/package.el: Don't install bad signatures (bug#22089)
    +	* lisp/play/dunnet.el (dun-fix-screen): Avoid `end-of-buffer`.
     
    -	(package--with-response-buffer): NOERROR and ERROR-FORM only
    -	handle connection errors.
    -	(bad-signature): New error type.
    -	(package--check-signature-content): Use it.
    -	(package--check-signature): Properly distinguish connection errors
    -	from bad-signature errors.  Do the check for
    -	`package-check-signature' `allow-unsigned' here instead of forcing
    -	the callbacks to do it.  Add a new argument, UNWIND.
    -	(package--download-one-archive, package-install-from-archive):
    -	Update usage of `package--check-signature'.
    +2016-01-08  Alan Mackenzie  
     
    -2015-12-05  Ulf Jasper  
    +	Respect fontification region calculated by major mode.  Fixes bug #22316.
     
    -	Fix Bug#22092.
    +	* lisp/font-lock.el (font-lock-extend-jit-lock-region-after-change): when a
    +	fontification region has been calculated by a function on
    +	font-lock-extend-after-change-region-function use this region rather than
    +	changing the end position to somewhere else.
     
    -	* lisp/calendar/icalendar.el (icalendar--get-unfolded-buffer):
    -	  Clean up inconsistent line endings. (Bug#22092)
    -	  (icalendar--clean-up-line-endings): New.
    -	* test/automated/icalendar-tests.el (icalendar-real-world): Add test
    -	  for Bug#22092.
    +2016-01-08  Eli Zaretskii  
     
    -2015-12-05  Eli Zaretskii  
    +	Improve documentation of Delete Selection mode
     
    -	Document 'bookmark-set-no-overwrite'
    +	* lisp/delsel.el (delete-selection-mode)
    +	(delete-selection-helper): Update and expand the doc strings.
    +	(Bug#22296)
     
    -	* doc/emacs/regs.texi (Bookmarks): Document the new command
    -	'bookmark-set-no-overwrite' and its keybinding.
    +	* doc/emacs/mark.texi (Using Region): Document the behavior of
    +	delete commands in Delete Selection mode.  (Bug#22296)
     
    -2015-12-05  Eli Zaretskii  
    +	* doc/lispref/markers.texi (The Mark): Document how to add the
    +	support for Delete Selection mode to Lisp programs. (Bug#22296)
     
    -	Document new binding of 'mouse-buffer-menu'
    +2016-01-08  Dmitry Gutov  
     
    -	* doc/emacs/buffers.texi (Buffer Menus): 'mouse-buffer-menu' is
    -	now also on C-F10.
    +	Fix two project-find-file issues
     
    -2015-12-05  Eli Zaretskii  
    +	* lisp/progmodes/project.el (project--value-in-dir):
    +	Temporarily set enable-local-variables to :all.
    +	(project-find-file, project-or-external-find-file):
    +	All autoloads.
    +	(project--find-file-in): Require xref.
     
    -	Initial documentation of dynamic modules
    +2016-01-08  Eli Zaretskii  
     
    -	* doc/lispref/loading.texi (Dynamic Modules): New section with
    -	initial documentation for dynamic modules.
    -	* doc/lispref/elisp.texi (Top): Add "Dynamic Modules" to the
    -	detailed menu
    +	Clarify doc string of 'dired-current-directory'
     
    -	* etc/NEWS: Fix typos in dynamic modules' entry.
    +	* lisp/dired.el (dired-current-directory): Doc fix: clarify that
    +	the return value might not end in a slash when called with the
    +	optional argument non-nil.  (Bug#6273)
     
    -2015-12-05  Artur Malabarba  
    +2016-01-08  Eli Zaretskii  
     
    -	Remove copyright statements from trivial test files
    +	Use the face of preceding text for displaying the ellipsis
     
    -2015-12-05  Eli Zaretskii  
    +	* src/xdisp.c (setup_for_ellipsis): Use the face of the preceding
    +	text in it->saved_face_id for displaying the ellipsis, and ignore
    +	the face, if any, of the invisible text.  (Bug#22320)
     
    -	Add "Preliminaries" section to etc/DEBUG
    +2016-01-08  Michael Albinus  
     
    -	* etc/DEBUG: Add the "Preliminaries" section for GDB beginners.
    -	Most of the content was suggested by Phillip Lord
    -	.  Remove the section about debugging
    -	with the Visual Studio, as building Emacs with the Microsoft
    -	compilers is no longer supported.  Minor fixes in some other
    -	sections.
    +	Suppress Chinese file name test for OSX in tramp-tests.el
     
    -2015-12-05  Alex Dunn    (tiny change)
    +	* test/automated/tramp-tests.el (tramp--test-utf8):
    +	Remove instrumentation.  Suppress Chinese file name test for OSX.
     
    -	Improve parsing of version strings
    +2016-01-07  Glenn Morris  
     
    -	* lisp/subr.el (version-regexp-alist): Allow "." as priority separator
    -	(version-to-list): More helpful error messages.
    -	(version-to-list): ".5" is valid (update docstring).  Make
    -	"22.8X3" invalid, as the doc string says.
    +	* admin/admin.el (set-version): Also handle the NEWS file.
     
    -	* test/automated/subr-tests.el (ert-test-version-parsing): New
    -	tests for version string processing.
    +2016-01-07  Dmitry Gutov  
     
    -2015-12-05  Eli Zaretskii  
    +	apropos-library: Skip obvious duplicates; don't error on generics
     
    -	Fix documentation of 'undo' changes
    +	* lisp/apropos.el (apropos-library): Skip "was an autoload"
    +	entries, to avoid obvious duplicates.  For each cl-defmethod
    +	entry, take just its function symbol (bug#21422).
     
    -	* doc/lispref/text.texi (Undo): Minor wording changes.  Use US
    +2016-01-07  Dmitry Gutov  
    +
    +	Add project-find-file and project-or-external-find-file
    +
    +	* lisp/minibuffer.el (completion-category-defaults):
    +	Add `project-file' category.
    +
    +	* lisp/progmodes/project.el (project-find-file)
    +	(project-or-external-find-file): New commands.
    +	(project--find-file-in): New private function.
    +
    +	* lisp/progmodes/xref.el (xref-collect-matches): Use
    +	`expand-file-name' on DIR, to expand the tildes.
    +	(xref--find-ignores-arguments): Extract from
    +	`xref--rgrep-command'.
    +
    +2016-01-06  Leo Liu  
    +
    +	Add defvar-local to lisp-imenu-generic-expression
    +
    +	* lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): Add
    +	  defvar-local.
    +
    +2016-01-06  Leo Liu  
    +
    +	Revert commit b1e3d14845517bfa9fa5d6d3840f3ab3160306fd
    +
    +	* lisp/emacs-lisp/easy-mmode.el (define-minor-mode):
    +	  Don't declare (indent 1).
    +
    +2016-01-06  Glenn Morris  
    +
    +	* lisp/emacs-lisp/autoload.el (autoload-find-destination): Doc fix.
    +
    +2016-01-06  Glenn Morris  
    +
    +	* lisp/emacs-lisp/autoload.el (autoload-find-destination):
    +
    +	Avoid specifying the length of a time object (it has not been "2"
    +	for some time).
    +
    +2016-01-06  Andreas Schwab  
    +
    +	Properly encode/decode base64Binary data in SOAP
    +
    +		* lisp/net/soap-client.el (soap-encode-xs-basic-type): Encode
    +		base64Binary value as utf-8.
    +		(soap-decode-xs-basic-type): Decode base64Binary value as utf-8.
    +
    +2016-01-06  Eli Zaretskii  
    +
    +	Obey coding-system-for-write when writing stdout/stderr in batch
    +
    +	* src/print.c (printchar_to_stream):
    +	* src/xdisp.c (message_to_stderr): If coding-system-for-write has
    +	a non-nil value, use it to encode output in preference to
    +	locale-coding-system.  See the discussions in
    +	http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00048.html
    +	for the details.
    +
    +	* doc/lispref/os.texi (Terminal Output): Document how to send
    +	non-ASCII text via 'send-string-to-terminal'.
    +	(Batch Mode): Document how text written to standard streams is
    +	encoded.  Fix inaccuracy regarding which output streams are used
    +	by output functions in batch mode.
    +
    +2016-01-06  Xue Fuqiao  
    +
    +	* doc/misc/efaq.texi (Packages that do not come with Emacs):
    +	Update the URI of MELPA and marmalade-repo.  Reported by CHENG Gao
    +	 in
    +	https://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00390.html.
    +
    +2016-01-05  Maksim Golubev    (tiny change)
    +
    +	* lisp/progmodes/opascal.el (opascal-mode-syntax-table):
    +
    +	Fix backslash.  (Bug#22224)
    +
    +2016-01-05  Federico Beffa    (tiny change)
    +
    +	* lisp/progmodes/xscheme.el (xscheme-prompt-for-expression-exit):
    +
    +	Make it actually work.  (Bug#22265)
    +
    +2016-01-05  Alan Mackenzie  
    +
    +	Remove function wrongly on AWK Mode value of context fontification hook.
    +
    +	* lisp/progmodes/cc-langs.el (c-before-context-fontification-functions):
    +	swap order of entries so that awk's entry isn't superseded by the default.
    +
    +	* lisp/progmodes/cc-mode.el (c-before-context-fl-expand-region): Correct
    +	to handle nil value of c-before-context-fontification-functions.
    +
    +2016-01-05  Paul Eggert  
    +
    +	* src/buffer.c: Stick with ASCII in doc string.
    +
    +2016-01-05  Paul Eggert  
    +
    +	Reword transient-mark-mode doc string
    +
    +	* src/buffer.c (syms_of_buffer): Reword doc string to avoid confusion.
    +	The value 'lambda (literally) can be interpreted as (quote lambda),
    +	which is not intended here; we want just the lambda symbol.
    +
    +2016-01-05  Eli Zaretskii  
    +
    +	Update doc string of 'selective-display'
    +
    +	* src/buffer.c (syms_of_buffer) : Say that
    +	using it with the value of 't' is obsolete.  (Bug#1092)
    +
    +2016-01-05  Alan Mackenzie  
    +
    +	Make C++ buffers writeable when writing their initial text properties.
    +
    +	This is a correction to yesterday's CC Mode patch.
    +
    +	* lisp/progmodes/cc-engine.el (c-before-change-check-<>-operators): Put
    +	c-save-buffer-state around the function rather than a mere `let'.
    +
    +2016-01-05  Michael Albinus  
    +
    +	Additional changes for "make check-expensive"
    +
    +	* CONTRIBUTE : Encourage use of ":tags '(:expensive-test)".
    +	Explain make target `check-expensive'.
    +
    +	* etc/NEWS: Mention new make target `check-expensive'.
    +
    +	* test/automated/Makefile.in (check-doit): New target.
    +	(check, check-expensive): Use it.
    +
    +2016-01-04  Alan Mackenzie  
    +
    +	Apply text properties for <, > in new after-change function (C++ Java Modes).
    +
    +	These are category/syntax-table properties to give < and > paren syntax.
    +	Also apply certain `c-type' text properties to the insides of <..> constructs
    +	to ensure that identifiers contained by them get fontified.  This patch fixes
    +	bug #681.
    +
    +	* lisp/progmodes/cc-cmds.el (c-electric-lt-gt): Reformulate due to new
    +	after-change action.
    +
    +	* lisp/progmodes/cc-engine.el (c-before-change-check-<>-operators): Expand
    +	change region to include s which might not be already marked as
    +	parens, rather than just when paren text properties are removed.
    +	(c-restore-<>-properties): New after-change function, which applies text
    +	properties marking < and > with paren syntax.
    +
    +	* lisp/progmodes/cc-fonts.el (c-font-lock-declarations): Ensure `c-type'
    +	properties are applied to the interiors of <...> constructs, to ensure
    +	fontification of identifiers there.
    +
    +	* lisp/progmodes/cc-langs.el (c-before-font-lock-functions): Add
    +	c-restore-<>-properties to this list for C++ and Java.
    +
    +	* lisp/progmodes/cc-mode.el (c-common-init): When invoking
    +	c-before-font-lock-functions, exclude c-restore-<>-properties from the
    +	functions invoked.
    +	(c-before-change): Initialize c-new-BEG/END here (rather than c-after-change)
    +	to allow modification by before-change functions.
    +	(c-after-change): Amend c-new-END here, rather than initializing it and
    +	c-new-BEG.
    +
    +2016-01-04  Michael Albinus  
    +
    +	Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25
    +
    +2016-01-04  Michael Albinus  
    +
    +	Introduce check-expensive tests.
    +
    +	* Makefile.in (check-expensive):
    +	* test/automated/Makefile.in (check-expensive): New target.
    +
    +	* test/automated/auto-revert-tests.el
    +	(auto-revert-test01-auto-revert-several-files):
    +	* test/automated/file-notify-tests.el (file-notify--deftest-remote):
    +	* test/automated/tramp-tests.el (tramp-test26-process-file)
    +	(tramp-test27-start-file-process, tramp-test28-shell-command)
    +	(tramp-test29-vc-registered)
    +	(tramp-test31-special-characters-with-stat)
    +	(tramp-test31-special-characters-with-perl)
    +	(tramp-test31-special-characters-with-ls)
    +	(tramp-test32-utf8-with-stat, tramp-test32-utf8-with-perl)
    +	(tramp-test32-utf8-with-ls, tramp-test33-asynchronous-requests)
    +	(tramp-test35-unload): Tag the tests as :expensive-test.
    +
    +2016-01-04  Lars Magne Ingebrigtsen  
    +
    +	shr-tag-video bug fix
    +
    +	* shr.el (shr-tag-video): Protect against the `poster' being
    +	empty.
    +
    +2016-01-04  Michael Albinus  
    +
    +	Minor fixes in tramp-tests.el
    +
    +	* test/automated/tramp-tests.el (tramp-test26-process-file):
    +	Move point properly.
    +	(tramp-test29-vc-registered): Work with relative file names.
    +
    +2016-01-04  Eli Zaretskii  
    +
    +	Ensure redisplay when 'truncate-lines' is set
    +
    +	* lisp/frame.el (redisplay--variables): Add 'truncate-lines'.
    +	(Bug#22303)
    +
    +2016-01-04  Eli Zaretskii  
    +
    +	Fix a doc string of 'transient-mark-mode'
    +
    +	* src/buffer.c (syms_of_buffer) : Prevent
    +	"lambda" in doc string from becoming a link to lambda expressions.
    +
    +2016-01-04  Eli Zaretskii  
    +
    +	MS-Windows followup to latest gnulib update
    +
    +	* nt/gnulib.mk (EXTRA_DIST): Add ignore-value.h.
    +
    +2016-01-04  Paul Eggert  
    +
    +	Spelling fix
    +
    +2016-01-03  Jens Lechtenboerger  
    +
    +	Do secure signed Bcc handling
    +
    +	* lisp/gnus/message.el (message-send): Do secure signed Bcc handling
    +	(bug#18718).
    +
    +2016-01-03  Paul Eggert  
    +
    +	Avoid stdio in SIGINT handler
    +
    +	* admin/merge-gnulib (GNULIB_MODULES): Add ignore-value.
    +	* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
    +	* lib/ignore-value.h: New file, from gnulib.
    +	* src/keyboard.c: Include it.
    +	(write_stdout, read_stdin): New functions.
    +	(handle_interrupt): Use them instead of printf and getchar,
    +	and avoid fflush when handling signals.
    +
    +2016-01-03  Paul Eggert  
    +
    +	* doc/misc/texinfo.tex: Revert unwanted copyright change.
    +
    +2016-01-03  Artur Malabarba  
    +
    +	* lisp/align.el (align): Simplify a lambda
    +
    +	* lisp/align.el (align): Fix arg order in call to `align-region'
    +
    +2016-01-03  Eli Zaretskii  
    +
    +	Fix compilation next-error in buffers with selective-display
    +
    +	* lisp/progmodes/compile.el (compilation-beginning-of-line): New
    +	function.
    +	(compilation-internal-error-properties)
    +	(compilation-next-error-function, compilation-set-window): Use
    +	it.  (Bug#1092)
    +
    +2016-01-03  Lars Magne Ingebrigtsen  
    +
    +	* nsm.el (nsm-check-protocol): Fix typo in the message.
    +
    +2016-01-03  Lars Magne Ingebrigtsen  
    +
    +	Add SHA1 warnings for high network security settings
    +
    +	* nsm.el (nsm-check-protocol): When using high security, warn
    +	about SHA1 certificates, which are now believed to be open to
    +	spoofing.
    +
    +2016-01-02  Jens Lechtenboerger  
    +
    +	Refactor mml-smime.el, mml1991.el, mml2015.el
    +
    +	(Maybe this is the last merge from Gnus git to Emacs git)
    +
    +	Cf. discussion on ding mailing list, messages in
    +	.
    +	Common code from the three files mml-smime.el, mml1991.el, and
    +	mml2015.el is moved to mml-sec.el.  Auxiliary functions are added
    +	to gnus-util.el.
    +
    +	The code is supported by test cases with necessary test keys.
    +
    +	Documentation in message.texi is updated.
    +
    +	* doc/misc/message.texi (Security, Using S/MIME):
    +	Update for refactoring mml-smime.el, mml1991.el, mml2015.el.
    +	(Using OpenPGP): Rename from "Using PGP/MIME"; update contents.
    +	(Passphrase caching, Encrypt-to-self, Bcc Warning): New sections.
    +
    +	* lisp/gnus/gnus-util.el (gnus-test-list, gnus-subsetp, gnus-setdiff):
    +	New functions.
    +
    +	* lisp/gnus/mml-sec.el: Require gnus-util and epg.
    +	(epa--select-keys): Autoload.
    +	(mml-signencrypt-style-alist, mml-secure-cache-passphrase): Doc fix.
    +	(mml-secure-openpgp-signers): New user option;
    +	make mml1991-signers and mml2015-signers obsolete aliases to it.
    +	(mml-secure-smime-signers): New user option;
    +	make mml-smime-signers an obsolete alias to it.
    +	(mml-secure-openpgp-encrypt-to-self): New user option;
    +	make mml1991-encrypt-to-self and mml2015-encrypt-to-self obsolete
    +	aliases to it.
    +	(mml-secure-smime-encrypt-to-self): New user option;
    +	make mml-smime-encrypt-to-self an obsolete alias to it.
    +	(mml-secure-openpgp-sign-with-sender): New user option;
    +	make mml2015-sign-with-sender an obsolete alias to it.
    +	(mml-secure-smime-sign-with-sender): New user option;
    +	make mml-smime-sign-with-sender an obsolete alias to it.
    +	(mml-secure-openpgp-always-trust): New user option;
    +	make mml2015-always-trust an obsolete alias to it.
    +	(mml-secure-fail-when-key-problem, mml-secure-key-preferences):
    +	New user options.
    +	(mml-secure-cust-usage-lookup, mml-secure-cust-fpr-lookup)
    +	(mml-secure-cust-record-keys, mml-secure-cust-remove-keys)
    +	(mml-secure-add-secret-key-id, mml-secure-clear-secret-key-id-list)
    +	(mml-secure-cache-passphrase-p, mml-secure-cache-expiry-interval)
    +	(mml-secure-passphrase-callback, mml-secure-check-user-id)
    +	(mml-secure-secret-key-exists-p, mml-secure-check-sub-key)
    +	(mml-secure-find-usable-keys, mml-secure-select-preferred-keys)
    +	(mml-secure-fingerprint, mml-secure-filter-keys)
    +	(mml-secure-normalize-cust-name, mml-secure-select-keys)
    +	(mml-secure-select-keys-1, mml-secure-signer-names, mml-secure-signers)
    +	(mml-secure-self-recipients, mml-secure-recipients)
    +	(mml-secure-epg-encrypt, mml-secure-epg-sign): New functions.
    +
    +	* lisp/gnus/mml-smime.el: Require epg;
    +	refactor declaration and autoloading of epg functions.
    +	(mml-smime-use): Doc fix.
    +	(mml-smime-cache-passphrase, mml-smime-passphrase-cache-expiry):
    +	Obsolete.
    +	(mml-smime-get-dns-cert, mml-smime-get-ldap-cert):
    +	Use format instead of gnus-format-message.
    +	(mml-smime-epg-secret-key-id-list): Remove variable.
    +	(mml-smime-epg-passphrase-callback, mml-smime-epg-find-usable-key)
    +	(mml-smime-epg-find-usable-secret-key): Remove functions.
    +	(mml-smime-epg-sign, mml-smime-epg-encrypt): Refactor.
    +
    +	* lisp/gnus/mml1991.el (mml1991-cache-passphrase)
    +	(mml1991-passphrase-cache-expiry): Obsolete.
    +	(mml1991-epg-secret-key-id-list): Remove variable.
    +	(mml1991-epg-passphrase-callback, mml1991-epg-find-usable-key)
    +	(mml1991-epg-find-usable-secret-key): Remove functions.
    +	(mml1991-epg-sign, mml1991-epg-encrypt): Refactor.
    +
    +	* lisp/gnus/mml2015.el (mml2015-cache-passphrase)
    +	(mml2015-passphrase-cache-expiry): Obsolete.
    +	(mml2015-epg-secret-key-id-list): Remove variable.
    +	(mml2015-epg-passphrase-callback, mml2015-epg-check-user-id)
    +	(mml2015-epg-check-sub-key, mml2015-epg-find-usable-key)
    +	(mml2015-epg-find-usable-secret-key): Remove functions.
    +	(mml2015-epg-decrypt, mml2015-epg-clear-decrypt, mml2015-epg-sign)
    +	(mml2015-epg-encrypt): Refactor.
    +
    +2016-01-02  Glenn Morris  
    +
    +	* lisp/progmodes/fortran.el (fortran-make-syntax-propertize-function):
    +
    +	Explicitly ignore case.  (Bug#22262)
    +
    +2016-01-02  Stefan Monnier  
    +
    +	(semantic-symref-derive-find-filepatterns): Return a list
    +
    +	* lisp/cedet/semantic/symref/grep.el
    +	(semantic-symref-derive-find-filepatterns): Return a list.
    +	(semantic-symref-perform-search): Quote the result here once and for all.
    +
    +2016-01-02  Eli Zaretskii  
    +
    +	Fix xref-find-references on MS-Windows
    +
    +	* lisp/cedet/semantic/symref/grep.el
    +	(semantic-symref-derive-find-filepatterns): Use
    +	'shell-quote-argument' instead of manually quoting in a way that
    +	only works with Posix shells.  (Bug#22289)
    +
    +2016-01-02  Eli Zaretskii  
    +
    +	Document new features of tildify-mode
    +
    +	* lisp/textmodes/tildify.el (tildify-foreach-ignore-environments)
    +	(tildify-mode): Spelling fixes in doc strings.
    +
    +	* etc/NEWS: Reformat the tildify-mode entry.
    +
    +2016-01-02  Eli Zaretskii  
    +
    +	Document new features of Whitespace mode
    +
    +	* doc/emacs/display.texi (Useless Whitespace): Document
    +	'whitespace-toggle-options' and the new 'big-indent' style.
    +	Document 'whitespace-big-indent-regexp'.  Document the Global
    +	Whitespace mode.
    +
    +2016-01-02  Eli Zaretskii  
    +
    +	Improve documentation of new Hide-IfDef features
    +
    +	* etc/NEWS: Expand and reword Hide-IfDef section.
    +
    +2016-01-02  Leo Liu  
    +
    +	Fix regression in font-locking cl-assert and cl-check-type
    +
    +	* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): Fix
    +	  el-errs-re.
    +
    +2016-01-01  Paul Eggert  
    +
    +	Spelling and grammar fixes
    +
    +2016-01-01  Paul Eggert  
    +
    +	Fix copyright years by hand
    +
    +	These are dates that admin/update-copyright did not update, or
    +	updated incorrectly.
    +
    +2016-01-01  Paul Eggert  
    +
    +	Update copyright year to 2016
    +
    +	Run admin/update-copyright.
    +
    +2016-01-01  Paul Eggert  
    +
    +	Merge from gnulib
    +
    +	This mostly just updates copyright dates of gnulib files.
    +	It also updates to the latest version of texinfo.tex.
    +
    +2015-12-31  Mark Oteiza  
    +
    +	lisp/emacs-lisp/chart.el (chart-new-buffer): Move to silence byte compiler.
    +
    +2015-12-31  Mark Oteiza  
    +
    +	Port chart.el methods to cl-generic.
    +
    +	cl-call-next-method cannot be used inside EIEIO's defmethod.
    +	* lisp/emacs-lisp/chart.el: Require cl-generic at compile time.
    +	* lisp/emacs-lisp/chart.el (initialize-instance, chart-draw):
    +	(chart-draw-title, chart-size-in-dir, chart-draw-axis):
    +	(chart-axis-draw, chart-translate-xpos, chart-translate-ypos):
    +	(chart-translate-namezone, chart-draw-data, chart-add-sequence):
    +	(chart-trim, chart-sort): Use cl-defmethod instead of defmethod.
    +
    +2015-12-31  Brian Burns  
    +
    +	Add nt/INSTALL.W64 build instructions
    +
    +	* nt/INSTALL.W64: New file.
    +	* nt/INSTALL: Point to INSTALL.W64 for 64-bit build instructions.
    +
    +2015-12-31  Joakim Jalap  
    +
    +	Add new input method 'programmer-dvorak'
    +
    +	* lisp/leim/quail/programmer-dvorak.el ("programmer-dvorak"): New
    +	input method.
    +
    +	* etc/NEWS: Mention it.
    +
    +2015-12-31  Eli Zaretskii  
    +
    +	Allow to invoke original M-TAB binding in 'flyspell-prog-mode'
    +
    +	* lisp/textmodes/flyspell.el (flyspell-prog-mode): Record the
    +	original M-TAB binding in a buffer-local variable.
    +	(flyspell-auto-correct-word): Invoke the original binding of M-TAB
    +	if that is recorded, when point is in a place where flyspell
    +	should not be active (e.g., because the user turned on
    +	'flyspell-prog-mode').  (Bug#18533)
    +
    +2015-12-31  Eli Zaretskii  
    +
    +	Fix EWW rendering of long RTL lines
    +
    +	* lisp/net/shr.el (shr-insert-document): Undo any previous hscroll
    +	of the selected window before filling its lines.  (Bug#22250)
    +
    +2015-12-31  Vincent Belaïche  
    +
    +	fix  bug#21054
    +
    +	* ses.el (ses-check-curcell): Call `ses-set-curcell' unconditionally
    +
    +2015-12-31  YAMAMOTO Mitsuharu  
    +
    +	Clean up cairo printing code
    +
    +	* src/gtkutil.c (xg_get_page_setup): Use listn.
    +	* src/xfns.c (Fx_export_frames, Fx_print_frames_dialog): Doc fix.  Use
    +	decode_window_system_frame and FRAME_VISIBLE_P.
    +	(Fx_print_frames_dialog): Use redisplay_preserve_echo_area instead
    +	of Fdisplay.
    +	* src/xterm.c (x_cr_export_frames): Use redisplay_preserve_echo_area
    +	instead of Fdisplay.  Temporarily unblock_input around QUIT.
    +
    +2015-12-30  YAMAMOTO Mitsuharu  
    +
    +	Add handle_user_signal_hook
    +
    +	* src/keyboard.h (handle_user_signal_hook): New declaration.
    +	* src/keyboard.c (handle_user_signal_hook): New variable.
    +	(handle_user_signal): Call it.
    +
    +2015-12-30  YAMAMOTO Mitsuharu  
    +
    +	Avoid writing to purespace
    +
    +	* src/alloc.c (Fmake_string): Don't write to empty string contents.
    +	(allocate_vector): Don't write to empty vector size.
    +	* src/character.h (CHECK_CHARACTER_CAR, CHECK_CHARACTER_CDR):
    +	Don't call unnecessary XSETCAR or XSETCDR.
    +	* src/lisp.h (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE): Don't
    +	write to empty string size_byte.
    +
    +2015-12-30  YAMAMOTO Mitsuharu  
    +
    +	Remove unused variable
    +
    +	* lisp/international/mule-cmds.el: Remove unused variable
    +	`mac-system-coding-system'.
    +
    +2015-12-30  YAMAMOTO Mitsuharu  
    +
    +	* configure.ac: Find libxml2 headers in Xcode SDK dir on Darwin.
    +
    +2015-12-30  YAMAMOTO Mitsuharu  
    +
    +	Use posix_openpt instead of openpty on Darwin
    +
    +	* configure.ac (PTY_ITERATION, FIRST_PTY_LETTER, PTY_OPEN)
    +	(PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF): Remove
    +	Darwin-specific definitions.  Use posix_openpt instead.
    +
    +2015-12-30  Shakthi Kannan  
    +
    +	Document support for ':documentation' in Lisp mode
    +
    +	* lisp/emacs-lisp/lisp-mode.el (lisp-string-in-doc-position-p)
    +	(lisp-string-after-doc-keyword-p)
    +	(lisp-font-lock-syntactic-face-function): Add doc strings.
    +
    +2015-12-30  Shakthi Kannan  
    +
    +	Document new features of TeX mode
    +
    +	* doc/emacs/text.texi (TeX Print): Document
    +	'tex-print-file-extension'.
    +	* doc/emacs/programs.texi (Misc for Programs): Document support
    +	for Prettify Symbols mode in TeX mode.
    +
    +2015-12-30  Eli Zaretskii  
    +
    +	Clarify docs of hscroll in RTL text
    +
    +	* doc/lispref/windows.texi (Horizontal Scrolling): Clarify the
    +	meaning of a window's horizontal scroll amount for RTL paragraphs.
    +
    +2015-12-30  Eli Zaretskii  
    +
    +	Fix rendering of HTML pages that use character composition
    +
    +	* src/indent.c (Fvertical_motion): Fix the case when point starts
    +	in the middle of a composition, as in shr-vertical-motion.
    +	(Bug#22250)
    +
    +2015-12-30  Eli Zaretskii  
    +
    +	Avoid some compiler warnings in w32.c
    +
    +	* src/w32.c (codepage_for_filenames, crlf_to_lf)
    +	(ansi_encode_filename, socket_to_fd, sys_write)
    +	(check_windows_init_file): Avoid compiler warnings about
    +	differences in pointer signedness.
    +
    +2015-12-29  Dmitry Gutov  
    +
    +	Undo ill-advised change
    +
    +	* lisp/progmodes/xref.el (xref-collect-matches): Undo
    +	ill-advised change.  The hits come in the order that `find'
    +	produces them in, which isn't alphabetical.
    +
    +2015-12-29  Dmitry Gutov  
    +
    +	Unbreak completion in python-mode buffers
    +
    +	* lisp/progmodes/python.el (python-shell-completion-at-point):
    +	Unbreak in python-mode buffers.
    +
    +2016-01-09  Andrew Hyatt  
    +
    +	Adding example replies to bug-triage.
    +
    +	* admin/notes/bug-triage: Added example replies. Also, as requested,
    +	  making the process notes into more of a checklist.
    +
    +2016-01-08  Andrew Hyatt  
    +
    +	Rename the notes/admin/triage file to bug-triage.
    +
    +	* CONTRIBUTE: Change reference to the triage file name.
    +	* admin/notes/triage: Rename file to admin/notes/bug-triage.
    +
    +2016-01-07  Glenn Morris  
    +
    +	Allow creation of loaddefs files without timestamps.
    +
    +	* lisp/emacs-lisp/autoload.el (autoload-timestamps): New variable.
    +	(autoload-generate-file-autoloads, update-directory-autoloads):
    +	If autoload-timestamps is nil, write "t" instead of file timestamp.
    +	(autoload-find-destination, update-directory-autoloads):
    +	If timestamp is "t", use the modtime of the output file instead.
    +
    +2016-01-06  Glenn Morris  
    +
    +	Doc tweaks.
    +
    +	* lisp/calendar/cal-hebrew.el (diary-hebrew-list-entries):
    +	* lisp/calendar/cal-iso.el (calendar-iso-to-absolute)
    +	(calendar-iso-from-absolute):
    +	* lisp/calendar/cal-tex.el (cal-tex-comment):
    +	* lisp/calendar/solar.el (calendar-time-display-form): Doc tweaks.
    +
    +2016-01-06  Glenn Morris  
    +
    +	Build tweaks related to tags files.
    +
    +	* lib-src/Makefile.in (tagsfiles): New variable.
    +	(TAGS): Also depend on the source files.  Use our own etags program.
    +	* lisp/Makefile.in (ETAGS): Add EXEEXT.
    +	(lisptagsfiles1, lisptagsfiles2, lisptagsfiles3, lisptagsfiles4):
    +	Remove.
    +	(tagsfiles): New, replacing lisptagsfiles1 etc.
    +	Remove irrelevant source files here rather than in the TAGS rule.
    +	(${ETAGS}): New rule.
    +	(TAGS): Also depend on the etags executable.
    +	* lwlib/Makefile.in (EXEEXT): New, set by configure.
    +	(ETAGS): Add EXEEXT.
    +	(${ETAGS}): New rule.
    +	(ctagsfiles): Use "wildcard".
    +	(TAGS): Also depend on the etags executable.
    +	* nt/Makefile.in (ETAGS, tagsfiles): New variables.
    +	(${ETAGS}): New rule.
    +	(TAGS): Fix dependencies.
    +	* oldXMenu/Makefile.in (EXEEXT): New, set by configure.
    +	(ETAGS): New variable, replacing $TAGS.  Use our own etags program.
    +	Remove "-t" argument.
    +	(${ETAGS}): New rule.
    +	(tagsfiles): New variable.
    +	(TAGS): New rule, with proper dependencies.
    +	* src/Makefile.in (ETAGS): Add EXEEXT.  Add a build rule.
    +	(ctagsfiles1, ctagsfiles2): Use "wildcard".
    +	(ctagsfiles3): Remove.
    +	(TAGS): Depend on etags.
    +	(../lisp/TAGS, $(lwlibdir)/TAGS): Let the rules in the relevant
    +	directories decide if updates are needed.
    +
    +2016-01-06  Glenn Morris  
    +
    +	* lisp/Makefile.in (CAL_SRC): Skip calendar.el.
    +
    +2016-01-06  Glenn Morris  
    +
    +	* test/lisp/emacs-lisp/package-tests.el
    +
    +	(package-test-macro-compilation): Fixup branch merge.
    +
    +2016-01-05  Eli Zaretskii  
    +
    +	Fix fallout from merging emacs-25 branch in test/
    +
    +	* .gitignore: Update for the new place of biditest.txt.
    +	* test/automated/: Directory removed.  All files moved to their
    +	proper places.
    +	* test/etags/: Directory removed.  All files moved to their proper
    +	places.
    +	* test/automated/url-parse-tests.el: File removed; it was an exact
    +	copy of the same file in test/lisp/url/.
    +	* test/automated/url-expand-tests.el: Moved to test/lisp/url/.
    +
    +2016-01-04  Paul Eggert  
    +
    +	Spelling fixes.
    +
    +2016-01-04  Daniel Colascione  
    +
    +	Let users disable unsafe signal handling code
    +
    +	* src/keyboard.c (syms_of_keyboard): New user variables
    +	`attempt-stack-overflow-recovery' and
    +	`attempt-orderly-shutdown-on-fatal-signal'.
    +	* src/sysdep.c (stack_overflow): Check
    +	`attempt-stack-overflow-recovery'.
    +	* src/emacs.c (terminate_due_to_signal): Check
    +	`attempt-orderly-shutdown-on-fatal-signal'.
    +
    +2016-01-03  Michael Albinus  
    +
    +	* configure.ac: Add error message for gfile on Nextstep.
    +
    +2016-01-03  John Wiegley  
    +
    +	Merge branch 'emacs-25-merge'
    +
    +2016-01-02  Vincent Belaïche  
    +
    +	Align textually on fix done for emacs-25 branch for bug#21054
    +
    +	* lisp/ses.el (ses-check-curcell): Suppress ``temporary fix'' comment,
    +	and useless `(if t ...)' in order to align textually on fix done for
    +	emacs-25 branch for bug#21054.
    +
    +2016-01-02  K. Handa  
    +
    +	support rendering of wider range of combinging characters by ftfont backend
    +
    +	* lisp/language/hebrew.el (hebrew-shape-gstring): If the font backend
    +	supports rendering of combining characters, call
    +	font-shape-gstring.
    +
    +	* src/font.c (Ffont_get): Handle `combining-capability' property.
    +	(syms_of_font): New symbol ":combining-capability'.
    +
    +	* src/font.h (struct font_driver): New member combining_capability.
    +
    +	* src/ftfont.c: Include "category.h".
    +	(ftfont_driver): Initialize combining_capability to
    +	ftfont_combining_capability.
    +	(ftfont_shape_by_flt): If OTF is null, try to find a suitable
    +	FLT in advance.
    +	(ftfont_combining_capability): New function.
    +
    +2016-01-01  Andrew Hyatt  
    +
    +	Add notes on bug triage procedure
    +
    +	* CONTRIBUTE: In section on the issue tracker, point to new triage file.
    +	* admin/notes/triage: New file explaining triage procedure.
    +
    +2015-12-30  Vincent Belaïche  
    +
    +	Correct ses-rename-cell cursor-intangible text prop updating.
    +
    +	There were two problems:
    +
    +	- First ses-rename-cell has to work when called non interactively
    +	  (with non-nil CELL argument), so in this case the start pos of
    +	  put-text-property cannot be plainly (point), you need a
    +	  ses-goto-print call before
    +
    +	- Second, the range itself was computed erronously, only the first
    +	  char was affected instead of the full cell width. This was not
    +	  noticeable prior to changes (Deprecate `intangible' and
    +	  `point-entered' properties) made by Stefan on 2015-04-13T19:51:15Z
    +
    +	* lisp/ses.el (ses-rename-cell): Correct computation of position range
    +	to which the 'cursor-intangible text property has to be set to cell
    +	new name.
    +
    +2015-12-30  Vincent Belaïche  
    +
    +	Don't fake empty cells value by "" when printing with a lambda.
    +
    +	When using a lambda expression printer function the user should be
    +	free to format differently a really empty cell, ie. containing nil,
    +	from a cell containing an empty string "".
    +
    +	* ses.el (ses-call-printer): Replace `(or value "")' by just `value'
    +	in the case of a lambda expression printer function.
    +
    +	* ses.texi (Printer functions): Add example and description about
    +	lambda expression printer function handling all the possible values,
    +	including unexpected ones.
    +
    +2015-12-30  Vincent Belaïche  
    +
    +	Quick temporary hack to fix curcell refreshing.
    +
    +	The problem was caused by change: 2015-04-13 Deprecate `intangible'
    +	and `point-entered' properties. The problem is that this change has
    +	removed the (setq ses--curcell t) setting in the ses-command-hook
    +	function.
    +
    +	* ses.el (ses-check-curcell): replace `(eq ses--curcell t)' by just `t' as
    +	a condition to call function `ses-set-curcell'. Comment this as a quick
    +	temporary hack to make it work, as I don't know yet whether a definite
    +	correction would be to make the ses-set-curcell at every ses-check-curcell,
    +	or to revert to the previous approach, ie marking ses--curcell as out-of-date
    +	at every potentially cursor motion command.
    +
    +2015-12-30  Lars Magne Ingebrigtsen  
    +
    +	Restrictive URL checking tweaks
    +
    +	* lisp/net/eww.el (eww): Check whether the domain is
    +	restrictive instead of the string
    +	(http://македонија.icom.museum is restrictive even if each
    +	part is from a different script).
    +
    +2015-12-30  Lars Magne Ingebrigtsen  
    +
    +	New function `puny-highly-restrictive-domain-p'
    +
    +	* lisp/net/puny.el (puny-highly-restrictive-string-p): Rename.
    +	(puny-highly-restrictive-domain-p): New function.
    +
    +2015-12-30  Lars Magne Ingebrigtsen  
    +
    +	eww build fix (require puny)
    +
    +2015-12-30  Lars Magne Ingebrigtsen  
    +
    +	Transform non-restrictive domains to punycode for display
    +
    +	* lisp/net/eww.el (eww): Check whether the domain is Highly
    +	Restrictive in the Unicode IDNA sense.
    +
    +2015-12-30  John Wiegley  
    +
    +	Merge emacs-25 into master (using imerge)
    +
    +2015-12-29  Eli Zaretskii  
    +
    +	Fix typos in CC Mode manual
    +
    +	* doc/misc/cc-mode.texi (c-offsets-alist, Style Variables): Fix
    +	typos.  (Bug#22267)
    +
    +2015-12-29  Eli Zaretskii  
    +
    +	Avoid assertion violations in compact_font_cache_entry
    +
    +	* src/alloc.c (compact_font_cache_entry): Don't use VECTORP to
    +	avoid assertion violation in ASIZE.  (Bug#22263)
    +
    +2015-12-29  Eli Zaretskii  
    +
    +	Fix filling text with bidirectional characters in shr.el
    +
    +	* lisp/net/shr.el (shr-insert-document): Bind
    +	bidi-display-reordering to nil while filling lines.  This is
    +	required for when a line includes characters whose bidi
    +	directionality is opposite to the base paragraph direction,
    +	because columns are counted in the logical order.  (Bug#22250)
    +
    +2015-12-29  Lars Ingebrigtsen  
    +
    +	Further Unicode restrictive fixups
    +
    +	* puny.el (puny-highly-restrictive-p): Include the extra
    +	identifier characters from table 3.
    +
    +2015-12-29  Martin Rudalics  
    +
    +	* src/xfns.c (x_create_tip_frame): Process alpha parameter.
    +
    +2015-12-29  Michael Albinus  
    +
    +	Sync with Tramp 2.2.13
    +
    +	* doc/misc/trampver.texi: Change version to "2.2.13.25.1".
    +
    +	* lisp/net/tramp-compat.el (tramp-compat-delete-dups):
    +	Use `tramp-compat-funcall'.
    +
    +	* lisp/net/tramp-gvfs.el (tramp-gvfs-parse-device-names):
    +	Make `split-string' call compatible with older Emacsen.
    +
    +	* lisp/net/trampver.el: Change version to "2.2.13.25.1".
    +
    +2015-12-29  Lambda Coder  
    +
    +	* doc/misc/tramp.texi: Editorial revisions to the Tramp manual
    +
    +2015-12-29  Lars Ingebrigtsen  
    +
    +	Mention that tls.el is secure by default, and will fail
    +
    +2015-12-29  Lars Ingebrigtsen  
    +
    +	Make tls.el use trustfiles by default
    +
    +	* lisp/net/tls.el (tls-program): Add a certfile by default (bug#21227).
    +	(open-tls-stream): Insert the trustfile by looking at
    +	`gnutls-trustfiles'.
    +
    +2015-12-29  Lars Ingebrigtsen  
    +
    +	Refactor out gnutls-trustfiles
    +
    +	* lisp/net/gnutls.el (gnutls-trustfiles): Refactor out for reuse by tls.el.
    +
    +2015-12-29  Lars Ingebrigtsen  
    +
    +	Remove --insecure from gnutls-cli invocation
    +
    +	* tls.el (tls-program): Default to using secure TLS
    +	connections (bug#19284).
    +
    +2015-12-29  Lars Ingebrigtsen  
    +
    +	Add a new function to say whether a string is restrictive
    +
    +	* puny.el (puny-highly-restrictive-p): New function.
    +
    +2015-12-28  Paul Eggert  
    +
    +	Spelling fix
    +
    +2015-12-28  Paul Eggert  
    +
    +	Port report-emacs-bug to deterministic builds
    +
    +	* lisp/mail/emacsbug.el (report-emacs-bug): Future-proof the
    +	recent "built on" change to deterministic builds where
    +	emacs-build-system will be nil.  See:
    +	http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg01369.html
    +
    +2015-12-28  Jose A. Ortega Ruiz    (tiny change)
    +
    +	Fix URL auth error message
    +
    +	* lisp/url/url-http.el (url-http-handle-authentication): Make the error
    +	message more correct (bug#20069).
    +
    +2015-12-28  Lars Ingebrigtsen  
    +
    +	Mention the new puny.el library
    +
    +2015-12-28  Lars Ingebrigtsen  
    +
    +	IDNA-related fixes for the URL library
    +
    +	* lisp/url/url-http.el (url-http-create-request): IDNA-encode
    +	the Host: header.
    +
    +	* lisp/url/url-util.el (url-encode-url): Don't hex-encode
    +	domain names, but leave them as UTF-8, so that they can be
    +	IDNA-encoded later when contacting the host.
    +
    +2015-12-28  Lars Ingebrigtsen  
    +
    +	IDNA-encode all domain names in `open-network-stream'
    +
    +	* network-stream.el (open-network-stream)
    +	(network-stream-open-plain, network-stream-open-starttls):
    +	IDNA-encode all domain names, if needed.
    +
    +2015-12-28  Lars Ingebrigtsen  
    +
    +	Fix puny-encoding all-non-ASCII domains
    +
    +	* puny.el (puny-encode-string): Fix the all-non-ASCII encoding case.
    +
    +2015-12-28  Lars Ingebrigtsen  
    +
    +	* lisp/net/shr.el (shr-next-link): Don't bug out on adjacent links.
    +
    +2015-12-28  Tom Tromey  
    +
    +	set :safe on css-indent-offset
    +
    +	* lisp/textmodes/css-mode.el (css-indent-offset): Add :safe 'integerp.
    +
    +2015-12-28  Lars Ingebrigtsen  
    +
    +	* eww.el (eww-mode): Remove superfluous bidi reset.
    +
    +2015-12-28  James Stout    (tiny change)
    +
    +	Make chunked encoding trailer detection more compliant
    +
    +	* lisp/url/url-http.el
    +	(url-http-chunked-encoding-after-change-function): Make
    +	trailer detection more compliant (bug#16345).
    +
    +2015-12-28  Lars Ingebrigtsen  
    +
    +	Reconnect erc even on server errors
    +
    +	* lisp/erc/erc-backend.el (erc-server-reconnect-p): Try to
    +	reconnect even if a server error has occurred (bug#18527).
    +
    +2015-12-28  Lars Ingebrigtsen  
    +
    +	Fix punycode short circuit logic
    +
    +	* puny.el (puny-encode-domain): Fix short-circuit logic.
    +
    +2015-12-28  Martin Rudalics  
    +
    +	Fix Bug#10873 in `report-emacs-bug'
    +
    +	* lisp/mail/emacsbug.el (report-emacs-bug): If
    +	`report-emacs-bug-no-explanations' is nil, make sure we can show
    +	mail and warnings buffer on this frame (Bug#10873).
    +
    +2015-12-28  Lars Ingebrigtsen  
    +
    +	IDNA speed up
    +
    +	* puny.el (puny-encode-domain): Make the common non-IDNA case faster
    +
    +2015-12-28  Lars Ingebrigtsen  
    +
    +	Add IDNA domain encode/decode functions
    +
    +	* puny.el (puny-decode-domain): New function.
    +	(puny-encode-domain): Ditto.
    +	(puny-decode-digit): Fix digit decoding error.
    +
    +2015-12-28  Lars Ingebrigtsen  
    +
    +	Rename idna.el to puny.el
    +
    +	* puny.el: Renamed from idna.el to avoid name collisions with
    +	the external idna.el library.
    +
    +2015-12-28  Lars Ingebrigtsen  
    +
    +	Always reset the bidi direction
    +
    +	* eww.el (eww-display-html): Always reset the bidi direction
    +	to `left-to-right' (bug#22257).
    +
    +2015-12-28  Alan Mackenzie  
    +
    +	Allow line comments ending with escaped NL to be continued to the next line.
    +
    +	Use this in C, C++, and Objective C Modes.  Fixes bug#22246
    +
    +	* src/syntax.c (comment-end-can-be-escaped): New buffer local variable.
    +	(forw-comment, back-comment): On encountering an end of comment character,
    +	test whether it is escaped when `comment-end-can-be-escaped' is non-nil.
    +
    +	* doc/lispref/syntax.texi (Control Parsing): Describe
    +	`comment-end-can-be-escaped'.
    +
    +	* etc/NEWS (Lisp Changes): Describe `comment-end-can-be-escaped'.
    +
    +	* lisp/progmodes/cc-langs.el: New c-lang-setvar `comment-end-can-be-escaped'.
    +
    +2015-12-28  Katsumi Yamaoka  
    +
    +	lisp/gnus/mml-sec.el (mml-secure-bcc-is-safe): Keep old Emacsen compatibility
    +
    +	* lisp/gnus/mml-sec.el (mml-secure-bcc-is-safe):
    +	Don't use split-string with 4th arg for old Emacsen compatibility.
    +
    +2015-12-27  Dmitry Gutov  
    +
    +	Rename project-library-roots to project-external-roots
    +
    +	* lisp/progmodes/project.el (project-library-roots): Rename to
    +	project-external-roots.
    +	(project-library-roots-function): Rename to
    +	project-vc-external-roots-function.  Only use it in the VC
    +	backend, for now.  Update project-external-roots accordingly.
    +	(project-vc-library-roots): Remove.
    +	(project-or-libraries-find-regexp):
    +	Rename to project-or-external-find-regexp.
    +
    +	* lisp/progmodes/elisp-mode.el (elisp-library-roots):
    +	Rename to elisp-load-path-roots.
    +
    +	* lisp/progmodes/etags.el (etags-library-roots): Remove.  Use
    +	an anonymous function for the default value of
    +	project-vc-external-roots-function.
    +
    +2015-12-27  Lars Ingebrigtsen  
    +
    +	* idna.el (idna-decode-string-internal): Implement decoding.
    +
    +2015-12-27  Lars Ingebrigtsen  
    +
    +	Further IDNA tweaks
    +
    +	(idna-encode-string): Make idna-encode-string safe for
    +	non-ASCII use.
    +
    +2015-12-27  Lars Ingebrigtsen  
    +
    +	Clean up the code slightly
    +
    +2015-12-27  Lars Ingebrigtsen  
    +
    +	Added basic idna encoding support
    +
    +	* lisp/net/idna.el: New file.
    +
    +2015-12-27  Vivek Dasmohapatra  
    +
    +	Disconnection fixes for erc
    +
    +	* lisp/erc/erc-backend.el (erc-server-reconnect-p): Don't
    +	reconnect if the user has disconnected explicitly (bug#4589).
    +
    +2015-12-27  Thomas Riccardi    (tiny change)
    +
    +	Further erc asynch fixes
    +
    +	* lisp/erc/erc-backend.el (erc-process-sentinel-2): Make
    +	erc-server-connect to return even if the connection is not
    +	ready.  Then erc-open and erc-server-reconnect do the
    +	same. (bug#5650).
    +
    +2015-12-27  Vivek Dasmohapatra  
    +
    +	Make erc connect asynchronously
    +
    +	* lisp/erc/erc-backend.el (erc-server-reconnect): Use it to
    +	reconnect asynchronously.
    +
    +	* lisp/erc/erc-backend.el (erc-open-network-stream): New function (bug#5650).
    +
    +2015-12-27  Deniz Dogan  
    +
    +	Clear erc user list upon disconnection
    +
    +	* lisp/erc/erc-backend.el (erc-process-sentinel): Clear channel user
    +	lists upon disconnection.  This prevents invalid channel
    +	user lists when reconnecting (bug#10947).
    +
    +2015-12-27  Lars Ingebrigtsen  
    +
    +	Don't bug out in erc after waking from sleep
    +
    +	* erc-backend.el (erc-server-send-ping): If the server has
    +	closed connection, this may already have been detected and
    +	`erc-server-last-received-time' has been set to nil (bug#13608).
    +
    +2015-12-27  David Edmondson  
    +
    +	Proxy error in erc with multiple clients
    +
    +	* lisp/erc/erc.el (erc-channel-receive-names): Fix errors
    +	generated when multiple IRC clients talk to a single IRC proxy
    +	(bug#19034).
    +
    +2015-12-27  Dima Kogan  
    +
    +	Ensure that we don't have several timers in erc
    +
    +	* lisp/erc/erc-backend.el (erc-server-setup-periodical-ping): Checks
    +	for existing timers in the alist before adding new ones.  If a
    +	timer already exists, it is cancelled and
    +	overwritten. (bug#19292).
    +
    +2015-12-27  Jens Lechtenboerger  
    +
    +	* lisp/gnus/mml-sec.el: Fix warnings by adding autoloads
    +	(bug#18718).
    +
    +2015-12-27  Lars Ingebrigtsen  
    +
    +	* lisp/erc/erc-log.el (erc-log-setup-logging): Insert the previous log
    +	at the start of the buffer, not at the end (bug#20496).
    +
    +2015-12-27  Lars Ingebrigtsen  
    +
    +	* lisp/net/eww.el (eww-setup-buffer): Restore left-to-right defaults.
    +
    +2015-12-27  Lars Ingebrigtsen  
    +
    +	Don't join erc channels doubly
    +
    +	* erc-join.el (erc-autojoin-channels): Don't join channels
    +	more than once (if you have several nicks) (bug#20695).
    +
    +2015-12-27  Eli Zaretskii  
    +
    +	Avoid leaving "ghost" of mouse pointer on MS-Windows
    +
    +	* src/w32term.c (frame_set_mouse_pixel_position):
    +	* src/w32fns.c (Fw32_mouse_absolute_pixel_position): Momentarily
    +	disable "mouse trails" when moving the mouse pointer.  (Bug#22247)
    +	* src/w32term.c (frame_set_mouse_pixel_position): Include
    +	w32common.h.
    +
    +2015-12-27  Lars Ingebrigtsen  
    +
    +	* lisp/gnus/mml-sec.el (mml-secure-bcc-is-safe): Fix typo in last check-in.
    +
    +2015-12-27  Jens Lechtenboerger  
    +
    +	Identify unsafe combinations of Bcc and encryption
    +
    +	* lisp/gnus/gnus-util.el (gnus-subsetp): New function
    +	* lisp/gnus/mml-sec.el (mml-secure-safe-bcc-list): New variable
    +	* lisp/gnus/mml-sec.el (mml-secure-bcc-is-safe): New function
    +
    +2015-12-27  Krzysztof Jurewicz    (tiny change)
    +
    +	Fix auth source lookups from erc with port numbers
    +
    +	* lisp/erc/erc.el (erc-open): `auth-source' wants strings, not port
    +	numbers (bug#20541).
    +
    +2015-12-27  Fran Litterio  
    +
    +	Run erc-kill-channel-hook always on exit
    +
    +	* lisp/erc/erc.el (erc-kill-buffer-function): Run erc-kill-channel-hook
    +	when erc-kill-queries-on-quit is set (bug#21187).
    +
    +2015-12-26  Paul Eggert  
    +
    +	Spelling fix
    +
    +	* test/automated/url-parse-tests.el:
    +	(url-generic-parse-url/same-document-reference):
    +	Rename from url-generic-parse-url/same-decument-reference.
    +
    +2015-12-26  Paul Eggert  
    +
    +	Reword initial *scratch* for brevity, appearance
    +
    +	* lisp/startup.el (initial-scratch-message):
    +	Reword to avoid apostrophes, and to make it shorter.
    +	See the thread starting in:
    +	http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg01241.html
    +
    +2015-12-26  Leo Liu  
    +
    +	Add ert-deftest to lisp-mode.el
    +
    +	* lisp-mode.el (lisp-imenu-generic-expression,
    +	  lisp-el-font-lock-keywords-1): Add ert-deftest.
    +
    +2015-12-26  Lars Ingebrigtsen  
    +
    +	Mark imap changes as not needing doc changes
    +
    +	* imap.el (imap-ssl-open): Remove
    +
    +2015-12-26  Lars Ingebrigtsen  
    +
    +	Use built-in encryption in imap.el
    +
    +	* lisp/net/imap.el (imap-ssl-program): Remove (bug#21134).
    +	(imap-starttls-open): Use open-network-stream instead of starttls.el.
    +	(imap-tls-open): Use open-network-stream instead of tls.el.
    +
    +2015-12-26  Eli Zaretskii  
    +
    +	Don't try using /bin/sh in artist.el on MS-Windows
    +
    +	* lisp/textmodes/artist.el (artist-figlet-get-font-list-windows):
    +	New function.
    +	(artist-figlet-choose-font): Use it on MS-Windows and MS-DOS.
    +	(Bug#20167)
    +
    +2015-12-26  Wolfgang Jenkner  
    +
    +	Always define gmalloc etc. in src/gmalloc.c
    +
    +	This is a work-around to prevent the compiler from using semantic
    +	knowledge about malloc for optimization purposes.  E.g., gcc 5.2
    +	with -O2 replaces most of calloc's definition by a call to calloc;
    +	see Bug#22085.
    +	* src/gmalloc.c [!HYBRID_MALLOC] (malloc, realloc, calloc)
    +	(aligned_alloc, free): Do not undef.  Instead, define these as
    +	functions (perhaps renamed to gmalloc etc.) in terms of gmalloc etc.
    +
    +2015-12-26  Eli Zaretskii  
    +
    +	Fix documentation of browse-url browser-related functions
    +
    +	* lisp/net/browse-url.el (browse-url)
    +	(browse-url-default-browser, browse-url-default-windows-browser)
    +	(browse-url-default-macosx-browser, browse-url-chromium)
    +	(browse-url-kde, browse-url-text-xterm): Clarify the usage of ARGS
    +	and NEW-WINDOW arguments in these functions.  (Bug#19421)
    +
    +2015-12-26  Paul Eggert  
    +
    +	Propagate Bug#14412 fix to backtrace_eval_unrewind
    +
    +	* src/eval.c (unbind_to): Redo so that the FALLTHROUGH!! comment
    +	becomes accurate again. This shouldn’t affect behavior.
    +	(backtrace_eval_unrewind): Apply the recent unbind_to fix here, too.
    +
    +2015-12-26  Eli Zaretskii  
    +
    +	Don't produce non-ASCII characters in *scratch*
    +
    +	* lisp/startup.el (initial-scratch-message): Quote apostrophes to
    +	avoid producing non-ASCII characters in the *scratch* buffer's
    +	commentary.
    +
    +2015-12-26  Eli Zaretskii  
    +
    +	Document changes in 'compare-windows'
    +
    +	* lisp/vc/compare-w.el (compare-windows-removed)
    +	(compare-windows-added): Doc fix.
    +
    +	* doc/emacs/files.texi (Comparing Files): Document the changes in
    +	window selection by 'compare-windows'.
    +
    +2015-12-26  Eli Zaretskii  
    +
    +	Document 'vc-annotate-background-mode'
    +
    +	* doc/emacs/maintaining.texi (Old Revisions): Document
    +	'vc-annotate-background-mode'.
    +
    +2015-12-26  Eli Zaretskii  
    +
    +	Document 'vc-region-history'
    +
    +	* doc/emacs/maintaining.texi (VC Change Log): Document
    +	'vc-region-history'.
    +
    +2015-12-26  Eli Zaretskii  
    +
    +	Improve documentation of 'vc-push'
    +
    +	* doc/emacs/maintaining.texi (Pulling / Pushing): Expand and
    +	improve the documentation of 'vc-push'.
    +
    +	* lisp/vc/vc.el (vc-pull, vc-push): Doc fix.
    +
    +2015-12-26  Alain Schneble  
    +
    +	Include the tests for the URL parsing fixes
    +
    +2015-12-26  Eli Zaretskii  
    +
    +	Document 'url-user-agent'.
    +
    +	* lisp/url/url-http.el (url-user-agent): Move from here...
    +	* lisp/url/url-vars.el (url-user-agent): ...to here.  This is to
    +	keep all the URL defcustoms in one place, and also have it defined
    +	whenever the URL library is loaded.
    +
    +	* doc/misc/url.texi (Customization): Document 'url-user-agent'.
    +
    +2015-12-26  Eli Zaretskii  
    +
    +	Document protocols supported by URL library via Tramp
    +
    +	* doc/misc/url.texi (Tramp): New node, describes the URL schemes
    +	supported via Tramp.
    +	(Supported URL Types, file/ftp, rlogin/telnet/tn3270): Mention
    +	Tramp.
    +
    +2015-12-26  Eli Zaretskii  
    +
    +	Document changes in Shell-script mode
    +
    +	* lisp/progmodes/sh-script.el (sh-mode, sh-set-shell): Document
    +	the 'sh-shell' file-local variable.
    +	(top level): Add an auto-load form to avoid byte-compiler warning
    +	about 'comint-send-string'.
    +
    +2015-12-26  Eli Zaretskii  
    +
    +	Fix documentation of 'ses-define-local-printer'
    +
    +	* doc/misc/ses.texi (Printer functions): Fix whitespace between
    +	sentences and punctuation.  Add an index entry for
    +	'ses-define-local-printer'.
    +
    +2015-12-26  Shakthi Kannan  
    +
    +	Document 'ert-summarize-tests-batch-and-exit'
    +
    +	* doc/misc/ert.texi (Running Tests in Batch Mode): Document
    +	'ert-summarize-tests-batch-and-exit'.
    +
    +2015-12-26  Eli Zaretskii  
    +
    +	Avoid assertion violation in unbind_to
    +
    +	* src/eval.c (unbind_to) : Avoid assertion violation
    +	if we get here with an object that is not a symbol.  (Bug#14412)
    +
    +2015-12-25  Andreas Schwab  
    +
    +	Don't treat /foo/bar:mumble as ange-ftp address
    +	* lisp/net/browse-url.el (browse-url-filename-alist): Match colons
    +	only in the first component.  (bug#5362)
    +
    +2015-12-25  Eli Zaretskii  
    +
    +	Make sure *scratch* etc. use forward slashes in its default-directory
    +
    +	* lisp/startup.el (normal-top-level): On MS-Windows, convert
    +	backslashes to forward slashes while decoding default-directory
    +	of the initially-created buffers.
    +
    +2015-12-25  Eli Zaretskii  
    +
    +	Restore info about the build host in bug reports
    +
    +	* lisp/mail/emacsbug.el (report-emacs-bug): Report the system on
    +	which Emacs was built.  This is important information for
    +	investigating bug reports reported by users who don't build their
    +	Emacs.
    +
    +2015-12-25  Eli Zaretskii  
    +
    +	Fix bootstrap broken by changes related to OS X file-name encoding
    +
    +	* lisp/international/ucs-normalize.el (eval-when-compile): Make
    +	sure char-code-property-alist includes elements that allow access
    +	to 'decomposition' and 'canonical-combining-class' Unicode
    +	properties, as compiling ucs-normalize.el requires that.
    +	* lisp/loadup.el (featurep 'ns): Load ucs-normalize and ns-win
    +	only of charprop.el was already loaded.
    +
    +	* src/Makefile.in ($(lispsource)/international/ucs-normalize.elc):
    +	New order-only dependency.
    +
    +2015-12-25  Leo Liu  
    +
    +	* lisp/ido.el (ido-add-virtual-buffers-to-list):
    +	Use bookmark-get-filename.
    +
    +2015-12-25  Michael Albinus  
    +
    +	Make tramp-test29-vc-registered more robust
    +
    +	* test/automated/tramp-tests.el (tramp-test29-vc-registered):
    +	Move `bzr' case down.  Skip test when `vc-create-repo' fails.
    +	Remove instrumentation.
    +
    +2015-12-24  YAMAMOTO Mitsuharu  
    +
    +	* lisp/term/x-win.el (x-gtk-stock-map): Fix typo.
    +
    +2015-12-23  Katsumi Yamaoka  
    +
    +	Fix `gnus-union' so as to behave like `cl-union'
    +
    +	* lisp/gnus/gnus-group.el (gnus-group-prepare-flat):
    +	Make gnus-union use `equal' to compare items in lists.
    +
    +	* lisp/gnus/gnus-util.el (gnus-union):
    +	Make it behave like cl-union partially.
    +
    +2015-12-23  Paul Eggert  
    +
    +	Fix dired.c typo with ptrdiff_t vs Lisp_Object
    +
    +	* src/dired.c (file_name_completion): Don't assume Lisp_Object is
    +	an integer type, fixing a problem introduced in the recent fix for
    +	Bug#22169.
    +
    +2015-12-23  Eli Zaretskii  
    +
    +	Document default process sentinel more prominently
    +
    +	* doc/lispref/processes.texi (Asynchronous Processes): Mention the
    +	defaults for process filter and sentinel.  Provide cross-references.
    +	(Process Information): Provide cross-references to where filters
    +	and sentinels are described.
    +	(Filter Functions): Add an index entry for "default filter".
    +	(Sentinels): Add a few status messages not documented previously.
    +	Resolve the "killed" confusion.  Document and describe the default
    +	sentinel.  (Bug#22220)
    +
    +2015-12-23  Eli Zaretskii  
    +
    +	Fix file-name completion on OS X
    +
    +	* src/dired.c (file_name_completion): Reject false matches due to
    +	file-name-coding-systems that decompose characters when encoding
    +	file names, by comparing decoded file names as well.  (Bug#22169)
    +	(syms_of_dired) : New DEFSYM.
    +
    +	* lisp/international/ucs-normalize.el (utf-8-hfs): Give it a
    +	non-nil 'decomposed-characters' property.
    +
    +2015-12-23  Anders Lindgren  
    +
    +	File-name completion of non-ASCII characters on OS X (bug#22169)
    +
    +	The coding system `utf-8-nfd', locally defined in ns-win.el,
    +	didn't provide a :pre-write-conversion method, causing file name
    +	completion of non-ASCII characters to fail.  Solved by using the
    +	`utf-8-hfs' coding system provided by `ucs-normalize'.
    +
    +	* lisp/loadup.el: Load international/ucs-normalize (when building
    +	for ns).
    +
    +	* lisp/term/ns-win.el (utf-8-nfd): Made `utf-8-nfd' as alias for
    +	`utf-8-hfs' and removed the old implementation.  Set `utf-8-hfs'
    +	as the file name coding system.
    +
    +	* src/nsfns.m (ns-convert-utf8-nfd-to-nfc): Removed.
    +
    +2015-12-22  Tom Tromey  
    +
    +	Fix bug #18588 by making bug-reference-bug-regexp more lenient
    +
    +	* lisp/progmodes/bug-reference.el (bug-reference-bug-regexp): Accept
    +	"bug NNNN".  (Bug #18588)
    +
    +2015-12-22  Tom Tromey  
    +
    +	add some cl-* aliases to lisp-mode imenu
    +
    +	* (lisp-imenu-generic-expression): Add cl-define-compiler-macro,
    +	cl-defgeneric, and cl-defmethod.
    +
    +2015-12-22  Tom Tromey  
    +
    +	Make a variable buffer-local
    +
    +	* lisp/generic-x.el (generic-rul-mode-setup-function): Make
    +	font-lock-syntax-table buffer-local.  (Bug #21627)
    +
    +2015-12-22  Eli Zaretskii  
    +
    +	Fix decoding of text in URLs retrieved by EWW
    +
    +	* lisp/net/eww.el (eww-render): Pass 'charset' to
    +	'eww-display-raw'.  Use the value of 'last-coding-system-used', if
    +	non-nil, to set 'buffer-file-coding-system' of the buffer where we
    +	show the URL.
    +	(eww-display-html, eww-display-raw): Decode the text correctly,
    +	using the charset found in the headers, and defaulting to UTF-8.
    +	If the user told us to use a specific encoding, override the
    +	charset from the headers.  (Bug#22222)
    +
    +2015-12-22  Alan Mackenzie  
    +
    +	Fix a coding error in c-forward-<>-arglist-recur.  Fixes bug#22156
    +
    +	* lisp/progmodes/cc-engine.el (c-forward-<>-arglist-recur): Remove unused
    +	variable `tmp'.
    +	After a failed search for a matching ">", restore point before continuing.
    +
    +2015-12-22  Michael Albinus  
    +
    +	Instrument Tramp tests
    +
    +	* test/automated/tramp-tests.el (tramp-test29-vc-registered)
    +	(tramp--test-utf8): Instrument tests.
    +
    +2015-12-22  Martin Rudalics  
    +
    +	Fix `display-buffer' call in `display-message-or-buffer' (Bug#22221)
    +
    +	* lisp/simple.el (display-message-or-buffer): Call
    +	`display-buffer' with ACTION instead of NOT-THIS-WINDOW
    +	(Bug#22221).
    +
    +2015-12-21  Juri Linkov  
    +
    +	* lisp/saveplace.el (toggle-save-place, save-place-to-alist)
    +
    +	(save-places-to-alist, save-place-dired-hook):
    +	Check for dired-subdir-alist.  (Bug#19851)
    +
    +2015-12-21  Paul Eggert  
    +
    +	Add FIXME comment re stack overflow and modules
    +
    +2015-12-20  Paul Eggert  
    +
    +	Revert some recent emacs-module commentary
    +
    +	Most of the recently-added commentary was incorrect, due to the
    +	possibility of stack overflow.
    +
    +2015-12-20  Paul Eggert  
    +
    +	Spelling fix: prefer "cooperate" to "co-operate"
    +
    +2015-12-20  Paul Eggert  
    +
    +	Port undo fixes to -fno-common
    +
    +	Port recent fix for Bug#21968 to platforms like 'gcc -fno-common'.
    +	* src/keyboard.c, src/keyboard.h (point_before_last_command_or_undo)
    +	(buffer_before_last_command_or_undo):
    +	Declare in keyboard.h, and define in keyboard.c,
    +	instead of assuming the traditional Unix relaxed ref-def linkage.
    +
    +2015-12-20  Philipp Stephani  
    +
    +	Improve commentary for emacs-module.c
    +
    +	* src/lisp.h: Document emacs-module.c assumptions about EQ and NILP.
    +	* src/emacs-module.c (module_non_local_exit_get): Document that we
    +	cannot use the current implementation.
    +	(module_is_not_nil, module_eq): Document assumptions about EQ and
    +	NILP.
    +
    +2015-12-20  Michael Albinus  
    +
    +	Suppress test on Mac OS X
    +
    +	* test/automated/tramp-tests.el (tramp--test-darwin-p): New defun.
    +	(tramp--test-utf8): Use it.
    +
    +2015-12-20  Alan Mackenzie  
    +
    +	Merge branch 'scratch/follow' into emacs-25
    +
    +	This allows Isearch, etc., to work well when Follow Mode is active.
    +
    +2015-12-19  Michael Albinus  
    +
    +	* lisp/net/tramp-sh.el (tramp-get-ls-command-with-w-option):
    +	Improve check.
    +
    +2015-12-19  Eli Zaretskii  
    +
    +	Fix last commit
    +
    +	* doc/emacs/rmail.texi (Rmail Deletion): Document new behavior of 'u'
    +	with numeric argument.
    +
    +2015-12-19  Eli Zaretskii  
    +
    +	Document new features of Rmail
    +
    +	* doc/emacs/rmail.texi (Rmail Summary Edit, Rmail Deletion):
    +	Document new behavior of 'd' and 'C-d' with numeric argument.
    +	(Rmail Display): Document the rendering of HTML MIME parts.
    +
    +2015-12-19  Eli Zaretskii  
    +
    +	Improve documentation of new cl-lib functions
    +
    +	* doc/misc/cl.texi (Predicates on Numbers, Numerical Functions):
    +	Fix wording.
    +
    +2015-12-19  Eli Zaretskii  
    +
    +	Document the new feature of 'minibuffer-with-setup-hook'
    +
    +	* lisp/files.el (minibuffer-with-setup-hook): Clarify how FUN is
    +	added to `minibuffer-setup-hook'.
    +
    +2015-12-19  Eli Zaretskii  
    +
    +	Document new features of Font Lock
    +
    +	* doc/lispref/modes.texi (Other Font Lock Variables): Document
    +	'font-lock-flush-function' and 'font-lock-ensure-function'.
    +	(Font Lock Basics): Document the basic fontification functions
    +	referenced in "Other Font Lock Variables".
    +
    +	* lisp/font-lock.el (font-lock-flush, font-lock-ensure): Doc fix.
    +
    +2015-12-19  Eli Zaretskii  
    +
    +	Document new features of Rectangle mode
    +
    +	* doc/emacs/killing.texi (Rectangles): Document "C-x C-x" in
    +	rectangle-mark-mode.
    +
    +2015-12-19  Eli Zaretskii  
    +
    +	Manual followup to last change
    +
    +	* doc/lispref/display.texi (Displaying Messages): Sync with the
    +	doc string.  (Bug#22210)
    +
    +2015-12-19  Eli Zaretskii  
    +
    +	Clarify doc string of 'display-message-or-buffer'
    +
    +	* lisp/simple.el (display-message-or-buffer): Doc fix.  Suggested
    +	by Sebastian Wiesner .  (Bug#22210)
    +
    +2015-12-19  Eli Zaretskii  
    +
    +	* doc/emacs/emacs.texi (Top): Update top-level menus.
    +
    +	* doc/lispref/elisp.texi (Top): Update top-level menus.
    +
    +2015-12-19  Eli Zaretskii  
    +
    +	Document how to avoid file-local variables that aren't
    +
    +	* doc/emacs/custom.texi (Specifying File Variables): Describe how
    +	to prevent Emacs from interpreting unrelated text as file-local
    +	variables.  (Bug#22166)
    +
    +2015-12-19  Dave Thomas    (tiny change)
    +
    +	Fix a typo in eterm-color's termcap entry
    +
    +	* lisp/term.el (term-termcap-format): Fix a typo in the "ue="
    +	entry.  (Bug#22184)
    +
    +2015-12-19  Eli Zaretskii  
    +
    +	Allow 'browse-url-emacs' visit non-existent URLs
    +
    +	* lisp/url/url-handlers.el (url-insert-file-contents): Don't
    +	signal an error if VISIT is non-nil, to more faithfully emulate
    +	the behavior of 'insert-file-contents'.  (Bug#22160)
    +
    +2015-12-18  Paul Eggert  
    +
    +	Remove SunOS 4.x cruft
    +
    +	Support for SunOS 4.x was removed in Emacs 23 but some cruft was left behind.
    +	* lib-src/pop.c [sun]: Remove no-longer-needed include.
    +	* lwlib/xlwmenu.c (SUNSO41): Remove.
    +
    +2015-12-18  Paul Eggert  
    +
    +	Merge from gnulib
    +
    +	This mostly commentary fixes.
    +	* doc/misc/texinfo.tex, lib/intprops.h: Copy from gnulib.
    +	* lib/gnulib.mk: Regenerate with new gnulib-tool.
    +
    +2015-12-18  Michael Albinus  
    +
    +	Minor fixes in Tramp
    +
    +	* lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls):
    +	Reorder ls arguments.
    +
    +	* lisp/net/tramp.el (tramp-dissect-file-name): Fix docstring.
    +
    +2015-12-18  Michael Albinus  
    +
    +	Make tramp a built-in package
    +
    +	* lisp/finder.el (finder-compile-keywords): Update
    +	`package--builtins' also when Version: keyword is available.
    +
    +	* lisp/net/trampver.el: Add Version: keyword.
    +	(tramp-version): Change it to "2.2.13.25.1", in order to be
    +	compatible with `version-to-list'.
    +
    +2015-12-18  Lele Gaifax  
    +
    +	* etc/tutorials/TUTORIAL.it: Update and fix typos.  (Bug#22187)
    +
    +2015-12-18  Alan Mackenzie  
    +
    +	Rename `recenter-group' to `recenter-window-group'
    +
    +	* doc/lispref/windows.texi (Textual Scrolling)
    +	* lisp/window.el (top level, recenter-group)
    +	* lisp/follow.el (follow-mode)
    +	* lisp/isearch.el (isearch-back-into-window): Rename `recenter-group' to
    +	`recenter-window-group' and `recenter-group-function' to
    +	`recenter-window-group-function'.
    +
    +2015-12-18  Eli Zaretskii  
    +
    +	Fix vertical-motion in tabulated-list mode
    +
    +	* src/indent.c (Fvertical_motion): When moving from line beginning
    +	to point under line truncation, assume overshoot by one line only
    +	if point actually lies beyond the window's right margin.
    +	(Bug#22194)
    +
    +2015-12-18  Martin Rudalics  
    +
    +	Don't have help functions call x-display-pixel-width/-height on ttys
    +
    +	* lisp/help.el (temp-buffer-max-height, temp-buffer-max-width):
    +	Don't call x-display-pixel-width/-height on ttys.
    +
    +2015-12-17  Dmitry Gutov  
    +
    +	Use 'hg id' in vc-hg-previous-revision
    +
    +	* lisp/vc/vc-hg.el (vc-hg-previous-revision):
    +	Use 'hg id' to retrieve it (bug#22032).
    +
    +2015-12-17  Alan Mackenzie  
    +
    +	* lisp/follow.el (follow-sit-for): Remove (it's redundant).
    +
    +2015-12-17  Eli Zaretskii  
    +
    +	Fix a typo in the Emacs manual
    +
    +	* doc/emacs/trouble.texi (Sending Patches): Fix a typo.  Reported
    +	by Lele Gaifax .  (Bug#22193)
    +
    +2015-12-17  Eli Zaretskii  
    +
    +	Fix parsing netrc entries with ports
    +
    +	* lisp/gnus/auth-source.el (auth-source-ensure-strings): Don't
    +	make a list out of 't'.  (Bug#22188)
    +
    +	* test/automated/auth-source-tests.el
    +	(auth-source-test-netrc-parse-entry): New test.
    +
    +2015-12-17  Paul Eggert  
    +
    +	Fix typo in Doug Lea malloc configure log
    +
    +	* configure.ac (emacs_cv_var_doug_lea_malloc):
    +	Fix typo that confused the log output of 'configure'.
    +
    +2015-12-16  Nicolas Petton  
    +
    +	* etc/NEWS: Mention the new pcase patterns `seq' and `map'.
    +
    +2015-12-16  Alan Mackenzie  
    +
    +	* etc/NEWS: Move entry on pcase to correct section
    +
    +	(Accidentally omitted from previous commit)
    +
    +2015-12-16  Alan Mackenzie  
    +
    +	Add documentation for changes to Show Paren mode.
    +
    +	* lisp/paren.el (show-paren-highlight-openparen): Enhance doc string.
    +
    +	* doc/emacs/programs.texi (Matching): Add descriptions of some pertinent user
    +	options, including the new show-paren-when-point-inside-paren and
    +	show-paren-when-point-in-periphery.
    +
    +	* etc/NEWS (.. Specialized Modes ...): Add an entry for Show Paren mode.
    +	Move an entry on pcase to the Lisp Changes section.
    +
    +2015-12-16  Eli Zaretskii  
    +
    +	Document Eldoc changes
    +
    +	* doc/emacs/programs.texi (Lisp Doc): Document Global Eldoc mode.
    +
    +2015-12-16  Eli Zaretskii  
    +
    +	Fix invocation of Python and Guile interpreters from gdb-mi
    +
    +	* lisp/progmodes/gdb-mi.el (gdb-control-commands-regexp): Add
    +	commands for interactive Python and Guile interpreters.
    +	(gdb-send): Recognize various ways of exiting from Python and
    +	Guile interpreters and returning to GDB.  For details, see
    +	http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00693.html
    +	and http://stackoverflow.com/questions/31514741.
    +
    +2015-12-16  Paul Eggert  
    +
    +	Remove attempt to use C11 threads
    +
    +	C11 threads are not needed for Emacs now, and their use is causing
    +	hassles on FreeBSD 10.x.  Problem reported by Ashish SHUKLA in:
    +	http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00648.html
    +	* configure.ac: Do not check for C11 threads. Remove unnecessary
    +	fiddling with CPPFLAGS when configuring pthreads.
    +	* src/emacs-module.c (main_thread, check_main_thread)
    +	(module_init): Do not worry about C11 threads.
    +
    +2015-12-15  Michael Albinus  
    +
    +	Set utf8 encoding with stty in Tramp
    +
    +	* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
    +	Move up uname check.  Handle Mac OS X eol encoding.  Set utf8
    +	encoding with stty.
    +
    +2015-12-15  Alan Mackenzie  
    +
    +	Tidy up documentation associated with window groups.
    +
    +	* doc/lispref/windows.texi (Basic Windows): Add an @anchor for "Window
    +	Groups".  Correct example function to `window-group-start'.
    +	(Window Start and End, Textual scrolling): Point to the new anchor.  State
    +	that (most of) the args in window group functions have the same meaning as for
    +	the corresponding window primitives.
    +
    +	* doc/lispref/positions.texi (Screen Lines).  Same as above.
    +
    +2015-12-15  Michael Albinus  
    +
    +	Complete last commit
    +
    +	* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
    +	Move uname check up.  Handle Mac OS X eol encoding.
    +
    +2015-12-15  Michael Albinus  
    +
    +	Handle Mac OS X eol encoding in Tramp
    +
    +	* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
    +	Handle Mac OS X eol encoding.
    +
    +2015-12-15  YAMAMOTO Mitsuharu  
    +
    +	Fix variable name typo in compute_tip_xy
    +
    +	* src/w32fns.c (compute_tip_xy):
    +	* src/xfns.c (compute_tip_xy): Modify *root_x instead of *root_y
    +	when `right' is integer.
    +
    +2015-12-14  foudfou    (tiny change)
    +
    +	* lisp/ibuffer.el: Add ability to (un-)mark or delete buffers in the region.
    +
    +2015-12-14  Tassilo Horn  
    +
    +	Revert "Fix rx matcher overflow without limiting"
    +
    +	This reverts commit fe27e037663d36be3e5741c2ce86ab4ee8017db1.
    +
    +2015-12-14  Alan Mackenzie  
    +
    +	Ispell: Bind isearch-regexp-function to nil around call to isearch..-new-loop
    +
    +	* lisp/textmodes/ispell.el (ispell-highlight-spelling-error-overlay): bind
    +	isearch-regexp-function to nil around call to isearch-lazy-highligh-new-loop.
    +
    +2015-12-14  Tassilo Horn  
    +
    +	Fix rx matcher overflow without limiting
    +
    +	* lisp/textmodes/reftex-vars.el (reftex-label-regexps): Improve last
    +	change to the regexp without imposing a limit on the length of the
    +	options.
    +
    +2015-12-14  Alan Mackenzie  
    +
    +	Enhance ispell-skip-region-alist by generating part of it at runtime.
    +
    +	* lisp/textmodes/ispell.el (ispell--\\w-filter, ispell--make-\\w-expression)
    +	(ispell--make-filename-or-URL-re): New functions which generate a regexp.
    +	(ispell-skip-region-alist): Remove the bit that matches a filename/URL, etc.
    +	(ispell-begin-skip-region-regexp, ispell-skip-region-list, ispell-message):
    +	Include the result of ispell--make-filename-or-URL-re in regexps.
    +
    +2015-12-14  Glenn Morris  
    +
    +	* build-aux/gitlog-to-emacslog: Ignore more pointless merge commits.
    +
    +2015-12-14  Alan Mackenzie  
    +
    +	Replace GROUP argument in six window primitives by new functions.
    +
    +	* doc/lispref/windows.texi (Window Start and End, Textual Scrolling)
    +	* doc/lispref/positions.texi (Screen Lines): Remove optional GROUP argument
    +	from description of six window functions.  Add in description of new functions
    +	window-group-start, window-group-end, set-window-group-start,
    +	pos-visible-in-window-group-p, recenter-group and move-to-window-group-line,
    +	together with the six variables indirecting to the pertinent group
    +	functions.
    +
    +	* src/window.c
    +	* src/keyboard.c: Revert the commit from 2015-11-11 12:02:48, in so far as it
    +	applies to these two files, which added the GROUP argument to six window
    +	primitives.
    +
    +	* lisp/follow.el (follow-mode): Use updated variable names for the indirected
    +	functions.
    +
    +	* lisp/isearch.el (isearch-update, isearch-done, isearch-string-out-of-window)
    +	(isearch-back-into-window, isearch-lazy-highlight-new-loop)
    +	(isearch-lazy-highlight-search, isearch-lazy-highlight-update): Replace calls
    +	to window primitives (e.g. window-start) with a GROUP argument by calls to
    +	new functions (e.g. window-group-start).
    +
    +	* lisp/ispell.el (ispell-command-loop): Replace call to
    +	pos-visible-in-window-p with pos-visible-in-window-group-p.
    +
    +	* lisp/window.el (window-group-start, window-group-end)
    +	(set-window-group-start, recenter-group, pos-visible-in-window-group-p)
    +	(selected-window-group, move-to-window-group-line): New functions.
    +	(window-group-start-function, window-group-end-function)
    +	(set-window-group-start-function, recenter-group-function)
    +	(pos-visible-in-window-group-p-function, selected-window-group-function)
    +	(move-to-window-group-line-function): New variables.
    +
    +2015-12-14  Vitorio Miguel    (tiny change)
    +
    +	* etc/tutorials/TUTORIAL.pt_BR: Fix a typo.  (Bug#22165)
    +
    +2015-12-13  Eli Zaretskii  
    +
    +	Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25
    +
    +2015-12-13  Tassilo Horn  
    +
    +	Improve regex to not trigger stack overflow
    +
    +	* lisp/textmodes/reftex-vars.el (reftex-label-regexps): Improve regex in
    +	order not to trigger a stack overflow in regex matcher with unbalanced
    +	brackets (bug#22146).
    +
    +2015-12-13  Eli Zaretskii  
    +
    +	Fix visiting files with raw-text
    +
    +	* src/fileio.c (Finsert_file_contents): Fix setting buffer unibyte
    +	when some stuff was actually read.  (Bug#22162)
    +
    +2015-12-13  Tassilo Horn  
    +
    +	Fix regex matching keyval labels
    +
    +	* lisp/textmodes/reftex-vars.el (reftex-label-regexps): Fix regexp
    +	matching keyval labels.
    +
    +2015-12-13  Michael Albinus  
    +
    +	* lisp/ido.el (ido-file-name-all-completions-1): Do not raise an error
    +
    +	... in case of Tramp.  (Bug#20821)
    +
    +2015-12-12  Paul Eggert  
    +
    +	Fix performance regression with gcc -O0
    +
    +	This fixes the smaller performance hit that I noted in:
    +	https://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00357.html
    +	* src/alloc.c (macro_XPNTR_OR_SYMBOL_OFFSET, macro_XPNTR):
    +	* src/puresize.h (puresize_h_PURE_P)
    +	(puresize_h_CHECK_IMPURE):
    +	New macros, with the old contents of the functions.
    +	* src/alloc.c (XPNTR_OR_SYMBOL_OFFSET, XPNTR):
    +	* src/puresize.h (PURE_P, CHECK_IMPURE):
    +	Use the new macros.  Also macros, if DEFINE_KEY_OPS_AS_MACROS.
    +	* src/conf_post.h (ATTRIBUTE_UNUSED):
    +	* src/lisp.h (DEFINE_KEY_OPS_AS_MACROS): New macros.
    +
    +2015-12-12  Artur Malabarba  
    +
    +	* lisp/emacs-lisp/package.el (package-unpack): Security check
    +
    +	Check that we received the package we were offered.
    +
    +2015-12-12  Artur Malabarba  
    +
    +	* lisp/emacs-lisp/package.el (package--compile): Don't activate
    +
    +	`package-unpack' takes care of all activations now (other than
    +	`package-initialize).  `package--compile' now only compiles.
    +
    +2015-12-12  Eli Zaretskii  
    +
    +	Document the new bindings of  and  in the minibuffer
    +
    +	* doc/emacs/mini.texi (Minibuffer History): Describe the new
    +	bindings of  and  in the minibuffer.
    +
    +2015-12-12  Eli Zaretskii  
    +
    +	Document new features of Ido
    +
    +	* doc/misc/ido.texi (Misc): Document 'C-S-b'.
    +
    +2015-12-12  Martin Rudalics  
    +
    +	Fix frame height calculations with added menu bar on Windows (Bug#22105)
    +
    +	* doc/lispref/frames.texi (Parameter Access): Mention pitfalls
    +	when simultaneously specifying multiple parameters for
    +	`modify-frame-parameters' that all may change the frame's size.
    +	* src/w32fns.c (x_set_menu_bar_lines): Don't set
    +	windows_or_buffers_changed here.
    +	(my_create_tip_window, Fx_show_tip): Call AdjustWindowRect
    +	with third argument false.
    +	* src/w32menu.c (set_frame_menubar): Set
    +	windows_or_buffers_changed here.
    +	* src/w32term.c (x_set_window_size): Determine third argument of
    +	AdjustWindowRect from whether the frame has a menu bar and not
    +	from whether it wants one.
    +
    +2015-12-12  Eli Zaretskii  
    +
    +	Document the change in interactive shell mode
    +
    +	* doc/emacs/misc.texi (Interactive Shell): Document that the
    +	'*shell*' buffer by default displays in a new window.
    +
    +2015-12-12  Eli Zaretskii  
    +
    +	Document new features of package.el
    +
    +	* doc/emacs/package.texi (Package Menu): Document the 'external'
    +	status and the new menu commands.
    +	(Package Installation): Document archive priorities.
    +
    +	* lisp/emacs-lisp/package.el (package-archive-priorities): Doc fix.
    +	(package-menu-hide-low-priority): Doc fix.
    +
    +2015-12-12  Eli Zaretskii  
    +
    +	Update and document new features of xterm support
    +
    +	* doc/emacs/frames.texi (Text-Only Mouse): Document that
    +	track-mouse is supported by newer xterm versions.
    +
    +2015-12-12  Eli Zaretskii  
    +
    +	Document new features of Prettify Mode
    +
    +	* doc/emacs/programs.texi (Misc for Programs): Document
    +	'prettify-symbols-compose-predicate' and
    +	'prettify-symbols-unprettify-at-point'.
    +
    +	* lisp/progmodes/prog-mode.el (prettify-symbols-alist)
    +	(prettify-symbols-default-compose-p)
    +	(prettify-symbols-compose-predicate)
    +	(prettify-symbols--compose-symbol): Doc fixes.
    +
    +2015-12-12  Eli Zaretskii  
    +
    +	Document multi-mode indentation facilities
    +
    +	* doc/lispref/text.texi (Mode-Specific Indent): Document
    +	'prog-indentation-context', 'prog-first-column', and 'prog-widen'.
    +
    +	* lisp/progmodes/prog-mode.el (prog-indentation-context)
    +	(prog-widen): Doc fixes.
    +
    +2015-12-12  Eli Zaretskii  
    +
    +	Document 'vc-refresh-state'
    +
    +	* doc/emacs/maintaining.texi (Version Control): Document
    +	'vc-refresh-state'.
    +
    +	* lisp/vc/vc-hooks.el (vc-refresh-state): Doc fix.
    +
    +2015-12-12  Eli Zaretskii  
    +
    +	Fix echo for "C-u"
    +
    +	* src/keyboard.c (command_loop_1): Undo last change.  It caused
    +	duplicate echo of C-u.  (Bug#22107)
    +
    +2015-12-11  Eli Zaretskii  
    +
    +	Avoid errors when creating files under SVN in new directory
    +
    +	* lisp/vc/vc-svn.el (vc-svn-registered): Use
    +	file-accessible-directory-p, to avoid cd'ing to a non-existing
    +	directory, which signals an error on some systems.  (Bug#21984)
    +	(vc-svn-checkin): Call log-edit-extract-headers with 2 arguments.
    +	Use declare-function to avoid byte-compiler warnings.
    +
    +2015-12-11  Eli Zaretskii  
    +
    +	Improve Lua support in etags
    +
    +	* lib-src/etags.c (Lua_functions): Skip spaces before looking for
    +	"function".
    +
    +	* etc/NEWS: Mention improved Lua support by 'etags'.
    +
    +	* test/etags/lua-src/test.lua (test): Add tests for indented
    +	function definitions.
    +	* test/etags/ETAGS.good_1:
    +	* test/etags/ETAGS.good_2:
    +	* test/etags/ETAGS.good_3:
    +	* test/etags/ETAGS.good_4:
    +	* test/etags/ETAGS.good_5:
    +	* test/etags/ETAGS.good_6:
    +	* test/etags/CTAGS.good: Adapt to the modified Lua tests.
    +
    +2015-12-11  Eli Zaretskii  
    +
    +	Fix 'this-command-keys' wrt prefix argument
    +
    +	* src/keyboard.c (command_loop_1): Restore the feature whereby C-u
    +	was part of this-command-keys, but not of this-single-command-keys.
    +	(Bug#22107)
    +
    +	* lisp/simple.el (internal-echo-keystrokes-prefix): Add
    +	commentary about the function's return value.
    +
    +2015-12-11  Eli Zaretskii  
    +
    +	* lisp/files.el (load-library): Doc fix.  (Bug#22140)
    +
    +2015-12-11  Eli Zaretskii  
    +
    +	Improve and document Ruby support in 'etags'
    +
    +	* lib-src/etags.c (Ruby_suffixes): Add ".ruby".
    +	(Ruby_functions): Support "module" and overloaded operators.
    +	(Ruby_help): Mention "module".
    +
    +	* test/etags/ruby-src/test.rb:
    +	* test/etags/ruby-src/test1.ruby: New files.
    +	* test/etags/Makefile (RBSRC): New tests.
    +	(SRCS): Add ${RBSRC}.
    +	* test/etags/ETAGS.good_1:
    +	* test/etags/ETAGS.good_2:
    +	* test/etags/ETAGS.good_3:
    +	* test/etags/ETAGS.good_4:
    +	* test/etags/ETAGS.good_5:
    +	* test/etags/ETAGS.good_6:
    +	* test/etags/CTAGS.good: Adapt to the new Ruby tests.
    +
    +	* doc/man/etags.1: Mention Ruby support.
    +	* etc/NEWS: Mention Ruby support.
    +
    +2015-12-11  Xi Lu  
    +
    +	Initial support for Ruby in 'etags'
    +
    +	* lib-src/etags.c : New variable.
    +	(lang_names): Add an entry for Ruby.
    +	(Ruby_functions): New function.  (Bug#22116)
    +
    +2015-12-11  Eli Zaretskii  
    +
    +	Clarify documentation of 'modify-frame-parameters'
    +
    +	* doc/lispref/frames.texi (Parameter Access): Clarify what "ignored
    +	PARMs" mean for 'modify-frame-parameters'.
    +
    +	* src/frame.c (Fmodify_frame_parameters): Clarify what "ignored
    +	PARMs" mean for this function.  (Bug#22104)
    +
    +2015-12-11  Eli Zaretskii  
    +
    +	Fix setting buffer unibyte when reading from a device
    +
    +	* src/fileio.c (Finsert_file_contents): Call Fset_buffer_multibyte
    +	to make a (possibly non-empty) buffer unibyte.  (Bug#22096)
    +
    +2015-12-11  Eli Zaretskii  
    +
    +	Clarify documentation of 'values'
    +
    +	* doc/lispref/eval.texi (Eval): Clarify that 'values' are not
    +	updated by any evaluation commands in 'lisp-interaction-mode'.
    +	(Bug#22056)
    +
    +2015-12-11  Anders Lindgren  
    +
    +	Fixed subversion vc error when opening file in new directory (bug#21984).
    +
    +	* lisp/vc/vc-svn.el (vc-svn-registered): Check if directory exists.
    +
    +2015-12-09  Eli Zaretskii  
    +
    +	Yet another fix for when point ends up in invisible text
    +
    +	* src/xdisp.c (redisplay_window): When someone forced
    +	window-start, and honoring that failed to show the cursor, try
    +	moving out of invisible text, before falling back to the middle of
    +	the window.  (Bug#22098)
    +
    +2015-12-09  Michael Albinus  
    +
    +	Fix error in Tramp perl script for cygwin
    +
    +	* lisp/net/tramp-sh.el (tramp-perl-file-truename): Do not raise an
    +	error if file doesn't exist.
    +
    +2015-12-09  YAMAMOTO Mitsuharu  
    +
    +	Remove font workaround for limited outdated versions
    +
    +	* src/macfont.m (mac_font_descriptor_get_adjusted_weight): Remove
    +	workaround for HiraginoSans-W7 on OS X 10.11 and 10.11.1.
    +
    +2015-12-09  Anders Lindgren  
    +
    +	Don't add "." to load path (bug#21104)
    +
    +	When configured with --enable-locallisppath=no, which is the
    +	default for OS X, the load-path incorrectly was populated with ".".
    +
    +	* src/lread.c (init_lread): Don't call `decode_env_path' when
    +	PATH_SITELOADSEARCH is empty.
    +
    +2015-12-08  Artur Malabarba  
    +
    +	* lisp/emacs-lisp/package.el (package--with-response-buffer):
    +
    +	Search for the blank-line in the right buffer.
    +
    +2015-12-08  Glenn Morris  
    +
    +	* test/automated/simple-test.el (undo-auto-boundary-timer): Update
    +	for recent change.
    +
    +2015-12-08  Glenn Morris  
    +
    +	Fix some display-warning usage.
    +
    +	* lisp/files.el (hack-local-variables, hack-dir-local-variables):
    +	* lisp/calendar/diary-lib.el (diary-include-files, diary-sexp-entry):
    +	* lisp/calendar/holidays.el (calendar-holiday-list):
    +	* lisp/mail/rmailout.el (rmail-output-read-file-name):
    +	Fix display-warning usage.
    +
    +2015-12-07  Glenn Morris  
    +
    +	* lisp/calendar/cal-html.el: Require diary-lib.
    +
    +	(cal-html-list-diary-entries): Handle no diary.  (Bug#21994)
    +
    +2015-12-07  Thomas Fitzsimmons  
    +
    +	Add Obsolete-since header to eudcb-ph.el
    +
    +	* eudcb-ph.el: Add Obsolete-since header.
    +
    +2015-12-07  Paul Eggert  
    +
    +	Spelling fixes
    +
    +	* doc/misc/calc.texi (Predefined Units): Use the bland modern
    +	scientific style for spelling the units “ampere” and
    +	“angstrom” rather than the older style “Ampere” and
    +	“Ångstrom”.  The latter spelling was wrong anyway (it should
    +	have been “Ångström”).
    +	* lisp/emacs-lisp/ert.el (ert--explain-equal-rec):
    +	Fix misspelling of ‘atom’ in code.
    +
    +2015-12-07  Eli Zaretskii  
    +
    +	Improve documentation of kill commands
    +
    +	* lisp/simple.el (region-extract-function, delete-backward-char)
    +	(delete-forward-char, kill-region, copy-region-as-kill)
    +	(kill-ring-save): Better document the optional argument REGION in
    +	the doc strings.  Mention in the doc strings that text put in the
    +	kill-ring can be filtered by 'filter-buffer-substring'.
    +
    +	* doc/lispref/text.texi (Kill Functions): Mention that functions
    +	described in this subsection can filter text they put in the
    +	kill-ring.  Add a cross-reference to "Buffer Contents" and an
    +	index entry.  Document the optional argument 'region' and its
    +	effect.
    +	(Bug#21315)
    +
    +2015-12-07  Alan Mackenzie  
    +
    +	Further progress making Isearch, Ispell, Replace work with Follow Mode.
    +
    +	* lisp/follow.el: (follow-mode): Remove references to sit*-for-function, which
    +	no longer exists.  Add follow-post-command-hook to  three special purpose
    +	hooks at setup, and remove them at tear down.
    +
    +	* lisp/isearch.el: (isearch-update): invoke isearch-update-post-hook before
    +	isearch-lazy-highlight-new-loop.
    +	(isearch-lazy-highlight-new-loop): Restore this function to what it previously
    +	was, merging the functionality of isearch-lazy-highlight-maybe-new-loop into
    +	it.
    +	(isearch-lazy-highlight-maybe-new-loop): function removed.
    +
    +	* lisp/replace.el: (replace-update-post-hook): New hook variable.
    +	(perform-replace): Add second (nil) argument to looking-back.  Invoke
    +	replace-update-post-hook before calling replace-highlight.
    +
    +	* lisp/textmodes/ispell.el: (ispell-update-post-hook): New hook variable.
    +	(ispell-command-loop): invoke ispell-update-post-hook.  Add GROUP argument to
    +	call of pos-visible-in-window-p.
    +	(ispell-display-buffer): Place *Choices* window at the top of the last window
    +	in a window group.
    +
    +2015-12-07  Alan Mackenzie  
    +
    +	Amend doc of `mapconcat': it can take sequences, not merely strings.
    +
    +	* doc/lispref/functions.texi (Mapping Functions): Amend the doc of `mapconcat'
    +	to say that SEPARATOR and the results from FUNCTION may be any character
    +	sequences, not just strings.  Add an @xref to "Sequences Arrays Vectors".
    +
    +2015-12-07  Michael Albinus  
    +
    +	Fix an utf8 problem for Tramp on BSD
    +
    +	* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
    +	Make lax check for utf8.
    +	(tramp-get-remote-locale): Add "en_US.UTF-8" as candidate.
    +
    +2015-12-06  Thomas Fitzsimmons  
    +
    +	Make eudcb-ph.el obsolete
    +
    +	* doc/misc/eudc.texi: Bump version to 1.40.0.
    +	Remove PH/QI sections and mentions.
    +	* lisp/obsolete/eudcb-ph.el: Make obsolete.
    +	* lisp/net/eudc-vars.el (eudc-known-protocols): Remove ph.
    +	(eudc-ph-bbdb-conversion-alist): Make obsolete.
    +	* etc/NEWS: Mention this.  (Bug#21191)
    +
    +2015-12-06  Paul Eggert  
    +
    +	Remove overenthusiastic eassert
    +
    +	* src/lisp.h (XSYMBOL): Remove eassert incorrectly added in
    +	previous change.  It breaks on MS-Windows --with-wide-int.
    +	Problem reported by Eli Zaretskii in:
    +	http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00275.html
    +
    +2015-12-06  Paul Eggert  
    +
    +	Pacify gcc -Wparentheses
    +
    +	* src/xdisp.c (row_containing_pos): Reparenthesize.
    +
    +2015-12-06  Paul Eggert  
    +
    +	Port mod-test to 32-bit Emacs --without-wide-int
    +
    +	* modules/mod-test/test.el (mod-test-sum-test):
    +	Bring back the 2**29 tests, but port them to 32-bit Emacs
    +	--without-wide-int.
    +
    +2015-12-06  Michael Albinus  
    +
    +	Fix minor Tramp problems found on BSD
    +
    +	* lisp/net/tramp-sh.el (tramp-perl-file-truename): Do not append
    +	trailing slash.  Quote apostrophes.
    +	(tramp-sh-handle-file-truename): Do not append trailing slash in
    +	the "ls" case.
    +	(tramp-get-ls-command-with-w-option): New defun.
    +	(tramp-do-file-attributes-with-ls)
    +	(tramp-do-directory-files-and-attributes-with-stat): Use it.
    +
    +	* test/automated/tramp-tests.el
    +	(tramp-test31-special-characters-with-perl)
    +	(tramp-test31-special-characters-with-ls)
    +	(tramp-test32-utf8-with-perl, tramp-test32-utf8-with-ls):
    +	Suppress also readlink.
    +
    +2015-12-06  Eli Zaretskii  
    +
    +	Fix cursor display when invisible text is at line beginning
    +
    +	* src/xdisp.c (redisplay_window): When scrolling fails to show
    +	point, prefer using the desired matrix if possible for finding the
    +	fallback glyph row for displaying the cursor.  (Bug#22098)
    +	(row_containing_pos): Exit the loop as soon as we hit the first
    +	disabled glyph row.  Otherwise we risk accessing garbled data and
    +	departing to the no-no land.
    +
    +2015-12-06  Paul Eggert  
    +
    +	Improve module interface when WIDE_EMACS_INT
    +
    +	* src/emacs-module.c (plain_values): New constant.
    +	(module_nil): Now a constant.
    +	(Finternal_module_call, value_to_lisp_bits, lisp_to_value_bits)
    +	(syms_of_module): Use if, not #ifdef, so that both sides are
    +	checked at compile-time, and so that GCC doesn’t complain
    +	about an unused var in the typical case.  Also, depend on
    +	plain_values, not on WIDE_EMACS_INT; the code shouldn’t assume
    +	that WIDE_EMACS_INT implies !USE_LSB_TAG.
    +	(value_to_lisp_bits, lisp_to_value_bits): New functions.
    +	Sign-extend integers rather than zero-extending them, as small
    +	negative integers are more likely.
    +	(value_to_lisp, lisp_to_value): Rewrite in terms of the new *_bits
    +	functions.
    +	(HAVE_STRUCT_ATTRIBUTE_ALIGNED): Define to 0 if not already defined.
    +	(mark_modules): Remove.  All uses removed.
    +	(lisp_to_value): Don’t assume Fcons returns a pointer aligned
    +	to GCALIGNMENT.
    +	(syms_of_module): Check that module_nil converts to Qnil.
    +	* src/lisp.h (lisp_h_XSYMBOL, XSYMBOL): Use signed conversion, since
    +	we prefer signed to unsigned when either will do.
    +	(TAG_PTR): Sign-extend pointers when USE_LSB_TAG, as this is
    +	a bit better for emacs-module.c.
    +
    +2015-12-06  Paul Eggert  
    +
    +	Port mod-test to x86-64 GNU/Linux running 32-bit
    +
    +	* modules/mod-test/test.el (mod-test-sum-test):
    +	Don’t attempt to match descriptions to operating systems.
    +	It didn’t work on Fedora x86-64 running a 32-bit executable,
    +	and it’s not worth the trouble anyway.
    +	Port to 32-bit platforms by removing an assumption about
    +	fixnum widths.
    +
    +2015-12-06  Michael Albinus  
    +
    +	Fix auto-revert-tests.el when filenotify isn't used
    +
    +	* test/automated/auto-revert-tests.el (auto-revert--wait-for-revert):
    +	Make it working also when filenotify isn't used.
    +
    +2015-12-05  Juri Linkov  
    +
    +	* lisp/textmodes/ispell.el (ispell-highlight-spelling-error-overlay):
    +
    +	Let-bind isearch-regexp-function to nil.  (Bug#22097)
    +
    +2015-12-05  Artur Malabarba  
    +
    +	* lisp/emacs-lisp/package.el: Don't install bad signatures (bug#22089)
    +
    +	(package--with-response-buffer): NOERROR and ERROR-FORM only
    +	handle connection errors.
    +	(bad-signature): New error type.
    +	(package--check-signature-content): Use it.
    +	(package--check-signature): Properly distinguish connection errors
    +	from bad-signature errors.  Do the check for
    +	`package-check-signature' `allow-unsigned' here instead of forcing
    +	the callbacks to do it.  Add a new argument, UNWIND.
    +	(package--download-one-archive, package-install-from-archive):
    +	Update usage of `package--check-signature'.
    +
    +2015-12-05  Ulf Jasper  
    +
    +	Fix Bug#22092.
    +
    +	* lisp/calendar/icalendar.el (icalendar--get-unfolded-buffer):
    +	  Clean up inconsistent line endings. (Bug#22092)
    +	  (icalendar--clean-up-line-endings): New.
    +	* test/automated/icalendar-tests.el (icalendar-real-world): Add test
    +	  for Bug#22092.
    +
    +2015-12-05  Eli Zaretskii  
    +
    +	Document 'bookmark-set-no-overwrite'
    +
    +	* doc/emacs/regs.texi (Bookmarks): Document the new command
    +	'bookmark-set-no-overwrite' and its keybinding.
    +
    +2015-12-05  Eli Zaretskii  
    +
    +	Document new binding of 'mouse-buffer-menu'
    +
    +	* doc/emacs/buffers.texi (Buffer Menus): 'mouse-buffer-menu' is
    +	now also on C-F10.
    +
    +2015-12-05  Eli Zaretskii  
    +
    +	Initial documentation of dynamic modules
    +
    +	* doc/lispref/loading.texi (Dynamic Modules): New section with
    +	initial documentation for dynamic modules.
    +	* doc/lispref/elisp.texi (Top): Add "Dynamic Modules" to the
    +	detailed menu
    +
    +	* etc/NEWS: Fix typos in dynamic modules' entry.
    +
    +2015-12-05  Artur Malabarba  
    +
    +	Remove copyright statements from trivial test files
    +
    +2015-12-05  Eli Zaretskii  
    +
    +	Add "Preliminaries" section to etc/DEBUG
    +
    +	* etc/DEBUG: Add the "Preliminaries" section for GDB beginners.
    +	Most of the content was suggested by Phillip Lord
    +	.  Remove the section about debugging
    +	with the Visual Studio, as building Emacs with the Microsoft
    +	compilers is no longer supported.  Minor fixes in some other
    +	sections.
    +
    +2015-12-05  Alex Dunn    (tiny change)
    +
    +	Improve parsing of version strings
    +
    +	* lisp/subr.el (version-regexp-alist): Allow "." as priority separator
    +	(version-to-list): More helpful error messages.
    +	(version-to-list): ".5" is valid (update docstring).  Make
    +	"22.8X3" invalid, as the doc string says.
    +
    +	* test/automated/subr-tests.el (ert-test-version-parsing): New
    +	tests for version string processing.
    +
    +2015-12-05  Eli Zaretskii  
    +
    +	Fix documentation of 'undo' changes
    +
    +	* doc/lispref/text.texi (Undo): Minor wording changes.  Use US
     	English conventions for spelling and whitespace between sentences.
     
    -	* etc/NEWS: Fix wording and spelling of undo-related entries.
    -	Mark them as documented.
    +	* etc/NEWS: Fix wording and spelling of undo-related entries.
    +	Mark them as documented.
    +
    +2015-12-04  Glenn Morris  
    +
    +	* lisp/net/net-utils.el: Small improvements.
    +
    +	(net-utils--executable-find-sbin): New function.
    +	(ifconfig-program): Check sbin directories.
    +	Fallback to "ip".  (Bug#22091)
    +	(ifconfig-program-options): Check the actual program in use.
    +	(arp-program): Check sbin directories.
    +
    +2015-12-04  Arash Esbati    (tiny change)
    +
    +	Fix wrong-type-argument integer-or-marker-p nil error
    +
    +	* lisp/textmodes/reftex-auc.el (reftex-what-index-tag):
    +	Fix (wrong-type-argument integer-or-marker-p nil) error (bug#22077).
    +
    +2015-12-04  Alan Mackenzie  
    +
    +	Merge branch 'scratch/follow' of /home/acm/emacs/emacs.git/emacs-25 into scratch/follow
    +
    +	Merge necessitated by a rebase operation.
    +
    +2015-12-04  Alan Mackenzie  
    +
    +	lisp/isearch.el: Eliminate macro isearch-call-message, replacing with funcall.
    +
    +2015-12-04  Alan Mackenzie  
    +
    +	First commit to scratch/follow.  Make Isearch work with Follow Mode, etc.
    +
    +	doc/lispref/window.texi (Basic Windows): Add paragraph defining "Group of
    +	Windows" and new @defun selected-window-group.
    +	(Window Start and End): Describe new &optional parameter GROUP and
    +	...-group-function for window-start, window-end, set-window-start, and
    +	pos-visible-in-window-p.
    +	(Textual Scrolling) Describe the same for recenter.
    +	doc/lispref/positions.texi (Screen Lines): Describe the same for
    +	move-to-window-line.
    +
    +	src/window.c (Fwindow_start, Fwindow_end, Fset_window_start)
    +	(Fpos_visible_in_window_p, Frecenter, Fmove_to_window_line): To each, add ar
    +	new optional parameter "group".  At the beginning of each, check whether the
    +	corresponding ...-group-function is set to a function, and if so execute this
    +	function in place of the normal processing.
    +	(syms_of_window): Define symbols for the six new variables below.
    +	(window-start-group-function, window-end-group-function)
    +	(set-window-start-group-function, recenter-group-function)
    +	(pos-visible-in-window-p-group-function, move-to-window-line-group-function):
    +	New permanent local buffer local variables.
    +	src/keyboard.c (Fposn_at_point): Add extra parameter in call to
    +	Fpos_visible_in_window_p.
    +
    +	lisp/window.el (selected-window-group-function): New permanent local buffer
    +	local variable.
    +	(selected-window-group): New function.
    +
    +	lisp/follow.el (follow-mode): Set the ...-group-function variables at mode
    +	enable, kill them at mode disable.  Add/remove follow-after-change to/from
    +	after-change-functions.
    +	(follow-start-end-invalid): New variable.
    +	(follow-redisplay): Manipulate follow-start-end-invalid.
    +	(follow-after-change, follow-window-start, follow-window-end)
    +	(follow-set-window-start, follow-pos-visible-in-window-p)
    +	(follow-move-to-window-line, follow-sit-for): New functions.
    +
    +	lisp/isearch.el (isearch-call-message): New macro.
    +	(isearch-update, with-isearch-suspended, isearch-del-char)
    +	(isearch-search-and-update, isearch-ring-adjust): Invoke above new macro.
    +	(with-isearch-suspended): Rearrange code such that isearch-call-message is
    +	invoked before point is moved.
    +	(isearch-message): Add comment about where point must be at function call.
    +	(isearch-search): Remove call to isearch-message.
    +	(isearch-lazy-highlight-window-group): New variable.
    +	(isearch-lazy-highlight-new-loop): Unconditionally start idle timer.  Move
    +	the battery of tests to ...
    +	(isearch-lazy-highlight-maybe-new-loop): New function, started by idle timer.
    +	Note: (sit-for 0) is still called.
    +	(isearch-lazy-highlight-update): Check membership of
    +	isearch-lazy-highlight-window-group.  Don't set the `window' overlay
    +	property.
    +	(isearch-update, isearch-done, isearch-string-out-of-window)
    +	(isearch-back-into-window, isearch-lazy-highlight-maybe-new-loop)
    +	(isearch-lazy-highlight-search, isearch-lazy-highlight-update)
    +	(isearch-lazy-highlight-update): Call the six amended primitives (see
    +	src/window.c above) with the new `group' argument set to t, to cooperate
    +	with Follow Mode.
    +
    +2015-12-04  Stefan Monnier  
    +
    +	* lisp/emacs-lisp/ert.el: Prefer pcase over cl-typecase
    +
    +	* lisp/emacs-lisp/ert.el (ert--should-error-handle-error)
    +	(ert--explain-format-atom, ert--explain-equal-rec)
    +	(ert--print-backtrace, ert-test-result-type-p, ert-select-tests)
    +	(ert--insert-human-readable-selector): Prefer pcase over cl-typecase.
    +
    +2015-12-04  Artur Malabarba  
    +
    +	* lisp/character-fold.el: Remove special case-folding support
    +
    +	(character-fold-to-regexp): Remove special code for
    +	case-folding.  Char-fold search still respects the
    +	`case-fold-search' variable (i.e., f matches F).  This only
    +	removes the code that was added to ensure that f also matched
    +	all chars that F matched.  For instance, after this commit, f
    +	no longer matches 𝔽.
    +
    +	This was necessary because the logic created a regexp with
    +	2^(length of the string) redundant paths.  So, when a very
    +	long string "almost" matched, Emacs took a very long time to
    +	figure out that it didn't.  This became particularly relevant
    +	because isearch's lazy-highlight does a search bounded by (1-
    +	match-end) (which, in most circumstances, is a search that
    +	almost matches).  A recipe for this can be found in bug#22090.
    +
    +2015-12-04  Stefan Monnier  
    +
    +	* lisp/emacs-lisp/cl-macs.el (character): Can't be negative
    +	Fixes (bug#21701)
    +
    +2015-12-04  Daiki Ueno  
    +
    +	lisp/gnus/qp.el: Don't replace "from " at bol
    +
    +	* lisp/gnus/qp.el (quoted-printable-encode-region): Bind `case-fold-search'
    +	to nil when looking for "^From ".  Problem reported by Simon Josefsson.
    +
    +2015-12-03  Phillip Lord  
    +
    +	Externalize some symbols in undo-auto
    +
    +	 * doc/lispref/text.texi: Update symbols.
    +	 * lisp/simple.el (undo-auto--amalgamate,
    +	   undo-auto--current-boundary-timer): Make symbols public.
    +	 * src/cmds.c (Fself_insert_command,Fdelete_char): Call
    +	   updated symbol.
    +
    +2015-12-03  Stefan Monnier  
    +
    +	* lisp/emacs-lisp/smie.el (smie-next-sexp): Fix BOB "token"
    +
    +2015-12-03  Michael Albinus  
    +
    +	Some error message improvements in tramp-sh.el
    +
    +	* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
    +	Suppress error messages for "mesg" and "biff" calls.
    +	(tramp-get-remote-path): Ignore errors when expanding
    +	`tramp-own-remote-path'.  Raise a warning instead.
    +
    +2015-12-03  Eli Zaretskii  
    +
    +	Document 'nacl' value for 'system-type'
    +
    +	* doc/lispref/os.texi (System Environment): Document the 'nacl'
    +	value of 'system-type'.
    +
    +2015-12-03  Eli Zaretskii  
    +
    +	Document 'window-max-chars-per-line'
    +
    +	* doc/lispref/windows.texi (Window Sizes): Document
    +	'window-max-chars-per-line'.
    +
    +2015-12-03  Artur Malabarba  
    +
    +	Fix some file headers for the purpose of `package--builtins'
    +
    +	* lisp/emacs-lisp/cl-preloaded.el
    +	* lisp/emacs-lisp/eieio-compat.el
    +	* lisp/net/sasl-scram-rfc.el: Add a "Package:" header
    +
    +	* lisp/ielm.el: Fix summary line.
    +
    +2015-12-03  Artur Malabarba  
    +
    +	* lisp/emacs-lisp/package.el (package-unpack): Load before compiling
    +
    +	Reload any previously loaded package files before compiling
    +	the package (also reload the same files after compiling).
    +	This ensures that we have the most recent definitions during
    +	compilation, and avoids generating bad elc files when a macro
    +	changes and it is used in a different file from the one it's
    +	defined in.
    +
    +2015-12-03  Artur Malabarba  
    +
    +	* lisp/emacs-lisp/package.el: Refactor package activation code
    +
    +	(package-activate): Move code that activates dependencies into
    +	package-activate-1.
    +	(package--load-files-for-activation): New function.
    +	(package-activate-1): Add code for (optionally) activating
    +	dependencies, and move file-loading code into
    +	`package--load-files-for-activation'.
    +
    +2015-12-03  Eli Zaretskii  
    +
    +	Document new font-related functionality
    +
    +	* doc/lispref/display.texi (Low-Level Font): Document
    +	'default-font-width', 'default-font-height', 'window-font-width',
    +	and 'window-font-height'.
    +
    +	* etc/NEWS: Move entries for 'default-font-width',
    +	'default-font-height', 'window-font-width', and 'window-font-height'
    +	to their place and mark them documented.
    +
    +2015-12-03  Eli Zaretskii  
    +
    +	Fix documentation and implementation of 'directory-name-p'
    +
    +	* lisp/files.el (directory-name-p): Modify to recognize
    +	backslashes on MS-Windows and MS-DOS.  Adjust the doc string
    +	accordingly.  Use '=', not char-equal, for comparison, as
    +	letter-case cannot possibly be an issue here.
    +
    +	* doc/lispref/files.texi (Directory Names): Move the documentation
    +	of directory-name-p here from "Relative File Names".  Update the
    +	description per the changes in implementation.
    +
    +	* etc/NEWS: Move the entry for 'directory-name-p' to its proper
    +	place and mark it documented.
    +
    +2015-12-02  Eli Zaretskii  
    +
    +	Minor copyedit in Emacs manual
    +
    +	* doc/emacs/search.texi (Lax Search): Make wording about character
    +	folding by default less definitive.  (Bug#22043)
    +
    +2015-12-02  Eli Zaretskii  
    +
    +	More emacs-module.c fixes for wide ints
    +
    +	* src/emacs-module.c (value_to_lisp) [WIDE_EMACS_INT]: Use
    +	unsigned data types to manipulate pointers, to avoid sign
    +	extension coming after us with a vengeance.
    +
    +	* modules/mod-test/test.el (mod-test-sum-test): Add tests for
    +	Emacs with wide ints that verify integer values near the critical
    +	value that requires us to switch to a cons cell.
    +
    +2015-12-02  Stephen Leake  
    +
    +	Fix bug#22069 in cl-generic.el
    +
    +	* lisp/emacs-lisp/cl-generic.el (cl-no-method): Remove %S; this string is
    +	not run thru `format'.
    +
    +2015-12-01  Dmitry Gutov  
    +
    +	APPEND etags--xref-backend to xref-backend-functions
    +
    +	* lisp/progmodes/xref.el (xref-backend-functions):
    +	Use APPEND when adding the default element
    +	(http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00061.html).
    +
    +2015-12-01  Eli Zaretskii  
    +
    +	More accurate documentation of lax whitespace matching
    +
    +	* lisp/isearch.el (isearch-forward-word, isearch-forward-symbol)
    +	(word-search-backward, word-search-forward)
    +	(word-search-backward-lax, word-search-forward-lax): Mention in
    +	doc strings that toggling lax whitespace matching has no effect on
    +	these commands.
    +
    +	* doc/emacs/search.texi (Word Search, Symbol Search): Clarify that
    +	lax whitespace matching has no effect on these commands.
    +
    +2015-12-01  Eli Zaretskii  
    +
    +	Fix emacs-module.c for wide ints
    +
    +	* src/emacs-module.c (lisp_to_value): Compare the produced value
    +	with the original Lisp object, not with the one potentially
    +	converted into a Lisp_Cons.  Fixes assertion violations when
    +	working with integers larger than fit into a 32-bit value.
    +
    +	* modules/mod-test/test.el (mod-test-sum-test): Add tests for
    +	large integers, to test --with-wide-int.
    +
    +2015-12-01  Eli Zaretskii  
    +
    +	Document 'directory-files-recursively'
    +
    +	* lisp/files.el (directory-files-recursively): Doc fix.  Rename
    +	the argument MATCH to REGEXP, to be more explicit about its form.
    +
    +	* doc/lispref/files.texi (Contents of Directories): Improve the
    +	documentation of 'directory-files-recursively'.  Add
    +	cross-references.
    +
    +	* etc/NEWS: Move the entry for 'directory-files-recursively' to
    +	its place and mark it documented.
    +
    +2015-12-01  Eli Zaretskii  
    +
    +	Document 'inhibit-read-only' property
    +
    +	* doc/lispref/text.texi (Special Properties): Describe the new
    +	'inhibit-read-only' text property.  Add cross-reference to where
    +	read-only buffers are described.
    +	* doc/lispref/buffers.texi (Read Only Buffers): Mention that
    +	'inhibit-read-only' property exempts text from being read-only.
    +	Add cross-reference to "Special Properties".
    +
    +	* etc/NEWS: Move the entry about 'inhibit-read-only' property to
    +	its place and mark it documented.
    +
    +2015-12-01  Artur Malabarba  
    +
    +	* lisp/emacs-lisp/package.el: Update header comments
    +
    +2015-12-01  Artur Malabarba  
    +
    +	* lisp/character-fold.el: Add back multi-char matching
    +
    +	(character-fold-to-regexp): Uncomment recently commented code
    +	and make the algorithm "dummer" by not checking every possible
    +	combination.  This will miss some possible matches, but it
    +	greatly reduces regexp size.
    +
    +	* test/automated/character-fold-tests.el
    +	(character-fold--test-fold-to-regexp): Comment out test of
    +	functionality no longer supported.
    +
    +2015-12-01  Xue Fuqiao  
    +
    +	* doc/emacs/ack.texi (Acknowledgments): Update.
    +
    +2015-12-01  Michael Albinus  
    +
    +	Check `file-remote-p' over absolute files names in files.el
    +
    +	* lisp/files.el (directory-files-recursively)
    +	(get-free-disk-space): Check `file-remote-p' over absolute files names.
    +
    +2015-12-01  Andreas Schwab  
    +
    +		* src/lread.c (syms_of_lread): Doc fix.
    +
    +2015-11-30  Dmitry Gutov  
    +
    +	Don't mistake certain JS method calls for keywords
    +
    +	* lisp/progmodes/js.el (js--ctrl-statement-indentation):
    +	Braceless keyword can't come after a period (bug#22063).
    +
    +2015-11-30  David Reitter  
    +
    +	Read frame_title_format from buffer-local variable for NS port
    +
    +	* src/nsfns.m (x_implicitly_set_name): Read frame-title-format and
    +	icon-title-format variables from buffer in appropriate window.
    +	(Bug#22048)
    +
    +2015-11-30  Juri Linkov  
    +
    +	* lisp/replace.el (occur-engine): Count matches in empty lines.
    +
    +	(Bug#22062)
    +
    +2015-11-30  Aurélien Aptel  
    +
    +	* src/emacs-module.h: Fix finalizer typedef for C++11
    +
    +	C++11 standard doesn't allow exception-specification in typedef.
    +	The workaround is to declare a dummy function prototype and use
    +	decltype on it.
    +
    +2015-11-30  Eli Zaretskii  
    +
    +	Fix last change
    +
    +	* src/emacs-module.c (lisp_to_value, value_to_lisp)
    +	[WIDE_EMACS_INT]: Avoid compiler warnings.
    +
    +2015-11-30  Stefan Monnier  
    +
    +	Rely on conservative stack scanning to find "emacs_value"s
    +
    +	* src/emacs-module.c (struct emacs_value_tag)
    +	(struct emacs_value_frame, struct emacs_value_storage): Remove.
    +	(value_frame_size): Remove constant.
    +	(struct emacs_env_private): Use Lisp_Object for non_local_exit info.
    +	(lisp_to_value): Remove first arg.
    +	(module_nil): New constant.
    +	Use it instead of NULL when returning an emacs_value.
    +	(module_make_function): Adjust to new calling convention of
    +	Qinternal_module_call.
    +	(DEFUN): Receive args in an array rather than a list.
    +	Use SAFE_ALLOCA rather than xnmalloc.  Skip the lisp_to_value loop when
    +	we don't have WIDE_EMACS_INT.  Adjust to new type of non_local_exit info.
    +	(module_non_local_exit_signal_1, module_non_local_exit_throw_1):
    +	Adjust to new type of non_local_exit info.
    +	(ltv_mark) [WIDE_EMACS_INT]: New constant.
    +	(value_to_lisp, lisp_to_value): Rewrite.
    +	(initialize_frame, initialize_storage, finalize_storage): Remove functions.
    +	(allocate_emacs_value): Remove function.
    +	(mark_modules): Gut it.
    +	(initialize_environment): Don't initialize storage any more.
    +	Keep the actual env object on Vmodule_environments.
    +	(finalize_environment): Don't finalize storage any more.
    +	(syms_of_module): Initialize ltv_mark and module_nil.
    +
    +	* src/emacs-module.h (emacs_value): Make it more clear that this type
    +	is really opaque, including the fact that NULL may not be valid.
    +
    +	* modules/mod-test/mod-test.c (Fmod_test_signal, Fmod_test_throw):
    +	Don't assume that NULL is a valid emacs_value.
    +
    +2015-11-30  Eli Zaretskii  
    +
    +	Yet another doc improvement for search commands
    +
    +	* doc/emacs/search.texi (Word Search, Symbol Search)
    +	(Regexp Search): Document commands that don't support lax
    +	whitespace matching or character folding.
    +	(Nonincremental Search): Mention the search commands that can be
    +	invoked from the menu bar.
    +
    +	* lisp/isearch.el (isearch-define-mode-toggle-word)
    +	(isearch-define-mode-toggle-symbol)
    +	(isearch-define-mode-toggle-character-fold): Note in the doc
    +	string that turning these on exits the regexp mode.
    +	(isearch-forward-regexp, isearch-forward-word)
    +	(isearch-forward-symbol, isearch-backward-regexp)
    +	(word-search-backward, word-search-forward)
    +	(word-search-backward-lax, word-search-forward-lax): State in the
    +	doc string which commands don't support character folding and/or
    +	lax-whitespace matching.
    +
    +2015-11-30  Martin Rudalics  
    +
    +	Run `window-size-change-functions' also when reading from minibuffer
    +
    +	* src/xdisp.c (redisplay_internal): Run `window-size-change-functions'
    +	also when reading from minibuffer.
    +
    +2015-11-30  Ulf Jasper  
    +
    +	Fix scrambling of html-rendered item buffers
    +
    +	* lisp/net/newst-treeview.el (newsticker--treeview-render-text): Fix
    +	  scrambling of contents by wrapping call to html-renderer in
    +	  save-selected-window.
    +
    +2015-11-30  Paul Eggert  
    +
    +	Fix font typo in previous doc fix.
    +
    +2015-11-30  Paul Eggert  
    +
    +	A bit more security doc, esp. file local vars
    +
    +	* doc/emacs/emacs.texi (Top):
    +	* doc/emacs/misc.texi (Miscellaneous Commands):
    +	Refer to new Host Security section.
    +	(Host Security): New section.
    +	* doc/lispref/os.texi (Security Considerations):
    +	Mention file local variables.
    +
    +2015-11-30  Artur Malabarba  
    +
    +	* lisp/character-fold.el: Comment out branching code
    +
    +	(character-fold-to-regexp): Comment out code that uses multi-char
    +	table.  The branching caused by this induces absurdly long regexps,
    +	up to 10k chars for as little as 25 input characters.
    +
    +2015-11-30  Paul Eggert  
    +
    +	Spelling and grammar fixes
    +
    +2015-11-29  Dmitry Gutov  
    +
    +	Make lisp-completion-at-point a wrapper instead of an alias
    +
    +	* lisp/progmodes/elisp-mode.el (lisp-completion-at-point):
    +	Turn into an obsolete wrapper around elisp-completion-at-point
    +	(bug#20455).
    +
    +2015-11-29  Artur Malabarba  
    +
    +	* lisp/isearch.el (isearch-search-fun-default): Nicer error
    +
    +	message when the search fails.
    +
    +2015-11-29  Dmitry Gutov  
    +
    +	Update menu-bar-goto-uses-etags-p for the current xref API
    +
    +	* lisp/menu-bar.el (menu-bar-goto-uses-etags-p): Consult
    +	xref-backend-functions, instead of now-nonexistent
    +	xref-find-function.
    +
    +2015-11-29  Artur Malabarba  
    +
    +	* lisp/isearch.el (isearch-define-mode-toggle): Advertise binding
    +
    +2015-11-29  Artur Malabarba  
    +
    +	* lisp/menu-bar.el: Use folding in searches
    +
    +	(nonincremental-search-forward): Use `isearch-search-fun-default'
    +	to determine the search function.
    +	(nonincremental-search-backward)
    +	(nonincremental-repeat-search-forward)
    +	(nonincremental-repeat-search-backward): Use it.
    +
    +2015-11-29  Artur Malabarba  
    +
    +	* lisp/menu-bar.el (menu-bar-goto-uses-etags-p): Fix a warning
    +
    +2015-11-29  Artur Malabarba  
    +
    +	* lisp/character-fold.el (character-fold-to-regexp): Be careful
    +
    +	not to return huge regexps.
    +
    +2015-11-29  Eli Zaretskii  
    +
    +	Improve documentation of string-collate-* functions
    +
    +	* doc/lispref/strings.texi (Text Comparison): Improve wording and
    +	indexing of 'string-collate-equalp' and 'string-collate-lessp'.
    +
    +	* etc/NEWS: Move the entry of 'string-collate-equalp' and
    +	'string-collate-lessp' to "Lisp Changes" section and mark it as
    +	documented.
    +
    +2015-11-29  Eli Zaretskii  
    +
    +	Document truncate-string-ellipsis
    +
    +	* doc/lispref/display.texi (Size of Displayed Text): Document
    +	'truncate-string-ellipsis'.
    +
    +	* lisp/international/mule-util.el (truncate-string-ellipsis): Doc fix.
    +	(truncate-string-to-width): Mention in the doc string that the
    +	default for ELLIPSIS comes from 'truncate-string-ellipsis'.
    +
    +	* etc/NEWS: Move the 'truncate-string-ellipsis' entry to the "Lisp
    +	Changes" section.
    +
    +2015-11-29  Eli Zaretskii  
    +
    +	Fix confusion wrt character folding in the Emacs manual
    +
    +	* doc/emacs/search.texi (Nonincremental Search, Regexp Search):
    +	Document that invoking search-forward/backward and
    +	re-search-forward/backward supports only case folding, but not the
    +	rest of the lax-search features.  Reported by Mike Kupfer
    +	.
    +
    +2015-11-29  Ken Brown  
    +
    +	Update mod-test-sum-test
    +
    +	* modules/mod-test/test.el (mod-test-sum-test): Update to
    +	accommodate the lack of dladdr on Cygwin.
    +
    +2015-11-29  Alan Mackenzie  
    +
    +	Byte compiler: Catch missing argument to `funcall'.  Fixes bug#22051.
    +
    +	* lisp/emacs-lisp/bytecomp.el (byte-compile-funcall): When there's no argument
    +	to `funcall', (i) Output an error message; (ii) Generate code to signal a
    +	`wrong-number-of-arguments' error.
    +
    +2015-11-29  Martin Rudalics  
    +
    +	* lisp/window.el (split-window): Don't sanitize sizes when SIZE is non-nil.
    +
    +2015-11-28  Artur Malabarba  
    +
    +	* lisp/character-fold.el (character-fold-to-regexp)
    +
    +	Warn about using long strings.
    +
    +	* test/automated/character-fold-tests.el
    +	(character-fold--test-lax-whitespace)
    +	(character-fold--test-consistency): Reduce string size for tests.
    +
    +2015-11-28  Eli Zaretskii  
    +
    +	Document renaming of x-select-enable-* variables
    +
    +	* doc/emacs/killing.texi (Clipboard): Rename
    +	x-select-enable-clipboard to select-enable-clipboard and
    +	x-select-enable-primary to select-enable-primary.  Update index
    +	entries.
    +
    +	* etc/NEWS: Mark entry as documented.
    +
    +2015-11-28  Eli Zaretskii  
    +
    +	Document the shorthand hints displayed by M-x
    +
    +	* doc/emacs/m-x.texi (M-x): Document the numeric meaning of
    +	suggest-key-bindings.  Document the shorthand hints for commands
    +	that have no key bindings.  Document that M-x completion ignores
    +	obsolete commands.
    +
    +	* etc/NEWS: Move the M-x entry to "Editing Changes" and mark it as
    +	documented.
    +
    +2015-11-28  Eli Zaretskii  
    +
    +	Update docs of character folding
    +
    +	* doc/emacs/search.texi (Lax Search): Update the description of
    +	character folding for the latest changes.
    +
    +2015-11-28  Artur Malabarba  
    +
    +	* lisp/character-fold.el: Also play nice with case-folding
    +
    +	(character-fold-to-regexp): Take `case-fold-search' into account.
    +
    +2015-11-28  Artur Malabarba  
    +
    +	* lisp/character-fold.el: Add support for multi-char matches
    +
    +	(character-fold-table): Now has an extra-slot. This is a second
    +	char-table that holds multi-character matches.  See docstring for
    +	details.
    +	(character-fold-to-regexp): Can build branching regexps when a
    +	character's entry the extra slot of `character-fold-table' matches the
    +	characters that succeed it.
    +
    +2015-11-28  Artur Malabarba  
    +
    +	* lisp/character-fold.el: Code simplifications
    +
    +	(character-fold-table): Reduce the scope of a variable.
    +	(character-fold-to-regexp): Change logic to work directly on the
    +	input string.  It's a little easier to understand, probably
    +	faster, and sets us up for implementing multi-char matches.
    +
    +	* test/automated/character-fold-tests.el
    +	(character-fold--test-fold-to-regexp): New test.
    +
    +2015-11-28  Eli Zaretskii  
    +
    +	Document changes in "C-h l"
    +
    +	* doc/emacs/help.texi (Misc Help): Document the changes in "C-h l".
    +
    +	* etc/NEWS: mark "C-h l" changes as documented.
    +
    +2015-11-28  Eli Zaretskii  
    +
    +	Finalize documentation of 'custom-prompt-customize-unsaved-options'
    +
    +	* doc/emacs/custom.texi (Saving Customizations): Index the new
    +	function 'custom-prompt-customize-unsaved-options'.
    +
    +	* etc/NEWS: Mention when 'custom-prompt-customize-unsaved-options'
    +	is useful.
    +
    +2015-11-28  Eli Zaretskii  
    +
    +	Document 'comment-line'
    +
    +	* doc/emacs/programs.texi (Comment Commands): Document
    +	'comment-line'.
    +
    +	* etc/NEWS: Move the entry for 'comment-line' into "Editing Changes".
    +
    +2015-11-28  Eli Zaretskii  
    +
    +	Document new checkdoc features
    +
    +	* doc/lispref/tips.texi (Tips, Library Headers): Document the
    +	keyword-checking features of checkdoc and the commands
    +	'checkdoc-file' and 'checkdoc-current-buffer'.
    +
    +	* etc/NEWS: Move the checkdoc-related entries to their own
    +	section.
    +
    +2015-11-28  Philipp Stephani  
    +
    +	Simplify the prologue of emacs-module.c functions
    +
    +	* src/emacs-module.c (MODULE_FUNCTION_BEGIN): New macro.
    +	(module_make_global_ref)
    +	(module_free_global_ref, module_make_function, module_funcall)
    +	(module_intern, module_type_of, module_extract_integer)
    +	(module_make_integer, module_extract_float, module_make_float)
    +	(module_copy_string_contents, module_make_string)
    +	(module_make_user_ptr, module_get_user_ptr, module_set_user_ptr)
    +	(module_get_user_finalizer, module_set_user_finalizer)
    +	(module_vec_set, module_vec_get, module_vec_size): Use new helper
    +	macro MODULE_FUNCTION_BEGIN.
    +
    +2015-11-28  Eli Zaretskii  
    +
    +	Don't reject module calls with no arguments
    +
    +	* src/emacs-module.c (Finternal_module_call): Allow ARGLIST be nil.
    +
    +2015-11-28  Philipp Stephani  
    +
    +	Make module-call be visible from Lisp
    +
    +	* src/emacs-module.c (module_make_function): Use internal--module-call.
    +	(Finternal_module_call): Renamed from Fmodule_call.  Add safety
    +	checks.
    +	(syms_of_module): DEFSYM save-value-p and save-pointer-p.  Do
    +	defsubr internal--module-call.
    +
    +2015-11-28  Eli Zaretskii  
    +
    +	Add etags tests for the recent Lua-related bugfix
    +
    +	* test/etags/lua-src/test.lua: New file, tests the issues raised
    +	by bug#21934.
    +	* test/etags/Makefile (LUASRC): Add test.lua.
    +	* test/etags/ETAGS.good_1:
    +	* test/etags/ETAGS.good_2:
    +	* test/etags/ETAGS.good_3:
    +	* test/etags/ETAGS.good_4:
    +	* test/etags/ETAGS.good_5:
    +	* test/etags/ETAGS.good_6:
    +	* test/etags/CTAGS.good: Adapt to the new Lua test.  Also, an old
    +	regression fix, resolved around 25 May 2015, required changes to
    +	the "good" ETAGS files.
    +
    +2015-11-28  Eli Zaretskii  
    +
    +	Fix Lua tags when a function name includes '.' or ':'
    +
    +	* lib-src/etags.c (Lua_functions): Add a tag for the last element
    +	of a function name after a dot or a colon.  (Bug#21934)
    +
    +2015-11-28  Eli Zaretskii  
    +
    +	Improve documentation of search and replace commands
    +
    +	* doc/emacs/search.texi (Replacement and Lax Matches): Document
    +	which commands are affected by 'replace-character-fold'.
    +	(Lax Search): Add a cross reference to "Replacement and Lax
    +	Matches".  Improve wording.  Fix lost extra whitespace.
    +	(Search Customizations): Improve wording.  (Bug#22036)
    +	See also comments in
    +	http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02376.html.
    +
    +	* lisp/replace.el (query-replace, query-replace-regexp)
    +	(query-replace-regexp-eval, replace-string, replace-regexp):
    +	Mention 'replace-character-fold' in the doc strings.
    +
    +2015-11-28  Paul Eggert  
    +
    +	Fix minor problems found by static checking
    +
    +	* src/undo.c (prepare_record): Add proper prototype for C.
    +
    +2015-11-27  Stefan Monnier  
    +
    +	* src/emacs-module.c (struct env_storage): Delete
    +
    +	(struct emacs_runtime_private): Keep an emacs_env instead.
    +	(Fmodule_load, Fmodule_call): Declare emacs_env_private separately.
    +	(initialize_environment): Split the arg in two.	 Adjust all callers.
    +	Only store the private part in Vmodule_environments.
    +	(finalize_environment): Change the arg to only be the private env.
    +	Adjust all callers.
    +
    +2015-11-27  Eli Zaretskii  
    +
    +	Improve documentation of 'replace-character-fold'
    +
    +	* lisp/replace.el (replace-character-fold): Clarify which commands
    +	are affected by this variable.
    +
    +2015-11-27  Dmitry Gutov  
    +
    +	Autoload etags when using its xref backend
    +
    +	* lisp/progmodes/xref.el (xref--etags-backend):
    +	Rename to etags--xref-backend.  Move to etags.el.  Autoload.
    +	(Bug#22026)
    +
    +2015-11-27  Artur Malabarba  
    +
    +	* lisp/character-fold.el: Allow complex chars to match their decomposition
    +
    +	(character-fold-table): When a character's decomposition does not
    +	involve a formatting tag (i.e., if it has an "exact" description via
    +	other characters), then this character is allowed to match the
    +	decomposition.
    +
    +2015-11-27  Artur Malabarba  
    +
    +	* lisp/character-fold.el: More descriptive variable names
    +
    +	(character-fold-table): Rename a lot of the lexical variables to
    +	make the code easier to read.
    +
    +2015-11-27  Artur Malabarba  
    +
    +	* lisp/isearch.el: Ensure we still support `isearch-new-word'
    +
    +	(isearch-new-regexp-function): Define variable.
    +	(isearch-new-word): Define as an obsolete alias. (Bug#22018)
    +
    +2015-11-27  Eli Zaretskii  
    +
    +	Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25
    +
    +2015-11-27  Lee Bochicchio  
    +
    +	* test/lisp/abbrev-tests.el: Define more tests
    +
    +	(abbrev-table-name-test, kill-all-abbrevs-test)
    +	(clear-abbrev-table-test): New tests.
    +
    +2015-11-27  Eli Zaretskii  
    +
    +	Add module tests for wrong-type-argument
    +
    +	* modules/mod-test/test.el (mod-test-sum-test): Add tests for
    +	wrong-type-argument.
    +
    +2015-11-27  Eli Zaretskii  
    +
    +	Improve handling of signals and 'throw' in modules
    +
    +	* src/emacs-module.c: Add commentary explaining how to write
    +	functions in this file.
    +	(module_make_global_ref, module_free_global_ref)
    +	(module_non_local_exit_signal, module_non_local_exit_throw)
    +	(module_make_function, module_funcall, module_intern)
    +	(module_type_of, module_is_not_nil, module_eq)
    +	(module_extract_integer, module_make_integer)
    +	(module_extract_float, module_make_float)
    +	(module_copy_string_contents, module_make_string)
    +	(module_make_user_ptr, module_get_user_ptr, module_set_user_ptr)
    +	(module_get_user_finalizer, module_set_user_finalizer)
    +	(module_vec_set, module_vec_get, module_vec_size)
    +	(module_non_local_exit_signal_1, module_non_local_exit_throw_1):
    +	Do nothing and return with failure indication immediately, if some
    +	previous module call signaled an error or wants to throw.  See
    +	http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02133.html
    +	for the relevant discussions.
    +
    +2015-11-27  Eli Zaretskii  
    +
    +	Add ':version' tag to 'checkdoc-package-keywords-flag'
    +
    +	* lisp/emacs-lisp/checkdoc.el (checkdoc-package-keywords-flag):
    +	Add a ':version' tag.
    +
    +2015-11-27  Eli Zaretskii  
    +
    +	Improve documentation of 'eval-buffer' and 'eval-region'
    +
    +	* src/lread.c (Feval_buffer, Feval_region): Doc fixes.  (Bug#22023)
    +
    +	* doc/lispref/eval.texi (Eval): Mention narrowing to clarify
    +	"accessible portion of buffer".
    +
    +2015-11-27  Eli Zaretskii  
    +
    +	Unbreak the Cygwin w32 build
    +
    +	* src/emacs.c (main): Call w32_init_main_thread in the Cygwin w32
    +	build as well.  Reported by Andy Moreton .
    +
    +2015-11-27  Eli Zaretskii  
    +
    +	Improve commentary in character-fold.el
    +
    +	* lisp/character-fold.el (character-fold-to-regexp): Move detailed
    +	description from commit log message to comments.  (Bug#22019)
    +
    +2015-11-26  Alan Mackenzie  
    +
    +	Byte Compiler: generate code to adjust stack count after call to `signal'.
    +
    +	Corrects change from earlier today.
    +
    +	* lisp/emacs-lisp/bytecomp.el (byte-compile-setq): supply the current value of
    +	`byte-compile--for-effect' as argument to `byte-compile-form'.
    +
    +2015-11-26  Eli Zaretskii  
    +
    +	Improve commentary of prepare_to_modify_buffer_1
    +
    +	* src/insdel.c (prepare_to_modify_buffer_1): Mention in commentary
    +	that this function runs Lisp.  Suggested by Richard Stallman
    +	.
    +
    +2015-11-26  Phillip Lord  
    +
    +	Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25
    +
    +2015-11-26  Phillip Lord  
    +
    +	Fix regression after merge.
    +
    +	 * src/undo.c (prepare_record): Remove call to run_undoable_change.
    +
    +2015-11-26  Phillip Lord  
    +
    +	After delete, record point location in undo.
    +
    +	Addresses Bug #21968.
    +
    +		* lisp/simple.el (undo-auto--add-boundary): Clean up code to
    +		better support intercalating calls.
    +		* src/keyboard.c, src/keyboard.h (command_loop_1): Store value of
    +		point and current buffer before each command.
    +		* src/undo.c (record_point): Now only record the point.
    +		* src/undo.c (prepare_record): Functionality removed form
    +		record_point.
    +		* src/undo.c (record_delete): Check if point needs recording.
    +		* src/undo.c (undo-boundary): Record value of point before each
    +		boundary.
    +		* test/automated/simple-test.el: New tests.
    +
    +	Conflicts:
    +		src/undo.c
    +
    +2015-11-26  Eli Zaretskii  
    +
    +	Fix compiler warnings in w32.c
    +
    +	* src/w32.c (sys_socket): In case of error, use -1 as return
    +	value, not INVALID_SOCKET, which causes compiler warnings.
    +	(maybe_load_unicows_dll): Cast the return value of GetProcAddress
    +	to the appropriate function signature, to avoid compiler errors.
    +	Reported by Andy Moreton .  (Bug#21953)
    +
    +2015-11-26  Dmitry Gutov  
    +
    +	Check if the file exists on disk before producing the revert diff
    +
    +	* lisp/vc/vc-dispatcher.el (vc-buffer-sync): Check if the file
    +	exists on disk (bug#20558).
    +
    +2015-11-26  Alan Mackenzie  
    +
    +	Byte compiler: on setq with an odd number of arguments, generate a `signal'
    +
    +	* lisp/emacs-lisp/cconv.el (cconv-convert): Don't transform `setq' form when
    +	it has an odd number of arguments, to allow bytecomp to handle the error.
    +
    +	* lisp/emacs-lisp/bytecomp.el (byte-compile-setq): In a `setq' form with an
    +	odd number of arguments, generate a `signal' instead of the normal code.
    +
    +2015-11-25  Dmitry Gutov  
    +
    +	Use find-tag-default for xref-backend-identifier-at-point
    +
    +	* lisp/progmodes/etags.el (find-tag-tag)
    +	(tags-completion-at-point-function): Extract common code as
    +	find-tag--default.
    +	(xref-backend-identifier-at-point): Define in terms of the new
    +	function.
    +
    +2015-11-25  Paul Eggert  
    +
    +	* src/undo.c (record_property_change): Remove now-unused local.
    +
    +2015-11-25  Phillip Lord  
    +
    +	run_undoable_changes now called from insdel.
    +
    +	The original calls from inside undo.c are not always at a safe position
    +	to call lisp, as they originate in varied positions within insdel.c.
    +	Calling them directly from prepare_to_modify_buffer_1 ensures that they
    +	are always run at the same point.
    +
    +	 * src/undo.c (run_undoable_changes,syms_of_undo): Remove function
    +	 and symbol used.
    +	 * src/insdel.c (run_undoable_changes): Add function and symbol.
    +
    +2015-11-25  Eli Zaretskii  
     
    -2015-12-05  Glenn Morris  
    +	Improve and update documentation of search commands
     
    -	* lisp/net/net-utils.el: Small improvements.
    +	* doc/emacs/search.texi (Lax Search): Renamed from "Search Case";
    +	all references changed.  Move the description of lax-whitespace
    +	here.  Add description of the new character folding features and
    +	additional customizable options.
    +	(Isearch Yank): Move before "Error in Search".
    +	(Basic Isearch): Improve wording.  Add index entries.  Add short
    +	description of how to abandon search, making this subsection a
    +	complete introduction to search basics.
    +	(Repeat Isearch): Add index entries.  Describe additional
    +	customizable options.  Describe mouse clicks.
    +	(Isearch Yank): Add index entries.  Describe mouse-2 click in echo
    +	area.  Describe more customizable options.
    +	(Error in Isearch): Add index entries.
    +	(Special Isearch): Move actual description of some isearch
    +	commands to other sections, leaving here just the summary of the
    +	commands.  Add command that toggles character folding.  Describe
    +	commands, like "C-h C-h", that were previously omitted for some
    +	reason.
    +	(Not Exiting Isearch): Describe search-exit-option.  Add index
    +	entries.
    +	(Word Search): Describe eww-search-word and eww-search-prefix.
    +	(Symbol Search): Add index entries.
    +	(Regexp Search): Describe regexp-search-ring-max.
    +	(Replacement and Lax Matches): Renamed from "Replacement and
    +	Case"; all references changed.  Describe lax-whitespace matching
    +	in replace commands and related options.  Describe character
    +	folding in replace commands and related options.
    +	(Query Replace): Describe query-replace-from-to-separator and the
    +	new history features.  Add index entries for highlighted text.
    +	Describe query-replace-skip-read-only.  Describe more keys
    +	accepted by query-replace.
    +	(Other Repeating Search): More index entries for Occur.  Describe
    +	list-matching-lines-default-context-lines.
    +	(Search Customizations): New section, documents customizable
    +	options that were not documented until now.
    +	* doc/emacs/glossary.texi (Glossary): Add "Case Folding" and
    +	"Character Folding".
     
    -	(net-utils--executable-find-sbin): New function.
    -	(ifconfig-program): Check sbin directories.
    -	Fallback to "ip".  (Bug#22091)
    -	(ifconfig-program-options): Check the actual program in use.
    -	(arp-program): Check sbin directories.
    +	* etc/NEWS: Move search- and replace-related entries to a single
    +	parent section.
     
    -2015-12-04  (tiny change) Arash Esbati    (tiny change)
    +	* lisp/replace.el (query-replace-show-replacement): Doc fix.
    +	* lisp/isearch.el (search-nonincremental-instead)
    +	(isearch-hide-immediately): Doc fixes.
     
    -	Fix wrong-type-argument integer-or-marker-p nil error
    +2015-11-25  Katsumi Yamaoka  
     
    -	* lisp/textmodes/reftex-auc.el (reftex-what-index-tag):
    -	Fix (wrong-type-argument integer-or-marker-p nil) error (bug#22077).
    +	Remove nnml-retrieve-groups that is unnecessary and somewhat problematic
     
    -2015-12-04  Alan Mackenzie  
    +	* lisp/gnus/nnml.el (nnml-retrieve-groups): Remove.  See:
    +	 and
    +	
     
    -	Merge branch 'scratch/follow' of /home/acm/emacs/emacs.git/emacs-25 into scratch/follow
    +2015-11-25  Paul Eggert  
     
    -	Merge necessitated by a rebase operation.
    +	Fix module_format_fun_env when dynlib_addr fails
     
    -2015-12-04  Alan Mackenzie  
    +	* src/emacs-module.c (module_format_fun_env):
    +	exprintf doesn’t support %p, so use %x.  Reported by Eli Zaretskii in:
    +	http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02122.html
     
    -	lisp/isearch.el: Eliminate macro isearch-call-message, replacing with funcall.
    +2015-11-25  Paul Eggert  
     
    -2015-12-04  Alan Mackenzie  
    +	Disambiguate variable help a bit better
     
    -	First commit to scratch/follow.  Make Isearch work with Follow Mode, etc.
    +	* lisp/help-fns.el (describe-variable): Quote the
    +	variable’s value if it is a symbol other than t or nil.
    +	See: T.V Raman in:
    +	http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02147.html
     
    -	doc/lispref/window.texi (Basic Windows): Add paragraph defining "Group of
    -	Windows" and new @defun selected-window-group.
    -	(Window Start and End): Describe new &optional parameter GROUP and
    -	...-group-function for window-start, window-end, set-window-start, and
    -	pos-visible-in-window-p.
    -	(Textual Scrolling) Describe the same for recenter.
    -	doc/lispref/positions.texi (Screen Lines): Describe the same for
    -	move-to-window-line.
    +2015-11-24  Dmitry Gutov  
     
    -	src/window.c (Fwindow_start, Fwindow_end, Fset_window_start)
    -	(Fpos_visible_in_window_p, Frecenter, Fmove_to_window_line): To each, add ar
    -	new optional parameter "group".  At the beginning of each, check whether the
    -	corresponding ...-group-function is set to a function, and if so execute this
    -	function in place of the normal processing.
    -	(syms_of_window): Define symbols for the six new variables below.
    -	(window-start-group-function, window-end-group-function)
    -	(set-window-start-group-function, recenter-group-function)
    -	(pos-visible-in-window-p-group-function, move-to-window-line-group-function):
    -	New permanent local buffer local variables.
    -	src/keyboard.c (Fposn_at_point): Add extra parameter in call to
    -	Fpos_visible_in_window_p.
    +	Pass SVN commit message through log-edit-extract-headers
     
    -	lisp/window.el (selected-window-group-function): New permanent local buffer
    -	local variable.
    -	(selected-window-group): New function.
    +	* lisp/vc/vc-svn.el (vc-svn-checkin): Pass COMMENT through
    +	log-edit-extract-headers (bug#18954).
     
    -	lisp/follow.el (follow-mode): Set the ...-group-function variables at mode
    -	enable, kill them at mode disable.  Add/remove follow-after-change to/from
    -	after-change-functions.
    -	(follow-start-end-invalid): New variable.
    -	(follow-redisplay): Manipulate follow-start-end-invalid.
    -	(follow-after-change, follow-window-start, follow-window-end)
    -	(follow-set-window-start, follow-pos-visible-in-window-p)
    -	(follow-move-to-window-line, follow-sit-for): New functions.
    +2015-11-24  Alan Mackenzie  
     
    -	lisp/isearch.el (isearch-call-message): New macro.
    -	(isearch-update, with-isearch-suspended, isearch-del-char)
    -	(isearch-search-and-update, isearch-ring-adjust): Invoke above new macro.
    -	(with-isearch-suspended): Rearrange code such that isearch-call-message is
    -	invoked before point is moved.
    -	(isearch-message): Add comment about where point must be at function call.
    -	(isearch-search): Remove call to isearch-message.
    -	(isearch-lazy-highlight-window-group): New variable.
    -	(isearch-lazy-highlight-new-loop): Unconditionally start idle timer.  Move
    -	the battery of tests to ...
    -	(isearch-lazy-highlight-maybe-new-loop): New function, started by idle timer.
    -	Note: (sit-for 0) is still called.
    -	(isearch-lazy-highlight-update): Check membership of
    -	isearch-lazy-highlight-window-group.  Don't set the `window' overlay
    -	property.
    -	(isearch-update, isearch-done, isearch-string-out-of-window)
    -	(isearch-back-into-window, isearch-lazy-highlight-maybe-new-loop)
    -	(isearch-lazy-highlight-search, isearch-lazy-highlight-update)
    -	(isearch-lazy-highlight-update): Call the six amended primitives (see
    -	src/window.c above) with the new `group' argument set to t, to cooperate
    -	with Follow Mode.
    +	CC Mode: Eliminate compiler warning messages.
     
    -2015-12-04  Stefan Monnier  
    +	* lisp/progmodes/cc-mode.el (top level): remove compile time declaration of
    +	`font-lock-syntactic-keywords' (which CC Mode doesn't use).
    +	* lisp/progmodes/cc-awk.el (awk-mode-syntax-table)
    +	(c-awk-set-syntax-table-properties): Clarify comments about
    +	`font-lock-syntactic-keywords'.
     
    -	* lisp/emacs-lisp/ert.el: Prefer pcase over cl-typecase
    +	* lisp/progmodes/cc-bytecomp.el (cc-bytecomp-load): Create a dummy declaration
    +	of this before the real (interpreted) one, to satisfy the byte compiler.
     
    -	* lisp/emacs-lisp/ert.el (ert--should-error-handle-error)
    -	(ert--explain-format-atom, ert--explain-equal-rec)
    -	(ert--print-backtrace, ert-test-result-type-p, ert-select-tests)
    -	(ert--insert-human-readable-selector): Prefer pcase over cl-typecase.
    +2015-11-24  Simen Heggestøyl  
     
    -2015-12-04  Artur Malabarba  
    +	Extend the test suite for json.el
     
    -	* lisp/character-fold.el: Remove special case-folding support
    +	* lisp/json.el (json-plist-p): Clarify docstring.
     
    -	(character-fold-to-regexp): Remove special code for
    -	case-folding.  Char-fold search still respects the
    -	`case-fold-search' variable (i.e., f matches F).  This only
    -	removes the code that was added to ensure that f also matched
    -	all chars that F matched.  For instance, after this commit, f
    -	no longer matches 𝔽.
    +	* test/automated/json-tests.el (json-tests--with-temp-buffer): New
    +	macro.
    +	(test-json-join, test-json-alist-p)
    +	(test-json-plist-p, test-json-advance, test-json-peek)
    +	(test-json-pop, test-json-skip-whitespace)
    +	(test-json-read-keyword, test-json-encode-keyword)
    +	(test-json-read-number, test-json-encode-number)
    +	(test-json-read-escaped-char, test-json-read-string)
    +	(test-json-encode-string, test-json-encode-key)
    +	(test-json-new-object, test-json-add-to-object)
    +	(test-json-read-object, test-json-encode-list)
    +	(test-json-read-array, test-json-encode-array)
    +	(test-json-read, test-json-read-from-string)
    +	(test-json-encode): New tests.
    +	(json-read-simple-alist): Merged into `test-json-read-object'.
    +	(json-encode-string-with-special-chars): Merged into
    +	`test-json-encode-string'.
    +	(json-read-string-with-special-chars): Split into
    +	`test-json-encode-string' and `test-json-read-from-string'.
     
    -	This was necessary because the logic created a regexp with
    -	2^(length of the string) redundant paths.  So, when a very
    -	long string "almost" matched, Emacs took a very long time to
    -	figure out that it didn't.  This became particularly relevant
    -	because isearch's lazy-highlight does a search bounded by (1-
    -	match-end) (which, in most circumstances, is a search that
    -	almost matches).  A recipe for this can be found in bug#22090.
    +2015-11-24  Anders Lindgren  
     
    -2015-12-04  Stefan Monnier  
    +	Fixed bug#18283: Enable applescript in NextStep.
     
    -	* lisp/emacs-lisp/cl-macs.el (character): Can't be negative
    +	* nextstep/templates/Info.plist.in: Set NSAppleScriptEnabled to YES.
     
    -	Fixes (bug#21701)
    +2015-11-24  Eli Zaretskii  
     
    -2015-12-04  Daiki Ueno  
    +	Allow completion on dynamic module files in load-library
     
    -	lisp/gnus/qp.el: Don't replace "from " at bol
    +	* lisp/files.el (load-library): Bind completion-ignored-extensions
    +	to nil, to allow completion on dynamic modules typed as file
    +	names.  Reported by Andy Moreton .
     
    -	* lisp/gnus/qp.el (quoted-printable-encode-region): Bind `case-fold-search'
    -	to nil when looking for "^From ".  Problem reported by Simon Josefsson.
    +2015-11-24  Alan Mackenzie  
     
    -2015-12-03  Phillip Lord  
    +	CC Mode: eliminate almost all byte compilation warnings
     
    -	Externalize some symbols in undo-auto
    +	* lisp/progmodes/cc-bytecomp.el (cc-bytecomp-noruntime-functions): Remove.
    +	(cc-require): Remove the crude hack that saved and restored
    +	byte-compile-noruntime-functions.
    +	(cc-conditional-require, cc-conditional-require-after-load): New macros.
     
    -	 * doc/lispref/text.texi: Update symbols.
    -	 * lisp/simple.el (undo-auto--amalgamate,
    -	   undo-auto--current-boundary-timer): Make symbols public.
    -	 * src/cmds.c (Fself_insert_command,Fdelete_char): Call
    -	   updated symbol.
    +	* lisp/progmodes/cc-defs.el (top level): Reformulate code which loaded
    +	cc-fix.el using the new macros in cc-bytecomp.el.
     
    -2015-12-03  Stefan Monnier  
    +	* lisp/progmodes/cc-langs.el (c++-template-syntax-table)
    +	(c-no-parens-syntax-table): Add extra "(eval ..)"s around "'(lambda ..)"
    +	forms to remove the superflous quotes.
     
    -	* lisp/emacs-lisp/smie.el (smie-next-sexp): Fix BOB "token"
    +2015-11-24  Eli Zaretskii  
    +
    +	Add one more mod-test test
    +
    +	* modules/mod-test/test.el (mod-test-sum-test): Test the error
    +	signaled when the function is invoked with a wrong number of
    +	arguments.
    +
    +2015-11-24  Philipp Stephani  
    +
    +	* modules/mod-test/mod-test.c (Fmod_test_sum): Verify there are 2 args.
    +
    +2015-11-24  Eli Zaretskii  
    +
    +	Implement dynlib_addr for MS-Windows
    +
    +	* src/dynlib.c [WINDOWSNT]: Include w32common.h.
    +	 [WINDOWSNT]: New static variable.
    +	(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS)
    +	(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT) [WINDOWSNT]: Define
    +	if undefined.
    +	(dynlib_reset_last_error): Reset g_b_init_get_module_handle_ex to
    +	zero.
    +	(dynlib_addr) [WINDOWSNT]: Non-trivial implementation to report
    +	the full file name of the module for a given address.
    +
    +2015-11-24  Alan Mackenzie  
    +
    +	Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25
    +
    +2015-11-24  Alan Mackenzie  
    +
    +	Squashed commit of the following:
    +
    +	commit e1ecf76585bef2eb87995f7a7f92cc12003a6f70
    +	Author: Alan Mackenzie 
    +	Date:   Tue Nov 24 16:50:09 2015 +0000
     
    -2015-12-03  Michael Albinus  
    +	    Byte compile: minor amendments.
     
    -	Some error message improvements in tramp-sh.el
    +	    * lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
    +	    add a comment to explain the binding of variables around a subsidiary
    +	    compilation.
    +	    (byte-compile-new-defuns): Amend the doc string.
     
    -	* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
    -	Suppress error messages for "mesg" and "biff" calls.
    -	(tramp-get-remote-path): Ignore errors when expanding
    -	`tramp-own-remote-path'.  Raise a warning instead.
    +	commit c537bfed1dda1593d218956ff00c6105a3ff0316
    +	Author: Alan Mackenzie 
    +	Date:   Sat Nov 21 18:43:57 2015 +0000
     
    -2015-12-03  Eli Zaretskii  
    +	    Byte compiler: fix spurious warnings "might not be defined at runtime".
     
    -	Document 'nacl' value for 'system-type'
    +	    Also initialize byte-compile-noruntime-functions between runs.
     
    -	* doc/lispref/os.texi (System Environment): Document the 'nacl'
    -	value of 'system-type'.
    +	    * lisp/emacs-lisp/bytecomp.el (byte-compile-new-defuns): New variable.
    +	    (byte-compile-initial-macro-environment): For eval-when-compile: bind
    +	    byte-compile-unresolved-functions and byte-compile-new-defuns around
    +	    byte-compile-top-level, to prevent spurious entries being made.
    +	    (byte-compile-warn-about-unresolved-functions): Check whether function is
    +	    in byte-compile-new-defuns before emitting a warning about it.
    +	    (byte-compile-from-buffer): Initialize new variable and
    +	    byte-compile-noruntime-functions to nil.
    +	    (byte-compile-file-form-require): record all new functions defined by a
    +	    `require' in byte-compile-new-defuns.
    +	    (byte-compile-file-form-defmumble): record the new alias in
    +	    byte-compile-new-defuns.
     
    -2015-12-03  Eli Zaretskii  
    +2015-11-24  Eli Zaretskii  
     
    -	Document 'window-max-chars-per-line'
    +	Fix crash at startup related to GC of font entities
     
    -	* doc/lispref/windows.texi (Window Sizes): Document
    -	'window-max-chars-per-line'.
    +	* src/font.h (GC_FONT_SPEC_P, GC_FONT_ENTITY_P)
    +	(GC_FONT_OBJECT_P, GC_XFONT_SPEC, GC_XFONT_ENTITY)
    +	(GC_XFONT_OBJECT): New macros, for use in garbage collector.
    +	* src/alloc.c (compact_font_cache_entry, compact_font_caches):
    +	Don't ifdef away font cache compaction on NT_GUI, as the problems
    +	which led to that seem to have been solved.
    +	(compact_font_cache_entry): Use GC_FONT_SPEC_P, GC_XFONT_SPEC,
    +	GC_XFONT_ENTITY, and GC_XFONT_OBJECT, instead of their non-GC_
    +	cousins.  (Bug#21999)
     
    -2015-12-03  Artur Malabarba  
    +2015-11-24  Alan Mackenzie  
     
    -	Fix some file headers for the purpose of `package--builtins'
    +	Byte compile: Output an error, not a warning, for odd number of args to setq
     
    -	* lisp/emacs-lisp/cl-preloaded.el
    -	* lisp/emacs-lisp/eieio-compat.el
    -	* lisp/net/sasl-scram-rfc.el: Add a "Package:" header
    +	* lisp/emacs-lisp/bytecomp.el (byte-compile-setq): Amend.
     
    -	* lisp/ielm.el: Fix summary line.
    +2015-11-24  Ken Raeburn  
     
    -2015-12-03  Artur Malabarba  
    +	Fix kbd_buffer iteration loop in readable_events
     
    -	* lisp/emacs-lisp/package.el (package-unpack): Load before compiling
    +	* src/keyboard.c (readable_events): Wrap the event pointer back to the
    +	start of the kbd_buffer array inside the top of the loop instead of
    +	right before checking the loop condition, since kbd_fetch_ptr and
    +	kbd_store_ptr point past the end of the array to mean that element 0
    +	is next. (bug#21935)
     
    -	Reload any previously loaded package files before compiling
    -	the package (also reload the same files after compiling).
    -	This ensures that we have the most recent definitions during
    -	compilation, and avoids generating bad elc files when a macro
    -	changes and it is used in a different file from the one it's
    -	defined in.
    +2015-11-24  Paul Eggert  
     
    -2015-12-03  Artur Malabarba  
    +	Improve text-quoting-style doc again
     
    -	* lisp/emacs-lisp/package.el: Refactor package activation code
    +	* doc/lispref/help.texi (Keys in Documentation):
    +	Omit overkill discussion of ‘setq’.  Mention Emacs versions
    +	where ‘grave’ style was standard.
     
    -	(package-activate): Move code that activates dependencies into
    -	package-activate-1.
    -	(package--load-files-for-activation): New function.
    -	(package-activate-1): Add code for (optionally) activating
    -	dependencies, and move file-loading code into
    -	`package--load-files-for-activation'.
    +2015-11-23  Paul Eggert  
     
    -2015-12-03  Eli Zaretskii  
    +	Improve text-quoting-style doc
     
    -	Document new font-related functionality
    +2015-11-23  Paul Eggert  
     
    -	* doc/lispref/display.texi (Low-Level Font): Document
    -	'default-font-width', 'default-font-height', 'window-font-width',
    -	and 'window-font-height'.
    +	Simplify module_make_function
     
    -	* etc/NEWS: Move entries for 'default-font-width',
    -	'default-font-height', 'window-font-width', and 'window-font-height'
    -	to their place and mark them documented.
    +	* src/emacs-module.c (module_make_function):
    +	Simplify by calling build_unibyte_string.
     
    -2015-12-03  Eli Zaretskii  
    +2015-11-23  Paul Eggert  
     
    -	Fix documentation and implementation of 'directory-name-p'
    +	Port better to FreeBSD’s dlfunc vs dlsym
     
    -	* lisp/files.el (directory-name-p): Modify to recognize
    -	backslashes on MS-Windows and MS-DOS.  Adjust the doc string
    -	accordingly.  Use '=', not char-equal, for comparison, as
    -	letter-case cannot possibly be an issue here.
    +	This avoids warnings when converting between void * and
    +	function pointers, which strict C11 does not allow.
    +	* configure.ac (dlfunc): Check for existence.
    +	* src/dynlib.c (dlfunc) [!HAVE_DLFUNC]: New macro.
    +	(dynlib_func): New function.
    +	* src/dynlib.h (dynlib_function_ptr, dynlib_func): New decls.
    +	* src/emacs-module.c (Fmodule_load): Use dynlib_func, not
    +	dynlib_sym, for function pointers.
     
    -	* doc/lispref/files.texi (Directory Names): Move the documentation
    -	of directory-name-p here from "Relative File Names".  Update the
    -	description per the changes in implementation.
    +2015-11-23  Paul Eggert  
     
    -	* etc/NEWS: Move the entry for 'directory-name-p' to its proper
    -	place and mark it documented.
    +	Simplify use of emacs_finalizer_function type
     
    -2015-12-02  Eli Zaretskii  
    +	* src/emacs-module.h (emacs_finalizer_function):
    +	Now EMACS_NOEXCEPT.  All users simplified to omit EMACS_NOEXCEPT.
    +	(struct emacs_env_25): Use emacs_finalizer_function where applicable.
     
    -	Minor copyedit in Emacs manual
    +2015-11-23  Paul Eggert  
     
    -	* doc/emacs/search.texi (Lax Search): Make wording about character
    -	folding by default less definitive.  (Bug#22043)
    +	module_format_fun_env fixes
     
    -2015-12-02  Eli Zaretskii  
    +	* src/doprnt.c (exprintf) [HAVE_MODULES]: Also define in this case.
    +	* src/emacs-module.c (module_format_fun_env):
    +	Convert path and sym to UTF-8.
    +	Don’t use VLAs, as the C11 standard says they’re optional,
    +	and anyway they can cause core dumps with large allocations.
    +	Use exprintf rather than snprintf, as exprintf handles arbitrarily
    +	long strings.  Simplify the code a bit.
     
    -	More emacs-module.c fixes for wide ints
    +2015-11-23  Dmitry Gutov  
     
    -	* src/emacs-module.c (value_to_lisp) [WIDE_EMACS_INT]: Use
    -	unsigned data types to manipulate pointers, to avoid sign
    -	extension coming after us with a vengeance.
    +	Don't use package-user-dir in elisp-library-roots if it's not bound
     
    -	* modules/mod-test/test.el (mod-test-sum-test): Add tests for
    -	Emacs with wide ints that verify integer values near the critical
    -	value that requires us to switch to a cons cell.
    +	* lisp/progmodes/elisp-mode.el (elisp-library-roots): Don't
    +	use package-user-dir if it's not bound (bug#19759).
     
    -2015-12-02  Stephen Leake  
    +2015-11-23  Anders Lindgren  
     
    -	Fix bug#22069 in cl-generic.el
    +	New visible-bell for NextStep (OS X El Capitan compatible).
     
    -	* lisp/emacs-lisp/cl-generic.el (cl-no-method): Remove %S; this string is
    -	not run thru `format'.
    +	Instead of inverting a rectangle in the middle of the frame, use
    +	the standard NextStep image "caution", represented using an
    +	warning sign with an exclamation mark.  (Bug#21662)
     
    -2015-12-02  Dmitry Gutov  
    +	Implemented based on a suggestion drafted by Mustafa Kocaturk.
     
    -	APPEND etags--xref-backend to xref-backend-functions
    +	* src/nsterm.m (EmacsBell): New class for managing the caution
    +	image.  Support multiple active bells, the image is removed once
    +	all bells have timed out.
    +	(ns_timeout): Removed, no longer used.
    +	(ns_ring_bell): Reimplemented to use EmacsBell.
     
    -	* lisp/progmodes/xref.el (xref-backend-functions):
    -	Use APPEND when adding the default element
    -	(http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00061.html).
    +2015-11-23  Johan Bockgård  
     
    -2015-12-01  Eli Zaretskii  
    +	* lisp/emacs-lisp/nadvice.el (add-function): Fix debug spec.
     
    -	More accurate documentation of lax whitespace matching
    +	(remove-function): Ditto. (Bug#20376)
     
    -	* lisp/isearch.el (isearch-forward-word, isearch-forward-symbol)
    -	(word-search-backward, word-search-forward)
    -	(word-search-backward-lax, word-search-forward-lax): Mention in
    -	doc strings that toggling lax whitespace matching has no effect on
    -	these commands.
    +2015-11-23  Mark Oteiza  
     
    -	* doc/emacs/search.texi (Word Search, Symbol Search): Clarify that
    -	lax whitespace matching has no effect on these commands.
    +	* lisp/leim/quail/tamil-dvorak.el: Add necessary escapes.
     
    -2015-12-01  Eli Zaretskii  
    +2015-11-23  Eli Zaretskii  
     
    -	Fix emacs-module.c for wide ints
    +	Improve how non-ASCII strings are accepted from modules
     
    -	* src/emacs-module.c (lisp_to_value): Compare the produced value
    -	with the original Lisp object, not with the one potentially
    -	converted into a Lisp_Cons.  Fixes assertion violations when
    -	working with integers larger than fit into a 32-bit value.
    +	* src/emacs-module.c (module_make_function, module_make_string):
    +	Build a unibyte Lisp string and then decode it by UTF-8, instead
    +	of building a multibyte string without decoding.  This is more
    +	tolerant to deviations from UTF-8.
     
    -	* modules/mod-test/test.el (mod-test-sum-test): Add tests for
    -	large integers, to test --with-wide-int.
    +2015-11-23  Paul Eggert  
     
    -2015-12-01  Eli Zaretskii  
    +	Port recent module changes to pickier compilers
     
    -	Document 'directory-files-recursively'
    +	* src/emacs-module.c (module_make_function)
    +	(module_make_string): Add casts to fix pointer signedness issues.
     
    -	* lisp/files.el (directory-files-recursively): Doc fix.  Rename
    -	the argument MATCH to REGEXP, to be more explicit about its form.
    +2015-11-23  Philipp Stephani  
     
    -	* doc/lispref/files.texi (Contents of Directories): Improve the
    -	documentation of 'directory-files-recursively'.  Add
    -	cross-references.
    +	Fix how strings are accepted from modules
     
    -	* etc/NEWS: Move the entry for 'directory-files-recursively' to
    -	its place and mark it documented.
    +	* emacs-module.c (module_make_function, module_make_string): Use
    +	make_multibyte_string.
    +	(module_copy_string_contents): Encode before reading the byte
    +	size.  Return false if and only if an error occurred.
     
    -2015-12-01  Eli Zaretskii  
    +2015-11-23  Eli Zaretskii  
     
    -	Document 'inhibit-read-only' property
    +	Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25
     
    -	* doc/lispref/text.texi (Special Properties): Describe the new
    -	'inhibit-read-only' text property.  Add cross-reference to where
    -	read-only buffers are described.
    -	* doc/lispref/buffers.texi (Read Only Buffers): Mention that
    -	'inhibit-read-only' property exempts text from being read-only.
    -	Add cross-reference to "Special Properties".
    +2015-11-23  Shakthi Kannan  
     
    -	* etc/NEWS: Move the entry about 'inhibit-read-only' property to
    -	its place and mark it documented.
    +	Add the tamil-dvorak input method
     
    -2015-12-01  Artur Malabarba  
    +	* lisp/leim/quail/tamil-dvorak.el: New file.  (Bug#21768)
     
    -	* lisp/emacs-lisp/package.el: Update header comments
    +	* etc/NEWS: Mention the new input method.
     
    -2015-12-01  Artur Malabarba  
    +2015-11-23  Martin Rudalics  
     
    -	* lisp/character-fold.el: Add back multi-char matching
    +	Move setting FRAME_WINDOW_SIZES_CHANGED to resize_frame_windows.
     
    -	(character-fold-to-regexp): Uncomment recently commented code
    -	and make the algorithm "dummer" by not checking every possible
    -	combination.  This will miss some possible matches, but it
    -	greatly reduces regexp size.
    +	* src/frame.c (adjust_frame_size): Don't set
    +	FRAME_WINDOW_SIZES_CHANGED here ...
    +	* src/window.c (resize_frame_windows): ... but here, as suggested
    +	by Stefan Monnier.  Also remove some dead code along the way.
     
    -	* test/automated/character-fold-tests.el
    -	(character-fold--test-fold-to-regexp): Comment out test of
    -	functionality no longer supported.
    +2015-11-23  Alan Mackenzie  
     
    -2015-12-01  Xue Fuqiao  
    +	* /etc/NEWS (Incompatible Lisp Changes): Also `setf' needs an even # of args.
     
    -	* doc/emacs/ack.texi (Acknowledgments): Update.
    +2015-11-23  Alan Mackenzie  
     
    -2015-12-01  Michael Albinus  
    +	Signal an error when `setf' gets an odd number of arguments.
     
    -	Check `file-remote-p' over absolute files names in files.el
    +	* lisp/emacs-lisp/gv.el (setf): Amend.
     
    -	* lisp/files.el (directory-files-recursively)
    -	(get-free-disk-space): Check `file-remote-p' over absolute files names.
    +2015-11-23  Stefan Monnier  
     
    -2015-12-01  Andreas Schwab  
    +	* lisp/emacs-lisp/smie.el (smie-backward-sexp): Handle BOB better.
     
    -		* src/lread.c (syms_of_lread): Doc fix.
    +2015-11-23  Alan Mackenzie  
     
    -2015-12-01  Dmitry Gutov  
    +	* etc/NEWS (Incompatible Lisp Changes): Document new restriction on `setq'.
     
    -	Don't mistake certain JS method calls for keywords
    +2015-11-23  Alan Mackenzie  
     
    -	* lisp/progmodes/js.el (js--ctrl-statement-indentation):
    -	Braceless keyword can't come after a period (bug#22063).
    +	Expunge occurrences of `setq' with an odd number of arguments.
     
    -2015-12-01  David Reitter  
    +	* lisp/apropos.el (apropos-documentation):
    +	* lisp/obsolete/complete.el (PC-include-file-all-completions):
    +	* lisp/progmodes/compile.el (compilation-goto-locus):
    +	* lisp/vc/vc-cvs.el (vc-cvs-parse-root): (twice)
    +	Insert missing nil at end of `setq' forms.
     
    -	Read frame_title_format from buffer-local variable for NS port
    +	* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-autoload): Remove an
    +	erroneous trailing variable name from a setq, thus allowing a compilation
    +	properly to track functions not defined at runtime.
     
    -	* src/nsfns.m (x_implicitly_set_name): Read frame-title-format and
    -	icon-title-format variables from buffer in appropriate window.
    -	(Bug#22048)
    +2015-11-23  John Wiegley  
     
    -2015-12-01  Juri Linkov  
    +	Add a note about a questionable use of bool in xdisp.c
     
    -	* lisp/replace.el (occur-engine): Count matches in empty lines.
    +2015-11-23  Alan Mackenzie  
     
    -	(Bug#22062)
    +	Issue a warning from the byte compiler on a malformed `setq' form.
     
    -2015-11-30  Aurélien Aptel  
    +	Partly fixes bug#20241.
    +	* lisp/emacs-lisp/bytecomp.el (byte-compile-setq): Issue a warning when a
    +	`setq' form with an odd number of arguments is compiled.
     
    -	* src/emacs-module.h: Fix finalizer typedef for C++11
    +2015-11-23  Alan Mackenzie  
     
    -	C++11 standard doesn't allow exception-specification in typedef.
    -	The workaround is to declare a dummy function prototype and use
    -	decltype on it.
    +	Don't let cconv_convert insert a nil argument into a `setq' form.
     
    -2015-11-30  Eli Zaretskii  
    +	Fixes bug#21983.
    +	* lisp/emacs-lisp/cconv.el (cconv-convert): Don't silently insert a nil last
    +	argument into a `setq' when there're an odd number of args.  This enables the
    +	byte compiler to issue a message in this case.
     
    -	Fix last change
    +2015-11-23  Alan Mackenzie  
     
    -	* src/emacs-module.c (lisp_to_value, value_to_lisp)
    -	[WIDE_EMACS_INT]: Avoid compiler warnings.
    +	Signal an error when `setq' has an odd number of arguments.  Fixes bug#20241.
     
    -2015-11-30  Stefan Monnier  
    +	* src/eval.c (Fsetq): Signal an error on an odd number of arguments.
    +	(syms_of_eval): Add a DEFSYM for Qsetq.
     
    -	Rely on conservative stack scanning to find "emacs_value"s
    +2015-11-23  Martin Rudalics  
     
    -	* src/emacs-module.c (struct emacs_value_tag)
    -	(struct emacs_value_frame, struct emacs_value_storage): Remove.
    -	(value_frame_size): Remove constant.
    -	(struct emacs_env_private): Use Lisp_Object for non_local_exit info.
    -	(lisp_to_value): Remove first arg.
    -	(module_nil): New constant.
    -	Use it instead of NULL when returning an emacs_value.
    -	(module_make_function): Adjust to new calling convention of
    -	Qinternal_module_call.
    -	(DEFUN): Receive args in an array rather than a list.
    -	Use SAFE_ALLOCA rather than xnmalloc.  Skip the lisp_to_value loop when
    -	we don't have WIDE_EMACS_INT.  Adjust to new type of non_local_exit info.
    -	(module_non_local_exit_signal_1, module_non_local_exit_throw_1):
    -	Adjust to new type of non_local_exit info.
    -	(ltv_mark) [WIDE_EMACS_INT]: New constant.
    -	(value_to_lisp, lisp_to_value): Rewrite.
    -	(initialize_frame, initialize_storage, finalize_storage): Remove functions.
    -	(allocate_emacs_value): Remove function.
    -	(mark_modules): Gut it.
    -	(initialize_environment): Don't initialize storage any more.
    -	Keep the actual env object on Vmodule_environments.
    -	(finalize_environment): Don't finalize storage any more.
    -	(syms_of_module): Initialize ltv_mark and module_nil.
    +	* doc/lispref/windows.texi (Window Sizes): Fix indices and references.
     
    -	* src/emacs-module.h (emacs_value): Make it more clear that this type
    -	is really opaque, including the fact that NULL may not be valid.
    +	* src/frame.c (adjust_frame_size): Set FRAME_WINDOW_SIZES_CHANGED (Bug#21975).
     
    -	* modules/mod-test/mod-test.c (Fmod_test_signal, Fmod_test_throw):
    -	Don't assume that NULL is a valid emacs_value.
    +2015-11-22  Thomas Fitzsimmons  
     
    -2015-11-30  Eli Zaretskii  
    +	Add EUDC BBDB 3 entry in NEWS
     
    -	Yet another doc improvement for search commands
    +	* NEWS: Mention EUDC BBDB backend support for BBDB 3.
     
    -	* doc/emacs/search.texi (Word Search, Symbol Search)
    -	(Regexp Search): Document commands that don't support lax
    -	whitespace matching or character folding.
    -	(Nonincremental Search): Mention the search commands that can be
    -	invoked from the menu bar.
    +2015-11-22  Thomas Fitzsimmons  
     
    -	* lisp/isearch.el (isearch-define-mode-toggle-word)
    -	(isearch-define-mode-toggle-symbol)
    -	(isearch-define-mode-toggle-character-fold): Note in the doc
    -	string that turning these on exits the regexp mode.
    -	(isearch-forward-regexp, isearch-forward-word)
    -	(isearch-forward-symbol, isearch-backward-regexp)
    -	(word-search-backward, word-search-forward)
    -	(word-search-backward-lax, word-search-forward-lax): State in the
    -	doc string which commands don't support character folding and/or
    -	lax-whitespace matching.
    +	Improve EUDC to BBDB 3 export
     
    -2015-11-30  Martin Rudalics  
    +	* eudc-vars.el (eudc-ldap-bbdb-conversion-alist): Change phone
    +	entry to single item.  Add company conversion.
    +	* eudc-export.el (eudc-bbdbify-company): New function.
    +	(bbdb-parse-phone): Declare function.
    +	(eudc-bbdbify-phone): Add BBDB 3 support.
    +	(Bug#21971)
     
    -	Run `window-size-change-functions' also when reading from minibuffer
    +2015-11-22  Thomas Fitzsimmons  
     
    -	* src/xdisp.c (redisplay_internal): Run `window-size-change-functions'
    -	also when reading from minibuffer.
    +	Add BBDB 3 support for EUDC export
     
    -2015-11-30  Ulf Jasper  
    +	* eudc.el: Add bbdb-version defvar.
    +	(eudc--using-bbdb-3-or-newer-p): New function.
    +	* eudc-export.el (eudc-create-bbdb-record): Add support for
    +	bbdb-create-internal argument list changes introduced in BBDB 3.
    +	* eudcb-bbdb.el: Remove bbdb-version defvar.
    +	(eudc-bbdb-field): Call eudc--using-bbdb-3-or-newer-p.
    +	(Bug#21971)
     
    -	Fix scrambling of html-rendered item buffers
    +2015-11-22  Eli Zaretskii  
     
    -	* lisp/net/newst-treeview.el (newsticker--treeview-render-text): Fix
    -	  scrambling of contents by wrapping call to html-renderer in
    -	  save-selected-window.
    +	Allow loading modules by 'load-file'
     
    -2015-11-30  Paul Eggert  
    +	* src/lread.c (Fload): Call 'unbind_to' with 'Fmodule_load' as the
    +	2nd arg, to avoid the "binding stack not balanced" error.
    +	(syms_of_lread) : New Lisp variable.
     
    -	Fix font typo in previous doc fix.
    +	* lisp/files.el (module-file-suffix): Declare.
    +	(load-file): Remove 'module-file-suffix' from
    +	'completion-ignored-extensions', to allow completion on modules.
     
    -2015-11-30  Paul Eggert  
    +	* etc/NEWS: Mention 'module-file-suffix'.
     
    -	A bit more security doc, esp. file local vars
    +2015-11-22  Eli Zaretskii  
     
    -	* doc/emacs/emacs.texi (Top):
    -	* doc/emacs/misc.texi (Miscellaneous Commands):
    -	Refer to new Host Security section.
    -	(Host Security): New section.
    -	* doc/lispref/os.texi (Security Considerations):
    -	Mention file local variables.
    +	Fix unoptimized builds
     
    -2015-11-30  Artur Malabarba  
    +	* src/lisp.h (XTYPE): Move before XSYMBOL, to fix unoptimized
    +	builds.
     
    -	* lisp/character-fold.el: Comment out branching code
    +2015-11-22  Dmitry Gutov  
     
    -	(character-fold-to-regexp): Comment out code that uses multi-char
    -	table.  The branching caused by this induces absurdly long regexps,
    -	up to 10k chars for as little as 25 input characters.
    +	Work around the asynchronous-empty-diff problem
     
    -2015-11-30  Paul Eggert  
    +	* lisp/vc/vc-rcs.el (vc-rcs-diff):
    +	* lisp/vc/vc-mtn.el (vc-mtn-diff):
    +	* lisp/vc/vc-hg.el (vc-hg-diff):
    +	* lisp/vc/vc-git.el (vc-git-diff): Ignore the ASYNC argument,
    +	do a synchronous process call (bug#21969).
     
    -	Spelling and grammar fixes
    +2015-11-21  Karl Fogel  
     
    -2015-11-30  Dmitry Gutov  
    +	Finish excising electric indent from `open-line'
     
    -	Make lisp-completion-at-point a wrapper instead of an alias
    +	* lisp/simple.el (open-line): Remove INTERACTIVE argument.
     
    -	* lisp/progmodes/elisp-mode.el (lisp-completion-at-point):
    -	Turn into an obsolete wrapper around elisp-completion-at-point
    -	(bug#20455).
    +	* test/automated/simple-test.el (open-line-indent, open-line-hook):
    +	  Adjust accordingly.
     
    -2015-11-29  Artur Malabarba  
    +	This change finishes what my commit of Thu Nov 19 17:32:37 2015 -0600
    +	(git commit c59353896) started.  It turns out that having INTERACTIVE
    +	cause `post-self-insert-hook' to run (via `newline') meant `open-line'
    +	still had the electric indent behavior, as `post-self-insert-hook'
    +	normally contains `electric-indent-post-self-insert-function' ever
    +	since `electric-indent-mode' has been on by default.  Tracing the code
    +	change in `open-line' is mildly twisty, because Artur Malabarba's
    +	earliest two commits of 24 Oct 2015 first removed the `interactive'
    +	form entirely (git commit 6939896e2) and then restored it with the new
    +	extra "p" already added (git commit bd4f04f86), such that there is no
    +	single-commit diff in which one sees the second "p" appear.  Thus this
    +	change is effectively a reversion of parts of each of those commits.
     
    -	* lisp/isearch.el (isearch-search-fun-default): Nicer error
    +	This could close bug#21884, at least until further discussion.
     
    -	message when the search fails.
    +2015-11-21  Dmitry Gutov  
     
    -2015-11-29  Dmitry Gutov  
    +	Adhere closer to the "implicit tag name" definition
     
    -	Update menu-bar-goto-uses-etags-p for the current xref API
    +	* lisp/progmodes/etags.el (etags-tags-completion-table):
    +	Adhere closer to the "implicit tag name" definition.  Simplify
    +	the regexp.  Search for the explicit tag name first, and when
    +	not found, search locally for the implicit one.  (Bug#21934)
     
    -	* lisp/menu-bar.el (menu-bar-goto-uses-etags-p): Consult
    -	xref-backend-functions, instead of now-nonexistent
    -	xref-find-function.
    +2015-11-21  Stefan Monnier  
     
    -2015-11-29  Artur Malabarba  
    +	Unrevert most of regexp reentrancy abort patch
     
    -	* lisp/isearch.el (isearch-define-mode-toggle): Advertise binding
    +	The problem was in:
    +	  * src/syntax.c (update_syntax_table_forward): Propertize even when truncated
    +	which is hence not unreverted.
    +	The rest is:
    +	* src/syntax.h (UPDATE_SYNTAX_TABLE_FORWARD_FAST):
    +	(UPDATE_SYNTAX_TABLE_FAST): Re-introduce.
    +	All callers in regex.c changed back to the _FAST versions.
     
    -2015-11-29  Artur Malabarba  
    +	* test/automated/message-mode-tests.el: Tweak the test to rely on auto
    +	propertization in backward-sexp.
     
    -	* lisp/menu-bar.el: Use folding in searches
    +2015-11-21  Paul Eggert  
     
    -	(nonincremental-search-forward): Use `isearch-search-fun-default'
    -	to determine the search function.
    -	(nonincremental-search-backward)
    -	(nonincremental-repeat-search-forward)
    -	(nonincremental-repeat-search-backward): Use it.
    +	Revert regexp reentrancy abort patch
     
    -2015-11-29  Artur Malabarba  
    +	Although the patch does fix Bug#21688 and prevents a core dump,
    +	it also makes the message-mode-propertize test fail; see:
    +	http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01667.html
    +	Perhaps someone else can come up with a better fix some day.
    +	* src/syntax.c (update_syntax_table_forward):
    +	Propertize even when truncated.
    +	* src/syntax.h (UPDATE_SYNTAX_TABLE_FORWARD_FAST):
    +	(UPDATE_SYNTAX_TABLE_FAST): Remove.
    +	All callers changed back to the non-_FAST versions.
     
    -	* lisp/menu-bar.el (menu-bar-goto-uses-etags-p): Fix a warning
    +2015-11-21  Paul Eggert  
     
    -2015-11-29  Artur Malabarba  
    +	Add a few safety checks when ENABLE_CHECKING
     
    -	* lisp/character-fold.el (character-fold-to-regexp): Be careful
    +	This was motivated by the recent addition of module code,
    +	which added some ENABLE_CHECKING-enabled checks that are
    +	useful elsewhere too.
    +	* src/alloc.c (compact_font_cache_entry):
    +	* src/fns.c (sweep_weak_table):
    +	* src/lread.c (oblookup):
    +	Use gc_asize rather than doing it by hand.
    +	* src/emacs-module.c (module_make_global_ref)
    +	(module_free_global_ref, module_vec_size):
    +	Omit assertions that lisp.h now checks.
    +	* src/lisp.h (XFASTINT, ASIZE): In functional implementations,
    +	check that the result is nonnegative.  Use eassume, as this
    +	info can help a bit when optimizing production code.
    +	(XSYMBOL) [!USE_LSB_TAG]: Assert that argument is a symbol,
    +	to be consistent with the USE_LSB_TAG case.
    +	(gc_asize): New function, when ASIZE is needed in the gc.
    +	(gc_aset): Use it.
    +	(HASH_TABLE_P): Move definition up, so that it can be used ...
    +	(XHASH_TABLE): ... here, to assert that the arg is a hash table.
     
    -	not to return huge regexps.
    +2015-11-21  Eli Zaretskii  
     
    -2015-11-29  Eli Zaretskii  
    +	Simplify recording of main thread's ID on MS-Windows
     
    -	Improve documentation of string-collate-* functions
    +	* src/w32term.c (w32_initialize):
    +	* src/w32console.c (initialize_w32_display):
    +	* src/w32fns.c (globals_of_w32fns): Don't record the main thread
    +	ID independently for each type of session (GUI, TTY, batch).
    +	* src/w32term.c (w32_init_main_thread): New function, records the
    +	main thread's thread ID.
    +	* src/w32term.h: Add prototype for w32_init_main_thread.
    +	* src/emacs.c (main) [WINDOWSNT]: Call w32_init_main_thread.
     
    -	* doc/lispref/strings.texi (Text Comparison): Improve wording and
    -	indexing of 'string-collate-equalp' and 'string-collate-lessp'.
    +	* src/emacs-module.c [WINDOWSNT]: Rename main_thread_id to
    +	main_thread, for consistency with other threading libraries.  All
    +	users changed.  Include w32term.h.
    +	(check_main_thread) [WINDOWSNT]: Simplify the test: no need to
    +	make sure the main thread is alive, as we hold a handle on it
    +	opened by w32_init_main_thread.
    +	(module_init) [WINDOWSNT]: Reuse the thread ID recorded by
    +	w32_init_main_thread, instead of calling the requisite APIs once
    +	more.
     
    -	* etc/NEWS: Move the entry of 'string-collate-equalp' and
    -	'string-collate-lessp' to "Lisp Changes" section and mark it as
    -	documented.
    +2015-11-21  Eli Zaretskii  
     
    -2015-11-29  Eli Zaretskii  
    +	Call 'window-size-change-functions' for mini-windows
     
    -	Document truncate-string-ellipsis
    +	* src/window.c (grow_mini_window, shrink_mini_window): Set the
    +	frame's 'window_sizes_changed' flag.
    +	* src/xdisp.c (redisplay_internal): Call the hooks on
    +	'window-size-change-functions' if the call to 'echo_area_display'
    +	sets the frame's 'window_sizes_changed' flag.
    +	(syms_of_xdisp) :
    +	Update doc string to indicate the mini-window resizes trigger a
    +	call to the hooks, and don't promise that will happen "before
    +	redisplay".  (Bug#19576, Bug#21333)
     
    -	* doc/lispref/display.texi (Size of Displayed Text): Document
    -	'truncate-string-ellipsis'.
    +	* doc/lispref/windows.texi (Window Hooks): Update the description
    +	of 'window-size-change-functions'.
     
    -	* lisp/international/mule-util.el (truncate-string-ellipsis): Doc fix.
    -	(truncate-string-to-width): Mention in the doc string that the
    -	default for ELLIPSIS comes from 'truncate-string-ellipsis'.
    +2015-11-21  Eli Zaretskii  
     
    -	* etc/NEWS: Move the 'truncate-string-ellipsis' entry to the "Lisp
    -	Changes" section.
    +	Improve documentation of dynamic modules
     
    -2015-11-29  Eli Zaretskii  
    +	* src/fns.c (Frequire): Doc fix to include the dynamic module
    +	support.
    +	* src/lread.c (Fload, Vload_suffixes): Doc fixes to include the
    +	dynamic module support.
    +	(Fload): Treat the module suffix the same as '*.el' and '*.elc'
    +	wrt the MUST-SUFFIX argument.
     
    -	Fix confusion wrt character folding in the Emacs manual
    +	* etc/NEWS: Expand documentation of dynamically loaded modules.
     
    -	* doc/emacs/search.texi (Nonincremental Search, Regexp Search):
    -	Document that invoking search-forward/backward and
    -	re-search-forward/backward supports only case folding, but not the
    -	rest of the lax-search features.  Reported by Mike Kupfer
    -	.
    +2015-11-21  Philipp Stephani    (tiny change)
     
    -2015-11-29  Ken Brown  
    +	Initial documentation for dynamic modules
     
    -	Update mod-test-sum-test
    +	* etc/NEWS: Mention the new support for dynamically loaded modules.
     
    -	* modules/mod-test/test.el (mod-test-sum-test): Update to
    -	accommodate the lack of dladdr on Cygwin.
    +2015-11-20  Dmitry Gutov  
     
    -2015-11-29  Alan Mackenzie  
    +	Add xref--etags-backend to xref-backing-functions using add-hook
     
    -	Byte compiler: Catch missing argument to `funcall'.  Fixes bug#22051.
    +	* lisp/progmodes/xref.el (xref-backend-functions): Move the
    +	default value into a separate `add-hook' call (bug#21964).
     
    -	* lisp/emacs-lisp/bytecomp.el (byte-compile-funcall): When there's no argument
    -	to `funcall', (i) Output an error message; (ii) Generate code to signal a
    -	`wrong-number-of-arguments' error.
    +	* lisp/progmodes/elisp-mode.el (emacs-lisp-mode):
    +	Don't declare the xref-backend-functions variable.
    +	It doesn't make any difference.
     
    -2015-11-29  Martin Rudalics  
    +2015-11-20  Paul Eggert  
     
    -	* lisp/window.el (split-window): Don't sanitize sizes when SIZE is non-nil.
    +	Fix double-decrement bug when freeing global refs
     
    -2015-11-28  Artur Malabarba  
    +	* src/emacs-module.c (module_free_global_ref): Add a FIXME
    +	comment about error reporting.  Fix a recently-introduced typo
    +	that double-decremented the refcount.
     
    -	* lisp/character-fold.el (character-fold-to-regexp)
    +2015-11-20  Paul Eggert  
     
    -	Warn about using long strings.
    +	Declare emacs_module_init in the module API
     
    -	* test/automated/character-fold-tests.el
    -	(character-fold--test-lax-whitespace)
    -	(character-fold--test-consistency): Reduce string size for tests.
    +	* src/emacs-module.h (emacs_module_init): New decl.
    +	Without it, GCC might complain about a module that defines
    +	emacs_module_init without using it.  This also checks the
    +	API better.
     
    -2015-11-28  Eli Zaretskii  
    +2015-11-20  Paul Eggert  
     
    -	Document renaming of x-select-enable-* variables
    +	Fix module test to use ptrdiff_t nargs too
     
    -	* doc/emacs/killing.texi (Clipboard): Rename
    -	x-select-enable-clipboard to select-enable-clipboard and
    -	x-select-enable-primary to select-enable-primary.  Update index
    -	entries.
    +	* modules/mod-test/mod-test.c (Fmod_test_return_t)
    +	(Fmod_test_sum, Fmod_test_signal, Fmod_test_throw)
    +	(Fmod_test_non_local_exit_funcall, Fmod_test_globref_make)
    +	(Fmod_test_string_a_to_b, Fmod_test_userptr_make)
    +	(Fmod_test_userptr_get, Fmod_test_vector_fill)
    +	(Fmod_test_vector_eq): Arg counts are ptrdiff_t, not int.
    +	(finalizer): Remove; no longer used.
     
    -	* etc/NEWS: Mark entry as documented.
    +2015-11-20  Paul Eggert  
     
    -2015-11-28  Eli Zaretskii  
    +	Fix reindent-introduced typo in module code
     
    -	Document the shorthand hints displayed by M-x
    +	* src/emacs-module.c (MODULE_SETJMP_1): Fix typo that I
    +	introduced while reindenting the code earlier, and add a
    +	comment explaining the unusual use of do-while here.
     
    -	* doc/emacs/m-x.texi (M-x): Document the numeric meaning of
    -	suggest-key-bindings.  Document the shorthand hints for commands
    -	that have no key bindings.  Document that M-x completion ignores
    -	obsolete commands.
    +2015-11-20  Anders Lindgren  
     
    -	* etc/NEWS: Move the M-x entry to "Editing Changes" and mark it as
    -	documented.
    +	Fixed bug#19576: `write-file' saves wrong buffer.
     
    -2015-11-28  Eli Zaretskii  
    +	If a function on the hook `window-size-change-functions' doesn't
    +	restore the current buffer, functions that save and restore the
    +	current window configuration (like `y-or-no-p') could silently
    +	change the current buffer.  When `write-file' asked the user
    +	confirmation to overwrite a file, `y-or-no-p' changed the current
    +	buffer, and the wrong buffer was saved to the file.
     
    -	Update docs of character folding
    +	* lisp/follow.el (follow-windows-start-end): Call `select-frame'
    +	using the `norecord' parameter.
    +	(follow-window-size-change): Restore current buffer. Call
    +	`select-frame' using the `norecord' parameter. Cleanup.
     
    -	* doc/emacs/search.texi (Lax Search): Update the description of
    -	character folding for the latest changes.
    +2015-11-20  John Wiegley  
     
    -2015-11-28  Artur Malabarba  
    +	Correct a documentation error in frames.texi
     
    -	* lisp/character-fold.el: Also play nice with case-folding
    +2015-11-20  Stephen Leake  
     
    -	(character-fold-to-regexp): Take `case-fold-search' into account.
    +	* lisp/cedet/mode-local.el: Delete obsolete comment
     
    -2015-11-28  Artur Malabarba  
    +2015-11-20  Paul Eggert  
     
    -	* lisp/character-fold.el: Add support for multi-char matches
    +	Module function arg counts are ptrdiff_t, not int
     
    -	(character-fold-table): Now has an extra-slot. This is a second
    -	char-table that holds multi-character matches.  See docstring for
    -	details.
    -	(character-fold-to-regexp): Can build branching regexps when a
    -	character's entry the extra slot of `character-fold-table' matches the
    -	characters that succeed it.
    +	* src/emacs-module.c (struct module_fun_env)
    +	(module_make_function, module_funcall, Fmodule_call):
    +	* src/emacs-module.h (struct emacs_runtime, struct emacs_env_25):
    +	Use ptrdiff_t, not int, for arg counts.
    +	* src/emacs-module.c (module_make_function): Don’t bother
    +	checking arity against MOST_POSITIVE_FIXNUM, as that’s
    +	unnecessary here.  Make the checking clearer by negating it.
    +	(module_make_function, Fmodule_call): No need to use xzalloc
    +	since the storage doesn’t need to be cleared.
    +	(module_funcall): Don’t use VLA, since C11 doesn’t guarantee support
    +	for it, and many implementations are buggy with large VLAs anyway.
    +	Use SAFE_ALLOCA_LISP instead.
    +	(module_vec_set): Don’t crash if i < 0.
    +	(module_vec_get): Don’t crash if i < MOST_NEGATIVE_FIXNUM.
    +	(module_vec_set, module_vec_get): Do fixnum checks only when
    +	i is out of array bounds, for efficiency in the usual case.
    +	(Fmodule_load): Simplify fixnum range check.
    +	(Fmodule_call): Simplify arity check.  Use xnmalloc to detect
    +	integer overflow in array allocation size.
     
    -2015-11-28  Artur Malabarba  
    +2015-11-20  Eli Zaretskii  
     
    -	* lisp/character-fold.el: Code simplifications
    +	Minor improvements in module test
     
    -	(character-fold-table): Reduce the scope of a variable.
    -	(character-fold-to-regexp): Change logic to work directly on the
    -	input string.  It's a little easier to understand, probably
    -	faster, and sets us up for implementing multi-char matches.
    +	* modules/mod-test/mod-test.c: Include stdlib.h, to avoid warnings
    +	about missing prototype of malloc.
    +	* modules/mod-test/Makefile (CFLAGS): Add -std=gnu99, to avoid
    +	compiler warnings.
     
    -	* test/automated/character-fold-tests.el
    -	(character-fold--test-fold-to-regexp): New test.
    +2015-11-20  Eli Zaretskii  
     
    -2015-11-28  Eli Zaretskii  
    +	Improve MS-Windows implementation in dynlib.c
     
    -	Document changes in "C-h l"
    +	* src/dynlib.c [WINDOWSNT]: Include errno.h, lisp.h, and w32.h.
    +	No need to include windows.h, as w32.h already does that.
    +	: New static variable.
    +	(dynlib_reset_last_error): New function.
    +	(dynlib_open): Convert forward slashes to backslashes.  Convert
    +	file names from UTF-8 to either UTF-16 or the current ANSI
    +	codepage, and call either LoadLibraryW or LoadLibraryA.  If the
    +	argument is NULL, return a handle to the main module, like
    +	'dlopen' does.  Record the error, if any, for use by dynlib_error.
    +	(dynlib_sym): Check the handle for validity. Record the error, if
    +	any, for use by dynlib_error.
    +	(dynlib_error): Call w32_strerror to produce the error string, and
    +	zero out the last error code, like dlerror does.
    +	(dynlib_close): Check the handle for validity.  Record the error,
    +	if any, for use by dynlib_error.  Don't call FreeLibrary with a
    +	handle for the main module.
    +	* src/w32.c (globals_of_w32): Call dynlib_reset_last_error.
     
    -	* doc/emacs/help.texi (Misc Help): Document the changes in "C-h l".
    +2015-11-20  Paul Eggert  
     
    -	* etc/NEWS: mark "C-h l" changes as documented.
    +	Include-file tweaks for modules
     
    -2015-11-28  Eli Zaretskii  
    +	* src/dynlib.c, src/emacs-module.c: Include  first.
    +	* src/dynlib.h: Do not include config.h.
    +	It’s every .c file’s responsibility to include config.h first.
    +	* src/emacs-module.c: Include emacs-module.h immediately after
    +	config.h, to test that emacs-module.h doesn’t depend on
    +	include files other than config.h.
     
    -	Finalize documentation of 'custom-prompt-customize-unsaved-options'
    +2015-11-19  Paul Eggert  
     
    -	* doc/emacs/custom.texi (Saving Customizations): Index the new
    -	function 'custom-prompt-customize-unsaved-options'.
    +	Simplify push_handler and profile its malloc
     
    -	* etc/NEWS: Mention when 'custom-prompt-customize-unsaved-options'
    -	is useful.
    +	* src/lisp.h (PUSH_HANDLER): Remove.
    +	All callers changed to use push_handler directly.
    +	* src/eval.c (internal_condition_case)
    +	(internal_condition_case_1, internal_condition_case_2)
    +	(internal_condition_case_n):
    +	Use same pattern as for other invokers of push_handler.
    +	(push_handler, push_handler_nosignal): Use call-by-value
    +	instead of call-by-reference.  All uses changed.
    +	(push_handler): Simplify by rewriting in terms of
    +	push_handler_nosignal.
    +	(push_handler_nosignal): Profile any newly allocated memory.
     
    -2015-11-28  Eli Zaretskii  
    +2015-11-19  Paul Eggert  
     
    -	Document 'comment-line'
    +	* src/emacs-module.h: Include stddef.h, not stdlib.h.
     
    -	* doc/emacs/programs.texi (Comment Commands): Document
    -	'comment-line'.
    +2015-11-19  Juanma Barranquero  
     
    -	* etc/NEWS: Move the entry for 'comment-line' into "Editing Changes".
    +	Discover repository version in linked worktrees (bug#21930)
     
    -2015-11-28  Eli Zaretskii  
    +	* lisp/version.el (emacs-repository--version-git-1): Do not assume
    +	HEAD is at .git/HEAD, it can also be at .git/worktrees//HEAD.
    +	(emacs-repository-get-version): Grok linked worktrees when EXTERNAL
    +	is nil too.
     
    -	Document new checkdoc features
    +2015-11-19  Juri Linkov  
     
    -	* doc/lispref/tips.texi (Tips, Library Headers): Document the
    -	keyword-checking features of checkdoc and the commands
    -	'checkdoc-file' and 'checkdoc-current-buffer'.
    +	* lisp/replace.el (occur-regexp-descr): New function.
    +	(occur-1, occur-engine): Use it.
     
    -	* etc/NEWS: Move the checkdoc-related entries to their own
    -	section.
    +	* lisp/isearch.el (isearch-occur): Propertize regexp with
    +	isearch-string and isearch-regexp-function-descr for
    +	occur-regexp-descr to display the correct description
    +	message in the header (bug#21176, bug#21180).
     
    -2015-11-28  Philipp Stephani  
    +2015-11-19  Karl Fogel  
     
    -	Simplify the prologue of emacs-module.c functions
    +	Revert `open-line' electric-indent sensitivity
     
    -	* src/emacs-module.c (MODULE_FUNCTION_BEGIN): New macro.
    -	(module_make_global_ref)
    -	(module_free_global_ref, module_make_function, module_funcall)
    -	(module_intern, module_type_of, module_extract_integer)
    -	(module_make_integer, module_extract_float, module_make_float)
    -	(module_copy_string_contents, module_make_string)
    -	(module_make_user_ptr, module_get_user_ptr, module_set_user_ptr)
    -	(module_get_user_finalizer, module_set_user_finalizer)
    -	(module_vec_set, module_vec_get, module_vec_size): Use new helper
    -	macro MODULE_FUNCTION_BEGIN.
    +	* lisp/simple.el (open-line): Remove electric indent code.
    +	  (electric-indent-just-newline): Don't declare.
     
    -2015-11-28  Eli Zaretskii  
    +	* test/automated/simple-test.el (open-line-indent): Adjust test.
     
    -	Don't reject module calls with no arguments
    +	This partly reverts Artur Malabarba's change that added electric
    +	indent sensitivity to `open-line' (Oct 24 22:26:27 2015 +0100, git
    +	commit bd4f04f86), and adjusts a new test he added right afterwards
    +	(Sat Oct 24 23:43:06 2015 +0100, git commit 207f235e3) accordingly.
    +	However, the new INTERACTIVE argument to `open-line', which he also
    +	added in the first commit, is not reverted here.
     
    -	* src/emacs-module.c (Finternal_module_call): Allow ARGLIST be nil.
    +	See the thread "Questioning the new behavior of `open-line'." on the
    +	Emacs Devel mailing list, and in particular this message:
     
    -2015-11-28  Philipp Stephani  
    +	  From: Artur Malabarba
    +	  Subject: Re: Questioning the new behavior of `open-line'.
    +	  To: Karl Fogel
    +	  Cc: David Kastrup, Pierpaolo Bernardi, emacs-devel
    +	  Date: Wed, 18 Nov 2015 21:03:58 +0000
    +	  Message-ID: \
    +	    
     
    -	Make module-call be visible from Lisp
    +	  https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01707.html
     
    -	* src/emacs-module.c (module_make_function): Use internal--module-call.
    -	(Finternal_module_call): Renamed from Fmodule_call.  Add safety
    -	checks.
    -	(syms_of_module): DEFSYM save-value-p and save-pointer-p.  Do
    -	defsubr internal--module-call.
    +2015-11-19  Paul Eggert  
     
    -2015-11-28  Eli Zaretskii  
    +	Omit unnecessary clear in Fmodule_load
     
    -	Add etags tests for the recent Lua-related bugfix
    +	* src/emacs-module.c (Fmodule_load):
    +	Simplify and avoid unnecessary initialization of priv member to 0.
     
    -	* test/etags/lua-src/test.lua: New file, tests the issues raised
    -	by bug#21934.
    -	* test/etags/Makefile (LUASRC): Add test.lua.
    -	* test/etags/ETAGS.good_1:
    -	* test/etags/ETAGS.good_2:
    -	* test/etags/ETAGS.good_3:
    -	* test/etags/ETAGS.good_4:
    -	* test/etags/ETAGS.good_5:
    -	* test/etags/ETAGS.good_6:
    -	* test/etags/CTAGS.good: Adapt to the new Lua test.  Also, an old
    -	regression fix, resolved around 25 May 2015, required changes to
    -	the "good" ETAGS files.
    +	* src/emacs-module.c: (module_vec_set, module_vec_get, module_vec_size)
     
    -2015-11-28  Eli Zaretskii  
    +2015-11-19  Paul Eggert  
     
    -	Fix Lua tags when a function name includes '.' or ':'
    +	Prefer signed integer types in module code
     
    -	* lib-src/etags.c (Lua_functions): Add a tag for the last element
    -	of a function name after a dot or a colon.  (Bug#21934)
    +	Generally speaking, at the C level the Emacs source code prefers
    +	signed types like ‘ptrdiff_t’ to unsigned types like ‘size_t’,
    +	partly to avoid the usual signedness confusion when comparing values.
    +	Change the module API to follow this convention.
    +	Use ‘int’ for small values that can’t exceed INT_MAX.
    +	* modules/mod-test/mod-test.c (Fmod_test_globref_make)
    +	(Fmod_test_string_a_to_b, Fmod_test_vector_fill)
    +	(Fmod_test_vector_eq):
    +	* src/emacs-module.c (struct emacs_value_frame)
    +	(module_make_global_ref, module_free_global_ref)
    +	(module_copy_string_contents, module_make_string)
    +	(module_vec_set, module_vec_get, module_vec_size):
    +	* src/emacs-module.h (struct emacs_runtime, struct emacs_env_25):
    +	* src/lread.c (suffix_p):
    +	Prefer signed to unsigned integer types.
     
    -2015-11-28  Eli Zaretskii  
    +2015-11-19  Paul Eggert  
     
    -	Improve documentation of search and replace commands
    +	Omit ‘const’ on locals
     
    -	* doc/emacs/search.texi (Replacement and Lax Matches): Document
    -	which commands are affected by 'replace-character-fold'.
    -	(Lax Search): Add a cross reference to "Replacement and Lax
    -	Matches".  Improve wording.  Fix lost extra whitespace.
    -	(Search Customizations): Improve wording.  (Bug#22036)
    -	See also comments in
    -	http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02376.html.
    +	Remove ‘const’ qualifier from locals that were newly added.
    +	We don’t normally bother declaring locals with ‘const’ even
    +	though they are not modified, for the same reason we don’t
    +	bother declaring them with ‘register’ even though their
    +	addresses are not taken; the advantage in compile-time
    +	checking isn’t worth the loss of readability.
    +	* modules/mod-test/mod-test.c (Fmod_test_non_local_exit_funcall)
    +	(Fmod_test_vector_fill, Fmod_test_vector_eq):
    +	* src/emacs-module.c (MODULE_SETJMP_1)
    +	(module_make_global_ref, module_free_global_ref)
    +	(module_non_local_exit_get, module_make_function)
    +	(module_extract_integer, module_extract_float)
    +	(module_get_user_ptr, module_set_user_ptr)
    +	(module_get_user_finalizer, module_set_user_finalizer)
    +	(module_vec_get, Fmodule_call)
    +	(module_non_local_exit_signal_1)
    +	(module_non_local_exit_throw_1, lisp_to_value)
    +	(finalize_storage, allocate_emacs_value, mark_modules)
    +	(module_handle_signal, module_handle_throw)
    +	(module_format_fun_env):
    +	* src/eval.c (push_handler, push_handler_nosignal)
    +	(init_handler):
    +	* src/lread.c (suffix_p):
    +	Omit unnecessary ‘const’.
     
    -	* lisp/replace.el (query-replace, query-replace-regexp)
    -	(query-replace-regexp-eval, replace-string, replace-regexp):
    -	Mention 'replace-character-fold' in the doc strings.
    +2015-11-19  Paul Eggert  
     
    -2015-11-28  Paul Eggert  
    +	Prefer intmax_t to int64_t in module code
     
    -	Fix minor problems found by static checking
    +	* modules/mod-test/mod-test.c (sum, Fmod_test_sum):
    +	* src/emacs-module.c (module_extract_integer)
    +	(module_make_integer):
    +	* src/emacs-module.h (struct emacs_env_25):
    +	Prefer intmax_t to int64_t.  This doesn’t change the generated
    +	code on any of the machines Emacs currently ports to, but it’s
    +	at least in theory more future-proof as C99 doesn’t guarantee
    +	that int64_t exists.
     
    -	* src/undo.c (prepare_record): Add proper prototype for C.
    +2015-11-19  Paul Eggert  
     
    -2015-11-27  Stefan Monnier  
    +	Rename module.c to emacs-module.c, etc.
     
    -	* src/emacs-module.c (struct env_storage): Delete
    +	* src/emacs-module.c: Rename from src/module.c.
    +	* src/emacs-module.h: Rename from src/module.h.
    +	All uses changed.
     
    -	(struct emacs_runtime_private): Keep an emacs_env instead.
    -	(Fmodule_load, Fmodule_call): Declare emacs_env_private separately.
    -	(initialize_environment): Split the arg in two.	 Adjust all callers.
    -	Only store the private part in Vmodule_environments.
    -	(finalize_environment): Change the arg to only be the private env.
    -	Adjust all callers.
    +2015-11-19  Paul Eggert  
     
    -2015-11-27  Eli Zaretskii  
    +	Fix minor module problems found by static checking
     
    -	Improve documentation of 'replace-character-fold'
    +	* src/dynlib.c (dynlib_close): #ifdef out for now, as it’s not used.
    +	* src/eval.c, src/lisp.h (lisp_eval_depth): Now static.
    +	* src/module.c (Fmodule_load): Fix pointer signedness bug.
    +	(Fmodule_call): Tell GCC that the default case is unreachable.
     
    -	* lisp/replace.el (replace-character-fold): Clarify which commands
    -	are affected by this variable.
    +2015-11-19  Paul Eggert  
     
    -2015-11-27  Mark Oteiza  
    +	Style fixes for indenting etc. in module code
     
    -	Backport: Add interactive seek command.
    +	This is mostly indenting and spacing changes.  Also, remove
    +	some unnecessary static decls instead of bothering to reindent them.
    +	* src/module.h (EMACS_EXTERN_C_BEGIN): Remove, and do this inline,
    +	as most other Emacs files do for this sort of thing.
     
    -	* lisp/mpc.el (mpc-cmd-seekcur): New function.
    -	(mpc-seek-current): New command.
    -	(mpc-mode-menu): Add entry for mpc-seek-current
    -	(mpc-mode-map): Bind mpc-seek-current to "g"
    +2015-11-19  Eli Zaretskii  
     
    -2015-11-27  Dmitry Gutov  
    +	Minor improvements in modules testing Makefile
     
    -	Autoload etags when using its xref backend
    +	* modules/mod-test/Makefile (EMACS, SO): New variables.
    +	(CFLAGS): When SO = dll, don't use -fPIC.
    +	(check): New target, runs the test.
     
    -	* lisp/progmodes/xref.el (xref--etags-backend):
    -	Rename to etags--xref-backend.  Move to etags.el.  Autoload.
    -	(Bug#22026)
    +2015-11-19  Eli Zaretskii  
     
    -2015-11-27  Artur Malabarba  
    +	* .gitignore: Add "*.dll".
     
    -	* lisp/character-fold.el: Allow complex chars to match their decomposition
    +2015-11-19  Paul Eggert  
     
    -	(character-fold-table): When a character's decomposition does not
    -	involve a formatting tag (i.e., if it has an "exact" description via
    -	other characters), then this character is allowed to match the
    -	decomposition.
    +	Migrate modules/.gitignore into .gitignore
     
    -2015-11-27  Artur Malabarba  
    +	* .gitignore: Add former contents of modules/.gitignore.
    +	* modules/.gitignore: Remove.
     
    -	* lisp/character-fold.el: More descriptive variable names
    +2015-11-19  Paul Eggert  
     
    -	(character-fold-table): Rename a lot of the lexical variables to
    -	make the code easier to read.
    +	Add copyright notices to module code
     
    -2015-11-27  Artur Malabarba  
    +	Put them in the usual format for GNU Emacs copyright notices.
     
    -	* lisp/isearch.el: Ensure we still support `isearch-new-word'
    +2015-11-19  Paul Eggert  
     
    -	(isearch-new-regexp-function): Define variable.
    -	(isearch-new-word): Define as an obsolete alias. (Bug#22018)
    +	Rename emacs_module.h to module.h
     
    -2015-11-27  Eli Zaretskii  
    +	* src/module.h: Rename from src/emacs_module.h.
    +	All uses changed.
     
    -	Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25
    +2015-11-19  Juanma Barranquero  
     
    -2015-11-27  Lee Bochicchio  
    +	* src/module.c (Fmodule_load): Remove unused vars `doc_name', `args'
     
    -	* test/automated/abbrev-tests.el: Define more tests
    +	* src/lread.c (Fload): Remove unused variable `size'
     
    -	(abbrev-table-name-test, kill-all-abbrevs-test)
    -	(clear-abbrev-table-test): New tests.
    +2015-11-19  Alan Mackenzie  
     
    -2015-11-27  Eli Zaretskii  
    +	src/keyboard.c (pre-command-hook): Fix typo in doc string: "pre" -> "post".
     
    -	Add module tests for wrong-type-argument
    +2015-11-18  Dmitry Gutov  
     
    -	* modules/mod-test/test.el (mod-test-sum-test): Add tests for
    -	wrong-type-argument.
    +	Prioritize looking inside vc-parent-buffer over log-view-mode fallback
     
    -2015-11-27  Eli Zaretskii  
    +	* lisp/vc/vc.el (vc-deduce-fileset): Prioritize looking inside
    +	vc-parent-buffer over log-view-mode fallback (bug#21955).
     
    -	Improve handling of signals and 'throw' in modules
    +2015-11-18  Alan Mackenzie  
     
    -	* src/emacs-module.c: Add commentary explaining how to write
    -	functions in this file.
    -	(module_make_global_ref, module_free_global_ref)
    -	(module_non_local_exit_signal, module_non_local_exit_throw)
    -	(module_make_function, module_funcall, module_intern)
    -	(module_type_of, module_is_not_nil, module_eq)
    -	(module_extract_integer, module_make_integer)
    -	(module_extract_float, module_make_float)
    -	(module_copy_string_contents, module_make_string)
    -	(module_make_user_ptr, module_get_user_ptr, module_set_user_ptr)
    -	(module_get_user_finalizer, module_set_user_finalizer)
    -	(module_vec_set, module_vec_get, module_vec_size)
    -	(module_non_local_exit_signal_1, module_non_local_exit_throw_1):
    -	Do nothing and return with failure indication immediately, if some
    -	previous module call signaled an error or wants to throw.  See
    -	http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02133.html
    -	for the relevant discussions.
    +	lisp/isearch.el: Eliminate macro isearch-call-message, replacing with funcall.
     
    -2015-11-27  Eli Zaretskii  
    +2015-11-18  Ken Brown  
     
    -	Add ':version' tag to 'checkdoc-package-keywords-flag'
    +	* configure.ac (LIBMODULES): Don’t define on Cygwin
     
    -	* lisp/emacs-lisp/checkdoc.el (checkdoc-package-keywords-flag):
    -	Add a ':version' tag.
    +2015-11-18  Eli Zaretskii  
     
    -2015-11-27  Eli Zaretskii  
    +	Fix MS-Windows build --with-modules
     
    -	Improve documentation of 'eval-buffer' and 'eval-region'
    +	* src/module.c: Reformat copyright commentary.
    +	(module_vec_get): Use explicit cast to size_t to avoid compiler
    +	warning in 32-bit builds.
    +	(check_main_thread) [WINDOWSNT]: Fix letter-case in Windows APIs.
    +	Compare thread IDs directly, as GetThreadId is not available
    +	before Windows Vista.
    +	(check_main_thread) [WINDOWSNT]: Duplicate the thread handle
    +	without using APIs and constants not available on XP and older
    +	systems.  Obtain and store the thread ID as well.
     
    -	* src/lread.c (Feval_buffer, Feval_region): Doc fixes.  (Bug#22023)
    +2015-11-18  Aurélien Aptel  
    +	    Philipp Stephani  
     
    -	* doc/lispref/eval.texi (Eval): Mention narrowing to clarify
    -	"accessible portion of buffer".
    +	Add dynamic module test and helper script
     
    -2015-11-27  Eli Zaretskii  
    +	Add 'modhelp.py' script (python2) to automate module testing and
    +	module generation.
     
    -	Unbreak the Cygwin w32 build
    +	To build and test all modules in the modules/ dir
    +	  $ ./modhelp.py test
     
    -	* src/emacs.c (main): Call w32_init_main_thread in the Cygwin w32
    -	build as well.  Reported by Andy Moreton .
    +	To generate a module from template code (good starting point)
    +	  $ ./modhelp init mynewtestmodule
     
    -2015-11-27  Eli Zaretskii  
    +	See the script -h option for more documentation.
     
    -	Improve commentary in character-fold.el
    +	* modules/modhelp.py: New module helper script.
    +	* modules/mod-test/Makefile: New file. Makefile for the test module.
    +	* modules/mod-test/mod-test.c: New file. Test module source file.
    +	* modules/mod-test/test.el: New file. ert test suite for the test module.
    +	* modules/.gitignore: New file. Local .gitignore file.
     
    -	* lisp/character-fold.el (character-fold-to-regexp): Move detailed
    -	description from commit log message to comments.  (Bug#22019)
    +2015-11-18  Aurélien Aptel  
     
    -2015-11-26  Alan Mackenzie  
    +	Make 'Fload' look for modules
     
    -	Byte Compiler: generate code to adjust stack count after call to `signal'.
    +	'Fload' can now load dynamic modules. This also makes 'require' work.
     
    -	Corrects change from earlier today.
    +	* src/lread.c:
    +	  (suffix_p): New function.
    +	  (Fload): Use 'suffix_p'.  Call 'Fmodule_load' when we try to load a file
    +	  with a module suffix.
    +	  (syms_of_lread): Append module suffix to 'Vload_suffixes'.
     
    -	* lisp/emacs-lisp/bytecomp.el (byte-compile-setq): supply the current value of
    -	`byte-compile--for-effect' as argument to `byte-compile-form'.
    +2015-11-18  Aurélien Aptel  
    +	    Philipp Stephani  
     
    -2015-11-26  Eli Zaretskii  
    +	Add dynamic module module support
     
    -	Improve commentary of prepare_to_modify_buffer_1
    +	* configure.ac: Add '--with-modules' option.  Conditionally add
    +	  dynlib.o and module.o to the list of objects.  Add any system
    +	  specific flags to the linker flags to support dynamic libraries.
    +	* m4/ax_gcc_var_attribute.m4: Add autoconf extension to test gcc
    +	  attributes.
    +	* src/Makefile.in: Conditionally add module objects and linker flags.
    +	* src/alloc.c (garbage_collect_1): protect module local values from
    +	  GC.
    +	* src/lisp.h: Add 'module_init' and 'syms_of_module' prototypes.
    +	* src/emacs_module.h: New header file included by modules.  Public
    +	  module API.
    +	* src/module.c: New module implementation file.
     
    -	* src/insdel.c (prepare_to_modify_buffer_1): Mention in commentary
    -	that this function runs Lisp.  Suggested by Richard Stallman
    -	.
    +2015-11-18  Aurélien Aptel  
     
    -2015-11-26  Phillip Lord  
    +	Add new User Pointer (User_Ptr) type
     
    -	Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25
    +	* src/lisp.h: Add new Lisp_Misc_User_Ptr type.
    +	(XUSER_PTR): New User_Ptr accessor.
    +	* src/alloc.c (make_user_ptr): New function.
    +	(mark_object, sweep_misc): Handle Lisp_Misc_User_Ptr.
    +	* src/data.c (Ftype_of): Return 'user-ptr' for user pointer.
    +	(Fuser-ptrp): New user pointer type predicate function.
    +	(syms_of_data): New 'user-ptrp', 'user-ptr' symbol.  New 'user-ptrp'
    +	subr.
    +	* src/print.c (print_object): Add printer for User_Ptr type.
     
    -2015-11-26  Phillip Lord  
    +2015-11-18  Aurélien Aptel  
    +	    Philipp Stephani  
     
    -	Fix regression after merge.
    +	Add portable layer for dynamic loading
     
    -	 * src/undo.c (prepare_record): Remove call to run_undoable_change.
    +	* src/dynlib.h: New file.
    +	* src/dynlib.c: New file.
     
    -2015-11-26  Phillip Lord  
    +2015-11-18  Philipp Stephani  
     
    -	After delete, record point location in undo.
    +	Add catch-all & no-signal version of PUSH_HANDLER
     
    -	Addresses Bug #21968.
    +	Ground work for modules. Add a non-signaling version of PUSH_HANDLER and
    +	a new "catch-all" handler type.
     
    -		* lisp/simple.el (undo-auto--add-boundary): Clean up code to
    -		better support intercalating calls.
    -		* src/keyboard.c, src/keyboard.h (command_loop_1): Store value of
    -		point and current buffer before each command.
    -		* src/undo.c (record_point): Now only record the point.
    -		* src/undo.c (prepare_record): Functionality removed form
    -		record_point.
    -		* src/undo.c (record_delete): Check if point needs recording.
    -		* src/undo.c (undo-boundary): Record value of point before each
    -		boundary.
    -		* test/automated/simple-test.el: New tests.
    +	* src/eval.c (init_handler, push_handler, push_handler_nosignal): New
    +	  functions.
    +	* src/fns.c (hash_remove_from_table): Expose function public.
    +	* src/lisp.h: New handler type, define macro to push_handler call.
     
    -	Conflicts:
    -		src/undo.c
    +2015-11-18  Ken Brown  
     
    -2015-11-26  Eli Zaretskii  
    +	Silence byte-compiler warning
     
    -	Fix compiler warnings in w32.c
    +	* lisp/server.el (server-process-filter): Silence byte-compiler
    +	warning.
     
    -	* src/w32.c (sys_socket): In case of error, use -1 as return
    -	value, not INVALID_SOCKET, which causes compiler warnings.
    -	(maybe_load_unicows_dll): Cast the return value of GetProcAddress
    -	to the appropriate function signature, to avoid compiler errors.
    -	Reported by Andy Moreton .  (Bug#21953)
    +2015-11-18  Paul Eggert  
     
    -2015-11-26  Dmitry Gutov  
    +	Quote symbols in docstrings using `'
     
    -	Check if the file exists on disk before producing the revert diff
    +	Be more systematic about quoting symbols `like-this' rather than
    +	`like-this or 'like-this' in docstrings.  This follows up Artur
    +	Malabarba's email in:
    +	http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01647.html
     
    -	* lisp/vc/vc-dispatcher.el (vc-buffer-sync): Check if the file
    -	exists on disk (bug#20558).
    +2015-11-18  Peder O. Klingenberg  
     
    -2015-11-26  Alan Mackenzie  
    +	Fix savegames in dunnet
     
    -	Byte compiler: on setq with an odd number of arguments, generate a `signal'
    +	* lisp/play/dunnet.el (dun-rot13): Use the standard rot13-region instead
    +	  of separate implementation.
     
    -	* lisp/emacs-lisp/cconv.el (cconv-convert): Don't transform `setq' form when
    -	it has an odd number of arguments, to allow bytecomp to handle the error.
    +2015-11-18  Artur Malabarba  
     
    -	* lisp/emacs-lisp/bytecomp.el (byte-compile-setq): In a `setq' form with an
    -	odd number of arguments, generate a `signal' instead of the normal code.
    +	* lisp/emacs-lisp/package.el (package--with-response-buffer):
     
    -2015-11-26  Dmitry Gutov  
    +	Ensure we're at the start of the buffer before searching for
    +	the end of headers.
     
    -	Use find-tag-default for xref-backend-identifier-at-point
    +2015-11-17  Xue Fuqiao  
     
    -	* lisp/progmodes/etags.el (find-tag-tag)
    -	(tags-completion-at-point-function): Extract common code as
    -	find-tag--default.
    -	(xref-backend-identifier-at-point): Define in terms of the new
    -	function.
    +	* admin/release-process: Improve wording.
     
    -2015-11-26  Paul Eggert  
    +2015-11-17  Paul Eggert  
     
    -	* src/undo.c (record_property_change): Remove now-unused local.
    +	Fix docstring quoting problems with ‘ '’
     
    -2015-11-25  Phillip Lord  
    +	Problem reported by Artur Malabarba in:
    +	http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01513.html
    +	Most of these fixes are to documentation; many involve fixing
    +	longstanding quoting glitches that are independent of the
    +	recent substitute-command-keys changes.  The changes to code are:
    +	* lisp/cedet/mode-local.el (mode-local-augment-function-help)
    +	(describe-mode-local-overload):
    +	Substitute docstrings before displaying them.
    +	* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
    +	Quote the generated docstring for later substitution.
     
    -	run_undoable_changes now called from insdel.
    +2015-11-17  Eli Zaretskii  
     
    -	The original calls from inside undo.c are not always at a safe position
    -	to call lisp, as they originate in varied positions within insdel.c.
    -	Calling them directly from prepare_to_modify_buffer_1 ensures that they
    -	are always run at the same point.
    +	Improve configure --help text for wide ints
     
    -	 * src/undo.c (run_undoable_changes,syms_of_undo): Remove function
    -	 and symbol used.
    -	 * src/insdel.c (run_undoable_changes): Add function and symbol.
    +	* configure.ac (wide-int): Clarify user-level advantages and
    +	disadvantages.
     
    -2015-11-25  Eli Zaretskii  
    +2015-11-17  Stephen Leake  
     
    -	Improve and update documentation of search commands
    +	Improve doc string
     
    -	* doc/emacs/search.texi (Lax Search): Renamed from "Search Case";
    -	all references changed.  Move the description of lax-whitespace
    -	here.  Add description of the new character folding features and
    -	additional customizable options.
    -	(Isearch Yank): Move before "Error in Search".
    -	(Basic Isearch): Improve wording.  Add index entries.  Add short
    -	description of how to abandon search, making this subsection a
    -	complete introduction to search basics.
    -	(Repeat Isearch): Add index entries.  Describe additional
    -	customizable options.  Describe mouse clicks.
    -	(Isearch Yank): Add index entries.  Describe mouse-2 click in echo
    -	area.  Describe more customizable options.
    -	(Error in Isearch): Add index entries.
    -	(Special Isearch): Move actual description of some isearch
    -	commands to other sections, leaving here just the summary of the
    -	commands.  Add command that toggles character folding.  Describe
    -	commands, like "C-h C-h", that were previously omitted for some
    -	reason.
    -	(Not Exiting Isearch): Describe search-exit-option.  Add index
    -	entries.
    -	(Word Search): Describe eww-search-word and eww-search-prefix.
    -	(Symbol Search): Add index entries.
    -	(Regexp Search): Describe regexp-search-ring-max.
    -	(Replacement and Lax Matches): Renamed from "Replacement and
    -	Case"; all references changed.  Describe lax-whitespace matching
    -	in replace commands and related options.  Describe character
    -	folding in replace commands and related options.
    -	(Query Replace): Describe query-replace-from-to-separator and the
    -	new history features.  Add index entries for highlighted text.
    -	Describe query-replace-skip-read-only.  Describe more keys
    -	accepted by query-replace.
    -	(Other Repeating Search): More index entries for Occur.  Describe
    -	list-matching-lines-default-context-lines.
    -	(Search Customizations): New section, documents customizable
    -	options that were not documented until now.
    -	* doc/emacs/glossary.texi (Glossary): Add "Case Folding" and
    -	"Character Folding".
    +	* lisp/progmodes/xref.el (xref-backend-references): Improve doc string.
     
    -	* etc/NEWS: Move search- and replace-related entries to a single
    -	parent section.
    +2015-11-17  Paul Eggert  
     
    -	* lisp/replace.el (query-replace-show-replacement): Doc fix.
    -	* lisp/isearch.el (search-nonincremental-instead)
    -	(isearch-hide-immediately): Doc fixes.
    +	eval_sub followed dangling pointer when debugging
     
    -2015-11-25  Katsumi Yamaoka  
    +	Problem reported by Pip Cet (Bug#21245).
    +	This bug could occur in eval_sub if the C compiler reused
    +	storage associated with the ‘argvals’ local after ‘argvals’
    +	went out of scope, and if the Elisp debugger stopped on Elisp
    +	function exit and accessed ‘argvals’.  It could also occur if
    +	a variadic function was called with so many arguments (over
    +	2048 args on x86-64) that SAFE_ALLOCA_LISP called malloc, then
    +	SAFE_FREE freed the arguments, then the memory manager used
    +	the storage for other purposes, then the debugger accessed the
    +	arguments.
    +	* src/eval.c (eval_sub): Declare ‘argvals’ at top level of
    +	function body.	Simplify local decls.
    +	When allocating args via SAFE_ALLOCA, call
    +	debugger before invoking SAFE_FREE, as the debugger needs
    +	access to the args.
    +	(eval_sub, apply_lambda): Rework to avoid need for
    +	set_backtrace_debug_on_exit hack.  This is cleaner,
    +	and should work better with buggy custom debuggers.
     
    -	Remove nnml-retrieve-groups that is unnecessary and somewhat problematic
    +2015-11-16  Daiki Ueno  
     
    -	* lisp/gnus/nnml.el (nnml-retrieve-groups): Remove.  See:
    -	 and
    -	
    +	* lisp/image-mode.el: Support encrypted file
     
    -2015-11-25  Paul Eggert  
    +	(image-toggle-display-image): Read content from the buffer instead
    +	of the file, if the buffer holds a decrypted data.  (Bug#21870)
     
    -	Fix module_format_fun_env when dynlib_addr fails
    +2015-11-16  Paul Eggert  
     
    -	* src/emacs-module.c (module_format_fun_env):
    -	exprintf doesn’t support %p, so use %x.  Reported by Eli Zaretskii in:
    -	http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02122.html
    +	ELF unexec: align section header
     
    -2015-11-25  Paul Eggert  
    +	This ports the recent unexelf.c changes to Fedora x86-64
    +	when configured with GCC’s -fsanitize=undefined option.
    +	* src/unexelf.c (unexec): Align new_data2_size to a multiple
    +	of ElfW (Shdr)’s alignment, so that NEW_SECTION_H returns a
    +	pointer aligned appropriately for its type.
     
    -	Disambiguate variable help a bit better
    +2015-11-16  Andreas Schwab  
     
    -	* lisp/help-fns.el (describe-variable): Quote the
    -	variable’s value if it is a symbol other than t or nil.
    -	See: T.V Raman in:
    -	http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02147.html
    +	Do more checks on bytecode objects (Bug#21929)
     
    -2015-11-25  Dmitry Gutov  
    +	* src/eval.c (funcall_lambda): Check size of compiled function
    +	object.
    +	(Ffetch_bytecode): Likewise.
     
    -	Pass SVN commit message through log-edit-extract-headers
    +2015-11-16  Johan Bockgård  
     
    -	* lisp/vc/vc-svn.el (vc-svn-checkin): Pass COMMENT through
    -	log-edit-extract-headers (bug#18954).
    +	pcase.el: Fix edebugging of backquoted cons patterns
     
    -2015-11-24  Alan Mackenzie  
    +	* lisp/emacs-lisp/pcase.el (pcase-QPAT): Fix edebugging of backquoted
    +	cons patterns. (Bug#21920)
     
    -	CC Mode: Eliminate compiler warning messages.
    +2015-11-16  Paul Eggert  
     
    -	* lisp/progmodes/cc-mode.el (top level): remove compile time declaration of
    -	`font-lock-syntactic-keywords' (which CC Mode doesn't use).
    -	* lisp/progmodes/cc-awk.el (awk-mode-syntax-table)
    -	(c-awk-set-syntax-table-properties): Clarify comments about
    -	`font-lock-syntactic-keywords'.
    +	Improve fix for regex reentrancy abort
     
    -	* lisp/progmodes/cc-bytecomp.el (cc-bytecomp-load): Create a dummy declaration
    -	of this before the real (interpreted) one, to satisfy the byte compiler.
    +	Suggested by Stefan Monnier (Bug#21688).
    +	* src/syntax.c (update_syntax_table_forward):
    +	Remove recently-added PROPERTIZE arg, and assume it is true.
    +	All callers changed.
    +	* src/syntax.h (UPDATE_SYNTAX_TABLE_FORWARD_FAST):
    +	Invoke update_syntax_table directly.
     
    -2015-11-24  Simen Heggestøyl  
    +2015-11-16  Artur Malabarba  
     
    -	Extend the test suite for json.el
    +	* lisp/faces.el (faces--attribute-at-point): Use `face-list-p'
     
    -	* lisp/json.el (json-plist-p): Clarify docstring.
    +	* lisp/emacs-lisp/package.el (package--with-response-buffer): Missing require
     
    -	* test/automated/json-tests.el (json-tests--with-temp-buffer): New
    -	macro.
    -	(test-json-join, test-json-alist-p)
    -	(test-json-plist-p, test-json-advance, test-json-peek)
    -	(test-json-pop, test-json-skip-whitespace)
    -	(test-json-read-keyword, test-json-encode-keyword)
    -	(test-json-read-number, test-json-encode-number)
    -	(test-json-read-escaped-char, test-json-read-string)
    -	(test-json-encode-string, test-json-encode-key)
    -	(test-json-new-object, test-json-add-to-object)
    -	(test-json-read-object, test-json-encode-list)
    -	(test-json-read-array, test-json-encode-array)
    -	(test-json-read, test-json-read-from-string)
    -	(test-json-encode): New tests.
    -	(json-read-simple-alist): Merged into `test-json-read-object'.
    -	(json-encode-string-with-special-chars): Merged into
    -	`test-json-encode-string'.
    -	(json-read-string-with-special-chars): Split into
    -	`test-json-encode-string' and `test-json-read-from-string'.
    +	* lisp/emacs-lisp/nadvice.el (add-function): Escape quote
     
    -2015-11-24  Anders Lindgren  
    +2015-11-15  Vasily Korytov  
     
    -	Fixed bug#18283: Enable applescript in NextStep.
    +	Recognize .rbw and .pyw files (bug#18753)
     
    -	* nextstep/templates/Info.plist.in: Set NSAppleScriptEnabled to YES.
    +	* lisp/progmodes/python.el (auto-mode-alist):
    +	Recognize .pyw files.
     
    -2015-11-24  Eli Zaretskii  
    +	* lisp/progmodes/ruby-mode.el (auto-mode-alist):
    +	Recognize .rbw files.
     
    -	Allow completion on dynamic module files in load-library
    +2015-11-15  Dmitry Gutov  
     
    -	* lisp/files.el (load-library): Bind completion-ignored-extensions
    -	to nil, to allow completion on dynamic modules typed as file
    -	names.  Reported by Andy Moreton .
    +	Fix ruby-mode auto-mode-alist entry
     
    -2015-11-24  Alan Mackenzie  
    +	* lisp/progmodes/ruby-mode.el (auto-mode-alist): Add grouping
    +	around the extensions (bug#21257).
     
    -	CC Mode: eliminate almost all byte compilation warnings
    +2015-11-15  Dmitry Gutov  
     
    -	* lisp/progmodes/cc-bytecomp.el (cc-bytecomp-noruntime-functions): Remove.
    -	(cc-require): Remove the crude hack that saved and restored
    -	byte-compile-noruntime-functions.
    -	(cc-conditional-require, cc-conditional-require-after-load): New macros.
    +	Fix etags completion near eob
     
    -	* lisp/progmodes/cc-defs.el (top level): Reformulate code which loaded
    -	cc-fix.el using the new macros in cc-bytecomp.el.
    +	* lisp/progmodes/etags.el (tags-completion-at-point-function):
    +	Use `goto-char', to avoid the end-of-buffer error (bug#20061).
     
    -	* lisp/progmodes/cc-langs.el (c++-template-syntax-table)
    -	(c-no-parens-syntax-table): Add extra "(eval ..)"s around "'(lambda ..)"
    -	forms to remove the superflous quotes.
    +2015-11-15  Alan Mackenzie  
     
    -2015-11-24  Eli Zaretskii  
    +	De-pessimize detection of C++ member initialization lists.
     
    -	Add one more mod-test test
    +	list/progmodes/cc-engine.el (c-back-over-list-of-member-inits): New macro.
    +	(c-back-over-member-initializers): Reformulate such that c-at-toplevel-p
    +	is only called when a construct "looks right" rather than continually.
    +	(c-guess-basic-syntax, CASE 5R): Add a check for the mode being C++ Mode.
     
    -	* modules/mod-test/test.el (mod-test-sum-test): Test the error
    -	signaled when the function is invoked with a wrong number of
    -	arguments.
    +2015-11-15  Stephen Leake  
     
    -2015-11-24  Philipp Stephani  
    +	Improve a few doc strings, comments
     
    -	* modules/mod-test/mod-test.c (Fmod_test_sum): Verify there are 2 args.
    +	* lisp/cedet/cedet-global.el (cedet-gnu-global-expand-filename):
    +	* lisp/cedet/ede/locate.el (ede-locate-base):
    +	* lisp/cedet/semantic/symref.el (semantic-symref-calculate-rootdir):
    +	* src/fns.c (Fdelq): Improve doc string.
     
    -2015-11-24  Eli Zaretskii  
    +	* lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions): Add FIXME.
     
    -	Implement dynlib_addr for MS-Windows
    +2015-11-15  Anders Lindgren  
     
    -	* src/dynlib.c [WINDOWSNT]: Include w32common.h.
    -	 [WINDOWSNT]: New static variable.
    -	(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS)
    -	(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT) [WINDOWSNT]: Define
    -	if undefined.
    -	(dynlib_reset_last_error): Reset g_b_init_get_module_handle_ex to
    -	zero.
    -	(dynlib_addr) [WINDOWSNT]: Non-trivial implementation to report
    -	the full file name of the module for a given address.
    +	Enhance NSTRACE (trace output for NextStep).
     
    -2015-11-24  Alan Mackenzie  
    +	Trace can be disabled for groups of functions. By default, event
    +	functions and functions that generate lots of output are disabled.
     
    -	Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25
    +	Trace output of Objective-C functions now use the "[ClassName
    +	parameter:]" form.
     
    -2015-11-24  Alan Mackenzie  
    +	* src/nsterm.h (NSTRACE_ALL_GROUPS, NSTRACE_GROUP_EVENTS)
    +	(NSTRACE_GROUP_UPDATES, NSTRACE_GROUP_FRINGE, NSTRACE_GROUP_COLOR)
    +	(NSTRACE_GROUP_GLYPHS, NSTRACE_GROUP_FOCUS): New macros,
    +	controlling in which function groups trace should be active.
    +	(NSTRACE_WHEN): Support for silencing a function, this also
    +	silencing all called functions.
    +	(NSTRACE_UNSILENCE): New macro, used to re-enable trace.
    +	(NSTRACE_FMT_FSTYPE, NSTRACE_ARG_FSTYPE): New macros, used to
    +	print the full screen state in NSTRACE functions.
     
    -	Squashed commit of the following:
    +	* src/nsterm.m (nstrace_depth, nstrace_num): Made volatile as they
    +	can be accessed from multiple threads.
    +	(nstrace_enabled_global): New variable, when FALSE, trace is
    +	silenced.
    +	(nstrace_restore_global_trace_state): New function, used to
    +	restore `nstrace_enabled_global' at end of block.
    +	([EmacsView setFrame:], [EmacsWindow setFrame:display:])
    +	([EmacsWindow setFrame:display:animation:])
    +	([EmacsWindow setFrameTopLeftPoint:]): New functions, print trace
    +	and call corresponding super function.
    +	(Many functions): Add or enhance trace output.
     
    -	commit e1ecf76585bef2eb87995f7a7f92cc12003a6f70
    -	Author: Alan Mackenzie 
    -	Date:   Tue Nov 24 16:50:09 2015 +0000
    +	* src/nsimage.m (ns_image_from_file): Enhanced trace output.
     
    -	    Byte compile: minor amendments.
    +	* src/nsfns.m (x_set_tool_bar_lines): Add trace output.
     
    -	    * lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
    -	    add a comment to explain the binding of variables around a subsidiary
    -	    compilation.
    -	    (byte-compile-new-defuns): Amend the doc string.
    +	* src/nsmenu.m ([EmacsToolbar setVisible:]): New function, print trace
    +	and call corresponding super function.
     
    -	commit c537bfed1dda1593d218956ff00c6105a3ff0316
    -	Author: Alan Mackenzie 
    -	Date:   Sat Nov 21 18:43:57 2015 +0000
    +2015-11-15  Anders Lindgren  
     
    -	    Byte compiler: fix spurious warnings "might not be defined at runtime".
    +	Fixed a toolbar related issue on OS X.
     
    -	    Also initialize byte-compile-noruntime-functions between runs.
    +	Earlier, when toggling the tool-bar in a maximized frame, the
    +	frame size didn't match the number of text lines, leaving an
    +	unused area at the bottom of the frame.
     
    -	    * lisp/emacs-lisp/bytecomp.el (byte-compile-new-defuns): New variable.
    -	    (byte-compile-initial-macro-environment): For eval-when-compile: bind
    -	    byte-compile-unresolved-functions and byte-compile-new-defuns around
    -	    byte-compile-top-level, to prevent spurious entries being made.
    -	    (byte-compile-warn-about-unresolved-functions): Check whether function is
    -	    in byte-compile-new-defuns before emitting a warning about it.
    -	    (byte-compile-from-buffer): Initialize new variable and
    -	    byte-compile-noruntime-functions to nil.
    -	    (byte-compile-file-form-require): record all new functions defined by a
    -	    `require' in byte-compile-new-defuns.
    -	    (byte-compile-file-form-defmumble): record the new alias in
    -	    byte-compile-new-defuns.
    +	* nsfns.m (x_set_tool_bar_lines): Exit maximized and full height
    +	fullscreen modes when tool bar is disabled.
     
    -2015-11-24  Eli Zaretskii  
    +2015-11-15  Anders Lindgren  
     
    -	Fix crash at startup related to GC of font entities
    +	Fixed OS X 10.6.8 build issue (bug#21862).
     
    -	* src/font.h (GC_FONT_SPEC_P, GC_FONT_ENTITY_P)
    -	(GC_FONT_OBJECT_P, GC_XFONT_SPEC, GC_XFONT_ENTITY)
    -	(GC_XFONT_OBJECT): New macros, for use in garbage collector.
    -	* src/alloc.c (compact_font_cache_entry, compact_font_caches):
    -	Don't ifdef away font cache compaction on NT_GUI, as the problems
    -	which led to that seem to have been solved.
    -	(compact_font_cache_entry): Use GC_FONT_SPEC_P, GC_XFONT_SPEC,
    -	GC_XFONT_ENTITY, and GC_XFONT_OBJECT, instead of their non-GC_
    -	cousins.  (Bug#21999)
    +	* src/nsterm.h (EmacsView): Add missing declarations.
    +	* src/nsterm.m ([EmacsView windowDidBecomeKey]): New method, like
    +	the standard method but without the notification parameter.
    +	Intended to be used for direct calls.
    +	([EmacsView windowDidEnterFullScreen]): Call the non-notification
    +	version of `windowDidBecomeKey'. Made the notification method call
    +	the non-notification method instead of the vice versa.
    +	(NSWindowDidEnterFullScreenNotification): Deleted, no longer
    +	needed.
     
    -2015-11-24  Alan Mackenzie  
    +2015-11-15  Artur Malabarba  
     
    -	Byte compile: Output an error, not a warning, for odd number of args to setq
    +	* lisp/faces.el (faces--attribute-at-point): Fix an issue
     
    -	* lisp/emacs-lisp/bytecomp.el (byte-compile-setq): Amend.
    +	Previous code would signal an error when the face at point was
    +	a manually built list of attributes such as '(:foregroud "white").
     
    -2015-11-24  Ken Raeburn  
    +	* test/automated/faces-tests.el (faces--test-color-at-point): Add a test
     
    -	Fix kbd_buffer iteration loop in readable_events
    +2015-11-15  Paul Eggert  
     
    -	* src/keyboard.c (readable_events): Wrap the event pointer back to the
    -	start of the kbd_buffer array inside the top of the loop instead of
    -	right before checking the loop condition, since kbd_fetch_ptr and
    -	kbd_store_ptr point past the end of the array to mean that element 0
    -	is next. (bug#21935)
    +	Fix regex abort when it tries to reenter itself
     
    -2015-11-24  Paul Eggert  
    +	Problem reported by Ken Raeburn.
    +	Solution suggested by Stefan Monnier (Bug#21688).
    +	* src/regex.c (re_match_2_internal):
    +	Use new _FAST functions to avoid regex code reentering itself.
    +	* src/syntax.c (update_syntax_table_forward): New arg PROPERTIZE.
    +	All callers changed.
    +	* src/syntax.h (UPDATE_SYNTAX_TABLE_FORWARD_FAST)
    +	(UPDATE_SYNTAX_TABLE_FAST): New inline functions.
     
    -	Improve text-quoting-style doc again
    +2015-11-15  Dmitry Gutov  
     
    -	* doc/lispref/help.texi (Keys in Documentation):
    -	Omit overkill discussion of ‘setq’.  Mention Emacs versions
    -	where ‘grave’ style was standard.
    +	Improve Ruby 1.9-style keyword keys highlighting
     
    -2015-11-24  Paul Eggert  
    +	* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords):
    +	Handle required keyword arguments (bug#21367).
    +	And highlight the colon together with the name.
     
    -	Improve text-quoting-style doc
    +2015-11-15  Dmitry Gutov  
     
    -2015-11-24  Paul Eggert  
    +	Unify the absolutely equal xref-backend-references implementations
     
    -	Simplify module_make_function
    +	* lisp/progmodes/elisp-mode.el (xref-backend-references):
    +	Remove.
     
    -	* src/emacs-module.c (module_make_function):
    -	Simplify by calling build_unibyte_string.
    +	* lisp/progmodes/etags.el (xref-backend-references):
    +	Remove.
     
    -2015-11-24  Paul Eggert  
    +	* lisp/progmodes/xref.el (xref-backend-references):
    +	Define the default implementation.
     
    -	Port better to FreeBSD’s dlfunc vs dlsym
    +2015-11-14  Dmitry Gutov  
     
    -	This avoids warnings when converting between void * and
    -	function pointers, which strict C11 does not allow.
    -	* configure.ac (dlfunc): Check for existence.
    -	* src/dynlib.c (dlfunc) [!HAVE_DLFUNC]: New macro.
    -	(dynlib_func): New function.
    -	* src/dynlib.h (dynlib_function_ptr, dynlib_func): New decls.
    -	* src/emacs-module.c (Fmodule_load): Use dynlib_func, not
    -	dynlib_sym, for function pointers.
    +	Update project-find-regexp for the new xref API
     
    -2015-11-24  Paul Eggert  
    +	* lisp/progmodes/project.el (project--read-regexp):
    +	Update to use the new xref API methods.
     
    -	Simplify use of emacs_finalizer_function type
    +	* lisp/progmodes/xref.el (xref-find-backend): Autoload.
     
    -	* src/emacs-module.h (emacs_finalizer_function):
    -	Now EMACS_NOEXCEPT.  All users simplified to omit EMACS_NOEXCEPT.
    -	(struct emacs_env_25): Use emacs_finalizer_function where applicable.
    +2015-11-14  Dmitry Gutov  
     
    -2015-11-24  Paul Eggert  
    +	Fix replacing a match with a shorter string
     
    -	module_format_fun_env fixes
    +	In effect, partially reverting fe973fc.
     
    -	* src/doprnt.c (exprintf) [HAVE_MODULES]: Also define in this case.
    -	* src/emacs-module.c (module_format_fun_env):
    -	Convert path and sym to UTF-8.
    -	Don’t use VLAs, as the C11 standard says they’re optional,
    -	and anyway they can cause core dumps with large allocations.
    -	Use exprintf rather than snprintf, as exprintf handles arbitrarily
    -	long strings.  Simplify the code a bit.
    +	* lisp/progmodes/xref.el (xref-query-replace): Store the end
    +	of each match as a marker again, instead of length.
    +	(xref--query-replace-1): Update accordingly.
     
    -2015-11-23  Dmitry Gutov  
    +2015-11-14  Artur Malabarba  
     
    -	Don't use package-user-dir in elisp-library-roots if it's not bound
    +	* lisp/progmodes/xref.el (xref-pop-marker-stack): Downgrade errors
     
    -	* lisp/progmodes/elisp-mode.el (elisp-library-roots): Don't
    -	use package-user-dir if it's not bound (bug#19759).
    +	Signal user-errors instead.
     
    -2015-11-23  Anders Lindgren  
    +2015-11-14  Eli Zaretskii  
     
    -	New visible-bell for NextStep (OS X El Capitan compatible).
    +	Document 'describe-symbol'
     
    -	Instead of inverting a rectangle in the middle of the frame, use
    -	the standard NextStep image "caution", represented using an
    -	warning sign with an exclamation mark.  (Bug#21662)
    +	* doc/emacs/help.texi (Help Summary): Mention "C-h o".
    +	(Name Help): Document "C-h o" and describe-symbol.
     
    -	Implemented based on a suggestion drafted by Mustafa Kocaturk.
    +	* lisp/help-fns.el (describe-symbol): Doc fix.
     
    -	* src/nsterm.m (EmacsBell): New class for managing the caution
    -	image.  Support multiple active bells, the image is removed once
    -	all bells have timed out.
    -	(ns_timeout): Removed, no longer used.
    -	(ns_ring_bell): Reimplemented to use EmacsBell.
    +2015-11-14  Paul Eggert  
     
    -2015-11-23  Johan Bockgård  
    +	Change test name to avoid spellcheck issue.
     
    -	* lisp/emacs-lisp/nadvice.el (add-function): Fix debug spec.
    +2015-11-14  Eli Zaretskii  
     
    -	(remove-function): Ditto. (Bug#20376)
    +	Avoid signaling an error in 'describe-symbol'
     
    -2015-11-23  Mark Oteiza  
    +	* lisp/help-fns.el (describe-symbol): Avoid errors when the symbol
    +	exists as a function/variable/face/etc., but is undocumented.
     
    -	* lisp/leim/quail/tamil-dvorak.el: Add necessary escapes.
    +	* test/automated/help-fns.el (help-fns-test-describe-symbol): New
    +	test.
     
    -2015-11-23  Eli Zaretskii  
    +2015-11-14  Eli Zaretskii  
     
    -	Improve how non-ASCII strings are accepted from modules
    +	* INSTALL (--with-cairo): Document this new configure option.
     
    -	* src/emacs-module.c (module_make_function, module_make_string):
    -	Build a unibyte Lisp string and then decode it by UTF-8, instead
    -	of building a multibyte string without decoding.  This is more
    -	tolerant to deviations from UTF-8.
    +2015-11-14  Eli Zaretskii  
     
    -2015-11-23  Paul Eggert  
    +	Document that GNU Make >= 3.81 is required to build Emacs
     
    -	Port recent module changes to pickier compilers
    +	* doc/lispref/internals.texi (Building Emacs): Document that GNU
    +	Make 3.81 or later is now required.
     
    -	* src/emacs-module.c (module_make_function)
    -	(module_make_string): Add casts to fix pointer signedness issues.
    +2015-11-14  Eli Zaretskii  
     
    -2015-11-23  Philipp Stephani  
    +	* CONTRIBUTE (Branches): Improve wording for back-ported commits.
     
    -	Fix how strings are accepted from modules
    +2015-11-13  l3thal  
     
    -	* src/emacs-module.c (module_make_function, module_make_string): Use
    -	make_multibyte_string.
    -	(module_copy_string_contents): Encode before reading the byte
    -	size.  Return false if and only if an error occurred.
    +	Merge branch 'erc-async-reconnect' into emacs-25
     
    -2015-11-23  Eli Zaretskii  
    +	Reconnect asynchronously.
     
    -	Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25
    +2015-11-11  Alan Mackenzie  
     
    -2015-11-23  Shakthi Kannan  
    +	First commit to scratch/follow.  Make Isearch work with Follow Mode, etc.
     
    -	Add the tamil-dvorak input method
    +	doc/lispref/window.texi (Basic Windows): Add paragraph defining "Group of
    +	Windows" and new @defun selected-window-group.
    +	(Window Start and End): Describe new &optional parameter GROUP and
    +	...-group-function for window-start, window-end, set-window-start, and
    +	pos-visible-in-window-p.
    +	(Textual Scrolling) Describe the same for recenter.
    +	doc/lispref/positions.texi (Screen Lines): Describe the same for
    +	move-to-window-line.
     
    -	* lisp/leim/quail/tamil-dvorak.el: New file.  (Bug#21768)
    +	src/window.c (Fwindow_start, Fwindow_end, Fset_window_start)
    +	(Fpos_visible_in_window_p, Frecenter, Fmove_to_window_line): To each, add ar
    +	new optional parameter "group".  At the beginning of each, check whether the
    +	corresponding ...-group-function is set to a function, and if so execute this
    +	function in place of the normal processing.
    +	(syms_of_window): Define symbols for the six new variables below.
    +	(window-start-group-function, window-end-group-function)
    +	(set-window-start-group-function, recenter-group-function)
    +	(pos-visible-in-window-p-group-function, move-to-window-line-group-function):
    +	New permanent local buffer local variables.
    +	src/keyboard.c (Fposn_at_point): Add extra parameter in call to
    +	Fpos_visible_in_window_p.
     
    -	* etc/NEWS: Mention the new input method.
    +	lisp/window.el (selected-window-group-function): New permanent local buffer
    +	local variable.
    +	(selected-window-group): New function.
     
    -2015-11-23  Martin Rudalics  
    +	lisp/follow.el (follow-mode): Set the ...-group-function variables at mode
    +	enable, kill them at mode disable.  Add/remove follow-after-change to/from
    +	after-change-functions.
    +	(follow-start-end-invalid): New variable.
    +	(follow-redisplay): Manipulate follow-start-end-invalid.
    +	(follow-after-change, follow-window-start, follow-window-end)
    +	(follow-set-window-start, follow-pos-visible-in-window-p)
    +	(follow-move-to-window-line, follow-sit-for): New functions.
     
    -	Move setting FRAME_WINDOW_SIZES_CHANGED to resize_frame_windows.
    +	lisp/isearch.el (isearch-call-message): New macro.
    +	(isearch-update, with-isearch-suspended, isearch-del-char)
    +	(isearch-search-and-update, isearch-ring-adjust): Invoke above new macro.
    +	(with-isearch-suspended): Rearrange code such that isearch-call-message is
    +	invoked before point is moved.
    +	(isearch-message): Add comment about where point must be at function call.
    +	(isearch-search): Remove call to isearch-message.
    +	(isearch-lazy-highlight-window-group): New variable.
    +	(isearch-lazy-highlight-new-loop): Unconditionally start idle timer.  Move
    +	the battery of tests to ...
    +	(isearch-lazy-highlight-maybe-new-loop): New function, started by idle timer.
    +	Note: (sit-for 0) is still called.
    +	(isearch-lazy-highlight-update): Check membership of
    +	isearch-lazy-highlight-window-group.  Don't set the `window' overlay
    +	property.
    +	(isearch-update, isearch-done, isearch-string-out-of-window)
    +	(isearch-back-into-window, isearch-lazy-highlight-maybe-new-loop)
    +	(isearch-lazy-highlight-search, isearch-lazy-highlight-update)
    +	(isearch-lazy-highlight-update): Call the six amended primitives (see
    +	src/window.c above) with the new `group' argument set to t, to cooperate
    +	with Follow Mode.
     
    -	* src/frame.c (adjust_frame_size): Don't set
    -	FRAME_WINDOW_SIZES_CHANGED here ...
    -	* src/window.c (resize_frame_windows): ... but here, as suggested
    -	by Stefan Monnier.  Also remove some dead code along the way.
    +2015-12-27  Lars Ingebrigtsen  
     
    -2015-11-23  Alan Mackenzie  
    +	* shr.el (shr-descend): Allow using lambdas in external functions.
     
    -	* etc/NEWS (Incompatible Lisp Changes): Also `setf' needs an even # of args.
    +2015-12-25  Stefan Monnier  
     
    -2015-11-23  Alan Mackenzie  
    +	* admin/gitmerge.el: Tweaks that seemed necessary
     
    -	Signal an error when `setf' gets an odd number of arguments.
    +	* admin/gitmerge.el (gitmerge-skip-regexp): Remove "sync".
    +	(gitmerge-maybe-resume): Provide explicit empty commit message.
     
    -	* lisp/emacs-lisp/gv.el (setf): Amend.
    +2015-12-25  Łukasz Stelmach    (tiny change)
     
    -2015-11-23  Stefan Monnier  
    +	Use a different port for TLS erc
     
    -	* lisp/emacs-lisp/smie.el (smie-backward-sexp): Handle BOB better.
    +	* lisp/erc/erc.el (erc-default-port-tls): New variable
    +	(bug#19497).
    +	* lisp/erc/erc.el (erc-tls): Use it.
     
    -2015-11-23  Alan Mackenzie  
    +2015-12-25  Alain Schneble  
     
    -	* etc/NEWS (Incompatible Lisp Changes): Document new restriction on `setq'.
    +	Make relative URL parsing and resolution consistent with RFC 3986 (bug#22044)
     
    -2015-11-23  Alan Mackenzie  
    +	* test/lisp/url/url-parse-tests.el: Add tests covering url-generic-parse-url.
    +	* test/lisp/url/url-expand-tests.el: Add tests covering url-expand-file-name.
    +	* lisp/url/url-parse.el (url-generic-parse-url): Keep empty fragment
    +	information in URL-struct.
    +	* lisp/url/url-parse.el (url-path-and-query): Do not artificially turn empty
    +	path and query into nil path and query, respectively.
    +	* lisp/url/url-expand.el (url-expander-remove-relative-links): Do not turn
    +	empty path into an absolute ("/") path.
    +	* lisp/url/url-expand.el (url-expand-file-name): Properly resolve
    +	fragment-only URIs. Do not just return them unchanged.
    +	* lisp/url/url-expand.el (url-default-expander): An empty path in the relative
    +	reference URI should not drop the last segment.
     
    -	Expunge occurrences of `setq' with an odd number of arguments.
    +2015-12-25  Lars Ingebrigtsen  
     
    -	* lisp/apropos.el (apropos-documentation):
    -	* lisp/obsolete/complete.el (PC-include-file-all-completions):
    -	* lisp/progmodes/compile.el (compilation-goto-locus):
    -	* lisp/vc/vc-cvs.el (vc-cvs-parse-root): (twice)
    -	Insert missing nil at end of `setq' forms.
    +	Let url use default file modes when copying files
     
    -	* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-autoload): Remove an
    -	erroneous trailing variable name from a setq, thus allowing a compilation
    -	properly to track functions not defined at runtime.
    +	* lisp/url/url-handlers.el (url-copy-file): Use default file
    +	modes when copying files (bug#11400).
     
    -2015-11-23  John Wiegley  
    +2015-12-25  Devon Sean McCullough  
     
    -	Add a note about a questionable use of bool in xdisp.c
    +	Doc fix for url-http
     
    -2015-11-23  Alan Mackenzie  
    +	* lisp/url/url-http.el (url-http): Document better return values
    +	  (bug#13187) (tiny change)
     
    -	Issue a warning from the byte compiler on a malformed `setq' form.
    +2015-12-25  Lars Ingebrigtsen  
     
    -	Partly fixes bug#20241.
    -	* lisp/emacs-lisp/bytecomp.el (byte-compile-setq): Issue a warning when a
    -	`setq' form with an odd number of arguments is compiled.
    +	* eww.el (eww-display-html): Support 
  • ") \n)))) + (shape '(("shape" ("rect") ("circle") ("poly") ("default")))) (cell `(t ,@align ("valign" ,@valign) ("colspan" ,@1-9) ("rowspan" ,@1-9) - ("nowrap" t)))) + ("nowrap" t))) + (cellhalign '(("align" ("left") ("center") ("right") + ("justify") ("char")) + ("char") ("charoff"))) + (cellvalign '(("valign" ("top") ("middle") ("bottom") + ("baseline"))))) ;; put ,-expressions first, else byte-compile chokes (as of V19.29) ;; and like this it's more efficient anyway `(("a" ,name ,@link) + ("area" t ,@shape ("coords") ("href") ("nohref" "nohref") ("alt") + ("tabindex") ("accesskey") ("onfocus") ("onblur")) ("base" t ,@href) + ("col" t ,@cellhalign ,@cellvalign ("span") ("width")) + ("colgroup" \n ,@cellhalign ,@cellvalign ("span") ("width")) ("dir" ,@list) + ("figcaption") + ("figure" \n) ("font" nil "size" ("-1") ("+1") ("-2") ("+2") ,@1-7) ("form" (\n _ \n "" ">")) @@ -1798,6 +1831,9 @@ This takes effect when first loading the library.") ("h5" ,@align) ("h6" ,@align) ("hr" t ("size" ,@1-9) ("width") ("noshade" t) ,@align) + ("iframe" \n ,@ialign ("longdesc") ("name") ("src") + ("frameborder" ("1") ("0")) ("marginwidth") ("marginheight") + ("scrolling" ("yes") ("no") ("auto")) ("height") ("width")) ("img" t ("align" ,@valign ("texttop") ("absmiddle") ("absbottom")) ("src") ("alt") ("width" "1") ("height" "1") ("border" "1") ("vspace" "1") ("hspace" "1") ("ismap" t)) @@ -1819,14 +1855,17 @@ This takes effect when first loading the library.") "<" str ?> _ (if sgml-xml-mode (concat "<" str ">")) \n)) ("border" t ,@1-9) ("width" "10") ("cellpadding")) + ("tbody" \n ,@cellhalign ,@cellvalign) ("td" ,@cell) ("textarea" ,name ("rows" ,@1-9) ("cols" ,@1-9)) + ("tfoot" \n ,@cellhalign ,@cellvalign) ("th" ,@cell) + ("thead" \n ,@cellhalign ,@cellvalign) ("ul" ,@list ("type" ("disc") ("circle") ("square"))) ,@sgml-tag-alist - ("abbrev") + ("abbr") ("acronym") ("address") ("array" (nil \n @@ -1835,20 +1874,33 @@ This takes effect when first loading the library.") ("article" \n) ("aside" \n) ("au") + ("audio" \n + ("src") ("crossorigin" ("anonymous") ("use-credentials")) + ("preload" ("none") ("metadata") ("auto")) + ("autoplay" "autoplay") ("mediagroup") ("loop" "loop") + ("muted" "muted") ("controls" "controls")) ("b") + ("bdi") + ("bdo" nil ("lang") ("dir" ("ltr") ("rtl"))) ("big") ("blink") - ("blockquote" \n) + ("blockquote" \n ("cite")) ("body" \n ("background" ".gif") ("bgcolor" "#") ("text" "#") ("link" "#") ("alink" "#") ("vlink" "#")) ("box" (nil _ "" _ (if sgml-xml-mode ""))) ("br" t ("clear" ("left") ("right"))) + ("button" nil ("name") ("value") + ("type" ("submit") ("reset") ("button")) + ("disabled" "disabled") + ("tabindex") ("accesskey") ("onfocus") ("onblur")) + ("canvas" \n ("width") ("height")) ("caption" ("valign" ("top") ("bottom"))) ("center" \n) ("cite") ("code" \n) + ("datalist" \n) ("dd" ,(not sgml-xml-mode)) - ("del") + ("del" nil ("cite") ("datetime")) ("dfn") ("div") ("dl" (nil \n @@ -1858,8 +1910,14 @@ This takes effect when first loading the library.") ("dt" (t _ (if sgml-xml-mode "") "
    " (if sgml-xml-mode "
    ") \n)) ("em") + ("embed" t ("src") ("type") ("width") ("height")) + ("fieldset" \n) ("fn" "id" "fn") ;; Footnotes were deprecated in HTML 3.2 ("footer" \n) + ("frame" t ("longdesc") ("name") ("src") + ("frameborder" ("1") ("0")) ("marginwidth") ("marginheight") + ("noresize" "noresize") ("scrolling" ("yes") ("no") ("auto"))) + ("frameset" \n ("rows") ("cols") ("onload") ("onunload")) ("head" \n) ("header" \n) ("hgroup" \n) @@ -1874,24 +1932,49 @@ This takes effect when first loading the library.") "" )) ("i") - ("ins") + ("ins" nil ("cite") ("datetime")) ("isindex" t ("action") ("prompt")) ("kbd") + ("label" nil ("for") ("accesskey") ("onfocus") ("onblur")) ("lang") + ("legend" nil ("accesskey")) ("li" ,(not sgml-xml-mode)) + ("main" \n) + ("map" \n ("name")) + ("mark") ("math" \n) + ("meta" t ("http-equiv") ("name") ("content") ("scheme")) + ("meter" nil ("value") ("min") ("max") ("low") ("high") + ("optimum")) ("nav" \n) ("nobr") + ("noframes" \n) + ("noscript" \n) + ("object" \n ("declare" "declare") ("classid") ("codebase") + ("data") ("type") ("codetype") ("archive") ("standby") + ("height") ("width") ("usemap") ("name") ("tabindex")) + ("optgroup" \n ("name") ("size") ("multiple" "multiple") + ("disabled" "disabled") ("tabindex") ("onfocus") ("onblur") + ("onchange")) ("option" t ("value") ("label") ("selected" t)) + ("output" nil ("for") ("form") ("name")) ("over" t) + ("param" t ("name") ("value") + ("valuetype" ("data") ("ref") ("object")) ("type")) ("person") ;; Tag for person's name tag deprecated in HTML 3.2 ("pre" \n) - ("q") + ("progress" nil ("value") ("max")) + ("q" nil ("cite")) ("rev") + ("rp" t) + ("rt" t) + ("ruby") ("s") ("samp") + ("script" nil ("charset") ("type") ("src") ("defer" "defer")) ("section" \n) ("small") + ("source" t ("src") ("type") ("media")) ("span" nil ("class" ("builtin") @@ -1904,39 +1987,60 @@ This takes effect when first loading the library.") ("variable-name") ("warning"))) ("strong") + ("style" \n ("type") ("media") ("title")) ("sub") + ("summary") ("sup") + ("time" nil ("datetime")) ("title") ("tr" t) + ("track" t + ("kind" ("subtitles") ("captions") ("descriptions") + ("chapters") ("metadata")) + ("src") ("srclang") ("label") ("default")) ("tt") ("u") ("var") + ("video" \n + ("src") ("crossorigin" ("anonymous") ("use-credentials")) + ("poster") ("preload" ("none") ("metadata") ("auto")) + ("autoplay" "autoplay") ("mediagroup") ("loop" "loop") + ("muted" "muted") ("controls" "controls") ("width") ("height")) ("wbr" t))) "Value of `sgml-tag-alist' for HTML mode.") (defvar html-tag-help `(,@sgml-tag-help ("a" . "Anchor of point or link elsewhere") - ("abbrev" . "Abbreviation") + ("abbr" . "Abbreviation") ("acronym" . "Acronym") ("address" . "Formatted mail address") + ("area" . "Region of an image map") ("array" . "Math array") ("article" . "An independent part of document or site") ("aside" . "Secondary content related to surrounding content (e.g. page or article)") ("au" . "Author") + ("audio" . "Sound or audio stream") ("b" . "Bold face") ("base" . "Base address for URLs") + ("bdi" . "Text isolated for bidirectional formatting") + ("bdo" . "Override text directionality") ("big" . "Font size") ("blink" . "Blinking text") ("blockquote" . "Indented quotation") ("body" . "Document body") ("box" . "Math fraction") ("br" . "Line break") + ("button" . "Clickable button") + ("canvas" . "Script generated graphics canvas") ("caption" . "Table caption") ("center" . "Centered text") ("changed" . "Change bars") ("cite" . "Citation of a document") ("code" . "Formatted source code") + ("col" . "Group of attribute specifications for table columns") + ("colgroup" . "Group of columns") + ("datalist" . "A set of predefined options") ("dd" . "Definition of term") ("del" . "Deleted text") ("dfn" . "Defining instance of a term") @@ -1946,14 +2050,19 @@ This takes effect when first loading the library.") ("dt" . "Term to be defined") ("em" . "Emphasized") ("embed" . "Embedded data in foreign format") + ("fieldset" . "Group of related controls and labels") ("fig" . "Figure") ("figa" . "Figure anchor") + ("figcaption" . "Caption for a figure") ("figd" . "Figure description") ("figt" . "Figure text") + ("figure" . "Self-contained content, often with a caption") ("fn" . "Footnote") ;; No one supports special footnote rendering. ("font" . "Font size") ("footer" . "Footer of a section") ("form" . "Form with input fields") + ("frame" . "Frame in which another HTML document can be displayed") + ("frameset" . "Container for frames") ("group" . "Document grouping") ("h1" . "Most important section headline") ("h2" . "Important section headline") @@ -1967,50 +2076,78 @@ This takes effect when first loading the library.") ("hr" . "Horizontal rule") ("html" . "HTML Document") ("i" . "Italic face") + ("iframe" . "Inline frame with a nested browsing context") ("img" . "Graphic image") ("input" . "Form input field") ("ins" . "Inserted text") ("isindex" . "Input field for index search") ("kbd" . "Keyboard example face") + ("label" . "Caption for a user interface item") ("lang" . "Natural language") + ("legend" . "Caption for a fieldset") ("li" . "List item") ("link" . "Link relationship") + ("main" . "Main content of the document body") + ("map" . "Image map (a clickable link area") + ("mark" . "Highlighted text") ("math" . "Math formula") ("menu" . "List of commands") + ("meta" . "Document properties") + ("meter" . "Scalar measurement within a known range") ("mh" . "Form mail header") ("nav" . "Group of navigational links") ("nextid" . "Allocate new id") ("nobr" . "Text without line break") + ("noframes" . "Content for user agents that don't support frames") + ("noscript" . "Alternate content for when a script isn't executed") + ("object" . "External resource") ("ol" . "Ordered list") + ("optgroup" . "Group of options") ("option" . "Selection list item") + ("output" . "Result of a calculation or user action") ("over" . "Math fraction rule") ("p" . "Paragraph start") ("panel" . "Floating panel") + ("param" . "Parameters for an object") ("person" . "Person's name") ("pre" . "Preformatted fixed width text") + ("progress" . "Completion progress of a task") ("q" . "Quotation") ("rev" . "Reverse video") + ("rp" . "Fallback text for when ruby annotations aren't supported") + ("rt" . "Ruby text component of a ruby annotation") + ("ruby" . "Ruby annotation") ("s" . "Strikeout") ("samp" . "Sample text") + ("script" . "Executable script within a document") ("section" . "Section of a document") ("select" . "Selection list") ("small" . "Font size") + ("source" . "Media resource for media elements") ("sp" . "Nobreak space") ("span" . "Generic inline container") ("strong" . "Standout text") + ("style" . "Style information") ("sub" . "Subscript") + ("summary" . "Summary, caption, or legend") ("sup" . "Superscript") ("table" . "Table with rows and columns") ("tb" . "Table vertical break") + ("tbody" . "Table body") ("td" . "Table data cell") ("textarea" . "Form multiline edit area") + ("tfoot" . "Table foot") ("th" . "Table header cell") + ("thead" . "Table head") + ("time" . "Content with optional machine-readable timestamp") ("title" . "Document title") ("tr" . "Table row separator") + ("track" . "Timed text track for media elements") ("tt" . "Typewriter face") ("u" . "Underlined text") ("ul" . "Unordered list") ("var" . "Math variable face") + ("video" . "Video or movie") ("wbr" . "Enable
    within ")) "Value of variable `sgml-tag-help' for HTML mode.") diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 3ac68bdf79..973b2d373d 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -343,7 +343,7 @@ An alternative value is \" . \", if you use a font with a narrow period." (defun latex-imenu-create-index () "Generate an alist for imenu from a LaTeX buffer." (let ((section-regexp - (concat "\\\\" (regexp-opt (mapcar 'car latex-section-alist) t) + (concat "\\\\" (regexp-opt (mapcar #'car latex-section-alist) t) "\\*?[ \t]*{")) (metasection-regexp (concat "\\\\" (regexp-opt latex-metasection-list t))) @@ -373,7 +373,7 @@ An alternative value is \" . \", if you use a font with a narrow period." ;; Using sexps allows some use of matching {...} inside ;; titles. (forward-sexp 1) - (push (cons (concat (apply 'concat + (push (cons (concat (apply #'concat (make-list (max 0 (- i i0)) latex-imenu-indent-string)) @@ -413,7 +413,8 @@ An alternative value is \" . \", if you use a font with a narrow period." (defvar latex-outline-regexp (concat "\\\\" (regexp-opt (append latex-metasection-list - (mapcar 'car latex-section-alist)) t))) + (mapcar #'car latex-section-alist)) + t))) (defun latex-outline-level () (if (looking-at latex-outline-regexp) @@ -544,7 +545,8 @@ An alternative value is \" . \", if you use a font with a narrow period." (let* (;; ;; Names of commands whose arg should be fontified with fonts. (bold (regexp-opt '("textbf" "textsc" "textup" - "boldsymbol" "pmb") t)) + "boldsymbol" "pmb") + t)) (italic (regexp-opt '("textit" "textsl" "emph") t)) ;; FIXME: unimplemented yet. ;; (type (regexp-opt '("texttt" "textmd" "textrm" "textsf") t)) @@ -566,7 +568,8 @@ An alternative value is \" . \", if you use a font with a narrow period." '("linebreak" "nolinebreak" "pagebreak" "nopagebreak" "newline" "newpage" "clearpage" "cleardoublepage" "displaybreak" "allowdisplaybreaks" - "enlargethispage") t)) + "enlargethispage") + t)) (general "\\([a-zA-Z@]+\\**\\|[^ \t\n]\\)") ;; ;; Miscellany. @@ -649,7 +652,7 @@ An alternative value is \" . \", if you use a font with a narrow period." (defvar tex-verbatim-environments '("verbatim" "verbatim*")) (put 'tex-verbatim-environments 'safe-local-variable - (lambda (x) (null (delq t (mapcar 'stringp x))))) + (lambda (x) (null (delq t (mapcar #'stringp x))))) (eval-when-compile (defconst tex-syntax-propertize-rules @@ -1129,34 +1132,36 @@ subshell is initiated, `tex-shell-hook' is run." (concat "[ \t]*\\(\\$\\$\\|" "\\\\[][]\\|" "\\\\" (regexp-opt (append - (mapcar 'car latex-section-alist) + (mapcar #'car latex-section-alist) '("begin" "label" "end" "item" "bibitem" "newline" "noindent" "newpage" "footnote" "marginpar" - "parbox" "caption")) t) + "parbox" "caption")) + t) "\\>\\|\\\\[a-z]*" (regexp-opt '("space" "skip" "page") t) "\\>\\)")) (setq paragraph-separate (concat "[\f%]\\|[ \t]*\\($\\|" "\\\\[][]\\|" "\\\\" (regexp-opt (append - (mapcar 'car latex-section-alist) - '("begin" "label" "end" )) t) + (mapcar #'car latex-section-alist) + '("begin" "label" "end" )) + t) "\\>\\|\\\\\\(" (regexp-opt '("item" "bibitem" "newline" "noindent" "newpage" "footnote" "marginpar" "parbox" "caption")) "\\|\\$\\$\\|[a-z]*\\(space\\|skip\\|page[a-z]*\\)" "\\>\\)[ \t]*\\($\\|%\\)\\)")) - (setq-local imenu-create-index-function 'latex-imenu-create-index) + (setq-local imenu-create-index-function #'latex-imenu-create-index) (setq-local tex-face-alist tex-latex-face-alist) - (add-hook 'fill-nobreak-predicate 'latex-fill-nobreak-predicate nil t) - (setq-local indent-line-function 'latex-indent) + (add-hook 'fill-nobreak-predicate #'latex-fill-nobreak-predicate nil t) + (setq-local indent-line-function #'latex-indent) (setq-local fill-indent-according-to-mode t) (add-hook 'completion-at-point-functions - 'latex-complete-data nil 'local) + #'latex-complete-data nil 'local) (setq-local outline-regexp latex-outline-regexp) - (setq-local outline-level 'latex-outline-level) - (setq-local forward-sexp-function 'latex-forward-sexp) + (setq-local outline-level #'latex-outline-level) + (setq-local forward-sexp-function #'latex-forward-sexp) (setq-local skeleton-end-hook nil)) ;;;###autoload @@ -1206,6 +1211,8 @@ Entering SliTeX mode runs the hook `text-mode-hook', then the hook (defvar tildify-space-string) (defvar tildify-foreach-region-function) +(declare-function tildify-foreach-ignore-environments + "tildify" (pairs callback _beg end)) (defvar tex--prettify-symbols-alist) (defun tex-common-initialization () @@ -1217,7 +1224,7 @@ Entering SliTeX mode runs the hook `text-mode-hook', then the hook ;; rather than using regex-based filtering. (setq-local tildify-foreach-region-function (apply-partially - 'tildify-foreach-ignore-environments + #'tildify-foreach-ignore-environments `(("\\\\\\\\" . "") ; do not remove this (,(eval-when-compile (concat "\\\\begin{\\(" @@ -1535,8 +1542,7 @@ a skeleton (see `skeleton-insert').") Puts point on a blank line between them." (let ((choice (completing-read (format "LaTeX block name [%s]: " latex-block-default) - (append latex-block-names - latex-standard-block-names) + (latex-complete-envnames) nil nil nil nil latex-block-default))) (setq latex-block-default choice) (unless (or (member choice latex-standard-block-names) @@ -1593,17 +1599,32 @@ Puts point on a blank line between them." (complete-with-action action keys key pred))))) (defun latex-complete-envnames () - (append latex-block-names latex-standard-block-names)) + (completion-table-in-turn + (append latex-block-names latex-standard-block-names) + (completion-table-dynamic + (lambda (str) + (with-current-buffer (if (and (minibufferp) (minibuffer-selected-window)) + (window-buffer (minibuffer-selected-window)) + (current-buffer)) + (save-excursion + (let ((comps '()) + (pos (point))) + (goto-char (point-min)) + (while (re-search-forward (concat "\\\\begin{\\(" str "[^}\n ]*\\)") + nil t) + (unless (and (<= (match-beginning 0) pos) + (>= (match-end 0) pos)) + (push (match-string 1) comps))) + comps))))))) (defun latex-complete-refkeys () (when (boundp 'reftex-docstruct-symbol) (symbol-value reftex-docstruct-symbol))) (defvar latex-complete-alist - ;; TODO: Add \begin, \end, \ref, ... - '(("\\`\\\\\\(short\\)?cite\\'" . latex-complete-bibtex-keys) - ("\\`\\\\\\(begin\\|end\\)\\'" . latex-complete-envnames) - ("\\`\\\\[vf]?ref\\'" . latex-complete-refkeys))) + `(("\\`\\\\\\(short\\)?cite\\'" . ,#'latex-complete-bibtex-keys) + ("\\`\\\\\\(begin\\|end\\)\\'" . ,#'latex-complete-envnames) + ("\\`\\\\[vf]?ref\\'" . ,#'latex-complete-refkeys))) (defun latex-complete-data () "Get completion-data at point." @@ -2186,7 +2207,7 @@ of the current buffer." (defun tex-summarize-command (cmd) (if (not (stringp cmd)) "" - (mapconcat 'identity + (mapconcat #'identity (mapcar (lambda (s) (car (split-string s))) (split-string cmd "\\s-*\\(?:;\\|&&\\)\\s-*")) "&"))) @@ -2368,7 +2389,8 @@ Only applies the FSPEC to the args part of FORMAT." ;; Substitute and return. (if (and hist-cmd (string-match (concat "[' \t\"]" (format-spec "%r" fspec) - "\\([;&' \t\"]\\|\\'\\)") hist-cmd)) + "\\([;&' \t\"]\\|\\'\\)") + hist-cmd)) ;; The history command was already applied to the same file, ;; so just reuse it. hist-cmd @@ -2753,7 +2775,7 @@ Runs the shell command defined by `tex-show-queue-command'." (defvar tex-indent-item-re "\\\\\\(bib\\)?item\\>") (defvar latex-noindent-environments '("document")) (put 'latex-noindent-environments 'safe-local-variable - (lambda (x) (null (delq t (mapcar 'stringp x))))) + (lambda (x) (null (delq t (mapcar #'stringp x))))) (defvar tex-latex-indent-syntax-table (let ((st (make-syntax-table tex-mode-syntax-table))) diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el index c22f531440..ed6022f9fb 100644 --- a/lisp/textmodes/texinfo.el +++ b/lisp/textmodes/texinfo.el @@ -368,8 +368,10 @@ Subexpression 1 is what goes into the corresponding `@end' statement.") ;; their arguments frequently include a @@, and we don't want that ;; to overwrite the normal fontification of the argument. ("@\\(file\\|email\\){\\([^}]+\\)" 2 font-lock-string-face keep) - ("@\\(samp\\|code\\|var\\|math\\|env\\|command\\|option\\){\\([^}]+\\)" + ("@\\(samp\\|code\\|var\\|env\\|command\\|option\\){\\([^}]+\\)" 2 font-lock-variable-name-face keep) + ;; @math allows nested braces like @math{2^{12}} + ("@math{\\([^{}]*{?[^{}]*}?[^{}]*\\)}" 1 font-lock-variable-name-face) ("@\\(cite\\|x?ref\\|pxref\\|dfn\\|inforef\\){\\([^}]+\\)" 2 font-lock-constant-face) ("@\\(anchor\\){\\([^}]+\\)" 2 font-lock-type-face) diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 9920fa06d0..df5c52d4d6 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -603,7 +603,10 @@ Signal an error if the entire string was not used." ;;;###autoload (defun number-at-point () "Return the number at point, or nil if none is found." - (form-at-point 'sexp 'numberp)) + (when (thing-at-point-looking-at "-?[0-9]+\\.?[0-9]*" 500) + (string-to-number + (buffer-substring (match-beginning 0) (match-end 0))))) + (put 'number 'thing-at-point 'number-at-point) ;;;###autoload (defun list-at-point () diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el index d4cddc92f9..c053ea6e92 100644 --- a/lisp/time-stamp.el +++ b/lisp/time-stamp.el @@ -43,10 +43,7 @@ (defcustom time-stamp-format "%:y-%02m-%02d %02H:%02M:%02S %u" "Format of the string inserted by \\[time-stamp]. -The value may be a string or a list. Lists are supported only for -backward compatibility; see variable `time-stamp-old-format-warn'. - -A string is used verbatim except for character sequences beginning +This is a string, used verbatim except for character sequences beginning with %, as follows. The values of non-numeric formatted items depend on the locale setting recorded in `system-time-locale' and `locale-coding-system'. The examples here are for the default @@ -107,17 +104,6 @@ otherwise would have been updated." :group 'time-stamp :version "19.29") -(defcustom time-stamp-old-format-warn 'ask - "Action if `time-stamp-format' is an old-style list. -If `error', the format is not used. If `ask', the user is queried about -using the time-stamp-format. If `warn', a warning is displayed. -If nil, no notification is given." - :type '(choice (const :tag "Don't use the format" error) - (const ask) - (const warn) - (const :tag "No notification" nil)) - :group 'time-stamp) - (defcustom time-stamp-time-zone nil "The time zone to be used by \\[time-stamp]. Its format is that of the ZONE argument of the `format-time-string' function." @@ -420,26 +406,14 @@ With ARG, turn time stamping on if and only if arg is positive." "Generate the new string to be inserted by \\[time-stamp]. Optionally use format TS-FORMAT instead of `time-stamp-format' to format the string." - (or ts-format - (setq ts-format time-stamp-format)) - (if (stringp ts-format) - (time-stamp--format (time-stamp-string-preprocess ts-format) nil) - ;; handle version 1 compatibility - (cond ((or (eq time-stamp-old-format-warn 'error) - (and (eq time-stamp-old-format-warn 'ask) - (not (y-or-n-p "Use non-string time-stamp-format? ")))) - (message "Warning: no time-stamp: time-stamp-format not a string") - (sit-for 1) - nil) - (t - (cond ((eq time-stamp-old-format-warn 'warn) - (message "Obsolescent time-stamp-format type; should be string") - (sit-for 1))) - (time-stamp-fconcat ts-format " "))))) + (if (stringp (or ts-format (setq ts-format time-stamp-format))) + (time-stamp--format (time-stamp-string-preprocess ts-format) nil))) + (defconst time-stamp-no-file "(no file)" "String to use when the buffer is not associated with a file.") +;;; FIXME This comment was written in 1996! ;;; time-stamp is transitioning to using the new, expanded capabilities ;;; of format-time-string. During the process, this function implements ;;; intermediate, compatible formats and complains about old, soon to @@ -676,28 +650,6 @@ otherwise the value of the function `system-name'." mail-host-address) (system-name))) -;;; the rest of this file is for version 1 compatibility - -(defun time-stamp-fconcat (list sep) - "Similar to (mapconcat \\='funcall LIST SEP) but LIST allows literals. -If an element of LIST is a symbol, it is funcalled to get the string to use; -the separator SEP is used between two strings obtained by funcalling a -symbol. Otherwise the element itself is inserted; no separator is used -around literals." - (let ((return-string "") - (insert-sep-p nil)) - (while list - (cond ((symbolp (car list)) - (if insert-sep-p - (setq return-string (concat return-string sep))) - (setq return-string (concat return-string (funcall (car list)))) - (setq insert-sep-p t)) - (t - (setq return-string (concat return-string (car list))) - (setq insert-sep-p nil))) - (setq list (cdr list))) - return-string)) - (provide 'time-stamp) ;;; time-stamp.el ends here diff --git a/lisp/time.el b/lisp/time.el index e0d39b1958..ba5792441c 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -108,7 +108,10 @@ A value of nil means 1 <= hh <= 12, and an AM/PM suffix is used." :type 'boolean :group 'display-time) -(defvar display-time-string nil) +(defvar display-time-string nil + "String used in mode lines to display a time string. +It should not be set directly, but is instead updated by the +`display-time' function.") ;;;###autoload(put 'display-time-string 'risky-local-variable t) (defcustom display-time-hook nil diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index 4c7366adc8..6848230c28 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -353,6 +353,24 @@ to run the `url-cookie-setup-save-timer' function manually." url-cookie-save-interval #'url-cookie-write-file)))) +(defun url-cookie-delete-cookies (&optional regexp keep) + "Delete all cookies from the cookie store where the domain matches REGEXP. +If REGEXP is nil, all cookies are deleted. If KEEP is non-nil, +instead delete all cookies that do not match REGEXP." + (dolist (variable '(url-cookie-secure-storage url-cookie-storage)) + (let ((cookies (symbol-value variable))) + (dolist (elem cookies) + (when (or (and (null keep) + (or (null regexp) + (string-match regexp (car elem)))) + (and keep + regexp + (not (string-match regexp (car elem))))) + (setq cookies (delq elem cookies)))) + (set variable cookies))) + (setq url-cookies-changed-since-last-save t) + (url-cookie-write-file)) + ;;; Mode for listing and editing cookies. (defun url-cookie-list () diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el index 460ee0dd42..d898368cf9 100644 --- a/lisp/url/url-gw.el +++ b/lisp/url/url-gw.el @@ -246,8 +246,8 @@ overriding the value of `url-gateway-method'." :type gw-method ;; Use non-blocking socket if we can. :nowait (featurep 'make-network-process - '(:nowait t)))) - (`socks + '(:nowait t)))) + (`socks (socks-open-network-stream name buffer host service)) (`telnet (url-open-telnet name buffer host service)) diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index 717651df54..d3be880b38 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el @@ -269,7 +269,8 @@ A prefix arg makes KEEP-TIME non-nil." (error "Opening input file: No such file or directory, %s" url)) (with-current-buffer buffer (setq handle (mm-dissect-buffer t))) - (mm-save-part-to-file handle newname) + (let ((mm-attachment-file-modes (default-file-modes))) + (mm-save-part-to-file handle newname)) (kill-buffer buffer) (mm-destroy-parts handle))) (put 'copy-file 'url-file-handlers 'url-copy-file) diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 5832e92c5a..d0f8364e8e 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -26,6 +26,8 @@ ;;; Code: (require 'cl-lib) +(require 'puny) +(require 'nsm) (eval-when-compile (require 'subr-x)) @@ -135,6 +137,8 @@ request.") (507 insufficient-storage "Insufficient storage")) "The HTTP return codes and their text.") +(defconst url-https-default-port 443 "Default HTTPS port.") + ;(eval-when-compile ;; These are all macros so that they are hidden from external sight ;; when the file is byte-compiled. @@ -196,7 +200,14 @@ request.") ;; `url-open-stream' needs a buffer in which to do things ;; like authentication. But we use another buffer afterwards. (unwind-protect - (let ((proc (url-open-stream host buf host port gateway-method))) + (let ((proc (url-open-stream host buf + (if url-using-proxy + (url-host url-using-proxy) + host) + (if url-using-proxy + (url-port url-using-proxy) + port) + gateway-method))) ;; url-open-stream might return nil. (when (processp proc) ;; Drop the temp buffer link before killing the buffer. @@ -211,15 +222,36 @@ request.") (if connection (url-http-mark-connection-as-busy host port connection)))) +(defun url-http--user-agent-default-string () + "Compute a default User-Agent string based on `url-privacy-level'." + (let ((package-info (when url-package-name + (format "%s/%s" url-package-name url-package-version))) + (emacs-info (unless (and (listp url-privacy-level) + (memq 'emacs url-privacy-level)) + (format "Emacs/%s" emacs-version))) + (os-info (unless (and (listp url-privacy-level) + (memq 'os url-privacy-level)) + (format "(%s; %s)" url-system-type url-os-type))) + (url-info (format "URL/%s" url-version))) + (string-join (delq nil (list package-info url-info + emacs-info os-info)) + " "))) + ;; Building an HTTP request (defun url-http-user-agent-string () - (if (or (eq url-privacy-level 'paranoid) - (and (listp url-privacy-level) - (memq 'agent url-privacy-level))) - "" - (if (functionp url-user-agent) - (funcall url-user-agent) - url-user-agent))) + "Compute a User-Agent string. +The string is based on `url-privacy-level' and `url-user-agent'." + (let* ((hide-ua + (or (eq url-privacy-level 'paranoid) + (and (listp url-privacy-level) + (memq 'agent url-privacy-level)))) + (ua-string + (and (not hide-ua) + (cond + ((functionp url-user-agent) (funcall url-user-agent)) + ((stringp url-user-agent) url-user-agent) + ((eq url-user-agent 'default) (url-http--user-agent-default-string)))))) + (if ua-string (format "User-Agent: %s\r\n" (string-trim ua-string)) ""))) (defun url-http-create-request (&optional ref-url) "Create an HTTP request for `url-http-target-url', referred to by REF-URL." @@ -307,8 +339,9 @@ request.") (url-scheme-get-property (url-type url-http-target-url) 'default-port)) (format - "Host: %s:%d\r\n" host (url-port url-http-target-url)) - (format "Host: %s\r\n" host)) + "Host: %s:%d\r\n" (puny-encode-domain host) + (url-port url-http-target-url)) + (format "Host: %s\r\n" (puny-encode-domain host))) ;; Who its from (if url-personal-mail-address (concat @@ -475,6 +508,7 @@ work correctly." ) (declare-function gnutls-peer-status "gnutls.c" (proc)) +(declare-function gnutls-negotiate "gnutls.el") (defun url-http-parse-headers () "Parse and handle HTTP specific headers. @@ -588,15 +622,7 @@ should be shown to the user." ;; We do not support agent-driven negotiation, so we just ;; redirect to the preferred URI if one is provided. nil) - ((or `moved-permanently `found `temporary-redirect) ; 301 302 307 - ;; If the 301|302 status code is received in response to a - ;; request other than GET or HEAD, the user agent MUST NOT - ;; automatically redirect the request unless it can be - ;; confirmed by the user, since this might change the - ;; conditions under which the request was issued. - (unless (member url-http-method '("HEAD" "GET")) - (setq redirect-uri nil))) - (`see-other ; 303 + (`see-other ; 303 ;; The response to the request can be found under a different ;; URI and SHOULD be retrieved using a GET method on that ;; resource. @@ -931,7 +957,13 @@ should be shown to the user." (erase-buffer) (let ((url-request-method url-http-method) (url-request-extra-headers url-http-extra-headers) - (url-request-data url-http-data)) + (url-request-data url-http-data) + (url-using-proxy (url-find-proxy-for-url + url-current-object + (url-host url-current-object)))) + (when url-using-proxy + (setq url-using-proxy + (url-generic-parse-url url-using-proxy))) (url-http url-current-object url-callback-function url-callback-arguments (current-buffer))))) ((url-http-parse-headers) @@ -1195,34 +1227,40 @@ the end of the document." "Retrieve URL via HTTP asynchronously. URL must be a parsed URL. See `url-generic-parse-url' for details. -When retrieval is completed, execute the function CALLBACK, passing it -an updated value of CBARGS as arguments. The first element in CBARGS -should be a plist describing what has happened so far during the -request, as described in the docstring of `url-retrieve' (if in -doubt, specify nil). +When retrieval is completed, execute the function CALLBACK, +passing it an updated value of CBARGS as arguments. The first +element in CBARGS should be a plist describing what has happened +so far during the request, as described in the docstring of +`url-retrieve' (if in doubt, specify nil). The current buffer +then CALLBACK is executed is the retrieval buffer. Optional arg RETRY-BUFFER, if non-nil, specifies the buffer of a previous `url-http' call, which is being re-attempted. Optional arg GATEWAY-METHOD specifies the gateway to be used, -overriding the value of `url-gateway-method'." +overriding the value of `url-gateway-method'. + +The return value of this function is the retrieval buffer." (cl-check-type url vector "Need a pre-parsed URL.") (let* ((host (url-host (or url-using-proxy url))) (port (url-port (or url-using-proxy url))) (nsm-noninteractive (or url-request-noninteractive (and (boundp 'url-http-noninteractive) url-http-noninteractive))) - (connection (url-http-find-free-connection host port gateway-method)) + (connection (url-http-find-free-connection (url-host url) + (url-port url) + gateway-method)) (mime-accept-string url-mime-accept-string) (buffer (or retry-buffer (generate-new-buffer - (format " *http %s:%d*" host port))))) + (format " *http %s:%d*" (url-host url) (url-port url)))))) (if (not connection) ;; Failed to open the connection for some reason (progn (kill-buffer buffer) (setq buffer nil) - (error "Could not create connection to %s:%d" host port)) + (error "Could not create connection to %s:%d" (url-host url) + (url-port url))) (with-current-buffer buffer (mm-disable-multibyte) (setq url-current-object url @@ -1278,13 +1316,72 @@ overriding the value of `url-gateway-method'." (set-process-sentinel connection 'url-http-async-sentinel)) (`failed ;; Asynchronous connection failed - (error "Could not create connection to %s:%d" host port)) + (error "Could not create connection to %s:%d" (url-host url) + (url-port url))) (_ - (set-process-sentinel connection - 'url-http-end-of-document-sentinel) - (process-send-string connection (url-http-create-request)))))) + (if (and url-http-proxy (string= "https" + (url-type url-current-object))) + (url-https-proxy-connect connection) + (set-process-sentinel connection + 'url-http-end-of-document-sentinel) + (process-send-string connection (url-http-create-request))))))) buffer)) +(defun url-https-proxy-connect (connection) + (setq url-http-after-change-function 'url-https-proxy-after-change-function) + (process-send-string connection (format (concat "CONNECT %s:%d HTTP/1.1\r\n" + "Host: %s\r\n" + "\r\n") + (url-host url-current-object) + (or (url-port url-current-object) + url-https-default-port) + (url-host url-current-object)))) + +(defun url-https-proxy-after-change-function (st nd length) + (let* ((process-buffer (current-buffer)) + (proc (get-buffer-process process-buffer))) + (goto-char (point-min)) + (when (re-search-forward "^\r?\n" nil t) + (backward-char 1) + ;; Saw the end of the headers + (setq url-http-end-of-headers (set-marker (make-marker) (point))) + (url-http-parse-response) + (cond + ((null url-http-response-status) + ;; We got back a headerless malformed response from the + ;; server. + (url-http-activate-callback) + (error "Malformed response from proxy, fail!")) + ((= url-http-response-status 200) + (if (gnutls-available-p) + (condition-case e + (let ((tls-connection (gnutls-negotiate + :process proc + :hostname (url-host url-current-object) + :verify-error nil))) + ;; check certificate validity + (setq tls-connection + (nsm-verify-connection tls-connection + (url-host url-current-object) + (url-port url-current-object))) + (with-current-buffer process-buffer (erase-buffer)) + (set-process-buffer tls-connection process-buffer) + (setq url-http-after-change-function + 'url-http-wait-for-headers-change-function) + (set-process-filter tls-connection 'url-http-generic-filter) + (process-send-string tls-connection + (url-http-create-request))) + (gnutls-error + (url-http-activate-callback) + (error "gnutls-error: %s" e)) + (error + (url-http-activate-callback) + (error "error: %s" e))) + (error "error: gnutls support needed!"))) + (t + (message "error response: %d" url-http-response-status) + (url-http-activate-callback)))))) + (defun url-http-async-sentinel (proc why) ;; We are performing an asynchronous connection, and a status change ;; has occurred. @@ -1296,11 +1393,13 @@ overriding the value of `url-gateway-method'." (url-http-end-of-document-sentinel proc why)) ((string= (substring why 0 4) "open") (setq url-http-connection-opened t) - (condition-case error - (process-send-string proc (url-http-create-request)) - (file-error - (setq url-http-connection-opened nil) - (message "HTTP error: %s" error)))) + (if (and url-http-proxy (string= "https" (url-type url-current-object))) + (url-https-proxy-connect proc) + (condition-case error + (process-send-string proc (url-http-create-request)) + (file-error + (setq url-http-connection-opened nil) + (message "HTTP error: %s" error))))) (t (setf (car url-callback-arguments) (nconc (list :error (list 'error 'connection-failed why @@ -1461,7 +1560,6 @@ p3p ;; with url-http.el on systems with 8-character file names. (require 'tls) -(defconst url-https-default-port 443 "Default HTTPS port.") (defconst url-https-asynchronous-p t "HTTPS retrievals are asynchronous.") ;; FIXME what is the point of this alias being an autoload? diff --git a/lisp/url/url-queue.el b/lisp/url/url-queue.el index 0ff4ad1556..8972d0b056 100644 --- a/lisp/url/url-queue.el +++ b/lisp/url/url-queue.el @@ -1,4 +1,4 @@ -;;; url-queue.el --- Fetching web pages in parallel +;;; url-queue.el --- Fetching web pages in parallel -*- lexical-binding: t -*- ;; Copyright (C) 2011-2016 Free Software Foundation, Inc. @@ -47,6 +47,7 @@ ;;; Internal variables. (defvar url-queue nil) +(defvar url-queue-progress-timer nil) (cl-defstruct url-queue url callback cbargs silentp @@ -90,7 +91,13 @@ The variable `url-queue-timeout' sets a timeout." (when (and waiting (< running url-queue-parallel-processes)) (setf (url-queue-pre-triggered waiting) t) - (run-with-idle-timer 0.01 nil 'url-queue-run-queue)))) + ;; We start fetching from this idle timer... + (run-with-idle-timer 0.01 nil #'url-queue-run-queue) + ;; And then we set up a separate timer to ensure progress when a + ;; web server is unresponsive. + (unless url-queue-progress-timer + (setq url-queue-progress-timer + (run-with-idle-timer 1 1 #'url-queue-check-progress)))))) (defun url-queue-run-queue () (url-queue-prune-old-entries) @@ -107,6 +114,13 @@ The variable `url-queue-timeout' sets a timeout." (setf (url-queue-start-time waiting) (float-time)) (url-queue-start-retrieve waiting)))) +(defun url-queue-check-progress () + (when url-queue-progress-timer + (if url-queue + (url-queue-run-queue) + (cancel-timer url-queue-progress-timer) + (setq url-queue-progress-timer nil)))) + (defun url-queue-callback-function (status job) (setq url-queue (delq job url-queue)) (when (and (eq (car status) :error) diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el index 1ae2213eee..af18acd8b6 100644 --- a/lisp/url/url-util.el +++ b/lisp/url/url-util.el @@ -468,7 +468,7 @@ should return it unchanged." (and host (not (string-match "\\`\\[.*\\]\\'" host)) (setf (url-host obj) - (url-hexify-string host url-host-allowed-chars))) + (decode-coding-string (url-host obj) 'utf-8))) (if path (setq path (url-hexify-string path url-path-allowed-chars))) diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el index 960a04ad30..f6aae21a83 100644 --- a/lisp/url/url-vars.el +++ b/lisp/url/url-vars.el @@ -116,6 +116,7 @@ If a list, this should be a list of symbols of what NOT to send. Valid symbols are: email -- the email address os -- the operating system info +emacs -- the version of Emacs lastloc -- the last location agent -- do not send the User-Agent string cookies -- never accept HTTP cookies @@ -143,6 +144,7 @@ variable." (checklist :tag "Custom" (const :tag "Email address" :value email) (const :tag "Operating system" :value os) + (const :tag "Emacs version" :value emacs) (const :tag "Last location" :value lastloc) (const :tag "Browser identification" :value agent) (const :tag "No cookies" :value cookie))) @@ -357,16 +359,21 @@ Currently supported methods: (const :tag "Direct connection" :value native)) :group 'url-hairy) -(defcustom url-user-agent (format "User-Agent: %sURL/%s\r\n" - (if url-package-name - (concat url-package-name "/" - url-package-version " ") - "") url-version) - "User Agent used by the URL package for HTTP/HTTPS requests -Should be a string or a function of no arguments returning a string." - :type '(choice (string :tag "A static User-Agent string") - (function :tag "Call a function to get the User-Agent string")) - :version "25.1" +(defcustom url-user-agent 'default + "User Agent used by the URL package for HTTP/HTTPS requests. +Should be one of: +* A string (not including the \"User-Agent:\" prefix) +* A function of no arguments, returning a string +* `default' (to compute a value according to `url-privacy-level') +* nil (to omit the User-Agent header entirely)" + :type + '(choice + (string :tag "A static User-Agent string") + (function :tag "Call a function to get the User-Agent string") + (const :tag "No User-Agent at all" :value nil) + (const :tag "An string auto-generated according to `url-privacy-level'" + :value default)) + :version "25.2" :group 'url) (defvar url-setup-done nil "Has setup configuration been done?") diff --git a/lisp/url/url.el b/lisp/url/url.el index 91adada5e8..6d710e02d6 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el @@ -221,17 +221,20 @@ URL-encoded before it's used." buffer)) ;;;###autoload -(defun url-retrieve-synchronously (url &optional silent inhibit-cookies) +(defun url-retrieve-synchronously (url &optional silent inhibit-cookies timeout) "Retrieve URL synchronously. Return the buffer containing the data, or nil if there are no data associated with it (the case for dired, info, or mailto URLs that need no further processing). URL is either a string or a parsed URL. -If SILENT is non-nil, don't display progress reports and similar messages. -If INHIBIT-COOKIES is non-nil, cookies will neither be stored nor sent -to the server." + +If SILENT is non-nil, don't do any messaging while retrieving. +If INHIBIT-COOKIES is non-nil, refuse to store cookies. If +TIMEOUT is passed, it should be a number that says (in seconds) +how long to wait for a response before giving up." (url-do-setup) (let ((retrieval-done nil) + (start-time (current-time)) (asynch-buffer nil)) (setq asynch-buffer (url-retrieve url (lambda (&rest ignored) @@ -253,7 +256,11 @@ to the server." ;; buffer-local variable so we can find the exact process that we ;; should be waiting for. In the mean time, we'll just wait for any ;; process output. - (while (not retrieval-done) + (while (and (not retrieval-done) + (or (not timeout) + (< (float-time (time-subtract + (current-time) start-time)) + timeout))) (url-debug 'retrieval "Spinning in url-retrieve-synchronously: %S (%S)" retrieval-done asynch-buffer) @@ -284,7 +291,7 @@ to the server." ;; `sleep-for' was tried but it lead to other forms of ;; hanging. --Stef (unless (or (with-local-quit - (accept-process-output proc)) + (accept-process-output proc 1)) (null proc)) ;; accept-process-output returned nil, maybe because the process ;; exited (and may have been replaced with another). If we got diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index fa02a5a1f5..9076d834c7 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -171,6 +171,14 @@ Note: The search is conducted only within 10%, at the beginning of the file." :type '(repeat regexp) :group 'change-log) +(defcustom change-log-directory-files '(".bzr" ".git" ".hg" ".svn") + "List of files that cause `find-change-log' to stop in containing directory. +This applies if no pre-existing ChangeLog is found. If nil, then in such +a case simply use the directory containing the changed file." + :version "25.2" + :type '(repeat file) + :group 'change-log) + (defface change-log-date '((t (:inherit font-lock-string-face))) "Face used to highlight dates in date lines." @@ -582,25 +590,14 @@ If a string, interpret as the ZONE argument of `format-time-string'.") (lambda (x) (or (booleanp x) (stringp x)))) (defun add-log-iso8601-time-zone (&optional time zone) - (let* ((utc-offset (or (car (current-time-zone time zone)) 0)) - (sign (if (< utc-offset 0) ?- ?+)) - (sec (abs utc-offset)) - (ss (% sec 60)) - (min (/ sec 60)) - (mm (% min 60)) - (hh (/ min 60))) - (format (cond ((not (zerop ss)) "%c%02d:%02d:%02d") - ((not (zerop mm)) "%c%02d:%02d") - (t "%c%02d")) - sign hh mm ss))) + (declare (obsolete nil "25.2")) + (format-time-string "%:::z" time zone)) (defvar add-log-iso8601-with-time-zone nil) (defun add-log-iso8601-time-string (&optional time zone) - (let ((date (format-time-string "%Y-%m-%d" time zone))) - (if add-log-iso8601-with-time-zone - (concat date " " (add-log-iso8601-time-zone time zone)) - date))) + (format-time-string + (if add-log-iso8601-with-time-zone "%Y-%m-%d %:::z" "%Y-%m-%d") time zone)) (defun change-log-name () "Return (system-dependent) default name for a change log file." @@ -690,7 +687,11 @@ If `change-log-default-name' is nil, behave as though it were \"ChangeLog\" If `change-log-default-name' contains a leading directory component, then simply find it in the current directory. Otherwise, search in the current -directory and its successive parents for a file so named. +directory and its successive parents for a file so named. Stop at the first +such file that exists (or has a buffer visiting it), or the first directory +that contains any of `change-log-directory-files'. If no match is found, +use the current directory. To override the choice of this function, +simply create an empty ChangeLog file first by hand in the desired place. Once a file is found, `change-log-default-name' is set locally in the current buffer to the complete file name. @@ -723,24 +724,27 @@ Optional arg BUFFER-FILE overrides `buffer-file-name'." ;; for several related directories. (setq file-name (file-chase-links file-name)) (setq file-name (expand-file-name file-name)) - ;; Move up in the dir hierarchy till we find a change log file. - (let ((file1 file-name) - parent-dir) - (while (and (not (or (get-file-buffer file1) (file-exists-p file1))) - (progn (setq parent-dir - (file-name-directory - (directory-file-name - (file-name-directory file1)))) - ;; Give up if we are already at the root dir. - (not (string= (file-name-directory file1) - parent-dir)))) - ;; Move up to the parent dir and try again. - (setq file1 (expand-file-name - (file-name-nondirectory (change-log-name)) - parent-dir))) - ;; If we found a change log in a parent, use that. - (if (or (get-file-buffer file1) (file-exists-p file1)) - (setq file-name file1))))) + (let* ((cbase (file-name-nondirectory (change-log-name))) + (root + (locate-dominating-file + file-name + (lambda (dir) + (or + (let ((clog (expand-file-name cbase dir))) + (or (get-file-buffer clog) (file-exists-p clog))) + ;; Stop at VCS root? + (and change-log-directory-files + (let ((files change-log-directory-files) + found) + (while + (and + (not + (setq found + (file-exists-p + (expand-file-name (car files) dir)))) + (setq files (cdr files)))) + found))))))) + (if root (setq file-name (expand-file-name cbase root)))))) ;; Make a local variable in this buffer so we needn't search again. (set (make-local-variable 'change-log-default-name) file-name)) file-name) @@ -895,8 +899,10 @@ non-nil, otherwise in local time." "\\(\\s \\|[(),:]\\)") bound t))) ;; Add to the existing item for the same file. - (re-search-forward "^\\s *$\\|^\\s \\*") - (goto-char (match-beginning 0)) + (if (re-search-forward "^\\s *$\\|^\\s \\*" nil t) + (goto-char (match-beginning 0)) + (goto-char (point-max)) + (insert "\n")) ;; Delete excess empty lines; make just 2. (while (and (not (eobp)) (looking-at "^\\s *$")) (delete-region (point) (line-beginning-position 2))) diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index 5419d47781..c12602c715 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -1141,11 +1141,8 @@ of the current buffer." )) (defun ediff-file-compressed-p (file) - (condition-case nil - (require 'jka-compr) - (error)) - (if (featurep 'jka-compr) - (string-match (jka-compr-build-file-regexp) file))) + (require 'jka-compr) + (string-match (jka-compr-build-file-regexp) file)) (defun ediff-swap-buffers () @@ -1293,7 +1290,8 @@ which see." (cond ((eq ediff-window-setup-function 'ediff-setup-windows-multiframe) (setq ediff-multiframe nil) - (setq window-setup-func 'ediff-setup-windows-plain)) + (setq window-setup-func 'ediff-setup-windows-plain) + (message "ediff is now in 'plain' mode")) ((eq ediff-window-setup-function 'ediff-setup-windows-plain) (if (ediff-in-control-buffer-p) (ediff-kill-bottom-toolbar)) @@ -1301,14 +1299,15 @@ which see." (window-live-p ediff-control-window)) (set-window-dedicated-p ediff-control-window nil)) (setq ediff-multiframe t) - (setq window-setup-func 'ediff-setup-windows-multiframe)) + (setq window-setup-func 'ediff-setup-windows-multiframe) + (message "ediff is now in 'multiframe' mode")) (t (if (and (ediff-buffer-live-p ediff-control-buffer) (window-live-p ediff-control-window)) (set-window-dedicated-p ediff-control-window nil)) (setq ediff-multiframe t) (setq window-setup-func 'ediff-setup-windows-multiframe)) - ) + (message "ediff is now in 'multiframe' mode")) ;; change default (setq-default ediff-window-setup-function window-setup-func) diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 71099ab4d6..a4244c941d 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -1367,7 +1367,8 @@ buffer. If odd -- assume it is in a file." (require 'ediff-ptch) (setq patch-buf (ediff-get-patch-buffer - (if arg (prefix-numeric-value arg)) patch-buf)) + (and arg (prefix-numeric-value arg)) + (and patch-buf (get-buffer patch-buf)))) (setq source-dir (cond (ediff-use-last-dir ediff-last-dir-patch) ((and (not ediff-patch-default-directory) (buffer-file-name patch-buf)) @@ -1401,9 +1402,8 @@ patch. If not given, the user is prompted according to the prefix argument." (if arg (prefix-numeric-value arg)) patch-buf)) (ediff-patch-buffer-internal patch-buf - (read-buffer - "Which buffer to patch? " - (ediff-other-buffer patch-buf)))) + (read-buffer "Which buffer to patch? " (ediff-other-buffer patch-buf) + 'require-match))) ;;;###autoload diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index 489ece81be..5198624ea7 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el @@ -67,34 +67,34 @@ (append '("-d" "-b") (if (listp diff-switches) diff-switches (list diff-switches))) "A list of strings specifying switches to be passed to diff. -Used in `smerge-diff-base-mine' and related functions." +Used in `smerge-diff-base-upper' and related functions." :type '(repeat string)) (defcustom smerge-auto-leave t "Non-nil means to leave `smerge-mode' when the last conflict is resolved." :type 'boolean) -(defface smerge-mine +(defface smerge-upper '((((class color) (min-colors 88) (background light)) :background "#ffdddd") (((class color) (min-colors 88) (background dark)) :background "#553333") (((class color)) :foreground "red")) - "Face for your code.") -(define-obsolete-face-alias 'smerge-mine-face 'smerge-mine "22.1") -(defvar smerge-mine-face 'smerge-mine) + "Face for the `upper' version of a conflict.") +(define-obsolete-face-alias 'smerge-mine 'smerge-upper "25.2") +(defvar smerge-upper-face 'smerge-upper) -(defface smerge-other +(defface smerge-lower '((((class color) (min-colors 88) (background light)) :background "#ddffdd") (((class color) (min-colors 88) (background dark)) :background "#335533") (((class color)) :foreground "green")) - "Face for the other code.") -(define-obsolete-face-alias 'smerge-other-face 'smerge-other "22.1") -(defvar smerge-other-face 'smerge-other) + "Face for the `lower' version of a conflict.") +(define-obsolete-face-alias 'smerge-other 'smerge-lower "25.2") +(defvar smerge-lower-face 'smerge-lower) (defface smerge-base '((((class color) (min-colors 88) (background light)) @@ -149,16 +149,18 @@ Used in `smerge-diff-base-mine' and related functions." ("r" . smerge-resolve) ("a" . smerge-keep-all) ("b" . smerge-keep-base) - ("o" . smerge-keep-other) - ("m" . smerge-keep-mine) + ("o" . smerge-keep-lower) ; for the obsolete keep-other + ("l" . smerge-keep-lower) + ("m" . smerge-keep-upper) ; for the obsolete keep-mine + ("u" . smerge-keep-upper) ("E" . smerge-ediff) ("C" . smerge-combine-with-next) ("R" . smerge-refine) ("\C-m" . smerge-keep-current) ("=" . ,(make-sparse-keymap "Diff")) - ("=<" "base-mine" . smerge-diff-base-mine) - ("=>" "base-other" . smerge-diff-base-other) - ("==" "mine-other" . smerge-diff-mine-other)) + ("=<" "base-upper" . smerge-diff-base-upper) + ("=>" "base-lower" . smerge-diff-base-lower) + ("==" "upper-lower" . smerge-diff-upper-lower)) "The base keymap for `smerge-mode'.") (defcustom smerge-command-prefix "\C-c^" @@ -196,19 +198,19 @@ Used in `smerge-diff-base-mine' and related functions." "--" ["Revert to Base" smerge-keep-base :help "Revert to base version" :active (smerge-check 2)] - ["Keep Other" smerge-keep-other :help "Keep `other' version" - :active (smerge-check 3)] - ["Keep Yours" smerge-keep-mine :help "Keep your version" + ["Keep Upper" smerge-keep-upper :help "Keep `upper' version" :active (smerge-check 1)] + ["Keep Lower" smerge-keep-lower :help "Keep `lower' version" + :active (smerge-check 3)] "--" - ["Diff Base/Mine" smerge-diff-base-mine - :help "Diff `base' and `mine' for current conflict" + ["Diff Base/Upper" smerge-diff-base-upper + :help "Diff `base' and `upper' for current conflict" :active (smerge-check 2)] - ["Diff Base/Other" smerge-diff-base-other - :help "Diff `base' and `other' for current conflict" + ["Diff Base/Lower" smerge-diff-base-lower + :help "Diff `base' and `lower' for current conflict" :active (smerge-check 2)] - ["Diff Mine/Other" smerge-diff-mine-other - :help "Diff `mine' and `other' for current conflict" + ["Diff Upper/Lower" smerge-diff-upper-lower + :help "Diff `upper' and `lower' for current conflict" :active (smerge-check 1)] "--" ["Invoke Ediff" smerge-ediff @@ -223,7 +225,7 @@ Used in `smerge-diff-base-mine' and related functions." )) (easy-menu-define smerge-context-menu nil - "Context menu for mine area in `smerge-mode'." + "Context menu for upper area in `smerge-mode'." '(nil ["Keep Current" smerge-keep-current :help "Use current (at point) version"] ["Kill Current" smerge-kill-current :help "Remove current (at point) version"] @@ -234,9 +236,9 @@ Used in `smerge-diff-base-mine' and related functions." (defconst smerge-font-lock-keywords '((smerge-find-conflict - (1 smerge-mine-face prepend t) + (1 smerge-upper-face prepend t) (2 smerge-base-face prepend t) - (3 smerge-other-face prepend t) + (3 smerge-lower-face prepend t) ;; FIXME: `keep' doesn't work right with syntactic fontification. (0 smerge-markers-face keep) (4 nil t t) @@ -246,7 +248,7 @@ Used in `smerge-diff-base-mine' and related functions." (defconst smerge-begin-re "^<<<<<<< \\(.*\\)\n") (defconst smerge-end-re "^>>>>>>> \\(.*\\)\n") (defconst smerge-base-re "^||||||| \\(.*\\)\n") -(defconst smerge-other-re "^=======\n") +(defconst smerge-lower-re "^=======\n") (defvar smerge-conflict-style nil "Keep track of which style of conflict is in use. @@ -267,7 +269,7 @@ Can be nil if the style is undecided, or else: (if diff-auto-refine-mode (condition-case nil (smerge-refine) (error nil)))) -(defconst smerge-match-names ["conflict" "mine" "base" "other"]) +(defconst smerge-match-names ["conflict" "upper" "base" "lower"]) (defun smerge-ensure-match (n) (unless (match-end n) @@ -570,7 +572,7 @@ major modes. Uses `smerge-resolve-function' to do the actual work." (zerop (call-process diff-command nil buf nil "-bc" b m))) (set-match-data md) (smerge-keep-n 3)) - ;; Try "diff -b BASE MINE | patch OTHER". + ;; Try "diff -b BASE UPPER | patch LOWER". ((when (and (not safe) m2e b ;; If the BASE is empty, this would just concatenate ;; the two, which is rarely right. @@ -585,7 +587,7 @@ major modes. Uses `smerge-resolve-function' to do the actual work." (narrow-to-region m0b m0e) (smerge-remove-props m0b m0e) (insert-file-contents o nil nil nil t))) - ;; Try "diff -b BASE OTHER | patch MINE". + ;; Try "diff -b BASE LOWER | patch UPPER". ((when (and (not safe) m2e b ;; If the BASE is empty, this would just concatenate ;; the two, which is rarely right. @@ -685,22 +687,40 @@ major modes. Uses `smerge-resolve-function' to do the actual work." (smerge-keep-n 2) (smerge-auto-leave)) -(defun smerge-keep-other () - "Use \"other\" version." +(defun smerge-keep-lower () + "Keep the \"lower\" version of a merge conflict. +In a conflict that looks like: + <<<<<<< + UUU + ======= + LLL + >>>>>>> +this keeps \"LLL\"." (interactive) (smerge-match-conflict) ;;(smerge-ensure-match 3) (smerge-keep-n 3) (smerge-auto-leave)) -(defun smerge-keep-mine () - "Keep your version." +(define-obsolete-function-alias 'smerge-keep-other 'smerge-keep-lower "25.2") + +(defun smerge-keep-upper () + "Keep the \"upper\" version of a merge conflict. +In a conflict that looks like: + <<<<<<< + UUU + ======= + LLL + >>>>>>> +this keeps \"UUU\"." (interactive) (smerge-match-conflict) ;;(smerge-ensure-match 1) (smerge-keep-n 1) (smerge-auto-leave)) +(define-obsolete-function-alias 'smerge-keep-mine 'smerge-keep-upper "25.2") + (defun smerge-get-current () (let ((i 3)) (while (or (not (match-end i)) @@ -734,28 +754,37 @@ major modes. Uses `smerge-resolve-function' to do the actual work." (smerge-keep-n (car left)) (smerge-auto-leave)))))) -(defun smerge-diff-base-mine () - "Diff `base' and `mine' version in current conflict region." +(defun smerge-diff-base-upper () + "Diff `base' and `upper' version in current conflict region." (interactive) (smerge-diff 2 1)) -(defun smerge-diff-base-other () - "Diff `base' and `other' version in current conflict region." +(define-obsolete-function-alias 'smerge-diff-base-mine + 'smerge-diff-base-upper "25.2") + +(defun smerge-diff-base-lower () + "Diff `base' and `lower' version in current conflict region." (interactive) (smerge-diff 2 3)) -(defun smerge-diff-mine-other () - "Diff `mine' and `other' version in current conflict region." +(define-obsolete-function-alias 'smerge-diff-base-other + 'smerge-diff-base-lower "25.2") + +(defun smerge-diff-upper-lower () + "Diff `upper' and `lower' version in current conflict region." (interactive) (smerge-diff 1 3)) +(define-obsolete-function-alias 'smerge-diff-mine-other + 'smerge-diff-upper-lower "25.2") + (defun smerge-match-conflict () "Get info about the conflict. Puts the info in the `match-data'. The submatches contain: 0: the whole conflict. - 1: your code. - 2: the base code. - 3: other code. + 1: upper version of the code. + 2: base version of the code. + 3: lower version of the code. An error is raised if not inside a conflict." (save-excursion (condition-case nil @@ -765,26 +794,26 @@ An error is raised if not inside a conflict." (_ (re-search-backward smerge-begin-re)) (start (match-beginning 0)) - (mine-start (match-end 0)) + (upper-start (match-end 0)) (filename (or (match-string 1) "")) (_ (re-search-forward smerge-end-re)) (_ (cl-assert (< orig-point (match-end 0)))) - (other-end (match-beginning 0)) + (lower-end (match-beginning 0)) (end (match-end 0)) - (_ (re-search-backward smerge-other-re start)) + (_ (re-search-backward smerge-lower-re start)) - (mine-end (match-beginning 0)) - (other-start (match-end 0)) + (upper-end (match-beginning 0)) + (lower-start (match-end 0)) base-start base-end) ;; handle the various conflict styles (cond ((save-excursion - (goto-char mine-start) + (goto-char upper-start) (re-search-forward smerge-begin-re end t)) ;; There's a nested conflict and we're after the beginning ;; of the outer one but before the beginning of the inner one. @@ -797,8 +826,8 @@ An error is raised if not inside a conflict." ((re-search-backward smerge-base-re start t) ;; a 3-parts conflict (set (make-local-variable 'smerge-conflict-style) 'diff3-A) - (setq base-end mine-end) - (setq mine-end (match-beginning 0)) + (setq base-end upper-end) + (setq upper-end (match-beginning 0)) (setq base-start (match-end 0))) ((string= filename (file-name-nondirectory @@ -811,17 +840,17 @@ An error is raised if not inside a conflict." (equal filename "ANCESTOR") (string-match "\\`[.0-9]+\\'" filename))) ;; a same-diff conflict - (setq base-start mine-start) - (setq base-end mine-end) - (setq mine-start other-start) - (setq mine-end other-end))) + (setq base-start upper-start) + (setq base-end upper-end) + (setq upper-start lower-start) + (setq upper-end lower-end))) (store-match-data (list start end - mine-start mine-end + upper-start upper-end base-start base-end - other-start other-end + lower-start lower-end (when base-start (1- base-start)) base-start - (1- other-start) other-start)) + (1- lower-start) lower-start)) t) (search-failed (user-error "Point not in conflict region"))))) @@ -1133,10 +1162,10 @@ repeating the command will highlight other two parts." '((smerge . refine) (face . smerge-refined-added)))))) (defun smerge-swap () - "Swap the \"Mine\" and the \"Other\" chunks. + "Swap the \"Upper\" and the \"Lower\" chunks. Can be used before things like `smerge-keep-all' or `smerge-resolve' where the ordering can have some subtle influence on the result, such as preferring the -spacing of the \"Other\" chunk." +spacing of the \"Lower\" chunk." (interactive) (smerge-match-conflict) (goto-char (match-beginning 3)) @@ -1205,9 +1234,9 @@ spacing of the \"Other\" chunk." default))) ;;;###autoload -(defun smerge-ediff (&optional name-mine name-other name-base) +(defun smerge-ediff (&optional name-upper name-lower name-base) "Invoke ediff to resolve the conflicts. -NAME-MINE, NAME-OTHER, and NAME-BASE, if non-nil, are used for the +NAME-UPPER, NAME-LOWER, and NAME-BASE, if non-nil, are used for the buffer names." (interactive) (let* ((buf (current-buffer)) @@ -1215,18 +1244,18 @@ buffer names." ;;(ediff-default-variant 'default-B) (config (current-window-configuration)) (filename (file-name-nondirectory (or buffer-file-name "-"))) - (mine (generate-new-buffer - (or name-mine + (upper (generate-new-buffer + (or name-upper (concat "*" filename " " - (smerge--get-marker smerge-begin-re "MINE") + (smerge--get-marker smerge-begin-re "UPPER") "*")))) - (other (generate-new-buffer - (or name-other + (lower (generate-new-buffer + (or name-lower (concat "*" filename " " - (smerge--get-marker smerge-end-re "OTHER") + (smerge--get-marker smerge-end-re "LOWER") "*")))) base) - (with-current-buffer mine + (with-current-buffer upper (buffer-disable-undo) (insert-buffer-substring buf) (goto-char (point-min)) @@ -1237,7 +1266,7 @@ buffer names." (set-buffer-modified-p nil) (funcall mode)) - (with-current-buffer other + (with-current-buffer lower (buffer-disable-undo) (insert-buffer-substring buf) (goto-char (point-min)) @@ -1269,9 +1298,9 @@ buffer names." ;; Fire up ediff. (set-buffer (if base - (ediff-merge-buffers-with-ancestor mine other base) + (ediff-merge-buffers-with-ancestor upper lower base) ;; nil 'ediff-merge-revisions-with-ancestor buffer-file-name) - (ediff-merge-buffers mine other))) + (ediff-merge-buffers upper lower))) ;; nil 'ediff-merge-revisions buffer-file-name))) ;; Ediff is now set up, and we are in the control buffer. @@ -1313,21 +1342,21 @@ with a \\[universal-argument] prefix, makes up a 3-way conflict." (pcase-let ((`(,pt1 ,pt2 ,pt3 ,pt4) (sort `(,pt1 ,pt2 ,pt3 ,@(if pt4 (list pt4))) '>=))) (goto-char pt1) (beginning-of-line) - (insert ">>>>>>> OTHER\n") + (insert ">>>>>>> LOWER\n") (goto-char pt2) (beginning-of-line) (insert "=======\n") (goto-char pt3) (beginning-of-line) (when pt4 (insert "||||||| BASE\n") (goto-char pt4) (beginning-of-line)) - (insert "<<<<<<< MINE\n")) + (insert "<<<<<<< UPPER\n")) (if smerge-mode nil (smerge-mode 1)) (smerge-refine)) (defconst smerge-parsep-re (concat smerge-begin-re "\\|" smerge-end-re "\\|" - smerge-base-re "\\|" smerge-other-re "\\|")) + smerge-base-re "\\|" smerge-lower-re "\\|")) ;;;###autoload (define-minor-mode smerge-mode diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index 59f2ae329e..a5515420a1 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -669,7 +669,7 @@ BACKEND, if non-nil, specifies a VC backend for the Log Edit buffer." (make-local-variable 'vc-log-after-operation-hook) (when after-hook (setq vc-log-after-operation-hook after-hook)) - (setq vc-log-operation action) + (set (make-local-variable 'vc-log-operation) action) (when comment (erase-buffer) (when (stringp comment) (insert comment))) @@ -711,6 +711,7 @@ the buffer contents as a comment." (funcall log-operation log-fileset log-entry)) + (setq vc-log-operation nil) ;; Quit windows on logbuf. (cond diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index f35c84d50c..16cbeef57e 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1005,7 +1005,9 @@ or BRANCH^ (where \"^\" can be repeated)." (goto-char (point-min)) (unless (eobp) ;; Indent the expanded log entry. - (indent-region (point-min) (point-max) 2) + (while (re-search-forward "^ " nil t) + (replace-match "") + (forward-line)) (buffer-string)))) (defun vc-git-region-history (file buffer lfrom lto) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 2d8bab7059..5fb93bc0c8 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -48,7 +48,7 @@ ;; - dir-printer (fileinfo) OK ;; * working-revision (file) OK ;; * checkout-model (files) OK -;; - mode-line-string (file) NOT NEEDED +;; - mode-line-string (file) OK ;; STATE-CHANGING FUNCTIONS ;; * register (files &optional rev comment) OK ;; * create-repo () OK @@ -197,6 +197,11 @@ highlighting the Log View buffer." (defun vc-hg-state (file) "Hg-specific version of `vc-state'." + (let ((state (vc-hg-state-fast file))) + (if (eq state 'unsupported) (vc-hg-state-slow file) state))) + +(defun vc-hg-state-slow (file) + "Determine status of FILE by running hg." (setq file (expand-file-name file)) (let* ((status nil) @@ -245,6 +250,130 @@ highlighting the Log View buffer." "parent" "--template" "{rev}"))) "0")) +(defcustom vc-hg-symbolic-revision-styles + '(builtin-active-bookmark + "{if(bookmarks,sub(' ',',',bookmarks),if(phabdiff,phabdiff,shortest(node,6)))}") + "List of ways to present versions symbolically. The version +that we use is the first one that successfully produces a +non-empty string. + +Each entry in the list can be either: + +- The symbol `builtin-active-bookmark', which indicates that we +should use the active bookmark if one exists. A template can +supply this information as well, but `builtin-active-bookmark' is +handled entirely inside Emacs and so is more efficient than using +the generic Mercurial mechanism. + +- A string giving the Mercurial template to supply to \"hg +parent\". \"hg help template\" may be useful reading. + +- A function to call; it should accept two arguments (a revision +and an optional path to which to limit history) and produce a +string. The function is called with `default-directory' set to +within the repository. + +If no list entry produces a useful revision, return `nil'." + :type '(repeat (choice + (const :tag "Active bookmark" 'bookmark) + (string :tag "Hg template") + (function :tag "Custom"))) + :version "25.2" + :group 'vc-hg) + +(defcustom vc-hg-use-file-version-for-mode-line-version nil + "When enabled, the modeline contains revision information for the visited file. +When not, the revision in the modeline is for the repository +working copy. `nil' is the much faster setting for +large repositories." + :type 'boolean + :version "25.2" + :group 'vc-hg) + +(defun vc-hg--active-bookmark-internal (rev) + (when (equal rev ".") + (let* ((current-bookmarks-file ".hg/bookmarks.current")) + (when (file-exists-p current-bookmarks-file) + (ignore-errors + (with-temp-buffer + (insert-file-contents current-bookmarks-file) + (buffer-substring-no-properties + (point-min) (point-max)))))))) + +(defun vc-hg--run-log (template rev path) + (ignore-errors + (with-output-to-string + (if path + (vc-hg-command + standard-output 0 nil + "log" "-f" "-l1" "--template" template path) + (vc-hg-command + standard-output 0 nil + "log" "-r" rev "-l1" "--template" template))))) + +(defun vc-hg--symbolic-revision (rev &optional path) + "Make a Mercurial revision human-readable. +REV is a Mercurial revision. `default-directory' is assumed to +be in the repository root of interest. PATH, if set, is a +specific file to query." + (let ((symbolic-revision nil) + (styles vc-hg-symbolic-revision-styles)) + (while (and (not symbolic-revision) styles) + (let ((style (pop styles))) + (setf symbolic-revision + (cond ((and (null path) (eq style 'builtin-active-bookmark)) + (vc-hg--active-bookmark-internal rev)) + ((stringp style) + (vc-hg--run-log style rev path)) + ((functionp style) + (funcall style rev path)))))) + symbolic-revision)) + +(defun vc-hg-mode-line-string (file) + "Hg-specific version of `vc-mode-line-string'." + (let* ((backend-name "Hg") + (truename (file-truename file)) + (state (vc-state truename)) + (state-echo nil) + (face nil) + (rev (and state + (let ((default-directory + (expand-file-name (vc-hg-root truename)))) + (vc-hg--symbolic-revision + "." + (and vc-hg-use-file-version-for-mode-line-version + truename))))) + (rev (or rev "???"))) + (propertize + (cond ((or (eq state 'up-to-date) + (eq state 'needs-update)) + (setq state-echo "Up to date file") + (setq face 'vc-up-to-date-state) + (concat backend-name "-" rev)) + ((eq state 'added) + (setq state-echo "Locally added file") + (setq face 'vc-locally-added-state) + (concat backend-name "@" rev)) + ((eq state 'conflict) + (setq state-echo "File contains conflicts after the last merge") + (setq face 'vc-conflict-state) + (concat backend-name "!" rev)) + ((eq state 'removed) + (setq state-echo "File removed from the VC system") + (setq face 'vc-removed-state) + (concat backend-name "!" rev)) + ((eq state 'missing) + (setq state-echo "File tracked by the VC system, but missing from the file system") + (setq face 'vc-missing-state) + (concat backend-name "?" rev)) + (t + (setq state-echo "Locally modified file") + (setq face 'vc-edited-state) + (concat backend-name ":" rev))) + 'face face + 'help-echo (concat state-echo " under the " backend-name + " version control system")))) + ;;; History functions (defcustom vc-hg-log-switches nil @@ -435,6 +564,488 @@ Optional arg REVISION is a revision to annotate from." ;; TODO: update *vc-change-log* buffer so can see @ if --graph )) +;;; Native data structure reading + +(defcustom vc-hg-parse-hg-data-structures t + "If true, try directly parsing Mercurial data structures +directly instead of always running Mercurial. We try to be safe +against Mercurial data structure format changes and always fall +back to running Mercurial directly." + :type 'boolean + :version "25.2" + :group 'vc-hg) + +(defsubst vc-hg--read-u8 () + "Read and advance over an unsigned byte. +Return a fixnum." + (prog1 (char-after) + (forward-char))) + +(defsubst vc-hg--read-u32-be () + "Read and advance over a big-endian unsigned 32-bit integer. +Return a fixnum; on overflow, result is undefined." + ;; Because elisp bytecode has an instruction for multiply and + ;; doesn't have one for lsh, it's somewhat counter-intuitively + ;; faster to multiply than to shift. + (+ (* (vc-hg--read-u8) (* 256 256 256)) + (* (vc-hg--read-u8) (* 256 256)) + (* (vc-hg--read-u8) 256) + (identity (vc-hg--read-u8)))) + +(defun vc-hg--raw-dirstate-search (dirstate fname) + (with-temp-buffer + (set-buffer-multibyte nil) + (insert-file-contents-literally dirstate) + (let* ((result nil) + (flen (length fname)) + (case-fold-search nil) + (inhibit-changing-match-data t) + ;; Find a conservative bound for the loop below by using + ;; Boyer-Moore on the raw dirstate without parsing it; we + ;; know we can't possibly find fname _after_ the last place + ;; it appears, so we can bail out early if we try to parse + ;; past it, which especially helps when the file we're + ;; trying to find isn't in dirstate at all. There's no way + ;; to similarly bound the starting search position, since + ;; the file format is such that we need to parse it from + ;; the beginning to find record boundaries. + (search-limit + (progn + (goto-char (point-max)) + (or (search-backward fname (+ (point-min) 40) t) + (point-min))))) + ;; 40 is just after the header, which contains the working + ;; directory parents + (goto-char (+ (point-min) 40)) + ;; Iterate over all dirstate entries; we might run this loop + ;; hundreds of thousands of times, so performance is important + ;; here + (while (< (point) search-limit) + ;; 1+4*4 is the length of the dirstate item header, which we + ;; spell as a literal for performance, since the elisp + ;; compiler lacks constant propagation + (forward-char (1+ (* 3 4))) + (let ((this-flen (vc-hg--read-u32-be))) + (if (and (or (eq this-flen flen) + (and (> this-flen flen) + (eq (char-after (+ (point) flen)) 0))) + (search-forward fname (+ (point) flen) t)) + (progn + (backward-char (+ flen (1+ (* 4 4)))) + (setf result + (list (vc-hg--read-u8) ; status + (vc-hg--read-u32-be) ; mode + (vc-hg--read-u32-be) ; size (of file) + (vc-hg--read-u32-be) ; mtime + )) + (goto-char (point-max))) + (forward-char this-flen)))) + result))) + +(define-error 'vc-hg-unsupported-syntax "unsupported hgignore syntax") + +(defconst vc-hg--pcre-c-escapes + '((?a . ?\a) + (?b . ?\b) + (?f . ?\f) + (?n . ?\n) + (?r . ?\r) + (?t . ?\t) + (?n . ?\n) + (?r . ?\r) + (?t . ?\t) + (?v . ?\v))) + +(defconst vc-hg--pcre-metacharacters + '(?. ?^ ?$ ?* ?+ ?? ?{ ?\\ ?\[ ?\| ?\()) + +(defconst vc-hg--elisp-metacharacters + '(?. ?* ?+ ?? ?\[ ?$ ?\\)) + +(defun vc-hg--escape-for-pcre (c) + (if (memq c vc-hg--pcre-metacharacters) + (string ?\\ c) + c)) + +(defun vc-hg--parts-to-string (parts) + "Build a string from list PARTS. Each element is a character or string." + (let ((parts2 nil)) + (while parts + (let* ((partcell (prog1 parts (setf parts (cdr parts)))) + (part (car partcell))) + (if (stringp part) + (setf parts2 (nconc (append part nil) parts2)) + (setcdr partcell parts2) + (setf parts2 partcell)))) + (apply #'string parts2))) + +(defun vc-hg--pcre-to-elisp-re (pcre prefix) + "Transform PCRE, a Mercurial file PCRE, into an elisp RE against PREFIX. +PREFIX is the directory name of the directory against which these +patterns are rooted. We understand only a subset of PCRE syntax; +if we don't understand a construct, we signal +`vc-hg-unsupported-syntax'." + (cl-assert (string-match "^/\\(.*/\\)?$" prefix)) + (let ((parts nil) + (i 0) + (anchored nil) + (state 'normal) + (pcrelen (length pcre))) + (while (< i pcrelen) + (let ((c (aref pcre i))) + (cond ((eq state 'normal) + (cond ((string-match + (rx (| "}\\?" (: "(?" (not (any ":"))))) + pcre i) + (signal 'vc-hg-unsupported-syntax (list pcre))) + ((eq c ?\\) + (setf state 'backslash)) + ((eq c ?\[) + (setf state 'charclass-enter) + (push c parts)) + ((eq c ?^) + (if (eq i 0) (setf anchored t) + (signal 'vc-hg-unsupported-syntax (list pcre)))) + ((eq c ?$) + ;; Patterns can also match directories exactly, + ;; ignoring everything under a matched directory + (push "\\(?:$\\|/\\)" parts)) + ((memq c '(?| ?\( ?\))) + (push ?\\ parts) + (push c parts)) + (t (push c parts)))) + ((eq state 'backslash) + (cond ((memq c '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 + ?A ?b ?B ?d ?D ?s ?S ?w ?W ?Z ?x)) + (signal 'vc-hg-unsupported-syntax (list pcre))) + ((memq c vc-hg--elisp-metacharacters) + (push ?\\ parts) + (push c parts)) + (t (push (or (cdr (assq c vc-hg--pcre-c-escapes)) c) parts))) + (setf state 'normal)) + ((eq state 'charclass-enter) + (push c parts) + (setf state + (if (eq c ?\\) + 'charclass + 'charclass-backslash))) + ((eq state 'charclass-backslash) + (if (memq c '(?0 ?x)) + (signal 'vc-hg-unsupported-syntax (list pcre))) + (push (or (cdr (assq c vc-hg--pcre-c-escapes)) c) parts) + (setf state 'charclass)) + ((eq state 'charclass) + (push c parts) + (cond ((eq c ?\\) (setf state 'charclass-backslash)) + ((eq c ?\]) (setf state 'normal)))) + (t (error "invalid state"))) + (setf i (1+ i)))) + (unless (eq state 'normal) + (signal 'vc-hg-unsupported-syntax (list pcre))) + (concat + "^" + prefix + (if anchored "" "\\(?:.*/\\)?") + (vc-hg--parts-to-string parts)))) + +(defun vc-hg--glob-to-pcre (glob) + "Transform a glob pattern into a Mercurial file pattern regex." + (let ((parts nil) (i 0) (n (length glob)) (group 0) c) + (cl-macrolet ((peek () '(and (< i n) (aref glob i)))) + (while (< i n) + (setf c (aref glob i)) + (cl-incf i) + (cond ((not (memq c '(?* ?? ?\[ ?\{ ?\} ?, ?\\))) + (push (vc-hg--escape-for-pcre c) parts)) + ((eq c ?*) + (cond ((eq (peek) ?*) + (cl-incf i) + (cond ((eq (peek) ?/) + (cl-incf i) + (push "(?:.*/)?" parts)) + (t + (push ".*" parts)))) + (t (push "[^/]*" parts)))) + ((eq c ??) + (push ?. parts)) + ((eq c ?\[) + (let ((j i)) + (when (and (< j n) (memq (aref glob j) '(?! ?\]))) + (cl-incf j)) + (while (and (< j n) (not (eq (aref glob j) ?\]))) + (cl-incf j)) + (cond ((>= j n) + (push "\\[" parts)) + (t + (let ((x (substring glob i j))) + (setf x (replace-regexp-in-string + "\\\\" "\\\\" x t t)) + (setf i (1+ j)) + (cond ((eq (aref x 0) ?!) + (setf (aref x 0) ?^)) + ((eq (aref x 0) ?^) + (setf x (concat "\\" x)))) + (push ?\[ parts) + (push x parts) + (push ?\] parts)))))) + ((eq c ?\{) + (cl-incf group) + (push "(?:" parts)) + ((eq c ?\}) + (push ?\) parts) + (cl-decf group)) + ((and (eq c ?,) (> group 0)) + (push ?| parts)) + ((eq c ?\\) + (if (eq i n) + (push "\\\\" parts) + (cl-incf i) + (push ?\\ parts) + (push c parts))) + (t + (push (vc-hg--escape-for-pcre c) parts))))) + (concat (vc-hg--parts-to-string parts) "$"))) + +(defvar vc-hg--hgignore-patterns) +(defvar vc-hg--hgignore-filenames) + +(defun vc-hg--hgignore-add-pcre (pcre prefix) + (push (vc-hg--pcre-to-elisp-re pcre prefix) vc-hg--hgignore-patterns)) + +(defun vc-hg--hgignore-add-glob (glob prefix) + (push (vc-hg--pcre-to-elisp-re (vc-hg--glob-to-pcre glob) prefix) + vc-hg--hgignore-patterns)) + +(defun vc-hg--hgignore-add-path (path prefix) + (let ((parts nil)) + (dotimes (i (length path)) + (push (vc-hg--escape-for-pcre (aref path i)) parts)) + (vc-hg--hgignore-add-pcre + (concat "^" (vc-hg--parts-to-string parts) "$") + prefix))) + +(defun vc-hg--slurp-hgignore-1 (hgignore prefix) + (let ((default-syntax 'vc-hg--hgignore-add-glob)) + (with-temp-buffer + (let ((attr (file-attributes hgignore))) + (when attr (insert-file-contents hgignore)) + (push (list hgignore (nth 5 attr) (nth 7 attr)) + vc-hg--hgignore-filenames)) + (while (not (eobp)) + ;; This list of pattern-file commands isn't complete, but it + ;; should cover the common cases. Remember that we fall back + ;; to regular hg commands if we see something we don't like. + (save-restriction + (narrow-to-region (point) (point-at-eol)) + (cond ((looking-at "[ \t]*\\(?:#.*\\)?$")) + ((looking-at "syntax:[ \t]*re[ \t]*$") + (setf default-syntax 'vc-hg--hgignore-add-pcre)) + ((looking-at "syntax:[ \t]*glob[ \t]*$") + (setf default-syntax 'vc-hg--hgignore-add-glob)) + ((looking-at "path:\\(.+?\\)[ \t]*$") + (vc-hg--hgignore-add-path (match-string 1) prefix)) + ((looking-at "glob:\\(.+?\\)[ \t]*$") + (vc-hg--hgignore-add-glob (match-string 1) prefix)) + ((looking-at "re:\\(.+?\\)[ \t]*$") + (vc-hg--hgignore-add-pcre (match-string 1) prefix)) + ((looking-at "\\(sub\\)?include:\\(.+?\\)[ \t]*$") + (let* ((sub (equal (match-string 1) "sub")) + (arg (match-string 2)) + (included-file + (if (string-match "^/" arg) arg + (concat (file-name-directory hgignore) arg)))) + (vc-hg--slurp-hgignore-1 + included-file + (if sub (file-name-directory included-file) prefix)))) + ((looking-at "[a-zA-Z0-9_]*:") + (signal 'vc-hg-unsupported-syntax (list (match-string 0)))) + ((looking-at ".*$") + (funcall default-syntax (match-string 0) prefix)))) + (forward-line 1))))) + +(cl-defstruct (vc-hg--ignore-patterns + (:copier nil) + (:constructor vc-hg--ignore-patterns-make)) + repo + ignore-patterns + file-sources) + +(defun vc-hg--slurp-hgignore (repo) + "Read hg ignore patterns from REPO. +REPO must be the directory name of an hg repository." + (cl-assert (string-match "^/\\(.*/\\)?$" repo)) + (let* ((hgignore (concat repo ".hgignore")) + (vc-hg--hgignore-patterns nil) + (vc-hg--hgignore-filenames nil)) + (vc-hg--slurp-hgignore-1 hgignore repo) + (vc-hg--ignore-patterns-make + :repo repo + :ignore-patterns (nreverse vc-hg--hgignore-patterns) + :file-sources (nreverse vc-hg--hgignore-filenames)))) + +(defun vc-hg--ignore-patterns-valid-p (hgip) + "Return whether the cached ignore patterns in HGIP are still valid" + (let ((valid t) + (file-sources (vc-hg--ignore-patterns-file-sources hgip))) + (while (and file-sources valid) + (let* ((fs (pop file-sources)) + (saved-mtime (nth 1 fs)) + (saved-size (nth 2 fs)) + (attr (file-attributes (nth 0 fs))) + (current-mtime (nth 5 attr)) + (current-size (nth 7 attr))) + (unless (and (equal saved-mtime current-mtime) + (equal saved-size current-size)) + (setf valid nil)))) + valid)) + +(defun vc-hg--ignore-patterns-ignored-p (hgip filename) + "Test whether the ignore pattern set HGIP says to ignore FILENAME. +FILENAME must be the file's true absolute name." + (let ((patterns (vc-hg--ignore-patterns-ignore-patterns hgip)) + (inhibit-changing-match-data t) + (ignored nil)) + (while (and patterns (not ignored)) + (setf ignored (string-match (pop patterns) filename))) + ignored)) + +(defun vc-hg--time-to-fixnum (ts) + (+ (* 65536 (car ts)) (cadr ts))) + +(defvar vc-hg--cached-ignore-patterns nil + "Cached pre-parsed hg ignore patterns.") + +(defun vc-hg--file-ignored-p (repo repo-relative-filename) + (let ((hgip vc-hg--cached-ignore-patterns)) + (unless (and hgip + (equal repo (vc-hg--ignore-patterns-repo hgip)) + (vc-hg--ignore-patterns-valid-p hgip)) + (setf vc-hg--cached-ignore-patterns nil) + (setf hgip (vc-hg--slurp-hgignore repo)) + (setf vc-hg--cached-ignore-patterns hgip)) + (vc-hg--ignore-patterns-ignored-p + hgip + (concat repo repo-relative-filename)))) + +(defun vc-hg--read-repo-requirements (repo) + (cl-assert (string-match "^/\\(.*/\\)?$" repo)) + (let* ((requires-filename (concat repo ".hg/requires"))) + (and (file-exists-p requires-filename) + (with-temp-buffer + (set-buffer-multibyte nil) + (insert-file-contents-literally requires-filename) + (split-string (buffer-substring-no-properties + (point-min) (point-max))))))) + +(defconst vc-hg-supported-requirements + '("dotencode" + "fncache" + "generaldelta" + "lz4revlog" + "remotefilelog" + "revlogv1" + "store") + "List of Mercurial repository requirements we understand; if a +repository requires features not present in this list, we avoid +attempting to parse Mercurial data structures.") + +(defun vc-hg--requirements-understood-p (repo) + "Check that we understand the format of the given repository. +REPO is the directory name of a Mercurial repository." + (null (cl-set-difference (vc-hg--read-repo-requirements repo) + vc-hg-supported-requirements + :test #'equal))) + +(defvar vc-hg--dirstate-scan-cache nil + "Cache of the last result of `vc-hg--raw-dirstate-search'. +Avoids the need to repeatedly scan dirstate on repeated calls to +`vc-hg-state', as we see during registration queries.") + +(defun vc-hg--cached-dirstate-search (dirstate dirstate-attr ascii-fname) + (let* ((mtime (nth 5 dirstate-attr)) + (size (nth 7 dirstate-attr)) + (cache vc-hg--dirstate-scan-cache) + ) + (if (and cache + (equal dirstate (pop cache)) + (equal mtime (pop cache)) + (equal size (pop cache)) + (equal ascii-fname (pop cache))) + (pop cache) + (let ((result (vc-hg--raw-dirstate-search dirstate ascii-fname))) + (setf vc-hg--dirstate-scan-cache + (list dirstate mtime size ascii-fname result)) + result)))) + +(defun vc-hg-state-fast (filename) + "Like `vc-hg-state', but parse internal data structures directly. +Returns one of the usual `vc-state' enumeration values or +`unsupported' if we need to take the slow path and run the +hg binary." + (let* (truename + repo + dirstate + dirstate-attr + repo-relative-filename + ascii-fname) + (if (or + ;; Explicit user disable + (not vc-hg-parse-hg-data-structures) + ;; It'll probably be faster to run hg remotely + (file-remote-p filename) + (progn + (setf truename (file-truename filename)) + (file-remote-p truename)) + (not (setf repo (vc-hg-root truename))) + ;; dirstate must exist + (not (progn + (setf repo (expand-file-name repo)) + (cl-assert (string-match "^/\\(.*/\\)?$" repo)) + (setf dirstate (concat repo ".hg/dirstate")) + (setf dirstate-attr (file-attributes dirstate)))) + ;; Repository must be in an understood format + (not (vc-hg--requirements-understood-p repo)) + ;; Dirstate too small to be valid + (< (nth 7 dirstate-attr) 40) + ;; We want to store 32-bit unsigned values in fixnums + (< most-positive-fixnum 4294967295) + (progn + (setf repo-relative-filename + (file-relative-name truename repo)) + (setf ascii-fname + (string-as-unibyte + (let (last-coding-system-used) + (encode-coding-string + repo-relative-filename + 'us-ascii t)))) + ;; We only try dealing with ASCII filenames + (not (equal ascii-fname repo-relative-filename)))) + 'unsupported + (let* ((dirstate-entry + (vc-hg--cached-dirstate-search + dirstate dirstate-attr ascii-fname)) + (state (car dirstate-entry)) + (stat (file-attributes + (concat repo repo-relative-filename)))) + (cond ((eq state ?r) 'removed) + ((and (not state) stat) + (condition-case nil + (if (vc-hg--file-ignored-p repo repo-relative-filename) + 'ignored + 'unregistered) + (vc-hg-unsupported-syntax 'unsupported))) + ((and state (not stat)) 'missing) + ((eq state ?n) + (let ((vc-hg-size (nth 2 dirstate-entry)) + (vc-hg-mtime (nth 3 dirstate-entry)) + (fs-size (nth 7 stat)) + (fs-mtime (vc-hg--time-to-fixnum (nth 5 stat)))) + (if (and (eql vc-hg-size fs-size) (eql vc-hg-mtime fs-mtime)) + 'up-to-date + 'edited))) + ((eq state ?a) 'added) + (state 'unsupported)))))) + ;;; Miscellaneous (defun vc-hg-previous-revision (_file rev) diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index b3644cc1ac..6b4cd6acd0 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -206,17 +206,17 @@ VC commands are globally reachable under the prefix `\\[vc-prefix-map]': (not (memq property vc-touched-properties))) (setq vc-touched-properties (append (list property) vc-touched-properties))) - (put (intern file vc-file-prop-obarray) property value)) + (put (intern (expand-file-name file) vc-file-prop-obarray) property value)) (defun vc-file-getprop (file property) "Get per-file VC PROPERTY for FILE." - (get (intern file vc-file-prop-obarray) property)) + (get (intern (expand-file-name file) vc-file-prop-obarray) property)) (defun vc-file-clearprops (file) "Clear all VC properties of FILE." (if (boundp 'vc-parent-buffer) (kill-local-variable 'vc-parent-buffer)) - (setplist (intern file vc-file-prop-obarray) nil)) + (setplist (intern (expand-file-name file) vc-file-prop-obarray) nil)) ;; We keep properties on each symbol naming a backend as follows: @@ -468,16 +468,20 @@ status of this file. Otherwise, the value returned is one of: `unregistered' The file is not under version control." - ;; Note: in Emacs 22 and older, return of nil meant the file was - ;; unregistered. This is potentially a source of - ;; backward-compatibility bugs. + ;; Note: we usually return nil here for unregistered files anyway + ;; when called with only one argument. This doesn't seem to cause + ;; any problems. But if we wanted to change that, we should + ;; probably opt for redefining the `registered' command to return + ;; non-nil even for unregistered files (maybe also rename it), and + ;; then make sure that all `state' implementations handle + ;; unregistered file appropriately. ;; FIXME: New (sub)states needed (?): ;; - `copied' and `moved' (might be handled by `removed' and `added') (or (vc-file-getprop file 'vc-state) (when (> (length file) 0) ;Why?? --Stef - (setq backend (or backend (vc-backend file))) - (when backend + (setq backend (or backend (vc-backend file))) + (when backend (vc-state-refresh file backend))))) (defun vc-state-refresh (file backend) @@ -495,10 +499,11 @@ status of this file. Otherwise, the value returned is one of: If FILE is not registered, this function always returns nil." (or (vc-file-getprop file 'vc-working-revision) (progn - (setq backend (or backend (vc-backend file))) - (when backend - (vc-file-setprop file 'vc-working-revision - (vc-call-backend backend 'working-revision file)))))) + (setq backend (or backend (vc-backend file))) + (when backend + (vc-file-setprop file 'vc-working-revision + (vc-call-backend + backend 'working-revision file)))))) ;; Backward compatibility. (define-obsolete-function-alias @@ -807,15 +812,15 @@ In the latter case, VC mode is deactivated for this buffer." (add-hook 'vc-mode-line-hook 'vc-mode-line nil t) (let (backend) (cond - ((setq backend (with-demoted-errors (vc-backend buffer-file-name))) + ((setq backend (with-demoted-errors (vc-backend buffer-file-name))) + ;; Let the backend setup any buffer-local things he needs. + (vc-call-backend backend 'find-file-hook) ;; Compute the state and put it in the mode line. (vc-mode-line buffer-file-name backend) (unless vc-make-backup-files ;; Use this variable, not make-backup-files, ;; because this is for things that depend on the file name. - (set (make-local-variable 'backup-inhibited) t)) - ;; Let the backend setup any buffer-local things he needs. - (vc-call-backend backend 'find-file-hook)) + (set (make-local-variable 'backup-inhibited) t))) ((let* ((truename (and buffer-file-truename (expand-file-name buffer-file-truename))) (link-type (and truename diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el index 8d58611cb5..b972956b10 100644 --- a/lisp/vc/vc-rcs.el +++ b/lisp/vc/vc-rcs.el @@ -120,7 +120,9 @@ For a description of possible values, see `vc-check-master-templates'." (setq result (vc-file-getprop file 'vc-checkout-model))) (or result (progn (vc-rcs-fetch-master-state file) - (vc-file-getprop file 'vc-checkout-model))))) + (vc-file-getprop file 'vc-checkout-model)) + ;; For non-existing files we assume strict locking. + 'locking))) ;;; ;;; State-querying functions diff --git a/lisp/version.el b/lisp/version.el index 77188a51ee..dc228870d1 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -38,13 +38,11 @@ This variable first existed in version 19.23.") "Minor version number of this version of Emacs. This variable first existed in version 19.23.") -(defconst emacs-build-time (current-time) - "Time at which Emacs was dumped out.") - -;; I think this should be obsoleted/removed. It's just one more meaningless -;; difference between different builds. It's usually not even an fqdn. (defconst emacs-build-system (system-name) - "Name of the system on which Emacs was built.") + "Name of the system on which Emacs was built, or nil if not available.") + +(defconst emacs-build-time (if emacs-build-system (current-time)) + "Time at which Emacs was dumped out, or nil if not available.") (defvar motif-version-string) (defvar gtk-version-string) @@ -58,9 +56,7 @@ Don't use this function in programs to choose actions according to the system configuration; look at `system-configuration' instead." (interactive "P") (let ((version-string - (format (if (not (called-interactively-p 'interactive)) - "GNU Emacs %s (%s%s%s%s)\n of %s" - "GNU Emacs %s (%s%s%s%s) of %s") + (format "GNU Emacs %s (%s%s%s%s)%s" emacs-version system-configuration (cond ((featurep 'motif) @@ -79,7 +75,14 @@ to the system configuration; look at `system-configuration' instead." (format ", %s scroll bars" (capitalize (symbol-name x-toolkit-scroll-bars))) "") - (format-time-string "%Y-%m-%d" emacs-build-time)))) + (if emacs-build-time + (format-time-string (concat + (if (called-interactively-p + 'interactive) + "" "\n") + " of %Y-%m-%d") + emacs-build-time) + "")))) (if here (insert version-string) (if (called-interactively-p 'interactive) diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el index 472355741b..690a990208 100644 --- a/lisp/w32-fns.el +++ b/lisp/w32-fns.el @@ -200,8 +200,7 @@ certain patterns. This function is called by `convert-standard-filename'. Replace invalid characters and turn Cygwin names into native -names, and also turn slashes into backslashes if the shell -requires it (see `w32-shell-dos-semantics')." +names." (save-match-data (let ((name (if (string-match "\\`/cygdrive/\\([a-zA-Z]\\)/" filename) @@ -216,13 +215,6 @@ requires it (see `w32-shell-dos-semantics')." (while (string-match "[?*:<>|\"\000-\037]" name start) (aset name (match-beginning 0) ?!) (setq start (match-end 0))) - ;; convert directory separators to Windows format - ;; (but only if the shell in use requires it) - (when (w32-shell-dos-semantics) - (setq start 0) - (while (string-match "/" name start) - (aset name (match-beginning 0) ?\\) - (setq start (match-end 0)))) name))) (defun set-w32-system-coding-system (coding-system) diff --git a/lisp/wdired.el b/lisp/wdired.el index 16ea67dba5..2e68bec6fd 100644 --- a/lisp/wdired.el +++ b/lisp/wdired.el @@ -152,6 +152,16 @@ renamed by `dired-do-rename' and `dired-do-rename-regexp'." :version "24.3" :group 'wdired) +(defcustom wdired-create-parent-directories t + "If non-nil, create parent directories of destination files. +If non-nil, when you rename a file to a destination path within a +nonexistent directory, wdired will create any parent directories +necessary. When nil, attempts to rename a file into a +nonexistent directory will fail." + :version "25.2" + :type 'boolean + :group 'wdired) + (defvar wdired-mode-map (let ((map (make-sparse-keymap))) (define-key map "\C-x\C-s" 'wdired-finish-edit) @@ -492,6 +502,8 @@ non-nil means return old filename." (require 'dired-aux) (condition-case err (let ((dired-backup-overwrite nil)) + (and wdired-create-parent-directories + (wdired-create-parentdirs file-new)) (dired-rename-file file-ori file-new overwrite)) (error @@ -501,6 +513,11 @@ non-nil means return old filename." err))))))))) errors)) +(defun wdired-create-parentdirs (file-new) + "Create parent directories for FILE-NEW if they don't exist." + (and (not (file-exists-p (file-name-directory file-new))) + (message "Creating directory for file %s" file-new) + (make-directory (file-name-directory file-new) t))) (defun wdired-exit () "Exit wdired and return to dired mode. diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 53bf363daa..af906bab38 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -528,14 +528,14 @@ these values is: 2. space-before-tab::tab 3. space-before-tab::space -So, for example, if indentation and indentation::space are -included in `whitespace-style' list, the indentation value is -evaluated instead of indentation::space value. - -One reason for not visualize spaces via faces (if `face' is not -included in `whitespace-style') is to use exclusively for -cleaning up a buffer. See `whitespace-cleanup' and -`whitespace-cleanup-region' for documentation. +For example, if `indentation' and `indentation::space' are +included in `whitespace-style', the `indentation' value is used +instead of the `indentation::space' value. + +One reason to not use faces to visualize spaces (i.e., not +include `face' in `whitespace-style') is to use `whitespace-mode' +only for cleaning up a buffer. See `whitespace-cleanup' and +`whitespace-cleanup-region'. See also `whitespace-display-mappings' for documentation." :type '(set :tag "Kind of Blank" diff --git a/lisp/window.el b/lisp/window.el index f7a547b915..bd5275bffc 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -6746,6 +6746,71 @@ that frame." (unless (cdr (assq 'inhibit-switch-frame alist)) (window--maybe-raise-frame (window-frame window))))))) +(defun display-buffer-reuse-mode-window (buffer alist) + "Return a window based on the mode of the buffer it displays. +Display BUFFER in the returned window. Return nil if no usable +window is found. + +If ALIST contains a `mode' entry, its value is a major mode (a +symbol) or a list of modes. A window is a candidate if it +displays a buffer that derives from one of the given modes. When +ALIST contains no `mode' entry, the current major mode of BUFFER +is used. + +The behaviour is also controlled by entries for +`inhibit-same-window', `reusable-frames' and +`inhibit-switch-frame' as is done in the function +`display-buffer-reuse-window'." + (let* ((alist-entry (assq 'reusable-frames alist)) + (alist-mode-entry (assq 'mode alist)) + (frames (cond (alist-entry (cdr alist-entry)) + ((if (eq pop-up-frames 'graphic-only) + (display-graphic-p) + pop-up-frames) + 0) + (display-buffer-reuse-frames 0) + (t (last-nonminibuffer-frame)))) + (inhibit-same-window-p (cdr (assq 'inhibit-same-window alist))) + (windows (window-list-1 nil 'nomini frames)) + (buffer-mode (with-current-buffer buffer major-mode)) + (allowed-modes (if alist-mode-entry + (cdr alist-mode-entry) + buffer-mode)) + (curwin (selected-window)) + (curframe (selected-frame))) + (unless (listp allowed-modes) + (setq allowed-modes (list allowed-modes))) + (let (same-mode-same-frame + same-mode-other-frame + derived-mode-same-frame + derived-mode-other-frame) + (dolist (window windows) + (let (mode? frame?) + (with-current-buffer (window-buffer window) + (setq mode? + (cond ((memq major-mode allowed-modes) + 'same) + ((derived-mode-p allowed-modes) + 'derived)))) + (when (and mode? + (not (and inhibit-same-window-p + (eq window curwin)))) + (if (eq curframe (window-frame window)) + (if (eq mode? 'same) + (push window same-mode-same-frame) + (push window derived-mode-same-frame)) + (if (eq mode? 'same) + (push window same-mode-other-frame) + (push window derived-mode-other-frame)))))) + (let ((window (car (nconc same-mode-same-frame + same-mode-other-frame + derived-mode-same-frame + derived-mode-other-frame)))) + (when (window-live-p window) + (prog1 (window--display-buffer buffer window 'reuse alist) + (unless (cdr (assq 'inhibit-switch-frame alist)) + (window--maybe-raise-frame (window-frame window))))))))) + (defun display-buffer--special-action (buffer) "Return special display action for BUFFER, if any. If `special-display-p' returns non-nil for BUFFER, return an diff --git a/lisp/winner.el b/lisp/winner.el index 4b277008d7..9a6f5d5190 100644 --- a/lisp/winner.el +++ b/lisp/winner.el @@ -346,7 +346,19 @@ You may want to include buffer names such as *Help*, *Apropos*, ;;;###autoload -(define-minor-mode winner-mode nil :global t ; let d-m-m make the doc +(define-minor-mode winner-mode + "Toggle Winner mode on or off. +With a prefix argument ARG, enable Winner mode if ARG is +positive, and disable it otherwise. If called from Lisp, enable +the mode if ARG is omitted or nil, and toggle it if ARG is ‘toggle’. + +Winner mode is a global minor mode that records the changes in +the window configuration (i.e. how the frames are partitioned +into windows) so that the changes can be \"undone\" using the +command `winner-undo'. By default this one is bound to the key +sequence `C-c '. If you change your mind (while undoing), +you can press `C-c ' (calling `winner-redo')." + :global t (if winner-mode (progn (add-hook 'window-configuration-change-hook 'winner-change-fun) diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in index cc863f3d21..94af056ea6 100644 --- a/lwlib/Makefile.in +++ b/lwlib/Makefile.in @@ -44,6 +44,7 @@ RANLIB=@RANLIB@ AR = @AR@ ARFLAGS = @ARFLAGS@ MKDIR_P = @MKDIR_P@ +EXEEXT = @EXEEXT@ LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o MOTIF_OBJS = lwlib-Xm.o @@ -128,15 +129,17 @@ distclean: clean bootstrap-clean maintainer-clean: distclean rm -f TAGS +ETAGS = ../lib-src/etags${EXEEXT} -ETAGS = ../lib-src/etags +${ETAGS}: FORCE + ${MAKE} -C ../lib-src $(notdir $@) -ctagsfiles= $(srcdir)/*.[ch] +ctagsfiles= $(wildcard ${srcdir}/*.[ch]) -TAGS: $(ctagsfiles) - "$(ETAGS)" $(ctagsfiles) +FORCE: +.PHONY: tags FORCE tags: TAGS -.PHONY: tags - +TAGS: ${ETAGS} $(ctagsfiles) + ${ETAGS} $(ctagsfiles) ### Makefile.in ends here diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index 547af6641a..5a3fc98597 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -78,6 +78,7 @@ AC_DEFUN([gl_EARLY], # Code from module fdatasync: # Code from module fdopendir: # Code from module filemode: + # Code from module filevercmp: # Code from module fpending: # Code from module fstatat: # Code from module fsync: @@ -126,6 +127,7 @@ AC_DEFUN([gl_EARLY], # Code from module ssize_t: # Code from module stat: # Code from module stat-time: + # Code from module std-gnu11: # Code from module stdalign: # Code from module stddef: # Code from module stdint: @@ -888,6 +890,8 @@ AC_DEFUN([gl_FILE_LIST], [ lib/fdopendir.c lib/filemode.c lib/filemode.h + lib/filevercmp.c + lib/filevercmp.h lib/fpending.c lib/fpending.h lib/fstatat.c @@ -1052,6 +1056,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/st_dm_mode.m4 m4/stat-time.m4 m4/stat.m4 + m4/std-gnu11.m4 m4/stdalign.m4 m4/stddef_h.m4 m4/stdint.m4 diff --git a/m4/std-gnu11.m4 b/m4/std-gnu11.m4 new file mode 100644 index 0000000000..e8d3ebcf2f --- /dev/null +++ b/m4/std-gnu11.m4 @@ -0,0 +1,824 @@ +# Prefer GNU C11 and C++11 to earlier versions. -*- coding: utf-8 -*- + +# This implementation is taken from GNU Autoconf lib/autoconf/c.m4 +# commit 739cdc82b5325402231f3f5e1a38f681fcbd1db2 +# dated Tue Mar 15 09:34:11 2016 -0700. +# This implementation will be obsolete once we can assume Autoconf 2.70 +# or later is installed everywhere a Gnulib program might be developed. + + +# Copyright (C) 2001-2016 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Written by David MacKenzie, with help from +# Akim Demaille, Paul Eggert, +# François Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, +# Roland McGrath, Noah Friedman, david d zuhn, and many others. + + +# AC_PROG_CC([COMPILER ...]) +# -------------------------- +# COMPILER ... is a space separated list of C compilers to search for. +# This just gives the user an opportunity to specify an alternative +# search list for the C compiler. +AC_DEFUN_ONCE([AC_PROG_CC], +[AC_LANG_PUSH(C)dnl +AC_ARG_VAR([CC], [C compiler command])dnl +AC_ARG_VAR([CFLAGS], [C compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +_AC_ARG_VAR_LIBS()dnl +_AC_ARG_VAR_CPPFLAGS()dnl +m4_ifval([$1], + [AC_CHECK_TOOLS(CC, [$1])], +[AC_CHECK_TOOL(CC, gcc) +if test -z "$CC"; then + dnl Here we want: + dnl AC_CHECK_TOOL(CC, cc) + dnl but without the check for a tool without the prefix. + dnl Until the check is removed from there, copy the code: + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(CC, [${ac_tool_prefix}cc], [${ac_tool_prefix}cc]) + fi +fi +if test -z "$CC"; then + AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) +fi +if test -z "$CC"; then + AC_CHECK_TOOLS(CC, cl.exe) +fi +if test -z "$CC"; then + AC_CHECK_TOOL(CC, clang) +fi +]) + +test -z "$CC" && AC_MSG_FAILURE([no acceptable C compiler found in \$PATH]) + +# Provide some information about the compiler. +_AS_ECHO_LOG([checking for _AC_LANG compiler version]) +set X $ac_compile +ac_compiler=$[2] +for ac_option in --version -v -V -qversion -version; do + _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD]) +done + +m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl +m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl +_AC_LANG_COMPILER_GNU +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +_AC_PROG_CC_G +dnl +dnl Set ac_prog_cc_stdc to the supported C version. +dnl Also set the documented variable ac_cv_prog_cc_stdc; +dnl its name was chosen when it was cached, but it is no longer cached. +_AC_PROG_CC_C11([ac_prog_cc_stdc=c11 + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11], + [_AC_PROG_CC_C99([ac_prog_cc_stdc=c99 + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99], + [_AC_PROG_CC_C89([ac_prog_cc_stdc=c89 + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89], + [ac_prog_cc_stdc=no + ac_cv_prog_cc_stdc=no])])]) +dnl +AC_LANG_POP(C)dnl +])# AC_PROG_CC + + + +# AC_PROG_CXX([LIST-OF-COMPILERS]) +# -------------------------------- +# LIST-OF-COMPILERS is a space separated list of C++ compilers to search +# for (if not specified, a default list is used). This just gives the +# user an opportunity to specify an alternative search list for the C++ +# compiler. +# aCC HP-UX C++ compiler much better than `CC', so test before. +# FCC Fujitsu C++ compiler +# KCC KAI C++ compiler +# RCC Rational C++ +# xlC_r AIX C Set++ (with support for reentrant code) +# xlC AIX C Set++ +AC_DEFUN([AC_PROG_CXX], +[AC_LANG_PUSH(C++)dnl +AC_ARG_VAR([CXX], [C++ compiler command])dnl +AC_ARG_VAR([CXXFLAGS], [C++ compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +_AC_ARG_VAR_LIBS()dnl +_AC_ARG_VAR_CPPFLAGS()dnl +_AC_ARG_VAR_PRECIOUS([CCC])dnl +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + AC_CHECK_TOOLS(CXX, + [m4_default([$1], + [g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++])], + g++) + fi +fi +# Provide some information about the compiler. +_AS_ECHO_LOG([checking for _AC_LANG compiler version]) +set X $ac_compile +ac_compiler=$[2] +for ac_option in --version -v -V -qversion; do + _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD]) +done + +m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl +m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl +_AC_LANG_COMPILER_GNU +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +_AC_PROG_CXX_G +_AC_PROG_CXX_CXX11([ac_prog_cxx_stdcxx=cxx11 + ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 + ac_cv_prog_cxx_cxx98=$ac_cv_prog_cxx_cxx11], + [_AC_PROG_CXX_CXX98([ac_prog_cxx_stdcxx=cxx98 + ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98], + [ac_prog_cxx_stdcxx=no + ac_cv_prog_cxx_stdcxx=no])]) +AC_LANG_POP(C++)dnl +])# AC_PROG_CXX + + +# _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST, +# ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE) +# -------------------------------------------------------------- +# Check whether the C compiler accepts features of STANDARD (e.g `c89', `c99') +# by trying to compile a program of TEST-PROLOGUE and TEST-BODY. If this fails, +# try again with each compiler option in the space-separated OPTION-LIST; if one +# helps, append it to CC. If eventually successful, run ACTION-IF-AVAILABLE, +# else ACTION-IF-UNAVAILABLE. +AC_DEFUN([_AC_C_STD_TRY], +[AC_MSG_CHECKING([for $CC option to enable ]m4_translit($1, [c], [C])[ features]) +AC_CACHE_VAL(ac_cv_prog_cc_$1, +[ac_cv_prog_cc_$1=no +ac_save_CC=$CC +AC_LANG_CONFTEST([AC_LANG_PROGRAM([$2], [$3])]) +for ac_arg in '' $4 +do + CC="$ac_save_CC $ac_arg" + _AC_COMPILE_IFELSE([], [ac_cv_prog_cc_$1=$ac_arg]) + test "x$ac_cv_prog_cc_$1" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +])# AC_CACHE_VAL +ac_prog_cc_stdc_options= +case "x$ac_cv_prog_cc_$1" in + x) + AC_MSG_RESULT([none needed]) ;; + xno) + AC_MSG_RESULT([unsupported]) ;; + *) + ac_prog_cc_stdc_options=" $ac_cv_prog_cc_$1" + CC=$CC$ac_prog_cc_stdc_options + AC_MSG_RESULT([$ac_cv_prog_cc_$1]) ;; +esac +AS_IF([test "x$ac_cv_prog_cc_$1" != xno], [$5], [$6]) +])# _AC_C_STD_TRY + +# _AC_C_C99_TEST_HEADER +# --------------------- +# A C header suitable for testing for C99. +AC_DEFUN([_AC_C_C99_TEST_HEADER], +[[#include +#include +#include +#include +#include +#include + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +#define debug(...) fprintf (stderr, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + your preprocessor is broken; +#endif +#if BIG_OK +#else + your preprocessor is broken; +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\0'; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str = ""; + int number = 0; + float fnumber = 0; + + while (*format) + { + switch (*format++) + { + case 's': // string + str = va_arg (args_copy, const char *); + break; + case 'd': // int + number = va_arg (args_copy, int); + break; + case 'f': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); + + return *str && number && fnumber; +}]])# _AC_C_C99_TEST_HEADER + +# _AC_C_C99_TEST_BODY +# ------------------- +# A C body suitable for testing for C99, assuming the corresponding header. +AC_DEFUN([_AC_C_C99_TEST_BODY], +[[ + // Check bool. + _Bool success = false; + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' + || dynamic_array[ni.number - 1] != 543); +]]) + +# _AC_PROG_CC_C99 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) +# ---------------------------------------------------------------- +# If the C compiler is not in ISO C99 mode by default, try to add an +# option to output variable CC to make it so. This macro tries +# various options that select ISO C99 on some system or another. It +# considers the compiler to be in ISO C99 mode if it handles _Bool, +# // comments, flexible array members, inline, long long int, mixed +# code and declarations, named initialization of structs, restrict, +# va_copy, varargs macros, variable declarations in for loops and +# variable length arrays. +AC_DEFUN([_AC_PROG_CC_C99], +[_AC_C_STD_TRY([c99], +[_AC_C_C99_TEST_HEADER], +[_AC_C_C99_TEST_BODY], +dnl Try +dnl GCC -std=gnu99 (unused restrictive modes: -std=c99 -std=iso9899:1999) +dnl IBM XL C -qlanglvl=extc1x (V12.1; does not pass C11 test) +dnl IBM XL C -qlanglvl=extc99 +dnl (pre-V12.1; unused restrictive mode: -qlanglvl=stdc99) +dnl HP cc -AC99 +dnl Intel ICC -std=c99, -c99 (deprecated) +dnl IRIX -c99 +dnl Solaris -D_STDC_C99= +dnl cc's -xc99 option uses linker magic to define the external +dnl symbol __xpg4 as if by "int __xpg4 = 1;", which enables C99 +dnl behavior for C library functions. This is not wanted here, +dnl because it means that a single module compiled with -xc99 +dnl alters C runtime behavior for the entire program, not for +dnl just the module. Instead, define the (private) symbol +dnl _STDC_C99, which suppresses a bogus failure in . +dnl The resulting compiler passes the test case here, and that's +dnl good enough. For more, please see the thread starting at: +dnl http://lists.gnu.org/archive/html/autoconf/2010-12/msg00059.html +dnl Tru64 -c99 +dnl with extended modes being tried first. +[[-std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99]], [$1], [$2])[]dnl +])# _AC_PROG_CC_C99 + + +# _AC_PROG_CC_C11 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) +# ---------------------------------------------------------------- +# If the C compiler is not in ISO C11 mode by default, try to add an +# option to output variable CC to make it so. This macro tries +# various options that select ISO C11 on some system or another. It +# considers the compiler to be in ISO C11 mode if it handles _Alignas, +# _Alignof, _Noreturn, _Static_assert, UTF-8 string literals, +# duplicate typedefs, and anonymous structures and unions. +AC_DEFUN([_AC_PROG_CC_C11], +[_AC_C_STD_TRY([c11], +[_AC_C_C99_TEST_HEADER[ +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; + +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int[100]), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); + +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } + +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; + +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal[] = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +]], +[_AC_C_C99_TEST_BODY[ + v1.i = 2; + v1.w.k = 5; + _Static_assert ((offsetof (struct anonymous, i) + == offsetof (struct anonymous, w.k)), + "Anonymous union alignment botch"); +]], +dnl Try +dnl GCC -std=gnu11 (unused restrictive mode: -std=c11) +dnl with extended modes being tried first. +dnl +dnl Do not try -qlanglvl=extc1x, because IBM XL C V12.1 (the latest version as +dnl of September 2012) does not pass the C11 test. For now, try extc1x when +dnl compiling the C99 test instead, since it enables _Static_assert and +dnl _Noreturn, which is a win. If -qlanglvl=extc11 or -qlanglvl=extc1x passes +dnl the C11 test in some future version of IBM XL C, we'll add it here, +dnl preferably extc11. +[[-std=gnu11]], [$1], [$2])[]dnl +])# _AC_PROG_CC_C11 + + +# AC_PROG_CC_C89 +# -------------- +# Do not use AU_ALIAS here and in AC_PROG_CC_C99 and AC_PROG_CC_STDC, +# as that'd be incompatible with how Automake redefines AC_PROG_CC. See +# . +AU_DEFUN([AC_PROG_CC_C89], + [AC_REQUIRE([AC_PROG_CC])], + [$0 is obsolete; use AC_PROG_CC] +) + +# AC_PROG_CC_C99 +# -------------- +AU_DEFUN([AC_PROG_CC_C99], + [AC_REQUIRE([AC_PROG_CC])], + [$0 is obsolete; use AC_PROG_CC] +) + +# AC_PROG_CC_STDC +# --------------- +AU_DEFUN([AC_PROG_CC_STDC], + [AC_REQUIRE([AC_PROG_CC])], + [$0 is obsolete; use AC_PROG_CC] +) + + +# AC_C_PROTOTYPES +# --------------- +# Check if the C compiler supports prototypes, included if it needs +# options. +AC_DEFUN([AC_C_PROTOTYPES], +[AC_REQUIRE([AC_PROG_CC])dnl +if test "$ac_prog_cc_stdc" != no; then + AC_DEFINE(PROTOTYPES, 1, + [Define to 1 if the C compiler supports function prototypes.]) + AC_DEFINE(__PROTOTYPES, 1, + [Define like PROTOTYPES; this can be used by system headers.]) +fi +])# AC_C_PROTOTYPES + + +# _AC_CXX_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST, +# ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE) +# ---------------------------------------------------------------- +# Check whether the C++ compiler accepts features of STANDARD (e.g +# `cxx98', `cxx11') by trying to compile a program of TEST-PROLOGUE +# and TEST-BODY. If this fails, try again with each compiler option +# in the space-separated OPTION-LIST; if one helps, append it to CXX. +# If eventually successful, run ACTION-IF-AVAILABLE, else +# ACTION-IF-UNAVAILABLE. +AC_DEFUN([_AC_CXX_STD_TRY], +[AC_MSG_CHECKING([for $CXX option to enable ]m4_translit(m4_translit($1, [x], [+]), [a-z], [A-Z])[ features]) +AC_LANG_PUSH(C++)dnl +AC_CACHE_VAL(ac_cv_prog_cxx_$1, +[ac_cv_prog_cxx_$1=no +ac_save_CXX=$CXX +AC_LANG_CONFTEST([AC_LANG_PROGRAM([$2], [$3])]) +for ac_arg in '' $4 +do + CXX="$ac_save_CXX $ac_arg" + _AC_COMPILE_IFELSE([], [ac_cv_prog_cxx_$1=$ac_arg]) + test "x$ac_cv_prog_cxx_$1" != "xno" && break +done +rm -f conftest.$ac_ext +CXX=$ac_save_CXX +])# AC_CACHE_VAL +ac_prog_cxx_stdcxx_options= +case "x$ac_cv_prog_cxx_$1" in + x) + AC_MSG_RESULT([none needed]) ;; + xno) + AC_MSG_RESULT([unsupported]) ;; + *) + ac_prog_cxx_stdcxx_options=" $ac_cv_prog_cxx_$1" + CXX=$CXX$ac_prog_cxx_stdcxx_options + AC_MSG_RESULT([$ac_cv_prog_cxx_$1]) ;; +esac +AC_LANG_POP(C++)dnl +AS_IF([test "x$ac_cv_prog_cxx_$1" != xno], [$5], [$6]) +])# _AC_CXX_STD_TRY + +# _AC_CXX_CXX98_TEST_HEADER +# ------------------------- +# A C++ header suitable for testing for CXX98. +AC_DEFUN([_AC_CXX_CXX98_TEST_HEADER], +[[ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace test { + typedef std::vector string_vec; + typedef std::pair map_value; + typedef std::map map_type; + typedef std::set set_type; + + template + class printer { + public: + printer(std::ostringstream& os): os(os) {} + void operator() (T elem) { os << elem << std::endl; } + private: + std::ostringstream& os; + }; +} +]])# _AC_CXX_CXX98_TEST_HEADER + +# _AC_CXX_CXX98_TEST_BODY +# ----------------------- +# A C++ body suitable for testing for CXX98, assuming the corresponding header. +AC_DEFUN([_AC_CXX_CXX98_TEST_BODY], +[[ + +try { + // Basic string. + std::string teststr("ASCII text"); + teststr += " string"; + + // Simple vector. + test::string_vec testvec; + testvec.push_back(teststr); + testvec.push_back("foo"); + testvec.push_back("bar"); + if (testvec.size() != 3) { + throw std::runtime_error("vector size is not 1"); + } + + // Dump vector into stringstream and obtain string. + std::ostringstream os; + for (test::string_vec::const_iterator i = testvec.begin(); + i != testvec.end(); ++i) { + if (i + 1 != testvec.end()) { + os << teststr << '\n'; + } + } + // Check algorithms work. + std::for_each(testvec.begin(), testvec.end(), test::printer(os)); + std::string os_out = os.str(); + + // Test pair and map. + test::map_type testmap; + testmap.insert(std::make_pair(std::string("key"), + std::make_pair(53,false))); + + // Test set. + int values[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; + test::set_type testset(values, values + sizeof(values)/sizeof(values[0])); + std::list testlist(testset.begin(), testset.end()); + std::copy(testset.begin(), testset.end(), std::back_inserter(testlist)); +} catch (const std::exception& e) { + std::cerr << "Caught exception: " << e.what() << std::endl; + + // Test fstream + std::ofstream of("test.txt"); + of << "Test ASCII text\n" << std::flush; + of << "N= " << std::hex << std::setw(8) << std::left << 534 << std::endl; + of.close(); +} +std::exit(0); +]]) + +# _AC_CXX_CXX11_TEST_HEADER +# ------------------------- +# A C++ header suitable for testing for CXX11. +AC_DEFUN([_AC_CXX_CXX11_TEST_HEADER], +[[ +#include +#include +#include +#include +#include +#include +#include + +namespace cxx11test +{ + typedef std::shared_ptr sptr; + typedef std::weak_ptr wptr; + + typedef std::tuple tp; + typedef std::array int_array; + + constexpr int get_val() { return 20; } + + struct testinit + { + int i; + double d; + }; + + class delegate { + public: + delegate(int n) : n(n) {} + delegate(): delegate(2354) {} + + virtual int getval() { return this->n; }; + protected: + int n; + }; + + class overridden : public delegate { + public: + overridden(int n): delegate(n) {} + virtual int getval() override final { return this->n * 2; } + }; + + class nocopy { + public: + nocopy(int i): i(i) {} + nocopy() = default; + nocopy(const nocopy&) = delete; + nocopy & operator=(const nocopy&) = delete; + private: + int i; + }; +} +]])# _AC_CXX_CXX11_TEST_HEADER + +# _AC_CXX_CXX11_TEST_BODY +# ----------------------- +# A C++ body suitable for testing for CXX11, assuming the corresponding header. +AC_DEFUN([_AC_CXX_CXX11_TEST_BODY], +[[ +{ + // Test auto and decltype + std::deque d; + d.push_front(43); + d.push_front(484); + d.push_front(3); + d.push_front(844); + int total = 0; + for (auto i = d.begin(); i != d.end(); ++i) { total += *i; } + + auto a1 = 6538; + auto a2 = 48573953.4; + auto a3 = "String literal"; + + decltype(a2) a4 = 34895.034; +} +{ + // Test constexpr + short sa[cxx11test::get_val()] = { 0 }; +} +{ + // Test initialiser lists + cxx11test::testinit il = { 4323, 435234.23544 }; +} +{ + // Test range-based for and lambda + cxx11test::int_array array = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; + for (int &x : array) { x += 23; } + std::for_each(array.begin(), array.end(), [](int v1){ std::cout << v1; }); +} +{ + using cxx11test::sptr; + using cxx11test::wptr; + + sptr sp(new std::string("ASCII string")); + wptr wp(sp); + sptr sp2(wp); +} +{ + cxx11test::tp tuple("test", 54, 45.53434); + double d = std::get<2>(tuple); + std::string s; + int i; + std::tie(s,i,d) = tuple; +} +{ + static std::regex filename_regex("^_?([a-z0-9_.]+-)+[a-z0-9]+$"); + std::string testmatch("Test if this string matches"); + bool match = std::regex_search(testmatch, filename_regex); +} +{ + cxx11test::int_array array = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; + cxx11test::int_array::size_type size = array.size(); +} +{ + // Test constructor delegation + cxx11test::delegate d1; + cxx11test::delegate d2(); + cxx11test::delegate d3(45); +} +{ + // Test override and final + cxx11test::overridden o1(55464); +} +{ + // Test nullptr + char *c = nullptr; +} +{ + // Test template brackets + std::vector> v1; +} +{ + // Unicode literals + char const *utf8 = u8"UTF-8 string \u2500"; + char16_t const *utf16 = u"UTF-8 string \u2500"; + char32_t const *utf32 = U"UTF-32 string \u2500"; +} +]]) + +# _AC_PROG_CXX_CXX98 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) +# ------------------------------------------------------------------- + +# If the C++ compiler is not in ISO C++98 mode by default, try to add +# an option to output variable CXX to make it so. This macro tries +# various options that select ISO C++98 on some system or another. It +# considers the compiler to be in ISO C++98 mode if it handles basic +# features of the std namespace including: string, containers (list, +# map, set, vector), streams (fstreams, iostreams, stringstreams, +# iomanip), pair, exceptions and algorithms. + + +AC_DEFUN([_AC_PROG_CXX_CXX98], +[_AC_CXX_STD_TRY([cxx98], +[_AC_CXX_CXX98_TEST_HEADER], +[_AC_CXX_CXX98_TEST_BODY], +dnl Try +dnl GCC -std=gnu++98 (unused restrictive mode: -std=c++98) +dnl IBM XL C -qlanglvl=extended +dnl HP aC++ -AA +dnl Intel ICC -std=gnu++98 +dnl Solaris N/A (default) +dnl Tru64 N/A (default, but -std gnu could be used) +dnl with extended modes being tried first. +[[-std=gnu++98 -std=c++98 -qlanglvl=extended -AA]], [$1], [$2])[]dnl +])# _AC_PROG_CXX_CXX98 + +# _AC_PROG_CXX_CXX11 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) +# ------------------------------------------------------------------- +# If the C++ compiler is not in ISO CXX11 mode by default, try to add +# an option to output variable CXX to make it so. This macro tries +# various options that select ISO C++11 on some system or another. It +# considers the compiler to be in ISO C++11 mode if it handles all the +# tests from the C++98 checks, plus the following: Language features +# (auto, constexpr, decltype, default/deleted constructors, delegate +# constructors, final, initialiser lists, lambda functions, nullptr, +# override, range-based for loops, template brackets without spaces, +# unicode literals) and library features (array, memory (shared_ptr, +# weak_ptr), regex and tuple types). +AC_DEFUN([_AC_PROG_CXX_CXX11], +[_AC_CXX_STD_TRY([cxx11], +[_AC_CXX_CXX11_TEST_HEADER +_AC_CXX_CXX98_TEST_HEADER], +[_AC_CXX_CXX11_TEST_BODY +_AC_CXX_CXX98_TEST_BODY], +dnl Try +dnl GCC -std=gnu++11 (unused restrictive mode: -std=c++11) [and 0x variants] +dnl IBM XL C -qlanglvl=extended0x +dnl (pre-V12.1; unused restrictive mode: -qlanglvl=stdcxx11) +dnl HP aC++ -AA +dnl Intel ICC -std=c++11 -std=c++0x +dnl Solaris N/A (no support) +dnl Tru64 N/A (no support) +dnl with extended modes being tried first. +[[-std=gnu++11 -std=c++11 -std=gnu++0x -std=c++0x -qlanglvl=extended0x -AA]], [$1], [$2])[]dnl +])# _AC_PROG_CXX_CXX11 diff --git a/make-dist b/make-dist index 1cd1a50d75..c0b0a0466f 100755 --- a/make-dist +++ b/make-dist @@ -284,7 +284,7 @@ echo "Creating top directory: '${tempdir}'" mkdir ${tempdir} if [ "$changelog" = yes ]; then - if test -d .git; then + if test -e .git; then echo "Making top-level ChangeLog" make ChangeLog CHANGELOG=${tempdir}/ChangeLog || \ { x=$?; echo "make ChangeLog FAILED (try --no-changelog?)" >&2; exit $x; } diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index 9f4ff83631..d1a6eaba5d 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -66,7 +66,7 @@ /^#undef PACKAGE_TARNAME/s/^.*$/#define PACKAGE_TARNAME ""/ /^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION VERSION/ /^#undef PENDING_OUTPUT_COUNT/s/^.*$/#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)/ -/^#undef VERSION/s/^.*$/#define VERSION "25.0.93"/ +/^#undef VERSION/s/^.*$/#define VERSION "25.1.50"/ /^#undef SYSTEM_TYPE/s/^.*$/#define SYSTEM_TYPE "ms-dos"/ /^#undef HAVE_DECL_GETENV/s/^.*$/#define HAVE_DECL_GETENV 1/ /^#undef SYS_SIGLIST_DECLARED/s/^.*$/#define SYS_SIGLIST_DECLARED 1/ diff --git a/nt/Makefile.in b/nt/Makefile.in index 2b528aa4bd..28060febad 100644 --- a/nt/Makefile.in +++ b/nt/Makefile.in @@ -225,9 +225,18 @@ extraclean: maintainer-clean check: @echo "We don't have any tests for the nt/ directory yet." +ETAGS = ../lib-src/etags${EXEEXT} + +${ETAGS}: FORCE + ${MAKE} -C ../lib-src $(notdir $@) + +tagsfiles= $(wildcard ${srcdir}/*.[ch]) + +FORCE: +.PHONY: tags FORCE tags: TAGS -TAGS: ${EXE_FILES:${EXEEXT}=.c} - ../lib-src/etags *.[ch] +TAGS: ${ETAGS} ${tagsfiles} + ${ETAGS} ${tagsfiles} ## Build the programs addpm${EXEEXT}: ${srcdir}/addpm.c ../src/epaths.h diff --git a/nt/gnulib.mk b/nt/gnulib.mk index 6884bf9f07..fdbad17184 100644 --- a/nt/gnulib.mk +++ b/nt/gnulib.mk @@ -1,4 +1,4 @@ -## This file is an edited copy if ../lib/gnulib.mk. +## This file is an edited copy of ../lib/gnulib.mk. ## ## The purpose of the edits is to avoid generating any headers ## which would conflict with either the headers we have in nt/inc, @@ -43,7 +43,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=flexmember --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=setenv --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --avoid=unsetenv --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat sig2str socklen stat-time stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings +# Reproduce by: gnulib-tool --import --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=flexmember --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=setenv --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --avoid=unsetenv --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode filevercmp fstatat fsync getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog ignore-value intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat sig2str socklen stat-time std-gnu11 stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings MOSTLYCLEANFILES += core *.stackdump @@ -334,6 +334,14 @@ EXTRA_DIST += filemode.h ## end gnulib module filemode +## begin gnulib module filevercmp + +libgnu_a_SOURCES += filevercmp.c + +EXTRA_DIST += filevercmp.h + +## end gnulib module filevercmp + ## begin gnulib module fpending @@ -1082,6 +1090,7 @@ EXTRA_DIST += utimens.h ## begin gnulib module verify + EXTRA_DIST += verify.h ## end gnulib module verify diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index d1534336c4..5fd54e2f92 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h @@ -185,6 +185,13 @@ extern struct tm * sys_localtime (const time_t *); supply the 2nd arg correctly, so don't use _setjmp directly in that case. */ #undef HAVE__SETJMP + +/* Unlike MS and mingw.org, MinGW64 doesn't define gai_strerror as an + inline function in a system header file, and instead seems to + require to link against ws2_32.a. But we don't want to link with + -lws2_32, as that would make Emacs dependent on the respective DLL. + So MinGW64 is amply punished here by the following: */ +#undef HAVE_GAI_STRERROR #endif /* The following is needed for recovery from C stack overflows. */ diff --git a/nt/inc/sys/socket.h b/nt/inc/sys/socket.h index ad40fc9a23..6b9f56f917 100644 --- a/nt/inc/sys/socket.h +++ b/nt/inc/sys/socket.h @@ -98,6 +98,8 @@ typedef unsigned short uint16_t; #define accept sys_accept #define recvfrom sys_recvfrom #define sendto sys_sendto +#define getaddrinfo sys_getaddrinfo +#define freeaddrinfo sys_freeaddrinfo int sys_socket(int af, int type, int protocol); int sys_bind (int s, const struct sockaddr *addr, int namelen); @@ -118,6 +120,9 @@ int sys_recvfrom (int s, char *buf, int len, int flags, struct sockaddr *from, int * fromlen); int sys_sendto (int s, const char * buf, int len, int flags, const struct sockaddr *to, int tolen); +int sys_getaddrinfo (const char * node, const char * service, + const struct addrinfo * hints, struct addrinfo ** res); +void sys_freeaddrinfo (struct addrinfo * ai); /* In addition to wrappers for the winsock functions, we also provide an fcntl function, for setting sockets to non-blocking mode. */ diff --git a/nt/mingw-cfg.site b/nt/mingw-cfg.site index 05034fedd4..9d63008797 100644 --- a/nt/mingw-cfg.site +++ b/nt/mingw-cfg.site @@ -40,6 +40,12 @@ gl_cv_sys_struct_timespec_in_pthread_h=no # Or at all... ac_cv_header_pthread_h=no +# We don't want to check for these functions +# because they are implemented in libwinpthread. +ac_cv_search_clock_gettime="none required" +ac_cv_func_clock_gettime=no +ac_cv_func_clock_settime=no + # ACL functions are implemented in w32.c ac_cv_search_acl_get_file="none required" ac_cv_func_acl_get_file=yes @@ -68,6 +74,10 @@ ac_cv_func_getsockname=yes ac_cv_func_getpeername=yes # Implemented as sys_socket in w32.c ac_cv_func_socket=yes +# Implemented as sys_getaddrinfo in w32.c +ac_cv_func_getaddrinfo=yes +# Implemented as an inline function in ws2tcpip.h +ac_cv_func_gai_strerror=yes # Implemented in w32.c ac_cv_func_mkostemp=yes ac_cv_func_readlink=yes diff --git a/oldXMenu/Makefile.in b/oldXMenu/Makefile.in index 6be115a4ab..a695e73157 100644 --- a/oldXMenu/Makefile.in +++ b/oldXMenu/Makefile.in @@ -58,12 +58,12 @@ CC=@CC@ CFLAGS=@CFLAGS@ CPPFLAGS = @CPPFLAGS@ -TAGS = etags RM = rm -f RANLIB = @RANLIB@ AR = @AR@ ARFLAGS = @ARFLAGS@ MKDIR_P = @MKDIR_P@ +EXEEXT = @EXEEXT@ OBJS = Activate.o \ AddPane.o \ @@ -152,8 +152,17 @@ clean mostlyclean: bootstrap-clean maintainer-clean distclean: clean rm -f Makefile -.PHONY: tags -tags: - $(TAGS) -t *.[ch] +ETAGS = ../lib-src/etags${EXEEXT} + +${ETAGS}: FORCE + ${MAKE} -C ../lib-src $(notdir $@) + +tagsfiles = $(wildcard ${srcdir}/*.[ch]) + +FORCE: +.PHONY: tags FORCE +tags: TAGS +TAGS: ${ETAGS} ${tagsfiles} + ${ETAGS} ${tagsfiles} ### Makefile.in ends here diff --git a/src/Makefile.in b/src/Makefile.in index d54670932d..8639effde8 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -236,6 +236,8 @@ IMAGEMAGICK_CFLAGS= @IMAGEMAGICK_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +GETADDRINFO_A_LIBS = @GETADDRINFO_A_LIBS@ + LIBZ = @LIBZ@ ## system-specific libs for dynamic modules, else empty @@ -255,7 +257,9 @@ XFIXES_CFLAGS = @XFIXES_CFLAGS@ ## widget.o if USE_X_TOOLKIT, otherwise empty. WIDGET_OBJ=@WIDGET_OBJ@ -## sheap.o if CYGWIN, otherwise empty. +HYBRID_MALLOC = @HYBRID_MALLOC@ + +## cygw32.o if CYGWIN, otherwise empty. CYGWIN_OBJ=@CYGWIN_OBJ@ ## fontset.o fringe.o image.o if we have any window system @@ -299,20 +303,23 @@ CM_OBJ=@CM_OBJ@ LIBGPM = @LIBGPM@ -## -lresolv, or empty. -LIBRESOLV = @LIBRESOLV@ - LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@ +LIBSYSTEMD_CFLAGS = @LIBSYSTEMD_CFLAGS@ + INTERVALS_H = dispextern.h intervals.h composite.h GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ RUN_TEMACS = ./temacs +# Whether builds should contain details. '--no-build-details' or empty. +BUILD_DETAILS = @BUILD_DETAILS@ + UNEXEC_OBJ = @UNEXEC_OBJ@ CANNOT_DUMP=@CANNOT_DUMP@ @@ -369,6 +376,7 @@ ALL_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \ $(WEBKIT_CFLAGS) \ $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \ $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \ + $(LIBSYSTEMD_CFLAGS) \ $(LIBGNUTLS_CFLAGS) $(NOTIFY_CFLAGS) $(CAIRO_CFLAGS) \ $(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS) ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS) @@ -398,6 +406,8 @@ base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ doprnt.o intervals.o textprop.o composite.o xml.o $(NOTIFY_OBJ) \ $(XWIDGETS_OBJ) \ profiler.o decompress.o \ + $(if $(HYBRID_MALLOC),sheap.o) \ + $(SHEAP_OBJ) \ $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) \ $(W32_OBJ) $(WINDOW_SYSTEM_OBJ) $(XGSELOBJ) obj = $(base_obj) $(NS_OBJC_OBJ) @@ -480,11 +490,11 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ $(WEBKIT_LIBS) \ $(LIB_EACCESS) $(LIB_FDATASYNC) $(LIB_TIMER_TIME) $(DBUS_LIBS) \ $(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) $(XFIXES_LIBS) \ - $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) $(CAIRO_LIBS) \ + $(LIBXML2_LIBS) $(LIBGPM) $(LIBS_SYSTEM) $(CAIRO_LIBS) \ $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \ $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ - $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) \ - $(NOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBMODULES) + $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(GETADDRINFO_A_LIBS) \ + $(NOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBMODULES) $(LIBSYSTEMD_LIBS) $(leimdir)/leim-list.el: bootstrap-emacs$(EXEEXT) $(MAKE) -C ../leim leim-list.el EMACS="$(bootstrap_exe)" @@ -532,7 +542,7 @@ emacs$(EXEEXT): temacs$(EXEEXT) \ ifeq ($(CANNOT_DUMP),yes) ln -f temacs$(EXEEXT) $@ else - LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump + LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup dump ifneq ($(PAXCTL_dumped),) $(PAXCTL_dumped) $@ endif @@ -584,7 +594,9 @@ globals.h: gl-stamp; @true $(ALLOBJS): globals.h -$(lib)/libgnu.a: $(config_h) +LIBEGNU_ARCHIVE = $(lib)/lib$(if $(HYBRID_MALLOC),e)gnu.a + +$(LIBEGNU_ARCHIVE): $(config_h) $(MAKE) -C $(lib) all ## We have to create $(etc) here because init_cmdargs tests its @@ -592,9 +604,9 @@ $(lib)/libgnu.a: $(config_h) ## This goes on to affect various things, and the emacs binary fails ## to start if Vinstallation_directory has the wrong value. temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) \ - $(lib)/libgnu.a $(EMACSRES) ${charsets} ${charscript} + $(LIBEGNU_ARCHIVE) $(EMACSRES) ${charsets} ${charscript} $(AM_V_CCLD)$(CC) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \ - -o temacs $(ALLOBJS) $(lib)/libgnu.a $(W32_RES_LINK) $(LIBES) + -o temacs $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES) $(MKDIR_P) $(etc) ifneq ($(CANNOT_DUMP),yes) ifneq ($(PAXCTL_notdumped),) @@ -667,32 +679,34 @@ extraclean: distclean -rm -f *~ \#* -ETAGS = ../lib-src/etags +ETAGS = ../lib-src/etags${EXEEXT} + +${ETAGS}: FORCE + ${MAKE} -C ../lib-src $(notdir $@) -ctagsfiles1 = [xyzXYZ]*.[hc] -ctagsfiles2 = [a-wA-W]*.[hc] -ctagsfiles3 = [a-zA-Z]*.m +ctagsfiles1 = $(wildcard ${srcdir}/*.[hc]) +ctagsfiles2 = $(wildcard ${srcdir}/*.m) ## FIXME? In out-of-tree builds, should TAGS be generated in srcdir? ## This does not need to depend on ../lisp and ../lwlib TAGS files, ## because etags "--include" only includes a pointer to the file, ## rather than the file contents. -TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(srcdir)/$(ctagsfiles3) - "$(ETAGS)" --include=../lisp/TAGS --include=$(lwlibdir)/TAGS \ +TAGS: ${ETAGS} $(ctagsfiles1) $(ctagsfiles2) + ${ETAGS} --include=../lisp/TAGS --include=$(lwlibdir)/TAGS \ --regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \ --regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \ - $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) \ + $(ctagsfiles1) \ --regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \ --regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \ - $(srcdir)/$(ctagsfiles3) + $(ctagsfiles2) ## Arrange to make tags tables for ../lisp and ../lwlib, ## which the above TAGS file for the C files includes by reference. -../lisp/TAGS: +../lisp/TAGS: FORCE $(MAKE) -C ../lisp TAGS ETAGS="$(ETAGS)" -$(lwlibdir)/TAGS: +$(lwlibdir)/TAGS: FORCE $(MAKE) -C $(lwlibdir) TAGS ETAGS="$(ETAGS)" tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS @@ -737,7 +751,7 @@ bootstrap-emacs$(EXEEXT): temacs$(EXEEXT) ifeq ($(CANNOT_DUMP),yes) ln -f temacs$(EXEEXT) $@ else - $(RUN_TEMACS) --batch --load loadup bootstrap + $(RUN_TEMACS) --batch $(BUILD_DETAILS) --load loadup bootstrap ifneq ($(PAXCTL_dumped),) $(PAXCTL_dumped) emacs$(EXEEXT) endif diff --git a/src/alloc.c b/src/alloc.c index 4c9cbf1072..c5a4f425f6 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -22,10 +22,7 @@ along with GNU Emacs. If not, see . */ #include #include /* For CHAR_BIT. */ - -#ifdef ENABLE_CHECKING -#include /* For SIGABRT. */ -#endif +#include /* For SIGABRT, SIGDANGER. */ #ifdef HAVE_PTHREAD #include @@ -35,6 +32,7 @@ along with GNU Emacs. If not, see . */ #include "dispextern.h" #include "intervals.h" #include "puresize.h" +#include "sheap.h" #include "systime.h" #include "character.h" #include "buffer.h" @@ -58,6 +56,10 @@ along with GNU Emacs. If not, see . */ #include "dosfns.h" /* For dos_memory_info. */ #endif +#ifdef HAVE_MALLOC_H +# include +#endif + #if (defined ENABLE_CHECKING \ && defined HAVE_VALGRIND_VALGRIND_H \ && !defined USE_VALGRIND) @@ -106,8 +108,6 @@ my_heap_start (void) #ifdef DOUG_LEA_MALLOC -#include - /* Specify maximum number of areas to mmap. It would be nice to use a value that explicitly means "no limit". */ @@ -117,18 +117,6 @@ my_heap_start (void) inside glibc's malloc. */ static void *malloc_state_ptr; -/* Get and free this pointer; useful around unexec. */ -void -alloc_unexec_pre (void) -{ - malloc_state_ptr = malloc_get_state (); -} -void -alloc_unexec_post (void) -{ - free (malloc_state_ptr); -} - /* Restore the dumped malloc state. Because malloc can be invoked even before main (e.g. by the dynamic linker), the dumped malloc state must be restored as early as possible using this special hook. */ @@ -169,14 +157,40 @@ malloc_initialize_hook (void) } } +/* Declare the malloc initialization hook, which runs before 'main' starts. + EXTERNALLY_VISIBLE works around Bug#22522. */ # ifndef __MALLOC_HOOK_VOLATILE # define __MALLOC_HOOK_VOLATILE # endif -voidfuncptr __MALLOC_HOOK_VOLATILE __malloc_initialize_hook +voidfuncptr __MALLOC_HOOK_VOLATILE __malloc_initialize_hook EXTERNALLY_VISIBLE = malloc_initialize_hook; #endif +/* Allocator-related actions to do just before and after unexec. */ + +void +alloc_unexec_pre (void) +{ +#ifdef DOUG_LEA_MALLOC + malloc_state_ptr = malloc_get_state (); +#endif +#ifdef HYBRID_MALLOC + bss_sbrk_did_unexec = true; +#endif +} + +void +alloc_unexec_post (void) +{ +#ifdef DOUG_LEA_MALLOC + free (malloc_state_ptr); +#endif +#ifdef HYBRID_MALLOC + bss_sbrk_did_unexec = false; +#endif +} + /* Mark, unmark, query mark bit of a Lisp string. S must be a pointer to a struct Lisp_String. */ @@ -550,6 +564,8 @@ static struct Lisp_Finalizer doomed_finalizers; Malloc ************************************************************************/ +#if defined SIGDANGER || (!defined SYSTEM_MALLOC && !defined HYBRID_MALLOC) + /* Function malloc calls this if it finds we are near exhausting storage. */ void @@ -558,6 +574,7 @@ malloc_warning (const char *str) pending_malloc_warning = str; } +#endif /* Display an already-pending malloc warning. */ @@ -1111,23 +1128,14 @@ lisp_free (void *block) unexmacosx.c, so don't use it on Darwin. */ #if ! ADDRESS_SANITIZER && !defined DARWIN_OS -# if !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC -# define USE_ALIGNED_ALLOC 1 -# ifndef HAVE_ALIGNED_ALLOC -/* Defined in gmalloc.c. */ -void *aligned_alloc (size_t, size_t); -# endif -# elif defined HYBRID_MALLOC -# if defined HAVE_ALIGNED_ALLOC || defined HAVE_POSIX_MEMALIGN -# define USE_ALIGNED_ALLOC 1 -# define aligned_alloc hybrid_aligned_alloc -/* Defined in gmalloc.c. */ -void *aligned_alloc (size_t, size_t); -# endif -# elif defined HAVE_ALIGNED_ALLOC +# if (defined HAVE_ALIGNED_ALLOC \ + || (defined HYBRID_MALLOC \ + ? defined HAVE_POSIX_MEMALIGN \ + : !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC)) # define USE_ALIGNED_ALLOC 1 -# elif defined HAVE_POSIX_MEMALIGN +# elif !defined HYBRID_MALLOC && defined HAVE_POSIX_MEMALIGN # define USE_ALIGNED_ALLOC 1 +# define aligned_alloc my_aligned_alloc /* Avoid collision with lisp.h. */ static void * aligned_alloc (size_t alignment, size_t size) { @@ -3391,22 +3399,13 @@ allocate_buffer (void) DEFUN ("make-vector", Fmake_vector, Smake_vector, 2, 2, 0, doc: /* Return a newly created vector of length LENGTH, with each element being INIT. See also the function `vector'. */) - (register Lisp_Object length, Lisp_Object init) + (Lisp_Object length, Lisp_Object init) { - Lisp_Object vector; - register ptrdiff_t sizei; - register ptrdiff_t i; - register struct Lisp_Vector *p; - CHECK_NATNUM (length); - - p = allocate_vector (XFASTINT (length)); - sizei = XFASTINT (length); - for (i = 0; i < sizei; i++) + struct Lisp_Vector *p = allocate_vector (XFASTINT (length)); + for (ptrdiff_t i = 0; i < XFASTINT (length); i++) p->contents[i] = init; - - XSETVECTOR (vector, p); - return vector; + return make_lisp_ptr (p, Lisp_Vectorlike); } DEFUN ("vector", Fvector, Svector, 0, MANY, 0, @@ -3415,12 +3414,9 @@ Any number of arguments, even zero arguments, are allowed. usage: (vector &rest OBJECTS) */) (ptrdiff_t nargs, Lisp_Object *args) { - ptrdiff_t i; - register Lisp_Object val = make_uninit_vector (nargs); - register struct Lisp_Vector *p = XVECTOR (val); - - for (i = 0; i < nargs; i++) - p->contents[i] = args[i]; + Lisp_Object val = make_uninit_vector (nargs); + struct Lisp_Vector *p = XVECTOR (val); + memcpy (p->contents, args, nargs * sizeof *args); return val; } @@ -3459,9 +3455,8 @@ stack before executing the byte-code. usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INTERACTIVE-SPEC &rest ELEMENTS) */) (ptrdiff_t nargs, Lisp_Object *args) { - ptrdiff_t i; - register Lisp_Object val = make_uninit_vector (nargs); - register struct Lisp_Vector *p = XVECTOR (val); + Lisp_Object val = make_uninit_vector (nargs); + struct Lisp_Vector *p = XVECTOR (val); /* We used to purecopy everything here, if purify-flag was set. This worked OK for Emacs-23, but with Emacs-24's lexical binding code, it can be @@ -3471,8 +3466,7 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT just wasteful and other times plainly wrong (e.g. those free vars may want to be setcar'd). */ - for (i = 0; i < nargs; i++) - p->contents[i] = args[i]; + memcpy (p->contents, args, nargs * sizeof *args); make_byte_code (p); XSETCOMPILED (val, p); return val; @@ -5431,7 +5425,7 @@ purecopy (Lisp_Object obj) } else { - Lisp_Object fmt = build_pure_c_string ("Don't know how to purify: %S"); + AUTO_STRING (fmt, "Don't know how to purify: %S"); Fsignal (Qerror, list1 (CALLN (Fformat, fmt, obj))); } @@ -5662,7 +5656,7 @@ garbage_collect_1 (void *end) return Qnil; /* Record this function, so it appears on the profiler's backtraces. */ - record_in_backtrace (Qautomatic_gc, 0, 0); + record_in_backtrace (QAutomatic_GC, 0, 0); check_cons_list (); @@ -7222,21 +7216,6 @@ die (const char *msg, const char *file, int line) #if defined (ENABLE_CHECKING) && USE_STACK_LISP_OBJECTS -/* Debugging check whether STR is ASCII-only. */ - -const char * -verify_ascii (const char *str) -{ - const unsigned char *ptr = (unsigned char *) str, *end = ptr + strlen (str); - while (ptr < end) - { - int c = STRING_CHAR_ADVANCE (ptr); - if (!ASCII_CHAR_P (c)) - emacs_abort (); - } - return str; -} - /* Stress alloca with inconveniently sized requests and check whether all allocated areas may be used for Lisp_Object. */ @@ -7392,7 +7371,7 @@ do hash-consing of the objects allocated to pure space. */); DEFSYM (Qstring_bytes, "string-bytes"); DEFSYM (Qvector_slots, "vector-slots"); DEFSYM (Qheap, "heap"); - DEFSYM (Qautomatic_gc, "Automatic GC"); + DEFSYM (QAutomatic_GC, "Automatic GC"); DEFSYM (Qgc_cons_threshold, "gc-cons-threshold"); DEFSYM (Qchar_table_extra_slots, "char-table-extra-slots"); diff --git a/src/buffer.c b/src/buffer.c index f06d7e08e4..55a16b237e 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1051,44 +1051,36 @@ it is in the sequence to be tried) even if a buffer with that name exists. If NAME begins with a space (i.e., a buffer that is not normally visible to users), then if buffer NAME already exists a random number is first appended to NAME, to speed up finding a non-existent buffer. */) - (register Lisp_Object name, Lisp_Object ignore) + (Lisp_Object name, Lisp_Object ignore) { - register Lisp_Object gentemp, tem, tem2; - ptrdiff_t count; - char number[INT_BUFSIZE_BOUND (ptrdiff_t) + sizeof "<>"]; + Lisp_Object genbase; CHECK_STRING (name); - tem = Fstring_equal (name, ignore); - if (!NILP (tem)) - return name; - tem = Fget_buffer (name); - if (NILP (tem)) + if (!NILP (Fstring_equal (name, ignore)) || NILP (Fget_buffer (name))) return name; - if (!strncmp (SSDATA (name), " ", 1)) /* see bug#1229 */ + if (SREF (name, 0) != ' ') /* See bug#1229. */ + genbase = name; + else { /* Note fileio.c:make_temp_name does random differently. */ - tem2 = concat2 (name, make_formatted_string - (number, "-%"pI"d", - XFASTINT (Frandom (make_number (999999))))); - tem = Fget_buffer (tem2); - if (NILP (tem)) - return tem2; + char number[sizeof "-999999"]; + int i = XFASTINT (Frandom (make_number (999999))); + AUTO_STRING_WITH_LEN (lnumber, number, sprintf (number, "-%d", i)); + genbase = concat2 (name, lnumber); + if (NILP (Fget_buffer (genbase))) + return genbase; } - else - tem2 = name; - count = 1; - while (1) + for (ptrdiff_t count = 2; ; count++) { - gentemp = concat2 (tem2, make_formatted_string - (number, "<%"pD"d>", ++count)); - tem = Fstring_equal (gentemp, ignore); - if (!NILP (tem)) - return gentemp; - tem = Fget_buffer (gentemp); - if (NILP (tem)) + char number[INT_BUFSIZE_BOUND (ptrdiff_t) + sizeof "<>"]; + AUTO_STRING_WITH_LEN (lnumber, number, + sprintf (number, "<%"pD"d>", count)); + Lisp_Object gentemp = concat2 (genbase, lnumber); + if (!NILP (Fstring_equal (gentemp, ignore)) + || NILP (Fget_buffer (gentemp))) return gentemp; } } @@ -2001,7 +1993,7 @@ the current buffer's major mode. */) /* To select a nonfundamental mode, select the buffer temporarily and then call the mode function. */ - record_unwind_protect (save_excursion_restore, save_excursion_save ()); + record_unwind_current_buffer (); Fset_buffer (buffer); call0 (function); @@ -5277,7 +5269,7 @@ init_buffer (int initialized) if (NILP (BVAR (&buffer_defaults, enable_multibyte_characters))) Fset_buffer_multibyte (Qnil); - pwd = get_current_dir_name (); + pwd = emacs_get_current_dir_name (); if (!pwd) { @@ -6233,6 +6225,8 @@ Values are interpreted as follows: (hbar . HEIGHT) display a horizontal bar cursor with height HEIGHT ANYTHING ELSE display a hollow box cursor +WIDTH and HEIGHT can't exceed the frame's canonical character size. + When the buffer is displayed in a non-selected window, the cursor's appearance is instead controlled by the variable `cursor-in-non-selected-windows'. */); diff --git a/src/bytecode.c b/src/bytecode.c index 9ae2e820d5..fb9f617b51 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -1987,6 +1987,20 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, return result; } +/* `args_template' has the same meaning as in exec_byte_code() above. */ +Lisp_Object +get_byte_code_arity (Lisp_Object args_template) +{ + eassert (NATNUMP (args_template)); + EMACS_INT at = XINT (args_template); + bool rest = (at & 128) != 0; + int mandatory = at & 127; + EMACS_INT nonrest = at >> 8; + + return Fcons (make_number (mandatory), + rest ? Qmany : make_number (nonrest)); +} + void syms_of_bytecode (void) { diff --git a/src/callint.c b/src/callint.c index 3bcf2c8476..e56f7cd1b8 100644 --- a/src/callint.c +++ b/src/callint.c @@ -41,20 +41,24 @@ For example, write (defun foo (arg buf) "Doc string" (interactive "P\\nbbuffer: ") .... ) to make ARG be the raw prefix argument, and set BUF to an existing buffer, when `foo' is called as a command. -The "call" to `interactive' is actually a declaration rather than a function; - it tells `call-interactively' how to read arguments - to pass to the function. -When actually called, `interactive' just returns nil. - -Usually the argument of `interactive' is a string containing a code letter - followed optionally by a prompt. (Some code letters do not use I/O to get - the argument and do not use prompts.) To get several arguments, concatenate - the individual strings, separating them by newline characters. -Prompts are passed to format, and may use % escapes to print the + +The "call" to `interactive' is actually a declaration rather than a + function; it tells `call-interactively' how to read arguments to pass + to the function. When actually called, `interactive' just returns + nil. + +Usually the argument of `interactive' is a string containing a code + letter followed optionally by a prompt. (Some code letters do not + use I/O to get the argument and do not use prompts.) To pass several + arguments to the command, concatenate the individual strings, + separating them by newline characters. + +Prompts are passed to `format', and may use % escapes to print the arguments that have already been read. If the argument is not a string, it is evaluated to get a list of - arguments to pass to the function. -Just `(interactive)' means pass no args when calling interactively. + arguments to pass to the command. +Just `(interactive)' means pass no arguments to the command when + calling interactively. Code letters available are: a -- Function name: symbol with a function definition. @@ -99,7 +103,7 @@ If the string begins with `^' and `shift-select-mode' is non-nil, Emacs first calls the function `handle-shift-selection'. You may use `@', `*', and `^' together. They are processed in the order that they appear, before reading any arguments. -usage: (interactive &optional ARGS) */ +usage: (interactive &optional ARG-DESCRIPTOR) */ attributes: const) (Lisp_Object args) { diff --git a/src/callproc.c b/src/callproc.c index db602f538c..3a40626de4 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -565,8 +565,7 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, { /* Since CRLF is converted to LF within `decode_coding', we can always open a file with binary mode. */ - callproc_fd[CALLPROC_PIPEREAD] = emacs_open (tempfile, - O_RDONLY | O_BINARY, 0); + callproc_fd[CALLPROC_PIPEREAD] = emacs_open (tempfile, O_RDONLY, 0); if (callproc_fd[CALLPROC_PIPEREAD] < 0) { int open_errno = errno; @@ -1078,10 +1077,6 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r return unbind_to (count, val); } -#ifndef WINDOWSNT -static int relocate_fd (int fd, int minfd); -#endif - static char ** add_env (char **env, char **new_env, char *string) { @@ -1310,37 +1305,14 @@ child_setup (int in, int out, int err, char **new_argv, bool set_pgrp, return cpid; #else /* not WINDOWSNT */ - /* Make sure that in, out, and err are not actually already in - descriptors zero, one, or two; this could happen if Emacs is - started with its standard in, out, or error closed, as might - happen under X. */ - { - int oin = in, oout = out; - - /* We have to avoid relocating the same descriptor twice! */ - - in = relocate_fd (in, 3); - - if (out == oin) - out = in; - else - out = relocate_fd (out, 3); - - if (err == oin) - err = in; - else if (err == oout) - err = out; - else - err = relocate_fd (err, 3); - } #ifndef MSDOS /* Redirect file descriptors and clear the close-on-exec flag on the redirected ones. IN, OUT, and ERR are close-on-exec so they need not be closed explicitly. */ - dup2 (in, 0); - dup2 (out, 1); - dup2 (err, 2); + dup2 (in, STDIN_FILENO); + dup2 (out, STDOUT_FILENO); + dup2 (err, STDERR_FILENO); setpgid (0, 0); tcsetpgrp (0, pid); @@ -1359,31 +1331,6 @@ child_setup (int in, int out, int err, char **new_argv, bool set_pgrp, #endif /* not WINDOWSNT */ } -#ifndef WINDOWSNT -/* Move the file descriptor FD so that its number is not less than MINFD. - If the file descriptor is moved at all, the original is closed on MSDOS, - but not elsewhere as the caller will close it anyway. */ -static int -relocate_fd (int fd, int minfd) -{ - if (fd >= minfd) - return fd; - else - { - int new = fcntl (fd, F_DUPFD_CLOEXEC, minfd); - if (new == -1) - { - emacs_perror ("while setting up child"); - _exit (EXIT_CANCELED); - } -#ifdef MSDOS - emacs_close (fd); -#endif - return new; - } -} -#endif /* not WINDOWSNT */ - static bool getenv_internal_1 (const char *var, ptrdiff_t varlen, char **value, ptrdiff_t *valuelen, Lisp_Object env) diff --git a/src/ccl.c b/src/ccl.c index d9620340f0..b9dc52e256 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -1908,8 +1908,6 @@ ccl_get_compiled_code (Lisp_Object ccl_prog, ptrdiff_t *idx) bool setup_ccl_program (struct ccl_program *ccl, Lisp_Object ccl_prog) { - int i; - if (! NILP (ccl_prog)) { struct Lisp_Vector *vp; @@ -1931,8 +1929,7 @@ setup_ccl_program (struct ccl_program *ccl, Lisp_Object ccl_prog) } } ccl->ic = CCL_HEADER_MAIN; - for (i = 0; i < 8; i++) - ccl->reg[i] = 0; + memset (ccl->reg, 0, sizeof ccl->reg); ccl->last_block = false; ccl->status = 0; ccl->stack_idx = 0; diff --git a/src/character.h b/src/character.h index bc3e155784..586f330fba 100644 --- a/src/character.h +++ b/src/character.h @@ -612,14 +612,13 @@ sanitize_char_width (EMACS_INT width) : (c) <= 0xE01EF ? (c) - 0xE0100 + 17 \ : 0) -/* If C is a high surrogate, return 1. If C is a low surrogate, - return 2. Otherwise, return 0. */ +/* Return true if C is a surrogate. */ -#define CHAR_SURROGATE_PAIR_P(c) \ - ((c) < 0xD800 ? 0 \ - : (c) <= 0xDBFF ? 1 \ - : (c) <= 0xDFFF ? 2 \ - : 0) +INLINE bool +char_surrogate_p (int c) +{ + return 0xD800 <= c && c <= 0xDFFF; +} /* Data type for Unicode general category. diff --git a/src/charset.c b/src/charset.c index 8ff469e13a..264036ae91 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1050,8 +1050,8 @@ usage: (define-charset-internal ...) */) /* Here, we just copy the parent's fast_map. It's not accurate, but at least it works for quickly detecting which character DOESN'T belong to this charset. */ - for (i = 0; i < 190; i++) - charset.fast_map[i] = parent_charset->fast_map[i]; + memcpy (charset.fast_map, parent_charset->fast_map, + sizeof charset.fast_map); /* We also copy these for parents. */ charset.min_char = parent_charset->min_char; diff --git a/src/coding.c b/src/coding.c index 9f709bea24..17cb77e28d 100644 --- a/src/coding.c +++ b/src/coding.c @@ -6814,39 +6814,29 @@ decode_eol (struct coding_system *coding) else if (EQ (eol_type, Qdos)) { ptrdiff_t n = 0; + ptrdiff_t pos = coding->dst_pos; + ptrdiff_t pos_byte = coding->dst_pos_byte; + ptrdiff_t pos_end = pos_byte + coding->produced - 1; - if (NILP (coding->dst_object)) - { - /* Start deleting '\r' from the tail to minimize the memory - movement. */ - for (p = pend - 2; p >= pbeg; p--) - if (*p == '\r') - { - memmove (p, p + 1, pend-- - p - 1); - n++; - } - } - else - { - ptrdiff_t pos = coding->dst_pos; - ptrdiff_t pos_byte = coding->dst_pos_byte; - ptrdiff_t pos_end = pos_byte + coding->produced - 1; + /* This assertion is here instead of code, now deleted, that + handled the NILP case, which no longer happens with the + current codebase. */ + eassert (!NILP (coding->dst_object)); - while (pos_byte < pos_end) + while (pos_byte < pos_end) + { + p = BYTE_POS_ADDR (pos_byte); + if (*p == '\r' && p[1] == '\n') { - p = BYTE_POS_ADDR (pos_byte); - if (*p == '\r' && p[1] == '\n') - { - del_range_2 (pos, pos_byte, pos + 1, pos_byte + 1, 0); - n++; - pos_end--; - } - pos++; - if (coding->dst_multibyte) - pos_byte += BYTES_BY_CHAR_HEAD (*p); - else - pos_byte++; + del_range_2 (pos, pos_byte, pos + 1, pos_byte + 1, 0); + n++; + pos_end--; } + pos++; + if (coding->dst_multibyte) + pos_byte += BYTES_BY_CHAR_HEAD (*p); + else + pos_byte++; } coding->produced -= n; coding->produced_char -= n; @@ -8429,11 +8419,10 @@ from_unicode (Lisp_Object str) Lisp_Object from_unicode_buffer (const wchar_t *wstr) { - return from_unicode ( - make_unibyte_string ( - (char *) wstr, - /* we get one of the two final 0 bytes for free. */ - 1 + sizeof (wchar_t) * wcslen (wstr))); + /* We get one of the two final null bytes for free. */ + ptrdiff_t len = 1 + sizeof (wchar_t) * wcslen (wstr); + AUTO_STRING_WITH_LEN (str, (char *) wstr, len); + return from_unicode (str); } wchar_t * diff --git a/src/conf_post.h b/src/conf_post.h index 209f60792c..5d3394fafc 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -99,12 +99,9 @@ typedef bool bool_bf; #ifdef emacs #define malloc hybrid_malloc #define realloc hybrid_realloc +#define aligned_alloc hybrid_aligned_alloc #define calloc hybrid_calloc #define free hybrid_free -#if defined HAVE_GET_CURRENT_DIR_NAME && !defined BROKEN_GET_CURRENT_DIR_NAME -#define HYBRID_GET_CURRENT_DIR_NAME 1 -#define get_current_dir_name hybrid_get_current_dir_name -#endif #endif #endif /* HYBRID_MALLOC */ @@ -120,14 +117,6 @@ typedef bool bool_bf; #undef HAVE_RINT #endif /* HPUX */ -#ifdef IRIX6_5 -#ifdef emacs -char *_getpty(); -#endif -#define INET6 /* Needed for struct sockaddr_in6. */ -#undef HAVE_GETADDRINFO /* IRIX has getaddrinfo but not struct addrinfo. */ -#endif /* IRIX6_5 */ - #ifdef MSDOS #ifndef __DJGPP__ You lose; /* Emacs for DOS must be compiled with DJGPP */ diff --git a/src/dbusbind.c b/src/dbusbind.c index d3a32c0034..618176dd45 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -168,25 +168,25 @@ static int xd_symbol_to_dbus_type (Lisp_Object object) { return - ((EQ (object, QCdbus_type_byte)) ? DBUS_TYPE_BYTE - : (EQ (object, QCdbus_type_boolean)) ? DBUS_TYPE_BOOLEAN - : (EQ (object, QCdbus_type_int16)) ? DBUS_TYPE_INT16 - : (EQ (object, QCdbus_type_uint16)) ? DBUS_TYPE_UINT16 - : (EQ (object, QCdbus_type_int32)) ? DBUS_TYPE_INT32 - : (EQ (object, QCdbus_type_uint32)) ? DBUS_TYPE_UINT32 - : (EQ (object, QCdbus_type_int64)) ? DBUS_TYPE_INT64 - : (EQ (object, QCdbus_type_uint64)) ? DBUS_TYPE_UINT64 - : (EQ (object, QCdbus_type_double)) ? DBUS_TYPE_DOUBLE - : (EQ (object, QCdbus_type_string)) ? DBUS_TYPE_STRING - : (EQ (object, QCdbus_type_object_path)) ? DBUS_TYPE_OBJECT_PATH - : (EQ (object, QCdbus_type_signature)) ? DBUS_TYPE_SIGNATURE + (EQ (object, QCbyte) ? DBUS_TYPE_BYTE + : EQ (object, QCboolean) ? DBUS_TYPE_BOOLEAN + : EQ (object, QCint16) ? DBUS_TYPE_INT16 + : EQ (object, QCuint16) ? DBUS_TYPE_UINT16 + : EQ (object, QCint32) ? DBUS_TYPE_INT32 + : EQ (object, QCuint32) ? DBUS_TYPE_UINT32 + : EQ (object, QCint64) ? DBUS_TYPE_INT64 + : EQ (object, QCuint64) ? DBUS_TYPE_UINT64 + : EQ (object, QCdouble) ? DBUS_TYPE_DOUBLE + : EQ (object, QCstring) ? DBUS_TYPE_STRING + : EQ (object, QCobject_path) ? DBUS_TYPE_OBJECT_PATH + : EQ (object, QCsignature) ? DBUS_TYPE_SIGNATURE #ifdef DBUS_TYPE_UNIX_FD - : (EQ (object, QCdbus_type_unix_fd)) ? DBUS_TYPE_UNIX_FD + : EQ (object, QCunix_fd) ? DBUS_TYPE_UNIX_FD #endif - : (EQ (object, QCdbus_type_array)) ? DBUS_TYPE_ARRAY - : (EQ (object, QCdbus_type_variant)) ? DBUS_TYPE_VARIANT - : (EQ (object, QCdbus_type_struct)) ? DBUS_TYPE_STRUCT - : (EQ (object, QCdbus_type_dict_entry)) ? DBUS_TYPE_DICT_ENTRY + : EQ (object, QCarray) ? DBUS_TYPE_ARRAY + : EQ (object, QCvariant) ? DBUS_TYPE_VARIANT + : EQ (object, QCstruct) ? DBUS_TYPE_STRUCT + : EQ (object, QCdict_entry) ? DBUS_TYPE_DICT_ENTRY : DBUS_TYPE_INVALID); } @@ -257,16 +257,16 @@ XD_OBJECT_TO_STRING (Lisp_Object object) if ((session_bus_address != NULL) \ && (!NILP (Fstring_equal \ (bus, build_string (session_bus_address))))) \ - bus = QCdbus_session_bus; \ + bus = QCsession; \ } \ \ else \ { \ CHECK_SYMBOL (bus); \ - if (!(EQ (bus, QCdbus_system_bus) || EQ (bus, QCdbus_session_bus))) \ + if (!(EQ (bus, QCsystem) || EQ (bus, QCsession))) \ XD_SIGNAL2 (build_string ("Wrong bus name"), bus); \ /* We do not want to have an autolaunch for the session bus. */ \ - if (EQ (bus, QCdbus_session_bus) && session_bus_address == NULL) \ + if (EQ (bus, QCsession) && session_bus_address == NULL) \ XD_SIGNAL2 (build_string ("No connection to bus"), bus); \ } \ } while (0) @@ -395,7 +395,7 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object) CHECK_CONS (object); /* Type symbol is optional. */ - if (EQ (QCdbus_type_array, CAR_SAFE (elt))) + if (EQ (QCarray, CAR_SAFE (elt))) elt = XD_NEXT_VALUE (elt); /* If the array is empty, DBUS_TYPE_STRING is the default @@ -1009,8 +1009,7 @@ xd_add_watch (DBusWatch *watch, void *data) } /* Stop monitoring WATCH for possible I/O. - DATA is the used bus, either a string or QCdbus_system_bus or - QCdbus_session_bus. */ + DATA is the used bus, either a string or QCsystem or QCsession. */ static void xd_remove_watch (DBusWatch *watch, void *data) { @@ -1025,7 +1024,7 @@ xd_remove_watch (DBusWatch *watch, void *data) /* Unset session environment. */ #if 0 /* This is buggy, since unsetenv is not thread-safe. */ - if (XSYMBOL (QCdbus_session_bus) == data) + if (XSYMBOL (QCsession) == data) { XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS"); unsetenv ("DBUS_SESSION_BUS_ADDRESS"); @@ -1147,14 +1146,14 @@ this connection to those buses. */) connection = dbus_connection_open_private (SSDATA (bus), &derror); else - if (NILP (private)) - connection = dbus_bus_get (EQ (bus, QCdbus_system_bus) - ? DBUS_BUS_SYSTEM : DBUS_BUS_SESSION, - &derror); - else - connection = dbus_bus_get_private (EQ (bus, QCdbus_system_bus) - ? DBUS_BUS_SYSTEM : DBUS_BUS_SESSION, - &derror); + { + DBusBusType bustype = (EQ (bus, QCsystem) + ? DBUS_BUS_SYSTEM : DBUS_BUS_SESSION); + if (NILP (private)) + connection = dbus_bus_get (bustype, &derror); + else + connection = dbus_bus_get_private (bustype, &derror); + } if (dbus_error_is_set (&derror)) XD_ERROR (derror); @@ -1405,7 +1404,7 @@ usage: (dbus-message-internal &rest REST) */) } /* Check for timeout parameter. */ - if ((count+2 <= nargs) && (EQ ((args[count]), QCdbus_timeout))) + if ((count + 2 <= nargs) && EQ (args[count], QCtimeout)) { CHECK_NATNUM (args[count+1]); timeout = min (XFASTINT (args[count+1]), INT_MAX); @@ -1452,8 +1451,7 @@ usage: (dbus-message-internal &rest REST) */) /* The result is the key in Vdbus_registered_objects_table. */ serial = dbus_message_get_serial (dmessage); - result = list3 (QCdbus_registered_serial, - bus, make_fixnum_or_float (serial)); + result = list3 (QCserial, bus, make_fixnum_or_float (serial)); /* Create a hash table entry. */ Fputhash (result, handler, Vdbus_registered_objects_table); @@ -1540,8 +1538,7 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) || (mtype == DBUS_MESSAGE_TYPE_ERROR)) { /* Search for a registered function of the message. */ - key = list3 (QCdbus_registered_serial, bus, - make_fixnum_or_float (serial)); + key = list3 (QCserial, bus, make_fixnum_or_float (serial)); value = Fgethash (key, Vdbus_registered_objects_table, Qnil); /* There shall be exactly one entry. Construct an event. */ @@ -1566,9 +1563,7 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) goto cleanup; /* Search for a registered function of the message. */ - key = list4 ((mtype == DBUS_MESSAGE_TYPE_METHOD_CALL) - ? QCdbus_registered_method - : QCdbus_registered_signal, + key = list4 (mtype == DBUS_MESSAGE_TYPE_METHOD_CALL ? QCmethod : QCsignal, bus, build_string (interface), build_string (member)); value = Fgethash (key, Vdbus_registered_objects_table, Qnil); @@ -1697,37 +1692,37 @@ syms_of_dbusbind (void) build_pure_c_string ("D-Bus error")); /* Lisp symbols of the system and session buses. */ - DEFSYM (QCdbus_system_bus, ":system"); - DEFSYM (QCdbus_session_bus, ":session"); + DEFSYM (QCsystem, ":system"); + DEFSYM (QCsession, ":session"); /* Lisp symbol for method call timeout. */ - DEFSYM (QCdbus_timeout, ":timeout"); + DEFSYM (QCtimeout, ":timeout"); /* Lisp symbols of D-Bus types. */ - DEFSYM (QCdbus_type_byte, ":byte"); - DEFSYM (QCdbus_type_boolean, ":boolean"); - DEFSYM (QCdbus_type_int16, ":int16"); - DEFSYM (QCdbus_type_uint16, ":uint16"); - DEFSYM (QCdbus_type_int32, ":int32"); - DEFSYM (QCdbus_type_uint32, ":uint32"); - DEFSYM (QCdbus_type_int64, ":int64"); - DEFSYM (QCdbus_type_uint64, ":uint64"); - DEFSYM (QCdbus_type_double, ":double"); - DEFSYM (QCdbus_type_string, ":string"); - DEFSYM (QCdbus_type_object_path, ":object-path"); - DEFSYM (QCdbus_type_signature, ":signature"); + DEFSYM (QCbyte, ":byte"); + DEFSYM (QCboolean, ":boolean"); + DEFSYM (QCint16, ":int16"); + DEFSYM (QCuint16, ":uint16"); + DEFSYM (QCint32, ":int32"); + DEFSYM (QCuint32, ":uint32"); + DEFSYM (QCint64, ":int64"); + DEFSYM (QCuint64, ":uint64"); + DEFSYM (QCdouble, ":double"); + DEFSYM (QCstring, ":string"); + DEFSYM (QCobject_path, ":object-path"); + DEFSYM (QCsignature, ":signature"); #ifdef DBUS_TYPE_UNIX_FD - DEFSYM (QCdbus_type_unix_fd, ":unix-fd"); + DEFSYM (QCunix_fd, ":unix-fd"); #endif - DEFSYM (QCdbus_type_array, ":array"); - DEFSYM (QCdbus_type_variant, ":variant"); - DEFSYM (QCdbus_type_struct, ":struct"); - DEFSYM (QCdbus_type_dict_entry, ":dict-entry"); + DEFSYM (QCarray, ":array"); + DEFSYM (QCvariant, ":variant"); + DEFSYM (QCstruct, ":struct"); + DEFSYM (QCdict_entry, ":dict-entry"); /* Lisp symbols of objects in `dbus-registered-objects-table'. */ - DEFSYM (QCdbus_registered_serial, ":serial"); - DEFSYM (QCdbus_registered_method, ":method"); - DEFSYM (QCdbus_registered_signal, ":signal"); + DEFSYM (QCserial, ":serial"); + DEFSYM (QCmethod, ":method"); + DEFSYM (QCsignal, ":signal"); DEFVAR_LISP ("dbus-compiled-version", Vdbus_compiled_version, diff --git a/src/decompress.c b/src/decompress.c index 1213f482f7..6ebf74aaf5 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -42,7 +42,7 @@ static bool zlib_initialized; static bool init_zlib_functions (void) { - HMODULE library = w32_delayed_load (Qzlib_dll); + HMODULE library = w32_delayed_load (Qzlib); if (!library) return false; @@ -91,7 +91,7 @@ DEFUN ("zlib-available-p", Fzlib_available_p, Szlib_available_p, 0, 0, 0, (void) { #ifdef WINDOWSNT - Lisp_Object found = Fassq (Qzlib_dll, Vlibrary_cache); + Lisp_Object found = Fassq (Qzlib, Vlibrary_cache); if (CONSP (found)) return XCDR (found); else @@ -99,7 +99,7 @@ DEFUN ("zlib-available-p", Fzlib_available_p, Szlib_available_p, 0, 0, 0, Lisp_Object status; zlib_initialized = init_zlib_functions (); status = zlib_initialized ? Qt : Qnil; - Vlibrary_cache = Fcons (Fcons (Qzlib_dll, status), Vlibrary_cache); + Vlibrary_cache = Fcons (Fcons (Qzlib, status), Vlibrary_cache); return status; } #else diff --git a/src/dired.c b/src/dired.c index e21b2273f7..5d0e327ee7 100644 --- a/src/dired.c +++ b/src/dired.c @@ -42,7 +42,6 @@ along with GNU Emacs. If not, see . */ #include "buffer.h" #include "coding.h" #include "regex.h" -#include "blockinput.h" #ifdef MSDOS #include "msdos.h" /* for fstatat */ @@ -69,8 +68,6 @@ open_directory (Lisp_Object dirname, int *fdp) DIR *d; int fd, opendir_errno; - block_input (); - #ifdef DOS_NT /* Directories cannot be opened. The emulation assumes that any file descriptor other than AT_FDCWD corresponds to the most @@ -94,8 +91,6 @@ open_directory (Lisp_Object dirname, int *fdp) } #endif - unblock_input (); - if (!d) report_file_errno ("Opening directory", dirname, opendir_errno); *fdp = fd; @@ -111,12 +106,9 @@ directory_files_internal_w32_unwind (Lisp_Object arg) #endif static void -directory_files_internal_unwind (void *dh) +directory_files_internal_unwind (void *d) { - DIR *d = dh; - block_input (); closedir (d); - unblock_input (); } /* Return the next directory entry from DIR; DIR's name is DIRNAME. @@ -307,9 +299,7 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, } } - block_input (); closedir (d); - unblock_input (); #ifdef WINDOWSNT if (attrs) Vw32_get_true_file_attributes = w32_save; @@ -861,6 +851,14 @@ below) - valid values are `string' and `integer'. The latter is the default, but we plan to change that, so you should specify a non-nil value for ID-FORMAT if you use the returned uid or gid. +To access the elements returned, the following access functions are +provided: `file-attribute-type', `file-attribute-link-number', +`file-attribute-user-id', `file-attribute-group-id', +`file-attribute-access-time', `file-attribute-modification-time', +`file-attribute-status-change-time', `file-attribute-size', +`file-attribute-modes', `file-attribute-inode-number', and +`file-attribute-device-number'. + Elements of the attribute list are: 0. t for directory, string (name linked to) for symbolic link, or nil. 1. Number of links to file. @@ -951,10 +949,8 @@ file_attributes (int fd, char const *name, Lisp_Object id_format) if (!(NILP (id_format) || EQ (id_format, Qinteger))) { - block_input (); uname = stat_uname (&s); gname = stat_gname (&s); - unblock_input (); } filemodestring (&s, modes); diff --git a/src/dispnew.c b/src/dispnew.c index 3a0532a693..51caa5b10e 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -6038,7 +6038,7 @@ init_display (void) #endif /* If no window system has been specified, try to use the terminal. */ - if (! isatty (0)) + if (! isatty (STDIN_FILENO)) fatal ("standard input is not a tty"); #ifdef WINDOWSNT diff --git a/src/doc.c b/src/doc.c index 7cdb0d03a8..e1f508e501 100644 --- a/src/doc.c +++ b/src/doc.c @@ -870,16 +870,14 @@ Otherwise, return a new string. */) \ just sets the keymap used for \[cmd]. */ else if (strp[0] == '\\' && (strp[1] == '{' || strp[1] == '<')) { - struct buffer *oldbuf; - ptrdiff_t start_idx; + { /* This is for computing the SHADOWS arg for describe_map_tree. */ Lisp_Object active_maps = Fcurrent_active_maps (Qnil, Qnil); - Lisp_Object earlier_maps; ptrdiff_t count = SPECPDL_INDEX (); strp += 2; /* skip \{ or \< */ start = strp; - start_idx = start - SDATA (string); + ptrdiff_t start_idx = start - SDATA (string); while ((strp - SDATA (string) < SBYTES (string)) && *strp != '}' && *strp != '>') @@ -909,7 +907,7 @@ Otherwise, return a new string. */) } /* Now switch to a temp buffer. */ - oldbuf = current_buffer; + struct buffer *oldbuf = current_buffer; set_buffer_internal (XBUFFER (Vprin1_to_string_buffer)); /* This is for an unusual case where some after-change function uses 'format' or 'prin1' or something else that @@ -934,7 +932,8 @@ Otherwise, return a new string. */) { /* Get the list of active keymaps that precede this one. If this one's not active, get nil. */ - earlier_maps = Fcdr (Fmemq (tem, Freverse (active_maps))); + Lisp_Object earlier_maps + = Fcdr (Fmemq (tem, Freverse (active_maps))); describe_map_tree (tem, 1, Fnreverse (earlier_maps), Qnil, 0, 1, 0, 0, 1); } @@ -942,6 +941,7 @@ Otherwise, return a new string. */) Ferase_buffer (); set_buffer_internal (oldbuf); unbind_to (count, Qnil); + } subst_string: start = SDATA (tem); diff --git a/src/editfns.c b/src/editfns.c index 94b949583a..e267c2f290 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -146,8 +146,6 @@ xtzfree (timezone_t tz) static timezone_t tzlookup (Lisp_Object zone, bool settz) { - static char const tzbuf_format[] = "XXX%s%"pI"d:%02d:%02d"; - char tzbuf[sizeof tzbuf_format + INT_STRLEN_BOUND (EMACS_INT)]; char const *zone_string; timezone_t new_tz; @@ -160,16 +158,53 @@ tzlookup (Lisp_Object zone, bool settz) } else { + static char const tzbuf_format[] = "<%+.*"pI"d>%s%"pI"d:%02d:%02d"; + char const *trailing_tzbuf_format = tzbuf_format + sizeof "<%+.*"pI"d" - 1; + char tzbuf[sizeof tzbuf_format + 2 * INT_STRLEN_BOUND (EMACS_INT)]; + bool plain_integer = INTEGERP (zone); + if (EQ (zone, Qwall)) zone_string = 0; else if (STRINGP (zone)) - zone_string = SSDATA (zone); - else if (INTEGERP (zone)) + zone_string = SSDATA (ENCODE_SYSTEM (zone)); + else if (plain_integer || (CONSP (zone) && INTEGERP (XCAR (zone)) + && CONSP (XCDR (zone)))) { + Lisp_Object abbr; + if (!plain_integer) + { + abbr = XCAR (XCDR (zone)); + zone = XCAR (zone); + } + EMACS_INT abszone = eabs (XINT (zone)), hour = abszone / (60 * 60); - int min = (abszone / 60) % 60, sec = abszone % 60; - sprintf (tzbuf, tzbuf_format, &"-"[XINT (zone) < 0], hour, min, sec); - zone_string = tzbuf; + int hour_remainder = abszone % (60 * 60); + int min = hour_remainder / 60, sec = hour_remainder % 60; + + if (plain_integer) + { + int prec = 2; + EMACS_INT numzone = hour; + if (hour_remainder != 0) + { + prec += 2, numzone = 100 * numzone + min; + if (sec != 0) + prec += 2, numzone = 100 * numzone + sec; + } + sprintf (tzbuf, tzbuf_format, prec, numzone, + &"-"[XINT (zone) < 0], hour, min, sec); + zone_string = tzbuf; + } + else + { + AUTO_STRING (leading, "<"); + AUTO_STRING_WITH_LEN (trailing, tzbuf, + sprintf (tzbuf, trailing_tzbuf_format, + &"-"[XINT (zone) < 0], + hour, min, sec)); + zone_string = SSDATA (concat3 (leading, ENCODE_SYSTEM (abbr), + trailing)); + } } else xsignal2 (Qerror, build_string ("Invalid time zone specification"), @@ -1969,9 +2004,13 @@ DEFUN ("format-time-string", Fformat_time_string, Sformat_time_string, 1, 3, 0, doc: /* Use FORMAT-STRING to format the time TIME, or now if omitted. TIME is specified as (HIGH LOW USEC PSEC), as returned by `current-time' or `file-attributes'. The obsolete form (HIGH . LOW) -is also still accepted. The optional ZONE is omitted or nil for Emacs -local time, t for Universal Time, `wall' for system wall clock time, -or a string as in the TZ environment variable. +is also still accepted. + +The optional ZONE is omitted or nil for Emacs local time, t for +Universal Time, `wall' for system wall clock time, or a string as in +the TZ environment variable. It can also be a list (as from +`current-time-zone') or an integer (as from `decode-time') applied +without consideration for daylight saving time. The value is a copy of FORMAT-STRING, but with certain constructs replaced by text that describes the specified date and time in TIME: @@ -2042,7 +2081,6 @@ format_time_string (char const *format, ptrdiff_t formatlen, char *buf = buffer; ptrdiff_t size = sizeof buffer; size_t len; - Lisp_Object bufstring; int ns = t.tv_nsec; USE_SAFE_ALLOCA; @@ -2074,9 +2112,11 @@ format_time_string (char const *format, ptrdiff_t formatlen, } xtzfree (tz); - bufstring = make_unibyte_string (buf, len); + AUTO_STRING_WITH_LEN (bufstring, buf, len); + Lisp_Object result = code_convert_string_norecord (bufstring, + Vlocale_coding_system, 0); SAFE_FREE (); - return code_convert_string_norecord (bufstring, Vlocale_coding_system, 0); + return result; } DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 2, 0, @@ -2084,9 +2124,12 @@ DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 2, 0, The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED), as from `current-time' and `file-attributes', or nil to use the current time. The obsolete form (HIGH . LOW) is also still accepted. + The optional ZONE is omitted or nil for Emacs local time, t for Universal Time, `wall' for system wall clock time, or a string as in -the TZ environment variable. +the TZ environment variable. It can also be a list (as from +`current-time-zone') or an integer (as from `decode-time') applied +without consideration for daylight saving time. The list has the following nine members: SEC is an integer between 0 and 60; SEC is 60 for a leap second, which only some operating systems @@ -2149,6 +2192,7 @@ check_tm_member (Lisp_Object obj, int offset) DEFUN ("encode-time", Fencode_time, Sencode_time, 6, MANY, 0, doc: /* Convert SECOND, MINUTE, HOUR, DAY, MONTH, YEAR and ZONE to internal time. This is the reverse operation of `decode-time', which see. + The optional ZONE is omitted or nil for Emacs local time, t for Universal Time, `wall' for system wall clock time, or a string as in the TZ environment variable. It can also be a list (as from @@ -2183,8 +2227,6 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */) tm.tm_year = check_tm_member (args[5], TM_YEAR_BASE); tm.tm_isdst = -1; - if (CONSP (zone)) - zone = XCAR (zone); timezone_t tz = tzlookup (zone, false); value = emacs_mktime_z (tz, &tm); xtzfree (tz); @@ -2213,7 +2255,9 @@ but this is considered obsolete. The optional ZONE is omitted or nil for Emacs local time, t for Universal Time, `wall' for system wall clock time, or a string as in -the TZ environment variable. */) +the TZ environment variable. It can also be a list (as from +`current-time-zone') or an integer (as from `decode-time') applied +without consideration for daylight saving time. */) (Lisp_Object specified_time, Lisp_Object zone) { time_t value = lisp_seconds_argument (specified_time); @@ -2289,8 +2333,12 @@ instead of using the current time. The argument should have the form \(HIGH LOW . IGNORED). Thus, you can use times obtained from `current-time' and from `file-attributes'. SPECIFIED-TIME can also have the form (HIGH . LOW), but this is considered obsolete. -Optional second arg ZONE is omitted or nil for the local time zone, or -a string as in the TZ environment variable. + +The optional ZONE is omitted or nil for Emacs local time, t for +Universal Time, `wall' for system wall clock time, or a string as in +the TZ environment variable. It can also be a list (as from +`current-time-zone') or an integer (as from `decode-time') applied +without consideration for daylight saving time. Some operating systems cannot provide all this information to Emacs; in this case, `current-time-zone' returns a list containing nil for @@ -2314,15 +2362,18 @@ the data it can't find. */) zone_offset = make_number (offset); if (SCHARS (zone_name) == 0) { - /* No local time zone name is available; use "+-NNNN" instead. */ - long int m = offset / 60; - long int am = offset < 0 ? - m : m; - long int hour = am / 60; - int min = am % 60; - char buf[sizeof "+00" + INT_STRLEN_BOUND (long int)]; - zone_name = make_formatted_string (buf, "%c%02ld%02d", + /* No local time zone name is available; use numeric zone instead. */ + long int hour = offset / 3600; + int min_sec = offset % 3600; + int amin_sec = min_sec < 0 ? - min_sec : min_sec; + int min = amin_sec / 60; + int sec = amin_sec % 60; + int min_prec = min_sec ? 2 : 0; + int sec_prec = sec ? 2 : 0; + char buf[sizeof "+0000" + INT_STRLEN_BOUND (long int)]; + zone_name = make_formatted_string (buf, "%c%.2ld%.*d%.*d", (offset < 0 ? '-' : '+'), - hour, min); + hour, min_prec, min, sec_prec, sec); } } @@ -2331,11 +2382,11 @@ the data it can't find. */) DEFUN ("set-time-zone-rule", Fset_time_zone_rule, Sset_time_zone_rule, 1, 1, 0, doc: /* Set the Emacs local time zone using TZ, a string specifying a time zone rule. - If TZ is nil or `wall', use system wall clock time; this differs from the usual Emacs convention where nil means current local time. If TZ -is t, use Universal Time. If TZ is an integer, treat it as in -`encode-time'. +is t, use Universal Time. If TZ is a list (as from +`current-time-zone') or an integer (as from `decode-time'), use the +specified time zone without consideration for daylight saving time. Instead of calling this function, you typically want something else. To temporarily use a different time zone rule for just one invocation @@ -2882,10 +2933,9 @@ DEFUN ("compare-buffer-substrings", Fcompare_buffer_substrings, Scompare_buffer_ 6, 6, 0, doc: /* Compare two substrings of two buffers; return result as number. Return -N if first string is less after N-1 chars, +N if first string is -greater after N-1 chars, or 0 if strings match. Each substring is -represented as three arguments: BUFFER, START and END. That makes six -args in all, three for each substring. - +greater after N-1 chars, or 0 if strings match. +The first substring is in BUFFER1 from START1 to END1 and the second +is in BUFFER2 from START2 to END2. The value of `case-fold-search' in the current buffer determines whether case is significant or ignored. */) (Lisp_Object buffer1, Lisp_Object start1, Lisp_Object end1, Lisp_Object buffer2, Lisp_Object start2, Lisp_Object end2) @@ -4995,7 +5045,7 @@ Transposing beyond buffer boundaries is an error. */) start2_addr = BYTE_POS_ADDR (start2_byte); memcpy (temp, start1_addr, len1_byte); memcpy (start1_addr, start2_addr, len2_byte); - memcpy (start1_addr + len2_byte, start1_addr + len1_byte, len_mid); + memmove (start1_addr + len2_byte, start1_addr + len1_byte, len_mid); memcpy (start1_addr + len2_byte + len_mid, temp, len1_byte); SAFE_FREE (); diff --git a/src/emacs-module.c b/src/emacs-module.c index eca5af739b..724d24a776 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c @@ -64,6 +64,13 @@ enum && INTPTR_MAX == EMACS_INT_MAX) }; +/* Function prototype for the module init function. */ +typedef int (*emacs_init_function) (struct emacs_runtime *); + +/* Function prototype for the module Lisp functions. */ +typedef emacs_value (*emacs_subr) (emacs_env *, ptrdiff_t, + emacs_value [], void *); + /* Function prototype for module user-pointer finalizers. These should not throw C++ exceptions, so emacs-module.h declares the corresponding interfaces with EMACS_NOEXCEPT. There is only C code @@ -107,14 +114,12 @@ static enum emacs_funcall_exit module_non_local_exit_check (emacs_env *); static void check_main_thread (void); static void finalize_environment (struct emacs_env_private *); static void initialize_environment (emacs_env *, struct emacs_env_private *priv); -static void module_args_out_of_range (emacs_env *, Lisp_Object, Lisp_Object); static void module_handle_signal (emacs_env *, Lisp_Object); static void module_handle_throw (emacs_env *, Lisp_Object); static void module_non_local_exit_signal_1 (emacs_env *, Lisp_Object, Lisp_Object); static void module_non_local_exit_throw_1 (emacs_env *, Lisp_Object, Lisp_Object); static void module_out_of_memory (emacs_env *); static void module_reset_handlerlist (const int *); -static void module_wrong_type (emacs_env *, Lisp_Object, Lisp_Object); /* We used to return NULL when emacs_value was a different type from Lisp_Object, but nowadays we just use Qnil instead. Although they @@ -243,6 +248,12 @@ struct module_fun_env return error_retval; \ MODULE_HANDLE_NONLOCAL_EXIT (error_retval) +static void +CHECK_USER_PTR (Lisp_Object obj) +{ + CHECK_TYPE (USER_PTRP (obj), Quser_ptrp, obj); +} + /* Catch signals and throws only if the code can actually signal or throw. If checking is enabled, abort if the current thread is not the Emacs main thread. */ @@ -270,11 +281,8 @@ module_make_global_ref (emacs_env *env, emacs_value ref) { Lisp_Object value = HASH_VALUE (h, i); EMACS_INT refcount = XFASTINT (value) + 1; - if (refcount > MOST_POSITIVE_FIXNUM) - { - module_non_local_exit_signal_1 (env, Qoverflow_error, Qnil); - return module_nil; - } + if (MOST_POSITIVE_FIXNUM < refcount) + xsignal0 (Qoverflow_error); value = make_natnum (refcount); set_hash_value_slot (h, i, value); } @@ -387,17 +395,19 @@ module_make_function (emacs_env *env, ptrdiff_t min_arity, ptrdiff_t max_arity, envptr->data = data; Lisp_Object envobj = make_save_ptr (envptr); - Lisp_Object doc - = (documentation - ? code_convert_string_norecord (build_unibyte_string (documentation), - Qutf_8, false) - : Qnil); + Lisp_Object doc = Qnil; + if (documentation) + { + AUTO_STRING (unibyte_doc, documentation); + doc = code_convert_string_norecord (unibyte_doc, Qutf_8, false); + } + /* FIXME: Use a bytecompiled object, or even better a subr. */ Lisp_Object ret = list4 (Qlambda, list2 (Qand_rest, Qargs), doc, list4 (Qapply, - list2 (Qfunction, Qinternal_module_call), + list2 (Qfunction, Qinternal__module_call), envobj, Qargs)); @@ -414,6 +424,8 @@ module_funcall (emacs_env *env, emacs_value fun, ptrdiff_t nargs, first arg, because that's what Ffuncall takes. */ Lisp_Object *newargs; USE_SAFE_ALLOCA; + if (nargs == PTRDIFF_MAX) + xsignal0 (Qoverflow_error); SAFE_ALLOCA_LISP (newargs, nargs + 1); newargs[0] = value_to_lisp (fun); for (ptrdiff_t i = 0; i < nargs; i++) @@ -460,11 +472,7 @@ module_extract_integer (emacs_env *env, emacs_value n) { MODULE_FUNCTION_BEGIN (0); Lisp_Object l = value_to_lisp (n); - if (! INTEGERP (l)) - { - module_wrong_type (env, Qintegerp, l); - return 0; - } + CHECK_NUMBER (l); return XINT (l); } @@ -472,11 +480,8 @@ static emacs_value module_make_integer (emacs_env *env, intmax_t n) { MODULE_FUNCTION_BEGIN (module_nil); - if (! (MOST_NEGATIVE_FIXNUM <= n && n <= MOST_POSITIVE_FIXNUM)) - { - module_non_local_exit_signal_1 (env, Qoverflow_error, Qnil); - return module_nil; - } + if (FIXNUM_OVERFLOW_P (n)) + xsignal0 (Qoverflow_error); return lisp_to_value (make_number (n)); } @@ -485,11 +490,7 @@ module_extract_float (emacs_env *env, emacs_value f) { MODULE_FUNCTION_BEGIN (0); Lisp_Object lisp = value_to_lisp (f); - if (! FLOATP (lisp)) - { - module_wrong_type (env, Qfloatp, lisp); - return 0; - } + CHECK_TYPE (FLOATP (lisp), Qfloatp, lisp); return XFLOAT_DATA (lisp); } @@ -506,19 +507,10 @@ module_copy_string_contents (emacs_env *env, emacs_value value, char *buffer, { MODULE_FUNCTION_BEGIN (false); Lisp_Object lisp_str = value_to_lisp (value); - if (! STRINGP (lisp_str)) - { - module_wrong_type (env, Qstringp, lisp_str); - return false; - } + CHECK_STRING (lisp_str); Lisp_Object lisp_str_utf8 = ENCODE_UTF_8 (lisp_str); ptrdiff_t raw_size = SBYTES (lisp_str_utf8); - if (raw_size == PTRDIFF_MAX) - { - module_non_local_exit_signal_1 (env, Qoverflow_error, Qnil); - return false; - } ptrdiff_t required_buf_size = raw_size + 1; eassert (length != NULL); @@ -534,8 +526,7 @@ module_copy_string_contents (emacs_env *env, emacs_value value, char *buffer, if (*length < required_buf_size) { *length = required_buf_size; - module_non_local_exit_signal_1 (env, Qargs_out_of_range, Qnil); - return false; + xsignal0 (Qargs_out_of_range); } *length = required_buf_size; @@ -548,12 +539,7 @@ static emacs_value module_make_string (emacs_env *env, const char *str, ptrdiff_t length) { MODULE_FUNCTION_BEGIN (module_nil); - if (length > STRING_BYTES_BOUND) - { - module_non_local_exit_signal_1 (env, Qoverflow_error, Qnil); - return module_nil; - } - Lisp_Object lstr = make_unibyte_string (str, length); + AUTO_STRING_WITH_LEN (lstr, str, length); return lisp_to_value (code_convert_string_norecord (lstr, Qutf_8, false)); } @@ -569,11 +555,7 @@ module_get_user_ptr (emacs_env *env, emacs_value uptr) { MODULE_FUNCTION_BEGIN (NULL); Lisp_Object lisp = value_to_lisp (uptr); - if (! USER_PTRP (lisp)) - { - module_wrong_type (env, Quser_ptr, lisp); - return NULL; - } + CHECK_USER_PTR (lisp); return XUSER_PTR (lisp)->p; } @@ -582,12 +564,8 @@ module_set_user_ptr (emacs_env *env, emacs_value uptr, void *ptr) { /* FIXME: This function should return bool because it can fail. */ MODULE_FUNCTION_BEGIN (); - check_main_thread (); - if (module_non_local_exit_check (env) != emacs_funcall_exit_return) - return; Lisp_Object lisp = value_to_lisp (uptr); - if (! USER_PTRP (lisp)) - module_wrong_type (env, Quser_ptr, lisp); + CHECK_USER_PTR (lisp); XUSER_PTR (lisp)->p = ptr; } @@ -596,11 +574,7 @@ module_get_user_finalizer (emacs_env *env, emacs_value uptr) { MODULE_FUNCTION_BEGIN (NULL); Lisp_Object lisp = value_to_lisp (uptr); - if (! USER_PTRP (lisp)) - { - module_wrong_type (env, Quser_ptr, lisp); - return NULL; - } + CHECK_USER_PTR (lisp); return XUSER_PTR (lisp)->finalizer; } @@ -611,30 +585,26 @@ module_set_user_finalizer (emacs_env *env, emacs_value uptr, /* FIXME: This function should return bool because it can fail. */ MODULE_FUNCTION_BEGIN (); Lisp_Object lisp = value_to_lisp (uptr); - if (! USER_PTRP (lisp)) - module_wrong_type (env, Quser_ptr, lisp); + CHECK_USER_PTR (lisp); XUSER_PTR (lisp)->finalizer = fin; } +static void +check_vec_index (Lisp_Object lvec, ptrdiff_t i) +{ + CHECK_VECTOR (lvec); + if (! (0 <= i && i < ASIZE (lvec))) + args_out_of_range_3 (make_fixnum_or_float (i), + make_number (0), make_number (ASIZE (lvec) - 1)); +} + static void module_vec_set (emacs_env *env, emacs_value vec, ptrdiff_t i, emacs_value val) { /* FIXME: This function should return bool because it can fail. */ MODULE_FUNCTION_BEGIN (); Lisp_Object lvec = value_to_lisp (vec); - if (! VECTORP (lvec)) - { - module_wrong_type (env, Qvectorp, lvec); - return; - } - if (! (0 <= i && i < ASIZE (lvec))) - { - if (MOST_NEGATIVE_FIXNUM <= i && i <= MOST_POSITIVE_FIXNUM) - module_args_out_of_range (env, lvec, make_number (i)); - else - module_non_local_exit_signal_1 (env, Qoverflow_error, Qnil); - return; - } + check_vec_index (lvec, i); ASET (lvec, i, value_to_lisp (val)); } @@ -643,19 +613,7 @@ module_vec_get (emacs_env *env, emacs_value vec, ptrdiff_t i) { MODULE_FUNCTION_BEGIN (module_nil); Lisp_Object lvec = value_to_lisp (vec); - if (! VECTORP (lvec)) - { - module_wrong_type (env, Qvectorp, lvec); - return module_nil; - } - if (! (0 <= i && i < ASIZE (lvec))) - { - if (MOST_NEGATIVE_FIXNUM <= i && i <= MOST_POSITIVE_FIXNUM) - module_args_out_of_range (env, lvec, make_number (i)); - else - module_non_local_exit_signal_1 (env, Qoverflow_error, Qnil); - return module_nil; - } + check_vec_index (lvec, i); return lisp_to_value (AREF (lvec, i)); } @@ -665,11 +623,7 @@ module_vec_size (emacs_env *env, emacs_value vec) /* FIXME: Return a sentinel value (e.g., -1) on error. */ MODULE_FUNCTION_BEGIN (0); Lisp_Object lvec = value_to_lisp (vec); - if (! VECTORP (lvec)) - { - module_wrong_type (env, Qvectorp, lvec); - return 0; - } + CHECK_VECTOR (lvec); return ASIZE (lvec); } @@ -828,14 +782,6 @@ module_non_local_exit_throw_1 (emacs_env *env, Lisp_Object tag, } } -/* Module version of `wrong_type_argument'. */ -static void -module_wrong_type (emacs_env *env, Lisp_Object predicate, Lisp_Object value) -{ - module_non_local_exit_signal_1 (env, Qwrong_type_argument, - list2 (predicate, value)); -} - /* Signal an out-of-memory condition to the caller. */ static void module_out_of_memory (emacs_env *env) @@ -846,13 +792,6 @@ module_out_of_memory (emacs_env *env) XCDR (Vmemory_signal_data)); } -/* Signal arguments are out of range. */ -static void -module_args_out_of_range (emacs_env *env, Lisp_Object a1, Lisp_Object a2) -{ - module_non_local_exit_signal_1 (env, Qargs_out_of_range, list2 (a1, a2)); -} - /* Value conversion. */ @@ -1055,10 +994,12 @@ module_format_fun_env (const struct module_fun_env *env) ? exprintf (&buf, &bufsize, buffer, -1, "#", sym, path) : sprintf (buffer, noaddr_format, env->subr)); - Lisp_Object unibyte_result = make_unibyte_string (buffer, size); + AUTO_STRING_WITH_LEN (unibyte_result, buffer, size); + Lisp_Object result = code_convert_string_norecord (unibyte_result, + Qutf_8, false); if (buf != buffer) xfree (buf); - return code_convert_string_norecord (unibyte_result, Qutf_8, false); + return result; } @@ -1117,7 +1058,7 @@ syms_of_module (void) defsubr (&Smodule_load); - DEFSYM (Qinternal_module_call, "internal--module-call"); + DEFSYM (Qinternal__module_call, "internal--module-call"); defsubr (&Sinternal_module_call); } diff --git a/src/emacs-module.h b/src/emacs-module.h index b4ae5ea743..ae7311b05a 100644 --- a/src/emacs-module.h +++ b/src/emacs-module.h @@ -41,7 +41,7 @@ typedef struct emacs_env_25 emacs_env; BEWARE: Do not assume NULL is a valid value! */ typedef struct emacs_value_tag *emacs_value; -enum emacs_arity { emacs_variadic_function = -2 }; +enum { emacs_variadic_function = -2 }; /* Struct passed to a module init function (emacs_module_init). */ struct emacs_runtime @@ -57,13 +57,6 @@ struct emacs_runtime }; -/* Function prototype for the module init function. */ -typedef int (*emacs_init_function) (struct emacs_runtime *ert); - -/* Function prototype for the module Lisp functions. */ -typedef emacs_value (*emacs_subr) (emacs_env *env, ptrdiff_t nargs, - emacs_value args[], void *data); - /* Possible Emacs function call outcomes. */ enum emacs_funcall_exit { diff --git a/src/emacs.c b/src/emacs.c index 5c187e76ba..3e0cf59640 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -57,6 +57,11 @@ along with GNU Emacs. If not, see . */ #include "dosfns.h" #endif +#ifdef HAVE_LIBSYSTEMD +# include +# include +#endif + #ifdef HAVE_WINDOW_SYSTEM #include TERM_HEADER #endif /* HAVE_WINDOW_SYSTEM */ @@ -80,6 +85,7 @@ along with GNU Emacs. If not, see . */ #include "composite.h" #include "dispextern.h" #include "regex.h" +#include "sheap.h" #include "syntax.h" #include "sysselect.h" #include "systime.h" @@ -128,14 +134,15 @@ Lisp_Object Vlibrary_cache; bool initialized; /* Set to true if this instance of Emacs might dump. */ +#ifndef DOUG_LEA_MALLOC +static +#endif bool might_dump; #ifdef DARWIN_OS extern void unexec_init_emacs_zone (void); #endif -extern void malloc_enable_thread (void); - /* If true, Emacs should not attempt to use a window-specific code, but instead should use the virtual terminal under which it was started. */ bool inhibit_window_system; @@ -180,6 +187,9 @@ bool noninteractive; /* True means remove site-lisp directories from load-path. */ bool no_site_lisp; +/* True means put details like time stamps into builds. */ +bool build_details; + /* Name for the server started by the daemon.*/ static char *daemon_name; @@ -221,6 +231,7 @@ Initialization options:\n\ --display, -d DISPLAY use X server DISPLAY\n\ ", "\ +--no-build-details do not add build details such as time stamps\n\ --no-desktop do not load a saved desktop\n\ --no-init-file, -q load neither ~/.emacs nor default.el\n\ --no-loadup, -nl do not load loadup.el into bare Emacs\n\ @@ -353,17 +364,20 @@ terminate_due_to_signal (int sig, int backtrace_limit) { signal (sig, SIG_DFL); - /* If fatal error occurs in code below, avoid infinite recursion. */ - if (! fatal_error_in_progress) + if (attempt_orderly_shutdown_on_fatal_signal) { - fatal_error_in_progress = 1; + /* If fatal error occurs in code below, avoid infinite recursion. */ + if (! fatal_error_in_progress) + { + fatal_error_in_progress = 1; - totally_unblock_input (); - if (sig == SIGTERM || sig == SIGHUP || sig == SIGINT) - Fkill_emacs (make_number (sig)); + totally_unblock_input (); + if (sig == SIGTERM || sig == SIGHUP || sig == SIGINT) + Fkill_emacs (make_number (sig)); - shut_down_emacs (sig, Qnil); - emacs_backtrace (backtrace_limit); + shut_down_emacs (sig, Qnil); + emacs_backtrace (backtrace_limit); + } } /* Signal the same code; this time it will really be fatal. @@ -713,6 +727,7 @@ main (int argc, char **argv) unexec_init_emacs_zone (); #endif + init_standard_fds (); atexit (close_output_streams); #ifdef HAVE_MODULES @@ -772,7 +787,7 @@ main (int argc, char **argv) filename_from_ansi (ch_to_dir, newdir); ch_to_dir = newdir; #endif - original_pwd = get_current_dir_name (); + original_pwd = emacs_get_current_dir_name (); if (chdir (ch_to_dir) != 0) { fprintf (stderr, "%s: Can't chdir to %s: %s\n", @@ -891,24 +906,25 @@ main (int argc, char **argv) char *term; if (argmatch (argv, argc, "-t", "--terminal", 4, &term, &skip_args)) { - int result; - emacs_close (0); - emacs_close (1); - result = emacs_open (term, O_RDWR, 0); - if (result < 0 || fcntl (0, F_DUPFD_CLOEXEC, 1) < 0) + emacs_close (STDIN_FILENO); + emacs_close (STDOUT_FILENO); + int result = emacs_open (term, O_RDWR, 0); + if (result != STDIN_FILENO + || (fcntl (STDIN_FILENO, F_DUPFD_CLOEXEC, STDOUT_FILENO) + != STDOUT_FILENO)) { char *errstring = strerror (errno); fprintf (stderr, "%s: %s: %s\n", argv[0], term, errstring); - exit (1); + exit (EXIT_FAILURE); } - if (! isatty (0)) + if (! isatty (STDIN_FILENO)) { fprintf (stderr, "%s: %s: not a tty\n", argv[0], term); - exit (1); + exit (EXIT_FAILURE); } fprintf (stderr, "Using %s\n", term); #ifdef HAVE_WINDOW_SYSTEM - inhibit_window_system = 1; /* -t => -nw */ + inhibit_window_system = true; /* -t => -nw */ #endif } else @@ -956,6 +972,9 @@ main (int argc, char **argv) w32_daemon_event = NULL; #endif + + int sockfd = -1; + if (argmatch (argv, argc, "-daemon", "--daemon", 5, NULL, &skip_args) || argmatch (argv, argc, "-daemon", "--daemon", 5, &dname_arg, &skip_args)) { @@ -989,6 +1008,21 @@ main (int argc, char **argv) exit (1); } +#ifdef HAVE_LIBSYSTEMD + /* Read the number of sockets passed through by systemd. */ + int systemd_socket = sd_listen_fds (1); + + if (systemd_socket > 1) + fprintf (stderr, + ("\n" + "Warning: systemd passed more than one socket to Emacs.\n" + "Try 'Accept=false' in the Emacs socket unit file.\n")); + else if (systemd_socket == 1 + && (0 < sd_is_socket (SD_LISTEN_FDS_START, + AF_UNSPEC, SOCK_STREAM, 1))) + sockfd = SD_LISTEN_FDS_START; +#endif /* HAVE_LIBSYSTEMD */ + #ifndef DAEMON_MUST_EXEC #ifdef USE_GTK fprintf (stderr, "\nWarning: due to a long standing Gtk+ bug\nhttp://bugzilla.gnome.org/show_bug.cgi?id=85715\n\ @@ -1185,6 +1219,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem no_site_lisp = argmatch (argv, argc, "-nsl", "--no-site-lisp", 11, NULL, &skip_args); + build_details = ! argmatch (argv, argc, "-no-build-details", + "--no-build-details", 7, NULL, &skip_args); + #ifdef HAVE_NS ns_pool = ns_alloc_autorelease_pool (); #ifdef NS_IMPL_GNUSTEP @@ -1198,7 +1235,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem /* Started from GUI? */ /* FIXME: Do the right thing if getenv returns NULL, or if chdir fails. */ - if (! inhibit_window_system && ! isatty (0) && ! ch_to_dir) + if (! inhibit_window_system && ! isatty (STDIN_FILENO) && ! ch_to_dir) chdir (getenv ("HOME")); if (skip_args < argc) { @@ -1542,7 +1579,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem /* This can create a thread that may call getenv, so it must follow all calls to putenv and setenv. Also, this sets up add_keyboard_wait_descriptor, which init_display uses. */ - init_process_emacs (); + init_process_emacs (sockfd); init_keyboard (); /* This too must precede init_sys_modes. */ if (!noninteractive) @@ -1634,6 +1671,7 @@ static const struct standard_args standard_args[] = { "-help", "--help", 90, 0 }, { "-nl", "--no-loadup", 70, 0 }, { "-nsl", "--no-site-lisp", 65, 0 }, + { "-no-build-details", "--no-build-details", 63, 0 }, /* -d must come last before the options handled in startup.el. */ { "-d", "--display", 60, 1 }, { "-display", 0, 60, 1 }, @@ -2076,6 +2114,17 @@ You must run Emacs in batch mode in order to dump it. */) tem = Vpurify_flag; Vpurify_flag = Qnil; +#ifdef HYBRID_MALLOC + { + static char const fmt[] = "%d of %d static heap bytes used"; + char buf[sizeof fmt + 2 * (INT_STRLEN_BOUND (int) - 2)]; + int max_usage = max_bss_sbrk_ptr - bss_sbrk_buffer; + sprintf (buf, fmt, max_usage, STATIC_HEAP_SIZE); + /* Don't log messages, because at this point buffers cannot be created. */ + message1_nolog (buf); + } +#endif + fflush (stdout); /* Tell malloc where start of impure now is. */ /* Also arrange for warnings when nearly out of space. */ @@ -2334,9 +2383,9 @@ from the parent process and its tty file descriptors. */) /* Get rid of stdin, stdout and stderr. */ nfd = emacs_open ("/dev/null", O_RDWR, 0); err |= nfd < 0; - err |= dup2 (nfd, 0) < 0; - err |= dup2 (nfd, 1) < 0; - err |= dup2 (nfd, 2) < 0; + err |= dup2 (nfd, STDIN_FILENO) < 0; + err |= dup2 (nfd, STDOUT_FILENO) < 0; + err |= dup2 (nfd, STDERR_FILENO) < 0; err |= emacs_close (nfd) != 0; /* Closing the pipe will notify the parent that it can exit. @@ -2396,8 +2445,8 @@ Special values: `ms-dos' compiled as an MS-DOS application. `windows-nt' compiled as a native W32 application. `cygwin' compiled using the Cygwin library. -Anything else (in Emacs 24.1, the possibilities are: aix, berkeley-unix, -hpux, irix, usg-unix-v) indicates some sort of Unix system. */); +Anything else (in Emacs 26, the possibilities are: aix, berkeley-unix, +hpux, usg-unix-v) indicates some sort of Unix system. */); Vsystem_type = intern_c_string (SYSTEM_TYPE); /* See configure.ac for the possible SYSTEM_TYPEs. */ diff --git a/src/eval.c b/src/eval.c index fe6460d53b..72facd5db6 100644 --- a/src/eval.c +++ b/src/eval.c @@ -90,6 +90,7 @@ union specbinding *backtrace_top (void) EXTERNALLY_VISIBLE; static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *); static Lisp_Object apply_lambda (Lisp_Object, Lisp_Object, ptrdiff_t); +static Lisp_Object lambda_arity (Lisp_Object); static Lisp_Object specpdl_symbol (union specbinding *pdl) @@ -1751,9 +1752,9 @@ find_handler_clause (Lisp_Object handlers, Lisp_Object conditions) } -/* Dump an error message; called like vprintf. */ -void -verror (const char *m, va_list ap) +/* Format and return a string; called like vprintf. */ +Lisp_Object +vformat_string (const char *m, va_list ap) { char buf[4000]; ptrdiff_t size = sizeof buf; @@ -1767,7 +1768,14 @@ verror (const char *m, va_list ap) if (buffer != buf) xfree (buffer); - xsignal1 (Qerror, string); + return string; +} + +/* Dump an error message; called like vprintf. */ +void +verror (const char *m, va_list ap) +{ + xsignal1 (Qerror, vformat_string (m, ap)); } @@ -2927,6 +2935,118 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, return unbind_to (count, val); } +DEFUN ("func-arity", Ffunc_arity, Sfunc_arity, 1, 1, 0, + doc: /* Return minimum and maximum number of args allowed for FUNCTION. +FUNCTION must be a function of some kind. +The returned value is a cons cell (MIN . MAX). MIN is the minimum number +of args. MAX is the maximum number, or the symbol `many', for a +function with `&rest' args, or `unevalled' for a special form. */) + (Lisp_Object function) +{ + Lisp_Object original; + Lisp_Object funcar; + Lisp_Object result; + + original = function; + + retry: + + /* Optimize for no indirection. */ + function = original; + if (SYMBOLP (function) && !NILP (function)) + { + function = XSYMBOL (function)->function; + if (SYMBOLP (function)) + function = indirect_function (function); + } + + if (CONSP (function) && EQ (XCAR (function), Qmacro)) + function = XCDR (function); + + if (SUBRP (function)) + result = Fsubr_arity (function); + else if (COMPILEDP (function)) + result = lambda_arity (function); + else + { + if (NILP (function)) + xsignal1 (Qvoid_function, original); + if (!CONSP (function)) + xsignal1 (Qinvalid_function, original); + funcar = XCAR (function); + if (!SYMBOLP (funcar)) + xsignal1 (Qinvalid_function, original); + if (EQ (funcar, Qlambda) + || EQ (funcar, Qclosure)) + result = lambda_arity (function); + else if (EQ (funcar, Qautoload)) + { + Fautoload_do_load (function, original, Qnil); + goto retry; + } + else + xsignal1 (Qinvalid_function, original); + } + return result; +} + +/* FUN must be either a lambda-expression or a compiled-code object. */ +static Lisp_Object +lambda_arity (Lisp_Object fun) +{ + Lisp_Object syms_left; + + if (CONSP (fun)) + { + if (EQ (XCAR (fun), Qclosure)) + { + fun = XCDR (fun); /* Drop `closure'. */ + CHECK_LIST_CONS (fun, fun); + } + syms_left = XCDR (fun); + if (CONSP (syms_left)) + syms_left = XCAR (syms_left); + else + xsignal1 (Qinvalid_function, fun); + } + else if (COMPILEDP (fun)) + { + ptrdiff_t size = ASIZE (fun) & PSEUDOVECTOR_SIZE_MASK; + if (size <= COMPILED_STACK_DEPTH) + xsignal1 (Qinvalid_function, fun); + syms_left = AREF (fun, COMPILED_ARGLIST); + if (INTEGERP (syms_left)) + return get_byte_code_arity (syms_left); + } + else + emacs_abort (); + + EMACS_INT minargs = 0, maxargs = 0; + bool optional = false; + for (; CONSP (syms_left); syms_left = XCDR (syms_left)) + { + Lisp_Object next = XCAR (syms_left); + if (!SYMBOLP (next)) + xsignal1 (Qinvalid_function, fun); + + if (EQ (next, Qand_rest)) + return Fcons (make_number (minargs), Qmany); + else if (EQ (next, Qand_optional)) + optional = true; + else + { + if (!optional) + minargs++; + maxargs++; + } + } + + if (!NILP (syms_left)) + xsignal1 (Qinvalid_function, fun); + + return Fcons (make_number (minargs), make_number (maxargs)); +} + DEFUN ("fetch-bytecode", Ffetch_bytecode, Sfetch_bytecode, 1, 1, 0, doc: /* If byte-compiled OBJECT is lazy-loaded, fetch it now. */) @@ -3801,6 +3921,7 @@ alist of active lexical bindings. */); defsubr (&Seval); defsubr (&Sapply); defsubr (&Sfuncall); + defsubr (&Sfunc_arity); defsubr (&Srun_hooks); defsubr (&Srun_hook_with_args); defsubr (&Srun_hook_with_args_until_success); diff --git a/src/fileio.c b/src/fileio.c index dfab3de9e9..d9318083ce 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -187,9 +187,9 @@ report_file_errno (char const *string, Lisp_Object name, int errorno) Lisp_Object data = CONSP (name) || NILP (name) ? name : list1 (name); synchronize_system_messages_locale (); char *str = strerror (errorno); + AUTO_STRING (unibyte_str, str); Lisp_Object errstring - = code_convert_string_norecord (build_unibyte_string (str), - Vlocale_coding_system, 0); + = code_convert_string_norecord (unibyte_str, Vlocale_coding_system, 0); Lisp_Object errdata = Fcons (errstring, data); if (errorno == EEXIST) @@ -217,9 +217,9 @@ report_file_notify_error (const char *string, Lisp_Object name) Lisp_Object data = CONSP (name) || NILP (name) ? name : list1 (name); synchronize_system_messages_locale (); char *str = strerror (errno); + AUTO_STRING (unibyte_str, str); Lisp_Object errstring - = code_convert_string_norecord (build_unibyte_string (str), - Vlocale_coding_system, 0); + = code_convert_string_norecord (unibyte_str, Vlocale_coding_system, 0); Lisp_Object errdata = Fcons (errstring, data); xsignal (Qfile_notify_error, Fcons (build_string (string), errdata)); @@ -1015,11 +1015,9 @@ filesystem tree, not (expand-file-name ".." dirname). */) /* Drive must be set, so this is okay. */ if (strcmp (nm - 2, SSDATA (name)) != 0) { - char temp[] = " :"; - name = make_specified_string (nm, -1, p - nm, multibyte); - temp[0] = DRIVE_LETTER (drive); - AUTO_STRING (drive_prefix, temp); + char temp[] = { DRIVE_LETTER (drive), ':', 0 }; + AUTO_STRING_WITH_LEN (drive_prefix, temp, 2); name = concat2 (drive_prefix, name); } #ifdef WINDOWSNT @@ -2664,13 +2662,13 @@ file_directory_p (char const *file) DEFUN ("file-accessible-directory-p", Ffile_accessible_directory_p, Sfile_accessible_directory_p, 1, 1, 0, - doc: /* Return t if file FILENAME names a directory you can open. -For the value to be t, FILENAME must specify the name of a directory as a file, -and the directory must allow you to open files in it. In order to use a -directory as a buffer's current directory, this predicate must return true. -A directory name spec may be given instead; then the value is t -if the directory so specified exists and really is a readable and -searchable directory. */) + doc: /* Return t if FILENAME names a directory you can open. +For the value to be t, FILENAME must specify the name of a directory +as a file, and the directory must allow you to open files in it. In +order to use a directory as a buffer's current directory, this +predicate must return true. A directory name spec may be given +instead; then the value is t if the directory so specified exists and +really is a readable and searchable directory. */) (Lisp_Object filename) { Lisp_Object absname; @@ -4806,7 +4804,7 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename, encoded_filename = ENCODE_FILE (filename); fn = SSDATA (encoded_filename); - open_flags = O_WRONLY | O_BINARY | O_CREAT; + open_flags = O_WRONLY | O_CREAT; open_flags |= EQ (mustbenew, Qexcl) ? O_EXCL : !NILP (append) ? 0 : O_TRUNC; if (NUMBERP (append)) offset = file_offset (append); @@ -4925,7 +4923,7 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename, if (timespec_valid_p (modtime) && ! (valid_timestamp_file_system && st.st_dev == timestamp_file_system)) { - int desc1 = emacs_open (fn, O_WRONLY | O_BINARY, 0); + int desc1 = emacs_open (fn, O_WRONLY, 0); if (desc1 >= 0) { struct stat st1; diff --git a/src/filelock.c b/src/filelock.c index 8aaa656438..62017188b3 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -193,14 +193,11 @@ get_boot_time (void) /* If we did not find a boot time in wtmp, look at wtmp, and so on. */ for (counter = 0; counter < 20 && ! boot_time; counter++) { + Lisp_Object filename = Qnil; + bool delete_flag = false; char cmd_string[sizeof WTMP_FILE ".19.gz"]; - Lisp_Object tempname, filename; - bool delete_flag = 0; - - filename = Qnil; - - tempname = make_formatted_string - (cmd_string, "%s.%d", WTMP_FILE, counter); + AUTO_STRING_WITH_LEN (tempname, cmd_string, + sprintf (cmd_string, "%s.%d", WTMP_FILE, counter)); if (! NILP (Ffile_exists_p (tempname))) filename = tempname; else @@ -220,7 +217,7 @@ get_boot_time (void) CALLN (Fcall_process, build_string ("gzip"), Qnil, list2 (QCfile, filename), Qnil, build_string ("-cd"), tempname); - delete_flag = 1; + delete_flag = true; } } @@ -255,14 +252,7 @@ get_boot_time_1 (const char *filename, bool newest) struct utmp ut, *utp; if (filename) - { - /* On some versions of IRIX, opening a nonexistent file name - is likely to crash in the utmp routines. */ - if (faccessat (AT_FDCWD, filename, R_OK, AT_EACCESS) != 0) - return; - - utmpname (filename); - } + utmpname (filename); setutent (); @@ -497,7 +487,7 @@ read_lock_data (char *lfname, char lfinfo[MAX_LFINFO + 1]) while ((nbytes = readlinkat (AT_FDCWD, lfname, lfinfo, MAX_LFINFO + 1)) < 0 && errno == EINVAL) { - int fd = emacs_open (lfname, O_RDONLY | O_BINARY | O_NOFOLLOW, 0); + int fd = emacs_open (lfname, O_RDONLY | O_NOFOLLOW, 0); if (0 <= fd) { /* Use read, not emacs_read, since FD isn't unwind-protected. */ diff --git a/src/fns.c b/src/fns.c index 9bbbb6d7b7..731f0a899a 100644 --- a/src/fns.c +++ b/src/fns.c @@ -21,8 +21,10 @@ along with GNU Emacs. If not, see . */ #include #include +#include #include #include +#include #include "lisp.h" #include "character.h" @@ -331,6 +333,50 @@ Symbols are also allowed; their print names are used instead. */) return i1 < SCHARS (string2) ? Qt : Qnil; } +DEFUN ("string-version-lessp", Fstring_version_lessp, + Sstring_version_lessp, 2, 2, 0, + doc: /* Return non-nil if S1 is less than S2, as version strings. + +This function compares version strings S1 and S2: + 1) By prefix lexicographically. + 2) Then by version (similarly to version comparison of Debian's dpkg). + Leading zeros in version numbers are ignored. + 3) If both prefix and version are equal, compare as ordinary strings. + +For example, \"foo2.png\" compares less than \"foo12.png\". +Case is significant. +Symbols are also allowed; their print names are used instead. */) + (Lisp_Object string1, Lisp_Object string2) +{ + if (SYMBOLP (string1)) + string1 = SYMBOL_NAME (string1); + if (SYMBOLP (string2)) + string2 = SYMBOL_NAME (string2); + CHECK_STRING (string1); + CHECK_STRING (string2); + + char *p1 = SSDATA (string1); + char *p2 = SSDATA (string2); + char *lim1 = p1 + SBYTES (string1); + char *lim2 = p2 + SBYTES (string2); + int cmp; + + while ((cmp = filevercmp (p1, p2)) == 0) + { + /* If the strings are identical through their first null bytes, + skip past identical prefixes and try again. */ + ptrdiff_t size = strlen (p1) + 1; + p1 += size; + p2 += size; + if (lim1 < p1) + return lim2 < p2 ? Qnil : Qt; + if (lim2 < p2) + return Qnil; + } + + return cmp < 0 ? Qt : Qnil; +} + DEFUN ("string-collate-lessp", Fstring_collate_lessp, Sstring_collate_lessp, 2, 4, 0, doc: /* Return t if first arg string is less than second in collation order. Symbols are also allowed; their print names are used instead. @@ -1349,7 +1395,7 @@ The value is actually the tail of LIST whose car is ELT. */) (register Lisp_Object elt, Lisp_Object list) { register Lisp_Object tail; - for (tail = list; CONSP (tail); tail = XCDR (tail)) + for (tail = list; !NILP (tail); tail = XCDR (tail)) { register Lisp_Object tem; CHECK_LIST_CONS (tail, list); @@ -1397,7 +1443,7 @@ The value is actually the tail of LIST whose car is ELT. */) if (!FLOATP (elt)) return Fmemq (elt, list); - for (tail = list; CONSP (tail); tail = XCDR (tail)) + for (tail = list; !NILP (tail); tail = XCDR (tail)) { register Lisp_Object tem; CHECK_LIST_CONS (tail, list); @@ -1710,7 +1756,7 @@ changing the value of a sequence `foo'. */) { Lisp_Object tail, prev; - for (tail = seq, prev = Qnil; CONSP (tail); tail = XCDR (tail)) + for (tail = seq, prev = Qnil; !NILP (tail); tail = XCDR (tail)) { CHECK_LIST_CONS (tail, seq); @@ -2762,17 +2808,24 @@ require_unwind (Lisp_Object old_value) DEFUN ("require", Frequire, Srequire, 1, 3, 0, doc: /* If feature FEATURE is not loaded, load it from FILENAME. -If FEATURE is not a member of the list `features', then the feature -is not loaded; so load the file FILENAME. -If FILENAME is omitted, the printname of FEATURE is used as the file name, -and `load' will try to load this name appended with the suffix `.elc', -`.el', or the system-dependent suffix for dynamic module files, in that -order. The name without appended suffix will not be used. -See `get-load-suffixes' for the complete list of suffixes. -If the optional third argument NOERROR is non-nil, -then return nil if the file is not found instead of signaling an error. -Normally the return value is FEATURE. -The normal messages at start and end of loading FILENAME are suppressed. */) +If FEATURE is not a member of the list `features', then the feature is +not loaded; so load the file FILENAME. + +If FILENAME is omitted, the printname of FEATURE is used as the file +name, and `load' will try to load this name appended with the suffix +`.elc', `.el', or the system-dependent suffix for dynamic module +files, in that order. The name without appended suffix will not be +used. See `get-load-suffixes' for the complete list of suffixes. + +The directories in `load-path' are searched when trying to find the +file name. + +If the optional third argument NOERROR is non-nil, then return nil if +the file is not found instead of signaling an error. Normally the +return value is FEATURE. + +The normal messages at start and end of loading FILENAME are +suppressed. */) (Lisp_Object feature, Lisp_Object filename, Lisp_Object noerror) { Lisp_Object tem; @@ -2953,7 +3006,6 @@ The data read from the system are decoded using `locale-coding-system'. */) { char *str = NULL; #ifdef HAVE_LANGINFO_CODESET - Lisp_Object val; if (EQ (item, Qcodeset)) { str = nl_langinfo (CODESET); @@ -2969,7 +3021,7 @@ The data read from the system are decoded using `locale-coding-system'. */) for (i = 0; i < 7; i++) { str = nl_langinfo (days[i]); - val = build_unibyte_string (str); + AUTO_STRING (val, str); /* Fixme: Is this coding system necessarily right, even if it is consistent with CODESET? If not, what to do? */ ASET (v, i, code_convert_string_norecord (val, Vlocale_coding_system, @@ -2989,7 +3041,7 @@ The data read from the system are decoded using `locale-coding-system'. */) for (i = 0; i < 12; i++) { str = nl_langinfo (months[i]); - val = build_unibyte_string (str); + AUTO_STRING (val, str); ASET (v, i, code_convert_string_norecord (val, Vlocale_coding_system, 0)); } @@ -3622,8 +3674,6 @@ larger_vector (Lisp_Object vec, ptrdiff_t incr_min, ptrdiff_t nitems_max) Low-level Functions ***********************************************************************/ -struct hash_table_test hashtest_eq, hashtest_eql, hashtest_equal; - /* Compare KEY1 which has hash code HASH1 and KEY2 with hash code HASH2 in hash table H using `eql'. Value is true if KEY1 and KEY2 are the same. */ @@ -3664,7 +3714,6 @@ cmpfn_user_defined (struct hash_table_test *ht, return !NILP (call2 (ht->user_cmp_function, key1, key2)); } - /* Value is a hash code for KEY for use in hash table H which uses `eq' to compare keys. The hash code returned is guaranteed to fit in a Lisp integer. */ @@ -3672,34 +3721,27 @@ cmpfn_user_defined (struct hash_table_test *ht, static EMACS_UINT hashfn_eq (struct hash_table_test *ht, Lisp_Object key) { - EMACS_UINT hash = XHASH (key) ^ XTYPE (key); - return hash; + return XHASH (key) ^ XTYPE (key); } /* Value is a hash code for KEY for use in hash table H which uses - `eql' to compare keys. The hash code returned is guaranteed to fit + `equal' to compare keys. The hash code returned is guaranteed to fit in a Lisp integer. */ static EMACS_UINT -hashfn_eql (struct hash_table_test *ht, Lisp_Object key) +hashfn_equal (struct hash_table_test *ht, Lisp_Object key) { - EMACS_UINT hash; - if (FLOATP (key)) - hash = sxhash (key, 0); - else - hash = XHASH (key) ^ XTYPE (key); - return hash; + return sxhash (key, 0); } /* Value is a hash code for KEY for use in hash table H which uses - `equal' to compare keys. The hash code returned is guaranteed to fit + `eql' to compare keys. The hash code returned is guaranteed to fit in a Lisp integer. */ static EMACS_UINT -hashfn_equal (struct hash_table_test *ht, Lisp_Object key) +hashfn_eql (struct hash_table_test *ht, Lisp_Object key) { - EMACS_UINT hash = sxhash (key, 0); - return hash; + return FLOATP (key) ? hashfn_equal (ht, key) : hashfn_eq (ht, key); } /* Value is a hash code for KEY for use in hash table H which uses as @@ -3713,6 +3755,14 @@ hashfn_user_defined (struct hash_table_test *ht, Lisp_Object key) return hashfn_eq (ht, hash); } +struct hash_table_test const + hashtest_eq = { LISPSYM_INITIALLY (Qeq), LISPSYM_INITIALLY (Qnil), + LISPSYM_INITIALLY (Qnil), 0, hashfn_eq }, + hashtest_eql = { LISPSYM_INITIALLY (Qeql), LISPSYM_INITIALLY (Qnil), + LISPSYM_INITIALLY (Qnil), cmpfn_eql, hashfn_eql }, + hashtest_equal = { LISPSYM_INITIALLY (Qequal), LISPSYM_INITIALLY (Qnil), + LISPSYM_INITIALLY (Qnil), cmpfn_equal, hashfn_equal }; + /* Allocate basically initialized hash table. */ static struct Lisp_Hash_Table * @@ -4402,15 +4452,29 @@ sxhash (Lisp_Object obj, int depth) Lisp Interface ***********************************************************************/ +DEFUN ("sxhash-eq", Fsxhash_eq, Ssxhash_eq, 1, 1, 0, + doc: /* Return an integer hash code for OBJ suitable for `eq'. +If (eq A B), then (= (sxhash-eq A) (sxhash-eq B)). */) + (Lisp_Object obj) +{ + return make_number (hashfn_eq (NULL, obj)); +} -DEFUN ("sxhash", Fsxhash, Ssxhash, 1, 1, 0, - doc: /* Compute a hash code for OBJ and return it as integer. */) +DEFUN ("sxhash-eql", Fsxhash_eql, Ssxhash_eql, 1, 1, 0, + doc: /* Return an integer hash code for OBJ suitable for `eql'. +If (eql A B), then (= (sxhash-eql A) (sxhash-eql B)). */) (Lisp_Object obj) { - EMACS_UINT hash = sxhash (obj, 0); - return make_number (hash); + return make_number (hashfn_eql (NULL, obj)); } +DEFUN ("sxhash-equal", Fsxhash_equal, Ssxhash_equal, 1, 1, 0, + doc: /* Return an integer hash code for OBJ suitable for `equal'. +If (equal A B), then (= (sxhash-equal A) (sxhash-equal B)). */) + (Lisp_Object obj) +{ + return make_number (hashfn_equal (NULL, obj)); +} DEFUN ("make-hash-table", Fmake_hash_table, Smake_hash_table, 0, MANY, 0, doc: /* Create and return a new hash table. @@ -4691,6 +4755,21 @@ returns nil, then (funcall TEST x1 x2) also returns nil. */) #include "sha256.h" #include "sha512.h" +static Lisp_Object +make_digest_string (Lisp_Object digest, int digest_size) +{ + unsigned char *p = SDATA (digest); + + for (int i = digest_size - 1; i >= 0; i--) + { + static char const hexdigit[16] = "0123456789abcdef"; + int p_i = p[i]; + p[2 * i] = hexdigit[p_i >> 4]; + p[2 * i + 1] = hexdigit[p_i & 0xf]; + } + return digest; +} + /* ALGORITHM is a symbol: md5, sha1, sha224 and so on. */ static Lisp_Object @@ -4698,7 +4777,6 @@ secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, Lisp_Object end, Lisp_Object coding_system, Lisp_Object noerror, Lisp_Object binary) { - int i; ptrdiff_t size, start_char = 0, start_byte, end_char = 0, end_byte; register EMACS_INT b, e; register struct buffer *bp; @@ -4890,17 +4968,7 @@ secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, SSDATA (digest)); if (NILP (binary)) - { - unsigned char *p = SDATA (digest); - for (i = digest_size - 1; i >= 0; i--) - { - static char const hexdigit[16] = "0123456789abcdef"; - int p_i = p[i]; - p[2 * i] = hexdigit[p_i >> 4]; - p[2 * i + 1] = hexdigit[p_i & 0xf]; - } - return digest; - } + return make_digest_string (digest, digest_size); else return make_unibyte_string (SSDATA (digest), digest_size); } @@ -4951,6 +5019,45 @@ If BINARY is non-nil, returns a string in binary form. */) { return secure_hash (algorithm, object, start, end, Qnil, Qnil, binary); } + +DEFUN ("buffer-hash", Fbuffer_hash, Sbuffer_hash, 0, 1, 0, + doc: /* Return a hash of the contents of BUFFER-OR-NAME. +This hash is performed on the raw internal format of the buffer, +disregarding any coding systems. +If nil, use the current buffer." */ ) + (Lisp_Object buffer_or_name) +{ + Lisp_Object buffer; + struct buffer *b; + struct sha1_ctx ctx; + + if (NILP (buffer_or_name)) + buffer = Fcurrent_buffer (); + else + buffer = Fget_buffer (buffer_or_name); + if (NILP (buffer)) + nsberror (buffer_or_name); + + b = XBUFFER (buffer); + sha1_init_ctx (&ctx); + + /* Process the first part of the buffer. */ + sha1_process_bytes (BUF_BEG_ADDR (b), + BUF_GPT_BYTE (b) - BUF_BEG_BYTE (b), + &ctx); + + /* If the gap is before the end of the buffer, process the last half + of the buffer. */ + if (BUF_GPT_BYTE (b) < BUF_Z_BYTE (b)) + sha1_process_bytes (BUF_GAP_END_ADDR (b), + BUF_Z_ADDR (b) - BUF_GAP_END_ADDR (b), + &ctx); + + Lisp_Object digest = make_uninit_string (SHA1_DIGEST_SIZE * 2); + sha1_finish_ctx (&ctx, SSDATA (digest)); + return make_digest_string (digest, SHA1_DIGEST_SIZE); +} + void syms_of_fns (void) @@ -4978,7 +5085,9 @@ syms_of_fns (void) DEFSYM (Qkey_or_value, "key-or-value"); DEFSYM (Qkey_and_value, "key-and-value"); - defsubr (&Ssxhash); + defsubr (&Ssxhash_eq); + defsubr (&Ssxhash_eql); + defsubr (&Ssxhash_equal); defsubr (&Smake_hash_table); defsubr (&Scopy_hash_table); defsubr (&Shash_table_count); @@ -5049,6 +5158,7 @@ this variable. */); defsubr (&Sstring_equal); defsubr (&Scompare_strings); defsubr (&Sstring_lessp); + defsubr (&Sstring_version_lessp); defsubr (&Sstring_collate_lessp); defsubr (&Sstring_collate_equalp); defsubr (&Sappend); @@ -5109,23 +5219,6 @@ this variable. */); defsubr (&Sbase64_decode_string); defsubr (&Smd5); defsubr (&Ssecure_hash); + defsubr (&Sbuffer_hash); defsubr (&Slocale_info); - - hashtest_eq.name = Qeq; - hashtest_eq.user_hash_function = Qnil; - hashtest_eq.user_cmp_function = Qnil; - hashtest_eq.cmpfn = 0; - hashtest_eq.hashfn = hashfn_eq; - - hashtest_eql.name = Qeql; - hashtest_eql.user_hash_function = Qnil; - hashtest_eql.user_cmp_function = Qnil; - hashtest_eql.cmpfn = cmpfn_eql; - hashtest_eql.hashfn = hashfn_eql; - - hashtest_equal.name = Qequal; - hashtest_equal.user_hash_function = Qnil; - hashtest_equal.user_cmp_function = Qnil; - hashtest_equal.cmpfn = cmpfn_equal; - hashtest_equal.hashfn = hashfn_equal; } diff --git a/src/font.c b/src/font.c index 2519599bc6..6dbda40d52 100644 --- a/src/font.c +++ b/src/font.c @@ -1771,7 +1771,8 @@ font_parse_family_registry (Lisp_Object family, Lisp_Object registry, Lisp_Objec p1 = strchr (p0, '-'); if (! p1) { - AUTO_STRING (extra, (&"*-*"[len && p0[len - 1] == '*'])); + bool asterisk = len && p0[len - 1] == '*'; + AUTO_STRING_WITH_LEN (extra, &"*-*"[asterisk], 3 - asterisk); registry = concat2 (registry, extra); } registry = Fdowncase (registry); diff --git a/src/fontset.c b/src/fontset.c index dc037a807c..4ab1367431 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -63,17 +63,26 @@ along with GNU Emacs. If not, see . */ An element of a base fontset is a vector of FONT-DEFs which themselves are vectors of the form [ FONT-SPEC ENCODING REPERTORY ]. - An element of a realized fontset is nil, t, 0, or a vector of this - form: + An element of a realized fontset is nil, t, 0, or a cons that has + this from: - [ PREFERRED-RFONT-DEF RFONT-DEF0 RFONT-DEF1 ... ] + (CHARSET-ORDERED-LIST-TICK . FONT-GROUP) + + CHARSET_ORDERED_LIST_TICK is the same as charset_ordered_list_tick or -1. + + FONT-GROUP is a vector of elements that have this form: + + [ RFONT-DEF0 RFONT-DEF1 ... ] Each RFONT-DEFn (i.e. Realized FONT-DEF) has this form: [ FACE-ID FONT-DEF FONT-OBJECT SORTING-SCORE ] - RFONT-DEFn are automatically reordered by the current charset - priority list. + RFONT-DEFn are automatically reordered considering the current + charset priority list, the current language environment, and + priorities determined by font-backends. + + RFONT-DEFn may not be a vector in the following cases. The value nil means that we have not yet generated the above vector from the base of the fontset. @@ -83,7 +92,7 @@ along with GNU Emacs. If not, see . */ The value 0 means that no font is available for the corresponding range of characters in this fontset, but may be available in the - default fontset. + fallback font-group or in the default fontset. A fontset has 8 extra slots. @@ -407,6 +416,9 @@ reorder_font_vector (Lisp_Object font_group, struct font *font) if (! NILP (encoding)) { + /* This spec specifies an encoding by a charset set + name. Reflect the preference order of that charset + in the upper bits of SCORE. */ Lisp_Object tail; for (tail = Vcharset_ordered_list; @@ -419,6 +431,10 @@ reorder_font_vector (Lisp_Object font_group, struct font *font) } else { + /* This spec does not specify an encoding. If the spec + specifies a language, and the language is not for the + current language environment, make the score + larger. */ Lisp_Object lang = Ffont_get (font_spec, QClang); if (! NILP (lang) @@ -442,11 +458,11 @@ reorder_font_vector (Lisp_Object font_group, struct font *font) XSETCAR (font_group, make_number (low_tick_bits)); } -/* Return a font-group (actually a cons (-1 . FONT-GROUP-VECTOR)) for - character C in FONTSET. If C is -1, return a fallback font-group. - If C is not -1, the value may be Qt (FONTSET doesn't have a font - for C even in the fallback group), or 0 (a font for C may be found - only in the fallback group). */ +/* Return a font-group (actually a cons (CHARSET_ORDERED_LIST_TICK + . FONT-GROUP)) for character C or a fallback font-group in the + realized fontset FONTSET. The elements of FONT-GROUP are + RFONT-DEFs. The value may not be a cons. See the comment at the + head of this file for the detail of the return value. */ static Lisp_Object fontset_get_font_group (Lisp_Object fontset, int c) @@ -461,23 +477,37 @@ fontset_get_font_group (Lisp_Object fontset, int c) else font_group = FONTSET_FALLBACK (fontset); if (! NILP (font_group)) + /* We have already realized FONT-DEFs of this font group for C or + for fallback (FONT_GROUP is a cons), or we have already found + that no appropriate font was found (FONT_GROUP is t or 0). */ return font_group; base_fontset = FONTSET_BASE (fontset); if (NILP (base_fontset)) + /* Actually we never come here because FONTSET is a realized one, + and thus it should have a base. */ font_group = Qnil; else if (c >= 0) font_group = char_table_ref_and_range (base_fontset, c, &from, &to); else font_group = FONTSET_FALLBACK (base_fontset); + + /* FONT_GROUP not being a vector means that no fonts are specified + for C, or the fontset does not have fallback fonts. */ if (NILP (font_group)) { font_group = make_number (0); if (c >= 0) + /* Record that FONTSET does not specify fonts for C. As + there's a possibility that a font is found in a fallback + font group, we set 0 at the moment. */ char_table_set_range (fontset, from, to, font_group); return font_group; } if (!VECTORP (font_group)) return font_group; + + /* Now realize FONT-DEFs of this font group, and update the realized + fontset FONTSET. */ font_group = Fcopy_sequence (font_group); for (i = 0; i < ASIZE (font_group); i++) if (! NILP (AREF (font_group, i))) @@ -498,21 +528,21 @@ fontset_get_font_group (Lisp_Object fontset, int c) } /* Return RFONT-DEF (vector) in the realized fontset FONTSET for the - character C. If no font is found, return Qnil if there's a + character C. If no font is found, return Qnil or 0 if there's a possibility that the default fontset or the fallback font groups have a proper font, and return Qt if not. If a font is found but is not yet opened, open it (if FACE is not NULL) or return Qnil (if FACE is NULL). - ID is a charset-id that must be preferred, or -1 meaning no + CHARSET_ID is a charset-id that must be preferred, or -1 meaning no preference. If FALLBACK, search only fallback fonts. */ static Lisp_Object -fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, - bool fallback) +fontset_find_font (Lisp_Object fontset, int c, struct face *face, + int charset_id, bool fallback) { Lisp_Object vec, font_group; int i, charset_matched = 0, found_index; @@ -534,8 +564,8 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, /* We have just created the font-group, or the charset priorities were changed. */ reorder_font_vector (font_group, face->ascii_face->font); - if (id >= 0) - /* Find a spec matching with the charset ID to try at + if (charset_id >= 0) + /* Find a spec matching with CHARSET_ID to try it at first. */ for (i = 0; i < ASIZE (vec); i++) { @@ -546,7 +576,7 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, break; repertory = FONT_DEF_REPERTORY (RFONT_DEF_FONT_DEF (rfont_def)); - if (XINT (repertory) == id) + if (XINT (repertory) == charset_id) { charset_matched = i; break; @@ -554,7 +584,9 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, } } - /* Find the first available font in the vector of RFONT-DEF. */ + /* Find the first available font in the vector of RFONT-DEF. If + CHARSET_MATCHED > 0, try the corresponding RFONT-DEF first, then + try the rest. */ for (i = 0; i < ASIZE (vec); i++) { Lisp_Object font_def; @@ -565,13 +597,13 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, { if (charset_matched > 0) { - /* Try the element matching with the charset ID at first. */ + /* Try the element matching with CHARSET_ID at first. */ found_index = charset_matched; /* Make this negative so that we don't come here in the next loop. */ charset_matched = - charset_matched; /* We must try the first element in the next loop. */ - i--; + i = -1; } } else if (i == - charset_matched) @@ -630,10 +662,10 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, if (NILP (font_object)) { /* Something strange happened, perhaps because of a - Font-backend problem. Too avoid crashing, record + Font-backend problem. To avoid crashing, record that this spec is unusable. It may be better to find another font of the same spec, but currently we don't - have such an API. */ + have such an API in font-backend. */ RFONT_DEF_SET_FACE (rfont_def, -1); continue; } @@ -693,6 +725,7 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, i = found_index; } + /* Record that no font in this font group supports C. */ FONTSET_SET (fontset, make_number (c), make_number (0)); return Qnil; @@ -711,6 +744,9 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, } +/* Return RFONT-DEF (vector) corresponding to the font for character + C. The value is not a vector if no font is found for C. */ + static Lisp_Object fontset_font (Lisp_Object fontset, int c, struct face *face, int id) { diff --git a/src/frame.c b/src/frame.c index 00f25f7e91..1c5c12c7e2 100644 --- a/src/frame.c +++ b/src/frame.c @@ -537,7 +537,7 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit, #endif } else if (new_cols != old_cols) - call2 (Qwindow_pixel_to_total, frame, Qt); + call2 (Qwindow__pixel_to_total, frame, Qt); if (new_windows_height != old_windows_height /* When the top margin has changed we have to recalculate the top @@ -553,7 +553,7 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit, FrameRows (FRAME_TTY (f)) = new_lines + FRAME_TOP_MARGIN (f); } else if (new_lines != old_lines) - call2 (Qwindow_pixel_to_total, frame, Qnil); + call2 (Qwindow__pixel_to_total, frame, Qnil); frame_size_history_add (f, Qadjust_frame_size_3, new_text_width, new_text_height, @@ -594,8 +594,6 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit, || new_pixel_height != old_pixel_height); unblock_input (); - - run_window_configuration_change_hook (f); } /* Allocate basically initialized frame. */ @@ -3646,7 +3644,7 @@ x_set_font (struct frame *f, Lisp_Object arg, Lisp_Object oldval) x_new_font (f, font_object, fontset); store_frame_param (f, Qfont, arg); #ifdef HAVE_X_WINDOWS - store_frame_param (f, Qfont_param, font_param); + store_frame_param (f, Qfont_parameter, font_param); #endif /* Recalculate toolbar height. */ f->n_tool_bar_rows = 0; @@ -4889,7 +4887,7 @@ syms_of_frame (void) DEFSYM (Qframep, "framep"); DEFSYM (Qframe_live_p, "frame-live-p"); DEFSYM (Qframe_windows_min_size, "frame-windows-min-size"); - DEFSYM (Qwindow_pixel_to_total, "window--pixel-to-total"); + DEFSYM (Qwindow__pixel_to_total, "window--pixel-to-total"); DEFSYM (Qexplicit_name, "explicit-name"); DEFSYM (Qheight, "height"); DEFSYM (Qicon, "icon"); @@ -5267,6 +5265,21 @@ The function `frame--size-history' displays the value of this variable in a more readable form. */); frame_size_history = Qnil; + DEFVAR_BOOL ("tooltip-reuse-hidden-frame", tooltip_reuse_hidden_frame, + doc: /* Non-nil means reuse hidden tooltip frames. +When this is nil, delete a tooltip frame when hiding the associated +tooltip. When this is non-nil, make the tooltip frame invisible only, +so it can be reused when the next tooltip is shown. + +Setting this to non-nil may drastically reduce the consing overhead +incurred by creating new tooltip frames. However, a value of non-nil +means also that intermittent changes of faces or `default-frame-alist' +are not applied when showing a tooltip in a reused frame. + +This variable is effective only with the X toolkit (and there only when +Gtk+ tooltips are not used) and on Windows. */); + tooltip_reuse_hidden_frame = false; + staticpro (&Vframe_list); defsubr (&Sframep); diff --git a/src/frame.h b/src/frame.h index f0cdcd4209..9de672c863 100644 --- a/src/frame.h +++ b/src/frame.h @@ -288,8 +288,9 @@ struct frame cleared. */ bool_bf explicit_name : 1; - /* True if size of some window on this frame has changed. */ - bool_bf window_sizes_changed : 1; + /* True if configuration of windows on this frame has changed since + last call of run_window_size_change_functions. */ + bool_bf window_configuration_changed : 1; /* True if the mouse has moved on this display device since the last time we checked. */ @@ -828,10 +829,10 @@ default_pixels_per_inch_y (void) are frozen on frame F. */ #define FRAME_WINDOWS_FROZEN(f) (f)->frozen_window_starts -/* True if a size change has been requested for frame F - but not yet really put into effect. This can be true temporarily - when an X event comes in at a bad time. */ -#define FRAME_WINDOW_SIZES_CHANGED(f) (f)->window_sizes_changed +/* True if the frame's window configuration has changed since last call + of run_window_size_change_functions. */ +#define FRAME_WINDOW_CONFIGURATION_CHANGED(f) \ + (f)->window_configuration_changed /* The minibuffer window of frame F, if it has one; otherwise nil. */ #define FRAME_MINIBUF_WINDOW(f) f->minibuffer_window diff --git a/src/ftfont.c b/src/ftfont.c index 7285aee9bd..1ae3f88daa 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -568,7 +568,6 @@ ftfont_get_charset (Lisp_Object registry) char *str = SSDATA (SYMBOL_NAME (registry)); USE_SAFE_ALLOCA; char *re = SAFE_ALLOCA (SBYTES (SYMBOL_NAME (registry)) * 2 + 1); - Lisp_Object regexp; int i, j; for (i = j = 0; i < SBYTES (SYMBOL_NAME (registry)); i++, j++) @@ -582,13 +581,13 @@ ftfont_get_charset (Lisp_Object registry) re[j] = '.'; } re[j] = '\0'; - regexp = make_unibyte_string (re, j); - SAFE_FREE (); + AUTO_STRING_WITH_LEN (regexp, re, j); for (i = 0; fc_charset_table[i].name; i++) if (fast_c_string_match_ignore_case (regexp, fc_charset_table[i].name, strlen (fc_charset_table[i].name)) >= 0) break; + SAFE_FREE (); if (! fc_charset_table[i].name) return -1; if (! fc_charset_table[i].fc_charset) diff --git a/src/gmalloc.c b/src/gmalloc.c index 00b8364131..d795c13f61 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c @@ -25,14 +25,10 @@ License along with this library. If not, see . #define USE_PTHREAD #endif +#include #include #include #include - -#ifdef HYBRID_GET_CURRENT_DIR_NAME -#undef get_current_dir_name -#endif - #include #ifdef USE_PTHREAD @@ -44,7 +40,22 @@ License along with this library. If not, see . #endif #ifdef emacs -extern void emacs_abort (void); +# include "lisp.h" +#endif + +#ifdef HAVE_MALLOC_H +# if 4 < __GNUC__ + (2 <= __GNUC_MINOR__) +# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +# endif +# include +#endif +#ifndef __MALLOC_HOOK_VOLATILE +# define __MALLOC_HOOK_VOLATILE volatile +#endif +#ifndef HAVE_MALLOC_H +extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void); +extern void (*__MALLOC_HOOK_VOLATILE __malloc_initialize_hook) (void); +extern void *(*__morecore) (ptrdiff_t); #endif /* If HYBRID_MALLOC is defined, then temacs will use malloc, @@ -53,31 +64,27 @@ extern void emacs_abort (void); however, will use the system malloc, realloc.... In other source files, malloc, realloc... are renamed hybrid_malloc, hybrid_realloc... via macros in conf_post.h. hybrid_malloc and - friends are wrapper functions defined later in this file. - aligned_alloc is defined as a macro only in alloc.c. - - As of this writing (August 2014), Cygwin is the only platform on - which HYBRID_MACRO is defined. Any other platform that wants to - define it will have to define the macros DUMPED and - ALLOCATED_BEFORE_DUMPING, defined below for Cygwin. */ + friends are wrapper functions defined later in this file. */ #undef malloc #undef realloc #undef calloc +#undef aligned_alloc #undef free #define malloc gmalloc #define realloc grealloc #define calloc gcalloc #define aligned_alloc galigned_alloc #define free gfree +#define malloc_info gmalloc_info -#ifdef CYGWIN -extern void *bss_sbrk (ptrdiff_t size); -extern int bss_sbrk_did_unexec; -extern char bss_sbrk_buffer[]; -extern void *bss_sbrk_buffer_end; -#define DUMPED bss_sbrk_did_unexec -#define ALLOCATED_BEFORE_DUMPING(P) \ - ((P) < bss_sbrk_buffer_end && (P) >= (void *) bss_sbrk_buffer) +#ifdef HYBRID_MALLOC +# include "sheap.h" +# define DUMPED bss_sbrk_did_unexec +static bool +ALLOCATED_BEFORE_DUMPING (char *p) +{ + return bss_sbrk_buffer <= p && p < bss_sbrk_buffer + STATIC_HEAP_SIZE; +} #endif #ifdef __cplusplus @@ -85,8 +92,9 @@ extern "C" { #endif -#include - +#ifdef HYBRID_MALLOC +#define extern static +#endif /* Allocate SIZE bytes of memory. */ extern void *malloc (size_t size) ATTRIBUTE_MALLOC_SIZE ((1)); @@ -95,25 +103,16 @@ extern void *malloc (size_t size) ATTRIBUTE_MALLOC_SIZE ((1)); extern void *realloc (void *ptr, size_t size) ATTRIBUTE_ALLOC_SIZE ((2)); /* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */ extern void *calloc (size_t nmemb, size_t size) ATTRIBUTE_MALLOC_SIZE ((1,2)); -/* Free a block allocated by `malloc', `realloc' or `calloc'. */ +/* Free a block. */ extern void free (void *ptr); /* Allocate SIZE bytes allocated to ALIGNMENT bytes. */ -#ifdef MSDOS extern void *aligned_alloc (size_t, size_t); +#ifdef MSDOS extern void *memalign (size_t, size_t); extern int posix_memalign (void **, size_t, size_t); #endif -#ifdef USE_PTHREAD -/* Set up mutexes and make malloc etc. thread-safe. */ -extern void malloc_enable_thread (void); -#endif - -#ifdef emacs -extern void emacs_abort (void); -#endif - /* The allocator divides the heap into blocks of fixed size; large requests receive one or more whole blocks, and small requests receive a fragment of a block. Fragment sizes are powers of two, @@ -245,36 +244,12 @@ extern int _malloc_thread_enabled_p; #define UNLOCK_ALIGNED_BLOCKS() #endif -/* Given an address in the middle of a malloc'd object, - return the address of the beginning of the object. */ -extern void *malloc_find_object_address (void *ptr); - -/* Underlying allocation function; successive calls should - return contiguous pieces of memory. */ -extern void *(*__morecore) (ptrdiff_t size); - -/* Default value of `__morecore'. */ -extern void *__default_morecore (ptrdiff_t size); - -/* If not NULL, this function is called after each time - `__morecore' is called to increase the data size. */ -extern void (*__after_morecore_hook) (void); - -/* Number of extra blocks to get each time we ask for more core. - This reduces the frequency of calling `(*__morecore)'. */ -extern size_t __malloc_extra_blocks; - /* Nonzero if `malloc' has been called and done its initialization. */ extern int __malloc_initialized; /* Function called to initialize malloc data structures. */ extern int __malloc_initialize (void); -/* Hooks for debugging versions. */ -extern void (*__malloc_initialize_hook) (void); -extern void (*__free_hook) (void *ptr); -extern void *(*__malloc_hook) (size_t size); -extern void *(*__realloc_hook) (void *ptr, size_t size); -extern void *(*__memalign_hook) (size_t size, size_t alignment); +#ifdef GC_MCHECK /* Return values for `mprobe': these are the kinds of inconsistencies that `mcheck' enables detection of. */ @@ -315,8 +290,9 @@ struct mstats /* Pick up the current statistics. */ extern struct mstats mstats (void); -/* Call WARNFUN with a warning message when memory usage is high. */ -extern void memory_warnings (void *start, void (*warnfun) (const char *)); +#endif + +#undef extern #ifdef __cplusplus } @@ -344,10 +320,17 @@ License along with this library. If not, see . #include -void *(*__morecore) (ptrdiff_t size) = __default_morecore; +/* Debugging hook for 'malloc'. */ +static void *(*__MALLOC_HOOK_VOLATILE gmalloc_hook) (size_t); -/* Debugging hook for `malloc'. */ -void *(*__malloc_hook) (size_t size); +/* Replacements for traditional glibc malloc hooks, for platforms that + do not already have these hooks. Platforms with these hooks all + used relaxed ref/def, so it is OK to define them here too. */ +void (*__MALLOC_HOOK_VOLATILE __malloc_initialize_hook) (void); +void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void); +void *(*__morecore) (ptrdiff_t); + +#ifndef HYBRID_MALLOC /* Pointer to the base of the first block. */ char *_heapbase; @@ -355,9 +338,6 @@ char *_heapbase; /* Block information table. Allocated with align/__free (not malloc/free). */ malloc_info *_heapinfo; -/* Number of info entries. */ -static size_t heapsize; - /* Search index in the info table. */ size_t _heapindex; @@ -376,10 +356,21 @@ size_t _bytes_free; /* Are you experienced? */ int __malloc_initialized; +#else + +static struct list _fraghead[BLOCKLOG]; + +#endif /* HYBRID_MALLOC */ + +/* Number of extra blocks to get each time we ask for more core. + This reduces the frequency of calling `(*__morecore)'. */ +#if defined DOUG_LEA_MALLOC || defined HYBRID_MALLOC || defined SYSTEM_MALLOC +static +#endif size_t __malloc_extra_blocks; -void (*__malloc_initialize_hook) (void); -void (*__after_morecore_hook) (void); +/* Number of info entries. */ +static size_t heapsize; #if defined GC_MALLOC_CHECK && defined GC_PROTECT_MALLOC_STATE @@ -934,19 +925,19 @@ malloc (size_t size) if (!__malloc_initialized && !__malloc_initialize ()) return NULL; - /* Copy the value of __malloc_hook to an automatic variable in case - __malloc_hook is modified in another thread between its + /* Copy the value of gmalloc_hook to an automatic variable in case + gmalloc_hook is modified in another thread between its NULL-check and the use. Note: Strictly speaking, this is not a right solution. We should use mutexes to access non-read-only variables that are shared among multiple threads. We just leave it for compatibility with - glibc malloc (i.e., assignments to __malloc_hook) for now. */ - hook = __malloc_hook; + glibc malloc (i.e., assignments to gmalloc_hook) for now. */ + hook = gmalloc_hook; return (hook != NULL ? *hook : _malloc_internal) (size); } -#ifndef _LIBC +#if !(defined (_LIBC) || defined (HYBRID_MALLOC)) /* On some ANSI C systems, some libc functions call _malloc, _free and _realloc. Make them use the GNU functions. */ @@ -994,12 +985,14 @@ License along with this library. If not, see . The author may be reached (Email) at the address mike@ai.mit.edu, or (US mail) as Mike Haertel c/o Free Software Foundation. */ - /* Debugging hook for free. */ -void (*__free_hook) (void *__ptr); +static void (*__MALLOC_HOOK_VOLATILE gfree_hook) (void *); + +#ifndef HYBRID_MALLOC /* List of blocks allocated by aligned_alloc. */ struct alignlist *_aligned_blocks = NULL; +#endif /* Return memory to the heap. Like `_free_internal' but don't lock mutex. */ @@ -1248,7 +1241,7 @@ _free_internal_nolock (void *ptr) } /* Return memory to the heap. - Like `free' but don't call a __free_hook if there is one. */ + Like 'free' but don't call a hook if there is one. */ void _free_internal (void *ptr) { @@ -1262,7 +1255,7 @@ _free_internal (void *ptr) void free (void *ptr) { - void (*hook) (void *) = __free_hook; + void (*hook) (void *) = gfree_hook; if (hook != NULL) (*hook) (ptr); @@ -1270,6 +1263,7 @@ free (void *ptr) _free_internal (ptr); } +#ifndef HYBRID_MALLOC /* Define the `cfree' alias for `free'. */ #ifdef weak_alias weak_alias (free, cfree) @@ -1280,6 +1274,7 @@ cfree (void *ptr) free (ptr); } #endif +#endif /* Change the size of a block allocated by `malloc'. Copyright 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Written May 1989 by Mike Haertel. @@ -1305,7 +1300,7 @@ License along with this library. If not, see . #endif /* Debugging hook for realloc. */ -void *(*__realloc_hook) (void *ptr, size_t size); +static void *(*grealloc_hook) (void *, size_t); /* Resize the given region to the new size, returning a pointer to the (possibly moved) region. This is optimized for speed; @@ -1449,7 +1444,7 @@ realloc (void *ptr, size_t size) if (!__malloc_initialized && !__malloc_initialize ()) return NULL; - hook = __realloc_hook; + hook = grealloc_hook; return (hook != NULL ? *hook : _realloc_internal) (ptr, size); } /* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. @@ -1519,11 +1514,11 @@ extern void *__sbrk (ptrdiff_t increment); /* Allocate INCREMENT more bytes of data space, and return the start of data space, or NULL on errors. If INCREMENT is negative, shrink data space. */ -void * -__default_morecore (ptrdiff_t increment) +static void * +gdefault_morecore (ptrdiff_t increment) { void *result; -#if defined (CYGWIN) +#ifdef HYBRID_MALLOC if (!DUMPED) { return bss_sbrk (increment); @@ -1534,6 +1529,9 @@ __default_morecore (ptrdiff_t increment) return NULL; return result; } + +void *(*__morecore) (ptrdiff_t) = gdefault_morecore; + /* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or @@ -1549,17 +1547,11 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this library. If not, see . */ -void *(*__memalign_hook) (size_t size, size_t alignment); - void * aligned_alloc (size_t alignment, size_t size) { void *result; size_t adj, lastadj; - void *(*hook) (size_t, size_t) = __memalign_hook; - - if (hook) - return (*hook) (alignment, size); /* Allocate a block with enough extra space to pad the block with up to (ALIGNMENT - 1) bytes if necessary. */ @@ -1638,6 +1630,8 @@ aligned_alloc (size_t alignment, size_t size) return result; } +/* Note that memalign and posix_memalign are not used in Emacs. */ +#ifndef HYBRID_MALLOC /* An obsolete alias for aligned_alloc, for any old libraries that use this alias. */ @@ -1649,7 +1643,6 @@ memalign (size_t alignment, size_t size) /* If HYBRID_MALLOC is defined, we may want to use the system posix_memalign below. */ -#ifndef HYBRID_MALLOC int posix_memalign (void **memptr, size_t alignment, size_t size) { @@ -1689,14 +1682,18 @@ License along with this library. If not, see . The author may be reached (Email) at the address mike@ai.mit.edu, or (US mail) as Mike Haertel c/o Free Software Foundation. */ +#ifndef HYBRID_MALLOC + +# ifndef HAVE_MALLOC_H /* Allocate SIZE bytes on a page boundary. */ extern void *valloc (size_t); +# endif -#if defined _SC_PAGESIZE || !defined HAVE_GETPAGESIZE -# include "getpagesize.h" -#elif !defined getpagesize +# if defined _SC_PAGESIZE || !defined HAVE_GETPAGESIZE +# include "getpagesize.h" +# elif !defined getpagesize extern int getpagesize (void); -#endif +# endif static size_t pagesize; @@ -1708,6 +1705,7 @@ valloc (size_t size) return aligned_alloc (pagesize, size); } +#endif /* HYBRID_MALLOC */ #undef malloc #undef realloc @@ -1773,7 +1771,7 @@ hybrid_aligned_alloc (size_t alignment, size_t size) #endif } #endif - + void * hybrid_realloc (void *ptr, size_t size) { @@ -1801,19 +1799,6 @@ hybrid_realloc (void *ptr, size_t size) return result; } -#ifdef HYBRID_GET_CURRENT_DIR_NAME -/* Defined in sysdep.c. */ -char *gget_current_dir_name (void); - -char * -hybrid_get_current_dir_name (void) -{ - if (DUMPED) - return get_current_dir_name (); - return gget_current_dir_name (); -} -#endif - #else /* ! HYBRID_MALLOC */ void * @@ -1948,9 +1933,9 @@ freehook (void *ptr) else hdr = NULL; - __free_hook = old_free_hook; + gfree_hook = old_free_hook; free (hdr); - __free_hook = freehook; + gfree_hook = freehook; } static void * @@ -1958,9 +1943,9 @@ mallochook (size_t size) { struct hdr *hdr; - __malloc_hook = old_malloc_hook; + gmalloc_hook = old_malloc_hook; hdr = malloc (sizeof *hdr + size + 1); - __malloc_hook = mallochook; + gmalloc_hook = mallochook; if (hdr == NULL) return NULL; @@ -1986,13 +1971,13 @@ reallochook (void *ptr, size_t size) memset ((char *) ptr + size, FREEFLOOD, osize - size); } - __free_hook = old_free_hook; - __malloc_hook = old_malloc_hook; - __realloc_hook = old_realloc_hook; + gfree_hook = old_free_hook; + gmalloc_hook = old_malloc_hook; + grealloc_hook = old_realloc_hook; hdr = realloc (hdr, sizeof *hdr + size + 1); - __free_hook = freehook; - __malloc_hook = mallochook; - __realloc_hook = reallochook; + gfree_hook = freehook; + gmalloc_hook = mallochook; + grealloc_hook = reallochook; if (hdr == NULL) return NULL; @@ -2049,12 +2034,12 @@ mcheck (void (*func) (enum mcheck_status)) /* These hooks may not be safely inserted if malloc is already in use. */ if (!__malloc_initialized && !mcheck_used) { - old_free_hook = __free_hook; - __free_hook = freehook; - old_malloc_hook = __malloc_hook; - __malloc_hook = mallochook; - old_realloc_hook = __realloc_hook; - __realloc_hook = reallochook; + old_free_hook = gfree_hook; + gfree_hook = freehook; + old_malloc_hook = gmalloc_hook; + gmalloc_hook = mallochook; + old_realloc_hook = grealloc_hook; + grealloc_hook = reallochook; mcheck_used = 1; } diff --git a/src/gnutls.c b/src/gnutls.c index f0354d7fed..57b164a270 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -184,7 +184,7 @@ init_gnutls_functions (void) HMODULE library; int max_log_level = 1; - if (!(library = w32_delayed_load (Qgnutls_dll))) + if (!(library = w32_delayed_load (Qgnutls))) { GNUTLS_LOG (1, max_log_level, "GnuTLS library not found"); return 0; @@ -272,7 +272,7 @@ init_gnutls_functions (void) max_log_level = global_gnutls_log_level; { - Lisp_Object name = CAR_SAFE (Fget (Qgnutls_dll, QCloaded_from)); + Lisp_Object name = CAR_SAFE (Fget (Qgnutls, QCloaded_from)); GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:", STRINGP (name) ? (const char *) SDATA (name) : "unknown"); } @@ -397,11 +397,47 @@ gnutls_log_function2i (int level, const char *string, int extra) message ("gnutls.c: [%d] %s %d", level, string, extra); } +int +gnutls_try_handshake (struct Lisp_Process *proc) +{ + gnutls_session_t state = proc->gnutls_state; + int ret; + bool non_blocking = proc->is_non_blocking_client; + + if (proc->gnutls_complete_negotiation_p) + non_blocking = false; + + if (non_blocking) + proc->gnutls_p = true; + + do + { + ret = gnutls_handshake (state); + emacs_gnutls_handle_error (state, ret); + QUIT; + } + while (ret < 0 + && gnutls_error_is_fatal (ret) == 0 + && ! non_blocking); + + proc->gnutls_initstage = GNUTLS_STAGE_HANDSHAKE_TRIED; + + if (ret == GNUTLS_E_SUCCESS) + { + /* Here we're finally done. */ + proc->gnutls_initstage = GNUTLS_STAGE_READY; + } + else + { + /* check_memory_full (gnutls_alert_send_appropriate (state, ret)); */ + } + return ret; +} + static int emacs_gnutls_handshake (struct Lisp_Process *proc) { gnutls_session_t state = proc->gnutls_state; - int ret; if (proc->gnutls_initstage < GNUTLS_STAGE_HANDSHAKE_CANDO) return -1; @@ -443,26 +479,7 @@ emacs_gnutls_handshake (struct Lisp_Process *proc) proc->gnutls_initstage = GNUTLS_STAGE_TRANSPORT_POINTERS_SET; } - do - { - ret = gnutls_handshake (state); - emacs_gnutls_handle_error (state, ret); - QUIT; - } - while (ret < 0 && gnutls_error_is_fatal (ret) == 0); - - proc->gnutls_initstage = GNUTLS_STAGE_HANDSHAKE_TRIED; - - if (ret == GNUTLS_E_SUCCESS) - { - /* Here we're finally done. */ - proc->gnutls_initstage = GNUTLS_STAGE_READY; - } - else - { - check_memory_full (gnutls_alert_send_appropriate (state, ret)); - } - return ret; + return gnutls_try_handshake (proc); } ptrdiff_t @@ -528,26 +545,12 @@ emacs_gnutls_read (struct Lisp_Process *proc, char *buf, ptrdiff_t nbyte) ssize_t rtnval; gnutls_session_t state = proc->gnutls_state; - int log_level = proc->gnutls_log_level; - if (proc->gnutls_initstage != GNUTLS_STAGE_READY) { - /* If the handshake count is under the limit, try the handshake - again and increment the handshake count. This count is kept - per process (connection), not globally. */ - if (proc->gnutls_handshakes_tried < GNUTLS_EMACS_HANDSHAKES_LIMIT) - { - proc->gnutls_handshakes_tried++; - emacs_gnutls_handshake (proc); - GNUTLS_LOG2i (5, log_level, "Retried handshake", - proc->gnutls_handshakes_tried); - return -1; - } - - GNUTLS_LOG (2, log_level, "Giving up on handshake; resetting retries"); - proc->gnutls_handshakes_tried = 0; - return 0; + errno = EAGAIN; + return -1; } + rtnval = gnutls_record_recv (state, buf, nbyte); if (rtnval >= 0) return rtnval; @@ -655,7 +658,7 @@ emacs_gnutls_deinit (Lisp_Object proc) CHECK_PROCESS (proc); - if (XPROCESS (proc)->gnutls_p == 0) + if (! XPROCESS (proc)->gnutls_p) return Qnil; log_level = XPROCESS (proc)->gnutls_log_level; @@ -682,10 +685,23 @@ emacs_gnutls_deinit (Lisp_Object proc) GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_INIT - 1; } - XPROCESS (proc)->gnutls_p = 0; + XPROCESS (proc)->gnutls_p = false; return Qt; } +DEFUN ("gnutls-asynchronous-parameters", Fgnutls_asynchronous_parameters, + Sgnutls_asynchronous_parameters, 2, 2, 0, + doc: /* Mark this process as being a pre-init GnuTLS process. +The second parameter is the list of parameters to feed to gnutls-boot +to finish setting up the connection. */) + (Lisp_Object proc, Lisp_Object params) +{ + CHECK_PROCESS (proc); + + XPROCESS (proc)->gnutls_boot_parameters = params; + return Qnil; +} + DEFUN ("gnutls-get-initstage", Fgnutls_get_initstage, Sgnutls_get_initstage, 1, 1, 0, doc: /* Return the GnuTLS init stage of process PROC. See also `gnutls-boot'. */) @@ -703,7 +719,9 @@ usage: (gnutls-errorp ERROR) */ attributes: const) (Lisp_Object err) { - if (EQ (err, Qt)) return Qnil; + if (EQ (err, Qt) + || EQ (err, Qgnutls_e_again)) + return Qnil; return Qt; } @@ -1022,7 +1040,7 @@ The return value is a property list with top-level keys :warnings and CHECK_PROCESS (proc); - if (GNUTLS_INITSTAGE (proc) < GNUTLS_STAGE_INIT) + if (GNUTLS_INITSTAGE (proc) != GNUTLS_STAGE_READY) return Qnil; /* Then collect any warnings already computed by the handshake. */ @@ -1154,6 +1172,159 @@ emacs_gnutls_global_deinit (void) } #endif +static void ATTRIBUTE_FORMAT_PRINTF (2, 3) +boot_error (struct Lisp_Process *p, const char *m, ...) +{ + va_list ap; + va_start (ap, m); + if (p->is_non_blocking_client) + pset_status (p, list2 (Qfailed, vformat_string (m, ap))); + else + verror (m, ap); +} + +Lisp_Object +gnutls_verify_boot (Lisp_Object proc, Lisp_Object proplist) +{ + int ret; + struct Lisp_Process *p = XPROCESS (proc); + gnutls_session_t state = p->gnutls_state; + unsigned int peer_verification; + Lisp_Object warnings; + int max_log_level = p->gnutls_log_level; + Lisp_Object hostname, verify_error; + bool verify_error_all = false; + char *c_hostname; + + if (NILP (proplist)) + proplist = Fcdr (Fplist_get (p->childp, QCtls_parameters)); + + verify_error = Fplist_get (proplist, QCverify_error); + hostname = Fplist_get (proplist, QChostname); + + if (EQ (verify_error, Qt)) + verify_error_all = true; + else if (NILP (Flistp (verify_error))) + { + boot_error (p, + "gnutls-boot: invalid :verify_error parameter (not a list)"); + return Qnil; + } + + if (!STRINGP (hostname)) + { + boot_error (p, "gnutls-boot: invalid :hostname parameter (not a string)"); + return Qnil; + } + c_hostname = SSDATA (hostname); + + /* Now verify the peer, following + http://www.gnu.org/software/gnutls/manual/html_node/Verifying-peer_0027s-certificate.html. + The peer should present at least one certificate in the chain; do a + check of the certificate's hostname with + gnutls_x509_crt_check_hostname against :hostname. */ + + ret = gnutls_certificate_verify_peers2 (state, &peer_verification); + if (ret < GNUTLS_E_SUCCESS) + return gnutls_make_error (ret); + + XPROCESS (proc)->gnutls_peer_verification = peer_verification; + + warnings = Fplist_get (Fgnutls_peer_status (proc), intern (":warnings")); + if (!NILP (warnings)) + { + for (Lisp_Object tail = warnings; CONSP (tail); tail = XCDR (tail)) + { + Lisp_Object warning = XCAR (tail); + Lisp_Object message = Fgnutls_peer_status_warning_describe (warning); + if (!NILP (message)) + GNUTLS_LOG2 (1, max_log_level, "verification:", SSDATA (message)); + } + } + + if (peer_verification != 0) + { + if (verify_error_all + || !NILP (Fmember (QCtrustfiles, verify_error))) + { + emacs_gnutls_deinit (proc); + boot_error (p, + "Certificate validation failed %s, verification code %x", + c_hostname, peer_verification); + return Qnil; + } + else + { + GNUTLS_LOG2 (1, max_log_level, "certificate validation failed:", + c_hostname); + } + } + + /* Up to here the process is the same for X.509 certificates and + OpenPGP keys. From now on X.509 certificates are assumed. This + can be easily extended to work with openpgp keys as well. */ + if (gnutls_certificate_type_get (state) == GNUTLS_CRT_X509) + { + gnutls_x509_crt_t gnutls_verify_cert; + const gnutls_datum_t *gnutls_verify_cert_list; + unsigned int gnutls_verify_cert_list_size; + + ret = gnutls_x509_crt_init (&gnutls_verify_cert); + if (ret < GNUTLS_E_SUCCESS) + return gnutls_make_error (ret); + + gnutls_verify_cert_list + = gnutls_certificate_get_peers (state, &gnutls_verify_cert_list_size); + + if (gnutls_verify_cert_list == NULL) + { + gnutls_x509_crt_deinit (gnutls_verify_cert); + emacs_gnutls_deinit (proc); + boot_error (p, "No x509 certificate was found\n"); + return Qnil; + } + + /* Check only the first certificate in the given chain. */ + ret = gnutls_x509_crt_import (gnutls_verify_cert, + &gnutls_verify_cert_list[0], + GNUTLS_X509_FMT_DER); + + if (ret < GNUTLS_E_SUCCESS) + { + gnutls_x509_crt_deinit (gnutls_verify_cert); + return gnutls_make_error (ret); + } + + XPROCESS (proc)->gnutls_certificate = gnutls_verify_cert; + + int err = gnutls_x509_crt_check_hostname (gnutls_verify_cert, + c_hostname); + check_memory_full (err); + if (!err) + { + XPROCESS (proc)->gnutls_extra_peer_verification + |= CERTIFICATE_NOT_MATCHING; + if (verify_error_all + || !NILP (Fmember (QChostname, verify_error))) + { + gnutls_x509_crt_deinit (gnutls_verify_cert); + emacs_gnutls_deinit (proc); + boot_error (p, "The x509 certificate does not match \"%s\"", + c_hostname); + return Qnil; + } + else + GNUTLS_LOG2 (1, max_log_level, "x509 certificate does not match:", + c_hostname); + } + } + + /* Set this flag only if the whole initialization succeeded. */ + XPROCESS (proc)->gnutls_p = true; + + return gnutls_make_error (ret); +} + DEFUN ("gnutls-boot", Fgnutls_boot, Sgnutls_boot, 3, 3, 0, doc: /* Initialize GnuTLS client for process PROC with TYPE+PROPLIST. Currently only client mode is supported. Return a success/failure @@ -1190,6 +1361,9 @@ t to do all checks. Currently it can contain `:trustfiles' and :min-prime-bits is the minimum accepted number of bits the client will accept in Diffie-Hellman key exchange. +:complete-negotiation, if non-nil, will make negotiation complete +before returning even on non-blocking sockets. + The debug level will be set for this process AND globally for GnuTLS. So if you set it higher or lower at any point, it affects global debugging. @@ -1212,14 +1386,12 @@ one trustfile (usually a CA bundle). */) { int ret = GNUTLS_E_SUCCESS; int max_log_level = 0; - bool verify_error_all = 0; gnutls_session_t state; gnutls_certificate_credentials_t x509_cred = NULL; gnutls_anon_client_credentials_t anon_cred = NULL; Lisp_Object global_init; char const *priority_string_ptr = "NORMAL"; /* default priority string. */ - unsigned int peer_verification; char *c_hostname; /* Placeholders for the property list elements. */ @@ -1230,40 +1402,38 @@ one trustfile (usually a CA bundle). */) /* Lisp_Object callbacks; */ Lisp_Object loglevel; Lisp_Object hostname; - Lisp_Object verify_error; Lisp_Object prime_bits; - Lisp_Object warnings; + struct Lisp_Process *p = XPROCESS (proc); CHECK_PROCESS (proc); CHECK_SYMBOL (type); CHECK_LIST (proplist); if (NILP (Fgnutls_available_p ())) - error ("GnuTLS not available"); - - if (!EQ (type, Qgnutls_x509pki) && !EQ (type, Qgnutls_anon)) - error ("Invalid GnuTLS credential type"); - - hostname = Fplist_get (proplist, QCgnutls_bootprop_hostname); - priority_string = Fplist_get (proplist, QCgnutls_bootprop_priority); - trustfiles = Fplist_get (proplist, QCgnutls_bootprop_trustfiles); - keylist = Fplist_get (proplist, QCgnutls_bootprop_keylist); - crlfiles = Fplist_get (proplist, QCgnutls_bootprop_crlfiles); - loglevel = Fplist_get (proplist, QCgnutls_bootprop_loglevel); - verify_error = Fplist_get (proplist, QCgnutls_bootprop_verify_error); - prime_bits = Fplist_get (proplist, QCgnutls_bootprop_min_prime_bits); - - if (EQ (verify_error, Qt)) { - verify_error_all = 1; + boot_error (p, "GnuTLS not available"); + return Qnil; } - else if (NILP (Flistp (verify_error))) + + if (!EQ (type, Qgnutls_x509pki) && !EQ (type, Qgnutls_anon)) { - error ("gnutls-boot: invalid :verify_error parameter (not a list)"); + boot_error (p, "Invalid GnuTLS credential type"); + return Qnil; } + hostname = Fplist_get (proplist, QChostname); + priority_string = Fplist_get (proplist, QCpriority); + trustfiles = Fplist_get (proplist, QCtrustfiles); + keylist = Fplist_get (proplist, QCkeylist); + crlfiles = Fplist_get (proplist, QCcrlfiles); + loglevel = Fplist_get (proplist, QCloglevel); + prime_bits = Fplist_get (proplist, QCmin_prime_bits); + if (!STRINGP (hostname)) - error ("gnutls-boot: invalid :hostname parameter (not a string)"); + { + boot_error (p, "gnutls-boot: invalid :hostname parameter (not a string)"); + return Qnil; + } c_hostname = SSDATA (hostname); state = XPROCESS (proc)->gnutls_state; @@ -1307,7 +1477,7 @@ one trustfile (usually a CA bundle). */) check_memory_full (gnutls_certificate_allocate_credentials (&x509_cred)); XPROCESS (proc)->gnutls_x509_cred = x509_cred; - verify_flags = Fplist_get (proplist, QCgnutls_bootprop_verify_flags); + verify_flags = Fplist_get (proplist, QCverify_flags); if (NUMBERP (verify_flags)) { gnutls_verify_flags = XINT (verify_flags); @@ -1371,7 +1541,8 @@ one trustfile (usually a CA bundle). */) else { emacs_gnutls_deinit (proc); - error ("Invalid trustfile"); + boot_error (p, "Invalid trustfile"); + return Qnil; } } @@ -1395,7 +1566,8 @@ one trustfile (usually a CA bundle). */) else { emacs_gnutls_deinit (proc); - error ("Invalid CRL file"); + boot_error (p, "Invalid CRL file"); + return Qnil; } } @@ -1424,8 +1596,9 @@ one trustfile (usually a CA bundle). */) else { emacs_gnutls_deinit (proc); - error (STRINGP (keyfile) ? "Invalid client cert file" - : "Invalid client key file"); + boot_error (p, STRINGP (keyfile) ? "Invalid client cert file" + : "Invalid client key file"); + return Qnil; } } } @@ -1479,114 +1652,14 @@ one trustfile (usually a CA bundle). */) return gnutls_make_error (ret); } + XPROCESS (proc)->gnutls_complete_negotiation_p = + !NILP (Fplist_get (proplist, QCcomplete_negotiation)); GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_CRED_SET; ret = emacs_gnutls_handshake (XPROCESS (proc)); if (ret < GNUTLS_E_SUCCESS) return gnutls_make_error (ret); - /* Now verify the peer, following - http://www.gnu.org/software/gnutls/manual/html_node/Verifying-peer_0027s-certificate.html. - The peer should present at least one certificate in the chain; do a - check of the certificate's hostname with - gnutls_x509_crt_check_hostname against :hostname. */ - - ret = gnutls_certificate_verify_peers2 (state, &peer_verification); - if (ret < GNUTLS_E_SUCCESS) - return gnutls_make_error (ret); - - XPROCESS (proc)->gnutls_peer_verification = peer_verification; - - warnings = Fplist_get (Fgnutls_peer_status (proc), intern (":warnings")); - if (!NILP (warnings)) - { - Lisp_Object tail; - for (tail = warnings; CONSP (tail); tail = XCDR (tail)) - { - Lisp_Object warning = XCAR (tail); - Lisp_Object message = Fgnutls_peer_status_warning_describe (warning); - if (!NILP (message)) - GNUTLS_LOG2 (1, max_log_level, "verification:", SSDATA (message)); - } - } - - if (peer_verification != 0) - { - if (verify_error_all - || !NILP (Fmember (QCgnutls_bootprop_trustfiles, verify_error))) - { - emacs_gnutls_deinit (proc); - error ("Certificate validation failed %s, verification code %x", - c_hostname, peer_verification); - } - else - { - GNUTLS_LOG2 (1, max_log_level, "certificate validation failed:", - c_hostname); - } - } - - /* Up to here the process is the same for X.509 certificates and - OpenPGP keys. From now on X.509 certificates are assumed. This - can be easily extended to work with openpgp keys as well. */ - if (gnutls_certificate_type_get (state) == GNUTLS_CRT_X509) - { - gnutls_x509_crt_t gnutls_verify_cert; - const gnutls_datum_t *gnutls_verify_cert_list; - unsigned int gnutls_verify_cert_list_size; - - ret = gnutls_x509_crt_init (&gnutls_verify_cert); - if (ret < GNUTLS_E_SUCCESS) - return gnutls_make_error (ret); - - gnutls_verify_cert_list = - gnutls_certificate_get_peers (state, &gnutls_verify_cert_list_size); - - if (gnutls_verify_cert_list == NULL) - { - gnutls_x509_crt_deinit (gnutls_verify_cert); - emacs_gnutls_deinit (proc); - error ("No x509 certificate was found\n"); - } - - /* We only check the first certificate in the given chain. */ - ret = gnutls_x509_crt_import (gnutls_verify_cert, - &gnutls_verify_cert_list[0], - GNUTLS_X509_FMT_DER); - - if (ret < GNUTLS_E_SUCCESS) - { - gnutls_x509_crt_deinit (gnutls_verify_cert); - return gnutls_make_error (ret); - } - - XPROCESS (proc)->gnutls_certificate = gnutls_verify_cert; - - int err = gnutls_x509_crt_check_hostname (gnutls_verify_cert, - c_hostname); - check_memory_full (err); - if (!err) - { - XPROCESS (proc)->gnutls_extra_peer_verification |= - CERTIFICATE_NOT_MATCHING; - if (verify_error_all - || !NILP (Fmember (QCgnutls_bootprop_hostname, verify_error))) - { - gnutls_x509_crt_deinit (gnutls_verify_cert); - emacs_gnutls_deinit (proc); - error ("The x509 certificate does not match \"%s\"", c_hostname); - } - else - { - GNUTLS_LOG2 (1, max_log_level, "x509 certificate does not match:", - c_hostname); - } - } - } - - /* Set this flag only if the whole initialization succeeded. */ - XPROCESS (proc)->gnutls_p = 1; - - return gnutls_make_error (ret); + return gnutls_verify_boot (proc, proplist); } DEFUN ("gnutls-bye", Fgnutls_bye, @@ -1627,14 +1700,14 @@ DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0, 0, 0, { #ifdef HAVE_GNUTLS # ifdef WINDOWSNT - Lisp_Object found = Fassq (Qgnutls_dll, Vlibrary_cache); + Lisp_Object found = Fassq (Qgnutls, Vlibrary_cache); if (CONSP (found)) return XCDR (found); else { Lisp_Object status; status = init_gnutls_functions () ? Qt : Qnil; - Vlibrary_cache = Fcons (Fcons (Qgnutls_dll, status), Vlibrary_cache); + Vlibrary_cache = Fcons (Fcons (Qgnutls, status), Vlibrary_cache); return status; } # else /* !WINDOWSNT */ @@ -1666,15 +1739,16 @@ syms_of_gnutls (void) DEFSYM (Qgnutls_x509pki, "gnutls-x509pki"); /* The following are for the property list of 'gnutls-boot'. */ - DEFSYM (QCgnutls_bootprop_hostname, ":hostname"); - DEFSYM (QCgnutls_bootprop_priority, ":priority"); - DEFSYM (QCgnutls_bootprop_trustfiles, ":trustfiles"); - DEFSYM (QCgnutls_bootprop_keylist, ":keylist"); - DEFSYM (QCgnutls_bootprop_crlfiles, ":crlfiles"); - DEFSYM (QCgnutls_bootprop_min_prime_bits, ":min-prime-bits"); - DEFSYM (QCgnutls_bootprop_loglevel, ":loglevel"); - DEFSYM (QCgnutls_bootprop_verify_flags, ":verify-flags"); - DEFSYM (QCgnutls_bootprop_verify_error, ":verify-error"); + DEFSYM (QChostname, ":hostname"); + DEFSYM (QCpriority, ":priority"); + DEFSYM (QCtrustfiles, ":trustfiles"); + DEFSYM (QCkeylist, ":keylist"); + DEFSYM (QCcrlfiles, ":crlfiles"); + DEFSYM (QCmin_prime_bits, ":min-prime-bits"); + DEFSYM (QCloglevel, ":loglevel"); + DEFSYM (QCcomplete_negotiation, ":complete-negotiation"); + DEFSYM (QCverify_flags, ":verify-flags"); + DEFSYM (QCverify_error, ":verify-error"); DEFSYM (Qgnutls_e_interrupted, "gnutls-e-interrupted"); Fput (Qgnutls_e_interrupted, Qgnutls_code, @@ -1693,6 +1767,7 @@ syms_of_gnutls (void) make_number (GNUTLS_E_APPLICATION_ERROR_MIN)); defsubr (&Sgnutls_get_initstage); + defsubr (&Sgnutls_asynchronous_parameters); defsubr (&Sgnutls_errorp); defsubr (&Sgnutls_error_fatalp); defsubr (&Sgnutls_error_string); diff --git a/src/gnutls.h b/src/gnutls.h index e9348e7423..47e11f2905 100644 --- a/src/gnutls.h +++ b/src/gnutls.h @@ -25,8 +25,9 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" -/* This limits the attempts to handshake per process (connection). */ -#define GNUTLS_EMACS_HANDSHAKES_LIMIT 100 +/* This limits the attempts to handshake per process (connection). It + should work out to about one minute in asynchronous cases. */ +#define GNUTLS_EMACS_HANDSHAKES_LIMIT 6000 typedef enum { @@ -84,6 +85,8 @@ extern void emacs_gnutls_transport_set_errno (gnutls_session_t state, int err); #endif extern Lisp_Object emacs_gnutls_deinit (Lisp_Object); extern Lisp_Object emacs_gnutls_global_init (void); +extern int gnutls_try_handshake (struct Lisp_Process *p); +extern Lisp_Object gnutls_verify_boot (Lisp_Object proc, Lisp_Object proplist); #endif diff --git a/src/image.c b/src/image.c index b07c1815ea..22bbc35fcf 100644 --- a/src/image.c +++ b/src/image.c @@ -2300,7 +2300,7 @@ x_find_image_fd (Lisp_Object file, int *pfd) happens, e.g., under Auto Image File Mode.) 'openp' didn't open the file, so we should, because the caller expects that. */ - fd = emacs_open (SSDATA (file_found), O_RDONLY | O_BINARY, 0); + fd = emacs_open (SSDATA (file_found), O_RDONLY, 0); } } else /* fd < 0, but not -2 */ @@ -8077,15 +8077,25 @@ compute_image_size (size_t width, size_t height, { Lisp_Object value; int desired_width, desired_height; + double scale = 1; + + value = image_spec_value (spec, QCscale, NULL); + if (NUMBERP (value)) + scale = extract_float (value); /* If width and/or height is set in the display spec assume we want to scale to those values. If either h or w is unspecified, the unspecified should be calculated from the specified to preserve aspect ratio. */ value = image_spec_value (spec, QCwidth, NULL); - desired_width = NATNUMP (value) ? min (XFASTINT (value), INT_MAX) : -1; + desired_width = NATNUMP (value) ? + min (XFASTINT (value) * scale, INT_MAX) : -1; value = image_spec_value (spec, QCheight, NULL); - desired_height = NATNUMP (value) ? min (XFASTINT (value), INT_MAX) : -1; + desired_height = NATNUMP (value) ? + min (XFASTINT (value) * scale, INT_MAX) : -1; + + width = width * scale; + height = height * scale; if (desired_width == -1) { @@ -8136,6 +8146,13 @@ compute_image_size (size_t width, size_t height, /* h known, calculate w. */ desired_width = scale_image_size (desired_height, height, width); + /* We have no width/height settings, so just apply the scale. */ + if (desired_width == -1 && desired_height == -1) + { + desired_width = width; + desired_height = height; + } + *d_width = desired_width; *d_height = desired_height; } @@ -8550,6 +8567,18 @@ imagemagick_load_image (struct frame *f, struct image *img, return 0; } +#ifdef HAVE_MAGICKAUTOORIENTIMAGE + /* If no :rotation is explicitly specified, apply the automatic + rotation from EXIF. */ + if (NILP (image_spec_value (img->spec, QCrotation, NULL))) + if (MagickAutoOrientImage (image_wand) == MagickFalse) + { + image_error ("Error applying automatic orientation in image `%s'", img->spec); + DestroyMagickWand (image_wand); + return 0; + } +#endif + if (ino < 0 || ino >= MagickGetNumberImages (image_wand)) { image_error ("Invalid image number `%s' in image `%s'", image, img->spec); @@ -9232,8 +9261,8 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * eassert (gdk_pixbuf_get_has_alpha (pixbuf)); eassert (gdk_pixbuf_get_bits_per_sample (pixbuf) == 8); -#ifdef USE_CAIRO { +#ifdef USE_CAIRO unsigned char *data = (unsigned char *) xmalloc (width*height*4); uint32_t bgcolor = get_spec_bg_or_alpha_as_argb (img, f); @@ -9259,82 +9288,77 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * create_cairo_image_surface (img, data, width, height); g_object_unref (pixbuf); - } #else - /* Try to create a x pixmap to hold the svg pixmap. */ - XImagePtr ximg; - if (!image_create_x_image_and_pixmap (f, img, width, height, 0, &ximg, 0)) - { - g_object_unref (pixbuf); - return 0; - } + /* Try to create a x pixmap to hold the svg pixmap. */ + XImagePtr ximg; + if (!image_create_x_image_and_pixmap (f, img, width, height, 0, &ximg, 0)) + { + g_object_unref (pixbuf); + return 0; + } - init_color_table (); + init_color_table (); - /* Handle alpha channel by combining the image with a background - color. */ - XColor background; - Lisp_Object specified_bg = image_spec_value (img->spec, QCbackground, NULL); - if (!STRINGP (specified_bg) - || !x_defined_color (f, SSDATA (specified_bg), &background, 0)) - x_query_frame_background_color (f, &background); - - /* SVG pixmaps specify transparency in the last byte, so right - shift 8 bits to get rid of it, since emacs doesn't support - transparency. */ - background.red >>= 8; - background.green >>= 8; - background.blue >>= 8; - - /* This loop handles opacity values, since Emacs assumes - non-transparent images. Each pixel must be "flattened" by - calculating the resulting color, given the transparency of the - pixel, and the image background color. */ - for (int y = 0; y < height; ++y) - { - for (int x = 0; x < width; ++x) - { - int red; - int green; - int blue; - int opacity; - - red = *pixels++; - green = *pixels++; - blue = *pixels++; - opacity = *pixels++; - - red = ((red * opacity) - + (background.red * ((1 << 8) - opacity))); - green = ((green * opacity) - + (background.green * ((1 << 8) - opacity))); - blue = ((blue * opacity) - + (background.blue * ((1 << 8) - opacity))); - - XPutPixel (ximg, x, y, lookup_rgb_color (f, red, green, blue)); - } + /* Handle alpha channel by combining the image with a background + color. */ + XColor background; + Lisp_Object specified_bg = image_spec_value (img->spec, QCbackground, NULL); + if (!STRINGP (specified_bg) + || !x_defined_color (f, SSDATA (specified_bg), &background, 0)) + x_query_frame_background_color (f, &background); + + /* SVG pixmaps specify transparency in the last byte, so right + shift 8 bits to get rid of it, since emacs doesn't support + transparency. */ + background.red >>= 8; + background.green >>= 8; + background.blue >>= 8; + + /* This loop handles opacity values, since Emacs assumes + non-transparent images. Each pixel must be "flattened" by + calculating the resulting color, given the transparency of the + pixel, and the image background color. */ + for (int y = 0; y < height; ++y) + { + for (int x = 0; x < width; ++x) + { + int red = *pixels++; + int green = *pixels++; + int blue = *pixels++; + int opacity = *pixels++; + + red = ((red * opacity) + + (background.red * ((1 << 8) - opacity))); + green = ((green * opacity) + + (background.green * ((1 << 8) - opacity))); + blue = ((blue * opacity) + + (background.blue * ((1 << 8) - opacity))); + + XPutPixel (ximg, x, y, lookup_rgb_color (f, red, green, blue)); + } - pixels += rowstride - 4 * width; - } + pixels += rowstride - 4 * width; + } #ifdef COLOR_TABLE_SUPPORT - /* Remember colors allocated for this image. */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); + /* Remember colors allocated for this image. */ + img->colors = colors_in_color_table (&img->ncolors); + free_color_table (); #endif /* COLOR_TABLE_SUPPORT */ - g_object_unref (pixbuf); + g_object_unref (pixbuf); - img->width = width; - img->height = height; + img->width = width; + img->height = height; - /* Maybe fill in the background field while we have ximg handy. - Casting avoids a GCC warning. */ - IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg); + /* Maybe fill in the background field while we have ximg handy. + Casting avoids a GCC warning. */ + IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg); - /* Put ximg into the image. */ - image_put_x_image (f, img, ximg, 0); + /* Put ximg into the image. */ + image_put_x_image (f, img, ximg, 0); #endif /* ! USE_CAIRO */ + } return 1; @@ -9799,6 +9823,7 @@ non-numeric, there is no explicit limit on the size of images. */); DEFSYM (QCcrop, ":crop"); DEFSYM (QCrotation, ":rotation"); DEFSYM (QCmatrix, ":matrix"); + DEFSYM (QCscale, ":scale"); DEFSYM (QCcolor_adjustment, ":color-adjustment"); DEFSYM (QCmask, ":mask"); diff --git a/src/keyboard.c b/src/keyboard.c index e3858a5d8d..92d5c3053a 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2834,7 +2834,16 @@ read_char (int commandflag, Lisp_Object map, last_input_event = c; call4 (Qcommand_execute, tem, Qnil, Fvector (1, &last_input_event), Qt); - if (CONSP (c) && EQ (XCAR (c), Qselect_window) && !end_time) + if (CONSP (c) + && (EQ (XCAR (c), Qselect_window) +#ifdef HAVE_DBUS + || EQ (XCAR (c), Qdbus_event) +#endif +#ifdef USE_FILE_NOTIFY + || EQ (XCAR (c), Qfile_notify) +#endif + || EQ (XCAR (c), Qconfig_changed_event)) + && !end_time) /* We stopped being idle for this event; undo that. This prevents automatic window selection (under mouse-autoselect-window) from acting as a real input event, for @@ -5971,7 +5980,6 @@ make_lispy_event (struct input_event *event) } #endif - #if defined HAVE_INOTIFY || defined HAVE_KQUEUE || defined HAVE_GFILENOTIFY case FILE_NOTIFY_EVENT: { @@ -10309,6 +10317,9 @@ handle_interrupt (bool in_signal_handler) is used. Note that [Enter] is not echoed by dos. */ cursor_to (SELECTED_FRAME (), 0, 0); #endif + + write_stdout ("Emacs is resuming after an emergency escape.\n"); + /* It doesn't work to autosave while GC is in progress; the code used for auto-saving doesn't cope with the mark bit. */ if (!gc_in_progress) @@ -11713,6 +11724,25 @@ Currently, the only supported values for this variable are `sigusr1' and `sigusr2'. */); Vdebug_on_event = intern_c_string ("sigusr2"); + DEFVAR_BOOL ("attempt-stack-overflow-recovery", + attempt_stack_overflow_recovery, + doc: /* If non-nil, attempt to recover from C stack +overflow. This recovery is unsafe and may lead to deadlocks or data +corruption, but it usually works and may preserve modified buffers +that would otherwise be lost. If nil, treat stack overflow like any +other kind of crash. */); + attempt_stack_overflow_recovery = true; + + DEFVAR_BOOL ("attempt-orderly-shutdown-on-fatal-signal", + attempt_orderly_shutdown_on_fatal_signal, + doc: /* If non-nil, attempt to perform an orderly +shutdown when Emacs receives a fatal signal (e.g., a crash). +This cleanup is unsafe and may lead to deadlocks or data corruption, +but it usually works and may preserve modified buffers that would +otherwise be lost. If nil, crash immediately in response to fatal +signals. */); + attempt_orderly_shutdown_on_fatal_signal = true; + /* Create the initial keyboard. Qt means 'unset'. */ initial_kboard = allocate_kboard (Qt); } diff --git a/src/keymap.c b/src/keymap.c index 8ab4c6c27a..44335aded8 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1303,7 +1303,7 @@ silly_event_symbol_error (Lisp_Object c) *p = 0; c = reorder_modifiers (c); - AUTO_STRING (new_mods_string, new_mods); + AUTO_STRING_WITH_LEN (new_mods_string, new_mods, p - new_mods); keystring = concat2 (new_mods_string, XCDR (assoc)); error ("To bind the key %s, use [?%s], not [%s]", @@ -1737,10 +1737,12 @@ bindings; see the description of `lookup-key' for more details about this. */) DEFUN ("define-prefix-command", Fdefine_prefix_command, Sdefine_prefix_command, 1, 3, 0, doc: /* Define COMMAND as a prefix command. COMMAND should be a symbol. -A new sparse keymap is stored as COMMAND's function definition and its value. -If a second optional argument MAPVAR is given, the map is stored as -its value instead of as COMMAND's value; but COMMAND is still defined -as a function. +A new sparse keymap is stored as COMMAND's function definition and its +value. +This prepares COMMAND for use as a prefix key's binding. +If a second optional argument MAPVAR is given, it should be a symbol. +The map is then stored as MAPVAR's value instead of as COMMAND's +value; but COMMAND is still defined as a function. The third optional argument NAME, if given, supplies a menu name string for the map. This is required to use the keymap as a menu. This function returns COMMAND. */) diff --git a/src/kqueue.c b/src/kqueue.c index c848b7ff1a..f45bd0c4c2 100644 --- a/src/kqueue.c +++ b/src/kqueue.c @@ -29,6 +29,10 @@ along with GNU Emacs. If not, see . */ #include "keyboard.h" #include "process.h" +#ifdef HAVE_SYS_RESOURCE_H +#include +#endif /* HAVE_SYS_RESOURCE_H */ + /* File handle for kqueue. */ static int kqueuefd = -1; @@ -366,9 +370,12 @@ only when the upper directory of the renamed file is watched. */) (Lisp_Object file, Lisp_Object flags, Lisp_Object callback) { Lisp_Object watch_object, dir_list; - int fd, oflags; + int maxfd, fd, oflags; u_short fflags = 0; struct kevent kev; +#ifdef HAVE_GETRLIMIT + struct rlimit rlim; +#endif /* HAVE_GETRLIMIT */ /* Check parameters. */ CHECK_STRING (file); @@ -381,6 +388,21 @@ only when the upper directory of the renamed file is watched. */) if (! FUNCTIONP (callback)) wrong_type_argument (Qinvalid_function, callback); + /* Check available file descriptors. */ +#ifdef HAVE_GETRLIMIT + if (! getrlimit (RLIMIT_NOFILE, &rlim)) + maxfd = rlim.rlim_cur; + else +#endif /* HAVE_GETRLIMIT */ + maxfd = 256; + + /* We assume 50 file descriptors are sufficient for the rest of Emacs. */ + if ((maxfd - 50) < XINT (Flength (watch_list))) + xsignal2 + (Qfile_notify_error, + build_string ("File watching not possible, no file descriptor left"), + Flength (watch_list)); + if (kqueuefd < 0) { /* Create kqueue descriptor. */ diff --git a/src/lastfile.c b/src/lastfile.c index d516093b29..9d70b001d1 100644 --- a/src/lastfile.c +++ b/src/lastfile.c @@ -38,7 +38,10 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" +#if ((!defined SYSTEM_MALLOC && !defined HYBRID_MALLOC) \ + || defined WINDOWSNT || defined CYGWIN || defined DARWIN_OS) char my_edata[] = "End of Emacs initialized data"; +#endif /* Help unexec locate the end of the .bss area used by Emacs (which isn't always a separate section in NT executables). */ diff --git a/src/lisp.h b/src/lisp.h index 6a98adbda9..1fc6130be0 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -600,7 +600,9 @@ extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object); /* Defined in emacs.c. */ +#ifdef DOUG_LEA_MALLOC extern bool might_dump; +#endif /* True means Emacs has already been initialized. Used during startup to detect startup of dumped Emacs. */ extern bool initialized; @@ -719,12 +721,16 @@ struct Lisp_Symbol except the former expands to an integer constant expression. */ #define XLI_BUILTIN_LISPSYM(iname) TAG_SYMOFFSET ((iname) * sizeof *lispsym) +/* LISPSYM_INITIALLY (Qfoo) is equivalent to Qfoo except it is + designed for use as an initializer, even for a constant initializer. */ +#define LISPSYM_INITIALLY(name) LISP_INITIALLY (XLI_BUILTIN_LISPSYM (i##name)) + /* Declare extern constants for Lisp symbols. These can be helpful when using a debugger like GDB, on older platforms where the debug format does not represent C macros. */ #define DEFINE_LISP_SYMBOL(name) \ DEFINE_GDB_SYMBOL_BEGIN (Lisp_Object, name) \ - DEFINE_GDB_SYMBOL_END (LISP_INITIALLY (XLI_BUILTIN_LISPSYM (i##name))) + DEFINE_GDB_SYMBOL_END (LISPSYM_INITIALLY (name)) /* By default, define macros for Qt, etc., as this leads to a bit better performance in the core Emacs interpreter. A plugin can @@ -3439,7 +3445,7 @@ ptrdiff_t hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, EMACS_UINT *); ptrdiff_t hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object, EMACS_UINT); void hash_remove_from_table (struct Lisp_Hash_Table *, Lisp_Object); -extern struct hash_table_test hashtest_eq, hashtest_eql, hashtest_equal; +extern struct hash_table_test const hashtest_eq, hashtest_eql, hashtest_equal; extern void validate_subarray (Lisp_Object, Lisp_Object, Lisp_Object, ptrdiff_t, ptrdiff_t *, ptrdiff_t *); extern Lisp_Object substring_both (Lisp_Object, ptrdiff_t, ptrdiff_t, @@ -3584,13 +3590,8 @@ extern void mark_object (Lisp_Object); #if defined REL_ALLOC && !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC extern void refill_memory_reserve (void); #endif -#ifdef DOUG_LEA_MALLOC extern void alloc_unexec_pre (void); extern void alloc_unexec_post (void); -#else -INLINE void alloc_unexec_pre (void) {} -INLINE void alloc_unexec_post (void) {} -#endif extern const char *pending_malloc_warning; extern Lisp_Object zero_vector; extern Lisp_Object *stack_base; @@ -3756,6 +3757,15 @@ extern void check_cons_list (void); INLINE void (check_cons_list) (void) { lisp_h_check_cons_list (); } #endif +/* Defined in gmalloc.c. */ +#if !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC && !defined SYSTEM_MALLOC +extern size_t __malloc_extra_blocks; +#endif +#if !HAVE_DECL_ALIGNED_ALLOC +extern void *aligned_alloc (size_t, size_t) ATTRIBUTE_MALLOC_SIZE ((2)); +#endif +extern void malloc_enable_thread (void); + #ifdef REL_ALLOC /* Defined in ralloc.c. */ extern void *r_alloc (void **, size_t) ATTRIBUTE_ALLOC_SIZE ((2)); @@ -3901,6 +3911,8 @@ extern Lisp_Object unbind_to (ptrdiff_t, Lisp_Object); extern _Noreturn void error (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); extern _Noreturn void verror (const char *, va_list) ATTRIBUTE_FORMAT_PRINTF (1, 0); +extern Lisp_Object vformat_string (const char *, va_list) + ATTRIBUTE_FORMAT_PRINTF (1, 0); extern void un_autoload (Lisp_Object); extern Lisp_Object call_debugger (Lisp_Object arg); extern void *near_C_stack_top (void); @@ -4125,6 +4137,9 @@ extern bool noninteractive; /* True means remove site-lisp directories from load-path. */ extern bool no_site_lisp; +/* True means put details like time stamps into builds. */ +extern bool build_details; + /* Pipe used to send exit notification to the daemon parent at startup. On Windows, we use a kernel event instead. */ #ifndef WINDOWSNT @@ -4166,7 +4181,7 @@ extern void delete_keyboard_wait_descriptor (int); extern void add_gpm_wait_descriptor (int); extern void delete_gpm_wait_descriptor (int); #endif -extern void init_process_emacs (void); +extern void init_process_emacs (int); extern void syms_of_process (void); extern void setup_process_coding_systems (Lisp_Object); @@ -4204,6 +4219,7 @@ extern struct byte_stack *byte_stack_list; extern void relocate_byte_stack (void); extern Lisp_Object exec_byte_code (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, ptrdiff_t, Lisp_Object *); +extern Lisp_Object get_byte_code_arity (Lisp_Object); /* Defined in macros.c. */ extern void init_macros (void); @@ -4236,9 +4252,8 @@ struct tty_display_info; struct terminal; /* Defined in sysdep.c. */ -#ifndef HAVE_GET_CURRENT_DIR_NAME -extern char *get_current_dir_name (void); -#endif +extern void init_standard_fds (void); +extern char *emacs_get_current_dir_name (void); extern void stuff_char (char c); extern void init_foreground_group (void); extern void sys_subshell (void); @@ -4598,27 +4613,29 @@ enum STACK_CONS (d, Qnil)))) \ : list4 (a, b, c, d)) -/* Check whether stack-allocated strings are ASCII-only. */ +/* Declare NAME as an auto Lisp string if possible, a GC-based one if not. + Take its unibyte value from the null-terminated string STR, + an expression that should not have side effects. + STR's value is not necessarily copied. The resulting Lisp string + should not be modified or made visible to user code. */ -#if defined (ENABLE_CHECKING) && USE_STACK_LISP_OBJECTS -extern const char *verify_ascii (const char *); -#else -# define verify_ascii(str) (str) -#endif +#define AUTO_STRING(name, str) \ + AUTO_STRING_WITH_LEN (name, str, strlen (str)) /* Declare NAME as an auto Lisp string if possible, a GC-based one if not. - Take its value from STR. STR is not necessarily copied and should - contain only ASCII characters. The resulting Lisp string should - not be modified or made visible to user code. */ + Take its unibyte value from the null-terminated string STR with length LEN. + STR may have side effects and may contain null bytes. + STR's value is not necessarily copied. The resulting Lisp string + should not be modified or made visible to user code. */ -#define AUTO_STRING(name, str) \ +#define AUTO_STRING_WITH_LEN(name, str, len) \ Lisp_Object name = \ (USE_STACK_STRING \ ? (make_lisp_ptr \ ((&(union Aligned_String) \ - {{strlen (str), -1, 0, (unsigned char *) verify_ascii (str)}}.s), \ - Lisp_String)) \ - : build_string (verify_ascii (str))) + {{len, -1, 0, (unsigned char *) (str)}}.s), \ + Lisp_String)) \ + : make_unibyte_string (str, len)) /* Loop over all tails of a list, checking for cycles. FIXME: Make tortoise and n internal declarations. diff --git a/src/lread.c b/src/lread.c index d374406e7b..98a4d69894 100644 --- a/src/lread.c +++ b/src/lread.c @@ -43,6 +43,7 @@ along with GNU Emacs. If not, see . */ #include "systime.h" #include "termhooks.h" #include "blockinput.h" +#include #ifdef MSDOS #include "msdos.h" @@ -1582,8 +1583,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, } else { - int oflags = O_RDONLY + (NILP (predicate) ? 0 : O_BINARY); - fd = emacs_open (pfn, oflags, 0); + fd = emacs_open (pfn, O_RDONLY, 0); if (fd < 0) { if (errno != ENOENT) @@ -2154,6 +2154,33 @@ grow_read_buffer (void) MAX_MULTIBYTE_LENGTH, -1, 1); } +/* Return the scalar value that has the Unicode character name NAME. + Raise 'invalid-read-syntax' if there is no such character. */ +static int +character_name_to_code (char const *name, ptrdiff_t name_len) +{ + /* For "U+XXXX", pass the leading '+' to string_to_number to reject + monstrosities like "U+-0000". */ + Lisp_Object code + = (name[0] == 'U' && name[1] == '+' + ? string_to_number (name + 1, 16, false) + : call2 (Qchar_from_name, make_unibyte_string (name, name_len), Qt)); + + if (! RANGED_INTEGERP (0, code, MAX_UNICODE_CHAR) + || char_surrogate_p (XINT (code))) + { + AUTO_STRING (format, "\\N{%s}"); + AUTO_STRING_WITH_LEN (namestr, name, name_len); + xsignal1 (Qinvalid_read_syntax, CALLN (Fformat, format, namestr)); + } + + return XINT (code); +} + +/* Bound on the length of a Unicode character name. As of + Unicode 9.0.0 the maximum is 83, so this should be safe. */ +enum { UNICODE_CHARACTER_NAME_LENGTH_BOUND = 200 }; + /* Read a \-escape sequence, assuming we already read the `\'. If the escape sequence forces unibyte, return eight-bit char. */ @@ -2361,6 +2388,51 @@ read_escape (Lisp_Object readcharfun, bool stringp) return i; } + case 'N': + /* Named character. */ + { + c = READCHAR; + if (c != '{') + invalid_syntax ("Expected opening brace after \\N"); + char name[UNICODE_CHARACTER_NAME_LENGTH_BOUND + 1]; + bool whitespace = false; + ptrdiff_t length = 0; + while (true) + { + c = READCHAR; + if (c < 0) + end_of_file_error (); + if (c == '}') + break; + if (! (0 < c && c < 0x80)) + { + AUTO_STRING (format, + "Invalid character U+%04X in character name"); + xsignal1 (Qinvalid_read_syntax, + CALLN (Fformat, format, make_natnum (c))); + } + /* Treat multiple adjacent whitespace characters as a + single space character. This makes it easier to use + character names in e.g. multi-line strings. */ + if (c_isspace (c)) + { + if (whitespace) + continue; + c = ' '; + whitespace = true; + } + else + whitespace = false; + name[length++] = c; + if (length >= sizeof name) + invalid_syntax ("Character name too long"); + } + if (length == 0) + invalid_syntax ("Empty character name"); + name[length] = '\0'; + return character_name_to_code (name, length); + } + default: return c; } @@ -4508,6 +4580,7 @@ were read in. */); doc: /* List of directories to search for files to load. Each element is a string (directory file name) or nil (meaning `default-directory'). +This list is consulted by the `require' function. Initialized during startup as described in Info node `(elisp)Library Search'. Use `directory-file-name' when adding items to this path. However, Lisp programs that process this list should tolerate directories both with @@ -4749,4 +4822,6 @@ that are loaded before your customizations are read! */); DEFSYM (Qweakness, "weakness"); DEFSYM (Qrehash_size, "rehash-size"); DEFSYM (Qrehash_threshold, "rehash-threshold"); + + DEFSYM (Qchar_from_name, "char-from-name"); } diff --git a/src/marker.c b/src/marker.c index 030083002f..febdb17689 100644 --- a/src/marker.c +++ b/src/marker.c @@ -412,8 +412,7 @@ Returns nil if MARKER points into a dead buffer. */) } DEFUN ("marker-position", Fmarker_position, Smarker_position, 1, 1, 0, - doc: /* Return the position MARKER points at, as a character number. -Returns nil if MARKER points nowhere. */) + doc: /* Return the position of MARKER, or nil if it points nowhere. */) (Lisp_Object marker) { CHECK_MARKER (marker); diff --git a/src/menu.c b/src/menu.c index 9504cee592..737f2b55e8 100644 --- a/src/menu.c +++ b/src/menu.c @@ -408,7 +408,7 @@ single_menu_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy, void *sk if (prefix) { - AUTO_STRING (prefix_obj, prefix); + AUTO_STRING_WITH_LEN (prefix_obj, prefix, 4); item_string = concat2 (prefix_obj, item_string); } } diff --git a/src/minibuf.c b/src/minibuf.c index 238a04a8ad..d2a4c9b953 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -194,7 +194,7 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial, int c; unsigned char hide_char = 0; struct emacs_tty etty; - bool etty_valid; + bool etty_valid IF_LINT (= false); /* Check, whether we need to suppress echoing. */ if (CHARACTERP (Vread_hide_char)) @@ -203,10 +203,10 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial, /* Manipulate tty. */ if (hide_char) { - etty_valid = emacs_get_tty (fileno (stdin), &etty) == 0; + etty_valid = emacs_get_tty (STDIN_FILENO, &etty) == 0; if (etty_valid) - set_binary_mode (fileno (stdin), O_BINARY); - suppress_echo_on_tty (fileno (stdin)); + set_binary_mode (STDIN_FILENO, O_BINARY); + suppress_echo_on_tty (STDIN_FILENO); } fwrite (SDATA (prompt), 1, SBYTES (prompt), stdout); @@ -240,8 +240,8 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial, fprintf (stdout, "\n"); if (etty_valid) { - emacs_set_tty (fileno (stdin), &etty, 0); - set_binary_mode (fileno (stdin), O_TEXT); + emacs_set_tty (STDIN_FILENO, &etty, 0); + set_binary_mode (STDIN_FILENO, O_TEXT); } } @@ -630,8 +630,31 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, Qrear_nonsticky, Qt, Qnil); Fput_text_property (make_number (BEG), make_number (PT), Qfield, Qt, Qnil); - Fadd_text_properties (make_number (BEG), make_number (PT), - Vminibuffer_prompt_properties, Qnil); + if (Fconsp (Vminibuffer_prompt_properties)) + { + /* We want to apply all properties from + `minibuffer-prompt-properties' to the region normally, + but if the `face' property is present, add that + property to the end of the face properties to avoid + overwriting faces. */ + Lisp_Object list = Vminibuffer_prompt_properties; + while (CONSP (list)) + { + Lisp_Object key = XCAR (list); + list = XCDR (list); + if (CONSP (list)) + { + Lisp_Object val = XCAR (list); + list = XCDR (list); + if (EQ (key, Qface)) + Fadd_face_text_property (make_number (BEG), + make_number (PT), val, Qt, Qnil); + else + Fput_text_property (make_number (BEG), make_number (PT), + key, val, Qnil); + } + } + } } unbind_to (count1, Qnil); } @@ -742,27 +765,25 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, } /* Return a buffer to be used as the minibuffer at depth `depth'. - depth = 0 is the lowest allowed argument, and that is the value - used for nonrecursive minibuffer invocations. */ + depth = 0 is the lowest allowed argument, and that is the value + used for nonrecursive minibuffer invocations. */ Lisp_Object get_minibuffer (EMACS_INT depth) { - Lisp_Object tail, num, buf; - char name[sizeof " *Minibuf-*" + INT_STRLEN_BOUND (EMACS_INT)]; - - XSETFASTINT (num, depth); - tail = Fnthcdr (num, Vminibuffer_list); + Lisp_Object tail = Fnthcdr (make_number (depth), Vminibuffer_list); if (NILP (tail)) { tail = list1 (Qnil); Vminibuffer_list = nconc2 (Vminibuffer_list, tail); } - buf = Fcar (tail); + Lisp_Object buf = Fcar (tail); if (NILP (buf) || !BUFFER_LIVE_P (XBUFFER (buf))) { - buf = Fget_buffer_create - (make_formatted_string (name, " *Minibuf-%"pI"d*", depth)); + static char const name_fmt[] = " *Minibuf-%"pI"d*"; + char name[sizeof name_fmt + INT_STRLEN_BOUND (EMACS_INT)]; + AUTO_STRING_WITH_LEN (lname, name, sprintf (name, name_fmt, depth)); + buf = Fget_buffer_create (lname); /* Although the buffer's name starts with a space, undo should be enabled in it. */ @@ -1966,7 +1987,9 @@ controls the behavior, rather than this variable. */); DEFVAR_BOOL ("enable-recursive-minibuffers", enable_recursive_minibuffers, doc: /* Non-nil means to allow minibuffer commands while in the minibuffer. -This variable makes a difference whenever the minibuffer window is active. */); +This variable makes a difference whenever the minibuffer window is active. +Also see `minibuffer-depth-indicator-mode', which may be handy if this +variable is non-nil. */); enable_recursive_minibuffers = 0; DEFVAR_LISP ("minibuffer-completion-table", Vminibuffer_completion_table, diff --git a/src/nsterm.h b/src/nsterm.h index 0aea9cca11..6cad337f3f 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -676,11 +676,13 @@ char const * nstrace_fullscreen_type_name (int); /* offset to the bottom of knob of last mouse down */ CGFloat last_mouse_offset; float min_portion; - int pixel_height; + int pixel_length; enum scroll_bar_part last_hit_part; BOOL condemned; + BOOL horizontal; + /* optimize against excessive positioning calls generated by emacs */ int em_position; int em_portion; diff --git a/src/nsterm.m b/src/nsterm.m index 34c5395b63..1d48c041ba 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1801,23 +1801,6 @@ x_set_window_size (struct frame *f, [window setFrame: wr display: YES]; - /* This is a trick to compensate for Emacs' managing the scrollbar area - as a fixed number of standard character columns. Instead of leaving - blank space for the extra, we chopped it off above. Now for - left-hand scrollbars, we shift all rendering to the left by the - difference between the real width and Emacs' imagined one. For - right-hand bars, don't worry about it since the extra is never used. - (Obviously doesn't work for vertically split windows tho..) */ - { - NSPoint origin = FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f) - ? NSMakePoint (FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f) - - NS_SCROLL_BAR_WIDTH (f), 0) - : NSMakePoint (0, 0); - - [view setFrame: NSMakeRect (0, 0, pixelwidth, pixelheight)]; - [view setBoundsOrigin: origin]; - } - [view updateFrameSize: NO]; unblock_input (); } @@ -4351,7 +4334,7 @@ ns_set_vertical_scroll_bar (struct window *window, window_box (window, ANY_AREA, 0, &window_y, 0, &window_height); top = window_y; height = window_height; - width = WINDOW_CONFIG_SCROLL_BAR_COLS (window) * FRAME_COLUMN_WIDTH (f); + width = NS_SCROLL_BAR_WIDTH (f); left = WINDOW_SCROLL_BAR_AREA_X (window); r = NSMakeRect (left, top, width, height); @@ -4442,34 +4425,20 @@ ns_set_horizontal_scroll_bar (struct window *window, NSTRACE ("ns_set_horizontal_scroll_bar"); /* Get dimensions. */ - window_box (window, ANY_AREA, 0, &window_x, &window_width, 0); + window_box (window, ANY_AREA, &window_x, 0, &window_width, 0); left = window_x; width = window_width; - height = WINDOW_CONFIG_SCROLL_BAR_LINES (window) * FRAME_LINE_HEIGHT (f); + height = NS_SCROLL_BAR_HEIGHT (f); top = WINDOW_SCROLL_BAR_AREA_Y (window); r = NSMakeRect (left, top, width, height); /* the parent view is flipped, so we need to flip y value */ v = [view frame]; - /* ??????? PXW/scrollbars !!!!!!!!!!!!!!!!!!!! */ r.origin.y = (v.size.height - r.size.height - r.origin.y); XSETWINDOW (win, window); block_input (); - if (WINDOW_TOTAL_COLS (window) < 5) - { - if (!NILP (window->horizontal_scroll_bar)) - { - bar = XNS_SCROLL_BAR (window->horizontal_scroll_bar); - [bar removeFromSuperview]; - wset_horizontal_scroll_bar (window, Qnil); - } - ns_clear_frame_area (f, left, top, width, height); - unblock_input (); - return; - } - if (NILP (window->horizontal_scroll_bar)) { if (width > 0 && height > 0) @@ -4484,16 +4453,22 @@ ns_set_horizontal_scroll_bar (struct window *window, NSRect oldRect; bar = XNS_SCROLL_BAR (window->horizontal_scroll_bar); oldRect = [bar frame]; - r.size.width = oldRect.size.width; if (FRAME_LIVE_P (f) && !NSEqualRects (oldRect, r)) { - if (oldRect.origin.x != r.origin.x) - ns_clear_frame_area (f, left, top, width, height); + if (oldRect.origin.y != r.origin.y) + ns_clear_frame_area (f, left, top, width, height); [bar setFrame: r]; update_p = YES; } } + /* If there are both horizontal and vertical scroll-bars they leave + a square that belongs to neither. We need to clear it otherwise + it fills with junk. */ + if (!NILP (window->vertical_scroll_bar)) + ns_clear_frame_area (f, WINDOW_SCROLL_BAR_AREA_X (window), top, + NS_SCROLL_BAR_HEIGHT (f), height); + if (update_p) [bar setPosition: position portion: portion whole: whole]; unblock_input (); @@ -4531,13 +4506,15 @@ ns_redeem_scroll_bar (struct window *window) { id bar; NSTRACE ("ns_redeem_scroll_bar"); - if (!NILP (window->vertical_scroll_bar)) + if (!NILP (window->vertical_scroll_bar) + && WINDOW_HAS_VERTICAL_SCROLL_BAR (window)) { bar = XNS_SCROLL_BAR (window->vertical_scroll_bar); [bar reprieve]; } - if (!NILP (window->horizontal_scroll_bar)) + if (!NILP (window->horizontal_scroll_bar) + && WINDOW_HAS_HORIZONTAL_SCROLL_BAR (window)) { bar = XNS_SCROLL_BAR (window->horizontal_scroll_bar); [bar reprieve]; @@ -8110,12 +8087,15 @@ not_in_argv (NSString *arg) return r; } - - initFrame: (NSRect )r window: (Lisp_Object)nwin { NSTRACE ("[EmacsScroller initFrame: window:]"); - r.size.width = [EmacsScroller scrollerWidth]; + if (r.size.width > r.size.height) + horizontal = YES; + else + horizontal = NO; + [super initWithFrame: r/*NSMakeRect (0, 0, 0, 0)*/]; [self setContinuous: YES]; [self setEnabled: YES]; @@ -8131,9 +8111,12 @@ not_in_argv (NSString *arg) window = XWINDOW (nwin); condemned = NO; - pixel_height = NSHeight (r); - if (pixel_height == 0) pixel_height = 1; - min_portion = 20 / pixel_height; + if (horizontal) + pixel_length = NSWidth (r); + else + pixel_length = NSHeight (r); + if (pixel_length == 0) pixel_length = 1; + min_portion = 20 / pixel_length; frame = XFRAME (window->frame); if (FRAME_LIVE_P (frame)) @@ -8162,9 +8145,12 @@ not_in_argv (NSString *arg) NSTRACE ("[EmacsScroller setFrame:]"); /* block_input (); */ - pixel_height = NSHeight (newRect); - if (pixel_height == 0) pixel_height = 1; - min_portion = 20 / pixel_height; + if (horizontal) + pixel_length = NSWidth (newRect); + else + pixel_length = NSHeight (newRect); + if (pixel_length == 0) pixel_length = 1; + min_portion = 20 / pixel_length; [super setFrame: newRect]; /* unblock_input (); */ } @@ -8174,7 +8160,12 @@ not_in_argv (NSString *arg) { NSTRACE ("[EmacsScroller dealloc]"); if (window) - wset_vertical_scroll_bar (window, Qnil); + { + if (horizontal) + wset_horizontal_scroll_bar (window, Qnil); + else + wset_vertical_scroll_bar (window, Qnil); + } window = 0; [super dealloc]; } @@ -8209,7 +8200,12 @@ not_in_argv (NSString *arg) if (view != nil) view->scrollbarsNeedingUpdate++; if (window) - wset_vertical_scroll_bar (window, Qnil); + { + if (horizontal) + wset_horizontal_scroll_bar (window, Qnil); + else + wset_vertical_scroll_bar (window, Qnil); + } window = 0; [self removeFromSuperview]; [self release]; @@ -8259,7 +8255,7 @@ not_in_argv (NSString *arg) { float pos; CGFloat por; - portion = max ((float)whole*min_portion/pixel_height, portion); + portion = max ((float)whole*min_portion/pixel_length, portion); pos = (float)position / (whole - portion); por = (CGFloat)portion/whole; #ifdef NS_IMPL_COCOA @@ -8289,10 +8285,20 @@ not_in_argv (NSString *arg) XSETWINDOW (win, window); emacs_event->frame_or_window = win; emacs_event->timestamp = EV_TIMESTAMP (e); - emacs_event->kind = SCROLL_BAR_CLICK_EVENT; emacs_event->arg = Qnil; - XSETINT (emacs_event->x, loc * pixel_height); - XSETINT (emacs_event->y, pixel_height-20); + + if (horizontal) + { + emacs_event->kind = HORIZONTAL_SCROLL_BAR_CLICK_EVENT; + XSETINT (emacs_event->x, em_whole * loc / pixel_length); + XSETINT (emacs_event->y, em_whole); + } + else + { + emacs_event->kind = SCROLL_BAR_CLICK_EVENT; + XSETINT (emacs_event->x, loc); + XSETINT (emacs_event->y, pixel_length-20); + } if (q_event_ptr) { @@ -8355,15 +8361,15 @@ not_in_argv (NSString *arg) switch (part) { case NSScrollerDecrementPage: - last_hit_part = scroll_bar_above_handle; inc = -1.0; break; + last_hit_part = horizontal ? scroll_bar_before_handle : scroll_bar_above_handle; break; case NSScrollerIncrementPage: - last_hit_part = scroll_bar_below_handle; inc = 1.0; break; + last_hit_part = horizontal ? scroll_bar_after_handle : scroll_bar_below_handle; break; case NSScrollerDecrementLine: - last_hit_part = scroll_bar_up_arrow; inc = -0.1; break; + last_hit_part = horizontal ? scroll_bar_left_arrow : scroll_bar_up_arrow; break; case NSScrollerIncrementLine: - last_hit_part = scroll_bar_down_arrow; inc = 0.1; break; + last_hit_part = horizontal ? scroll_bar_right_arrow : scroll_bar_down_arrow; break; case NSScrollerKnob: - last_hit_part = scroll_bar_handle; break; + last_hit_part = horizontal ? scroll_bar_horizontal_handle : scroll_bar_handle; break; case NSScrollerKnobSlot: /* GNUstep-only */ last_hit_part = scroll_bar_move_ratio; break; default: /* NSScrollerNoPart? */ @@ -8372,36 +8378,34 @@ not_in_argv (NSString *arg) return; } - if (inc != 0.0) - { - pos = 0; /* ignored */ - - /* set a timer to repeat, as we can't let superclass do this modally */ - scroll_repeat_entry - = [[NSTimer scheduledTimerWithTimeInterval: SCROLL_BAR_FIRST_DELAY - target: self - selector: @selector (repeatScroll:) - userInfo: 0 - repeats: YES] - retain]; - } - else + if (part == NSScrollerKnob || part == NSScrollerKnobSlot) { /* handle, or on GNUstep possibly slot */ NSEvent *fake_event; + int length; /* compute float loc in slot and mouse offset on knob */ sr = [self convertRect: [self rectForPart: NSScrollerKnobSlot] toView: nil]; - loc = NSHeight (sr) - ([e locationInWindow].y - NSMinY (sr)); + if (horizontal) + { + length = NSWidth (sr); + loc = ([e locationInWindow].x - NSMinX (sr)); + } + else + { + length = NSHeight (sr); + loc = length - ([e locationInWindow].y - NSMinY (sr)); + } + if (loc <= 0.0) { loc = 0.0; edge = -1; } - else if (loc >= NSHeight (sr)) + else if (loc >= length) { - loc = NSHeight (sr); + loc = length; edge = 1; } @@ -8411,17 +8415,16 @@ not_in_argv (NSString *arg) { kr = [self convertRect: [self rectForPart: NSScrollerKnob] toView: nil]; - kloc = NSHeight (kr) - ([e locationInWindow].y - NSMinY (kr)); + if (horizontal) + kloc = ([e locationInWindow].x - NSMinX (kr)); + else + kloc = NSHeight (kr) - ([e locationInWindow].y - NSMinY (kr)); } last_mouse_offset = kloc; - /* if knob, tell emacs a location offset by knob pos - (to indicate top of handle) */ - if (part == NSScrollerKnob) - pos = (loc - last_mouse_offset) / NSHeight (sr); - else - /* else this is a slot click on GNUstep: go straight there */ - pos = loc / NSHeight (sr); + if (part != NSScrollerKnob) + /* this is a slot click on GNUstep: go straight there */ + pos = loc; /* send a fake mouse-up to super to preempt modal -trackKnob: mode */ fake_event = [NSEvent mouseEventWithType: NSLeftMouseUp @@ -8435,6 +8438,19 @@ not_in_argv (NSString *arg) pressure: [e pressure]]; [super mouseUp: fake_event]; } + else + { + pos = 0; /* ignored */ + + /* set a timer to repeat, as we can't let superclass do this modally */ + scroll_repeat_entry + = [[NSTimer scheduledTimerWithTimeInterval: SCROLL_BAR_FIRST_DELAY + target: self + selector: @selector (repeatScroll:) + userInfo: 0 + repeats: YES] + retain]; + } if (part != NSScrollerKnob) [self sendScrollEventAtLoc: pos fromEvent: e]; @@ -8446,23 +8462,34 @@ not_in_argv (NSString *arg) { NSRect sr; double loc, pos; + int length; NSTRACE ("[EmacsScroller mouseDragged:]"); sr = [self convertRect: [self rectForPart: NSScrollerKnobSlot] toView: nil]; - loc = NSHeight (sr) - ([e locationInWindow].y - NSMinY (sr)); + + if (horizontal) + { + length = NSWidth (sr); + loc = ([e locationInWindow].x - NSMinX (sr)); + } + else + { + length = NSHeight (sr); + loc = length - ([e locationInWindow].y - NSMinY (sr)); + } if (loc <= 0.0) { loc = 0.0; } - else if (loc >= NSHeight (sr) + last_mouse_offset) + else if (loc >= length + last_mouse_offset) { - loc = NSHeight (sr) + last_mouse_offset; + loc = length + last_mouse_offset; } - pos = (loc - last_mouse_offset) / NSHeight (sr); + pos = (loc - last_mouse_offset); [self sendScrollEventAtLoc: pos fromEvent: e]; } diff --git a/src/print.c b/src/print.c index 2b53d7580b..83edbb6bfa 100644 --- a/src/print.c +++ b/src/print.c @@ -38,6 +38,10 @@ along with GNU Emacs. If not, see . */ #include #include +#ifdef WINDOWSNT +# include /* for F_DUPFD_CLOEXEC */ +#endif + struct terminal; /* Avoid actual stack overflow in print. */ @@ -775,15 +779,6 @@ debug_output_compilation_hack (bool x) print_output_debug_flag = x; } -#if defined (GNU_LINUX) - -/* This functionality is not vitally important in general, so we rely on - non-portable ability to use stderr as lvalue. */ - -#define WITH_REDIRECT_DEBUGGING_OUTPUT 1 - -static FILE *initial_stderr_stream = NULL; - DEFUN ("redirect-debugging-output", Fredirect_debugging_output, Sredirect_debugging_output, 1, 2, "FDebug output file: \nP", @@ -793,30 +788,38 @@ Optional arg APPEND non-nil (interactively, with prefix arg) means append to existing target file. */) (Lisp_Object file, Lisp_Object append) { - if (initial_stderr_stream != NULL) - { - block_input (); - fclose (stderr); - unblock_input (); - } - stderr = initial_stderr_stream; - initial_stderr_stream = NULL; + /* If equal to STDERR_FILENO, stderr has not been duplicated and is OK as-is. + Otherwise, this is a close-on-exec duplicate of the original stderr. */ + static int stderr_dup = STDERR_FILENO; + int fd = stderr_dup; - if (STRINGP (file)) + if (! NILP (file)) { file = Fexpand_file_name (file, Qnil); - initial_stderr_stream = stderr; - stderr = emacs_fopen (SSDATA (file), NILP (append) ? "w" : "a"); - if (stderr == NULL) + + if (stderr_dup == STDERR_FILENO) { - stderr = initial_stderr_stream; - initial_stderr_stream = NULL; - report_file_error ("Cannot open debugging output stream", file); + int n = fcntl (STDERR_FILENO, F_DUPFD_CLOEXEC, STDERR_FILENO + 1); + if (n < 0) + report_file_error ("dup", file); + stderr_dup = n; } + + fd = emacs_open (SSDATA (ENCODE_FILE (file)), + (O_WRONLY | O_CREAT + | (! NILP (append) ? O_APPEND : O_TRUNC)), + 0666); + if (fd < 0) + report_file_error ("Cannot open debugging output stream", file); } + + fflush (stderr); + if (dup2 (fd, STDERR_FILENO) < 0) + report_file_error ("dup2", file); + if (fd != stderr_dup) + emacs_close (fd); return Qnil; } -#endif /* GNU_LINUX */ /* This is the interface for debugging printing. */ @@ -2305,9 +2308,7 @@ priorities. */); defsubr (&Sprint); defsubr (&Sterpri); defsubr (&Swrite_char); -#ifdef WITH_REDIRECT_DEBUGGING_OUTPUT defsubr (&Sredirect_debugging_output); -#endif DEFSYM (Qprint_escape_newlines, "print-escape-newlines"); DEFSYM (Qprint_escape_multibyte, "print-escape-multibyte"); diff --git a/src/process.c b/src/process.c index 2c758a4c9a..9f2d379c33 100644 --- a/src/process.c +++ b/src/process.c @@ -75,11 +75,6 @@ along with GNU Emacs. If not, see . */ # include #endif -#ifdef HAVE_RES_INIT -#include -#include -#endif - #ifdef HAVE_UTIL_H #include #endif @@ -125,6 +120,11 @@ along with GNU Emacs. If not, see . */ #endif #endif +#if defined HAVE_GETADDRINFO_A || defined HAVE_GNUTLS +/* This is 0.1s in nanoseconds. */ +#define ASYNC_RETRY_NSEC 100000000 +#endif + #ifdef WINDOWSNT extern int sys_select (int, fd_set *, fd_set *, fd_set *, struct timespec *, void *); @@ -193,16 +193,6 @@ static EMACS_INT process_tick; /* Number of events for which the user or sentinel has been notified. */ static EMACS_INT update_tick; -/* Define NON_BLOCKING_CONNECT if we can support non-blocking connects. - The code can be simplified by assuming NON_BLOCKING_CONNECT once - Emacs starts assuming POSIX 1003.1-2001 or later. */ - -#if (defined HAVE_SELECT \ - && (defined GNU_LINUX || defined HAVE_GETPEERNAME) \ - && (defined EWOULDBLOCK || defined EINPROGRESS)) -# define NON_BLOCKING_CONNECT -#endif - /* Define DATAGRAM_SOCKETS if datagrams can be used safely on this system. We need to read full packets, so we need a "non-destructive" select. So we require either native select, @@ -262,7 +252,6 @@ static fd_set non_process_wait_mask; static fd_set write_mask; -#ifdef NON_BLOCKING_CONNECT /* Mask of bits indicating the descriptors that we wait for connect to complete on. Once they complete, they are removed from this mask and added to the input_wait_mask and non_keyboard_wait_mask. */ @@ -271,7 +260,6 @@ static fd_set connect_wait_mask; /* Number of bits set in connect_wait_mask. */ static int num_pending_connects; -#endif /* NON_BLOCKING_CONNECT */ /* The largest descriptor currently in use for a process object; -1 if none. */ static int max_process_desc; @@ -279,8 +267,15 @@ static int max_process_desc; /* The largest descriptor currently in use for input; -1 if none. */ static int max_input_desc; +/* Set the external socket descriptor for Emacs to use when + `make-network-process' is called with a non-nil + `:use-external-socket' option. The value should be either -1, or + the file descriptor of a socket that is already bound. */ +static int external_sock_fd; + /* Indexed by descriptor, gives the process (if any) for that descriptor. */ static Lisp_Object chan_process[FD_SETSIZE]; +static void wait_for_socket_fds (Lisp_Object, char const *); /* Alist of elements (NAME . PROCESS). */ static Lisp_Object Vprocess_alist; @@ -301,7 +296,7 @@ static struct coding_system *proc_encode_coding_system[FD_SETSIZE]; /* Table of `partner address' for datagram sockets. */ static struct sockaddr_and_len { struct sockaddr *sa; - int len; + ptrdiff_t len; } datagram_address[FD_SETSIZE]; #define DATAGRAM_CHAN_P(chan) (datagram_address[chan].sa != 0) #define DATAGRAM_CONN_P(proc) \ @@ -381,11 +376,6 @@ pset_sentinel (struct Lisp_Process *p, Lisp_Object val) p->sentinel = NILP (val) ? Qinternal_default_process_sentinel : val; } static void -pset_status (struct Lisp_Process *p, Lisp_Object val) -{ - p->status = val; -} -static void pset_tty_name (struct Lisp_Process *p, Lisp_Object val) { p->tty_name = val; @@ -691,12 +681,7 @@ allocate_process (void) static Lisp_Object make_process (Lisp_Object name) { - register Lisp_Object val, tem, name1; - register struct Lisp_Process *p; - char suffix[sizeof "<>" + INT_STRLEN_BOUND (printmax_t)]; - printmax_t i; - - p = allocate_process (); + struct Lisp_Process *p = allocate_process (); /* Initialize Lisp data. Note that allocate_process initializes all Lisp data to nil, so do it only for slots which should not be nil. */ pset_status (p, Qrun); @@ -706,26 +691,32 @@ make_process (Lisp_Object name) non-Lisp data, so do it only for slots which should not be zero. */ p->infd = -1; p->outfd = -1; - for (i = 0; i < PROCESS_OPEN_FDS; i++) + for (int i = 0; i < PROCESS_OPEN_FDS; i++) p->open_fd[i] = -1; #ifdef HAVE_GNUTLS p->gnutls_initstage = GNUTLS_STAGE_EMPTY; + p->gnutls_boot_parameters = Qnil; #endif /* If name is already in use, modify it until it is unused. */ - name1 = name; - for (i = 1; ; i++) + Lisp_Object name1 = name; + for (printmax_t i = 1; ; i++) { - tem = Fget_process (name1); - if (NILP (tem)) break; - name1 = concat2 (name, make_formatted_string (suffix, "<%"pMd">", i)); + Lisp_Object tem = Fget_process (name1); + if (NILP (tem)) + break; + char const suffix_fmt[] = "<%"pMd">"; + char suffix[sizeof suffix_fmt + INT_STRLEN_BOUND (printmax_t)]; + AUTO_STRING_WITH_LEN (lsuffix, suffix, sprintf (suffix, suffix_fmt, i)); + name1 = concat2 (name, lsuffix); } name = name1; pset_name (p, name); pset_sentinel (p, Qinternal_default_process_sentinel); pset_filter (p, Qinternal_default_process_filter); + Lisp_Object val; XSETPROCESS (val, p); Vprocess_alist = Fcons (Fcons (name, val), Vprocess_alist); return val; @@ -742,6 +733,19 @@ remove_process (register Lisp_Object proc) deactivate_process (proc); } +#ifdef HAVE_GETADDRINFO_A +static void +free_dns_request (Lisp_Object proc) +{ + struct Lisp_Process *p = XPROCESS (proc); + + if (p->dns_request->ar_result) + freeaddrinfo (p->dns_request->ar_result); + xfree (p->dns_request); + p->dns_request = NULL; +} +#endif + DEFUN ("processp", Fprocessp, Sprocessp, 1, 1, 0, doc: /* Return t if OBJECT is a process. */) @@ -832,6 +836,25 @@ nil, indicating the current buffer's process. */) process = get_process (process); p = XPROCESS (process); +#ifdef HAVE_GETADDRINFO_A + if (p->dns_request) + { + /* Cancel the request. Unless shutting down, wait until + completion. Free the request if completely canceled. */ + + bool canceled = gai_cancel (p->dns_request) != EAI_NOTCANCELED; + if (!canceled && !inhibit_sentinels) + { + struct gaicb const *req = p->dns_request; + while (gai_suspend (&req, 1, NULL) != 0) + continue; + canceled = true; + } + if (canceled) + free_dns_request (process); + } +#endif + p->raw_status_new = 0; if (NETCONN1_P (p) || SERIALCONN1_P (p) || PIPECONN1_P (p)) { @@ -1008,6 +1031,23 @@ DEFUN ("process-mark", Fprocess_mark, Sprocess_mark, return XPROCESS (process)->mark; } +static void +set_process_filter_masks (struct Lisp_Process *p) +{ + if (EQ (p->filter, Qt) && !EQ (p->status, Qlisten)) + { + FD_CLR (p->infd, &input_wait_mask); + FD_CLR (p->infd, &non_keyboard_wait_mask); + } + else if (EQ (p->filter, Qt) + /* Network or serial process not stopped: */ + && !EQ (p->command, Qt)) + { + FD_SET (p->infd, &input_wait_mask); + FD_SET (p->infd, &non_keyboard_wait_mask); + } +} + DEFUN ("set-process-filter", Fset_process_filter, Sset_process_filter, 2, 2, 0, doc: /* Give PROCESS the filter function FILTER; nil means default. @@ -1024,12 +1064,10 @@ The string argument is normally a multibyte string, except: - if `default-enable-multibyte-characters' is nil, it is a unibyte string (the result of converting the decoded input multibyte string to unibyte with `string-make-unibyte'). */) - (register Lisp_Object process, Lisp_Object filter) + (Lisp_Object process, Lisp_Object filter) { - struct Lisp_Process *p; - CHECK_PROCESS (process); - p = XPROCESS (process); + struct Lisp_Process *p = XPROCESS (process); /* Don't signal an error if the process's input file descriptor is closed. This could make debugging Lisp more difficult, @@ -1042,23 +1080,11 @@ The string argument is normally a multibyte string, except: if (NILP (filter)) filter = Qinternal_default_process_filter; + pset_filter (p, filter); + if (p->infd >= 0) - { - if (EQ (filter, Qt) && !EQ (p->status, Qlisten)) - { - FD_CLR (p->infd, &input_wait_mask); - FD_CLR (p->infd, &non_keyboard_wait_mask); - } - else if (EQ (p->filter, Qt) - /* Network or serial process not stopped: */ - && !EQ (p->command, Qt)) - { - FD_SET (p->infd, &input_wait_mask); - FD_SET (p->infd, &non_keyboard_wait_mask); - } - } + set_process_filter_masks (p); - pset_filter (p, filter); if (NETCONN1_P (p) || SERIALCONN1_P (p) || PIPECONN1_P (p)) pset_childp (p, Fplist_put (p->childp, QCfilter, filter)); setup_process_coding_systems (process); @@ -1117,7 +1143,8 @@ DEFUN ("set-process-window-size", Fset_process_window_size, CHECK_RANGED_INTEGER (height, 0, USHRT_MAX); CHECK_RANGED_INTEGER (width, 0, USHRT_MAX); - if (XPROCESS (process)->infd < 0 + if (NETCONN_P (process) + || XPROCESS (process)->infd < 0 || (set_window_size (XPROCESS (process)->infd, XINT (height), XINT (width)) < 0)) @@ -1185,8 +1212,10 @@ SERVICE) for a network connection or (PORT SPEED) for a serial connection. If KEY is t, the complete contact information for the connection is returned, else the specific value for the keyword KEY is returned. See `make-network-process' or `make-serial-process' for a -list of keywords. */) - (register Lisp_Object process, Lisp_Object key) +list of keywords. +If PROCESS is a non-blocking network process that hasn't been fully +set up yet, this function will block until socket setup has completed. */) + (Lisp_Object process, Lisp_Object key) { Lisp_Object contact; @@ -1194,6 +1223,10 @@ list of keywords. */) contact = XPROCESS (process)->childp; #ifdef DATAGRAM_SOCKETS + + if (NETCONN_P (process)) + wait_for_socket_fds (process, "process-contact"); + if (DATAGRAM_CONN_P (process) && (EQ (key, Qt) || EQ (key, QCremote))) contact = Fplist_put (contact, QCremote, @@ -1228,8 +1261,8 @@ DEFUN ("process-plist", Fprocess_plist, Sprocess_plist, DEFUN ("set-process-plist", Fset_process_plist, Sset_process_plist, 2, 2, 0, - doc: /* Replace the plist of PROCESS with PLIST. Returns PLIST. */) - (register Lisp_Object process, Lisp_Object plist) + doc: /* Replace the plist of PROCESS with PLIST. Return PLIST. */) + (Lisp_Object process, Lisp_Object plist) { CHECK_PROCESS (process); CHECK_LIST (plist); @@ -1269,7 +1302,7 @@ A 4 or 5 element vector represents an IPv4 address (with port number). An 8 or 9 element vector represents an IPv6 address (with port number). If optional second argument OMIT-PORT is non-nil, don't include a port number in the string, even when present in ADDRESS. -Returns nil if format of ADDRESS is invalid. */) +Return nil if format of ADDRESS is invalid. */) (Lisp_Object address, Lisp_Object omit_port) { if (NILP (address)) @@ -2217,12 +2250,12 @@ usage: (make-pipe-process &rest ARGS) */) The address family of sa is not included in the result. */ Lisp_Object -conv_sockaddr_to_lisp (struct sockaddr *sa, int len) +conv_sockaddr_to_lisp (struct sockaddr *sa, ptrdiff_t len) { Lisp_Object address; - int i; + ptrdiff_t i; unsigned char *cp; - register struct Lisp_Vector *p; + struct Lisp_Vector *p; /* Workaround for a bug in getsockname on BSD: Names bound to sockets in the UNIX domain are inaccessible; getsockname returns @@ -2297,10 +2330,10 @@ conv_sockaddr_to_lisp (struct sockaddr *sa, int len) /* Get family and required size for sockaddr structure to hold ADDRESS. */ -static int +static ptrdiff_t get_lisp_to_sockaddr_size (Lisp_Object address, int *familyp) { - register struct Lisp_Vector *p; + struct Lisp_Vector *p; if (VECTORP (address)) { @@ -2416,13 +2449,18 @@ conv_lisp_to_sockaddr (int family, Lisp_Object address, struct sockaddr *sa, int #ifdef DATAGRAM_SOCKETS DEFUN ("process-datagram-address", Fprocess_datagram_address, Sprocess_datagram_address, 1, 1, 0, - doc: /* Get the current datagram address associated with PROCESS. */) + doc: /* Get the current datagram address associated with PROCESS. +If PROCESS is a non-blocking network process that hasn't been fully +set up yet, this function will block until socket setup has completed. */) (Lisp_Object process) { int channel; CHECK_PROCESS (process); + if (NETCONN_P (process)) + wait_for_socket_fds (process, "process-datagram-address"); + if (!DATAGRAM_CONN_P (process)) return Qnil; @@ -2434,14 +2472,21 @@ DEFUN ("process-datagram-address", Fprocess_datagram_address, Sprocess_datagram_ DEFUN ("set-process-datagram-address", Fset_process_datagram_address, Sset_process_datagram_address, 2, 2, 0, doc: /* Set the datagram address for PROCESS to ADDRESS. -Returns nil upon error setting address, ADDRESS otherwise. */) +Return nil upon error setting address, ADDRESS otherwise. + +If PROCESS is a non-blocking network process that hasn't been fully +set up yet, this function will block until socket setup has completed. */) (Lisp_Object process, Lisp_Object address) { int channel; - int family, len; + int family; + ptrdiff_t len; CHECK_PROCESS (process); + if (NETCONN_P (process)) + wait_for_socket_fds (process, "set-process-datagram-address"); + if (!DATAGRAM_CONN_P (process)) return Qnil; @@ -2497,7 +2542,7 @@ static const struct socket_options { /* Set option OPT to value VAL on socket S. - Returns (1<infd; if (s < 0) error ("Process is not running"); @@ -2904,134 +2954,612 @@ usage: (make-serial-process &rest ARGS) */) return proc; } -/* Create a network stream/datagram client/server process. Treated - exactly like a normal process when reading and writing. Primary - differences are in status display and process deletion. A network - connection has no PID; you cannot signal it. All you can do is - stop/continue it and deactivate/close it via delete-process. */ +static void +set_network_socket_coding_system (Lisp_Object proc, Lisp_Object host, + Lisp_Object service, Lisp_Object name) +{ + Lisp_Object tem; + struct Lisp_Process *p = XPROCESS (proc); + Lisp_Object contact = p->childp; + Lisp_Object coding_systems = Qt; + Lisp_Object val; -DEFUN ("make-network-process", Fmake_network_process, Smake_network_process, - 0, MANY, 0, - doc: /* Create and return a network server or client process. + tem = Fplist_member (contact, QCcoding); + if (!NILP (tem) && (!CONSP (tem) || !CONSP (XCDR (tem)))) + tem = Qnil; /* No error message (too late!). */ -In Emacs, network connections are represented by process objects, so -input and output work as for subprocesses and `delete-process' closes -a network connection. However, a network process has no process id, -it cannot be signaled, and the status codes are different from normal -processes. + /* Setup coding systems for communicating with the network stream. */ + /* Qt denotes we have not yet called Ffind_operation_coding_system. */ -Arguments are specified as keyword/argument pairs. The following -arguments are defined: + if (!NILP (tem)) + { + val = XCAR (XCDR (tem)); + if (CONSP (val)) + val = XCAR (val); + } + else if (!NILP (Vcoding_system_for_read)) + val = Vcoding_system_for_read; + else if ((!NILP (p->buffer) + && NILP (BVAR (XBUFFER (p->buffer), enable_multibyte_characters))) + || (NILP (p->buffer) + && NILP (BVAR (&buffer_defaults, enable_multibyte_characters)))) + /* We dare not decode end-of-line format by setting VAL to + Qraw_text, because the existing Emacs Lisp libraries + assume that they receive bare code including a sequence of + CR LF. */ + val = Qnil; + else + { + if (NILP (host) || NILP (service)) + coding_systems = Qnil; + else + coding_systems = CALLN (Ffind_operation_coding_system, + Qopen_network_stream, name, p->buffer, + host, service); + if (CONSP (coding_systems)) + val = XCAR (coding_systems); + else if (CONSP (Vdefault_process_coding_system)) + val = XCAR (Vdefault_process_coding_system); + else + val = Qnil; + } + pset_decode_coding_system (p, val); -:name NAME -- NAME is name for process. It is modified if necessary -to make it unique. + if (!NILP (tem)) + { + val = XCAR (XCDR (tem)); + if (CONSP (val)) + val = XCDR (val); + } + else if (!NILP (Vcoding_system_for_write)) + val = Vcoding_system_for_write; + else if (NILP (BVAR (current_buffer, enable_multibyte_characters))) + val = Qnil; + else + { + if (EQ (coding_systems, Qt)) + { + if (NILP (host) || NILP (service)) + coding_systems = Qnil; + else + coding_systems = CALLN (Ffind_operation_coding_system, + Qopen_network_stream, name, p->buffer, + host, service); + } + if (CONSP (coding_systems)) + val = XCDR (coding_systems); + else if (CONSP (Vdefault_process_coding_system)) + val = XCDR (Vdefault_process_coding_system); + else + val = Qnil; + } + pset_encode_coding_system (p, val); -:buffer BUFFER -- BUFFER is the buffer (or buffer-name) to associate -with the process. Process output goes at end of that buffer, unless -you specify an output stream or filter function to handle the output. -BUFFER may be also nil, meaning that this process is not associated -with any buffer. + pset_decoding_buf (p, empty_unibyte_string); + p->decoding_carryover = 0; + pset_encoding_buf (p, empty_unibyte_string); -:host HOST -- HOST is name of the host to connect to, or its IP -address. The symbol `local' specifies the local host. If specified -for a server process, it must be a valid name or address for the local -host, and only clients connecting to that address will be accepted. + p->inherit_coding_system_flag + = !(!NILP (tem) || NILP (p->buffer) || !inherit_process_coding_system); +} -:service SERVICE -- SERVICE is name of the service desired, or an -integer specifying a port number to connect to. If SERVICE is t, -a random port number is selected for the server. (If Emacs was -compiled with getaddrinfo, a port number can also be specified as a -string, e.g. "80", as well as an integer. This is not portable.) +#ifdef HAVE_GNUTLS +static void +finish_after_tls_connection (Lisp_Object proc) +{ + struct Lisp_Process *p = XPROCESS (proc); + Lisp_Object contact = p->childp; + Lisp_Object result = Qt; -:type TYPE -- TYPE is the type of connection. The default (nil) is a -stream type connection, `datagram' creates a datagram type connection, -`seqpacket' creates a reliable datagram connection. + if (!NILP (Ffboundp (Qnsm_verify_connection))) + result = call3 (Qnsm_verify_connection, + proc, + Fplist_get (contact, QChost), + Fplist_get (contact, QCservice)); -:family FAMILY -- FAMILY is the address (and protocol) family for the -service specified by HOST and SERVICE. The default (nil) is to use -whatever address family (IPv4 or IPv6) that is defined for the host -and port number specified by HOST and SERVICE. Other address families -supported are: - local -- for a local (i.e. UNIX) address specified by SERVICE. - ipv4 -- use IPv4 address family only. - ipv6 -- use IPv6 address family only. + if (NILP (result)) + { + pset_status (p, list2 (Qfailed, + build_string ("The Network Security Manager stopped the connections"))); + deactivate_process (proc); + } + else + { + /* If we cleared the connection wait mask before we did + the TLS setup, then we have to say that the process + is finally "open" here. */ + if (! FD_ISSET (p->outfd, &connect_wait_mask)) + { + pset_status (p, Qrun); + /* Execute the sentinel here. If we had relied on + status_notify to do it later, it will read input + from the process before calling the sentinel. */ + exec_sentinel (proc, build_string ("open\n")); + } + } +} +#endif -:local ADDRESS -- ADDRESS is the local address used for the connection. -This parameter is ignored when opening a client process. When specified -for a server process, the FAMILY, HOST and SERVICE args are ignored. +static void +connect_network_socket (Lisp_Object proc, Lisp_Object ip_addresses, + Lisp_Object use_external_socket_p) +{ + ptrdiff_t count = SPECPDL_INDEX (); + ptrdiff_t count1; + int s = -1, outch, inch; + int xerrno = 0; + Lisp_Object ip_address; + int family; + struct sockaddr *sa = NULL; + int ret; + ptrdiff_t addrlen; + struct Lisp_Process *p = XPROCESS (proc); + Lisp_Object contact = p->childp; + int optbits = 0; + int socket_to_use = -1; -:remote ADDRESS -- ADDRESS is the remote partner's address for the -connection. This parameter is ignored when opening a stream server -process. For a datagram server process, it specifies the initial -setting of the remote datagram address. When specified for a client -process, the FAMILY, HOST, and SERVICE args are ignored. + if (!NILP (use_external_socket_p)) + { + socket_to_use = external_sock_fd; -The format of ADDRESS depends on the address family: -- An IPv4 address is represented as an vector of integers [A B C D P] -corresponding to numeric IP address A.B.C.D and port number P. -- A local address is represented as a string with the address in the -local address space. -- An "unsupported family" address is represented by a cons (F . AV) -where F is the family number and AV is a vector containing the socket -address data with one element per address data byte. Do not rely on -this format in portable code, as it may depend on implementation -defined constants, data sizes, and data structure alignment. + /* Ensure we don't consume the external socket twice. */ + external_sock_fd = -1; + } -:coding CODING -- If CODING is a symbol, it specifies the coding -system used for both reading and writing for this process. If CODING -is a cons (DECODING . ENCODING), DECODING is used for reading, and -ENCODING is used for writing. + /* Do this in case we never enter the while-loop below. */ + count1 = SPECPDL_INDEX (); + s = -1; -:nowait BOOL -- If BOOL is non-nil for a stream type client process, -return without waiting for the connection to complete; instead, the -sentinel function will be called with second arg matching "open" (if -successful) or "failed" when the connect completes. Default is to use -a blocking connect (i.e. wait) for stream type connections. + while (!NILP (ip_addresses)) + { + ip_address = XCAR (ip_addresses); + ip_addresses = XCDR (ip_addresses); -:noquery BOOL -- Query the user unless BOOL is non-nil, and process is -running when Emacs is exited. +#ifdef WINDOWSNT + retry_connect: +#endif -:stop BOOL -- Start process in the `stopped' state if BOOL non-nil. -In the stopped state, a server process does not accept new -connections, and a client process does not handle incoming traffic. -The stopped state is cleared by `continue-process' and set by -`stop-process'. + addrlen = get_lisp_to_sockaddr_size (ip_address, &family); + if (sa) + free (sa); + sa = xmalloc (addrlen); + conv_lisp_to_sockaddr (family, ip_address, sa, addrlen); -:filter FILTER -- Install FILTER as the process filter. + s = socket_to_use; + if (s < 0) + { + s = socket (family, p->socktype | SOCK_CLOEXEC, p->ai_protocol); + if (s < 0) + { + xerrno = errno; + continue; + } + } -:filter-multibyte BOOL -- If BOOL is non-nil, strings given to the -process filter are multibyte, otherwise they are unibyte. -If this keyword is not specified, the strings are multibyte if -the default value of `enable-multibyte-characters' is non-nil. +#ifdef DATAGRAM_SOCKETS + if (!p->is_server && p->socktype == SOCK_DGRAM) + break; +#endif /* DATAGRAM_SOCKETS */ -:sentinel SENTINEL -- Install SENTINEL as the process sentinel. + if (p->is_non_blocking_client) + { + ret = fcntl (s, F_SETFL, O_NONBLOCK); + if (ret < 0) + { + xerrno = errno; + emacs_close (s); + s = -1; + continue; + } + } -:log LOG -- Install LOG as the server process log function. This -function is called when the server accepts a network connection from a -client. The arguments are SERVER, CLIENT, and MESSAGE, where SERVER -is the server process, CLIENT is the new process for the connection, -and MESSAGE is a string. + /* Make us close S if quit. */ + record_unwind_protect_int (close_file_unwind, s); -:plist PLIST -- Install PLIST as the new process's initial plist. + /* Parse network options in the arg list. We simply ignore anything + which isn't a known option (including other keywords). An error + is signaled if setting a known option fails. */ + { + Lisp_Object params = contact, key, val; -:server QLEN -- if QLEN is non-nil, create a server process for the -specified FAMILY, SERVICE, and connection type (stream or datagram). -If QLEN is an integer, it is used as the max. length of the server's -pending connection queue (also known as the backlog); the default -queue length is 5. Default is to create a client process. + while (!NILP (params)) + { + key = XCAR (params); + params = XCDR (params); + val = XCAR (params); + params = XCDR (params); + optbits |= set_socket_option (s, key, val); + } + } -The following network options can be specified for this connection: + if (p->is_server) + { + /* Configure as a server socket. */ -:broadcast BOOL -- Allow send and receive of datagram broadcasts. -:dontroute BOOL -- Only send to directly connected hosts. -:keepalive BOOL -- Send keep-alive messages on network stream. -:linger BOOL or TIMEOUT -- Send queued messages before closing. + /* SO_REUSEADDR = 1 is default for server sockets; must specify + explicit :reuseaddr key to override this. */ +#ifdef HAVE_LOCAL_SOCKETS + if (family != AF_LOCAL) +#endif + if (!(optbits & (1 << OPIX_REUSEADDR))) + { + int optval = 1; + if (setsockopt (s, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof optval)) + report_file_error ("Cannot set reuse option on server socket", Qnil); + } + + /* If passed a socket descriptor, it should be already bound. */ + if (socket_to_use < 0 && bind (s, sa, addrlen) != 0) + report_file_error ("Cannot bind server socket", Qnil); + +#ifdef HAVE_GETSOCKNAME + if (p->port == 0) + { + struct sockaddr_in sa1; + socklen_t len1 = sizeof (sa1); + if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0) + { + Lisp_Object service; + service = make_number (ntohs (sa1.sin_port)); + contact = Fplist_put (contact, QCservice, service); + /* Save the port number so that we can stash it in + the process object later. */ + ((struct sockaddr_in *)sa)->sin_port = sa1.sin_port; + } + } +#endif + + if (p->socktype != SOCK_DGRAM && listen (s, p->backlog)) + report_file_error ("Cannot listen on server socket", Qnil); + + break; + } + + immediate_quit = 1; + QUIT; + + ret = connect (s, sa, addrlen); + xerrno = errno; + + if (ret == 0 || xerrno == EISCONN) + { + /* The unwind-protect will be discarded afterwards. + Likewise for immediate_quit. */ + break; + } + + if (p->is_non_blocking_client && xerrno == EINPROGRESS) + break; + +#ifndef WINDOWSNT + if (xerrno == EINTR) + { + /* Unlike most other syscalls connect() cannot be called + again. (That would return EALREADY.) The proper way to + wait for completion is pselect(). */ + int sc; + socklen_t len; + fd_set fdset; + retry_select: + FD_ZERO (&fdset); + FD_SET (s, &fdset); + QUIT; + sc = pselect (s + 1, NULL, &fdset, NULL, NULL, NULL); + if (sc == -1) + { + if (errno == EINTR) + goto retry_select; + else + report_file_error ("Failed select", Qnil); + } + eassert (sc > 0); + + len = sizeof xerrno; + eassert (FD_ISSET (s, &fdset)); + if (getsockopt (s, SOL_SOCKET, SO_ERROR, &xerrno, &len) < 0) + report_file_error ("Failed getsockopt", Qnil); + if (xerrno) + report_file_errno ("Failed connect", Qnil, xerrno); + break; + } +#endif /* !WINDOWSNT */ + + immediate_quit = 0; + + /* Discard the unwind protect closing S. */ + specpdl_ptr = specpdl + count1; + emacs_close (s); + s = -1; + +#ifdef WINDOWSNT + if (xerrno == EINTR) + goto retry_connect; +#endif + } + + if (s >= 0) + { +#ifdef DATAGRAM_SOCKETS + if (p->socktype == SOCK_DGRAM) + { + if (datagram_address[s].sa) + emacs_abort (); + + datagram_address[s].sa = xmalloc (addrlen); + datagram_address[s].len = addrlen; + if (p->is_server) + { + Lisp_Object remote; + memset (datagram_address[s].sa, 0, addrlen); + if (remote = Fplist_get (contact, QCremote), !NILP (remote)) + { + int rfamily; + ptrdiff_t rlen = get_lisp_to_sockaddr_size (remote, &rfamily); + if (rlen != 0 && rfamily == family + && rlen == addrlen) + conv_lisp_to_sockaddr (rfamily, remote, + datagram_address[s].sa, rlen); + } + } + else + memcpy (datagram_address[s].sa, sa, addrlen); + } +#endif + + contact = Fplist_put (contact, p->is_server? QClocal: QCremote, + conv_sockaddr_to_lisp (sa, addrlen)); +#ifdef HAVE_GETSOCKNAME + if (!p->is_server) + { + struct sockaddr_in sa1; + socklen_t len1 = sizeof (sa1); + if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0) + contact = Fplist_put (contact, QClocal, + conv_sockaddr_to_lisp ((struct sockaddr *)&sa1, len1)); + } +#endif + } + + immediate_quit = 0; + + if (s < 0) + { + /* If non-blocking got this far - and failed - assume non-blocking is + not supported after all. This is probably a wrong assumption, but + the normal blocking calls to open-network-stream handles this error + better. */ + if (p->is_non_blocking_client) + return; + + report_file_errno ((p->is_server + ? "make server process failed" + : "make client process failed"), + contact, xerrno); + } + + inch = s; + outch = s; + + chan_process[inch] = proc; + + fcntl (inch, F_SETFL, O_NONBLOCK); + + p = XPROCESS (proc); + p->open_fd[SUBPROCESS_STDIN] = inch; + p->infd = inch; + p->outfd = outch; + + /* Discard the unwind protect for closing S, if any. */ + specpdl_ptr = specpdl + count1; + + /* Unwind bind_polling_period and request_sigio. */ + unbind_to (count, Qnil); + + if (p->is_server && p->socktype != SOCK_DGRAM) + pset_status (p, Qlisten); + + /* Make the process marker point into the process buffer (if any). */ + if (BUFFERP (p->buffer)) + set_marker_both (p->mark, p->buffer, + BUF_ZV (XBUFFER (p->buffer)), + BUF_ZV_BYTE (XBUFFER (p->buffer))); + + if (p->is_non_blocking_client) + { + /* We may get here if connect did succeed immediately. However, + in that case, we still need to signal this like a non-blocking + connection. */ + pset_status (p, Qconnect); + if (!FD_ISSET (inch, &connect_wait_mask)) + { + FD_SET (inch, &connect_wait_mask); + FD_SET (inch, &write_mask); + num_pending_connects++; + } + } + else + /* A server may have a client filter setting of Qt, but it must + still listen for incoming connects unless it is stopped. */ + if ((!EQ (p->filter, Qt) && !EQ (p->command, Qt)) + || (EQ (p->status, Qlisten) && NILP (p->command))) + { + FD_SET (inch, &input_wait_mask); + FD_SET (inch, &non_keyboard_wait_mask); + } + + if (inch > max_process_desc) + max_process_desc = inch; + + /* Set up the masks based on the process filter. */ + set_process_filter_masks (p); + + setup_process_coding_systems (proc); + +#ifdef HAVE_GNUTLS + /* Continue the asynchronous connection. */ + if (!NILP (p->gnutls_boot_parameters)) + { + Lisp_Object boot, params = p->gnutls_boot_parameters; + + boot = Fgnutls_boot (proc, XCAR (params), XCDR (params)); + p->gnutls_boot_parameters = Qnil; + + if (p->gnutls_initstage == GNUTLS_STAGE_READY) + /* Run sentinels, etc. */ + finish_after_tls_connection (proc); + else if (p->gnutls_initstage != GNUTLS_STAGE_HANDSHAKE_TRIED) + { + deactivate_process (proc); + if (NILP (boot)) + pset_status (p, list2 (Qfailed, + build_string ("TLS negotiation failed"))); + else + pset_status (p, list2 (Qfailed, boot)); + } + } +#endif + +} + +/* Create a network stream/datagram client/server process. Treated + exactly like a normal process when reading and writing. Primary + differences are in status display and process deletion. A network + connection has no PID; you cannot signal it. All you can do is + stop/continue it and deactivate/close it via delete-process. */ + +DEFUN ("make-network-process", Fmake_network_process, Smake_network_process, + 0, MANY, 0, + doc: /* Create and return a network server or client process. + +In Emacs, network connections are represented by process objects, so +input and output work as for subprocesses and `delete-process' closes +a network connection. However, a network process has no process id, +it cannot be signaled, and the status codes are different from normal +processes. + +Arguments are specified as keyword/argument pairs. The following +arguments are defined: + +:name NAME -- NAME is name for process. It is modified if necessary +to make it unique. + +:buffer BUFFER -- BUFFER is the buffer (or buffer-name) to associate +with the process. Process output goes at end of that buffer, unless +you specify an output stream or filter function to handle the output. +BUFFER may be also nil, meaning that this process is not associated +with any buffer. + +:host HOST -- HOST is name of the host to connect to, or its IP +address. The symbol `local' specifies the local host. If specified +for a server process, it must be a valid name or address for the local +host, and only clients connecting to that address will be accepted. + +:service SERVICE -- SERVICE is name of the service desired, or an +integer specifying a port number to connect to. If SERVICE is t, +a random port number is selected for the server. A port number can +be specified as an integer string, e.g., "80", as well as an integer. + +:type TYPE -- TYPE is the type of connection. The default (nil) is a +stream type connection, `datagram' creates a datagram type connection, +`seqpacket' creates a reliable datagram connection. + +:family FAMILY -- FAMILY is the address (and protocol) family for the +service specified by HOST and SERVICE. The default (nil) is to use +whatever address family (IPv4 or IPv6) that is defined for the host +and port number specified by HOST and SERVICE. Other address families +supported are: + local -- for a local (i.e. UNIX) address specified by SERVICE. + ipv4 -- use IPv4 address family only. + ipv6 -- use IPv6 address family only. + +:local ADDRESS -- ADDRESS is the local address used for the connection. +This parameter is ignored when opening a client process. When specified +for a server process, the FAMILY, HOST and SERVICE args are ignored. + +:remote ADDRESS -- ADDRESS is the remote partner's address for the +connection. This parameter is ignored when opening a stream server +process. For a datagram server process, it specifies the initial +setting of the remote datagram address. When specified for a client +process, the FAMILY, HOST, and SERVICE args are ignored. + +The format of ADDRESS depends on the address family: +- An IPv4 address is represented as an vector of integers [A B C D P] +corresponding to numeric IP address A.B.C.D and port number P. +- A local address is represented as a string with the address in the +local address space. +- An "unsupported family" address is represented by a cons (F . AV) +where F is the family number and AV is a vector containing the socket +address data with one element per address data byte. Do not rely on +this format in portable code, as it may depend on implementation +defined constants, data sizes, and data structure alignment. + +:coding CODING -- If CODING is a symbol, it specifies the coding +system used for both reading and writing for this process. If CODING +is a cons (DECODING . ENCODING), DECODING is used for reading, and +ENCODING is used for writing. + +:nowait BOOL -- If NOWAIT is non-nil for a stream type client +process, return without waiting for the connection to complete; +instead, the sentinel function will be called with second arg matching +"open" (if successful) or "failed" when the connect completes. +Default is to use a blocking connect (i.e. wait) for stream type +connections. + +:noquery BOOL -- Query the user unless BOOL is non-nil, and process is +running when Emacs is exited. + +:stop BOOL -- Start process in the `stopped' state if BOOL non-nil. +In the stopped state, a server process does not accept new +connections, and a client process does not handle incoming traffic. +The stopped state is cleared by `continue-process' and set by +`stop-process'. + +:filter FILTER -- Install FILTER as the process filter. + +:filter-multibyte BOOL -- If BOOL is non-nil, strings given to the +process filter are multibyte, otherwise they are unibyte. +If this keyword is not specified, the strings are multibyte if +the default value of `enable-multibyte-characters' is non-nil. + +:sentinel SENTINEL -- Install SENTINEL as the process sentinel. + +:log LOG -- Install LOG as the server process log function. This +function is called when the server accepts a network connection from a +client. The arguments are SERVER, CLIENT, and MESSAGE, where SERVER +is the server process, CLIENT is the new process for the connection, +and MESSAGE is a string. + +:plist PLIST -- Install PLIST as the new process's initial plist. + +:tls-parameters LIST -- is a list that should be supplied if you're +opening a TLS connection. The first element is the TLS type (either +`gnutls-x509pki' or `gnutls-anon'), and the remaining elements should +be a keyword list accepted by gnutls-boot (as returned by +`gnutls-boot-parameters'). + +:server QLEN -- if QLEN is non-nil, create a server process for the +specified FAMILY, SERVICE, and connection type (stream or datagram). +If QLEN is an integer, it is used as the max. length of the server's +pending connection queue (also known as the backlog); the default +queue length is 5. Default is to create a client process. + +The following network options can be specified for this connection: + +:broadcast BOOL -- Allow send and receive of datagram broadcasts. +:dontroute BOOL -- Only send to directly connected hosts. +:keepalive BOOL -- Send keep-alive messages on network stream. +:linger BOOL or TIMEOUT -- Send queued messages before closing. :oobinline BOOL -- Place out-of-band data in receive data stream. :priority INT -- Set protocol defined priority for sent packets. :reuseaddr BOOL -- Allow reusing a recently used local address (this is allowed by default for a server process). :bindtodevice NAME -- bind to interface NAME. Using this may require special privileges on some systems. +:use-external-socket BOOL -- Use any pre-allocated sockets that have + been passed to Emacs. If Emacs wasn't + passed a socket, this option is silently + ignored. + Consult the relevant system programmer's manual pages for more information on using these options. @@ -3067,41 +3595,24 @@ usage: (make-network-process &rest ARGS) */) Lisp_Object proc; Lisp_Object contact; struct Lisp_Process *p; -#ifdef HAVE_GETADDRINFO - struct addrinfo ai, *res, *lres; - struct addrinfo hints; const char *portstring; - char portbuf[128]; -#else /* HAVE_GETADDRINFO */ - struct _emacs_addrinfo - { - int ai_family; - int ai_socktype; - int ai_protocol; - int ai_addrlen; - struct sockaddr *ai_addr; - struct _emacs_addrinfo *ai_next; - } ai, *res, *lres; -#endif /* HAVE_GETADDRINFO */ - struct sockaddr_in address_in; + ptrdiff_t portstringlen ATTRIBUTE_UNUSED; + char portbuf[INT_BUFSIZE_BOUND (EMACS_INT)]; #ifdef HAVE_LOCAL_SOCKETS struct sockaddr_un address_un; #endif - int port; - int ret = 0; - int xerrno = 0; - int s = -1, outch, inch; - ptrdiff_t count = SPECPDL_INDEX (); - ptrdiff_t count1; - Lisp_Object colon_address; /* Either QClocal or QCremote. */ + EMACS_INT port = 0; Lisp_Object tem; Lisp_Object name, buffer, host, service, address; - Lisp_Object filter, sentinel; - bool is_non_blocking_client = 0; - bool is_server = 0; - int backlog = 5; + Lisp_Object filter, sentinel, use_external_socket_p; + Lisp_Object ip_addresses = Qnil; int socktype; int family = -1; + int ai_protocol = 0; +#ifdef HAVE_GETADDRINFO_A + struct gaicb *dns_request = NULL; +#endif + ptrdiff_t count = SPECPDL_INDEX (); if (nargs == 0) return Qnil; @@ -3129,55 +3640,28 @@ usage: (make-network-process &rest ARGS) */) else error ("Unsupported connection type"); - /* :server BOOL */ - tem = Fplist_get (contact, QCserver); - if (!NILP (tem)) - { - /* Don't support network sockets when non-blocking mode is - not available, since a blocked Emacs is not useful. */ - is_server = 1; - if (TYPE_RANGED_INTEGERP (int, tem)) - backlog = XINT (tem); - } - - /* Make colon_address an alias for :local (server) or :remote (client). */ - colon_address = is_server ? QClocal : QCremote; - - /* :nowait BOOL */ - if (!is_server && socktype != SOCK_DGRAM - && (tem = Fplist_get (contact, QCnowait), !NILP (tem))) - { -#ifndef NON_BLOCKING_CONNECT - error ("Non-blocking connect not supported"); -#else - is_non_blocking_client = 1; -#endif - } - name = Fplist_get (contact, QCname); buffer = Fplist_get (contact, QCbuffer); filter = Fplist_get (contact, QCfilter); sentinel = Fplist_get (contact, QCsentinel); + use_external_socket_p = Fplist_get (contact, QCuse_external_socket); CHECK_STRING (name); - /* Initialize addrinfo structure in case we don't use getaddrinfo. */ - ai.ai_socktype = socktype; - ai.ai_protocol = 0; - ai.ai_next = NULL; - res = &ai; - /* :local ADDRESS or :remote ADDRESS */ - address = Fplist_get (contact, colon_address); + tem = Fplist_get (contact, QCserver); + if (!NILP (tem)) + address = Fplist_get (contact, QCremote); + else + address = Fplist_get (contact, QClocal); if (!NILP (address)) { host = service = Qnil; - if (!(ai.ai_addrlen = get_lisp_to_sockaddr_size (address, &family))) + if (!get_lisp_to_sockaddr_size (address, &family)) error ("Malformed :address"); - ai.ai_family = family; - ai.ai_addr = alloca (ai.ai_addrlen); - conv_lisp_to_sockaddr (family, address, ai.ai_addr, ai.ai_addrlen); + + ip_addresses = list1 (address); goto open_socket; } @@ -3185,7 +3669,7 @@ usage: (make-network-process &rest ARGS) */) tem = Fplist_get (contact, QCfamily); if (NILP (tem)) { -#if defined (HAVE_GETADDRINFO) && defined (AF_INET6) +#ifdef AF_INET6 family = AF_UNSPEC; #else family = AF_INET; @@ -3206,14 +3690,21 @@ usage: (make-network-process &rest ARGS) */) else error ("Unknown address family"); - ai.ai_family = family; - /* :service SERVICE -- string, integer (port number), or t (random port). */ service = Fplist_get (contact, QCservice); /* :host HOST -- hostname, ip address, or 'local for localhost. */ host = Fplist_get (contact, QChost); - if (!NILP (host)) + if (NILP (host)) + { + /* The "connection" function gets it bind info from the address we're + given, so use this dummy address if nothing is specified. */ +#ifdef HAVE_LOCAL_SOCKETS + if (family != AF_LOCAL) +#endif + host = build_string ("127.0.0.1"); + } + else { if (EQ (host, Qlocal)) /* Depending on setup, "localhost" may map to different IPv4 and/or @@ -3232,13 +3723,9 @@ usage: (make-network-process &rest ARGS) */) host = Qnil; } CHECK_STRING (service); - memset (&address_un, 0, sizeof address_un); - address_un.sun_family = AF_LOCAL; if (sizeof address_un.sun_path <= SBYTES (service)) error ("Service name too long"); - lispstpcpy (address_un.sun_path, service); - ai.ai_addr = (struct sockaddr *) &address_un; - ai.ai_addrlen = sizeof address_un; + ip_addresses = list1 (service); goto open_socket; } #endif @@ -3254,359 +3741,147 @@ usage: (make-network-process &rest ARGS) */) } #endif -#ifdef HAVE_GETADDRINFO - /* If we have a host, use getaddrinfo to resolve both host and service. - Otherwise, use getservbyname to lookup the service. */ if (!NILP (host)) { - /* SERVICE can either be a string or int. Convert to a C string for later use by getaddrinfo. */ if (EQ (service, Qt)) - portstring = "0"; + { + portstring = "0"; + portstringlen = 1; + } else if (INTEGERP (service)) { - sprintf (portbuf, "%"pI"d", XINT (service)); portstring = portbuf; + portstringlen = sprintf (portbuf, "%"pI"d", XINT (service)); } else { CHECK_STRING (service); portstring = SSDATA (service); + portstringlen = SBYTES (service); } + } - immediate_quit = 1; - QUIT; - memset (&hints, 0, sizeof (hints)); - hints.ai_flags = 0; - hints.ai_family = family; - hints.ai_socktype = socktype; - hints.ai_protocol = 0; - -#ifdef HAVE_RES_INIT - res_init (); -#endif - - ret = getaddrinfo (SSDATA (host), portstring, &hints, &res); +#ifdef HAVE_GETADDRINFO_A + if (!NILP (host) && !NILP (Fplist_get (contact, QCnowait))) + { + ptrdiff_t hostlen = SBYTES (host); + struct req + { + struct gaicb gaicb; + struct addrinfo hints; + char str[FLEXIBLE_ARRAY_MEMBER]; + } *req = xmalloc (offsetof (struct req, str) + + hostlen + 1 + portstringlen + 1); + dns_request = &req->gaicb; + dns_request->ar_name = req->str; + dns_request->ar_service = req->str + hostlen + 1; + dns_request->ar_request = &req->hints; + dns_request->ar_result = NULL; + memset (&req->hints, 0, sizeof req->hints); + req->hints.ai_family = family; + req->hints.ai_socktype = socktype; + strcpy (req->str, SSDATA (host)); + strcpy (req->str + hostlen + 1, portstring); + + int ret = getaddrinfo_a (GAI_NOWAIT, &dns_request, 1, NULL); if (ret) -#ifdef HAVE_GAI_STRERROR - error ("%s/%s %s", SSDATA (host), portstring, gai_strerror (ret)); -#else - error ("%s/%s getaddrinfo error %d", SSDATA (host), portstring, ret); -#endif - immediate_quit = 0; + error ("%s/%s getaddrinfo_a error %d", SSDATA (host), portstring, ret); goto open_socket; } -#endif /* HAVE_GETADDRINFO */ - - /* We end up here if getaddrinfo is not defined, or in case no hostname - has been specified (e.g. for a local server process). */ - - if (EQ (service, Qt)) - port = 0; - else if (INTEGERP (service)) - port = htons ((unsigned short) XINT (service)); - else - { - struct servent *svc_info; - CHECK_STRING (service); - svc_info = getservbyname (SSDATA (service), - (socktype == SOCK_DGRAM ? "udp" : "tcp")); - if (svc_info == 0) - error ("Unknown service: %s", SDATA (service)); - port = svc_info->s_port; - } +#endif /* HAVE_GETADDRINFO_A */ - memset (&address_in, 0, sizeof address_in); - address_in.sin_family = family; - address_in.sin_addr.s_addr = INADDR_ANY; - address_in.sin_port = port; + /* If we have a host, use getaddrinfo to resolve both host and service. + Otherwise, use getservbyname to lookup the service. */ -#ifndef HAVE_GETADDRINFO if (!NILP (host)) { - struct hostent *host_info_ptr; - - /* gethostbyname may fail with TRY_AGAIN, but we don't honor that, - as it may `hang' Emacs for a very long time. */ - immediate_quit = 1; - QUIT; - -#ifdef HAVE_RES_INIT - res_init (); -#endif - - host_info_ptr = gethostbyname (SDATA (host)); - immediate_quit = 0; - - if (host_info_ptr) - { - memcpy (&address_in.sin_addr, host_info_ptr->h_addr, - host_info_ptr->h_length); - family = host_info_ptr->h_addrtype; - address_in.sin_family = family; - } - else - /* Attempt to interpret host as numeric inet address. */ - { - unsigned long numeric_addr; - numeric_addr = inet_addr (SSDATA (host)); - if (numeric_addr == -1) - error ("Unknown host \"%s\"", SDATA (host)); - - memcpy (&address_in.sin_addr, &numeric_addr, - sizeof (address_in.sin_addr)); - } - - } -#endif /* not HAVE_GETADDRINFO */ - - ai.ai_family = family; - ai.ai_addr = (struct sockaddr *) &address_in; - ai.ai_addrlen = sizeof address_in; - - open_socket: - - /* Do this in case we never enter the for-loop below. */ - count1 = SPECPDL_INDEX (); - s = -1; - - for (lres = res; lres; lres = lres->ai_next) - { - ptrdiff_t optn; - int optbits; - -#ifdef WINDOWSNT - retry_connect: -#endif - - s = socket (lres->ai_family, lres->ai_socktype | SOCK_CLOEXEC, - lres->ai_protocol); - if (s < 0) - { - xerrno = errno; - continue; - } - -#ifdef DATAGRAM_SOCKETS - if (!is_server && socktype == SOCK_DGRAM) - break; -#endif /* DATAGRAM_SOCKETS */ - -#ifdef NON_BLOCKING_CONNECT - if (is_non_blocking_client) - { - ret = fcntl (s, F_SETFL, O_NONBLOCK); - if (ret < 0) - { - xerrno = errno; - emacs_close (s); - s = -1; - continue; - } - } -#endif - - /* Make us close S if quit. */ - record_unwind_protect_int (close_file_unwind, s); - - /* Parse network options in the arg list. - We simply ignore anything which isn't a known option (including other keywords). - An error is signaled if setting a known option fails. */ - for (optn = optbits = 0; optn < nargs - 1; optn += 2) - optbits |= set_socket_option (s, args[optn], args[optn + 1]); - - if (is_server) - { - /* Configure as a server socket. */ - - /* SO_REUSEADDR = 1 is default for server sockets; must specify - explicit :reuseaddr key to override this. */ -#ifdef HAVE_LOCAL_SOCKETS - if (family != AF_LOCAL) -#endif - if (!(optbits & (1 << OPIX_REUSEADDR))) - { - int optval = 1; - if (setsockopt (s, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof optval)) - report_file_error ("Cannot set reuse option on server socket", Qnil); - } - - if (bind (s, lres->ai_addr, lres->ai_addrlen)) - report_file_error ("Cannot bind server socket", Qnil); - -#ifdef HAVE_GETSOCKNAME - if (EQ (service, Qt)) - { - struct sockaddr_in sa1; - socklen_t len1 = sizeof (sa1); - if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0) - { - ((struct sockaddr_in *)(lres->ai_addr))->sin_port = sa1.sin_port; - service = make_number (ntohs (sa1.sin_port)); - contact = Fplist_put (contact, QCservice, service); - } - } -#endif - - if (socktype != SOCK_DGRAM && listen (s, backlog)) - report_file_error ("Cannot listen on server socket", Qnil); - - break; - } + struct addrinfo *res, *lres; + int ret; immediate_quit = 1; QUIT; - ret = connect (s, lres->ai_addr, lres->ai_addrlen); - xerrno = errno; + struct addrinfo hints; + memset (&hints, 0, sizeof hints); + hints.ai_family = family; + hints.ai_socktype = socktype; - if (ret == 0 || xerrno == EISCONN) + ret = getaddrinfo (SSDATA (host), portstring, &hints, &res); + if (ret) +#ifdef HAVE_GAI_STRERROR { - /* The unwind-protect will be discarded afterwards. - Likewise for immediate_quit. */ - break; + synchronize_system_messages_locale (); + char const *str = gai_strerror (ret); + if (! NILP (Vlocale_coding_system)) + str = SSDATA (code_convert_string_norecord + (build_string (str), Vlocale_coding_system, 0)); + error ("%s/%s %s", SSDATA (host), portstring, str); } - -#ifdef NON_BLOCKING_CONNECT -#ifdef EINPROGRESS - if (is_non_blocking_client && xerrno == EINPROGRESS) - break; #else -#ifdef EWOULDBLOCK - if (is_non_blocking_client && xerrno == EWOULDBLOCK) - break; -#endif -#endif + error ("%s/%s getaddrinfo error %d", SSDATA (host), portstring, ret); #endif + immediate_quit = 0; -#ifndef WINDOWSNT - if (xerrno == EINTR) + for (lres = res; lres; lres = lres->ai_next) { - /* Unlike most other syscalls connect() cannot be called - again. (That would return EALREADY.) The proper way to - wait for completion is pselect(). */ - int sc; - socklen_t len; - fd_set fdset; - retry_select: - FD_ZERO (&fdset); - FD_SET (s, &fdset); - QUIT; - sc = pselect (s + 1, NULL, &fdset, NULL, NULL, NULL); - if (sc == -1) - { - if (errno == EINTR) - goto retry_select; - else - report_file_error ("Failed select", Qnil); - } - eassert (sc > 0); - - len = sizeof xerrno; - eassert (FD_ISSET (s, &fdset)); - if (getsockopt (s, SOL_SOCKET, SO_ERROR, &xerrno, &len) < 0) - report_file_error ("Failed getsockopt", Qnil); - if (xerrno) - report_file_errno ("Failed connect", Qnil, xerrno); - break; + ip_addresses = Fcons (conv_sockaddr_to_lisp + (lres->ai_addr, lres->ai_addrlen), + ip_addresses); + ai_protocol = lres->ai_protocol; } -#endif /* !WINDOWSNT */ - immediate_quit = 0; + ip_addresses = Fnreverse (ip_addresses); - /* Discard the unwind protect closing S. */ - specpdl_ptr = specpdl + count1; - emacs_close (s); - s = -1; + freeaddrinfo (res); -#ifdef WINDOWSNT - if (xerrno == EINTR) - goto retry_connect; -#endif + goto open_socket; } - if (s >= 0) + /* No hostname has been specified (e.g., a local server process). */ + + if (EQ (service, Qt)) + port = 0; + else if (INTEGERP (service)) + port = XINT (service); + else { -#ifdef DATAGRAM_SOCKETS - if (socktype == SOCK_DGRAM) + CHECK_STRING (service); + + port = -1; + if (SBYTES (service) != 0) { - if (datagram_address[s].sa) - emacs_abort (); - datagram_address[s].sa = xmalloc (lres->ai_addrlen); - datagram_address[s].len = lres->ai_addrlen; - if (is_server) + /* Allow the service to be a string containing the port number, + because that's allowed if you have getaddrbyname. */ + char *service_end; + long int lport = strtol (SSDATA (service), &service_end, 10); + if (service_end == SSDATA (service) + SBYTES (service)) + port = lport; + else { - Lisp_Object remote; - memset (datagram_address[s].sa, 0, lres->ai_addrlen); - if (remote = Fplist_get (contact, QCremote), !NILP (remote)) - { - int rfamily, rlen; - rlen = get_lisp_to_sockaddr_size (remote, &rfamily); - if (rlen != 0 && rfamily == lres->ai_family - && rlen == lres->ai_addrlen) - conv_lisp_to_sockaddr (rfamily, remote, - datagram_address[s].sa, rlen); - } + struct servent *svc_info + = getservbyname (SSDATA (service), + socktype == SOCK_DGRAM ? "udp" : "tcp"); + if (svc_info) + port = ntohs (svc_info->s_port); } - else - memcpy (datagram_address[s].sa, lres->ai_addr, lres->ai_addrlen); - } -#endif - contact = Fplist_put (contact, colon_address, - conv_sockaddr_to_lisp (lres->ai_addr, lres->ai_addrlen)); -#ifdef HAVE_GETSOCKNAME - if (!is_server) - { - struct sockaddr_in sa1; - socklen_t len1 = sizeof (sa1); - if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0) - contact = Fplist_put (contact, QClocal, - conv_sockaddr_to_lisp ((struct sockaddr *)&sa1, len1)); } -#endif - } - - immediate_quit = 0; - -#ifdef HAVE_GETADDRINFO - if (res != &ai) - { - block_input (); - freeaddrinfo (res); - unblock_input (); } -#endif - - if (s < 0) - { - /* If non-blocking got this far - and failed - assume non-blocking is - not supported after all. This is probably a wrong assumption, but - the normal blocking calls to open-network-stream handles this error - better. */ - if (is_non_blocking_client) - return Qnil; - report_file_errno ((is_server - ? "make server process failed" - : "make client process failed"), - contact, xerrno); + if (! (0 <= port && port < 1 << 16)) + { + AUTO_STRING (unknown_service, "Unknown service: %s"); + xsignal1 (Qerror, CALLN (Fformat, unknown_service, service)); } - inch = s; - outch = s; + open_socket: if (!NILP (buffer)) buffer = Fget_buffer_create (buffer); proc = make_process (name); - - chan_process[inch] = proc; - - fcntl (inch, F_SETFL, O_NONBLOCK); - p = XPROCESS (proc); - pset_childp (p, contact); pset_plist (p, Fcopy_sequence (Fplist_get (contact, QCplist))); pset_type (p, Qnetwork); @@ -3620,135 +3895,53 @@ usage: (make-network-process &rest ARGS) */) if ((tem = Fplist_get (contact, QCstop), !NILP (tem))) pset_command (p, Qt); p->pid = 0; + p->backlog = 5; + p->is_non_blocking_client = false; + p->is_server = false; + p->port = port; + p->socktype = socktype; + p->ai_protocol = ai_protocol; +#ifdef HAVE_GETADDRINFO_A + p->dns_request = NULL; +#endif +#ifdef HAVE_GNUTLS + tem = Fplist_get (contact, QCtls_parameters); + CHECK_LIST (tem); + p->gnutls_boot_parameters = tem; +#endif - p->open_fd[SUBPROCESS_STDIN] = inch; - p->infd = inch; - p->outfd = outch; - - /* Discard the unwind protect for closing S, if any. */ - specpdl_ptr = specpdl + count1; + set_network_socket_coding_system (proc, service, host, name); - /* Unwind bind_polling_period and request_sigio. */ unbind_to (count, Qnil); - if (is_server && socktype != SOCK_DGRAM) - pset_status (p, Qlisten); - - /* Make the process marker point into the process buffer (if any). */ - if (BUFFERP (buffer)) - set_marker_both (p->mark, buffer, - BUF_ZV (XBUFFER (buffer)), - BUF_ZV_BYTE (XBUFFER (buffer))); + /* :server BOOL */ + tem = Fplist_get (contact, QCserver); + if (!NILP (tem)) + { + /* Don't support network sockets when non-blocking mode is + not available, since a blocked Emacs is not useful. */ + p->is_server = true; + if (TYPE_RANGED_INTEGERP (int, tem)) + p->backlog = XINT (tem); + } -#ifdef NON_BLOCKING_CONNECT - if (is_non_blocking_client) + /* :nowait BOOL */ + if (!p->is_server && socktype != SOCK_DGRAM + && !NILP (Fplist_get (contact, QCnowait))) + p->is_non_blocking_client = true; + +#ifdef HAVE_GETADDRINFO_A + /* With async address resolution, the list of addresses is empty, so + postpone connecting to the server. */ + if (!p->is_server && NILP (ip_addresses)) { - /* We may get here if connect did succeed immediately. However, - in that case, we still need to signal this like a non-blocking - connection. */ - pset_status (p, Qconnect); - if (!FD_ISSET (inch, &connect_wait_mask)) - { - FD_SET (inch, &connect_wait_mask); - FD_SET (inch, &write_mask); - num_pending_connects++; - } + p->dns_request = dns_request; + p->status = Qconnect; + return proc; } - else #endif - /* A server may have a client filter setting of Qt, but it must - still listen for incoming connects unless it is stopped. */ - if ((!EQ (p->filter, Qt) && !EQ (p->command, Qt)) - || (EQ (p->status, Qlisten) && NILP (p->command))) - { - FD_SET (inch, &input_wait_mask); - FD_SET (inch, &non_keyboard_wait_mask); - } - - if (inch > max_process_desc) - max_process_desc = inch; - - tem = Fplist_member (contact, QCcoding); - if (!NILP (tem) && (!CONSP (tem) || !CONSP (XCDR (tem)))) - tem = Qnil; /* No error message (too late!). */ - - { - /* Setup coding systems for communicating with the network stream. */ - /* Qt denotes we have not yet called Ffind_operation_coding_system. */ - Lisp_Object coding_systems = Qt; - Lisp_Object val; - - if (!NILP (tem)) - { - val = XCAR (XCDR (tem)); - if (CONSP (val)) - val = XCAR (val); - } - else if (!NILP (Vcoding_system_for_read)) - val = Vcoding_system_for_read; - else if ((!NILP (buffer) && NILP (BVAR (XBUFFER (buffer), enable_multibyte_characters))) - || (NILP (buffer) && NILP (BVAR (&buffer_defaults, enable_multibyte_characters)))) - /* We dare not decode end-of-line format by setting VAL to - Qraw_text, because the existing Emacs Lisp libraries - assume that they receive bare code including a sequence of - CR LF. */ - val = Qnil; - else - { - if (NILP (host) || NILP (service)) - coding_systems = Qnil; - else - coding_systems = CALLN (Ffind_operation_coding_system, - Qopen_network_stream, name, buffer, - host, service); - if (CONSP (coding_systems)) - val = XCAR (coding_systems); - else if (CONSP (Vdefault_process_coding_system)) - val = XCAR (Vdefault_process_coding_system); - else - val = Qnil; - } - pset_decode_coding_system (p, val); - - if (!NILP (tem)) - { - val = XCAR (XCDR (tem)); - if (CONSP (val)) - val = XCDR (val); - } - else if (!NILP (Vcoding_system_for_write)) - val = Vcoding_system_for_write; - else if (NILP (BVAR (current_buffer, enable_multibyte_characters))) - val = Qnil; - else - { - if (EQ (coding_systems, Qt)) - { - if (NILP (host) || NILP (service)) - coding_systems = Qnil; - else - coding_systems = CALLN (Ffind_operation_coding_system, - Qopen_network_stream, name, buffer, - host, service); - } - if (CONSP (coding_systems)) - val = XCDR (coding_systems); - else if (CONSP (Vdefault_process_coding_system)) - val = XCDR (Vdefault_process_coding_system); - else - val = Qnil; - } - pset_encode_coding_system (p, val); - } - setup_process_coding_systems (proc); - - pset_decoding_buf (p, empty_unibyte_string); - p->decoding_carryover = 0; - pset_encoding_buf (p, empty_unibyte_string); - - p->inherit_coding_system_flag - = !(!NILP (tem) || NILP (buffer) || !inherit_process_coding_system); + connect_network_socket (proc, ip_addresses, use_external_socket_p); return proc; } @@ -4128,7 +4321,6 @@ deactivate_process (Lisp_Object proc) chan_process[inchannel] = Qnil; FD_CLR (inchannel, &input_wait_mask); FD_CLR (inchannel, &non_keyboard_wait_mask); -#ifdef NON_BLOCKING_CONNECT if (FD_ISSET (inchannel, &connect_wait_mask)) { FD_CLR (inchannel, &connect_wait_mask); @@ -4136,7 +4328,6 @@ deactivate_process (Lisp_Object proc) if (--num_pending_connects < 0) emacs_abort (); } -#endif if (inchannel == max_process_desc) { /* We just closed the highest-numbered process input descriptor, @@ -4440,6 +4631,91 @@ server_accept_connection (Lisp_Object server, int channel) exec_sentinel (proc, concat3 (open_from, host_string, nl)); } +#ifdef HAVE_GETADDRINFO_A +static Lisp_Object +check_for_dns (Lisp_Object proc) +{ + struct Lisp_Process *p = XPROCESS (proc); + Lisp_Object ip_addresses = Qnil; + + /* Sanity check. */ + if (! p->dns_request) + return Qnil; + + int ret = gai_error (p->dns_request); + if (ret == EAI_INPROGRESS) + return Qt; + + /* We got a response. */ + if (ret == 0) + { + struct addrinfo *res; + + for (res = p->dns_request->ar_result; res; res = res->ai_next) + { + ip_addresses = Fcons (conv_sockaddr_to_lisp + (res->ai_addr, res->ai_addrlen), + ip_addresses); + } + + ip_addresses = Fnreverse (ip_addresses); + } + /* The DNS lookup failed. */ + else if (EQ (p->status, Qconnect)) + { + deactivate_process (proc); + pset_status (p, (list2 + (Qfailed, + concat3 (build_string ("Name lookup of "), + build_string (p->dns_request->ar_name), + build_string (" failed"))))); + } + + free_dns_request (proc); + + /* This process should not already be connected (or killed). */ + if (!EQ (p->status, Qconnect)) + return Qnil; + + return ip_addresses; +} + +#endif /* HAVE_GETADDRINFO_A */ + +static void +wait_for_socket_fds (Lisp_Object process, char const *name) +{ + while (XPROCESS (process)->infd < 0 + && EQ (XPROCESS (process)->status, Qconnect)) + { + add_to_log ("Waiting for socket from %s...", build_string (name)); + wait_reading_process_output (0, 20 * 1000 * 1000, 0, 0, Qnil, NULL, 0); + } +} + +static void +wait_while_connecting (Lisp_Object process) +{ + while (EQ (XPROCESS (process)->status, Qconnect)) + { + add_to_log ("Waiting for connection..."); + wait_reading_process_output (0, 20 * 1000 * 1000, 0, 0, Qnil, NULL, 0); + } +} + +static void +wait_for_tls_negotiation (Lisp_Object process) +{ +#ifdef HAVE_GNUTLS + while (XPROCESS (process)->gnutls_p + && XPROCESS (process)->gnutls_initstage != GNUTLS_STAGE_READY) + { + add_to_log ("Waiting for TLS..."); + wait_reading_process_output (0, 20 * 1000 * 1000, 0, 0, Qnil, NULL, 0); + } +#endif +} + /* This variable is different from waiting_for_input in keyboard.c. It is used to communicate to a lisp process-filter/sentinel (via the function Fwaiting_for_user_input_p below) whether Emacs was waiting @@ -4518,6 +4794,9 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, struct timespec got_output_end_time = invalid_timespec (); enum { MINIMUM = -1, TIMEOUT, INFINITY } wait; int got_some_output = -1; +#if defined HAVE_GETADDRINFO_A || defined HAVE_GNUTLS + bool retry_for_async; +#endif ptrdiff_t count = SPECPDL_INDEX (); /* Close to the current time if known, an invalid timespec otherwise. */ @@ -4565,6 +4844,60 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell))) break; +#if defined HAVE_GETADDRINFO_A || defined HAVE_GNUTLS + { + Lisp_Object process_list_head, aproc; + struct Lisp_Process *p; + + retry_for_async = false; + FOR_EACH_PROCESS(process_list_head, aproc) + { + p = XPROCESS (aproc); + + if (! wait_proc || p == wait_proc) + { +#ifdef HAVE_GETADDRINFO_A + /* Check for pending DNS requests. */ + if (p->dns_request) + { + Lisp_Object ip_addresses = check_for_dns (aproc); + if (!NILP (ip_addresses) && !EQ (ip_addresses, Qt)) + connect_network_socket (aproc, ip_addresses, Qnil); + else + retry_for_async = true; + } +#endif +#ifdef HAVE_GNUTLS + /* Continue TLS negotiation. */ + if (p->gnutls_initstage == GNUTLS_STAGE_HANDSHAKE_TRIED + && p->is_non_blocking_client) + { + gnutls_try_handshake (p); + p->gnutls_handshakes_tried++; + + if (p->gnutls_initstage == GNUTLS_STAGE_READY) + { + gnutls_verify_boot (aproc, Qnil); + finish_after_tls_connection (aproc); + } + else + { + retry_for_async = true; + if (p->gnutls_handshakes_tried + > GNUTLS_EMACS_HANDSHAKES_LIMIT) + { + deactivate_process (aproc); + pset_status (p, list2 (Qfailed, + build_string ("TLS negotiation failed"))); + } + } + } +#endif + } + } + } +#endif /* GETADDRINFO_A or GNUTLS */ + /* Compute time from now till when time limit is up. */ /* Exit if already run out. */ if (wait == TIMEOUT) @@ -4647,11 +4980,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, timeout = make_timespec (0, 0); if ((pselect (max (max_process_desc, max_input_desc) + 1, &Atemp, -#ifdef NON_BLOCKING_CONNECT (num_pending_connects > 0 ? &Ctemp : NULL), -#else - NULL, -#endif NULL, &timeout, NULL) <= 0)) { @@ -4823,6 +5152,15 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, if (timeout.tv_sec > 0 || timeout.tv_nsec > 0) now = invalid_timespec (); +#if defined HAVE_GETADDRINFO_A || defined HAVE_GNUTLS + if (retry_for_async + && (timeout.tv_sec > 0 || timeout.tv_nsec > ASYNC_RETRY_NSEC)) + { + timeout.tv_sec = 0; + timeout.tv_nsec = ASYNC_RETRY_NSEC; + } +#endif + #if defined (HAVE_NS) nfds = ns_select #elif defined (HAVE_GLIB) @@ -5134,7 +5472,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, list2 (Qexit, make_number (256))); } } -#ifdef NON_BLOCKING_CONNECT if (FD_ISSET (channel, &Writeok) && FD_ISSET (channel, &connect_wait_mask)) { @@ -5184,11 +5521,21 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, } else { - pset_status (p, Qrun); - /* Execute the sentinel here. If we had relied on - status_notify to do it later, it will read input - from the process before calling the sentinel. */ - exec_sentinel (proc, build_string ("open\n")); +#ifdef HAVE_GNUTLS + /* If we have an incompletely set up TLS connection, + then defer the sentinel signaling until + later. */ + if (NILP (p->gnutls_boot_parameters) + && !p->gnutls_p) +#endif + { + pset_status (p, Qrun); + /* Execute the sentinel here. If we had relied on + status_notify to do it later, it will read input + from the process before calling the sentinel. */ + exec_sentinel (proc, build_string ("open\n")); + } + if (0 <= p->infd && !EQ (p->filter, Qt) && !EQ (p->command, Qt)) { @@ -5197,7 +5544,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, } } } -#endif /* NON_BLOCKING_CONNECT */ } /* End for each file descriptor. */ } /* End while exit conditions not met. */ @@ -5645,6 +5991,12 @@ send_process (Lisp_Object proc, const char *buf, ptrdiff_t len, ssize_t rv; struct coding_system *coding; + if (NETCONN_P (proc)) + { + wait_while_connecting (proc); + wait_for_tls_negotiation (proc); + } + if (p->raw_status_new) update_status (p); if (! EQ (p->status, Qrun)) @@ -5862,7 +6214,10 @@ nil, indicating the current buffer's process. Called from program, takes three arguments, PROCESS, START and END. If the region is more than 500 characters long, it is sent in several bunches. This may happen even for shorter regions. -Output from processes can arrive in between bunches. */) +Output from processes can arrive in between bunches. + +If PROCESS is a non-blocking network process that hasn't been fully +set up yet, this function will block until socket setup has completed. */) (Lisp_Object process, Lisp_Object start, Lisp_Object end) { Lisp_Object proc = get_process (process); @@ -5876,6 +6231,9 @@ Output from processes can arrive in between bunches. */) if (XINT (start) < GPT && XINT (end) > GPT) move_gap_both (XINT (start), start_byte); + if (NETCONN_P (proc)) + wait_while_connecting (proc); + send_process (proc, (char *) BYTE_POS_ADDR (start_byte), end_byte - start_byte, Fcurrent_buffer ()); @@ -5889,12 +6247,14 @@ PROCESS may be a process, a buffer, the name of a process or buffer, or nil, indicating the current buffer's process. If STRING is more than 500 characters long, it is sent in several bunches. This may happen even for shorter strings. -Output from processes can arrive in between bunches. */) +Output from processes can arrive in between bunches. + +If PROCESS is a non-blocking network process that hasn't been fully +set up yet, this function will block until socket setup has completed. */) (Lisp_Object process, Lisp_Object string) { - Lisp_Object proc; CHECK_STRING (string); - proc = get_process (process); + Lisp_Object proc = get_process (process); send_process (proc, SSDATA (string), SBYTES (string), string); return Qnil; @@ -5936,12 +6296,8 @@ process group. */) { /* Initialize in case ioctl doesn't exist or gives an error, in a way that will cause returning t. */ - pid_t gid; - Lisp_Object proc; - struct Lisp_Process *p; - - proc = get_process (process); - p = XPROCESS (proc); + Lisp_Object proc = get_process (process); + struct Lisp_Process *p = XPROCESS (proc); if (!EQ (p->type, Qreal)) error ("Process %s is not a subprocess", @@ -5950,7 +6306,7 @@ process group. */) error ("Process %s is not active", SDATA (p->name)); - gid = emacs_get_tty_pgrp (p); + pid_t gid = emacs_get_tty_pgrp (p); if (gid == p->pid) return Qnil; @@ -6021,7 +6377,7 @@ process_send_signal (Lisp_Object process, int signo, Lisp_Object current_group, break; case SIGTSTP: -#if defined (VSWTCH) && !defined (PREFER_VSUSP) +#ifdef VSWTCH sig_char = &t.c_cc[VSWTCH]; #else sig_char = &t.c_cc[VSUSP]; @@ -6309,10 +6665,15 @@ process has been transmitted to the serial port. */) struct coding_system *coding = NULL; int outfd; - if (DATAGRAM_CONN_P (process)) + proc = get_process (process); + + if (NETCONN_P (proc)) + wait_while_connecting (proc); + + if (DATAGRAM_CONN_P (proc)) return process; - proc = get_process (process); + outfd = XPROCESS (proc)->outfd; if (outfd >= 0) coding = proc_encode_coding_system[outfd]; @@ -6757,22 +7118,24 @@ DEFUN ("set-process-coding-system", Fset_process_coding_system, Sset_process_coding_system, 1, 3, 0, doc: /* Set coding systems of PROCESS to DECODING and ENCODING. DECODING will be used to decode subprocess output and ENCODING to -encode subprocess input. */) - (register Lisp_Object process, Lisp_Object decoding, Lisp_Object encoding) +encode subprocess input. */) + (Lisp_Object process, Lisp_Object decoding, Lisp_Object encoding) { - register struct Lisp_Process *p; - CHECK_PROCESS (process); - p = XPROCESS (process); - if (p->infd < 0) - error ("Input file descriptor of %s closed", SDATA (p->name)); - if (p->outfd < 0) - error ("Output file descriptor of %s closed", SDATA (p->name)); + + struct Lisp_Process *p = XPROCESS (process); + Fcheck_coding_system (decoding); Fcheck_coding_system (encoding); encoding = coding_inherit_eol_type (encoding, Qnil); pset_decode_coding_system (p, decoding); pset_encode_coding_system (p, encoding); + + /* If the sockets haven't been set up yet, the final setup part of + this will be called asynchronously. */ + if (p->infd < 0 || p->outfd < 0) + return Qnil; + setup_process_coding_systems (process); return Qnil; @@ -6797,13 +7160,18 @@ all character code conversion except for end-of-line conversion is suppressed. */) (Lisp_Object process, Lisp_Object flag) { - register struct Lisp_Process *p; - CHECK_PROCESS (process); - p = XPROCESS (process); + + struct Lisp_Process *p = XPROCESS (process); if (NILP (flag)) pset_decode_coding_system (p, raw_text_coding_system (p->decode_coding_system)); + + /* If the sockets haven't been set up yet, the final setup part of + this will be called asynchronously. */ + if (p->infd < 0 || p->outfd < 0) + return Qnil; + setup_process_coding_systems (process); return Qnil; @@ -6814,14 +7182,11 @@ DEFUN ("process-filter-multibyte-p", Fprocess_filter_multibyte_p, doc: /* Return t if a multibyte string is given to PROCESS's filter.*/) (Lisp_Object process) { - register struct Lisp_Process *p; - struct coding_system *coding; - CHECK_PROCESS (process); - p = XPROCESS (process); + struct Lisp_Process *p = XPROCESS (process); if (p->infd < 0) return Qnil; - coding = proc_decode_coding_system[p->infd]; + struct coding_system *coding = proc_decode_coding_system[p->infd]; return (CODING_FOR_UNIBYTE (coding) ? Qnil : Qt); } @@ -7375,10 +7740,10 @@ catch_child_signal (void) /* This is not called "init_process" because that is the name of a Mach system call, so it would cause problems on Darwin systems. */ void -init_process_emacs (void) +init_process_emacs (int sockfd) { #ifdef subprocesses - register int i; + int i; inhibit_sentinels = 0; @@ -7401,12 +7766,11 @@ init_process_emacs (void) FD_ZERO (&non_process_wait_mask); FD_ZERO (&write_mask); max_process_desc = max_input_desc = -1; + external_sock_fd = sockfd; memset (fd_callback_info, 0, sizeof (fd_callback_info)); -#ifdef NON_BLOCKING_CONNECT FD_ZERO (&connect_wait_mask); num_pending_connects = 0; -#endif process_output_delay_count = 0; process_output_skip = 0; @@ -7501,6 +7865,9 @@ syms_of_process (void) DEFSYM (QCserver, ":server"); DEFSYM (QCnowait, ":nowait"); DEFSYM (QCsentinel, ":sentinel"); + DEFSYM (QCuse_external_socket, ":use-external-socket"); + DEFSYM (QCtls_parameters, ":tls-parameters"); + DEFSYM (Qnsm_verify_connection, "nsm-verify-connection"); DEFSYM (QClog, ":log"); DEFSYM (QCnoquery, ":noquery"); DEFSYM (QCstop, ":stop"); @@ -7650,9 +8017,7 @@ The variable takes effect when `start-process' is called. */); #define ADD_SUBFEATURE(key, val) \ subfeatures = pure_cons (pure_cons (key, pure_cons (val, Qnil)), subfeatures) -#ifdef NON_BLOCKING_CONNECT ADD_SUBFEATURE (QCnowait, Qt); -#endif #ifdef DATAGRAM_SOCKETS ADD_SUBFEATURE (QCtype, Qdatagram); #endif diff --git a/src/process.h b/src/process.h index 2e743a3dc3..20593f5e8f 100644 --- a/src/process.h +++ b/src/process.h @@ -106,6 +106,7 @@ struct Lisp_Process #ifdef HAVE_GNUTLS Lisp_Object gnutls_cred_type; + Lisp_Object gnutls_boot_parameters; #endif /* Pipe process attached to the standard error of this process. */ @@ -161,7 +162,25 @@ struct Lisp_Process flag indicates that `raw_status' contains a new status that still needs to be synced to `status'. */ bool_bf raw_status_new : 1; + /* Whether this is a nonblocking socket. */ + bool_bf is_non_blocking_client : 1; + /* Whether this is a server or a client socket. */ + bool_bf is_server : 1; int raw_status; + /* The length of the socket backlog. */ + int backlog; + /* The port number. */ + int port; + /* The socket type. */ + int socktype; + /* The socket protocol. */ + int ai_protocol; + +#ifdef HAVE_GETADDRINFO_A + /* Whether the socket is waiting for response from an asynchronous + DNS call. */ + struct gaicb *dns_request; +#endif #ifdef HAVE_GNUTLS gnutls_initstage_t gnutls_initstage; @@ -174,6 +193,7 @@ struct Lisp_Process int gnutls_log_level; int gnutls_handshakes_tried; bool_bf gnutls_p : 1; + bool_bf gnutls_complete_negotiation_p : 1; #endif }; @@ -191,6 +211,12 @@ pset_childp (struct Lisp_Process *p, Lisp_Object val) p->childp = val; } +INLINE void +pset_status (struct Lisp_Process *p, Lisp_Object val) +{ + p->status = val; +} + #ifdef HAVE_GNUTLS INLINE void pset_gnutls_cred_type (struct Lisp_Process *p, Lisp_Object val) @@ -225,7 +251,7 @@ extern Lisp_Object system_process_attributes (Lisp_Object); extern void record_deleted_pid (pid_t, Lisp_Object); struct sockaddr; -extern Lisp_Object conv_sockaddr_to_lisp (struct sockaddr *, int); +extern Lisp_Object conv_sockaddr_to_lisp (struct sockaddr *, ptrdiff_t); extern void hold_keyboard_input (void); extern void unhold_keyboard_input (void); extern bool kbd_on_hold_p (void); diff --git a/src/profiler.c b/src/profiler.c index 31bd77f00e..844c1f21ca 100644 --- a/src/profiler.c +++ b/src/profiler.c @@ -224,7 +224,7 @@ static EMACS_INT current_sampling_interval; static void handle_profiler_signal (int signal) { - if (EQ (backtrace_top_function (), Qautomatic_gc)) + if (EQ (backtrace_top_function (), QAutomatic_GC)) /* Special case the time-count inside GC because the hash-table code is not prepared to be used while the GC is running. More specifically it uses ASIZE at many places where it does @@ -418,7 +418,7 @@ Before returning, a new log is allocated for future samples. */) cpu_log = (profiler_cpu_running ? make_log (profiler_log_size, profiler_max_stack_depth) : Qnil); - Fputhash (Fmake_vector (make_number (1), Qautomatic_gc), + Fputhash (Fmake_vector (make_number (1), QAutomatic_GC), make_number (cpu_gc_count), result); cpu_gc_count = 0; diff --git a/src/ralloc.c b/src/ralloc.c index a94f81b5bf..071cee777e 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -22,31 +22,15 @@ along with GNU Emacs. If not, see . */ rather than all of them. This means allowing for a possible hole between the first bloc and the end of malloc storage. */ -#ifdef emacs - #include -#include "lisp.h" /* Needed for VALBITS. */ -#include "blockinput.h" - -#include - -#ifdef DOUG_LEA_MALLOC -#define M_TOP_PAD -2 -extern int mallopt (int, int); -#else /* not DOUG_LEA_MALLOC */ -#if !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC -extern size_t __malloc_extra_blocks; -#endif /* not SYSTEM_MALLOC and not HYBRID_MALLOC */ -#endif /* not DOUG_LEA_MALLOC */ - -#else /* not emacs */ - #include -#include - -#endif /* not emacs */ +#ifdef emacs +# include "lisp.h" +# include "blockinput.h" +# include +#endif #include "getpagesize.h" @@ -95,7 +79,9 @@ static int extra_bytes; /* The hook `malloc' uses for the function which gets more space from the system. */ -#if !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC +#ifdef HAVE_MALLOC_H +# include +#else extern void *(*__morecore) (ptrdiff_t); #endif diff --git a/src/regex.c b/src/regex.c index 164eb4612a..af379367be 100644 --- a/src/regex.c +++ b/src/regex.c @@ -215,7 +215,7 @@ xmalloc (size_t size) void *val = malloc (size); if (!val && size) { - write (2, "virtual memory exhausted\n", 25); + write (STDERR_FILENO, "virtual memory exhausted\n", 25); exit (1); } return val; @@ -233,7 +233,7 @@ xrealloc (void *block, size_t size) val = realloc (block, size); if (!val && size) { - write (2, "virtual memory exhausted\n", 25); + write (STDERR_FILENO, "virtual memory exhausted\n", 25); exit (1); } return val; @@ -5140,8 +5140,6 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1, if (p == pend) { - ptrdiff_t dcnt; - /* End of pattern means we might have succeeded. */ DEBUG_PRINT ("end of pattern ... "); @@ -5149,19 +5147,22 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1, longest match, try backtracking. */ if (d != end_match_2) { - /* 1 if this match ends in the same string (string1 or string2) - as the best previous match. */ - boolean same_str_p = (FIRST_STRING_P (match_end) - == FIRST_STRING_P (d)); - /* 1 if this match is the best seen so far. */ - boolean best_match_p; - - /* AIX compiler got confused when this was combined - with the previous declaration. */ - if (same_str_p) - best_match_p = d > match_end; - else - best_match_p = !FIRST_STRING_P (d); + /* True if this match is the best seen so far. */ + bool best_match_p; + + { + /* True if this match ends in the same string (string1 + or string2) as the best previous match. */ + bool same_str_p = (FIRST_STRING_P (match_end) + == FIRST_STRING_P (d)); + + /* AIX compiler got confused when this was combined + with the previous declaration. */ + if (same_str_p) + best_match_p = d > match_end; + else + best_match_p = !FIRST_STRING_P (d); + } DEBUG_PRINT ("backtracking.\n"); @@ -5290,7 +5291,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1, nfailure_points_pushed - nfailure_points_popped); DEBUG_PRINT ("%u registers pushed.\n", num_regs_pushed); - dcnt = POINTER_TO_OFFSET (d) - pos; + ptrdiff_t dcnt = POINTER_TO_OFFSET (d) - pos; DEBUG_PRINT ("Returning %td from re_match_2.\n", dcnt); diff --git a/src/sheap.c b/src/sheap.c index fc53c5822d..72b74fa355 100644 --- a/src/sheap.c +++ b/src/sheap.c @@ -19,87 +19,62 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ #include + +#include "sheap.h" + #include #include "lisp.h" #include #include /* for exit */ -#ifdef ENABLE_CHECKING -#define STATIC_HEAP_SIZE (28 * 1024 * 1024) -#else -#define STATIC_HEAP_SIZE (19 * 1024 * 1024) -#endif - -int debug_sheap = 0; - -#define BLOCKSIZE 4096 +static int debug_sheap; char bss_sbrk_buffer[STATIC_HEAP_SIZE]; -/* The following is needed in gmalloc.c */ -void *bss_sbrk_buffer_end = bss_sbrk_buffer + STATIC_HEAP_SIZE; -char *bss_sbrk_ptr; char *max_bss_sbrk_ptr; -int bss_sbrk_did_unexec; +bool bss_sbrk_did_unexec; void * bss_sbrk (ptrdiff_t request_size) { + static char *bss_sbrk_ptr; + if (!bss_sbrk_ptr) { max_bss_sbrk_ptr = bss_sbrk_ptr = bss_sbrk_buffer; #ifdef CYGWIN - sbrk (BLOCKSIZE); /* force space for fork to work */ + /* Force space for fork to work. */ + sbrk (4096); #endif } - if (!(int) request_size) - { - return (bss_sbrk_ptr); - } - else if (bss_sbrk_ptr + (int) request_size < bss_sbrk_buffer) + int used = bss_sbrk_ptr - bss_sbrk_buffer; + + if (request_size < -used) { - printf - ("attempt to free too much: avail %d used %d failed request %d\n", - STATIC_HEAP_SIZE, bss_sbrk_ptr - bss_sbrk_buffer, - (int) request_size); + printf (("attempt to free too much: " + "avail %d used %d failed request %"pD"d\n"), + STATIC_HEAP_SIZE, used, request_size); exit (-1); return 0; } - else if (bss_sbrk_ptr + (int) request_size > - bss_sbrk_buffer + STATIC_HEAP_SIZE) + else if (STATIC_HEAP_SIZE - used < request_size) { - printf ("static heap exhausted: avail %d used %d failed request %d\n", - STATIC_HEAP_SIZE, - bss_sbrk_ptr - bss_sbrk_buffer, (int) request_size); + printf ("static heap exhausted: avail %d used %d failed request %"pD"d\n", + STATIC_HEAP_SIZE, used, request_size); exit (-1); return 0; } - else if ((int) request_size < 0) - { - bss_sbrk_ptr += (int) request_size; - if (debug_sheap) - printf ("freed size %d\n", request_size); - return bss_sbrk_ptr; - } - else + + void *ret = bss_sbrk_ptr; + bss_sbrk_ptr += request_size; + if (max_bss_sbrk_ptr < bss_sbrk_ptr) + max_bss_sbrk_ptr = bss_sbrk_ptr; + if (debug_sheap) { - char *ret = bss_sbrk_ptr; - if (debug_sheap) - printf ("allocated 0x%08x size %d\n", ret, request_size); - bss_sbrk_ptr += (int) request_size; - if (bss_sbrk_ptr > max_bss_sbrk_ptr) - max_bss_sbrk_ptr = bss_sbrk_ptr; - return ret; + if (request_size < 0) + printf ("freed size %"pD"d\n", request_size); + else + printf ("allocated %p size %"pD"d\n", ret, request_size); } -} - -void -report_sheap_usage (int die_if_pure_storage_exceeded) -{ - char buf[200]; - sprintf (buf, "Maximum static heap usage: %d of %d bytes", - max_bss_sbrk_ptr - bss_sbrk_buffer, STATIC_HEAP_SIZE); - /* Don't log messages, cause at this point, we're not allowed to create - buffers. */ - message1_nolog (buf); + return ret; } diff --git a/src/sheap.h b/src/sheap.h new file mode 100644 index 0000000000..c229a1b06e --- /dev/null +++ b/src/sheap.h @@ -0,0 +1,31 @@ +/* Static heap allocation for GNU Emacs. + +Copyright 2016 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see . */ + +#include +#include "lisp.h" + +/* Size of the static heap. Guess a value that is probably too large, + by up to a factor of four or so. Typically the unused part is not + paged in and so does not cost much. */ +enum { STATIC_HEAP_SIZE = sizeof (Lisp_Object) << 22 }; + +extern char bss_sbrk_buffer[STATIC_HEAP_SIZE]; +extern char *max_bss_sbrk_ptr; +extern bool bss_sbrk_did_unexec; +extern void *bss_sbrk (ptrdiff_t); diff --git a/src/syntax.c b/src/syntax.c index 8e14bf3fb1..fc8c666cec 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -81,6 +81,11 @@ SYNTAX_FLAGS_COMEND_SECOND (int flags) return (flags >> 19) & 1; } static bool +SYNTAX_FLAGS_COMSTARTEND_FIRST (int flags) +{ + return (flags & 0x50000) != 0; +} +static bool SYNTAX_FLAGS_PREFIX (int flags) { return (flags >> 20) & 1; @@ -153,6 +158,10 @@ struct lisp_parse_state ptrdiff_t comstr_start; /* Position of last comment/string starter. */ Lisp_Object levelstarts; /* Char numbers of starts-of-expression of levels (starting from outermost). */ + int prev_syntax; /* Syntax of previous position scanned, when + that position (potentially) holds the first char + of a 2-char construct, i.e. comment delimiter + or Sescape, etc. Smax otherwise. */ }; /* These variables are a cache for finding the start of a defun. @@ -176,7 +185,8 @@ static Lisp_Object skip_syntaxes (bool, Lisp_Object, Lisp_Object); static Lisp_Object scan_lists (EMACS_INT, EMACS_INT, EMACS_INT, bool); static void scan_sexps_forward (struct lisp_parse_state *, ptrdiff_t, ptrdiff_t, ptrdiff_t, EMACS_INT, - bool, Lisp_Object, int); + bool, int); +static void internalize_parse_state (Lisp_Object, struct lisp_parse_state *); static bool in_classes (int, Lisp_Object); static void parse_sexp_propertize (ptrdiff_t charpos); @@ -911,10 +921,11 @@ back_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop, } do { + internalize_parse_state (Qnil, &state); scan_sexps_forward (&state, defun_start, defun_start_byte, comment_end, TYPE_MINIMUM (EMACS_INT), - 0, Qnil, 0); + 0, 0); defun_start = comment_end; if (!adjusted) { @@ -2310,11 +2321,15 @@ in_classes (int c, Lisp_Object iso_classes) PREV_SYNTAX is the SYNTAX_WITH_FLAGS of the previous character (or 0 If the search cannot start in the middle of a two-character). - If successful, return true and store the charpos of the comment's end - into *CHARPOS_PTR and the corresponding bytepos into *BYTEPOS_PTR. - Else, return false and store the charpos STOP into *CHARPOS_PTR, the - corresponding bytepos into *BYTEPOS_PTR and the current nesting - (as defined for state.incomment) in *INCOMMENT_PTR. + If successful, return true and store the charpos of the comment's + end into *CHARPOS_PTR and the corresponding bytepos into + *BYTEPOS_PTR. Else, return false and store the charpos STOP into + *CHARPOS_PTR, the corresponding bytepos into *BYTEPOS_PTR and the + current nesting (as defined for state->incomment) in + *INCOMMENT_PTR. Should the last character scanned in an incomplete + comment be a possible first character of a two character construct, + we store its SYNTAX_WITH_FLAGS into *last_syntax_ptr. Otherwise, + we store Smax into *last_syntax_ptr. The comment end is the last character of the comment rather than the character just after the comment. @@ -2326,7 +2341,7 @@ static bool forw_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop, EMACS_INT nesting, int style, int prev_syntax, ptrdiff_t *charpos_ptr, ptrdiff_t *bytepos_ptr, - EMACS_INT *incomment_ptr) + EMACS_INT *incomment_ptr, int *last_syntax_ptr) { register int c, c1; register enum syntaxcode code; @@ -2337,7 +2352,8 @@ forw_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop, /* Enter the loop in the middle so that we find a 2-char comment ender if we start in the middle of it. */ syntax = prev_syntax; - if (syntax != 0) goto forw_incomment; + code = syntax & 0xff; + if (syntax != 0 && from < stop) goto forw_incomment; while (1) { @@ -2346,6 +2362,12 @@ forw_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop, *incomment_ptr = nesting; *charpos_ptr = from; *bytepos_ptr = from_byte; + *last_syntax_ptr = + (code == Sescape || code == Scharquote + || SYNTAX_FLAGS_COMEND_FIRST (syntax) + || (nesting > 0 + && SYNTAX_FLAGS_COMSTART_FIRST (syntax))) + ? syntax : Smax ; return 0; } c = FETCH_CHAR_AS_MULTIBYTE (from_byte); @@ -2386,7 +2408,9 @@ forw_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop, SYNTAX_FLAGS_COMMENT_NESTED (other_syntax)) ? nesting > 0 : nesting < 0)) { - if (--nesting <= 0) + syntax = Smax; /* So that "|#" (lisp) can not return + the syntax of "#" in *last_syntax_ptr. */ + if (--nesting <= 0) /* We have encountered a comment end of the same style as the comment sequence which began this comment section. */ break; @@ -2408,6 +2432,7 @@ forw_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop, /* We have encountered a nested comment of the same style as the comment sequence which began this comment section. */ { + syntax = Smax; /* So that "#|#" isn't also a comment ender. */ INC_BOTH (from, from_byte); UPDATE_SYNTAX_TABLE_FORWARD (from); nesting++; @@ -2415,6 +2440,8 @@ forw_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop, } *charpos_ptr = from; *bytepos_ptr = from_byte; + *last_syntax_ptr = Smax; /* Any syntactic power the last byte had is + used up. */ return 1; } @@ -2436,6 +2463,7 @@ between them, return t; otherwise return nil. */) EMACS_INT count1; ptrdiff_t out_charpos, out_bytepos; EMACS_INT dummy; + int dummy2; CHECK_NUMBER (count); count1 = XINT (count); @@ -2499,7 +2527,7 @@ between them, return t; otherwise return nil. */) } /* We're at the start of a comment. */ found = forw_comment (from, from_byte, stop, comnested, comstyle, 0, - &out_charpos, &out_bytepos, &dummy); + &out_charpos, &out_bytepos, &dummy, &dummy2); from = out_charpos; from_byte = out_bytepos; if (!found) { @@ -2659,6 +2687,7 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag) ptrdiff_t from_byte; ptrdiff_t out_bytepos, out_charpos; EMACS_INT dummy; + int dummy2; bool multibyte_symbol_p = sexpflag && multibyte_syntax_as_symbol; if (depth > 0) min_depth = 0; @@ -2755,7 +2784,8 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag) UPDATE_SYNTAX_TABLE_FORWARD (from); found = forw_comment (from, from_byte, stop, comnested, comstyle, 0, - &out_charpos, &out_bytepos, &dummy); + &out_charpos, &out_bytepos, &dummy, + &dummy2); from = out_charpos, from_byte = out_bytepos; if (!found) { @@ -3119,7 +3149,7 @@ the prefix syntax flag (p). */) } /* Parse forward from FROM / FROM_BYTE to END, - assuming that FROM has state OLDSTATE (nil means FROM is start of function), + assuming that FROM has state STATE, and return a description of the state of the parse at END. If STOPBEFORE, stop at the start of an atom. If COMMENTSTOP is 1, stop at the start of a comment. @@ -3127,12 +3157,11 @@ the prefix syntax flag (p). */) after the beginning of a string, or after the end of a string. */ static void -scan_sexps_forward (struct lisp_parse_state *stateptr, +scan_sexps_forward (struct lisp_parse_state *state, ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t end, EMACS_INT targetdepth, bool stopbefore, - Lisp_Object oldstate, int commentstop) + int commentstop) { - struct lisp_parse_state state; enum syntaxcode code; int c1; bool comnested; @@ -3148,7 +3177,7 @@ scan_sexps_forward (struct lisp_parse_state *stateptr, Lisp_Object tem; ptrdiff_t prev_from; /* Keep one character before FROM. */ ptrdiff_t prev_from_byte; - int prev_from_syntax; + int prev_from_syntax, prev_prev_from_syntax; bool boundary_stop = commentstop == -1; bool nofence; bool found; @@ -3165,6 +3194,7 @@ scan_sexps_forward (struct lisp_parse_state *stateptr, do { prev_from = from; \ prev_from_byte = from_byte; \ temp = FETCH_CHAR_AS_MULTIBYTE (prev_from_byte); \ + prev_prev_from_syntax = prev_from_syntax; \ prev_from_syntax = SYNTAX_WITH_FLAGS (temp); \ INC_BOTH (from, from_byte); \ if (from < end) \ @@ -3174,88 +3204,38 @@ do { prev_from = from; \ immediate_quit = 1; QUIT; - if (NILP (oldstate)) - { - depth = 0; - state.instring = -1; - state.incomment = 0; - state.comstyle = 0; /* comment style a by default. */ - state.comstr_start = -1; /* no comment/string seen. */ - } - else - { - tem = Fcar (oldstate); - if (!NILP (tem)) - depth = XINT (tem); - else - depth = 0; - - oldstate = Fcdr (oldstate); - oldstate = Fcdr (oldstate); - oldstate = Fcdr (oldstate); - tem = Fcar (oldstate); - /* Check whether we are inside string_fence-style string: */ - state.instring = (!NILP (tem) - ? (CHARACTERP (tem) ? XFASTINT (tem) : ST_STRING_STYLE) - : -1); - - oldstate = Fcdr (oldstate); - tem = Fcar (oldstate); - state.incomment = (!NILP (tem) - ? (INTEGERP (tem) ? XINT (tem) : -1) - : 0); - - oldstate = Fcdr (oldstate); - tem = Fcar (oldstate); - start_quoted = !NILP (tem); + depth = state->depth; + start_quoted = state->quoted; + prev_prev_from_syntax = Smax; + prev_from_syntax = state->prev_syntax; - /* if the eighth element of the list is nil, we are in comment - style a. If it is non-nil, we are in comment style b */ - oldstate = Fcdr (oldstate); - oldstate = Fcdr (oldstate); - tem = Fcar (oldstate); - state.comstyle = (NILP (tem) - ? 0 - : (RANGED_INTEGERP (0, tem, ST_COMMENT_STYLE) - ? XINT (tem) - : ST_COMMENT_STYLE)); - - oldstate = Fcdr (oldstate); - tem = Fcar (oldstate); - state.comstr_start = - RANGED_INTEGERP (PTRDIFF_MIN, tem, PTRDIFF_MAX) ? XINT (tem) : -1; - oldstate = Fcdr (oldstate); - tem = Fcar (oldstate); - while (!NILP (tem)) /* >= second enclosing sexps. */ - { - Lisp_Object temhd = Fcar (tem); - if (RANGED_INTEGERP (PTRDIFF_MIN, temhd, PTRDIFF_MAX)) - curlevel->last = XINT (temhd); - if (++curlevel == endlevel) - curlevel--; /* error ("Nesting too deep for parser"); */ - curlevel->prev = -1; - curlevel->last = -1; - tem = Fcdr (tem); - } + tem = state->levelstarts; + while (!NILP (tem)) /* >= second enclosing sexps. */ + { + Lisp_Object temhd = Fcar (tem); + if (RANGED_INTEGERP (PTRDIFF_MIN, temhd, PTRDIFF_MAX)) + curlevel->last = XINT (temhd); + if (++curlevel == endlevel) + curlevel--; /* error ("Nesting too deep for parser"); */ + curlevel->prev = -1; + curlevel->last = -1; + tem = Fcdr (tem); } - state.quoted = 0; - mindepth = depth; - curlevel->prev = -1; curlevel->last = -1; - SETUP_SYNTAX_TABLE (prev_from, 1); - temp = FETCH_CHAR (prev_from_byte); - prev_from_syntax = SYNTAX_WITH_FLAGS (temp); - UPDATE_SYNTAX_TABLE_FORWARD (from); + state->quoted = 0; + mindepth = depth; + + SETUP_SYNTAX_TABLE (from, 1); /* Enter the loop at a place appropriate for initial state. */ - if (state.incomment) + if (state->incomment) goto startincomment; - if (state.instring >= 0) + if (state->instring >= 0) { - nofence = state.instring != ST_STRING_STYLE; + nofence = state->instring != ST_STRING_STYLE; if (start_quoted) goto startquotedinstring; goto startinstring; @@ -3266,11 +3246,8 @@ do { prev_from = from; \ while (from < end) { int syntax; - INC_FROM; - code = prev_from_syntax & 0xff; - if (from < end - && SYNTAX_FLAGS_COMSTART_FIRST (prev_from_syntax) + if (SYNTAX_FLAGS_COMSTART_FIRST (prev_from_syntax) && (c1 = FETCH_CHAR (from_byte), syntax = SYNTAX_WITH_FLAGS (c1), SYNTAX_FLAGS_COMSTART_SECOND (syntax))) @@ -3280,32 +3257,39 @@ do { prev_from = from; \ /* Record the comment style we have entered so that only the comment-end sequence of the same style actually terminates the comment section. */ - state.comstyle + state->comstyle = SYNTAX_FLAGS_COMMENT_STYLE (syntax, prev_from_syntax); comnested = (SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax) | SYNTAX_FLAGS_COMMENT_NESTED (syntax)); - state.incomment = comnested ? 1 : -1; - state.comstr_start = prev_from; + state->incomment = comnested ? 1 : -1; + state->comstr_start = prev_from; INC_FROM; + prev_from_syntax = Smax; /* the syntax has already been + "used up". */ code = Scomment; } - else if (code == Scomment_fence) - { - /* Record the comment style we have entered so that only - the comment-end sequence of the same style actually - terminates the comment section. */ - state.comstyle = ST_COMMENT_STYLE; - state.incomment = -1; - state.comstr_start = prev_from; - code = Scomment; - } - else if (code == Scomment) - { - state.comstyle = SYNTAX_FLAGS_COMMENT_STYLE (prev_from_syntax, 0); - state.incomment = (SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax) ? - 1 : -1); - state.comstr_start = prev_from; - } + else + { + INC_FROM; + code = prev_from_syntax & 0xff; + if (code == Scomment_fence) + { + /* Record the comment style we have entered so that only + the comment-end sequence of the same style actually + terminates the comment section. */ + state->comstyle = ST_COMMENT_STYLE; + state->incomment = -1; + state->comstr_start = prev_from; + code = Scomment; + } + else if (code == Scomment) + { + state->comstyle = SYNTAX_FLAGS_COMMENT_STYLE (prev_from_syntax, 0); + state->incomment = (SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax) ? + 1 : -1); + state->comstr_start = prev_from; + } + } if (SYNTAX_FLAGS_PREFIX (prev_from_syntax)) continue; @@ -3350,26 +3334,28 @@ do { prev_from = from; \ case Scomment_fence: /* Can't happen because it's handled above. */ case Scomment: - if (commentstop || boundary_stop) goto done; + if (commentstop || boundary_stop) goto done; startincomment: /* The (from == BEGV) test was to enter the loop in the middle so that we find a 2-char comment ender even if we start in the middle of it. We don't want to do that if we're just at the beginning of the comment (think of (*) ... (*)). */ found = forw_comment (from, from_byte, end, - state.incomment, state.comstyle, - (from == BEGV || from < state.comstr_start + 3) - ? 0 : prev_from_syntax, - &out_charpos, &out_bytepos, &state.incomment); + state->incomment, state->comstyle, + from == BEGV ? 0 : prev_from_syntax, + &out_charpos, &out_bytepos, &state->incomment, + &prev_from_syntax); from = out_charpos; from_byte = out_bytepos; - /* Beware! prev_from and friends are invalid now. - Luckily, the `done' doesn't use them and the INC_FROM - sets them to a sane value without looking at them. */ + /* Beware! prev_from and friends (except prev_from_syntax) + are invalid now. Luckily, the `done' doesn't use them + and the INC_FROM sets them to a sane value without + looking at them. */ if (!found) goto done; INC_FROM; - state.incomment = 0; - state.comstyle = 0; /* reset the comment style */ - if (boundary_stop) goto done; + state->incomment = 0; + state->comstyle = 0; /* reset the comment style */ + prev_from_syntax = Smax; /* For the comment closer */ + if (boundary_stop) goto done; break; case Sopen: @@ -3396,16 +3382,16 @@ do { prev_from = from; \ case Sstring: case Sstring_fence: - state.comstr_start = from - 1; + state->comstr_start = from - 1; if (stopbefore) goto stop; /* this arg means stop at sexp start */ curlevel->last = prev_from; - state.instring = (code == Sstring + state->instring = (code == Sstring ? (FETCH_CHAR_AS_MULTIBYTE (prev_from_byte)) : ST_STRING_STYLE); if (boundary_stop) goto done; startinstring: { - nofence = state.instring != ST_STRING_STYLE; + nofence = state->instring != ST_STRING_STYLE; while (1) { @@ -3419,7 +3405,7 @@ do { prev_from = from; \ /* Check C_CODE here so that if the char has a syntax-table property which says it is NOT a string character, it does not end the string. */ - if (nofence && c == state.instring && c_code == Sstring) + if (nofence && c == state->instring && c_code == Sstring) break; switch (c_code) @@ -3442,7 +3428,7 @@ do { prev_from = from; \ } } string_end: - state.instring = -1; + state->instring = -1; curlevel->prev = curlevel->last; INC_FROM; if (boundary_stop) goto done; @@ -3461,25 +3447,96 @@ do { prev_from = from; \ stop: /* Here if stopping before start of sexp. */ from = prev_from; /* We have just fetched the char that starts it; */ from_byte = prev_from_byte; + prev_from_syntax = prev_prev_from_syntax; goto done; /* but return the position before it. */ endquoted: - state.quoted = 1; + state->quoted = 1; done: - state.depth = depth; - state.mindepth = mindepth; - state.thislevelstart = curlevel->prev; - state.prevlevelstart + state->depth = depth; + state->mindepth = mindepth; + state->thislevelstart = curlevel->prev; + state->prevlevelstart = (curlevel == levelstart) ? -1 : (curlevel - 1)->last; - state.location = from; - state.location_byte = from_byte; - state.levelstarts = Qnil; + state->location = from; + state->location_byte = from_byte; + state->levelstarts = Qnil; while (curlevel > levelstart) - state.levelstarts = Fcons (make_number ((--curlevel)->last), - state.levelstarts); + state->levelstarts = Fcons (make_number ((--curlevel)->last), + state->levelstarts); + state->prev_syntax = (SYNTAX_FLAGS_COMSTARTEND_FIRST (prev_from_syntax) + || state->quoted) ? prev_from_syntax : Smax; immediate_quit = 0; +} + +/* Convert a (lisp) parse state to the internal form used in + scan_sexps_forward. */ +static void +internalize_parse_state (Lisp_Object external, struct lisp_parse_state *state) +{ + Lisp_Object tem; + + if (NILP (external)) + { + state->depth = 0; + state->instring = -1; + state->incomment = 0; + state->quoted = 0; + state->comstyle = 0; /* comment style a by default. */ + state->comstr_start = -1; /* no comment/string seen. */ + state->levelstarts = Qnil; + state->prev_syntax = Smax; + } + else + { + tem = Fcar (external); + if (!NILP (tem)) + state->depth = XINT (tem); + else + state->depth = 0; + + external = Fcdr (external); + external = Fcdr (external); + external = Fcdr (external); + tem = Fcar (external); + /* Check whether we are inside string_fence-style string: */ + state->instring = (!NILP (tem) + ? (CHARACTERP (tem) ? XFASTINT (tem) : ST_STRING_STYLE) + : -1); + + external = Fcdr (external); + tem = Fcar (external); + state->incomment = (!NILP (tem) + ? (INTEGERP (tem) ? XINT (tem) : -1) + : 0); + + external = Fcdr (external); + tem = Fcar (external); + state->quoted = !NILP (tem); - *stateptr = state; + /* if the eighth element of the list is nil, we are in comment + style a. If it is non-nil, we are in comment style b */ + external = Fcdr (external); + external = Fcdr (external); + tem = Fcar (external); + state->comstyle = (NILP (tem) + ? 0 + : (RANGED_INTEGERP (0, tem, ST_COMMENT_STYLE) + ? XINT (tem) + : ST_COMMENT_STYLE)); + + external = Fcdr (external); + tem = Fcar (external); + state->comstr_start = + RANGED_INTEGERP (PTRDIFF_MIN, tem, PTRDIFF_MAX) ? XINT (tem) : -1; + external = Fcdr (external); + tem = Fcar (external); + state->levelstarts = tem; + + external = Fcdr (external); + tem = Fcar (external); + state->prev_syntax = NILP (tem) ? Smax : XINT (tem); + } } DEFUN ("parse-partial-sexp", Fparse_partial_sexp, Sparse_partial_sexp, 2, 6, 0, @@ -3488,6 +3545,7 @@ Parsing stops at TO or when certain criteria are met; point is set to where parsing stops. If fifth arg OLDSTATE is omitted or nil, parsing assumes that FROM is the beginning of a function. + Value is a list of elements describing final state of parsing: 0. depth in parens. 1. character address of start of innermost containing list; nil if none. @@ -3501,16 +3559,22 @@ Value is a list of elements describing final state of parsing: 6. the minimum paren-depth encountered during this scan. 7. style of comment, if any. 8. character address of start of comment or string; nil if not in one. - 9. Intermediate data for continuation of parsing (subject to change). + 9. List of positions of currently open parens, outermost first. +10. When the last position scanned holds the first character of a + (potential) two character construct, the syntax of that position, + otherwise nil. That construct can be a two character comment + delimiter or an Escaped or Char-quoted character. +11..... Possible further internal information used by `parse-partial-sexp'. + If third arg TARGETDEPTH is non-nil, parsing stops if the depth in parentheses becomes equal to TARGETDEPTH. -Fourth arg STOPBEFORE non-nil means stop when come to +Fourth arg STOPBEFORE non-nil means stop when we come to any character that starts a sexp. Fifth arg OLDSTATE is a list like what this function returns. It is used to initialize the state of the parse. Elements number 1, 2, 6 are ignored. -Sixth arg COMMENTSTOP non-nil means stop at the start of a comment. - If it is symbol `syntax-table', stop after the start of a comment or a +Sixth arg COMMENTSTOP non-nil means stop after the start of a comment. + If it is the symbol `syntax-table', stop after the start of a comment or a string, or after end of a comment or a string. */) (Lisp_Object from, Lisp_Object to, Lisp_Object targetdepth, Lisp_Object stopbefore, Lisp_Object oldstate, Lisp_Object commentstop) @@ -3527,15 +3591,17 @@ Sixth arg COMMENTSTOP non-nil means stop at the start of a comment. target = TYPE_MINIMUM (EMACS_INT); /* We won't reach this depth. */ validate_region (&from, &to); + internalize_parse_state (oldstate, &state); scan_sexps_forward (&state, XINT (from), CHAR_TO_BYTE (XINT (from)), XINT (to), - target, !NILP (stopbefore), oldstate, + target, !NILP (stopbefore), (NILP (commentstop) ? 0 : (EQ (commentstop, Qsyntax_table) ? -1 : 1))); SET_PT_BOTH (state.location, state.location_byte); - return Fcons (make_number (state.depth), + return + Fcons (make_number (state.depth), Fcons (state.prevlevelstart < 0 ? Qnil : make_number (state.prevlevelstart), Fcons (state.thislevelstart < 0 @@ -3553,11 +3619,15 @@ Sixth arg COMMENTSTOP non-nil means stop at the start of a comment. ? Qsyntax_table : make_number (state.comstyle)) : Qnil), - Fcons (((state.incomment - || (state.instring >= 0)) - ? make_number (state.comstr_start) - : Qnil), - Fcons (state.levelstarts, Qnil)))))))))); + Fcons (((state.incomment + || (state.instring >= 0)) + ? make_number (state.comstr_start) + : Qnil), + Fcons (state.levelstarts, + Fcons (state.prev_syntax == Smax + ? Qnil + : make_number (state.prev_syntax), + Qnil))))))))))); } void diff --git a/src/sysdep.c b/src/sysdep.c index 460166d119..53affbf3db 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -19,14 +19,6 @@ along with GNU Emacs. If not, see . */ #include -/* If HYBRID_GET_CURRENT_DIR_NAME is defined in conf_post.h, then we - need the following before including unistd.h, in order to pick up - the right prototype for gget_current_dir_name. */ -#ifdef HYBRID_GET_CURRENT_DIR_NAME -#undef get_current_dir_name -#define get_current_dir_name gget_current_dir_name -#endif - #include #include "sysstdio.h" #ifdef HAVE_PWD_H @@ -40,6 +32,7 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" +#include "sheap.h" #include "sysselect.h" #include "blockinput.h" @@ -137,14 +130,50 @@ static const int baud_convert[] = 1800, 2400, 4800, 9600, 19200, 38400 }; -#if !defined HAVE_GET_CURRENT_DIR_NAME || defined BROKEN_GET_CURRENT_DIR_NAME \ - || (defined HYBRID_GET_CURRENT_DIR_NAME) -/* Return the current working directory. Returns NULL on errors. - Any other returned value must be freed with free. This is used - only when get_current_dir_name is not defined on the system. */ +/* If FD is not already open, arrange for it to be open with FLAGS. */ +static void +force_open (int fd, int flags) +{ + if (dup2 (fd, fd) < 0 && errno == EBADF) + { + int n = open (NULL_DEVICE, flags); + if (n < 0 || (fd != n && (dup2 (n, fd) < 0 || emacs_close (n) != 0))) + { + emacs_perror (NULL_DEVICE); + exit (EXIT_FAILURE); + } + } +} + +/* Make sure stdin, stdout, and stderr are open to something, so that + their file descriptors are not hijacked by later system calls. */ +void +init_standard_fds (void) +{ + /* Open stdin for *writing*, and stdout and stderr for *reading*. + That way, any attempt to do normal I/O will result in an error, + just as if the files were closed, and the file descriptors will + not be reused by later opens. */ + force_open (STDIN_FILENO, O_WRONLY); + force_open (STDOUT_FILENO, O_RDONLY); + force_open (STDERR_FILENO, O_RDONLY); +} + +/* Return the current working directory. The result should be freed + with 'free'. Return NULL on errors. */ char * -get_current_dir_name (void) +emacs_get_current_dir_name (void) { +# if HAVE_GET_CURRENT_DIR_NAME && !BROKEN_GET_CURRENT_DIR_NAME +# ifdef HYBRID_MALLOC + bool use_libc = bss_sbrk_did_unexec; +# else + bool use_libc = true; +# endif + if (use_libc) + return get_current_dir_name (); +# endif + char *buf; char *pwd = getenv ("PWD"); struct stat dotstat, pwdstat; @@ -192,7 +221,6 @@ get_current_dir_name (void) } return buf; } -#endif /* Discard pending input on all input descriptors. */ @@ -1409,6 +1437,12 @@ setup_pty (int fd) void init_system_name (void) { + if (!build_details) + { + /* Set system-name to nil so that the build is deterministic. */ + Vsystem_name = Qnil; + return; + } char *hostname_alloc = NULL; char *hostname; #ifndef HAVE_GETHOSTNAME @@ -1632,6 +1666,9 @@ static unsigned char sigsegv_stack[SIGSTKSZ]; static bool stack_overflow (siginfo_t *siginfo) { + if (!attempt_stack_overflow_recovery) + return false; + /* In theory, a more-accurate heuristic can be obtained by using GNU/Linux pthread_getattr_np along with POSIX pthread_attr_getstack and pthread_attr_getguardsize to find the location and size of the @@ -2111,7 +2148,7 @@ init_random (void) { bool success = false; #ifndef WINDOWSNT - int fd = emacs_open ("/dev/urandom", O_RDONLY | O_BINARY, 0); + int fd = emacs_open ("/dev/urandom", O_RDONLY, 0); if (0 <= fd) { success = emacs_read (fd, &v, sizeof v) == sizeof v; @@ -2291,7 +2328,6 @@ emacs_fopen (char const *file, char const *mode) switch (*m++) { case '+': omode = O_RDWR; break; - case 'b': bflag = O_BINARY; break; case 't': bflag = O_TEXT; break; default: /* Ignore. */ break; } @@ -3013,7 +3049,7 @@ system_process_attributes (Lisp_Object pid) struct timespec tnow, tstart, tboot, telapsed, us_time; double pcpu, pmem; Lisp_Object attrs = Qnil; - Lisp_Object cmd_str, decoded_cmd; + Lisp_Object decoded_cmd; ptrdiff_t count; CHECK_NUMBER_OR_FLOAT (pid); @@ -3070,7 +3106,7 @@ system_process_attributes (Lisp_Object pid) else q = NULL; /* Command name is encoded in locale-coding-system; decode it. */ - cmd_str = make_unibyte_string (cmd, cmdsize); + AUTO_STRING_WITH_LEN (cmd_str, cmd, cmdsize); decoded_cmd = code_convert_string_norecord (cmd_str, Vlocale_coding_system, 0); attrs = Fcons (Fcons (Qcomm, decoded_cmd), attrs); @@ -3203,7 +3239,7 @@ system_process_attributes (Lisp_Object pid) sprintf (cmdline, "[%.*s]", cmdsize, cmd); } /* Command line is encoded in locale-coding-system; decode it. */ - cmd_str = make_unibyte_string (q, nread); + AUTO_STRING_WITH_LEN (cmd_str, q, nread); decoded_cmd = code_convert_string_norecord (cmd_str, Vlocale_coding_system, 0); unbind_to (count, Qnil); @@ -3338,13 +3374,13 @@ system_process_attributes (Lisp_Object pid) make_float (100.0 / 0x8000 * pinfo.pr_pctmem)), attrs); - decoded_cmd = (code_convert_string_norecord - (build_unibyte_string (pinfo.pr_fname), - Vlocale_coding_system, 0)); + AUTO_STRING (fname, pinfo.pr_fname); + decoded_cmd = code_convert_string_norecord (fname, + Vlocale_coding_system, 0); attrs = Fcons (Fcons (Qcomm, decoded_cmd), attrs); - decoded_cmd = (code_convert_string_norecord - (build_unibyte_string (pinfo.pr_psargs), - Vlocale_coding_system, 0)); + AUTO_STRING (psargs, pinfo.pr_psargs); + decoded_cmd = code_convert_string_norecord (psargs, + Vlocale_coding_system, 0); attrs = Fcons (Fcons (Qargs, decoded_cmd), attrs); } unbind_to (count, Qnil); @@ -3409,9 +3445,8 @@ system_process_attributes (Lisp_Object pid) if (gr) attrs = Fcons (Fcons (Qgroup, build_string (gr->gr_name)), attrs); - decoded_comm = (code_convert_string_norecord - (build_unibyte_string (proc.ki_comm), - Vlocale_coding_system, 0)); + AUTO_STRING (comm, proc.ki_comm); + decoded_comm = code_convert_string_norecord (comm, Vlocale_coding_system, 0); attrs = Fcons (Fcons (Qcomm, decoded_comm), attrs); { @@ -3522,10 +3557,9 @@ system_process_attributes (Lisp_Object pid) args[i] = ' '; } - decoded_comm = - (code_convert_string_norecord - (build_unibyte_string (args), - Vlocale_coding_system, 0)); + AUTO_STRING (comm, args); + decoded_comm = code_convert_string_norecord (comm, + Vlocale_coding_system, 0); attrs = Fcons (Fcons (Qargs, decoded_comm), attrs); } @@ -3533,6 +3567,146 @@ system_process_attributes (Lisp_Object pid) return attrs; } +#elif defined DARWIN_OS + +static struct timespec +timeval_to_timespec (struct timeval t) +{ + return make_timespec (t.tv_sec, t.tv_usec * 1000); +} + +static Lisp_Object +make_lisp_timeval (struct timeval t) +{ + return make_lisp_time (timeval_to_timespec (t)); +} + +Lisp_Object +system_process_attributes (Lisp_Object pid) +{ + int proc_id; + int pagesize = getpagesize (); + unsigned long npages; + int fscale; + struct passwd *pw; + struct group *gr; + char *ttyname; + size_t len; + char args[MAXPATHLEN]; + struct timeval starttime; + struct timespec t, now; + struct rusage *rusage; + dev_t tdev; + uid_t uid; + gid_t gid; + + int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID}; + struct kinfo_proc proc; + size_t proclen = sizeof proc; + + Lisp_Object attrs = Qnil; + Lisp_Object decoded_comm; + + CHECK_NUMBER_OR_FLOAT (pid); + CONS_TO_INTEGER (pid, int, proc_id); + mib[3] = proc_id; + + if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0) + return attrs; + + uid = proc.kp_eproc.e_ucred.cr_uid; + attrs = Fcons (Fcons (Qeuid, make_fixnum_or_float (uid)), attrs); + + block_input (); + pw = getpwuid (uid); + unblock_input (); + if (pw) + attrs = Fcons (Fcons (Quser, build_string (pw->pw_name)), attrs); + + gid = proc.kp_eproc.e_pcred.p_svgid; + attrs = Fcons (Fcons (Qegid, make_fixnum_or_float (gid)), attrs); + + block_input (); + gr = getgrgid (gid); + unblock_input (); + if (gr) + attrs = Fcons (Fcons (Qgroup, build_string (gr->gr_name)), attrs); + + decoded_comm = (code_convert_string_norecord + (build_unibyte_string (proc.kp_proc.p_comm), + Vlocale_coding_system, 0)); + + attrs = Fcons (Fcons (Qcomm, decoded_comm), attrs); + { + char state[2] = {'\0', '\0'}; + switch (proc.kp_proc.p_stat) + { + case SRUN: + state[0] = 'R'; + break; + + case SSLEEP: + state[0] = 'S'; + break; + + case SZOMB: + state[0] = 'Z'; + break; + + case SSTOP: + state[0] = 'T'; + break; + + case SIDL: + state[0] = 'I'; + break; + } + attrs = Fcons (Fcons (Qstate, build_string (state)), attrs); + } + + attrs = Fcons (Fcons (Qppid, make_fixnum_or_float (proc.kp_eproc.e_ppid)), + attrs); + attrs = Fcons (Fcons (Qpgrp, make_fixnum_or_float (proc.kp_eproc.e_pgid)), + attrs); + + tdev = proc.kp_eproc.e_tdev; + block_input (); + ttyname = tdev == NODEV ? NULL : devname (tdev, S_IFCHR); + unblock_input (); + if (ttyname) + attrs = Fcons (Fcons (Qtty, build_string (ttyname)), attrs); + + attrs = Fcons (Fcons (Qtpgid, make_fixnum_or_float (proc.kp_eproc.e_tpgid)), + attrs); + + rusage = proc.kp_proc.p_ru; + if (rusage) + { + attrs = Fcons (Fcons (Qminflt, make_fixnum_or_float (rusage->ru_minflt)), + attrs); + attrs = Fcons (Fcons (Qmajflt, make_fixnum_or_float (rusage->ru_majflt)), + attrs); + + attrs = Fcons (Fcons (Qutime, make_lisp_timeval (rusage->ru_utime)), + attrs); + attrs = Fcons (Fcons (Qstime, make_lisp_timeval (rusage->ru_stime)), + attrs); + t = timespec_add (timeval_to_timespec (rusage->ru_utime), + timeval_to_timespec (rusage->ru_stime)); + attrs = Fcons (Fcons (Qtime, make_lisp_time (t)), attrs); + } + + starttime = proc.kp_proc.p_starttime; + attrs = Fcons (Fcons (Qnice, make_number (proc.kp_proc.p_nice)), attrs); + attrs = Fcons (Fcons (Qstart, make_lisp_timeval (starttime)), attrs); + + now = current_timespec (); + t = timespec_sub (now, timeval_to_timespec (starttime)); + attrs = Fcons (Fcons (Qetime, make_lisp_time (t)), attrs); + + return attrs; +} + /* The WINDOWSNT implementation is in w32.c. The MSDOS implementation is in dosfns.c. */ #elif !defined (WINDOWSNT) && !defined (MSDOS) diff --git a/src/unexcw.c b/src/unexcw.c index afd5413c64..ea678dd4c2 100644 --- a/src/unexcw.c +++ b/src/unexcw.c @@ -30,10 +30,6 @@ along with GNU Emacs. If not, see . */ #define DOTEXE ".exe" -extern void report_sheap_usage (int); - -extern int bss_sbrk_did_unexec; - /* ** header for Windows executable files */ @@ -276,14 +272,12 @@ unexec (const char *outfile, const char *infile) int ret; int ret2; - report_sheap_usage (1); - infile = add_exe_suffix_if_necessary (infile, infile_buffer); outfile = add_exe_suffix_if_necessary (outfile, outfile_buffer); - fd_in = emacs_open (infile, O_RDONLY | O_BINARY, 0); + fd_in = emacs_open (infile, O_RDONLY, 0); assert (fd_in >= 0); - fd_out = emacs_open (outfile, O_RDWR | O_TRUNC | O_CREAT | O_BINARY, 0755); + fd_out = emacs_open (outfile, O_RDWR | O_TRUNC | O_CREAT, 0755); assert (fd_out >= 0); for (;;) { @@ -302,9 +296,7 @@ unexec (const char *outfile, const char *infile) ret = emacs_close (fd_in); assert (ret == 0); - bss_sbrk_did_unexec = 1; fixup_executable (fd_out); - bss_sbrk_did_unexec = 0; ret = emacs_close (fd_out); assert (ret == 0); diff --git a/src/unexelf.c b/src/unexelf.c index 068d268808..551915712f 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -461,29 +461,6 @@ unexec (const char *new_name, const char *old_name) || !strcmp (old_section_names + new_shdr->sh_name, ".sdata") || !strcmp (old_section_names + new_shdr->sh_name, ".lit4") || !strcmp (old_section_names + new_shdr->sh_name, ".lit8") - /* The conditional bit below was in Oliva's original code - (1999-08-25) and seems to have been dropped by mistake - subsequently. It prevents a crash at startup under X in - `IRIX64 6.5 6.5.17m', whether compiled on that release or - an earlier one. It causes no trouble on the other ELF - platforms I could test (Irix 6.5.15m, Solaris 8, Debian - Potato x86, Debian Woody SPARC); however, it's reported - to cause crashes under some version of GNU/Linux. It's - not yet clear what's changed in that Irix version to - cause the problem, or why the fix sometimes fails under - GNU/Linux. There's probably no good reason to have - something Irix-specific here, but this will have to do - for now. IRIX6_5 is the most specific macro we have to - test. -- fx 2002-10-01 - - The issue _looks_ as though it's gone away on 6.5.18m, - but maybe it's still lurking, to be triggered by some - change in the binary. It appears to concern the dynamic - loader, but I never got anywhere with an SGI support call - seeking clues. -- fx 2002-11-29. */ -#ifdef IRIX6_5 - || !strcmp (old_section_names + new_shdr->sh_name, ".got") -#endif || !strcmp (old_section_names + new_shdr->sh_name, ".sdata1") || !strcmp (old_section_names + new_shdr->sh_name, ".data1")) src = (caddr_t) old_shdr->sh_addr; @@ -665,9 +642,6 @@ unexec (const char *new_name, const char *old_name) || !strcmp (old_section_names + shdr->sh_name, ".sdata") || !strcmp (old_section_names + shdr->sh_name, ".lit4") || !strcmp (old_section_names + shdr->sh_name, ".lit8") -#ifdef IRIX6_5 /* see above */ - || !strcmp (old_section_names + shdr->sh_name, ".got") -#endif || !strcmp (old_section_names + shdr->sh_name, ".sdata1") || !strcmp (old_section_names + shdr->sh_name, ".data1")) { diff --git a/src/vm-limit.c b/src/vm-limit.c index d32050fd01..7eeca3c825 100644 --- a/src/vm-limit.c +++ b/src/vm-limit.c @@ -51,9 +51,16 @@ char data_start[1] = { 1 }; # endif #endif -/* From gmalloc.c. */ -extern void (* __after_morecore_hook) (void); +#ifdef HAVE_MALLOC_H +# include +#endif +#ifndef __MALLOC_HOOK_VOLATILE +# define __MALLOC_HOOK_VOLATILE volatile +#endif +#ifndef HAVE_MALLOC_H extern void *(*__morecore) (ptrdiff_t); +extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void); +#endif /* From ralloc.c. */ #ifdef REL_ALLOC diff --git a/src/w32.c b/src/w32.c index c26f14593f..94aa7d891d 100644 --- a/src/w32.c +++ b/src/w32.c @@ -7202,6 +7202,10 @@ int (PASCAL *pfn_recvfrom) (SOCKET s, char * buf, int len, int flags, int (PASCAL *pfn_sendto) (SOCKET s, const char * buf, int len, int flags, const struct sockaddr * to, int tolen); +int (PASCAL *pfn_getaddrinfo) (const char *, const char *, + const struct addrinfo *, struct addrinfo **); +void (PASCAL *pfn_freeaddrinfo) (struct addrinfo *); + /* SetHandleInformation is only needed to make sockets non-inheritable. */ BOOL (WINAPI *pfn_SetHandleInformation) (HANDLE object, DWORD mask, DWORD flags); #ifndef HANDLE_FLAG_INHERIT @@ -7284,6 +7288,16 @@ init_winsock (int load_now) LOAD_PROC (sendto); #undef LOAD_PROC + /* Try loading functions not available before XP. */ + pfn_getaddrinfo = (void *) GetProcAddress (winsock_lib, "getaddrinfo"); + pfn_freeaddrinfo = (void *) GetProcAddress (winsock_lib, "freeaddrinfo"); + /* Paranoia: these two functions should go together, so if one + is absent, we cannot use the other. */ + if (pfn_getaddrinfo == NULL) + pfn_freeaddrinfo = NULL; + else if (pfn_freeaddrinfo == NULL) + pfn_getaddrinfo = NULL; + /* specify version 1.1 of winsock */ if (pfn_WSAStartup (0x101, &winsockData) == 0) { @@ -7733,6 +7747,117 @@ sys_getpeername (int s, struct sockaddr *addr, int * namelen) return SOCKET_ERROR; } +int +sys_getaddrinfo (const char *node, const char *service, + const struct addrinfo *hints, struct addrinfo **res) +{ + int rc; + + if (winsock_lib == NULL) + { + errno = ENETDOWN; + return SOCKET_ERROR; + } + + check_errno (); + if (pfn_getaddrinfo) + rc = pfn_getaddrinfo (node, service, hints, res); + else + { + int port = 0; + struct hostent *host_info; + struct gai_storage { + struct addrinfo addrinfo; + struct sockaddr_in sockaddr_in; + } *gai_storage; + + /* We don't (yet) support any flags, as Emacs doesn't need that. */ + if (hints && hints->ai_flags != 0) + return WSAEINVAL; + /* NODE cannot be NULL, since process.c has fallbacks for that. */ + if (!node) + return WSAHOST_NOT_FOUND; + + if (service) + { + const char *protocol = + (hints && hints->ai_socktype == SOCK_DGRAM) ? "udp" : "tcp"; + struct servent *srv = sys_getservbyname (service, protocol); + + if (srv) + port = srv->s_port; + else if (*service >= '0' && *service <= '9') + { + char *endp; + + port = strtoul (service, &endp, 10); + if (*endp || port > 65536) + return WSAHOST_NOT_FOUND; + port = sys_htons ((unsigned short) port); + } + else + return WSAHOST_NOT_FOUND; + } + + gai_storage = xzalloc (sizeof *gai_storage); + gai_storage->sockaddr_in.sin_port = port; + host_info = sys_gethostbyname (node); + if (host_info) + { + memcpy (&gai_storage->sockaddr_in.sin_addr, + host_info->h_addr, host_info->h_length); + gai_storage->sockaddr_in.sin_family = host_info->h_addrtype; + } + else + { + /* Attempt to interpret host as numeric inet address. */ + unsigned long numeric_addr = sys_inet_addr (node); + + if (numeric_addr == -1) + { + free (gai_storage); + return WSAHOST_NOT_FOUND; + } + + memcpy (&gai_storage->sockaddr_in.sin_addr, &numeric_addr, + sizeof (gai_storage->sockaddr_in.sin_addr)); + gai_storage->sockaddr_in.sin_family = (hints) ? hints->ai_family : 0; + } + + gai_storage->addrinfo.ai_addr = + (struct sockaddr *)&gai_storage->sockaddr_in; + gai_storage->addrinfo.ai_addrlen = sizeof (gai_storage->sockaddr_in); + gai_storage->addrinfo.ai_protocol = (hints) ? hints->ai_protocol : 0; + gai_storage->addrinfo.ai_socktype = (hints) ? hints->ai_socktype : 0; + gai_storage->addrinfo.ai_family = gai_storage->sockaddr_in.sin_family; + gai_storage->addrinfo.ai_next = NULL; + + *res = &gai_storage->addrinfo; + rc = 0; + } + + return rc; +} + +void +sys_freeaddrinfo (struct addrinfo *ai) +{ + if (winsock_lib == NULL) + { + errno = ENETDOWN; + return; + } + + check_errno (); + if (pfn_freeaddrinfo) + pfn_freeaddrinfo (ai); + else + { + eassert (ai->ai_next == NULL); + xfree (ai); + } +} + int sys_shutdown (int s, int how) { @@ -8056,17 +8181,33 @@ sys_dup2 (int src, int dst) return -1; } - /* make sure we close the destination first if it's a pipe or socket */ - if (src != dst && fd_info[dst].flags != 0) + /* MS _dup2 seems to have weird side effect when invoked with 2 + identical arguments: an attempt to fclose the corresponding stdio + stream after that hangs (we do close standard streams in + init_ntproc). Attempt to avoid that by not calling _dup2 that + way: if SRC is valid, we know that dup2 should be a no-op, so do + nothing and return DST. */ + if (src == dst) + { + if ((HANDLE)_get_osfhandle (src) == INVALID_HANDLE_VALUE) + { + errno = EBADF; + return -1; + } + return dst; + } + + /* Make sure we close the destination first if it's a pipe or socket. */ + if (fd_info[dst].flags != 0) sys_close (dst); rc = _dup2 (src, dst); if (rc == 0) { - /* duplicate our internal info as well */ + /* Duplicate our internal info as well. */ fd_info[dst] = fd_info[src]; } - return rc; + return rc == 0 ? dst : rc; } int @@ -8647,6 +8788,30 @@ sys_write (int fd, const void * buffer, unsigned int count) unsigned long nblock = 0; if (winsock_lib == NULL) emacs_abort (); + child_process *cp = fd_info[fd].cp; + + /* If this is a non-blocking socket whose connection is in + progress or terminated with an error already, return the + proper error code to the caller. */ + if (cp != NULL && (fd_info[fd].flags & FILE_CONNECT) != 0) + { + /* In case connection is in progress, ENOTCONN that would + result from calling pfn_send is not what callers expect. */ + if (cp->status != STATUS_CONNECT_FAILED) + { + errno = EWOULDBLOCK; + return -1; + } + /* In case connection failed, use the actual error code + stashed by '_sys_wait_connect' in cp->errcode. */ + else if (cp->errcode != 0) + { + pfn_WSASetLastError (cp->errcode); + set_errno (); + return -1; + } + } + /* TODO: implement select() properly so non-blocking I/O works. */ /* For now, make sure the write blocks. */ if (fd_info[fd].flags & FILE_NDELAY) @@ -8654,6 +8819,13 @@ sys_write (int fd, const void * buffer, unsigned int count) nchars = pfn_send (SOCK_HANDLE (fd), buffer, count, 0); + if (nchars == SOCKET_ERROR) + { + set_errno (); + DebPrint (("sys_write.send failed with error %d on socket %ld\n", + pfn_WSAGetLastError (), SOCK_HANDLE (fd))); + } + /* Set the socket back to non-blocking if it was before, for other operations that support it. */ if (fd_info[fd].flags & FILE_NDELAY) @@ -8661,13 +8833,6 @@ sys_write (int fd, const void * buffer, unsigned int count) nblock = 1; pfn_ioctlsocket (SOCK_HANDLE (fd), FIONBIO, &nblock); } - - if (nchars == SOCKET_ERROR) - { - DebPrint (("sys_write.send failed with error %d on socket %ld\n", - pfn_WSAGetLastError (), SOCK_HANDLE (fd))); - set_errno (); - } } else { @@ -8740,7 +8905,7 @@ sys_write (int fd, const void * buffer, unsigned int count) /* Emulation of SIOCGIFCONF and getifaddrs, see process.c. */ -extern Lisp_Object conv_sockaddr_to_lisp (struct sockaddr *, int); +extern Lisp_Object conv_sockaddr_to_lisp (struct sockaddr *, ptrdiff_t); /* Return information about network interface IFNAME, or about all interfaces (if IFNAME is nil). */ diff --git a/src/w32console.c b/src/w32console.c index 512d20dd24..82ba4b1cf9 100644 --- a/src/w32console.c +++ b/src/w32console.c @@ -759,6 +759,9 @@ initialize_w32_display (struct terminal *term, int *width, int *height) /* Setup w32_display_info structure for this frame. */ w32_initialize_display_info (build_string ("Console")); + + /* Set up the keyboard hook. */ + setup_w32_kbdhook (); } diff --git a/src/w32fns.c b/src/w32fns.c index c57b5a188b..ede8f6be29 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -20,6 +20,9 @@ along with GNU Emacs. If not, see . */ /* Added by Kevin Gallo */ #include +/* Override API version to get the latest functionality. */ +#undef _WIN32_WINNT +#define _WIN32_WINNT 0x0600 #include #include @@ -41,6 +44,7 @@ along with GNU Emacs. If not, see . */ #include "coding.h" #include "w32common.h" +#include "w32inevt.h" #ifdef WINDOWSNT #include @@ -52,6 +56,8 @@ along with GNU Emacs. If not, see . */ #include "w32.h" #endif +#include +#include #include #include #include @@ -251,6 +257,38 @@ HINSTANCE hinst = NULL; static unsigned int sound_type = 0xFFFFFFFF; #define MB_EMACS_SILENT (0xFFFFFFFF - 1) +/* Special virtual key code for indicating "any" key. */ +#define VK_ANY 0xFF + +#ifndef WM_WTSSESSION_CHANGE +/* 32-bit MinGW does not define these constants. */ +# define WM_WTSSESSION_CHANGE 0x02B1 +# define WTS_SESSION_LOCK 0x7 +#endif + +/* Keyboard hook state data. */ +static struct +{ + int hook_count; /* counter, if several windows are created */ + HHOOK hook; /* hook handle */ + HWND console; /* console window handle */ + + int lwindown; /* Left Windows key currently pressed (and hooked) */ + int rwindown; /* Right Windows key currently pressed (and hooked) */ + int winsdown; /* Number of handled keys currently pressed */ + int send_win_up; /* Pass through the keyup for this Windows key press? */ + int suppress_lone; /* Suppress simulated Windows keydown-keyup for this press? */ + int winseen; /* Windows keys seen during this press? */ + + char alt_hooked[256]; /* hook Alt+[this key]? */ + char lwin_hooked[256]; /* hook left Win+[this key]? */ + char rwin_hooked[256]; /* hook right Win+[this key]? */ +} kbdhook; +typedef HWND (WINAPI *GetConsoleWindow_Proc) (void); + +/* stdin, from w32console.c */ +extern HANDLE keyboard_handle; + /* Let the user specify a display with a frame. nil stands for the selected frame--or, if that is not a w32 frame, the first display on the list. */ @@ -2074,6 +2112,350 @@ my_post_msg (W32Msg * wmsg, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) post_msg (wmsg); } +#ifdef WINDOWSNT +/* The Windows keyboard hook callback. */ +static LRESULT CALLBACK +funhook (int code, WPARAM w, LPARAM l) +{ + INPUT inputs[2]; + HWND focus = GetFocus (); + int console = 0; + KBDLLHOOKSTRUCT const *hs = (KBDLLHOOKSTRUCT*)l; + + if (code < 0 || (hs->flags & LLKHF_INJECTED)) + return CallNextHookEx (0, code, w, l); + + /* The keyboard hook sees keyboard input on all processes (except + elevated ones, when Emacs itself is not elevated). As such, + care must be taken to only filter out keyboard input when Emacs + itself is on the foreground. + + GetFocus returns a non-NULL window if another application is active, + and always for a console Emacs process. For a console Emacs, determine + focus by checking if the current foreground window is the process's + console window. */ + if (focus == NULL && kbdhook.console != NULL) + { + if (GetForegroundWindow () == kbdhook.console) + { + focus = kbdhook.console; + console = 1; + } + } + + /* First, check hooks for the left and right Windows keys. */ + if (hs->vkCode == VK_LWIN || hs->vkCode == VK_RWIN) + { + if (focus != NULL && (w == WM_KEYDOWN || w == WM_SYSKEYDOWN)) + { + /* The key is being pressed in an Emacs window. */ + if (hs->vkCode == VK_LWIN && !kbdhook.lwindown) + { + kbdhook.lwindown = 1; + kbdhook.winseen = 1; + kbdhook.winsdown++; + } + else if (hs->vkCode == VK_RWIN && !kbdhook.rwindown) + { + kbdhook.rwindown = 1; + kbdhook.winseen = 1; + kbdhook.winsdown++; + } + /* Returning 1 here drops the keypress without further processing. + If the keypress was allowed to go through, the normal Windows + hotkeys would take over. */ + return 1; + } + else if (kbdhook.winsdown > 0 && (w == WM_KEYUP || w == WM_SYSKEYUP)) + { + /* A key that has been captured earlier is being released now. */ + if (hs->vkCode == VK_LWIN && kbdhook.lwindown) + { + kbdhook.lwindown = 0; + kbdhook.winsdown--; + } + else if (hs->vkCode == VK_RWIN && kbdhook.rwindown) + { + kbdhook.rwindown = 0; + kbdhook.winsdown--; + } + if (kbdhook.winsdown == 0 && kbdhook.winseen) + { + if (!kbdhook.suppress_lone) + { + /* The Windows key was pressed, then released, + without any other key pressed simultaneously. + Normally, this opens the Start menu, but the user + can prevent this by setting the + w32-pass-[lr]window-to-system variable to + NIL. */ + if (hs->vkCode == VK_LWIN && !NILP (Vw32_pass_lwindow_to_system) || + hs->vkCode == VK_RWIN && !NILP (Vw32_pass_rwindow_to_system)) + { + /* Not prevented - Simulate the keypress to the system. */ + memset (inputs, 0, sizeof (inputs)); + inputs[0].type = INPUT_KEYBOARD; + inputs[0].ki.wVk = hs->vkCode; + inputs[0].ki.wScan = hs->vkCode; + inputs[0].ki.dwFlags = KEYEVENTF_EXTENDEDKEY; + inputs[0].ki.time = 0; + inputs[1].type = INPUT_KEYBOARD; + inputs[1].ki.wVk = hs->vkCode; + inputs[1].ki.wScan = hs->vkCode; + inputs[1].ki.dwFlags + = KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP; + inputs[1].ki.time = 0; + SendInput (2, inputs, sizeof (INPUT)); + } + else if (focus != NULL) + { + /* When not passed to system, must simulate privately to Emacs. */ + PostMessage (focus, WM_SYSKEYDOWN, hs->vkCode, 0); + PostMessage (focus, WM_SYSKEYUP, hs->vkCode, 0); + } + } + } + if (kbdhook.winsdown == 0) + { + /* No Windows keys pressed anymore - clear the state flags. */ + kbdhook.suppress_lone = 0; + kbdhook.winseen = 0; + } + if (!kbdhook.send_win_up) + { + /* Swallow this release message, as not to confuse + applications who did not get to see the original + WM_KEYDOWN message either. */ + return 1; + } + kbdhook.send_win_up = 0; + } + } + else if (kbdhook.winsdown > 0) + { + /* Some other key was pressed while a captured Win key is down. + This is either an Emacs registered hotkey combination, or a + system hotkey. */ + if (kbdhook.lwindown && kbdhook.lwin_hooked[hs->vkCode] || + kbdhook.rwindown && kbdhook.rwin_hooked[hs->vkCode]) + { + /* Hooked Win-x combination, do not pass the keypress to Windows. */ + kbdhook.suppress_lone = 1; + } + else if (!kbdhook.suppress_lone) + { + /* Unhooked S-x combination; simulate the combination now + (will be seen by the system). */ + memset (inputs, 0, sizeof (inputs)); + inputs[0].type = INPUT_KEYBOARD; + inputs[0].ki.wVk = kbdhook.lwindown ? VK_LWIN : VK_RWIN; + inputs[0].ki.wScan = kbdhook.lwindown ? VK_LWIN : VK_RWIN; + inputs[0].ki.dwFlags = KEYEVENTF_EXTENDEDKEY; + inputs[0].ki.time = 0; + inputs[1].type = INPUT_KEYBOARD; + inputs[1].ki.wVk = hs->vkCode; + inputs[1].ki.wScan = hs->scanCode; + inputs[1].ki.dwFlags = + (hs->flags & LLKHF_EXTENDED) ? KEYEVENTF_EXTENDEDKEY : 0; + inputs[1].ki.time = 0; + SendInput (2, inputs, sizeof (INPUT)); + /* Stop processing of this Win sequence here; the + corresponding keyup messages will come through the normal + channel when the keys are released. */ + kbdhook.suppress_lone = 1; + kbdhook.send_win_up = 1; + /* Swallow the original keypress (as we want the Win key + down message simulated above to precede this real message). */ + return 1; + } + } + + /* Next, handle the registered Alt-* combinations. */ + if ((w == WM_SYSKEYDOWN || w == WM_KEYDOWN) + && kbdhook.alt_hooked[hs->vkCode] + && focus != NULL + && (GetAsyncKeyState (VK_MENU) & 0x8000)) + { + /* Prevent the system from getting this Alt-* key - suppress the + message and post as a normal keypress to Emacs. */ + if (console) + { + INPUT_RECORD rec; + DWORD n; + rec.EventType = KEY_EVENT; + rec.Event.KeyEvent.bKeyDown = TRUE; + rec.Event.KeyEvent.wVirtualKeyCode = hs->vkCode; + rec.Event.KeyEvent.wVirtualScanCode = hs->scanCode; + rec.Event.KeyEvent.uChar.UnicodeChar = 0; + rec.Event.KeyEvent.dwControlKeyState = + ((GetAsyncKeyState (VK_LMENU) & 0x8000) ? LEFT_ALT_PRESSED : 0) + | ((GetAsyncKeyState (VK_RMENU) & 0x8000) ? RIGHT_ALT_PRESSED : 0) + | ((GetAsyncKeyState (VK_LCONTROL) & 0x8000) ? LEFT_CTRL_PRESSED : 0) + | ((GetAsyncKeyState (VK_RCONTROL) & 0x8000) ? RIGHT_CTRL_PRESSED : 0) + | ((GetAsyncKeyState (VK_SHIFT) & 0x8000) ? SHIFT_PRESSED : 0) + | ((hs->flags & LLKHF_EXTENDED) ? ENHANCED_KEY : 0); + if (w32_console_unicode_input) + WriteConsoleInputW (keyboard_handle, &rec, 1, &n); + else + WriteConsoleInputA (keyboard_handle, &rec, 1, &n); + } + else + PostMessage (focus, w, hs->vkCode, 1 | (1<<29)); + return 1; + } + + /* The normal case - pass the message through. */ + return CallNextHookEx (0, code, w, l); +} + +/* Set up the hook; can be called several times, with matching + remove_w32_kbdhook calls. */ +void +setup_w32_kbdhook (void) +{ + kbdhook.hook_count++; + + /* Hooking is only available on NT architecture systems, as + indicated by the w32_kbdhook_active variable. */ + if (kbdhook.hook_count == 1 && w32_kbdhook_active) + { + /* Get the handle of the Emacs console window. As the + GetConsoleWindow function is only available on Win2000+, a + hackish workaround described in Microsoft KB article 124103 + (https://support.microsoft.com/en-us/kb/124103) is used for + NT 4 systems. */ + GetConsoleWindow_Proc get_console = (GetConsoleWindow_Proc) + GetProcAddress (GetModuleHandle ("kernel32.dll"), "GetConsoleWindow"); + + if (get_console != NULL) + kbdhook.console = get_console (); + else + { + GUID guid; + wchar_t *oldTitle = malloc (1024 * sizeof(wchar_t)); + wchar_t newTitle[64]; + int i; + + CoCreateGuid (&guid); + StringFromGUID2 (&guid, newTitle, 64); + if (newTitle != NULL) + { + GetConsoleTitleW (oldTitle, 1024); + SetConsoleTitleW (newTitle); + for (i = 0; i < 25; i++) + { + Sleep (40); + kbdhook.console = FindWindowW (NULL, newTitle); + if (kbdhook.console != NULL) + break; + } + SetConsoleTitleW (oldTitle); + } + free (oldTitle); + } + + /* Set the hook. */ + kbdhook.hook = SetWindowsHookEx (WH_KEYBOARD_LL, funhook, + GetModuleHandle (NULL), 0); + } +} + +/* Remove the hook. */ +void +remove_w32_kbdhook (void) +{ + kbdhook.hook_count--; + if (kbdhook.hook_count == 0 && w32_kbdhook_active) + { + UnhookWindowsHookEx (kbdhook.hook); + kbdhook.hook = NULL; + } +} +#endif /* WINDOWSNT */ + +/* Mark a specific key combination as hooked, preventing it to be + handled by the system. */ +void +hook_w32_key (int hook, int modifier, int vkey) +{ + char *tbl = NULL; + + switch (modifier) + { + case VK_MENU: + tbl = kbdhook.alt_hooked; + break; + case VK_LWIN: + tbl = kbdhook.lwin_hooked; + break; + case VK_RWIN: + tbl = kbdhook.rwin_hooked; + break; + } + + if (tbl != NULL && vkey >= 0 && vkey <= 255) + { + /* VK_ANY hooks all keys for this modifier */ + if (vkey == VK_ANY) + memset (tbl, (char)hook, 256); + else + tbl[vkey] = (char)hook; + /* Alt-s should go through */ + kbdhook.alt_hooked[VK_MENU] = 0; + kbdhook.alt_hooked[VK_LMENU] = 0; + kbdhook.alt_hooked[VK_RMENU] = 0; + kbdhook.alt_hooked[VK_CONTROL] = 0; + kbdhook.alt_hooked[VK_LCONTROL] = 0; + kbdhook.alt_hooked[VK_RCONTROL] = 0; + kbdhook.alt_hooked[VK_SHIFT] = 0; + kbdhook.alt_hooked[VK_LSHIFT] = 0; + kbdhook.alt_hooked[VK_RSHIFT] = 0; + } +} + +/* Check the current Win key pressed state. */ +int +check_w32_winkey_state (int vkey) +{ + /* The hook code handles grabbing of the Windows keys and Alt-* key + combinations reserved by the system. Handling Alt is a bit + easier, as Windows intends Alt-* shortcuts for application use in + Windows; hotkeys such as Alt-tab and Alt-escape are special + cases. Win-* hotkeys, on the other hand, are primarily meant for + system use. + + As a result, when we want Emacs to be able to grab the Win-* + keys, we must swallow all Win key presses in a low-level keyboard + hook. Unfortunately, this means that the Emacs window procedure + (and console input handler) never see the keypresses either. + Thus, to check the modifier states properly, Emacs code must use + the check_w32_winkey_state function that uses the flags directly + updated by the hook callback. */ + switch (vkey) + { + case VK_LWIN: + return kbdhook.lwindown; + case VK_RWIN: + return kbdhook.rwindown; + } + return 0; +} + +/* Reset the keyboard hook state. Locking the workstation with Win-L + leaves the Win key(s) "down" from the hook's point of view - the + keyup event is never seen. Thus, this function must be called when + the system is locked. */ +void +reset_w32_kbdhook_state (void) +{ + kbdhook.lwindown = 0; + kbdhook.rwindown = 0; + kbdhook.winsdown = 0; + kbdhook.send_win_up = 0; + kbdhook.suppress_lone = 0; + kbdhook.winseen = 0; +} + /* GetKeyState and MapVirtualKey on Windows 95 do not actually distinguish between left and right keys as advertised. We test for this support dynamically, and set a flag when the support is absent. If @@ -2248,6 +2630,8 @@ modifier_set (int vkey) else return (GetKeyState (vkey) & 0x1); } + if (w32_kbdhook_active && (vkey == VK_LWIN || vkey == VK_RWIN)) + return check_w32_winkey_state (vkey); if (!modifiers_recorded) return (GetKeyState (vkey) & 0x8000); @@ -2390,7 +2774,9 @@ map_keypad_keys (unsigned int virt_key, unsigned int extended) /* List of special key combinations which w32 would normally capture, but Emacs should grab instead. Not directly visible to lisp, to simplify synchronization. Each item is an integer encoding a virtual - key code and modifier combination to capture. */ + key code and modifier combination to capture. + Note: This code is not used if keyboard hooks are active + (Windows 2000 and later). */ static Lisp_Object w32_grabbed_keys; #define HOTKEY(vk, mods) make_number (((vk) & 255) | ((mods) << 8)) @@ -3476,7 +3862,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) switch (wParam) { case VK_LWIN: - if (NILP (Vw32_pass_lwindow_to_system)) + if (!w32_kbdhook_active && NILP (Vw32_pass_lwindow_to_system)) { /* Prevent system from acting on keyup (which opens the Start menu if no other key was pressed) by simulating a @@ -3495,7 +3881,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return 0; break; case VK_RWIN: - if (NILP (Vw32_pass_rwindow_to_system)) + if (!w32_kbdhook_active && NILP (Vw32_pass_rwindow_to_system)) { if (GetAsyncKeyState (wParam) & 1) { @@ -4352,10 +4738,12 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_SETFOCUS: dpyinfo->faked_key = 0; reset_modifiers (); - register_hot_keys (hwnd); + if (!w32_kbdhook_active) + register_hot_keys (hwnd); goto command; case WM_KILLFOCUS: - unregister_hot_keys (hwnd); + if (!w32_kbdhook_active) + unregister_hot_keys (hwnd); button_state = 0; ReleaseCapture (); /* Relinquish the system caret. */ @@ -4384,10 +4772,24 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) my_post_msg (&wmsg, hwnd, msg, wParam, lParam); goto dflt; +#ifdef WINDOWSNT + case WM_CREATE: + setup_w32_kbdhook (); + goto dflt; +#endif + case WM_DESTROY: +#ifdef WINDOWSNT + remove_w32_kbdhook (); +#endif CoUninitialize (); return 0; + case WM_WTSSESSION_CHANGE: + if (wParam == WTS_SESSION_LOCK) + reset_w32_kbdhook_state (); + goto dflt; + case WM_CLOSE: wmsg.dwModifiers = w32_get_modifiers (); my_post_msg (&wmsg, hwnd, msg, wParam, lParam); @@ -4880,7 +5282,8 @@ x_default_font_parameter (struct frame *f, Lisp_Object parms) { /* Remember the explicit font parameter, so we can re-apply it after we've applied the `default' face settings. */ - x_set_frame_parameters (f, Fcons (Fcons (Qfont_param, font_param), Qnil)); + x_set_frame_parameters (f, Fcons (Fcons (Qfont_parameter, font_param), + Qnil)); } x_default_parameter (f, parms, Qfont, font, "font", "Font", RES_TYPE_STRING); } @@ -6056,8 +6459,6 @@ no value of TYPE (always string in the MS Windows case). */) Tool tips ***********************************************************************/ -static Lisp_Object x_create_tip_frame (struct w32_display_info *, - Lisp_Object, Lisp_Object); static void compute_tip_xy (struct frame *, Lisp_Object, Lisp_Object, Lisp_Object, int, int, int *, int *); @@ -6092,8 +6493,7 @@ unwind_create_tip_frame (Lisp_Object frame) /* Create a frame for a tooltip on the display described by DPYINFO. - PARMS is a list of frame parameters. TEXT is the string to - display in the tip frame. Value is the frame. + PARMS is a list of frame parameters. Value is the frame. Note that functions called here, esp. x_default_parameter can signal errors, for instance when a specified color name is @@ -6101,8 +6501,7 @@ unwind_create_tip_frame (Lisp_Object frame) when this happens. */ static Lisp_Object -x_create_tip_frame (struct w32_display_info *dpyinfo, - Lisp_Object parms, Lisp_Object text) +x_create_tip_frame (struct w32_display_info *dpyinfo, Lisp_Object parms) { struct frame *f; Lisp_Object frame; @@ -6111,8 +6510,6 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, ptrdiff_t count = SPECPDL_INDEX (); struct kboard *kb; bool face_change_before = face_change; - Lisp_Object buffer; - struct buffer *old_buffer; int x_width = 0, x_height = 0; /* Use this general default value to start with until we know if @@ -6136,23 +6533,9 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, frame = Qnil; /* Make a frame without minibuffer nor mode-line. */ f = make_frame (false); - f->wants_modeline = 0; + f->wants_modeline = false; XSETFRAME (frame, f); - AUTO_STRING (tip, " *tip*"); - buffer = Fget_buffer_create (tip); - /* Use set_window_buffer instead of Fset_window_buffer (see - discussion of bug#11984, bug#12025, bug#12026). */ - set_window_buffer (FRAME_ROOT_WINDOW (f), buffer, false, false); - old_buffer = current_buffer; - set_buffer_internal_1 (XBUFFER (buffer)); - bset_truncate_lines (current_buffer, Qnil); - specbind (Qinhibit_read_only, Qt); - specbind (Qinhibit_modification_hooks, Qt); - Ferase_buffer (); - Finsert (1, &text); - set_buffer_internal_1 (old_buffer); - record_unwind_protect (unwind_create_tip_frame, frame); /* By setting the output method, we're essentially saying that @@ -6186,7 +6569,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, { fset_name (f, name); f->explicit_name = true; - /* use the frame's title when getting resources for this frame. */ + /* Use the frame's title when getting resources for this frame. */ specbind (Qx_resource_name, name); } @@ -6216,14 +6599,10 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, parms = Fcons (Fcons (Qinternal_border_width, value), parms); } + x_default_parameter (f, parms, Qinternal_border_width, make_number (1), "internalBorderWidth", "internalBorderWidth", RES_TYPE_NUMBER); - x_default_parameter (f, parms, Qright_divider_width, make_number (0), - NULL, NULL, RES_TYPE_NUMBER); - x_default_parameter (f, parms, Qbottom_divider_width, make_number (0), - NULL, NULL, RES_TYPE_NUMBER); - /* Also do the stuff which must be set before the window exists. */ x_default_parameter (f, parms, Qforeground_color, build_string ("black"), "foreground", "Foreground", RES_TYPE_STRING); @@ -6250,6 +6629,9 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, f->fringe_cols = 0; f->left_fringe_width = 0; f->right_fringe_width = 0; + /* No dividers on tip frame. */ + f->right_divider_width = 0; + f->bottom_divider_width = 0; block_input (); my_create_tip_window (f); @@ -6276,7 +6658,6 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, SET_FRAME_LINES (f, 0); adjust_frame_size (f, width * FRAME_COLUMN_WIDTH (f), height * FRAME_LINE_HEIGHT (f), 0, true, Qtip_frame); - /* Add `tooltip' frame parameter's default value. */ if (NILP (Fframe_parameter (frame, Qtooltip))) Fmodify_frame_parameters (frame, Fcons (Fcons (Qtooltip, Qt), Qnil)); @@ -6294,8 +6675,6 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, Lisp_Object fg = Fframe_parameter (frame, Qforeground_color); Lisp_Object colors = Qnil; - /* Set tip_frame here, so that */ - tip_frame = frame; call2 (Qface_set_after_frame_default, frame, Qnil); if (!EQ (bg, Fframe_parameter (frame, Qbackground_color))) @@ -6427,6 +6806,48 @@ compute_tip_xy (struct frame *f, *root_x = min_x; } +/* Hide tooltip. Delete its frame if DELETE is true. */ +static Lisp_Object +x_hide_tip (bool delete) +{ + if (!NILP (tip_timer)) + { + call1 (Qcancel_timer, tip_timer); + tip_timer = Qnil; + } + + if (NILP (tip_frame) + || (!delete && FRAMEP (tip_frame) + && !FRAME_VISIBLE_P (XFRAME (tip_frame)))) + return Qnil; + else + { + ptrdiff_t count; + Lisp_Object was_open = Qnil; + + count = SPECPDL_INDEX (); + specbind (Qinhibit_redisplay, Qt); + specbind (Qinhibit_quit, Qt); + + if (FRAMEP (tip_frame)) + { + if (delete) + { + delete_frame (tip_frame, Qnil); + tip_frame = Qnil; + } + else + x_make_frame_invisible (XFRAME (tip_frame)); + + was_open = Qt; + } + else + tip_frame = Qnil; + + return unbind_to (count, was_open); + } +} + DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, doc: /* Show STRING in a \"tooltip\" window on frame FRAME. @@ -6460,15 +6881,16 @@ A tooltip's maximum size is specified by `x-max-tooltip-size'. Text larger than the specified size is clipped. */) (Lisp_Object string, Lisp_Object frame, Lisp_Object parms, Lisp_Object timeout, Lisp_Object dx, Lisp_Object dy) { - struct frame *f; + struct frame *f, *tip_f; struct window *w; int root_x, root_y; struct buffer *old_buffer; struct text_pos pos; int i, width, height; - bool seen_reversed_p; int old_windows_or_buffers_changed = windows_or_buffers_changed; ptrdiff_t count = SPECPDL_INDEX (); + ptrdiff_t count_1; + Lisp_Object window, size; specbind (Qinhibit_redisplay, Qt); @@ -6492,91 +6914,155 @@ Text larger than the specified size is clipped. */) if (NILP (last_show_tip_args)) last_show_tip_args = Fmake_vector (make_number (3), Qnil); - if (!NILP (tip_frame)) + if (FRAMEP (tip_frame) && FRAME_LIVE_P (XFRAME (tip_frame))) { Lisp_Object last_string = AREF (last_show_tip_args, 0); Lisp_Object last_frame = AREF (last_show_tip_args, 1); Lisp_Object last_parms = AREF (last_show_tip_args, 2); - if (EQ (frame, last_frame) - && !NILP (Fequal (last_string, string)) + if (FRAME_VISIBLE_P (XFRAME (tip_frame)) + && EQ (frame, last_frame) + && !NILP (Fequal_including_properties (last_string, string)) && !NILP (Fequal (last_parms, parms))) { - struct frame *f = XFRAME (tip_frame); - /* Only DX and DY have changed. */ + tip_f = XFRAME (tip_frame); if (!NILP (tip_timer)) { Lisp_Object timer = tip_timer; + tip_timer = Qnil; call1 (Qcancel_timer, timer); } block_input (); - compute_tip_xy (f, parms, dx, dy, FRAME_PIXEL_WIDTH (f), - FRAME_PIXEL_HEIGHT (f), &root_x, &root_y); + compute_tip_xy (tip_f, parms, dx, dy, FRAME_PIXEL_WIDTH (tip_f), + FRAME_PIXEL_HEIGHT (tip_f), &root_x, &root_y); /* Put tooltip in topmost group and in position. */ - SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOPMOST, + SetWindowPos (FRAME_W32_WINDOW (tip_f), HWND_TOPMOST, root_x, root_y, 0, 0, SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOOWNERZORDER); /* Ensure tooltip is on top of other topmost windows (eg menus). */ - SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOP, + SetWindowPos (FRAME_W32_WINDOW (tip_f), HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOOWNERZORDER); + /* Let redisplay know that we have made the frame visible already. */ + SET_FRAME_VISIBLE (tip_f, 1); + ShowWindow (FRAME_W32_WINDOW (tip_f), SW_SHOWNOACTIVATE); unblock_input (); + goto start_timer; } - } + else if (tooltip_reuse_hidden_frame && EQ (frame, last_frame)) + { + bool delete = false; + Lisp_Object tail, elt, parm, last; + + /* Check if every parameter in PARMS has the same value in + last_parms. This may destruct last_parms which, however, + will be recreated below. */ + for (tail = parms; CONSP (tail); tail = XCDR (tail)) + { + elt = XCAR (tail); + parm = Fcar (elt); + /* The left, top, right and bottom parameters are handled + by compute_tip_xy so they can be ignored here. */ + if (!EQ (parm, Qleft) && !EQ (parm, Qtop) + && !EQ (parm, Qright) && !EQ (parm, Qbottom)) + { + last = Fassq (parm, last_parms); + if (NILP (Fequal (Fcdr (elt), Fcdr (last)))) + { + /* We lost, delete the old tooltip. */ + delete = true; + break; + } + else + last_parms = call2 (Qassq_delete_all, parm, last_parms); + } + else + last_parms = call2 (Qassq_delete_all, parm, last_parms); + } - /* Hide a previous tip, if any. */ - Fx_hide_tip (); + /* Now check if there's a parameter left in last_parms with a + non-nil value. */ + for (tail = last_parms; CONSP (tail); tail = XCDR (tail)) + { + elt = XCAR (tail); + parm = Fcar (elt); + if (!EQ (parm, Qleft) && !EQ (parm, Qtop) && !EQ (parm, Qright) + && !EQ (parm, Qbottom) && !NILP (Fcdr (elt))) + { + /* We lost, delete the old tooltip. */ + delete = true; + break; + } + } + + x_hide_tip (delete); + } + else + x_hide_tip (true); + } + else + x_hide_tip (true); ASET (last_show_tip_args, 0, string); ASET (last_show_tip_args, 1, frame); ASET (last_show_tip_args, 2, parms); - /* Add default values to frame parameters. */ - if (NILP (Fassq (Qname, parms))) - parms = Fcons (Fcons (Qname, build_string ("tooltip")), parms); - if (NILP (Fassq (Qinternal_border_width, parms))) - parms = Fcons (Fcons (Qinternal_border_width, make_number (3)), parms); - if (NILP (Fassq (Qright_divider_width, parms))) - parms = Fcons (Fcons (Qright_divider_width, make_number (0)), parms); - if (NILP (Fassq (Qbottom_divider_width, parms))) - parms = Fcons (Fcons (Qbottom_divider_width, make_number (0)), parms); - if (NILP (Fassq (Qborder_width, parms))) - parms = Fcons (Fcons (Qborder_width, make_number (1)), parms); - if (NILP (Fassq (Qborder_color, parms))) - parms = Fcons (Fcons (Qborder_color, build_string ("lightyellow")), parms); - if (NILP (Fassq (Qbackground_color, parms))) - parms = Fcons (Fcons (Qbackground_color, build_string ("lightyellow")), - parms); - /* Block input until the tip has been fully drawn, to avoid crashes when drawing tips in menus. */ block_input (); - /* Create a frame for the tooltip, and record it in the global - variable tip_frame. */ - frame = x_create_tip_frame (FRAME_DISPLAY_INFO (f), parms, string); - f = XFRAME (frame); + if (!FRAMEP (tip_frame) || !FRAME_LIVE_P (XFRAME (tip_frame))) + { + /* Add default values to frame parameters. */ + if (NILP (Fassq (Qname, parms))) + parms = Fcons (Fcons (Qname, build_string ("tooltip")), parms); + if (NILP (Fassq (Qinternal_border_width, parms))) + parms = Fcons (Fcons (Qinternal_border_width, make_number (3)), parms); + if (NILP (Fassq (Qborder_width, parms))) + parms = Fcons (Fcons (Qborder_width, make_number (1)), parms); + if (NILP (Fassq (Qborder_color, parms))) + parms = Fcons (Fcons (Qborder_color, build_string ("lightyellow")), parms); + if (NILP (Fassq (Qbackground_color, parms))) + parms = Fcons (Fcons (Qbackground_color, build_string ("lightyellow")), + parms); + + /* Create a frame for the tooltip, and record it in the global + variable tip_frame. */ + if (NILP (tip_frame = x_create_tip_frame (FRAME_DISPLAY_INFO (f), parms))) + { + /* Creating the tip frame failed. */ + unblock_input (); + return unbind_to (count, Qnil); + } + } + + tip_f = XFRAME (tip_frame); + window = FRAME_ROOT_WINDOW (tip_f); + AUTO_STRING (tip, " *tip*"); + set_window_buffer (window, Fget_buffer_create (tip), false, false); + w = XWINDOW (window); + w->pseudo_window_p = true; - /* Set up the frame's root window. */ - w = XWINDOW (FRAME_ROOT_WINDOW (f)); + /* Set up the frame's root window. Note: The following code does not + try to size the window or its frame correctly. Its only purpose is + to make the subsequent text size calculations work. The right + sizes should get installed when the toolkit gets back to us. */ w->left_col = 0; w->top_line = 0; w->pixel_left = 0; w->pixel_top = 0; if (CONSP (Vx_max_tooltip_size) - && INTEGERP (XCAR (Vx_max_tooltip_size)) - && XINT (XCAR (Vx_max_tooltip_size)) > 0 - && INTEGERP (XCDR (Vx_max_tooltip_size)) - && XINT (XCDR (Vx_max_tooltip_size)) > 0) + && RANGED_INTEGERP (1, XCAR (Vx_max_tooltip_size), INT_MAX) + && RANGED_INTEGERP (1, XCDR (Vx_max_tooltip_size), INT_MAX)) { w->total_cols = XFASTINT (XCAR (Vx_max_tooltip_size)); w->total_lines = XFASTINT (XCDR (Vx_max_tooltip_size)); @@ -6587,164 +7073,71 @@ Text larger than the specified size is clipped. */) w->total_lines = 40; } - w->pixel_width = w->total_cols * FRAME_COLUMN_WIDTH (f); - w->pixel_height = w->total_lines * FRAME_LINE_HEIGHT (f); - - FRAME_TOTAL_COLS (f) = WINDOW_TOTAL_COLS (w); - adjust_frame_glyphs (f); - w->pseudo_window_p = true; + w->pixel_width = w->total_cols * FRAME_COLUMN_WIDTH (tip_f); + w->pixel_height = w->total_lines * FRAME_LINE_HEIGHT (tip_f); + FRAME_TOTAL_COLS (tip_f) = WINDOW_TOTAL_COLS (w); + adjust_frame_glyphs (tip_f); - /* Display the tooltip text in a temporary buffer. */ + /* Insert STRING into the root window's buffer and fit the frame to + the buffer. */ + count_1 = SPECPDL_INDEX (); old_buffer = current_buffer; - set_buffer_internal_1 (XBUFFER (XWINDOW (FRAME_ROOT_WINDOW (f))->contents)); + set_buffer_internal_1 (XBUFFER (w->contents)); bset_truncate_lines (current_buffer, Qnil); + specbind (Qinhibit_read_only, Qt); + specbind (Qinhibit_modification_hooks, Qt); + specbind (Qinhibit_point_motion_hooks, Qt); + Ferase_buffer (); + Finsert (1, &string); clear_glyph_matrix (w->desired_matrix); clear_glyph_matrix (w->current_matrix); SET_TEXT_POS (pos, BEGV, BEGV_BYTE); - try_window (FRAME_ROOT_WINDOW (f), pos, TRY_WINDOW_IGNORE_FONTS_CHANGE); - - /* Compute width and height of the tooltip. */ - width = height = 0; - seen_reversed_p = false; - for (i = 0; i < w->desired_matrix->nrows; ++i) - { - struct glyph_row *row = &w->desired_matrix->rows[i]; - struct glyph *last; - int row_width; - - /* Stop at the first empty row at the end. */ - if (!row->enabled_p || !MATRIX_ROW_DISPLAYS_TEXT_P (row)) - break; - - /* Let the row go over the full width of the frame. */ - row->full_width_p = true; - - row_width = row->pixel_width; - if (row->used[TEXT_AREA]) - { - if (!row->reversed_p) - { - /* There's a glyph at the end of rows that is used to - place the cursor there. Don't include the width of - this glyph. */ - last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; - if (NILP (last->object)) - row_width -= last->pixel_width; - } - else - { - /* There could be a stretch glyph at the beginning of R2L - rows that is produced by extend_face_to_end_of_line. - Don't count that glyph. */ - struct glyph *g = row->glyphs[TEXT_AREA]; - - if (g->type == STRETCH_GLYPH && NILP (g->object)) - { - row_width -= g->pixel_width; - seen_reversed_p = true; - } - } - } - - height += row->height; - width = max (width, row_width); - } - - /* If we've seen partial-length R2L rows, we need to re-adjust the - tool-tip frame width and redisplay it again, to avoid over-wide - tips due to the stretch glyph that extends R2L lines to full - width of the frame. */ - if (seen_reversed_p) - { - /* PXW: Why do we do the pixel-to-cols conversion only if - seen_reversed_p holds? Don't we have to set other fields of - the window/frame structure? - - w->total_cols and FRAME_TOTAL_COLS want the width in columns, - not in pixels. */ - w->pixel_width = width; - width /= WINDOW_FRAME_COLUMN_WIDTH (w); - w->total_cols = width; - FRAME_TOTAL_COLS (f) = width; - SET_FRAME_WIDTH (f, width); - adjust_frame_glyphs (f); - w->pseudo_window_p = 1; - clear_glyph_matrix (w->desired_matrix); - clear_glyph_matrix (w->current_matrix); - try_window (FRAME_ROOT_WINDOW (f), pos, TRY_WINDOW_IGNORE_FONTS_CHANGE); - width = height = 0; - /* Recompute width and height of the tooltip. */ - for (i = 0; i < w->desired_matrix->nrows; ++i) - { - struct glyph_row *row = &w->desired_matrix->rows[i]; - struct glyph *last; - int row_width; - - if (!row->enabled_p || !MATRIX_ROW_DISPLAYS_TEXT_P (row)) - break; - row->full_width_p = true; - row_width = row->pixel_width; - if (row->used[TEXT_AREA] && !row->reversed_p) - { - last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; - if (NILP (last->object)) - row_width -= last->pixel_width; - } - - height += row->height; - width = max (width, row_width); - } - } - - /* Add the frame's internal border to the width and height the w32 - window should have. */ - height += 2 * FRAME_INTERNAL_BORDER_WIDTH (f); - width += 2 * FRAME_INTERNAL_BORDER_WIDTH (f); - - /* Move the tooltip window where the mouse pointer is. Resize and - show it. - - PXW: This should use the frame's pixel coordinates. */ - compute_tip_xy (f, parms, dx, dy, width, height, &root_x, &root_y); - + try_window (window, pos, TRY_WINDOW_IGNORE_FONTS_CHANGE); + /* Calculate size of tooltip window. */ + size = Fwindow_text_pixel_size (window, Qnil, Qnil, Qnil, + make_number (w->pixel_height), Qnil); + /* Add the frame's internal border to calculated size. */ + width = XINT (Fcar (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f); + height = XINT (Fcdr (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f); + /* Calculate position of tooltip frame. */ + compute_tip_xy (tip_f, parms, dx, dy, width, height, &root_x, &root_y); + + /* Show tooltip frame. */ { - /* Adjust Window size to take border into account. */ RECT rect; + int pad = (NUMBERP (Vw32_tooltip_extra_pixels) + ? max (0, XINT (Vw32_tooltip_extra_pixels)) + : FRAME_COLUMN_WIDTH (tip_f)); + rect.left = rect.top = 0; rect.right = width; rect.bottom = height; - AdjustWindowRect (&rect, f->output_data.w32->dwStyle, false); - - /* Position and size tooltip, and put it in the topmost group. - The add-on of FRAME_COLUMN_WIDTH to the 5th argument is a - peculiarity of w32 display: without it, some fonts cause the - last character of the tip to be truncated or wrapped around to - the next line. */ - SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOPMOST, + AdjustWindowRect (&rect, tip_f->output_data.w32->dwStyle, + FRAME_EXTERNAL_MENU_BAR (tip_f)); + + /* Position and size tooltip and put it in the topmost group. */ + SetWindowPos (FRAME_W32_WINDOW (tip_f), HWND_TOPMOST, root_x, root_y, - rect.right - rect.left + FRAME_COLUMN_WIDTH (f), + rect.right - rect.left + pad, rect.bottom - rect.top, SWP_NOACTIVATE | SWP_NOOWNERZORDER); /* Ensure tooltip is on top of other topmost windows (eg menus). */ - SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOP, + SetWindowPos (FRAME_W32_WINDOW (tip_f), HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOOWNERZORDER); /* Let redisplay know that we have made the frame visible already. */ - SET_FRAME_VISIBLE (f, 1); + SET_FRAME_VISIBLE (tip_f, 1); - ShowWindow (FRAME_W32_WINDOW (f), SW_SHOWNOACTIVATE); + ShowWindow (FRAME_W32_WINDOW (tip_f), SW_SHOWNOACTIVATE); } - /* Draw into the window. */ w->must_be_updated_p = true; update_single_window (w); - - unblock_input (); - - /* Restore original current buffer. */ set_buffer_internal_1 (old_buffer); + unbind_to (count_1, Qnil); + unblock_input (); windows_or_buffers_changed = old_windows_or_buffers_changed; start_timer: @@ -6761,31 +7154,7 @@ DEFUN ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 0, 0, Value is t if tooltip was open, nil otherwise. */) (void) { - ptrdiff_t count; - Lisp_Object deleted, frame, timer; - - /* Return quickly if nothing to do. */ - if (NILP (tip_timer) && NILP (tip_frame)) - return Qnil; - - frame = tip_frame; - timer = tip_timer; - tip_frame = tip_timer = deleted = Qnil; - - count = SPECPDL_INDEX (); - specbind (Qinhibit_redisplay, Qt); - specbind (Qinhibit_quit, Qt); - - if (!NILP (timer)) - call1 (Qcancel_timer, timer); - - if (FRAMEP (frame)) - { - delete_frame (frame, Qnil); - deleted = Qt; - } - - return unbind_to (count, deleted); + return x_hide_tip (!tooltip_reuse_hidden_frame); } /*********************************************************************** @@ -7653,19 +8022,34 @@ lookup_vk_code (char *key) && strcmp (lispy_function_keys[i], key) == 0) return i; + if (w32_kbdhook_active) + { + /* Alphanumerics map to themselves. */ + if (key[1] == 0) + { + if (key[0] >= 'A' && key[0] <= 'Z' || + key[0] >= '0' && key[0] <= '9') + return key[0]; + if (key[0] >= 'a' && key[0] <= 'z') + return toupper(key[0]); + } + } + return -1; } /* Convert a one-element vector style key sequence to a hot key definition. */ static Lisp_Object -w32_parse_hot_key (Lisp_Object key) +w32_parse_and_hook_hot_key (Lisp_Object key, int hook) { /* Copied from Fdefine_key and store_in_keymap. */ register Lisp_Object c; int vk_code; int lisp_modifiers; int w32_modifiers; + Lisp_Object res = Qnil; + char* vkname; CHECK_VECTOR (key); @@ -7688,7 +8072,12 @@ w32_parse_hot_key (Lisp_Object key) c = Fcar (c); if (!SYMBOLP (c)) emacs_abort (); - vk_code = lookup_vk_code (SSDATA (SYMBOL_NAME (c))); + vkname = SSDATA (SYMBOL_NAME (c)); + /* [s-], [M-], [h-]: Register all keys for this modifier */ + if (w32_kbdhook_active && vkname[0] == 0) + vk_code = VK_ANY; + else + vk_code = lookup_vk_code (vkname); } else if (INTEGERP (c)) { @@ -7712,34 +8101,75 @@ w32_parse_hot_key (Lisp_Object key) #define MOD_WIN 0x0008 #endif - /* Convert lisp modifiers to Windows hot-key form. */ - w32_modifiers = (lisp_modifiers & hyper_modifier) ? MOD_WIN : 0; - w32_modifiers |= (lisp_modifiers & alt_modifier) ? MOD_ALT : 0; - w32_modifiers |= (lisp_modifiers & ctrl_modifier) ? MOD_CONTROL : 0; - w32_modifiers |= (lisp_modifiers & shift_modifier) ? MOD_SHIFT : 0; + if (w32_kbdhook_active) + { + /* Register Alt-x combinations. */ + if (lisp_modifiers & alt_modifier) + { + hook_w32_key (hook, VK_MENU, vk_code); + res = Qt; + } + /* Register Win-x combinations based on modifier mappings. */ + if (((lisp_modifiers & hyper_modifier) + && EQ (Vw32_lwindow_modifier, Qhyper)) + || ((lisp_modifiers & super_modifier) + && EQ (Vw32_lwindow_modifier, Qsuper))) + { + hook_w32_key (hook, VK_LWIN, vk_code); + res = Qt; + } + if (((lisp_modifiers & hyper_modifier) + && EQ (Vw32_rwindow_modifier, Qhyper)) + || ((lisp_modifiers & super_modifier) + && EQ (Vw32_rwindow_modifier, Qsuper))) + { + hook_w32_key (hook, VK_RWIN, vk_code); + res = Qt; + } + return res; + } + else + { + /* Convert lisp modifiers to Windows hot-key form. */ + w32_modifiers = (lisp_modifiers & hyper_modifier) ? MOD_WIN : 0; + w32_modifiers |= (lisp_modifiers & alt_modifier) ? MOD_ALT : 0; + w32_modifiers |= (lisp_modifiers & ctrl_modifier) ? MOD_CONTROL : 0; + w32_modifiers |= (lisp_modifiers & shift_modifier) ? MOD_SHIFT : 0; - return HOTKEY (vk_code, w32_modifiers); + return HOTKEY (vk_code, w32_modifiers); + } } DEFUN ("w32-register-hot-key", Fw32_register_hot_key, Sw32_register_hot_key, 1, 1, 0, doc: /* Register KEY as a hot-key combination. -Certain key combinations like Alt-Tab are reserved for system use on -Windows, and therefore are normally intercepted by the system. However, -most of these key combinations can be received by registering them as -hot-keys, overriding their special meaning. - -KEY must be a one element key definition in vector form that would be -acceptable to `define-key' (e.g. [A-tab] for Alt-Tab). The meta -modifier is interpreted as Alt if `w32-alt-is-meta' is t, and hyper -is always interpreted as the Windows modifier keys. - -The return value is the hotkey-id if registered, otherwise nil. */) +Certain key combinations like Alt-Tab and Win-R are reserved for +system use on Windows, and therefore are normally intercepted by the +system. These key combinations can be received by registering them +as hot-keys, except for Win-L which always locks the computer. + +On Windows 98 and ME, KEY must be a one element key definition in +vector form that would be acceptable to `define-key' (e.g. [A-tab] for +Alt-Tab). The meta modifier is interpreted as Alt if +`w32-alt-is-meta' is t, and hyper is always interpreted as the Windows +modifier keys. The return value is the hotkey-id if registered, otherwise nil. + +On Windows versions since NT, KEY can also be specified as [M-], [s-] or +[h-] to indicate that all combinations of that key should be processed +by Emacs instead of the operating system. The super and hyper +modifiers are interpreted according to the current values of +`w32-lwindow-modifier' and `w32-rwindow-modifier'. For instance, +setting `w32-lwindow-modifier' to `super' and then calling +`(register-hot-key [s-])' grabs all combinations of the left Windows +key to Emacs, but leaves the right Windows key free for the operating +system keyboard shortcuts. The return value is t if the call affected +any key combinations, otherwise nil. */) (Lisp_Object key) { - key = w32_parse_hot_key (key); + key = w32_parse_and_hook_hot_key (key, 1); - if (!NILP (key) && NILP (Fmemq (key, w32_grabbed_keys))) + if (!w32_kbdhook_active + && !NILP (key) && NILP (Fmemq (key, w32_grabbed_keys))) { /* Reuse an empty slot if possible. */ Lisp_Object item = Fmemq (Qnil, w32_grabbed_keys); @@ -7767,7 +8197,10 @@ DEFUN ("w32-unregister-hot-key", Fw32_unregister_hot_key, Lisp_Object item; if (!INTEGERP (key)) - key = w32_parse_hot_key (key); + key = w32_parse_and_hook_hot_key (key, 0); + + if (w32_kbdhook_active) + return key; item = Fmemq (key, w32_grabbed_keys); @@ -9315,12 +9748,13 @@ syms_of_w32fns (void) DEFSYM (Qctrl, "ctrl"); DEFSYM (Qcontrol, "control"); DEFSYM (Qshift, "shift"); - DEFSYM (Qfont_param, "font-parameter"); + DEFSYM (Qfont_parameter, "font-parameter"); DEFSYM (Qgeometry, "geometry"); DEFSYM (Qworkarea, "workarea"); DEFSYM (Qmm_size, "mm-size"); DEFSYM (Qframes, "frames"); DEFSYM (Qtip_frame, "tip-frame"); + DEFSYM (Qassq_delete_all, "assq-delete-all"); DEFSYM (Qunicode_sip, "unicode-sip"); #if defined WINDOWSNT && !defined HAVE_DBUS DEFSYM (QCicon, ":icon"); @@ -9333,10 +9767,10 @@ syms_of_w32fns (void) #endif /* Symbols used elsewhere, but only in MS-Windows-specific code. */ - DEFSYM (Qgnutls_dll, "gnutls"); - DEFSYM (Qlibxml2_dll, "libxml2"); + DEFSYM (Qgnutls, "gnutls"); + DEFSYM (Qlibxml2, "libxml2"); DEFSYM (Qserif, "serif"); - DEFSYM (Qzlib_dll, "zlib"); + DEFSYM (Qzlib, "zlib"); Fput (Qundefined_color, Qerror_conditions, listn (CONSTYPE_PURE, 2, Qundefined_color, Qerror)); @@ -9374,11 +9808,15 @@ When non-nil, the Start menu is opened by tapping the key. If you set this to nil, the left \"Windows\" key is processed by Emacs according to the value of `w32-lwindow-modifier', which see. -Note that some combinations of the left \"Windows\" key with other keys are -caught by Windows at low level, and so binding them in Emacs will have no -effect. For example, -r always pops up the Windows Run dialog, -- pops up the "System Properties" dialog, etc. However, see -the doc string of `w32-phantom-key-code'. */); +Note that some combinations of the left \"Windows\" key with other +keys are caught by Windows at low level. For example, -r +pops up the Windows Run dialog, - pops up the "System +Properties" dialog, etc. On Windows 10, no \"Windows\" key +combinations are normally handed to applications. To enable Emacs to +process \"Windows\" key combinations, use the function +`w32-register-hot-key`. + +For Windows 98/ME, see the doc string of `w32-phantom-key-code'. */); Vw32_pass_lwindow_to_system = Qt; DEFVAR_LISP ("w32-pass-rwindow-to-system", @@ -9389,11 +9827,15 @@ When non-nil, the Start menu is opened by tapping the key. If you set this to nil, the right \"Windows\" key is processed by Emacs according to the value of `w32-rwindow-modifier', which see. -Note that some combinations of the right \"Windows\" key with other keys are -caught by Windows at low level, and so binding them in Emacs will have no -effect. For example, -r always pops up the Windows Run dialog, -- pops up the "System Properties" dialog, etc. However, see -the doc string of `w32-phantom-key-code'. */); +Note that some combinations of the right \"Windows\" key with other +keys are caught by Windows at low level. For example, -r +pops up the Windows Run dialog, - pops up the "System +Properties" dialog, etc. On Windows 10, no \"Windows\" key +combinations are normally handed to applications. To enable Emacs to +process \"Windows\" key combinations, use the function +`w32-register-hot-key`. + +For Windows 98/ME, see the doc string of `w32-phantom-key-code'. */); Vw32_pass_rwindow_to_system = Qt; DEFVAR_LISP ("w32-phantom-key-code", @@ -9403,7 +9845,11 @@ Value is a number between 0 and 255. Phantom key presses are generated in order to stop the system from acting on \"Windows\" key events when `w32-pass-lwindow-to-system' or -`w32-pass-rwindow-to-system' is nil. */); +`w32-pass-rwindow-to-system' is nil. + +This variable is only used on Windows 98 and ME. For other Windows +versions, see the documentation of the `w32-register-hot-key` +function. */); /* Although 255 is technically not a valid key code, it works and means that this hack won't interfere with any real key code. */ XSETINT (Vw32_phantom_key_code, 255); @@ -9433,7 +9879,9 @@ Any other value will cause the Scroll Lock key to be ignored. */); doc: /* Modifier to use for the left \"Windows\" key. The value can be hyper, super, meta, alt, control or shift for the respective modifier, or nil to appear as the `lwindow' key. -Any other value will cause the key to be ignored. */); +Any other value will cause the key to be ignored. + +Also see the documentation of the `w32-register-hot-key` function. */); Vw32_lwindow_modifier = Qnil; DEFVAR_LISP ("w32-rwindow-modifier", @@ -9441,7 +9889,9 @@ Any other value will cause the key to be ignored. */); doc: /* Modifier to use for the right \"Windows\" key. The value can be hyper, super, meta, alt, control or shift for the respective modifier, or nil to appear as the `rwindow' key. -Any other value will cause the key to be ignored. */); +Any other value will cause the key to be ignored. + +Also see the documentation of the `w32-register-hot-key` function. */); Vw32_rwindow_modifier = Qnil; DEFVAR_LISP ("w32-apps-modifier", @@ -9617,6 +10067,18 @@ Default is nil. This variable has effect only on Windows Vista and later. */); w32_disable_new_uniscribe_apis = 0; + DEFVAR_LISP ("w32-tooltip-extra-pixels", + Vw32_tooltip_extra_pixels, + doc: /* Number of pixels added after tooltip text. +On Windows some fonts may cause the last character of a tooltip be +truncated or wrapped around to the next line. Adding some extra space +at the end of the toooltip works around this problem. + +This variable specifies the number of pixels that shall be added. The +default value t means to add the width of one canonical character of the +tip frame. */); + Vw32_tooltip_extra_pixels = Qt; + #if 0 /* TODO: Port to W32 */ defsubr (&Sx_change_window_property); defsubr (&Sx_delete_window_property); diff --git a/src/w32inevt.c b/src/w32inevt.c index 867425f0bf..2269d31805 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c @@ -41,6 +41,7 @@ along with GNU Emacs. If not, see . */ #include "termchar.h" /* for Mouse_HLInfo, tty_display_info */ #include "w32term.h" #include "w32inevt.h" +#include "w32common.h" /* stdin, from w32console.c */ extern HANDLE keyboard_handle; @@ -148,10 +149,12 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead) switch (event->wVirtualKeyCode) { case VK_LWIN: - mod_key_state &= ~LEFT_WIN_PRESSED; + if (!w32_kbdhook_active) + mod_key_state &= ~LEFT_WIN_PRESSED; break; case VK_RWIN: - mod_key_state &= ~RIGHT_WIN_PRESSED; + if (!w32_kbdhook_active) + mod_key_state &= ~RIGHT_WIN_PRESSED; break; case VK_APPS: mod_key_state &= ~APPS_PRESSED; @@ -185,7 +188,8 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead) keybd_event (faked_key, (BYTE) MapVirtualKey (faked_key, 0), 0, 0); } } - mod_key_state |= LEFT_WIN_PRESSED; + if (!w32_kbdhook_active) + mod_key_state |= LEFT_WIN_PRESSED; if (!NILP (Vw32_lwindow_modifier)) return 0; break; @@ -201,7 +205,8 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead) keybd_event (faked_key, (BYTE) MapVirtualKey (faked_key, 0), 0, 0); } } - mod_key_state |= RIGHT_WIN_PRESSED; + if (!w32_kbdhook_active) + mod_key_state |= RIGHT_WIN_PRESSED; if (!NILP (Vw32_rwindow_modifier)) return 0; break; @@ -267,6 +272,13 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead) /* Recognize state of Windows and Apps keys. */ event->dwControlKeyState |= mod_key_state; + if (w32_kbdhook_active) + { + if (check_w32_winkey_state (VK_LWIN)) + event->dwControlKeyState |= LEFT_WIN_PRESSED; + if (check_w32_winkey_state (VK_RWIN)) + event->dwControlKeyState |= RIGHT_WIN_PRESSED; + } /* Distinguish numeric keypad keys from extended keys. */ event->wVirtualKeyCode = @@ -608,70 +620,89 @@ maybe_generate_resize_event (void) int handle_file_notifications (struct input_event *hold_quit) { - BYTE *p = file_notifications; - FILE_NOTIFY_INFORMATION *fni = (PFILE_NOTIFY_INFORMATION)p; - const DWORD min_size - = offsetof (FILE_NOTIFY_INFORMATION, FileName) + sizeof(wchar_t); - struct input_event inev; + struct notifications_set *ns = NULL; int nevents = 0; + int done = 0; /* We cannot process notification before Emacs is fully initialized, since we need the UTF-16LE coding-system to be set up. */ if (!initialized) { - notification_buffer_in_use = 0; return nevents; } - enter_crit (); - if (notification_buffer_in_use) + while (!done) { - DWORD info_size = notifications_size; - Lisp_Object cs = Qutf_16le; - Lisp_Object obj = w32_get_watch_object (notifications_desc); - - /* notifications_size could be zero when the buffer of - notifications overflowed on the OS level, or when the - directory being watched was itself deleted. Do nothing in - that case. */ - if (info_size - && !NILP (obj) && CONSP (obj)) - { - Lisp_Object callback = XCDR (obj); + ns = NULL; - EVENT_INIT (inev); + /* Find out if there is a record available in the linked list of + notifications sets. If so, unlink te set from the linked list. + Use the critical section. */ + enter_crit (); + if (notifications_set_head->next != notifications_set_head) + { + ns = notifications_set_head->next; + ns->prev->next = ns->next; + ns->next->prev = ns->prev; + } + else + done = 1; + leave_crit(); - while (info_size >= min_size) + if (ns) + { + BYTE *p = ns->notifications; + FILE_NOTIFY_INFORMATION *fni = (PFILE_NOTIFY_INFORMATION)p; + const DWORD min_size + = offsetof (FILE_NOTIFY_INFORMATION, FileName) + sizeof(wchar_t); + struct input_event inev; + DWORD info_size = ns->size; + Lisp_Object cs = Qutf_16le; + Lisp_Object obj = w32_get_watch_object (ns->desc); + + /* notifications size could be zero when the buffer of + notifications overflowed on the OS level, or when the + directory being watched was itself deleted. Do nothing in + that case. */ + if (info_size + && !NILP (obj) && CONSP (obj)) { - Lisp_Object utf_16_fn - = make_unibyte_string ((char *)fni->FileName, - fni->FileNameLength); - /* Note: mule-conf is preloaded, so utf-16le must - already be defined at this point. */ - Lisp_Object fname - = code_convert_string_norecord (utf_16_fn, cs, 0); - Lisp_Object action = lispy_file_action (fni->Action); - - inev.kind = FILE_NOTIFY_EVENT; - inev.timestamp = GetTickCount (); - inev.modifiers = 0; - inev.frame_or_window = callback; - inev.arg = Fcons (action, fname); - inev.arg = list3 (make_pointer_integer (notifications_desc), - action, fname); - kbd_buffer_store_event_hold (&inev, hold_quit); - nevents++; - - if (!fni->NextEntryOffset) - break; - p += fni->NextEntryOffset; - fni = (PFILE_NOTIFY_INFORMATION)p; - info_size -= fni->NextEntryOffset; + Lisp_Object callback = XCDR (obj); + + EVENT_INIT (inev); + + while (info_size >= min_size) + { + Lisp_Object utf_16_fn + = make_unibyte_string ((char *)fni->FileName, + fni->FileNameLength); + /* Note: mule-conf is preloaded, so utf-16le must + already be defined at this point. */ + Lisp_Object fname + = code_convert_string_norecord (utf_16_fn, cs, 0); + Lisp_Object action = lispy_file_action (fni->Action); + + inev.kind = FILE_NOTIFY_EVENT; + inev.timestamp = GetTickCount (); + inev.modifiers = 0; + inev.frame_or_window = callback; + inev.arg = Fcons (action, fname); + inev.arg = list3 (make_pointer_integer (ns->desc), + action, fname); + kbd_buffer_store_event_hold (&inev, hold_quit); + nevents++; + if (!fni->NextEntryOffset) + break; + p += fni->NextEntryOffset; + fni = (PFILE_NOTIFY_INFORMATION)p; + info_size -= fni->NextEntryOffset; + } } + /* Free this notification set. */ + free (ns->notifications); + free (ns); } - notification_buffer_in_use = 0; } - leave_crit (); return nevents; } #else /* !HAVE_W32NOTIFY */ diff --git a/src/w32notify.c b/src/w32notify.c index 586c2062f6..54d9bcc189 100644 --- a/src/w32notify.c +++ b/src/w32notify.c @@ -22,27 +22,30 @@ along with GNU Emacs. If not, see . */ For each watch request, we launch a separate worker thread. The worker thread runs the watch_worker function, which issues an - asynchronous call to ReadDirectoryChangesW, and then waits in - SleepEx for that call to complete. Waiting in SleepEx puts the - thread in an "alertable" state, so it wakes up when either (a) the - call to ReadDirectoryChangesW completes, or (b) the main thread - instructs the worker thread to terminate by sending it an APC, see - below. + asynchronous call to ReadDirectoryChangesW, and then calls + WaitForSingleObjectEx to wait that an event be signaled + to terminate the thread. + Waiting with WaitForSingleObjectEx puts the thread in an + "alertable" state, so it wakes up when either (a) the call to + ReadDirectoryChangesW completes, or (b) the main thread instructs + the worker thread to terminate by signaling an event, see below. When the ReadDirectoryChangesW call completes, its completion routine watch_completion is automatically called. watch_completion - stashes the received file events in a buffer used to communicate - them to the main thread (using a critical section, so that several - threads could use the same buffer), posts a special message, - WM_EMACS_FILENOTIFY, to the Emacs's message queue, and returns. - That causes the SleepEx function call inside watch_worker to - return, and watch_worker then issues another call to - ReadDirectoryChangesW. (Except when it does not, see below.) + stashes the received file events in a linked list used to + communicate them to the main thread (using a critical section, so + that several threads could alter the same linked list), posts a + special message, WM_EMACS_FILENOTIFY, to the Emacs's message queue, + and returns. That causes the WaitForSingleObjectEx function call + inside watch_worker to return, but the thread won't terminate until + the event telling to do so will be signaled. The completion + routine issued another call to ReadDirectoryChangesW as quickly as + possible. (Except when it does not, see below.) In a GUI session, the WM_EMACS_FILENOTIFY message posted to the message queue gets dispatched to the main Emacs window procedure, which queues it for processing by w32_read_socket. When - w32_read_socket sees this message, it accesses the buffer with file + w32_read_socket sees this message, it accesses the linked list with file notifications (using a critical section), extracts the information, converts it to a series of FILE_NOTIFY_EVENT events, and stuffs them into the input event queue to be processed by keyboard.c input @@ -53,7 +56,7 @@ along with GNU Emacs. If not, see . */ procedures in console programs. That message wakes up MsgWaitForMultipleObjects inside sys_select, which then signals to its caller that some keyboard input is available. This causes - w32_console_read_socket to be called, which accesses the buffer + w32_console_read_socket to be called, which accesses the linked list with file notifications and stuffs them into the input event queue for keyboard.c to process. @@ -62,24 +65,21 @@ along with GNU Emacs. If not, see . */ bound to a command. The default binding is file-notify-handle-event, defined on subr.el. - After w32_read_socket or w32_console_read_socket are done - processing the notifications, they reset a flag signaling to all - watch worker threads that the notifications buffer is available for - more input. + Routines w32_read_socket or w32_console_read_socket process notifications + sets as long as some are available. When the watch is removed by a call to w32notify-rm-watch, the main - thread requests that the worker thread terminates by queuing an APC - for the worker thread. The APC specifies the watch_end function to - be called. watch_end calls CancelIo on the outstanding - ReadDirectoryChangesW call and closes the handle on which the - watched directory was open. When watch_end returns, the - watch_completion function is called one last time with the - ERROR_OPERATION_ABORTED status, which causes it to clean up and set - a flag telling watch_worker to exit without issuing another - ReadDirectoryChangesW call. Since watch_worker is the thread - procedure of the worker thread, exiting it causes the thread to - exit. The main thread waits for some time for the worker thread to - exit, and if it doesn't, terminates it forcibly. */ + thread requests that the worker thread terminates by signaling the + appropriate event and queuing an APC for the worker thread. The + APC specifies the watch_end function to be called. watch_end calls + CancelIo on the outstanding ReadDirectoryChangesW call. When + watch_end returns, the watch_completion function is called one last + time with the ERROR_OPERATION_ABORTED status, which causes it to + clean up and set a flag telling watch_worker to exit without + issuing another ReadDirectoryChangesW call. Since watch_worker is + the thread procedure of the worker thread, exiting it causes the + thread to exit. The main thread waits for some time for the worker + thread to exit, and if it doesn't, terminates it forcibly. */ #include #include @@ -98,6 +98,7 @@ along with GNU Emacs. If not, see . */ #include "frame.h" /* needed by termhooks.h */ #include "termhooks.h" /* for FILE_NOTIFY_EVENT */ +#define DIRWATCH_BUFFER_SIZE 16384 #define DIRWATCH_SIGNATURE 0x01233210 struct notification { @@ -108,73 +109,52 @@ struct notification { char *watchee; /* the file we are interested in, UTF-8 encoded */ HANDLE dir; /* handle to the watched directory */ HANDLE thr; /* handle to the thread that watches */ - volatile int terminate; /* if non-zero, request for the thread to terminate */ + HANDLE terminate; /* event signaling the thread to terminate */ unsigned signature; }; /* Used for communicating notifications to the main thread. */ -volatile int notification_buffer_in_use; -BYTE file_notifications[16384]; -DWORD notifications_size; -void *notifications_desc; +struct notifications_set *notifications_set_head; static Lisp_Object watch_list; /* Signal to the main thread that we have file notifications for it to process. */ static void -send_notifications (BYTE *info, DWORD info_size, void *desc, - volatile int *terminate) +send_notifications (struct notifications_set *ns) { int done = 0; struct frame *f = SELECTED_FRAME (); - /* A single buffer is used to communicate all notifications to the - main thread. Since both the main thread and several watcher - threads could be active at the same time, we use a critical area - and an "in-use" flag to synchronize them. A watcher thread can - only put its notifications in the buffer if it acquires the - critical area and finds the "in-use" flag reset. The main thread - resets the flag after it is done processing notifications. - - FIXME: is there a better way of dealing with this? */ - while (!done && !*terminate) - { + /* We add the current notification set to the linked list. Use the + critical section to make sure only one thread will access the + linked list. */ enter_crit (); - if (!notification_buffer_in_use) - { - if (info_size) - memcpy (file_notifications, info, - min (info_size, sizeof (file_notifications))); - notifications_size = min (info_size, sizeof (file_notifications)); - notifications_desc = desc; - /* If PostMessage fails, the message queue is full. If that - happens, the last thing they will worry about is file - notifications. So we effectively discard the - notification in that case. */ - if ((FRAME_TERMCAP_P (f) - /* We send the message to the main (a.k.a. "Lisp") - thread, where it will wake up MsgWaitForMultipleObjects - inside sys_select, causing it to report that there's - some keyboard input available. This will in turn cause - w32_console_read_socket to be called, which will pick - up the file notifications. */ - && PostThreadMessage (dwMainThreadId, WM_EMACS_FILENOTIFY, 0, 0)) - || (FRAME_W32_P (f) - && PostMessage (FRAME_W32_WINDOW (f), - WM_EMACS_FILENOTIFY, 0, 0)) - /* When we are running in batch mode, there's no one to - send a message, so we just signal the data is - available and hope sys_select will be called soon and - will read the data. */ - || (FRAME_INITIAL_P (f) && noninteractive)) - notification_buffer_in_use = 1; - done = 1; - } - leave_crit (); - if (!done) - Sleep (5); - } + ns->next = notifications_set_head; + ns->prev = notifications_set_head->prev; + ns->prev->next = ns; + notifications_set_head->prev = ns; + leave_crit(); + + /* If PostMessage fails, the message queue is full. If that + happens, the last thing they will worry about is file + notifications. So we effectively discard the notification in + that case. */ + if (FRAME_TERMCAP_P (f)) + /* We send the message to the main (a.k.a. "Lisp") thread, where + it will wake up MsgWaitForMultipleObjects inside sys_select, + causing it to report that there's some keyboard input + available. This will in turn cause w32_console_read_socket to + be called, which will pick up the file notifications. */ + PostThreadMessage (dwMainThreadId, WM_EMACS_FILENOTIFY, 0, 0); + else if (FRAME_W32_P (f)) + PostMessage (FRAME_W32_WINDOW (f), + WM_EMACS_FILENOTIFY, 0, 0); + /* When we are running in batch mode, there's no one to send a + message, so we just signal the data is available and hope + sys_select will be called soon and will read the data. */ + else if (FRAME_INITIAL_P (f) && noninteractive) + ; } /* An APC routine to cancel outstanding directory watch. Invoked by @@ -188,10 +168,7 @@ watch_end (ULONG_PTR arg) HANDLE hdir = (HANDLE)arg; if (hdir && hdir != INVALID_HANDLE_VALUE) - { - CancelIo (hdir); - CloseHandle (hdir); - } + CancelIo (hdir); } /* A completion routine (a.k.a. "APC function") for handling events @@ -202,13 +179,19 @@ VOID CALLBACK watch_completion (DWORD status, DWORD bytes_ret, OVERLAPPED *io_info) { struct notification *dirwatch; + DWORD _bytes; + struct notifications_set *ns = NULL; + BOOL terminate = FALSE; /* Who knows what happened? Perhaps the OVERLAPPED structure was freed by someone already? In any case, we cannot do anything with this request, so just punt and skip it. FIXME: should we raise the 'terminate' flag in this case? */ if (!io_info) - return; + { + DebPrint(("watch_completion: io_info is null.\n")); + return; + } /* We have a pointer to our dirwatch structure conveniently stashed away in the hEvent member of the OVERLAPPED struct. According to @@ -216,26 +199,69 @@ watch_completion (DWORD status, DWORD bytes_ret, OVERLAPPED *io_info) of the OVERLAPPED structure is not used by the system, so you can use it yourself." */ dirwatch = (struct notification *)io_info->hEvent; + if (status == ERROR_OPERATION_ABORTED) { /* We've been called because the main thread told us to issue CancelIo on the directory we watch, and watch_end did so. - The directory handle is already closed. We should clean up - and exit, signaling to the thread worker routine not to - issue another call to ReadDirectoryChangesW. Note that we - don't free the dirwatch object itself nor the memory consumed - by its buffers; this is done by the main thread in - remove_watch. Calling malloc/free from a thread other than - the main thread is a no-no. */ - dirwatch->dir = NULL; - dirwatch->terminate = 1; + We must exit, without issuing another call to + ReadDirectoryChangesW. */ + return; } - else + + /* We allocate a new set of notifications to be linked to the linked + list of notifications set. This will be processed by Emacs event + loop in the main thread. We need to duplicate the notifications + buffer, but not the dirwatch structure. */ + + /* Implementation note: In general, allocating memory in non-main + threads is a no-no in Emacs. We certainly cannot call xmalloc + and friends, because it can longjmp when allocation fails, which + will crash Emacs because the jmp_buf is set up to a location on + the main thread's stack. However, we can call 'malloc' directly, + since that is redirected to HeapAlloc that uses our private heap, + see w32heap.c, and that is thread-safe. */ + ns = malloc (sizeof(struct notifications_set)); + if (ns) + { + memset (ns, 0, sizeof(struct notifications_set)); + ns->notifications = malloc (bytes_ret); + if (ns->notifications) + { + memcpy (ns->notifications, dirwatch->buf, bytes_ret); + ns->size = bytes_ret; + ns->desc = dirwatch; + } + else + { + free (ns); + ns = NULL; + } + } + if (ns == NULL) + DebPrint(("Out of memory. Notifications lost.")); + + /* Calling ReadDirectoryChangesW quickly to watch again for new + notifications. */ + if (!ReadDirectoryChangesW (dirwatch->dir, dirwatch->buf, + DIRWATCH_BUFFER_SIZE, dirwatch->subtree, + dirwatch->filter, &_bytes, dirwatch->io_info, + watch_completion)) { - /* Tell the main thread we have notifications for it. */ - send_notifications (dirwatch->buf, bytes_ret, dirwatch, - &dirwatch->terminate); + DebPrint (("ReadDirectoryChangesW error: %lu\n", GetLastError ())); + /* If this call fails, it means that the directory is not + watchable any more. We need to terminate the worker thread. + Still, we will wait until the current notifications have been + sent to the main thread. */ + terminate = TRUE; } + + if (ns) + send_notifications(ns); + + /* If we were asked to terminate the thread, then fire the event. */ + if (terminate) + SetEvent(dirwatch->terminate); } /* Worker routine for the watch thread. */ @@ -243,42 +269,43 @@ static DWORD WINAPI watch_worker (LPVOID arg) { struct notification *dirwatch = (struct notification *)arg; + BOOL bErr; + DWORD _bytes = 0; + DWORD status; + + if (dirwatch->dir) + { + bErr = ReadDirectoryChangesW (dirwatch->dir, dirwatch->buf, + DIRWATCH_BUFFER_SIZE, dirwatch->subtree, + dirwatch->filter, &_bytes, + dirwatch->io_info, watch_completion); + if (!bErr) + { + DebPrint (("ReadDirectoryChangesW: %lu\n", GetLastError ())); + /* We cannot remove the dirwatch object from watch_list, + because we are in a separate thread. For the same + reason, we also cannot free memory consumed by the + buffers allocated for the dirwatch object. So we close + the directory handle, but do not free the object itself + or its buffers. We also don't touch the signature. This + way, remove_watch can still identify the object, remove + it, and free its memory. */ + CloseHandle (dirwatch->dir); + dirwatch->dir = NULL; + return 1; + } + } do { - BOOL status; - DWORD bytes_ret = 0; - - if (dirwatch->dir) - { - status = ReadDirectoryChangesW (dirwatch->dir, dirwatch->buf, 16384, - dirwatch->subtree, dirwatch->filter, - &bytes_ret, - dirwatch->io_info, watch_completion); - if (!status) - { - DebPrint (("watch_worker, abnormal exit: %lu\n", GetLastError ())); - /* We cannot remove the dirwatch object from watch_list, - because we are in a separate thread. For the same - reason, we also cannot free memory consumed by the - buffers allocated for the dirwatch object. So we close - the directory handle, but do not free the object itself - or its buffers. We also don't touch the signature. - This way, remove_watch can still identify the object, - remove it, and free its memory. */ - CloseHandle (dirwatch->dir); - dirwatch->dir = NULL; - return 1; - } - } - /* Sleep indefinitely until awoken by the I/O completion, which - could be either a change notification or a cancellation of the - watch. */ - SleepEx (INFINITE, TRUE); - } while (!dirwatch->terminate); + status = WaitForSingleObjectEx(dirwatch->terminate, INFINITE, TRUE); + } while (status == WAIT_IO_COMPLETION); + + /* The thread is about to terminate, so we clean up the dir handle. */ + CloseHandle (dirwatch->dir); + dirwatch->dir = NULL; return 0; } - /* Launch a thread to watch changes to FILE in a directory open on handle HDIR. */ static struct notification * @@ -287,7 +314,7 @@ start_watching (const char *file, HANDLE hdir, BOOL subdirs, DWORD flags) struct notification *dirwatch = xzalloc (sizeof (struct notification)); dirwatch->signature = DIRWATCH_SIGNATURE; - dirwatch->buf = xmalloc (16384); + dirwatch->buf = xmalloc (DIRWATCH_BUFFER_SIZE); dirwatch->io_info = xzalloc (sizeof(OVERLAPPED)); /* Stash a pointer to dirwatch structure for use by the completion routine. According to MSDN documentation of ReadDirectoryChangesW: @@ -297,7 +324,9 @@ start_watching (const char *file, HANDLE hdir, BOOL subdirs, DWORD flags) dirwatch->subtree = subdirs; dirwatch->filter = flags; dirwatch->watchee = xstrdup (file); - dirwatch->terminate = 0; + + dirwatch->terminate = CreateEvent(NULL, FALSE, FALSE, NULL); + dirwatch->dir = hdir; /* See w32proc.c where it calls CreateThread for the story behind @@ -307,11 +336,11 @@ start_watching (const char *file, HANDLE hdir, BOOL subdirs, DWORD flags) if (!dirwatch->thr) { + CloseHandle(dirwatch->terminate); xfree (dirwatch->buf); xfree (dirwatch->io_info); xfree (dirwatch->watchee); xfree (dirwatch); - dirwatch = NULL; } return dirwatch; } @@ -370,7 +399,10 @@ add_watch (const char *parent_dir, const char *file, BOOL subdirs, DWORD flags) return NULL; if ((dirwatch = start_watching (file, hdir, subdirs, flags)) == NULL) - CloseHandle (hdir); + { + CloseHandle (hdir); + dirwatch->dir = NULL; + } return dirwatch; } @@ -383,7 +415,7 @@ remove_watch (struct notification *dirwatch) { int i; BOOL status; - DWORD exit_code, err; + DWORD exit_code = 0, err; /* Only the thread that issued the outstanding I/O call can call CancelIo on it. (CancelIoEx is available only since Vista.) @@ -391,12 +423,10 @@ remove_watch (struct notification *dirwatch) to terminate. */ if (!QueueUserAPC (watch_end, dirwatch->thr, (ULONG_PTR)dirwatch->dir)) DebPrint (("QueueUserAPC failed (%lu)!\n", GetLastError ())); - /* We also set the terminate flag, for when the thread is - waiting on the critical section that never gets acquired. - FIXME: is there a cleaner method? Using SleepEx there is a - no-no, as that will lead to recursive APC invocations and - stack overflow. */ - dirwatch->terminate = 1; + + /* We also signal the thread that it can terminate. */ + SetEvent(dirwatch->terminate); + /* Wait for the thread to exit. FIXME: is there a better method that is not overly complex? */ for (i = 0; i < 50; i++) @@ -406,11 +436,13 @@ remove_watch (struct notification *dirwatch) break; Sleep (10); } + if ((status == FALSE && (err = GetLastError ()) == ERROR_INVALID_HANDLE) || exit_code == STILL_ACTIVE) { if (!(status == FALSE && err == ERROR_INVALID_HANDLE)) { + DebPrint(("Forcing thread termination.\n")); TerminateThread (dirwatch->thr, 0); if (dirwatch->dir) CloseHandle (dirwatch->dir); @@ -423,11 +455,11 @@ remove_watch (struct notification *dirwatch) CloseHandle (dirwatch->thr); dirwatch->thr = NULL; } + CloseHandle(dirwatch->terminate); xfree (dirwatch->buf); xfree (dirwatch->io_info); xfree (dirwatch->watchee); xfree (dirwatch); - return 0; } else diff --git a/src/w32select.c b/src/w32select.c index 138fe853c4..a29f5f6627 100644 --- a/src/w32select.c +++ b/src/w32select.c @@ -256,7 +256,7 @@ render (Lisp_Object oformat) switch (format) { case CF_UNICODETEXT: - htext = convert_to_handle_as_coded (QUNICODE); + htext = convert_to_handle_as_coded (Qutf_16le_dos); break; case CF_TEXT: case CF_OEMTEXT: @@ -1109,7 +1109,7 @@ After the communication, this variable is set to nil. */); current_text = Qnil; staticpro (¤t_text); current_coding_system = Qnil; staticpro (¤t_coding_system); - DEFSYM (QUNICODE, "utf-16le-dos"); + DEFSYM (Qutf_16le_dos, "utf-16le-dos"); QANSICP = Qnil; staticpro (&QANSICP); QOEMCP = Qnil; staticpro (&QOEMCP); } @@ -1132,7 +1132,7 @@ globals_of_w32select (void) QOEMCP = coding_from_cp (OEMCP); if (os_subtype == OS_NT) - Vselection_coding_system = QUNICODE; + Vselection_coding_system = Qutf_16le_dos; else if (inhibit_window_system) Vselection_coding_system = QOEMCP; else diff --git a/src/w32term.c b/src/w32term.c index 51743f8f94..74ea6b543b 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -3211,71 +3211,85 @@ static void queue_notifications (struct input_event *event, W32Msg *msg, struct frame *f, int *evcount) { - BYTE *p = file_notifications; - FILE_NOTIFY_INFORMATION *fni = (PFILE_NOTIFY_INFORMATION)p; - const DWORD min_size - = offsetof (FILE_NOTIFY_INFORMATION, FileName) + sizeof(wchar_t); + struct notifications_set *ns = NULL; Lisp_Object frame; + int done = 0; /* We cannot process notification before Emacs is fully initialized, since we need the UTF-16LE coding-system to be set up. */ if (!initialized) - { - notification_buffer_in_use = 0; - return; - } + return; XSETFRAME (frame, f); - enter_crit (); - if (notification_buffer_in_use) + while (!done) { - DWORD info_size = notifications_size; - Lisp_Object cs = Qutf_16le; - Lisp_Object obj = w32_get_watch_object (notifications_desc); - - /* notifications_size could be zero when the buffer of - notifications overflowed on the OS level, or when the - directory being watched was itself deleted. Do nothing in - that case. */ - if (info_size - && !NILP (obj) && CONSP (obj)) + ns = NULL; + + /* Find out if there is a record available in the linked list of + notifications sets. If so, unlink the set from the linked + list. Use critical section. */ + enter_crit (); + if (notifications_set_head->next != notifications_set_head) { - Lisp_Object callback = XCDR (obj); + ns = notifications_set_head->next; + ns->prev->next = ns->next; + ns->next->prev = ns->prev; + } + else + done = 1; + leave_crit(); - while (info_size >= min_size) + if (ns) + { + BYTE *p = ns->notifications; + FILE_NOTIFY_INFORMATION *fni = (PFILE_NOTIFY_INFORMATION)p; + const DWORD min_size + = offsetof (FILE_NOTIFY_INFORMATION, FileName) + sizeof(wchar_t); + DWORD info_size = ns->size; + Lisp_Object cs = Qutf_16le; + Lisp_Object obj = w32_get_watch_object (ns->desc); + + /* notifications size could be zero when the buffer of + notifications overflowed on the OS level, or when the + directory being watched was itself deleted. Do nothing in + that case. */ + if (info_size + && !NILP (obj) && CONSP (obj)) { - Lisp_Object utf_16_fn - = make_unibyte_string ((char *)fni->FileName, - fni->FileNameLength); - /* Note: mule-conf is preloaded, so utf-16le must - already be defined at this point. */ - Lisp_Object fname - = code_convert_string_norecord (utf_16_fn, cs, 0); - Lisp_Object action = lispy_file_action (fni->Action); - - event->kind = FILE_NOTIFY_EVENT; - event->timestamp = msg->msg.time; - event->modifiers = 0; - event->frame_or_window = callback; - event->arg = list3 (make_pointer_integer (notifications_desc), - action, fname); - kbd_buffer_store_event (event); - (*evcount)++; - - if (!fni->NextEntryOffset) - break; - p += fni->NextEntryOffset; - fni = (PFILE_NOTIFY_INFORMATION)p; - info_size -= fni->NextEntryOffset; + Lisp_Object callback = XCDR (obj); + + while (info_size >= min_size) + { + Lisp_Object utf_16_fn + = make_unibyte_string ((char *)fni->FileName, + fni->FileNameLength); + /* Note: mule-conf is preloaded, so utf-16le must + already be defined at this point. */ + Lisp_Object fname + = code_convert_string_norecord (utf_16_fn, cs, 0); + Lisp_Object action = lispy_file_action (fni->Action); + + event->kind = FILE_NOTIFY_EVENT; + event->timestamp = msg->msg.time; + event->modifiers = 0; + event->frame_or_window = callback; + event->arg = list3 (make_pointer_integer (ns->desc), + action, fname); + kbd_buffer_store_event (event); + (*evcount)++; + if (!fni->NextEntryOffset) + break; + p += fni->NextEntryOffset; + fni = (PFILE_NOTIFY_INFORMATION)p; + info_size -= fni->NextEntryOffset; + } } + /* Free this notifications set. */ + xfree (ns->notifications); + xfree (ns); } - notification_buffer_in_use = 0; } - else - DebPrint (("We were promised notifications, but in-use flag is zero!\n")); - leave_crit (); - /* We've stuffed all the events ourselves, so w32_read_socket shouldn't. */ event->kind = NO_EVENT; } @@ -6951,6 +6965,8 @@ w32_init_main_thread (void) DuplicateHandle (GetCurrentProcess (), GetCurrentThread (), GetCurrentProcess (), &hMainThread, 0, TRUE, DUPLICATE_SAME_ACCESS); + + } DWORD WINAPI w32_msg_worker (void * arg); diff --git a/src/w32term.h b/src/w32term.h index 2fed56ed79..8585c8190d 100644 --- a/src/w32term.h +++ b/src/w32term.h @@ -727,10 +727,18 @@ extern void x_delete_display (struct w32_display_info *dpyinfo); extern void x_query_color (struct frame *, XColor *); -extern volatile int notification_buffer_in_use; -extern BYTE file_notifications[16384]; -extern DWORD notifications_size; -extern void *notifications_desc; +#define FILE_NOTIFICATIONS_SIZE 16384 +/* Notifications come in sets. We use a doubly linked list with a + sentinel to communicate those sets from the watching threads to the + main thread. */ +struct notifications_set { + LPBYTE notifications; + DWORD size; + void *desc; + struct notifications_set *next; + struct notifications_set *prev; +}; +extern struct notifications_set *notifications_set_head; extern Lisp_Object w32_get_watch_object (void *); extern Lisp_Object lispy_file_action (DWORD); extern int handle_file_notifications (struct input_event *); @@ -738,6 +746,16 @@ extern int handle_file_notifications (struct input_event *); extern void w32_initialize_display_info (Lisp_Object); extern void initialize_w32_display (struct terminal *, int *, int *); +#ifdef WINDOWSNT +/* Keyboard hooks. */ +extern void setup_w32_kbdhook (void); +extern void remove_w32_kbdhook (void); +extern int check_w32_winkey_state (int); +#define w32_kbdhook_active (os_subtype != OS_9X) +#else +#define w32_kbdhook_active 0 +#endif + /* Keypad command key support. W32 doesn't have virtual keys defined for the function keys on the keypad (they are mapped to the standard function keys), so we define our own. */ diff --git a/src/w32xfns.c b/src/w32xfns.c index 04bf5ce733..b5b22c9aa5 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c @@ -48,6 +48,21 @@ init_crit (void) when the input queue is empty, so make it a manual reset event. */ input_available = CreateEvent (NULL, TRUE, FALSE, NULL); +#if HAVE_W32NOTIFY + /* Initialize the linked list of notifications sets that will be + used to communicate between the watching worker threads and the + main thread. */ + notifications_set_head = malloc (sizeof(struct notifications_set)); + if (notifications_set_head) + { + memset (notifications_set_head, 0, sizeof(struct notifications_set)); + notifications_set_head->next + = notifications_set_head->prev = notifications_set_head; + } + else + DebPrint(("Out of memory: can't initialize notifications sets.")); +#endif + #ifdef WINDOWSNT keyboard_handle = input_available; #endif /* WINDOWSNT */ @@ -76,6 +91,23 @@ delete_crit (void) CloseHandle (interrupt_handle); interrupt_handle = NULL; } + +#if HAVE_W32NOTIFY + if (notifications_set_head) + { + /* Free any remaining notifications set that could be left over. */ + while (notifications_set_head->next != notifications_set_head) + { + struct notifications_set *ns = notifications_set_head->next; + notifications_set_head->next = ns->next; + ns->next->prev = notifications_set_head; + if (ns->notifications) + free (ns->notifications); + free (ns); + } + } + free (notifications_set_head); +#endif } void diff --git a/src/window.c b/src/window.c index 733cf75d13..cf7fa44ae4 100644 --- a/src/window.c +++ b/src/window.c @@ -57,6 +57,7 @@ static bool foreach_window_1 (struct window *, static bool window_resize_check (struct window *, bool); static void window_resize_apply (struct window *, bool); static void select_window_1 (Lisp_Object, bool); +static void run_window_configuration_change_hook (struct frame *); static struct window *set_window_fringes (struct window *, Lisp_Object, Lisp_Object, Lisp_Object); @@ -720,6 +721,36 @@ the height of the screen areas spanned by its children. */) return make_number (decode_valid_window (window)->pixel_height); } +DEFUN ("window-pixel-width-before-size-change", + Fwindow_pixel_width_before_size_change, + Swindow_pixel_width_before_size_change, 0, 1, 0, + doc: /* Return pixel width of window WINDOW before last size changes. +WINDOW must be a valid window and defaults to the selected one. + +The return value is the pixel width of WINDOW at the last time +`window-size-change-functions' was run. It's zero if WINDOW was made +after that. */) + (Lisp_Object window) +{ + return (make_number + (decode_valid_window (window)->pixel_width_before_size_change)); +} + +DEFUN ("window-pixel-height-before-size-change", + Fwindow_pixel_height_before_size_change, + Swindow_pixel_height_before_size_change, 0, 1, 0, + doc: /* Return pixel height of window WINDOW before last size changes. +WINDOW must be a valid window and defaults to the selected one. + +The return value is the pixel height of WINDOW at the last time +`window-size-change-functions' was run. It's zero if WINDOW was made +after that. */) + (Lisp_Object window) +{ + return (make_number + (decode_valid_window (window)->pixel_height_before_size_change)); +} + DEFUN ("window-total-height", Fwindow_total_height, Swindow_total_height, 0, 2, 0, doc: /* Return the height of window WINDOW in lines. WINDOW must be a valid window and defaults to the selected one. @@ -2828,9 +2859,12 @@ selected frame and no others. */) static Lisp_Object -resize_root_window (Lisp_Object window, Lisp_Object delta, Lisp_Object horizontal, Lisp_Object ignore, Lisp_Object pixelwise) +resize_root_window (Lisp_Object window, Lisp_Object delta, + Lisp_Object horizontal, Lisp_Object ignore, + Lisp_Object pixelwise) { - return call5 (Qwindow_resize_root_window, window, delta, horizontal, ignore, pixelwise); + return call5 (Qwindow__resize_root_window, window, delta, + horizontal, ignore, pixelwise); } /* Placeholder used by temacs -nw before window.el is loaded. */ @@ -2846,14 +2880,14 @@ DEFUN ("window--sanitize-window-sizes", Fwindow__sanitize_window_sizes, Lisp_Object sanitize_window_sizes (Lisp_Object frame, Lisp_Object horizontal) { - return call2 (Qwindow_sanitize_window_sizes, frame, horizontal); + return call2 (Qwindow__sanitize_window_sizes, frame, horizontal); } static Lisp_Object window_pixel_to_total (Lisp_Object frame, Lisp_Object horizontal) { - return call2 (Qwindow_pixel_to_total, frame, horizontal); + return call2 (Qwindow__pixel_to_total, frame, horizontal); } @@ -2879,6 +2913,7 @@ window-start value is reasonable when this function is called. */) Lisp_Object sibling, pwindow, swindow IF_LINT (= Qnil), delta; ptrdiff_t startpos IF_LINT (= 0), startbyte IF_LINT (= 0); int top IF_LINT (= 0), new_top; + bool resize_failed = false; w = decode_valid_window (window); XSETWINDOW (window, w); @@ -2978,8 +3013,6 @@ window-start value is reasonable when this function is called. */) fset_redisplay (f); Vwindow_list = Qnil; - FRAME_WINDOW_SIZES_CHANGED (f) = true; - bool resize_failed = false; if (!WINDOW_LEAF_P (w)) { @@ -3157,7 +3190,7 @@ select_frame_norecord (Lisp_Object frame) Fselect_frame (frame, Qt); } -void +static void run_window_configuration_change_hook (struct frame *f) { ptrdiff_t count = SPECPDL_INDEX (); @@ -3229,6 +3262,76 @@ If WINDOW is omitted or nil, it defaults to the selected window. */) return Qnil; } + +/* Compare old and present pixel sizes of windows in tree rooted at W. + Return true iff any of these windows differs in size. */ + +static bool +window_size_changed (struct window *w) +{ + if (w->pixel_width != w->pixel_width_before_size_change + || w->pixel_height != w->pixel_height_before_size_change) + return true; + + if (WINDOW_INTERNAL_P (w)) + { + w = XWINDOW (w->contents); + while (w) + { + if (window_size_changed (w)) + return true; + + w = NILP (w->next) ? 0 : XWINDOW (w->next); + } + } + + return false; +} + +/* Set before size change pixel sizes of windows in tree rooted at W to + their present pixel sizes. */ + +static void +window_set_before_size_change_sizes (struct window *w) +{ + w->pixel_width_before_size_change = w->pixel_width; + w->pixel_height_before_size_change = w->pixel_height; + + if (WINDOW_INTERNAL_P (w)) + { + w = XWINDOW (w->contents); + while (w) + { + window_set_before_size_change_sizes (w); + w = NILP (w->next) ? 0 : XWINDOW (w->next); + } + } +} + + +void +run_window_size_change_functions (Lisp_Object frame) +{ + struct frame *f = XFRAME (frame); + struct window *r = XWINDOW (FRAME_ROOT_WINDOW (f)); + Lisp_Object functions = Vwindow_size_change_functions; + + if (FRAME_WINDOW_CONFIGURATION_CHANGED (f) + || window_size_changed (r)) + { + while (CONSP (functions)) + { + if (!EQ (XCAR (functions), Qt)) + safe_call1 (XCAR (functions), frame); + functions = XCDR (functions); + } + + window_set_before_size_change_sizes (r); + FRAME_WINDOW_CONFIGURATION_CHANGED (f) = false; + } +} + + /* Make WINDOW display BUFFER. RUN_HOOKS_P means it's allowed to run hooks. See make_frame for a case where it's not allowed. KEEP_MARGINS_P means that the current margins, fringes, and @@ -3263,15 +3366,9 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, if (!(keep_margins_p && samebuf)) { /* If we're not actually changing the buffer, don't reset hscroll - and vscroll. This case happens for example when called from - change_frame_size_1, where we use a dummy call to - Fset_window_buffer on the frame's selected window (and no - other) just in order to run window-configuration-change-hook - (no longer true since change_frame_size_1 directly calls - run_window_configuration_change_hook). Resetting hscroll and - vscroll here is problematic for things like image-mode and - doc-view-mode since it resets the image's position whenever we - resize the frame. */ + and vscroll. Resetting hscroll and vscroll here is problematic + for things like image-mode and doc-view-mode since it resets + the image's position whenever we resize the frame. */ w->hscroll = w->min_hscroll = w->hscroll_whole = 0; w->suspend_auto_hscroll = false; w->vscroll = 0; @@ -3283,10 +3380,8 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, w->start_at_line_beg = false; w->force_start = false; } - /* Maybe we could move this into the `if' but it's not obviously safe and - I doubt it's worth the trouble. */ - wset_redisplay (w); + wset_redisplay (w); wset_update_mode_line (w); /* We must select BUFFER to run the window-scroll-functions and to look up @@ -3314,7 +3409,7 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, if (run_hooks_p) { - if (! NILP (Vwindow_scroll_functions)) + if (!NILP (Vwindow_scroll_functions)) run_hook_with_args_2 (Qwindow_scroll_functions, window, Fmarker_position (w->start)); if (!samebuf) @@ -3559,6 +3654,8 @@ make_window (void) w->phys_cursor_width = -1; #endif w->sequence_number = ++sequence_number; + w->pixel_width_before_size_change = 0; + w->pixel_height_before_size_change = 0; w->scroll_bar_width = -1; w->scroll_bar_height = -1; w->column_number_displayed = -1; @@ -3922,7 +4019,6 @@ be applied on the Elisp level. */) window_resize_apply (r, horflag); fset_redisplay (f); - FRAME_WINDOW_SIZES_CHANGED (f) = true; adjust_frame_glyphs (f); unblock_input (); @@ -4089,7 +4185,6 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise) } } - FRAME_WINDOW_SIZES_CHANGED (f) = true; fset_redisplay (f); } @@ -4216,7 +4311,6 @@ set correctly. See the code of `split-window' for how this is done. */) p = XWINDOW (o->parent); fset_redisplay (f); - FRAME_WINDOW_SIZES_CHANGED (f) = true; new = make_window (); n = XWINDOW (new); wset_frame (n, frame); @@ -4385,7 +4479,6 @@ Signal an error when WINDOW is the only window on its frame. */) fset_redisplay (f); Vwindow_list = Qnil; - FRAME_WINDOW_SIZES_CHANGED (f) = true; wset_next (w, Qnil); /* Don't delete w->next too. */ free_window_matrices (w); @@ -4453,9 +4546,6 @@ Signal an error when WINDOW is the only window on its frame. */) } else unblock_input (); - - /* Must be run by the caller: - run_window_configuration_change_hook (f); */ } else /* We failed: Relink WINDOW into window tree. */ @@ -4498,7 +4588,7 @@ grow_mini_window (struct window *w, int delta, bool pixelwise) { root = FRAME_ROOT_WINDOW (f); r = XWINDOW (root); - height = call3 (Qwindow_resize_root_window_vertically, + height = call3 (Qwindow__resize_root_window_vertically, root, make_number (- delta), pixelwise ? Qt : Qnil); if (INTEGERP (height) && window_resize_check (r, false)) { @@ -4529,10 +4619,12 @@ grow_mini_window (struct window *w, int delta, bool pixelwise) /* Enforce full redisplay of the frame. */ /* FIXME: Shouldn't window--resize-root-window-vertically do it? */ fset_redisplay (f); - FRAME_WINDOW_SIZES_CHANGED (f) = true; adjust_frame_glyphs (f); unblock_input (); } + else + error ("Failed to grow minibuffer window"); + } } @@ -4553,7 +4645,7 @@ shrink_mini_window (struct window *w, bool pixelwise) { root = FRAME_ROOT_WINDOW (f); r = XWINDOW (root); - delta = call3 (Qwindow_resize_root_window_vertically, + delta = call3 (Qwindow__resize_root_window_vertically, root, make_number (height - unit), pixelwise ? Qt : Qnil); if (INTEGERP (delta) && window_resize_check (r, false)) @@ -4569,7 +4661,6 @@ shrink_mini_window (struct window *w, bool pixelwise) /* Enforce full redisplay of the frame. */ /* FIXME: Shouldn't window--resize-root-window-vertically do it? */ fset_redisplay (f); - FRAME_WINDOW_SIZES_CHANGED (f) = true; adjust_frame_glyphs (f); unblock_input (); } @@ -4577,6 +4668,8 @@ shrink_mini_window (struct window *w, bool pixelwise) one window frame here. The same routine will be needed when shrinking the frame (and probably when making the initial *scratch* window). For the moment leave things as they are. */ + else + error ("Failed to shrink minibuffer window"); } } @@ -4612,7 +4705,6 @@ DEFUN ("resize-mini-window-internal", Fresize_mini_window_internal, Sresize_mini w->top_line = r->top_line + r->total_lines; fset_redisplay (f); - FRAME_WINDOW_SIZES_CHANGED (f) = true; adjust_frame_glyphs (f); unblock_input (); return Qt; @@ -5950,6 +6042,7 @@ struct saved_window Lisp_Object window, buffer, start, pointm, old_pointm; Lisp_Object pixel_left, pixel_top, pixel_height, pixel_width; + Lisp_Object pixel_height_before_size_change, pixel_width_before_size_change; Lisp_Object left_col, top_line, total_cols, total_lines; Lisp_Object normal_cols, normal_lines; Lisp_Object hscroll, min_hscroll, hscroll_whole, suspend_auto_hscroll; @@ -6065,6 +6158,12 @@ the return value is nil. Otherwise the value is t. */) struct window *root_window; struct window **leaf_windows; ptrdiff_t i, k, n_leaf_windows; + /* Records whether a window has been added or removed wrt the + original configuration. */ + bool window_changed = false; + /* Records whether a window has changed its buffer wrt the + original configuration. */ + bool buffer_changed = false; /* Don't do this within the main loop below: This may call Lisp code and is thus potentially unsafe while input is blocked. */ @@ -6073,6 +6172,12 @@ the return value is nil. Otherwise the value is t. */) p = SAVED_WINDOW_N (saved_windows, k); window = p->window; w = XWINDOW (window); + + if (NILP (w->contents)) + /* A dead window that will be resurrected, the window + configuration will change. */ + window_changed = true; + if (BUFFERP (w->contents) && !EQ (w->contents, p->buffer) && BUFFER_LIVE_P (XBUFFER (p->buffer))) @@ -6102,7 +6207,6 @@ the return value is nil. Otherwise the value is t. */) } fset_redisplay (f); - FRAME_WINDOW_SIZES_CHANGED (f) = true; /* Problem: Freeing all matrices and later allocating them again is a serious redisplay flickering problem. What we would @@ -6158,6 +6262,10 @@ the return value is nil. Otherwise the value is t. */) w->pixel_top = XFASTINT (p->pixel_top); w->pixel_width = XFASTINT (p->pixel_width); w->pixel_height = XFASTINT (p->pixel_height); + w->pixel_width_before_size_change + = XFASTINT (p->pixel_width_before_size_change); + w->pixel_height_before_size_change + = XFASTINT (p->pixel_height_before_size_change); w->left_col = XFASTINT (p->left_col); w->top_line = XFASTINT (p->top_line); w->total_cols = XFASTINT (p->total_cols); @@ -6205,6 +6313,9 @@ the return value is nil. Otherwise the value is t. */) if (BUFFERP (p->buffer) && BUFFER_LIVE_P (XBUFFER (p->buffer))) /* If saved buffer is alive, install it. */ { + if (!EQ (w->contents, p->buffer)) + /* Record buffer configuration change. */ + buffer_changed = true; wset_buffer (w, p->buffer); w->start_at_line_beg = !NILP (p->start_at_line_beg); set_marker_restricted (w->start, p->start, w->contents); @@ -6238,6 +6349,8 @@ the return value is nil. Otherwise the value is t. */) else if (!NILP (w->start)) /* Leaf window has no live buffer, get one. */ { + /* Record buffer configuration change. */ + buffer_changed = true; /* Get the buffer via other_buffer_safely in order to avoid showing an unimportant buffer and, if necessary, to recreate *scratch* in the course (part of Juanma's bs-show @@ -6285,7 +6398,10 @@ the return value is nil. Otherwise the value is t. */) /* Now, free glyph matrices in windows that were not reused. */ for (i = 0; i < n_leaf_windows; i++) if (NILP (leaf_windows[i]->contents)) - free_window_matrices (leaf_windows[i]); + { + free_window_matrices (leaf_windows[i]); + window_changed = true; + } /* Allow x_set_window_size again and apply frame size changes if needed. */ @@ -6305,7 +6421,8 @@ the return value is nil. Otherwise the value is t. */) /* Record the selected window's buffer here. The window should already be the selected one from the call above. */ - select_window (data->current_window, Qnil, false); + if (WINDOW_LIVE_P (data->current_window)) + select_window (data->current_window, Qnil, false); /* Fselect_window will have made f the selected frame, so we reselect the proper frame here. Fhandle_switch_frame will change the @@ -6315,7 +6432,32 @@ the return value is nil. Otherwise the value is t. */) if (FRAME_LIVE_P (XFRAME (data->selected_frame))) do_switch_frame (data->selected_frame, 0, 0, Qnil); - run_window_configuration_change_hook (f); + if (window_changed) + /* At least one window has been added or removed. Run + `window-configuration-change-hook' and make sure + `window-size-change-functions' get run later. + + We have to do this in order to capture the following + scenario: Suppose our frame contains two live windows W1 and + W2 and ‘set-window-configuration’ replaces them by two + windows W3 and W4 that were dead the last time + run_window_size_change_functions was run. If W3 and W4 have + the same values for their old and new pixel sizes but these + values differ from those of W1 and W2, the sizes of our + frame's two live windows changed but window_size_changed has + no means to detect that fact. + + Obviously, this will get us false positives, for example, + when we restore the original configuration with W1 and W2 + before run_window_size_change_functions gets called. */ + { + run_window_configuration_change_hook (f); + FRAME_WINDOW_CONFIGURATION_CHANGED (f) = true; + } + else if (buffer_changed) + /* At least one window has changed its buffer. Run + `window-configuration-change-hook' only. */ + run_window_configuration_change_hook (f); } if (!NILP (new_current_buffer)) @@ -6466,6 +6608,10 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, ptrdiff_t i) p->pixel_top = make_number (w->pixel_top); p->pixel_width = make_number (w->pixel_width); p->pixel_height = make_number (w->pixel_height); + p->pixel_width_before_size_change + = make_number (w->pixel_width_before_size_change); + p->pixel_height_before_size_change + = make_number (w->pixel_height_before_size_change); p->left_col = make_number (w->left_col); p->top_line = make_number (w->top_line); p->total_cols = make_number (w->total_cols); @@ -7166,10 +7312,11 @@ syms_of_window (void) DEFSYM (Qwindow_valid_p, "window-valid-p"); DEFSYM (Qwindow_deletable_p, "window-deletable-p"); DEFSYM (Qdelete_window, "delete-window"); - DEFSYM (Qwindow_resize_root_window, "window--resize-root-window"); - DEFSYM (Qwindow_resize_root_window_vertically, "window--resize-root-window-vertically"); - DEFSYM (Qwindow_sanitize_window_sizes, "window--sanitize-window-sizes"); - DEFSYM (Qwindow_pixel_to_total, "window--pixel-to-total"); + DEFSYM (Qwindow__resize_root_window, "window--resize-root-window"); + DEFSYM (Qwindow__resize_root_window_vertically, + "window--resize-root-window-vertically"); + DEFSYM (Qwindow__sanitize_window_sizes, "window--sanitize-window-sizes"); + DEFSYM (Qwindow__pixel_to_total, "window--pixel-to-total"); DEFSYM (Qsafe, "safe"); DEFSYM (Qdisplay_buffer, "display-buffer"); DEFSYM (Qreplace_buffer_in_windows, "replace-buffer-in-windows"); @@ -7248,6 +7395,16 @@ selected; while the global part is run only once for the modified frame, with the relevant frame selected. */); Vwindow_configuration_change_hook = Qnil; + DEFVAR_LISP ("window-size-change-functions", Vwindow_size_change_functions, + doc: /* Functions called during redisplay, if window sizes have changed. +The value should be a list of functions that take one argument. +During the first part of redisplay, for each frame, if any of its windows +have changed size since the last redisplay, or have been split or deleted, +all the functions in the list are called, with the frame as argument. +If redisplay decides to resize the minibuffer window, it calls these +functions on behalf of that as well. */); + Vwindow_size_change_functions = Qnil; + DEFVAR_LISP ("recenter-redisplay", Vrecenter_redisplay, doc: /* Non-nil means `recenter' redraws entire frame. If this option is non-nil, then the `recenter' command with a nil @@ -7376,6 +7533,8 @@ displayed after a scrolling operation to be somewhat inaccurate. */); defsubr (&Swindow_use_time); defsubr (&Swindow_pixel_width); defsubr (&Swindow_pixel_height); + defsubr (&Swindow_pixel_width_before_size_change); + defsubr (&Swindow_pixel_height_before_size_change); defsubr (&Swindow_total_width); defsubr (&Swindow_total_height); defsubr (&Swindow_normal_size); diff --git a/src/window.h b/src/window.h index 0cfff88be5..1fd19369c3 100644 --- a/src/window.h +++ b/src/window.h @@ -214,6 +214,11 @@ struct window int pixel_width; int pixel_height; + /* The pixel sizes of the window at the last time + `window-size-change-functions' was run. */ + int pixel_width_before_size_change; + int pixel_height_before_size_change; + /* The size of the window. */ int total_cols; int total_lines; @@ -499,15 +504,17 @@ wset_next_buffers (struct window *w, Lisp_Object val) #define WINDOW_LEAF_P(W) \ (BUFFERP ((W)->contents)) -/* True if W is a member of horizontal combination. */ +/* Non-nil if W is internal. */ +#define WINDOW_INTERNAL_P(W) \ + (WINDOWP ((W)->contents)) +/* True if W is a member of horizontal combination. */ #define WINDOW_HORIZONTAL_COMBINATION_P(W) \ - (WINDOWP ((W)->contents) && (W)->horizontal) + (WINDOW_INTERNAL_P (W) && (W)->horizontal) /* True if W is a member of vertical combination. */ - #define WINDOW_VERTICAL_COMBINATION_P(W) \ - (WINDOWP ((W)->contents) && !(W)->horizontal) + (WINDOW_INTERNAL_P (W) && !(W)->horizontal) /* WINDOW's XFRAME. */ #define WINDOW_XFRAME(W) (XFRAME (WINDOW_FRAME ((W)))) @@ -786,7 +793,7 @@ wset_next_buffers (struct window *w, Lisp_Object val) || WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (W)) #if (defined (HAVE_WINDOW_SYSTEM) \ - && ((defined (USE_TOOLKIT_SCROLL_BARS) && !defined (HAVE_NS)) \ + && ((defined (USE_TOOLKIT_SCROLL_BARS)) \ || defined (HAVE_NTGUI))) # define USE_HORIZONTAL_SCROLL_BARS true #else @@ -1013,7 +1020,7 @@ extern void grow_mini_window (struct window *, int, bool); extern void shrink_mini_window (struct window *, bool); extern int window_relative_x_coord (struct window *, enum window_part, int); -void run_window_configuration_change_hook (struct frame *f); +void run_window_size_change_functions (Lisp_Object); /* Make WINDOW display BUFFER. RUN_HOOKS_P means it's allowed to run hooks. See make_frame for a case where it's not allowed. */ diff --git a/src/xdisp.c b/src/xdisp.c index cc2c951ce5..d0ff95257c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -7080,6 +7080,19 @@ get_next_display_element (struct it *it) goto display_control; } + /* Handle non-ascii hyphens in the mode where it only + gets highlighting. */ + + if (nonascii_hyphen_p && EQ (Vnobreak_char_display, Qt)) + { + /* Merge `nobreak-space' into the current face. */ + face_id = merge_faces (it->f, Qnobreak_hyphen, 0, + it->face_id); + XSETINT (it->ctl_chars[0], '-'); + ctl_len = 1; + goto display_control; + } + /* Handle sequences that start with the "escape glyph". */ /* the default escape glyph is \. */ @@ -7096,15 +7109,6 @@ get_next_display_element (struct it *it) ? merge_faces (it->f, Qt, lface_id, it->face_id) : merge_escape_glyph_face (it)); - /* Draw non-ASCII hyphen with just highlighting: */ - - if (nonascii_hyphen_p && EQ (Vnobreak_char_display, Qt)) - { - XSETINT (it->ctl_chars[0], '-'); - ctl_len = 1; - goto display_control; - } - /* Draw non-ASCII space/hyphen with escape glyph: */ if (nonascii_space_p || nonascii_hyphen_p) @@ -9827,26 +9831,28 @@ the maximum pixel-height of all text lines. The optional argument FROM, if non-nil, specifies the first text position and defaults to the minimum accessible position of the buffer. -If FROM is t, use the minimum accessible position that is not a newline -character. TO, if non-nil, specifies the last text position and +If FROM is t, use the minimum accessible position that starts a +non-empty line. TO, if non-nil, specifies the last text position and defaults to the maximum accessible position of the buffer. If TO is t, -use the maximum accessible position that is not a newline character. +use the maximum accessible position that ends a non-empty line. The optional argument X-LIMIT, if non-nil, specifies the maximum text width that can be returned. X-LIMIT nil or omitted, means to use the -pixel-width of WINDOW's body; use this if you do not intend to change -the width of WINDOW. Use the maximum width WINDOW may assume if you -intend to change WINDOW's width. In any case, text whose x-coordinate -is beyond X-LIMIT is ignored. Since calculating the width of long lines -can take some time, it's always a good idea to make this argument as -small as possible; in particular, if the buffer contains long lines that -shall be truncated anyway. +pixel-width of WINDOW's body; use this if you want to know how high +WINDOW should be become in order to fit all of its buffer's text with +the width of WINDOW unaltered. Use the maximum width WINDOW may assume +if you intend to change WINDOW's width. In any case, text whose +x-coordinate is beyond X-LIMIT is ignored. Since calculating the width +of long lines can take some time, it's always a good idea to make this +argument as small as possible; in particular, if the buffer contains +long lines that shall be truncated anyway. The optional argument Y-LIMIT, if non-nil, specifies the maximum text -height that can be returned. Text lines whose y-coordinate is beyond -Y-LIMIT are ignored. Since calculating the text height of a large -buffer can take some time, it makes sense to specify this argument if -the size of the buffer is unknown. +height (excluding the height of the mode- or header-line, if any) that +can be returned. Text lines whose y-coordinate is beyond Y-LIMIT are +ignored. Since calculating the text height of a large buffer can take +some time, it makes sense to specify this argument if the size of the +buffer is large or unknown. Optional argument MODE-AND-HEADER-LINE nil or omitted means do not include the height of the mode- or header-line of WINDOW in the return @@ -9864,7 +9870,7 @@ include the height of both, if present, in the return value. */) ptrdiff_t start, end, pos; struct text_pos startp; void *itdata = NULL; - int c, max_y = -1, x = 0, y = 0; + int c, max_x = 0, max_y = 0, x = 0, y = 0; CHECK_BUFFER (buffer); b = XBUFFER (buffer); @@ -9909,11 +9915,13 @@ include the height of both, if present, in the return value. */) end = max (start, min (XINT (to), ZV)); } - if (!NILP (y_limit)) - { - CHECK_NUMBER (y_limit); - max_y = min (XINT (y_limit), INT_MAX); - } + if (!NILP (x_limit) && RANGED_INTEGERP (0, x_limit, INT_MAX)) + max_x = XINT (x_limit); + + if (NILP (y_limit)) + max_y = INT_MAX; + else if (RANGED_INTEGERP (0, y_limit, INT_MAX)) + max_y = XINT (y_limit); itdata = bidi_shelve_cache (); SET_TEXT_POS (startp, start, CHAR_TO_BYTE (start)); @@ -9923,27 +9931,30 @@ include the height of both, if present, in the return value. */) x = move_it_to (&it, end, -1, max_y, -1, MOVE_TO_POS | MOVE_TO_Y); else { - CHECK_NUMBER (x_limit); - it.last_visible_x = min (XINT (x_limit), INFINITY); + it.last_visible_x = max_x; /* Actually, we never want move_it_to stop at to_x. But to make sure that move_it_in_display_line_to always moves far enough, - we set it to INT_MAX and specify MOVE_TO_X. */ - x = move_it_to (&it, end, INT_MAX, max_y, -1, - MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); + we set it to INT_MAX and specify MOVE_TO_X. Also bound width + value by X-LIMIT. */ + x = min (move_it_to (&it, end, INT_MAX, max_y, -1, + MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y), + max_x); } - y = it.current_y + it.max_ascent + it.max_descent; + /* Subtract height of header-line which was counted automatically by + start_display. */ + y = min (it.current_y + it.max_ascent + it.max_descent + - WINDOW_HEADER_LINE_HEIGHT (w), + max_y); - if (!EQ (mode_and_header_line, Qheader_line) - && !EQ (mode_and_header_line, Qt)) - /* Do not count the header-line which was counted automatically by - start_display. */ - y = y - WINDOW_HEADER_LINE_HEIGHT (w); + if (EQ (mode_and_header_line, Qheader_line) + || EQ (mode_and_header_line, Qt)) + /* Re-add height of header-line as requested. */ + y = y + WINDOW_HEADER_LINE_HEIGHT (w); if (EQ (mode_and_header_line, Qmode_line) || EQ (mode_and_header_line, Qt)) - /* Do count the mode-line which is not included automatically by - start_display. */ + /* Add height of mode-line as requested. */ y = y + WINDOW_MODE_LINE_HEIGHT (w); bidi_unshelve_cache (itdata, false); @@ -10521,25 +10532,21 @@ update_echo_area (void) static void ensure_echo_area_buffers (void) { - int i; - - for (i = 0; i < 2; ++i) + for (int i = 0; i < 2; i++) if (!BUFFERP (echo_buffer[i]) || !BUFFER_LIVE_P (XBUFFER (echo_buffer[i]))) { - char name[30]; - Lisp_Object old_buffer; - int j; - - old_buffer = echo_buffer[i]; - echo_buffer[i] = Fget_buffer_create - (make_formatted_string (name, " *Echo Area %d*", i)); + Lisp_Object old_buffer = echo_buffer[i]; + static char const name_fmt[] = " *Echo Area %d*"; + char name[sizeof name_fmt + INT_STRLEN_BOUND (int)]; + AUTO_STRING_WITH_LEN (lname, name, sprintf (name, name_fmt, i)); + echo_buffer[i] = Fget_buffer_create (lname); bset_truncate_lines (XBUFFER (echo_buffer[i]), Qnil); /* to force word wrap in echo area - it was decided to postpone this*/ /* XBUFFER (echo_buffer[i])->word_wrap = Qt; */ - for (j = 0; j < 2; ++j) + for (int j = 0; j < 2; j++) if (EQ (old_buffer, echo_area_buffer[j])) echo_area_buffer[j] = echo_buffer[i]; } @@ -11826,24 +11833,7 @@ prepare_menu_bars (void) && !XBUFFER (w->contents)->text->redisplay) continue; - /* If a window on this frame changed size, report that to - the user and clear the size-change flag. */ - if (FRAME_WINDOW_SIZES_CHANGED (f)) - { - Lisp_Object functions; - - /* Clear flag first in case we get an error below. */ - FRAME_WINDOW_SIZES_CHANGED (f) = false; - functions = Vwindow_size_change_functions; - - while (CONSP (functions)) - { - if (!EQ (XCAR (functions), Qt)) - call1 (XCAR (functions), frame); - functions = XCDR (functions); - } - } - + run_window_size_change_functions (frame); menu_bar_hooks_run = update_menu_bar (f, false, menu_bar_hooks_run); #ifdef HAVE_WINDOW_SYSTEM update_tool_bar (f, false); @@ -13518,7 +13508,7 @@ redisplay_internal (void) specbind (Qinhibit_free_realized_faces, Qnil); /* Record this function, so it appears on the profiler's backtraces. */ - record_in_backtrace (Qredisplay_internal, 0, 0); + record_in_backtrace (Qredisplay_internal_xC_functionx, 0, 0); FOR_EACH_FRAME (tail, frame) XFRAME (frame)->already_hscrolled_p = false; @@ -13639,24 +13629,12 @@ redisplay_internal (void) it's too late for the hooks in window-size-change-functions, which have been examined already in prepare_menu_bars. So in that case we call the hooks here only for the selected frame. */ - if (sf->redisplay && FRAME_WINDOW_SIZES_CHANGED (sf)) + if (sf->redisplay) { - Lisp_Object functions; ptrdiff_t count1 = SPECPDL_INDEX (); record_unwind_save_match_data (); - - /* Clear flag first in case we get an error below. */ - FRAME_WINDOW_SIZES_CHANGED (sf) = false; - functions = Vwindow_size_change_functions; - - while (CONSP (functions)) - { - if (!EQ (XCAR (functions), Qt)) - call1 (XCAR (functions), selected_frame); - functions = XCDR (functions); - } - + run_window_size_change_functions (selected_frame); unbind_to (count1, Qnil); } @@ -13678,22 +13656,10 @@ redisplay_internal (void) { if (sf->redisplay) { - Lisp_Object functions; ptrdiff_t count1 = SPECPDL_INDEX (); record_unwind_save_match_data (); - - /* Clear flag first in case we get an error below. */ - FRAME_WINDOW_SIZES_CHANGED (sf) = false; - functions = Vwindow_size_change_functions; - - while (CONSP (functions)) - { - if (!EQ (XCAR (functions), Qt)) - call1 (XCAR (functions), selected_frame); - functions = XCDR (functions); - } - + run_window_size_change_functions (selected_frame); unbind_to (count1, Qnil); } @@ -14070,9 +14036,6 @@ redisplay_internal (void) } else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf)) { - Lisp_Object mini_window = FRAME_MINIBUF_WINDOW (sf); - struct frame *mini_frame; - displayed_buffer = XBUFFER (XWINDOW (selected_window)->contents); /* Use list_of_error, not Qerror, so that we catch only errors and don't run the debugger. */ @@ -14080,8 +14043,8 @@ redisplay_internal (void) list_of_error, redisplay_window_error); if (update_miniwindow_p) - internal_condition_case_1 (redisplay_window_1, mini_window, - list_of_error, + internal_condition_case_1 (redisplay_window_1, + FRAME_MINIBUF_WINDOW (sf), list_of_error, redisplay_window_error); /* Compare desired and current matrices, perform output. */ @@ -14131,8 +14094,8 @@ redisplay_internal (void) have put text on a frame other than the selected one, so the above call to update_frame would not have caught it. Catch it here. */ - mini_window = FRAME_MINIBUF_WINDOW (sf); - mini_frame = XFRAME (WINDOW_FRAME (XWINDOW (mini_window))); + Lisp_Object mini_window = FRAME_MINIBUF_WINDOW (sf); + struct frame *mini_frame = XFRAME (WINDOW_FRAME (XWINDOW (mini_window))); if (mini_frame != sf && FRAME_WINDOW_P (mini_frame)) { @@ -16122,6 +16085,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) bool last_line_misfit = false; ptrdiff_t beg_unchanged, end_unchanged; int frame_line_height; + bool use_desired_matrix; SET_TEXT_POS (lpoint, PT, PT_BYTE); opoint = lpoint; @@ -16844,7 +16808,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) startp = run_window_scroll_functions (window, it.current.pos); /* Redisplay the window. */ - bool use_desired_matrix = false; + use_desired_matrix = false; if (!current_matrix_up_to_date_p || windows_or_buffers_changed || f->cursor_type_changed @@ -31167,7 +31131,7 @@ syms_of_xdisp (void) /* Non-nil means don't actually do any redisplay. */ DEFSYM (Qinhibit_redisplay, "inhibit-redisplay"); - DEFSYM (Qredisplay_internal, "redisplay_internal (C function)"); + DEFSYM (Qredisplay_internal_xC_functionx, "redisplay_internal (C function)"); DEFVAR_BOOL("inhibit-message", inhibit_message, doc: /* Non-nil means calls to `message' are not displayed. @@ -31238,8 +31202,10 @@ They are still logged to the *Messages* buffer. */); /* Name and number of the face used to highlight escape glyphs. */ DEFSYM (Qescape_glyph, "escape-glyph"); - /* Name and number of the face used to highlight non-breaking spaces. */ + /* Name and number of the face used to highlight non-breaking + spaces/hyphens. */ DEFSYM (Qnobreak_space, "nobreak-space"); + DEFSYM (Qnobreak_hyphen, "nobreak-hyphen"); /* The symbol 'image' which is the car of the lists used to represent images in Lisp. Also a tool bar style. */ @@ -31351,7 +31317,7 @@ The face used for trailing whitespace is `trailing-whitespace'. */); doc: /* Control highlighting of non-ASCII space and hyphen chars. If the value is t, Emacs highlights non-ASCII chars which have the same appearance as an ASCII space or hyphen, using the `nobreak-space' -or `escape-glyph' face respectively. +or `nobreak-hyphen' face respectively. U+00A0 (no-break space), U+00AD (soft hyphen), U+2010 (hyphen), and U+2011 (non-breaking hyphen) are affected. @@ -31504,16 +31470,6 @@ If nil, disable message logging. If t, log messages but don't truncate the buffer when it becomes large. */); Vmessage_log_max = make_number (1000); - DEFVAR_LISP ("window-size-change-functions", Vwindow_size_change_functions, - doc: /* Functions called during redisplay, if window sizes have changed. -The value should be a list of functions that take one argument. -During the first part of redisplay, for each frame, if any of its windows -have changed size since the last redisplay, or have been split or deleted, -all the functions in the list are called, with the frame as argument. -If redisplay decides to resize the minibuffer window, it calls these -functions on behalf of that as well. */); - Vwindow_size_change_functions = Qnil; - DEFVAR_LISP ("window-scroll-functions", Vwindow_scroll_functions, doc: /* List of functions to call before redisplaying a window with scrolling. Each function is called with two arguments, the window and its new diff --git a/src/xfns.c b/src/xfns.c index b22af5c830..9ff77738c1 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1313,7 +1313,6 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) } #endif /* not USE_X_TOOLKIT && not USE_GTK */ adjust_frame_glyphs (f); - run_window_configuration_change_hook (f); } @@ -3129,7 +3128,7 @@ x_default_font_parameter (struct frame *f, Lisp_Object parms) { /* Remember the explicit font parameter, so we can re-apply it after we've applied the `default' face settings. */ - AUTO_FRAME_ARG (arg, Qfont_param, font_param); + AUTO_FRAME_ARG (arg, Qfont_parameter, font_param); x_set_frame_parameters (f, arg); } @@ -5318,8 +5317,6 @@ no value of TYPE (always string in the MS Windows case). */) Tool tips ***********************************************************************/ -static Lisp_Object x_create_tip_frame (struct x_display_info *, - Lisp_Object, Lisp_Object); static void compute_tip_xy (struct frame *, Lisp_Object, Lisp_Object, Lisp_Object, int, int, int *, int *); @@ -5363,9 +5360,7 @@ unwind_create_tip_frame (Lisp_Object frame) when this happens. */ static Lisp_Object -x_create_tip_frame (struct x_display_info *dpyinfo, - Lisp_Object parms, - Lisp_Object text) +x_create_tip_frame (struct x_display_info *dpyinfo, Lisp_Object parms) { struct frame *f; Lisp_Object frame; @@ -5373,8 +5368,6 @@ x_create_tip_frame (struct x_display_info *dpyinfo, int width, height; ptrdiff_t count = SPECPDL_INDEX (); bool face_change_before = face_change; - Lisp_Object buffer; - struct buffer *old_buffer; int x_width = 0, x_height = 0; if (!dpyinfo->terminal->name) @@ -5390,23 +5383,9 @@ x_create_tip_frame (struct x_display_info *dpyinfo, error ("Invalid frame name--not a string or nil"); frame = Qnil; - f = make_frame (true); + f = make_frame (false); + f->wants_modeline = false; XSETFRAME (frame, f); - - AUTO_STRING (tip, " *tip*"); - buffer = Fget_buffer_create (tip); - /* Use set_window_buffer instead of Fset_window_buffer (see - discussion of bug#11984, bug#12025, bug#12026). */ - set_window_buffer (FRAME_ROOT_WINDOW (f), buffer, false, false); - old_buffer = current_buffer; - set_buffer_internal_1 (XBUFFER (buffer)); - bset_truncate_lines (current_buffer, Qnil); - specbind (Qinhibit_read_only, Qt); - specbind (Qinhibit_modification_hooks, Qt); - Ferase_buffer (); - Finsert (1, &text); - set_buffer_internal_1 (old_buffer); - record_unwind_protect (unwind_create_tip_frame, frame); f->terminal = dpyinfo->terminal; @@ -5648,8 +5627,6 @@ x_create_tip_frame (struct x_display_info *dpyinfo, { Lisp_Object bg = Fframe_parameter (frame, Qbackground_color); - /* Set tip_frame here, so that */ - tip_frame = frame; call2 (Qface_set_after_frame_default, frame, Qnil); if (!EQ (bg, Fframe_parameter (frame, Qbackground_color))) @@ -5788,6 +5765,85 @@ compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx, Lisp_Object } +/* Hide tooltip. Delete its frame if DELETE is true. */ +static Lisp_Object +x_hide_tip (bool delete) +{ + if (!NILP (tip_timer)) + { + call1 (Qcancel_timer, tip_timer); + tip_timer = Qnil; + } + + + if (NILP (tip_frame) + || (!delete && FRAMEP (tip_frame) + && !FRAME_VISIBLE_P (XFRAME (tip_frame)))) + return Qnil; + else + { + ptrdiff_t count; + Lisp_Object was_open = Qnil; + + count = SPECPDL_INDEX (); + specbind (Qinhibit_redisplay, Qt); + specbind (Qinhibit_quit, Qt); + +#ifdef USE_GTK + { + /* When using system tooltip, tip_frame is the Emacs frame on + which the tip is shown. */ + struct frame *f = XFRAME (tip_frame); + + if (FRAME_LIVE_P (f) && xg_hide_tooltip (f)) + { + tip_frame = Qnil; + was_open = Qt; + } + } +#endif + + if (FRAMEP (tip_frame)) + { + if (delete) + { + delete_frame (tip_frame, Qnil); + tip_frame = Qnil; + } + else + x_make_frame_invisible (XFRAME (tip_frame)); + + was_open = Qt; + +#ifdef USE_LUCID + /* Bloodcurdling hack alert: The Lucid menu bar widget's + redisplay procedure is not called when a tip frame over + menu items is unmapped. Redisplay the menu manually... */ + { + Widget w; + struct frame *f = SELECTED_FRAME (); + if (FRAME_X_P (f) && FRAME_LIVE_P (f)) + { + w = f->output_data.x->menubar_widget; + + if (!DoesSaveUnders (FRAME_DISPLAY_INFO (f)->screen) + && w != NULL) + { + block_input (); + xlwmenu_redisplay (w); + unblock_input (); + } + } + } +#endif /* USE_LUCID */ + } + else + tip_frame = Qnil; + + return unbind_to (count, was_open); + } +} + DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, doc: /* Show STRING in a "tooltip" window on frame FRAME. A tooltip window is a small X window displaying a string. @@ -5820,15 +5876,17 @@ A tooltip's maximum size is specified by `x-max-tooltip-size'. Text larger than the specified size is clipped. */) (Lisp_Object string, Lisp_Object frame, Lisp_Object parms, Lisp_Object timeout, Lisp_Object dx, Lisp_Object dy) { - struct frame *f; + struct frame *f, *tip_f; struct window *w; int root_x, root_y; struct buffer *old_buffer; struct text_pos pos; - int i, width, height; - bool seen_reversed_p; + int width, height; int old_windows_or_buffers_changed = windows_or_buffers_changed; ptrdiff_t count = SPECPDL_INDEX (); + ptrdiff_t count_1; + Lisp_Object window, size; + AUTO_STRING (tip, " *tip*"); specbind (Qinhibit_redisplay, Qt); @@ -5877,22 +5935,23 @@ Text larger than the specified size is clipped. */) if (NILP (last_show_tip_args)) last_show_tip_args = Fmake_vector (make_number (3), Qnil); - if (!NILP (tip_frame)) + if (FRAMEP (tip_frame) && FRAME_LIVE_P (XFRAME (tip_frame))) { Lisp_Object last_string = AREF (last_show_tip_args, 0); Lisp_Object last_frame = AREF (last_show_tip_args, 1); Lisp_Object last_parms = AREF (last_show_tip_args, 2); - if (EQ (frame, last_frame) - && !NILP (Fequal (last_string, string)) + if (FRAME_VISIBLE_P (XFRAME (tip_frame)) + && EQ (frame, last_frame) + && !NILP (Fequal_including_properties (last_string, string)) && !NILP (Fequal (last_parms, parms))) { - struct frame *tip_f = XFRAME (tip_frame); - /* Only DX and DY have changed. */ + tip_f = XFRAME (tip_frame); if (!NILP (tip_timer)) { Lisp_Object timer = tip_timer; + tip_timer = Qnil; call1 (Qcancel_timer, timer); } @@ -5903,41 +5962,102 @@ Text larger than the specified size is clipped. */) XMoveWindow (FRAME_X_DISPLAY (tip_f), FRAME_X_WINDOW (tip_f), root_x, root_y); unblock_input (); + goto start_timer; } - } + else if (tooltip_reuse_hidden_frame && EQ (frame, last_frame)) + { + bool delete = false; + Lisp_Object tail, elt, parm, last; + + /* Check if every parameter in PARMS has the same value in + last_parms unless it should be ignored by means of + Vtooltip_reuse_hidden_frame_parameters. This may destruct + last_parms which, however, will be recreated below. */ + for (tail = parms; CONSP (tail); tail = XCDR (tail)) + { + elt = XCAR (tail); + parm = Fcar (elt); + /* The left, top, right and bottom parameters are handled + by compute_tip_xy so they can be ignored here. */ + if (!EQ (parm, Qleft) && !EQ (parm, Qtop) + && !EQ (parm, Qright) && !EQ (parm, Qbottom)) + { + last = Fassq (parm, last_parms); + if (NILP (Fequal (Fcdr (elt), Fcdr (last)))) + { + /* We lost, delete the old tooltip. */ + delete = true; + break; + } + else + last_parms = call2 (Qassq_delete_all, parm, last_parms); + } + else + last_parms = call2 (Qassq_delete_all, parm, last_parms); + } - /* Hide a previous tip, if any. */ - Fx_hide_tip (); + /* Now check if every parameter in what is left of last_parms + with a non-nil value has an association in PARMS unless it + should be ignored by means of + Vtooltip_reuse_hidden_frame_parameters. */ + for (tail = last_parms; CONSP (tail); tail = XCDR (tail)) + { + elt = XCAR (tail); + parm = Fcar (elt); + if (!EQ (parm, Qleft) && !EQ (parm, Qtop) && !EQ (parm, Qright) + && !EQ (parm, Qbottom) && !NILP (Fcdr (elt))) + { + /* We lost, delete the old tooltip. */ + delete = true; + break; + } + } + + x_hide_tip (delete); + } + else + x_hide_tip (true); + } + else + x_hide_tip (true); ASET (last_show_tip_args, 0, string); ASET (last_show_tip_args, 1, frame); ASET (last_show_tip_args, 2, parms); - /* Add default values to frame parameters. */ - if (NILP (Fassq (Qname, parms))) - parms = Fcons (Fcons (Qname, build_string ("tooltip")), parms); - if (NILP (Fassq (Qinternal_border_width, parms))) - parms = Fcons (Fcons (Qinternal_border_width, make_number (3)), parms); - if (NILP (Fassq (Qborder_width, parms))) - parms = Fcons (Fcons (Qborder_width, make_number (1)), parms); - if (NILP (Fassq (Qbottom_divider_width, parms))) - parms = Fcons (Fcons (Qbottom_divider_width, make_number (0)), parms); - if (NILP (Fassq (Qright_divider_width, parms))) - parms = Fcons (Fcons (Qright_divider_width, make_number (0)), parms); - if (NILP (Fassq (Qborder_color, parms))) - parms = Fcons (Fcons (Qborder_color, build_string ("lightyellow")), parms); - if (NILP (Fassq (Qbackground_color, parms))) - parms = Fcons (Fcons (Qbackground_color, build_string ("lightyellow")), - parms); - - /* Create a frame for the tooltip, and record it in the global - variable tip_frame. */ - frame = x_create_tip_frame (FRAME_DISPLAY_INFO (f), parms, string); - f = XFRAME (frame); - - /* Set up the frame's root window. */ - w = XWINDOW (FRAME_ROOT_WINDOW (f)); + if (!FRAMEP (tip_frame) || !FRAME_LIVE_P (XFRAME (tip_frame))) + { + /* Add default values to frame parameters. */ + if (NILP (Fassq (Qname, parms))) + parms = Fcons (Fcons (Qname, build_string ("tooltip")), parms); + if (NILP (Fassq (Qinternal_border_width, parms))) + parms = Fcons (Fcons (Qinternal_border_width, make_number (3)), parms); + if (NILP (Fassq (Qborder_width, parms))) + parms = Fcons (Fcons (Qborder_width, make_number (1)), parms); + if (NILP (Fassq (Qborder_color, parms))) + parms = Fcons (Fcons (Qborder_color, build_string ("lightyellow")), parms); + if (NILP (Fassq (Qbackground_color, parms))) + parms = Fcons (Fcons (Qbackground_color, build_string ("lightyellow")), + parms); + + /* Create a frame for the tooltip, and record it in the global + variable tip_frame. */ + if (NILP (tip_frame = x_create_tip_frame (FRAME_DISPLAY_INFO (f), parms))) + /* Creating the tip frame failed. */ + return unbind_to (count, Qnil); + } + + tip_f = XFRAME (tip_frame); + window = FRAME_ROOT_WINDOW (tip_f); + set_window_buffer (window, Fget_buffer_create (tip), false, false); + w = XWINDOW (window); + w->pseudo_window_p = true; + + /* Set up the frame's root window. Note: The following code does not + try to size the window or its frame correctly. Its only purpose is + to make the subsequent text size calculations work. The right + sizes should get installed when the toolkit gets back to us. */ w->left_col = 0; w->top_line = 0; w->pixel_left = 0; @@ -5956,130 +6076,47 @@ Text larger than the specified size is clipped. */) w->total_lines = 40; } - w->pixel_width = w->total_cols * FRAME_COLUMN_WIDTH (f); - w->pixel_height = w->total_lines * FRAME_LINE_HEIGHT (f); - - FRAME_TOTAL_COLS (f) = w->total_cols; - adjust_frame_glyphs (f); - w->pseudo_window_p = true; + w->pixel_width = w->total_cols * FRAME_COLUMN_WIDTH (tip_f); + w->pixel_height = w->total_lines * FRAME_LINE_HEIGHT (tip_f); + FRAME_TOTAL_COLS (tip_f) = w->total_cols; + adjust_frame_glyphs (tip_f); - /* Display the tooltip text in a temporary buffer. */ + /* Insert STRING into root window's buffer and fit the frame to the + buffer. */ + count_1 = SPECPDL_INDEX (); old_buffer = current_buffer; - set_buffer_internal_1 (XBUFFER (XWINDOW (FRAME_ROOT_WINDOW (f))->contents)); + set_buffer_internal_1 (XBUFFER (w->contents)); bset_truncate_lines (current_buffer, Qnil); + specbind (Qinhibit_read_only, Qt); + specbind (Qinhibit_modification_hooks, Qt); + specbind (Qinhibit_point_motion_hooks, Qt); + Ferase_buffer (); + Finsert (1, &string); clear_glyph_matrix (w->desired_matrix); clear_glyph_matrix (w->current_matrix); SET_TEXT_POS (pos, BEGV, BEGV_BYTE); - try_window (FRAME_ROOT_WINDOW (f), pos, TRY_WINDOW_IGNORE_FONTS_CHANGE); - - /* Compute width and height of the tooltip. */ - width = height = 0; - seen_reversed_p = false; - for (i = 0; i < w->desired_matrix->nrows; ++i) - { - struct glyph_row *row = &w->desired_matrix->rows[i]; - struct glyph *last; - int row_width; - - /* Stop at the first empty row at the end. */ - if (!row->enabled_p || !MATRIX_ROW_DISPLAYS_TEXT_P (row)) - break; - - /* Let the row go over the full width of the frame. */ - row->full_width_p = true; - - row_width = row->pixel_width; - if (row->used[TEXT_AREA]) - { - /* There's a glyph at the end of rows that is used to place - the cursor there. Don't include the width of this glyph. */ - if (!row->reversed_p) - { - last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; - if (NILP (last->object)) - row_width -= last->pixel_width; - } - else - { - /* There could be a stretch glyph at the beginning of R2L - rows that is produced by extend_face_to_end_of_line. - Don't count that glyph. */ - struct glyph *g = row->glyphs[TEXT_AREA]; - - if (g->type == STRETCH_GLYPH && NILP (g->object)) - { - row_width -= g->pixel_width; - seen_reversed_p = true; - } - } - } - - height += row->height; - width = max (width, row_width); - } - - /* If we've seen partial-length R2L rows, we need to re-adjust the - tool-tip frame width and redisplay it again, to avoid over-wide - tips due to the stretch glyph that extends R2L lines to full - width of the frame. */ - if (seen_reversed_p) - { - /* w->total_cols and FRAME_TOTAL_COLS want the width in columns, - not in pixels. */ - w->pixel_width = width; - width /= WINDOW_FRAME_COLUMN_WIDTH (w); - w->total_cols = width; - FRAME_TOTAL_COLS (f) = width; - SET_FRAME_WIDTH (f, width); - adjust_frame_glyphs (f); - clear_glyph_matrix (w->desired_matrix); - clear_glyph_matrix (w->current_matrix); - try_window (FRAME_ROOT_WINDOW (f), pos, 0); - width = height = 0; - /* Recompute width and height of the tooltip. */ - for (i = 0; i < w->desired_matrix->nrows; ++i) - { - struct glyph_row *row = &w->desired_matrix->rows[i]; - struct glyph *last; - int row_width; - - if (!row->enabled_p || !MATRIX_ROW_DISPLAYS_TEXT_P (row)) - break; - row->full_width_p = true; - row_width = row->pixel_width; - if (row->used[TEXT_AREA] && !row->reversed_p) - { - last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; - if (NILP (last->object)) - row_width -= last->pixel_width; - } - - height += row->height; - width = max (width, row_width); - } - } - - /* Add the frame's internal border to the width and height the X - window should have. */ - height += 2 * FRAME_INTERNAL_BORDER_WIDTH (f); - width += 2 * FRAME_INTERNAL_BORDER_WIDTH (f); - - /* Move the tooltip window where the mouse pointer is. Resize and - show it. */ - compute_tip_xy (f, parms, dx, dy, width, height, &root_x, &root_y); - + try_window (window, pos, TRY_WINDOW_IGNORE_FONTS_CHANGE); + /* Calculate size of tooltip window. */ + size = Fwindow_text_pixel_size (window, Qnil, Qnil, Qnil, + make_number (w->pixel_height), Qnil); + /* Add the frame's internal border to calculated size. */ + width = XINT (Fcar (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f); + height = XINT (Fcdr (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f); + + /* Calculate position of tooltip frame. */ + compute_tip_xy (tip_f, parms, dx, dy, width, height, &root_x, &root_y); + + /* Show tooltip frame. */ block_input (); - XMoveResizeWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + XMoveResizeWindow (FRAME_X_DISPLAY (tip_f), FRAME_X_WINDOW (tip_f), root_x, root_y, width, height); - XMapRaised (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); + XMapRaised (FRAME_X_DISPLAY (tip_f), FRAME_X_WINDOW (tip_f)); unblock_input (); - /* Draw into the window. */ w->must_be_updated_p = true; update_single_window (w); - - /* Restore original current buffer. */ set_buffer_internal_1 (old_buffer); + unbind_to (count_1, Qnil); windows_or_buffers_changed = old_windows_or_buffers_changed; start_timer: @@ -6096,66 +6133,9 @@ DEFUN ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 0, 0, Value is t if tooltip was open, nil otherwise. */) (void) { - ptrdiff_t count; - Lisp_Object deleted, frame, timer; - - /* Return quickly if nothing to do. */ - if (NILP (tip_timer) && NILP (tip_frame)) - return Qnil; - - frame = tip_frame; - timer = tip_timer; - tip_frame = tip_timer = deleted = Qnil; - - count = SPECPDL_INDEX (); - specbind (Qinhibit_redisplay, Qt); - specbind (Qinhibit_quit, Qt); - - if (!NILP (timer)) - call1 (Qcancel_timer, timer); - -#ifdef USE_GTK - { - /* When using system tooltip, tip_frame is the Emacs frame on which - the tip is shown. */ - struct frame *f = XFRAME (frame); - if (FRAME_LIVE_P (f) && xg_hide_tooltip (f)) - frame = Qnil; - } -#endif - - if (FRAMEP (frame)) - { - delete_frame (frame, Qnil); - deleted = Qt; - -#ifdef USE_LUCID - /* Bloodcurdling hack alert: The Lucid menu bar widget's - redisplay procedure is not called when a tip frame over menu - items is unmapped. Redisplay the menu manually... */ - { - Widget w; - struct frame *f = SELECTED_FRAME (); - if (FRAME_X_P (f) && FRAME_LIVE_P (f)) - { - w = f->output_data.x->menubar_widget; - - if (!DoesSaveUnders (FRAME_DISPLAY_INFO (f)->screen) - && w != NULL) - { - block_input (); - xlwmenu_redisplay (w); - unblock_input (); - } - } - } -#endif /* USE_LUCID */ - } - - return unbind_to (count, deleted); + return x_hide_tip (!tooltip_reuse_hidden_frame); } - /*********************************************************************** File selection dialog @@ -6483,7 +6463,7 @@ nil, it defaults to the selected frame. */) default_name = xlispstrdup (font_param); else { - font_param = Fframe_parameter (frame, Qfont_param); + font_param = Fframe_parameter (frame, Qfont_parameter); if (STRINGP (font_param)) default_name = xlispstrdup (font_param); } @@ -6815,8 +6795,9 @@ syms_of_xfns (void) DEFSYM (Qundefined_color, "undefined-color"); DEFSYM (Qcompound_text, "compound-text"); DEFSYM (Qcancel_timer, "cancel-timer"); - DEFSYM (Qfont_param, "font-parameter"); + DEFSYM (Qfont_parameter, "font-parameter"); DEFSYM (Qmono, "mono"); + DEFSYM (Qassq_delete_all, "assq-delete-all"); #ifdef USE_CAIRO DEFSYM (Qpdf, "pdf"); diff --git a/src/xml.c b/src/xml.c index b1175d14a1..03e9053f29 100644 --- a/src/xml.c +++ b/src/xml.c @@ -45,7 +45,7 @@ DEF_DLL_FN (void, xmlCheckVersion, (int)); static bool libxml2_loaded_p (void) { - Lisp_Object found = Fassq (Qlibxml2_dll, Vlibrary_cache); + Lisp_Object found = Fassq (Qlibxml2, Vlibrary_cache); return CONSP (found) && EQ (XCDR (found), Qt); } @@ -96,7 +96,7 @@ init_libxml2_functions (void) { HMODULE library; - if (!(library = w32_delayed_load (Qlibxml2_dll))) + if (!(library = w32_delayed_load (Qlibxml2))) { message1 ("libxml2 library not found"); return false; @@ -105,12 +105,12 @@ init_libxml2_functions (void) if (! load_dll_functions (library)) goto bad_library; - Vlibrary_cache = Fcons (Fcons (Qlibxml2_dll, Qt), Vlibrary_cache); + Vlibrary_cache = Fcons (Fcons (Qlibxml2, Qt), Vlibrary_cache); return true; } bad_library: - Vlibrary_cache = Fcons (Fcons (Qlibxml2_dll, Qnil), Vlibrary_cache); + Vlibrary_cache = Fcons (Fcons (Qlibxml2, Qnil), Vlibrary_cache); return false; #else /* !WINDOWSNT */ diff --git a/src/xselect.c b/src/xselect.c index 123e46374a..8de436f119 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -215,7 +215,7 @@ symbol_to_x_atom (struct x_display_info *dpyinfo, Lisp_Object sym) if (EQ (sym, QDELETE)) return dpyinfo->Xatom_DELETE; if (EQ (sym, QMULTIPLE)) return dpyinfo->Xatom_MULTIPLE; if (EQ (sym, QINCR)) return dpyinfo->Xatom_INCR; - if (EQ (sym, QEMACS_TMP)) return dpyinfo->Xatom_EMACS_TMP; + if (EQ (sym, Q_EMACS_TMP_)) return dpyinfo->Xatom_EMACS_TMP; if (EQ (sym, QTARGETS)) return dpyinfo->Xatom_TARGETS; if (EQ (sym, QNULL)) return dpyinfo->Xatom_NULL; if (!SYMBOLP (sym)) emacs_abort (); @@ -273,7 +273,7 @@ x_atom_to_symbol (struct x_display_info *dpyinfo, Atom atom) if (atom == dpyinfo->Xatom_INCR) return QINCR; if (atom == dpyinfo->Xatom_EMACS_TMP) - return QEMACS_TMP; + return Q_EMACS_TMP_; if (atom == dpyinfo->Xatom_TARGETS) return QTARGETS; if (atom == dpyinfo->Xatom_NULL) @@ -2679,7 +2679,7 @@ A value of 0 means wait as long as necessary. This is initialized from the DEFSYM (QDELETE, "DELETE"); DEFSYM (QMULTIPLE, "MULTIPLE"); DEFSYM (QINCR, "INCR"); - DEFSYM (QEMACS_TMP, "_EMACS_TMP_"); + DEFSYM (Q_EMACS_TMP_, "_EMACS_TMP_"); DEFSYM (QTARGETS, "TARGETS"); DEFSYM (QATOM, "ATOM"); DEFSYM (QCLIPBOARD_MANAGER, "CLIPBOARD_MANAGER"); diff --git a/src/xsmfns.c b/src/xsmfns.c index 42e23401c7..a7ec8e0c7e 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c @@ -204,7 +204,7 @@ smc_save_yourself_CB (SmcConn smcConn, props[props_idx]->vals[0].value = SDATA (user_login_name); ++props_idx; - char *cwd = get_current_dir_name (); + char *cwd = emacs_get_current_dir_name (); if (cwd) { props[props_idx] = &prop_ptr[props_idx]; @@ -401,7 +401,7 @@ x_session_initialize (struct x_display_info *dpyinfo) ptrdiff_t name_len = 0; /* libSM seems to crash if pwd is missing - see bug#18851. */ - if (! get_current_dir_name ()) + if (! emacs_get_current_dir_name ()) { fprintf (stderr, "Disabling session management due to pwd error: %s\n", emacs_strerror (errno)); diff --git a/src/xterm.c b/src/xterm.c index 2f8e077590..28856cfe19 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -7895,10 +7895,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, /* Force a redisplay sooner or later to update the frame titles in case this is the second frame. */ record_asynch_buffer_change (); - -#ifdef USE_GTK - xg_frame_resized (f, -1, -1); -#endif } goto OTHER; diff --git a/test/automated/Makefile.in b/test/Makefile.in similarity index 73% rename from test/automated/Makefile.in rename to test/Makefile.in index 9c9b3be1e0..26d7e591c7 100644 --- a/test/automated/Makefile.in +++ b/test/Makefile.in @@ -21,7 +21,8 @@ ## Some targets: ## check: re-run all tests, writing to .log files. -## check-maybe: run all tests whose .log file needs updating +## check-maybe: run all tests which are outdated with their .log file +## or the source files they are testing. ## filename.log: run tests from filename.el(c) if .log file needs updating ## filename: re-run tests from filename.el(c), with no logging @@ -32,12 +33,14 @@ SHELL = @SHELL@ srcdir = @srcdir@ VPATH = $(srcdir) +MKDIR_P = @MKDIR_P@ + SEPCHAR = @SEPCHAR@ # We never change directory before running Emacs, so a relative file # name is fine, and makes life easier. If we need to change # directory, we can use emacs --chdir. -EMACS = ../../src/emacs +EMACS = ../src/emacs EMACS_EXTRAOPT= @@ -104,7 +107,7 @@ SELECTOR_ACTUAL=$(SELECTOR_EXPENSIVE) endif -%.log: ${srcdir}/%.el +%.log: %.el @if grep '^;.*no-byte-compile: t' $< > /dev/null; then \ loadfile=$<; \ else \ @@ -113,12 +116,18 @@ endif fi; \ echo Testing $$loadfile; \ stat=OK ; \ + ${MKDIR_P} $(dir $@) ; \ $(emacs) -l ert -l $$loadfile \ --eval "(ert-run-tests-batch-and-exit ${SELECTOR_ACTUAL})" ${WRITE_LOG} -ELFILES = $(sort $(wildcard ${srcdir}/*.el)) -LOGFILES = $(patsubst %.el,%.log,$(notdir ${ELFILES})) -TESTS = ${LOGFILES:.log=} +ELFILES = $(shell find ${srcdir} -path "${srcdir}/manual" -prune -o \ + -path "*resources" -prune -o -name "*el" -print) +## .elc files may be in a different directory for out of source builds +ELCFILES = $(patsubst %.el,%.elc, \ + $(patsubst $(srcdir)%,.%,$(ELFILES))) +LOGFILES = $(patsubst %.elc,%.log,${ELCFILES}) +LOGSAVEFILES = $(patsubst %.elc,%.log~,${ELCFILES}) +TESTS = $(subst ${srcdir}/,,$(LOGFILES:.log=)) ## If we have to interrupt a hanging test, preserve the log so we can ## see what the problem was. @@ -127,14 +136,23 @@ TESTS = ${LOGFILES:.log=} .PHONY: ${TESTS} ## The short aliases that always re-run the tests, with no logging. +## Define an alias both with and without the directory name for ease +## of use. define test_template $(1): - @test ! -f $(1).log || mv $(1).log $(1).log~ - @${MAKE} $(1).log WRITE_LOG= + @test ! -f ./$(1).log || mv ./$(1).log ./$(1).log~ + @${MAKE} ./$(1).log WRITE_LOG= + +$(notdir $(1)): $(1) endef $(foreach test,${TESTS},$(eval $(call test_template,${test}))) +## Include dependencies between test files and the files they test. +## We could do this without the file and eval directly, but then we +## would have to run Emacs for every make invocation, and it might not +## be available during clean. +-include make-test-deps.mk ## Rerun all default tests. check: mostlyclean @${MAKE} check-doit SELECTOR="${SELECTOR_ACTUAL}" @@ -144,7 +162,11 @@ check: mostlyclean check-expensive: mostlyclean @${MAKE} check-doit SELECTOR="${SELECTOR_EXPENSIVE}" -## Only re-run default tests whose .log is older than the test. +## Re-run all tests which are outdated. A test is outdated if its +## logfile is out-of-date with either the test file, or the source +## files that the tests depend on. The source file dependencies are +## determined by a heuristic and does not identify the full dependency +## graph. See make-test-deps.emacs-lisp for details. .PHONY: check-maybe check-maybe: @${MAKE} check-doit SELECTOR="${SELECTOR_ACTUAL}" @@ -157,17 +179,22 @@ check-doit: ${LOGFILES} .PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean mostlyclean: - -@for f in *.log; do test ! -f $$f || mv $$f $$f~; done + -@for f in ${LOGFILES}; do test ! -f $$f || mv $$f $$f~; done clean: - -rm -f *.log *.log~ + -rm -f ${LOGFILES} ${LOGSAVEFILES} + -rm make-test-deps.mk bootstrap-clean: clean - -rm -f ${srcdir}/*.elc + -rm -f ${ELCFILES} distclean: clean rm -f Makefile maintainer-clean: distclean bootstrap-clean +make-test-deps.mk: $(ELFILES) make-test-deps.emacs-lisp + $(EMACS) --batch -l $(srcdir)/make-test-deps.emacs-lisp \ + --eval "(make-test-deps \"$(srcdir)\")" \ + 2> $@ # Makefile ends here. diff --git a/test/README b/test/README index d2aee9bf57..2994fca6c8 100644 --- a/test/README +++ b/test/README @@ -8,8 +8,7 @@ Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See (info "(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/ for more information on writing and running tests. -All ERT test files are supposed to run from subdirectory automated/. -The Makefile in that directory supports the following targets: +The Makefile in this directory supports the following targets: * make check Run all tests as defined in the directory. Expensive tests are diff --git a/test/automated/data/decompress/foo.gz b/test/data/decompress/foo.gz similarity index 100% rename from test/automated/data/decompress/foo.gz rename to test/data/decompress/foo.gz diff --git a/test/automated/data/epg/pubkey.asc b/test/data/epg/pubkey.asc similarity index 100% rename from test/automated/data/epg/pubkey.asc rename to test/data/epg/pubkey.asc diff --git a/test/automated/data/epg/seckey.asc b/test/data/epg/seckey.asc similarity index 100% rename from test/automated/data/epg/seckey.asc rename to test/data/epg/seckey.asc diff --git a/test/automated/data/files-bug18141.el.gz b/test/data/files-bug18141.el.gz similarity index 100% rename from test/automated/data/files-bug18141.el.gz rename to test/data/files-bug18141.el.gz diff --git a/test/data/net/cert.pem b/test/data/net/cert.pem new file mode 100644 index 0000000000..4df4e92e0b --- /dev/null +++ b/test/data/net/cert.pem @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE----- +MIIELTCCAxWgAwIBAgIJAI6LqlFyaPRkMA0GCSqGSIb3DQEBCwUAMIGsMQswCQYD +VQQGEwJBVTEYMBYGA1UECAwPTmV3IFNvdXRoIFdhbGVzMQ8wDQYDVQQHDAZTeWRu +ZXkxITAfBgNVBAoMGEVtYWNzIFRlc3QgU2VydmljZXNzIExMQzESMBAGA1UECwwJ +QXV0b21hdGVkMRcwFQYDVQQDDA50ZXN0LmVtYWNzLnpvdDEiMCAGCSqGSIb3DQEJ +ARYTZW1hY3MtZGV2ZWxAZnNmLm9yZzAeFw0xNjAyMDgwNDA0MzJaFw0xNjAzMDkw +NDA0MzJaMIGsMQswCQYDVQQGEwJBVTEYMBYGA1UECAwPTmV3IFNvdXRoIFdhbGVz +MQ8wDQYDVQQHDAZTeWRuZXkxITAfBgNVBAoMGEVtYWNzIFRlc3QgU2VydmljZXNz +IExMQzESMBAGA1UECwwJQXV0b21hdGVkMRcwFQYDVQQDDA50ZXN0LmVtYWNzLnpv +dDEiMCAGCSqGSIb3DQEJARYTZW1hY3MtZGV2ZWxAZnNmLm9yZzCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAM52lP7k1rBpctBX1irRVgDerxqlFSTkvg8L +WmRCfwm3XY8EZWqM/8Eex5soH7myRlWfUH/cKxbqScZqXotj0hlPxdRkM6gWgHS9 +Mml7wnz2LZGvD5PfMfs+yBHKAMrqortFXCKksHsYIJ66l9gJMm1G5XjWha6CaEr/ +k2bE5Ovw0fB2B4vH0OqhJzGyenJOspXZz1ttn3h3UC5fbDXS8fUM9k/FbgJKypWr +zB3P12GcMR939FsR5sqa8nNoCMw+WBzs4XuM5Ad+s/UtEaZvmtwvLwmdB7cgCEyM +x5gaM969SlpOmuy7dDTCCK3lBl6B5dgFKvVcChYwSW+xJz5tfL0CAwEAAaNQME4w +HQYDVR0OBBYEFG3YhH7ZzEdOGstkT67uUh1RylNjMB8GA1UdIwQYMBaAFG3YhH7Z +zEdOGstkT67uUh1RylNjMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB +ADnJL2tBMnPepywA57yDfJz54FvrqRd+UAjSiB7/QySDpHnTM3b3sXWfwAkXPTjM +c+jRW2kfdnL6OQW2tpcpPZANGnwK8MJrtGcbHhtPXjgDRhVZp64hsB7ayS+l0Dm7 +2ZBbi2SF8FgZVcQy0WD01ir2raSODo124dMrq+3aHP77YLbiNEKj+wFoDbndQ1FQ +gtIJBE80FADoqc7LnBrpA20aVlfqhKZqe+leYDSZ+CE1iwlPdvD+RTUxVDs5EfpB +qVOHDlzEfVmcMnddKTV8pNYuo93AG4s0KdrGG9RwSvtLaOoHd2i6RmIs+Yiumbau +mXodMxxAEW/cM7Ita/2QVmk= +-----END CERTIFICATE----- diff --git a/test/data/net/key.pem b/test/data/net/key.pem new file mode 100644 index 0000000000..5db58f573c --- /dev/null +++ b/test/data/net/key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDOdpT+5NawaXLQ +V9Yq0VYA3q8apRUk5L4PC1pkQn8Jt12PBGVqjP/BHsebKB+5skZVn1B/3CsW6knG +al6LY9IZT8XUZDOoFoB0vTJpe8J89i2Rrw+T3zH7PsgRygDK6qK7RVwipLB7GCCe +upfYCTJtRuV41oWugmhK/5NmxOTr8NHwdgeLx9DqoScxsnpyTrKV2c9bbZ94d1Au +X2w10vH1DPZPxW4CSsqVq8wdz9dhnDEfd/RbEebKmvJzaAjMPlgc7OF7jOQHfrP1 +LRGmb5rcLy8JnQe3IAhMjMeYGjPevUpaTprsu3Q0wgit5QZegeXYBSr1XAoWMElv +sSc+bXy9AgMBAAECggEAaqHkIiGeoE5V9jTncAXeHWTlmyVX3k4luy9p6A5P/nyt +3YevuXBJRzzWatQ2Tno8yUwXD3Ju7s7ie4/EdMmBYYFJ84AtDctRXPm6Z7B7qn6a +2ntH2F+WOOUb/9QMxMCae44/H8VfQLQdZN2KPxHA8Z+ENPzW3mKL6vBE+PcIJLK2 +kTXQdCEIuUb1v4kxKYfjyyHAQ9yHvocUvZdodGHrpmWOr/2QCrqCjwiKnXyvdJMi +JQ4a3dU+JG5Zwr2hScyeLgS4p+M3A2NY+oIACn2rCcsIKC6uvBK3wAbhssaY8z9c +5kap862oMBNmPCxPuQTIIO7ptla0EWHktpFxnu7GIQKBgQDvKyXt82zGHiOZ9acx +4fV7t3NF2MNd9fOn59NYWYRSs2gaEjit6BnsCgiKZOJJ2YFsggBiQMiWuEzwqIdW +bOH8W5AubTxnE2OjeIpH5r8AXI6I/pKdOedM86oeElbL0p53OZqSqBK6vA5SnE76 +fZwC505h/mqH2E6AdKpcyL7sJwKBgQDc/jc4MkVnqF7xcYoJrYEbnkhwqRxIM+0Y +HY2qXszWQPgjae3NK1rw/PEOATzWrHLvRS/utQ8yeLUAZIGsFY8+c1kjvkvl4ZK2 +OnsEOVLmEwjDqqnq3JFYCVSkXfLBGRD3wGldzkCQljOiGuJ/Co1rGHk7CfBmxX2p +kxdts5OKewKBgQDTRsSc7Zs7cMh2a0GlmTyoa6iTHSeIy4rQ2sQimgGApSfjUBFt +30l28G4XA4O7RT9FwZnhMeWA75JYTigwOsNvkNtPiAQB8mjksclGNxqnkRwA/RI7 +fjlMCzxOkFjIeWivXd2kjIDvIM1uQNKsCWZWUks12e/1zSmb5HPSvyuZpQKBgQDQ +qVgKP604ysmav9HOgXy+Tx2nAoYpxp2/f2gbzZcrVfz1szdN2fnsQWh6CMEhEYMU +WQeBJIRM65w72qp1iYXPOaqZDT0suWiFl4I/4sBbbO2BkssNb2Xs8iJxcCOeH8Td +qVfTssNTwf7OuQPTYGtXC6ysCh5ra13Tl4cvlbdhsQKBgFHXP+919wSncLS+2ySD +waBzG6GyVOgV+FE3DrM3Xp4S6fldWYAndKHQ1HjJVDY8SkC2Tk1D7QSQnmS+ZzYs +YqzcnkPCTHLb6wCErs4ZiW0gn9xJnfxyv6wPujsayL4TMsmsqkj/IAB61UjwaA/a +Z+rUw/WkcNPD59AD1J0eeSZu +-----END PRIVATE KEY----- diff --git a/test/data/shr/div-div.html b/test/data/shr/div-div.html new file mode 100644 index 0000000000..1c191ae44d --- /dev/null +++ b/test/data/shr/div-div.html @@ -0,0 +1 @@ +
    foo
    Bar
    diff --git a/test/data/shr/div-div.txt b/test/data/shr/div-div.txt new file mode 100644 index 0000000000..62715e1251 --- /dev/null +++ b/test/data/shr/div-div.txt @@ -0,0 +1,2 @@ +foo +Bar diff --git a/test/data/shr/div-p.html b/test/data/shr/div-p.html new file mode 100644 index 0000000000..fcbdfc4329 --- /dev/null +++ b/test/data/shr/div-p.html @@ -0,0 +1 @@ +
    foo

    Bar

    diff --git a/test/data/shr/div-p.txt b/test/data/shr/div-p.txt new file mode 100644 index 0000000000..859d731da8 --- /dev/null +++ b/test/data/shr/div-p.txt @@ -0,0 +1,3 @@ +foo + +Bar diff --git a/test/data/shr/li-div.html b/test/data/shr/li-div.html new file mode 100644 index 0000000000..eca3c511bd --- /dev/null +++ b/test/data/shr/li-div.html @@ -0,0 +1,10 @@ +
      +
    • +
      +

      This is the first paragraph of a list item.

      +

      This is the second paragraph of a list item.

    • +
    • +
      This is the first paragraph of a list item.
      +
      This is the second paragraph of a list item.
      +
    • +
    diff --git a/test/data/shr/li-div.txt b/test/data/shr/li-div.txt new file mode 100644 index 0000000000..9fc54f2bdc --- /dev/null +++ b/test/data/shr/li-div.txt @@ -0,0 +1,6 @@ +* This is the first paragraph of a list item. + + This is the second paragraph of a list item. + +* This is the first paragraph of a list item. + This is the second paragraph of a list item. diff --git a/test/data/shr/li-empty.html b/test/data/shr/li-empty.html new file mode 100644 index 0000000000..05cfee7bdd --- /dev/null +++ b/test/data/shr/li-empty.html @@ -0,0 +1 @@ +
    diff --git a/test/data/shr/li-empty.txt b/test/data/shr/li-empty.txt new file mode 100644 index 0000000000..906fd8df8b --- /dev/null +++ b/test/data/shr/li-empty.txt @@ -0,0 +1,3 @@ +1%20 +2%20 +3%20 diff --git a/test/data/shr/nonbr.html b/test/data/shr/nonbr.html new file mode 100644 index 0000000000..56282cf4ca --- /dev/null +++ b/test/data/shr/nonbr.html @@ -0,0 +1 @@ +
    (progn
      (setq minibuffer-prompt-properties '(read-only t cursor-intangible t face minibuffer-prompt))

      (defun turn-on-cursor-intangible-mode ()
        "Turns on cursor-intangible-mode."
        (interactive)
        (cursor-intangible-mode 1))
      (define-globalized-minor-mode global-cursor-intangible-mode cursor-intangible-mode turn-on-cursor-intangible-mode)

      (global-cursor-intangible-mode 1))

    diff --git a/test/data/shr/nonbr.txt b/test/data/shr/nonbr.txt new file mode 100644 index 0000000000..0c3cffa93f --- /dev/null +++ b/test/data/shr/nonbr.txt @@ -0,0 +1,12 @@ +(progn + (setq minibuffer-prompt-properties '(read-only t cursor-intangible t face +minibuffer-prompt)) + + (defun turn-on-cursor-intangible-mode () + "Turns on cursor-intangible-mode." + (interactive) + (cursor-intangible-mode 1)) + (define-globalized-minor-mode global-cursor-intangible-mode +cursor-intangible-mode turn-on-cursor-intangible-mode) + + (global-cursor-intangible-mode 1)) diff --git a/test/data/shr/ul-empty.html b/test/data/shr/ul-empty.html new file mode 100644 index 0000000000..e5a75ab921 --- /dev/null +++ b/test/data/shr/ul-empty.html @@ -0,0 +1,4 @@ +
      +
    • +
    +Lala diff --git a/test/data/shr/ul-empty.txt b/test/data/shr/ul-empty.txt new file mode 100644 index 0000000000..8993555425 --- /dev/null +++ b/test/data/shr/ul-empty.txt @@ -0,0 +1,3 @@ +* + +Lala \ No newline at end of file diff --git a/test/file-organisation.org b/test/file-organisation.org new file mode 100644 index 0000000000..226e12d533 --- /dev/null +++ b/test/file-organisation.org @@ -0,0 +1,54 @@ +#+TITLE: The Location of Emacs-Lisp Tests + + + +* The Main Emacs Repository + +The Emacs repository contains a very large number of Emacs-Lisp files, many of +which pre-date both formal package support for Emacs and automated unit +testing. + +All paths are relative to the Emacs root directory. + +** Source + +Lisp files are stored in the ~lisp~ directory or its sub-directories. +Sub-directories are in many cases themed after packages (~gnus~, ~org~, +~calc~), related functionality (~net~, ~emacs-lisp~, ~progmodes~) or status +(~obsolete~). + +C source is stored in the ~src~ directory, which is flat. + +** Test Files + +Automated tests should be stored in the ~test/automated/lisp~ directory. Tests +should reflect the directory structure of the source tree; so tests for files +in the ~emacs-lisp~ source directory should reside in the +~test/lisp/emacs-lisp~ directory. + +Tests should normally reside in a file with ~-tests~ added to the name of +the tested source file; hence ~ert.el~ is tested in ~ert-tests.el~, or +~pcase.el~ is tested in ~pcase-tests.el~. Exceptionally, tests for a +single feature may be placed into multiple files of any name which are +themselves placed in a directory named after the feature with ~-tests~ +appended, such as ~/test/lisp/emacs-lisp/eieio-tests~ + +Where features of the C source are tested using Emacs-Lisp test files, these +should reside in ~/test/src~ and be named after the C file. + +A few test suites which predate this scheme and do not fit cleanly +into it are placed in ~/test/lisp/legacy~. + +There are also some test materials that cannot be run automatically +(i.e. via ert). These should be placed in ~/test/manual~ + +** Resource Files + +Resource files for tests (containing test data) should reside in a directory +named after the feature with a ~-resources~ suffix, and located in the same +directory as the feature. Hence, the lisp file ~flymake.el~ should have test +files in ~/test/automated/lisp/progmodes/flymake-tests.el~ should reside in a +directory called ~/test/automated/lisp/progmodes/flymake-resources~. + +No guidance is given for the organization of resource files inside the +~-resource~ directory; files can be organized at the author's discretion. diff --git a/test/automated/abbrev-tests.el b/test/lisp/abbrev-tests.el similarity index 73% rename from test/automated/abbrev-tests.el rename to test/lisp/abbrev-tests.el index 66413c5a59..0d93e268a9 100644 --- a/test/automated/abbrev-tests.el +++ b/test/lisp/abbrev-tests.el @@ -1,4 +1,4 @@ -;;; abbrev-tests.el --- Test suite for abbrevs. +;;; abbrev-tests.el --- Test suite for abbrevs -*- lexical-binding: t; -*- ;; Copyright (C) 2015-2016 Free Software Foundation, Inc. @@ -38,6 +38,36 @@ (abbrev-table-put ert-test-abbrevs :ert-test "ert-test-value") ert-test-abbrevs) +(ert-deftest abbrev-table-p-test () + (should-not (abbrev-table-p 42)) + (should-not (abbrev-table-p "aoeu")) + (should-not (abbrev-table-p '())) + (should-not (abbrev-table-p [])) + ;; Missing :abbrev-table-modiff counter: + (should-not (abbrev-table-p (obarray-make))) + (let* ((table (obarray-make))) + (abbrev-table-put table :abbrev-table-modiff 42) + (should (abbrev-table-p table)))) + +(ert-deftest abbrev-make-abbrev-table-test () + ;; Table without properties: + (let ((table (make-abbrev-table))) + (should (abbrev-table-p table)) + (should (= (length table) obarray-default-size))) + ;; Table with one property 'foo with value 'bar: + (let ((table (make-abbrev-table '(foo bar)))) + (should (abbrev-table-p table)) + (should (= (length table) obarray-default-size)) + (should (eq (abbrev-table-get table 'foo) 'bar)))) + +(ert-deftest abbrev-table-get-put-test () + (let ((table (make-abbrev-table))) + (should-not (abbrev-table-get table 'foo)) + (should (= (abbrev-table-put table 'foo 42) 42)) + (should (= (abbrev-table-get table 'foo) 42)) + (should (eq (abbrev-table-put table 'foo 'bar) 'bar)) + (should (eq (abbrev-table-get table 'foo) 'bar)))) + (ert-deftest copy-abbrev-table-test () (defvar foo-abbrev-table nil) ; Avoid compiler warning (define-abbrev-table 'foo-abbrev-table @@ -94,5 +124,4 @@ (should (equal t (abbrev-table-empty-p ert-test-abbrevs))))) (provide 'abbrev-tests) - ;;; abbrev-tests.el ends here diff --git a/test/automated/auth-source-tests.el b/test/lisp/auth-source-tests.el similarity index 100% rename from test/automated/auth-source-tests.el rename to test/lisp/auth-source-tests.el diff --git a/test/automated/auto-revert-tests.el b/test/lisp/autorevert-tests.el similarity index 77% rename from test/automated/auto-revert-tests.el rename to test/lisp/autorevert-tests.el index a6f8cb2956..2f951c0c9a 100644 --- a/test/automated/auto-revert-tests.el +++ b/test/lisp/autorevert-tests.el @@ -156,7 +156,76 @@ (ignore-errors (delete-directory tmpdir1 'recursive)) (ignore-errors (delete-directory tmpdir2 'recursive))))) -(ert-deftest auto-revert-test02-auto-revert-tail-mode () +;; This is inspired by Bug#23276. +(ert-deftest auto-revert-test02-auto-revert-deleted-file () + "Check autorevert for a deleted file." + :tags '(:expensive-test) + + (let ((tmpfile (make-temp-file "auto-revert-test")) + buf) + (unwind-protect + (progn + (with-current-buffer (get-buffer-create "*Messages*") + (narrow-to-region (point-max) (point-max))) + (write-region "any text" nil tmpfile nil 'no-message) + (setq buf (find-file-noselect tmpfile)) + (with-current-buffer buf + (should (string-equal (buffer-string) "any text")) + ;; `buffer-stale--default-function' checks for + ;; `verify-visited-file-modtime'. We must ensure that + ;; it returns nil. + (sleep-for 1) + (auto-revert-mode 1) + (should auto-revert-mode) + + ;; Remove file while reverting. We simulate this by + ;; modifying `before-revert-hook'. + (add-hook + 'before-revert-hook + (lambda () (delete-file buffer-file-name)) + nil t) + (with-current-buffer (get-buffer-create "*Messages*") + (narrow-to-region (point-max) (point-max))) + (sleep-for 1) + (write-region "another text" nil tmpfile nil 'no-message) + + ;; Check, that the buffer hasn't been reverted. File + ;; notification should be disabled, falling back to + ;; polling. + (auto-revert--wait-for-revert buf) + (should (string-match "any text" (buffer-string))) + (should-not auto-revert-use-notify) + + ;; Once the file has been recreated, the buffer shall be + ;; reverted. + (kill-local-variable 'before-revert-hook) + (with-current-buffer (get-buffer-create "*Messages*") + (narrow-to-region (point-max) (point-max))) + (sleep-for 1) + (write-region "another text" nil tmpfile nil 'no-message) + + ;; Check, that the buffer has been reverted. + (auto-revert--wait-for-revert buf) + (should (string-match "another text" (buffer-string))) + + ;; An empty file shall still be reverted. + (with-current-buffer (get-buffer-create "*Messages*") + (narrow-to-region (point-max) (point-max))) + (sleep-for 1) + (write-region "" nil tmpfile nil 'no-message) + + ;; Check, that the buffer has been reverted. + (auto-revert--wait-for-revert buf) + (should (string-equal "" (buffer-string))))) + + ;; Exit. + (with-current-buffer "*Messages*" (widen)) + (ignore-errors + (with-current-buffer buf (set-buffer-modified-p nil)) + (kill-buffer buf)) + (ignore-errors (delete-file tmpfile))))) + +(ert-deftest auto-revert-test03-auto-revert-tail-mode () "Check autorevert tail mode." ;; `auto-revert-buffers' runs every 5". And we must wait, until the ;; file has been reverted. @@ -194,7 +263,7 @@ (ignore-errors (kill-buffer buf)) (ignore-errors (delete-file tmpfile))))) -(ert-deftest auto-revert-test03-auto-revert-mode-dired () +(ert-deftest auto-revert-test04-auto-revert-mode-dired () "Check autorevert for dired." ;; `auto-revert-buffers' runs every 5". And we must wait, until the ;; file has been reverted. diff --git a/test/automated/calc-tests.el b/test/lisp/calc/calc-tests.el similarity index 100% rename from test/automated/calc-tests.el rename to test/lisp/calc/calc-tests.el diff --git a/test/automated/icalendar-tests.el b/test/lisp/calendar/icalendar-tests.el similarity index 99% rename from test/automated/icalendar-tests.el rename to test/lisp/calendar/icalendar-tests.el index 2c13a36321..20d88349bb 100644 --- a/test/automated/icalendar-tests.el +++ b/test/lisp/calendar/icalendar-tests.el @@ -32,6 +32,7 @@ ;;; Code: (require 'ert) +(require 'ert-x) (require 'icalendar) ;; ====================================================================== @@ -58,23 +59,16 @@ (ert-deftest icalendar--create-uid () "Test for `icalendar--create-uid'." (let* ((icalendar-uid-format "xxx-%t-%c-%h-%u-%s") - t-ct (icalendar--uid-count 77) (entry-full "30.06.1964 07:01 blahblah") (hash (format "%d" (abs (sxhash entry-full)))) (contents "DTSTART:19640630T070100\nblahblah") - (username (or user-login-name "UNKNOWN_USER")) - ) - (fset 't-ct (symbol-function 'current-time)) - (unwind-protect - (progn - (fset 'current-time (lambda () '(1 2 3))) - (should (= 77 icalendar--uid-count)) - (should (string= (concat "xxx-123-77-" hash "-" username "-19640630") - (icalendar--create-uid entry-full contents))) - (should (= 78 icalendar--uid-count))) - ;; restore 'current-time - (fset 'current-time (symbol-function 't-ct))) + (username (or user-login-name "UNKNOWN_USER"))) + (ert-with-function-mocked current-time (lambda () '(1 2 3)) + (should (= 77 icalendar--uid-count)) + (should (string= (concat "xxx-123-77-" hash "-" username "-19640630") + (icalendar--create-uid entry-full contents))) + (should (= 78 icalendar--uid-count))) (setq contents "blahblah") (setq icalendar-uid-format "yyy%syyy") (should (string= (concat "yyyDTSTARTyyy") diff --git a/test/lisp/calendar/parse-time-tests.el b/test/lisp/calendar/parse-time-tests.el new file mode 100644 index 0000000000..9bcf2b4a53 --- /dev/null +++ b/test/lisp/calendar/parse-time-tests.el @@ -0,0 +1,49 @@ +;; parse-time-tests.el --- Test suite for parse-time.el + +;; Copyright (C) 2016 Free Software Foundation, Inc. + +;; Author: Lars Ingebrigtsen + +;; 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 . + +;;; Commentary: + +;;; Code: + +(require 'ert) +(require 'parse-time) + +(ert-deftest parse-time-tests () + (should (equal (parse-time-string "Mon, 22 Feb 2016 19:35:42 +0100") + '(42 35 19 22 2 2016 1 nil 3600))) + (should (equal (parse-time-string "22 Feb 2016 19:35:42 +0100") + '(42 35 19 22 2 2016 nil nil 3600))) + (should (equal (parse-time-string "22 Feb 2016 +0100") + '(nil nil nil 22 2 2016 nil nil 3600))) + (should (equal (parse-time-string "Mon, 22 Feb 16 19:35:42 +0100") + '(42 35 19 22 2 2016 1 nil 3600))) + (should (equal (parse-time-string "Mon, 22 February 2016 19:35:42 +0100") + '(42 35 19 22 2 2016 1 nil 3600))) + (should (equal (parse-time-string "Mon, 22 feb 2016 19:35:42 +0100") + '(42 35 19 22 2 2016 1 nil 3600))) + (should (equal (parse-time-string "Monday, 22 february 2016 19:35:42 +0100") + '(42 35 19 22 2 2016 1 nil 3600))) + (should (equal (parse-time-string "Monday, 22 february 2016 19:35:42 PDT") + '(42 35 19 22 2 2016 1 t -25200)))) + +(provide 'parse-time-tests) + +;;; parse-time-tests.el ends here diff --git a/test/automated/character-fold-tests.el b/test/lisp/character-fold-tests.el similarity index 100% rename from test/automated/character-fold-tests.el rename to test/lisp/character-fold-tests.el diff --git a/test/automated/comint-testsuite.el b/test/lisp/comint-tests.el similarity index 100% rename from test/automated/comint-testsuite.el rename to test/lisp/comint-tests.el diff --git a/test/automated/dabbrev-tests.el b/test/lisp/dabbrev-tests.el similarity index 100% rename from test/automated/dabbrev-tests.el rename to test/lisp/dabbrev-tests.el diff --git a/test/automated/descr-text-test.el b/test/lisp/descr-text-tests.el similarity index 100% rename from test/automated/descr-text-test.el rename to test/lisp/descr-text-tests.el diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el new file mode 100644 index 0000000000..3efe259913 --- /dev/null +++ b/test/lisp/dired-tests.el @@ -0,0 +1,35 @@ +;;; dired-tests.el --- Test suite. -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2016 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Code: +(require 'ert) +(require 'dired) + + +(ert-deftest dired-autoload () + "Tests to see whether dired-x has been autoloaded" + (should + (fboundp 'dired-jump)) + (should + (autoloadp + (symbol-function + 'dired-jump)))) + +(provide 'dired-tests) +;; dired-tests.el ends here diff --git a/test/automated/electric-tests.el b/test/lisp/electric-tests.el similarity index 100% rename from test/automated/electric-tests.el rename to test/lisp/electric-tests.el diff --git a/test/automated/cl-generic-tests.el b/test/lisp/emacs-lisp/cl-generic-tests.el similarity index 100% rename from test/automated/cl-generic-tests.el rename to test/lisp/emacs-lisp/cl-generic-tests.el diff --git a/test/automated/cl-lib-tests.el b/test/lisp/emacs-lisp/cl-lib-tests.el similarity index 100% rename from test/automated/cl-lib-tests.el rename to test/lisp/emacs-lisp/cl-lib-tests.el diff --git a/test/automated/cl-seq-tests.el b/test/lisp/emacs-lisp/cl-seq-tests.el similarity index 100% rename from test/automated/cl-seq-tests.el rename to test/lisp/emacs-lisp/cl-seq-tests.el diff --git a/test/automated/eieio-test-methodinvoke.el b/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el similarity index 100% rename from test/automated/eieio-test-methodinvoke.el rename to test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el diff --git a/test/automated/eieio-test-persist.el b/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el similarity index 100% rename from test/automated/eieio-test-persist.el rename to test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el diff --git a/test/automated/eieio-tests.el b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el similarity index 99% rename from test/automated/eieio-tests.el rename to test/lisp/emacs-lisp/eieio-tests/eieio-tests.el index bdf66c946f..9665beb490 100644 --- a/test/automated/eieio-tests.el +++ b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el @@ -895,6 +895,12 @@ Subclasses to override slot attributes.") (ert-deftest eieio-test-37-obsolete-name-in-constructor () (should (equal (eieio--testing "toto") '("toto" 2)))) +(ert-deftest eieio-autoload () + "Tests to see whether reftex-auc has been autoloaded" + (should + (fboundp 'eieio--defalias))) + + (provide 'eieio-tests) ;;; eieio-tests.el ends here diff --git a/test/automated/ert-tests.el b/test/lisp/emacs-lisp/ert-tests.el similarity index 100% rename from test/automated/ert-tests.el rename to test/lisp/emacs-lisp/ert-tests.el diff --git a/test/automated/ert-x-tests.el b/test/lisp/emacs-lisp/ert-x-tests.el similarity index 89% rename from test/automated/ert-x-tests.el rename to test/lisp/emacs-lisp/ert-x-tests.el index ef8642aebf..a2665e7c39 100644 --- a/test/automated/ert-x-tests.el +++ b/test/lisp/emacs-lisp/ert-x-tests.el @@ -275,6 +275,49 @@ desired effect." (should (equal (c x) (lisp x)))))) +(defun ert--dummy-id (a) + "Identity function. Used for tests only." + a) + +(ert-deftest ert-with-function-mocked () + (let ((mock-id (lambda (_) 21))) + (should (eq 42 (ert--dummy-id 42))) + + (ert-with-function-mocked ert--dummy-id nil + (fset 'ert--dummy-id mock-id) + (should (eq 21 (ert--dummy-id 42)))) + (should (eq 42 (ert--dummy-id 42))) + + (ert-with-function-mocked ert--dummy-id mock-id + (should (eq 21 (ert--dummy-id 42)))) + (should (eq 42 (ert--dummy-id 42))) + + (should + (catch 'exit + (ert-with-function-mocked ert--dummy-id mock-id + (should (eq 21 (ert--dummy-id 42)))) + (throw 'exit t))) + (should (eq 42 (ert--dummy-id 42))) + + (should + (string= "Foo" + (condition-case err + (progn + (ert-with-function-mocked ert--dummy-id mock-id + (should (eq 21 (ert--dummy-id 42)))) + (user-error "Foo")) + (user-error (cadr err))))) + (should (eq 42 (ert--dummy-id 42))) + + (should + (string= "`ert--dummy-id' unexpectedly called." + (condition-case err + (ert-with-function-mocked ert--dummy-id nil + (ert--dummy-id 42)) + (ert-test-failed (cadr err))))) + (should (eq 42 (ert--dummy-id 42))))) + + (provide 'ert-x-tests) ;;; ert-x-tests.el ends here diff --git a/test/automated/generator-tests.el b/test/lisp/emacs-lisp/generator-tests.el similarity index 100% rename from test/automated/generator-tests.el rename to test/lisp/emacs-lisp/generator-tests.el diff --git a/test/automated/let-alist.el b/test/lisp/emacs-lisp/let-alist-tests.el similarity index 100% rename from test/automated/let-alist.el rename to test/lisp/emacs-lisp/let-alist-tests.el diff --git a/test/lisp/emacs-lisp/lisp-tests.el b/test/lisp/emacs-lisp/lisp-tests.el new file mode 100644 index 0000000000..4fe20f06e9 --- /dev/null +++ b/test/lisp/emacs-lisp/lisp-tests.el @@ -0,0 +1,211 @@ +;;; lisp-tests.el --- Test Lisp editing commands -*- lexical-binding: t; -*- + +;; Copyright (C) 2013-2016 Free Software Foundation, Inc. + +;; Author: Aaron S. Hawley +;; Keywords: internal + +;; 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 . + +;;; Commentary: + +;; Testing of `forward-sexp' and related functions. + +;;; Code: + +(require 'ert) +(require 'python) + +(ert-deftest lisp-forward-sexp-1-empty-parens () + "Test basics of \\[forward-sexp]." + (with-temp-buffer + (insert "()") + (goto-char (point-min)) + (should (null + (forward-sexp 1))))) + +(ert-deftest lisp-forward-sexp-1-error-mismatch () + "Test basics of \\[forward-sexp]." + (with-temp-buffer + (insert "(") + (goto-char (point-min)) + (should-error + (forward-sexp 1)))) + +(ert-deftest lisp-backward-sexp-1-empty-parens () + "Test basics of \\[backward-sexp]." + (with-temp-buffer + (insert "()") + (should (null + (forward-sexp -1))))) + +(ert-deftest lisp-backward-sexp-1-error-mismatch () + "Test mismatched parens with \\[backward-sexp]." + (with-temp-buffer + (insert "(") + (should-error + (forward-sexp -1)))) + +(ert-deftest lisp-forward-sexp-1-eobp () + "Test \\[forward-sexp] at `eobp'." + (with-temp-buffer + (insert "()") + (should (null ;; (should-error ;; No, per #13994 + (forward-sexp 1))))) + +(ert-deftest lisp-backward-sexp-1-eobp () + "Test \\[backward-sexp] at `bobp'." + (with-temp-buffer + (insert "()") + (goto-char (point-min)) + (should (null ;; (should-error ;; No, per #13994 + (forward-sexp -1))))) + +(ert-deftest lisp-forward-sexp-2-eobp () + "Test \\[forward-sexp] beyond `eobp'." + (with-temp-buffer + (insert "()") + (goto-char (point-min)) + (should (null ;; (should-error ;; No, per #13994 + (forward-sexp 2))) + (should (eobp)))) + +(ert-deftest lisp-backward-sexp-2-bobp () + "Test \\[backward-sexp] beyond `bobp'." + (with-temp-buffer + (insert "()") + (should (null ;; (should-error ;; No, per #13994 + (forward-sexp -2))) + (should (bobp)))) + +(ert-deftest lisp-forward-sexp-2-eobp-and-subsequent () + "Test \\[forward-sexp] beyond `eobp' and again." + (with-temp-buffer + (insert "()") + (goto-char (point-min)) + (should (null ;; (should-error ;; No, per #13994 + (forward-sexp 2))) + (should (eobp)) + (should (null ;; (should-error ;; No, per #13994 + (forward-sexp 1))))) + +(ert-deftest lisp-backward-sexp-2-bobp-and-subsequent () + "Test \\[backward-sexp] ahead of `bobp' and again." + (with-temp-buffer + (insert "()") + (should (null ;; (should-error ;; No, per #13994 + (forward-sexp -2))) + (should (bobp)) + (should (null ;; (should-error ;; No, per #13994 + (forward-sexp -1))))) + +(ert-deftest lisp-delete-pair-parens () + "Test \\[delete-pair] with parens." + (with-temp-buffer + (insert "(foo)") + (goto-char (point-min)) + (delete-pair) + (should (string-equal "foo" (buffer-string))))) + +(ert-deftest lisp-delete-pair-quotation-marks () + "Test \\[delete-pair] with quotation marks." + (with-temp-buffer + (insert "\"foo\"") + (goto-char (point-min)) + (delete-pair) + (should (string-equal "foo" (buffer-string))))) + +(ert-deftest lisp-delete-pair-quotes-in-text-mode () + "Test \\[delete-pair] against string in Text Mode for #15014." + (with-temp-buffer + (text-mode) + (insert "\"foo\"") + (goto-char (point-min)) + (delete-pair) + (should (string-equal "fo\"" (buffer-string))))) + +(ert-deftest lisp-delete-pair-quotes-text-mode-syntax-table () + "Test \\[delete-pair] with modified Text Mode syntax for #15014." + (with-temp-buffer + (text-mode) + (let ((st (copy-syntax-table text-mode-syntax-table))) + (with-syntax-table st + ;; (modify-syntax-entry ?\" "." text-mode-syntax-table) + (modify-syntax-entry ?\" "$" st) + (insert "\"foo\"") + (goto-char (point-min)) + (delete-pair) + (should (string-equal "foo" (buffer-string))))))) + +(ert-deftest lisp-forward-sexp-elisp-inside-symbol () + "Test \\[forward-sexp] on symbol in Emacs Lisp Mode for #20492." + (with-temp-buffer + (emacs-lisp-mode) + (insert "hide-ifdef-env ") + (insert (concat (number-sequence 32 126))) + (goto-char (point-min)) + (re-search-forward "hide" nil t) ;; (forward-char 4) + (should (looking-at "-")) + (forward-sexp) + (should (looking-at " ")))) + +(ert-deftest lisp-forward-sexp-elisp-quoted-symbol () + "Test \\[forward-sexp] on symbol in Emacs Lisp Mode for #20492." + (with-temp-buffer + (emacs-lisp-mode) + (insert "`hide-ifdef-env'.") + (goto-char (point-min)) + (re-search-forward "hide" nil t) ;; (forward-char 5) + (should (= ?- (char-after))) + (forward-sexp) + (should (= ?. (char-before))))) + +(ert-deftest lisp-forward-sexp-python-triple-quoted-string () + "Test \\[forward-sexp] on Python doc strings for #11321." + (with-temp-buffer + (insert "\"\"\"Triple-quoted string\"\"\"") + (goto-char (point-min)) + (let ((python-indent-guess-indent-offset nil)) + (python-mode)) + (forward-sexp) + (should (eobp)))) + +(ert-deftest lisp-forward-sexp-python-triple-quotes-string () + "Test \\[forward-sexp] on Python doc strings for #11321." + (with-temp-buffer + (insert "'''Triple-quoted string'''") + (goto-char (point-min)) + (let ((python-indent-guess-indent-offset nil)) + (python-mode)) + (forward-sexp) + (should (eobp)))) + +(ert-deftest lisp-forward-sexp-emacs-lisp-semi-char-error () + "Test \\[forward-sexp] on expression with unquoted semicolon per #4030." + (with-temp-buffer + (emacs-lisp-mode) + (insert "(insert ?;)") + (goto-char (point-min)) + (should-error (forward-sexp)))) ;; FIXME: Shouldn't be an error. + +(ert-deftest lisp-forward-sexp-emacs-lisp-quote-char () + "Test \\[forward-sexp] on expression with unquoted quote per #4030." + (with-temp-buffer + (emacs-lisp-mode) + (insert "(insert ?\")") + (goto-char (point-min)) + (should-error (forward-sexp)))) ;; FIXME: Shouldn't be an error. + +(provide 'lisp-tests) +;;; lisp-tests.el ends here diff --git a/test/automated/map-tests.el b/test/lisp/emacs-lisp/map-tests.el similarity index 100% rename from test/automated/map-tests.el rename to test/lisp/emacs-lisp/map-tests.el diff --git a/test/automated/advice-tests.el b/test/lisp/emacs-lisp/nadvice-tests.el similarity index 100% rename from test/automated/advice-tests.el rename to test/lisp/emacs-lisp/nadvice-tests.el diff --git a/test/automated/data/package/archive-contents b/test/lisp/emacs-lisp/package-resources/archive-contents similarity index 100% rename from test/automated/data/package/archive-contents rename to test/lisp/emacs-lisp/package-resources/archive-contents diff --git a/test/automated/data/package/key.pub b/test/lisp/emacs-lisp/package-resources/key.pub similarity index 100% rename from test/automated/data/package/key.pub rename to test/lisp/emacs-lisp/package-resources/key.pub diff --git a/test/automated/data/package/key.sec b/test/lisp/emacs-lisp/package-resources/key.sec similarity index 100% rename from test/automated/data/package/key.sec rename to test/lisp/emacs-lisp/package-resources/key.sec diff --git a/test/automated/data/package/macro-problem-package-1.0/macro-aux.el b/test/lisp/emacs-lisp/package-resources/macro-problem-package-1.0/macro-aux.el similarity index 100% rename from test/automated/data/package/macro-problem-package-1.0/macro-aux.el rename to test/lisp/emacs-lisp/package-resources/macro-problem-package-1.0/macro-aux.el diff --git a/test/automated/data/package/macro-problem-package-1.0/macro-problem.el b/test/lisp/emacs-lisp/package-resources/macro-problem-package-1.0/macro-problem.el similarity index 100% rename from test/automated/data/package/macro-problem-package-1.0/macro-problem.el rename to test/lisp/emacs-lisp/package-resources/macro-problem-package-1.0/macro-problem.el diff --git a/test/automated/data/package/macro-problem-package-2.0/macro-aux.el b/test/lisp/emacs-lisp/package-resources/macro-problem-package-2.0/macro-aux.el similarity index 100% rename from test/automated/data/package/macro-problem-package-2.0/macro-aux.el rename to test/lisp/emacs-lisp/package-resources/macro-problem-package-2.0/macro-aux.el diff --git a/test/automated/data/package/macro-problem-package-2.0/macro-problem.el b/test/lisp/emacs-lisp/package-resources/macro-problem-package-2.0/macro-problem.el similarity index 100% rename from test/automated/data/package/macro-problem-package-2.0/macro-problem.el rename to test/lisp/emacs-lisp/package-resources/macro-problem-package-2.0/macro-problem.el diff --git a/test/automated/data/package/multi-file-0.2.3.tar b/test/lisp/emacs-lisp/package-resources/multi-file-0.2.3.tar similarity index 100% rename from test/automated/data/package/multi-file-0.2.3.tar rename to test/lisp/emacs-lisp/package-resources/multi-file-0.2.3.tar diff --git a/test/automated/data/package/multi-file-readme.txt b/test/lisp/emacs-lisp/package-resources/multi-file-readme.txt similarity index 100% rename from test/automated/data/package/multi-file-readme.txt rename to test/lisp/emacs-lisp/package-resources/multi-file-readme.txt diff --git a/test/automated/data/package/newer-versions/archive-contents b/test/lisp/emacs-lisp/package-resources/newer-versions/archive-contents similarity index 100% rename from test/automated/data/package/newer-versions/archive-contents rename to test/lisp/emacs-lisp/package-resources/newer-versions/archive-contents diff --git a/test/automated/data/package/newer-versions/new-pkg-1.0.el b/test/lisp/emacs-lisp/package-resources/newer-versions/new-pkg-1.0.el similarity index 100% rename from test/automated/data/package/newer-versions/new-pkg-1.0.el rename to test/lisp/emacs-lisp/package-resources/newer-versions/new-pkg-1.0.el diff --git a/test/automated/data/package/newer-versions/simple-single-1.4.el b/test/lisp/emacs-lisp/package-resources/newer-versions/simple-single-1.4.el similarity index 100% rename from test/automated/data/package/newer-versions/simple-single-1.4.el rename to test/lisp/emacs-lisp/package-resources/newer-versions/simple-single-1.4.el diff --git a/test/automated/data/package/package-test-server.py b/test/lisp/emacs-lisp/package-resources/package-test-server.py similarity index 100% rename from test/automated/data/package/package-test-server.py rename to test/lisp/emacs-lisp/package-resources/package-test-server.py diff --git a/test/automated/data/package/signed/archive-contents b/test/lisp/emacs-lisp/package-resources/signed/archive-contents similarity index 100% rename from test/automated/data/package/signed/archive-contents rename to test/lisp/emacs-lisp/package-resources/signed/archive-contents diff --git a/test/automated/data/package/signed/archive-contents.sig b/test/lisp/emacs-lisp/package-resources/signed/archive-contents.sig similarity index 100% rename from test/automated/data/package/signed/archive-contents.sig rename to test/lisp/emacs-lisp/package-resources/signed/archive-contents.sig diff --git a/test/automated/data/package/signed/signed-bad-1.0.el b/test/lisp/emacs-lisp/package-resources/signed/signed-bad-1.0.el similarity index 100% rename from test/automated/data/package/signed/signed-bad-1.0.el rename to test/lisp/emacs-lisp/package-resources/signed/signed-bad-1.0.el diff --git a/test/automated/data/package/signed/signed-bad-1.0.el.sig b/test/lisp/emacs-lisp/package-resources/signed/signed-bad-1.0.el.sig similarity index 100% rename from test/automated/data/package/signed/signed-bad-1.0.el.sig rename to test/lisp/emacs-lisp/package-resources/signed/signed-bad-1.0.el.sig diff --git a/test/automated/data/package/signed/signed-good-1.0.el b/test/lisp/emacs-lisp/package-resources/signed/signed-good-1.0.el similarity index 100% rename from test/automated/data/package/signed/signed-good-1.0.el rename to test/lisp/emacs-lisp/package-resources/signed/signed-good-1.0.el diff --git a/test/automated/data/package/signed/signed-good-1.0.el.sig b/test/lisp/emacs-lisp/package-resources/signed/signed-good-1.0.el.sig similarity index 100% rename from test/automated/data/package/signed/signed-good-1.0.el.sig rename to test/lisp/emacs-lisp/package-resources/signed/signed-good-1.0.el.sig diff --git a/test/automated/data/package/simple-depend-1.0.el b/test/lisp/emacs-lisp/package-resources/simple-depend-1.0.el similarity index 100% rename from test/automated/data/package/simple-depend-1.0.el rename to test/lisp/emacs-lisp/package-resources/simple-depend-1.0.el diff --git a/test/automated/data/package/simple-single-1.3.el b/test/lisp/emacs-lisp/package-resources/simple-single-1.3.el similarity index 100% rename from test/automated/data/package/simple-single-1.3.el rename to test/lisp/emacs-lisp/package-resources/simple-single-1.3.el diff --git a/test/automated/data/package/simple-single-readme.txt b/test/lisp/emacs-lisp/package-resources/simple-single-readme.txt similarity index 100% rename from test/automated/data/package/simple-single-readme.txt rename to test/lisp/emacs-lisp/package-resources/simple-single-readme.txt diff --git a/test/automated/data/package/simple-two-depend-1.1.el b/test/lisp/emacs-lisp/package-resources/simple-two-depend-1.1.el similarity index 100% rename from test/automated/data/package/simple-two-depend-1.1.el rename to test/lisp/emacs-lisp/package-resources/simple-two-depend-1.1.el diff --git a/test/automated/package-test.el b/test/lisp/emacs-lisp/package-tests.el similarity index 96% rename from test/automated/package-test.el rename to test/lisp/emacs-lisp/package-tests.el index 5580645474..70e129cc4f 100644 --- a/test/automated/package-test.el +++ b/test/lisp/emacs-lisp/package-tests.el @@ -97,7 +97,7 @@ (multi-file (0 1)))) "`package-desc' used for testing dependencies.") -(defvar package-test-data-dir (expand-file-name "data/package" package-test-file-dir) +(defvar package-test-data-dir (expand-file-name "package-resources" package-test-file-dir) "Base directory of package test files.") (defvar package-test-fake-contents-file @@ -190,18 +190,18 @@ Must called from within a `tar-mode' buffer." (ert-deftest package-test-desc-from-buffer () "Parse an elisp buffer to get a `package-desc' object." - (with-package-test (:basedir "data/package" :file "simple-single-1.3.el") + (with-package-test (:basedir "package-resources" :file "simple-single-1.3.el") (should (equal (package-buffer-info) simple-single-desc))) - (with-package-test (:basedir "data/package" :file "simple-depend-1.0.el") + (with-package-test (:basedir "package-resources" :file "simple-depend-1.0.el") (should (equal (package-buffer-info) simple-depend-desc))) - (with-package-test (:basedir "data/package" + (with-package-test (:basedir "package-resources" :file "multi-file-0.2.3.tar") (tar-mode) (should (equal (package-tar-file-info) multi-file-desc)))) (ert-deftest package-test-install-single () "Install a single file without using an archive." - (with-package-test (:basedir "data/package" :file "simple-single-1.3.el") + (with-package-test (:basedir "package-resources" :file "simple-single-1.3.el") (should (package-install-from-buffer)) (package-initialize) (should (package-installed-p 'simple-single)) @@ -244,7 +244,7 @@ Must called from within a `tar-mode' buffer." (ert-deftest package-test-macro-compilation () "Install a package which includes a dependency." - (with-package-test (:basedir "data/package") + (with-package-test (:basedir "package-resources") (package-install-file (expand-file-name "macro-problem-package-1.0/")) (require 'macro-problem) ;; `macro-problem-func' uses a macro from `macro-aux'. @@ -283,7 +283,7 @@ Must called from within a `tar-mode' buffer." (ert-deftest package-test-install-prioritized () "Install a lower version from a higher-prioritized archive." (with-package-test () - (let* ((newer-version (expand-file-name "data/package/newer-versions" + (let* ((newer-version (expand-file-name "package-resources/newer-versions" package-test-file-dir)) (package-archives `(("older" . ,package-test-data-dir) ("newer" . ,newer-version))) @@ -299,7 +299,7 @@ Must called from within a `tar-mode' buffer." (ert-deftest package-test-install-multifile () "Check properties of the installed multi-file package." - (with-package-test (:basedir "data/package" :install '(multi-file)) + (with-package-test (:basedir "package-resources" :install '(multi-file)) (let ((autoload-file (expand-file-name "multi-file-autoloads.el" (expand-file-name @@ -350,7 +350,7 @@ Must called from within a `tar-mode' buffer." (package-menu-execute) (should (package-installed-p 'simple-single)) (let ((package-test-data-dir - (expand-file-name "data/package/newer-versions" package-test-file-dir))) + (expand-file-name "package-resources/newer-versions" package-test-file-dir))) (setq package-archives `(("gnu" . ,package-test-data-dir))) (package-menu-refresh) @@ -470,7 +470,7 @@ Must called from within a `tar-mode' buffer." (delete-directory homedir t))))) (let* ((keyring (expand-file-name "key.pub" package-test-data-dir)) (package-test-data-dir - (expand-file-name "data/package/signed" package-test-file-dir))) + (expand-file-name "package-resources/signed" package-test-file-dir))) (with-package-test () (package-initialize) (package-import-keyring keyring) @@ -522,7 +522,7 @@ Must called from within a `tar-mode' buffer." (ert-deftest package-x-test-upload-buffer () "Test creating an \"archive-contents\" file" - (with-package-test (:basedir "data/package" + (with-package-test (:basedir "package-resources" :file "simple-single-1.3.el" :upload-base t) (package-upload-buffer) @@ -546,7 +546,7 @@ Must called from within a `tar-mode' buffer." (ert-deftest package-x-test-upload-new-version () "Test uploading a new version of a package" - (with-package-test (:basedir "data/package" + (with-package-test (:basedir "package-resources" :file "simple-single-1.3.el" :upload-base t) (package-upload-buffer) @@ -613,6 +613,7 @@ Must called from within a `tar-mode' buffer." simple-depend-desc-2))) (should (equal (package--sort-by-dependence delete-list) + (list simple-depend-desc-2 simple-depend-desc-1 new-pkg-desc multi-file-desc simple-depend-desc simple-single-desc))) (should diff --git a/test/automated/pcase-tests.el b/test/lisp/emacs-lisp/pcase-tests.el similarity index 100% rename from test/automated/pcase-tests.el rename to test/lisp/emacs-lisp/pcase-tests.el diff --git a/test/automated/regexp-tests.el b/test/lisp/emacs-lisp/regexp-opt-tests.el similarity index 100% rename from test/automated/regexp-tests.el rename to test/lisp/emacs-lisp/regexp-opt-tests.el diff --git a/test/automated/seq-tests.el b/test/lisp/emacs-lisp/seq-tests.el similarity index 95% rename from test/automated/seq-tests.el rename to test/lisp/emacs-lisp/seq-tests.el index a8ca48b132..50543de8ad 100644 --- a/test/automated/seq-tests.el +++ b/test/lisp/emacs-lisp/seq-tests.el @@ -97,6 +97,16 @@ Evaluate BODY for each created sequence. (with-test-sequences (seq '()) (should (seq-empty-p (seq-take-while #'test-sequences-oddp seq))))) +(ert-deftest test-seq-map-indexed () + (should (equal (seq-map-indexed (lambda (elt i) + (list elt i)) + nil) + nil)) + (should (equal (seq-map-indexed (lambda (elt i) + (list elt i)) + '(a b c d)) + '((a 0) (b 1) (c 2) (d 3))))) + (ert-deftest test-seq-filter () (with-test-sequences (seq '(6 7 8 9 10)) (should (equal (seq-filter #'test-sequences-evenp seq) '(6 8 10))) @@ -337,5 +347,10 @@ Evaluate BODY for each created sequence. (should (= (seq-position seq 'a #'eq) 0)) (should (null (seq-position seq (make-symbol "a") #'eq))))) +(ert-deftest test-seq-sort-by () + (let ((seq ["x" "xx" "xxx"])) + (should (equal (seq-sort-by #'seq-length #'> seq) + ["xxx" "xx" "x"])))) + (provide 'seq-tests) ;;; seq-tests.el ends here diff --git a/test/automated/subr-x-tests.el b/test/lisp/emacs-lisp/subr-x-tests.el similarity index 100% rename from test/automated/subr-x-tests.el rename to test/lisp/emacs-lisp/subr-x-tests.el diff --git a/test/automated/tabulated-list-test.el b/test/lisp/emacs-lisp/tabulated-list-test.el similarity index 100% rename from test/automated/tabulated-list-test.el rename to test/lisp/emacs-lisp/tabulated-list-test.el diff --git a/test/automated/thunk-tests.el b/test/lisp/emacs-lisp/thunk-tests.el similarity index 100% rename from test/automated/thunk-tests.el rename to test/lisp/emacs-lisp/thunk-tests.el diff --git a/test/automated/timer-tests.el b/test/lisp/emacs-lisp/timer-tests.el similarity index 100% rename from test/automated/timer-tests.el rename to test/lisp/emacs-lisp/timer-tests.el diff --git a/test/automated/epg-tests.el b/test/lisp/epg-tests.el similarity index 100% rename from test/automated/epg-tests.el rename to test/lisp/epg-tests.el diff --git a/test/lisp/erc/erc-track-tests.el b/test/lisp/erc/erc-track-tests.el new file mode 100644 index 0000000000..24dfcfbe6e --- /dev/null +++ b/test/lisp/erc/erc-track-tests.el @@ -0,0 +1,118 @@ +;;; erc-track-tests.el --- Tests for erc-track. + +;; Copyright (C) 2016 Free Software Foundation, Inc. + +;; Author: Mario Lang +;; Author: Vivek Dasmohapatra + +;; 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 . + +;;; Code: + +(require 'ert) +(require 'erc-track) + +(ert-deftest erc-track--shorten-aggressive-nil () + "Test non-aggressive erc track buffer name shortening." + (let (erc-track-shorten-aggressively) + (should + (equal (erc-unique-channel-names '("#emacs" "#vi" "#electronica" "#folk") + '("#emacs" "#vi")) + '("#em" "#vi"))) + (should + (equal (erc-unique-channel-names '("#linux-de" "#linux-fr") + '("#linux-de" "#linux-fr")) + '("#linux-de" "#linux-fr"))) + (should + (equal (erc-unique-channel-names + '("#dunnet" "#lisp" "#sawfish" "#fsf" "#guile" "#testgnome" + "#gnu" "#fsbot" "#hurd" "#hurd-bunny" "#emacs") + '("#hurd-bunny" "#hurd" "#sawfish" "#lisp")) + '("#hurd-" "#hurd" "#s" "#l"))) + (should + (equal (erc-unique-substrings '("#emacs" "#vi" "#electronica" "#folk")) + '("#em" "#vi" "#el" "#f"))) + (should + (equal (erc-unique-channel-names + '("#emacs" "#burse" "+linux.de" "#starwars" + "#bitlbee" "+burse" "#ratpoison") + '("+linux.de" "#starwars" "#burse")) + '("+l" "#s" "#bu"))) + (should + (equal (erc-unique-channel-names '("fsbot" "#emacs" "deego") '("fsbot")) + '("fs"))) + (should + (equal (erc-unique-channel-names '("fsbot" "#emacs" "deego") + '("fsbot") + (lambda (s) (> (length s) 4)) 1) + '("f"))) + (should + (equal (erc-unique-channel-names '("fsbot" "#emacs" "deego") + '("fsbot") + (lambda (s) (> (length s) 4)) 2) + '("fs"))) + (should + (equal (erc-unique-channel-names '("deego" "#hurd" "#hurd-bunny" "#emacs") + '("#hurd" "#hurd-bunny")) + '("#hurd" "#hurd-"))) + (should + (and + (equal (erc-unique-substring-1 "abc" '("ab" "abcd")) "abcd") + (not (erc-unique-substring-1 "a" '("xyz" "xab"))) + (equal (erc-unique-substrings '("abc" "xyz" "xab")) '("abc" "xyz" "xab")) + (equal (erc-unique-substrings '("abc" "abcdefg")) '("abc" "abcd")))) )) + +(ert-deftest erc-track--shorten-aggressive-t () + "Test aggressive erc track buffer name shortening." + (let ((erc-track-shorten-aggressively t)) + (should + (equal (erc-unique-channel-names '("#emacs" "#vi" "#electronica" "#folk") + '("#emacs" "#vi")) + '("#em" "#v"))) + (should + (equal (erc-unique-channel-names '("#linux-de" "#linux-fr") + '("#linux-de" "#linux-fr")) + '("#linux-d" "#linux-f"))) + (should + (equal (erc-unique-substrings '("#emacs" "#vi" "#electronica" "#folk")) + '("#em" "#v" "#el" "#f"))) + (should + (and + (equal (erc-unique-substring-1 "abc" '("ab" "abcd")) "abcd") + (not (erc-unique-substring-1 "a" '("xyz" "xab"))) + (equal (erc-unique-substrings '("abc" "xyz" "xab")) '("ab" "xy" "xa")) + (equal (erc-unique-substrings '("abc" "abcdefg")) '("abc" "abcd")))) )) + +(ert-deftest erc-track--shorten-aggressive-max () + "Test maximally aggressive erc track buffer name shortening." + (let ((erc-track-shorten-aggressively 'max)) + (should + (equal (erc-unique-channel-names '("#emacs" "#vi" "#electronica" "#folk") + '("#emacs" "#vi")) + '("#e" "#v"))) )) + +(ert-deftest erc-track--erc-faces-in () + "`erc-faces-in' should pick up both 'face and 'font-lock-face properties." + (let ((str0 "is bold") + (str1 "is bold") + ;;(char-property-alias-alist '((face font-lock-face))) + ) + (put-text-property 3 (length str0) 'font-lock-face + '(bold erc-current-nick-face) str0) + (put-text-property 3 (length str1) 'face + '(bold erc-current-nick-face) str1) + (should (erc-faces-in str0)) + (should (erc-faces-in str1)) )) diff --git a/test/automated/eshell.el b/test/lisp/eshell/eshell.el similarity index 100% rename from test/automated/eshell.el rename to test/lisp/eshell/eshell.el diff --git a/test/automated/faces-tests.el b/test/lisp/faces-tests.el similarity index 100% rename from test/automated/faces-tests.el rename to test/lisp/faces-tests.el diff --git a/test/automated/file-notify-tests.el b/test/lisp/filenotify-tests.el similarity index 93% rename from test/automated/file-notify-tests.el rename to test/lisp/filenotify-tests.el index 9f0c0ed0dc..9c19e63e62 100644 --- a/test/automated/file-notify-tests.el +++ b/test/lisp/filenotify-tests.el @@ -140,7 +140,7 @@ being the result.") (setq desc (file-notify-add-watch file-notify-test-remote-temporary-file-directory - '(change) 'ignore)))) + '(change) #'ignore)))) (setq file-notify--test-remote-enabled-checked (cons t desc)) (when desc (file-notify-rm-watch desc)))) ;; Return result. @@ -180,7 +180,7 @@ remote host, or nil." (message "Library: `%s'" (file-notify--test-library)) (should (setq file-notify--test-desc - (file-notify-add-watch temporary-file-directory '(change) 'ignore))) + (file-notify-add-watch temporary-file-directory '(change) #'ignore))) ;; Cleanup. (file-notify--test-cleanup)) @@ -199,23 +199,23 @@ remote host, or nil." ;; Check, that different valid parameters are accepted. (should (setq file-notify--test-desc - (file-notify-add-watch temporary-file-directory '(change) 'ignore))) + (file-notify-add-watch temporary-file-directory '(change) #'ignore))) (file-notify-rm-watch file-notify--test-desc) (should (setq file-notify--test-desc (file-notify-add-watch - temporary-file-directory '(attribute-change) 'ignore))) + temporary-file-directory '(attribute-change) #'ignore))) (file-notify-rm-watch file-notify--test-desc) (should (setq file-notify--test-desc (file-notify-add-watch - temporary-file-directory '(change attribute-change) 'ignore))) + temporary-file-directory '(change attribute-change) #'ignore))) (file-notify-rm-watch file-notify--test-desc) (write-region "any text" nil file-notify--test-tmpfile nil 'no-message) (should (setq file-notify--test-desc (file-notify-add-watch - file-notify--test-tmpfile '(change attribute-change) 'ignore))) + file-notify--test-tmpfile '(change attribute-change) #'ignore))) (file-notify-rm-watch file-notify--test-desc) (delete-file file-notify--test-tmpfile) @@ -238,7 +238,7 @@ remote host, or nil." (should (equal (should-error (file-notify-add-watch - file-notify--test-tmpfile1 '(change attribute-change) 'ignore)) + file-notify--test-tmpfile1 '(change attribute-change) #'ignore)) `(file-notify-error "Directory does not exist" ,file-notify--test-tmpfile))) @@ -361,7 +361,7 @@ longer than timeout seconds for the events to be delivered." (setq file-notify--test-desc (file-notify-add-watch file-notify--test-tmpfile - '(change) 'file-notify--test-event-handler))) + '(change) #'file-notify--test-event-handler))) (file-notify--test-with-events (cond ;; cygwin recognizes only `deleted' and `stopped' events. @@ -381,7 +381,7 @@ longer than timeout seconds for the events to be delivered." (setq file-notify--test-desc (file-notify-add-watch file-notify--test-tmpfile - '(change) 'file-notify--test-event-handler))) + '(change) #'file-notify--test-event-handler))) (file-notify--test-with-events (cond ;; cygwin recognizes only `deleted' and `stopped' events. @@ -397,7 +397,6 @@ longer than timeout seconds for the events to be delivered." '((changed deleted stopped) (changed changed deleted stopped))) (t '(changed changed deleted stopped))) - (read-event nil nil file-notify--test-read-event-timeout) (write-region "another text" nil file-notify--test-tmpfile nil 'no-message) (read-event nil nil file-notify--test-read-event-timeout) @@ -414,7 +413,7 @@ longer than timeout seconds for the events to be delivered." file-notify--test-desc (file-notify-add-watch temporary-file-directory - '(change) 'file-notify--test-event-handler))) + '(change) #'file-notify--test-event-handler))) (file-notify--test-with-events (cond ;; w32notify does not raise `deleted' and `stopped' @@ -429,11 +428,10 @@ longer than timeout seconds for the events to be delivered." ((string-equal (file-notify--test-library) "kqueue") '(created changed deleted stopped)) (t '(created changed deleted deleted stopped))) - (read-event nil nil file-notify--test-read-event-timeout) (write-region "any text" nil file-notify--test-tmpfile nil 'no-message) (read-event nil nil file-notify--test-read-event-timeout) - (delete-directory temporary-file-directory 'recursive)) + (delete-directory temporary-file-directory 'recursive)) (file-notify-rm-watch file-notify--test-desc)) ;; Check copy of files inside a directory. @@ -445,7 +443,7 @@ longer than timeout seconds for the events to be delivered." file-notify--test-desc (file-notify-add-watch temporary-file-directory - '(change) 'file-notify--test-event-handler))) + '(change) #'file-notify--test-event-handler))) (file-notify--test-with-events (cond ;; w32notify does not distinguish between `changed' and @@ -464,7 +462,6 @@ longer than timeout seconds for the events to be delivered." '(created changed created changed deleted stopped)) (t '(created changed created changed deleted deleted deleted stopped))) - (read-event nil nil file-notify--test-read-event-timeout) (write-region "any text" nil file-notify--test-tmpfile nil 'no-message) (read-event nil nil file-notify--test-read-event-timeout) @@ -475,7 +472,7 @@ longer than timeout seconds for the events to be delivered." (read-event nil nil file-notify--test-read-event-timeout) (set-file-times file-notify--test-tmpfile '(0 0)) (read-event nil nil file-notify--test-read-event-timeout) - (delete-directory temporary-file-directory 'recursive)) + (delete-directory temporary-file-directory 'recursive)) (file-notify-rm-watch file-notify--test-desc)) ;; Check rename of files inside a directory. @@ -487,7 +484,7 @@ longer than timeout seconds for the events to be delivered." file-notify--test-desc (file-notify-add-watch temporary-file-directory - '(change) 'file-notify--test-event-handler))) + '(change) #'file-notify--test-event-handler))) (file-notify--test-with-events (cond ;; w32notify does not raise `deleted' and `stopped' @@ -502,14 +499,13 @@ longer than timeout seconds for the events to be delivered." ((string-equal (file-notify--test-library) "kqueue") '(created changed renamed deleted stopped)) (t '(created changed renamed deleted deleted stopped))) - (read-event nil nil file-notify--test-read-event-timeout) (write-region "any text" nil file-notify--test-tmpfile nil 'no-message) (read-event nil nil file-notify--test-read-event-timeout) (rename-file file-notify--test-tmpfile file-notify--test-tmpfile1) ;; After the rename, we won't get events anymore. (read-event nil nil file-notify--test-read-event-timeout) - (delete-directory temporary-file-directory 'recursive)) + (delete-directory temporary-file-directory 'recursive)) (file-notify-rm-watch file-notify--test-desc)) ;; Check attribute change. Does not work for cygwin. @@ -521,20 +517,22 @@ longer than timeout seconds for the events to be delivered." (setq file-notify--test-desc (file-notify-add-watch file-notify--test-tmpfile - '(attribute-change) 'file-notify--test-event-handler))) + '(attribute-change) #'file-notify--test-event-handler))) (file-notify--test-with-events (cond ;; w32notify does not distinguish between `changed' and - ;; `attribute-changed'. + ;; `attribute-changed'. Under MS Windows 7, we get + ;; four `changed' events, and under MS Windows 10 just + ;; two. Strange. ((string-equal (file-notify--test-library) "w32notify") - '(changed changed changed changed)) + '((changed changed) + (changed changed changed changed))) ;; For kqueue and in the remote case, `write-region' ;; raises also an `attribute-changed' event. ((or (string-equal (file-notify--test-library) "kqueue") (file-remote-p temporary-file-directory)) '(attribute-changed attribute-changed attribute-changed)) (t '(attribute-changed attribute-changed))) - (read-event nil nil file-notify--test-read-event-timeout) (write-region "any text" nil file-notify--test-tmpfile nil 'no-message) (read-event nil nil file-notify--test-read-event-timeout) @@ -670,6 +668,7 @@ longer than timeout seconds for the events to be delivered." (file-notify-add-watch file-notify--test-tmpfile '(change) #'file-notify--test-event-handler))) + (should (file-notify-valid-p file-notify--test-desc)) (file-notify--test-with-events (cond ;; cygwin recognizes only `deleted' and `stopped' events. @@ -685,8 +684,6 @@ longer than timeout seconds for the events to be delivered." '((changed deleted stopped) (changed changed deleted stopped))) (t '(changed changed deleted stopped))) - (should (file-notify-valid-p file-notify--test-desc)) - (read-event nil nil file-notify--test-read-event-timeout) (write-region "another text" nil file-notify--test-tmpfile nil 'no-message) (read-event nil nil file-notify--test-read-event-timeout) @@ -707,6 +704,7 @@ longer than timeout seconds for the events to be delivered." (file-notify-add-watch temporary-file-directory '(change) #'file-notify--test-event-handler))) + (should (file-notify-valid-p file-notify--test-desc)) (file-notify--test-with-events (cond ;; w32notify does not raise `deleted' and `stopped' events @@ -721,8 +719,6 @@ longer than timeout seconds for the events to be delivered." ((string-equal (file-notify--test-library) "kqueue") '(created changed deleted stopped)) (t '(created changed deleted deleted stopped))) - (should (file-notify-valid-p file-notify--test-desc)) - (read-event nil nil file-notify--test-read-event-timeout) (write-region "any text" nil file-notify--test-tmpfile nil 'no-message) (read-event nil nil file-notify--test-read-event-timeout) @@ -743,9 +739,9 @@ longer than timeout seconds for the events to be delivered." (unwind-protect (progn - (setq file-notify--test-tmpfile - (file-name-as-directory (file-notify--test-make-temp-name))) - (make-directory file-notify--test-tmpfile) + (should + (setq file-notify--test-tmpfile + (make-temp-file "file-notify-test-parent" t))) (should (setq file-notify--test-desc (file-notify-add-watch @@ -765,9 +761,9 @@ longer than timeout seconds for the events to be delivered." (unwind-protect (progn - (setq file-notify--test-tmpfile - (file-name-as-directory (file-notify--test-make-temp-name))) - (make-directory file-notify--test-tmpfile) + (should + (setq file-notify--test-tmpfile + (make-temp-file "file-notify-test-parent" t))) (should (setq file-notify--test-desc (file-notify-add-watch @@ -795,13 +791,14 @@ longer than timeout seconds for the events to be delivered." ;; Under cygwin events arrive in random order. Impossible to define a test. (skip-unless (not (eq system-type 'cygwin))) - (setq file-notify--test-tmpfile (file-notify--test-make-temp-name)) - (make-directory file-notify--test-tmpfile) + (should + (setq file-notify--test-tmpfile + (make-temp-file "file-notify-test-parent" t))) (should (setq file-notify--test-desc (file-notify-add-watch file-notify--test-tmpfile - '(change) 'file-notify--test-event-handler))) + '(change) #'file-notify--test-event-handler))) (unwind-protect (let ((n 1000) source-file-list target-file-list @@ -1058,6 +1055,47 @@ the file watch." (file-notify--deftest-remote file-notify-test08-watched-file-in-watched-dir "Check `file-notify-test08-watched-file-in-watched-dir' for remote files.") +(ert-deftest file-notify-test09-sufficient-resources () + "Check that file notification does not use too many resources." + :tags '(:expensive-test) + (skip-unless (file-notify--test-local-enabled)) + ;; This test is intended for kqueue only. + (skip-unless (string-equal (file-notify--test-library) "kqueue")) + + (should + (setq file-notify--test-tmpfile + (make-temp-file "file-notify-test-parent" t))) + (unwind-protect + (let ((temporary-file-directory file-notify--test-tmpfile) + descs) + (should-error + (while t + ;; We watch directories, because we want to reach the upper + ;; limit. Watching a file might not be sufficient, because + ;; most of the libraries implement this as watching the + ;; upper directory. + (setq file-notify--test-tmpfile1 + (make-temp-file "file-notify-test-parent" t) + descs + (cons + (should + (file-notify-add-watch + file-notify--test-tmpfile1 '(change) #'ignore)) + descs))) + :type 'file-notify-error) + ;; Remove watches. If we don't do it prior removing + ;; directories, Emacs crashes in batch mode. + (dolist (desc descs) + (file-notify-rm-watch desc)) + ;; Remove directories. + (delete-directory file-notify--test-tmpfile 'recursive)) + + ;; Cleanup. + (file-notify--test-cleanup))) + +(file-notify--deftest-remote file-notify-test09-sufficient-resources + "Check `file-notify-test09-sufficient-resources' for remote files.") + (defun file-notify-test-all (&optional interactive) "Run all tests for \\[file-notify]." (interactive "p") diff --git a/test/automated/gnus-tests.el b/test/lisp/gnus/gnus-tests.el similarity index 100% rename from test/automated/gnus-tests.el rename to test/lisp/gnus/gnus-tests.el diff --git a/test/automated/message-mode-tests.el b/test/lisp/gnus/message-tests.el similarity index 53% rename from test/automated/message-mode-tests.el rename to test/lisp/gnus/message-tests.el index 3afa1569f6..ae34f24d74 100644 --- a/test/automated/message-mode-tests.el +++ b/test/lisp/gnus/message-tests.el @@ -55,6 +55,49 @@ (point))))) (set-buffer-modified-p nil)))) + +(ert-deftest message-strip-subject-trailing-was () + (ert-with-function-mocked message-talkative-question nil + (with-temp-buffer + (let ((no-was "Re: Foo ") + (with-was "Re: Foo \t (was: Bar ) ") + (stripped-was "Re: Foo") + reply) + + ;; Test unconditional stripping + (setq-local message-subject-trailing-was-query t) + (should (string= no-was (message-strip-subject-trailing-was no-was))) + (should (string= stripped-was + (message-strip-subject-trailing-was with-was))) + + ;; Test asking + (setq-local message-subject-trailing-was-query 'ask) + (fset 'message-talkative-question + (lambda (_ question show text) + (should (string= "Strip `(was: )' in subject? " + question)) + (should show) + (should (string-match + (concat + "Strip `(was: )' in subject " + "and use the new one instead\\?\n\n" + "Current subject is: \"\\(.*\\)\"\n\n" + "New subject would be: \"\\(.*\\)\"\n\n" + "See the variable " + "`message-subject-trailing-was-query' " + "to get rid of this query.") + text)) + (should (string= (match-string 1 text) with-was)) + (should (string= (match-string 2 text) stripped-was)) + reply)) + (message-strip-subject-trailing-was with-was) + (should (string= with-was + (message-strip-subject-trailing-was with-was))) + (setq reply t) + (should (string= stripped-was + (message-strip-subject-trailing-was with-was))))))) + + (provide 'message-mode-tests) ;;; message-mode-tests.el ends here diff --git a/test/automated/help-fns.el b/test/lisp/help-fns-tests.el similarity index 100% rename from test/automated/help-fns.el rename to test/lisp/help-fns-tests.el diff --git a/test/lisp/htmlfontify-tests.el b/test/lisp/htmlfontify-tests.el new file mode 100644 index 0000000000..012e170f4d --- /dev/null +++ b/test/lisp/htmlfontify-tests.el @@ -0,0 +1,34 @@ +;;; htmlfontify-tests.el --- Test suite. -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2016 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Code: +(require 'ert) +(require 'htmlfontify) + +(ert-deftest htmlfontify-autoload () + "Tests to see whether reftex-auc has been autoloaded" + (should + (fboundp 'htmlfontify-load-rgb-file)) + (should + (autoloadp + (symbol-function + 'htmlfontify-load-rgb-file)))) + +(provide 'htmlfontify-tests) +;; htmlfontify-tests.el ends here diff --git a/test/lisp/ibuffer-tests.el b/test/lisp/ibuffer-tests.el new file mode 100644 index 0000000000..de281c0373 --- /dev/null +++ b/test/lisp/ibuffer-tests.el @@ -0,0 +1,34 @@ +;;; ibuffer-tests.el --- Test suite. -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2016 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Code: +(require 'ert) +(require 'ibuffer) + +(ert-deftest ibuffer-autoload () + "Tests to see whether reftex-auc has been autoloaded" + (should + (fboundp 'ibuffer-mark-unsaved-buffers)) + (should + (autoloadp + (symbol-function + 'ibuffer-mark-unsaved-buffers)))) + +(provide 'ibuffer-tests) +;; ibuffer-tests.el ends here diff --git a/test/automated/imenu-test.el b/test/lisp/imenu-tests.el similarity index 100% rename from test/automated/imenu-test.el rename to test/lisp/imenu-tests.el diff --git a/test/automated/info-xref.el b/test/lisp/info-xref-tests.el similarity index 100% rename from test/automated/info-xref.el rename to test/lisp/info-xref-tests.el diff --git a/test/automated/mule-util.el b/test/lisp/international/mule-util-tests.el similarity index 100% rename from test/automated/mule-util.el rename to test/lisp/international/mule-util-tests.el diff --git a/test/automated/isearch-tests.el b/test/lisp/isearch-tests.el similarity index 100% rename from test/automated/isearch-tests.el rename to test/lisp/isearch-tests.el diff --git a/test/automated/json-tests.el b/test/lisp/json-tests.el similarity index 100% rename from test/automated/json-tests.el rename to test/lisp/json-tests.el diff --git a/test/automated/bytecomp-tests.el b/test/lisp/legacy/bytecomp-tests.el similarity index 100% rename from test/automated/bytecomp-tests.el rename to test/lisp/legacy/bytecomp-tests.el diff --git a/test/automated/coding-tests.el b/test/lisp/legacy/coding-tests.el similarity index 100% rename from test/automated/coding-tests.el rename to test/lisp/legacy/coding-tests.el diff --git a/test/automated/core-elisp-tests.el b/test/lisp/legacy/core-elisp-tests.el similarity index 100% rename from test/automated/core-elisp-tests.el rename to test/lisp/legacy/core-elisp-tests.el diff --git a/test/automated/decoder-tests.el b/test/lisp/legacy/decoder-tests.el similarity index 100% rename from test/automated/decoder-tests.el rename to test/lisp/legacy/decoder-tests.el diff --git a/test/automated/files.el b/test/lisp/legacy/files-tests.el similarity index 100% rename from test/automated/files.el rename to test/lisp/legacy/files-tests.el diff --git a/test/automated/font-parse-tests.el b/test/lisp/legacy/font-parse-tests.el similarity index 100% rename from test/automated/font-parse-tests.el rename to test/lisp/legacy/font-parse-tests.el diff --git a/test/automated/lexbind-tests.el b/test/lisp/legacy/lexbind-tests.el similarity index 100% rename from test/automated/lexbind-tests.el rename to test/lisp/legacy/lexbind-tests.el diff --git a/test/automated/occur-tests.el b/test/lisp/legacy/occur-tests.el similarity index 100% rename from test/automated/occur-tests.el rename to test/lisp/legacy/occur-tests.el diff --git a/test/automated/process-tests.el b/test/lisp/legacy/process-tests.el similarity index 100% rename from test/automated/process-tests.el rename to test/lisp/legacy/process-tests.el diff --git a/test/automated/syntax-tests.el b/test/lisp/legacy/syntax-tests.el similarity index 100% rename from test/automated/syntax-tests.el rename to test/lisp/legacy/syntax-tests.el diff --git a/test/automated/textprop-tests.el b/test/lisp/legacy/textprop-tests.el similarity index 100% rename from test/automated/textprop-tests.el rename to test/lisp/legacy/textprop-tests.el diff --git a/test/automated/undo-tests.el b/test/lisp/legacy/undo-tests.el similarity index 100% rename from test/automated/undo-tests.el rename to test/lisp/legacy/undo-tests.el diff --git a/test/lisp/mail/rmail-tests.el b/test/lisp/mail/rmail-tests.el new file mode 100644 index 0000000000..2f18372146 --- /dev/null +++ b/test/lisp/mail/rmail-tests.el @@ -0,0 +1,35 @@ +;;; rmail-tests.el --- Test suite. -*- lexical-binding: t -*- + +;; Copyright (C) 2015-2016 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Code: +(require 'ert) +(require 'rmail) + + +(ert-deftest rmail-autoload () + "Tests to see whether reftex-auc has been autoloaded" + (should + (fboundp 'rmail-edit-current-message)) + (should + (autoloadp + (symbol-function + 'rmail-edit-current-message)))) + +(provide 'rmail-tests) +;; rmail-tests.el ends here diff --git a/test/automated/man-tests.el b/test/lisp/man-tests.el similarity index 100% rename from test/automated/man-tests.el rename to test/lisp/man-tests.el diff --git a/test/automated/completion-tests.el b/test/lisp/minibuffer-tests.el similarity index 100% rename from test/automated/completion-tests.el rename to test/lisp/minibuffer-tests.el diff --git a/test/automated/dbus-tests.el b/test/lisp/net/dbus-tests.el similarity index 100% rename from test/automated/dbus-tests.el rename to test/lisp/net/dbus-tests.el diff --git a/test/lisp/net/network-stream-tests.el b/test/lisp/net/network-stream-tests.el new file mode 100644 index 0000000000..c9b7cc71b2 --- /dev/null +++ b/test/lisp/net/network-stream-tests.el @@ -0,0 +1,276 @@ +;;; network-stream-tests.el --- tests for network processes -*- lexical-binding: t; -*- + +;; Copyright (C) 2016 Free Software Foundation, Inc. + +;; Author: Lars Ingebrigtsen + +;; 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 . + +;;; Commentary: + + +;;; Code: + +(require 'gnutls) + +(ert-deftest make-local-unix-server () + (skip-unless (featurep 'make-network-process '(:family local))) + (let* ((file (make-temp-name "/tmp/server-test")) + (server + (make-network-process + :name "server" + :server t + :buffer (get-buffer-create "*server*") + :noquery t + :family 'local + :service file))) + (should (equal (process-contact server :local) file)) + (delete-file (process-contact server :local)))) + +(ert-deftest make-ipv4-tcp-server-with-unspecified-port () + (let ((server + (make-network-process + :name "server" + :server t + :noquery t + :family 'ipv4 + :service t + :host 'local))) + (should (and (arrayp (process-contact server :local)) + (numberp (aref (process-contact server :local) 4)) + (> (aref (process-contact server :local) 4) 0))) + (delete-process server))) + +(ert-deftest make-ipv4-tcp-server-with-specified-port () + (let ((server + (make-network-process + :name "server" + :server t + :noquery t + :family 'ipv4 + :service 57869 + :host 'local))) + (should (and (arrayp (process-contact server :local)) + (= (aref (process-contact server :local) 4) 57869))) + (delete-process server))) + +(defun make-server (host) + (make-network-process + :name "server" + :server t + :noquery t + :family 'ipv4 + :coding 'raw-text-unix + :buffer (get-buffer-create "*server*") + :service t + :sentinel 'server-sentinel + :filter 'server-process-filter + :host host)) + +(defun server-sentinel (_proc _msg) + ) + +(defun server-process-filter (proc string) + (message "Received %s" string) + (let ((prev (process-get proc 'previous-string))) + (when prev + (setq string (concat prev string)) + (process-put proc 'previous-string nil))) + (if (and (not (string-match "\n" string)) + (> (length string) 0)) + (process-put proc 'previous-string string)) + (let ((command (split-string string))) + (cond + ((equal (car command) "echo") + (process-send-string proc (concat (cadr command) "\n"))) + (t + )))) + +(ert-deftest echo-server-with-dns () + (let* ((server (make-server (system-name))) + (port (aref (process-contact server :local) 4)) + (proc (make-network-process :name "foo" + :buffer (generate-new-buffer "*foo*") + :host (system-name) + :service port))) + (with-current-buffer (process-buffer proc) + (process-send-string proc "echo foo") + (sleep-for 0.1) + (should (equal (buffer-string) "foo\n"))) + (delete-process server))) + +(ert-deftest echo-server-with-localhost () + (let* ((server (make-server 'local)) + (port (aref (process-contact server :local) 4)) + (proc (make-network-process :name "foo" + :buffer (generate-new-buffer "*foo*") + :host "localhost" + :service port))) + (with-current-buffer (process-buffer proc) + (process-send-string proc "echo foo") + (sleep-for 0.1) + (should (equal (buffer-string) "foo\n"))) + (delete-process server))) + +(ert-deftest echo-server-with-ip () + (let* ((server (make-server 'local)) + (port (aref (process-contact server :local) 4)) + (proc (make-network-process :name "foo" + :buffer (generate-new-buffer "*foo*") + :host "127.0.0.1" + :service port))) + (with-current-buffer (process-buffer proc) + (process-send-string proc "echo foo") + (sleep-for 0.1) + (should (equal (buffer-string) "foo\n"))) + (delete-process server))) + +(ert-deftest echo-server-nowait () + (let* ((server (make-server 'local)) + (port (aref (process-contact server :local) 4)) + (proc (make-network-process :name "foo" + :buffer (generate-new-buffer "*foo*") + :host "localhost" + :nowait t + :service port))) + (should (eq (process-status proc) 'connect)) + (while (eq (process-status proc) 'connect) + (sit-for 0.1)) + (with-current-buffer (process-buffer proc) + (process-send-string proc "echo foo") + (sleep-for 0.1) + (should (equal (buffer-string) "foo\n"))) + (delete-process server))) + +(defun make-tls-server (port) + (start-process "gnutls" (generate-new-buffer "*tls*") + "gnutls-serv" "--http" + "--x509keyfile" "data/net/key.pem" + "--x509certfile" "data/net/cert.pem" + "--port" (format "%s" port))) + +(ert-deftest connect-to-tls-ipv4-wait () + (skip-unless (executable-find "gnutls-serv")) + (skip-unless (gnutls-available-p)) + (let ((server (make-tls-server 44332)) + (times 0) + proc status) + (sleep-for 1) + (with-current-buffer (process-buffer server) + (message "gnutls-serv: %s" (buffer-string))) + + ;; It takes a while for gnutls-serv to start. + (while (and (null (ignore-errors + (setq proc (make-network-process + :name "bar" + :buffer (generate-new-buffer "*foo*") + :host "localhost" + :service 44332)))) + (< (setq times (1+ times)) 10)) + (sit-for 0.1)) + (should proc) + (gnutls-negotiate :process proc + :type 'gnutls-x509pki + :hostname "localhost") + (delete-process server) + (setq status (gnutls-peer-status proc)) + (should (consp status)) + (delete-process proc) + ;; This sleep-for is needed for the native MS-Windows build. If + ;; it is removed, the next test mysteriously fails because the + ;; initial part of the echo is not received. + (sleep-for 0.1) + (let ((issuer (plist-get (plist-get status :certificate) :issuer))) + (should (stringp issuer)) + (setq issuer (split-string issuer ",")) + (should (equal (nth 3 issuer) "O=Emacs Test Servicess LLC"))))) + +(ert-deftest connect-to-tls-ipv4-nowait () + (skip-unless (executable-find "gnutls-serv")) + (skip-unless (gnutls-available-p)) + (let ((server (make-tls-server 44331)) + (times 0) + proc status) + (sleep-for 1) + (with-current-buffer (process-buffer server) + (message "gnutls-serv: %s" (buffer-string))) + + ;; It takes a while for gnutls-serv to start. + (while (and (null (ignore-errors + (setq proc (make-network-process + :name "bar" + :buffer (generate-new-buffer "*foo*") + :nowait t + :tls-parameters + (cons 'gnutls-x509pki + (gnutls-boot-parameters + :hostname "localhost")) + :host "localhost" + :service 44331)))) + (< (setq times (1+ times)) 10)) + (sit-for 0.1)) + (should proc) + (while (eq (process-status proc) 'connect) + (sit-for 0.1)) + (delete-process server) + (setq status (gnutls-peer-status proc)) + (should (consp status)) + (delete-process proc) + (let ((issuer (plist-get (plist-get status :certificate) :issuer))) + (should (stringp issuer)) + (setq issuer (split-string issuer ",")) + (should (equal (nth 3 issuer) "O=Emacs Test Servicess LLC"))))) + +(ert-deftest connect-to-tls-ipv6-nowait () + (skip-unless (executable-find "gnutls-serv")) + (skip-unless (gnutls-available-p)) + (skip-unless (not (eq system-type 'windows-nt))) + (skip-unless (featurep 'make-network-process '(:family ipv6))) + (let ((server (make-tls-server 44333)) + (times 0) + proc status) + (sleep-for 1) + (with-current-buffer (process-buffer server) + (message "gnutls-serv: %s" (buffer-string))) + + ;; It takes a while for gnutls-serv to start. + (while (and (null (ignore-errors + (setq proc (make-network-process + :name "bar" + :buffer (generate-new-buffer "*foo*") + :family 'ipv6 + :nowait t + :tls-parameters + (cons 'gnutls-x509pki + (gnutls-boot-parameters + :hostname "localhost")) + :host "::1" + :service 44333)))) + (< (setq times (1+ times)) 10)) + (sit-for 0.1)) + (should proc) + (while (eq (process-status proc) 'connect) + (sit-for 0.1)) + (delete-process server) + (setq status (gnutls-peer-status proc)) + (should (consp status)) + (delete-process proc) + (let ((issuer (plist-get (plist-get status :certificate) :issuer))) + (should (stringp issuer)) + (setq issuer (split-string issuer ",")) + (should (equal (nth 3 issuer) "O=Emacs Test Servicess LLC"))))) + +;;; network-stream-tests.el ends here diff --git a/test/automated/newsticker-tests.el b/test/lisp/net/newsticker-tests.el similarity index 100% rename from test/automated/newsticker-tests.el rename to test/lisp/net/newsticker-tests.el diff --git a/test/automated/sasl-scram-rfc-tests.el b/test/lisp/net/sasl-scram-rfc-tests.el similarity index 100% rename from test/automated/sasl-scram-rfc-tests.el rename to test/lisp/net/sasl-scram-rfc-tests.el diff --git a/test/lisp/net/shr-tests.el b/test/lisp/net/shr-tests.el new file mode 100644 index 0000000000..ab6fc93d1a --- /dev/null +++ b/test/lisp/net/shr-tests.el @@ -0,0 +1,54 @@ +;;; network-stream-tests.el --- tests for network processes -*- lexical-binding: t; -*- + +;; Copyright (C) 2016 Free Software Foundation, Inc. + +;; Author: Lars Ingebrigtsen + +;; 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 . + +;;; Commentary: + +;;; Code: + +(require 'shr) + +(defun shr-test (name) + (with-temp-buffer + (insert-file-contents (format "data/shr/%s.html" name)) + (let ((dom (libxml-parse-html-region (point-min) (point-max))) + (shr-width 80) + (shr-use-fonts nil)) + (erase-buffer) + (shr-insert-document dom) + (cons (buffer-substring-no-properties (point-min) (point-max)) + (with-temp-buffer + (insert-file-contents (format "data/shr/%s.txt" name)) + (while (re-search-forward "%\\([0-9A-F][0-9A-F]\\)" nil t) + (replace-match (string (string-to-number (match-string 1) 16)) + t t)) + (buffer-string)))))) + +(ert-deftest rendering () + (skip-unless (fboundp 'libxml-parse-html-region)) + (dolist (file (directory-files "data/shr" nil "\\.html\\'")) + (let* ((name (replace-regexp-in-string "\\.html\\'" "" file)) + (result (shr-test name))) + (unless (equal (car result) (cdr result)) + (should (not (list name (car result) (cdr result)))))))) + +(require 'shr) + +;;; shr-stream-tests.el ends here diff --git a/test/automated/tramp-tests.el b/test/lisp/net/tramp-tests.el similarity index 100% rename from test/automated/tramp-tests.el rename to test/lisp/net/tramp-tests.el diff --git a/test/automated/obarray-tests.el b/test/lisp/obarray-tests.el similarity index 100% rename from test/automated/obarray-tests.el rename to test/lisp/obarray-tests.el diff --git a/test/automated/compile-tests.el b/test/lisp/progmodes/compile-tests.el similarity index 98% rename from test/automated/compile-tests.el rename to test/lisp/progmodes/compile-tests.el index 6821a6bfae..89615760c7 100644 --- a/test/automated/compile-tests.el +++ b/test/lisp/progmodes/compile-tests.el @@ -79,6 +79,13 @@ 1 nil 302 "\\lib\\python\\Products\\PythonScripts\\PythonScript.py") ("File \"/tmp/foo.py\", line 10" 1 nil 10 "/tmp/foo.py") + ;; cmake cmake-info + ("CMake Error at CMakeLists.txt:23 (hurz):" + 1 nil 23 "CMakeLists.txt") + ("CMake Warning at cmake/modules/UseUG.cmake:73 (find_package):" + 1 nil 73 "cmake/modules/UseUG.cmake") + (" cmake/modules/DuneGridMacros.cmake:19 (include)" + 1 nil 19 "cmake/modules/DuneGridMacros.cmake") ;; comma ("\"foo.f\", line 3: Error: syntax error near end of statement" 1 nil 3 "foo.f") diff --git a/test/automated/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el similarity index 95% rename from test/automated/elisp-mode-tests.el rename to test/lisp/progmodes/elisp-mode-tests.el index f3f15ad3db..1679af3082 100644 --- a/test/automated/elisp-mode-tests.el +++ b/test/lisp/progmodes/elisp-mode-tests.el @@ -244,7 +244,7 @@ to (xref-elisp-test-descr-to-target xref)." (xref-make "(cl-defstruct (xref-elisp-location (:constructor xref-make-elisp-location)))" (xref-make-elisp-location 'xref-elisp-location 'define-type - (expand-file-name "../../lisp/progmodes/elisp-mode.el" emacs-test-dir))) + (expand-file-name "../../../lisp/progmodes/elisp-mode.el" emacs-test-dir))) ;; It's not worth adding another special case to `xref-elisp-test-descr-to-target' for this "(cl-defstruct (xref-elisp-location") )) @@ -255,11 +255,11 @@ to (xref-elisp-test-descr-to-target xref)." (xref-make "(defalias Buffer-menu-sort)" (xref-make-elisp-location 'Buffer-menu-sort 'defalias - (expand-file-name "../../lisp/buff-menu.elc" emacs-test-dir))) + (expand-file-name "../../../lisp/buff-menu.elc" emacs-test-dir))) (xref-make "(defun tabulated-list-sort)" (xref-make-elisp-location 'tabulated-list-sort nil - (expand-file-name "../../lisp/emacs-lisp/tabulated-list.el" emacs-test-dir))) + (expand-file-name "../../../lisp/emacs-lisp/tabulated-list.el" emacs-test-dir))) )) ;; FIXME: defconst @@ -406,27 +406,27 @@ to (xref-elisp-test-descr-to-target xref)." (xref-make "(cl-defgeneric xref-location-marker)" (xref-make-elisp-location 'xref-location-marker 'cl-defgeneric - (expand-file-name "../../lisp/progmodes/xref.el" emacs-test-dir))) + (expand-file-name "../../../lisp/progmodes/xref.el" emacs-test-dir))) (xref-make "(cl-defmethod xref-location-marker ((l xref-elisp-location)))" (xref-make-elisp-location '(xref-location-marker xref-elisp-location) 'cl-defmethod - (expand-file-name "../../lisp/progmodes/elisp-mode.el" emacs-test-dir))) + (expand-file-name "../../../lisp/progmodes/elisp-mode.el" emacs-test-dir))) (xref-make "(cl-defmethod xref-location-marker ((l xref-file-location)))" (xref-make-elisp-location '(xref-location-marker xref-file-location) 'cl-defmethod - (expand-file-name "../../lisp/progmodes/xref.el" emacs-test-dir))) + (expand-file-name "../../../lisp/progmodes/xref.el" emacs-test-dir))) (xref-make "(cl-defmethod xref-location-marker ((l xref-buffer-location)))" (xref-make-elisp-location '(xref-location-marker xref-buffer-location) 'cl-defmethod - (expand-file-name "../../lisp/progmodes/xref.el" emacs-test-dir))) + (expand-file-name "../../../lisp/progmodes/xref.el" emacs-test-dir))) (xref-make "(cl-defmethod xref-location-marker ((l xref-bogus-location)))" (xref-make-elisp-location '(xref-location-marker xref-bogus-location) 'cl-defmethod - (expand-file-name "../../lisp/progmodes/xref.el" emacs-test-dir))) + (expand-file-name "../../../lisp/progmodes/xref.el" emacs-test-dir))) (xref-make "(cl-defmethod xref-location-marker ((l xref-etags-location)))" (xref-make-elisp-location '(xref-location-marker xref-etags-location) 'cl-defmethod - (expand-file-name "../../lisp/progmodes/etags.el" emacs-test-dir))) + (expand-file-name "../../../lisp/progmodes/etags.el" emacs-test-dir))) )) (xref-elisp-deftest find-defs-defgeneric-eval @@ -528,7 +528,7 @@ to (xref-elisp-test-descr-to-target xref)." (xref-make "(defun xref-find-definitions)" (xref-make-elisp-location 'xref-find-definitions nil - (expand-file-name "../../lisp/progmodes/xref.el" emacs-test-dir))))) + (expand-file-name "../../../lisp/progmodes/xref.el" emacs-test-dir))))) (xref-elisp-deftest find-defs-defun-eval (elisp--xref-find-definitions (eval '(defun stephe-leake-defun ()))) @@ -561,7 +561,7 @@ to (xref-elisp-test-descr-to-target xref)." (xref-make "(defun abbrev-mode)" (xref-make-elisp-location 'abbrev-mode nil - (expand-file-name "../../lisp/abbrev.el" emacs-test-dir))) + (expand-file-name "../../../lisp/abbrev.el" emacs-test-dir))) "(define-minor-mode abbrev-mode")) ) @@ -582,7 +582,7 @@ to (xref-elisp-test-descr-to-target xref)." (xref-make "(defun compilation-minor-mode)" (xref-make-elisp-location 'compilation-minor-mode nil - (expand-file-name "../../lisp/progmodes/compile.el" emacs-test-dir))) + (expand-file-name "../../../lisp/progmodes/compile.el" emacs-test-dir))) "(define-minor-mode compilation-minor-mode") )) @@ -592,7 +592,7 @@ to (xref-elisp-test-descr-to-target xref)." (xref-make "(defvar xref--marker-ring)" (xref-make-elisp-location 'xref--marker-ring 'defvar - (expand-file-name "../../lisp/progmodes/xref.el" emacs-test-dir))) + (expand-file-name "../../../lisp/progmodes/xref.el" emacs-test-dir))) )) (xref-elisp-deftest find-defs-defvar-c @@ -615,11 +615,11 @@ to (xref-elisp-test-descr-to-target xref)." (xref-make "(defvar font-lock-keyword-face)" (xref-make-elisp-location 'font-lock-keyword-face 'defvar - (expand-file-name "../../lisp/font-lock.el" emacs-test-dir))) + (expand-file-name "../../../lisp/font-lock.el" emacs-test-dir))) (xref-make "(defface font-lock-keyword-face)" (xref-make-elisp-location 'font-lock-keyword-face 'defface - (expand-file-name "../../lisp/font-lock.el" emacs-test-dir))) + (expand-file-name "../../../lisp/font-lock.el" emacs-test-dir))) )) (xref-elisp-deftest find-defs-face-eval @@ -633,7 +633,7 @@ to (xref-elisp-test-descr-to-target xref)." (xref-make "(feature xref)" (xref-make-elisp-location 'xref 'feature - (expand-file-name "../../lisp/progmodes/xref.el" emacs-test-dir))) + (expand-file-name "../../../lisp/progmodes/xref.el" emacs-test-dir))) ";;; Code:") )) diff --git a/test/automated/f90.el b/test/lisp/progmodes/f90.el similarity index 100% rename from test/automated/f90.el rename to test/lisp/progmodes/f90.el diff --git a/test/automated/data/flymake/Makefile b/test/lisp/progmodes/flymake-resources/Makefile similarity index 100% rename from test/automated/data/flymake/Makefile rename to test/lisp/progmodes/flymake-resources/Makefile diff --git a/test/automated/data/flymake/test.c b/test/lisp/progmodes/flymake-resources/test.c similarity index 100% rename from test/automated/data/flymake/test.c rename to test/lisp/progmodes/flymake-resources/test.c diff --git a/test/automated/data/flymake/test.pl b/test/lisp/progmodes/flymake-resources/test.pl similarity index 100% rename from test/automated/data/flymake/test.pl rename to test/lisp/progmodes/flymake-resources/test.pl diff --git a/test/automated/flymake-tests.el b/test/lisp/progmodes/flymake-tests.el similarity index 97% rename from test/automated/flymake-tests.el rename to test/lisp/progmodes/flymake-tests.el index f3b830d365..386516190b 100644 --- a/test/automated/flymake-tests.el +++ b/test/lisp/progmodes/flymake-tests.el @@ -26,7 +26,7 @@ (require 'flymake) (defvar flymake-tests-data-directory - (expand-file-name "data/flymake" (getenv "EMACS_TEST_DIRECTORY")) + (expand-file-name "lisp/progmodes/flymake-resources" (getenv "EMACS_TEST_DIRECTORY")) "Directory containing flymake test data.") diff --git a/test/automated/python-tests.el b/test/lisp/progmodes/python-tests.el similarity index 100% rename from test/automated/python-tests.el rename to test/lisp/progmodes/python-tests.el diff --git a/test/automated/ruby-mode-tests.el b/test/lisp/progmodes/ruby-mode-tests.el similarity index 100% rename from test/automated/ruby-mode-tests.el rename to test/lisp/progmodes/ruby-mode-tests.el diff --git a/test/automated/subword-tests.el b/test/lisp/progmodes/subword-tests.el similarity index 100% rename from test/automated/subword-tests.el rename to test/lisp/progmodes/subword-tests.el diff --git a/lisp/obsolete/keyswap.el b/test/lisp/ps-print-tests.el similarity index 56% rename from lisp/obsolete/keyswap.el rename to test/lisp/ps-print-tests.el index ee3ba10809..9ebd31b746 100644 --- a/lisp/obsolete/keyswap.el +++ b/test/lisp/ps-print-tests.el @@ -1,10 +1,8 @@ -;;; keyswap.el --- swap BS and DEL keys +;;; ps-print-tests.el --- Test suite for ps-print.el -*- lexical-binding: t; -*- -;; Copyright (C) 1992, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 2015-2016 Free Software Foundation, Inc. -;; Author: Eric S. Raymond -;; Keywords: terminals -;; Obsolete-since: 22.1 +;; Author: Phillip Lord ;; This file is part of GNU Emacs. @@ -23,18 +21,16 @@ ;;; Commentary: -;; This package is meant to be called by other terminal packages. - ;;; Code: - -(let ((the-table (make-string 128 0))) - (let ((i 0)) - (while (< i 128) - (aset the-table i i) - (setq i (1+ i)))) - ;; Swap ^H and DEL - (aset the-table ?\177 ?\^h) - (aset the-table ?\^h ?\177) - (setq keyboard-translate-table the-table)) - -;;; keyswap.el ends here +(require 'ps-print) +(require 'ert) + +;;; Autoload tests +(ert-deftest ps-mule-autoload () + "Tests to see whether ps-mule has been autoloaded" + (should + (fboundp 'ps-mule-initialize)) + (should + (autoloadp + (symbol-function + 'ps-mule-initialize)))) diff --git a/test/automated/replace-tests.el b/test/lisp/replace-tests.el similarity index 100% rename from test/automated/replace-tests.el rename to test/lisp/replace-tests.el diff --git a/test/automated/simple-test.el b/test/lisp/simple-tests.el similarity index 100% rename from test/automated/simple-test.el rename to test/lisp/simple-tests.el diff --git a/test/automated/sort-tests.el b/test/lisp/sort-tests.el similarity index 100% rename from test/automated/sort-tests.el rename to test/lisp/sort-tests.el diff --git a/test/automated/subr-tests.el b/test/lisp/subr-tests.el similarity index 100% rename from test/automated/subr-tests.el rename to test/lisp/subr-tests.el diff --git a/test/lisp/textmodes/css-mode-tests.el b/test/lisp/textmodes/css-mode-tests.el new file mode 100644 index 0000000000..4c0a3572b3 --- /dev/null +++ b/test/lisp/textmodes/css-mode-tests.el @@ -0,0 +1,83 @@ +;;; css-mode-tests.el --- Test suite for CSS mode -*- lexical-binding: t; -*- + +;; Copyright (C) 2016 Free Software Foundation, Inc. + +;; Author: Simen Heggestøyl +;; Keywords: internal + +;; This file is part of GNU Emacs. + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;;; Code: + +(require 'css-mode) +(require 'ert) +(require 'seq) + +(ert-deftest css-test-property-values () + ;; The `float' property has a flat value list. + (should + (equal (sort (css--property-values "float") #'string-lessp) + '("left" "none" "right"))) + + ;; The `list-style' property refers to several other properties. + (should + (equal (sort (css--property-values "list-style") #'string-lessp) + (sort (seq-uniq + (append (css--property-values "list-style-type") + (css--property-values "list-style-position") + (css--property-values "list-style-image"))) + #'string-lessp))) + + ;; The `position' property is tricky because it's also the name of a + ;; value class. + (should + (equal (sort (css--property-values "position") #'string-lessp) + '("absolute" "fixed" "relative" "static"))) + + ;; The `background-position' property should refer to the `position' + ;; value class, not the property of the same name. + (should + (equal (css--property-values "background-position") + (css--value-class-lookup 'position))) + + ;; Check that the `color' property doesn't cause infinite recursion + ;; because it refers to the value class of the same name. + (should (= (length (css--property-values "color")) 18))) + +(ert-deftest css-test-property-value-cache () + "Test that `css--property-value-cache' is in use." + (should-not (gethash "word-wrap" css--property-value-cache)) + (let ((word-wrap-values (css--property-values "word-wrap"))) + (should (equal (gethash "word-wrap" css--property-value-cache) + word-wrap-values)))) + +(ert-deftest css-test-property-values-no-duplicates () + "Test that `css--property-values' returns no duplicates." + ;; The `flex' property is prone to duplicate values; if they aren't + ;; removed, it'll contain at least two instances of `auto'. + (should + (equal (sort (css--property-values "flex") #'string-lessp) + '("auto" "calc()" "content" "none")))) + +(ert-deftest css-test-value-class-lookup () + (should + (equal (sort (css--value-class-lookup 'position) #'string-lessp) + '("bottom" "calc()" "center" "left" "right" "top")))) + +(provide 'css-mode-tests) +;;; css-mode-tests.el ends here diff --git a/test/automated/reftex-tests.el b/test/lisp/textmodes/reftex-tests.el similarity index 96% rename from test/automated/reftex-tests.el rename to test/lisp/textmodes/reftex-tests.el index 0f1186d8a8..12ec7f5a39 100644 --- a/test/automated/reftex-tests.el +++ b/test/lisp/textmodes/reftex-tests.el @@ -204,5 +204,20 @@ (should (string= (reftex-format-citation entry "%l:%A:%y:%t %j %P %a") "Foo13:Jane Roe:2013:Some Article Some Journal 1 Jane Roe, John Doe \\& Jane Taxpayer")))) + +;;; Autoload tests + +;; Test to check whether reftex autoloading mechanisms are working +;; correctly. +(ert-deftest reftex-autoload-auc () + "Tests to see whether reftex-auc has been autoloaded" + (should + (fboundp 'reftex-arg-label)) + (should + (autoloadp + (symbol-function + 'reftex-arg-label)))) + + (provide 'reftex-tests) ;;; reftex-tests.el ends here. diff --git a/test/automated/sgml-mode-tests.el b/test/lisp/textmodes/sgml-mode-tests.el similarity index 100% rename from test/automated/sgml-mode-tests.el rename to test/lisp/textmodes/sgml-mode-tests.el diff --git a/test/automated/tildify-tests.el b/test/lisp/textmodes/tildify-tests.el similarity index 100% rename from test/automated/tildify-tests.el rename to test/lisp/textmodes/tildify-tests.el diff --git a/test/automated/thingatpt.el b/test/lisp/thingatpt-tests.el similarity index 100% rename from test/automated/thingatpt.el rename to test/lisp/thingatpt-tests.el diff --git a/test/lisp/url/url-auth-tests.el b/test/lisp/url/url-auth-tests.el new file mode 100644 index 0000000000..bc30f3518e --- /dev/null +++ b/test/lisp/url/url-auth-tests.el @@ -0,0 +1,255 @@ +;;; url-auth-tests.el --- Test suite for url-auth. + +;; Copyright (C) 2015-2016 Free Software Foundation, Inc. + +;; Author: Jarno Malmari + +;; 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 . + +;;; Commentary: + +;; Test HTTP authentication methods. + +;;; Code: + +(require 'ert) +(require 'url-auth) + +(defvar url-auth-test-challenges nil + "List of challenges for testing. +Each challenge is a plist. Values are as presented by the +server's WWW-Authenticate header field.") + +;; Set explicitly for easier modification for re-runs. +(setq url-auth-test-challenges + (list + (list :qop "auth" + :nonce "uBr3+qkQBybTr/dKWkmpUqVO7SaEwWYzyTKO7g==$" + :uri "/random/path" + :method "GET" + :realm "Some test realm" + :cnonce "YWU4NDcxYWMxMDAxMjlkMjAwMDE4MjI5MDAwMGY4NGQ=" + :nc "00000001" + :username "jytky" + :password "xi5Ac2HEfKt1lKKO05DCSqsK0u7hqqtsT" + :expected-ha1 "af521db3a83abd91262fead04fa31892" + :expected-ha2 "e490a6a147c79404b365d1f6059ddda5" + :expected-response "ecb6396e93b9e09e31f19264cfd8f854") + (list :nonce "a1be8a3065e00c5bf190ad499299aea5" + :opaque "d7c2a27230fc8c74bb6e06be8c9cd189" + :realm "The Test Realm" + :username "user" + :password "passwd" + :uri "/digest-auth/auth/user/passwd" + :method "GET" + :expected-ha1 "19c41161a8720edaeb7922ef8531137d" + :expected-ha2 "b44272ea65ee4af7fb26c5dba58f6863" + :expected-response "46c47a6d8e1fa95a3efcf49724af3fe7") + (list :nonce "servernonce" + :username "user" + :password "passwd" + :realm "The Test Realm 1" + :uri "/digest-auth/auth/user/passwd" + :method "GET" + :expected-ha1 "00f848f943c9a05dd06c932a7334f120" + :expected-ha2 "b44272ea65ee4af7fb26c5dba58f6863" + :expected-response "b8a48cdc9aa9e514509a5a5c53d4e8cf") + (list :nonce "servernonce" + :username "user" + :password "passwd" + :realm "The Test Realm 2" + :uri "/digest-auth/auth/user/passwd" + :method "GET" + :expected-ha1 "74d6abd3651d6b8260733d8a4c37ec1a" + :expected-ha2 "b44272ea65ee4af7fb26c5dba58f6863" + :expected-response "0d84884d967e04440efc77e9e2b5b561"))) + +(ert-deftest url-auth-test-digest-create-key () + "Check user credentials in their hashed form." + (dolist (challenge url-auth-test-challenges) + (let ((key (url-digest-auth-create-key (plist-get challenge :username) + (plist-get challenge :password) + (plist-get challenge :realm) + (plist-get challenge :method) + (plist-get challenge :uri)))) + (should (= (length key) 2)) + (should (string= (nth 0 key) (plist-get challenge :expected-ha1))) + (should (string= (nth 1 key) (plist-get challenge :expected-ha2))) + ))) + +(ert-deftest url-auth-test-digest-auth-retrieve-cache () + "Check how the entry point retrieves cached authentication. +Essential is how realms and paths are matched." + + (let* ((url-digest-auth-storage + '(("example.org:80" + ("/path/auth1" "auth1user" "key") + ("/path" "pathuser" "key") + ("/" "rootuser" "key") + ("realm1" "realm1user" "key") + ("realm2" "realm2user" "key") + ("/path/auth2" "auth2user" "key")) + ("example.org:443" + ("realm" "secure_user" "key")) + ("rootless.org:80" ; no "/" entry for this on purpose + ("/path" "pathuser" "key") + ("realm" "realmuser" "key")))) + (attrs (list (cons "nonce" "servernonce"))) + auth) + + (dolist (row (list + ;; If :expected-user is `nil' it indicates + ;; authentication information shouldn't be found. + + ;; non-existent server + (list :url "http://other.com/path" + :realm nil :expected-user nil) + + ;; unmatched port + (list :url "http://example.org:444/path" + :realm nil :expected-user nil) + + ;; root, no realm + (list :url "http://example.org/" + :realm nil :expected-user "rootuser") + + ;; root, no realm, explicit port + (list :url "http://example.org:80/" + :realm nil :expected-user "rootuser") + + (list :url "http://example.org/unknown" + :realm nil :expected-user "rootuser") + + ;; realm specified, overrides any path + (list :url "http://example.org/" + :realm "realm1" :expected-user "realm1user") + + ;; realm specified, overrides any path + (list :url "http://example.org/" + :realm "realm2" :expected-user "realm2user") + + ;; authentication determined by path + (list :url "http://example.org/path/auth1/query" + :realm nil :expected-user "auth1user") + + ;; /path shadows /path/auth2, hence pathuser is expected + (list :url "http://example.org/path/auth2/query" + :realm nil :expected-user "pathuser") + + (list :url "https://example.org/path" + :realm nil :expected-user "secure_user") + + ;; not really secure user but using the same port + (list :url "http://example.org:443/path" + :realm nil :expected-user "secure_user") + + ;; preferring realm user over path, even though no + ;; realm specified (not sure why) + (list :url "http://rootless.org/" + :realm nil :expected-user "realmuser") + ;; second variant for the same case + (list :url "http://rootless.org/unknown/path" + :realm nil :expected-user "realmuser") + + ;; path match + (list :url "http://rootless.org/path/query?q=a" + :realm nil :expected-user "pathuser") + + ;; path match, realm match, prefer realm + (list :url "http://rootless.org/path/query?q=a" + :realm "realm" :expected-user "realmuser") + )) + (setq auth (url-digest-auth (plist-get row :url) + nil nil + (plist-get row :realm) attrs)) + (if (plist-get row :expected-user) + (progn (should auth) + (should (string-match ".*username=\"\\(.*?\\)\".*" auth)) + (should (string= (match-string 1 auth) + (plist-get row :expected-user)))) + (should-not auth))))) + +(ert-deftest url-auth-test-digest-auth () + "Check common authorization string contents. +Challenges with qop are not checked for response since a unique +cnonce is used for generating them which is not mocked by the +test and cannot be passed by arguments to `url-digest-auth'." + (dolist (challenge url-auth-test-challenges) + (let* ((attrs (append + (list (cons "nonce" (plist-get challenge :nonce))) + (if (plist-get challenge :qop) + (list (cons "qop" (plist-get challenge :qop)))))) + (url (concat "http://example.org" (plist-get challenge :uri))) + url-digest-auth-storage + auth) + ;; Add authentication info to cache so `url-digest-auth' can + ;; complete without prompting minibuffer input. + (setq url-digest-auth-storage + (list + (list "example.org:80" + (cons (or (plist-get challenge :realm) "/") + (cons (plist-get challenge :username) + (url-digest-auth-create-key + (plist-get challenge :username) + (plist-get challenge :password) + (plist-get challenge :realm) + (plist-get challenge :method) + (plist-get challenge :uri))))))) + (setq auth (url-digest-auth (url-generic-parse-url url) nil nil + (plist-get challenge :realm) attrs)) + (should auth) + (should (string-prefix-p "Digest " auth)) + (should (string-match ".*username=\"\\(.*?\\)\".*" auth)) + (should (string= (match-string 1 auth) + (plist-get challenge :username))) + (should (string-match ".*realm=\"\\(.*?\\)\".*" auth)) + (should (string= (match-string 1 auth) + (plist-get challenge :realm))) + + (if (plist-member challenge :qop) + (progn + ;; We don't know these, just check that they exists. + (should (string-match-p ".*response=\".*?\".*" auth)) + ;; url-digest-auth doesn't return these AFAICS. +;;; (should (string-match-p ".*nc=\".*?\".*" auth)) +;;; (should (string-match-p ".*cnonce=\".*?\".*" auth)) + ) + (should (string-match ".*response=\"\\(.*?\\)\".*" auth)) + (should (string= (match-string 1 auth) + (plist-get challenge :expected-response)))) + ))) + +(ert-deftest url-auth-test-digest-auth-opaque () + "Check that `opaque' value is added to result when presented by +the server." + (let* ((url-digest-auth-storage + '(("example.org:80" ("/" "user" "key")))) + (attrs (list (cons "nonce" "anynonce"))) + auth) + ;; Get authentication info from cache without `opaque'. + (setq auth (url-digest-auth "http://example.org/path" nil nil nil attrs)) + (should auth) + (should-not (string-match-p "opaque=" auth)) + + ;; Add `opaque' to attributes. + (push (cons "opaque" "opaque-value") attrs) + (setq auth (url-digest-auth "http://example.org/path" nil nil nil attrs)) + (should auth) + (should (string-match ".*opaque=\"\\(.*?\\)\".*" auth)) + (should (string= (match-string 1 auth) "opaque-value")))) + +(provide 'url-auth-tests) +;;; url-auth-tests.el ends here diff --git a/test/automated/url-expand-tests.el b/test/lisp/url/url-expand-tests.el similarity index 100% rename from test/automated/url-expand-tests.el rename to test/lisp/url/url-expand-tests.el diff --git a/test/automated/url-future-tests.el b/test/lisp/url/url-future-tests.el similarity index 100% rename from test/automated/url-future-tests.el rename to test/lisp/url/url-future-tests.el diff --git a/test/automated/url-parse-tests.el b/test/lisp/url/url-parse-tests.el similarity index 100% rename from test/automated/url-parse-tests.el rename to test/lisp/url/url-parse-tests.el diff --git a/test/automated/url-util-tests.el b/test/lisp/url/url-util-tests.el similarity index 100% rename from test/automated/url-util-tests.el rename to test/lisp/url/url-util-tests.el diff --git a/test/automated/add-log-tests.el b/test/lisp/vc/add-log-tests.el similarity index 100% rename from test/automated/add-log-tests.el rename to test/lisp/vc/add-log-tests.el diff --git a/test/automated/vc-bzr.el b/test/lisp/vc/vc-bzr-tests.el similarity index 96% rename from test/automated/vc-bzr.el rename to test/lisp/vc/vc-bzr-tests.el index 82721eeee4..98d176ca1e 100644 --- a/test/automated/vc-bzr.el +++ b/test/lisp/vc/vc-bzr-tests.el @@ -25,6 +25,7 @@ ;;; Code: (require 'ert) +(require 'ert-x) (require 'vc-bzr) (require 'vc-dir) @@ -101,12 +102,8 @@ (while (vc-dir-busy) (sit-for 0.1)) (vc-dir-mark-all-files t) - (let ((f (symbol-function 'y-or-n-p))) - (unwind-protect - (progn - (fset 'y-or-n-p (lambda (prompt) t)) - (vc-next-action nil)) - (fset 'y-or-n-p f))) + (ert-with-function-mocked y-or-n-p (lambda (_) t) + (vc-next-action nil)) (should (get-buffer "*vc-log*"))) (delete-directory homedir t)))) diff --git a/test/automated/vc-hg.el b/test/lisp/vc/vc-hg.el similarity index 100% rename from test/automated/vc-hg.el rename to test/lisp/vc/vc-hg.el diff --git a/test/automated/vc-tests.el b/test/lisp/vc/vc-tests.el similarity index 75% rename from test/automated/vc-tests.el rename to test/lisp/vc/vc-tests.el index 5042196f42..ac10ce2337 100644 --- a/test/automated/vc-tests.el +++ b/test/lisp/vc/vc-tests.el @@ -109,6 +109,8 @@ (require 'ert) (require 'vc) +(declare-function w32-application-type "w32proc") + ;; The working horses. (defvar vc-test--cleanup-hook nil @@ -117,7 +119,7 @@ Don't set it globally, the functions shall be let-bound.") (defun vc-test--revision-granularity-function (backend) "Run the `vc-revision-granularity' backend function." - (funcall (intern (downcase (format "vc-%s-revision-granularity" backend))))) + (vc-call-backend backend 'revision-granularity)) (defun vc-test--create-repo-function (backend) "Run the `vc-create-repo' backend function. @@ -201,19 +203,28 @@ For backends which dont support it, it is emulated." ;; Save exit. (ignore-errors (run-hooks 'vc-test--cleanup-hook))))) -;; Why isn't there `vc-unregister'? +;; FIXME: Why isn't there `vc-unregister'? (defun vc-test--unregister-function (backend file) "Run the `vc-unregister' backend function. -For backends which dont support it, `vc-not-supported' is signalled." - - (let ((symbol (intern (downcase (format "vc-%s-unregister" backend))))) - (if (functionp symbol) - (funcall symbol file) - ;; CVS, SVN, SCCS, SRC and Mtn are not supported. - (signal 'vc-not-supported (list 'unregister backend))))) +For backends which don't support it, `vc-not-supported' is signalled." + ;; CVS, SVN, SCCS, SRC and Mtn are not supported, and will signal + ;; `vc-not-supported'. + (prog1 + (vc-call-backend backend 'unregister file) + (vc-file-clearprops file))) + +(defmacro vc-test--run-maybe-unsupported-function (func &rest args) + "Run FUNC withs ARGS as arguments. +Catch the `vc-not-supported' error." + `(let (err) + (condition-case err + (funcall ,func ,@args) + (vc-not-supported 'vc-not-supported) + (t (signal (car err) (cdr err)))))) (defun vc-test--register (backend) - "Register and unregister a file." + "Register and unregister a file. +This checks also `vc-backend' and `vc-responsible-backend'." (let ((vc-handled-backends `(,backend)) (default-directory @@ -232,32 +243,56 @@ For backends which dont support it, `vc-not-supported' is signalled." ;; Create empty repository. (make-directory default-directory) (vc-test--create-repo-function backend) + ;; For file oriented backends CVS, RCS and SVN the backend is + ;; returned, and the directory is registered already. + (should (if (vc-backend default-directory) + (vc-registered default-directory) + (not (vc-registered default-directory)))) + (should (eq (vc-responsible-backend default-directory) backend)) (let ((tmp-name1 (expand-file-name "foo" default-directory)) (tmp-name2 "bla")) ;; Register files. Check for it. (write-region "foo" nil tmp-name1 nil 'nomessage) (should (file-exists-p tmp-name1)) + (should-not (vc-backend tmp-name1)) + (should (eq (vc-responsible-backend tmp-name1) backend)) (should-not (vc-registered tmp-name1)) + (write-region "bla" nil tmp-name2 nil 'nomessage) (should (file-exists-p tmp-name2)) + (should-not (vc-backend tmp-name2)) + (should (eq (vc-responsible-backend tmp-name2) backend)) (should-not (vc-registered tmp-name2)) + (vc-register (list backend (list tmp-name1 tmp-name2))) (should (file-exists-p tmp-name1)) + (should (eq (vc-backend tmp-name1) backend)) + (should (eq (vc-responsible-backend tmp-name1) backend)) (should (vc-registered tmp-name1)) + (should (file-exists-p tmp-name2)) + (should (eq (vc-backend tmp-name2) backend)) + (should (eq (vc-responsible-backend tmp-name2) backend)) (should (vc-registered tmp-name2)) + ;; `vc-backend' accepts also a list of files, + ;; `vc-responsible-backend' doesn't. + (should (vc-backend (list tmp-name1 tmp-name2))) + ;; Unregister the files. - (condition-case err - (progn - (vc-test--unregister-function backend tmp-name1) - (should-not (vc-registered tmp-name1)) - (vc-test--unregister-function backend tmp-name2) - (should-not (vc-registered tmp-name2))) - ;; CVS, SVN, SCCS, SRC and Mtn are not supported. - (vc-not-supported t)) - ;; The files shall still exist. + (unless (eq (vc-test--run-maybe-unsupported-function + 'vc-test--unregister-function backend tmp-name1) + 'vc-not-supported) + (should-not (vc-backend tmp-name1)) + (should-not (vc-registered tmp-name1))) + (unless (eq (vc-test--run-maybe-unsupported-function + 'vc-test--unregister-function backend tmp-name2) + 'vc-not-supported) + (should-not (vc-backend tmp-name2)) + (should-not (vc-registered tmp-name2))) + + ;; The files shall still exist. (should (file-exists-p tmp-name1)) (should (file-exists-p tmp-name2)))) @@ -281,70 +316,42 @@ For backends which dont support it, `vc-not-supported' is signalled." 'vc-test--cleanup-hook `(lambda () (delete-directory ,default-directory 'recursive))) - ;; Create empty repository. Check repository state. + ;; Create empty repository. (make-directory default-directory) (vc-test--create-repo-function backend) - ;; nil: Hg Mtn RCS - ;; added: Git - ;; unregistered: CVS SCCS SRC - ;; up-to-date: Bzr SVN - (message "vc-state1 %s" (vc-state default-directory)) - ;;(should (eq (vc-state default-directory) - ;;(vc-state default-directory backend))) - (should (memq (vc-state default-directory) - '(nil added unregistered up-to-date))) - (let ((tmp-name (expand-file-name "foo" default-directory))) - ;; Check state of an empty file. + ;; Check state of a nonexistent file. - ;; nil: Hg Mtn SRC SVN - ;; added: Git - ;; unregistered: RCS SCCS - ;; up-to-date: Bzr CVS (message "vc-state2 %s" (vc-state tmp-name)) - ;;(should (eq (vc-state tmp-name) (vc-state tmp-name backend))) - (should (memq (vc-state tmp-name) - '(nil added unregistered up-to-date))) + (should (null (vc-state tmp-name))) ;; Write a new file. Check state. (write-region "foo" nil tmp-name nil 'nomessage) - ;; nil: Mtn - ;; added: Git - ;; unregistered: Hg RCS SCCS SRC SVN - ;; up-to-date: Bzr CVS (message "vc-state3 %s" (vc-state tmp-name)) - ;;(should (eq (vc-state tmp-name) (vc-state tmp-name backend))) - (should (memq (vc-state tmp-name) - '(nil added unregistered up-to-date))) + (should (null (vc-state tmp-name))) ;; Register a file. Check state. (vc-register (list backend (list (file-name-nondirectory tmp-name)))) - ;; added: Git Mtn - ;; unregistered: Hg RCS SCCS SRC SVN - ;; up-to-date: Bzr CVS + ;; FIXME: nil is definitely wrong. + ;; nil: SRC + ;; added: Bzr CVS Git Hg Mtn SVN + ;; up-to-date: RCS SCCS (message "vc-state4 %s" (vc-state tmp-name)) - ;;(should (eq (vc-state tmp-name) (vc-state tmp-name backend))) - (should (memq (vc-state tmp-name) - '(nil added unregistered up-to-date))) + (should (memq (vc-state tmp-name) '(nil added up-to-date))) ;; Unregister the file. Check state. - (condition-case nil - (progn - (vc-test--unregister-function backend tmp-name) - - ;; added: Git - ;; unregistered: Hg RCS - ;; unsupported: CVS Mtn SCCS SRC SVN - ;; up-to-date: Bzr - (message "vc-state5 %s" (vc-state tmp-name)) - ;;(should (eq (vc-state tmp-name) (vc-state tmp-name backend))) - (should (memq (vc-state tmp-name) - '(nil added unregistered up-to-date)))) - (vc-not-supported (message "vc-state5 unsupported"))))) + (if (eq (vc-test--run-maybe-unsupported-function + 'vc-test--unregister-function backend tmp-name) + 'vc-not-supported) + (message "vc-state5 unsupported") + ;; nil: Bzr Git Hg RCS + ;; unsupported: CVS Mtn SCCS SRC SVN + (message "vc-state5 %s" (vc-state tmp-name)) + (should (null (vc-state tmp-name)))))) ;; Save exit. (ignore-errors (run-hooks 'vc-test--cleanup-hook))))) @@ -371,60 +378,51 @@ For backends which dont support it, `vc-not-supported' is signalled." (make-directory default-directory) (vc-test--create-repo-function backend) - ;; nil: CVS Git Mtn RCS SCCS - ;; "0": Bzr Hg SRC SVN + ;; FIXME: Is the value for SVN correct? + ;; nil: Bzr CVS Git Hg Mtn RCS SCCS SRC + ;; "0": SVN (message "vc-working-revision1 %s" (vc-working-revision default-directory)) - ;;(should (eq (vc-working-revision default-directory) - ;;(vc-working-revision default-directory backend))) - (should (member (vc-working-revision default-directory) '(nil "0"))) + (should (member (vc-working-revision default-directory) '(nil "0"))) (let ((tmp-name (expand-file-name "foo" default-directory))) ;; Check initial working revision, should be nil until ;; it's registered. - ;; nil: CVS Git Mtn RCS SCCS SVN - ;; "0": Bzr Hg SRC (message "vc-working-revision2 %s" (vc-working-revision tmp-name)) - ;;(should (eq (vc-working-revision tmp-name) - ;;(vc-working-revision tmp-name backend))) - (should (member (vc-working-revision tmp-name) '(nil "0"))) + (should-not (vc-working-revision tmp-name)) ;; Write a new file. Check working revision. (write-region "foo" nil tmp-name nil 'nomessage) - ;; nil: CVS Git Mtn RCS SCCS SVN - ;; "0": Bzr Hg SRC (message "vc-working-revision3 %s" (vc-working-revision tmp-name)) - ;;(should (eq (vc-working-revision tmp-name) - ;;(vc-working-revision tmp-name backend))) - (should (member (vc-working-revision tmp-name) '(nil "0"))) + (should-not (vc-working-revision tmp-name)) ;; Register a file. Check working revision. (vc-register (list backend (list (file-name-nondirectory tmp-name)))) - ;; nil: Mtn Git RCS SCCS + ;; XXX: nil is fine, at least in Git's case, because + ;; `vc-register' only makes the file `added' in this case. + ;; nil: Git Mtn ;; "0": Bzr CVS Hg SRC SVN + ;; "1.1": RCS SCCS (message "vc-working-revision4 %s" (vc-working-revision tmp-name)) - ;;(should (eq (vc-working-revision tmp-name) - ;;(vc-working-revision tmp-name backend))) - (should (member (vc-working-revision tmp-name) '(nil "0"))) + (should (member (vc-working-revision tmp-name) '(nil "0" "1.1"))) + + ;; TODO: Call `vc-checkin', and check the resulting + ;; working revision. None of the return values should be + ;; nil then. ;; Unregister the file. Check working revision. - (condition-case nil - (progn - (vc-test--unregister-function backend tmp-name) - - ;; nil: Git RCS - ;; "0": Bzr Hg - ;; unsupported: CVS Mtn SCCS SRC SVN - (message - "vc-working-revision5 %s" (vc-working-revision tmp-name)) - ;;(should (eq (vc-working-revision tmp-name) - ;;(vc-working-revision tmp-name backend))) - (should (member (vc-working-revision tmp-name) '(nil "0")))) - (vc-not-supported (message "vc-working-revision5 unsupported"))))) + (if (eq (vc-test--run-maybe-unsupported-function + 'vc-test--unregister-function backend tmp-name) + 'vc-not-supported) + (message "vc-working-revision5 unsupported") + ;; nil: Bzr Git Hg RCS + ;; unsupported: CVS Mtn SCCS SRC SVN + (message "vc-working-revision5 %s" (vc-working-revision tmp-name)) + (should-not (vc-working-revision tmp-name))))) ;; Save exit. (ignore-errors (run-hooks 'vc-test--cleanup-hook))))) @@ -451,9 +449,8 @@ For backends which dont support it, `vc-not-supported' is signalled." (vc-test--create-repo-function backend) ;; Surprisingly, none of the backends returns 'announce. - ;; nil: RCS ;; implicit: Bzr CVS Git Hg Mtn SRC SVN - ;; locking: SCCS + ;; locking: RCS SCCS (message "vc-checkout-model1 %s" (vc-checkout-model backend default-directory)) @@ -461,11 +458,10 @@ For backends which dont support it, `vc-not-supported' is signalled." '(announce implicit locking))) (let ((tmp-name (expand-file-name "foo" default-directory))) - ;; Check checkout model of an empty file. + ;; Check checkout model of a nonexistent file. - ;; nil: RCS ;; implicit: Bzr CVS Git Hg Mtn SRC SVN - ;; locking: SCCS + ;; locking: RCS SCCS (message "vc-checkout-model2 %s" (vc-checkout-model backend tmp-name)) (should (memq (vc-checkout-model backend tmp-name) @@ -474,9 +470,8 @@ For backends which dont support it, `vc-not-supported' is signalled." ;; Write a new file. Check checkout model. (write-region "foo" nil tmp-name nil 'nomessage) - ;; nil: RCS ;; implicit: Bzr CVS Git Hg Mtn SRC SVN - ;; locking: SCCS + ;; locking: RCS SCCS (message "vc-checkout-model3 %s" (vc-checkout-model backend tmp-name)) (should (memq (vc-checkout-model backend tmp-name) @@ -486,27 +481,25 @@ For backends which dont support it, `vc-not-supported' is signalled." (vc-register (list backend (list (file-name-nondirectory tmp-name)))) - ;; nil: RCS ;; implicit: Bzr CVS Git Hg Mtn SRC SVN - ;; locking: SCCS + ;; locking: RCS SCCS (message "vc-checkout-model4 %s" (vc-checkout-model backend tmp-name)) (should (memq (vc-checkout-model backend tmp-name) '(announce implicit locking))) ;; Unregister the file. Check checkout model. - (condition-case nil - (progn - (vc-test--unregister-function backend tmp-name) - - ;; nil: RCS - ;; implicit: Bzr Git Hg - ;; unsupported: CVS Mtn SCCS SRC SVN - (message - "vc-checkout-model5 %s" (vc-checkout-model backend tmp-name)) - (should (memq (vc-checkout-model backend tmp-name) - '(announce implicit locking)))) - (vc-not-supported (message "vc-checkout-model5 unsupported"))))) + (if (eq (vc-test--run-maybe-unsupported-function + 'vc-test--unregister-function backend tmp-name) + 'vc-not-supported) + (message "vc-checkout-model5 unsupported") + ;; implicit: Bzr Git Hg + ;; locking: RCS + ;; unsupported: CVS Mtn SCCS SRC SVN + (message + "vc-checkout-model5 %s" (vc-checkout-model backend tmp-name)) + (should (memq (vc-checkout-model backend tmp-name) + '(announce implicit locking)))))) ;; Save exit. (ignore-errors (run-hooks 'vc-test--cleanup-hook))))) @@ -605,8 +598,6 @@ For backends which dont support it, `vc-not-supported' is signalled." ,(intern (format "vc-test-%s04-checkout-model" backend-string)) () ,(format "Check `vc-checkout-model' for the %s backend." backend-string) - ;; FIXME make this pass. - :expected-result ,(if (equal backend 'RCS) :failed :passed) (skip-unless (ert-test-passed-p (ert-test-most-recent-result diff --git a/test/automated/xml-parse-tests.el b/test/lisp/xml-tests.el similarity index 100% rename from test/automated/xml-parse-tests.el rename to test/lisp/xml-tests.el diff --git a/test/automated/xt-mouse-tests.el b/test/lisp/xt-mouse-tests.el similarity index 100% rename from test/automated/xt-mouse-tests.el rename to test/lisp/xt-mouse-tests.el diff --git a/test/make-test-deps.emacs-lisp b/test/make-test-deps.emacs-lisp new file mode 100644 index 0000000000..9edeef3d2a --- /dev/null +++ b/test/make-test-deps.emacs-lisp @@ -0,0 +1,98 @@ +;; -*- emacs-lisp -*- + +;; Copyright (C) 2015-2016 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file generates dependencies between test files and the files +;; that they test. + +;; It has an .emacs-lisp extension because it makes the Makefile easier! + +(require 'seq) + +(defun make-test-deps (src-dir) + (let ((src-dir (file-truename src-dir))) + (message + "%s" + (concat + (make-test-deps-lisp src-dir) + (make-test-deps-src src-dir))))) + +(defun make-test-deps-lisp (src-dir) + (mapconcat + (lambda (file-without-suffix) + (format "./%s-tests.log: %s/../%s.el\n" + file-without-suffix + src-dir + file-without-suffix)) + (make-test-test-files src-dir "lisp") "")) + +(defun make-test-deps-src (src-dir) + (mapconcat + (lambda (file-without-suffix) + (format "./%s-tests.log: %s/../%s.c\n" + file-without-suffix + src-dir + file-without-suffix)) + (make-test-test-files src-dir "src") "")) + +(defun make-test-test-files (src-dir sub-src-dir) + (make-test-munge-files + src-dir + (directory-files-recursively + (concat src-dir "/" sub-src-dir) + ".*-tests.el$"))) + +(defun make-test-munge-files (src-dir files) + (make-test-sans-suffix + (make-test-de-stem + src-dir + (make-test-no-legacy + (make-test-no-test-dir + (make-test-no-resources + files)))))) + +(defun make-test-sans-suffix (files) + (mapcar + (lambda (file) + (substring file 0 -9)) + files)) + +(defun make-test-de-stem (stem files) + (mapcar + (lambda (file) + (substring + file + (+ 1 (length stem)))) + files)) + +(defun make-test-no-legacy (list) + (make-test-remove list "legacy/")) + +(defun make-test-no-resources (list) + (make-test-remove list "-resources/")) + +(defun make-test-no-test-dir (list) + (make-test-remove list "-tests/")) + +(defun make-test-remove (list match) + (seq-remove + (lambda (file) + (string-match-p match file)) + list)) diff --git a/test/BidiCharacterTest.txt b/test/manual/BidiCharacterTest.txt similarity index 100% rename from test/BidiCharacterTest.txt rename to test/manual/BidiCharacterTest.txt diff --git a/test/biditest.el b/test/manual/biditest.el similarity index 100% rename from test/biditest.el rename to test/manual/biditest.el diff --git a/test/cedet/cedet-utests.el b/test/manual/cedet/cedet-utests.el similarity index 100% rename from test/cedet/cedet-utests.el rename to test/manual/cedet/cedet-utests.el diff --git a/test/cedet/ede-tests.el b/test/manual/cedet/ede-tests.el similarity index 100% rename from test/cedet/ede-tests.el rename to test/manual/cedet/ede-tests.el diff --git a/test/cedet/semantic-ia-utest.el b/test/manual/cedet/semantic-ia-utest.el similarity index 100% rename from test/cedet/semantic-ia-utest.el rename to test/manual/cedet/semantic-ia-utest.el diff --git a/test/cedet/semantic-tests.el b/test/manual/cedet/semantic-tests.el similarity index 100% rename from test/cedet/semantic-tests.el rename to test/manual/cedet/semantic-tests.el diff --git a/test/cedet/semantic-utest-c.el b/test/manual/cedet/semantic-utest-c.el similarity index 100% rename from test/cedet/semantic-utest-c.el rename to test/manual/cedet/semantic-utest-c.el diff --git a/test/cedet/semantic-utest.el b/test/manual/cedet/semantic-utest.el similarity index 100% rename from test/cedet/semantic-utest.el rename to test/manual/cedet/semantic-utest.el diff --git a/test/cedet/srecode-tests.el b/test/manual/cedet/srecode-tests.el similarity index 100% rename from test/cedet/srecode-tests.el rename to test/manual/cedet/srecode-tests.el diff --git a/test/cedet/tests/test.c b/test/manual/cedet/tests/test.c similarity index 100% rename from test/cedet/tests/test.c rename to test/manual/cedet/tests/test.c diff --git a/test/cedet/tests/test.el b/test/manual/cedet/tests/test.el similarity index 100% rename from test/cedet/tests/test.el rename to test/manual/cedet/tests/test.el diff --git a/test/cedet/tests/test.make b/test/manual/cedet/tests/test.make similarity index 100% rename from test/cedet/tests/test.make rename to test/manual/cedet/tests/test.make diff --git a/test/cedet/tests/testdoublens.cpp b/test/manual/cedet/tests/testdoublens.cpp similarity index 100% rename from test/cedet/tests/testdoublens.cpp rename to test/manual/cedet/tests/testdoublens.cpp diff --git a/test/cedet/tests/testdoublens.hpp b/test/manual/cedet/tests/testdoublens.hpp similarity index 100% rename from test/cedet/tests/testdoublens.hpp rename to test/manual/cedet/tests/testdoublens.hpp diff --git a/test/cedet/tests/testfriends.cpp b/test/manual/cedet/tests/testfriends.cpp similarity index 100% rename from test/cedet/tests/testfriends.cpp rename to test/manual/cedet/tests/testfriends.cpp diff --git a/test/cedet/tests/testjavacomp.java b/test/manual/cedet/tests/testjavacomp.java similarity index 100% rename from test/cedet/tests/testjavacomp.java rename to test/manual/cedet/tests/testjavacomp.java diff --git a/test/cedet/tests/testnsp.cpp b/test/manual/cedet/tests/testnsp.cpp similarity index 100% rename from test/cedet/tests/testnsp.cpp rename to test/manual/cedet/tests/testnsp.cpp diff --git a/test/cedet/tests/testpolymorph.cpp b/test/manual/cedet/tests/testpolymorph.cpp similarity index 100% rename from test/cedet/tests/testpolymorph.cpp rename to test/manual/cedet/tests/testpolymorph.cpp diff --git a/test/cedet/tests/testspp.c b/test/manual/cedet/tests/testspp.c similarity index 100% rename from test/cedet/tests/testspp.c rename to test/manual/cedet/tests/testspp.c diff --git a/test/cedet/tests/testsppcomplete.c b/test/manual/cedet/tests/testsppcomplete.c similarity index 100% rename from test/cedet/tests/testsppcomplete.c rename to test/manual/cedet/tests/testsppcomplete.c diff --git a/test/cedet/tests/testsppreplace.c b/test/manual/cedet/tests/testsppreplace.c similarity index 100% rename from test/cedet/tests/testsppreplace.c rename to test/manual/cedet/tests/testsppreplace.c diff --git a/test/cedet/tests/testsppreplaced.c b/test/manual/cedet/tests/testsppreplaced.c similarity index 100% rename from test/cedet/tests/testsppreplaced.c rename to test/manual/cedet/tests/testsppreplaced.c diff --git a/test/cedet/tests/testsubclass.cpp b/test/manual/cedet/tests/testsubclass.cpp similarity index 100% rename from test/cedet/tests/testsubclass.cpp rename to test/manual/cedet/tests/testsubclass.cpp diff --git a/test/cedet/tests/testsubclass.hh b/test/manual/cedet/tests/testsubclass.hh similarity index 100% rename from test/cedet/tests/testsubclass.hh rename to test/manual/cedet/tests/testsubclass.hh diff --git a/test/cedet/tests/testtypedefs.cpp b/test/manual/cedet/tests/testtypedefs.cpp similarity index 100% rename from test/cedet/tests/testtypedefs.cpp rename to test/manual/cedet/tests/testtypedefs.cpp diff --git a/test/cedet/tests/testvarnames.c b/test/manual/cedet/tests/testvarnames.c similarity index 100% rename from test/cedet/tests/testvarnames.c rename to test/manual/cedet/tests/testvarnames.c diff --git a/test/etags/CTAGS.good b/test/manual/etags/CTAGS.good similarity index 100% rename from test/etags/CTAGS.good rename to test/manual/etags/CTAGS.good diff --git a/test/etags/ETAGS.good_1 b/test/manual/etags/ETAGS.good_1 similarity index 100% rename from test/etags/ETAGS.good_1 rename to test/manual/etags/ETAGS.good_1 diff --git a/test/etags/ETAGS.good_2 b/test/manual/etags/ETAGS.good_2 similarity index 100% rename from test/etags/ETAGS.good_2 rename to test/manual/etags/ETAGS.good_2 diff --git a/test/etags/ETAGS.good_3 b/test/manual/etags/ETAGS.good_3 similarity index 100% rename from test/etags/ETAGS.good_3 rename to test/manual/etags/ETAGS.good_3 diff --git a/test/etags/ETAGS.good_4 b/test/manual/etags/ETAGS.good_4 similarity index 100% rename from test/etags/ETAGS.good_4 rename to test/manual/etags/ETAGS.good_4 diff --git a/test/etags/ETAGS.good_5 b/test/manual/etags/ETAGS.good_5 similarity index 100% rename from test/etags/ETAGS.good_5 rename to test/manual/etags/ETAGS.good_5 diff --git a/test/etags/ETAGS.good_6 b/test/manual/etags/ETAGS.good_6 similarity index 100% rename from test/etags/ETAGS.good_6 rename to test/manual/etags/ETAGS.good_6 diff --git a/test/etags/Makefile b/test/manual/etags/Makefile similarity index 98% rename from test/etags/Makefile rename to test/manual/etags/Makefile index 6e335711ff..07ad0f4641 100644 --- a/test/etags/Makefile +++ b/test/manual/etags/Makefile @@ -33,8 +33,8 @@ SRCS=${ADASRC} ${ASRC} ${CSRC} ${CPSRC} ${ELSRC} ${ERLSRC} ${FSRC}\ ${PROLSRC} ${PYTSRC} ${RBSRC} ${TEXSRC} ${YSRC} NONSRCS=./f-src/entry.strange ./erl-src/lists.erl ./cp-src/clheir.hpp.gz -ETAGS_PROG=../../lib-src/etags -CTAGS_PROG=../../lib-src/ctags +ETAGS_PROG=../../../lib-src/etags +CTAGS_PROG=../../../lib-src/ctags REGEX=/[ \t]*DEFVAR_[A-Z_ \t\n(]+"\([^"]+\)"/ xx="this line is here because of a fontlock bug diff --git a/test/etags/a-src/empty.zz b/test/manual/etags/a-src/empty.zz similarity index 100% rename from test/etags/a-src/empty.zz rename to test/manual/etags/a-src/empty.zz diff --git a/test/etags/a-src/empty.zz.gz b/test/manual/etags/a-src/empty.zz.gz similarity index 100% rename from test/etags/a-src/empty.zz.gz rename to test/manual/etags/a-src/empty.zz.gz diff --git a/test/etags/ada-src/2ataspri.adb b/test/manual/etags/ada-src/2ataspri.adb similarity index 100% rename from test/etags/ada-src/2ataspri.adb rename to test/manual/etags/ada-src/2ataspri.adb diff --git a/test/etags/ada-src/2ataspri.ads b/test/manual/etags/ada-src/2ataspri.ads similarity index 100% rename from test/etags/ada-src/2ataspri.ads rename to test/manual/etags/ada-src/2ataspri.ads diff --git a/test/etags/ada-src/etags-test-for.ada b/test/manual/etags/ada-src/etags-test-for.ada similarity index 100% rename from test/etags/ada-src/etags-test-for.ada rename to test/manual/etags/ada-src/etags-test-for.ada diff --git a/test/etags/ada-src/waroquiers.ada b/test/manual/etags/ada-src/waroquiers.ada similarity index 100% rename from test/etags/ada-src/waroquiers.ada rename to test/manual/etags/ada-src/waroquiers.ada diff --git a/test/etags/c-src/a/b/b.c b/test/manual/etags/c-src/a/b/b.c similarity index 100% rename from test/etags/c-src/a/b/b.c rename to test/manual/etags/c-src/a/b/b.c diff --git a/test/etags/c-src/abbrev.c b/test/manual/etags/c-src/abbrev.c similarity index 100% rename from test/etags/c-src/abbrev.c rename to test/manual/etags/c-src/abbrev.c diff --git a/test/etags/c-src/c.c b/test/manual/etags/c-src/c.c similarity index 100% rename from test/etags/c-src/c.c rename to test/manual/etags/c-src/c.c diff --git a/test/etags/c-src/dostorture.c b/test/manual/etags/c-src/dostorture.c similarity index 100% rename from test/etags/c-src/dostorture.c rename to test/manual/etags/c-src/dostorture.c diff --git a/test/etags/c-src/emacs/src/gmalloc.c b/test/manual/etags/c-src/emacs/src/gmalloc.c similarity index 100% rename from test/etags/c-src/emacs/src/gmalloc.c rename to test/manual/etags/c-src/emacs/src/gmalloc.c diff --git a/test/etags/c-src/emacs/src/keyboard.c b/test/manual/etags/c-src/emacs/src/keyboard.c similarity index 100% rename from test/etags/c-src/emacs/src/keyboard.c rename to test/manual/etags/c-src/emacs/src/keyboard.c diff --git a/test/etags/c-src/emacs/src/lisp.h b/test/manual/etags/c-src/emacs/src/lisp.h similarity index 100% rename from test/etags/c-src/emacs/src/lisp.h rename to test/manual/etags/c-src/emacs/src/lisp.h diff --git a/test/etags/c-src/emacs/src/regex.h b/test/manual/etags/c-src/emacs/src/regex.h similarity index 100% rename from test/etags/c-src/emacs/src/regex.h rename to test/manual/etags/c-src/emacs/src/regex.h diff --git a/test/etags/c-src/etags.c b/test/manual/etags/c-src/etags.c similarity index 100% rename from test/etags/c-src/etags.c rename to test/manual/etags/c-src/etags.c diff --git a/test/etags/c-src/exit.c b/test/manual/etags/c-src/exit.c similarity index 100% rename from test/etags/c-src/exit.c rename to test/manual/etags/c-src/exit.c diff --git a/test/etags/c-src/exit.strange_suffix b/test/manual/etags/c-src/exit.strange_suffix similarity index 100% rename from test/etags/c-src/exit.strange_suffix rename to test/manual/etags/c-src/exit.strange_suffix diff --git a/test/etags/c-src/fail.c b/test/manual/etags/c-src/fail.c similarity index 100% rename from test/etags/c-src/fail.c rename to test/manual/etags/c-src/fail.c diff --git a/test/etags/c-src/getopt.h b/test/manual/etags/c-src/getopt.h similarity index 100% rename from test/etags/c-src/getopt.h rename to test/manual/etags/c-src/getopt.h diff --git a/test/etags/c-src/h.h b/test/manual/etags/c-src/h.h similarity index 100% rename from test/etags/c-src/h.h rename to test/manual/etags/c-src/h.h diff --git a/test/etags/c-src/machsyscalls.c b/test/manual/etags/c-src/machsyscalls.c similarity index 100% rename from test/etags/c-src/machsyscalls.c rename to test/manual/etags/c-src/machsyscalls.c diff --git a/test/etags/c-src/machsyscalls.h b/test/manual/etags/c-src/machsyscalls.h similarity index 100% rename from test/etags/c-src/machsyscalls.h rename to test/manual/etags/c-src/machsyscalls.h diff --git a/test/etags/c-src/sysdep.h b/test/manual/etags/c-src/sysdep.h similarity index 100% rename from test/etags/c-src/sysdep.h rename to test/manual/etags/c-src/sysdep.h diff --git a/test/etags/c-src/tab.c b/test/manual/etags/c-src/tab.c similarity index 100% rename from test/etags/c-src/tab.c rename to test/manual/etags/c-src/tab.c diff --git a/test/etags/c-src/torture.c b/test/manual/etags/c-src/torture.c similarity index 100% rename from test/etags/c-src/torture.c rename to test/manual/etags/c-src/torture.c diff --git a/test/etags/cp-src/MDiagArray2.h b/test/manual/etags/cp-src/MDiagArray2.h similarity index 100% rename from test/etags/cp-src/MDiagArray2.h rename to test/manual/etags/cp-src/MDiagArray2.h diff --git a/test/etags/cp-src/Range.h b/test/manual/etags/cp-src/Range.h similarity index 100% rename from test/etags/cp-src/Range.h rename to test/manual/etags/cp-src/Range.h diff --git a/test/etags/cp-src/burton.cpp b/test/manual/etags/cp-src/burton.cpp similarity index 100% rename from test/etags/cp-src/burton.cpp rename to test/manual/etags/cp-src/burton.cpp diff --git a/test/etags/cp-src/c.C b/test/manual/etags/cp-src/c.C similarity index 100% rename from test/etags/cp-src/c.C rename to test/manual/etags/cp-src/c.C diff --git a/test/etags/cp-src/clheir.cpp.gz b/test/manual/etags/cp-src/clheir.cpp.gz similarity index 100% rename from test/etags/cp-src/clheir.cpp.gz rename to test/manual/etags/cp-src/clheir.cpp.gz diff --git a/test/etags/cp-src/clheir.hpp b/test/manual/etags/cp-src/clheir.hpp similarity index 100% rename from test/etags/cp-src/clheir.hpp rename to test/manual/etags/cp-src/clheir.hpp diff --git a/test/etags/cp-src/conway.cpp b/test/manual/etags/cp-src/conway.cpp similarity index 100% rename from test/etags/cp-src/conway.cpp rename to test/manual/etags/cp-src/conway.cpp diff --git a/test/etags/cp-src/conway.hpp b/test/manual/etags/cp-src/conway.hpp similarity index 100% rename from test/etags/cp-src/conway.hpp rename to test/manual/etags/cp-src/conway.hpp diff --git a/test/etags/cp-src/fail.C b/test/manual/etags/cp-src/fail.C similarity index 100% rename from test/etags/cp-src/fail.C rename to test/manual/etags/cp-src/fail.C diff --git a/test/etags/cp-src/functions.cpp b/test/manual/etags/cp-src/functions.cpp similarity index 96% rename from test/etags/cp-src/functions.cpp rename to test/manual/etags/cp-src/functions.cpp index fb546ed4de..764498d408 100644 --- a/test/etags/cp-src/functions.cpp +++ b/test/manual/etags/cp-src/functions.cpp @@ -1,7 +1,7 @@ #include "main.hpp" #pragma ident "@(#)functions.cpp 1.0 98/11/12 (c) Rupak Rathore" -// Constructor default argument initialises to today's values +// Constructor default argument initializes to today's values void Date::setDate ( int d , int m , int y ){ time_t t; struct tm * ptm; @@ -9,9 +9,9 @@ void Date::setDate ( int d , int m , int y ){ if ( date != NULL ) delete date; date = NULL; - if ( d == 0 && m == 0 && y == 0 ) // explicity called or default constructor hence leave it. + if ( d == 0 && m == 0 && y == 0 ) //Explicitly called or default constructor hence leave it. return; - if ( d < 0 && m < 0 && d < 0 ) // Special instruction to intialise to today's value + if ( d < 0 && m < 0 && d < 0 ) //Special instruction to initialize to today's value d=m=y=0; date = new tm; ptm=localtime ( &t ) ; diff --git a/test/etags/cp-src/screen.cpp b/test/manual/etags/cp-src/screen.cpp similarity index 100% rename from test/etags/cp-src/screen.cpp rename to test/manual/etags/cp-src/screen.cpp diff --git a/test/etags/cp-src/screen.hpp b/test/manual/etags/cp-src/screen.hpp similarity index 100% rename from test/etags/cp-src/screen.hpp rename to test/manual/etags/cp-src/screen.hpp diff --git a/test/etags/cp-src/x.cc b/test/manual/etags/cp-src/x.cc similarity index 100% rename from test/etags/cp-src/x.cc rename to test/manual/etags/cp-src/x.cc diff --git a/test/etags/el-src/TAGTEST.EL b/test/manual/etags/el-src/TAGTEST.EL similarity index 100% rename from test/etags/el-src/TAGTEST.EL rename to test/manual/etags/el-src/TAGTEST.EL diff --git a/test/etags/el-src/emacs/lisp/progmodes/etags.el b/test/manual/etags/el-src/emacs/lisp/progmodes/etags.el similarity index 100% rename from test/etags/el-src/emacs/lisp/progmodes/etags.el rename to test/manual/etags/el-src/emacs/lisp/progmodes/etags.el diff --git a/test/etags/erl-src/gs_dialog.erl b/test/manual/etags/erl-src/gs_dialog.erl similarity index 100% rename from test/etags/erl-src/gs_dialog.erl rename to test/manual/etags/erl-src/gs_dialog.erl diff --git a/test/etags/f-src/entry.for b/test/manual/etags/f-src/entry.for similarity index 100% rename from test/etags/f-src/entry.for rename to test/manual/etags/f-src/entry.for diff --git a/test/etags/f-src/entry.strange.gz b/test/manual/etags/f-src/entry.strange.gz similarity index 100% rename from test/etags/f-src/entry.strange.gz rename to test/manual/etags/f-src/entry.strange.gz diff --git a/test/etags/f-src/entry.strange_suffix b/test/manual/etags/f-src/entry.strange_suffix similarity index 100% rename from test/etags/f-src/entry.strange_suffix rename to test/manual/etags/f-src/entry.strange_suffix diff --git a/test/etags/forth-src/test-forth.fth b/test/manual/etags/forth-src/test-forth.fth similarity index 100% rename from test/etags/forth-src/test-forth.fth rename to test/manual/etags/forth-src/test-forth.fth diff --git a/test/etags/html-src/algrthms.html b/test/manual/etags/html-src/algrthms.html similarity index 100% rename from test/etags/html-src/algrthms.html rename to test/manual/etags/html-src/algrthms.html diff --git a/test/etags/html-src/index.shtml b/test/manual/etags/html-src/index.shtml similarity index 100% rename from test/etags/html-src/index.shtml rename to test/manual/etags/html-src/index.shtml diff --git a/test/etags/html-src/software.html b/test/manual/etags/html-src/software.html similarity index 99% rename from test/etags/html-src/software.html rename to test/manual/etags/html-src/software.html index b5de1e6d68..dbf8228199 100644 --- a/test/etags/html-src/software.html +++ b/test/manual/etags/html-src/software.html @@ -123,7 +123,7 @@ HREF="ftp://fly.cnuce.cnr.it/pub/software/octave/leasqr/">published it. Since then, the original authors Richard I. Shrager, A.Jutan, Ray Muzic, and Sean Brennan agreed to put it under the GPL. Matthias Jueschke tested -the program using a non-linear optimisation test suite, and was satisfied with the results. diff --git a/test/etags/html-src/softwarelibero.html b/test/manual/etags/html-src/softwarelibero.html similarity index 100% rename from test/etags/html-src/softwarelibero.html rename to test/manual/etags/html-src/softwarelibero.html diff --git a/test/etags/lua-src/allegro.lua b/test/manual/etags/lua-src/allegro.lua similarity index 100% rename from test/etags/lua-src/allegro.lua rename to test/manual/etags/lua-src/allegro.lua diff --git a/test/etags/lua-src/test.lua b/test/manual/etags/lua-src/test.lua similarity index 100% rename from test/etags/lua-src/test.lua rename to test/manual/etags/lua-src/test.lua diff --git a/test/etags/make-src/Makefile b/test/manual/etags/make-src/Makefile similarity index 100% rename from test/etags/make-src/Makefile rename to test/manual/etags/make-src/Makefile diff --git a/test/etags/objc-src/PackInsp.h b/test/manual/etags/objc-src/PackInsp.h similarity index 100% rename from test/etags/objc-src/PackInsp.h rename to test/manual/etags/objc-src/PackInsp.h diff --git a/test/etags/objc-src/PackInsp.m b/test/manual/etags/objc-src/PackInsp.m similarity index 100% rename from test/etags/objc-src/PackInsp.m rename to test/manual/etags/objc-src/PackInsp.m diff --git a/test/etags/objc-src/Subprocess.h b/test/manual/etags/objc-src/Subprocess.h similarity index 100% rename from test/etags/objc-src/Subprocess.h rename to test/manual/etags/objc-src/Subprocess.h diff --git a/test/etags/objc-src/Subprocess.m b/test/manual/etags/objc-src/Subprocess.m similarity index 100% rename from test/etags/objc-src/Subprocess.m rename to test/manual/etags/objc-src/Subprocess.m diff --git a/test/etags/objcpp-src/SimpleCalc.H b/test/manual/etags/objcpp-src/SimpleCalc.H similarity index 100% rename from test/etags/objcpp-src/SimpleCalc.H rename to test/manual/etags/objcpp-src/SimpleCalc.H diff --git a/test/etags/objcpp-src/SimpleCalc.M b/test/manual/etags/objcpp-src/SimpleCalc.M similarity index 100% rename from test/etags/objcpp-src/SimpleCalc.M rename to test/manual/etags/objcpp-src/SimpleCalc.M diff --git a/test/etags/pas-src/common.pas b/test/manual/etags/pas-src/common.pas similarity index 100% rename from test/etags/pas-src/common.pas rename to test/manual/etags/pas-src/common.pas diff --git a/test/etags/perl-src/htlmify-cystic b/test/manual/etags/perl-src/htlmify-cystic similarity index 100% rename from test/etags/perl-src/htlmify-cystic rename to test/manual/etags/perl-src/htlmify-cystic diff --git a/test/etags/perl-src/kai-test.pl b/test/manual/etags/perl-src/kai-test.pl similarity index 100% rename from test/etags/perl-src/kai-test.pl rename to test/manual/etags/perl-src/kai-test.pl diff --git a/test/etags/perl-src/yagrip.pl b/test/manual/etags/perl-src/yagrip.pl similarity index 100% rename from test/etags/perl-src/yagrip.pl rename to test/manual/etags/perl-src/yagrip.pl diff --git a/test/etags/php-src/lce_functions.php b/test/manual/etags/php-src/lce_functions.php similarity index 100% rename from test/etags/php-src/lce_functions.php rename to test/manual/etags/php-src/lce_functions.php diff --git a/test/etags/php-src/ptest.php b/test/manual/etags/php-src/ptest.php similarity index 100% rename from test/etags/php-src/ptest.php rename to test/manual/etags/php-src/ptest.php diff --git a/test/etags/php-src/sendmail.php b/test/manual/etags/php-src/sendmail.php similarity index 100% rename from test/etags/php-src/sendmail.php rename to test/manual/etags/php-src/sendmail.php diff --git a/test/etags/prol-src/natded.prolog b/test/manual/etags/prol-src/natded.prolog similarity index 100% rename from test/etags/prol-src/natded.prolog rename to test/manual/etags/prol-src/natded.prolog diff --git a/test/etags/prol-src/ordsets.prolog b/test/manual/etags/prol-src/ordsets.prolog similarity index 100% rename from test/etags/prol-src/ordsets.prolog rename to test/manual/etags/prol-src/ordsets.prolog diff --git a/test/etags/ps-src/rfc1245.ps b/test/manual/etags/ps-src/rfc1245.ps similarity index 100% rename from test/etags/ps-src/rfc1245.ps rename to test/manual/etags/ps-src/rfc1245.ps diff --git a/test/etags/pyt-src/server.py b/test/manual/etags/pyt-src/server.py similarity index 100% rename from test/etags/pyt-src/server.py rename to test/manual/etags/pyt-src/server.py diff --git a/test/etags/ruby-src/test.rb b/test/manual/etags/ruby-src/test.rb similarity index 100% rename from test/etags/ruby-src/test.rb rename to test/manual/etags/ruby-src/test.rb diff --git a/test/manual/etags/ruby-src/test1.ruby b/test/manual/etags/ruby-src/test1.ruby new file mode 100644 index 0000000000..26b7d538b6 --- /dev/null +++ b/test/manual/etags/ruby-src/test1.ruby @@ -0,0 +1,29 @@ +class A + def a() + super(" do ") + end + def b() + end +end + +module A + class B + ABC = 4 + + def foo! + end + + def self._bar?(abc) + end + + class << self + def qux=(tee) + end + end + end +end + +A::Constant = 5 + +# def foo_in_comment +# end diff --git a/test/etags/tex-src/gzip.texi b/test/manual/etags/tex-src/gzip.texi similarity index 100% rename from test/etags/tex-src/gzip.texi rename to test/manual/etags/tex-src/gzip.texi diff --git a/test/etags/tex-src/nonewline.tex b/test/manual/etags/tex-src/nonewline.tex similarity index 100% rename from test/etags/tex-src/nonewline.tex rename to test/manual/etags/tex-src/nonewline.tex diff --git a/test/etags/tex-src/testenv.tex b/test/manual/etags/tex-src/testenv.tex similarity index 100% rename from test/etags/tex-src/testenv.tex rename to test/manual/etags/tex-src/testenv.tex diff --git a/test/etags/tex-src/texinfo.tex b/test/manual/etags/tex-src/texinfo.tex similarity index 100% rename from test/etags/tex-src/texinfo.tex rename to test/manual/etags/tex-src/texinfo.tex diff --git a/test/etags/y-src/atest.y b/test/manual/etags/y-src/atest.y similarity index 100% rename from test/etags/y-src/atest.y rename to test/manual/etags/y-src/atest.y diff --git a/test/etags/y-src/cccp.c b/test/manual/etags/y-src/cccp.c similarity index 100% rename from test/etags/y-src/cccp.c rename to test/manual/etags/y-src/cccp.c diff --git a/test/etags/y-src/cccp.y b/test/manual/etags/y-src/cccp.y similarity index 100% rename from test/etags/y-src/cccp.y rename to test/manual/etags/y-src/cccp.y diff --git a/test/etags/y-src/parse.c b/test/manual/etags/y-src/parse.c similarity index 100% rename from test/etags/y-src/parse.c rename to test/manual/etags/y-src/parse.c diff --git a/test/etags/y-src/parse.y b/test/manual/etags/y-src/parse.y similarity index 100% rename from test/etags/y-src/parse.y rename to test/manual/etags/y-src/parse.y diff --git a/test/indent/Makefile b/test/manual/indent/Makefile similarity index 100% rename from test/indent/Makefile rename to test/manual/indent/Makefile diff --git a/test/indent/css-mode.css b/test/manual/indent/css-mode.css similarity index 100% rename from test/indent/css-mode.css rename to test/manual/indent/css-mode.css diff --git a/test/indent/js-indent-init-dynamic.js b/test/manual/indent/js-indent-init-dynamic.js similarity index 100% rename from test/indent/js-indent-init-dynamic.js rename to test/manual/indent/js-indent-init-dynamic.js diff --git a/test/indent/js-indent-init-t.js b/test/manual/indent/js-indent-init-t.js similarity index 100% rename from test/indent/js-indent-init-t.js rename to test/manual/indent/js-indent-init-t.js diff --git a/test/indent/js-jsx.js b/test/manual/indent/js-jsx.js similarity index 100% rename from test/indent/js-jsx.js rename to test/manual/indent/js-jsx.js diff --git a/test/indent/js.js b/test/manual/indent/js.js similarity index 100% rename from test/indent/js.js rename to test/manual/indent/js.js diff --git a/test/indent/latex-mode.tex b/test/manual/indent/latex-mode.tex similarity index 100% rename from test/indent/latex-mode.tex rename to test/manual/indent/latex-mode.tex diff --git a/test/indent/modula2.mod b/test/manual/indent/modula2.mod similarity index 100% rename from test/indent/modula2.mod rename to test/manual/indent/modula2.mod diff --git a/test/indent/nxml.xml b/test/manual/indent/nxml.xml similarity index 100% rename from test/indent/nxml.xml rename to test/manual/indent/nxml.xml diff --git a/test/indent/octave.m b/test/manual/indent/octave.m similarity index 100% rename from test/indent/octave.m rename to test/manual/indent/octave.m diff --git a/test/indent/pascal.pas b/test/manual/indent/pascal.pas similarity index 100% rename from test/indent/pascal.pas rename to test/manual/indent/pascal.pas diff --git a/test/indent/perl.perl b/test/manual/indent/perl.perl similarity index 100% rename from test/indent/perl.perl rename to test/manual/indent/perl.perl diff --git a/test/indent/prolog.prolog b/test/manual/indent/prolog.prolog similarity index 100% rename from test/indent/prolog.prolog rename to test/manual/indent/prolog.prolog diff --git a/test/indent/ps-mode.ps b/test/manual/indent/ps-mode.ps similarity index 100% rename from test/indent/ps-mode.ps rename to test/manual/indent/ps-mode.ps diff --git a/test/indent/ruby.rb b/test/manual/indent/ruby.rb similarity index 100% rename from test/indent/ruby.rb rename to test/manual/indent/ruby.rb diff --git a/test/indent/scheme.scm b/test/manual/indent/scheme.scm similarity index 100% rename from test/indent/scheme.scm rename to test/manual/indent/scheme.scm diff --git a/test/indent/scss-mode.scss b/test/manual/indent/scss-mode.scss similarity index 100% rename from test/indent/scss-mode.scss rename to test/manual/indent/scss-mode.scss diff --git a/test/indent/sgml-mode-attribute.html b/test/manual/indent/sgml-mode-attribute.html similarity index 100% rename from test/indent/sgml-mode-attribute.html rename to test/manual/indent/sgml-mode-attribute.html diff --git a/test/indent/shell.rc b/test/manual/indent/shell.rc similarity index 100% rename from test/indent/shell.rc rename to test/manual/indent/shell.rc diff --git a/test/indent/shell.sh b/test/manual/indent/shell.sh similarity index 100% rename from test/indent/shell.sh rename to test/manual/indent/shell.sh diff --git a/test/redisplay-testsuite.el b/test/manual/redisplay-testsuite.el similarity index 100% rename from test/redisplay-testsuite.el rename to test/manual/redisplay-testsuite.el diff --git a/test/rmailmm.el b/test/manual/rmailmm.el similarity index 100% rename from test/rmailmm.el rename to test/manual/rmailmm.el diff --git a/test/automated/finalizer-tests.el b/test/src/alloc-tests.el similarity index 93% rename from test/automated/finalizer-tests.el rename to test/src/alloc-tests.el index 5aa35f4a2a..97c6b4f807 100644 --- a/test/automated/finalizer-tests.el +++ b/test/src/alloc-tests.el @@ -1,4 +1,4 @@ -;;; finalizer-tests.el --- Finalizer tests -*- lexical-binding: t -*- +;;; alloc-tests.el --- alloc tests -*- lexical-binding: t -*- ;; Copyright (C) 2015-2016 Free Software Foundation, Inc. diff --git a/test/automated/buffer-tests.el b/test/src/buffer-tests.el similarity index 100% rename from test/automated/buffer-tests.el rename to test/src/buffer-tests.el diff --git a/test/automated/cmds-tests.el b/test/src/cmds-tests.el similarity index 100% rename from test/automated/cmds-tests.el rename to test/src/cmds-tests.el diff --git a/test/automated/data-tests.el b/test/src/data-tests.el similarity index 100% rename from test/automated/data-tests.el rename to test/src/data-tests.el diff --git a/test/automated/zlib-tests.el b/test/src/decompress-tests.el similarity index 92% rename from test/automated/zlib-tests.el rename to test/src/decompress-tests.el index 7ece58d97c..f0264ec548 100644 --- a/test/automated/zlib-tests.el +++ b/test/src/decompress-tests.el @@ -1,4 +1,4 @@ -;;; zlib-tests.el --- Test suite for zlib. +;;; decompress-tests.el --- Test suite for decompress. ;; Copyright (C) 2013-2016 Free Software Foundation, Inc. @@ -40,6 +40,6 @@ (buffer-string)) "foo\n")))) -(provide 'zlib-tests) +(provide 'decompress-tests) -;;; zlib-tests.el ends here. +;;; decompress-tests.el ends here. diff --git a/test/automated/fns-tests.el b/test/src/fns-tests.el similarity index 79% rename from test/automated/fns-tests.el rename to test/src/fns-tests.el index 762f7bdd94..848589692e 100644 --- a/test/automated/fns-tests.el +++ b/test/src/fns-tests.el @@ -191,3 +191,47 @@ (string-collate-lessp a b (if (eq system-type 'windows-nt) "enu_USA" "en_US.UTF-8"))))) '("Adrian" "Ævar" "Agustín" "Eli")))) + +(ert-deftest fns-tests-string-version-lessp () + (should (string-version-lessp "foo2.png" "foo12.png")) + (should (not (string-version-lessp "foo12.png" "foo2.png"))) + (should (string-version-lessp "foo12.png" "foo20000.png")) + (should (not (string-version-lessp "foo20000.png" "foo12.png"))) + (should (string-version-lessp "foo.png" "foo2.png")) + (should (not (string-version-lessp "foo2.png" "foo.png"))) + (should (equal (sort '("foo12.png" "foo2.png" "foo1.png") + 'string-version-lessp) + '("foo1.png" "foo2.png" "foo12.png"))) + (should (string-version-lessp "foo2" "foo1234")) + (should (not (string-version-lessp "foo1234" "foo2"))) + (should (string-version-lessp "foo.png" "foo2")) + (should (string-version-lessp "foo1.25.5.png" "foo1.125.5")) + (should (string-version-lessp "2" "1245")) + (should (not (string-version-lessp "1245" "2")))) + +(ert-deftest fns-tests-func-arity () + (should (equal (func-arity 'car) '(1 . 1))) + (should (equal (func-arity 'caar) '(1 . 1))) + (should (equal (func-arity 'format) '(1 . many))) + (require 'info) + (should (equal (func-arity 'Info-goto-node) '(1 . 3))) + (should (equal (func-arity (lambda (&rest x))) '(0 . many))) + (should (equal (func-arity (eval (lambda (x &optional y)) nil)) '(1 . 2))) + (should (equal (func-arity (eval (lambda (x &optional y)) t)) '(1 . 2))) + (should (equal (func-arity 'let) '(1 . unevalled)))) + +(ert-deftest fns-tests-hash-buffer () + (should (equal (sha1 "foo") "0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33")) + (should (equal (with-temp-buffer + (insert "foo") + (buffer-hash)) + (sha1 "foo"))) + ;; This tests whether the presence of a gap in the middle of the + ;; buffer is handled correctly. + (should (equal (with-temp-buffer + (insert "foo") + (goto-char 2) + (insert " ") + (backward-delete-char 1) + (buffer-hash)) + (sha1 "foo")))) diff --git a/test/automated/inotify-test.el b/test/src/inotify-tests.el similarity index 100% rename from test/automated/inotify-test.el rename to test/src/inotify-tests.el diff --git a/test/automated/keymap-tests.el b/test/src/keymap-tests.el similarity index 100% rename from test/automated/keymap-tests.el rename to test/src/keymap-tests.el diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el new file mode 100644 index 0000000000..1a82d133a4 --- /dev/null +++ b/test/src/lread-tests.el @@ -0,0 +1,107 @@ +;;; lread-tests.el --- tests for lread.c -*- lexical-binding: t; -*- + +;; Copyright (C) 2016 Free Software Foundation, Inc. + +;; Author: Philipp Stephani + +;; This file is part of GNU Emacs. + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; Unit tests for code in src/lread.c. + +;;; Code: + +(ert-deftest lread-char-number () + (should (equal (read "?\\N{U+A817}") #xA817))) + +(ert-deftest lread-char-name-1 () + (should (equal (read "?\\N{SYLOTI NAGRI LETTER \n DHO}") + #xA817))) +(ert-deftest lread-char-name-2 () + (should (equal (read "?\\N{BED}") #x1F6CF))) +(ert-deftest lread-char-name-3 () + (should (equal (read "?\\N{U+BED}") #xBED))) +(ert-deftest lread-char-name-4 () + (should (equal (read "?\\N{VARIATION SELECTOR-1}") #xFE00))) +(ert-deftest lread-char-name-5 () + (should (equal (read "?\\N{VARIATION SELECTOR-16}") #xFE0F))) +(ert-deftest lread-char-name-6 () + (should (equal (read "?\\N{VARIATION SELECTOR-17}") #xE0100))) +(ert-deftest lread-char-name-7 () + (should (equal (read "?\\N{VARIATION SELECTOR-256}") #xE01EF))) +(ert-deftest lread-char-name-8 () + (should (equal (read "?\\N{CJK COMPATIBILITY IDEOGRAPH-F900}") #xF900))) +(ert-deftest lread-char-name-9 () + (should (equal (read "?\\N{CJK COMPATIBILITY IDEOGRAPH-FAD9}") #xFAD9))) +(ert-deftest lread-char-name-10 () + (should (equal (read "?\\N{CJK COMPATIBILITY IDEOGRAPH-2F800}") #x2F800))) +(ert-deftest lread-char-name-11 () + (should (equal (read "?\\N{CJK COMPATIBILITY IDEOGRAPH-2FA1D}") #x2FA1D))) + +(ert-deftest lread-char-invalid-number () + (should-error (read "?\\N{U+110000}") :type 'invalid-read-syntax)) + +(ert-deftest lread-char-invalid-name-1 () + (should-error (read "?\\N{DOES NOT EXIST}")) :type 'invalid-read-syntax) +(ert-deftest lread-char-invalid-name-2 () + (should-error (read "?\\N{VARIATION SELECTOR-0}")) :type 'invalid-read-syntax) +(ert-deftest lread-char-invalid-name-3 () + (should-error (read "?\\N{VARIATION SELECTOR-257}")) + :type 'invalid-read-syntax) +(ert-deftest lread-char-invalid-name-4 () + (should-error (read "?\\N{VARIATION SELECTOR--0}")) + :type 'invalid-read-syntax) +(ert-deftest lread-char-invalid-name-5 () + (should-error (read "?\\N{CJK COMPATIBILITY IDEOGRAPH-F8FF}")) + :type 'invalid-read-syntax) +(ert-deftest lread-char-invalid-name-6 () + (should-error (read "?\\N{CJK COMPATIBILITY IDEOGRAPH-FADA}")) + :type 'invalid-read-syntax) +(ert-deftest lread-char-invalid-name-7 () + (should-error (read "?\\N{CJK COMPATIBILITY IDEOGRAPH-2F7FF}")) + :type 'invalid-read-syntax) +(ert-deftest lread-char-invalid-name-8 () + (should-error (read "?\\N{CJK COMPATIBILITY IDEOGRAPH-2FA1E}")) + :type 'invalid-read-syntax) + +(ert-deftest lread-char-non-ascii-name () + (should-error (read "?\\N{LATIN CAPITAL LETTER Ø}") + :type 'invalid-read-syntax)) + +(ert-deftest lread-char-empty-name () + (should-error (read "?\\N{}") :type 'invalid-read-syntax)) + +(ert-deftest lread-char-surrogate-1 () + (should-error (read "?\\N{U+D800}") :type 'invalid-read-syntax)) +(ert-deftest lread-char-surrogate-2 () + (should-error (read "?\\N{U+D801}") :type 'invalid-read-syntax)) +(ert-deftest lread-char-surrogate-3 () + (should-error (read "?\\N{U+Dffe}") :type 'invalid-read-syntax)) +(ert-deftest lread-char-surrogate-4 () + (should-error (read "?\\N{U+DFFF}") :type 'invalid-read-syntax)) + +(ert-deftest lread-string-char-number-1 () + (should (equal (read "\"a\\N{U+A817}b\"") "a\uA817b"))) +(ert-deftest lread-string-char-number-2 () + (should-error (read "?\\N{0.5}") :type 'invalid-read-syntax)) +(ert-deftest lread-string-char-number-3 () + (should-error (read "?\\N{U+-0}") :type 'invalid-read-syntax)) + +(ert-deftest lread-string-char-name () + (should (equal (read "\"a\\N{SYLOTI NAGRI LETTER DHO}b\"") "a\uA817b"))) + +;;; lread-tests.el ends here diff --git a/test/automated/print-tests.el b/test/src/print-tests.el similarity index 100% rename from test/automated/print-tests.el rename to test/src/print-tests.el diff --git a/test/automated/libxml-tests.el b/test/src/xml-tests.el similarity index 100% rename from test/automated/libxml-tests.el rename to test/src/xml-tests.el