1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-27 23:50:30 -08:00
Commit graph

43208 commits

Author SHA1 Message Date
Andrea Corallo
c3bc348f5e * Fix failure when eln-cache is removed (introduced by 4a1bb46260)
* src/comp.c (make_directory_wrapper, make_directory_wrapper_1):
	New functions.
	(Fcomp_el_to_eln_filename): If base_dir is not
	specified and we are searching across `comp-load-path' try to
	create a directory if does not exists.
2020-10-07 23:38:00 +02:00
Andrea Corallo
4a1bb46260 * Native compiling do not target a directory with no write permission
* src/comp.c (Fcomp_el_to_eln_filename): Check for write
	permission while choosing the output directory in
	`comp-eln-load-path'.
2020-10-06 18:01:56 +02:00
Andrea Corallo
87c6aa13b3 Make primitive redefinition effective through trampoline synthesis
* lisp/loadup.el (dump-mode): Set `comp-enable-subr-trampolines'
	when finished bootstrap.
	* src/data.c (Ffset): Call `comp-enable-subr-trampolines' when
	redefining a subr.
	* src/comp.c (syms_of_comp): Define `comp-subr-trampoline-install'
	symbol.
	(syms_of_comp): Define `comp-enable-subr-trampolines' variable.
2020-10-05 21:32:38 +02:00
Andrea Corallo
44ef24342f Merge remote-tracking branch 'savannah/master' into HEAD 2020-10-04 19:45:05 +02:00
Andrea Corallo
afb765ab3c Make filename hashing compatible with self contained builds (bug#43532)
* Makefile.in (lispdirrel): Add replace template.
	(epaths-force): Form correctly 'PATH_REL_LOADSEARCH' into epath.h
	* configure.ac (lispdirrel): Define variable (relative path of the
	lisp files from the installation directory).
	* src/comp.c (Fcomp_el_to_eln_filename): Update algorithm not to
	rely on 'PATH_DUMPLOADSEARCH' but on 'PATH_REL_LOADSEARCH'.
	* src/epaths.in (PATH_REL_LOADSEARCH): Add macro template.
2020-10-04 19:44:15 +02:00
Eli Zaretskii
0fe8ab79e7 Avoid segfaults in lookup_image when faces were freed
* src/image.c (lookup_image): Make sure the frame's face cache
exists and has at least the basic faces.  If FACE_ID is not a
basic face, and is no longer cached, fall back on the 'default'
face.  (Bug#43700)
2020-10-03 20:49:18 +03:00
Stefan Kangas
d6a2754348 ; Fix more typos 2020-10-03 12:53:51 +02:00
Stefan Kangas
ceae38b933 ; Fix trivial typos in ChangeLogs 2020-10-03 12:53:51 +02:00
Glenn Morris
0a769f4832 Merge from origin/emacs-27
2af6b3147d Clarification in Tramp manual
8fbaca7d41 Check Emacs version used for Tramp compilation
90e5549f02 Don't signal an error when saving files on WdebDAV volumes
6f73cc3579 ; * lisp/net/eww.el (eww-search-words): Doc fix.
ce0842a165 * lisp/hi-lock.el (hi-lock-find-patterns): Autoload it.  (...
2020-10-02 09:33:53 -07:00
Andrea Corallo
8dacc9e8c5 * Fix 'incoherent dumped eln file' error when DUMP-METHOD=pbootstrap
* src/Makefile.in ($(bootstrap_pdmp)): Add missing --bin-dest
	--eln-dest flags.
2020-10-02 13:59:51 +02:00
Andrea Corallo
6a0994bc97 * src/pdumper.c (dump_do_dump_relocation): Better error for incoherent eln. 2020-10-02 13:47:29 +02:00
Michael Albinus
0aa1e2d9d0 Use Fkeywordp in dbusbind.c, again
* src/dbusbind.c (XD_KEYWORDP): New macro.
(XD_DBUS_TYPE_P, Fdbus__init_bus, xd_read_queued_messages): Use it.
2020-10-01 11:20:38 +02:00
Michael Albinus
d8a9588034 Revert last change in dbusbind.c
* src/dbusbind.c (XD_DBUS_TYPE_P, Fdbus__init_bus)
(xd_read_queued_messages): Revert last change.  (Bug#43724)
2020-10-01 10:32:50 +02:00
martin rudalics
aea7788b92 Fix segfault in some cases when restoring a selected window
* src/xdisp.c (restore_selected_window): Fix the more grave
problems caused by a function deleting the previously selected
frame or window (bug#39977).
2020-10-01 02:00:06 +02:00
Andrea Corallo
ec23b719e5 * Improve some docstring in src/comp.c
* src/comp.c (Fcomp_el_to_eln_filename)
	(Fcomp__compile_ctxt_to_file): Improve docstring.
	(Fcomp__compile_ctxt_to_file): Rename 'file_name' -> 'filename'.
	(Fnative_comp_available_p): Improve docstring.
2020-09-30 17:06:04 +02:00
Eli Zaretskii
a190a446ee Fix 'move-to-column' when invisible text follows a TAB
* src/indent.c (scan_for_column): Accept 2 more arguments, and
report through them the position corresponding to PREVCOL.  All
callers changed.
(Fmove_to_column): Use the prev_col's position to test for a TAB
instead of assuming that the TAB is just before point (which is
false when there's invisible text around).  (Bug#43587)

* test/src/indent-tests.el: New file.
2020-09-30 17:33:58 +03:00
Michael Albinus
b7224f9629 Stricter checks for D-Bus compound types.
* src/dbusbind.c (XD_DBUS_TYPE_P, Fdbus__init_bus)
(xd_read_queued_messages): Use Fkeywordp instead of SYMBOLP.
(xd_signature): Stricter checks for compound types.

* test/lisp/net/dbus-tests.el (dbus-test01-compound-types): Extend test.
2020-09-30 15:28:53 +02:00
Andrea Corallo
6eb5a8c492 Merge remote-tracking branch 'savannah/master' into clean-up 2020-09-30 09:09:39 +02:00
Michael Albinus
7e45ed3a96 More strict D-Bus type checking
* lisp/net/dbus.el (dbus-register-monitor): Register proper key.
(dbus-monitor-handler): Adapt docstring.  Use grave text-quoting-style.

* src/dbusbind.c (xd_signature, xd_append_arg): More strict tests.
(syms_of_dbusbind): Adapt docstring.

* test/lisp/net/dbus-tests.el (dbus-test01-basic-types): Extend test.
2020-09-29 19:43:02 +02:00
Eli Zaretskii
90e5549f02 Don't signal an error when saving files on WdebDAV volumes
* src/w32.c (acl_get_file): If get_file_security raises the
ERROR_ACCESS_DENIED error, treat that like unsupported ACLs.
2020-09-29 18:21:23 +03:00
Stefan Monnier
9f30a6b1a4 * src/eval.c (Fapply): Simplify last change 2020-09-28 23:14:03 -04:00
Andrea Corallo
3129b3ffcb Rename in docstrings "non nil" into "non-nil"
* lisp/emacs-lisp/comp.el: Rename non nil -> non-nil in doc.

	* src/comp.c: Likewise.
2020-09-28 21:09:00 +02:00
Andrea Corallo
bb2a334a20 * src/lisp.h: Remove a newline diff left over master. 2020-09-28 21:09:00 +02:00
Andrea Corallo
a06fe08e8e Clean-up some now unnecessary diff against master
* lisp/emacs-lisp/autoload.el (update-directory-autoloads):
	.eln files have been moved so remove the '.eln' match.

	* lisp/emacs-lisp/bytecomp.el (byte-compile-refresh-preloaded):
	Likewise.

	* lisp/emacs-lisp/find-func.el (find-library-suffixes): Clean-up
	as '.eln' is no more in `load-suffixes'.

	* lisp/help-fns.el (find-lisp-object-file-name): Clean-up as
	`symbol-file' will return the '.elc' file.

	* src/lread.c (Fget_load_suffixes): Remove logic as '.eln' is not
	anymore in load-suffixes.
	(openp): Two spaces.
2020-09-29 10:05:39 +02:00
Glenn Morris
2e8c9ede15 Merge from origin/emacs-27
f31c6792ab Fix support for Zip64 zip files
ba635a19fb * lisp/hi-lock.el (hi-lock-auto-select-face): Doc fix.  (B...
cc8fef2bdd Avoid infinite recursion with 'relative' line numbers display
395f10cb98 ; Fix more trivial typos
bf4accb65e ; Fix some trivial typos

# Conflicts:
#	etc/NEWS
#	lisp/arc-mode.el
2020-09-27 09:37:10 -07:00
Pip Cet
a492013d07 Fix more single-byte accesses caused by bytepos/charpos confusion
* src/cmds.c (internal_self_insert): Use FETCH_BYTE, not
FETCH_CHAR, for a decremented byte position (bug#41520).

* src/xdisp.c (Fwindow_text_pixel_size, trailing_whitespace_p): Ditto.
2020-09-27 17:40:07 +02:00
Pip Cet
433b6fc53d Handle single-argument `apply' consistently (bug#40968)
* src/eval.c (Fapply): Handle (apply nil) without crashing.
Document single-argument form.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-apply): Don't attempt
to optimize single-argument apply.
* doc/lispref/functions.texi (Calling Functions): Document
single-argument apply.  Provide example (bug#40968).
2020-09-27 16:59:00 +02:00
Mattias Engdegård
8bd233a7eb Minor string-search optimisations (bug#43598)
* src/fns.c (Fstring_search): Perform cheap all-ASCII checks before more
expensive ones.  Use a faster loop when searching for non-ASCII
non-raw bytes.
* test/src/fns-tests.el (string-search): Add more test cases.
2020-09-27 14:28:07 +02:00
Eli Zaretskii
768676f74f Improve display of raw bytes in the echo-area
* src/print.c (print_object): When printing a unibyte string,
convert non-ASCII bytes to their character code, before sending
them to 'printchar'.  (Bug#43632)
2020-09-27 08:26:56 +03:00
Lars Ingebrigtsen
8c569683f2 Fix searching for multibyte needles in unibyte haystacks
* src/fns.c (Fstring_search): Make this work better when searching
unibyte haystacks for multibyte needles (bug#43598).
2020-09-27 02:01:03 +02:00
Lars Ingebrigtsen
104688feb4 Add tiny optimization for string-search
* src/fns.c (Fstring_search): Add tiny optimization for needles
that are longer than the haystack (bug#43598).
2020-09-27 00:35:11 +02:00
Andrea Corallo
dc0cf16c7a Always set 'Vexec_path' before 'Vinvocation_directory' (bug#43137)
Do this as depending on the OS if argv0 is not populated 'Vexec_path'
is used to infer 'Vinvocation_directory'.

     	* src/pdumper.c (pdumper_load): Invoke 'init_vars_for_load' instead
	of 'set_invocation_vars'.

	* src/lisp.h: Extern 'init_vars_for_load' instead of
	'set_invocation_vars' .

	* src/emacs.c (set_invocation_vars): Make it static and remove
	double invocation guard.
	(init_vars_for_load): Wrap 'init_callproc_1' and 'set_invocation_vars'
	calls + add double invocation guard.
	(init_cmdargs): Move out 'set_invocation_vars' invocation.
	(main): Call 'init_vars_for_load' instead of 'init_callproc_1'.
2020-09-26 15:46:31 +02:00
Andrea Corallo
06acf681d6 Merge remote-tracking branch 'savannah/master' into HEAD 2020-09-26 15:31:50 +02:00
Michael Albinus
c540f3323d Add D-Bus monitor
* lisp/net/dbus.el (dbus-interface-monitoring): New defconst.
(dbus-call-method, dbus-call-method-asynchronously)
(dbus-send-signal, dbus-method-return-internal)
(dbus-method-error-internal, dbus-check-arguments): Accept also
:system-private and :session-private.
(dbus-check-event, dbus-event-path-name)
(dbus-event-interface-name)
(dbus-event-member-name, dbus-property-handler)
(dbus-handle-bus-disconnect): Adapt according to new structure.
(dbus-handle-event): Handle also monitor events.
(dbus-event-destination-name, dbus-event-handler)
(dbus-event-arguments, dbus-register-monitor, dbus-monitor-handler):
New defuns.

* src/dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS, xd_remove_watch)
(Fdbus__init_bus): Accept also :system-private and :session-private.
(xd_read_message_1): Add destination and error_name to
dbus-event.  Handle monitor events.
(syms_of_dbusbind): Declare QCsystem_private, QCsession_private
and QCmonitor.
(dbus-registered-objects-table): Fix docstring.
2020-09-26 11:38:23 +02:00
Alan Third
3a3226716b Tidy up NS color handling
* src/nsimage.m (COLORSPACE_NAME): New macro to find the current
colorspace.
([EmacsImage initFromXBM:width:height:fg:bg:reverseBytes:]):
([EmacsImage initForXPMWithDepth:width:height:]): Use the current
colorspace.
* src/nsterm.h (NSAppKitVersionNumber10_7):
(NSAppKitVersionNumber10_10): Define for macOS version checks.
* src/nsterm.m ([NSColor colorForEmacsRed:green:blue:alpha:]): Tidy up
the version checking.
([NSColor colorUsingDefaultColorSpace]): Tidy the version checking and
use [NSColor colorUsingColorSpace:] with GNUstep.
2020-09-25 17:19:00 +01:00
Alan Third
dd6876d6e2 Remove obsolete macOS support for NS font backend
The ns font backend is has been disabled on macOS for a long time and
doesn't work correctly even if re-enabled.

* src/nsfont.m:
(ns_char_width):
(ns_ascii_average_width):
(ns_get_covering_families):
(nsfont_open):
(nsfont_close):
(nsfont_draw):
(ns_uni_to_glyphs):
(ns_glyph_metrics):
(EmacsGlyphStorage): Remove all Cocoa only code.
* src/nsterm.h (EmacsGlyphStorage): Remove.
(struct nsfont_info): Make GNUstep only.
* src/nsterm.m (ns_compute_glyph_string_overhangs): Remove GNUstep
only code from Cocoa builds.
2020-09-25 17:19:00 +01:00
Alan Third
c4c5db3de7 Implement internal border colors on NS (bug#41071)
* src/nsterm.m (ns_clear_under_internal_border): New function.
(ns_after_update_window_line): Use the correct background color.
(ns_redisplay_interface): Add ns_clear_under_internal_border.
2020-09-25 17:18:59 +01:00
Mattias Engdegård
497a1ed8bb string-search robustness and documentation improvement (bug#43598)
* src/fns.c (Fstring_search): Check START-POS argument range.
Simplify logic.  Improve doc string.
* test/src/fns-tests.el (string-search): Add test cases.
* doc/lispref/strings.texi (Text Comparison): Elaborate.
* lisp/emacs-lisp/byte-opt.el (pure-fns): Mark string-search as pure.
2020-09-25 17:08:00 +02:00
Lars Ingebrigtsen
d964375ad3 Tweak updating the process mark in set-process-buffer
* src/process.c (Fset_process_buffer): Only update the process
mark if we actually change the buffer.
2020-09-25 11:47:59 +02:00
Eli Zaretskii
cc8fef2bdd Avoid infinite recursion with 'relative' line numbers display
* src/xdisp.c (display_count_lines_visually): Bind
'display-line-numbers' to 'relative' around 'start_display' as
well, since that can invoke 'move_it_to' internally, thus
causing infinite recursion.  (Bug#43589)
2020-09-25 11:55:51 +03:00
Lars Ingebrigtsen
e51a98b0c2 Add a new function 'string-search'
* doc/lispref/strings.texi (Text Comparison): Document it.
* src/fns.c (Fstring_search): New function.
2020-09-25 01:53:16 +02:00
Lars Ingebrigtsen
7b3e94b664 Make set-process-buffer also update the process mark
* src/process.c (Fset_process_buffer): Update the process mark
(bug#43573).
2020-09-24 17:14:25 +02:00
Lars Ingebrigtsen
8463687b5d Refactor process mark setting
* src/process.c (update_process_mark): Make into its own function.
(Fmake_process, Fmake_pipe_process, Fmake_serial_process)
(connect_network_socket): Use it.
2020-09-24 17:08:30 +02:00
Eli Zaretskii
897ea41d39 Fix last change in resize_mini_window
* src/xdisp.c (resize_mini_window): Prevent recentering the
mini-window once its start position is computed.  (Bug#43572)
2020-09-24 17:13:43 +03:00
Andrea Corallo
94736c413f Do not install a subr trampoline twice
* src/comp.c (syms_of_comp): Define and initialize
	'Vcomp_installed_trampolines_h'.
	(Fcomp__install_trampoline): Fill 'Vcomp_installed_trampolines_h'
	* lisp/emacs-lisp/comp.el (comp--subr-safe-advice): Make use of
	`comp-installed-trampolines-h' to guard against installing a
	trampoline twice.
2020-09-24 09:57:17 +02:00
Andrea Corallo
2f78ac32bb * Add `comp--install-trampoline' machinery
* src/comp.c (Fcomp__install_trampoline): New function to
	install a subr trampoline into the function relocation table.
	Once this is done any call from native compiled Lisp to the
	related primitive will go through the `funcall' trampoline
	making advicing effective.
2020-09-23 21:08:02 +02:00
Andrea Corallo
2ab0966b2f Make CHECK_SUBR public
* src/data.c (CHECK_SUBR): Move from here to...
	* src/lisp.h (CHECK_SUBR): ...to here.
2020-09-23 20:53:33 +02:00
Alan Mackenzie
e4831151c2 Handle escaped comment enders correctly in syntax.c, fixing bug #43558
This fixes forward-comment, scan-lists, and parse-partial-sexp.

* src/syntax.c (forw_comment): Detect and skip an escaped comment ender
(e.g. \*/ in C) when comment-end-can-be-escaped is non-nil.
2020-09-23 08:52:34 +00:00
Eli Zaretskii
de6844b624 Fix cursor display in mini-window under icomplete-mode
* src/xdisp.c (resize_mini_window): When we show only part of the
mini-window's contents, make sure the window-start position is at
the beginning of a screen line.  (Bug#43519)
2020-09-22 16:52:18 +03:00
Andrea Corallo
4a50f54144 * Fix MacOS Emacs.app installation (bug#43532)
* src/comp.c (Fcomp_el_to_eln_filename): Adapt the filename
	hashing algorithm to allow for producing a MacOS self-contained
	Emacs.app.
2020-09-22 14:43:21 +02:00