Po Lu [Tue, 1 Mar 2022 03:30:52 +0000 (11:30 +0800)]
Fix Motif menu help text in submenus
* lwlib/lwlib-Xm.c (xm_arm_callback):
(make_menu_in_widget):
(update_one_menu_entry):
(xm_update_one_widget):
(do_call): Pass instance to arm callback and use wv as user data
instead of call data.
Stefan Monnier [Mon, 28 Feb 2022 16:59:38 +0000 (11:59 -0500)]
ecomplete: Try and avoid losing data
* lisp/ecomplete.el (ecomplete-add-item): Make sure the database is
setup, so we don't risk overwriting it with a (mostly) empty one.
(ecomplete-save): Don't save an empty database.
Po Lu [Mon, 28 Feb 2022 06:35:01 +0000 (14:35 +0800)]
Better fix for bug#13476
* lisp/faces.el (face-spec-recalc): Apply scroll bar foreground
and background to the frame if changing the scroll-bar face.
(scroll-bar): Restore previous declaration. That way, the
default colors are used for toolkit scroll bars, instead of
black and white.
Po Lu [Mon, 28 Feb 2022 06:04:23 +0000 (14:04 +0800)]
Improve treatment of toolkit scroll bars with the input extension
* src/xterm.c (x_create_horizontal_toolkit_scroll_bar)
(x_create_toolkit_scroll_bar): Set XI2 event mask appropriately.
(handle_one_xevent): Make sure coordinates are correct for the
frame's window when handling wheel events.
Po Lu [Mon, 28 Feb 2022 01:16:17 +0000 (01:16 +0000)]
Treat scroll bar information consistently on Haiku
* src/haiku_support.cc (class EmacsScrollBar): New field `info'.
(EmacsScrollBar): Obtain scroll bar info on initialization.
(ButtonRegionFor): Use that information instead.
* m4/gnulib-common.m4 (gl_COMMON_BODY):
* lib/gnulib.mk.in (CXXCPP):
* lib/cdefs.h: Updated with admin/merge-gnulib. (This is in
preparation to adding the nanosleep module later.)
Po Lu [Sun, 27 Feb 2022 02:37:17 +0000 (10:37 +0800)]
Fix Motif menu and menu bar dismissal on XI2
* src/xmenu.c (x_activate_menubar): Improve ungrabbing logic on
XI2.
(server_timestamp_predicate): New function.
(create_and_show_popup_menu): If the display supports XI2, make
sure the timestamps are correct by dispatching a PropertyNotify
event to Xt.
* src/xterm.c (handle_one_xevent): Translate XI_ButtonRelease
events into core events before dispatching them to Xt.
Eli Zaretskii [Sat, 26 Feb 2022 07:41:05 +0000 (09:41 +0200)]
Document better how to reset attributes of faces for new frames
* doc/lispref/display.texi (Attribute Functions):
* lisp/faces.el (set-face-attribute): Explain how to reset an
attribute's value for future frames. (Bug#54156)
Po Lu [Sat, 26 Feb 2022 06:56:31 +0000 (06:56 +0000)]
Improve scroll bar button handling on Haiku
* src/haiku_io.c (haiku_len): Add `SCROLL_BAR_PART_EVENT'.
* src/haiku_support.cc (class EmacsScrollBar): New fields
`dragging' and `current_state', along with `old_value' and
`current_part'.
(EmacsScrollBar): Set horizontal flag to `horizontal_p'.
(MessageReceived): Set old_value when receiving
SCROLL_BAR_UPDATE message.
(ValueChanged): Don't allow scroll bar values to change while
dragging.
(MouseUp, MouseDown): Calculate button under mouse and act
accordingly.
* src/haiku_support.h (enum haiku_event_type): New event
`SCROLL_BAR_PART_EVENT'.
(enum haiku_scroll_bar_part): New enumerator.
(struct haiku_scroll_bar_part_event): New struct.
* src/haikuterm.c (haiku_read_socket): Handle
SCROLL_BAR_PART_EVENTs.
Dmitry Gutov [Sat, 26 Feb 2022 00:18:34 +0000 (02:18 +0200)]
Drop the visited file modtime check for remote xref hits
* lisp/progmodes/xref.el (xref--hits-remote-id): New variable.
(xref--convert-hits, xref--collect-matches)
(xref--find-file-buffer): Use it (bug#54025).
Bob Rogers [Fri, 25 Feb 2022 12:03:20 +0000 (13:03 +0100)]
Add new file ietf-drums-date.el
* lisp/mail/ietf-drums-date.el: parse-time-string replacement which is
compatible but can be made stricter if desired.
* test/lisp/mail/ietf-drums-date-tests.el (added): Add tests for
ietf-drums-parse-date-string.
* lisp/mail/ietf-drums.el (ietf-drums-parse-date): Use
ietf-drums-parse-date-string.
Po Lu [Fri, 25 Feb 2022 11:36:07 +0000 (11:36 +0000)]
Improve treatment of dropping mouse track state on Haiku
* src/haikuterm.c (haiku_mouse_or_wdesc_frame): New function.
(haiku_read_socket): Use it to find the appropriate frame when
handling motion or button events.
Po Lu [Fri, 25 Feb 2022 08:05:11 +0000 (08:05 +0000)]
Improve tracking of modified regions on Haiku
* src/haiku_support.cc (class EmacsView): New field
`invalid_region'.
(FlipBuffers): Only invalidate that region.
(SetUpDoubleBuffering): Clear that region.
(BView_draw_lock): New parameters for denoting the region
to invalidate.
(BView_invalidate_region): New function.
* src/haiku_support.h: Update prototypes.
* src/haikufns.c (haiku_set_background_color):
* src/haikumenu.c (digest_menu_items):
* src/haikuterm.c (haiku_clip_to_string):
(haiku_flip_buffers):
(haiku_clear_frame_area):
(haiku_clear_frame):
(haiku_draw_glyph_string):
(haiku_after_update_window_line):
(haiku_draw_window_cursor):
(haiku_draw_vertical_window_border):
(haiku_draw_window_divider):
(haiku_draw_fringe_bitmap):
(haiku_scroll_run):
(haiku_read_socket):
(haiku_flash):
(haiku_clear_under_internal_border): Mark appropriate region as
invalid before buffer flip.
Po Lu [Fri, 25 Feb 2022 06:15:51 +0000 (14:15 +0800)]
Make interpolated scrolling work above non-selected windows
* lisp/pixel-scroll.el (pixel-scroll-precision-interpolate): New
parameter `old-window'.
(pixel-scroll-precision): Pass originally selected window to the
interpolation function.
Alan Mackenzie [Thu, 24 Feb 2022 17:30:39 +0000 (17:30 +0000)]
Amend byte-run-strip-symbol-positions so that an unexec build builds
This fixes bug #54098.
* lisp/emacs-lisp/byte-run.el (byte-run--strip-list)
(byte-run--strip-vector/record): New functions. These alter a list or
vector/record structure only where a symbol with position gets replaced by a
bare symbol.
(byte-run-strip-symbol-positions): Reformulate to use the two new functions.
(function-put): No longer strip positions from the second and third arguments.
* lisp/emacs-lisp/bytecomp.el (byte-compile-out): Remove the senseless
"stripping" of putative symbol positions from OPERAND, which is nil or a
number.
Jim Porter [Thu, 24 Feb 2022 04:43:38 +0000 (20:43 -0800)]
Don't superfluously emit prompts when terminating processes in Eshell
* lisp/eshell/esh-proc.el (eshell-kill-process-function): Only reset
the prompt if PROC is writing to the terminal.
(eshell-sentinel): Only write the exit message if PROC is writing to
the terminal (bug#54136).
* test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill-pipeline)
(esh-proc-test/kill-pipeline-head)
(esh-proc-test/kill-background-process): New tests.
Po Lu [Thu, 24 Feb 2022 03:35:25 +0000 (03:35 +0000)]
Fix auto-lower when the mouse moves onto a scrollbar on Haiku
* src/haiku_support.cc (MouseMoved):
(BView_inside_scroll_bar): New functions.
* src/haiku_support.h: Update prototypes.
* src/haikuterm.c (haiku_read_socket): Don't auto-lower if the
pointer left the view for a scroll bar.
Po Lu [Thu, 24 Feb 2022 01:11:53 +0000 (09:11 +0800)]
Condition out things specific to some versions of the input extension
* src/xterm.c (x_free_xi_devices, x_init_master_valuators)
(handle_one_xevent): Condition out code that isn't supposed to
be run on the current input extension version.
* src/xterm.h (struct xi_scroll_valuator_t): Make conditional on
HAVE_XINPUT2_1.
(struct xi_touch_point_t): Make conditional on HAVE_XINPUT2_2.
(struct xi_device_t): Make individual fields conditional on the
appropriate client-side input extension version.
Mauro Aranda [Wed, 23 Feb 2022 20:05:08 +0000 (21:05 +0100)]
Fix auth-sources defcustom
* lisp/auth-source.el (auth-sources): The extra attributes should be
in a plist, so inline both :host and :port. Also, give a valid
default value for the choice (bug#54127).
Paul Eggert [Wed, 23 Feb 2022 18:52:27 +0000 (10:52 -0800)]
Port to current Gnulib
* configure.ac (AM_COND_IF): New macro, needed because Gnulib
normally assumes Automake and now uses this Automake macro.
Problem reported by Lars Ingebrigtsen (Bug#32452#47).
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.