| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| |
| |
| | |
* src/fileio.c (Finsert_file_contents): Do not look at st_size
when scanning the file’s head and tail for a coding system comment.
Instead, just use read and SEEK_END and don’t worry if the latter fails.
st_size and lseek might not work in a /proc file system.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In copy-file, do not trust st_size, since it might change as we run,
or we might be in a /proc system where it is unreliable anyway.
Also, fix some other unlikely copy-file bugs while we’re here.
* src/fileio.c (Fcopy_file): Use O_TRUNC when opening a
destination that already exists. This saves us the trouble
of having to call ftruncate with a possibly-bogus st_size;
the old motivation for using ftruncate is no longer compelling.
Do not assume ptrdiff_t is as wide as ssize_t; although this is
true on all known platforms, it’s easy to not assume it.
Don’t trust st_size. Prefer SSIZE_MAX to TYPE_MAXIMUM (ssize_t).
Always read+write, regardless of whether copy_file_range failed.
|
| | |
| |
| |
| |
| |
| | |
* src/fileio.c (Finsert_file_contents): Minor refactoring.
This should help future patches which distinguish read_buf’s size
from other uses of READ_BUF_SIZE which may change.
|
| | |
| |
| |
| |
| |
| | |
* src/fileio.c (read_non_regular): Return negation of
errno on failure, instead of -1.
(Finsert_file_contents): Signal with correct errno when a read fails.
|
| | |
| |
| |
| |
| | |
* src/eval.c (backtrace_p): Check 'current_thread' before
dereferencing it.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This allows CSS to be used with librsvg < 2.48.
* src/image.c (svg_load_image): Move CSS construction and include
"color". Also append the CSS passed in by the user rather than
replacing it.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* etc/images/checkbox-mixed.svg:
* etc/images/checked.svg:
* etc/images/conceal.svg:
* etc/images/down.svg:
* etc/images/gnus/gnus-pointer.svg:
* etc/images/left.svg:
* etc/images/outline-close.svg:
* etc/images/outline-open.svg:
* etc/images/radio-checked.svg:
* etc/images/radio-mixed.svg:
* etc/images/radio.svg:
* etc/images/reveal.svg:
* etc/images/right.svg:
* etc/images/symbols/check-mark_16.svg:
* etc/images/symbols/chevron_down_16.svg:
* etc/images/symbols/chevron_left_16.svg:
* etc/images/symbols/chevron_right_16.svg:
* etc/images/symbols/chevron_up_16.svg:
* etc/images/symbols/cross_16.svg:
* etc/images/symbols/cross_circle_16.svg:
* etc/images/symbols/cross_circle_fill_16.svg:
* etc/images/symbols/dot_large_16.svg:
* etc/images/symbols/dot_medium_16.svg:
* etc/images/symbols/dot_small_16.svg:
* etc/images/symbols/heart_16.svg:
* etc/images/symbols/heart_fill_16.svg:
* etc/images/symbols/heart_half_16.svg:
* etc/images/symbols/menu_16.svg:
* etc/images/symbols/minus_16.svg:
* etc/images/symbols/minus_circle_16.svg:
* etc/images/symbols/minus_circle_fill_16.svg:
* etc/images/symbols/plus_16.svg:
* etc/images/symbols/plus_circle_16.svg:
* etc/images/symbols/plus_circle_fill_16.svg:
* etc/images/symbols/star_16.svg:
* etc/images/symbols/star_fill_16.svg:
* etc/images/symbols/star_half_16.svg:
* etc/images/unchecked.svg:
* etc/images/up.svg: Set 'fill' color to 'currentcolor'.
* etc/images/symbols/README: Add explanation of change to instructions.
* src/image.c: Remove setting of the 'fill' color in the default SVG
stylesheet.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
These symbols are used in the reader as special constants and can't be
passed from Lisp (Emacs would crash).
* src/lread.c (syms_of_lread): Unintern.
(init_source): Use BASE_EQ.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Inspect the given 'readcharfun' source once, before using it, instead of
for each character read. This moves a bunch of branches away from the
critical path, with separate functions for different source types.
Replace some preprocessor macros with functions.
* src/lread.c (READCHAR, UNREAD, READCHAR_REPORT_MULTIBYTE)
(FROM_FILE_P): Remove; use corresponding functions instead.
All callers adapted.
(source_t): New struct that takes the place of the `readcharfun` and
`readbyte` arguments in many places.
(init_source)
(source_buffer_get, source_buffer_unget)
(source_marker_get, source_marker_unget)
(source_string_get, source_string_unget)
(source_file_get, source_file_unget)
(source_function_get, source_function_unget)
(from_file_p, unreadbyte_from_file):
New.
(readbyte_from_stdio): Replace `readbyte_from_file`.
(readchar, unreadchar): Rewrite.
(lisp_file_lexical_cookie, readevalloop, read_internal_start):
Create a source_t for use during reading. All signatures and functions
called adapted.
(read_char_escape): Remove check for an error that can no longer occur.
|
| | |
| |
| |
| | |
This removes code that became dead in the non-recursive reader reform.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The native compiler should not try to generate in rendered code
immediate floats produced by the constrain on the '=' operator.
* test/src/comp-tests.el (comp-test-78606-1): Add test.
* test/src/comp-resources/comp-test-funcs.el (comp-test-78606-1-f): New
function.
* src/comp.c (emit_mvar_rval): Check if an immediate is materializable.
* lisp/emacs-lisp/comp.el (comp-ctxt): Add 'non-materializable-objs-h'
slot.
(comp--fwprop-insn): Update call.
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-=): Add parameter.
|
| | |
| |
| |
| |
| | |
* src/frame.c (frame_redisplay_p): Start loop with 'f', not its parent
frame. Simplify return expression.
|
| | |
| |
| |
| |
| |
| | |
* src/print.c (print_error_message): For a user-error that is to
be printed to the echo area, use message3 in order to preserve
fontification.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/frame.c (make_terminal_frame): Initialize terminal's
top_frame slot if it has not been set up yet (Bug#78966).
* src/keyboard.c (kbd_buffer_get_event): Do not assume that the
event's frame_or_window slot always produces a valid frame
(Bug#78966).
(tty_read_avail_input): Try to make sure that the input event we
create has a valid frame_or_window slot (Bug#78966). Add assertion
to that purpose.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit only adds the new function, the fix for the bug is
in the next commit.
* doc/lispref/parsing.texi (Using Parser): Add docs.
* lisp/treesit.el (treesit): Add shortdoc.
* src/treesit.c (treesit_get_affected_ranges): New function
extracted from treesit_call_after_change_functions.
(treesit_call_after_change_functions): Extract out.
(treesit_ensure_parsed): Return affected regions.
(Ftreesit_parser_changed_regions): New function that returns the
affected regions.
|
| | |
| |
| |
| | |
* src/lread.c (read0): Strength reduction.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Abstract the buffering in the reader with a struct and plain functions
instead of rather unhygienic preprocessor macros.
* src/lread.c (READ_AND_BUFFER, INVALID_SYNTAX_WITH_BUFFER):
Removed, replaced with...
(readbuf_t, readbuf_grow, add_char_to_buffer, read_and_buffer)
(invalid_syntax_with_buffer): ...these new functions and struct.
(read0): Use new code instead of old preprocessor macros.
|
| | |
| |
| |
| | |
The bool vector compat hack is there for a bug in Emacs 19 only.
|
| | |
| |
| |
| |
| |
| |
| | |
Previously, latin-1 was incorrectly assumed (bug#70988).
* src/lread.c (readchar): Convert to raw byte.
* test/src/lread-tests.el (lread-unibyte-string-source): New test.
|
| | |
| |
| |
| |
| |
| |
| | |
Previously, latin-1 was incorrectly assumed (bug#70988).
* src/print.c (print_object): Call the correct function.
* test/src/print-tests.el (print-unibyte-symbols): New test.
|
| | |
| |
| |
| |
| |
| |
| | |
Previously, latin-1 was incorrectly assumed (bug#70988).
* src/lread.c (readchar): Set multibyte flag.
* test/src/lread-tests.el (lread-function-source): New test.
|
| | |
| |
| |
| |
| |
| |
| | |
* src/editfns.c (Ftranspose_regions): Be careful that ELisp code could
move the gap from under our feet.
* test/src/editfns-tests.el (editfns-tests--bug76124): New test.
|
| |\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
3f7787c9794 ; * lisp/replace.el (query-replace-help): Fix help text (...
b10596a6303 ; * lisp/emacs-lisp/warnings.el (warning-display-at-botto...
060f964906b Handle ts_node_type return NULL (bug#78938)
5bdacbe460a Improve documentation of 'warning-display-at-bottom'
30dae2ad239 Handle the case when ts_node_type returns NULL (bug#78938)
985ad1da76d ; * lisp/emacs-lisp/bytecomp.el (compilation-safety): Doc...
de18407f513 ; * doc/lispref/functions.texi (Mapping Functions): Fix w...
|
| | |
| |
| |
| |
| |
| | |
* src/treesit.c (treesit_traverse_match_predicate): Handle the
case when ts_node_type returns NULL.
(Ftreesit_node_type): Add some comment.
|
| | |
| |
| |
| | |
* src/treesit.c (Ftreesit_node_type): Handle NULL.
|
| | |
| |
| |
| |
| | |
* src/keyboard.c (handle_interrupt): Don't forcibly switch threads
if a non-main thread was in GC when the signal handler was called.
|
| | |
| |
| |
| |
| |
| | |
* src/xterm.c (handle_one_xevent): Drop XRender surfaces when
the frame widget is resized, rather than when the toplevel is.
(bug#77988)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
print_error_message can throw after producing some output, so use
unwind-protect to ensure prin1-to-string-buffer is cleared.
* src/print.c (erase_prin1_to_string_buffer): New.
(Ferror_message_string): Use it to catch errors thrown in
'print_error_message'.
* test/src/print-tests.el (error-message-string-circular): Expand
test.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
C99 prohibits passing zero args to macro’s ‘...’.
* lib-src/seccomp-filter.c (RULE0): New macro, which is like RULE
except with zero args. All zero-arg uses of RULE changed to RULE0.
* src/comp.c (compile_function, Fcomp__init_ctxt, syms_of_comp):
Change ‘CALLN (Fmake_hash_table)’ to ‘Fmake_hash_table (0, NULL)’,
since CALLN requires at least two args in C99.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
* src/fileio.c (Finsert_file_contents): Inhibit ask-supersession
only if we're VISITing in a non-narrowed buffer (bug#78866).
* test/src/fileio-tests.el (ert--tests-dir): New var.
(fileio-tests--insert-file-contents-supersession): New test.
|
| | |
| |
| |
| |
| | |
* src/eval.c (backtrace_top): Don't segfault if current_thread is
NULL. (Bug#76970)
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
* src/sysdep.c (get_host_uptime) [GNU_LINUX || CYGWIN || __ANDROID__]:
New function, replacing get_host_boot_time.
Use CLOCK_BOOTTIME instead of inspecting /proc/stat.
All callers changed. This should be an even better way to fix Bug#63496.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With a Linux kernel, use /proc/stat rather than get_boot_time
to get boot time, since when Emacs is running in a container
we want the underlying host boot time, not the container boot time.
This should be a better way to fix Bug#63496.
* src/sysdep.c: Do not include boot-time.h.
(get_host_boot_time) [GNU_LINUX || CYGWIN || __ANDROID__]:
New function.
(system_process_attributes) [GNU_LINUX || CYGWIN || __ANDROID__]:
Use it instead of get_boot_time.
|
| | |
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (try_scrolling): Don't loop when the
partially-visible cursor line is at the top of the window. This
looping are pointless, and just makes redisplay slow for no reason.
(Bug#78766)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I noticed this issue while looking into Bug#63496.
GNU Emacs does not infer the boot time consistently on GNU/Linux
and similar platforms: android_notifications_notify_1 and
get_boot_sec use Gnulib’s boot-time module, but process-attributes
has idiosyncratic code that evidently predates that module.
The idiosyncratic code returns an unstable etime, which is a minor bug.
Simplify process-attributes by just using Gnulib.
This returns a stable etime.
It may also fix Bug#63496; if not, we can fix Gnulib later.
* src/sysdep.c: Include <boot-time.h>.
(get_up_time) [GNU_LINUX || CYGWIN || __ANDROID__]: Remove.
(system_process_attributes) [GNU_LINUX || CYGWIN || __ANDROID__]:
Use get_boot_time instead of get_up_time.
|
| | |
| |
| |
| |
| | |
Bytecode should never be able to set anything to Qunbound because that
value is not accessible from Lisp. Found by Pip Cet.
|
| | |
| |
| |
| |
| | |
Previously, mapcar etc would crash or return nonsense when passed a
record. Found by Pip Cet.
|
| |\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
df3fb94f091 Insert missing step to make use of directory tracking OSC...
1bed2949583 * lisp/keymap.el (keymap-set): Refer to 'key-description'...
941158fc133 Support new tree-sitter grammar filename format (bug#78754)
888f846d377 Fix crash when evaluating "(signal nil 5)" (bug#78738)
51b9e92ab8e Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
c0a913ea4f3 ; * doc/lispref/modes.texi (Font Lock Basics): Remove old...
37de076017a Adapt emba integration (don't merge)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously Emacs only looks for filenames like
libtree-sitter-json.so.0.0. Now Emacs also look for filenames
like libtree-sitter-json.so.15.0.
* src/treesit.c:
(treesit_load_language_push_for_each_suffix): Add versioned
candidate to candidate list too.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
The docstring already warns against calling signal with a nil
error symbol, which is for internal use only, but we can avoid crashing
in this case.
* src/eval.c (Fsignal): Produce a "peculiar error" for more arguments
involving non-lists.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Contrary to the existing documentation here, the value of this
field cannot be the symbols open or closed. Furthermore, this
field is never set to "stop" for network connections.
* src/process.h (Lisp_Process): Improve/fix documentation of the
'status' field. (Bug#78784)
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
* src/profiler.c (export_log): Check if a log has been allocated first,
and return nil if it hasn't.
(Fprofiler_cpu_log, Fprofiler_memory_log): Doc fix.
* test/src/profiler-tests.el (profiler-tests-cpu-profiler)
(profiler-tests-memory-profiler): New tests.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
* src/w32fns.c (msh_mousewheel): Declare.
* src/treesit.c (treesit_debug_print_linecol): Fix format
specifiers.
* lib-src/pop.c (pfn_getaddrinfo, pfn_freeaddrinfo): Now static.
|
| | |
| |
| |
| |
| | |
* src/w32fns.c (post_character_message): Support triple-C-g.
(Bug#78737)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Specifically, use the term "display specification" more consistently to
distinguish from "display property", which is the full value of the
'display' text property.
* src/xdisp.c (find_display_property): Rename PROP to SPEC.
(Fget_display_property): Rename PROP to SPEC and improve docstring.
* lisp/emacs-lisp/subr-x.el (add-display-text-property): Rename PROP to
SPEC and improve docstring.
* doc/lispref/display.texi (Display Property): Reword documentation to
more-consistently refer to display specifications.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* java/AndroidManifest.xml.in: Update targetSdkVersion to 36.
* java/INSTALL: Document revised compilation dependencies.
* java/org/gnu/emacs/EmacsActivity.java (interceptBackGesture):
New function.
(onCreate): Invoke the same to register back gesture callbacks
on Android 16 or better.
* java/org/gnu/emacs/EmacsWindow.java (onBackInvoked): New
function.
* src/keyboard.c (lispy_function_keys): Amend with new symbols
introduced in Android API 36.
|