1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-01 09:51:22 -08:00
Commit graph

44540 commits

Author SHA1 Message Date
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
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
Po Lu
f1116f45bc Set initial tab bar parameter on NS
* src/nsfns.m (Fx_create_frame): Initialize `tab-bar-lines'
frame parameter during frame creation.
2021-11-27 08:34:51 +08:00
Alan Third
9721dcf275 Silence NS warnings
* src/nsterm.m ([EmacsView mouseDown:]): Move variables into the block
where they're used.
2021-11-26 19:57:07 +00:00
Lars Ingebrigtsen
3f843b25dc Add an intermediary face for mode lines: `mode-line-active'
* doc/emacs/display.texi (Standard Faces): Document the new face.

* lisp/faces.el (mode-line-active): New face.
(mode-line): Don't inherit from vaiable-pitch.

* src/xfaces.c (lookup_basic_face, realize_basic_faces)
(syms_of_xfaces):
* src/xdisp.c (window_box_height, window_text_pixel_size)
(display_mode_lines, Fformat_mode_line):
* src/dispextern.h (CURRENT_MODE_LINE_ACTIVE_FACE_ID_3)
(CURRENT_MODE_LINE_ACTIVE_FACE_ID, enum face_id): Rename from
*MODE_LINE_FACE_ID to *MODE_LINE_ACTIVE_FACE_ID.
2021-11-26 14:19:24 +01:00
Po Lu
673eadaeb5 Explain confusing aspects of XInput 2 scroll wheel reporting
* src/xterm.c (x_init_master_valuators): Explain how XInput 2
reports scroll wheel movement.

(handle_one_xevent): Explain why XI2 scroll valuators
are reset after each enter events.
2021-11-26 21:06:22 +08:00
Po Lu
c56e05b968 Make XInput 2 builds work without cairo
* src/xterm.c: Move some defines around so XI2 code doesn't
get ifdef'd out if Cairo is disabled.
2021-11-26 17:54:24 +08:00
Stefan Kangas
62d7ddb57c Merge from origin/emacs-28
cfaf681d3d ; * src/emacs.c (main): Add commentary about command-line ...
4d16a2f737 Fix pdf generation with Texinfo 6.7
a22c9a34bd Fix 'posn-at-point' near some overlays
d1aa552d11 ; * CONTRIBUTE: No cleanups on release branches, even in d...
588caf0b27 * lisp/repeat.el (repeat-post-hook): Add check symbolp rep...
2021-11-26 07:17:21 +01:00
Po Lu
09c28ca073 Fix sign of pixel scroll events on Haiku
* src/haikuterm.c (haiku_read_socket): Fix sign of scroll
events.
2021-11-26 06:13:27 +00:00
Alan Third
9d37be3522 Fix selection for old GNUstep and GCC
* src/nsselect.m (ns_get_foreign_selection): Remove language features
not yet supported by GCC.  Be more selective with which pasteboard
types we use.
* src/nsterm.h: Set up some more #defines for deprecated variables.
2021-11-25 21:04:50 +00:00
Eli Zaretskii
cfaf681d3d ; * src/emacs.c (main): Add commentary about command-line processing. 2021-11-25 22:31:47 +02:00
Eli Zaretskii
4cd6bc8809 ; * src/font.c: Comment about synchronizing with cus-face.el. 2021-11-25 21:55:38 +02:00
Andreas Schwab
92d1bb3e38 * src/emacs.c (usage_message): Fix name of --seccomp option. 2021-11-25 20:06:59 +01:00
Eli Zaretskii
a22c9a34bd Fix 'posn-at-point' near some overlays
* src/xdisp.c (pos_visible_p): Fix 'posn-at-point' for positions
just after a display property that draws a fringe bitmap.
(Bug#52097)
2021-11-25 15:06:08 +02:00
Po Lu
d0ea2a87f4 Fix scroll wheel reporting on NS
* src/nsterm.m (- mouseDown): Clear scroll wheel
accumulators.
2021-11-25 19:04:02 +08:00
Po Lu
b469a01551 Set serial when filtering XI_KeyPress events
This fixes fcitx flicker for whatever reason.

* src/xterm.c (handle_one_xevent): Set serial when filtering
XI_KeyPress events.
2021-11-25 13:20:56 +08:00
Po Lu
e37eb7f5c6 Add support for pixel wheel deltas on NS
* src/xterm.c (x_coalesce_scroll_events): Update doc string.
* src/nsterm.c (- mouseDown): Report pixel scroll deltas.
(x_coalesce_scroll_events): New variable
2021-11-25 11:09:08 +08:00