]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 months agoAdd ability for Eshell virtual targets to handle closing the target
Jim Porter [Thu, 23 May 2024 21:52:07 +0000 (14:52 -0700)]
Add ability for Eshell virtual targets to handle closing the target

This was documented to work by calling the output function with 'nil',
but that was never actually implemented.  Instead, for compatibility,
we now support a new (optional) close function.

* lisp/eshell/esh-io.el (eshell-virtual-targets): Update docstring.
(eshell-generic-target): New struct...
(eshell-function-target): ... inherit from it, and rename from
'eshell-virtual-target'.
(eshell-get-target): Handle already-created 'eshell-generic-target'.
(eshell-close-target): Call the target's close function if present.

* test/lisp/eshell/esh-io-tests.el (esh-io-test/virtual/device-close):
New test.

* doc/misc/eshell.texi (Redirection): Document the new behavior.

(cherry picked from commit 9daf1085a9b11e056079edce8dccca92d69bf891)

3 months agoUse 'esh-module-autoload' for Eshell modules' defgroups
Jim Porter [Mon, 20 May 2024 05:01:31 +0000 (22:01 -0700)]
Use 'esh-module-autoload' for Eshell modules' defgroups

This will let modules define their own, regular autoloads, independent
of the core Eshell machinery for defining modules.

* lisp/eshell/em-alias.el (em-alias):
* lisp/eshell/em-banner.el (em-banner):
* lisp/eshell/em-basic.el (em-basic):
* lisp/eshell/em-cmpl.el (em-cmpl):
* lisp/eshell/em-dirs.el (em-dirs):
* lisp/eshell/em-elecslash.el (em-elecslash):
* lisp/eshell/em-extpipe.el:
* lisp/eshell/em-glob.el (em-glob):
* lisp/eshell/em-hist.el (em-hist):
* lisp/eshell/em-ls.el (em-ls):
* lisp/eshell/em-pred.el (em-pred):
* lisp/eshell/em-prompt.el (em-prompt):
* lisp/eshell/em-rebind.el (em-rebind):
* lisp/eshell/em-script.el (em-script):
* lisp/eshell/em-smart.el (em-smart):
* lisp/eshell/em-term.el (em-term):
* lisp/eshell/em-tramp.el (em-tramp):
* lisp/eshell/em-unix.el (em-unix):
* lisp/eshell/em-xtra.el (em-xtra): Use 'esh-module-autoload'.

* lisp/eshell/esh-module.el ("esh-module-loaddefs"): Load this instead
of "esh-groups".

* .gitignore: Change esh-groups.el to esh-module-loaddefs.el

(cherry picked from commit 4c924a53334035dc4089b24174012b54c020631b)

3 months agoConsolidate Eshell module loading/unloading code
Jim Porter [Sat, 11 Mar 2023 03:02:26 +0000 (19:02 -0800)]
Consolidate Eshell module loading/unloading code

This also adds the ability to suppress module loading/unloading
messages, which will be necessary to support running Eshell scripts as
batch scripts.

* lisp/eshell/esh-mode.el (eshell-mode): Move module
loading/initialization to...

* lisp/eshell/esh-module.el (eshell-load-modules)
(eshell-initialize-modules): ... here.
(eshell-module-loading-messages): New option.
(eshell-module--feature-name): Improve docstring.
(eshell-unload-modules): Display a real warning if unable to unload a
module.

* test/lisp/eshell/eshell-tests-helpers.el (with-temp-eshell)
(eshell-command-result-equal):
* test/lisp/eshell/eshell-tests-unload.el (load-eshell): Silence Eshell
loading messages.

(cherry picked from commit 6c2f21e4a6ff65cc1697cb8a6ba0e1ef1a52ae1c)

3 months ago; Improve documentation of new Imenu features
Eli Zaretskii [Wed, 29 May 2024 18:43:57 +0000 (21:43 +0300)]
; Improve documentation of new Imenu features

* doc/emacs/programs.texi (Imenu): Update documentation of
'imenu-flatten'.

* etc/NEWS: Fix wording of 'imenu-flatten's entry.

* lisp/imenu.el (imenu-flatten): Fix doc string and value
descriptions.  (Bug#70846)

(cherry picked from commit 98149ad31ea2cfd5a82f95443affd665c9da667b)

3 months ago* lisp/imenu.el (imenu-flatten): Add new choice 'group' (bug#70846).
Juri Linkov [Wed, 29 May 2024 18:05:20 +0000 (21:05 +0300)]
* lisp/imenu.el (imenu-flatten): Add new choice 'group' (bug#70846).

(imenu-flatten): For prefix use the implicit symbol 'prefix'.
(imenu--completion-buffer): Use :group-function
if imenu-flatten is 'group'.
(imenu--flatten-index-alist): Handle the value 'group' of
imenu-flatten in a way similar to the value 'annotation'.

(cherry picked from commit f469ab73a777c9930582af8b4fd22967f07808aa)

3 months agoAdd Tramp distrobox method
Michael Albinus [Wed, 29 May 2024 16:29:52 +0000 (18:29 +0200)]
Add Tramp distrobox method

* doc/misc/tramp.texi (Inline methods) <distrobox>: Add.

* etc/NEWS: Mention Tramp distrobox method.

* lisp/net/tramp-container.el (tramp-distrobox-program): New defcustom.
(tramp-distrobox-method): New defconst.
(tramp-distrobox--completion-function)
(tramp-enable-distrobox-method): New defuns.  (Bug#71200)
(tramp-docker-method, tramp-dockercp-method)
(tramp-podman-method, tramp-podmancp-method)
(tramp-kubernetes-method, tramp-flatpak-method)
(tramp-apptainer-method, tramp-nspawn-method): Adapt docstring.

* test/lisp/net/tramp-tests.el (tramp--test-box-p): Rename from
`tramp--test-toolbox-p'.  Add distrobox.  Adapt callees.

(cherry picked from commit 17c23a46c3d834e7dc9f153e86a51242b3867b74)

3 months agoAdd 'help-echo' to more fields in completions list header line
Eshel Yaron [Thu, 30 May 2024 14:24:52 +0000 (16:24 +0200)]
Add 'help-echo' to more fields in completions list header line

3 months ago; Update ldefs-boot.el some more
Eshel Yaron [Wed, 29 May 2024 16:18:45 +0000 (18:18 +0200)]
; Update ldefs-boot.el some more

3 months ago; Update ldefs-boot.el
Eli Zaretskii [Wed, 29 May 2024 15:48:27 +0000 (11:48 -0400)]
; Update ldefs-boot.el

(cherry picked from commit 62a3d72bee3f7a0b92b48ac17ddac2528e8ccdb7)

3 months agoRename comp-run.el and comp-cstr.el private functions
Davide Pola [Wed, 29 May 2024 15:34:38 +0000 (17:34 +0200)]
Rename comp-run.el and comp-cstr.el private functions

* lisp/emacs-lisp/comp-run.el (native-compile-async-skip-p)
(comp-async-runnings, comp-effective-async-max-jobs)
(comp-accept-and-process-async-output, comp-run-async-workers)
(comp-trampoline-search): rename using '--' separator convention for
private functions.
* lisp/emacs-lisp/comp-cstr.el
(comp-cstr-copy, comp-cstrs-homogeneous, comp-split-pos-neg)
(comp-normalize-valset, comp-union-valsets)
(comp-intersection-valsets, comp-normalize-typeset)
(comp-union-typesets, comp-intersect-two-typesets)
(comp-intersect-typesets, comp-range-union)
(comp-range-intersection, comp-range-negation, comp-cstr-add-2)
(comp-cstr-sub-2, comp-cstr-union-homogeneous-no-range)
(comp-cstr-union-homogeneous, comp-cstr-union-1-no-mem)
(comp-cstr-union-1, comp-cstr-union-make)
(comp-cstr-intersection-make): Likewise.

(cherry picked from commit fd61cf3976c1c24b5a58923f6520f88db060cacd)

3 months agoObey tramp-histfile-override in remote direct async processes
Michael Albinus [Wed, 29 May 2024 15:11:49 +0000 (17:11 +0200)]
Obey tramp-histfile-override in remote direct async processes

* doc/emacs/custom.texi (Connection Variables):
Mention `permanent-local' symbol property.

* lisp/net/tramp-sh.el (tramp-histfile-override):
Add ;;;###tramp-autoload cookie and `permanent-local' symbol
property.

* lisp/net/tramp.el (tramp-handle-make-process):
Obey `tramp-histfile-override'.  (Bug#71049)

(cherry picked from commit 063b67325b4e00a31c1178b340529a94e0de1c4e)

3 months ago; * src/w32.c (sys_open): Set errno to EISDIR if opening a directory.
Eli Zaretskii [Wed, 29 May 2024 14:56:18 +0000 (17:56 +0300)]
; * src/w32.c (sys_open): Set errno to EISDIR if opening a directory.

(cherry picked from commit 4e836407ce3a2140725c7ddc2cedc3478d34a479)

3 months agoFix error message from 'insert-file-contents'
Eli Zaretskii [Wed, 29 May 2024 14:41:01 +0000 (17:41 +0300)]
Fix error message from 'insert-file-contents'

* src/fileio.c (Finsert_file_contents): Consider directories
to be "regular" files.  (Bug#71258)

(cherry picked from commit 8f618711d13fb82b10b67a12f47736e01ec4b92b)

3 months ago; Skip commit 608e9a5806f643876246ee9dceac381589a4fa2a
Eshel Yaron [Wed, 29 May 2024 16:00:45 +0000 (18:00 +0200)]
; Skip commit 608e9a5806f643876246ee9dceac381589a4fa2a

3 months ago; Skip commit c04eccd667f425e9b253e8178130c7e00c659df9
Eshel Yaron [Wed, 29 May 2024 16:00:39 +0000 (18:00 +0200)]
; Skip commit c04eccd667f425e9b253e8178130c7e00c659df9

3 months ago; * src/sfntfont.c (sfnt_parse_style): Fix typo.
Po Lu [Wed, 29 May 2024 09:16:47 +0000 (17:16 +0800)]
; * src/sfntfont.c (sfnt_parse_style): Fix typo.

(cherry picked from commit 39d2f402528cd3c8be1ffd1b59d036ce3cd213fa)

3 months agoFix unsafe usage of string data on Android
Po Lu [Wed, 29 May 2024 09:11:11 +0000 (17:11 +0800)]
Fix unsafe usage of string data on Android

* src/dired.c (open_directory): Reload name after calling
maybe_quit, which might invoke GC.

(cherry picked from commit b8d880e059252541be0017523fc1ffa2251bb542)

3 months agoRename `SUBR_NATIVE_COMPILED` to `NATIVE_COMP_FUNCTION` (bug#71123)
Stefan Monnier [Wed, 29 May 2024 00:49:55 +0000 (20:49 -0400)]
Rename `SUBR_NATIVE_COMPILED` to `NATIVE_COMP_FUNCTION` (bug#71123)

Keep the name consistent with the naming used in the ELisp world.

* src/pdumper.c (dump_object_emacs_ptr, dump_do_fixup):
* src/eval.c (eval_sub, funcall_general, funcall_lambda):
* src/alloc.c (CHECK_ALLOCATED_AND_LIVE_SYMBOL, survives_gc_p):
* src/data.c (Fcl_type_of, Ffset, Fnative_comp_function_p)
(Fsubr_native_lambda_list, Finteractive_form):
* src/comp.c (check_comp_unit_relocs):
* src/bytecode.c (exec_byte_code):

* src/lisp.h (NATIVE_COMP_FUNCTIONP, NATIVE_COMP_FUNCTION_DYNP):
Rename from `SUBR_NATIVE_COMPILEDP` and `SUBR_NATIVE_COMPILED_DYNP`.

(cherry picked from commit 3480ca83510f1ad6026971c9031e2c65540d402a)

3 months agoRedirect calls to `subr-native-elisp-p` to `native-comp-function-p`
Stefan Monnier [Wed, 22 May 2024 18:45:35 +0000 (14:45 -0400)]
Redirect calls to `subr-native-elisp-p` to `native-comp-function-p`

* test/src/comp-tests.el (comp-tests-bootstrap, lambda-return)
(lambda-return2, free-fun, free-fun2, free-fun-silly-name, speed--1)
(compile-forms, comp-test-defsubst, primitive-redefine-compile-44221)
(48029-1, 61917-1, tco, fw-prop-1, pure):
* test/lisp/help-fns-tests.el (help-fns-test-lisp-defun):
* lisp/subr.el (subr-primitive-p, primitive-function-p, symbol-file):
* lisp/help-fns.el (find-lisp-object-file-name):
* lisp/emacs-lisp/disass.el (disassemble-internal):
* lisp/emacs-lisp/comp.el (comp--call-optim-form-call):
* lisp/emacs-lisp/comp-run.el (comp-warn-primitives):
* lisp/emacs-lisp/comp-common.el (comp-function-type-spec):
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns):
* lisp/emacs-lisp/bytecomp.el (<trailer>): Rename `subr-native-elisp-p`
to `native-comp-function-p`.

(cherry picked from commit fde8dc9287c0a81c6b942b5cf445f8f7aeba1207)

3 months agoRename `subr-native-elisp` to `native-comp-function` (bug#71123)
Stefan Monnier [Wed, 22 May 2024 17:45:39 +0000 (13:45 -0400)]
Rename `subr-native-elisp` to `native-comp-function` (bug#71123)

Now that this type name is displayed in *Help*, it is more
important to use a name that is less weird for the unsuspecting user.

* lisp/emacs-lisp/cl-preloaded.el (cl-functionp): Adjust to new name of
native function's type.
(subr-native-elisp-p): Redefine as an obsolete alias.
(native-comp-function): Rename from `subr-native-elisp`

* src/data.c (Fcl_type_of): Return `Qnative_comp_function` i.s.o
`Qsubr_native_elisp`.
(Fnative_comp_function_p): Rename from `Fsubr_native_elisp_p`.
(syms_of_data): Adjust accordingly.

* src/doc.c (Fsubr_documentation): Use new `Fnative_comp_function_p` name.

(cherry picked from commit 1a1170cde7e847f4eb4d736a400f7325f2265a1c)

3 months agoMention direction when resizing a window fails
Stefan Kangas [Tue, 28 May 2024 22:34:37 +0000 (00:34 +0200)]
Mention direction when resizing a window fails

* lisp/window.el (enlarge-window, shrink-window): When an attempt to
resize a window fails, also mention the direction of the
operation (i.e., horizontally or vertically).

(cherry picked from commit 0ae66c1917609832f2456b8207743468439926ae)

3 months agoFix adding to history via 'eshell-command'
Jim Porter [Tue, 28 May 2024 21:43:28 +0000 (14:43 -0700)]
Fix adding to history via 'eshell-command'

* lisp/eshell/eshell.el (eshell-read-command): Don't handle history
here.

* lisp/eshell/em-hist.el (eshell-hist-initialize): Properly set up
history for minibuffer.
(eshell-add-command-to-history): Immediately save history.

(cherry picked from commit 7e326b915f45346803edb52b5023db9b765ed07a)

3 months agoesh-mode.el: Refrain from hiding buffer modifications (bug#70966)
Stefan Monnier [Tue, 28 May 2024 21:42:27 +0000 (17:42 -0400)]
esh-mode.el: Refrain from hiding buffer modifications (bug#70966)

We have not been able to discover why these functions let-bound
`inhibit-modification-hooks`, but these let-bindings are
undesired effects on other modes such as `diff-mode` which
need to keep track of buffer modifications.  Let's remove those
let-bindings and hope for the best.

* lisp/eshell/esh-mode.el (eshell-send-input)
(eshell-interactive-filter): Don't bind `inhibit-modification-hooks`.

(cherry picked from commit 647de5e952c6ba806d3c36373cf8eb4f11034650)

3 months agoCorrect and clarify two doc strings in lisp/files.el
Alan Mackenzie [Tue, 28 May 2024 20:12:17 +0000 (20:12 +0000)]
Correct and clarify two doc strings in lisp/files.el

lisp/files.el (major-mode-remap-alist)
(major-mode-remap-defaults): Correct and clarify the doc
strings.

(cherry picked from commit 0999c64fa861bf9b5200b6dae09e81563853a04c)

3 months agoUse the current face foreground for read-passwd icons (bug#71213)
Kévin Le Gouguec [Fri, 22 Mar 2024 19:24:46 +0000 (20:24 +0100)]
Use the current face foreground for read-passwd icons (bug#71213)

* etc/images/conceal.svg:
* etc/images/reveal.svg: Remove 'fill' attribute so that the
current face's background is applied: this helps the icon's SVG
representation remain legible regardless of how the mode-line
is themed.

(cherry picked from commit 066e9b598858cc4c0b666b12242f07a7fdf3e073)

3 months ago* lisp/image-mode.el (image-transform-fill-window): New command (bug#69565).
Juri Linkov [Tue, 28 May 2024 16:51:21 +0000 (19:51 +0300)]
* lisp/image-mode.el (image-transform-fill-window): New command (bug#69565).

(image-mode-menu): Add image-transform-fill-window to the menu.

(cherry picked from commit 730b61c64b5d86cc3b38ee15d4530fdd2194619b)

3 months agoProvide a list of default values for M-n of project-find-file (bug#70996)
Juri Linkov [Tue, 28 May 2024 16:31:55 +0000 (19:31 +0300)]
Provide a list of default values for M-n of project-find-file (bug#70996)

* lisp/progmodes/project.el (project-find-file)
(project-or-external-find-file): Provide a list of suggested
filenames for the first arg of project-find-file-in.
Use buffer-file-name first to make it more predictable for M-n.
(project--read-file-cpd-relative): Handle mb-default as a list.

(cherry picked from commit ebac4d4872829c44f65966b3268ceaf7ecbf43d9)

3 months agoAvoid rare crashes in 'uncache_face'
Eli Zaretskii [Tue, 28 May 2024 16:03:00 +0000 (19:03 +0300)]
Avoid rare crashes in 'uncache_face'

* src/xfaces.c (realize_face): Prevent rare crashes in
'uncache_face' because 'former_face' is NULL (i.e. the face
corresponding to 'former_face_id' is no longer cached).
(Bug#71243)

(cherry picked from commit d9512da49514623ef3e35524dc894c06f2c0ce20)

3 months agoUse same Python binary for test as in python mode (bug#70815)
Mattias Engdegård [Tue, 28 May 2024 15:48:37 +0000 (17:48 +0200)]
Use same Python binary for test as in python mode (bug#70815)

* test/lisp/progmodes/python-tests.el
(python-tests-get-shell-interpreter): Try Python executable names
in the same order as we do for `python-shell-interpreter`,
so that we run the test with the one is most likely to be used.

(cherry picked from commit 9c7de10079bb5f803a1744ae1d56399ad7d42ac5)

3 months agoFix tar-mode-test-tar-extract-zip-and-gz
Michael Albinus [Tue, 28 May 2024 11:23:12 +0000 (13:23 +0200)]
Fix tar-mode-test-tar-extract-zip-and-gz

* test/lisp/tar-mode-tests.el (tar-mode-test-tar-extract-zip-and-gz):
Check also for "unzip" executable.

(cherry picked from commit 8b70093b369440ea96e2fd38efdd3a05b12f7ac5)

3 months agoFix date-stamp regression in erc-fill-wrap
F. Jason Park [Fri, 9 Feb 2024 04:28:56 +0000 (20:28 -0800)]
Fix date-stamp regression in erc-fill-wrap

* lisp/erc/erc-fill.el (erc-fill-wrap, erc-fill-wrap-enable)
(erc-fill-wrap-disable): Add and remove `erc-stamp--insert-date-hook'
member.
(erc-fill--wrap-continued-predicate): Add function-valued variable for
modules to influence `erc-fill--wrap-continued-message-p', which was
originally introduced as part of bug#60936.
(erc-fill--wrap-rejigger-last-message): Move toward beginning of file.
(erc-fill--wrap-unmerge-on-date-stamp): New function.
(erc-fill-wrap): Use `erc-fill--wrap-continued-predicate'.  Restore
recently deleted hunk that reset the wrap marker upon seeing a date
stamp.
* test/lisp/erc/erc-scenarios-fill-wrap.el: New file.
* test/lisp/erc/resources/fill/wrap/merge-datestamp.eld: New file.

(cherry picked from commit 7aa91b299e9dd9f416a22658afed1a8edf323b30)

3 months agoAdd ERC module querypoll as monitor placeholder
F. Jason Park [Thu, 23 May 2024 05:59:54 +0000 (22:59 -0700)]
Add ERC module querypoll as monitor placeholder

* doc/misc/erc.texi: Add module `querypoll' to list of built-in
modules'.
* etc/ERC-NEWS: Mention new module `querypoll', and explain new
default behavior for deriving query membership from that of channels.
* lisp/erc/erc-goodies.el (erc--querypoll-ring)
(erc--querypoll-timer): New variables.
(erc-querypoll-exclude-regexp): New option.
(erc-querypoll-mode, erc-querypoll-enable, erc-querypoll-disable): New
module for polling with "WHO" requests for the presence of otherwise
"untracked" query targets.
(erc-querypoll-period-params): New variable.
(erc--querypoll-compute-period)
(erc--querypoll-target-in-chan-p)
(erc--querypoll-get-length)
(erc--querypoll-get-next)
(erc--querypoll-subscribe)
(erc--querypoll-on-352)
(erc--querypoll-send): New functions.
* lisp/erc/erc-speedbar.el (erc-speedbar-buttons): Dispatch queries as
if they were channels when `erc--queries-current-p' returns non-nil.
That is, show head counts alongside query targets as users come and
go.
(erc-speedbar-insert-target): Defer to `erc--queries-current-p' to
know whether to show a query in the style of a channel.  This affects
both the plain speedbar integration as well as the `nickbar' module
added for bug#63595.  Also, use question marks rather than the empty
string for query bullets, so that query and channel items are aligned
vertically.
* lisp/erc/erc.el (erc--queries-current-p): New function.
* test/lisp/erc/erc-goodies-tests.el
(erc--querypoll-compute-period)
(erc--querypoll-target-in-chan-p)
(erc--querypoll-get-length)
(erc--querypoll-get-next): New tests.  (Bug#70928)

(cherry picked from commit 6888bbbe832e14c3aaaa2c9750ed27e577e0983d)

3 months agoRetain client's own user in erc-server-users
F. Jason Park [Thu, 25 Apr 2024 12:16:23 +0000 (05:16 -0700)]
Retain client's own user in erc-server-users

* lisp/erc/erc-backend.el (erc-server-KICK, erc-server-PART): Use new
function `erc--remove-channel-user-but' instead of
`erc-remove-channel-users'.  In `erc-server-KICK', remove sender's
channel membership data after displaying the message so that nicks are
buttonized.  Return nil.  In `erc-server-PART', don't run
`erc-remove-channel-member' when the client itself has parted.
* lisp/erc/erc-common.el (erc--remove-user-from-targets): New
function.
* lisp/erc/erc.el (erc-remove-server-user): Redo doc string.
(erc--forget-server-user-function): New variable.
(erc--forget-server-user): New function.
(erc--forget-server-user-ignoring-queries): New function, the default
value of `erc--forget-server-user-function'.
(erc-remove-channel-user): Defer to `erc--forget-server-user-function'
to do the actual removal.
(erc-remove-user): Defer to `erc--remove-user-from-targets'.
(erc-remove-channel-users): Redo doc
(erc--remove-channel-users-but): New function.  The only use case thus
far is for protecting the client's own `erc-server-users' entry from
removal when draining `erc-channel-members' tables after the client
leaves a target buffer or quits.
(erc-kill-buffer-function): Don't remove own user from
`erc-server-users'.
* test/lisp/erc/erc-scenarios-base-renick.el
(erc-scenarios-base-renick-queries-solo): Assert own client parting
its only channel doesn't remove own user from server.  Also assert
that another user parting their only channel removes them from all
queries.  (Bug#70928)

(cherry picked from commit 5f84213c9802181b4d800615915e3c8dded7b94f)

3 months agoTether query rolls to channel membership in ERC
F. Jason Park [Thu, 9 May 2024 02:04:13 +0000 (19:04 -0700)]
Tether query rolls to channel membership in ERC

* lisp/erc/erc-backend.el (erc-server-JOIN): Update query membership
via `erc--ensure-query-member' when someone else joins a channel.
(erc-server-NICK): Update query membership via
`erc--ensure-query-member' after someone else changes their nick.
(erc-server-PRIVMSG): After printing a query message from some other
person, remove their nick's data from the query buffer's user table if
they're "untracked," i.e., not a member of a channel.
(erc-server-263, erc-server-263-functions): New function and variable,
a default response handler and hook for "RPL_TRYAGAIN", which servers
send for things like rejecting "WHO" and "WHOX" responses due to rate
limiting.
(erc-server-311): Fix call to `erc-update-user-nick' so the userhost
login component is no longer supplied as the `info' parameter but
rather, correctly, as the `login'.
(erc--extract-352-full-name): Factor out trailing hop-count and GECOS
parsing for use by overriding handlers or those for adjacent numerics.
(erc-server-352): Refactor to handle asterisk as `channel' parameter,
which indicates a nick rather than a channel target.
(erc-server-366): Update membership in all query buffers via
`erc--ensure-query-members' after all names have been received.
(erc-server-401): Forget a known user completely when the server
reports them as nonexistent.
* lisp/erc/erc-common.el (erc--get-server-user): New function, a thin
wrapper around `erc-get-server-user' for cases were inlining would
require declaring symbols not defined in erc-common.
* lisp/erc/erc.el (erc-channel-members): Mention that instances are
used for query-participant tables as well.
(erc--decouple-query-and-channel-membership-p): New variable, a
compatibility flag to access pre-5.6 query bookkeeping behavior.
(erc--ensure-query-member, erc--ensure-query-members): New functions.
(erc-cmd-QUERY): Ensure parties are present in the query buffer's
membership table if they're known to be on the server by simple virtue
of being present in some joined channel.
(erc-message-english-s352-you): New variable.
* test/lisp/erc/erc-scenarios-base-query-participants.el
(erc-scenarios-base-query-participants)
(erc-scenarios-base-query-participants/legacy): Rename former to
latter.  Enable compat flag to activate legacy query behavior in which
channel membership does not impact query membership.
(erc-scenarios-base-query-participants/coupled): New test asserting
new behavior in which channel membership dictates query
membership.  (Bug#70928)

(cherry picked from commit 04477cf97be9eb2bb5ae09eff114252864461f05)

3 months agoReuse old query buffers for reassumed nicks in ERC
F. Jason Park [Thu, 9 May 2024 02:04:13 +0000 (19:04 -0700)]
Reuse old query buffers for reassumed nicks in ERC

* lisp/erc/erc-backend.el
(erc--wrangle-query-buffers-on-nick-change): New function for handling
buffer renaming and message routing triggered by a nick change.  Such
twiddling used to reside in `erc-server-NICK' but has been separated
out for use by built-in modules overriding `erc-server-NICK'.  The
behavior has also changed to favor always reusing an existing query
buffer whenever possible instead of creating a new, <N>-suffixed
buffer.  This addresses some arguably unfinished business from
bug#48598.
(erc-server-NICK): Fix erroneous call to `erc-update-user-nick' that
passed the sender's login as the function's INFO argument.  Move
buffer renaming logic to `erc--wrangle-query-buffers-on-nick-change'
for use by "NICK" handlers managed by modules.  Also, print the notice
in all query buffers when the client changes its own nick.
(erc-server-QUIT): Show messages in all query buffers when the client
itself quits, but prevent `track' from updating the mode line with
redundant noise.
* lisp/erc/erc.el (erc-generate-new-buffer-name): Fix typo in doc.
(erc--query-list): New function.
* test/lisp/erc/erc-scenarios-base-query-participants.el: New file.
* test/lisp/erc/erc-scenarios-base-renick.el
(erc-scenarios-base-renick-queries-solo): Revise slightly to use
modern helper API.
(erc-scenarios-base-renick-queries/reassume): New test.
(erc-scenarios-base-renick-self/merge-query): New test.
* test/lisp/erc/resources/base/query-participants/legacy.eld: New file.
* test/lisp/erc/resources/base/reconnect/options-again.eld: Adjust
timeout.
* test/lisp/erc/resources/base/renick/queries/reassume.eld: New file.
* test/lisp/erc/resources/base/renick/self/manual.eld: Update timeouts.
* test/lisp/erc/resources/base/renick/self/merge-query-a.eld: New file.
* test/lisp/erc/resources/base/renick/self/merge-query-b.eld: New file.
(Bug#70928)

(cherry picked from commit 75aefe6514854bfdbe2a398cf1b7265012c9a88b)

3 months agoMention if an ERC module is local in its doc string
F. Jason Park [Fri, 24 May 2024 03:50:20 +0000 (20:50 -0700)]
Mention if an ERC module is local in its doc string

* lisp/erc/erc-common.el (erc--assemble-toggle)
(define-erc-module): Update language of doc string to indicate if a
module is local.
* test/lisp/erc/erc-tests.el (define-erc-module--global)
(define-erc-module--local)
(define-erc-module--local/permanent-locals): Update expected output.

(cherry picked from commit ab78cbfabc856b0f9c069ab42ad8827cdaa499ce)

3 months agoDelete original speedbar frame in erc-nickbar-mode
F. Jason Park [Tue, 21 May 2024 12:37:39 +0000 (05:37 -0700)]
Delete original speedbar frame in erc-nickbar-mode

* lisp/erc/erc-speedbar.el (erc-speedbar-buttons): Disable
`erc-nickbar-mode' when it's not displayed in a window.
(erc-speedbar--highlight-self-and-ops): Check `status' slot of
`erc-channel-user' object instead of calling accessors.
(erc-speedbar--hidden-speedbar-frame)
(erc-speedbar--emulate-speedbar): Add doc string.
(erc-speedbar--handle-delete-frame): New function.
(erc-speedbar--toggle-nicknames-sidebar): Remove function because its
conditional logic was needlessly complicated and is no longer needed.
(erc-speedbar--ensure): Create `speedbar-buffer' when needed, and
delete the original frame, but still keep a reference to it in
`erc-speedbar--hidden-speedbar-frame'.  Set
`dframe-delete-frame-function' to own handler.
(erc-speedbar--shutting-down-p): Remove unused variable.
(erc-speedbar--run-timer-on-post-insert)
(erc-speedbar--prod-dframe-timer): Rename former to latter.  Return
nil, and accept any number of args.
(erc-nickbar-mode, erc-nickbar-disable): Tear down completely when
disabling, regardless of universal argument.  This changes user-facing
behavior that was originally introduced with this module as part of
bug#63595.  Run `erc-speedbar--prod-dframe-timer' on
`erc-server-PONG-functions' as well as `erc-insert-post-hook' so that
the panel will eventually update if no messages are being received.
(erc-speedbar--dframe-controlled): Don't make frame visible because
it's been deleted and was never made invisible.
* test/lisp/erc/erc-scenarios-status-sidebar.el
(erc-scenarios-status-sidebar--nickbar): Update assertions.

(cherry picked from commit 1b633ea59ad7f27263bf2a74ecc0e7d048b5eab5)

3 months agoReturn nil from more ERC response handlers
F. Jason Park [Mon, 20 May 2024 06:04:49 +0000 (23:04 -0700)]
Return nil from more ERC response handlers

* etc/ERC-NEWS: Mention that certain aberrant response handlers now
return nil.
* lisp/erc/erc-backend.el (define-erc-response-handler): Mention that
body should explicitly return nil.
(erc-server-PART)
(erc-server-PING): Return nil.
* lisp/erc/erc-sasl.el (erc-sasl--destroy): Return nil.
* lisp/erc/erc.el (erc-display-message): Mention in doc string that
the return value is undefined.
(erc-kill-channel-hook): Fix package-version.
* test/lisp/erc/erc-networks-tests.el (erc-networks--set-name): Ensure
`erc--route-insertion' returns nil because this influences whether
response-handler hooks continue running.
* test/lisp/erc/erc-sasl-tests.el
(erc-sasl-create-client-ecdsa): Fix regression that made test
unusable, although it's still relatively useless and therefore skipped
by default.
* test/lisp/erc/erc-services-tests.el
(erc-services-tests--auth-source-standard)
(erc-services-tests--auth-source-announced): Clarify annotations.
* test/lisp/erc/erc-tests.el (erc-message): Don't return non-nil in
mocked `erc-display-message'.
(erc-send-modify-hook): Shadow `erc-send-modify-hook' because
`erc-stamp--date-mode' modifies it locally.

(cherry picked from commit 8c54a79ec10d21cfc961476d85db06b643260e38)

3 months agoEglot: run eglot-managed-mode-hook when turning off (bug#70958)
João Távora [Mon, 27 May 2024 21:58:48 +0000 (16:58 -0500)]
Eglot: run eglot-managed-mode-hook when turning off (bug#70958)

* lisp/progmodes/eglot.el (eglot--managed-mode): Run
  eglot-managed-mode-hook.

(cherry picked from commit 1a9128e0208d60f414401679d76f3722fa4085fd)

3 months ago; Fix thinko in my last change
Stefan Kangas [Mon, 27 May 2024 20:38:28 +0000 (22:38 +0200)]
; Fix thinko in my last change

* lisp/progmodes/which-func.el (which-func-update-delay): Fix
thinko.

(cherry picked from commit a2ada9094824a673b441f082857c3e77347a1ff8)

3 months agoAdd a couple of minibuffer completion tests
Eshel Yaron [Wed, 29 May 2024 09:49:15 +0000 (11:49 +0200)]
Add a couple of minibuffer completion tests

Add tests for regressions that followed commit ff3f17ca3cd.

See discussion here:
https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00701.html

* test/lisp/minibuffer-tests.el (completion-cycle)
(minibuffer-next-completion): New tests.

3 months agoRemove 'gnus-score-mimic-keymap'
Eshel Yaron [Wed, 29 May 2024 06:47:07 +0000 (08:47 +0200)]
Remove 'gnus-score-mimic-keymap'

3 months agoFix a couple of tests
Eshel Yaron [Wed, 29 May 2024 06:46:48 +0000 (08:46 +0200)]
Fix a couple of tests

3 months ago(gnus-summary-increase-score): Use 'read-multiple-choice'
Eshel Yaron [Tue, 28 May 2024 18:43:52 +0000 (20:43 +0200)]
(gnus-summary-increase-score): Use 'read-multiple-choice'

3 months ago* Rework 'comp-normalize-valset' (bug#71116)
Andrea Corallo [Mon, 27 May 2024 15:38:22 +0000 (17:38 +0200)]
* Rework 'comp-normalize-valset' (bug#71116)

* lisp/emacs-lisp/comp-cstr.el (comp-normalize-valset): Rework to
improve consistency.

(cherry picked from commit 509e7f877baca1df25274f2e0e861d4499dfc25d)

3 months ago; Skip commit 2cadad6f8ce47921cb014d2c5dd3e897e85c47ce
Eshel Yaron [Mon, 27 May 2024 20:34:44 +0000 (22:34 +0200)]
; Skip commit 2cadad6f8ce47921cb014d2c5dd3e897e85c47ce

3 months agoDisambiguate imenu completion candidates with text properties
Eshel Yaron [Mon, 27 May 2024 20:32:30 +0000 (22:32 +0200)]
Disambiguate imenu completion candidates with text properties

3 months agoDon't let pp fall back to prin1 for conses
Michael Heerdegen [Sun, 26 May 2024 14:31:26 +0000 (16:31 +0200)]
Don't let pp fall back to prin1 for conses

* lisp/emacs-lisp/pp.el (pp--insert-lisp): Don't `prin1' non-list
conses; use our pp function for cons and list printing
`pp--format-list' instead.

(cherry picked from commit 804f36d5abdbc38a4664a341aaea563195f79b03)

3 months agoDon't try to pretty-print non-lists as binding list
Michael Heerdegen [Sun, 12 May 2024 17:58:14 +0000 (19:58 +0200)]
Don't try to pretty-print non-lists as binding list

* lisp/emacs-lisp/pp.el (pp--format-definition): Ensure that what we try
to print as a list of bindings has an appropriate format.  This avoids
raising an error for SEXPs like (let X Y) inside `pcase' forms where our
heuristic expects a binding list in the X position.

(cherry picked from commit 3580dc155c3c9f48fb1b7855b4d858eec3948dfb)

3 months ago; * src/lread.c (syms_of_lread) <load-no-native>: Doc fix (bug#70914).
Eli Zaretskii [Mon, 27 May 2024 11:54:01 +0000 (14:54 +0300)]
; * src/lread.c (syms_of_lread) <load-no-native>: Doc fix (bug#70914).

(cherry picked from commit db6599818fa6ca7325c482b4aa1ce564688469ef)

3 months agoFix minor issues in textconv.c
Po Lu [Mon, 27 May 2024 09:59:36 +0000 (17:59 +0800)]
Fix minor issues in textconv.c

* src/textconv.c (really_commit_text): Introduce a few
additional debugging printouts.
(locate_and_save_position_in_field): Fix typo.

(cherry picked from commit 435df51d1e7bffd768de15a6c91b7d6f7baa5cbf)

3 months ago; * src/lread.c (load-no-native): Improve docstring.
Andrea Corallo [Mon, 27 May 2024 09:32:19 +0000 (11:32 +0200)]
; * src/lread.c (load-no-native): Improve docstring.

(cherry picked from commit 8283f0ae4ad7648a5fd4988e10b75878f4f87771)

3 months ago; Silence byte-compiler
Stefan Kangas [Mon, 27 May 2024 08:54:46 +0000 (10:54 +0200)]
; Silence byte-compiler

(cherry picked from commit 25f61f7f8f5432cb301b69ee8ea1825826c8469d)

3 months agoMake `idle-update-delay` obsolete
Stefan Kangas [Mon, 27 May 2024 08:51:54 +0000 (10:51 +0200)]
Make `idle-update-delay` obsolete

This user option was introduced in 2003, and was advertised as a general
variable for a "delay before updating various things on the screen".
But this has never been true: it was only used by 'which-function-mode',
and, to make matters worse, users of that mode would basically never
know that this user option existed without reading the code.

Conversely, users that did find the user option would be surprised to
see that it only took effect in 'which-func-mode'.

The lack of other users of 'idle-update-delay' reveals that it has not
been considered generally useful.  Thus, it makes more sense to
introduce a new mode specific user option `which-func-update-delay`, and
to mark the old one obsolete.

* lisp/simple.el (idle-update-delay): Make obsolete.
* lisp/progmodes/which-func.el (which-func-update-delay): New defcustom.
(which-function-mode): Use above new defcustom instead of
'idle-update-delay'.

(cherry picked from commit a212687e24fb6a7492db28e62070b03b43784660)

3 months ago* lisp/progmodes/project.el: Up xref dependency and bump the version
Dmitry Gutov [Sun, 26 May 2024 22:23:30 +0000 (01:23 +0300)]
* lisp/progmodes/project.el: Up xref dependency and bump the version

(cherry picked from commit 56871dbd4c1a1af3f0d1624f4858e9be67a89f7e)

3 months ago* lisp/progmodes/xref.el: Bump the version to 1.7.0
Dmitry Gutov [Sun, 26 May 2024 22:21:40 +0000 (01:21 +0300)]
* lisp/progmodes/xref.el: Bump the version to 1.7.0

(cherry picked from commit cef848fe5f355ca34abc176739d0ace835b12eed)

3 months agoPrevent crashes due to redisplay while realizing the default face
Eli Zaretskii [Sun, 26 May 2024 16:41:30 +0000 (19:41 +0300)]
Prevent crashes due to redisplay while realizing the default face

* src/xfaces.c (Finternal_merge_in_global_face)
(realize_default_face): Prevent redisplay while the default face
is being realized.  (Bug#71176)

(cherry picked from commit 74b8043e60dde6710d0ba413278c2cb36a84f8f2)

3 months agoRemove Emacs 19 compat code in mm-util.el
Stefan Kangas [Sun, 26 May 2024 13:25:21 +0000 (15:25 +0200)]
Remove Emacs 19 compat code in mm-util.el

* lisp/gnus/mm-util.el (mm-preferred-coding-system): Remove Emacs
19 compat code.

(cherry picked from commit c593441ab009fb7068f055cda0af1f9fafd2f600)

3 months agoFurther tweak pp code printing
Michael Heerdegen [Sun, 12 May 2024 17:55:30 +0000 (19:55 +0200)]
Further tweak pp code printing

This fixes an aspect of Bug#70868.

* lisp/emacs-lisp/pp.el (pp--insert-lisp): Print characters with
`prin1-char'.  In all other cases consistently print with `prin1'.

(cherry picked from commit 34fc71c004b6e0ae787de4889eca2d1e413103f2)

3 months agoFix --enable-checking build with macOS clang 15.0.0
Naofumi Yasufuku [Sun, 26 May 2024 08:53:42 +0000 (17:53 +0900)]
Fix --enable-checking build with macOS clang 15.0.0

search.c:3428:7: error: call to undeclared library function 'free' ...

configure:9131: checking for C compiler version
configure:9140: gcc --version >&5
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

* src/search.c: Include stdlib.h for free(), and stdio.h for
open_memstream(), fclose().

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

3 months agoClean up legacy bytecode loading
Mattias Engdegård [Sun, 26 May 2024 09:13:50 +0000 (11:13 +0200)]
Clean up legacy bytecode loading

Complete some unfinished work from the elimination of lazy bytecode
loading in 9bcc9690a8: remove code which became unreachable by that
reform.  This simplifies some of the lower-level parts of the reader
which helps performance somewhat.

* src/doc.c (read_bytecode_pointer, read_bytecode_char)
(read_doc_string): Remove.
(get_doc_string): Remove last argument, all callers adapted.  Simplify.
* src/lread.c (readbyte_for_lambda, readbyte_from_string)
(readbyte_for_lambda, readbyte_from_string): Remove.
(readchar, unreadchar): Remove unused code paths for Qlambda and cons
arguments.
(bytecode_from_rev_list): Remove last use of a quirky code path,
decoding force-loaded lazy bytecode explicitly.

(cherry picked from commit 236034a24d0e93e1796224e2ff4a14819fcfd559)

3 months agoUpdate documentation for 'width' slot of vtable ':column' object
Joost Kremers [Sat, 25 May 2024 19:55:29 +0000 (21:55 +0200)]
Update documentation for 'width' slot of vtable ':column' object

Bug#71167

(cherry picked from commit cfd654c418658adacd6ab3717dc1b8cc95d99d44)

3 months agoDemote errors when gathering bookmark context
Eshel Yaron [Mon, 27 May 2024 20:22:58 +0000 (22:22 +0200)]
Demote errors when gathering bookmark context

3 months agoFix C-u C-x p g
Eshel Yaron [Mon, 27 May 2024 20:22:30 +0000 (22:22 +0200)]
Fix C-u C-x p g

3 months agoAdd fix suggestions to Flymake diagnostics
Eshel Yaron [Sun, 26 May 2024 12:41:03 +0000 (14:41 +0200)]
Add fix suggestions to Flymake diagnostics

3 months agoEnhance 'python-shell-send-block' for convenience
Lin Sun [Mon, 20 May 2024 06:55:31 +0000 (06:55 +0000)]
Enhance 'python-shell-send-block' for convenience

* lisp/progmodes/python.el (python-shell-send-block):
'python-shell-send-block' will now send block without header
by default.
* test/lisp/progmodes/python-tests.el
(python-test--shell-send-block): Update the test case.
(Bug#71083)

(cherry picked from commit b241ec0e78f141e7fc22cf3afb11037d14fc028c)

3 months ago; Fix merge error (bug#71093).
kobarity [Sun, 26 May 2024 00:56:29 +0000 (09:56 +0900)]
; Fix merge error (bug#71093).

(cherry picked from commit 9ca89cb4834a20bc7d38289046d4d05e2212ba50)

3 months ago; Fix Calc manual
Eli Zaretskii [Sun, 26 May 2024 07:28:35 +0000 (10:28 +0300)]
; Fix Calc manual

* doc/misc/calc.texi (History and Acknowledgments)
(Musical Notes): Fix markup due to makeinfo 4.13 support.

(cherry picked from commit 06541762d7d994bedf0c0bd20601047d43de25d5)

3 months ago; Fix markup in manuals
Eli Zaretskii [Sun, 26 May 2024 06:49:52 +0000 (09:49 +0300)]
; Fix markup in manuals

* doc/emacs/files.texi (Visiting):
* doc/lispref/processes.texi (Filter Functions, Sentinels): Fix
markup and punctuation.  Reported by Andrés Ramírez
<rrandresf@hotmail.com>.

(cherry picked from commit 21b2954c90eb5b6fa1bbfeda4c5074a0bdc53ba8)

3 months agoAddress compilation errors and warnings on x86 Solaris 10 systems
Po Lu [Sun, 26 May 2024 03:50:13 +0000 (11:50 +0800)]
Address compilation errors and warnings on x86 Solaris 10 systems

* doc/misc/ede.texi (Extending EDE):

* doc/misc/flymake.texi (Top, Using Flymake): Insert punctuation
after xrefs.

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Print
number of files being scraped.

* src/dired.c (directory_files_internal):

* src/eval.c (Fmake_interpreted_closure, Fdefvaralias):

* src/fns.c (Fassoc): Work around optimizer failures.

(cherry picked from commit 74ceb6922c621cf48a2c9f6e6622133b522252ab)

3 months agoImprove navigation to cl-defgeneric uses
Dmitry Gutov [Sun, 26 May 2024 02:56:14 +0000 (05:56 +0300)]
Improve navigation to cl-defgeneric uses

* lisp/emacs-lisp/cl-generic.el
(cl--generic-find-defgeneric-regexp):
Use "symbol end" boundary (bug#71068).

(cherry picked from commit 2a12f39ffe87b0b2885d9b7e92962eeed3c8029e)

3 months agoxref-revert-buffer: Make inhibit-modification-hooks binding a bit safer
Dmitry Gutov [Sat, 25 May 2024 21:58:57 +0000 (00:58 +0300)]
xref-revert-buffer: Make inhibit-modification-hooks binding a bit safer

* lisp/progmodes/xref.el (xref-revert-buffer): Make sure that the
inhibit-modification-hooks binding does not cover xref--fetcher
funcall.  Only the printing step (issue mentioned in bug#53749).

(cherry picked from commit 7ca238c4413284253c06ed2b060a7a0f79653b40)

3 months agoFix a race condition when evaluating Eshell commands
Jim Porter [Sat, 25 May 2024 20:46:24 +0000 (13:46 -0700)]
Fix a race condition when evaluating Eshell commands

* lisp/eshell/esh-cmd.el (eshell-do-eval): Don't defer when all the
processes are done.

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/pipeline-wait/nested-pipes): New test.

(cherry picked from commit 57dc1ed665d72bc58befa4853fa479b770fe4fcc)

3 months agoMake Tramp's async processes more robust
Michael Albinus [Sat, 25 May 2024 15:23:30 +0000 (17:23 +0200)]
Make Tramp's async processes more robust

* lisp/simple.el (shell-command-sentinel): Check process property
`remote-command' first.

* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-androidsu.el (tramp-androidsu-handle-make-process):
Set sentinel `ignore'.  (Bug#71049)

* test/lisp/net/tramp-tests.el
(tramp--test-deftest-direct-async-process): Don't suppress
internal sentinel.
(tramp-test32-shell-commanddirect-async): Don't tag it :unstable.

(cherry picked from commit 91509d5d2a2dc818830cff63f13d6efcb229dc0c)

3 months ago* src/Makefile.in (ELN_DESTDIR, BIN_DESTDIR): Give a default (bug#70842).
Andrea Corallo [Sat, 25 May 2024 15:12:22 +0000 (17:12 +0200)]
* src/Makefile.in (ELN_DESTDIR, BIN_DESTDIR): Give a default (bug#70842).

(cherry picked from commit 129c6778e640f8ae9ba0eba9ad9ce81b4bf2328e)

3 months agoAvoid assertion violations in displaying under 'outline-minor-mode'
Eli Zaretskii [Sat, 25 May 2024 11:23:43 +0000 (14:23 +0300)]
Avoid assertion violations in displaying under 'outline-minor-mode'

* src/xdisp.c (init_from_display_pos): Initialize BYTEPOS
correctly, since 'init_iterator' no longer computes it from
CHARPOS as needed.  This fixes a change made on Mar 13, 2013.
(Bug#71194)

(cherry picked from commit 4f0121f8dbe2ca0ec8fe2831353f01782e5e6b9d)

3 months agoOmit `store-substring` from lisp manual (bug#70784)
Mattias Engdegård [Sat, 25 May 2024 10:20:30 +0000 (12:20 +0200)]
Omit `store-substring` from lisp manual (bug#70784)

* doc/lispref/strings.texi (Modifying Strings): Remove `store-substring`
which is not really useful enough to merit a mention here.

(cherry picked from commit cb67c34bcfe525cbab75d7af8c6e6244d61eb228)

3 months agoImprove documentation of 'no-special-glyphs' frame parameter
Eli Zaretskii [Sat, 25 May 2024 10:22:45 +0000 (13:22 +0300)]
Improve documentation of 'no-special-glyphs' frame parameter

* doc/lispref/frames.texi (Layout Parameters): Document
limitations of support for 'no-special-glyphs' frame parameter.
(Bug#71163)
* doc/lispref/display.texi (Truncation): Update for when
'fringe-mode' is off.

(cherry picked from commit 1bf658366220ce1019721f24d96ef8f82bd18cff)

3 months agoImprove documentation of sending commands to shells
Eli Zaretskii [Sat, 25 May 2024 10:02:20 +0000 (13:02 +0300)]
Improve documentation of sending commands to shells

* doc/lispref/processes.texi (Synchronous Processes):
* lisp/subr.el (call-shell-region):
* lisp/simple.el (shell-command-on-region)
(shell-command-to-string): Document system-dependent aspects of
sending commands to shells.  (Bug#71081)

(cherry picked from commit d54178f535b1eafe4919a282cf85a9b553469de2)

3 months agoAdapt Tramp's progress-reporter messages
Michael Albinus [Sat, 25 May 2024 09:34:04 +0000 (11:34 +0200)]
Adapt Tramp's progress-reporter messages

* lisp/net/tramp-androidsu.el (tramp-androidsu-maybe-open-connection):
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
Adapt progress-reporter message.

* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
Divide progress-reporter into two parts.  (Bug#70901)

(cherry picked from commit 1a48b53040d1ec24798c07c7dacafe134aa15a5e)

3 months ago; Improve doc strings in textsec.el
Eli Zaretskii [Sat, 25 May 2024 08:59:21 +0000 (11:59 +0300)]
; Improve doc strings in textsec.el

* lisp/international/textsec.el (textsec-email-address-suspicious-p)
(textsec-email-address-header-suspicious-p, textsec-scripts)
(textsec-single-script-p, textsec-covering-scripts)
(textsec-restriction-level, textsec-mixed-numbers-p)
(textsec-resolved-script-set)
(textsec-single-script-confusable-p)
(textsec-mixed-script-confusable-p)
(textsec-whole-script-confusable-p)
(textsec-local-address-suspicious-p)
(textsec-bidi-controls-suspicious-p, textsec-name-suspicious-p)
(textsec-suspicious-nonspacing-p): Doc fixes.

(cherry picked from commit 9fbe9dc4c3e580c014d444986f2910cde6216b35)

3 months agoAvoid rare errors in dabbrev.el
Eli Zaretskii [Sat, 25 May 2024 07:33:07 +0000 (10:33 +0300)]
Avoid rare errors in dabbrev.el

* lisp/dabbrev.el (dabbrev-expand, dabbrev--find-expansion): Make
sure 'dabbrev--last-buffer' is a live buffer before using its
value.  (Bug#70824)

(cherry picked from commit 5f3f461cd0c76b1b171bb9eda3db1f561bc22b80)

3 months agoFix encoding of text when saving a gpg-encoded file
Eli Zaretskii [Sat, 25 May 2024 06:12:42 +0000 (09:12 +0300)]
Fix encoding of text when saving a gpg-encoded file

* lisp/epa-file.el (epa-file-write-region): Revert inadvertent
change from July 15, 2020 which broke selection of a correct
encoding for stuff sent to 'gpg'.  (Bug#71080)

(cherry picked from commit d50e3226b1a6234830e7946518f31c99669915cb)

3 months agoErase existing duplicates in eshell-history-ring
Robin Joy [Fri, 24 May 2024 12:26:39 +0000 (14:26 +0200)]
Erase existing duplicates in eshell-history-ring

Erase all existing duplicates instead of just the last duplicate entry
when 'eshell-hist-ignoredups' is set to 'erase'.  Multiple duplicates
can exist in case 'eshell-hist-ignoredups' was set to something else
than 'erase' in the past or if the history file contains duplicates
(bug#71107).

* lisp/eshell/em-hist.el (eshell-add-input-to-history): Remove all
duplicates from history ring.

* test/lisp/eshell/em-hist-tests.el
(em-hist-test/add-to-history/erase-existing-dups): New test.

(cherry picked from commit 984fb346fdf0d5ec9eaea6126aad0bea8823b8a3)

3 months ago; Fix previous fix for bug#70796
Tassilo Horn [Fri, 24 May 2024 21:04:33 +0000 (23:04 +0200)]
; Fix previous fix for bug#70796

(cherry picked from commit f3dd0d981cbb9c0fa10a3c5b05b244ed7a0f4e6b)

3 months agoFix usage of cons cells in grep-find-ignored-files
Spencer Baugh [Wed, 22 May 2024 12:28:07 +0000 (08:28 -0400)]
Fix usage of cons cells in grep-find-ignored-files

grep-find-ignored-files is documented to also include cons
cells, not just globs, but there were two places outside grep.el
where we were using it as if it was only a string list.

To fix this, add a helper function named grep-find-ignored-files
which handles grep-find-ignored-files properly and returns the
list of globs, and use it everywhere.

* lisp/progmodes/grep.el (grep--filter-list-by-dir)
(grep-find-ignored-files): New functions.
(rgrep-find-ignored-directories): Use grep--filter-list-by-dir.
(lgrep, rgrep-default-command):
Use grep-find-ignored-files function.
* lisp/dired-aux.el (dired-do-find-regexp):
Use grep-find-ignored-files function.
* lisp/progmodes/project.el (project-ignores):
Use grep-find-ignored-files function, if bound. (bug#71115)

(cherry picked from commit c812c935486010bfe2f80c3887c708fbaa4907a6)

3 months agobug-reference: signal fontified bounds back to jit-lock (bug#70796)
Tassilo Horn [Fri, 24 May 2024 19:52:34 +0000 (21:52 +0200)]
bug-reference: signal fontified bounds back to jit-lock (bug#70796)

* lisp/progmodes/bug-reference.el (bug-reference-fontify): Signal
fontified bounds back to jit-lock in order to allow for redisplay
optimizations (bug#70796).

(cherry picked from commit 59d7730a46a4a51a2c7e3c800a1d60f92a2322b6)

3 months ago* lisp/dired.el (dired-mode-map): Bind "E" to 'dired-do-open' (bug#18132).
Juri Linkov [Fri, 24 May 2024 17:55:30 +0000 (20:55 +0300)]
* lisp/dired.el (dired-mode-map): Bind "E" to 'dired-do-open' (bug#18132).

(dired-mode-immediate-menu): Add menu item "Display Externally"
for 'dired-do-open'.

* lisp/dired-aux.el (dired-do-open): Add autoload cookie.

(cherry picked from commit 9ebe6aa5f1092241a98e0a16db918e3dc1062f1c)

3 months agoNew variable shell-command-guess-dired-optional (bug#18132)
Juri Linkov [Fri, 24 May 2024 17:48:42 +0000 (20:48 +0300)]
New variable shell-command-guess-dired-optional (bug#18132)

* doc/emacs/dired.texi (Shell Command Guessing):
Add dired-guess-shell-alist-optional.

* lisp/dired.el (dired-guess-shell-alist-user):
* lisp/dired-aux.el (dired-do-shell-command):
Add dired-guess-shell-alist-optional to docstring.
(dired-guess-shell-alist-default): Move media commands to
'dired-guess-shell-alist-optional'.
(dired-guess-shell-alist-optional): New variable.
(dired-guess-default): Add 'dired-guess-shell-alist-optional'
to the end after 'dired-guess-shell-alist-user'
and 'dired-guess-shell-alist-default'.
(shell-command-guess-functions): Add more options.
(shell-command-guess-dired): Remove function.
(shell-command-guess-dired-user)
(shell-command-guess-dired-default)
(shell-command-guess-dired-optional): New functions.

(cherry picked from commit 74f15ad72d937b309dafecba872bccd1a880181e)

3 months agoFix Python font lock of chained assignment statement
kobarity [Fri, 24 May 2024 13:50:12 +0000 (22:50 +0900)]
Fix Python font lock of chained assignment statement

* lisp/progmodes/python.el
(python-font-lock-keywords-maximum-decoration): Allow chaining
of single assignment statements.
* test/lisp/progmodes/python-tests.el
(python-font-lock-assignment-statement-20): New test.
(Bug#71093)

(cherry picked from commit 3647645e94856344696768bef590b49a24c7ac52)

3 months agoFix example in Calc manual
Brad Knotwell [Fri, 24 May 2024 07:00:37 +0000 (00:00 -0700)]
Fix example in Calc manual

* doc/misc/calc.texi (Defining Simple Commands): Fix typo in
command names.  (Bug#71166)

Copyright-paperwork-exempt: yes
(cherry picked from commit 3291dea441f25ca14619bebe493ffb694f53cf9d)

3 months ago* src/comp.c (check_comp_unit_relocs): Remove unneccesary double access.
Andrea Corallo [Fri, 24 May 2024 06:37:41 +0000 (08:37 +0200)]
* src/comp.c (check_comp_unit_relocs): Remove unneccesary double access.

(cherry picked from commit e650a04dc415467806b77d4b3801f9e6eeb9dfaf)

3 months agoAvoid crashes on MS-Windows due to invalid UNC file names
Eli Zaretskii [Wed, 22 May 2024 11:10:53 +0000 (14:10 +0300)]
Avoid crashes on MS-Windows due to invalid UNC file names

* src/w32.c (parse_root): Avoid crashes due to invalid (too short)
UNC names, such as "\\".  (Bug#70914)

* test/src/fileio-tests.el (fileio-tests-invalid-UNC): New test.

(cherry picked from commit 350ae75f5c1c47a03560e43e8699781c04c9078a)

3 months ago; * lisp/face-remap.el (text-scale-adjust): Doc fix.
Eli Zaretskii [Tue, 21 May 2024 12:40:51 +0000 (15:40 +0300)]
; * lisp/face-remap.el (text-scale-adjust): Doc fix.

(cherry picked from commit ccf8dba44a3071d56e54a20276e00a6cdcc4b135)

3 months ago; Improve documentation of backing up files
Eli Zaretskii [Tue, 21 May 2024 12:34:50 +0000 (15:34 +0300)]
; Improve documentation of backing up files

* doc/emacs/files.texi (Backup Copying): Mention that
'backup-by-copying' is safer.  Document 'file-precious-flag'.
(Bug#71074)

(cherry picked from commit 5ab144c77cda1d56f0dd62606c316c712a0d2563)

3 months agoRemove 'mode-exit(ed)' stuff
Eshel Yaron [Fri, 24 May 2024 13:22:10 +0000 (15:22 +0200)]
Remove 'mode-exit(ed)' stuff

3 months agoFix 'completion-preview-cursor-type' test
Eshel Yaron [Fri, 24 May 2024 09:04:47 +0000 (11:04 +0200)]
Fix 'completion-preview-cursor-type' test

3 months agoImprove Dired context menu
Eli Zaretskii [Thu, 23 May 2024 18:14:13 +0000 (21:14 +0300)]
Improve Dired context menu

* lisp/dired.el (dired-context-menu): Add 'w32-shell-execute' menu
item on MS-Windows.  Improve help-echo.

(cherry picked from commit e1789f66ac9ada9344fb22b2a191d61216f95459)

3 months agoDocumentation followup for last change
Eli Zaretskii [Thu, 23 May 2024 13:23:57 +0000 (16:23 +0300)]
Documentation followup for last change

* etc/NEWS: Announce the change in 'key-translate'.

* doc/lispref/commands.texi (Event Mod): Update documentation of
'key-translate'.  (Bug#70139)

(cherry picked from commit b53a20c61d30d4bef43f069b795b8c79bbaf091a)

3 months agoImprove 'key-translate' to support removing translations
Charalampos Mitrodimas [Tue, 2 Apr 2024 19:02:46 +0000 (19:02 +0000)]
Improve 'key-translate' to support removing translations

This patch enhances the key-translate function to allow removing
keyboard translations by passing nil as the second argument (TO).
If TO is nil, any existing translation for the FROM key will be
removed.  The compiler macro is updated to only check TO when it
is non-nil.  This change makes key-translate more consistent with
the behavior of 'keyboard-translate', providing a way to remove
translations without having to specify the same key for both FROM
and TO.
The documentation string is updated to reflect the new behavior.

* lisp/keymap.el (key-translate): Support removing translations
by passing nil as the second argument (TO).  Also signal an error
if multiple items are passed.  (Bug#70139)

(cherry picked from commit 8f010e9a2926bd3886c54a0360ff341bc66f8088)