Stefan Monnier [Mon, 18 Jul 2022 21:39:55 +0000 (17:39 -0400)]
(help-fns--first-release): Try and avoid false positives
We used to use a very "optimistic" regexp which worked well for
longish symbol names but suffered from too many false positives on
short names. Use a more restrictive regexp, which should make the
recent "weed out" change unnecessary.
This in turn requires the use of '...' more consistently in etc/NEWS* files.
* lisp/help-fns.el (help-fns--first-release-regexp): New function.
(help-fns--first-release): Use it. Fix minor issue with the Emacs
version regexp.
(help-fns--mention-first-release): Undo last change.
* etc/NEWS*: Replace `...' with '...'. Indent code examples by at
least 2 spaces. Add previously missing '...' quotes around many of
the variables and functions described.
Po Lu [Tue, 19 Jul 2022 01:33:09 +0000 (09:33 +0800)]
Make drag-and-drop wheel movement work locally too on X
This is provided by the XDND protocol, so it isn't fair for it
to not work with local drag-and-drop.
* lisp/x-dnd.el (x-dnd-note-wheel-movement): New function. Set
it as the `x-dnd-wheel-function'.
* src/xterm.c (x_dnd_cleanup_drag_and_drop): Clear new flags.
(x_dnd_note_self_wheel): New function. Set some flags.
(x_dnd_process_quit, x_dnd_begin_drag_and_drop, handle_one_xevent)
(x_connection_closed, x_delete_terminal, mark_xterm): Handle and
set new wheel movement flags
(syms_of_xterm): New variable `x-dnd-wheel-function'.
Alexander Adolf [Wed, 13 Jul 2022 21:52:46 +0000 (23:52 +0200)]
Additional query and results attributes in eudcb-macos-contacts.el
* lisp/net/eudcb-macos-contacts.el: wider set of attributes for
queries, and in query results
* lisp/net/eudc-vars.el (eudc-inline-expansion-format): update
docstring to explain how to use the function eudc-translate-query to
translate to generic attribute names in the user supplied formatting
function
* etc/NEWS: announce wider query/result attribute set
* doc/misc/eudc.texi: more details on eudcb-mab.el's limitations
Michael Albinus [Mon, 18 Jul 2022 13:48:14 +0000 (15:48 +0200)]
Adapt Tramp new test macros
* test/lisp/net/tramp-tests.el (tramp--test-deftest-with-stat)
(tramp--test-deftest-with-perl, tramp--test-deftest-with-ls):
Skip for all methods but those from tramp-sh.el.
* lisp/emacs-lisp/seq.el (seq-subseq):
Make faster by using `take` instead of a lisp loop,
and more importantly by not front-loading the error text formatting.
* test/lisp/emacs-lisp/seq-tests.el (seq-tests--list-subseq-ref)
(test-seq-subseq): Test `seq-subseq` for lists more thoroughly.
Richard Hansen [Sun, 17 Jul 2022 04:56:10 +0000 (00:56 -0400)]
Derive `Info-mode' from `special-mode'
* lisp/info.el (Info-mode): Derive `Info-mode' from `special-mode'.
This makes it easier to exclude it from globalized minor modes that
don't apply to special modes (such as `global-whitespace-mode' and
`global-display-fill-column-indicator-mode').
Richard Hansen [Sun, 17 Jul 2022 18:32:42 +0000 (14:32 -0400)]
info-edit: Delay `ibuffer' var change until after `ibuffer' loads
* lisp/obsolete/info-edit.el: Delay the addition of `Info-edit-mode'
to the `ibuffer-help-buffer-modes' list until after `ibuffer' is
loaded. This fixes a "(void-variable ibuffer-help-buffer-modes)"
error when `info-edit' is loaded before `ibuffer'.
Eli Zaretskii [Sun, 17 Jul 2022 12:44:50 +0000 (15:44 +0300)]
Fix leaking of file descriptors due to pipe processes on MS-Windows
* src/w32proc.c (reader_thread): Wait for 'sys_close' to finish
processing the pipe read descriptor, before trying to close it.
* src/w32.c (sys_close): Attempt to detect when the reader thread
already exited, so that it would be possible to close descriptors
open by pipe processes for reading from the pipe. (Bug#56606)
Eli Zaretskii [Sun, 17 Jul 2022 09:33:34 +0000 (12:33 +0300)]
Fix tab-bar resizing under 'auto-resize-tab-bars' = 'grow-only'
* src/xdisp.c (redisplay_tab_bar): Compute the desired height of
the tab-bar before iterating over the tab-bar string, to detect
the required resizing earlier. Default 'change_p' to 'false'.
* lisp/tab-bar.el (tab-bar--update-tab-bar-lines): Support
'auto-resize-tab-bars' set to 'grow-only'.
Improve error messaging when parent archive buffers are missing
* lisp/arc-mode.el (archive-write-file-member):
* lisp/tar-mode.el (tar-subfile-save-buffer): Give a better error
message when the parent buffer is dead (bug#56605).
Michael Albinus [Sat, 16 Jul 2022 12:05:06 +0000 (14:05 +0200)]
Comment docstrings in tramp-test macros
* test/lisp/net/tramp-tests.el (tramp--test-deftest-with-stat)
(tramp--test-deftest-with-perl, tramp--test-deftest-with-ls)
(tramp--test-deftest-direct-async-process): Comment docstring,
it doesn't work this way. Use `tramp-test-vec' if appropriate.
(x-dnd-get-window-rectangle, x-dnd-intersect-rectangles)
(x-dnd-get-object-rectangle, x-dnd-get-drop-rectangle): New
functions.
(x-dnd-handle-xdnd): Generate mouse rectangles consisting of the
object (glyph) under point.
This optimisation is already done in the code generator but performing
it at this earlier stage is a useful normalising step that uncovers
more opportunities.
Po Lu [Sat, 16 Jul 2022 03:53:42 +0000 (11:53 +0800)]
Handle XDND mouse rects synchronously
* src/xterm.c (x_dnd_send_position): Record event X and Y for
consumption by the XdndStatus handler. Ignore mouse rects if
waiting for status.
(x_dnd_send_leave): Clear pending DND event.
(handle_one_xevent): When handling XdndStatus, check if the
pending event is contained in the new mouse rect.
Po Lu [Fri, 15 Jul 2022 13:46:55 +0000 (21:46 +0800)]
Only preserve PRIMARY and CLIPBOARD selection ownership by default
* lisp/cus-start.el (standard): Update defcustom type.
* src/xselect.c (x_should_preserve_selection): New function.
(x_clear_frame_selections): Use it to determine whether or not
to preserve a selection.
* src/xterm.c (x_preserve_selections): Fix tail initialization.
(syms_of_xterm): Update doc string of
`x-auto-preserve-selections'.
Po Lu [Fri, 15 Jul 2022 08:19:41 +0000 (16:19 +0800)]
Fix generated drag-and-drop mouse rectangles
* lisp/x-dnd.el (x-dnd-get-drop-width-height): Handle window
width and height correctly. Remove unused parameter.
(x-dnd-after-move-frame): New function.
(move-frame-functions): Add new hook.
(x-dnd-compute-root-window-position): New function.
(x-dnd-get-drop-x-y): Use that instead of `left' and `top'
parameters, which include the title bar.
(x-dnd-handle-xdnd): Update accordingly.
* src/xfns.c (Fx_translate_coordinates): New function.
(syms_of_xfns): New defsym.
* etc/emacs_lldb.py: Handle case of Lisp_Object being a
struct (--enable-lisp-type-checking). Enable Emacs type category by
default. Expand children in type summary for Lisp_Object.
Sean Whitton [Thu, 7 Jul 2022 16:34:04 +0000 (09:34 -0700)]
Use notmuch thread:{} operator instead of performing two searches
This also avoids some command line length limit problems (bug#56442).
* gnus-search.el (gnus-search-run-search): Delete notmuch method.
(gnus-search-indexed-search-command): In the notmuch method, when
searching for threads, wrap whole query in thread:{} operator, and
always use --output=files, never --output=threads (bug#56442).
Restore how (read-from-minibuffer ... read-expression-map) worked
* lisp/simple.el (read-expression-map): Don't override RET and C-j
here, since that leads to breakages of other usages of this map
(bug#56548).
(read--expression-map): New map.
(read--expression): Use it.
Prune animation cache when images are no longer reachable
* lisp/image.el (image-animate-timeout): Eject cached animated
images that are no longer reachable (bug#56546).
* src/image.c (Fclear_image_cache): Allow specifying a cached
animated image to eject.
(gif_load, webp_load): Adjust what to use as the caching key --
the identity of the list itself is apparently changed by some
callers.