Eli Zaretskii [Sat, 20 Nov 2021 18:08:06 +0000 (20:08 +0200)]
Fix mouse handling with several TTY frames on MS-Windows
* src/w32inevt.c (do_mouse_event): Reset the 'mouse_moved' flag of
the selected frame. Without that, this flag might remain set on a
TTY frame that is not displayed.
martin rudalics [Sat, 20 Nov 2021 09:56:13 +0000 (10:56 +0100)]
Fix mouse events on tab bar or tool bar when 'track-mouse' is t
* lisp/mouse.el (mouse-drag-track):
* lisp/mouse-drag.el (mouse-drag-drag): Set 'track-mouse' to some
value neither t nor nil.
* src/keyboard.c (make_lispy_position): If track_mouse is Qt,
report event on tool or tab bar (Bug#51794).
Juri Linkov [Thu, 18 Nov 2021 18:36:55 +0000 (20:36 +0200)]
Fix sorting of menus in `context-menu-local' (bug#50067).
* lisp/menu-bar.el (menu-bar-keymap): Don't use `lookup-key'
on the `keymap' arg.
* lisp/mouse.el (context-menu-global): Use `lookup-key global-map'
for the `keymap' arg of `menu-bar-keymap'.
(context-menu-local): Use `menu-bar-keymap' to sort `keymap'.
Juri Linkov [Thu, 18 Nov 2021 18:23:58 +0000 (20:23 +0200)]
Fix flyspell-correct-word selected from context menu opened with the keyboard
* lisp/mouse.el (context-menu-open): Call interactively a command
returned by `context-menu-map' such as `flyspell-correct-word' (bug#50067).
* lisp/textmodes/flyspell.el (flyspell-correct-word): Handle the
case when it's called by a key bound to `context-menu-open'.
Then it should work the same way as `C-c $' typed on misspelled word
where the arg `event' of `flyspell-correct-word-before-point' is nil.
Juri Linkov [Mon, 15 Nov 2021 17:39:37 +0000 (19:39 +0200)]
* lisp/repeat.el: Detect changes in the minibuffer state (bug#47566)
(repeat--prev-mb): New internal variable.
(repeat-post-hook): Check the property 'repeat-map' on the symbol
from 'this-command' in addition to 'real-this-command'. Don't allow
repeatable maps in the activated minibuffer or in the minibuffer
from another command. Set 'repeat--prev-mb' at the end.
Alan Mackenzie [Sat, 13 Nov 2021 18:33:17 +0000 (18:33 +0000)]
Fix follow-scroll-down in a small buffer which starts slightly scrolled
This fixes bug #51814.
* lisp/follow.el (follow-scroll-down): Do away with the optimization of doing
vertical-motion over only one window. Instead move over all windows, to
checck for being close to point-min, and setting point accordingly.
Philipp Stephani [Wed, 30 Dec 2020 13:42:01 +0000 (14:42 +0100)]
Use posix_spawn if possible.
posix_spawn is less error-prone than vfork + execve, and can make
better use of system-specific enhancements like 'clone' on Linux. Use
it if we don't need to configure a pseudoterminal.
Backported from commit a60053f8368e058229721f1bf1567c2b1676b239.
Unlike that commit, only define USABLE_POSIX_SPAWN on macOS, because
there posix_spawn is much faster than vfork.
Don't merge to master.
* configure.ac (HAVE_SPAWN_H, HAVE_POSIX_SPAWN)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP)
(HAVE_POSIX_SPAWNATTR_SETFLAGS, HAVE_DECL_POSIX_SPAWN_SETSID): New
configuration variables.
* src/callproc.c (USABLE_POSIX_SPAWN): New configuration macro.
(emacs_posix_spawn_init_actions)
(emacs_posix_spawn_init_attributes, emacs_posix_spawn_init): New
helper functions.
(emacs_spawn): Use posix_spawn if possible.
Stephen Gildea [Wed, 10 Nov 2021 04:09:22 +0000 (20:09 -0800)]
time-stamp: %F is "file name" not "pathname" + other doc
* lisp/time-stamp.el (time-stamp-format): doc 'file' instead of 'path'.
* test/lisp/time-stamp-tests.el (formatz, format-time-offset):
Clarify the difference and similarity between these two test helpers.
Use word boundaries in the "Version Control" regexp to match mode names
"Log-Edit", "Log-View", "Git-Log-View", "Change Log", "VC dir",
but not "Verilog", "Prolog", "Rlogin" (bug#51337).
Alan Mackenzie [Sun, 7 Nov 2021 20:44:46 +0000 (20:44 +0000)]
Amend Follow Mode to handle header lines and tab lines correctly
This fixes bug #51590.
list/follow.el (follow-scroll-down): Incorporate the height of the tab line
into the calculation of the window height.
(follow-calc-win-end): Incorporate the pixel heights of the header line and
the tab line the calculation of the buffer position of the bottom screen line.
Eli Zaretskii [Sun, 7 Nov 2021 15:02:46 +0000 (17:02 +0200)]
Fix compilation MinGW warnings
* src/w32.h (prepare_standard_handles, reset_standard_handles):
Fix prototypes. Reported by Andy Moreton
<andrewjmoreton@gmail.com> in
https://lists.gnu.org/archive/html/emacs-devel/2021-11/msg00597.html.
Stefan Kangas [Sat, 6 Nov 2021 19:59:28 +0000 (20:59 +0100)]
Escape '%' in filenames to fix flymake warnings
* lisp/progmodes/flymake.el (flymake--log-1): Escape '%' in filenames
for 'warning-type-format' so they are not interpreted as a %-sequence
by 'format' later. (Bug#51549)
Eli Zaretskii [Sat, 6 Nov 2021 06:59:09 +0000 (08:59 +0200)]
Clarify "text area of a window" in the documentation
* src/keyboard.c (Fposn_at_x_y): Clarify that the Y coordinate
includes the header-line and the tab-line. (Bug#51590)
* doc/lispref/windows.texi (Window Sizes, Splitting Windows)
(Textual Scrolling, Coordinates and Windows): Fix/remove improper
or confusing uses of "text area" of a window.
Stefan Kangas [Sat, 6 Nov 2021 04:37:08 +0000 (05:37 +0100)]
Improve docstring of kmacro-set-format
* lisp/kmacro.el (kmacro-set-format): Improve docstring.
(kmacro-insert-counter, kmacro-display-counter)
(kmacro-set-counter, kmacro-add-counter): Add cross-references
to the info manual.
Stefan Kangas [Tue, 2 Nov 2021 19:14:13 +0000 (20:14 +0100)]
Use current face foreground for SVG icons in customize
It turns out these few icons were missed when the color and size
information was removed from the SVG icons that replaced XPM icons for
Customize buffer.
* etc/images/down.svg:
* etc/images/left.svg:
* etc/images/right.svg:
* etc/images/up.svg: Don't define foreground; this means they will use
the foreground of the currently defined face instead. (Bug#51556)