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

47933 commits

Author SHA1 Message Date
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
Eli Zaretskii
86f2d6d62f ; * src/xdisp.c: Improve commentary. (Bug#64596) 2023-07-19 17:54:53 +03:00
Mattias Engdegård
f063f79a49 Convert NUL-containing NSString objects to Lisp strings correctly
This cures the inability to paste text containing NUL from other
applications on macOS, introduced by mistake in 7e3c2b553f
(bug#64697).

* src/nsfns.m ([NSString lispString]): Use make_string instead of
build_string which relies on NUL-termination.
2023-07-18 15:51:37 +02:00
Eli Zaretskii
77f489421e ; * src/xdisp.c: Minor improvements of the commentary. 2023-07-18 14:58:09 +03:00
Eli Zaretskii
d78e670237 ; * src/lisp.h: Improve commentary for XIL, XLI, XLP (bug#64645). 2023-07-15 13:04:41 +03:00
Eli Zaretskii
7ac947f34c ; * src/lisp.h (struct Lisp_Overlay): Update commentary (bug#64580). 2023-07-13 11:33:54 +03:00
Gregory Heytings
8e06809fcc Merge branch 'scratch/bug64391' into emacs-29 2023-07-08 19:30:17 +00:00
Eli Zaretskii
f8a918c977 ; * src/coding.c (Fcoding_system_put): Improve doc string. 2023-07-07 10:29:55 +03:00
Eli Zaretskii
0d90873fa4 ; * src/indent.c (Fvertical_motion): Doc fix. 2023-07-07 09:16:12 +03:00
Gregory Heytings
01fb898420 Simplify after adding internal function to enter a labeled restriction
* src/editfns.c: (Finternal__labeled_narrow_to_region): Merge the
code of Finternal__label_restriction into this function.
(Finternal__label_restriction): Remove this function.
(syms_of_editfns): Remove the 'outermost-restriction' buffer local
variable, which is not used anymore, and the symbol of
'internal--label-restriction'.
(Fwiden): Remove the call to reset the 'outermost-restriction'
buffer local variable.
2023-07-06 17:14:20 +00:00
Gregory Heytings
b741dc7fcd Add internal function to enter a labeled restriction
* src/editfns.c (Finternal__labeled_narrow_to_region): New
function.  A specific function is necessary to avoid unnecessary
slowdowns when 'narrow-to-region'/'widen' are called in a loop.
(Fnarrow_to_region): Remove the call to Fset, which has been moved
into Finternal__labeled_narrow_to_region.
(labeled_narrow_to_region): Use the new function.
(syms_of_editfns): Add the symbol of the new function.

* lisp/subr.el (internal--with-restriction): Use the new function.
2023-07-06 17:14:17 +00:00
Eli Zaretskii
37ed3d15f3 Avoid errors in completion due to 'completion-regexp-list'
* doc/lispref/minibuf.texi (Basic Completion):
* src/minibuf.c (syms_of_minibuf) <completion-regexp-list>:
Document that global non-nil settings of 'completion-regexp-list'
are not safe.

* lisp/minibuffer.el (completion-pcm--merge-completions): Avoid
errors in 'try-completion' when PREFIX is nil.  (Bug#64351)
2023-07-02 09:16:58 +03:00
Yuan Fu
02b6be892f
Add missing calls to treesit_record_change in editfns.c
These should be all that are missing.  See the next commit for detail.

* src/editfns.c (Ftranslate_region_internal):
(Ftranspose_regions): Call treesit_record_change.
2023-06-29 11:15:29 -07:00
Yuan Fu
e982192e93
Call treesit_record_change in subst-char-in-region (bug#64329)
* src/editfns.c (Fsubst_char_in_region): Call treesit_record_change in
the else branch.
2023-06-29 11:15:29 -07:00
Eli Zaretskii
fa06249a9f Fix "C-x RET r" when the new encoding is UTF
* src/fileio.c (Finsert_file_contents): Update point of
'conversion_buffer' before decoding the last block.  (Bug#64253)
2023-06-24 11:49:14 +03:00
Eli Zaretskii
e962cf4ba7 Fix building --with-native-compilation=aot from release tarball
* lisp/Makefile.in (%.eln): Pattern rule for AOT native
compilation.
(compile-eln-targets, compile-eln-aot): New targets for AOT native
compilation.

* src/Makefile.in (../native-lisp): If NATIVE_COMPILATION_AOT is
set, also native-compile all the other Lisp files.
(Bug#64167)
2023-06-22 14:03:17 +03:00
Alan Mackenzie
4ca371e9cc Fix bug#64152 (Minibuffer sometimes goes "modal")
In particular, when a frame has no minibuffer and is using that
of a different "normal" frame, C-x 5 o, etc., and GUI
operations fail.

Fix by partially reverting the commit from 2022-07-07 15:38:09
+0000 "Remove obscure, obsolete code from do_switch_frame".  As
a consequent change, also revert the commit from 2022-07-08
20:19:03 +0000 "Remove now unused parameter TRACK from
do_switch_frame".

* src/frame.c (do_switch_frame): Restore the TRACK parameter.
Restore the code which redirects the frame focus when a new
frame gets selected.

* src/frame.c (Fselect_frame, Fhandle_switch_frame)
(delete_frame)
* src/keyboard.c (quit_throw_to_read_char)
* src/lisp.h (do_switch_frame prototype)
* src/minibuf.c (read_minibuf_unwind)
* src/window.c (Fset_window_configuration): Restore the TRACK
argument to do_switch_frame.

* src/xterm.c (x_try_restore_frame): Add a zero TRACK argument
to do_switch_frame.
2023-06-21 14:23:14 +00:00
Alan Mackenzie
90c03ffcd4 After minibuffer action, don't make the minibuffer current
This fixes bug#63967.

* src/minibuf.c (minibuffer_unwind): After restoring the next
minibuffer outwards to the mini window (when
enable-recursive-minibuffers is non-nil), don't call
Fset_frame_selected_window, which used to set the current
window to be the mini window.
2023-06-17 16:14:14 +00:00
Po Lu
c835758238 ; * src/lread.c (bytecode_from_rev_list): Avoid C++ comment. 2023-06-14 13:54:53 +08:00
Gregory Heytings
8225ade615 ; * src/xdisp.c (syms_of_xdisp) <display-line-numbers>: Fix typo 2023-06-13 13:12:55 +00:00
Michael Albinus
1383efe01d Fix setting $DBUS_SESSION_BUS_ADDRESS after Emacs has started
* doc/misc/dbus.texi (Alternative Buses): Explain using
$DBUS_SESSION_BUS_ADDRESS after Emacs has started.

* src/dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Use egetenv.
2023-06-12 12:45:38 +02:00
Eli Zaretskii
9855a3ea74 ; * src/xdisp.c (redisplay_tool_bar): Fix a typo in a comment. 2023-06-09 19:19:07 +03:00
Andrea Corallo
65f355ea0a ; Update my mail address
* lisp/emacs-lisp/comp-cstr.el: Update author mail.
* lisp/emacs-lisp/comp.el: Likewise.
* src/comp.c: Likewise.
* test/lisp/emacs-lisp/comp-cstr-tests.el: Likewise.
* test/src/comp-resources/comp-test-funcs-dyn.el: Likewise.
* test/src/comp-resources/comp-test-funcs.el: Likewise.
* test/src/comp-resources/comp-test-pure.el: Likewise.
* test/src/comp-tests.el: Likewise.
2023-06-08 11:04:10 +02:00
Eli Zaretskii
95ee5477e1 ; * src/lread.c (read0, skip_lazy_string): Fix commentary again. 2023-05-26 15:11:35 +03:00
Eli Zaretskii
f42de74ebe ; * src/lread.c (read0, skip_lazy_string): Fix commentary wording. 2023-05-26 12:30:40 +03:00
Mattias Engdegård
f535c0e49d Handle #@00 in new reader in a compatible way (bug#63722)
This was a regression from Emacs 28.

* src/lread.c (skip_lazy_string, read0): Make #@00 read as nil, which
is a quirk from the old reader that we preserve for compatibility.
* test/src/lread-tests.el (lread-skip-to-eof): Verify it.

Reported by Richard Newton.
2023-05-26 10:22:51 +02:00
Po Lu
4205268675 Don't mark selection request events
* src/pgtkterm.c (mark_pgtkterm): Prevent crash by not marking
selection request events, which don't have Lisp_Object members.
2023-05-26 08:43:18 +08:00
Eli Zaretskii
d292d28229 Fix rare crashes in 'try_window_reusing_current_matrix'
* src/xdisp.c (try_window_reusing_current_matrix): Make sure we
never use a mode-line glyph row to start displaying scrolled-in
rows.  (Bug#63711)
2023-05-25 20:50:46 +03:00
Eli Zaretskii
765edc204d ; Support SQLite3 extensions on macOS
* src/sqlite.c (Fsqlite_load_extension): Support *.dylib
extensions.  (Bug#63653)
2023-05-23 17:53:07 +03:00