1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00
Commit Graph

136213 Commits

Author SHA1 Message Date
Philipp Stephani
a976602066 Fix compilation of test module.
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.
2019-05-05 01:35:11 +02:00
Philipp Stephani
e95ecbe146 Use extract_time in test module.
* test/data/emacs-module/mod-test.c (Fmod_test_sleep_until): Use
extract_time for time argument.
(signal_wrong_type_argument): Remove unused function.

* test/src/emacs-module-tests.el (mod-test-sleep-until): Remove
unnecessary ‘float-time’.
2019-05-05 01:34:07 +02:00
Philipp Stephani
27a9377d42 * test/Makefile.in (src/emacs-module-tests.elc): Require test module 2019-05-05 00:27:19 +02:00
Philipp Stephani
9684296a5d Refactoring: Factor out a function to set an mpz_t from a Lisp int.
* src/bignum.h (mpz_set_integer): New function.

* src/emacs-module.c (module_make_big_integer): Use it.
2019-05-04 23:31:40 +02:00
Philipp Stephani
1242a63671 Avoid undefined behavior when printing function pointers.
* 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.
2019-05-04 23:04:24 +02:00
Michael Albinus
2e0947abbc Notify broken file notification from Tramp
* 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.
2019-05-04 22:29:27 +02:00
Paul Eggert
ebecafbd19 Port new fingerprinting scheme to clang + LTO
* 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.
2019-05-04 13:16:15 -07:00
Noam Postavsky
4fd9048e94 Avoid slow overlay ansi coloring in eshell (Bug#29854)
* 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'.
2019-05-04 15:33:20 -04:00
Paul Eggert
37963ed499 Fix bytecode optimization typo
Problem reported by Simon Frankau (Bug#35562).
* src/bytecode.c (exec_byte_code): Fix typo when optimizing varset.
2019-05-04 10:17:09 -07:00
John Shahid
eec3ed05e3 Fix Bug#35506
* lisp/net/tramp.el (tramp-interrupt-process): Kill the entire
process group.  (Bug#35506)
2019-05-04 18:25:51 +02:00
Eli Zaretskii
5d3030910f Minor fix in .gdbinit
* 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'.
2019-05-04 19:19:58 +03:00
Eli Zaretskii
a90ad22973 ; * src/minibuf.c (Fread_buffer): Doc fix. (Bug#35361) 2019-05-04 12:47:03 +03:00
Eli Zaretskii
e93d651b49 ; * src/xfaces.c (merge_face_ref): Improve commentary. 2019-05-04 09:52:11 +03:00
Paul Eggert
b5376e0ebd Skip tests if test subdir is missing
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.
2019-05-03 14:54:38 -07:00
Paul Eggert
dae48faec6 Modernize INSTALL a bit
* 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.
2019-05-03 14:54:38 -07:00
Paul Eggert
6caf9be6ca Simplify use of NDEBUG in etags.c
* 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.
2019-05-03 12:39:03 -07:00
Paul Eggert
da3897abf1 Pacify librsvg 2.45.1 and later
* src/image.c (svg_load_image): Pacify librsvg 2.45.1 and later,
and add a FIXME comment about the deprecated librsvg functions.
2019-05-03 12:17:31 -07:00
Paul Eggert
74e17c23ae Simplify xd_signature to pacify GCC 9
* src/dbusbind.c (xd_signature): Use simpler way to set up
the subsignature.  This also pacifies GCC 9 on Fedora 30 x86-64.
2019-05-03 12:17:31 -07:00
Paul Eggert
57a1d378ff Update from Gnulib
This incorporates:
2019-05-03 Port manywarnings to GCC 9
* m4/manywarnings.m4: Copy from Gnulib.
2019-05-03 12:17:31 -07:00
Michael Albinus
d0fe28cb1d Add tests for remote files in auto-revert-tests
* lisp/autorevert.el (auto-revert-debug): New defvar.
(auto-revert-notify-handler): Write traces.

* lisp/filenotify.el (file-notify-debug): New defvar.
(file-notify-handle-event, file-notify-callback): Write traces.

* lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered):
Handle nil `vc-handled-backends'.

* test/lisp/autorevert-tests.el
(auto-revert-test-remote-temporary-file-directory): New defconst.
Handle also $REMOTE_FILE_NOTIFY_LIBRARY.
(auto-revert--test-enabled-remote-checked): New defvar.
(auto-revert--test-enabled-remote): New defun.
(auto-revert--wait-for-revert): Rewrite without timeout.
(auto-revert--deftest-remote): New defmacro.
(auto-revert-test01-auto-revert-several-files):
(auto-revert-test02-auto-revert-deleted-file): Adapt for remote files.
(auto-revert-test02-auto-revert-deleted-file):
Use `auto-revert-debug' for debug messages.
(auto-revert-test00-auto-revert-mode-remote)
(auto-revert-test01-auto-revert-several-files-mode-remote)
(auto-revert-test02-auto-revert-deleted-file-mode-remote)
(auto-revert-test03-auto-revert-tail-mode-mode-remote)
(auto-revert-test04-auto-revert-mode-dired-mode-remote): New tests.

* test/lisp/filenotify-tests.el (file-notify--test-event-handler):
Use `file-notify-debug' for debug messages.
2019-05-03 17:18:13 +02:00
Basil L. Contovounesios
24a1d5a0b5 Fix Gnus inline attachment decoding (bug#35507)
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.
2019-05-03 14:52:01 +01:00
Stefan Monnier
b663c83724 * lisp/server.el: Cosmetic changes
Remove redundant :group args.
(server-temp-file-regexp): Fix ^$ to  \`\'.
2019-05-03 09:49:38 -04:00
Eli Zaretskii
d5497ec309 Improve documentation of 'isearch-regexp-function'
* lisp/isearch.el (isearch-regexp-function): Doc fix.
(Bug#35498)
2019-05-03 12:22:55 +03:00
Michael Albinus
8b0cb7b261 ; Fix declaration in tramp-compat.el 2019-05-03 10:05:15 +02:00
Alexander Gramiak
9ae94ebdfa Refactor update_window_begin and update_window_end hooks
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.
2019-05-02 21:16:43 -06:00
Dmitry Gutov
d17ae7f5af xref--find-ignores-arguments: Return "" if IGNORES is nil 2019-05-03 02:48:44 +03:00
Dmitry Gutov
1cd4a5e5e5 Allow project-find-regexp'ing inside an ignored dir
* 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).
2019-05-03 01:53:11 +03:00
Dmitry Gutov
f2b395c4c5 (xref--mouse-2): Fix not to jump to the next line
* lisp/progmodes/xref.el (xref--mouse-2): Fix not to jump to the
next line.
2019-05-03 01:53:11 +03:00
Dmitry Gutov
5ff4bfaeec Fix an "empty identifier" problem
* lisp/progmodes/xref.el (xref--read-identifier): Abort on empty
input if there is no default
(https://lists.gnu.org/archive/html/help-gnu-emacs/2019-05/msg00012.html).
2019-05-03 01:53:11 +03:00
Alan Mackenzie
d9f62fceaf Fix fontification of first item in CC Mode macro without parentheses
* 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.
2019-05-02 20:53:47 +00:00
Stefan Monnier
17a722982c * lisp/mail/footnote.el: Add TEXT and POINTERS together
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.
2019-05-02 11:00:20 -04:00
Alan Mackenzie
39acaff574 CC Mode: Fix multiline block comments in macros.
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.
2019-05-02 14:33:05 +00:00
Stefan Monnier
3fa9c9f774 * lisp/mail/footnote.el: Tweak markers convention
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.
2019-05-02 10:27:42 -04:00
Sam Steingold
e10e314e2b use view-mode on score file for ease of scrolling and quitting 2019-05-02 10:18:14 -04:00
Sam Steingold
c555d10d0f tetris-null-map: bind "q" to quit-window 2019-05-02 10:18:14 -04:00
Mattias Engdegård
e13b8c0e40 Small code clean-up of file-notify-add-watch
* 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.
2019-05-02 15:45:04 +02:00
Stefan Monnier
0efaae78f2 * lisp/mail/footnote.el: Use dolist and hoist regexps out of loops
(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.
2019-05-02 09:00:53 -04:00
Michael Albinus
cd3a7f35de Fix tramp-compat-file-name-quoted-p
* 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'.
2019-05-02 09:51:41 +02:00
Stefan Monnier
4299e5ef9a * lisp/mail/footnote.el: Consolidate the two marker-alists
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.
2019-05-01 17:53:39 -04:00
Stefan Monnier
c9b820ddcf * lisp/mail/footnote.el: Minor simplifications
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.
2019-05-01 13:14:31 -04:00
Lars Ingebrigtsen
d4fa998c31 Restore previous calling signature of gnus-set-info 2019-05-01 19:04:56 +02:00
Stefan Monnier
9e8e3975ad * lisp/emacs-lisp/edebug.el: Better handle instrumentation of end-of-defun
Remove redundant :group args.
(edebug-read-top-level-form): Let-bind edebug-active.
(edebug-active): Move before this new first use.
2019-05-01 12:45:37 -04:00
Stefan Monnier
5bd25c095e * lisp/help.el (function-called-at-point): Use Elisp's forward-sexp-function 2019-05-01 12:37:48 -04:00
Basil L. Contovounesios
5a4f58f7ee ; * etc/NEWS: Fix position of +++ marker 2019-05-01 14:51:37 +01:00
Glenn Morris
7124fec0b6 ; Auto-commit of loaddefs files. 2019-05-01 06:27:17 -07:00
Basil L. Contovounesios
7dafbe3ab9 Minor region-noncontiguous-p simplification
* lisp/simple.el (region-noncontiguous-p): Don't needlessly traverse
region-bounds.
2019-05-01 00:39:54 +01:00
Stefan Monnier
910d170771 * lisp/progmodes/cc-engine.el: Silence minor compiler warnings
(c-restricted-<>-arglists, c-parse-and-markup-<>-arglists):
Move declaration before first use.
(c-after-change-unmark-raw-strings): Remove unused var `found-end`.
2019-04-30 14:56:29 -04:00
Paul Eggert
325f51c84d Fix decode-time/encode-time roundtrip on macOS
* 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.
2019-04-30 10:47:17 -07:00
Stefan Monnier
35ef33dd23 * lisp/progmodes/cc-fonts.el: Silence some compiler warnings
(c-font-lock-declarators): Mark `id_end` and `not-top` as unused.
2019-04-30 13:42:44 -04:00
Paul Eggert
46b434a62c Update from Gnulib
* build-aux/config.guess, doc/misc/texinfo.tex:
* lib/mktime-internal.h, lib/mktime.c, lib/timegm.c:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
2019-04-30 09:45:08 -07:00