Because all other objects are compiled without -fPIC, we can’t use
them when linking the test module. Instead, use the source files
directly.
* test/Makefile.in (HYBRID_MALLOC, LIBEGNU_ARCHIVE): Remove.
($(test_module)): Use source files instead of objects and archives.
* src/print.c (print_vectorlike): Don’t pass a function pointer to
‘snprintf’, as that is undefined behavior. Instead, print the
individual bytes making up the function pointer.
* lisp/net/tramp.el (tramp-file-notify-process-sentinel): New defun.
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
Set process sentinel.
* lib-src/make-fingerprint.c (main): Don't consider multiple
instances of the fingerprint to be an error, as this can
happen with clang and -flto. Instead, replace all instances
of the fingerprint. There is a tiny chance that this will
silently corrupt the Emacs executable.
This patch suggests that we should go back to fingerprinting
the inputs to the linker instead of its output, as the new
fingerprinting scheme is unnecessarily complicated and this
complexity reduces reliability. The old scheme (i.e., before
commit 2019-05-14T23:31:24Z!eggert@cs.ucla.edu) was simpler
and more portable and good enough, and it's looking like it
would be less trouble in practice than the new scheme.
* lisp/ansi-color.el (ansi-color-apply-on-region): Reset temporary
markers after finishing with them.
(ansi-color-apply-text-property-face): New function.
* lisp/eshell/esh-mode.el (eshell-handle-ansi-color):
* lisp/man.el (Man-fontify-manpage): Use it as the
`ansi-color-apply-face-function' while calling
`ansi-color-apply-on-region'. Use `font-lock-face' to propertize
instead of `face'.
* src/.gdbinit (xprintsym): Don't attempt to print the
symbol's name if it is not yet set. This happens with
built-in symbols at the beginning of 'main'.
Problem reported by Jeffrey Walton in:
https://lists.gnu.org/r/emacs-devel/2019-05/msg00041.html
* Makefile.in (CHECK_TARGETS): New macro; use it
to simplify 'check' and similar rules.
($(CHECK_TARGETS)): If tests are missing, do not fail
after issuing a diagnostic. Just skip the tests.
* INSTALL: Omit filesystem space estimates. These estimates
were (1) wrong and (2) no longer important nowadays, as people
have plenty of space. Instead, start with how to get and
unpack an Emacs tarball. Don’t say "disk" as it’s often not
disk nowadays. Update URLs.
* lib-src/etags.c [!DEBUG]: Do not define NDEBUG,
as that’s conf_post.h’s job now.
[NDEBUG]: Do not redefine ‘assert’, as that works around
ancient bugs (e.g., sunos4 pcc) that don’t matter any more,
as can be seen that other Emacs source files that successfully
use assert.h without this workaround.
Proposed by Andy Moreton <andrewjmoreton@gmail.com>
and Noam Postavsky <npostavs@gmail.com>.
* lisp/gnus/mm-view.el (mm-display-inline-fontify): Always decode
handle text, falling back on 'undecided' coding system.
Bug#35464.
* src/dispnew.c (gui_update_window_begin, gui_update_window_end): New
procedures implementing common functionality.
* src/nsterm.m: (ns_update_window_begin, ns_update_window_end):
* src/xterm.c: (x_update_window_begin, x_update_window_end): Remove in
favor of only using the new generic versions.
* src/w32term.c: (w32_update_window_begin, w32_update_window_end):
Remove duplicated and unused code.
* lisp/progmodes/project.el (project-find-regexp): Don't pass
project's ignores to project--files-in-directory. The FILES glob
should be enough, and we don't want to prohibit searching inside
ignored directories this way (it can be counter-intuitive).
* lisp/progmodes/cc-engine.el (c-find-decl-prefix-search): Handle the new
matching possibility (of a #define construct) in the new
c-decl-prefix-or-start-re.
(c-find-decl-spots): Allow the initial search for an in-macro starting point
settle on the # of #define, to facilitate the regexp matching in
c-find-decl-prefix-search.
* lisp/progmodes/cc-langs.el (c-anchored-hash-define-no-parens): New lang
const.
(c-literal-start-regexp): Correct what was always supposed to be a "generic
string" regexp element.
(c-decl-prefix-or-start-re): Enhance also to match "#define <identifier>".
(c-dposr-cpp-macro-depth): New lang variable and lang constant.
Rather than adding POINTERS and TEXT separately to footnote--markers-alist,
add them together, so we don't need footnote--first-text-marker because
the TEXT part is never nil.
(footnote--insert-numbered-footnote): Return marker.
(footnote--insert-text-marker, footnote--insert-pointer-marker):
Delete functions.
(footnote--insert-markers): New function to replace them.
(footnote--insert-footnote): Adjust accordingly.
Simplify pointless `unless`.
(footnote--first-text-marker): Remove. Replace all calls by
(cadr (car footnote--markers-alist)) or just footnote--markers-alist.
In particulr, handle multiline block comments whose newlines are not escaped.
There is an example of this in #define EXTRA_CONTEXT_FIELDS in editfns.c.
* lisp/progmodes/cc-engine.el (c-beginning-of-macro, c-end-of-macro): Enclose
the loops scanning escaped newlines with outer loops which check
heuristically for, respectively, a block comment ender and a block comment
starter on the lines we end up on. (A rigorous syntactic check would be too
slow, here.)
* lisp/progmodes/cc-langs.el (c-last-c-comment-end-on-line-re)
(c-last-open-c-comment-start-on-line-re): New language constants/variables.
Instead of using markers that are sometimes before and sometimes after
the [...] and using `insert-before-markers` to make sure those that are
are before stay before, always place them before, and make them
"move after"so they stay with their [...] without the need for
insert-before-markers.
(footnote--current-regexp): Add arg to match previous style.
Include the start/end "tags" in the regexp. Adjust all callers.
(footnote--markers-alist): Change position of POINTERS.
(footnote--refresh-footnotes, footnote--renumber)
(footnote--make-hole, footnote-delete-footnote)
(footnote-back-to-message): Adjust accordingly, mostly by using
`looking-at` instead of `looking-back`.
(footnote--make-hole): Always return footnote nb to use.
(footnote-add-footnote): Simplify call accordingly.
* test/lisp/mail/footnote-tests.el: New file.
* lisp/filenotify.el (file-notify-add-watch):
Clearly separate backend-specific code from the rest, and simplify.
(file-notify--add-watch-inotify, file-notify--add-watch-kqueue)
(file-notify--add-watch-w32notify, file-notify--add-watch-gfilenotify):
New functions.
(footnote--refresh-footnotes): Use pcase-dolist; compute regexp once
outside of the loops. Use less confusing `literal` arg to `replace-match`
and specify `fixedcase` since footnote--index-to-string already chose
the proper case for us.
(footnote--renumber): Use dolist; compute regexp once
outside of the loops; shortcircuit when number is unchanged.
(footnote--text-under-cursor): Rewrite.
(footnote--make-hole): Use dolist.
(footnote-add-footnote): CSE.
(footnote-delete-footnote): Use dolist; compute regexp once
outside of the loop.
(footnote-delete-footnote): Don't renumber if there's no footnote left.
(footnote-renumber-footnotes): Use dolist.
* lisp/net/tramp-compat.el (tramp-compat-file-local-name)
(tramp-compat-file-name-quoted-p): Declare them.
(top): Do not use `eval-and-compile'.
(tramp-compat-file-name-quoted-p): Check also func-arity of
`file-name-quoted-p'.
Consolidate footnote-text-marker-alist and footnote-pointer-marker-alist
into a single footnote--markers-alist.
(footnote--markers-alist): New var.
(footnote-text-marker-alist, footnote-pointer-marker-alist): Delete vars.
(footnote--refresh-footnotes, footnote--text-under-cursor)
(footnote--calc-fn-alignment-column, footnote-add-footnote)
(footnote-goto-footnote, footnote-back-to-message): Adjust accordingly.
(footnote--make-hole, footnote-delete-footnote)
(footnote-renumber-footnotes): Simplify accordingly.
(footnote-cycle-style): Indicate style name in echo area.
(footnote--renumber): Take a single `alist-elem` arg instead of
`pointer-alist` and `text-alist`.
(footnote--insert-text-marker, footnote--insert-pointer-marker):
Add to footnote--markers-alist instead.
(footnote--first-text-marker): New function.
(footnote--get-area-point-min): Use it.
footnote--goto-first): New function.
(footnote--insert-footnote): Use it.
(footnote-style-number): Use defvar-local.
Remove redundant :group args.
(footnote-mode-hook): Let define-minor-mode define it.
(footnote--style-p): Delete function.
(footnote--index-to-string): Inline it instead, and simplify.
(footnote-cycle-style): Use a pointer into the alist as the "index"
instead of a number.
(footnote-set-style): Use footnote-style-alist as the completion table.
Prefer `assq` over `footnote--assoc-index`.
(footnote--assoc-index): Delete function.
(footnote--renumber): Remove first (unused) argument; Adjust all callers.
(footnote--sort): Use car-less-than-car.
(c-restricted-<>-arglists, c-parse-and-markup-<>-arglists):
Move declaration before first use.
(c-after-change-unmark-raw-strings): Remove unused var `found-end`.
* src/timefns.c (Fencode_time): Ignore DST flag when the zone is
numeric or is a cons, as the doc string says it’s ignored in that
case, and not ignoring it causes encode-time to not invert
decode-time on some platforms (Bug#35502).
* test/src/timefns-tests.el (encode-time-dst-numeric-zone):
New test.