]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years ago* admin/MAINTAINERS: Add Tramp compatibility note
Michael Albinus [Mon, 10 Jan 2022 09:00:58 +0000 (10:00 +0100)]
* admin/MAINTAINERS: Add Tramp compatibility note

2 years agoUse phys cursor height instead of font base to set spot Y
Po Lu [Mon, 10 Jan 2022 06:38:18 +0000 (14:38 +0800)]
Use phys cursor height instead of font base to set spot Y

* src/xfns.c (xic_set_xfontset): Use `phys_cursor_height' to
avoid the spot potentially appearing at an incorrect position.

2 years agoDon't set callbacks on XIC when adjusting spot if callbacks are off
Po Lu [Mon, 10 Jan 2022 06:36:21 +0000 (14:36 +0800)]
Don't set callbacks on XIC when adjusting spot if callbacks are off

* src/xfns.c (xic_set_preeditarea): Don't set callbacks if the
XIC style is not XIMPreeditCallbacks.  (bug#53146)

2 years ago; * src/xterm.c (handle_one_xevent): Fix typo in last change.
Po Lu [Mon, 10 Jan 2022 03:34:57 +0000 (11:34 +0800)]
; * src/xterm.c (handle_one_xevent): Fix typo in last change.

2 years agoMake toggling native input methods via shift work again
Po Lu [Mon, 10 Jan 2022 03:29:35 +0000 (11:29 +0800)]
Make toggling native input methods via shift work again

* src/xterm.c (handle_one_xevent): Start filtering XI key
release events again, but drop the event if the IM asked.

2 years agoMake old elide-head commands wrappers for mode
Stefan Kangas [Mon, 10 Jan 2022 03:28:33 +0000 (04:28 +0100)]
Make old elide-head commands wrappers for mode

* lisp/elide-head.el (elide-head, elide-head-show): Make into
wrappers around elide-head-mode.

2 years agoDon't hard code key codes on Haiku
Po Lu [Mon, 10 Jan 2022 02:32:01 +0000 (02:32 +0000)]
Don't hard code key codes on Haiku

* src/haiku_support.cc (keysym_from_raw_char): New function.
(DispatchMessage): Map raw character to keysym if applicable.
(be_map_key): Delete function.
* src/haiku_support.h (struct haiku_key_event): Update fields
to hold keysym and character instead.
* src/haikuterm.c (haiku_read_socket): Don't call be_map_key,
and use keysym field if provided instead.

2 years agoMap some more keypad keys on Haiku
Po Lu [Mon, 10 Jan 2022 01:59:34 +0000 (01:59 +0000)]
Map some more keypad keys on Haiku

* src/haiku_support.cc (BMapKey): Rename to `be_map_key'.
(be_map_key): Recognize more key codes.
* src/haiku_support.h (BMapKey, be_map_key): Adjust accordingly.
* src/haikuterm.c (haiku_read_socket): Likewise.

2 years agoFix build without X11 I18N
Po Lu [Mon, 10 Jan 2022 01:00:48 +0000 (09:00 +0800)]
Fix build without X11 I18N

* src/xterm.c (event_handler_gdk):
(handle_one_xevent):
(x_draw_window_cursor):
(x_term_init): Fix build without HAVE_X_I18N.

2 years agoFix off-by-one errors in caret position application
Po Lu [Mon, 10 Jan 2022 00:40:26 +0000 (08:40 +0800)]
Fix off-by-one errors in caret position application

* src/gtkutil.c (xg_im_context_preedit_changed):
* src/xfns.c (xic_preedit_caret_callback):
(xic_preedit_draw_callback): Constrain caret position to
SCHARS (arg) - 1.

2 years ago* lisp/abbrev.el (edit-abbrevs-mode-map): Use defvar-keymap.
Stefan Kangas [Mon, 10 Jan 2022 00:03:22 +0000 (01:03 +0100)]
* lisp/abbrev.el (edit-abbrevs-mode-map): Use defvar-keymap.

2 years agoDo interactive mode tagging for edit-abbrevs-mode
Stefan Kangas [Sun, 9 Jan 2022 23:55:16 +0000 (00:55 +0100)]
Do interactive mode tagging for edit-abbrevs-mode

* lisp/abbrev.el (edit-abbrevs-redefine)
(abbrev-edit-save-to-file, abbrev-edit-save-buffer): Interactive mode
tagging for edit-abbrevs-mode.
(edit-abbrevs-mode): Make non-interactive.

2 years ago* lisp/gnus/nnnil.el (nnnil-close-server): Add new `defs` arg
Stefan Monnier [Sun, 9 Jan 2022 22:16:47 +0000 (17:16 -0500)]
* lisp/gnus/nnnil.el (nnnil-close-server): Add new `defs` arg

2 years ago; * src/filelock.c (lock_if_free): Fix comment wording.
Eli Zaretskii [Sun, 9 Jan 2022 17:21:03 +0000 (19:21 +0200)]
; * src/filelock.c (lock_if_free): Fix comment wording.

2 years agoAdd doc-string indices to easy-mmode-{defmap,defsyntax}
Ivan Sokolov [Mon, 3 Jan 2022 14:21:55 +0000 (17:21 +0300)]
Add doc-string indices to easy-mmode-{defmap,defsyntax}

* lisp/emacs-lisp/easy-mmode.el (easy-mmode-defmap)
(easy-mmode-defsyntax): Declare third argument as doc-string.
(Bug#52978)

2 years agoFix filelock.c for Haiku
Po Lu [Sun, 9 Jan 2022 13:30:26 +0000 (13:30 +0000)]
Fix filelock.c for Haiku

This was found during the investigation surrounding bug#53136,
but is not directly related.

* src/filelock.c (lock_if_free): Explictly test err against -1
or -2, and reverse sign of system errors on Haiku.  (No Haiku
error occupies -1 or -2.)

2 years agoAdd an option to display the cursor at the beginning of any preedit text
Po Lu [Sun, 9 Jan 2022 12:55:16 +0000 (20:55 +0800)]
Add an option to display the cursor at the beginning of any preedit text

Believe it or not, people actually want this, because it makes
Emacs behave closer to some other editors such as WPS Office.

* lisp/term/x-win.el
(x-display-cursor-at-start-of-preedit-string): New user option.
(x-preedit-text): Respect new option.

2 years agoPass through caret position from native GTK input methods
Po Lu [Sun, 9 Jan 2022 12:43:17 +0000 (20:43 +0800)]
Pass through caret position from native GTK input methods

* src/gtkutil.c (xg_im_context_preedit_changed): Set caret
position appropriately.
* src/xfns.c (xg_widget_key_press_event_cb): Ignore modifier
keys.
(xic_preedit_caret_callback, xic_preedit_draw_callback):
Constrain caret position to the string length as well.

2 years agoFix specification of caret position
Po Lu [Sun, 9 Jan 2022 12:29:39 +0000 (20:29 +0800)]
Fix specification of caret position

* src/xfns.c (xic_preedit_caret_callback):
(xic_preedit_draw_callback): Use `cursor' property correctly.

* src/xterm.c (handle_one_xevent): Stop filtering XI release
events.  This caused more problems than it fixed.

2 years ago; Minor wording fix in last NEWS entry.
Eli Zaretskii [Sun, 9 Jan 2022 12:14:10 +0000 (14:14 +0200)]
; Minor wording fix in last NEWS entry.

2 years agoAdd missing part of last commit
Po Lu [Sun, 9 Jan 2022 11:48:13 +0000 (19:48 +0800)]
Add missing part of last commit

* src/xterm.h (struct x_output): Add field `preedit_caret'.

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)