]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoDisplay caret in preedit text where the input method asked
Po Lu [Sun, 9 Jan 2022 11:46:14 +0000 (19:46 +0800)]
Display caret in preedit text where the input method asked

* src/xfns.c (xic_preedit_start_callback): Clear caret position.
(xic_preedit_caret_callback): Record new caret position and
announce it.
(xic_preedit_done_callback): Clear caret position.
(xic_preedit_draw_callback): Set caret position appropriately.

2 years agoFix native GTK input for cyrillic input methods
Po Lu [Sun, 9 Jan 2022 10:14:26 +0000 (18:14 +0800)]
Fix native GTK input for cyrillic input methods

* src/gtkutil.c (xg_widget_key_press_cb): Get unicode mapping of
keyval if string doesn't exist.
* src/xterm.c (handle_one_xevent): Fix build without
HAVE_X_I18N.

2 years agoNew minor mode elide-head-mode
Stefan Kangas [Sun, 9 Jan 2022 10:11:47 +0000 (11:11 +0100)]
New minor mode elide-head-mode

* lisp/elide-head.el (elide-head-mode): New minor mode.  (Bug#52980)
(elide-head--delete-overlay, elide-head--show)
(elide-head--hide): New functions factored out from ...
(elide-head, elide-head-show): ... here.  Make obsolete in favor
of elide-head-mode.
(elide-head-headers-to-hide): Doc fix.

* test/lisp/elide-head-tests.el (ert-x): Require.
(elide-head-tests-elide-head-mode)
(elide-head-tests-elide-head-mode/enable-disable)
(elide-head-tests-elide-head-mode/normal-mode)
(elide-head-tests-elide-head-mode/revert-buffer): New tests.
(elide-head--add-test): Update test to use elide-head-mode.
(elide-head-tests-elide-head)
(elide-head-tests-elide-head-with-prefix-arg)
(elide-head-tests-show): Make obsolete.

2 years ago* lisp/term/x-win.el (x-preedit-text): Make edit overlay window local.
Po Lu [Sun, 9 Jan 2022 09:50:51 +0000 (17:50 +0800)]
* lisp/term/x-win.el (x-preedit-text): Make edit overlay window local.

2 years agoReduce flicker on Haiku Emacs tooltips
Po Lu [Sun, 9 Jan 2022 06:54:08 +0000 (06:54 +0000)]
Reduce flicker on Haiku Emacs tooltips

* src/haikuterm.c (haiku_read_socket): Ignore motion events from
tooltip frames.

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

30f1bdb41f Clarify docstring of package-native-compile
c54fda643d Fix Subject "simplification" in Rmail

2 years ago; * src/image.c (syms_of_image): Fix typo in last change.
Po Lu [Sun, 9 Jan 2022 05:04:15 +0000 (05:04 +0000)]
; * src/image.c (syms_of_image): Fix typo in last change.

2 years ago* src/image.c (syms_of_image): Declare support for webp on Haiku.
Po Lu [Sun, 9 Jan 2022 05:00:37 +0000 (05:00 +0000)]
* src/image.c (syms_of_image): Declare support for webp on Haiku.

2 years agoAdd support for native webp images on Haiku
Po Lu [Sun, 9 Jan 2022 04:44:16 +0000 (04:44 +0000)]
Add support for native webp images on Haiku

* src/haikuimage.c (haiku_can_use_native_image_api): Add support
for `webp' images.

2 years agoMake caps lock work on Haiku
Po Lu [Sun, 9 Jan 2022 04:32:57 +0000 (04:32 +0000)]
Make caps lock work on Haiku

* src/haiku_support.cc (map_caps):
(map_caps_shift): New functions.
(DispatchMessage): Map keys with the appropriate map if caps
lock is on.

2 years agoFix some problems with Haiku font display
Po Lu [Sun, 9 Jan 2022 03:24:44 +0000 (03:24 +0000)]
Fix some problems with Haiku font display

* src/haiku_font_support.cc (BFont_char_bounds): Fix rounding
errors.
(BFont_open_pattern): Set size before setting family and style.

2 years agoClarify docstring of package-native-compile
Stefan Kangas [Sun, 9 Jan 2022 02:15:34 +0000 (03:15 +0100)]
Clarify docstring of package-native-compile

* lisp/emacs-lisp/package.el (package-native-compile): Clarify
docstring.

2 years agoImplement override redirect on Haiku
Po Lu [Sun, 9 Jan 2022 01:28:22 +0000 (01:28 +0000)]
Implement override redirect on Haiku

* src/haiku_support.cc (pre_override_redirect_style):
(pre_override_redirect_feel): New variables.
(BWindow_set_override_redirect):
* src/haiku_support.h (BWindow_set_override_redirect): New
functions.
* src/haikufns.c (haiku_create_frame): Set override redirect.
(haiku_set_override_redirect): New function.
(haiku_frame_parm_handlers): Add `haiku_set_override_redirect'

2 years agoFix some portability bugs in gtkutil.c
Po Lu [Sun, 9 Jan 2022 00:51:35 +0000 (08:51 +0800)]
Fix some portability bugs in gtkutil.c

* src/gtkutil.c (xg_widget_key_press_event_cb): Surround raising
SIGIO with USABLE_SIGIO.

2 years agoFix Subject "simplification" in Rmail
Eli Zaretskii [Sat, 8 Jan 2022 14:32:01 +0000 (16:32 +0200)]
Fix Subject "simplification" in Rmail

* lisp/mail/rmail.el (rmail-simplified-subject): Match against
"[external]" _after_ decoding the Subject by RFC-2047.

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Sat, 8 Jan 2022 13:43:28 +0000 (14:43 +0100)]
; Merge from origin/emacs-28

The following commit was skipped:

d193801f59 Bump Emacs version to 28.0.91

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sat, 8 Jan 2022 13:43:28 +0000 (14:43 +0100)]
Merge from origin/emacs-28

d2284b0353 ; Update files for 28.0.91 pretest

# Conflicts:
# lisp/ldefs-boot.el

2 years agoMake sure native keypresses are received immediately on GTK
Po Lu [Sat, 8 Jan 2022 13:28:11 +0000 (21:28 +0800)]
Make sure native keypresses are received immediately on GTK

* src/gtkutil.c (xg_widget_key_press_event_cb): Send input
available signal.

2 years agoFix pinch-to-scale on real X servers and NS
Po Lu [Sat, 8 Jan 2022 12:53:02 +0000 (20:53 +0800)]
Fix pinch-to-scale on real X servers and NS

* lisp/face-remap.el (text-scale-pinch): Stop waiting for
more events.

2 years agoCorrectly translate GDK virtual modifiers when using native input
Po Lu [Sat, 8 Jan 2022 12:42:10 +0000 (20:42 +0800)]
Correctly translate GDK virtual modifiers when using native input

* src/gtkutil.c (xg_virtual_mods_to_x): New function.
(xg_widget_key_press_event_cb): Translate modifiers to X first.

2 years agoAdapt Tramp for `auth-info-password'
Michael Albinus [Sat, 8 Jan 2022 12:38:18 +0000 (13:38 +0100)]
Adapt Tramp for `auth-info-password'

* lisp/net/tramp-compat.el (tramp-compat-auth-info-password):
New defalias.

* lisp/net/tramp.el (tramp-read-passwd): Use it.

2 years agoBump Emacs version to 28.0.91 emacs-28.0.91
Stefan Kangas [Sat, 8 Jan 2022 10:50:25 +0000 (11:50 +0100)]
Bump Emacs version to 28.0.91

* README:
* configure.ac:
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version to 28.0.91.

2 years ago; Update files for 28.0.91 pretest
Stefan Kangas [Sat, 8 Jan 2022 10:39:45 +0000 (11:39 +0100)]
; Update files for 28.0.91 pretest

* ChangeLog.3:
* etc/AUTHORS:
* lisp/ldefs-boot.el: Update.

2 years ago* src/haikuterm.c (haiku_clear_frame): Fix clipping.
Po Lu [Sat, 8 Jan 2022 10:41:05 +0000 (10:41 +0000)]
* src/haikuterm.c (haiku_clear_frame): Fix clipping.

2 years agoAdd an option to rely on passive touch grabs on X
Po Lu [Sat, 8 Jan 2022 10:24:53 +0000 (18:24 +0800)]
Add an option to rely on passive touch grabs on X

This prevents crashes with three-finger touch gestures on
Xwayland running on GNOME Shell, and also when running some
programs that make use of an Emacs window's XID on the same X
server.

* src/xterm.c (handle_one_xevent): Respect
`x-input-grab-touch-events'.
(syms_of_xterm): New option `x-input-grab-touch-events.

2 years ago; Fix last change.
Eli Zaretskii [Sat, 8 Jan 2022 09:13:03 +0000 (11:13 +0200)]
; Fix last change.

2 years agoImprove documentation of native input methods
Eli Zaretskii [Sat, 8 Jan 2022 09:10:42 +0000 (11:10 +0200)]
Improve documentation of native input methods

* doc/emacs/mule.texi (International, Input Methods)
(Unibyte Mode): Document user-level features of native input
methods.

2 years ago* lisp/cus-start.el (standard): Fix standard customizables for PGTK.
Po Lu [Sat, 8 Jan 2022 07:30:02 +0000 (15:30 +0800)]
* lisp/cus-start.el (standard): Fix standard customizables for PGTK.

2 years agoFix build on PGTK
Po Lu [Sat, 8 Jan 2022 07:27:50 +0000 (15:27 +0800)]
Fix build on PGTK

* src/gtkutil.c (xg_mark_data):
* src/gtkutil.h (xg_filter_key): Ifdef out definitions on PGTK.

2 years agoAllow using GTK+ to handle input methods on X
Po Lu [Sat, 8 Jan 2022 07:21:51 +0000 (15:21 +0800)]
Allow using GTK+ to handle input methods on X

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

* lisp/cus-start.el (standard): Add `x-gtk-use-native-input'.
* src/gtkutil.c (xg_mark_data): Mark xg_pending_quit_event.
(xg_add_virtual_mods):
(xg_im_context_commit):
(xg_im_context_preedit_changed):
(xg_im_context_preedit_end):
(xg_widget_key_press_event_cb):
(xg_filter_key): New functions.
* src/gtkutil.h: Add prototype for `xg_filter_key'.
* src/xfns.c (xic_set_preeditarea): Set cursor location for the
GTK IM context as well.
* src/xterm.c (xg_pending_quit_event): New variable.
(x_focus_changed): Set focus on the GTK input context as well.
(x_filter_event): Filter events through GTK if the user asked
for it.
(handle_one_xevent): Likewise.
(XTread_socket): Set hold_quit to xg_pending_quit_event if it
exists.
(x_draw_window_cursor): Always set preedit area even if XIC
doesn't exist.
* src/xterm.h (struct x_display_info): New field
`prefer_native_input'.
(struct x_output): New field `im_context'.

2 years ago* src/pgtkterm.c (pgtk_enqueue_string): Free return of g_utf8_to_ucs4.
Po Lu [Sat, 8 Jan 2022 03:18:59 +0000 (11:18 +0800)]
* src/pgtkterm.c (pgtk_enqueue_string): Free return of g_utf8_to_ucs4.

2 years agoCall EVENT_INIT in some places
Po Lu [Sat, 8 Jan 2022 03:16:22 +0000 (11:16 +0800)]
Call EVENT_INIT in some places

* src/xfns.c (xic_preedit_done_callback):
(xic_preedit_draw_callback): Call EVENT_INIT.

2 years agoAdd `auth-info-password' and use it instead of ad hoc code
Sam Steingold [Thu, 6 Jan 2022 19:42:10 +0000 (14:42 -0500)]
Add `auth-info-password' and use it instead of ad hoc code

* lisp/auth-source.el (auth-info-password):
  Extract from `auth-source-pick-first-password'.
(auth-source-pick-first-password, auth-source-secrets-create)
(auth-source-user-and-password): Use `auth-info-password'.
* lisp/erc/erc-services.el (erc-nickserv-get-password):
  Use `auth-source-pick-first-password'.
* lisp/erc/erc.el (erc-open, erc-server-join-channel): Likewise.
* lisp/gnus/mail-source.el (mail-source-set-1): Add a comment.
* lisp/gnus/nnimap.el (nnimap-credentials): Use `auth-info-password'.
* lisp/gnus/nntp.el (nntp-send-authinfo): Likewise.
* lisp/mail/rmail.el (rmail-get-remote-password): Likewise.
* lisp/mail/smtpmail.el (smtpmail-try-auth-methods): Likewise.
* lisp/net/sieve-manage.el (sieve-sasl-auth): Likewise.
* lisp/net/tramp.el (tramp-read-passwd): Likewise.
* lisp/net/rcirc.el (rcirc): Likewise (fixes a bug: the possibility
  that password might be a function was not handled).

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.