]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoRemove macOS drop-shadows on some frames (bug#28512)
Alan Third [Tue, 28 Dec 2021 11:36:46 +0000 (11:36 +0000)]
Remove macOS drop-shadows on some frames (bug#28512)

* src/nsterm.m ([EmacsWindow setParentChildRelationships]): Remove
shadows on undecorated child frames.

2 years ago; * configure.ac: Move some AC_SUBSTs to the correct location.
Po Lu [Tue, 4 Jan 2022 09:51:05 +0000 (17:51 +0800)]
; * configure.ac: Move some AC_SUBSTs to the correct location.

2 years agoRemove unnecessary autoload cookie in font-core.el
Stefan Kangas [Tue, 4 Jan 2022 08:50:44 +0000 (09:50 +0100)]
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.

2 years agoRemove gsettings.m4 and write directly into Makefile.in
Yuuki Harano [Tue, 4 Jan 2022 06:27:36 +0000 (15:27 +0900)]
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

2 years agoPrevent further cases of duplicated separators in context menus
Jim Porter [Mon, 3 Jan 2022 06:08:52 +0000 (22:08 -0800)]
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.

2 years agoFix unused variable warning in last change
Po Lu [Tue, 4 Jan 2022 08:14:40 +0000 (08:14 +0000)]
Fix unused variable warning in last change

* src/haiku_draw_support.c (BBitmap_transform_bitmap): Fix
unused variable warning.

2 years agoRationalize Haiku rectangle handling
Po Lu [Tue, 4 Jan 2022 08:07:53 +0000 (08:07 +0000)]
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.

2 years agoMake menu bar key navigation work on Haiku
Po Lu [Tue, 4 Jan 2022 06:48:08 +0000 (06:48 +0000)]
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.

2 years agoImprove Haiku frame restacking logic
Po Lu [Tue, 4 Jan 2022 06:10:25 +0000 (06:10 +0000)]
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.

2 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Po Lu [Tue, 4 Jan 2022 05:26:40 +0000 (05:26 +0000)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

2 years agoFind a way to make restacking frames work on Haiku
Po Lu [Tue, 4 Jan 2022 05:22:56 +0000 (05:22 +0000)]
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'.

2 years ago* test/src/doc-tests.el: New file.
Stefan Kangas [Tue, 4 Jan 2022 04:38:00 +0000 (05:38 +0100)]
* test/src/doc-tests.el: New file.

2 years agoAdd effective group to xkey events when handling XI key press events
Po Lu [Tue, 4 Jan 2022 03:16:46 +0000 (11:16 +0800)]
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.

2 years agoFix two unused variable warnings in make-docfile.c
Stefan Kangas [Tue, 4 Jan 2022 02:52:18 +0000 (03:52 +0100)]
Fix two unused variable warnings in make-docfile.c

* lib-src/make-docfile.c (scan_lisp_file): Fix unused variable
warnings.

2 years agoTest that buffer exists in shortdoc-all-groups-work
Stefan Kangas [Tue, 4 Jan 2022 02:50:59 +0000 (03:50 +0100)]
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.

2 years agoFix Haiku bitmap sanity checks
Po Lu [Tue, 4 Jan 2022 02:21:23 +0000 (02:21 +0000)]
Fix Haiku bitmap sanity checks

* src/haikufns.c (haiku_get_pixel, haiku_put_pixel): Fix sanity
checking of coordinate values.

2 years agoFix fringe bitmap display on haiku again
Po Lu [Tue, 4 Jan 2022 02:01:30 +0000 (02:01 +0000)]
Fix fringe bitmap display on haiku again

* src/haiku_draw_support.cc (BView_DrawBitmapWithEraseOp): Fix
off-by-one errors.

2 years agoFix duplicate file panel display on Haiku
Po Lu [Tue, 4 Jan 2022 01:30:27 +0000 (01:30 +0000)]
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'.

2 years agoNew test shortdoc-all-groups-work
Stefan Kangas [Mon, 3 Jan 2022 20:40:38 +0000 (21:40 +0100)]
New test shortdoc-all-groups-work

* test/lisp/emacs-lisp/shortdoc-tests.el
(shortdoc-all-groups-work): New test.  See Bug#52969.

2 years agoRevert part of 59732a83c8 to fix bug#52969
Stefan Monnier [Mon, 3 Jan 2022 20:04:12 +0000 (15:04 -0500)]
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.

2 years ago* src/haiku_font_support.cc (BFont_char_bounds): Fix bearings.
Po Lu [Mon, 3 Jan 2022 13:57:13 +0000 (13:57 +0000)]
* src/haiku_font_support.cc (BFont_char_bounds): Fix bearings.

2 years agoSynchronize at a better place when making a frame visible on Haiku
Po Lu [Mon, 3 Jan 2022 11:07:29 +0000 (11:07 +0000)]
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.

2 years agoImplement AC line status for the Haiku battery function
Po Lu [Mon, 3 Jan 2022 10:16:06 +0000 (10:16 +0000)]
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.

2 years agoelide-head: Make GPL regexp more forgiving
Stefan Kangas [Mon, 3 Jan 2022 08:02:29 +0000 (09:02 +0100)]
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.

2 years agoFix battery load calculation on Haiku
Po Lu [Mon, 3 Jan 2022 07:44:51 +0000 (15:44 +0800)]
Fix battery load calculation on Haiku

* lisp/battery.el (battery-haiku-acpi-battery): Fix load
calculation.

2 years agoAdd support for the Haiku ACPI battery driver
Po Lu [Mon, 3 Jan 2022 07:39:18 +0000 (15:39 +0800)]
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.

2 years ago* lisp/elide-head.el (elide-head-headers-to-hide): Simplify.
Stefan Kangas [Mon, 3 Jan 2022 06:52:55 +0000 (07:52 +0100)]
* lisp/elide-head.el (elide-head-headers-to-hide): Simplify.

2 years agoSilence byte-compiler in eieio tests
Stefan Kangas [Mon, 3 Jan 2022 03:59:03 +0000 (04:59 +0100)]
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.

2 years agoDon't try to guess a delta if a scroll valuator's state is unknown
Po Lu [Mon, 3 Jan 2022 03:21:16 +0000 (11:21 +0800)]
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.

2 years agoRevert "Stop sending touch-end events if coalescing scroll events"
Po Lu [Mon, 3 Jan 2022 03:17:43 +0000 (11:17 +0800)]
Revert "Stop sending touch-end events if coalescing scroll events"

This reverts commit a6952f78f3962ac2d9a5add580a130f0abd31429.

2 years agoUse XKB to find modifiers on x
Po Lu [Mon, 3 Jan 2022 02:56:45 +0000 (10:56 +0800)]
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'.

2 years ago* src/haikumenu.c (haiku_menu_show): Fix input blocking.
Po Lu [Mon, 3 Jan 2022 00:59:58 +0000 (00:59 +0000)]
* src/haikumenu.c (haiku_menu_show): Fix input blocking.

2 years agoMove define-keymap and defvar-keymap to keymap.el
Stefan Kangas [Sun, 2 Jan 2022 22:27:16 +0000 (23:27 +0100)]
Move define-keymap and defvar-keymap to keymap.el

These functions deal with the "new" keymap binding interface, so they
belong in keymap.el rather than in subr.el.
* lisp/subr.el (define-keymap--compile, define-keymap)
(defvar-keymap): Move from here ...
* lisp/keymap.el (define-keymap--compile, define-keymap)
(defvar-keymap): ... to here.

2 years agoMerge remote-tracking branch 'origin/emacs-28' into trunk
Stefan Monnier [Sun, 2 Jan 2022 22:07:42 +0000 (17:07 -0500)]
Merge remote-tracking branch 'origin/emacs-28' into trunk

2 years agoAvoid inflooping when 'tab-bar-format' includes embedded newlines
Eli Zaretskii [Sun, 2 Jan 2022 19:36:13 +0000 (21:36 +0200)]
Avoid inflooping when 'tab-bar-format' includes embedded newlines

* src/xdisp.c (tab_bar_height, redisplay_tab_bar): Support
'tab-bar-format' with embedded newlines.  (Bug#52947)

2 years agoelide-head: Add support for modified BSD license
Stefan Kangas [Sun, 2 Jan 2022 18:25:02 +0000 (19:25 +0100)]
elide-head: Add support for modified BSD license

* lisp/elide-head.el (elide-head-headers-to-hide): Add support for
the modified BSD license (3-clause BSD).

2 years ago* lisp/tab-line.el: Revert part of the fix in a6adfe21e4 (bug#52881)
Juri Linkov [Sun, 2 Jan 2022 18:00:40 +0000 (20:00 +0200)]
* lisp/tab-line.el: Revert part of the fix in a6adfe21e4 (bug#52881)

(tab-line--get-tab-property, tab-line-auto-hscroll): Use get-pos-property
instead of get-text-property that fails after previous-single-property-change.

2 years agoNew :type key for defcustom
Stefan Kangas [Sun, 2 Jan 2022 15:46:02 +0000 (16:46 +0100)]
New :type key for defcustom

As compared to the old type key-sequence that deals with raw key
sequences, this :type conforms to the format used by the new keymap-*
functions.
* lisp/wid-edit.el (key): New widget type.  (Bug#52523)
(widget-key-prompt-value-history): New variable.
(widget-key-validate): New function.
(key-sequence): Doc fix.
* doc/lispref/customize.texi (Simple Types): Document above new type.

2 years agoDon't fail flymake-tests if `gcc` actually is Clang
Mattias Engdegård [Sun, 2 Jan 2022 12:00:13 +0000 (13:00 +0100)]
Don't fail flymake-tests if `gcc` actually is Clang

* test/lisp/progmodes/flymake-tests.el (flymake-tests--gcc-is-clang)
(different-diagnostic-types, included-c-header-files): Skip tests that
depend on the `gcc` command really being GCC and not Clang.

2 years agoAdd column width to tooltip frame width on pgtk
Po Lu [Sun, 2 Jan 2022 12:28:58 +0000 (20:28 +0800)]
Add column width to tooltip frame width on pgtk

* src/pgtkfns.c (Fx_show_tip): Add column width to width to
avoid an odd problem in the GTK allocation code.  (bug#52705)

2 years agoClarify %g and %G time format specs
Eli Zaretskii [Sun, 2 Jan 2022 07:30:15 +0000 (09:30 +0200)]
Clarify %g and %G time format specs

* src/timefns.c (Fformat_time_string):
* doc/lispref/os.texi (Time Parsing): Clarify %g/%G.  (Bug#52934)

2 years ago(define-char-code-property): Workaround for bug#52945
Stefan Monnier [Sun, 2 Jan 2022 07:25:55 +0000 (02:25 -0500)]
(define-char-code-property): Workaround for bug#52945

* lisp/international/mule-cmds.el (define-char-code-property): Ignore
requests to re-setup lazy loading after the char-table is already loaded.

2 years agoFix mouse wheel scroll direction on pgtk
Po Lu [Sun, 2 Jan 2022 07:13:37 +0000 (15:13 +0800)]
Fix mouse wheel scroll direction on pgtk

* src/pgtkterm.c (scroll_event): Fix scroll modifiers when
`mwheel-coalesce-scroll-events' is nil.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 2 Jan 2022 05:31:44 +0000 (06:31 +0100)]
Merge from origin/emacs-28

efb1c7ec37 ; * admin/notes/years: More known problems.
f475c5823a ; Copyright year fixes
2684def348 ; Run set-copyright from admin.el
2558b37b5e ; * admin/notes/years: Mention known problems with 'update...

2 years agoFix XRegisterIMInstantiateCallback function argument configure test
Po Lu [Sun, 2 Jan 2022 03:02:49 +0000 (11:02 +0800)]
Fix XRegisterIMInstantiateCallback function argument configure test

* configure.ac: Use XIDProc where XIMProc was mistakenly used.

2 years agoStop sending touch-end events if coalescing scroll events
Po Lu [Sun, 2 Jan 2022 03:02:02 +0000 (11:02 +0800)]
Stop sending touch-end events if coalescing scroll events

* src/xterm.c (handle_one_xevent): Don't generate touch-end
events if mwheel_coalesce_scroll_events is non-nil.

2 years agoFix mouse face problems when moving between two frames on Haiku
Po Lu [Sun, 2 Jan 2022 02:37:21 +0000 (02:37 +0000)]
Fix mouse face problems when moving between two frames on Haiku

* src/haiku_support.cc (movement_locker): New locker.
(MouseMoved): Lock that locker.
(BWindow_new):
(BWindow_quit): Use LockLooper instead of Lock.

* src/haikuterm.c (haiku_read_socket): Clear mouse face if
a motion event is received for a frame other than the one
that is currently displaying the mouse face.

2 years agoMake quitting actually work in Haiku file dialogs
Po Lu [Sun, 2 Jan 2022 00:43:54 +0000 (00:43 +0000)]
Make quitting actually work in Haiku file dialogs

* src/haiku_support.h: (be_popup_file_dialog)
* src/haiku_support.cc (be_popup_file_dialog): New parameter
`maybe_quit_function'.
* src/haikufns.c (Fhaiku_read_file_name): Pass `maybe_quit' as
the maybe_quit_function.

2 years ago; * admin/notes/years: More known problems.
Eli Zaretskii [Sat, 1 Jan 2022 20:21:46 +0000 (22:21 +0200)]
; * admin/notes/years: More known problems.

2 years ago; Copyright year fixes
Glenn Morris [Sat, 1 Jan 2022 18:02:17 +0000 (10:02 -0800)]
; Copyright year fixes

2 years ago; Run set-copyright from admin.el
Glenn Morris [Sat, 1 Jan 2022 17:52:06 +0000 (09:52 -0800)]
; Run set-copyright from admin.el

2 years ago; * admin/notes/years: Mention known problems with 'update-copyright'.
Eli Zaretskii [Sat, 1 Jan 2022 15:11:32 +0000 (17:11 +0200)]
; * admin/notes/years: Mention known problems with 'update-copyright'.

2 years agoMerge from origin/emacs-28
Eli Zaretskii [Sat, 1 Jan 2022 13:38:36 +0000 (08:38 -0500)]
Merge from origin/emacs-28

58b0ada20b Update more copyright years

2 years agoelide-head: Support more licenses
Stefan Kangas [Sat, 1 Jan 2022 13:23:11 +0000 (14:23 +0100)]
elide-head: Support more licenses

* lisp/elide-head.el (elide-head-headers-to-hide): Add support for the
Expat License, and more variants of the BSD-2-Clause License.

Add old FSF address.  This fixes a bug reported in 2003:
https://lists.gnu.org/r/bug-gnu-emacs/2003-01/msg00142.html

2 years agoUpdate more copyright years
Eli Zaretskii [Sat, 1 Jan 2022 12:20:37 +0000 (14:20 +0200)]
Update more copyright years

* etc/tutorials/TUTORIAL.he (זכויות שימוש):
* config.bat: Update Copyright years.

2 years ago; Add 2022 to copyright years.
Eli Zaretskii [Sat, 1 Jan 2022 12:07:15 +0000 (07:07 -0500)]
; Add 2022 to copyright years.

2 years agoMerge from origin/emacs-28
Eli Zaretskii [Sat, 1 Jan 2022 12:03:03 +0000 (07:03 -0500)]
Merge from origin/emacs-28

836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year.
86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year
ebe8772f65 ; Minor fixes related to copyright years
23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye...
8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
19dcb237b5 ; Add 2022 to copyright years.

# Conflicts:
# etc/NEWS
# etc/refcards/ru-refcard.tex
# lib/cdefs.h
# lisp/erc/erc-dcc.el
# lisp/erc/erc-imenu.el
# lisp/erc/erc-replace.el
# lisp/image-dired.el
# lisp/progmodes/xref.el
# m4/alloca.m4
# m4/byteswap.m4
# m4/errno_h.m4
# m4/getopt.m4
# m4/gnulib-common.m4
# m4/inttypes.m4
# m4/stddef_h.m4
# m4/stdint.m4
# m4/sys_socket_h.m4

2 years ago; Merge from origin/emacs-28
Eli Zaretskii [Sat, 1 Jan 2022 11:51:57 +0000 (06:51 -0500)]
; Merge from origin/emacs-28

The following commit was skipped:

8a08af20a8 ; Auto-commit of loaddefs files.

2 years ago; * etc/refcards/ru-refcard.tex: Update Copyright year.
Eli Zaretskii [Sat, 1 Jan 2022 11:43:00 +0000 (13:43 +0200)]
; * etc/refcards/ru-refcard.tex: Update Copyright year.

2 years agoIncrease size of precision scrolling momentum ring
Po Lu [Sat, 1 Jan 2022 11:33:01 +0000 (19:33 +0800)]
Increase size of precision scrolling momentum ring

* lisp/pixel-scroll.el
(pixel-scroll-precision-initial-velocity-factor): Fix
calculation of last timestamp.
(pixel-scroll-precision):
(pixel-scroll-kinetic-state):
(pixel-scroll-accumulate-velocity):
(pixel-scroll-start-momentum):
(pixel-scroll-calculate-velocity): Increase default ring size
to 30.

2 years ago* lisp/net/tramp-sh.el: Adapt copyright year
Michael Albinus [Sat, 1 Jan 2022 11:22:15 +0000 (12:22 +0100)]
* lisp/net/tramp-sh.el: Adapt copyright year

2 years ago; Minor fixes related to copyright years
Eli Zaretskii [Sat, 1 Jan 2022 11:01:44 +0000 (13:01 +0200)]
; Minor fixes related to copyright years

* admin/notes/years: Advise redirecting output of update-copyright
to a file.

* etc/refcards/gnus-refcard.tex (Copyright): Update years.

2 years agoMake last change compile
Po Lu [Sat, 1 Jan 2022 10:29:44 +0000 (10:29 +0000)]
Make last change compile

* src/haiku_support.cc (EmacsShow): Fix last change.
(TearDownDoubleBuffering): Likewise.
(Draw): Draw normally if not double buffered even if shown_flag
is true.

2 years agoFix expose events in non-double-buffered child frames on Haiku
Po Lu [Sat, 1 Jan 2022 10:24:38 +0000 (10:24 +0000)]
Fix expose events in non-double-buffered child frames on Haiku

* src/haiku_support.cc (EmacsShow): Set shown_flag to 1 only if
this view is double buffered.
(TearDownDoubleBuffering): Clear shown_flag.

2 years ago; * test/manual/etags/ETAGS.good_N: Adjust to copyright years change.
Eli Zaretskii [Sat, 1 Jan 2022 10:19:17 +0000 (05:19 -0500)]
; * test/manual/etags/ETAGS.good_N: Adjust to copyright years change.

2 years ago* src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
Zhehao Lin [Sat, 1 Jan 2022 08:19:49 +0000 (16:19 +0800)]
* src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.

Copyright-paperwork-exempt: yes

2 years agoFix some more off-by-one errors in Haiku image code
Po Lu [Sat, 1 Jan 2022 09:56:14 +0000 (09:56 +0000)]
Fix some more off-by-one errors in Haiku image code

* src/haiku_draw_support.cc (BView_DrawBitmapWithEraseOp):
(BView_DrawMask):
(BBitmap_transform_bitmap):
* src/haiku_support.cc (AttachCairoSurface): Adjust calculations
to take account of BRect width and height functions returning
(start - end) instead of the actual width and height of the
rectangle.

2 years agoFix deadlocks with invisible frames and threads in Haiku
Po Lu [Sat, 1 Jan 2022 09:33:15 +0000 (09:33 +0000)]
Fix deadlocks with invisible frames and threads in Haiku

* src/haiku_support.cc (class EmacsWindow): New field
`was_shown_p'.
(EmacsShow): Lock looper if the window wasn't ever visible.
(BWindow_new): Unlock window looper after creating it.

2 years ago; Add 2022 to copyright years.
Eli Zaretskii [Sat, 1 Jan 2022 07:45:51 +0000 (02:45 -0500)]
; Add 2022 to copyright years.

2 years agoSet display last user time when handling pinch events
Po Lu [Sat, 1 Jan 2022 07:23:55 +0000 (15:23 +0800)]
Set display last user time when handling pinch events

* src/xterm.c (handle_one_xevent): Set last user time for XI
pinch events.

2 years agoFix child frame synchronization order on Haiku
Po Lu [Sat, 1 Jan 2022 07:09:38 +0000 (07:09 +0000)]
Fix child frame synchronization order on Haiku

* src/haiku_support.cc (DoMove):
(FrameMoved): Fix locking and sync order semantics.

2 years ago; Auto-commit of loaddefs files.
Stefan Kangas [Sat, 1 Jan 2022 06:25:50 +0000 (07:25 +0100)]
; Auto-commit of loaddefs files.

2 years agoImplement numeric values of `mouse-highlight' on Haiku
Po Lu [Sat, 1 Jan 2022 06:16:59 +0000 (06:16 +0000)]
Implement numeric values of `mouse-highlight' on Haiku

* src/haikuterm.c (haiku_read_socket): Clear mouse face on
keyboard input if `mouse-highlight' is a fixnum.

2 years ago; Auto-commit of loaddefs files.
Stefan Kangas [Sat, 1 Jan 2022 06:14:35 +0000 (07:14 +0100)]
; Auto-commit of loaddefs files.

2 years agoUpdate publicsuffix.txt from upstream
Stefan Kangas [Sat, 1 Jan 2022 05:56:33 +0000 (06:56 +0100)]
Update publicsuffix.txt from upstream

* etc/publicsuffix.txt: Update from
https://publicsuffix.org/list/public_suffix_list.dat
dated 2021-12-31 02:56:06 UTC.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sat, 1 Jan 2022 05:51:58 +0000 (06:51 +0100)]
Merge from origin/emacs-28

67400da412 Improve doc strings of fringe indicator variables
a6adfe21e4 * lisp/tab-line.el (tab-line--get-tab-property): New funct...

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Sat, 1 Jan 2022 05:51:58 +0000 (06:51 +0100)]
; Merge from origin/emacs-28

The following commit was skipped:

89f205084b Avoid assertion violations with variable-weight fonts

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sat, 1 Jan 2022 05:51:56 +0000 (06:51 +0100)]
Merge from origin/emacs-28

f2031d0ddb Minor improvement in user documentation of completion style
1e3076e2db Fix bug where bookmark-jump used (point), not (point-at-bol)

2 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Po Lu [Sat, 1 Jan 2022 05:36:23 +0000 (05:36 +0000)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

2 years agoFlush frames after mouse face is cleared on a child frame in Haiku
Po Lu [Sat, 1 Jan 2022 05:32:42 +0000 (05:32 +0000)]
Flush frames after mouse face is cleared on a child frame in Haiku

* src/haiku_support.cc (~EmacsWindow):
(UpwardsSubsetChildren):
(UpwardsUnSubsetChildren): Fix locking semantics.

* src/haikuterm.c (haiku_read_socket): Flush dirty back buffers
after clearing mouse face because the pointer was moved out of a
frame.

2 years agoPrint dead xwidgets specially
Po Lu [Sat, 1 Jan 2022 00:54:51 +0000 (08:54 +0800)]
Print dead xwidgets specially

* src/print.c (print_vectorlike) <PVEC_XWIDGET>: Print "killed
xwidget" for dead xwidgets.

2 years agoImprove doc strings of fringe indicator variables
Eli Zaretskii [Fri, 31 Dec 2021 19:58:42 +0000 (21:58 +0200)]
Improve doc strings of fringe indicator variables

* src/buffer.c (syms_of_buffer): Fix doc strings of
'indicate-empty-lines' and 'indicate-buffer-boundaries'.

2 years agoUse defvar-keymap in play/*.el
Stefan Kangas [Fri, 31 Dec 2021 16:17:16 +0000 (17:17 +0100)]
Use defvar-keymap in play/*.el

* lisp/play/5x5.el (5x5-mode-map):
* lisp/play/blackbox.el (blackbox-mode-map):
* lisp/play/bubbles.el (bubbles-mode-map):
* lisp/play/decipher.el (decipher-mode-map):
* lisp/play/doctor.el (doctor-mode-map):
* lisp/play/gametree.el (gametree-mode-map):
* lisp/play/gomoku.el (gomoku-mode-map):
* lisp/play/mpuz.el (mpuz-mode-map):
* lisp/play/pong.el (pong-mode-map):
* lisp/play/solitaire.el (solitaire-mode-map): Use defvar-keymap.

2 years ago`make-finalizer' now has to be called with a function, so adjust test
Lars Ingebrigtsen [Fri, 31 Dec 2021 15:50:50 +0000 (16:50 +0100)]
`make-finalizer' now has to be called with a function, so adjust test

2 years agoDocumentation update for Secret Service
Michael Albinus [Fri, 31 Dec 2021 13:36:49 +0000 (14:36 +0100)]
Documentation update for Secret Service

* doc/misc/auth.texi (Secret Service API): Precise "session" collection.

* lisp/auth-source.el (auth-sources): Adapt custom label.

* lisp/net/secrets.el: Adjust comments.

2 years agoFix copyright dates in some files belonging to the pgtk port
Po Lu [Fri, 31 Dec 2021 13:08:23 +0000 (21:08 +0800)]
Fix copyright dates in some files belonging to the pgtk port

* src/pgtkgui.h:
* src/pgtkim.c:
* src/pgtkmenu.c:
* src/pgtkselect.c:
* src/pgtkselect.h:
* src/pgtkterm.c:
* src/pgtkterm.h: Fix copyright dates to say '2021'.

2 years agoOn Haiku, sync a frames's connection to the app sever after raising
Po Lu [Fri, 31 Dec 2021 13:03:07 +0000 (13:03 +0000)]
On Haiku, sync a frames's connection to the app sever after raising

* src/haiku_support.h: (BWindow_sync)
* src/haiku_support.cc (BWindow_sync): New function.
* src/haikuterm.c (haiku_frame_raise_lower): Synchronize window
after raising it to avoid situations where raising windows is
done out-of-order, such as when ediff raises a frame.

2 years agoFix child frame unlinking on Haiku
Po Lu [Fri, 31 Dec 2021 10:59:53 +0000 (10:59 +0000)]
Fix child frame unlinking on Haiku

* src/haiku_support.cc (UnlinkChild): Fix obvious mistake.
(DoMove): Lock child frame window before moving it.

2 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Po Lu [Fri, 31 Dec 2021 09:38:41 +0000 (09:38 +0000)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

2 years agoUse a single global lock for the child frame state on Haiku
Po Lu [Fri, 31 Dec 2021 09:31:27 +0000 (09:31 +0000)]
Use a single global lock for the child frame state on Haiku

Each BWindows (and various system callbacks) runs in a separate
thread, so there are very complicated locking semantics that
used to be handled manually.  This changes child frame state to
use a single global lock, which makes things much easier.

* src/haiku_support.cc (child_frame_lock): New variable.
(class EmacsWindow):
(~EmacsWindow):
(Unparent):
(ParentTo):
(MoveChild):
(FrameMoved):
(EmacsHide):
(EmacsShow):
(GetParentWidthHeight):
(OffsetChildRect):
(MakeFullscreen):
(SetUpDoubleBuffering): Use a single lock for controlling access
to child frame state.

2 years agoFix handling of webkit xwidget bookmarks
Stephen Berman [Fri, 31 Dec 2021 09:25:52 +0000 (10:25 +0100)]
Fix handling of webkit xwidget bookmarks

Make jumping to a bookmarked webkit xwidget in another window or
another frame show the xwidget only in that window or frame and
refactor new session code used by the bookmark code (bug#52856).
In addition, make xwidget-webkit-clone-* commands work.

* lisp/xwidget.el (xwidget-webkit-clone-and-split-below)
(xwidget-webkit-clone-and-split-right): Unbreak these functions by
passing just the URL to them, not the message displaying it.
(xwidget-webkit-bookmark-jump-new-session): Adjust doc string,
rephrasing and removing a customization suggestion that cannot
take effect.
(xwidget-webkit-bookmark-jump-handler): New autoloaded function.
(xwidget-webkit-bookmark-make-record): Use it.
(xwidget-webkit--create-new-session-buffer): New function
extracted from `xwidget-webkit-new-session'.
(xwidget-webkit-new-session): Use it.

2 years ago* lisp/tab-line.el (tab-line--get-tab-property): New function (bug#52881).
Juri Linkov [Fri, 31 Dec 2021 09:20:51 +0000 (11:20 +0200)]
* lisp/tab-line.el (tab-line--get-tab-property): New function (bug#52881).

(tab-line-auto-hscroll): Use ‘tab-line--get-tab-property’ instead of
‘get-pos-property 1’, and ‘get-text-property’ instead of
‘get-pos-property’.
(tab-line-select-tab, tab-line-close-tab): Use tab-line--get-tab-property.

2 years agoMinor improvements of 'lisp-directory' docs
Eli Zaretskii [Fri, 31 Dec 2021 08:56:28 +0000 (10:56 +0200)]
Minor improvements of 'lisp-directory' docs

* lisp/startup.el (lisp-directory):
* etc/NEWS:
* doc/lispref/loading.texi (Library Search): Improve wording of
documentation of 'lisp-directory' and related features.

2 years agoPrevent double buffering from being disabled on USE_BE_CAIRO builds
Po Lu [Fri, 31 Dec 2021 07:29:30 +0000 (07:29 +0000)]
Prevent double buffering from being disabled on USE_BE_CAIRO builds

The direct rendering code used in that situation never
completely worked, and the BDirectWindow destructor is also
buggy.  Completely remove that code in order to let us inherit
from BWindow, so as to prevent the buggy destructor from being
run.

* src/haiku_support.cc (cairo_format_from_color_space): Delete
function.
(class EmacsWindow): Inherit from BWindow.
(EmacsWindow): Call BWindow constructor instead.
(MessageReceived):
(DispatchMessage):
(FrameResized):
(FrameMoved):
(Zoom): Call BWindow functions instead.
(EmacsView_cairo_surface): Stop looking for surfaces in the
window.
(EmacsWindow_begin_cr_critical_section):
(EmacsWindow_end_cr_critical_section): Stop locking the window.

* src/haikufns.c (haiku_set_inhibit_double_buffering): Always
enable double buffering on Cairo builds.

2 years agoDon't select for gesture events on xwidgets if the server is too old
Po Lu [Fri, 31 Dec 2021 06:04:40 +0000 (14:04 +0800)]
Don't select for gesture events on xwidgets if the server is too old

* src/xwidget.c (x_draw_xwidget_glyph_string): Only select for
XI gesture events if the server supports XI 2.4 or later.

2 years ago(Fmake_finalizer): Check the arg is a function
Stefan Monnier [Fri, 31 Dec 2021 05:16:03 +0000 (00:16 -0500)]
(Fmake_finalizer): Check the arg is a function

* src/eval.c (syms_of_eval): Add `Qfunctionp`.
* src/alloc.c (Fmake_finalizer): Check the arg is a function.

2 years ago* lisp/emacs-lisp/package.el (package-get-version): Add fallback
Stefan Monnier [Fri, 31 Dec 2021 05:03:35 +0000 (00:03 -0500)]
* lisp/emacs-lisp/package.el (package-get-version): Add fallback

2 years agoDon't store docstrings of preloaded .el files in etc/DOC
Stefan Monnier [Fri, 31 Dec 2021 04:17:45 +0000 (23:17 -0500)]
Don't store docstrings of preloaded .el files in etc/DOC

Since the location of those files changes between build time and
installation time, this requires to tweak the file name used in those
(#$ . NNN) references during the dump so they don't hardcode the build
directory.  We do it in the same way as was already done for those
same file names in `load-history`, except we convert them back to
absolute file names more lazily (i.e. when fetching the actual
docstring rather than at startup), which requires remembering the
`lisp-dir` computed at startup in the new `lisp-directory` variable.

* src/Makefile.in ($(etc)/DOC): Don't scan Lisp files any more.

* src/lread.c (Fload): Use relative file names for `load-file-name`
when preloading for the dump, like we already did for `current-load-list`.
(read_list): Don't zero-out dynamic docstring references during the
preload since they won't be filled later by Snarf-documentation any more.
(read1): Remove the hash-hack for doc references that were zeroed.

* lisp/startup.el (lisp-directory): New variable.
(command-line): Set it.

* src/doc.c (get_doc_string): Use `lisp-directory` for dynamic
docstring references using relative file names.
(syms_of_doc): Add `Qlisp_directory`.

* lib-src/make-docfile.c (scan_file): Don't handle `.el` or `.elc`
files any more.
(IS_SLASH): Remove macro, not used any more.
(skip_white, read_lisp_symbol, search_lisp_doc_at_eol)
(scan_lisp_file): Remove functions, not used any more.

* doc/lispref/loading.texi (Library Search): Mention `lisp-directory`.

2 years agoAdd pinch event support to xwidgets
Po Lu [Fri, 31 Dec 2021 02:07:30 +0000 (10:07 +0800)]
Add pinch event support to xwidgets

* src/xterm.c (handle_one_xevent): Pass through pinch events to
xwidgets and provide root coordinates when translating motion
events.
* src/xwidget.c (xwidget_motion_notify): Use provided root
window coordinates.
(xwidget_pinch): New function.
* src/xwidget.h (xwidget_motion_notify): Update prototype.
(xwidget_pinch): New function prototype.

2 years agoRestore original xwidget embedder after performing a lispy event
Po Lu [Fri, 31 Dec 2021 01:27:12 +0000 (09:27 +0800)]
Restore original xwidget embedder after performing a lispy event

* src/xwidget.c (Fxwidget_perform_lispy_event): Restore original
embedder after performing event.
(Fdelete_xwidget_view): Block input around non-reentrant
section.