1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-05 07:01:11 -08:00
Commit graph

40946 commits

Author SHA1 Message Date
Eli Zaretskii
24695e8977 Unbreak the Cygw32 build
* src/emacs.c (main) [HAVE_NTGUI]: Remove code that is only
for WINDOWSNT or condition it on WINDOWSNT.  (Bug#34409)
2019-02-10 17:10:04 +02:00
Tassilo Horn
61748cd78f Add new function replace-buffer-contents
* src/editfns.c (Freplace_buffer_contents): Use lower value of
  too_expensive and enable heuristic.
* lisp/subr.el (replace-region-contents): New convenient wrapper
  function around replace-buffer-contents.
2019-02-08 20:36:00 +01:00
Glenn Morris
0f9940505f Merge from origin/emacs-26
0cd7b52 (origin/emacs-26) Minor improvements to do strings in callproc.c
b8c7017 Improve documentation of 'date-to-time' and 'parse-time-string'
46095a7 Fix downloading of URLs that end in a slash
3b60a0a * doc/misc/eww.texi (Basics): Fix eww keybindings.  (Bug#34291)
8e22025 Fix process-thread docstring
459b669 Fix failures of vc-find-revision with non-ASCII file names
e9ff190 * doc/lispref/tips.texi (Documentation Tips): Fix quotes.  (B...
3e49a08 ; * src/coding.h (struct coding_system): Fix a typo in a comm...
b657286 Add documentation for tabulated-list functions in the elisp m...
6e0f67b Fix URL in ucs-normalize.el
ce3ae1f * etc/PROBLEMS: Amend entry for profiler bug #34235 to mentio...

# Conflicts:
#	doc/lispref/os.texi
2019-02-08 09:20:40 -08:00
Eli Zaretskii
0cd7b526a1 Minor improvements to do strings in callproc.c
* src/callproc.c (Fcall_process, Fcall_process_region): Minor
fixes to doc strings.  Suggested by Nicholas Drozd
<nicholasdrozd@gmail.com>.  (Bug#34274)
2019-02-08 10:46:00 +02:00
Robert Pluim
9e0d69b5a1 Unify three font info structures
* src/ftfont.h (struct font_info): New type, unifies similar types
from ftcrfont.c, ftfont.c and xftfont.c
* src/xftfont.c (struct xftfont_info): Remove, replace with struct
font_info.  Adjust all uses.
* src/ftcrfont.c (struct ftcrfont_info): Likewise.
* src/ftfont.c (struct ftfont_info): Likewise.
2019-02-08 09:05:11 +01:00
Robert Pluim
8e22025f33 Fix process-thread docstring
* src/process.c (Fprocess_thread): Correct docstring.
2019-02-08 08:22:34 +01:00
Eli Zaretskii
dbb1a8bc1a Minor fix for unexec builds.
* src/emacs.c (main): Fix assertions and logic for pdump
loading in builds that can both unexec and pdump.
2019-02-07 17:32:47 +02:00
Eli Zaretskii
0ceee95f85 ; Simplify last change. 2019-02-07 17:27:18 +02:00
Eli Zaretskii
005d8346b8 Avoid segfaults on MS-Windows in enexec'ed Emacs
* src/emacs.c (main) [WINDOWSNT]: Fix logic of using dynamic
heap in unexec case.  (Bug#34277)
2019-02-07 17:23:57 +02:00
Eli Zaretskii
3e49a080e5 ; * src/coding.h (struct coding_system): Fix a typo in a comment. 2019-02-06 18:51:02 +02:00
Eli Zaretskii
b7b0cc709e Unbreak interactive invocation of temacs on MS-Windows
* src/emacs.c (main) [WINDOWSNT]: Allow to invoke temacs
interactively without the --temacs= option.
2019-02-06 17:56:44 +02:00
Eli Zaretskii
a03de1e2a3 Prevent segfaults when running inside docker
* src/coding.c (syms_of_coding): New symbol Qus_ascii.
(reset_coding_after_pdumper_load): Call
set-safe-terminal-system-internal to set up
safe_terminal_coding after restoring from pdump file.
Reported by Philippe Vaucher <philippe.vaucher@gmail.com>.
2019-02-06 17:31:26 +02:00
Eli Zaretskii
ef17247fe9 Avoid segfaults due to image cache being cleared during redisplay
* src/xdisp.c (redisplay_internal): Set the
inhibit_clear_image_cache flag of a frame while its windows
are being redisplayed, and reset the flag after the call top
update_frame returns.
* src/image.c (clear_image_cache): Do nothing if the frame's
inhibit_clear_image_cache flag is set.  (Bug#34256)
* src/frame.h (struct frame): New flag inhibit_clear_image_cache.
2019-02-04 19:42:33 +02:00
Eli Zaretskii
f37000aeb2 Support (locale-info 'paper) on MS-Windows
* src/w32proc.c (LOCALE_IPAPERSIZE): Define if undefined.
(nl_langinfo): Support _NL_PAPER_WIDTH and _NL_PAPER_HEIGHT
like glibc does.
* src/fns.c (Flocale_info): Update the doc string.

* nt/inc/langinfo.h: Add _NL_PAPER_WIDTH and _NL_PAPER_HEIGHT
to the enumeration.
(_NL_PAPER_WIDTH, _NL_PAPER_HEIGHT): Define namesake macros.
* nt/mingw-cfg.site (emacs_cv_langinfo__nl_paper_width): Set
to 'yes'.

* doc/lispref/nonascii.texi (Locales): Update the
documentation of 'locale-info' for the argument of 'paper'.

* etc/NEWS: Update the locale-info entry.
2019-02-04 18:05:59 +02:00
Robert Pluim
49f6243027 Use IPv6 localhost when family is 'ipv6
This fixes Bug#34193

* src/process.c (Fmake_network_process): Explicitly use ::1 when
using IPv6 with 'local.  Update docstring.

* test/lisp/net/network-stream-tests.el
(make-ipv6-tcp-server-with-unspecified-port):
(make-ipv6-tcp-server-with-specified-port): Test creating ipv6
local server.
(make-server): Add optional family argument, default ipv4
(echo-server-with-local-ipv4): Test connecting to 'local ipv4
(echo-server-with-local-ipv6): Test connecting to 'local ipv6

* doc/lispref/processes.texi (Network Processes): Describe
behavior when using 'local.

* etc/NEWS: Document new 'make-network-process' behavior when
connecting to 'local with ipv6.
2019-02-04 10:06:04 +01:00
Paul Eggert
713eece307 Support (locale-info 'paper) on GNU platforms
* configure.ac (HAVE_LANGINFO__NL_PAPER_WIDTH): New macro.
* src/fns.c (Flocale_info) [HAVE_LANGINFO__NL_PAPER_WIDTH]:
Get paper width and height from locale.
2019-02-02 13:25:00 -08:00
Paul Eggert
6f52478e0c Fix unlikely user-full-name integer overflow
* src/editfns.c (Fuser_full_name):
Don’t assume uid fits into fixnum.
2019-02-02 10:24:12 -08:00
Eli Zaretskii
c73d18ac42 Prevent segfault in bootstrap-emacs on MinGW
* src/emacs.c (main) [WINDOWSNT]: Fix logic of determining by
argv[0] whether to use the static heap.  (Bug#34277)
2019-02-02 17:12:13 +02:00
Martin Rudalics
dc1d2d3c22 Fix bugs caused by running window change functions during redisplay
* src/xdisp.c (redisplay_internal): Run window change
functions before updating the display so changes induced by
these functions can get caught by redisplay (Bug#34138).
* src/window.c (run_window_change_functions): Bind
Qinhibit_redisplay to avoid that the minibuffer window gets
resized while running window change functions (Bug#34179,
Bug#34260).
2019-02-02 09:43:34 +01:00
Paul Eggert
3b69e02a24 Rename CANNOT_DUMP to HAVE_UNEXEC
* configure.ac (CANNOT_DUMP): Remove.  All uses removed,
or changed to the negative of with_unexec.
(HAVE_UNEXEC): New macro.  All uses of CANNOT_DUMP changed
to the negative of this macro.
2019-02-01 13:05:39 -08:00
Paul Eggert
b60761acfa Merge from origin/emacs-26
7ba8f80398 Avoid errors in 'rmail-get-new-mail'
9c8412a0b8 Fix process-contact bug with TCP connections

# Conflicts:
#	src/process.c
2019-02-01 08:40:52 -08:00
Paul Eggert
47679e6323 Prefer static to extern where either will do
* src/charset.c (charset_table_size):
* src/pdumper.c (dump_private):
* src/sysdep.c (init_sigsegv):
* src/window.c (old_selected_window):
Now static.
* src/charset.c (charset_table_size):
Now int, since the value always fits in int.
* src/gtkutil.c (xg_gtk_initialized): Now present only if
HAVE_XWIDGETS, to make it clearer that this is an xwidgets
hack.  All uses changed.
* src/lread.c (ndefsubr): Remove; unused.
* src/pdumper.h: Use usual GNU indenting style for functions,
since my static-vs-extern checking hack relies on it.
(dump_public): Always declare; simpler and doesn’t hurt.
(pdumper_handle_page_fault): Remove unused decl.
2019-01-31 15:33:21 -08:00
Paul Eggert
05d2fc7170 Widen modiff counts to avoid wraparound
Widen modification counts to at least 64 bits, to make
wraparound practically impossible.
* doc/lispref/buffers.texi (Buffer Modification):
Don’t say the modification-count can wrap around.
* src/buffer.c (Frestore_buffer_modified_p, Fbuffer_swap_text)
(modify_overlay):
* src/insdel.c (insert_1_both, insert_from_string_1)
(insert_from_gap, insert_from_buffer_1)
(adjust_after_replace, replace_range, replace_range_2)
(del_range_2, modify_text):
* src/textprop.c (modify_text_properties):
Use modiff_incr instead of incrementing	directly.
(Fbuffer_modified_tick, Fbuffer_chars_modified_tick):
Don’t assume modification counts fit into fixnums.
* src/buffer.h (struct buffer_text, struct buffer):
* src/cmds.c (internal_self_insert):
* src/fileio.c (Finsert_file_contents):
* src/indent.c (last_known_column_modified):
* src/keyboard.c (command_loop_1):
* src/marker.c (cached_modiff):
* src/syntax.c (find_start_modiff, parse_sexp_propertize)
(find_defun_start):
* src/window.h (struct window):
Use modiff_count for modification counts.
* src/editfns.c (Fsubst_char_in_region):
Copy instead of incrementing modification counts,
since integer overflow checking is not needed here.
* src/lisp.h (modiff_count): New type.
(modiff_incr, modiff_to_integer): New inline functions.
* src/pdumper.c (dump_buffer): Update hash.
2019-01-31 10:31:43 -08:00
Paul Eggert
a68eee50eb Minor pdumper simplification
* src/pdumper.c (dump_roots, pdumper_load): Simplify initialization.
(dump_bitset_init, pdumper_load): Omit unnecessary assignments.
(dump_bitset_destroy): Remove; never called.  All callers removed.
(dump_do_dump_relocation, pdumper_load): Add FIXME comment.
(pdumper_load): Simplify by assuming C99.  Remove unused local.
2019-01-31 07:57:56 -08:00
Paul Eggert
9c8412a0b8 Fix process-contact bug with TCP connections
This fixes a regression from Emacs 25.3 (Bug#34134).
* src/process.c (server_accept_connection):
Set host correctly, fixing a bug introduced in
2017-09-16T21:29:18Z!eggert@cs.ucla.edu
when working around a GCC bug.
2019-01-30 15:12:31 -08:00
Glenn Morris
020f623372 * src/Makefile.in (clean): Delete versioned pdmp files.
Else build number increments without limit even in clean builds.
2019-01-28 15:55:57 -05:00
Eli Zaretskii
9d8f900d93 Fix last change in xfaces.c
* src/xfaces.c (init_xfaces): Don't rely of 'face'
property of a face to be a natural number.
2019-01-28 22:03:05 +02:00
Eli Zaretskii
cd06d173a6 Fix bug with face-id after restoring from pdump
* src/xfaces.c (init_xfaces): New function.
* src/emacs.c (main) [HAVE_PDUMPER]: If dumped with pdumper,
call init_xfaces.  (Bug#34226)
* src/lisp.h (init_xfaces) [HAVE_PDUMPER]: Add prototype.

* test/lisp/faces-tests.el (faces--test-face-id): New test for
bug#34226.
2019-01-28 17:24:04 +02:00
Paul Eggert
cc1c46e412 forward-line now works with bignums
* src/cmds.c (Fforward_line): Support bignum arg.
(scan_newline): Return void since no caller was using the
return value.
* src/search.c (find_newline, scan_newline_from_point)
(find_newline1): Return the number of newlines counted, not
the count shortage, so that the return value always fits in
ptrdiff_t even if the original count was a bignum.  All
callers changed.
* test/src/cmds-tests.el (forward-line-with-bignum): New test.
2019-01-27 15:52:06 -08:00
Eli Zaretskii
6c2ee11d8f Improve pdump load diagnostics
* src/emacs.c (load_pdump): Improve diagnostics when pdump
file fails to load correctly.
2019-01-27 17:55:27 +02:00
Eli Zaretskii
4eb78a47e0 * src/emacs.c (load_pdump): Fix a thinko in last change. 2019-01-26 19:48:33 +02:00
Eli Zaretskii
a7974933dd Improve pdump file search and 'pdumper-stats'
* src/pdumper.c (pdumper_record_wd): New function.
(pdumper_load): Use xstrdup instead of strdup, as on
MS-Windows the latter uses the wrong heap.  Don't free a
NULL pointer.
* src/emacs.c (load_pdump): Support the use case where the
Emacs binary was renamed: look in exec-directory for the
pdump file whose base name is derived from the Emacs binary,
in addition to just emacs.pdmp.
(main): Call pdumper_record_wd to prepend CWD to the pdump
file name.
* src/fileio.c (file_name_absolute_p): Now extern.
* src/lisp.h (file_name_absolute_p): Add prototype.
* src/pdumper.h (pdumper_record_wd): Add prototype.

* doc/emacs/cmdargs.texi (Initial Options): Update the
documentation of where Emacs looks for the dump file.
2019-01-26 12:08:56 +02:00
Eli Zaretskii
bf4099b237 Fix face initializations in pdump'ed Emacs
* src/dispnew.c (init_display_interactive): Call init_faces_initial
in the daemon if dumped with pdumper. (Bug#34114)
2019-01-26 12:07:27 +02:00
Stefan Monnier
dbc48d758a Avoid having to build src/emacs when we just want to make tags
* Makefile.in (TAGS tags): Remove `src` from the dependencies.
* src/Makefile.in (ctagsfiles1): Strip macuvs.h and fingerprint.c.
2019-01-23 16:02:11 -05:00
Eli Zaretskii
191394276a ; * src/Makefile.in: Fix wording of comment in last change. 2019-01-23 21:54:51 +02:00
Eli Zaretskii
d39a9692d2 Fix build errors with pdump fingerprint on macOS
* src/Makefile.in ($(lispsource)/international/charprop.el):
Remove macuvs.h from the target list, to avoid circular
dependency on macOS.  Reported by Alan Third <alan@idiocy.org>.
2019-01-23 21:53:29 +02:00
Paul Eggert
d9779c377d * src/keyboard.c (read_char): Use CALLN. 2019-01-23 08:02:04 -08:00
Stefan Monnier
3a0c7b1e60 * src/emacs.c (load_pdump): Minor simplification. 2019-01-23 10:56:26 -05:00
Eli Zaretskii
43cf9b968a Fix compilation of pdumper.c with old buggy GCC
* src/pdumper.c (emacs_ptr_at): Renamed from emacs_ptr, to
avoid compilation errors with GCC 4.7.  Reported by Martin
Rudalics <rudalics@gmx.at>.  All callers changed.
2019-01-23 17:40:10 +02:00
Phillip Lord
7b31de4d10 Add hook for all events
* lisp/subr.el (input-event-functions): Add input-event-functions
* src/keyboard.c (read_char): Call input-event-functions on all hooks
2019-01-22 21:46:03 +00:00
Paul Eggert
be73ed4338 Simplify pdumper-load via timespectod
Suggested by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2019-01/msg00458.html
* src/pdumper.c (pdumper_load): Simplify.
2019-01-21 12:49:00 -08:00
Stefan Monnier
657f6fe500 * src/pdumper.c (dump_string) [CHECK_STRUCTS]: Fix copy&paste error 2019-01-21 15:03:28 -05:00
Alan Third
6e5ac1d1ff Fix occasional pdumper/bootstrap error
* src/Makefile.in (emacs$(EXEEXT)): Copy the new executable over
bootstrap-emacs.
2019-01-21 16:52:17 +00:00
Eli Zaretskii
67b1053dcd Support native image resizing on MS-Windows
* src/w32term.c (x_draw_image_foreground): Scale the image if
the requested dimensions are different from the bitmap
dimensions.
* src/image.c (Fimage_scaling_p): Return t when HAVE_NTGUI.
(x_set_image_size) [HAVE_NTGUI]: Record the scaled dimensions
in the image struct.
* src/dispextern.h (HAVE_NATIVE_SCALING): Define when
HAVE_NTGUI as well.

* etc/NEWS: Update the announcement of native image scaling.
2019-01-20 17:59:12 +02:00
Philipp Stephani
551051596f Improve error data when passing a wrong type to 'sort' (Bug#34104)
* src/fns.c (Fsort): Use 'list-or-vector-p' for error message.
(syms_of_fns): Define 'list-or-vector-p'.

* test/src/fns-tests.el (fns-tests-sort): Extend unit test.
2019-01-20 00:04:19 +01:00
Paul Eggert
3e12551723 pdumper-stats now returns s, not ms
* doc/lispref/internals.texi (pdumper-stats):
* src/pdumper.c (pdumper_load): Return seconds, not milliseconds.
Minimize rounding errors in the usual case.
2019-01-19 14:39:16 -08:00
Eli Zaretskii
b821a70cb9 ; Fix a recent change in pdumper.c
* src/pdumper.c (Fpdumper_stats): Don't expand dump filename, as we don't
record the directory relative to which it was specified.
2019-01-19 20:37:50 +02:00
Eli Zaretskii
8e2b2a2b17 Minor cleanup in pdumper.c
* src/pdumper (subtract_timespec): Function removed.
(pdumper_load): Use timespec_sub instead of subtract_timespec.
2019-01-19 20:21:25 +02:00
Eli Zaretskii
8bb5939efa Improve 'pdumper-stats' and its documentation
* src/pdumper.c (Fpdumper_stats): Improve formatting and
wording of the doc string.  Decode the pdump file name and
expand-file-name it.

* doc/lispref/internals.texi (Building Emacs): Document
'pdumper-stats'.
2019-01-19 20:09:38 +02:00
Eli Zaretskii
436c225f1b Unbreak the macOS NS build
* src/xdisp.c (expose_window_tree): Declare and define 'f' on
NS as well.  Reported by Herbert J. Skuhra <herbert@gojira.at>.
2019-01-19 13:32:59 +02:00