1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-30 19:53:09 +00:00
Commit Graph

136376 Commits

Author SHA1 Message Date
Eli Zaretskii
d45d5c339c Avoid compiler warning in print.c
* src/print.c (print_vectorlike): Don't use %hh, as that is
not portable enough; we don't yet assume a C99-compliant
library.
2019-05-05 17:17:24 +03:00
Eli Zaretskii
708d117a85 Avoid crashes in read_integer
* src/lread.c (read_integer): Always allocate a buffer, since
we need to use it even when the radix is invalid.  (Bug#35576)
2019-05-05 17:06:01 +03:00
Stefan Monnier
64f95e4011 * lisp/files.el (hack-local-variables): Don't burp when files-x isn't loaded 2019-05-05 08:57:04 -04:00
Michael Albinus
10aa44a1dd ; SOme changes in filenotify-tests.el for EMBA
* test/lisp/filenotify-tests.el (file-notify-test03-events)
(file-notify-test05-file-validity)
(file-notify-test09-watched-file-in-watched-dir): Adapt for EMBA.
2019-05-05 13:34:26 +02:00
Michael Albinus
f82e0e5b76 Adapt tests for recent file-notification changes in Tramp
* lisp/net/tramp.el (tramp-file-notify-process-sentinel):
Pacify byte compiler.

* test/lisp/autorevert-tests.el
(auto-revert-test02-auto-revert-deleted-file):
* test/lisp/filenotify-tests.el (file-notify-test03-events)
(file-notify-test05-file-validity)
(file-notify-test09-watched-file-in-watched-dir): Adapt for remote
files.
2019-05-05 12:20:44 +02:00
Mattias Engdegård
ab64228883 Reorganise (auto-)revert nodes in the manual
Put all information about auto-revert into a section of its own, and
organise the text in a more logical way.  Previously it was mainly
described in the section about reverting (bug#35418).

* doc/emacs/files.texi (Files): Adjust menu.
(Reverting, Auto Revert, Autorevert): Add node `Auto Revert' and move
text on that topic from `Reverting', rearranged.  Turn the old
`Autorevert' node into a subsection under `Auto Revert'.
* doc/emacs/arevert-xtra.texi (Autorevert): Rename and turn into
subsubsection.
* doc/emacs/buffers.texi (Several Buffers): Adjust references.
* doc/emacs/emacs.texi (Top): Adjust menu.
* doc/emacs/emacs-xtra.texi (Top): Adjust menu.
(Non-File Buffers): Add node and section lines.
2019-05-05 11:47:14 +02:00
Noam Postavsky
3b86e0b812 Clarify handling of long options (Bug#24949)
* doc/emacs/cmdargs.texi (Emacs Invocation): Note that space can be
used instead of "=" only if an option requires an argument.
2019-05-04 23:55:50 -04:00
Philipp Stephani
b5aeb86a7e Avoid suppressing -Wcast-function-type warning.
GCC special-cases the type ‘void (*)(void)’ to not emit warnings when
cast, see
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wcast-function-type.
Make use of this to remove a warning suppression.

* src/dynlib.h: Use void (*)(void) as generic function pointer type.

* src/emacs-module.c: Remove warning suppression.
2019-05-05 01:56:15 +02:00
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
04340a8e2f Improve documentation of the daemon and emacsclient
* doc/emacs/misc.texi (emacsclient Options):
* doc/emacs/cmdargs.texi (Initial Options): Document that
using --daemon=NAME will need to specify the same NAME when
invoking 'emacscilent'.  (Bug#35547)
2019-05-04 12:22:49 +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
Noam Postavsky
3e29de2ce0 * etc/NEWS.24: Belatedly announce delete-consecutive-dups. 2019-05-01 22:17:10 -04: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