]> git.eshelyaron.com Git - emacs.git/log
emacs.git
11 months agouse-package: Update list of valid :vc keywords
Tony Zorman [Sun, 15 Oct 2023 14:50:00 +0000 (16:50 +0200)]
use-package: Update list of valid :vc keywords

* lisp/use-package/use-package-core.el: Add ':shell-command'
and ':make' to valid keywords.  (Bug#66567)

(cherry picked from commit 426176c75e5337762b185818942c439a93e3d9ef)

11 months agoFix printing the result by 'eval-print-last-sexp'
Eli Zaretskii [Sat, 18 May 2024 09:55:34 +0000 (12:55 +0300)]
Fix printing the result by 'eval-print-last-sexp'

* lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Record the
desired output stream before evaluating the expression.
(Bug#70931)

(cherry picked from commit 82a31e27e6ceed17a116286d2f0f9810be2e1772)

11 months agoAdding window-tool-bar package (bug#68765).
Jared Finder [Fri, 26 Jan 2024 23:44:12 +0000 (15:44 -0800)]
Adding window-tool-bar package (bug#68765).

* lisp/window-tool-bar.el: New file.

(cherry picked from commit be03dda5b0fc55e989bfa707c73f1cc990e24c3b)

11 months agoAdd user option to only display default tool bar
Jared Finder [Fri, 26 Jan 2024 18:08:30 +0000 (10:08 -0800)]
Add user option to only display default tool bar

This works well with `window-tool-bar-mode', to be added in upcoming
commit.  Then the default tool bar is displayed frame-wide and
mode-specific tool bars are displayed in the window that mode is
active in.

* lisp/tool-bar.el (tool-bar-always-show-default): New user option.
(tool-bar--cache-key, tool-bar-make-keymap-1): Return default tool bar
when option is set.

(cherry picked from commit da325ff7b29b0becdd1356021428fa100d240ec4)

11 months agoInform user when tab-line-mode command makes no change
Jared Finder [Mon, 13 May 2024 03:35:50 +0000 (20:35 -0700)]
Inform user when tab-line-mode command makes no change

* lisp/tab-line.el (tab-line-mode): Display message when command is
run on already altered tab-line-format.

(cherry picked from commit fd3ab22a3eec5c3151b0791fc768e555b66e267c)

11 months agoDocument :box attribute caveats when used on display strings
Eli Zaretskii [Sat, 18 May 2024 09:15:21 +0000 (12:15 +0300)]
Document :box attribute caveats when used on display strings

* doc/lispref/display.texi (Replacing Specs, Face Attributes):
Mention special considerations when a display string has a
':box' face attribute identical to the surrounding buffer text.
Suggested by JD Smith <jdtsmith@gmail.com>.  (Bug#70637)

(cherry picked from commit df1a9e42ba483f2a0e3747abc7edb16818993f13)

11 months agoMake 'vtable-insert-object' more versatile
Joost Kremers [Tue, 7 May 2024 09:52:27 +0000 (11:52 +0200)]
Make 'vtable-insert-object' more versatile

* lisp/emacs-lisp/vtable.el (vtable-insert-object): Rename
argument AFTER-OBJECT to LOCATION; allow use of index to
refer to the insertion position; add argument BEFORE.
(Bug#70664).

* etc/NEWS:
* doc/misc/vtable.texi (Interface Functions): Document the
change.

* test/lisp/emacs-lisp/vtable-tests.el
(test-vtable-insert-object): New test.

(cherry picked from commit 4f27d763bbe3312b6039fa59f2874bd8e002d201)

11 months ago* Work around GCC bug affecting Garbage Collection (bug#65727).
Andrea Corallo [Sat, 18 May 2024 06:59:17 +0000 (08:59 +0200)]
* Work around GCC bug affecting Garbage Collection (bug#65727).

* src/lisp.h (flush_stack_call_func): Prevent GCC sibling call
optimization to run with an asm inline.

(cherry picked from commit 19c983ddedf083f82008472c13dfd08ec94b615f)

11 months agoImprove documentation of 'movemail'
Eli Zaretskii [Sat, 18 May 2024 06:12:54 +0000 (09:12 +0300)]
Improve documentation of 'movemail'

* doc/emacs/rmail.texi (Movemail): Fix the name of the Mailutils
manual in the printed version.  Add index entries.  Move the
description of remote mailboxes to...
(Remote Mailboxes): ...here, to avoid duplication.

(cherry picked from commit ca17bc8dd0b51b6dbacd6e63a97d81488d45ec71)

11 months agoReplace incorrect link in Rmail chapter of Emacs manual
Jakub Ječmínek [Fri, 17 May 2024 20:07:33 +0000 (22:07 +0200)]
Replace incorrect link in Rmail chapter of Emacs manual

* doc/emacs/rmail.texi (Movemail): Fix cross-reference to a node
in the Mailutils manual.  (Bug#71018)

(cherry picked from commit d47aa33bcdbd24283f680285f17736bd758ccba9)

11 months agoFix project-find-regexp in remote projects
Dmitry Gutov [Sat, 18 May 2024 00:24:56 +0000 (03:24 +0300)]
Fix project-find-regexp in remote projects

* lisp/progmodes/xref.el (xref--hits-file-prefix):
New variable.  Something to prepend to each file name (bug#69233).
(xref--convert-hits): Use it to also store the "default directory"
part of the filename conditionally on whether it's remote.
(xref--collect-matches): Use the new variable here.

(cherry picked from commit db039399cccd38b767bf6a30ba6c5da593eb69cf)

11 months agoxref--group-name-for-display: Undo most of the latest change
Dmitry Gutov [Sat, 18 May 2024 00:00:29 +0000 (03:00 +0300)]
xref--group-name-for-display: Undo most of the latest change

* lisp/progmodes/xref.el (xref--group-name-for-display):
Remove the DD-SUFFIX parameter, returning the function more like
to how it was (bug#69233).
(xref--analyze, xref--add-log-current-defun):
Revert the previous change accordingly.

* test/lisp/progmodes/xref-tests.el: Undo the last change.

(cherry picked from commit 646b8da4a5ec8b4b4a8e461683ff0786a95d1f85)

11 months ago; * doc/lispref/parsing.texi (Parsing Program Source): Improve indexing.
Eli Zaretskii [Fri, 17 May 2024 16:03:39 +0000 (19:03 +0300)]
; * doc/lispref/parsing.texi (Parsing Program Source): Improve indexing.

(cherry picked from commit 35138b90dd24cb967a124481ae06f8df14821c04)

11 months agoPort to certain Android environments with no GUI
Po Lu [Fri, 17 May 2024 11:21:05 +0000 (19:21 +0800)]
Port to certain Android environments with no GUI

* configure.ac (USER_FULL_NAME): Define to
android_user_full_name only when a GUI system is being built.
Otherwise, set to pw->pw_gecos or NULL consistently with the
presence of pw->pw_gecos.

* src/editfns.c (Fuser_full_name): Adjust to match.  Accept NULL
values from USER_FULL_NAME.

(cherry picked from commit 1f08984a67c94e957bec7f8c59818b627a67427b)

11 months ago; Improve documentation of 'set-fontset-font'
Eli Zaretskii [Fri, 17 May 2024 07:18:35 +0000 (10:18 +0300)]
; Improve documentation of 'set-fontset-font'

* doc/lispref/display.texi (Fontsets):
* src/fontset.c (Fset_fontset_font): Doc fix (bug#70993).

(cherry picked from commit 3dd09516c9a87f663fefde77befb7d569cbed9f0)

11 months ago; Avoid compiler warning in w32term.c
Eli Zaretskii [Fri, 17 May 2024 06:43:20 +0000 (09:43 +0300)]
; Avoid compiler warning in w32term.c

* src/w32term.c (w32_draw_glyphless_glyph_string_foreground):
Avoid GCC 14 warning about storing address of local variable.

(cherry picked from commit 6ca3a60db3427bc6aef08144c1524920ff3d9c4d)

11 months agoAdd new Eshell built-in command 'funcall'
Jim Porter [Fri, 17 May 2024 03:33:18 +0000 (20:33 -0700)]
Add new Eshell built-in command 'funcall'

* lisp/eshell/esh-cmd.el (eshell/funcall): New function...

* test/lisp/eshell/em-glob-tests.el (em-glob-test/expand/splice-results)
(em-glob-test/expand/no-splice-results)
(em-glob-test/expand/explicitly-splice-results)
(em-glob-test/expand/explicitly-listify-results):
* test/lisp/eshell/esh-var-tests.el
(esh-var-test/quoted-interp-lisp-indices)
(esh-var-test/quoted-interp-cmd-indices)
(esh-var-test/interp-convert-quoted-var-number)
(esh-var-test/quoted-interp-convert-var-number)
(esh-var-test/quoted-interp-convert-quoted-var-number)
(esh-var-test/last-status-var-lisp-command)
(esh-var-test/last-result-var-split-indices)
(esh-var-test/last-arg-var-split-indices): ... use it in tests.

* doc/misc/eshell.texi (List of Built-ins): Describe this command.

(cherry picked from commit 2f7d011d180b1e8d8dc6784cd9b48cf5690b7c62)

11 months ago; Fix search in remote project with relative file names
Dmitry Gutov [Thu, 16 May 2024 22:05:17 +0000 (01:05 +0300)]
; Fix search in remote project with relative file names

(cherry picked from commit 113bd2082c982df933df9b12c3994d6d582c8268)

11 months ago; cperl-mode.el: prevent Emacs from "freezing" (Bug#70948)
Harald Jörg [Thu, 16 May 2024 20:22:37 +0000 (22:22 +0200)]
; cperl-mode.el: prevent Emacs from "freezing" (Bug#70948)

* cperl-mode.el (defconst): Replace the rx expression for
`cperl--basic-identifier-rx' with its actual macro expansion.
This makes it efficient under Emacs 29.3, where the expansion
by rx.el could make Emacs freeze with a crafted Perl source
(Bug#70948).

(cherry picked from commit 54a7268763138fdc63bf81feca99013b01337872)

11 months ago;cperl-mode.el: Allow running under Emacs >=27
Harald Jörg [Thu, 16 May 2024 19:55:07 +0000 (21:55 +0200)]
;cperl-mode.el: Allow running under Emacs >=27

I would like to advertise cperl-mode.el from the repository as a
workaround for bug#70948.  This can be achieved by safeguarding
the call to derived-mode-add-parents with a version check.

* lisp/progmodes/cperl-mode.el: Call derived-mode-add-parents only
if it is available.

(cherry picked from commit 96269209a3e22707635239d057be4feac217b4bc)

11 months ago; Fix wrong-type-argument in 'rcirc-handler-INVITE'
Philip Kaludercic [Thu, 16 May 2024 17:51:11 +0000 (19:51 +0200)]
; Fix wrong-type-argument in 'rcirc-handler-INVITE'

* lisp/net/rcirc.el (rcirc-handler-INVITE): Use
'with-rcirc-process-buffer' instead of passing a process to
'buffer-local-value'.

(cherry picked from commit 650ee9e071eea2ff8504e056131efa9f6ac894e9)

11 months ago; * doc/emacs/search.texi (Word Search): Add index entry.
Eli Zaretskii [Thu, 16 May 2024 15:42:43 +0000 (18:42 +0300)]
; * doc/emacs/search.texi (Word Search): Add index entry.

(cherry picked from commit 042b58b5ff4ac4c17e03b25fd2c367c1cf869a99)

11 months ago(describe-package-1): Handle (nil . "string") in `:maintainer`
Stefan Monnier [Thu, 16 May 2024 15:01:11 +0000 (11:01 -0400)]
(describe-package-1): Handle (nil . "string") in `:maintainer`

* lisp/emacs-lisp/package.el (describe-package-1): Refine the
check to distinguish the old single-maintainer format from the
new multi-maintainer format.  (bug#69712)

(cherry picked from commit acfb2c6163b60507801fb8666129925e793394c9)

11 months ago* lisp/loadup.el: Add workaround for occasional "bootstrap" failure
Stefan Monnier [Thu, 16 May 2024 13:50:39 +0000 (09:50 -0400)]
* lisp/loadup.el: Add workaround for occasional "bootstrap" failure

(cherry picked from commit ee3ef57c24fe3435cd896e1f096aadff5f9372a0)

11 months agoAdd multi/unibyte string tests for key-description
Robert Pluim [Tue, 14 May 2024 15:41:57 +0000 (17:41 +0200)]
Add multi/unibyte string tests for key-description

* test/src/keymap-tests.el (keymap--key-description): Add multi/unibyte
tests.

This is to check the fix for Bug#59305.

(cherry picked from commit cdf49336cd06c433d2aa7795672aebe413c92f54)

11 months ago* doc/emacs/mule.texi (Unibyte Mode): Mention iso-transl-set-language
Robert Pluim [Tue, 14 May 2024 15:35:04 +0000 (17:35 +0200)]
* doc/emacs/mule.texi (Unibyte Mode): Mention iso-transl-set-language

(cherry picked from commit c22b91fd9ca7625a7a4f2d817552f19cc56ee310)

11 months ago; * src/window.c (Fwindow_scroll_bars): Doc fix.
Eli Zaretskii [Mon, 13 May 2024 05:00:38 +0000 (08:00 +0300)]
; * src/window.c (Fwindow_scroll_bars): Doc fix.

(cherry picked from commit 60b1768dc50c33a6788a626351f9d902a859b622)

11 months agoStrip 'display' text property from completion candidates
Eshel Yaron [Sat, 18 May 2024 18:47:01 +0000 (20:47 +0200)]
Strip 'display' text property from completion candidates

This fixes choosing multiline candidates in 'yank-pop'.

11 months ago* Fix bootstrap with checking enabled
Andrea Corallo [Thu, 16 May 2024 05:42:14 +0000 (07:42 +0200)]
* Fix bootstrap with checking enabled

* lisp/emacs-lisp/comp.el (comp--limplify-top-level): Set function
safety.

(cherry picked from commit 1b622ff66e32e09fb679b4d371c3be951bf7f000)

11 months ago; * lisp/eshell/esh-ext.el (eshell-remote-command): Improve last change.
Jim Porter [Thu, 16 May 2024 05:22:56 +0000 (22:22 -0700)]
; * lisp/eshell/esh-ext.el (eshell-remote-command): Improve last change.

(cherry picked from commit 59b889885d1f18b9325bd0db3458d3537e6b5f2a)

11 months agoUse "/local:" prefix in Eshell to run local commands when cwd is remote
Jim Porter [Fri, 10 May 2024 19:22:52 +0000 (12:22 -0700)]
Use "/local:" prefix in Eshell to run local commands when cwd is remote

* lisp/eshell/esh-ext.el (eshell-explicit-remote-commands)
(eshell-explicit-command): Update docstrings.
(eshell--local-prefix): New constant.
(eshell-handle-remote-command): Remove.
(eshell-quoted-file-command): New function...
(eshell-ext-initialize): ... add it as a hook.
(eshell-remote-command): Support running commands on localhost.
(eshell-connection-local-command): Rename from
'eshell-external-command'.
(eshell-external-command): New implementation calling
'eshell-remote-command' or 'eshell-connection-local-command' as
appropriate.

* test/lisp/eshell/esh-ext-tests.el
(esh-ext-test/explicitly-local-command): Update test.

* doc/misc/eshell.texi (Remote Access): Update documentation.

* etc/NEWS: Update announcement.

(cherry picked from commit e260bf1be7b03c21988a2090cde31970bd6bbfc9)

11 months ago(eglot--managed-mode): Avoid calling track-changes unregistered
Sean Whitton [Wed, 15 May 2024 18:50:18 +0000 (14:50 -0400)]
(eglot--managed-mode): Avoid calling track-changes unregistered

* lisp/progmodes/eglot.el (eglot--managed-mode): Unregister from
track-changes after `eglot-shutdown` since that function may
call `eglot--signal-textDocument/didChange`.  (bug#70927)

(cherry picked from commit c85294a6132e57bc0d24e39589b2c6163c11ca87)

11 months agovc-git-root-log-format: Explicitly match periods
Sean Whitton [Wed, 15 May 2024 18:04:03 +0000 (19:04 +0100)]
vc-git-root-log-format: Explicitly match periods

* lisp/vc/vc-git.el (vc-git-root-log-format): Explicity match
periods, rather than matching them only because '.' matches any
chars.

(cherry picked from commit 5900cf92ea27f56bd0e35b818332d9d415f4d6fc)

11 months agocontrol.texi: Be a bit more explicit about the behavior of `pcase-let`
Stefan Monnier [Wed, 15 May 2024 17:57:11 +0000 (13:57 -0400)]
control.texi: Be a bit more explicit about the behavior of `pcase-let`

* doc/lispref/control.texi (Destructuring with pcase Patterns):
Clarify the kind of "unspecified" behavior that can occur when
the destructing pattern does not match the value.

(cherry picked from commit fea8d54c48094c528527e91c1598f9d115967812)

11 months ago* admin/MAINTAINERS: Add myself in (co-)maintainers.
Andrea Corallo [Wed, 15 May 2024 17:17:30 +0000 (19:17 +0200)]
* admin/MAINTAINERS: Add myself in (co-)maintainers.

(cherry picked from commit 12988a359daf798f1bf2781e7f54003630c48cdd)

11 months ago; * lisp/gnus/mml-smime.el: Need cl-lib at runtime now.
Mattias Engdegård [Wed, 15 May 2024 13:23:18 +0000 (15:23 +0200)]
; * lisp/gnus/mml-smime.el: Need cl-lib at runtime now.

(cherry picked from commit 3a0fc5bb3f49772effa2090372ea42c3561d3aa6)

11 months ago; * doc/lispref/windows.texi (Buffer Display Action Functions): Fix wording.
Martin Rudalics [Wed, 15 May 2024 07:49:14 +0000 (09:49 +0200)]
; * doc/lispref/windows.texi (Buffer Display Action Functions): Fix wording.

(cherry picked from commit 38fe837f83448338b6ce5aaf771811ce6755d00a)

11 months ago(xref--collect-matches): Move inhibit-modification-hooks binding down
Stefan Monnier [Tue, 14 May 2024 21:09:39 +0000 (00:09 +0300)]
(xref--collect-matches): Move inhibit-modification-hooks binding down

* lisp/progmodes/xref.el (xref--collect-matches): Move the
inhibit-modification-hooks binding a little down (bug#53749).
(xref--show-common-initialize): Add sharp-quoting.

(cherry picked from commit 85043246f14933eedf3d2c7c6f5ab603ec3f6a21)

11 months agoAvoid another warning (bug#70942).
Eli Zaretskii [Tue, 14 May 2024 17:45:58 +0000 (20:45 +0300)]
Avoid another warning (bug#70942).

(cherry picked from commit 0a008401dc083bcba5bd704ba5eb866c03facdc2)

11 months agoFix some compilation warnings
Eli Zaretskii [Tue, 14 May 2024 17:42:11 +0000 (20:42 +0300)]
Fix some compilation warnings

Reported by Jacob Faibussowitsch <jacob.fai@gmail.com>

* lisp/net/eww.el (imagep): Declare.

* src/xdisp.c (note_fringe_highlight): Now compiled only if
HAVE_WINDOW_SYSTEM.

(cherry picked from commit 4a973ce7e2b647a6adb0a6eaab74426a332f5721)

11 months ago* lisp/gnus/nnatom.el (libxml-parse-xml-region): Declare to silence warning.
Andrea Corallo [Tue, 14 May 2024 15:47:36 +0000 (17:47 +0200)]
* lisp/gnus/nnatom.el (libxml-parse-xml-region): Declare to silence warning.

(cherry picked from commit 060914d6c1c69be74e7f19a07550cec892738d0e)

11 months ago; * src/process.c (network_lookup_address_info_1): Quote function
Robert Pluim [Tue, 7 May 2024 15:12:22 +0000 (17:12 +0200)]
; * src/process.c (network_lookup_address_info_1): Quote function

(cherry picked from commit 161808ae94ec4e97b2499c9c24c28eaf53c7a972)

11 months agoDocument 'use-default-font-for-symbols' more
Robert Pluim [Fri, 19 Apr 2024 13:14:11 +0000 (15:14 +0200)]
Document 'use-default-font-for-symbols' more

"why does my set-fontset-font call not work for symbols" is a common
question, and it's because 'use-default-font-for-symbols' is not
discoverable enough.

* doc/emacs/mule.texi (Modifying Fontsets): Mention it here.
* doc/lispref/display.texi (Fontsets): And here.
* src/fontset.c (Fset_fontset_font): And most importantly here.

(cherry picked from commit 45ebb66ccf28c1df63cfcfa00891be4e48cdedda)

11 months agoUse proper smime-keys entry for S/MIME signatures using OpenSSL
Illia Ostapyshyn [Mon, 6 May 2024 18:24:22 +0000 (20:24 +0200)]
Use proper smime-keys entry for S/MIME signatures using OpenSSL

bug#67931

* doc/misc/emacs-mime.texi (MML Definition):
* lisp/gnus/mml.el (mml-parse-1): Add chainfile parameter to sign tags.
* lisp/gnus/mml-smime.el (mml-smime-openssl-sign-query): Include the
additional certificates from smime-keys in MML tag generation as
chainfile parameters.
(mml-smime-openssl-sign): Forward chainfile entries from the parsed tag
alist to smime-sign-buffer.
; * lisp/gnus/smime.el (smime-sign-region): Fix typo in documentation.
; (smime-sign-buffer): Improve documentation to match smime-sign-region.

(cherry picked from commit 8074c08cd553ab6ee5ffe61cc2e56fb1e0a4fe34)

11 months ago; * .dir-locals.el (c-mode): Designate INLINE_HEADER_* as noise macros.
Po Lu [Tue, 14 May 2024 14:15:38 +0000 (22:15 +0800)]
; * .dir-locals.el (c-mode): Designate INLINE_HEADER_* as noise macros.

(cherry picked from commit 52287b8697fddfee08d362e02605a69e3c3faccd)

11 months ago* doc/lispref/functions.texi (Declare Form): Rename and update 'ftype' entry.
Andrea Corallo [Tue, 14 May 2024 08:50:05 +0000 (10:50 +0200)]
* doc/lispref/functions.texi (Declare Form): Rename and update 'ftype' entry.

(cherry picked from commit a39a8060124a5c9390cab186dece82ea35164f70)

11 months ago* etc/NEWS: Rename 'type' -> 'ftype' and tweak it.
Andrea Corallo [Tue, 14 May 2024 08:37:31 +0000 (10:37 +0200)]
* etc/NEWS: Rename 'type' -> 'ftype' and tweak it.

(cherry picked from commit e0cbed16b4573e0d6f848a4e239d559eeff08d95)

11 months ago* Allow for optional function name parameter in 'ftype' declaration
Andrea Corallo [Tue, 14 May 2024 07:58:42 +0000 (09:58 +0200)]
* Allow for optional function name parameter in 'ftype' declaration

* lisp/emacs-lisp/byte-run.el (defun-declarations-alist): Allow for
optional function name parameter in 'ftype' declaration.

(cherry picked from commit b87670b56460185bec902806daa52b05faa5d26d)

11 months agoChange 'type' declaration to 'ftype'
Andrea Corallo [Tue, 14 May 2024 07:24:05 +0000 (09:24 +0200)]
Change 'type' declaration to 'ftype'

* lisp/window.el (get-lru-window, get-largest-window)
(one-window-p): Update function type declaration.
* lisp/subr.el (ignore, error, zerop, fixnump, bignump, lsh)
(last, eventp, mouse-movement-p, log10, memory-limit)
(internal-pop-keymap): Likewise.
* lisp/simple.el (count-lines, mark, string-empty-p): Likewise.
* lisp/files.el (parse-colon-path): Likewise.
* lisp/env.el (getenv): Likewise.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt): Likewise.
* lisp/emacs-lisp/lisp.el (buffer-end): Likewise.
* lisp/emacs-lisp/comp.el (comp--final): Likewise.
* lisp/custom.el (custom-variable-p): Likewise.
* lisp/emacs-lisp/byte-run.el (defun-declarations-alist): Rename 'type'
-> 'ftype'.

(cherry picked from commit 6e1bb713f61da3e09b811883ed889067a1cc939b)

11 months agoTrace Tramp user error
Michael Albinus [Tue, 14 May 2024 08:49:52 +0000 (10:49 +0200)]
Trace Tramp user error

* lisp/net/tramp-androidsu.el (tramp-androidsu-maybe-open-connection):
Use `tramp-user-error' for the traces.

(cherry picked from commit dd13ab0756bc28a02d7685d6ae4ee442a23a5b84)

11 months ago; * lisp/net/tramp-androidsu.el (tramp-androidsu-handle-make-process): Typo.
Po Lu [Tue, 14 May 2024 08:17:36 +0000 (16:17 +0800)]
; * lisp/net/tramp-androidsu.el (tramp-androidsu-handle-make-process): Typo.

(cherry picked from commit becdee748223b4bdd95dc85de265499cc512f7a9)

11 months ago; Fix whitespace
Michael Albinus [Tue, 14 May 2024 08:18:04 +0000 (10:18 +0200)]
; Fix whitespace

(cherry picked from commit 7ddba8e71e4c5b8c03eff0d8405bfe50b44eeafc)

11 months agoPort tramp-androidsu to a wider variety of systems
Po Lu [Tue, 14 May 2024 08:13:58 +0000 (16:13 +0800)]
Port tramp-androidsu to a wider variety of systems

* lisp/net/tramp-androidsu.el
(tramp-androidsu-maybe-open-connection): Search for `su' when
the connection is initiated; replace PATH of inferior shell with
trap-androidsu-remote-path.
(tramp-androidsu-handle-make-process): Do not provide username
if root.

(cherry picked from commit 65b0446633041519f1515ea8c1e6c28f6d315c37)

11 months ago; * etc/NEWS: Fix wording, again.
Eli Zaretskii [Tue, 14 May 2024 07:53:40 +0000 (10:53 +0300)]
; * etc/NEWS: Fix wording, again.

(cherry picked from commit 149c6412df6b16216c95ed10f88f8805fb7ea317)

11 months ago; * etc/NEWS: Fix wording.
Eli Zaretskii [Tue, 14 May 2024 07:52:17 +0000 (10:52 +0300)]
; * etc/NEWS: Fix wording.

(cherry picked from commit e583cc35e40b5cb0431d957374c5f8cc8954883c)

11 months agoAdd documentation about sorting Imenu completions (bug#70846)
Juri Linkov [Tue, 14 May 2024 06:55:52 +0000 (09:55 +0300)]
Add documentation about sorting Imenu completions (bug#70846)

* doc/emacs/programs.texi (Imenu): Document how Imenu completions
can be sorted.

* lisp/imenu.el (imenu-sort-function): Explain in the docstring
how to sort Imenu completions.

(cherry picked from commit 407b88333bec69faba2d9d0a889a556e01247a76)

11 months ago; Fix documentation of recently-installed changes
Eli Zaretskii [Tue, 14 May 2024 05:51:13 +0000 (08:51 +0300)]
; Fix documentation of recently-installed changes

* lisp/emacs-lisp/bytecomp.el (compilation-safety): Doc fix.

* etc/NEWS: Fix wording of the 'compilation-safety' entry.

* doc/lispref/functions.texi (Declare Form): Fix cross-reference
and wording.
* doc/lispref/compile.texi (Native-Compilation Variables): Add the
missing @anchor.  Fix wording.

(cherry picked from commit f6d060b39a02da14aa1763bb688cb2e048f0c666)

11 months agoFix failure of `restart-emacs' to restart Emacs on Android
Po Lu [Tue, 14 May 2024 02:16:18 +0000 (10:16 +0800)]
Fix failure of `restart-emacs' to restart Emacs on Android

* src/emacs.c (Fkill_emacs) [HAVE_ANDROID && !ANDROID_STUBIFY]:
Arrange to terminate Emacs upon receipt of a bus error.

(cherry picked from commit fff245c52931fc829877ae379e48b373c15a1dcb)

11 months ago* etc/NEWS (Safety compilation parameter): Add entry.
Andrea Corallo [Tue, 7 May 2024 08:19:22 +0000 (10:19 +0200)]
* etc/NEWS (Safety compilation parameter): Add entry.

(cherry picked from commit 8dccc586ea4e927226585d15386cd935b15e9464)

11 months agoAdd some 'compilation-safety' documentation
Andrea Corallo [Sat, 4 May 2024 06:55:56 +0000 (08:55 +0200)]
Add some 'compilation-safety' documentation

* lisp/emacs-lisp/bytecomp.el (compilation-safety): Better doc.
* doc/lispref/functions.texi (Declare Form): Add 'safety'.
* doc/lispref/compile.texi (Native-Compilation Variables): Add
'compilation-safety'.

(cherry picked from commit 04e7078d5e2a61c92e61946ffedea25c11951dec)

11 months agoAdd 'safety' function declaration
Andrea Corallo [Fri, 3 May 2024 20:45:04 +0000 (22:45 +0200)]
Add 'safety' function declaration

* lisp/emacs-lisp/comp.el (comp-known-predicates): Use
'comp-func-safety'.
(comp-ctxt, comp-mvar-type-hint-match-p): New 'safety' slot.
(comp-c-func-name): New function.
(comp--spill-lap-function, comp--intern-func-in-ctxt): Update.
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Spill safety.
* lisp/emacs-lisp/byte-run.el (byte-run--set-completion): New alias.
(defun-declarations-alist): Update.

(cherry picked from commit 9e4e6d0fc904e8a57c8433c40d6e3e9a230773d9)

11 months agoIntroduce 'compilation-safety' variable
Andrea Corallo [Fri, 3 May 2024 20:21:20 +0000 (22:21 +0200)]
Introduce 'compilation-safety' variable

* lisp/emacs-lisp/bytecomp.el (compilation-safety): New customize.
* src/comp.c (comp_t): Add func_safety.
(emit_call_with_type_hint, emit_call2_with_type_hint): Make use of.
(compile_function): Set 'comp.func_safety'.

(cherry picked from commit 13ddfc201108bfc71c7fa9040ee9970e929070cf)

11 months ago* lisp/emacs-lisp/comp.el (comp--get-function-cstr): Fix it.
Andrea Corallo [Mon, 13 May 2024 14:41:25 +0000 (16:41 +0200)]
* lisp/emacs-lisp/comp.el (comp--get-function-cstr): Fix it.

(cherry picked from commit 595799edd3188a8992bbd08d0b29feaf184a092e)

11 months ago; Fix the xref--group-name-for-display tests
Dmitry Gutov [Mon, 13 May 2024 13:16:22 +0000 (16:16 +0300)]
; Fix the xref--group-name-for-display tests

(cherry picked from commit e86c4d8bdc8bdbc959a1f7f03576205ce707743e)

11 months agoAvoid resizing mutation in subst-char-in-string, take two
Mattias Engdegård [Mon, 13 May 2024 08:44:05 +0000 (10:44 +0200)]
Avoid resizing mutation in subst-char-in-string, take two

This time we take care to preserve properties, and add a test.

* lisp/subr.el (subst-char-in-string):
Use string-replace to avoid resizing mutation and O(n^2) time.
* test/lisp/subr-tests.el (subr--subst-char-in-string): New test.

(cherry picked from commit 49e243c0c85d18fc775970d9ebd846eba3a6866e)

11 months agoAllow text properties in minibuffer output unconditionally
Eshel Yaron [Mon, 13 May 2024 20:03:31 +0000 (22:03 +0200)]
Allow text properties in minibuffer output unconditionally

(minibuffer-allow-text-properties): Obsolete.
(read_minibuf): Drop 'allow_props' argument.
(choose-completion): Retain text properties.

11 months ago; * lisp/emacs-lisp/crm.el (crm-change-separator): Update comment
Eshel Yaron [Mon, 13 May 2024 12:03:52 +0000 (14:03 +0200)]
; * lisp/emacs-lisp/crm.el (crm-change-separator): Update comment

11 months ago* doc/misc/tramp.texi: Adapt some markups.
Michael Albinus [Mon, 13 May 2024 08:31:13 +0000 (10:31 +0200)]
* doc/misc/tramp.texi: Adapt some markups.

(cherry picked from commit be31c383593452c172ea6d470f400f64b5065874)

11 months ago; Tweak last docstring addition in lisp/imenu.el.
Basil L. Contovounesios [Mon, 13 May 2024 07:58:50 +0000 (09:58 +0200)]
; Tweak last docstring addition in lisp/imenu.el.

(cherry picked from commit af27ecbf1556af8a428b367cdc26ec4c706df4a0)

11 months agoFix bug#70900
Michael Albinus [Mon, 13 May 2024 07:23:58 +0000 (09:23 +0200)]
Fix bug#70900

* lisp/net/tramp.el (tramp-handle-unlock-file): Be quiet if user
isn't interested in lock files.  Bug#70900

(cherry picked from commit af526f88562162ec053534eae510b9e7a85cb9eb)

11 months ago* lisp/imenu.el: Support more values for imenu-flatten (bug#70846)
Juri Linkov [Mon, 13 May 2024 06:59:07 +0000 (09:59 +0300)]
* lisp/imenu.el: Support more values for imenu-flatten (bug#70846)

(imenu-flatten): Change type boolean to choice
of more values for prefix/suffix section names.
(imenu--completion-buffer): Add :annotation-function if
'imenu-flatten' is 'annotation'.
(imenu--flatten-index-alist): Put property 'imenu-section' if
'imenu-flatten' is 'annotation'.

(cherry picked from commit 431f8ff1e38ca4367637c6b9fbc25d13d6f760a7)

11 months agoCommunicate frame titles to the window manager on Android
Po Lu [Mon, 13 May 2024 06:40:15 +0000 (14:40 +0800)]
Communicate frame titles to the window manager on Android

* java/org/gnu/emacs/EmacsActivity.java (detachWindow)
(attachWindow): Call updateWmName.
(updateWmName): New function; transfer wm name from the window
attached to the task's description.

* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow)
<wmName>: New field.
(setWmName): New function.

* src/android.c (android_init_emacs_window): Link to new
function.
(android_set_wm_name): New function.

* src/android.h (struct android_emacs_service): Delete unused
entries.

* src/androidfns.c (android_set_name_internal, android_set_name)
(android_implicitly_set_name, android_explicitly_set_name)
(android_set_title): Port from X.

* src/androidterm.c (android_term_init): Compute default frame
title.

* src/androidterm.h (struct android_display_info) <x_id_name>:
New field.

(cherry picked from commit 9443f8145e1db86664a4af318b3bd1448094040e)

11 months agoruby-rubocop-use-bundler: New user option
Dmitry Gutov [Mon, 13 May 2024 02:36:28 +0000 (05:36 +0300)]
ruby-rubocop-use-bundler: New user option

* lisp/progmodes/ruby-mode.el (ruby-rubocop-use-bundler):
New user option.
(ruby-flymake-rubocop--use-bundler-p): Use it.

* etc/NEWS: Mention it.

(cherry picked from commit f560e759338e4cd43113fef39bb6e35c9e8a5893)

11 months ago; * src/epaths.in: Declare and use android_game_path.
Po Lu [Mon, 13 May 2024 00:26:04 +0000 (08:26 +0800)]
; * src/epaths.in: Declare and use android_game_path.

(cherry picked from commit ad588f81317db2faa2770a700f0e29a3b74ae682)

11 months agoComplete pacification of build warnings on Android
Po Lu [Mon, 13 May 2024 00:25:39 +0000 (08:25 +0800)]
Complete pacification of build warnings on Android

* build-aux/makecounter.sh: Introduce extern declaration of
emacs_shortlisp_counter.

* src/android.c (android_class_path): Declare static.

* src/androidfont.c (font_driver_class, font_spec_class)
(integer_class, font_metrics_class, font_object_class): Declare
static.

* src/androidterm.c (android_frame_parm_handlers): Move
declaration...

* src/androidterm.h (android_frame_parm_handlers): ... here.

(cherry picked from commit b86359d4abfb47820b5644adb0306bd628de6dd8)

11 months agoFix 'C-u C-x p g' globally and 'A' in dired-mode
Dmitry Gutov [Sun, 12 May 2024 17:42:08 +0000 (20:42 +0300)]
Fix 'C-u C-x p g' globally and 'A' in dired-mode

* lisp/progmodes/project.el (project-find-regexp): Ensure the
DEFAULT-DIRECTORY is set correctly for the 'C-u' case (bug#70888).

* lisp/progmodes/project.el (project--files-in-directory):
Ensure that the DIR argument ends with a slash --
'dired-do-find-regexp' passes it differently, for example.

* lisp/progmodes/xref.el (xref--group-name-for-display): Ensure
the project-relative and absolute display modes work well for
groups with "relative" file names.
(xref--analyze, xref--add-log-current-defun): Change accordingly.

* test/lisp/progmodes/project-tests.el
(project-find-regexp-with-prefix): New test.

(cherry picked from commit b20d4ab374fb9b3c80b968df6acd6444f763bd40)

11 months agoAdd Tramp method "nspawn"
Michael Albinus [Sun, 12 May 2024 17:40:08 +0000 (19:40 +0200)]
Add Tramp method "nspawn"

* doc/misc/tramp.texi: Adapt some markups.
(Inline methods) <nspawn>: Add.
(Default Host): Mention default host for "nspawn".
(Customizing Methods): Remove tramp-nspawn.
(Password handling): Add "nspawn".

* etc/NEWS: New Tramp method "nspawn".

* lisp/net/tramp-compat.el (tramp-nspawn): Warn, if that package is used.

* lisp/net/tramp-container.el (tramp-nspawn-program): New defcustom.
(tramp-nspawn-method): New defconst.
(tramp-nspawn--completion-function, tramp-enable-nspawn-method):
New defuns.

* lisp/net/tramp.el (tramp-local-host-regexp): Add OpenSUSE host names.

(cherry picked from commit e53e8b4cf44be0fac0eb92c816b2c7915533e283)

11 months ago; Add ".DS_Store" to 'completion-ignored-extensions'
Eshel Yaron [Mon, 13 May 2024 07:41:30 +0000 (09:41 +0200)]
; Add ".DS_Store" to 'completion-ignored-extensions'

11 months agopcomplete: cease ignoring 'completion-ignored-extensions'
Eshel Yaron [Sun, 12 May 2024 21:02:12 +0000 (23:02 +0200)]
pcomplete: cease ignoring 'completion-ignored-extensions'

11 months agoImprove buffer name completion annotations
Eshel Yaron [Sun, 12 May 2024 20:03:40 +0000 (22:03 +0200)]
Improve buffer name completion annotations

11 months agocompletion--replace: Fix completion cycling
Dmitry Gutov [Sun, 12 May 2024 02:57:10 +0000 (05:57 +0300)]
completion--replace: Fix completion cycling

* lisp/minibuffer.el (completion--replace):
Don't "insert before markers" after all because in some cases
(https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00701.html)
- like cycling - BEG can be denoted by a marker as well.
(minibuffer-completion-help): Make FIELD-END simply a fixnum.  And
adjust its value manually inside the local
completion-list-insert-choice-function (bug#48356).

(cherry picked from commit 2c759b9ce620311df97f43b791ba27b1302171c4)

11 months agoFix offset of reported conversion regions
Po Lu [Sun, 12 May 2024 13:42:52 +0000 (21:42 +0800)]
Fix offset of reported conversion regions

* src/androidterm.c (request_class, text_class): Pacify new
warning.
(android_update_selection): Don't redundantly subtract 1 from
compose region start.

(cherry picked from commit 6e8bee27a5cb9915c5db0f8756c8a903e4be1cec)

11 months agoRevert "Avoid resizing mutation in subst-char-in-string"
Mattias Engdegård [Sun, 12 May 2024 13:18:19 +0000 (15:18 +0200)]
Revert "Avoid resizing mutation in subst-char-in-string"

This reverts commit 184d6e8c02345583264b053bb59ae031bb1c5a00.

It wasn't quite correct: the path through `string-replace` would not
preserve text properties in the input string, which broke Gnus.

(cherry picked from commit 9d7b22fcb408b3d864d4d74d14ab428a2706b45d)

11 months agoSilence some macOS build warnings
Mattias Engdegård [Sun, 12 May 2024 12:55:55 +0000 (14:55 +0200)]
Silence some macOS build warnings

* src/image.c (native_image_type): Declare static.
* src/keyboard.c (lispy_function_keys): Declare static on NS.
* src/nsmenu.m (context_menu_value):
* src/nsterm.m (ns_frame_parm_handlers): Move extern declarations...
* src/nsterm.h: ...here.
* test/src/emacs-module-resources/mod-test.c: Add extern declaration.

(cherry picked from commit 9365feadccf1e28438e41c4ce8bf60ab8e4e1def)

11 months agoSafer and faster string sorting
Mattias Engdegård [Sun, 12 May 2024 09:22:23 +0000 (11:22 +0200)]
Safer and faster string sorting

* lisp/emacs-lisp/cl-seq.el (cl-sort):
Don't use string mutation when sorting the characters in a string.
This avoids O(n^2) run time and makes it future-safe.

(cherry picked from commit 38091e43bee991920db81263fe56da444a123fae)

11 months agoProperly deinitialize directory cursors on closedir
Po Lu [Sun, 12 May 2024 12:24:19 +0000 (20:24 +0800)]
Properly deinitialize directory cursors on closedir

* src/androidvfs.c (android_saf_tree_closedir): Call
cursor.close, for deleting the local reference to enable its
garbage collection is not sufficient to release all related
resources.

(cherry picked from commit 86d196c71d763ae81229e7e1eb2c6e37d0456f06)

11 months agoAdditional changes to processing of Num Lock on Android
Po Lu [Sun, 12 May 2024 07:46:38 +0000 (15:46 +0800)]
Additional changes to processing of Num Lock on Android

* java/org/gnu/emacs/EmacsView.java (onKeyDown, onKeyMultiple)
(onKeyDown): Disregard Num and Scroll Lock keys, and return
value of window functions to the system.

* java/org/gnu/emacs/EmacsWindow.java (eventModifiers): Return
normalized meta state, not only those bits the system considers
modifiers.
(onKeyDown, onKeyUp): Ignore numpad keys to which no base
characters are assigned, so that the system may generate the
proper action keys instead.

(cherry picked from commit ea98a6af2f30eccfed3e152149c6a039bd16ff33)

11 months agoCorrect earlier changes to processing of Num Lock on Android
Po Lu [Sun, 12 May 2024 06:13:27 +0000 (14:13 +0800)]
Correct earlier changes to processing of Num Lock on Android

* java/org/gnu/emacs/EmacsWindow.java (onKeyDown, onKeyUp):
Cease stripping META_NUM_LOCK_ON and META_SCROLL_LOCK_ON from
meta masks reported to getUnicodeChar.

(cherry picked from commit af6df8e0454f3f51d3855683216dfd12843e6959)

11 months ago; Fix a recent change in fns.c
Eli Zaretskii [Sun, 12 May 2024 06:51:51 +0000 (09:51 +0300)]
; Fix a recent change in fns.c

* src/fns.c (value_cmp): Use 'subprocesses', not 'MSDOS', as
conditional for process-related functionalities.

(cherry picked from commit 5b9995052d547982281a4dd3db6d797f4006144a)

11 months agoPacify warnings in gmalloc.c
Po Lu [Sun, 12 May 2024 05:27:43 +0000 (13:27 +0800)]
Pacify warnings in gmalloc.c

* src/gmalloc.c (__malloc_initialize_hook): Also declare in
advance on Glibc 2.24 and later.
(__after_morecore_hook, __morecore): Likewise on Glibc 2.34 and
later.

(cherry picked from commit 67b1da215c9fc103d131e8c568a1e6a75d993f83)

11 months ago* oldXMenu/Activate.c (x_menu_grab_keyboard): Declare static.
Po Lu [Sun, 12 May 2024 05:21:09 +0000 (13:21 +0800)]
* oldXMenu/Activate.c (x_menu_grab_keyboard): Declare static.

(cherry picked from commit 26a407cebebdaa5b21bc896cfb79c7ea8c37a922)

11 months agoFix the DJGPP build
Po Lu [Sun, 12 May 2024 02:38:26 +0000 (10:38 +0800)]
Fix the DJGPP build

* src/fns.c (value_cmp) [MSDOS]: Consider processes unordered
on DOS.

(cherry picked from commit ed03b7ab9f301dba22519b529dfcaf9d83290c73)

11 months ago* src/keyboard.c (lispy_function_keys): Define as static on Android.
Po Lu [Sun, 12 May 2024 02:18:02 +0000 (10:18 +0800)]
* src/keyboard.c (lispy_function_keys): Define as static on Android.

(cherry picked from commit 41596bd7110eac11d1309b9d5a40f86d92b7ff85)

11 months ago; Update last change
Po Lu [Sun, 12 May 2024 02:16:56 +0000 (10:16 +0800)]
; Update last change

* msdos/sedlibmk.inp (STDDEF_NOT_IDEMPOTENT): Define to 1.

(cherry picked from commit 15fd1e2cb66884a61a84ce10a69b436e7b00772c)

11 months agoFix the DJGPP build
Po Lu [Sun, 12 May 2024 02:13:41 +0000 (10:13 +0800)]
Fix the DJGPP build

* msdos/sedlibmk.inp (HAVE_STRTOF, NULLPTR_T_NEEDS_STDDEF):
Define to 1.

(cherry picked from commit 47a0fc91dfc73c480fa5042810df304df647b758)

11 months agoPacify gcc -Wmissing-variable-declarations
Paul Eggert [Sat, 4 May 2024 17:08:48 +0000 (10:08 -0700)]
Pacify gcc -Wmissing-variable-declarations

This is a new warning diagnostic in GCC 14.
* lib-src/etags.c (mercury_heuristics_ratio):
* src/pgtkselect.c, src/xselect.c (selection_request_stack):
* src/xselect.c (outstanding_transfers):
* src/xterm.c (pending_selection_requests)
(x_dnd_waiting_for_motif_finish_display):
Now static.
* lib-src/make-docfile.c (close_emacs_globals):
Arrange for lispsym to be declared with extern first,
when compiling lread.c.
* src/alloc.c (gdb_make_enums_visible) [__GNUC__]:
* src/emacs.c (RCS_Id):
* src/keyboard.c (stop_character):
* src/print.c (print_output_debug_flag):
Now declared with extern first.
* src/lisp.h (DEFINE_GDB_SYMBOL_BEGIN) [MAIN_PROGRAM]:
Arrange for ID to be declared extern first.
* src/lisp.h (garbage_collection_inhibited):
* src/xterm.h (x_frame_parm_handlers):
Declare here, so that its interface is properly checked.  Other decls
removed.

(cherry picked from commit 99a5c75f3b0916affdc8ea4a25d4bc87e67bca88)

11 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sat, 11 May 2024 20:16:48 +0000 (13:16 -0700)]
Update from Gnulib by running admin/merge-gnulib

(cherry picked from commit 7ae091d933b03d0a1e1e0b39a949c2811c4c3618)

11 months agoAdjust to recent Gnulib changes
Paul Eggert [Sat, 4 May 2024 16:55:27 +0000 (09:55 -0700)]
Adjust to recent Gnulib changes

* admin/merge-gnulib: Also remove the new Gnulib file
m4/off64_t.m4, as Emacs doesn’t need off64_t.
* configure.ac (gl_TYPE_OFF64_T): Define a nearly no-op.

(cherry picked from commit 2e13c2adbad4fc609f560926f6e536b25281f925)

11 months ago; * lisp/cus-edit.el (custom-save-all): Remove offensive commentary.
Eli Zaretskii [Sat, 11 May 2024 17:13:17 +0000 (20:13 +0300)]
; * lisp/cus-edit.el (custom-save-all): Remove offensive commentary.

(cherry picked from commit dcb6a9ebcbf92a4ca7c0e2c393d7a8dd9b1d351e)

11 months agoFix test of whether to insert lexical-binding cookies in custom files
Po Lu [Sat, 11 May 2024 14:24:23 +0000 (22:24 +0800)]
Fix test of whether to insert lexical-binding cookies in custom files

* lisp/cus-edit.el (custom-save-all): Test whether the buffer is
empty, not whether point is at EOB.

(cherry picked from commit 6d4179957a830fa03348c47067d9d5c1ae6e3eba)