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.
* lisp/language/indian.el ("Tamil"): Change the default input method
of the Tamil language environment to the new input method.
* lisp/leim/quail/indian.el
(quail-tamil-itrans-compute-syllable-table): New function extracted
from...
(quail-tamil-itrans-syllable-table): ... here. Use the above
function.
(quail-tamil-itrans--consonant-order): Auxiliary variable for the
above function.
(quail-tamil-itrans-compute-signs-table): Add new VARIOUS argument.
(quail-tamil-itrans-various-signs-and-digits-table)
(quail-tamil-itrans-various-signs-table): Adjust call to the above
function.
("tamil-phonetic"): Add new input method.
(tamil-input): New group for the input method.
(tamil-translation-rules): New defcustom for the input method to
change the translation rules.
(tamil--syllable-table, tamil--signs-table, tamil--hashtables)
(tamil--vowel-signs): Internal variables used by the input method.
(tamil--setter, tamil--make-tables)
(tamil--update-quail-rules): Internal functions for the input method.
(bug#56323)
Andrea Corallo [Fri, 8 Jul 2022 08:27:45 +0000 (10:27 +0200)]
Mark async worker tmp file as utf-8-emacs-unix (bug#48029)
* lisp/emacs-lisp/comp.el (comp-final): Mark async worker tmp file
as utf-8.
* test/src/comp-tests.el (48029-1): New test.
* test/src/comp-resources/comp-test-funcs.el
(comp-test-48029-nonascii-žžž-f): New function.
Michael Albinus [Wed, 13 Jul 2022 11:21:45 +0000 (13:21 +0200)]
Adapt Tramp version (don't merge)
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.5.3.28.2".
(customize-package-emacs-version-alist):
Add Tramp version integrated in Emacs 28.2.
Po Lu [Wed, 13 Jul 2022 03:01:59 +0000 (11:01 +0800)]
Fix closing displays when preserving selections is enabled
* src/frame.c (delete_frame): Bind `x-auto-preserve-selections'
to nil if deleting display.
* src/xselect.c (x_clear_frame_selections): Pass original frame
to that function.
* src/xterm.c (x_preserve_selections): Fix determining the new
owner.
(syms_of_xterm): New defsym `x-auto-preserve-selections'.
* src/xterm.h: Update prototypes.
* doc/emacs/files.texi (Image Mode): Adjust documentation.
* lisp/image/image-converter.el (image-convert): Let the converter
know whether it's a file or not.
Stefan Kangas [Tue, 12 Jul 2022 14:32:07 +0000 (16:32 +0200)]
Make pcomplete/{rsh,rlogin} into alias for pcomplete/ssh
* lisp/pcmpl-unix.el (pcomplete/rlogin, pcomplete/rsh): Make into
aliases for 'pcomplete/ssh', as "rsh" and "rlogin" is more often than
not aliases for "ssh" on modern machines.
* lisp/eshell/em-dirs.el (eshell-dirs-initialize): Properly handle
indexing for variable aliases.
* lisp/eshell/esh-var (eshell-variable-aliases-list): Properly handle
indexing for variable aliases, and add SIMPLE-FUNCTION entry for
aliases.
(eshell-get-variable): Update how variable alias functions are called.
* test/lisp/eshell/em-alias-tests.el
(em-alias-test/alias-arg-vars-indices)
(em-alias-test/alias-arg-vars-split-indices)
(em-alias-test/alias-all-args-var-split-indices):
* test/lisp/eshell/em-dirs-tests.el (em-dirs-test/pwd-var-indices)
(em-dirs-test/oldpwd-var-indices)
(em-dirs-test/directory-ring-var-indices):
* test/lisp/eshell/esh-var-tests.el
(esh-var-test/inside-emacs-var-split-indices)
(esh-var-test/last-result-var-split-indices): New tests.
(esh-var-test/last-arg-var-split-indices): Expand test to check
conversion behavior inside double quotes (bug#56509).