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

155589 commits

Author SHA1 Message Date
Po Lu
ed62de0d39 Resolve clipping related mysteries on Haiku
* src/ftcrfont.c (ftcrfont_draw):
* src/haikufont.c (haikufont_draw): Remove workarounds for
previously broken clipping code.
* src/haikuterm.c (haiku_clip_to_string): Handle empty clipping
rectangles correctly.
(haiku_clip_to_string_exactly): Stop setting num_clips.
(haiku_draw_glyph_string): Stop saving face when drawing
overhangs.
2022-01-05 10:34:43 +00:00
Po Lu
e1626257ab Make sure mouse face doesn't stay on the cursor after it is cleared
cursor_in_mouse_face_p will still return true when the phys
cursor is drawn inside show_mouse_face when called by
clear_mouse_face, since that drawing happens before
hlinfo->mouse_face_window can be set to nil.

However, the row's mouse_face_p will be adjusted before the
cursor is drawn in show_mouse_face, so it can be used to
determine if the cursor is actually under mouse face.

* src/xdisp.c (fill_composite_glyph_string):
(fill_gstring_glyph_string):
(fill_glyphless_glyph_string):
(fill_glyph_string):
(fill_xwidget_glyph_string):
(fill_stretch_glyph_string): Only apply mouse face when
DRAW_CURSOR if the row is also mouse_face_p.

(set_glyph_string_background_width): Only adjust width if the
row holding the cursor is also mouse_face_p.
2022-01-05 14:53:57 +08:00
Po Lu
8875ae70a4 Simply conditions for mouse face display when drawing cursor on Haiku
* src/haikuterm.c (haiku_draw_stretch_glyph_string): Simplify
conditions for mouse face display.
2022-01-05 06:26:31 +00:00
Po Lu
f090c25113 Remove some unnecessary graphics state saves on Haiku
* src/haikufont.c (haikufont_draw):
* src/haikuterm.c (haiku_draw_box_rect):
(haiku_draw_relief_rect):
(haiku_draw_underwave):
(haiku_draw_text_decoration):
(haiku_draw_plain_background):
(haiku_draw_glyph_string_foreground):
(haiku_draw_glyphless_glyph_string_foreground):
(haiku_draw_stretch_glyph_string):
(haiku_draw_composite_glyph_string_foreground):
(haiku_draw_image_glyph_string): Remove unnecessary calls to
BView_StartClip and BView_EndClip.
2022-01-05 06:07:32 +00:00
Stefan Kangas
d763c12796 Merge from origin/emacs-28
e7aa3ece52 Fix vc-git with old Git over Tramp and cygwin-mount.el
c0cfbca311 * lisp/emacs-lisp/checkdoc.el (bytecomp): Add missing require

# Conflicts:
#	etc/NEWS
2022-01-05 06:30:39 +01:00
Po Lu
ad63bdf05a Fix xwidgets setting their own signal handlers
* src/xgselect.c (release_select_lock):
(acquire_select_lock): Fix coding style.
(xg_select): Call `catch_child_signal' if xwidgets are enabled.

* src/xwidget.c (kill_xwidget):
(kill_buffer_xwidgets): Call `catch_child_signal'.  (bug#53013)
2022-01-05 10:36:40 +08:00
Po Lu
a7dbbcac57 Fix display of internal border in child frames on pgtk
* src/pgtkfns.c (Fx_create_frame): Fix child frame border
resource names.
* src/pgtkterm.c (pgtk_clear_under_internal_border): Fix test
for child frames.  (bug#53018)
2022-01-05 10:16:56 +08:00
Dmitry Gutov
e7aa3ece52 Fix vc-git with old Git over Tramp and cygwin-mount.el
* lisp/vc/vc-git.el (vc-git-use-literal-pathspecs): New variable.
(vc-git-command, vc-git--call): Use it to determine whether to set
GIT_LITERAL_PATHSPECS=1 (bug#51497).
(vc-git--literal-pathspec, vc-git--literal-pathspecs): Remove.
Update all callers.  This reverts the previous solution for bug#39452.

* lisp/progmodes/project.el (project--vc-list-files):
Use the new variable.
2022-01-05 04:08:10 +02:00
Po Lu
6719a3ccab Correctly set up XI key input mask on X Toolkit builds
* src/xfns.c (setup_xi_event_mask): Also set the key event mask
on the outer window, which might also have the input focus.
(x_window) [USE_X_TOOLKIT]: Set up XI event mask a bit later.
2022-01-05 09:39:57 +08:00
Philipp Stephani
c0cfbca311 * lisp/emacs-lisp/checkdoc.el (bytecomp): Add missing require 2022-01-05 01:41:46 +01:00
Daniel Mendler
30d4cfc080 completion--nth-completion: Throw meaningful error
If a configured completion style does not exist, throw a meaningful
error. Also make completion-styles-alist a defvar, since completion
styles like orderless extend it.

* lisp/minibuffer.el (completion-styles-alist): Make it a defvar.
(completion--nth-completion): Give a more meaningful error.
2022-01-04 19:16:37 -05:00
Paul Eggert
c899d9742a Update from gnulib 2022-01-04 13:17:25 -08:00
Robert Pluim
a0263cfee3 Remove ambiguity from key-valid-p docstring
* lisp/keymap.el (key-valid-p): Be explicit about the separator
being one and only one space.
2022-01-04 16:43:03 +01:00
Lars Ingebrigtsen
0d315102fe Improve pp-emacs-lisp-code for #'
* lisp/emacs-lisp/pp.el (pp--insert-lisp): Format (function ...)
as #'.
2022-01-04 15:51:04 +01:00
Eli Zaretskii
38b4bbb7e1 A cleaner fix for display bug#52947
* src/xdisp.c (tab_bar_height, redisplay_tab_bar): Don't call
set_iterator_to_next here...
(display_tab_bar_line): ...call it here, even if we exit the loop
because we encounter a newline.
2022-01-04 15:37:16 +02:00
Jimmy Aguilar Mena
aa7d0e9a92 Autoload decorator for windmove-mode 2022-01-04 14:15:10 +01:00
Po Lu
c36741f9c5 Translate more modifiers to GDK ones in xwidgets
* src/xwidget.c (xw_translate_x_modifiers): Also handle Control
and ShiftMask.
2022-01-04 19:56:58 +08:00
Po Lu
377bf26ebe Stop assuming X kbd state works with GDK when forwarding events to xwidgets
* src/xwidget.c (xw_translate_x_modifiers): New function.
(Fxwidget_perform_lispy_event): Translate X modifiers to GDK
modifiers before sending them to the xwidget.
2022-01-04 19:30:07 +08:00
Po Lu
4309679742 Make `x-file-dialog' arity match documentation on Haiku
* lisp/term/haiku-win.el (x-file-dialog): Fix arity.
2022-01-04 11:18:15 +00:00
Alan Third
2d4b2e296b Remove macOS drop-shadows on some frames (bug#28512)
* src/nsterm.m ([EmacsWindow setParentChildRelationships]): Remove
shadows on undecorated child frames.
2022-01-04 10:55:12 +00:00
Po Lu
3e247bd34c ; * configure.ac: Move some AC_SUBSTs to the correct location. 2022-01-04 17:51:05 +08:00
Stefan Kangas
61b57ec6de Remove unnecessary autoload cookie in font-core.el
* lisp/font-core.el (font-lock-defaults): Remove autoload of
risky-local-variable property; this file is preloaded.
2022-01-04 09:52:27 +01:00
Yuuki Harano
183936ee8e Remove gsettings.m4 and write directly into Makefile.in
* configure.ac (HAVE_PGTK): Declare substitution
(HAVE_GSETTINGS): Declare substitution
* Makefile.in (HAVE_PGTK): New variable
(HAVE_GSETTINGS): New variable
(gsettingsschemadir): Don't use value from gsettings.m4
(distclean): Add clean-gsettings-schemas
(install-gsettings-schemas): Implement instead of gsettings.m4
(uninstall-gsettings-schemas): Implement instead of gsettings.m4
(clean-gsettings-schemas): Implement instead of gsettings.m4
($(gsettings_SCHEMAS:.xml=.valid)): Implement instead of gsettings.m4
* m4/gsettings.m4: Remove
2022-01-04 17:29:17 +09:00
Jim Porter
3eaf3aeec8 Prevent further cases of duplicated separators in context menus
In some cases, context menu items are added before the overall prompt
string.  This could cause multiple consecutive separators to appear if
they "surround" the prompt string.  (Bug#52293)

* lisp/mouse.el (context-menu-map): Improve the de-duplication logic
to ignore non-menu-items when checking for consecutive separators.

* test/lisp/mouse-tests.el
(context-menu-map-remove-consecutive-separators)
(context-menu-map-remove-separators-at-beginning-or-end): New tests.
2022-01-04 10:18:15 +02:00
Po Lu
9651be5b48 Fix unused variable warning in last change
* src/haiku_draw_support.c (BBitmap_transform_bitmap): Fix
unused variable warning.
2022-01-04 08:14:40 +00:00
Po Lu
a851e5a669 Rationalize Haiku rectangle handling
* src/haiku_draw_support.cc (BView_DrawBitmapWithEraseOp):
(BView_DrawMask):
(rotate_bitmap_270):
(rotate_bitmap_90):
(BBitmap_transform_bitmap):
* src/haiku_support.cc (UnZoom):
(GetParentWidthHeight):
(MakeFullscreen):
(AttachCairoSurface):
(AfterResize):
(DrawContent):
(BView_cr_dump_clipping): Use new rectangle handling macros.

* src/haiku_support.h (BE_RECT_WIDTH, BE_RECT_HEIGHT): New
macros.
2022-01-04 08:07:53 +00:00
Po Lu
cbbe235a90 Make menu bar key navigation work on Haiku
* src/haiku_support.cc (menu_bar_active_p): New variable.
(DispatchMessage): Pass through key events if the menu bar is
active.
(MenusBeginning, MenusEnd): Set `menu_bar_active_p' according
to the state of the menu bar.
(BMenuBar_delete): Clear `menu_bar_active_p'.

* src/haikufns.c (haiku_free_frame_resources): Block input only
after checking that F is a window system frame.
* src/haikumenu.c (Fhaiku_menu_bar_open): Update doc string.
2022-01-04 06:48:08 +00:00
Po Lu
693815e90f Improve Haiku frame restacking logic
* src/haiku_support.cc (BWindow_is_active):
* src/haiku_support.h (BWindow_is_active): New functions.

* src/haikufns.c (Fhaiku_frame_restack): Prevent the newly
raised frame from being sent to the back of the display.
2022-01-04 06:10:25 +00:00
Po Lu
3a7a88d2f8 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2022-01-04 05:26:40 +00:00
Po Lu
f3481f21f7 Find a way to make restacking frames work on Haiku
* doc/lispref/frames.texi (Raising and Lowering): Update
documentation to reflect that restacking frames is now
supported on Haiku.
* lisp/frame.el (haiku-frame-restack): New declaration.
(frame-restack): Use `haiku-frame-restack' on Haiku.

* src/haiku_support.cc (BWindow_send_behind):
* src/haiku_support.h (BWindow_send_behind):
* src/haikufns.c (Fhaiku_frame_restack): New functions.
(syms_of_haikufns): New subr `haiku-frame-restack'.
2022-01-04 05:22:56 +00:00
Stefan Kangas
565fd09d9b * test/src/doc-tests.el: New file. 2022-01-04 05:38:00 +01:00
Po Lu
6668a7608c Add effective group to xkey events when handling XI key press events
* src/xterm.c (handle_one_xevent): Add effective group to
xkey.state when translating XI key events.
2022-01-04 11:17:59 +08:00
Stefan Kangas
24a52df738 Fix two unused variable warnings in make-docfile.c
* lib-src/make-docfile.c (scan_lisp_file): Fix unused variable
warnings.
2022-01-04 03:52:42 +01:00
Stefan Kangas
417a3ebaa2 Test that buffer exists in shortdoc-all-groups-work
* test/lisp/emacs-lisp/shortdoc-tests.el
(shortdoc-all-groups-work): Test that the shortdoc buffer was created.
2022-01-04 03:52:42 +01:00
Po Lu
cd7e7834ba Fix Haiku bitmap sanity checks
* src/haikufns.c (haiku_get_pixel, haiku_put_pixel): Fix sanity
checking of coordinate values.
2022-01-04 02:21:23 +00:00
Po Lu
a89bc0fe9c Fix fringe bitmap display on haiku again
* src/haiku_draw_support.cc (BView_DrawBitmapWithEraseOp): Fix
off-by-one errors.
2022-01-04 02:01:30 +00:00
Po Lu
7eb86a1788 Fix duplicate file panel display on Haiku
* lisp/term/haiku-win.el (x-file-dialog): Fix up prompt to look
better.

* src/haiku_support.cc (be_popup_file_dialog): Remove duplicate
call to `Show'.
2022-01-04 01:30:27 +00:00
Stefan Kangas
5c63786cb9 New test shortdoc-all-groups-work
* test/lisp/emacs-lisp/shortdoc-tests.el
(shortdoc-all-groups-work): New test.  See Bug#52969.
2022-01-03 21:40:38 +01:00
Stefan Monnier
460f35e96d Revert part of 59732a83c8 to fix bug#52969
While we don't need to put docstrings of .elc files into etc/DOC,
we still need to put those of `loaddefs.el` there since we don't have
a "dynamic docstring" feature for the non-compiled files and keeping
the actual docstrings in the heap would be prohibitive.

* src/Makefile.in ($(etc)/DOC): Scan `lisp/loaddefs.el` still.

* lib-src/make-docfile.c (scan_lisp_file): New function.
(scan_file): Use it.
(skip_white, read_lisp_symbol, search_lisp_doc_at_eol): New functions.
2022-01-03 15:04:12 -05:00
Po Lu
ab5ee3e29e * src/haiku_font_support.cc (BFont_char_bounds): Fix bearings. 2022-01-03 13:57:13 +00:00
Po Lu
c7768382cc Synchronize at a better place when making a frame visible on Haiku
* src/haiku_support.cc (BWindow_set_visible): Stop synchronizing
here.

* src/haikufns.c (haiku_visualize_frame):
(haiku_unvisualize_frame): Sychronize after visibility changes.
2022-01-03 11:07:29 +00:00
Po Lu
4efaabaf27 Implement AC line status for the Haiku battery function
* lisp/battery.el (battery--search-haiku-acpi-status): Return
`fully-charged' instead of `normal'.
(battery-haiku-acpi-battery): Implement %L for AC line status.
2022-01-03 10:18:08 +00:00
Stefan Kangas
bd9a09bb6b elide-head: Make GPL regexp more forgiving
* lisp/elide-head.el (elide-head-headers-to-hide): Make GPL regexp
more forgiving.
* test/lisp/elide-head-tests.el (elide-head--add-test): New macro.
(elide-head--test-headers-to-hide/gpl2-1)
(elide-head--test-headers-to-hide/gpl3-1)
(elide-head--test-headers-to-hide/gpl3-2)
(elide-head--test-headers-to-hide/gpl3-3)
(elide-head--test-headers-to-hide/gpl3-4): New tests.
2022-01-03 09:04:09 +01:00
Po Lu
61c35e415c Fix battery load calculation on Haiku
* lisp/battery.el (battery-haiku-acpi-battery): Fix load
calculation.
2022-01-03 15:44:51 +08:00
Po Lu
f563fbf53b Add support for the Haiku ACPI battery driver
* lisp/battery.el (battery-status-function): Choose
`battery-haiku-acpi-battery' if the Haiku ACPI driver is
available.
(battery--search-haiku-acpi-status):
(battery-haiku-acpi-battery): New functions.
2022-01-03 15:40:48 +08:00
Stefan Kangas
d8959347d9 * lisp/elide-head.el (elide-head-headers-to-hide): Simplify. 2022-01-03 07:52:55 +01:00
Stefan Kangas
8d6a8f660d Silence byte-compiler in eieio tests
This is a temporary workaround for Bug#52971.
* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
(eieio-compat)
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-compat):
Silence byte-compiler by wrapping require in with-no-warnings.
2022-01-03 05:00:11 +01:00
Po Lu
f6501fded7 Don't try to guess a delta if a scroll valuator's state is unknown
* src/xterm.c (x_get_scroll_valuator_delta): Return DBL_MAX if
the scroll valuator's value is unknown.
2022-01-03 11:21:16 +08:00
Po Lu
01047cf13f Revert "Stop sending touch-end events if coalescing scroll events"
This reverts commit a6952f78f3.
2022-01-03 11:17:43 +08:00
Po Lu
7544ede1bc Use XKB to find modifiers on x
* src/xterm.c (x_find_modifier_meanings): Look for virtual
modifiers with Xkb instead.
(handle_one_xevent): Add group when translating XI2 keycodes and
handle Xkb keymap events.
(x_term_init): Populate dpyinfo->xkb_event_type.

* src/xterm.h (struct x_display_info): New field
`xkb_event_type', and change modifier masks to `unsigned int'.
2022-01-03 10:56:45 +08:00