1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-27 07:41:28 -08:00
Commit graph

44555 commits

Author SHA1 Message Date
Eli Zaretskii
25dc0d1de6 ; Another protection from out-of-bounds access to it->stack[]. 2021-12-05 18:03:40 +02:00
Eli Zaretskii
509dec902c Fix out-of-bounds access in xdisp.c
* src/xdisp.c (produce_stretch_glyph): Avoid indexing it->stack
with a negative index.  Reported by Po Lu <luangruo@yahoo.com>.
2021-12-05 17:34:05 +02:00
Stefan Kangas
520a703fa7 Merge from origin/emacs-28
c086358574 Update to Org 9.5.1-15-gdb4805
fef3e60061 * lisp/emacs-lisp/edebug.el (edebug-eval-defun): Minor doc...
a1e30e4106 ; Fix most remaining AUTHORS warnings
f3e6a432c5 ; * doc/misc/efaq.texi (New in Emacs 28): Add more news.
00236cc802 Fix the enumeration values returned by 'try_scrolling'
2021-12-05 06:30:35 +01:00
Eli Zaretskii
aa6681a51a Fix the MinGW build broken by recent changes in image.c
* src/image.c (rsvg_handle_get_intrinsic_size_in_pixels)
[WINDOWSNT]: Fix prototype.  (Bug#44655)
2021-12-04 13:42:25 +02:00
Alan Third
796075ef7e Make use of Trash on macOS (bug#21340)
* src/nsfns.m (Fsystem_move_file_to_trash): New function.
2021-12-04 10:44:54 +00:00
Eli Zaretskii
3e7aff5fcd Yet another place inside redisplay_window to prevent quitting
* src/xdisp.c (handle_single_display_spec): Inhibit quitting
around the call to 'lookup_derived_face' (which can QUIT).
(Bug#44448)
2021-12-04 10:37:40 +02:00
Eli Zaretskii
00236cc802 Fix the enumeration values returned by 'try_scrolling'
* src/xdisp.c (try_scrolling): Make the enum values match the
commentary.  Reported by Po Lu <luangruo@yahoo.com>.
2021-12-04 10:19:56 +02:00
Stefan Kangas
d82cfbc0e9 Merge from origin/emacs-28
745a732ae4 ; Further author fixes in authors.el
bef17bca21 * src/dosfns.c (Fint86): Doc fix; don't use obsolete names.
bc55dc04af * doc/misc/erc.texi (Keystroke Summary): Fix doc for TAB.
ef4d216eb3 Remove reference to variable obsolete since 24.1
7282e492d5 * doc/misc/efaq.texi (New in Emacs 28): New node.
eafcccd38f ; FAQ: Normalize references to the NEWS.NN file
c006c490eb ; * doc/misc/efaq.texi (Latest version of Emacs): Update v...
9fbc4fa0e7 Add Tramp version integrated in Emacs 28.1
2021-12-04 06:30:32 +01:00
Stefan Kangas
ab828569ab Merge from origin/emacs-28
5d6f828799 Unbreak build after 9c222b9c1a.
2021-12-04 06:30:32 +01:00
Stefan Kangas
bef17bca21 * src/dosfns.c (Fint86): Doc fix; don't use obsolete names. 2021-12-04 01:00:11 +01:00
Paul Eggert
1e2bc1bbf4 Port to Tiny C on x86-64
This allows Emacs to build on Ubuntu 21.10 x86-64 with
‘./configure --without-modules CC=tcc’.
* configure.ac (GC_SETJMP_WORKS):
Accept __x86_64__ as an alias for __amd64__.
* src/lisp.h (alignas): Provide a no-op substitute.
2021-12-03 13:09:34 -08:00
Paul Eggert
5586eb463f Prefer rsvg_handle_get_intrinsic_size_in_pixels
Use rsvg_handle_get_intrinsic_size_in_pixels if available,
as this is simpler and better than what we were doing.
From a comment by by Alan Third (Bug#44655#56).
* src/image.c (init_svg_functions): Arrange for the new function.
(svg_load_image): Prefer the results of
rsvg_handle_get_intrinsic_size_in_pixels if available.
2021-12-03 10:25:09 -08:00
Paul Eggert
bcb4651c41 Improve overflow checking in svg_load_image
* src/image.c: Include math.h, for lrint.
(scale_image_size, compute_image_size): Use ‘double’, not ‘int’
for image size args, since librsvg uses ‘double’ for pixel counts.
(scale_image_size): Use ceil instead of rounding, to avoid
discarding fractional SVG pixels.  Divisor and multiplier are now
double instead of int, for better portability to librsvg
functions with fractional pixel sizes.
(image_get_dimension, compute_image_size, svg_load_image):
Be more careful about ignoring, rejecting or clipping scale
factors or sizes that are out of integer range.
(compute_image_size): Don’t bother to calculate :max-width if
:width is specified, and likewise for :max-height and :height.
2021-12-03 10:25:09 -08:00
Paul Eggert
02386da938 Simplify svg_load_image
* src/image.c (svg_load_image): Simplify slightly.
2021-12-03 10:25:09 -08:00
Paul Eggert
19ac237c9e More-robust svg_load_image fallback
Suggested by Alan Third (Bug#44655#56).
* src/image.c (svg_load_image): Fall back on
rsvg_handle_get_geometry_for_layer if the
rsvg_handle_get_intrinsic_dimensions computations yielded unusable
viewbox width and height, instead of falling back only if
rsvg_handle_get_intrinsic_dimensions did not report image width
and height, or did not report a viewbox.
2021-12-03 10:25:09 -08:00
Philipp Stephani
5d6f828799 Unbreak build after 9c222b9c1a.
* src/pdumper.c (dump_subr): Fix Lisp_Subr hash value.
2021-12-03 09:40:15 +01:00
Eli Zaretskii
1431fce67f Revert "Support display of non-ASCII characters with aligned columns"
This reverts commit 608267c71e.
2021-12-03 10:02:46 +02:00
Po Lu
ba063f8141 Send scroll stop events to xwidgets when built with XInput 2
* src/xwidget.c (xwidget_scroll): Set xg_event->scroll.is_stop
when appropriate.
2021-12-03 14:31:20 +08:00
Stefan Kangas
c66eb52453 Merge from origin/emacs-28
9c222b9c1a Port to C compilers that lack size-0 arrays
fed35a8951 Port emacsclient to Solaris 10
f35d6a9c73 * CONTRIBUTE: Improve commit message instructions
e0ee1d003a Work around IBM XL C compiler bug
6b99b6eb8b * admin/make-tarball.txt: Various clarifications.
bbf4140091 * admin/diff-tar-files: Don't assume .tar.gz.
0a50ad11db * lisp/tab-bar.el (tab-bar-close-other-tabs): Fix regression.
2021-12-03 06:30:26 +01:00
Paul Eggert
9c222b9c1a Port to C compilers that lack size-0 arrays
The C standard does not allow size-zero arrays, so redo struct
Lisp_Subr to not use size-zero arrays when native compilation is
not being used.  Formerly, the code was using size-zero arrays (a
GNU C extension) to avoid using memory unnecessarily when
HAVE_NATIVE_COMP is not defined.  Replace this hack with the
more-traditional hack of putting the relevant members inside
‘#ifdef HAVE_NATIVE_COMP’.
* src/alloc.c (cleanup_vector, mark_object):
* src/comp.c (make_subr):
* src/data.c (Fsubr_native_lambda_list, Fsubr_native_comp_unit):
* src/eval.c (init_eval_once, funcall_lambda):
* src/lisp.h (SUBR_NATIVE_COMPILEDP, SUBR_NATIVE_COMPILED_DYNP)
(SUBR_TYPE):
* src/lread.c (Fload):
Conditionally compile with ‘#ifdef HAVE_NATIVE_COMP’ instead of
with ‘if (NATIVE_COMP_FLAG)’.  Redo members like native_comp_u[0]
to be plain native_comp_u.  Put all uses of these members inside
‘#ifdef HAVE_NATIVE_COMP’.
* src/lisp.h (struct Lisp_Subr): Members native_comp_u,
native_c_name, lambda_list, type are now all ifdeffed out if
HAVE_NATIVE_COMP is not defined, instead of being size-zero
arrays.  All uses changed.
* src/pdumper.c (dump_subr, dump_cold_native_subr)
(dump_do_dump_relocation):
* src/comp.h (NATIVE_COMP_FLAG): Remove; no longer needed.
2021-12-02 19:03:14 -08:00
Paul Eggert
e0ee1d003a Work around IBM XL C compiler bug
* src/fileio.c (Fcopy_file): Work around a compiler bug in IBM XL
C for AIX, V12.1 (5765-J02, 5725-C72).  Without this patch, the
compiler incorrectly complains “Initialization between types "int"
and "struct timespec" is not allowed” and “Initialization between
types "long" and "struct timespec" is not allowed”.
2021-12-02 18:20:05 -08:00
Eli Zaretskii
8203c2cd30 ; * src/xdisp.c (syms_of_xdisp) <align-columns-display>: Doc fix. 2021-12-02 19:46:26 +02:00
Eli Zaretskii
608267c71e Support display of non-ASCII characters with aligned columns
* src/xdisp.c (get_normal_width): New function.
(gui_produce_glyphs): Use 'get_normal_width' to widen on display
characters whose width is not an integral multiple of the
"standard" width.
(syms_of_xdisp) <align-columns-display>: New boolean variable.
2021-12-02 19:44:46 +02:00
Lars Ingebrigtsen
a516ab79c3 Add a new variable 'process-error-pause-time'
* doc/lispref/processes.texi (Asynchronous Processes): Document it.
* lisp/cus-start.el (standard): Customize.

* src/process.c (read_process_output_error_handler)
(exec_sentinel_error_handler): Use it.
(syms_of_process): New variable process-error-pause-time (bug#19457).
2021-12-02 13:21:53 +01:00
Po Lu
603bdc8d38 Add some primitive momentum-based precision scrolling
The algorithm used to scroll the display kinetically is very
simple and needs improvement.  Someone should work on that
eventually.

* lisp/pixel-scroll.el (pixel-scroll-precision-use-momentum):
New user option.
(pixel-scroll-precision-mode-map): Add
`pixel-scroll-start-momentum'.
(pixel-scroll-kinetic-state):
(pixel-scroll-accumulate-velocity):
(pixel-scroll-calculate-velocity): New functions.
(pixel-scroll-start-momentum): New command.

* src/xterm.c (handle_one_xevent): Fix touch-end event
generation.
2021-12-02 11:01:59 +08:00
Po Lu
5001f4f91b Add `touch-end' event type
* etc/NEWS:
* doc/lispref/commands.texi (Misc Events): Document new
`touch-end' event type.

* lisp/bindings.el: Ignore touch-end events by default.

* src/keyboard.c (make_lispy_event): Add support for
TOUCH_END_EVENT events.
(syms_of_keyboard): New symbol `touch-end'.

* src/termhooks.h (enum event_kind): New member
`TOUCH_END_EVENT'.

* src/xterm.c (handle_one_xevent): Send touch-end events when
appropriate.
2021-12-02 10:27:24 +08:00
Eli Zaretskii
ddaedb1910 ; * src/w32term.c (w32_construct_mouse_wheel): Fix a typo. 2021-12-01 15:57:59 +02:00
Eli Zaretskii
bab2969404 Support precision mouse scrolling on MS-Windows
* src/w32fns.c (w32_wnd_proc): Pass the WM_SETTINGCHANGE message
to the Lisp thread.
* src/w32term.c (w32_construct_mouse_wheel): Support mice with
precision scrolling wheel.
(w32_get_mouse_wheel_vertical_delta): New function.
(w32_read_socket): When the WM_SETTINGCHANGE is received, call
'w32_get_mouse_wheel_vertical_delta'.
(w32_initialize): Call 'w32_get_mouse_wheel_vertical_delta' at
startup.
* src/nsterm.m (syms_of_nsterm):
* src/haikuterm.c (syms_of_haikuterm):
* src/xterm.c (syms_of_xterm): Remove window-system specific
variables for coalescing mwheel events.
* src/keyboard.c (syms_of_keyboard)
<mwheel-coalesce-scroll-events>: New variable, to replace the
above platform-specific ones.

* doc/lispref/commands.texi (Misc Events): Improve wording of the
description of mouse-wheel events.
2021-12-01 15:36:55 +02:00
Stefan Kangas
93d9bc09f4 Merge from origin/emacs-28
e632b83a28 Update authors.el for Emacs 28
e9fdb11903 ; * ChangeLog.3: Some additional fixes.
8fa4749df1 ; * ChangeLog.3: Filename fixes.
ea5a90b4f4 * lisp/repeat.el: Fix long-standing problem when a random ...
ef4954b69c * lisp/repeat.el (repeat-keep-prefix): Change default to nil.
6d5886e780 * test/lisp/repeat-tests.el (repeat-tests-call-b): Test fo...
9e16c6a96d ; * src/comp.c (syms_of_comp) <comp-no-native-file-h>: Doc...
9aa8fd6e62 * src/callint.c (Fcall_interactively): Fix inhibit_mouse_e...
70c229b1fc Fix regression in gdb-frame-handler
cd9dd26d24 Format and index concept 'predicate' in ELisp Intro
ab291656d0 ; * ChangeLog.3: Fix typos.
354f6c5609 ; * ChangeLog.3: Formatting fixes.
6192525a96 ; make change-history-commit
2021-12-01 06:30:22 +01:00
Eli Zaretskii
9e16c6a96d ; * src/comp.c (syms_of_comp) <comp-no-native-file-h>: Doc fix. 2021-11-30 20:23:47 +02:00
Eli Zaretskii
bf299b7d2f ; * src/comp.c (syms_of_comp): Fix first lines of doc strings. 2021-11-30 20:16:25 +02:00
Juri Linkov
9aa8fd6e62 * src/callint.c (Fcall_interactively): Fix inhibit_mouse_event_check.
Don't search for the next mouse event with parameters
when inhibit-mouse-event-check is non-nil (bug#50067).
2021-11-30 20:12:06 +02:00
Andrea Corallo
9b381a95ef Improve native compiler startup circular dependecy prevention mechanism
* src/comp.c (maybe_defer_native_compilation): Update to accumulate
delayed objects in `comp--delayed-sources'.
(syms_of_comp): Add `comp--delayed-sources' and `comp--loadable'
vars.

* lisp/startup.el (startup--honor-delayed-native-compilations): New
function.
(normal-top-level): Call it.
2021-11-30 15:42:41 +01:00
Po Lu
5cab2684c0 * src/nsterm.m (Vns_scroll_event_delta_factor): Fix doc string. 2021-11-30 21:10:36 +08:00
Po Lu
f3bb2b80b4 Add `ns-scroll-event-delta-factor'
* src/nsterm.m (- mouseDown): Take delta factor into account.
(Vns_scroll_event_delta_factor): New variable.

* lisp/cus-start.el: Add option.
2021-11-30 13:41:16 +08:00
Po Lu
a59deef359 Allow non-float values in x-scroll-event-delta-factor
* src/xterm.c (handle_one_xevent): Use XFLOATINT instead of
XFLOAT_DATA.
2021-11-30 09:46:25 +08:00
Alan Third
50379fb78d Fix build on macOS
* src/nsterm.h (NSPasteboardTypeMultipleTextSelection):
(NSPasteboardTypePNG): These are already defined on macOS 10.6 and
above and aren't used at all in GNUstep.
2021-11-29 22:11:04 +00:00
Alan Third
67676bb5a0 Fix NS port text decorations (bug#52156)
* src/nsterm.m (ns_draw_text_decoration): Set the correct colors for
decorations other than underline.
(ns_draw_glyph_string): Remove superfluous color setting call.
2021-11-29 21:58:42 +00:00
Andreas Schwab
de9d27f679 Avoid undefined behaviour when copying part of structure
* src/dispnew.c (copy_row_except_pointers): Don't use address of
subobject as starting point.

(cherry picked from commit 6943786b5c)
2021-11-29 14:45:40 +02:00
Andreas Schwab
6943786b5c Avoid undefined behaviour when copying part of structure
* src/dispnew.c (copy_row_except_pointers): Don't use address of
subobject as starting point.
2021-11-29 10:30:10 +01:00
Po Lu
618070d4b4 Allow customizing the pixel delta of wheel events on X
* lisp/cus-start.el: Add `x-scroll-event-delta-factor'.
* src/xterm.c (handle_one_xevent): Apply scroll event
delta factor to wheel events with pixel data.
(Vx_scroll_event_delta_factor): New user option.
2021-11-29 15:37:41 +08:00
Po Lu
a1aa9cbf57 Make overhangs in ftcrfont work on Haiku
* src/ftcrfont.c (ftcrfont_draw): Dump left overhang clipping
on Haiku and always set `background_filled_p'.
2021-11-29 07:12:25 +00:00
Stefan Kangas
d648874110 Merge from origin/emacs-28
c4daff9cf8 * Makefile.in (PREFERRED_BRANCH): Now emacs-28.
bca57086be ; Remove an obsolete comment
455b64c336 * src/coding.c (Fdecode_coding_region, Fencode_coding_regi...
2021-11-29 07:00:25 +01:00
Po Lu
390361cb24 Update XKB map on MappingNotify
* src/xterm.c (handle_one_xevent): Update XKB map when X
tells us the keyboard map has been updated.
2021-11-29 12:39:16 +08:00
Karl Fogel
bca57086be ; Remove an obsolete comment
* src/editfns.c (Ftranspose_regions): Remove an obsolete comment about
  memmove, following up to commit 72af86bd8c of 8 Jul 2010 by Andreas
  Schwab and commit 354f9f0fc6 of 23 Feb 2016 by Fredrik Bergroth,
  both of which added calls to memmove.
2021-11-28 13:34:57 -06:00
Eli Zaretskii
455b64c336 * src/coding.c (Fdecode_coding_region, Fencode_coding_region): Doc fix. 2021-11-28 20:18:16 +02:00
Po Lu
3ce591804b Fix xwidget popups on XI2 again
* src/xwidget.c (xwidget_button_1): Release seat grab.
2021-11-28 13:43:19 +08:00
Po Lu
bd321f78eb Fix xwidget popups on XI2
* src/gtkutil.c (xg_is_menu_window): Determine whether wdesc
is a menu generated by a menu bar more reliably.

* src/xwidget.c (xwidget_button_1): Release all XI2 grabs on
click.
2021-11-28 13:14:13 +08:00
Eli Zaretskii
a89731a78c Avoid assertion violations in --enable-checking builds
* src/xdisp.c (gui_produce_glyphs): Make sure character glyphs
don't trigger assertion violation due to negative ascent or
descent.  This was reporte dto happen with some fonts used by the
xfont backend.
2021-11-27 17:09:51 +02:00
Po Lu
828a193066 Set motion event time when handling XI2 motion events
* src/xterm.c (handle_one_xevent): Set motion event time when
handling XI_Motion.
2021-11-27 14:57:59 +08:00