]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoDon't do Gnus article emphasis in text/html parts
Lars Ingebrigtsen [Wed, 12 Jan 2022 05:28:19 +0000 (06:28 +0100)]
Don't do Gnus article emphasis in text/html parts

* lisp/gnus/gnus-art.el (gnus-treat-emphasize): Don't do emphasis
in text/html parts, because this leads to mis-filled text
(especially with *...* that's boldified, which typically becomes
much wider).

2 years agoFix arity error when trying to add a file to an automake project
Po Lu [Wed, 12 Jan 2022 03:25:15 +0000 (11:25 +0800)]
Fix arity error when trying to add a file to an automake project

* lisp/cedet/ede/project-am.el (project-add-file): Add ignored
_FILE parameter like the other `project-add-file' methods.

2 years agoFix display of text decorations in the mode line
Po Lu [Wed, 12 Jan 2022 03:09:52 +0000 (11:09 +0800)]
Fix display of text decorations in the mode line

This is considered a temporary fix until the cause of
fringe-overwriting underlines is established.

* src/xterm.c (x_draw_glyph_string): Don't constrain decorations
if the row is a tab or modeline.

2 years agoAvoid unnecessary lookup of min and max keycodes when XKB is present
Po Lu [Wed, 12 Jan 2022 02:24:01 +0000 (10:24 +0800)]
Avoid unnecessary lookup of min and max keycodes when XKB is present

* src/xterm.c (x_emacs_to_x_modifiers): Avoid calling
XDisplayKeycodes when that information is available in the xkb
desc and is not needed anyway.

2 years agoIgnore resetting devices upon some events we don't have to handle
Po Lu [Wed, 12 Jan 2022 01:28:48 +0000 (09:28 +0800)]
Ignore resetting devices upon some events we don't have to handle

* src/xterm.c (handle_one_xevent): Ignore SlaveSwitch
DeviceChanged events.

2 years agoRemove the filename argument from the command line after an ELC+ELN build
Alan Mackenzie [Tue, 11 Jan 2022 18:29:07 +0000 (18:29 +0000)]
Remove the filename argument from the command line after an ELC+ELN build

This fixes bug #53164.  Without this fix, bootstrap-emacs loads the source
file uselessly into a buffer after completing the compilation.

2 years ago* lisp/window.el (display-comint-buffer-action): Move to the end of file.
Juri Linkov [Tue, 11 Jan 2022 18:04:30 +0000 (20:04 +0200)]
* lisp/window.el (display-comint-buffer-action): Move to the end of file.

Move closer to pop-to-buffer-same-window after its default value
display-buffer--same-window-action is defined.

2 years ago* lisp/vc/vc.el (vc-shrink-buffer-window): New function (bug#51062).
Juri Linkov [Tue, 11 Jan 2022 17:34:54 +0000 (19:34 +0200)]
* lisp/vc/vc.el (vc-shrink-buffer-window): New function (bug#51062).

(vc-diff-finish-functions): New variable.
(vc-diff-finish): Use it.
(vc-log-finish-functions): New variable.
(vc-log-internal-common): Use it.

2 years ago* src/window.c (other-window-scroll-default): New variable (bug#51210).
Juri Linkov [Tue, 11 Jan 2022 17:28:52 +0000 (19:28 +0200)]
* src/window.c (other-window-scroll-default): New variable (bug#51210).

(Fother_window_for_scrolling): Use it.

2 years agoMore fixes for display-comint-buffer-action
Juri Linkov [Tue, 11 Jan 2022 17:19:37 +0000 (19:19 +0200)]
More fixes for display-comint-buffer-action

* lisp/window.el (display-comint-buffer-action):
Use display-buffer--same-window-action as the default value.

* lisp/progmodes/sh-script.el (sh-show-shell):
* lisp/shell.el (shell): Add display-comint-buffer-action to pop-to-buffer.

* lisp/progmodes/project.el (project-shell, project-eshell): Use
`bound-and-true-p display-comint-buffer-action' for backward-compatibility.

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

2 years agoFix display-comint-buffer-action default behavior (closes bug#52878)
Morgan Smith [Tue, 11 Jan 2022 17:13:04 +0000 (19:13 +0200)]
Fix display-comint-buffer-action default behavior (closes bug#52878)

* lisp/window.el (display-comint-buffer-action): Make it an alist.

2 years agoClean up filelock code related to errno
Paul Eggert [Tue, 11 Jan 2022 16:58:18 +0000 (08:58 -0800)]
Clean up filelock code related to errno

Reduce dependency on Haiku internals, by not assuming that
Haiku errno values (which are negative) are neither -1 nor -2.
This removes an #ifdef HAIKU while still maintaining
portability to Haiku.
* src/filelock.c (NEGATIVE_ERRNO, ANOTHER_OWNS_IT, I_OWN_IT):
New constants, which should work regardless of whether
we are on Haiku or B_USE_POSITIVE_POSIX_ERRORS is defined.
(current_lock_owner, lock_if_free, lock_file, unlock_file)
(Ffile_locked_p): Use them, without assuming anything about errno
value sign.

2 years agoFix userlock diagnostic
Paul Eggert [Tue, 11 Jan 2022 16:50:53 +0000 (08:50 -0800)]
Fix userlock diagnostic

* lisp/userlock.el (ask-user-about-lock):
Fix typo (missing paren) in diagnostic.

2 years ago; * doc/emacs/haiku.texi (Haiku Basics): Fix typo and wording.
Eli Zaretskii [Tue, 11 Jan 2022 15:17:05 +0000 (17:17 +0200)]
; * doc/emacs/haiku.texi (Haiku Basics): Fix typo and wording.

2 years agoStop ungrabbing when freeing XI devices
Po Lu [Tue, 11 Jan 2022 11:06:41 +0000 (19:06 +0800)]
Stop ungrabbing when freeing XI devices

This breaks when x_free_xi_devices is called from a
HierarchyChange event where a master device has been removed or
a slave device has been detached, and it should no longer be
required since we now rely on passive grabs.

* src/xterm.c (x_init_master_valuators): Stop calling
XIUngrabDevice on all devices.

2 years agoMake native input work on GTK 2
Po Lu [Tue, 11 Jan 2022 10:13:04 +0000 (18:13 +0800)]
Make native input work on GTK 2

* src/gtkutil.c (xg_create_frame_widgets): Allow focusing fixed
widget.

2 years agoStop decoding GTK event strings when using native input
Po Lu [Tue, 11 Jan 2022 10:06:37 +0000 (18:06 +0800)]
Stop decoding GTK event strings when using native input

* src/gtkutil.c (xg_widget_key_press_event_cb): Stop decoding
event strings.

2 years ago* lisp/outline.el (outline-minor-mode-cycle--bind): Fix outline-on-heading-p.
Juri Linkov [Tue, 11 Jan 2022 08:56:54 +0000 (10:56 +0200)]
* lisp/outline.el (outline-minor-mode-cycle--bind): Fix outline-on-heading-p.

When calling outline-on-heading-p, set its argument INVISIBLE-OK to t,
so when <backtab> (bound to outline-cycle-buffer) hides the current outline
at a deep level, <backtab> should continue cycling outlines even when
the current outline heading is invisible.  It worked this way before
the recent change that moved cycling keys from font-lock text properties
to outline-minor-mode keymap with :filter.

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

8db5f82d45 ; Fix tabulated-list-mode tests after revert

2 years agoFix creating GUI frames in an automatically started server on Haiku
Po Lu [Tue, 11 Jan 2022 05:36:09 +0000 (05:36 +0000)]
Fix creating GUI frames in an automatically started server on Haiku

* lisp/term/haiku-win.el: Correct specification of
`display-format-alist'.

2 years ago; Fix tabulated-list-mode tests after revert
Stefan Kangas [Tue, 11 Jan 2022 05:14:12 +0000 (06:14 +0100)]
; Fix tabulated-list-mode tests after revert

* test/lisp/emacs-lisp/tabulated-list-tests.el
(tabulated-list-print, tabulated-list-sort): Fix tests.

2 years ago(files-tests--with-buffer-offer-save): Turn it into a function
Stefan Monnier [Tue, 11 Jan 2022 03:40:55 +0000 (22:40 -0500)]
(files-tests--with-buffer-offer-save): Turn it into a function

* test/lisp/files-tests.el (files-tests--with-buffer-offer-save):
Turn it into a function.
(files-tests-save-buffers-kill-emacs--asks-to-save-buffers)
(files-tests-buffer-offer-save): Adjust calls accordingly

2 years ago(hack-one-local-variable-constantp): Mark as obsolete
Stefan Monnier [Tue, 11 Jan 2022 03:37:16 +0000 (22:37 -0500)]
(hack-one-local-variable-constantp): Mark as obsolete

* lisp/files.el (hack-one-local-variable-constantp): Mark as obsolete.
(hack-one-local-variable-eval-safep): Use `macroexp-const-p` instead.

2 years agoMerge remote-tracking branch 'origin/emacs-28' into trunk
Stefan Monnier [Tue, 11 Jan 2022 03:34:55 +0000 (22:34 -0500)]
Merge remote-tracking branch 'origin/emacs-28' into trunk

2 years agoUse 'auth-info-password' in tests
Sam Steingold [Sun, 9 Jan 2022 23:30:25 +0000 (18:30 -0500)]
Use 'auth-info-password' in tests

* test/lisp/auth-source-tests.el (auth-source-test-searches):
  (auth-source-test-secrets-create-secret):
  (auth-source-test-netrc-create-secret, auth-source-delete):
  Use 'auth-info-password' instead of ad hoc code.

2 years agoUpdate for the recent change
Sam Steingold [Sun, 9 Jan 2022 22:36:38 +0000 (17:36 -0500)]
Update for the recent change

* doc/misc/auth.texi (Help for developers): Document
  'auth-source-pick-first-password' and 'auth-info-password'.
  Update the 'auth-source-search' example.

2 years ago; * doc/lispref/display.texi (Face Attributes): Fix typo.
Po Lu [Tue, 11 Jan 2022 01:40:32 +0000 (09:40 +0800)]
; * doc/lispref/display.texi (Face Attributes): Fix typo.

2 years agoUse window beneath mouse for determining scroll deltas on Haiku
Po Lu [Tue, 11 Jan 2022 01:30:14 +0000 (01:30 +0000)]
Use window beneath mouse for determining scroll deltas on Haiku

* src/haikuterm.c (haiku_read_socket): Use window underneath
wheel for calculating scroll deltas.

2 years ago* src/filelock.c (lock_if_free): Fix Haiku positive errno check.
Po Lu [Tue, 11 Jan 2022 00:51:53 +0000 (00:51 +0000)]
* src/filelock.c (lock_if_free): Fix Haiku positive errno check.

2 years agoAssume C99 when defining pD
Paul Eggert [Mon, 10 Jan 2022 23:21:08 +0000 (15:21 -0800)]
Assume C99 when defining pD

* src/lisp.h (pD): Assume C99 or later, to simplify the ifdefs.

2 years agoDocument external maintenance of some packages
Karl Fogel [Mon, 10 Jan 2022 19:20:29 +0000 (13:20 -0600)]
Document external maintenance of some packages

Document the fact that some packages in Emacs are externally
maintained, and specifically document Org Mode's external maintenance.

For more context, see the thread that starts here:

  https://lists.gnu.org/archive/html/emacs-devel/2021-12/msg00366.html
  From: Karl Fogel
  To: Emacs Devel
  Subject: Improving documentation of Org Mode integration into Emacs.
  Date: Sat, 04 Dec 2021 15:14:59 -0600
  Message-ID: <87zgpgax7w.fsf@red-bean.com>

2 years agoAdd diff-mode-read-only to enable shorter keys in diff-mode
Juri Linkov [Mon, 10 Jan 2022 18:29:53 +0000 (20:29 +0200)]
Add diff-mode-read-only to enable shorter keys in diff-mode

To be able to use outline-minor-mode-cycle keys in diff-mode,
outline-minor-mode should be higher in minor-mode-map-alist,
and a new variable diff-mode-read-only should be set
when the diff-mode buffer is read-only.
https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg00740.html

* lisp/vc/diff-mode.el: Add diff-mode-read-only to minor-mode-map-alist.
(diff-mode-read-only): New buffer-local variable.
(diff-mode): Set diff-mode-read-only to t when buffer-read-only is non-nil.
Update diff-mode-read-only in read-only-mode-hook.
Remove buffer-read-only from minor-mode-overriding-map-alist.
Remove view-mode-hook because now view-mode is higher than
diff-mode-read-only in minor-mode-map-alist.

* lisp/vc/vc-git.el (vc-git-stash-show):
* lisp/vc/vc.el (vc-diff-internal): Set buffer-read-only to t
before calling diff-mode that will set diff-mode-read-only.

2 years ago* lisp/outline.el: Don't set outline-minor font-lock text property 'keymap'.
Juri Linkov [Mon, 10 Jan 2022 18:20:09 +0000 (20:20 +0200)]
* lisp/outline.el: Don't set outline-minor font-lock text property 'keymap'.

Instead of adding font-lock text property 'keymap' with
outline-minor-mode-cycle on headings in outline-minor-mode,
check for outline-minor-mode-cycle and outline-on-heading-p
in :filter on keys from the keymap of outline-minor-mode.
https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg00180.html

(outline-minor-mode-cycle--bind): Add a condition on outline-minor-mode-cycle
and outline-on-heading-p in :filter.
(outline-font-lock-keywords): Remove if-branches for outline-minor-mode-cycle
that added keymap.
(outline-minor-mode-highlight-buffer): Don't put keymap on overlays.
(outline-minor-mode): Rewrite :keymap setting to rely on
easy-mmode-define-keymap, and add :inherit outline-minor-mode-cycle-map.
Don't check for outline-minor-mode-cycle to add font-lock keywords.
(outline--insert-open-button, outline--insert-close-button):
Remove :parent outline-minor-mode-cycle-map.

2 years agoRevert "Remove the filename argument from the command line after an ELC+ELN build"
Eli Zaretskii [Mon, 10 Jan 2022 18:02:39 +0000 (20:02 +0200)]
Revert "Remove the filename argument from the command line after an ELC+ELN build"

This reverts commit ffc047c896413b6e00032518fc934f08768671fa.

Please don't install anything non-trivial on the release branch
without asking first.

2 years agoFix 'exchange-point-and-mark' in 'transient-mark-mode'
Eli Zaretskii [Mon, 10 Jan 2022 17:10:52 +0000 (19:10 +0200)]
Fix 'exchange-point-and-mark' in 'transient-mark-mode'

* lisp/simple.el (exchange-point-and-mark): Don't deactivate mark
when 'transient-mark-mode' is ON.  (Bug#53150)

2 years agoRemove the filename argument from the command line after an ELC+ELN build
Alan Mackenzie [Mon, 10 Jan 2022 17:05:41 +0000 (17:05 +0000)]
Remove the filename argument from the command line after an ELC+ELN build

This fixes bug #53164.  Without this fix, bootstrap-emacs loads the source
file uselessly into a buffer after completing the compilation.

2 years agoImplement recent improvements to underline display on PGTK
Po Lu [Mon, 10 Jan 2022 12:07:12 +0000 (20:07 +0800)]
Implement recent improvements to underline display on PGTK

* src/pgtkterm.c (pgtk_draw_glyph_string): Respect new underline
face fields.

2 years agoPrevent text decorations from overwriting surrounding areas on X
Po Lu [Mon, 10 Jan 2022 11:54:36 +0000 (19:54 +0800)]
Prevent text decorations from overwriting surrounding areas on X

* src/xterm.c (x_draw_underwave): New parameter
`decoration_width'.
(x_draw_glyph_string): Constrain decoration width to current
text area.

2 years agoAllow controlling the underline position of faces
Po Lu [Mon, 10 Jan 2022 11:26:46 +0000 (19:26 +0800)]
Allow controlling the underline position of faces

* doc/lispref/display.texi (Face Attributes): Document new
`:position' property of the `:underline' attribute.
* etc/NEWS: Announce new property.
* lisp/cus-face.el (custom-face-attributes): Implement
customization for new face attribute.
* src/dispextern.h (struct face): New fields
`underline_pixels_above_descent_line' and
`underline_at_descent_line_p'.
* src/haikuterm.c (haiku_draw_text_decoration):
* src/nsterm.m (ns_draw_text_decoration):
* src/w32term.c (w32_draw_glyph_string):
* src/xterm.c (x_draw_glyph_string): Respect new face fields.

* src/xfaces.c (realize_gui_face): Handle new `:position'
keyword.
(syms_of_xfaces): New symbol `:position'.

2 years ago* doc/emacs/xresources.texi (GTK resources): Fix dead links.
Po Lu [Mon, 10 Jan 2022 10:07:46 +0000 (18:07 +0800)]
* doc/emacs/xresources.texi (GTK resources): Fix dead links.

2 years agoLoad X resources from a settings file like other programs on Haiku
Po Lu [Mon, 10 Jan 2022 09:59:17 +0000 (09:59 +0000)]
Load X resources from a settings file like other programs on Haiku

* doc/emacs/haiku.texi (Haiku Basics): Document how X resources
are discovered on Haiku.
* src/haiku_support.cc (class Emacs): Load settings file.
(be_find_setting): New function.
* src/haiku_support.h (be_find_setting): New prototype.
* src/haikuterm.c (get_string_resource): Look in the settings
file if there's nothing in the in-memory resource database.

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 ago(save-some-buffers): Simplify the fix for bug#46374
Stefan Monnier [Mon, 10 Jan 2022 02:02:31 +0000 (21:02 -0500)]
(save-some-buffers): Simplify the fix for bug#46374

* lisp/files.el (save-some-buffers): Only check the
`save-some-buffers-function` property on functions from
`save-some-buffers-default-predicate` since callers which provide
a `pred` argument can arrange to compute `pred` themselves if needed.

* test/lisp/files-tests.el (files-tests-buffer-offer-save): Don't test
with `pred` set to `save-some-buffers-root` since it's not an
appropriate function for that any more.

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 agoImprove docstring of edit-abbrevs
Stefan Kangas [Sun, 9 Jan 2022 23:59:59 +0000 (00:59 +0100)]
Improve docstring of edit-abbrevs

* lisp/abbrev.el (edit-abbrevs): Doc fix; don't use obsolete name.
Improve docstring formatting.

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 ago; * src/fns.c (Frequire): Fix wording of doc string.
Eli Zaretskii [Sun, 9 Jan 2022 17:02:17 +0000 (19:02 +0200)]
; * src/fns.c (Frequire): Fix wording of doc string.

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 agoRevert "Fix alignment on font size change in tabulated-list-mode"
Eli Zaretskii [Sun, 9 Jan 2022 10:38:26 +0000 (12:38 +0200)]
Revert "Fix alignment on font size change in tabulated-list-mode"

This reverts commit 2767c89db729a6106146d0aeff76678c64d4fc53.

That change caused a regression in a much more important use
case, see bug#53133.

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 ago; * lisp/emacs-lisp/package.el (package-native-compile): Fix doc wording.
Eli Zaretskii [Sun, 9 Jan 2022 08:25:36 +0000 (10:25 +0200)]
; * lisp/emacs-lisp/package.el (package-native-compile): Fix doc wording.

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).