]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 months agoRevert "New function treesit-parser-changed-ranges"
Yuan Fu [Wed, 5 Jun 2024 02:55:33 +0000 (19:55 -0700)]
Revert "New function treesit-parser-changed-ranges"

This reverts commit 996b9576713f9d63ea7ff7e9630a15cb0a0214eb.

For reason see 760b54de080.

(cherry picked from commit 2ee3edce3f5de55fc11997f522cbe2f00a4471fd)

5 months agoMore-permanent fix for build with Android NDK r10b
Paul Eggert [Tue, 4 Jun 2024 18:54:24 +0000 (11:54 -0700)]
More-permanent fix for build with Android NDK r10b

* configure.ac (gl_cv_header_working_endian_h):
Remove temporary workaround for Android.
* lib/endian.in.h: Copy latest version from Gnulib.

(cherry picked from commit 24b7bf2746fd7bf097e04c5b9363cab197edbc7c)

5 months ago* lisp/outline.el (outline-revert-buffer-rehighlight): New function.
Juri Linkov [Tue, 4 Jun 2024 16:53:47 +0000 (19:53 +0300)]
* lisp/outline.el (outline-revert-buffer-rehighlight): New function.

(outline-minor-mode): Add 'outline-revert-buffer-rehighlight' to
'revert-buffer-restore-functions'.  When mode is disabled,
remove hooks from 'revert-buffer-restore-functions' and
also from 'after-change-functions'.

(cherry picked from commit 7f415f7d5e19ea3903500426a0724e49271ac699)

5 months ago; * lisp/outline.el (outline-revert-buffer-restore-visibility): Doc fix.
Eli Zaretskii [Tue, 4 Jun 2024 16:32:25 +0000 (19:32 +0300)]
; * lisp/outline.el (outline-revert-buffer-restore-visibility): Doc fix.

(cherry picked from commit 00d7845953b85345b031fa571396196d6844610c)

5 months agoFix the build with mingw.org's MinGW
Eli Zaretskii [Tue, 4 Jun 2024 16:12:38 +0000 (19:12 +0300)]
Fix the build with mingw.org's MinGW

The change in boot-time.c imported from Gnulib broke the
MinGW build using mingw.org's MinGW.  It is wrong to include
sysinfoapi.h, MS documentation says to include <windows.h>.
* lib/boot-time.c: Don't include sysinfoapi.h.

(cherry picked from commit 43c354a0004145c04bbc6adf0cfaa8c21403ad8c)

5 months ago; * src/cm.c (cmcheckmagic): Typo fix.
Robert Pluim [Tue, 4 Jun 2024 13:56:41 +0000 (15:56 +0200)]
; * src/cm.c (cmcheckmagic): Typo fix.

(cherry picked from commit 3656a81850e5fddd429b5bd91d06987185ddd6d6)

5 months agoUpdate Calc units table
Ulrich Müller [Tue, 4 Jun 2024 11:29:56 +0000 (13:29 +0200)]
Update Calc units table

* lisp/calc/calc-units.el (math-standard-units): Update to 2022
CODATA adjustment.

(cherry picked from commit 820bc42357ede73aa667f4bc842ac2fb3d35973c)

5 months agoImprove a couple of grep.el error messages
Eshel Yaron [Tue, 4 Jun 2024 20:27:18 +0000 (22:27 +0200)]
Improve a couple of grep.el error messages

5 months agoSimplify some Dired prompts
Eshel Yaron [Tue, 4 Jun 2024 20:26:53 +0000 (22:26 +0200)]
Simplify some Dired prompts

5 months ago* lisp/dired.el (dired-noselect): Simplify
Eshel Yaron [Tue, 4 Jun 2024 20:26:36 +0000 (22:26 +0200)]
* lisp/dired.el (dired-noselect): Simplify

5 months agoRemove 'dired-load-hook'
Eshel Yaron [Tue, 4 Jun 2024 20:23:47 +0000 (22:23 +0200)]
Remove 'dired-load-hook'

5 months agoUpdate .gitignore
Eshel Yaron [Tue, 4 Jun 2024 10:22:20 +0000 (12:22 +0200)]
Update .gitignore

5 months agoRevert "Improve key binding documentation."
Eshel Yaron [Tue, 4 Jun 2024 10:17:05 +0000 (12:17 +0200)]
Revert "Improve key binding documentation."

This reverts commit c606c2523e8b6e67b38c905a61db212defeb62a1.
It claims to improve stuff, but it just degrades it instead,

5 months agoTemporarily repair build with Android NDK r10b
Po Lu [Tue, 4 Jun 2024 08:21:58 +0000 (16:21 +0800)]
Temporarily repair build with Android NDK r10b

* configure.ac (gl_cv_header_working_endian_h): Unconditionally
define to yes on Android.

(cherry picked from commit d3bdf11d808d32de8bee54a14c73f72c834a31bb)

5 months agoCorrect previous change
Po Lu [Tue, 4 Jun 2024 07:16:01 +0000 (15:16 +0800)]
Correct previous change

* msdos/sedlibmk.inp (NEXT_AS_FIRST_DIRECTIVE_ENDIAN_H)
(NEXT_ENDIAN_H): Define to machine/endian.h.

(cherry picked from commit 14d401167d07245077bfd0bc492287d0f7a1d605)

5 months agoFix the DJGPP build
Po Lu [Tue, 4 Jun 2024 07:12:18 +0000 (15:12 +0800)]
Fix the DJGPP build

* config.bat: Update endian.in-h from endian.in.h.

* msdos/sedlibmk.inp (HAVE_ENDIAN_H)
(NEXT_AS_FIRST_DIRECTIVE_ENDIAN_H, NEXT_ENDIAN_H, ENDIAN_H)
(ENDIAN_H_JUST_MISSING_STDINT, GL_GENERATE_ENDIAN_H_CONDITION):
Define appropriately for DJGPP.

(cherry picked from commit c826acd4e1e812453ee71c32748dc3b02df6dd54)

5 months ago* lisp/outline.el (outline-revert-buffer-restore-visibility): New function.
Juri Linkov [Tue, 4 Jun 2024 06:37:02 +0000 (09:37 +0300)]
* lisp/outline.el (outline-revert-buffer-restore-visibility): New function.

(outline-minor-mode): Add 'outline-revert-buffer-restore-visibility'
to 'revert-buffer-restore-functions' (bug#69511).

(cherry picked from commit f69826a63d18782e372753d25d14a35249ef605d)

5 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Tue, 4 Jun 2024 04:57:53 +0000 (21:57 -0700)]
Update from Gnulib by running admin/merge-gnulib

* lib/endian.c, lib/endian.in.h, m4/endian_h.m4, m4/sys_cdefs_h.m4:
New files, copied from Gnulib.

(cherry picked from commit 799f78a92c6c31f4d181390523b83d036020ede1)

5 months agolwlib: pacify gcc -Wmissing-variable-declarations
Paul Eggert [Mon, 3 Jun 2024 21:43:10 +0000 (14:43 -0700)]
lwlib: pacify gcc -Wmissing-variable-declarations

* lwlib/lwlib.c (lwlib_toolkit_type): Remove unused var.
* lwlib/xlwmenu.c (submenu_destroyed): Now static.
* src/xmenu.c (widget_id_tick): Declare extern, as a FIXME.

(cherry picked from commit ce660c5c304e7261cae66224ad90c0dd3db363af)

5 months agoCheck for a real process when trying to find password prompts in Eshell
Jim Porter [Sun, 2 Jun 2024 20:07:10 +0000 (13:07 -0700)]
Check for a real process when trying to find password prompts in Eshell

* lisp/eshell/esh-mode.el (eshell-watch-for-password-prompt): Use
'eshell-head-process'.

(cherry picked from commit cd7dd3e675ef2e3ae6e30ee70523ceb7f1fd1d67)

5 months agoAdd an "Interaction" chapter to the Eshell manual
Jim Porter [Fri, 31 May 2024 16:36:03 +0000 (09:36 -0700)]
Add an "Interaction" chapter to the Eshell manual

* doc/misc/eshell.texi (Interaction): New chapter.
(Completion, History): Move into "Interaction" and add key indexing.
(Key rebinding): Add key indexing.
(Command Index): Add this index.

(cherry picked from commit 991600a82c7678fa15301e609f259cf3ec184089)

5 months agoProvide additional Android metadata
Po Lu [Tue, 4 Jun 2024 02:23:13 +0000 (10:23 +0800)]
Provide additional Android metadata

* java/AndroidManifest.xml.in: Enable preserving user data
beyond uninstallation, restarting activities without persiting
state, increase maximum number of simultaneously open
activities, and provide a sensible category.

(cherry picked from commit 2a699edbe5e1ab39d97b30e8d783763adc0acf9c)

5 months agoEnable downgrading between this and future releases of Emacs
Po Lu [Tue, 4 Jun 2024 02:03:01 +0000 (10:03 +0800)]
Enable downgrading between this and future releases of Emacs

* java/AndroidManifest.xml.in: Fix `versionCode' at 30.

(cherry picked from commit d812e94dde2370869198cc0b2089519be94454ef)

5 months agoUse 'revert-buffer' in Xref buffers instead of bespoke command
Eshel Yaron [Tue, 4 Jun 2024 09:05:11 +0000 (11:05 +0200)]
Use 'revert-buffer' in Xref buffers instead of bespoke command

5 months agoMove revert-buffer-restore-functions use from buff-menu.el to outline.el
Juri Linkov [Mon, 3 Jun 2024 18:13:38 +0000 (21:13 +0300)]
Move revert-buffer-restore-functions use from buff-menu.el to outline.el

* lisp/buff-menu.el (Buffer-menu-mode): Remove
revert-buffer-restore-functions with handling of
outline-minor-mode and move it to outline-minor-mode.

* lisp/outline.el (outline-minor-mode):
Add revert-buffer-restore-functions to call
outline-minor-mode-highlight-buffer after reverting the buffer
with outline-minor-mode and outline-minor-mode-highlight
where font-lock can't be used to update highlighting.

(cherry picked from commit fe79a6ff507670a2ab79fca060c2727fcd0a4dae)

5 months agoAvoid assertion violations in 'try_window_id'
Eli Zaretskii [Mon, 3 Jun 2024 18:13:05 +0000 (21:13 +0300)]
Avoid assertion violations in 'try_window_id'

* src/xdisp.c (try_window_id): Avoid assertions in
'find_first_unchanged_at_end_row' due to 'init_iterator' freeing
all the realized faces.  (Bug#71274)

(cherry picked from commit 642bf58d4fbff4493b629837564b7e5c77c7615c)

5 months agopcase.el (\`): Try and handle large patterns better
Stefan Monnier [Mon, 3 Jun 2024 17:26:10 +0000 (13:26 -0400)]
pcase.el (\`): Try and handle large patterns better

Large backquote patterns tend to lead to very large and deeply
nested expansions, but they also tend to contain a lot of
"constant" subpatterns that can be compiled to quote patterns.
This patch does just that.  See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg01140.html

* lisp/emacs-lisp/pcase.el (pcase--split-pred):
Improve the handling of pred-vs-quote so it also works with
quoted objects like cons cells, vectors, and strings.
Simplify the `pcase--mutually-exclusive-p` branch accordingly.
(pcase--expand-\`): New function, extracted from the \` pcase macro.
Make it recurse internally, and optimize backquote patterns to `quote`
patterns where possible.
(\`): Use it.

* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-vectors): Add tests
that were broken by a more naïve version of the optimization.
(pcase-tests-quote-optimization): New test.

(cherry picked from commit 16fc5b6c0c72464a75d9a84b754375662b3acec6)

5 months agoAvoid crashes and assertions while handling SIGWINCH
Eli Zaretskii [Mon, 3 Jun 2024 17:37:31 +0000 (20:37 +0300)]
Avoid crashes and assertions while handling SIGWINCH

* src/dispnew.c (build_frame_matrix_from_leaf_window)
(window_to_frame_vpos): Avoid assertion violations when we have an
unhandled SIGWINCH.
(frame_size_change_delayed): New function.
* src/dispextern.h (frame_size_change_delayed): Add prototype.
* src/cm.c (cmcheckmagic): Don't check magicwrap if we have an
unhandled SIGWINCH.  (Bug#71289)

(cherry picked from commit eb9afd558ec506f1d349dbb61668d6231fda136f)

5 months agoNew commands to show/hide outlines by regexp (bug#49731)
Juri Linkov [Mon, 3 Jun 2024 17:18:46 +0000 (20:18 +0300)]
New commands to show/hide outlines by regexp (bug#49731)

* lisp/outline.el (outline-mode-prefix-map): Bind "/ s" to
'outline-show-by-heading-regexp', and "/ h" to
'outline-hide-by-heading-regexp'.
(outline-show-by-heading-regexp)
(outline-hide-by-heading-regexp): New commands.
(outline-hidden-headings-regexp): New helper function.

(cherry picked from commit 4395f4d4530db77156b20209c1a81dce22c6e62d)

5 months agoNew variable 'revert-buffer-restore-functions' (bug#69511)
Juri Linkov [Mon, 3 Jun 2024 16:55:47 +0000 (19:55 +0300)]
New variable 'revert-buffer-restore-functions' (bug#69511)

* doc/lispref/backups.texi (Reverting):
Add documentation for 'revert-buffer-restore-functions'.

* lisp/files.el (revert-buffer-restore-functions): New variable.
(revert-buffer-restore-read-only): New function.
(revert-buffer): Use 'revert-buffer-restore-functions' with
the default value 'revert-buffer-restore-read-only' (bug#69511).

* lisp/buff-menu.el (Buffer-menu-mode): Add hook
'revert-buffer-restore-functions' to restore
outline-minor-mode highlighting.

(cherry picked from commit a525cfb3af0c49c5c64e8af548ab23d086348fed)

5 months agoSupport ada-ts-mode, gpr-mode and gpr-ts-mode in Eglot
Troy Brown [Sun, 2 Jun 2024 15:48:54 +0000 (11:48 -0400)]
Support ada-ts-mode, gpr-mode and gpr-ts-mode in Eglot

* lisp/progmodes/eglot.el (eglot-server-programs): Add
ada-ts-mode, gpr-mode and gpr-ts-mode.

Copyright-paperwork-exempt: yes
(cherry picked from commit 58a26db6261b752a34957a6554820a7cf5c05fc2)

5 months agoAdd 'message' to 'comp-primitive-type-specifiers'
Andrea Corallo [Fri, 31 May 2024 15:14:10 +0000 (17:14 +0200)]
Add 'message' to 'comp-primitive-type-specifiers'

* lisp/emacs-lisp/comp-common.el (comp-primitive-type-specifiers): Add
message.

(cherry picked from commit 2ae6451ec1216a9341080008d7065d6a75150455)

5 months ago* lisp/emacs-lisp/comp.el (native-compile): Type declare.
Andrea Corallo [Fri, 31 May 2024 15:00:50 +0000 (17:00 +0200)]
* lisp/emacs-lisp/comp.el (native-compile): Type declare.

(cherry picked from commit e39e96c9b93cf99d50f99f3e0593cbfbf0ac758d)

5 months ago; compilation-error-regexp-alist-alist order comment
Mattias Engdegård [Mon, 3 Jun 2024 14:52:27 +0000 (16:52 +0200)]
; compilation-error-regexp-alist-alist order comment

(cherry picked from commit 876bd6506d78392d7f6b8d13df678da21ad05af9)

5 months agoRevert "Add support for Rust compilation messages"
Mattias Engdegård [Mon, 3 Jun 2024 14:31:02 +0000 (16:31 +0200)]
Revert "Add support for Rust compilation messages"

This reverts commit 2e862f81a355435fb7e837ffebee2f657c26ff23.
It had serveral problems; see bug#70794.

(cherry picked from commit bf6c3892dedea4c329fc884e6a1d59c463f1adac)

5 months agoImprove key binding documentation.
Robert Pluim [Mon, 3 Jun 2024 12:52:05 +0000 (14:52 +0200)]
Improve key binding documentation.

* doc/emacs/custom.texi (Init Rebinding): Explain how to bind a key to a
string and how to use non-ASCII characters.
* lisp/keymap.el (keymap-global-set, keymap-local-set): Mention
'key-description'.

(cherry picked from commit 4dfb0829ed3e9c0d26523242e8db9907191dc8db)

5 months agoAdd common pairs to defcustom for electric-quote-chars
Robert Pluim [Mon, 3 Jun 2024 12:00:56 +0000 (14:00 +0200)]
Add common pairs to defcustom for electric-quote-chars

* lisp/electric.el (electric--print-list-of-chars): New function to
display chars as chars instead of integers in a custom widget.
(electric-char-pair): New widget for displaying a pair of characters.
(electric-quote-chars-pairs): New widget.  Contains presets for common
combinations of left/right quotation characters
(electric-quote-chars): Update to use 'electric-quote-chars-pairs'.

* etc/NEWS: Announce the change.

(cherry picked from commit 62d6ba2ede95805ba309bdc538628eb49b331f03)

5 months agoSmall followup change
Po Lu [Mon, 3 Jun 2024 12:37:41 +0000 (20:37 +0800)]
Small followup change

* lisp/image.el (create-image): Remove supererogatory instances
of pcase.  Recognize new `lambda' values and refrain from
specifying a default transform-smoothing when it is returned.
(image--default-smoothing): Return lambda if scaling is default.

* lisp/tool-bar.el (tool-bar--image-expression): Revert this
portion of last change.

(cherry picked from commit 68cc4cb6b1ce7ccc66084cb5e431bc9f6713bf04)

5 months ago; * src/xterm.c (syms_of_xterm): Fix doc string typos.
Collin Funk [Mon, 3 Jun 2024 09:35:06 +0000 (02:35 -0700)]
; * src/xterm.c (syms_of_xterm): Fix doc string typos.

Bug#71333

Copyright-paperwork-exempt: yes
(cherry picked from commit 3a54dfab2463913601a16756102ac1d30653a805)

5 months ago; Fix doc strings in kmacro.el
Eli Zaretskii [Mon, 3 Jun 2024 11:35:51 +0000 (14:35 +0300)]
; Fix doc strings in kmacro.el

* lisp/kmacro.el (kmacro-reg-add-counter-equal)
(kmacro-reg-add-counter-less, kmacro-reg-add-counter-greater):
Clarify doc string.  (Bug#61549)

(cherry picked from commit 52f802363ad34010cd073629a55831a52377dd43)

5 months agoAdd another iso-transl entry for Euro character
Robert Pluim [Mon, 3 Jun 2024 11:29:54 +0000 (13:29 +0200)]
Add another iso-transl entry for Euro character

* lisp/international/iso-transl.el (iso-transl-char-map): Add 'C-x 8 E'
to align with the other currency characters.

* etc/NEWS: Announce it.

(cherry picked from commit 3ad2dd7f3bf5309aa5a12aa5d16b0d0d9f9364c4)

5 months agoImprove support for entering quotation marks
Robert Pluim [Thu, 16 May 2024 14:25:24 +0000 (16:25 +0200)]
Improve support for entering quotation marks

* lisp/international/iso-transl.el (iso-transl-char-map): Add entries
for "low" single and double quotation marks.
(iso-transl-language-alist): Add convenient support for the official
German quoting style to the German language entry. It uses "low" double
quotes on the left, and *left* double quotes on the right.  Add support
for single guillemets to the French language entry.
* lisp/leim/quail/latin-post.el ("latin-postfix"): Add entries for
single, double and "low" Unicode quotation marks.  Add entries for
single guillemets.
* lisp/leim/quail/latin-pre.el ("latin-prefix"): And here.

* etc/NEWS: Announce the changes.

(Bug#70984)

(cherry picked from commit 0e811aba53f5cc3a8d8c13fa8922149f95e83da4)

5 months agoSkip unmature file notification tests
Michael Albinus [Mon, 3 Jun 2024 10:53:04 +0000 (12:53 +0200)]
Skip unmature file notification tests

* test/lisp/filenotify-tests.el (file-notify--deftest-remote):
Skip with "gio" library.  It is unmature.

(cherry picked from commit 288b0db9682c519a3d7f8fa0c037640997209375)

5 months ago; * doc/lispref/display.texi (Image Descriptors): Insert missing text.
Po Lu [Mon, 3 Jun 2024 08:36:20 +0000 (16:36 +0800)]
; * doc/lispref/display.texi (Image Descriptors): Insert missing text.

(cherry picked from commit a739cab66378a367cef8fa3a59f7ccb70a56bbb4)

5 months agoMaintain relationship between tool bar image and default font width
Po Lu [Mon, 3 Jun 2024 08:34:51 +0000 (16:34 +0800)]
Maintain relationship between tool bar image and default font width

* doc/lispref/display.texi (Image Descriptors): Document new
value of QCscale.

* lisp/cus-start.el (standard) <image-scaling-factor>: New
definition.

* lisp/image.el (image-scaling-factor): Move to C.
(create-image): Provide `default' as the default scaling factor.
(image--default-smoothing): Accept non-integer scaling factors.
(image-compute-scaling-factor): Document that this function
is no longer invoked by Emacs.

* lisp/tool-bar.el (tool-bar--image-expression): Disable
transform smoothing for tool-bar icons.

* src/dispextern.h (clear_image_cache): New definition.

* src/frame.c (gui_set_font): Clear such image cache entries as
derive their scales from the default font width.

* src/image.c (clear_image_cache): Export function.
(compute_image_size): Implement `default' by reading
Vimage_scaling_factor and/or computing a scale factor from the
frame's column width, as the case may be.
New argument F.  All callers changed.
(syms_of_image) <Vimage_scaling_factor>: Move from image.el.

(cherry picked from commit 56376585134d627f96c71b7b063ec51548d3ad3f)

5 months agoUse parser notifier to set parser ranges
Yuan Fu [Mon, 3 Jun 2024 04:52:48 +0000 (21:52 -0700)]
Use parser notifier to set parser ranges

This is a continuation from an earlier commit where I added
treesit-parser-changed-ranges and friends.  Dmitry raised an concern
about the edge case where the parser re-parses multiple times before
treesit--pre-redisplay has a chance to run and process changed ranges.

Instead of making treesit-parser-changed-ranges DTRT and become more
complicated, it's agreed that using parser notifier is a better
solution (and treesit-parser-changed-ranges can probably be removed).

So, I took out the code that does the work from treesit--pre-redisplay
and put them into treesit--font-lock-mark-ranges-to-fontify.  This
function will be called on each parser re-parse.  And in
treesit--pre-redisplay, to ensure that treesit--f-l-m-r-to-f gets
called, we force the primary parser to re-parse.

I also added a new variable that major modes need to set,
treesit-primary-parser.  I also added code that makes Emacs guess the
primary parser if that variable isn't set.

Documentation fot treesit-primary-parser will come later.

For futher reference, the message id for the message that prompted
this change is <dc94733b-df75-446c-980e-1c8ea65826cf@gutov.dev>

* lisp/treesit.el (treesit-primary-parser): New variable.
(treesit--font-lock-mark-ranges-to-fontify): New function.
(treesit--guess-primary-parser): New function.
(treesit--pre-redisplay): Extract out.
(treesit--pre-syntax-ppss): Add comments.
(treesit-major-mode-setup): Guess and set treesit-primary-parser; add
treesit--font-lock-mark-ranges-to-fontify as a notifier to the primary
parser.

(cherry picked from commit 760b54de080c238ea9f7b16055e820862d3e8896)

5 months ago; Remove superfluous 'quit' handler in 'eshell-send-input'
Jim Porter [Sun, 2 Jun 2024 19:03:44 +0000 (12:03 -0700)]
; Remove superfluous 'quit' handler in 'eshell-send-input'

This is now handled by the command form itself, thanks to eef32d13da5.

* lisp/eshell/esh-mode.el (eshell-send-input): Remove 'quit' handler.

(cherry picked from commit b44d511102dd3a94495d8f8446c88ac8898cd58f)

5 months agoNew user option 'shell-history-file-name'
Michael Albinus [Sun, 2 Jun 2024 17:30:12 +0000 (19:30 +0200)]
New user option 'shell-history-file-name'

* doc/emacs/misc.texi (Shell Ring): Explain shell-history-file-name.

* doc/misc/tramp.texi (Inline methods): Be more specific with containers.
(Remote processes): New subsection "Managing remote shell history".
Explain shell-history-file-name.
(Frequently Asked Questions): Add items to Tramp speedup.  Remove
entry about history file.

* etc/NEWS: New user option 'shell-history-file-name'.

* lisp/shell.el (shell-history-file-name): New defcustom.
(shell-mode): Use it.  (Bug#71049)

(cherry picked from commit bffe73b562f4065bfa99095a46f1bdb731bebc13)

5 months agoFix last change
Michael Albinus [Sun, 2 Jun 2024 14:53:56 +0000 (16:53 +0200)]
Fix last change

* lisp/net/tramp.el (tramp-remote-path): Add "/opt/homebrew/bin"
and "/opt/homebrew/sbin".

(cherry picked from commit 2849c0cda3785124465806134b316f95231a67a5)

5 months agoFix bug#71235
Michael Albinus [Sun, 2 Jun 2024 13:09:44 +0000 (15:09 +0200)]
Fix bug#71235

* lisp/dired.el (dired-insert-directory): Fix remote case.

* lisp/net/tramp.el (tramp-remote-path): Add "/opt/homebrew/bin".

(cherry picked from commit a37e812d9677a1e97daf112ec2d821aaacd7664f)

5 months agoImprove 'customize-read-group'
Eshel Yaron [Mon, 3 Jun 2024 09:10:23 +0000 (11:10 +0200)]
Improve 'customize-read-group'

5 months agoAdd Flymake fix suggestions for Checkdoc diagnostics
Eshel Yaron [Mon, 3 Jun 2024 08:55:26 +0000 (10:55 +0200)]
Add Flymake fix suggestions for Checkdoc diagnostics

5 months agoRemove helper.el
Eshel Yaron [Mon, 3 Jun 2024 08:54:53 +0000 (10:54 +0200)]
Remove helper.el

5 months ago; Improve diagnostics in Image Dired
Eli Zaretskii [Sun, 2 Jun 2024 11:14:10 +0000 (14:14 +0300)]
; Improve diagnostics in Image Dired

* lisp/image/image-dired-external.el
(image-dired--check-executable-exists): Improve diagnostics.

(cherry picked from commit 4303e5c9fa37368b50677f21aba977758f100e3c)

5 months agoIn rgrep, check matching files before excluding files
Spencer Baugh [Sun, 26 May 2024 13:26:09 +0000 (09:26 -0400)]
In rgrep, check matching files before excluding files

There are a lot of excluding globs, and checking them all is expensive.
The files glob (i.e. the glob for files we actually want) is usually
just one or two entries, so it's quite fast to check.

If find checks the files glob first and then the excluding glob, it has
to do much less checking (since the files glob will substantially narrow
down the set of files on its own), and find performance is much better.

In my benchmarking, this takes (rgrep "foo" "*.el" "~/src/emacs/trunk/")
from ~410ms to ~130ms.

Further optimizations are possible now that the ignores and matched
files are in the same <F> argument which can be rearranged more easily
without compatibility issues; I'll do those optimizations in later
commits.

* lisp/progmodes/grep.el (rgrep-find-ignores-in-<f>): Add.
* lisp/progmodes/grep.el (rgrep-default-command): Check
rgrep-find-ignores-in-<f> and move the excluded files glob to part of
the "files" argument.  (Bug#71179)

(cherry picked from commit b71fa27987d89774c84b0c9362ddfb4a0f679856)

5 months ago; * etc/NEWS: Name the systems that support touch-screen events.
Po Lu [Sun, 2 Jun 2024 08:39:18 +0000 (16:39 +0800)]
; * etc/NEWS: Name the systems that support touch-screen events.

(cherry picked from commit 7983f882823bafd5dd834c24d4defb26525f687b)

5 months agoTrim redundancies from EmacsTileObject
Po Lu [Sun, 2 Jun 2024 08:37:39 +0000 (16:37 +0800)]
Trim redundancies from EmacsTileObject

* java/org/gnu/emacs/EmacsTileObject.java (EmacsTileObject)
<colorFilter>: Delete unused field.
<paint>: Qualify as `static'.

(cherry picked from commit 253b1d6ee817222b5394fa7791cfbb0de29e4a65)

5 months agoDocument a GDK misdesign interfering with touch screens and menus
Po Lu [Sun, 2 Jun 2024 08:17:34 +0000 (16:17 +0800)]
Document a GDK misdesign interfering with touch screens and menus

* etc/PROBLEMS (Runtime problems specific to PGTK): Document a
misdesign preventing menus from being displayed in response to
touch screen events.

(cherry picked from commit 50c4feb13246f1f82efd761dd13d31d5474cffa0)

5 months agoMake comment-indent-new-line conform better to CC Mode (bug#71225)
Vincenzo Pupillo [Sun, 26 May 2024 19:07:50 +0000 (21:07 +0200)]
Make comment-indent-new-line conform better to CC Mode (bug#71225)

* lisp/progmodes/c-ts-common.el: (c-ts-common-comment-indent-new-line):
Single line comment and block comment now behave more like the
c-indent-new-comment-line.

(cherry picked from commit 1ea398e8f1d32310ef0b462567e60254c6189766)

5 months agoStipple support for MS Windows (bug#71159)
Elias G. Perez [Sat, 11 May 2024 02:36:42 +0000 (20:36 -0600)]
Stipple support for MS Windows (bug#71159)

* src/w32term.c (w32_fill_stipple_pattern): New function.
(w32_draw_glyph_string_bg_rect w32_draw_stretch_glyph_string)
(w32_draw_glyph_string_background): Use new stipple function.
* src/w32term.h (w32_bitmap_record): Add stipple value.
* src/image.c (image_create_bitmap_from_data): Create stipple
bitmap.
(image_create_bitmap_from_file): Add suuport for pixmap and
create stipple bitmap.
(free_bitmap_record): Release stipple.

* etc/NEWS: Announce support for stipples in MS-Windows.

(cherry picked from commit 48bb25c0e37f8489b06b82a4c32f0c6dcc0856e9)

5 months agoAdd 'minibuffer-action' for 'bookmark-jump'
Eshel Yaron [Sun, 2 Jun 2024 11:15:38 +0000 (13:15 +0200)]
Add 'minibuffer-action' for 'bookmark-jump'

5 months agoSeparate creation and display of Xref results buffer
Eshel Yaron [Sun, 2 Jun 2024 11:15:13 +0000 (13:15 +0200)]
Separate creation and display of Xref results buffer

5 months agoAdapt last addition to kmacro.el
Eshel Yaron [Sun, 2 Jun 2024 11:14:37 +0000 (13:14 +0200)]
Adapt last addition to kmacro.el

5 months agoAdd new keyboard macro counter functions (bug#61549)
Alex Bochannek [Sat, 1 Jun 2024 00:19:02 +0000 (17:19 -0700)]
Add new keyboard macro counter functions (bug#61549)

Advanced keyboard macro counter commands for register
integration and conditional macro termination
* lisp/kmacro.el (kmacro-keymap)
(kmacro-reg-load-counter, kmacro-reg-save-counter)
(kmacro-reg-add-counter-equal, kmacro-reg-add-counter-less)
(kmacro-reg-add-counter-greater, kmacro-reg-add-counter)
(kmacro-quit-counter-equal, kmacro-quit-counter-less)
(kmacro-quit-counter-greater, kmacro-quit-counter):
Add advanced keyboard macro counter commands to kmacro keymap.
Implement advanced keyboard macro counter commands.

* test/lisp/kmacro-tests.el (kmacro-tests-test-reg-load)
(kmacro-tests-test-reg-save)
(kmacro-tests-test-reg-add-counter-equal-01)
(kmacro-tests-test-reg-add-counter-equal-02)
(kmacro-tests-test-reg-add-counter-equal-03)
(kmacro-tests-test-reg-add-counter-equal-04)
(kmacro-tests-test-reg-add-counter-less)
(kmacro-tests-test-reg-add-counter-greater)
(kmacro-tests-test-quit-counter-equal-01)
(kmacro-tests-test-quit-counter-equal-02)
(kmacro-tests-test-quit-counter-equal-03)
(kmacro-tests-test-quit-counter-equal-04)
(kmacro-tests-test-quit-counter-less)
(kmacro-tests-test-quit-counter-greater):
Implement unit tests for advanced keyboard macro counter
commands.

* etc/NEWS:
Document advanced keyboard macro counter commands.

(cherry picked from commit 5ad8ebe6e2808df001255e1f34e8c880e1e57ad4)

5 months ago; * lisp/image/image-dired-external.el (image-dired-set-exif-data): Doc fix.
Eli Zaretskii [Sun, 2 Jun 2024 05:37:57 +0000 (08:37 +0300)]
; * lisp/image/image-dired-external.el (image-dired-set-exif-data): Doc fix.

(cherry picked from commit a0519d6d09c6df86adc658a89e97926bb352eb05)

5 months agoFix LLDB frame-format for optional column number info
Gerd Möllmann [Sat, 1 Jun 2024 19:05:50 +0000 (21:05 +0200)]
Fix LLDB frame-format for optional column number info

* lisp/progmodes/gud.el (gud--lldb-python-init-string): In the !gud
part, make column number info optional by putting it in a scope.

(cherry picked from commit 9a2088bdd928b384beca3c95c2719843f74924a0)

5 months agoImprove error handling in 'image-dired-thumbnail-set-image-description'.
Eli Zaretskii [Sat, 1 Jun 2024 17:50:40 +0000 (20:50 +0300)]
Improve error handling in 'image-dired-thumbnail-set-image-description'.

* lisp/image/image-dired-external.el
(image-dired-thumbnail-set-image-description): Show more detailed
error messages in case of failure.

(cherry picked from commit 8ecf1a995fc318ea055cbc71f9223340feb2acd0)

5 months ago; * doc/emacs/dired.texi (Image-Dired): Improve and extend.
Eli Zaretskii [Sat, 1 Jun 2024 17:40:53 +0000 (20:40 +0300)]
; * doc/emacs/dired.texi (Image-Dired): Improve and extend.

(cherry picked from commit d98ec75d649758c9fe96a7054c0a7829d04525a0)

5 months agoMinor Tramp changes
Michael Albinus [Sat, 1 Jun 2024 17:22:21 +0000 (19:22 +0200)]
Minor Tramp changes

* lisp/net/tramp-adb.el:
* lisp/net/tramp-container.el: Add myself as maintainer.

* lisp/net/tramp-compat.el (connection-local-default-application):
Define if not bound.
(tramp-compat-connection-local-p, tramp-compat-connection-local-value):
Use it.

(cherry picked from commit f0cd7eab0967c787703f144ac9d7c04e1d866306)

5 months agoElaborate 'help-complete-keys'
Eshel Yaron [Sat, 1 Jun 2024 19:47:30 +0000 (21:47 +0200)]
Elaborate 'help-complete-keys'

5 months agoshell-command-mode: New major mode for async-shell-command
Dmitry Gutov [Sat, 1 Jun 2024 15:03:42 +0000 (18:03 +0300)]
shell-command-mode: New major mode for async-shell-command

* etc/NEWS: Mention the additions.

* lisp/shell.el (shell-command-mode): New major mode (bug#71049).

* lisp/simple.el (async-shell-command-mode):
New variable, with default value pointing to that mode.
(shell-command): Refer to it here.
(async-shell-command): Update docstring.

* lisp/net/tramp.el (tramp-handle-shell-command):
Use the new variable when available.

(cherry picked from commit a154f0aa73bceeaaeefcd243e7db9d09e3f450d7)

5 months agogo-ts-mode: Highlight variadic function parameter names
Dmitry Gutov [Sat, 1 Jun 2024 14:47:13 +0000 (17:47 +0300)]
go-ts-mode: Highlight variadic function parameter names

* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Add matcher for variadic parameter declarations.

(cherry picked from commit d91ad9be5a72974784e0552069020c3ae0bc830e)

5 months agoAdd font-locking for variables in go-ts-mode range clauses (bug#71209)
Noah Peart [Sun, 26 May 2024 12:34:34 +0000 (05:34 -0700)]
Add font-locking for variables in go-ts-mode range clauses (bug#71209)

* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Add font-locking rule for variable names in range clauses.
* test/lisp/progmodes/go-ts-mode-tests.el (go-ts-test-font-lock):
Add font-locking test for go-ts-mode.
* test/lisp/progmodes/go-ts-mode-resources/font-lock.go: New file
for go-ts-mode font-locking tests.

(cherry picked from commit 302142189222f4a1ba75bc2c8ce00307c2499689)

5 months agoFix misc problems with thumbnails on MS-Windows
Eli Zaretskii [Sat, 1 Jun 2024 13:43:18 +0000 (16:43 +0300)]
Fix misc problems with thumbnails on MS-Windows

* lisp/image/image-dired-external.el (image-dired-pngcrush-thumb):
Fix deletion of intermediate file.
(image-dired-cmd-pngcrush-options)
(image-dired-cmd-create-standard-thumbnail-options): Use %u for
file:// URI.
(image-dired--file-URI): New function.
(image-dired-create-thumb-1, image-dired-create-thumb-2)
(image-dired-set-exif-data): Use it to generate correct URI on
MS-Windows.

* src/w32image.c (Fw32image_create_thumbnail): Copy the file names
before mirroring their slashes.

(cherry picked from commit d2dce513445d7235c9f751ea6d9b4847d62882e7)

5 months agoImprove touch-screen support on PGTK
Po Lu [Sat, 1 Jun 2024 13:27:51 +0000 (21:27 +0800)]
Improve touch-screen support on PGTK

* lisp/touch-screen.el (touch-screen-translate-touch): Do not
prepend posn if the symbol is such that keyboard.c will do so
immediately after returning.

* src/pgtkterm.c (pgtk_toolkit_position): Remove mistakenly
ported code.
(pgtk_create_terminal): Remove toolkit_position hook.
(motion_notify_event, button_event): Ignore emulated pointer
events, and apply an additional test to circumvent a GDK
oversight.
(touch_event_cb): Correct return type, and provide touch
sequence initialization and removal events as
`last_click_event's.

(cherry picked from commit 7af5d6fc9a352d4f53f8e48a6bc9ae9a3bf235a3)

5 months ago; Fix a typo.
Eli Zaretskii [Sat, 1 Jun 2024 12:37:51 +0000 (15:37 +0300)]
; Fix a typo.

(cherry picked from commit b4a93b4484c7406a395f1c1f3e8d1236138ba2a9)

5 months ago; * lisp/image/image-dired.el (w32-shell-execute): Declare.
Eli Zaretskii [Sat, 1 Jun 2024 12:33:10 +0000 (15:33 +0300)]
; * lisp/image/image-dired.el (w32-shell-execute): Declare.

(cherry picked from commit bed63ea922a4e13bd3d6fbb3e7e7f2b408779d3b)

5 months ago; Fix compilation warning in 'image-dired-external.el'
Eli Zaretskii [Sat, 1 Jun 2024 12:30:03 +0000 (15:30 +0300)]
; Fix compilation warning in 'image-dired-external.el'

* lisp/image/image-dired-external.el (w32image-create-thumbnail):
Declare.

(cherry picked from commit de7e3c33241923ab44b3cda8b237281f00c6b49d)

5 months agoImprove thumbnail generation on MS-Windows
Eli Zaretskii [Sat, 1 Jun 2024 12:22:11 +0000 (15:22 +0300)]
Improve thumbnail generation on MS-Windows

* lisp/image/image-dired-external.el (image-dired-create-thumb-2):
Optimize PNG thumbnails.
(image-dired-pngnq-thumb, image-dired-pngcrush-thumb)
(image-dired-optipng-thumb): On MS-Windows, invoke the PNG
optimization programs synchronously.
(image-dired-cmd-create-thumbnail-program)
(image-dired-cmd-create-thumbnail-options)
(image-dired-cmd-pngcrush-program)
(image-dired-cmd-optipng-program)
(image-dired-cmd-create-standard-thumbnail-options)
(image-dired-cmd-rotate-original-program)
(image-dired-temp-rotate-image-file)
(image-dired-cmd-write-exif-data-program)
(image-dired-cmd-write-exif-data-options): Doc fixes.
(image-dired-thumb-queue-run): Don't allow more than 30 concurrent
thumbnail-creation jobs on MS-Windows.

(cherry picked from commit e42da81f54ec7d3ddcb70b54fa461c7dd6c3b101)

5 months agoImplement touch screen events on PGTK
Po Lu [Sat, 1 Jun 2024 07:41:54 +0000 (15:41 +0800)]
Implement touch screen events on PGTK

* etc/NEWS: Better qualify entry for touch screen events.

* lisp/loadup.el (featurep 'pgtk): Load touch-screen.el.

* lisp/touch-screen.el: Revise list of systems where touch
screen events are reported.

* src/gtkutil.c (xg_create_frame_widgets): Request
GDK_TOUCH_MASK.

* src/pgtkfns.c (pgtk_frame_parm_handlers, tip_window): Pacify
compiler warning.

* src/pgtkterm.c (pgtk_free_frame_resources): Free touch points
linked to this frame.
(pgtk_link_touch_point, pgtk_unlink_touch_point)
(pgtk_unlink_touch_points, pgtk_find_touch_point): New
functions, ported from X.
(touch_event_cb): New event callback.
(pgtk_set_event_handler): Register `touch_event_cb' as handler
for `touch-event'.
(pgtk_delete_display): Free residual touch points on this
display.

* src/pgtkterm.h (struct pgtk_touch_point): New structure.
(struct pgtk_display_info) <touchpoints>: New field.

(cherry picked from commit 2b7056db424ab0f8bf9e96b5a3c6aa12a3debf48)

5 months agoOn X, avoid reporting unrepresentable touch IDs to Lisp
Po Lu [Sat, 1 Jun 2024 05:53:37 +0000 (13:53 +0800)]
On X, avoid reporting unrepresentable touch IDs to Lisp

* src/xterm.c (xi_link_touch_point): Assign a Lisp-representable
identifier to the new touch point and return the same.
(xi_unlink_touch_point): New arg LOCAL_DETAIL.  Return such an
identifier if there is a matching touch point record.
(handle_one_xevent): Adjust as is proper.

* src/xterm.h (struct xi_touch_point_t) <local_detail>:
New field.  Reorder fields for alignment.

(cherry picked from commit b1692e23edc32ce8938d3af200c0c42c8aa6b313)

5 months agoMake Tramp error handling more precise
Michael Albinus [Fri, 31 May 2024 14:27:47 +0000 (16:27 +0200)]
Make Tramp error handling more precise

* lisp/net/tramp-container.el (tramp-actions-copy-out-of-band)
(tramp-container-no-container-regexp): Remove.  Do not register them.
(tramp-distrobox-no-container-regexp): New defcustom.
(tramp-enable-distrobox-method): Add it to
`'tramp-actions-before-shell.  (Bug#71200)

(cherry picked from commit 0cb511b33bc96fc30d8e5286a474b4eea54817e3)

5 months agoRemove unused Fget_file_char
Mattias Engdegård [Thu, 30 May 2024 16:10:02 +0000 (18:10 +0200)]
Remove unused Fget_file_char

* src/lread.c (Fget_file_char): Remove.  It is unused, undocumented and
we actively tell users not to call it.

(cherry picked from commit 319e16550d665d1eae6f9e355c475ab668371cf3)

5 months ago; * src/w32image.c (thumb_type_data): Revert parts of recent change.
Eli Zaretskii [Fri, 31 May 2024 06:36:03 +0000 (09:36 +0300)]
; * src/w32image.c (thumb_type_data): Revert parts of recent change.

(cherry picked from commit f3891da49722a5e8a9f68435c8af13d24e03a6be)

5 months agoLimit matches of treesit-thing-settings in js-ts-mode (bug#71244)
Juri Linkov [Fri, 31 May 2024 06:34:28 +0000 (09:34 +0300)]
Limit matches of treesit-thing-settings in js-ts-mode (bug#71244)

* lisp/progmodes/js.el (js-ts-mode): Use 'js--regexp-opt-symbol'
for 'js--treesit-sexp-nodes', 'js--treesit-sentence-nodes' and 'text'
that wraps the regexp in \_< and \_> delimiters to avoid false positives
such as "expression" used for "expression_statement".
(js--treesit-sexp-nodes): Add more useful nodes "parenthesized_expression",
"formal_parameters", "statement_block", "object", "object_pattern",
"named_imports", "class_body".

(cherry picked from commit 87e4e1beab05c297c6a4b2b159dd07246381884f)

5 months ago* lisp/man.el (Man-getpage-in-background): Don't set buffer before display.
Juri Linkov [Fri, 31 May 2024 06:25:52 +0000 (09:25 +0300)]
* lisp/man.el (Man-getpage-in-background): Don't set buffer before display.

Call 'Man-notify-when-ready' before switching the current buffer.
This will avoid possible messing with the current buffer by
'Man-notify-when-ready' where display-buffer functions might change
the current buffer, thus breaking the subsequent setting of buffer-local
variables like Man-arguments in the wrong buffer (bug#71271).

(cherry picked from commit b7824916300e63e7352d2e268c72894b68937553)

5 months ago; Fix coding style in w32image.c
Po Lu [Fri, 31 May 2024 01:54:49 +0000 (09:54 +0800)]
; Fix coding style in w32image.c

* src/w32image.c (get_encoder_clsid): Insert space between
identifier and param type list.
(struct thumb_data_type, struct cached_encoder): Break before
opening bracket at top-level.

(cherry picked from commit 4077bb9867c4396769fa5837b40c0461de6b92d6)

5 months agotrack-changes.el: Keep a bit more info when logging an error
Stefan Monnier [Thu, 30 May 2024 23:00:23 +0000 (19:00 -0400)]
track-changes.el: Keep a bit more info when logging an error

* lisp/emacs-lisp/track-changes.el (track-changes--recover-from-error):
Add arg `info`.
(track-changes-fetch, track-changes--after): Use it to preserve a bit
more information about errors.

(cherry picked from commit 436b344be36152acbac693009c560b6bfb9697a2)

5 months agoad-activate-advised-definition: Use proper function objects
Stefan Monnier [Thu, 30 May 2024 22:57:56 +0000 (18:57 -0400)]
ad-activate-advised-definition: Use proper function objects

* lisp/emacs-lisp/advice.el (ad-activate-advised-definition):
Use interpreted functions rather than lambda lists.

(cherry picked from commit 2e16bcd8ede77e41e0caaf71e1d22edadadc79dd)

5 months agoserver.el: Avoid nested runs of process filters (bug#71223)
Stefan Monnier [Thu, 30 May 2024 22:28:02 +0000 (18:28 -0400)]
server.el: Avoid nested runs of process filters (bug#71223)

In case we have a "storm" of emacsclient requests coming at the
same time, our process filters ended up running nested within
each other, eating up the stack and causing errors.  Try and be
more careful with our use of `sit-for` in the process filter,
and make sure our process filters are run one at a time.

* lisp/server.el (server--message-sit-for): New function.
(server--process-filter-1): New function, extracted from
`server-process-filter`.  Use `server--message-sit-for` to display the
messages and use `run-with-timer` to delay the `delete-process`.
(server--process-filter-pending, server--process-filter-active): New vars.
(server--process-filter-all-pending): New function.
(server-process-filter): Use them.

(cherry picked from commit 0d7d835902dfaeaae03850fb37e369833bb5664d)

5 months agoImprove documentation of case-conversion commands
Eli Zaretskii [Tue, 28 May 2024 12:39:13 +0000 (15:39 +0300)]
Improve documentation of case-conversion commands

* doc/emacs/text.texi (Case): Include the commands with negative
arguments.  (Bug#71220)

(cherry picked from commit bf50aa38f9d2a3a5af8d32ce139c7533c912c476)

5 months ago; Fix typos
Stefan Kangas [Mon, 27 May 2024 08:11:15 +0000 (10:11 +0200)]
; Fix typos

(cherry picked from commit 225b426f256ba00aff7669ad18a5c85f86e22f67)

5 months agoCease adding completions to minibuffer defaults by default
Eshel Yaron [Sat, 1 Jun 2024 16:43:22 +0000 (18:43 +0200)]
Cease adding completions to minibuffer defaults by default

5 months agoMove category ahead of style in completions header line
Eshel Yaron [Sat, 1 Jun 2024 16:43:02 +0000 (18:43 +0200)]
Move category ahead of style in completions header line

5 months agoNew command 'help-complete-keys' for 'prefix-help-command'
Eshel Yaron [Sat, 1 Jun 2024 16:42:04 +0000 (18:42 +0200)]
New command 'help-complete-keys' for 'prefix-help-command'

5 months agoFix 'info-finder' with prefix argument
Eshel Yaron [Fri, 31 May 2024 11:53:17 +0000 (13:53 +0200)]
Fix 'info-finder' with prefix argument

5 months agoAdd fix suggestions to shellcheck diagnostics in 'sh-mode'
Eshel Yaron [Thu, 30 May 2024 19:36:51 +0000 (21:36 +0200)]
Add fix suggestions to shellcheck diagnostics in 'sh-mode'

* lisp/progmodes/sh-script.el (sh-shellcheck-fix): New function.
(sh-shellcheck-flymake): Use it.

5 months agoFix job control in remote shell
Michael Albinus [Thu, 30 May 2024 16:55:21 +0000 (18:55 +0200)]
Fix job control in remote shell

* lisp/net/tramp-sh.el (tramp-methos) <scp, ssh>:
Adapt `tramp-direct-async' argument.  (Bug#71259)

(cherry picked from commit baecf9bb283e52a829e31ae6f36c4687171a51c5)

5 months agouniversal-argument--preserve: Preserve last-prefix-arg
Sean Whitton [Thu, 30 May 2024 11:45:57 +0000 (12:45 +0100)]
universal-argument--preserve: Preserve last-prefix-arg

* lisp/simple.el (universal-argument--preserve): Set
current-prefix-arg to last-prefix-arg in order to preserve
last-prefix-arg, too (bug#71277).

(cherry picked from commit 0b4d2bb9b366ea78e8bc6bf1915d91d4131e98f7)

5 months agoSupport built-in thumbnail creation on MS-Windows
Eli Zaretskii [Thu, 30 May 2024 14:45:33 +0000 (17:45 +0300)]
Support built-in thumbnail creation on MS-Windows

* src/w32image.c (get_encoder_clsid, Fw32image_create_thumbnail)
(globals_of_w32image, syms_of_w32image): New functions.
* src/emacs.c (main): Call 'syms_of_w32image' and
'globals_of_w32image'.
* src/w32term.h (syms_of_w32image, globals_of_w32image): Add
prototypes.

* lisp/image/image-dired.el
(image-dired-thumbnail-display-external): Add a fallback for
MS-Windows.
* lisp/image/image-dired-external.el
(image-dired--probe-thumbnail-cmd): New function.
(image-dired--check-executable-exists): Call it to verify that
"convert" is indeed an Imagemagick program.  New argument FUNC
specifies a function that can be used as an alternative to running
EXECUTABLE.
(image-dired-create-thumb-1): Don't call
'image-dired--check-executable-exists' here, ...
(image-dired-thumb-queue-run): ...call it here, with
'w32image-create-thumbnail' as the alternative function.  If on
MS-Windows and no "convert" command, call
'image-dired-create-thumb-2' instead.
(image-dired-create-thumb-2): New function.

* etc/NEWS: Announce the thumbnail support.

(cherry picked from commit ae7d0e86b37eabc434c48f85f56df0a221e0e7c7)