| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fix is also prompted by Emacs bug#71744.
* src/image.c: Do not ignore -Wclobbered.
(png_load_body): Fix violations of the C standard, where setjmp
clobbered c. Move mask_img decl to pacify GCC.
(jpeg_load_body): Don’t make fp volatile; solve that problem in a
better way, via a new fp_volatile local. Fix violations of the C
standard, where setjmp clobbered mgr, img, and ximg. If __GNUC__
&& !__clang__, add useless assignments to pacify GCC.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fix is also prompted by Emacs bug#71744.
* src/eval.c (CACHEABLE): Remove. All uses removed.
Do not ignore -Wclobbered.
(internal_lisp_condition_case): Fix violations of the C standard,
where setjmp clobbered oldhandlerlist, var, and clauses.
Rewrite to pacify GCC, by using a sentinel rather than a count,
which GCC incorrectly complained about, and by coalescing some
duplicate code. If GCC_LINT && __GNUC__ && !__clang__ add a useless
assignment to pacify GCC.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This fix is also prompted by Emacs bug#71744.
* src/emacs-module.c: Do not ignore -Wclobbered.
(MODULE_HANDLE_NONLOCAL_EXIT): Fix violations of the C standard,
where setjmp clobbered env and internal_cleanup.
(module_extract_big_integer) [GCC_LINT && __GNUC__ && !__clang__]:
Work around GCC -Wclobbered false positive for ‘sign’.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fix is prompted by Emacs bug#71744.
The working hypothesis is that there are some bugs in Emacs,
and some in GCC’s diagnostics, and that this patch
fixes the Emacs bugs and works around the GCC diagnostic bugs.
The hypothesis is that GCC diagnostic bugs occur when GCC
coalesces variables or temporaries and some variables
are clobbered by setjmp and some vars/temps are not.
Part of this hypothesis involves GCC diagnosing the wrong variables.
Instead of ignoring the diagnostics, which the hypothesis suggests
indicate either problems in Emacs or in GCC, fix the Emacs bugs
and pacify the GCC false positives, with comments about the GCC bugs.
GCC’s true positives are helpful enough in squashing obscure bugs like
Emacs bug#71744, that it’s worth going to some effort to pacify
-Wclobbered instead of ignoring it.
* src/bytecode.c: Do not ignore -Wclobbered.
(exec_byte_code): Fix violations of the C standard, where setjmp
clobbered quitcounter and bc. If GCC_LINT && __GNUC__ && !__clang__,
work around GCC -Wclobbered warnings for bytestr_data and vectorp.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I found this problem while looking into Bug#72641.
* lib-src/etags.c (do_move_file):
* lib-src/update-game-score.c (unlock_file):
* src/androidvfs.c (android_hack_asset_fd_fallback):
* src/filelock.c (current_lock_owner):
Treat unlink as successful if it fails because the file wasn’t there.
This can happen with some NFS implementations, due to its
retrying over the network to get at-least-once semantics.
Although most of Emacs’s calls to unlink were already doing this,
a few instances were not.
|
| | |
| |
| |
| |
| |
| |
| | |
* src/filelock.c (current_lock_owner):
Remove empty lock files, as they are necessarily invalid
and can be caused by buggy file systems.
Problem reported by Michal Nazarewicz (bug#72641).
|
| | |
| |
| |
| |
| | |
* src/filelock.c (current_lock_owner): Refactor to make further
changes easier. This should not affect behavior.
|
| | |
| |
| |
| |
| |
| | |
* src/filelock.c (lock_file_1, current_lock_owner):
Don’t possibly invoke the garbage collector when
comparing lock file contents to host names.
|
| | |
| |
| |
| |
| |
| | |
* src/filelock.c (within_one_second): Accept intmax_t first arg.
Avoid undefined behavior on integer overflow.
(current_lock_owner): Simplify based on within_one_second change.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/eval.c (FletX, Flet, funcall_lambda)
(let_shadows_buffer_binding_p):
* src/data.c (set_blv_found, set_internal, default_value)
(set_default_internal, Flocal_variable_p):
* src/buffer.c (Fkill_buffer):
(mouse_face_overlay_overlaps, compare_overlays)
(report_overlay_modification):
BASE_EQ is safe because we don't actually compare symbols here.
|
| |\ \
| |/
| |
| |
| |
| |
| | |
b585826a65e ; * lisp/files.el (require-with-check): Fix doc string an...
6d55e94996e macOS: Wrong frame rectangle after wake (bug#71912)
c49724b9649 ; Grammar fixes
5c3d340e001 Fix format 2 cmap handling in sfnt.c
|
| | |
| |
| |
| |
| | |
* src/nsterm.m ([EmacsView windowDidBecomeKey]):
Call adjustEmacsFrameRect.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This code is untested as no font with a format 2 cmap could be found.
* src/sfnt.c (sfnt_lookup_glyph_2): Fix typos. Assume single-byte
encodings use character codes 0, 1, ..., 255 rather than 0, 256, ...,
65280.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Backport.
* src/sfnt.c (sfnt_transform_coordinates):
(sfnt_transform_f26dot6): Fix calculation of transformed coordinates in
the very rare case of arbitrary transformation matrices.
|
| | |
| |
| |
| |
| |
| | |
* src/sfnt.c (sfnt_transform_coordinates):
(sfnt_transform_f26dot6): Fix calculation of transformed coordinates in
the very rare case of arbitrary transformation matrices.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This prevents crashes when running code like:
(let ((font (open-font (find-font (font-spec ...)))))
(close-font font)
(close-font font))
* src/ftcrfont.c (ftcrfont_close): Make sure the function can be run
several times in a row without crashing.
|
| |\ \
| |/
| |
| |
| | |
a0406f7c12e ; Improve documentation of 'add-to-list'
bd6dfb97ff0 NS: Fix scroll-bar setting code (bug#72331)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/nsterm.m (ns_set_vertical_scroll_bar): Use
WINDOW_SCROLL_AREA_WIDTH instead of NS_SCROLL_BAR_WIDTH.
(ns_set_horizontal_scroll_bar): Use WINDOW_SCROLL_AREA_HEIGHT
instead of NS_SCROLL_BAR_HEIGHT. Clear area differently if vertical
scroll bars are present.
* src/nsterm.h (NS_SCROLL_BAR_WIDTH, NS_SCROLL_BAR_HEIGHT): Remove.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/w32.c (init_ntproc) [_UCRT]: Use SetHandleInformation to
prevent standard handles from being inherited, instead of relying
on MSVCRT-only behavior. For the details of the problem, see
https://lists.gnu.org/archive/html/emacs-devel/2024-07/msg01129.html.
Copyright-paperwork-exempt: yes
|
| |\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
679f7ccc49f Prevent accesses to /content files without a GUI connection
f0a7eec5a7d * lisp/net/tramp-integration.el (shortdoc): Use `tramp--w...
fb642d9cf54 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
f1e37ae423f Avoid crashes in very large buffers with long lines
4dc9e99349d Update description of string comparison functions
3817355aed5 Add sanity check when adding Tramp functions to shortdoc
1bbb3220179 ; * lisp/erc/erc-fill.el (erc-fill-wrap-mode): Doc fix.
3f6e7e1da68 js-ts-mode: Make jsdoc's "description" block a comment (b...
1c7e00f4f65 Also condition cjk-misc font-spec on Android
b89d65df5fa ; * etc/PROBLEMS: How to install sources on SUSE Linux (b...
729b17c2026 ; * src/lread.c (Fload): Add comment. (Bug#72433)
bfb1aee9989 Fix ':defer nil' in 'use-package'
d787817076e Document unsupported color Emoji on OpenBSD
db1f749db55 Fix regressions in Customize caused by 'widget-unselected...
f94d58008eb Avoid inserting extra space in SVG data
292fcd20099 Fix c-ts-common filling function (bug#71760)
e50d597f450 Fix missing type checks before specbind
# Conflicts:
# lisp/progmodes/c-ts-common.el
|
| | |
| |
| |
| |
| | |
* src/androidvfs.c (android_content_name): Hide all
subdirectories when `android_init_gui' is not set.
|
| | |
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (get_large_narrowing_begv, get_large_narrowing_zv)
(get_medium_narrowing_begv, get_medium_narrowing_zv): Use
'ptrdiff_t' instead of 'int', to prevent integer overflow in
large buffers. (Bug#72497)
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes bugs that crashed Emacs when the Lisp interpreter was fed
bad code.
* src/eval.c (FletX, Flet, internal_lisp_condition_case)
(funcall_lambda): Hoist symbol-with-pos elimination and type checks to a
dominating position for efficiency. This also plugs at least two typing
holes. (Mea culpa.)
* test/src/eval-tests.el (eval-bad-specbind): New regression test.
|
| | |
| |
| |
| |
| | |
* src/timefns.c (Fdecode_time): Use 'UNINIT' to avoid a warning with
gcc 14 and checking enabled.
|
| | |
| |
| |
| |
| | |
* src/pdumper.c (dump_interval_node): Call 'dump_field_fixup_later' with
the correct arguments. Discovered by Danny McClanahan.
|
| | | |
|
| | |
| |
| |
| |
| | |
* src/nsterm.m ([EmacsView initFrameFromEmacs:]):
The clipsToBounds property of NSView is only public from macOS 14 on.
|
| | |
| |
| |
| |
| | |
* src/nsterm.m ([EmacsView initFrameFromEmacs:]): Check if
setClipsToBound is available.
|
| | |
| |
| |
| |
| | |
* src/nsterm.m ([EmacsView initFrameFromEmacs:]): Don't check AppKit
version.
|
| | |
| |
| |
| |
| | |
* src/nsterm.m ([EmacsView initFrameFromEmacs:]): Set clipsToBounds to
YES.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/w32font.c: Add commentary about font search on MS-Windows.
(w32font_coverage_ok, add_font_entity_to_list)
(font_supported_scripts): Consider the coverage OK if a font has
only the SIP bit set, but also sets relevant codepage bits in the
CSB bits.
(font_supported_scripts): Fix script for USB bit 99.
* src/font.c (font_parse_fcname, font_parse_family_registry)
[HAVE_NTGUI]: Don't consider hyphenated suffixes of some Windows
fonts as not belonging to the family name.
* src/w32uniscribe.c (uniscribe_check_otf_1): Increase tags[]
array size, to avoid the E_OUTOFMEMORY error for some fonts.
* lisp/international/fontset.el (font-encoding-alist): Add
'unicode-sip'.
|
| |\ \
| |/
| |
| |
| | |
8d073823c61 Revert "Remove redundant byte-swapping boundary"
c25687e860f Fix various typos reported by Pip Cet
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit daefd6771a4879bb8e71ea67f69522700155df01.
* src/sfnt.c (sfnt_read_OS_2_table): Restore realignment after
s_family_class, as it occupies byte 32, not 34. Reported by Pip
Cet <pipcet@protonmail.com>.
|
| | |
| |
| |
| |
| |
| |
| | |
* src/ftfont.c (get_adstyle_property):
* src/sfntfont.c (sfntfont_list_1): Correct typos. Reported by
Pip Cet <pipcet@protonmail.com>.
|
| |\ \
| |/
| |
| |
| | |
e539a5c7d79 NS: Fix placement of candidate window (bug#72422)
94fe5894d99 ; * lisp/touch-screen.el: Correct commentary.
|
| | |
| |
| |
| |
| | |
* src/nsterm.m ([EmacsView firstRectForCharacterRange:actualRange:]):
Call method of NSTextInput.
|
| |\ \
| |/
| |
| |
| | |
ef5466c2675 Avoid aborts when buffer is modified during its redisplay
cb421286d2e Fix c++-ts-mode indentation for templace (bug#72263)
|
| | |
| |
| |
| |
| |
| | |
* src/xdisp.c (redisplay_window): Restore point from saved byte
position only if the buffer was not changed meanwhile.
(Bug#72165)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (display_line): Append space glyphs to margin areas
if the default face is remapped and nothing is written to the
margin area of this screen line.
(produce_special_glyphs): If the truncation/continuation glyphs do
not specify a face, use the remapped default face, not the
original frame-global default face. Reported by Nicolas
P. Rougier <nicolas.rougier@inria.fr> in
https://lists.gnu.org/archive/html/emacs-devel/2024-07/msg01217.html.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The purpose of these changes is to improve the code handling the
display of buffers in windows, switching to previous and next
buffers in windows and restoring a previous state after quitting
or killing buffers. In particular it does:
- Add a new window parameter 'quit-restore-prev' so a window can
keep its initial 'quit-restore' parameter and undoing a sequence
of quit window operations becomes more reliable (Bug#59862).
- Optionally have 'kill-buffer' call 'quit-restore-window' for
all windows showing the argument buffer (Bug#59862).
- Add a new hook so it's possible to avoid that a window gets
deleted implicitly by functions like 'kill-buffer' (Bug#71386).
- Add a new option to make 'quit-restore-window' delete windows
more aggressively (Bug#59862).
- Immediately remove killed buffers from all windows' previous
and next buffers. For windows that are already dead, use a weak
hash table to be used by 'kill-buffer'. This avoids any special
handling of such windows by the garbage collector.
- Immediately remove 'quit-restore' and 'quit-restore-prev'
window parameters that reference killed buffers. These
parameters have no more use once their buffers got killed.
- Make sure that internal windows do not have any previous and
next buffers. This fixes a silly memory leak.
- Make sure that after set_window_buffer and some wset_buffer
calls the buffer now shown in the window does not appear in the
lists of that window's previous and next buffers. The old
behavior could make functions investigating these lists
erroneously believe that there still existed some other buffer
to switch to.
* src/alloc.c (mark_discard_killed_buffers): Remove function.
(mark_window): No more filter previous and next buffer lists.
* src/window.h (struct window): Move up prev_buffers and
next-buffers in structure; they are now treated by the collector
as usual.
* src/window.c (window_discard_buffer_from_alist)
(window_discard_buffer_from_list)
(window_discard_buffer_from_window)
(window_discard_buffer_from_dead_windows)
(Fwindow_discard_buffer): New functions.
(set_window_buffer): Discard BUFFER from WINDOW's previous and
next buffers.
(make_parent_window): Make sure internal windows have no previous
and next buffers.
(make_window): Don't initialize window's previous and next
buffers, they are handled by allocate_window now.
(Fdelete_window_internal): Add WINDOW to window_dead_windows_table.
(Fset_window_configuration): Remove resurrected window from
window_dead_windows_table. Make sure buffers set by wset_buffer
calls are not recorded in window's previous and next buffers.
(delete_all_child_windows): Add deleted windows to
window_dead_windows_table.
(window_dead_windows_table): New weak hash table to record dead
windows that are stored in saved window configurations.
* src/buffer.c (Fkill_buffer): Call new function
'window_discard_buffer_from_dead_windows'.
* lisp/window.el (window-deletable-functions): New hook.
(window-deletable-p): Update doc-string. Run
'window-deletable-functions' (Bug#71386).
(unrecord-window-buffer): New argument ALL. Move body to
'window-discard-buffer-from-window' so that if ALL is non-nil,
WINDOW's 'quit-restore' and 'quit-restore-prev' parameters get
removed too.
(switch-to-prev-buffer): Don't care about killed buffers here;
'replace-buffer-in-windows' should have done that already. Use
'unrecord-window-buffer'.
(switch-to-next-buffer): Don't care about killed buffers here;
'replace-buffer-in-windows' should do that now.
(kill-buffer-quit-windows): New option.
(delete-windows-on): Update doc-string. Handle new option
'kill-buffer-quit-windows'. Update 'unrecord-window-buffer'
calls.
(replace-buffer-in-windows): Update doc-string. Handle new
option 'kill-buffer-quit-windows' (Bug#59862). Update call to
'unrecord-window-buffer'.
(quit-restore-window-no-switch): New option.
(quit-restore-window): Update doc-string. Handle additional
values of BURY-OR-KILL so to not kill a buffer about to be
killed by the caller. Handle 'quit-restore-prev' parameter
(Bug#59862). Handle new option 'quit-restore-window-no-switch'
(Bug#59862).
(quit-windows-on): Update doc-string. Call 'quit-window-hook'
and call 'quit-restore-window' directly so that the buffer does
not get buried or killed by the latter. Update
'unrecord-window-buffer' call.
(display-buffer-record-window): Update doc-string. Handle new
`quit-restore-prev' parameter (Bug#59862).
(switch-to-buffer): Call 'display-buffer-record-window' so a
latter 'quit-restore-window' can use its parameters.
* doc/lispref/windows.texi (Deleting Windows): Describe implicit
deletion of windows and new hook 'window-deletable-functions'.
(Buffers and Windows): Update description of
'replace-buffer-in-windows'. Describe new option
'kill-buffer-quit-windows'.
(Quitting Windows): Describe 'quit-restore-prev' parameter and
new option 'quit-restore-window-no-switch'. Update description
of 'quit-restore-window'.
(Window Parameters): Mention 'quit-restore-prev' parameter.
* etc/NEWS: Add entries for 'window-deletable-functions',
'kill-buffer-quit-windows', 'quit-restore-window-no-switch'.
mention new parameter 'quit-restore-prev' and new argument
values for 'quit-restore-window'.
|
| |\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1154d8aafe2 Better resolve bug#72188
ceb5a152227 MacOS: Let EmacsView implement NSTextInputClient
9f7c1ace9f8 NS: Set frame position when entering/exiting fullscreen (...
74fe889a93f Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
abefd9514bc * lisp/tab-bar.el (tab-bar-move-tab-to-group): Fix for a ...
e09982f8f5a Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
5cf64d8377a Fix sporadic crashes and `select' failures in dumped images
a475360af98 Correct display of Doc View documents after tab switching
b0d927e1dce Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
469bc7c9686 Use 'kill-process' as a fallback when a pipe gets broken ...
158835668df ; * doc/lispref/modes.texi (Mode Line Data): Fix formatting.
|
| | |
| |
| |
| |
| |
| | |
* src/nsterm.h (@interface EmacsView): Implement NSTextInputClient protocol.
* src/nsterm.m: Implement required NSTextInputClient methods, forwarding
to existing NSTextInput methods.
|
| | |
| |
| |
| |
| |
| |
| | |
* src/nsterm.h ([EmacsView adjustEmacsRectRect]): Declare.
* src/nsterm.m ([EmacsView windowDidEnterFullScreen]): New method.
([EmacsView windowDidEnterFullScreen]): Call it.
([EmacsView windowDidExitFullScreen]): Call it.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
* doc/lispref/parsing.texi (Using Parser): Manual entry for the new
variable.
* src/treesit.c (resolve_language_symbol): New function.
(Ftreesit_parser_create, Ftreesit_parser_list): Resolve language before
using it.
(Vtreesit_language_remap_alist): New variable.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When create a parser for the indirect buffer, set the buffer field of
the parser to the indirect buffer, but add the parser to the base
buffer's parser list. This way, all the parsers still get buffer
updates, but indirect buffer's parsers can have different narrowing than
the parsers of the base buffer.
When returning the parser list of a buffer, do filtering and only return
the parser for that buffer.
From user's POV, indirect buffers appear to have their own parser list.
* doc/lispref/parsing.texi (Using Parser): Remove the text describing
indirect buffer's special case.
* src/treesit.c (Ftreesit_parser_create): When create a parser for the
indirect buffer, set the buffer field of the parser to the indirect
buffer, but add the parser to the base buffer's parser list.
(Ftreesit_parser_list): Filter parser list, only return parsers for this
buffer.
xx
|
| |\ \
| |/
| |
| |
| | |
5cf64d8377a Fix sporadic crashes and `select' failures in dumped images
a475360af98 Correct display of Doc View documents after tab switching
|
| | |
| |
| |
| |
| | |
* src/process.c (init_process_emacs) [HAVE_UNEXEC]: Clear
dumped values of child_signal_read_fd and child_signal_write_fd.
|
| | |
| |
| |
| |
| |
| | |
* src/data.c (coerce_marker, not_number_or_marker): New.
(arithcompare): Don't use NUMBERP to check types up-front since we
are going to branch on types anyway.
|