]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoFix "C-SPC C-SPC" after "C-x C-x"
Eli Zaretskii [Fri, 7 Jan 2022 18:30:17 +0000 (20:30 +0200)]
Fix "C-SPC C-SPC" after "C-x C-x"

* lisp/simple.el (exchange-point-and-mark): Fix what the command
does when 'transient-mark-mode' is OFF.  (Bug#52896)

2 years agoMinor improvements for 'pgtk' documentation
Eli Zaretskii [Fri, 7 Jan 2022 14:38:47 +0000 (16:38 +0200)]
Minor improvements for 'pgtk' documentation

* src/dispnew.c (syms_of_display) <initial-window-system>
<window-system>:
* src/frame.c (Fwindow_system):
* doc/lispref/display.texi (Defining Faces, Window Systems):
* doc/lispref/frames.texi (Frames): Mention/explain 'pgtk'/'haiku'.
* doc/lispref/commands.texi (Misc Events): Fix @example and
markup.

2 years agoHandle internal events specially on PGTK
Yuuki Harano [Fri, 7 Jan 2022 13:09:13 +0000 (22:09 +0900)]
Handle internal events specially on PGTK

* src/xgselect.c (xg_select): If there are pending events already,
don't sleep.

2 years agoWrite documentation about ARG of the preedit-text event on PGTK
Yuuki Harano [Fri, 7 Jan 2022 12:13:16 +0000 (21:13 +0900)]
Write documentation about ARG of the preedit-text event on PGTK

* doc/lispref/commands.texi (Misc Events):

2 years agoFix special-cased cursor foreground and background correctly on PGTK
Po Lu [Fri, 7 Jan 2022 12:01:11 +0000 (20:01 +0800)]
Fix special-cased cursor foreground and background correctly on PGTK

* src/pgtkfns.c (x_set_foreground_color):
(x_set_background_color): Set cursor color as well if
appropriate.  (bug#53073)

2 years agoAdd documentation for the `none' input style
Po Lu [Fri, 7 Jan 2022 11:08:56 +0000 (19:08 +0800)]
Add documentation for the `none' input style

* doc/emacs/xresources.texi (Table of Resources): Document
missing value of `inputStyle'.

2 years ago; * doc/lispref/commands.texi (Misc Events): Fix typo.
Po Lu [Fri, 7 Jan 2022 11:05:42 +0000 (19:05 +0800)]
; * doc/lispref/commands.texi (Misc Events): Fix typo.

2 years ago* admin/MAINTAINERS: Describe Modus themes as externally maintained package
Protesilaos Stavrou [Fri, 7 Jan 2022 09:40:54 +0000 (11:40 +0200)]
* admin/MAINTAINERS: Describe Modus themes as externally maintained package

2 years ago* doc/lispref/display.texi (Face Attributes): Update doc for new values.
Po Lu [Fri, 7 Jan 2022 09:24:41 +0000 (17:24 +0800)]
* doc/lispref/display.texi (Face Attributes): Update doc for new values.

2 years agoImprove documentation of the preedit-text event
Po Lu [Fri, 7 Jan 2022 09:23:25 +0000 (17:23 +0800)]
Improve documentation of the preedit-text event

* doc/lispref/commands.texi (Misc Events): Document how
`preedit-text' events are used.

2 years agoDisable new input method behaviour by default on X
Po Lu [Fri, 7 Jan 2022 09:22:14 +0000 (17:22 +0800)]
Disable new input method behaviour by default on X

* src/xfns.c (supported_xim_styles): Default to STYLE_NONE.

2 years ago; * doc/lispref/commands.texi (Misc Events): Fix wording.
Eli Zaretskii [Fri, 7 Jan 2022 08:11:33 +0000 (10:11 +0200)]
; * doc/lispref/commands.texi (Misc Events): Fix wording.

2 years ago; * doc/emacs/xresources.texi (Table of Resources): Use @table.
Eli Zaretskii [Fri, 7 Jan 2022 07:57:43 +0000 (09:57 +0200)]
; * doc/emacs/xresources.texi (Table of Resources): Use @table.

2 years agoAllow controlling the X input method style
Po Lu [Fri, 7 Jan 2022 07:38:12 +0000 (15:38 +0800)]
Allow controlling the X input method style

* doc/emacs/xresources.texi (Table of Resources): Document new
resource `inputStyle'.
* etc/NEWS: Announce new resource.

* src/xfns.c (create_frame_xic): Give the display info to
`best_xim_style'.
(best_xim_style): Take the display's preferred style into
account.

* src/xterm.c (x_term_init): Parse the preferred style if
inputStyle is set.

* src/xterm.h (struct x_display_info): New field
`preferred_xim_style'.

(STYLE_OFFTHESPOT, STYLE_OVERTHESPOT, STYLE_ROOT):
(STYLE_CALLBACK, STYLE_NONE): New macros.

2 years ago* src/haikuselect.c: Fix implicit declaration of free.
Po Lu [Fri, 7 Jan 2022 06:52:52 +0000 (06:52 +0000)]
* src/haikuselect.c: Fix implicit declaration of free.

2 years agoDisplay pre-edit information from X input methods
Po Lu [Fri, 7 Jan 2022 06:35:29 +0000 (14:35 +0800)]
Display pre-edit information from X input methods

This also repurposes the `pgtk-preedit-text' event to be
meaningful on X, renames it `preedit-text', and documents it.

* doc/lispref/commands.texi (Misc Events): Document
`preedit-text'.
* lisp/term/pgtk-win.el (pgtk-preedit-text): Bind to
`preedit-text' instead.
* lisp/term/x-win.el (x-preedit-overlay): New variable.
(x-preedit-text): New command, bound as a special event to
`preedit-text'.

* src/keyboard.c (kbd_buffer_get_event):
(make_lispy_event): Rename PGTK_PREEDIT_TEXT_EVENT
PREEDIT_TEXT_EVENT.
(syms_of_keyboard): New defsym `preedit-text'.
* src/pgtkterm.c (pgtk_enqueue_preedit): Use PREEDIT_TEXT_EVENT
instead.
* src/termhooks.h (enum event_kind): Rename
`PGTK_PREEDIT_TEXT_EVENT' `PREEDIT_TEXT_EVENT'.

* src/xfns.c (Xxic_preedit_draw_callback):
(Xxic_preedit_caret_callback):
(Xxic_preedit_done_callback):
(Xxic_preedit_start_callback): New callback variables.

(STYLE_OFFTHESPOT, STYLE_OVERTHESPOT):
(STYLE_ROOT, STYLE_CALLBACK, STYLE_NONE): New macros.
(supported_xim_styles): Use reasonable values.  This also serves
as a better fix for bug#10867.
(best_xim_style): Restore code deleted as part of the original
fix for bug#10867.
(create_frame_xic): Add preedit callbacks.
(xic_set_preeditarea): Add preedit callbacks.
(x_xic_to_frame):
(xic_preedit_start_callback):
(xic_preedit_caret_callback):
(xic_preedit_done_callback):
(x_xim_text_to_utf8_unix):
(xic_preedit_draw_callback): New functions.

* src/xterm.c (x_detect_focus_change): Fix type of XI event.
(x_free_frame_resources): Free preedit text buffer if still
present.
* src/xterm.h (struct x_output): New fields `preedit_size',
`preedit_chars' and `preedit_active'.

2 years ago* admin/MAINTAINERS: Add myself for some things.
Po Lu [Fri, 7 Jan 2022 01:00:59 +0000 (09:00 +0800)]
* admin/MAINTAINERS: Add myself for some things.

2 years ago; Fix recent changes in rcirc documentation
Eli Zaretskii [Thu, 6 Jan 2022 16:53:45 +0000 (18:53 +0200)]
; Fix recent changes in rcirc documentation

* doc/misc/rcirc.texi (Changing the time stamp format):
* lisp/net/rcirc.el (rcirc-when): Fix documentation wording.

2 years ago; * NEWS: Revert typo from last commit
Philip Kaludercic [Thu, 6 Jan 2022 13:59:41 +0000 (14:59 +0100)]
; * NEWS: Revert typo from last commit

2 years agoAdd rcirc-when command
Philip Kaludercic [Thu, 6 Jan 2022 13:55:59 +0000 (14:55 +0100)]
Add rcirc-when command

* doc/misc/rcirc.texi: Document rcirc-when.
* etc/NEWS: Document rcirc-when.
* lisp/net/rcirc.el (rcirc-when): Add command.

2 years agoImprove documentation of font-related face attributes
Eli Zaretskii [Thu, 6 Jan 2022 13:47:21 +0000 (15:47 +0200)]
Improve documentation of font-related face attributes

* lisp/faces.el (set-face-attribute): Mention aliases of face
attributes.  (Bug#53050)

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Thu, 6 Jan 2022 13:47:17 +0000 (15:47 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years ago* admin/MAINTAINERS: Describe Tramp as externally maintained package
Michael Albinus [Thu, 6 Jan 2022 12:38:50 +0000 (13:38 +0100)]
* admin/MAINTAINERS: Describe Tramp as externally maintained package

2 years agoRevert "Fix selection of fonts that don't have regular weight"
Eli Zaretskii [Thu, 6 Jan 2022 12:16:53 +0000 (14:16 +0200)]
Revert "Fix selection of fonts that don't have regular weight"

This reverts commit 1b2511fa2aed460120a36765ba16c14e355eef1d.
That commit caused unintended regressions which are worse
than the problem it attempted to fix.  See the discussion at

  https://lists.gnu.org/archive/html/emacs-devel/2021-12/msg01643.html

for the details.

2 years agoRemove some more useless clipping stack calls on Haiku
Po Lu [Thu, 6 Jan 2022 12:05:47 +0000 (12:05 +0000)]
Remove some more useless clipping stack calls on Haiku

* src/haikuterm.c (haiku_draw_box_rect):
(haiku_draw_relief_rect):
(haiku_draw_text_decoration): Get rid of calls to
BView_StartClip and BView_EndClip.

2 years agoGenerate TOUCH_END_EVENTs on NS when mwheel momentum is disabled
Po Lu [Thu, 6 Jan 2022 11:35:18 +0000 (19:35 +0800)]
Generate TOUCH_END_EVENTs on NS when mwheel momentum is disabled

* src/nsterm.m ([EmacsView mouseDown:]): Generate
TOUCH_END_EVENTs on the first event whose momentum phase is not
NSEventPhaseNone.

2 years agoMake sure touch end events aren't sent too many times
Po Lu [Thu, 6 Jan 2022 11:11:56 +0000 (19:11 +0800)]
Make sure touch end events aren't sent too many times

* src/xterm.c (handle_one_xevent): Don't send touch end events
twice if two valuators have their masks set without a change in
value.

2 years agoAdd group to xkey state before filtering it on XI_KeyRelease
Po Lu [Thu, 6 Jan 2022 07:50:52 +0000 (15:50 +0800)]
Add group to xkey state before filtering it on XI_KeyRelease

* src/xterm.c (handle_one_xevent): Add group to xkey.state
before filtering an XI2 key release event.  This fixes fcitx on
some systems.

2 years agoFix GNUstep compilation warnings
Po Lu [Thu, 6 Jan 2022 06:10:52 +0000 (14:10 +0800)]
Fix GNUstep compilation warnings

* src/Makefile.in (NON_OBJC_CFLAGS): Add `-Wnested-externs'.
* src/emacs.c (load_pdump): Only define exec_bufsize if
!NS_SELF_CONTAINED.
* src/image.c (ARGB_TO_ULONG): Don't define if HAVE_NS.
* src/nsterm.m (ns_destroy_window): Pacify incorrect GCC
warning.
(ns_query_color): Make static.
(ns_run_loop_break): Fix old-style definition.
([EmacsView toggleFullScreen:]): Remove unused variable.

2 years agoFix duplicate overhang display on GNUstep
Po Lu [Thu, 6 Jan 2022 06:02:43 +0000 (14:02 +0800)]
Fix duplicate overhang display on GNUstep

* src/nsfont.m (nsfont_draw): Stop saving DPS clip and remove
workaround for bad clipping.
* src/nsterm.m (ns_draw_glyph_string): Clip to glyph string rect
when displaying overhangs.

2 years ago* src/xterm.c (handle_one_xevent): Check for errors when kbd map.
Po Lu [Thu, 6 Jan 2022 01:45:20 +0000 (09:45 +0800)]
* src/xterm.c (handle_one_xevent): Check for errors when kbd map.

2 years agocl-generic.el: Fix bug#46722
Stefan Monnier [Wed, 5 Jan 2022 19:28:08 +0000 (14:28 -0500)]
cl-generic.el: Fix bug#46722

Fix longstanding bug due to unexpected interference via side-effect.

* lisp/emacs-lisp/cl-generic.el (cl--generic-get-dispatcher):
Copy the `dispatch` arg before storing it into the hash-table.

2 years ago* lisp/textmodes/paragraphs.el (repunctuate-sentences): Use filter variable.
Juri Linkov [Wed, 5 Jan 2022 18:47:20 +0000 (20:47 +0200)]
* lisp/textmodes/paragraphs.el (repunctuate-sentences): Use filter variable.

(repunctuate-sentences-filter)<defun>:
Reimplement without using match data.
(repunctuate-sentences-filter)<defvar>: New variable.
(repunctuate-sentences): Use new variable.
Remove regexp group from spaces as was before.
https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg00395.html

2 years agoFix typo in cvs-status-mode-map keymap
Lars Ingebrigtsen [Wed, 5 Jan 2022 16:07:07 +0000 (17:07 +0100)]
Fix typo in cvs-status-mode-map keymap

* lisp/vc/cvs-status.el (cvs-status-mode-map): Fix typo in keymap
definition.

2 years ago; * lisp/buff-menu.el (Buffer-menu-mode-map): Fix warning.
Stefan Kangas [Wed, 5 Jan 2022 13:54:24 +0000 (14:54 +0100)]
; * lisp/buff-menu.el (Buffer-menu-mode-map): Fix warning.

2 years ago; Fix typo in last change.
Eli Zaretskii [Wed, 5 Jan 2022 13:14:54 +0000 (15:14 +0200)]
; Fix typo in last change.

2 years agoFix info-lookup docs and "C-h S" in major-modes with no manuals
Eli Zaretskii [Wed, 5 Jan 2022 13:11:24 +0000 (15:11 +0200)]
Fix info-lookup docs and "C-h S" in major-modes with no manuals

* lisp/info-look.el (info-lookup-alist, info-lookup-add-help)
(info-lookup-symbol, info-lookup-file, info-lookup)
(info-lookup-interactive-arguments): Clarify and expand the doc
strings.
(info-lookup-change-mode): Topic values can have their `:mode' as
a cons cell, not just a mode's symbol; support that.

2 years agoEnable subpixel antialiasing on the Cairo font driver on Haiku
Po Lu [Wed, 5 Jan 2022 12:02:32 +0000 (12:02 +0000)]
Enable subpixel antialiasing on the Cairo font driver on Haiku

* src/ftcrfont.c (ftcrfont_open): Manually enable subpixel
antialiasing on Haiku.

* src/haiku_support.cc
(get_subpixel_antialiasing): New function declaration.
(be_use_subpixel_antialising):
* src/haiku_support.h (be_use_subpixel_antialising): New
functions.

2 years ago* lisp/buff-menu.el (Buffer-menu-mode-map): Use defvar-keymap.
Stefan Kangas [Wed, 5 Jan 2022 11:07:10 +0000 (12:07 +0100)]
* lisp/buff-menu.el (Buffer-menu-mode-map): Use defvar-keymap.

2 years agoResolve clipping related mysteries on Haiku
Po Lu [Wed, 5 Jan 2022 10:34:43 +0000 (10:34 +0000)]
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.

2 years agoMake sure mouse face doesn't stay on the cursor after it is cleared
Po Lu [Wed, 5 Jan 2022 06:53:57 +0000 (14:53 +0800)]
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.

2 years agoSimply conditions for mouse face display when drawing cursor on Haiku
Po Lu [Wed, 5 Jan 2022 06:26:31 +0000 (06:26 +0000)]
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.

2 years agoRemove some unnecessary graphics state saves on Haiku
Po Lu [Wed, 5 Jan 2022 06:05:05 +0000 (06:05 +0000)]
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.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Wed, 5 Jan 2022 05:30:39 +0000 (06:30 +0100)]
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

2 years agoFix xwidgets setting their own signal handlers
Po Lu [Wed, 5 Jan 2022 02:36:40 +0000 (10:36 +0800)]
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)

2 years agoFix display of internal border in child frames on pgtk
Po Lu [Wed, 5 Jan 2022 02:16:06 +0000 (10:16 +0800)]
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)

2 years agoFix vc-git with old Git over Tramp and cygwin-mount.el
Dmitry Gutov [Wed, 5 Jan 2022 02:08:10 +0000 (04:08 +0200)]
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.

2 years agoCorrectly set up XI key input mask on X Toolkit builds
Po Lu [Wed, 5 Jan 2022 01:39:57 +0000 (09:39 +0800)]
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.

2 years ago* lisp/emacs-lisp/checkdoc.el (bytecomp): Add missing require
Philipp Stephani [Wed, 5 Jan 2022 00:41:46 +0000 (01:41 +0100)]
* lisp/emacs-lisp/checkdoc.el (bytecomp): Add missing require

2 years agocompletion--nth-completion: Throw meaningful error
Daniel Mendler [Tue, 4 Jan 2022 20:08:04 +0000 (21:08 +0100)]
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.

2 years agoUpdate from gnulib
Paul Eggert [Tue, 4 Jan 2022 21:13:25 +0000 (13:13 -0800)]
Update from gnulib

2 years agoRemove ambiguity from key-valid-p docstring
Robert Pluim [Tue, 4 Jan 2022 15:42:03 +0000 (16:42 +0100)]
Remove ambiguity from key-valid-p docstring

* lisp/keymap.el (key-valid-p): Be explicit about the separator
being one and only one space.

2 years agoImprove pp-emacs-lisp-code for #'
Lars Ingebrigtsen [Tue, 4 Jan 2022 14:50:56 +0000 (15:50 +0100)]
Improve pp-emacs-lisp-code for #'

* lisp/emacs-lisp/pp.el (pp--insert-lisp): Format (function ...)
as #'.

2 years agoA cleaner fix for display bug#52947
Eli Zaretskii [Tue, 4 Jan 2022 13:37:16 +0000 (15:37 +0200)]
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.

2 years agoAutoload decorator for windmove-mode
Jimmy Aguilar Mena [Tue, 4 Jan 2022 13:15:10 +0000 (14:15 +0100)]
Autoload decorator for windmove-mode

2 years agoTranslate more modifiers to GDK ones in xwidgets
Po Lu [Tue, 4 Jan 2022 11:56:58 +0000 (19:56 +0800)]
Translate more modifiers to GDK ones in xwidgets

* src/xwidget.c (xw_translate_x_modifiers): Also handle Control
and ShiftMask.

2 years agoStop assuming X kbd state works with GDK when forwarding events to xwidgets
Po Lu [Tue, 4 Jan 2022 11:30:07 +0000 (19:30 +0800)]
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.

2 years agoMake `x-file-dialog' arity match documentation on Haiku
Po Lu [Tue, 4 Jan 2022 11:15:07 +0000 (11:15 +0000)]
Make `x-file-dialog' arity match documentation on Haiku

* lisp/term/haiku-win.el (x-file-dialog): Fix arity.

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.