Juri Linkov [Wed, 23 Feb 2022 17:58:33 +0000 (19:58 +0200)]
* lisp/tab-bar.el: Create new unique windows with 'C-x t n' (bug#54038).
* lisp/tab-bar.el (tab-bar-new-tab-choice): Replace the value 'nil'
with explicit 'clone'.
(tab-bar-move-window-to-tab): Ignore possible side/atom window
parameters with ignore-window-parameters while deleting window.
(tab-bar-new-tab-to): When 'tab-bar-new-tab-choice' is 'clone',
create new unique windows with the same layout using window-state-get
and window-state-put. Do the same after deleting other windows
when 'tab-bar-new-tab-choice' is 'window'.
(tab-bar-duplicate-tab): Replace the value 'nil' with 'clone' for
'tab-bar-new-tab-choice'.
* doc/misc/modus-themes.org (Enable and load)
(Differences between loading and enabling): Clarify wording.
(Customization Options): Update sample configuration.
(Option for completion framework aesthetics): Refactor
'modus-themes-completions' to accept an alist value instead of a
symbol.
(Override colors): Elaborate on the example.
(Toggle themes without reloading them): Document sample command that
uses 'enable-theme' instead of 'load-theme'.
(Acknowledgements): Update names of contributors to ideas.
* etc/themes/modus-themes.el (modus-themes-operandi-colors)
(modus-themes-vivendi-colors): Tweak the palette's completion-related
background colors.
(modus-themes-completion-standard-first-match)
(modus-themes-completion-standard-selected)
(modus-themes-completion-extra-selected): Deprecate faces and replace
them with 'modus-themes-completion-selection'.
(modus-themes-completion-key-binding): Rename it to
'modus-themes-key-binding'.
(modus-themes-mode-line): Remove faulty default value.
(modus-themes-completions): Refactor it to accept an alist value.
(modus-themes-box-buttons): Fix typo.
(modus-themes--standard-completions, modus-themes--extra-completions)
(modus-themes--extra-completions-line): Remove outdated private
functions.
(modus-themes--completion): Add new private function.
(modus-themes-faces): Update faces.
Stefan Monnier [Wed, 23 Feb 2022 03:52:40 +0000 (22:52 -0500)]
(add-hook): Fix regression
* lisp/subr.el (add-hook): When the hook has no local part yet, don't
set `local` to t, so we set the right part of the depth-sym.
(remove-hook): Don't modify the depth alist by side-effect since I'm
not completely sure it's safe.
Dmitry Gutov [Wed, 23 Feb 2022 01:53:05 +0000 (03:53 +0200)]
Unbreak project switcher when inside *xref* buffer
* lisp/progmodes/xref.el (xref--ensure-default-directory):
New function.
(xref--show-xref-buffer, xref-show-definitions-buffer-at-bottom):
Use it (bug#53626).
Philipp Stephani [Tue, 22 Feb 2022 20:39:32 +0000 (21:39 +0100)]
Fix indexing of module functions that return enumeration types.
Return types that consist of more than one word need to be enclosed in
braces, see Info node `(texinfo) Typed Functions'. Otherwise they are
indexed incorrectly.
Po Lu [Tue, 22 Feb 2022 10:41:28 +0000 (18:41 +0800)]
Improve XInput2 version checking
* configure.ac: Check for various important structures from all
versions of libXi.
* src/xfns.c (setup_xi_event_mask):
* src/xwidget.c (x_draw_xwidget_glyph_string):
* src/xterm.c (x_init_master_valuators, handle_one_xevent)
(x_term_init): Replace XI version checks based on protocol
headers with new constants.
* src/xterm.h (HAVE_XINPUT2_1, HAVE_XINPUT2_2, HAVE_XINPUT2_3)
(HAVE_XINPUT2_4): New definitions.
Stefan Kangas [Tue, 22 Feb 2022 05:30:59 +0000 (06:30 +0100)]
Merge from origin/emacs-28
666e40a109 Fix 'display-line-numbers-mode' in hide-show buffers 68d134cf0f Don't check whether a deleted window is deletable (Bug#54028) b38223a844 A friendlier error message from image-mode in an empty buffer b7a651ba37 Update to Org 9.5.2-17-gea6b74 3a8c3f7abd ; Don't reference obsolete variables in edebug.el
Po Lu [Tue, 22 Feb 2022 03:35:27 +0000 (11:35 +0800)]
Improve momentum pixel scrolling on a non-selected window
* lisp/pixel-scroll.el (pixel-scroll-kinetic-state): New
argument `window'.
(pixel-scroll-start-momentum): Don't select the window under
the event when calculating velocity or redisplaying.
Remove the ELPA dependencies from test/Makefile.in
* test/Makefile.in: Remove the ELPA dependencies, because it's
pretty confusing when trying to debug things.
* test/README (SELECTOR): Remove mention of the now-removed
GNU_ELPA_DIRECTORY variable.
* test/lisp/net/ntlm-tests.el (push): Add the ELPA dependencies
here, which keeps it contained to one test file. This also fixes
bug#53586, since the obsoletion of `body' came from web-server.el.
Eli Zaretskii [Mon, 21 Feb 2022 20:12:57 +0000 (22:12 +0200)]
Fix 'display-line-numbers-mode' in hide-show buffers
* src/xdisp.c (redisplay_internal): Disable redisplay
optimizations that consider just the current line, when
'display-line-numbers-mode' is turned on in the buffer.
(Bug#54091)
Jim Porter [Wed, 2 Feb 2022 03:16:00 +0000 (19:16 -0800)]
Send SIGPIPE to external Eshell processes if their output target closes
* lisp/eshell/esh-io.el (eshell-pipe-broken): New error.
(eshell-output-object-to-target): Signal 'eshell-pipe-broken' if the
target is an exited/signaled process.
We cannot be sure this problem is no longer relevant, since
its root cause was in software we don't control, and cannot
tell whether any of the versions where that problem happened
are still out in the wild.
* doc/emacs/search.texi (Special Isearch): Clarify slightly
(bug#19924). (All the keys in this node is about what happens
during isearch, but that information is quite a ways away at this
point, so it doesn't hurt to repeat that info.)
Make 'ispell-change-dictionary' completion work better
* lisp/textmodes/ispell.el (ispell--aspell-found-dictionaries):
New variable (bug#24050).
(ispell-find-aspell-dictionaries): Save the list of actually
identified dictionary.
(ispell-valid-dictionary-list): Use it to filter out non-installed
dictionaries.
Po Lu [Mon, 21 Feb 2022 06:29:58 +0000 (14:29 +0800)]
Prevent GTK from setting unreasonable size hints with large menu bars
* src/gtkutil.c (struct _EmacsMenuBar): New struct.
(emacs_menu_bar_init):
(emacs_menu_bar_class_init):
(emacs_menu_bar_get_preferred_width):
(emacs_menu_bar_new): New functions.
(xg_update_menu_item): Use our own menu bar class on GTK 3.
* src/gtkutil.h (EmacsMenuBar): New class.
Po Lu [Mon, 21 Feb 2022 03:27:48 +0000 (03:27 +0000)]
Implement left-right separators for dialog boxes on Haiku
* src/haiku_support.cc (BAlert_set_offset_spacing): New
function.
* src/haiku_support.h: Update prototypes.
* src/haikumenu.c (struct submenu_stack_cell): Remove unused
struct.
(haiku_dialog_show): Use offset spacing if a left-right boundary
was seen and make sure the user can always quit a dialog if no
enabled items exist.
* test/src/doc-tests.el
(doc-tests-documentation/autoloaded-macro): Adjust test -- rx is
loaded in nativecomp Emacsen when the tests are run, apparently.
Po Lu [Sun, 20 Feb 2022 10:38:38 +0000 (10:38 +0000)]
Handle GUI input while inside popup dialog on Haiku
* src/haiku_support.cc (alert_popup_value): New variable.
(be_alert_thread_entry): New function.
(BAlert_go): Complete rewrite that allows async input to be
handled while the popup is active.
* src/haiku_support.h: Update prototypes.
* src/haikumenu.c (haiku_dialog_show, haiku_popup_dialog): Stop
blocking input and pass required callbacks to `BAlert_go'.
* src/haikuterm.c (haiku_term_init): Set interrupt input mode to
t.
Po Lu [Sun, 20 Feb 2022 02:03:28 +0000 (10:03 +0800)]
Ignore modifier keys early when handling X key press events
* src/xterm.c (handle_one_xevent): Ignore modifier keys earlier
without going through the usual key lookup.
(x_delete_terminal): Free recorded modifier map.
(x_find_modifier_meanings): Record modifier map.
* src/xterm.h (struct x_display_info): New field `modmap'.
Po Lu [Sun, 20 Feb 2022 01:14:00 +0000 (09:14 +0800)]
Free XI2 devices in x_delete_display instead
* src/xterm.c (x_delete_display): Free XI2 device data here
instead, since it doesn't involve contacting the X server any
more.
(x_delete_terminal): Stop freeing XI2 device data.
This reverts the last change so it also applies to non-git diffs again.
Instead, we're now more careful not to mis-recognize file headers as
addition/removal lines.
In addition to that, mark the file header such that it's
re-font-locked all at once, and to still recognize it after
`diff-reverse-direction`.
* lisp/net/tramp-sudoedit.el (tramp-methods) <sudoedit>:
Add `tramp-password-previous-hop'.
(tramp-sudoedit-null-hop): New defconst.
(tramp-sudoedit-send-command): Use it.
* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-null-hop): New defconst.
(tramp-get-remote-null-device): Use it.