This was part of the original design of the module
API (https://lists.gnu.org/archive/html/emacs-devel/2015-02/msg00960.html),
but I didn't take it into account when adding the should_quit
function.
Instead of duplicating the environment fields or using the C
preprocessor, use configure to build emacs-module.h.
* configure.ac: Expand emacs-module.h template.
Add a new command 'replace-buffer-contents' that uses the Myers diff
algorithm to non-destructively replace the accessible portion of the
current buffer. The Myers algorithm is implemented in Gnulib.
* src/editfns.c (Freplace_buffer_contents): New command.
(set_bit, bit_is_set, buffer_chars_equal): New helper functions.
(syms_of_editfns): Define new command.
* test/src/editfns-tests.el (replace-buffer-contents-1)
(replace-buffer-contents-2): New unit tests.
* src/buffer.h (BUF_FETCH_CHAR_AS_MULTIBYTE): New helper macro.
* admin/merge-gnulib (GNULIB_MODULES): Add diffseq.h and minmax.h.
* lisp/textmodes/css-mode.el (css--complete-property-value): Be less
eager by looking for a colon after the property which values are being
completed for.
* test/lisp/textmodes/css-mode-tests.el (css-test-complete-property):
Add a test case ensuring that properties that are prefixes of other
properties don't hinder further completion.
* lisp/thingatpt.el (thing-at-point--bounds-of-well-formed-url):
Make parentheses match work inside comments.
* test/lisp/thingatpt-tests.el (thing-at-point-url-in-comment): Add
unit test.
* lisp/net/tramp.el (tramp-file-name-handler): Use `autoloadp'.
(tramp-use-absolute-autoload-file-names): New defun. Call it
after loading tramp.el.
* test/lisp/net/tramp-tests.el (tramp-test38-remote-load-path):
New test.
(tramp-test39-unload): Rename.
* lisp/progmodes/cc-cmds.el (c-block-comment-flag): Move declaration to solve
compiler warning.
* lisp/progmodes/cc-fonts.el (c-get-fontification-context): Add an extra
clause to handle C++ member initialization lists.
(c-font-lock-single-decl): New function, extracted from
c-font-lock-declarations.
(c-font-lock-declarations): Call c-font-lock-single-decl in place of inline
code.
(c-font-lock-cut-off-declarators): Make more rigorous by calling
c-get-fontification-context, c-forward-decl-or-cast-1, and
c-font-lock-single-decl in place of rather approximate code.
Also (unrelated change) initialize the modes' keymaps at each loading.
* lisp/progmodes/cc-cmds.el (c-update-modeline): amend for the new information
on the modeline.
(c-block-comment-flag): New variable.
(c-toggle-comment-style): New function.
* lisp/progmodes/cc-langs.el (c-block-comment-starter)
(c-line-comment-starter): Make them c-lang-defvars.
(c-block-comment-is-default): New c-lang-defvar.
(comment-start, comment-end): Make the default values dependent on
c-block-comment-is-default.
* lisp/progmodes/cc-mode.el (c-mode-base-map): Define C-c C-k in this map.
(c-basic-common-init): Initialize c-block-comment-flag.
(c-mode-map, c++-mode-map, objc-mode-map, java-mode-map, idl-mode-map)
(pike-mode-map, awk-mode-map): Make entries in these key maps each time the
mode is loaded rather than just once per Emacs session.
* doc/misc/cc-mode.texi (Comment Commands): Introduce the notion of comment
style.
(Minor Modes): Define comment style. Describe how comment style influences
the information displayed on the modeline. Document c-toggle-comment-style.
(FAQ): Add a question about toggling the comment style.
* configure.ac (WARN_CFLAGS): With Clang, use
-Wno-tautological-compare regardless of --enable-gcc-warnings.
(WERROR_CFLAGS): Simplify assignments, and guarantee it’s always set.
* lib/strftime.c: Copy from gnulib, reverting Clang-specific
change which I hope is no longer needed.
* src/emacs.c (main): Revert rlim_t change, as rlim_t is signed on
some older non-POSIX hosts.
* lib-src/make-docfile.c (put_filename): Undo recent change.
The Clang false alarm occurs only with CFLAGS=-save-temps and
we needn’t worry about pacifying unusual compiler configurations.
* src/emacs-module.h: Remove __STDC_VERSION__ check. In the past
we’ve found that some compilers do not define this symbol even
when they work well enough. If necessary features like stdbool.h
are missing the compiler will complain eventually anyway.
* src/image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: Avoid
compilation warning under -Warray-bounds by temporarily disabling
the -Warray-bounds option.
* lisp/net/tramp-cache.el (tramp-cache-read-persistent-data):
New defvar.
(top): Use it.
* lisp/net/tramp.el (tramp-handle-file-name-case-insensitive-p):
Check for connected, not for connectable. (Bug#27315)
(tramp-process-actions):
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
Use `tramp-cache-read-persistent-data'.
* test/lisp/net/tramp-tests.el (top): Set also
`tramp-cache-read-persistent-data'.
Using --module-assertions helps us find bugs in the test module. But
we can use it only if Emacs was compiled with module support.
* test/Makefile.in (MODULES_EMACSOPT): New variable.
(emacs): Use it.
* INSTALL (--with-modules): List cleanup attribute as prereq.
* src/conf_post.h (__has_attribute_cleanup): Remove; no longer needed.
* src/emacs-module.c (MODULE_SETJMP_1): Don’t attempt to verify
(__has_attribute (cleanup)), as Oracle Studio 12.5 supports
__has_attribute only inside preprocessor expressions. The C
compiler should check the cleanup attribute in the next line anyway.
(module_reset_handlerlist): Remove an unnecessary ‘const’
that causes Oracle Studio 12.5 to refuse to compile.
The test/data/emacs-module/Makefile only built a single target, and
inlining it into test/Makefile simplifies dependency tracking and
reduces code duplication.
* configure.ac: Don't build test/data/emacs-module/Makefile.
* Makefile.in ($(test_module)): Inline compilation.
(clean): Also clean test module outputs.
* lisp/emacs-lisp/cl-print.el: Autoload `disassemble-1'.
(cl-print-compiled-button): New variable.
(help-byte-code): New button type, calls `disassemble' in its action.
(cl-print-object): Use it if `cl-print-compiled-button' is
non-nil.