Commit graph

47961 commits

Author SHA1 Message Date
Po Lu
d9e1605122 Correctly register focus events concomitant with alpha changes
* src/xterm.c (x_frame_highlight, x_frame_unhighlight): Skip
changing the frame alpha when the frame is not eligible for
focus state-specific alpha values; otherwise, the alpha might be
reset by the time a alpha change wrought by a focus change
arrives, impeding handle_one_xevent from subsequently restoring
the initial value.  (bug#66398)
2023-10-17 08:33:25 +08:00
Eli Zaretskii
8f23a02a9e Fix updating process-mark position in 'set-process-buffer'
* src/process.c (update_process_mark): Update marker position only
if P's process-mark is not already associated with P's buffer.
(Bug#66313)
2023-10-07 17:58:54 +03:00
Eli Zaretskii
1594d5f17a Fix setting the pipe capacity for subprocesses
* src/process.c (create_process) [F_SETPIPE_SZ]: Set the pipe
capacity only if the required read-process-max is larger than the
default capacity of the pipe.  (Bug#66288)
2023-10-06 08:31:59 +03:00
Gerd Möllmann
aad8b5d78f Handle LANG on macOS differently (bug#65908)
* src/nsterm.m (ns_init_locale): If LANG is set, try to use that,
otherwise try to deduce what LANG should be.  Check is the result is
valid, and use LANG="en_US.UTF-8" if not.
2023-10-05 20:41:54 +02:00
Stefan Kangas
fa0d3f45ae ; Improve wording of last change
* doc/emacs/macos.texi (Mac / GNUstep Customization):
* src/nsfns.m (syms_of_nsfns): Improve wording.
Reported by Gerd Möllmann <gerd.moellmann@gmail.com>.
2023-10-01 18:27:11 +02:00
Stefan Kangas
3ef259e28a Improve documentation of ns-use-proxy-icon
* doc/emacs/macos.texi (Mac / GNUstep Customization):
* src/nsfns.m (syms_of_nsfns): Fix documentation of
'ns-use-proxy-icon'; explain what it does and how it's
used.  (Bug#66190)
2023-10-01 15:37:06 +02:00
Eli Zaretskii
d210d761b1 ; Fix doc strings of overlay-arrow variables
* src/xdisp.c (syms_of_xdisp) <overlay-arrow-string>
<overlay-arrow-variable-list>: Doc fixes.  (Bug#66282)
2023-10-01 08:08:03 +03:00
Eshel Yaron
a4185f87bd ; Silence macOS 14 warning
* src/nsterm.m: Implement 'applicationSupportsSecureRestorableState'
to silence warning on macOS 14.  (Bug#66245)
2023-09-29 13:32:55 +02:00
Eli Zaretskii
809305e6d8 Fix 'window-text-pixel-size' when there are several images at START
* src/xdisp.c (window_text_pixel_size): Remove unnecessary call to
'move_it_to'.  (Bug#65899)  (Bug#54862)
2023-09-14 12:52:14 +03:00
Stefan Monnier
0065621d0d (report_overlay_modification): Fix bug#65929
Somehow the new overlay code in Emacs-29 changed slightly
the test to decide when to run the `modification-hooks` of overlays,
with the consequence that these hook functions end up being executed
also when text is deleted right after an empty overlay, which is
contrary to Emacs-28 behavior as well as contrary to the Texinfo doc.

* src/buffer.c (report_overlay_modification): Better reproduce the
Emacs-28 code.

* test/src/buffer-tests.el (overlay-modification-hooks):
Add corresponding test.
2023-09-13 18:49:55 -04:00
Alan Third
6cc6455e93 Fix SVG colors (bug#56182)
* src/image.c (svg_load_image): Reverse the R and B bytes in the
Windows colors before using them to generate the SVG.
2023-09-13 20:19:44 +01:00
Yuan Fu
33ee3e588f
Fix regression of treesit_cursor_helper_1
* src/treesit.c (treesit_cursor_helper_1)
(treesit_cursor_first_child_for_byte): Use
ts_tree_cursor_goto_first_child_for_byte first, and
ts_tree_cursor_goto_first_child second.
2023-09-11 12:50:31 -07:00
Eli Zaretskii
3f04efe9e7 ; * src/font.h (struct font): Comment about use of average_width. 2023-09-10 18:31:06 +03:00
Philipp Stephani
1a668cda8b Unbreak builds with CHECK_STRUCTS.
* src/pdumper.c (dump_buffer): Fix hash for 'struct buffer'.  The
recent changes to that structure where commits
8f3091defb and
0bd4661941, both of which just affected
comments.
2023-09-07 11:33:37 +02:00
Daniel Martín
1458daf316 Avoid crashes on macOS with context menus
* src/nsmenu.m ([EmacsMenu menuNeedsUpdate:]): Avoid crashes with
context menus.  (Bug#63495)
2023-09-07 08:21:38 +03:00
Stefan Monnier
6fad73d7cc * src/regex-emacs.c (mutually_exclusive_p): Fix inf-loop (bug#65726) 2023-09-04 13:11:31 -04:00
Stefan Kangas
3550f44c17 ; Fix typos 2023-09-02 18:57:11 +02:00
Stefan Kangas
0bd4661941 Doc fixes for obsolete functions and variables
* admin/notes/multi-tty:
* doc/emacs/building.texi (Debugger Operation):
* doc/misc/efaq-w32.texi (Line ends by file system):
* doc/misc/gnus.texi (Hashcash):
* lisp/emacs-lisp/eieio.el (eieio-class-parents)
(eieio-class-children):
* lisp/progmodes/perl-mode.el:
* lisp/textmodes/ispell.el (ispell-lookup-words):
* src/buffer.h: Update or delete references to variables and functions
made obsolete in Emacs 24.4.
2023-09-02 15:37:08 +02:00
Eli Zaretskii
5cbe96d17f ; Improve documentation of 'char-table-range'
* doc/lispref/sequences.texi (Char-Tables):
* src/chartab.c (Fchar_table_range): Clarify what
'char-table-range' returns for an argument that is a cons cell.
2023-09-01 16:33:40 +03:00
Yuan Fu
18b292140e
; * src/treesit.c: Add ts function boilerplate 2023-08-31 16:00:54 -07:00
Yuan Fu
ec4d29c449
Improve performance of treesit_cursor_helper_1
* src/treesit.c: (treesit_cursor_helper_1): Use
ts_tree_cursor_goto_first_child_for_byte to speed up traversing among
siblings.  The "while (ts_node_end_byte (cursor_node) < end_pos)" can
be removed with the check added in the loop below.
2023-08-30 20:53:03 -07:00
Po Lu
de335cb3dc ; Effect a safer version of that fix for Emacs 29
* src/haikuterm.c (haiku_draw_stretch_glyph_string): Use
computed X value, as on X.

Do not merge to master.
2023-08-27 10:22:46 +08:00
Po Lu
a6cb8e3a1f Repair bug#65068 on Emacs 29
* src/xterm.c (x_term_init): Disable ControlFallback library
control wherever present.  (bug#65068)

Do not merge to master.
2023-08-26 18:12:24 +08:00
Eli Zaretskii
f3fa436bc0 ; Fix doc string of 'current-idle-time'
* src/keyboard.c (Fcurrent_idle_time): Doc fix (bug#65512).
2023-08-25 08:53:21 +03:00
Eli Zaretskii
781ddd7e7d Fix touchpad scrolling on MS-Windows
* src/w32term.c (w32_construct_mouse_wheel): The number of lines
to scroll should always be positive in wheel-scroll events.
Whether to scroll up or down is encoded in the modifiers, which
produce either wheel-up or wheel-down event.  (Bug#65070)

* doc/lispref/commands.texi (Misc Events): Clarify the
documentation of 'wheel-up' and 'wheel-down' events.
2023-08-19 17:01:18 +03:00
Eli Zaretskii
f6ebd1ef0d ; * src/treesit.c (Ftreesit_node_parent): Improve commentary. 2023-08-18 09:19:59 +03:00
Eli Zaretskii
636fb267c4 Improve documentation of case transfer in replacement commands
* doc/emacs/search.texi (Replacement and Lax Matches):
* src/search.c (Freplace_match):
* lisp/replace.el (query-replace, query-replace-regexp): Clarify
in the doc string and the manual how letter-case is transferred
from the replaced text to the replacement text.  (Bug#65347)
2023-08-17 10:07:48 +03:00
Eli Zaretskii
a8c8a4e368 ; * src/fns.c (Fcopy_sequence): Doc fix. (Bug#64960) 2023-08-16 15:42:24 +03:00
Eli Zaretskii
8dbd5aa1ee Avoid crashes in 'display_count_lines' when current buffer was killed
* src/xdisp.c (Fformat_mode_line):
* src/fns.c (Fline_number_at_pos): Don't allow to count lines in a
dead buffer.  (Bug#65060)
2023-08-12 15:06:48 +03:00
Eli Zaretskii
03e897c08f Fix rare crashes in redisplay due to problems with fontsets
* src/xdisp.c (get_next_display_element): If we have no usable
face to display a character/composition, treat that as glyphless.
(produce_glyphless_glyph): If neither it->face nor its ASCII face
are usable, fall back to the frame's default font.  (Bug#65198)
2023-08-12 09:38:28 +03:00
Eli Zaretskii
063d7d89d7 Fix the -x switch in non-X builds
* src/emacs.c (main): Move the handling of the -x switch out of
the HAVE_X_WINDOWS condition, and simplify the rest of the code by
avoiding code duplication in HAVE_X_WINDOWS and !HAVE_X_WINDOWS
cases.  (Bug#65048)
2023-08-10 10:50:35 +03:00
Po Lu
4767f5eaee Better fix for bug#65156
* src/fileio.c (Finsert_file_contents): Correct seek-ability
test, since lseek returns -1 upon failure.  (Bug#65156)
2023-08-09 10:49:44 +08:00
Eli Zaretskii
dd1d8414b3 Fix insert-file-contents with pipes and /dev/stdin
* src/fileio.c (Finsert_file_contents): Restore logic of
non-regular but seekable files.  (Bug#65156)
2023-08-08 22:18:46 +03:00
Po Lu
f4acae842c Fix bug#65042
* src/pgtkterm.c (fill_background_by_face): Respect the frame's
background alpha property.
2023-08-08 09:02:10 +08:00
Eli Zaretskii
acfcf7f369 Fix "Paste from Kill Menu" in non X toolkit builds
* src/keymap.c (possibly_translate_key_sequence): Don't signal an
error if 'key-valid-p' returns nil.  Suggested by Stefan Monnier
<monnier@iro.umontreal.ca>. (Bug#64927)
2023-08-04 09:36:45 +03:00
Stefan Kangas
d005b2c89c Fix link to info node in prin1 docstring
* src/print.c (Fprin1): Fix linking to info node in docstring.

(cherry picked from commit 4b73edb8d1)
2023-08-03 10:33:02 +03:00
Amritpal Singh
608a8757d9 Support files compressed by 'pigz'
* src/decompress.c (md5_gz_stream): Check 'stream.avail_in' as
well.  (Bug#63832)

Copyright-paperwork-exempt: yes
(cherry picked from commit 46b6d17505)
2023-08-01 13:23:04 +02:00
Eli Zaretskii
735f3700f6 ; * src/character.c (Fstring_width): Fix last change. 2023-07-30 22:09:05 +03:00
Eli Zaretskii
bf83fdba9e ; * src/character.c (Fstring_width, Fchar_width): Doc fixes. 2023-07-30 20:10:54 +03:00
Po Lu
7b9e83d3cf Fix bug#64923
* src/xfns.c (Fx_create_frame): Prevent cairo surface from being
left without a desired size.  (bug#64923)
2023-07-30 21:18:54 +08:00
Eli Zaretskii
71419a60c3 Avoid crashes due to invalid 'mode-line-format'
* src/xdisp.c (display_mode_element, redisplay_window_error):
Don't take XCAR of what can be Qnil.  (Bug#64893)

(cherry picked from commit 7ea3f39dee)
2023-07-30 10:24:10 +03:00
Eli Zaretskii
d13029cdcd Avoid crashes under 'which-key-mode'
* src/keyboard.c (Fthis_single_command_keys): Don't allow calls to
Fvector with negative first argument.  (Bug#64857)

(cherry picked from commit 65834b8f8d)
2023-07-30 10:23:05 +03:00
Eli Zaretskii
cb1f7db249 ; Minor documentation fixes
* src/character.c (Fstring_width): Doc fix.

* doc/emacs/trouble.texi (Understanding Bug Reporting): Fix typo
(bug#64854).

(cherry picked from commit f6e4e77d23)
2023-07-30 10:22:42 +03:00
Eli Zaretskii
42a9962794 ; Improve documentation of 'last-command-event'
* doc/lispref/text.texi (Commands for Insertion):
* doc/lispref/commands.texi (Command Loop Info):
* src/cmds.c (syms_of_cmds) <post-self-insert-hook>: Improve the
documentation of 'last-command-event' and 'post-self-insert-hook'.
2023-07-22 09:34:15 +03:00
Philipp Stephani
6152a41190 Unbreak build with CHECK_STRUCTS.
The hash for the Lisp_Overlay structure has changed due to the (comment-only)
commit 7ac947f34c.

* src/pdumper.c (dump_overlay): Update struct hash.
2023-07-21 18:22:34 +02:00
Mattias Engdegård
c692bbc659 Revert "Improve commentary in nsfns.m"
This reverts commit 3af27a4b81,
because it missed the point completely.
Please talk to the original author next time.
2023-07-21 14:49:35 +02:00
Eli Zaretskii
bb885928d7 Fix NetBSD build --with-sound
* src/sound.c (alsa_write): Use ESTRPIPE only if defined.
(Bug#64698)
2023-07-20 19:09:42 +03:00
Eli Zaretskii
4bd8e8c6d2 ; * src/xdisp.c: Fix wording in commentary. 2023-07-20 13:23:01 +03:00
Po Lu
3af27a4b81 Improve commentary in nsfns.m
* src/nsfns.m (lispString): Avoid C++ comment and make the
commentary actually relevant to the reason `make_string' is
used.
2023-07-20 16:01:34 +08:00
Eli Zaretskii
9d93c6ba14 ; * src/xdisp.c: Fix typos in the commentary. 2023-07-19 19:28:48 +03:00