Eli Zaretskii [Thu, 14 Apr 2022 17:40:24 +0000 (20:40 +0300)]
Fix mouse clicks in hscrolled window with variable-height fonts
* src/xdisp.c (move_it_in_display_line_to): Fix calculation of
height of a screen-line that is completely hscrolled out of view.
Reported by Yasushi SHOJI <yasushi.shoji@gmail.com>.
* lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Allow
resizing by dragging headers.
(vtable--drag-resize-column): New function.
(vtable-narrow-current-column): Refactor out common bits.
(vtable--alter-column-width): To here.
(vtable-widen-current-column): Rewrite to use
vtable-narrow-current-column.
* lisp/net/ldap.el (ldap-ldapsearch-args): Change -LL to -LLL to
suppress ldif version output.
(ldap-search-internal): Remove skipping of version output. Remove
redundand ws skipping.
* lisp/net/eudc-vars.el (eudc-ldap-no-wildcard-attributes): New
defcustom.
* doc/misc/eudc.texi (LDAP Configuration): Mention it.
* lisp/net/eudcb-ldap.el (eudc-ldap-format-query-as-rfc1558): Use it.
(eudc-ldap-get-field-list): Set scope and sizelimit, instead of
overriding the whole ldap-host-parameters-alist.
* lisp/net/ldap.el (ldap-search-internal): Allow "size limit exceeded"
exit code. Allow empty attribute values.
Po Lu [Thu, 14 Apr 2022 13:14:32 +0000 (13:14 +0000)]
Fix races with child frame locks on Haiku
* src/haiku_support.cc
(CHILD_FRAME_LOCK_INSIDE_LOOPER_CALLBACK): New macro.
(FrameMoved, WorkspacesChanged): Lock child frame data with that
macro instead.
Po Lu [Thu, 14 Apr 2022 11:02:13 +0000 (19:02 +0800)]
Keep track of keyboard state during drag and drop
* src/xterm.c (x_dnd_cleanup_drag_and_drop): Deselect for
keyboard state changes.
(x_dnd_begin_drag_and_drop): Select for keyboard state changes
when XKB is available.
(x_dnd_update_state, handle_one_xevent): Use current XKB state
if it is available.
(x_term_init): Reformat code a little.
Po Lu [Thu, 14 Apr 2022 08:02:12 +0000 (16:02 +0800)]
Minor fixes to menus on XI2
* src/xfns.c (Fx_create_frame): Populate `xi_masks'.
* src/xmenu.c (x_activate_menubar)
(create_and_show_popup_menu, x_menu_show): Only clear input
extension grabs if we (or the toolkit) actually selected for
XI_ButtonPress events.
* src/xterm.c (xi_frame_selected_for): New function.
(xi_populate_device_from_info, handle_one_xevent): Store device
use instead of just whether or not it's a master device.
(x_dnd_begin_drag_and_drop): Clean up block_input stuff.
* src/xterm.h: Update prototypes.
(struct xi_device_t): Rename `master_p' to `use'.
* lisp/emacs-lisp/vtable.el (vtable-narrow-current-column)
(vtable-widen-current-column): Allow using the prefix to say how
much to narrow/widen the columns.
* lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Don't
insert the divider at the end.
(vtable-narrow-current-column, vtable-widen-current-column): Don't
error out when being called on the divider.
* doc/misc/vtable.texi (Making A Table): Document it.
* lisp/emacs-lisp/vtable.el (vtable): Add a divider slot.
(make-vtable): Accept :divider and :divider-width arguments.
(vtable--insert-line, vtable--insert-header-line): Display the
divider.
Sean Whitton [Tue, 12 Apr 2022 18:38:32 +0000 (11:38 -0700)]
Document additions of cl-with-gensyms and cl-once-only
* NEWS: Document additions of cl-with-gensyms and cl-once-only.
* doc/misc/cl.texi (Macro-Writing Macros): New section.
(Creating Symbols): Add to the concept index under the name "gensym".
(Obsolete Setf Customization): Use cl-once-only rather than
macroexp-let2, and fix a quotation bug in one example.
* doc/misc/vtable.texi (Making A Table): Document it.
* lisp/emacs-lisp/vtable.el (vtable): Add :row-colors.
(make-vtable): Ditto.
(vtable--compute-colors, vtable--color-blend): New functions.
(vtable--insert-line): Take a line number argument and adjust
callers.
Michael Albinus [Wed, 13 Apr 2022 14:40:32 +0000 (16:40 +0200)]
Adapt Tramp manual
* doc/misc/tramp.texi (Ssh setup): New subsection "Using ssh
config include for host name completion". (Bug#54885)
Precise, that list-system-processes and process-attributes are
about system processes.
Po Lu [Wed, 13 Apr 2022 11:13:38 +0000 (19:13 +0800)]
Move raw event selection on GTK+ 2 to a more appropriate place
* src/xfns.c (setup_xi_event_mask): Stop selecting for
RawKeyPress on the root window.
* src/xterm.c (x_new_focus_frame): Select here instead, once a
frame becomes focused.
Po Lu [Wed, 13 Apr 2022 03:13:28 +0000 (11:13 +0800)]
Bump minimum GTK for PGTK builds
* configure.ac: Require GTK 3.20 or later if building with PGTK.
It has already been required for some time now, but the
requirement was not reflected in the configure script.
* src/pgtkterm.c (pgtk_any_window_to_frame): Remove version
check.
* lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Only fill as
strings inside strings (bug#31656).
(lisp--fill-line-simple): New function to do simple sexp-based
filling.
Po Lu [Wed, 13 Apr 2022 02:54:56 +0000 (10:54 +0800)]
Clean up PGTK code more
* src/pgtkterm.c (STORE_KEYSYM_FOR_DEBUG): Delete macro.
(x_find_modifier_meanings): Delete function.
(get_modifier_values, pgtk_gtk_to_emacs_modifiers)
(pgtk_emacs_to_gtk_modifiers): Use GDK's own modifier mask
constants instead of detecting our own from the keymap. This
does mean a specific "meta" key will no longer be detected on X
Windows, but that interface doesn't exist on Wayland, and X
users should use the X port anyway.
(key_press_event): Avoid decoding input text.
(pgtk_term_init): Stop computing modifiers.
(syms_of_pgtkterm): Delete obsolete comment.
* src/pgtkterm.h (struct pgtk_display_info): Delete modifier
masks.
* lisp/help-fns.el (describe-mode--minor-modes): New function
(bug#2473).
(describe-mode): Rewritten to include local minor mode links first,
then the major mode, and then global minor mode links, and then
all the minor modes.
Po Lu [Wed, 13 Apr 2022 00:47:00 +0000 (00:47 +0000)]
Fix freezes when trying to accelerate menu bar on Haiku
* src/haiku_support.cc (class EmacsWindow): New field
`menus_begun'.
(MenusBeginning): Don't send menu bar open events when that is
set, instead set it to true.
(BMenuBar_start_tracking): Stop locking the menu bar here and
send a special BE_MENU_BAR_OPEN event instead.
* src/haiku_support.h (struct haiku_menu_bar_state_event):
Delete field `no_lock'.
* src/haikumenu.c (Fhaiku_menu_bar_open):
* src/haikuterm.c (haiku_read_socket): Update accordingly.
* src/image.c (svg_load_image): Don't include the spec in the
error message, because this is commonly the entire SVG string, and
this will fill up the *Messages* buffer quickly.
Sean Whitton [Tue, 12 Apr 2022 15:59:22 +0000 (17:59 +0200)]
Fix eager macroexpansion cycle in cl-once-only
* lisp/emacs-lisp/cl-macs.el (cl-once-only): Use different cl-loop
syntax, with no functional change, but such that the loop does not
expand into cl-psetq.
Po Lu [Tue, 12 Apr 2022 13:29:02 +0000 (21:29 +0800)]
Fix keyboard event device attribution on GTK+ 2
* src/xfns.c (setup_xi_event_mask): Select for raw keypress
events on GTK 2.
* src/xterm.c (handle_one_xevent): Set pending keystroke time
when a raw event is received.
* src/xterm.h (struct x_display_info): New flag
`pending_keystroke_time_special_p'.
Po Lu [Tue, 12 Apr 2022 08:36:42 +0000 (16:36 +0800)]
Disallow drag and drop inside a menu-entry
* src/xterm.c (x_dnd_cleanup_drag_and_drop): Always free DND
targets even if waiting for finish.
(x_dnd_begin_drag_and_drop): Free targets correctly when
signalling error and prevent activating drag-and-drop inside a
menu or popup. (It doesn't work.)
process-attributes-ps-args / process-attributes-ps-format for Darwin
* lisp/net/tramp-integration.el
(tramp-darwin-process-attributes-ps-args)
(tramp-darwin-process-attributes-ps-format)
(tramp-connection-local-darwin-ps-variables): New defconsts. Add
them to connection-local variables. Preset default "ps" profile
for Darwin.
Juri Linkov [Mon, 11 Apr 2022 16:51:49 +0000 (19:51 +0300)]
* lisp/minibuffer.el (minibuffer-completion-auto-choose): New defcustom.
(minibuffer-choose-previous-completion)
(minibuffer-choose-next-completion): Remove commands.
(minibuffer-local-completion-map): Remove keybindings of
minibuffer-choose-next-completion and minibuffer-choose-previous-completion.
Use them for minibuffer-next-completion and minibuffer-previous-completion.
* lisp/simple.el (minibuffer-local-shell-command-map): Idem.
* src/image.c (gif_load): Invert the way animated pixmaps are
created: Work on the cached computed-so-far pixmap, and then copy
the entire thing to the ximg with PUT_PIXEL at the end. This
should work across platforms, which the previous version didn't.
Recognise hybrid IPv6/IPv4 addresses in textsec (bug#54624)
* lisp/international/textsec.el (textsec--ipvx-address-p):
Recognise hybrid addresses like "::ffff:129.55.2.201".
Combine to a single regexp and translate to rx.
Remove some regexp ambiguity (relint complaint).
* test/lisp/international/textsec-tests.el (test-suspiction-domain):
Add test cases.
* src/image.c (anim_prune_animation_cache): Tweak the destructor
API.
(gif_destroy): New function.
(gif_load): Use a cache to avoid quadratic CPU usage for animated
images (bug#45224).
(webp_destroy): New function.
(webp_load): Use it.
Refactor the webp cache code to allow usage by gif_load, too
* src/image.c (struct anim_cache, anim_create_cache)
(anim_prune_animation_cache, anim_get_animation_cache): Rename
from webp_cache (etc) to prepare for usage in the gif animation
implementation, too.
(webp_load): Adjust cache usage.