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.
Mauro Aranda [Sat, 19 Feb 2022 12:34:11 +0000 (13:34 +0100)]
Fix types of some align.el defcustoms
* lisp/align.el (align-region-heuristic)
(align-large-region): Both options can be nil, but the defcustom type
didn't allow nil values.
(align-rules-list-type): The "Run If" and "Valid" attributes
should be functions, but the default value was t. Change it to
#'always (bug#54048).
Mauro Aranda [Sat, 19 Feb 2022 12:33:05 +0000 (13:33 +0100)]
Fix :match function for the key widget
* lisp/wid-edit.el (key): Calling key-valid-p directly doesn't work,
because the :match function is called with the widget and the value as
arguments (bug#54049).
Po Lu [Sat, 19 Feb 2022 12:05:18 +0000 (20:05 +0800)]
Improve portability of alpha channel visual detection
* src/xfns.c (select_visual): Look for PictVisuals with an alpha
channel instead of blindly assuming that 32 bit visuals have an
alpha channel.
(Fx_show_tip): Fix crash on some displays where child is None.
* src/xterm.c (x_term_init): Initialize Xrender before
calling select_visual.
Alan Mackenzie [Sat, 19 Feb 2022 10:38:19 +0000 (10:38 +0000)]
Fix symbols with position appearing in the output of `compile-defun'
This happened with the tags of a condition-case. Also fix the detection of
circular lists while stripping the positions from symbols with position.
* lisp/emacs-lisp/byte-run.el (byte-run--circular-list-p): Remove.
(byte-run--strip-s-p-1): Write a value of t into a hash table for each cons or
vector/record encountered. (This is to prevent loops with circular
structures.) This is now done for all arguments, not just those detected as
circular lists.
* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defvar)
(byte-compile-form, byte-compile-dynamic-variable-op)
(byte-compile-constant, byte-compile-push-constant): Remove redundant calls to
`bare-symbol'.
(byte-compile-lambda): call `byte-run-strip-symbol-positions' on the arglist.
(byte-compile-out): call `byte-run-strip-symbol-positions' on the operand.
This is the main call to this function in bytecomp.el.
* src/fns.c (hashfn_eq): Strip the position from an argument which is a symbol
with position.
(hash_lookup): No longer strip a position from a symbol with position.
(sxhash_obj): Add handling for symbols with position, substituting their bare
symbols when symbols with position are enabled.
Eli Zaretskii [Sat, 19 Feb 2022 09:19:48 +0000 (11:19 +0200)]
Fix character compositions on the mode line
* src/composite.c (composition_compute_stop_pos)
(Ffind_composition_internal): When characters come from a string,
determine whether to compose them from that string's multibyteness,
not from that of the current buffer. (Bug#53729)
Po Lu [Sat, 19 Feb 2022 08:21:51 +0000 (16:21 +0800)]
Don't ignore events from XI2 slave devices anymore
All the machinery needed to keep track of events from those
devices is already in place, so that's no longer required.
* src/xterm.c (x_get_scroll_valuator_delta):
(xi_reset_scroll_valuators_for_device_id):
(handle_one_xevent): Don't ignore XI devices that are not master
pointers or keyboards.
Eric Abrahamsen [Fri, 18 Feb 2022 16:37:33 +0000 (08:37 -0800)]
Handle multiple directory separators in gnus-search results
Try to treat the file names more like file names, less like strings
to massage.
* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output): Use
`expand-file-name' to collapse separators and generally canonicalize
the name. Use `file-name-split' and joining instead of regexp
munging.
Eli Zaretskii [Fri, 18 Feb 2022 08:38:47 +0000 (10:38 +0200)]
Merge from origin/emacs-28
c8442df ; Separate command and concept index in Transient manual 8aa052c ; Fix Transient manual 5b7752a Fix problem with popd for in remote shell buffers 38f6ea1 Import texi source file for transient manual df34929 Update to Org 9.5.2-15-gc5ceb6
Eli Zaretskii [Fri, 18 Feb 2022 07:47:44 +0000 (09:47 +0200)]
Improve documentation of filling and justification commands
* doc/lispref/text.texi (Filling):
* lisp/textmodes/fill.el (fill-region-as-paragraph)
(default-justification, set-justification, justify-current-line):
Clarify "canonicalization" of spaces and the meaning of
justification styles. (Bug#54047)
(set-justification-left, set-justification-right)
(set-justification-full): Improve wording of doc strings.
Andrew G Cohen [Fri, 18 Feb 2022 06:01:55 +0000 (14:01 +0800)]
Make sure nnselect search query is properly parsed
* lisp/gnus/gnus-search.el (gnus-search-make-spec): The search query
should not be interpreted as raw, but whatever the underlying search
engine expects.
Andrew G Cohen [Fri, 18 Feb 2022 05:56:19 +0000 (13:56 +0800)]
Fix gnus searching of native servers
* lisp/gnus/gnus-group.el (gnus-group-make-search-group):
(gnus-group-read-ephemeral-search-group): Find the real server even
when the group is native.
Eric Abrahamsen [Thu, 17 Feb 2022 21:09:49 +0000 (13:09 -0800)]
Fix gnus-search notmuch thread searches
* lisp/gnus/gnus-search.el (gnus-search-run-search): Multiple things
wrong with collecting thread ids from the search results, and
constructing a new search query.
(gnus-search-indexed-search-command): Use list appending rather than
backtick construction, that was more confusing than it was helpful.
Juri Linkov [Thu, 17 Feb 2022 18:28:43 +0000 (20:28 +0200)]
* lisp/mouse.el (context-menu-entry): Don't create menu for Help commands.
Help commands that describe keybindings call context-menu-entry bound to
a key. This causes too much trouble when trying to build the context menu
in a temporary Help buffer that is not displayed in a window.
OTOH, there is no information in context menus useful for Help commands.
So `help-buffer-under-preparation' is added to filter out such calls.
(bug#53910)
Eli Zaretskii [Thu, 17 Feb 2022 14:30:42 +0000 (16:30 +0200)]
Fix files-tests on MS-Windows
* test/lisp/files-tests.el
(files-tests-zzdont-rewrite-precious-files): Renamed from
'files-tests-dont-rewrite-precious-files', to fix a subtle problem
that breaks 2 tests on MS-Windows.
(files-tests-revert-buffer)
(files-tests-revert-buffer-with-fine-grain): No need to disable
file locking anymore.