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

153437 commits

Author SHA1 Message Date
Po Lu
c1106b2ee7 Make sure native keypresses are received immediately on GTK
* src/gtkutil.c (xg_widget_key_press_event_cb): Send input
available signal.
2022-01-08 21:28:11 +08:00
Po Lu
e05512ba42 Fix pinch-to-scale on real X servers and NS
* lisp/face-remap.el (text-scale-pinch): Stop waiting for
more events.
2022-01-08 20:53:02 +08:00
Po Lu
2e60ca3713 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.
2022-01-08 20:44:47 +08:00
Michael Albinus
9652736b08 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.
2022-01-08 13:38:18 +01:00
Po Lu
a80125ae37 * src/haikuterm.c (haiku_clear_frame): Fix clipping. 2022-01-08 10:41:05 +00:00
Po Lu
86ed4b9858 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.
2022-01-08 18:24:53 +08:00
Eli Zaretskii
e86a2ce5fc ; Fix last change. 2022-01-08 11:13:03 +02:00
Eli Zaretskii
6bf1bb384c Improve documentation of native input methods
* doc/emacs/mule.texi (International, Input Methods)
(Unibyte Mode): Document user-level features of native input
methods.
2022-01-08 11:10:42 +02:00
Po Lu
f7c3d62833 * lisp/cus-start.el (standard): Fix standard customizables for PGTK. 2022-01-08 15:30:02 +08:00
Po Lu
79cc87f3b7 Fix build on PGTK
* src/gtkutil.c (xg_mark_data):
* src/gtkutil.h (xg_filter_key): Ifdef out definitions on PGTK.
2022-01-08 15:27:50 +08:00
Po Lu
d76fb0c11e 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'.
2022-01-08 15:21:51 +08:00
Po Lu
63c83e40da * src/pgtkterm.c (pgtk_enqueue_string): Free return of g_utf8_to_ucs4. 2022-01-08 11:18:59 +08:00
Po Lu
9bb71f8236 Call EVENT_INIT in some places
* src/xfns.c (xic_preedit_done_callback):
(xic_preedit_draw_callback): Call EVENT_INIT.
2022-01-08 11:16:22 +08:00
Sam Steingold
ad5cf84fa7 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).
2022-01-07 14:48:59 -05:00
Eli Zaretskii
19c6cad182 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)
2022-01-07 20:30:17 +02:00
Eli Zaretskii
c168afb6f6 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.
2022-01-07 16:38:47 +02:00
Yuuki Harano
f424ef88e2 Handle internal events specially on PGTK
* src/xgselect.c (xg_select): If there are pending events already,
don't sleep.
2022-01-07 22:09:13 +09:00
Yuuki Harano
a263824ae3 Write documentation about ARG of the preedit-text event on PGTK
* doc/lispref/commands.texi (Misc Events):
2022-01-07 21:17:27 +09:00
Po Lu
d4e48c3642 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)
2022-01-07 20:01:11 +08:00
Po Lu
62f3942b89 Add documentation for the `none' input style
* doc/emacs/xresources.texi (Table of Resources): Document
missing value of `inputStyle'.
2022-01-07 19:08:56 +08:00
Po Lu
4c6d9b921c ; * doc/lispref/commands.texi (Misc Events): Fix typo. 2022-01-07 19:07:37 +08:00
Protesilaos Stavrou
11626f0c0c
* admin/MAINTAINERS: Describe Modus themes as externally maintained package 2022-01-07 11:40:54 +02:00
Po Lu
f501b572ed * doc/lispref/display.texi (Face Attributes): Update doc for new values. 2022-01-07 17:26:15 +08:00
Po Lu
f041d61008 Improve documentation of the preedit-text event
* doc/lispref/commands.texi (Misc Events): Document how
`preedit-text' events are used.
2022-01-07 17:26:13 +08:00
Po Lu
259229bf37 Disable new input method behaviour by default on X
* src/xfns.c (supported_xim_styles): Default to STYLE_NONE.
2022-01-07 17:25:32 +08:00
Eli Zaretskii
1fae01dacf ; * doc/lispref/commands.texi (Misc Events): Fix wording. 2022-01-07 10:11:33 +02:00
Eli Zaretskii
d99e32436d ; * doc/emacs/xresources.texi (Table of Resources): Use @table. 2022-01-07 09:57:43 +02:00
Po Lu
1229bd8118 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.
2022-01-07 15:38:12 +08:00
Po Lu
808f69bf7a * src/haikuselect.c: Fix implicit declaration of free. 2022-01-07 06:52:52 +00:00
Po Lu
751789471c 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'.
2022-01-07 14:42:08 +08:00
Po Lu
48038cb2b2 * admin/MAINTAINERS: Add myself for some things. 2022-01-07 09:00:59 +08:00
Eli Zaretskii
7945d86829 ; Fix recent changes in rcirc documentation
* doc/misc/rcirc.texi (Changing the time stamp format):
* lisp/net/rcirc.el (rcirc-when): Fix documentation wording.
2022-01-06 18:53:45 +02:00
Philip Kaludercic
0ae38ec94a ; * NEWS: Revert typo from last commit 2022-01-06 14:59:41 +01:00
Philip Kaludercic
0d46683202 Add rcirc-when command
* doc/misc/rcirc.texi: Document rcirc-when.
* etc/NEWS: Document rcirc-when.
* lisp/net/rcirc.el (rcirc-when): Add command.
2022-01-06 14:56:23 +01:00
Eli Zaretskii
daedbb2f5b Improve documentation of font-related face attributes
* lisp/faces.el (set-face-attribute): Mention aliases of face
attributes.  (Bug#53050)
2022-01-06 15:47:21 +02:00
Eli Zaretskii
66e50562e8 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-01-06 15:47:17 +02:00
Michael Albinus
b4e709c41f * admin/MAINTAINERS: Describe Tramp as externally maintained package 2022-01-06 13:38:50 +01:00
Eli Zaretskii
ca25fde951 Revert "Fix selection of fonts that don't have regular weight"
This reverts commit 1b2511fa2a.
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.
2022-01-06 14:16:53 +02:00
Po Lu
cbe10f3753 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.
2022-01-06 12:05:47 +00:00
Po Lu
b3ceeb3f2a 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.
2022-01-06 19:35:18 +08:00
Po Lu
9fc20ad35c 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.
2022-01-06 19:11:56 +08:00
Po Lu
2ab73286b7 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.
2022-01-06 15:50:52 +08:00
Po Lu
3b1164de0e 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.
2022-01-06 14:10:52 +08:00
Po Lu
e882dd48e3 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.
2022-01-06 14:02:43 +08:00
Po Lu
5749c57e47 * src/xterm.c (handle_one_xevent): Check for errors when kbd map. 2022-01-06 09:45:20 +08:00
Stefan Monnier
61f8f7f68f 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.
2022-01-05 14:28:37 -05:00
Juri Linkov
2b59a42583 * 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
2022-01-05 20:47:20 +02:00
Lars Ingebrigtsen
0a51652f6d Fix typo in cvs-status-mode-map keymap
* lisp/vc/cvs-status.el (cvs-status-mode-map): Fix typo in keymap
definition.
2022-01-05 17:07:07 +01:00
Stefan Kangas
fab840e381 ; * lisp/buff-menu.el (Buffer-menu-mode-map): Fix warning. 2022-01-05 14:56:00 +01:00
Eli Zaretskii
bb0c197b77 ; Fix typo in last change. 2022-01-05 15:14:54 +02:00