]> git.eshelyaron.com Git - emacs.git/log
emacs.git
20 months agoMake Tramp file name completion more quiet for all backends
Michael Albinus [Sun, 12 Mar 2023 16:21:57 +0000 (17:21 +0100)]
Make Tramp file name completion more quiet for all backends

* lisp/net/tramp-adb.el (tramp-adb-handle-file-name-all-completions):
* lisp/net/tramp-archive.el
(tramp-archive-handle-file-name-all-completions):
* lisp/net/tramp-crypt.el (tramp-crypt-handle-file-name-all-completions):
* lisp/net/tramp-fuse.el (tramp-fuse-handle-file-name-all-completions):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-name-all-completions):
* lisp/net/tramp-smb.el (tramp-smb-handle-file-name-all-completions):
* lisp/net/tramp-sudoedit.el
(tramp-sudoedit-handle-file-name-all-completions):
Return nil when DIRECTORY is missing.  (Bug#61890)

20 months ago; NEWS markings.
Eli Zaretskii [Sun, 12 Mar 2023 15:43:40 +0000 (17:43 +0200)]
; NEWS markings.

20 months agoAdd elixir-ts-mode (Bug#61996)
Wilhelm H Kirschbaum [Sun, 12 Mar 2023 15:10:43 +0000 (17:10 +0200)]
Add elixir-ts-mode (Bug#61996)

* etc/NEWS: Mention the new mode.
* lisp/progmodes/elixir-ts-mode.el: New file.
* test/lisp/progmodes/elixir-ts-mode-tests.el: New file.
* test/lisp/progmodes/elixir-ts-mode-resources/indent.erts: New file.
* admin/notes/tree-sitter/build-module/batch.sh:
* admin/notes/tree-sitter/build-module/build.sh: Add Elixir support.
* lisp/progmodes/eglot.el (eglot-server-programs): Add elixir-ts-mode.

20 months agoAdd heex-ts-mode (Bug#61996)
Wilhelm H Kirschbaum [Sun, 12 Mar 2023 15:08:50 +0000 (17:08 +0200)]
Add heex-ts-mode (Bug#61996)

* etc/NEWS: Mention the new mode.
* lisp/progmodes/heex-ts-mode.el: New file.
* test/lisp/progmodes/heex-ts-mode-tests.el: New file.
* test/lisp/progmodes/heex-ts-mode-resources/indent.erts: New file.
* admin/notes/tree-sitter/build-module/batch.sh:
* admin/notes/tree-sitter/build-module/build.sh: Add HEEx support.

20 months agoFix pluralization in shortdoc-help-fns-examples-function
Daniel Martín [Sun, 12 Mar 2023 12:38:34 +0000 (13:38 +0100)]
Fix pluralization in shortdoc-help-fns-examples-function

* lisp/emacs-lisp/shortdoc.el (shortdoc-help-fns-examples-function):
Implement a better logic to pluralize "Example", by counting the
number of arrow characters in the example string. (Bug#61877)
* test/lisp/emacs-lisp/shortdoc-tests.el
(shortdoc-help-fns-examples-function-test): Add a test.

20 months ago; Fix last change
Eli Zaretskii [Sun, 12 Mar 2023 08:25:10 +0000 (10:25 +0200)]
; Fix last change

* lisp/emacs-lisp/shortdoc.el (shortdoc-help-fns-examples-function)
(shortdoc-function-examples): Fix compilation warning and add an
empty line before the examples.

* lisp/emacs-lisp/shortdoc.el (shortdoc--insert-group-in-buffer)
(shortdoc-function-examples)
(shortdoc-help-fns-examples-function):
* etc/NEWS:
* doc/lispref/help.texi (Documentation Groups):
* doc/emacs/help.texi (Name Help): Improve documentation of
the last change.  (Bug#61877)

20 months agoAdd functions to query Emacs Lisp examples registered in shortdoc
Daniel Martín [Tue, 28 Feb 2023 22:15:40 +0000 (23:15 +0100)]
Add functions to query Emacs Lisp examples registered in shortdoc

* lisp/emacs-lisp/shortdoc.el (shortdoc--display-function): Add
a new shortdoc-example text property so that ELisp examples can
be searched for later.
(shortdoc--insert-group-in-buffer): New function extracted from
the buffer insertion code in 'shortdoc-display-group'.
(shortdoc-display-group): Implement in terms of
'shortdoc--insert-group-in-buffer'.
(shortdoc-function-examples): New function that returns an alist
of Emacs Lisp examples from shortdoc.
(shortdoc-help-fns-examples-function): New function to insert
Emacs Lisp function examples in *Help* buffers, if added to
'help-fns-describe-function-functions'.
*
test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-function-examples-test):
Test it.
* doc/emacs/help.texi (Name Help): Document in the user manual.
* doc/lispref/help.texi (Documentation Groups): Document it.
* etc/NEWS: Advertise it. (Bug#61877)

20 months ago; Fix typo in docstring
Jim Porter [Sun, 12 Mar 2023 07:51:20 +0000 (23:51 -0800)]
; Fix typo in docstring

* test/lisp/eshell/em-cmpl-tests.el
(em-cmpl-test/variable-assign-completion/non-assignment): Fix typo.

20 months agoAdd support for completing special references (e.g. buffers) in Eshell
Jim Porter [Wed, 25 Jan 2023 05:22:06 +0000 (21:22 -0800)]
Add support for completing special references (e.g. buffers) in Eshell

* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Handle
special references.

* lisp/eshell/em-arg.el (eshell-parse-special-reference): Ensure point
is just after the "#<" when incomplete, and handle backslash escapes
more thoroughly.
(eshell-complete-special-reference): New function.

* test/lisp/eshell/esh-arg-tests.el
(esh-arg-test/special-reference/default)
(esh-arg-test/special-reference/buffer)
(esh-arg-test/special-reference/special):
* test/lisp/eshell/em-cmpl-tests.el
(em-cmpl-test/special-ref-completion/type)
(em-cmpl-test/special-ref-completion/implicit-buffer)
(em-cmpl-test/special-ref-completion/buffer): New tests.

20 months agoRemove recursion from character escape handling in reader
Mattias Engdegård [Fri, 10 Mar 2023 16:10:30 +0000 (17:10 +0100)]
Remove recursion from character escape handling in reader

This cures a C stack overflow when reading certain long (crafted)
strings (bug#62039) and improves performance of reading escaped
characters in character and string literals.
Reported by Bruno Haible.

* src/lread.c (invalid_escape_syntax_error): New.
(read_escape): Rename to...
(read_char_escape): ...this.  Remove recursion.  Pass read-ahead char
as argument.  Improve code performance and clarity.
(read_char_literal, read_string_literal): Update calls.
* test/src/lread-tests.el (lread-char-modifiers)
(lread-many-modifiers): Add test cases.

20 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sat, 11 Mar 2023 00:51:41 +0000 (16:51 -0800)]
Update from Gnulib by running admin/merge-gnulib

Run admin/merge-gnulib along with the following change:
* admin/merge-gnulib (GNULIB_MODULES): Replace ‘time’ with
‘time-h’, adjusting to a recent renaming in Gnulib modules.
Emacs doesn’t appear to need the new Gnulib ‘time’ module.

20 months agosrc/profiler.c: Keep track of the discarded counts
Stefan Monnier [Fri, 10 Mar 2023 20:54:10 +0000 (15:54 -0500)]
src/profiler.c: Keep track of the discarded counts

When the table overflows and wh evict entries, keep track of those
counts in a global counter so we can see the proportion of
samples this represents.

* src/profiler.c (struct profiler_log): Add `discarded` field.
(evict_lower_half): Change arg to be `struct profiler_log`.
Transfer counts to the new `discarded` field.
(record_backtrace): Change arg to be `struct profiler_log`.
(add_sample): Adjust call accordingly.
(export_log): Add `discarded` counts to the result.
Onle add the GC and `discarded` counts if they're non-zero.
(syms_of_profiler): Define new symbol `Discarded Samples`.

20 months agosrc/profiler.c: Share more code between CPU and Memory profilers
Stefan Monnier [Fri, 10 Mar 2023 20:30:20 +0000 (15:30 -0500)]
src/profiler.c: Share more code between CPU and Memory profilers

* src/profiler.c (struct profiler_log): New type.
(make_log): Use it.
(cpu, memory): New vars to replace cpu_log, memory_log, cpu_gc_count,
and mem_gc_count.
(add_sample): New function, extracted from `handle_profiler_signal`.
(handle_profiler_signal, malloc_probe): Use it.
(Fprofiler_cpu_start, Fprofiler_memory_start): Adjust call to `make_log`.
(export_log): New function, extracted from `Fprofiler_cpu_log`.
(Fprofiler_cpu_log, Fprofiler_memory_log): Use it.
(syms_of_profiler, syms_of_profiler_for_pdumper): Adjust to new `cpu`
and `memory` vars.

20 months agosrc/profiler.c: Try and fix occasional assertion failures
Stefan Monnier [Fri, 10 Mar 2023 20:05:55 +0000 (15:05 -0500)]
src/profiler.c: Try and fix occasional assertion failures

Apparently the (>= match imatch) test fails sometimes in `profiler.el`.
Not sure where this comes from, but this patch should remove one
possible source.

* src/profiler.c (Fprofiler_cpu_log, Fprofiler_memory_log):
Change the special Automatic_GC backtrace to make it clear that it's
a *sibling* of the call tree (i.e. it's at the (its own) root).
(malloc_probe): Obey `size` when incrementing the gc_counter.

20 months agosrc/profiler.c: Keep track of allocations during GC
Eli Zaretskii [Fri, 10 Mar 2023 19:54:52 +0000 (14:54 -0500)]
src/profiler.c: Keep track of allocations during GC

Cargo-cult the `cpu_gc_count` code to `memory_gc_count`.

* src/profiler.c (mem_gc_count): New var.
(Fprofiler_memory_start): Initialize it.
(Fprofiler_memory_log): Increment it.
(Fprofiler_memory_log): Use it.

20 months ago* lisp/progmodes/gud.el (gud-minor-menu-map): Fix thinko in last change
Stefan Monnier [Fri, 10 Mar 2023 17:22:43 +0000 (12:22 -0500)]
* lisp/progmodes/gud.el (gud-minor-menu-map): Fix thinko in last change

20 months agoImprove thing-at-point email detection
Robert Pluim [Wed, 15 Feb 2023 11:16:11 +0000 (12:16 +0100)]
Improve thing-at-point email detection

* lisp/thingatpt.el (thing-at-point-email-regexp): Allow numbers at
the start of the user portion, and disallow '.' at the start.  Also
disallow '.' at the start of the domain portion.
* test/lisp/thingatpt-tests.el (thing-at-point-test-data): Add various
email tests.

Bug#61519

20 months agogud.el: Bring back the pseudo-tool-bar in text frames (bug#62041)
Stefan Monnier [Thu, 9 Mar 2023 21:19:16 +0000 (16:19 -0500)]
gud.el: Bring back the pseudo-tool-bar in text frames (bug#62041)

commit 8bb5c1bfec0929f2ba419e1c503f5acc01c336c2 accidentally
threw away the pseudo-tool-bar implemented in the text frames'
menu-bar of gud-minor-mode buffers.
Bring it back, and while we're at it, improve it so it also works
right when you have both text and GUI frames.

Also fix a misunderstanding in last change (`gud-mode-map` does need
to have a Gud menu, because `gud-mode` buffers already have it by
virtue of being in `gud-minor-mode` as well).

* lisp/progmodes/gud.el (gud-text-menu-bar-map): New keymap.
(gud-menu-mode-map): Rename from `gud-shared-mode-map`.
(gud-menu-map): Adjust accordingly.
(gud-minor-mode-map): Use them.
(gud-mode-map): Don't inherit from the shared/menu keymap.

20 months agoUse a face for DocView SVG
Manuel Giraud [Thu, 2 Mar 2023 18:16:19 +0000 (19:16 +0100)]
Use a face for DocView SVG

* lisp/doc-view.el (doc-view-svg-face): New face for SVG images.
(doc-view-insert-image): Use it.  (Bug#61816)

20 months agoFix out of sync counters in image-dired
Manuel Giraud [Thu, 2 Mar 2023 16:53:26 +0000 (17:53 +0100)]
Fix out of sync counters in image-dired

* lisp/image/image-dired.el (image-dired-delete-char): Update
thumbnails counter upon deletion.
(image-dired--update-header-line): Compute thumbnail index
dynamically.
(image-dired-insert-thumbnail): Remove now unused image-number
text property.  (Bug#61922)

20 months agoMerge from origin/emacs-29
Stefan Kangas [Thu, 9 Mar 2023 05:30:23 +0000 (06:30 +0100)]
Merge from origin/emacs-29

7e1012765c4 Fix libwebp check for some webp installations
c2ca009da4c Avoid potential infloop
34c14430e9d Don't misindent 'else:' after 'if re.match:' in Python
8a2a554192a * Make sure `default-directory' exists before spawning pr...
1862e7eb7ef Fix sed expression in install-etc make target
c8ec0017cb9 Avoid using bash in the emacsclient desktop file
a588937094f Fix documentation of the 'line-height' text property
971ded31c4f Add 'declare' specs to with- and without-restriction

20 months agoFix libwebp check for some webp installations
Po Lu [Thu, 9 Mar 2023 00:52:54 +0000 (08:52 +0800)]
Fix libwebp check for some webp installations

* configure.ac: Look for WebPGetInfo; if it is not there, look
for libwebpdecoder as well.  (bug#61988)

20 months agoserver-eval-at: Signal more specific condition on unreadable result
Sean Whitton [Sat, 4 Mar 2023 21:53:01 +0000 (14:53 -0700)]
server-eval-at: Signal more specific condition on unreadable result

* lisp/server.el (server-return-invalid-read-syntax): New error
signal.
(server-eval-at): Re-signal invalid-read-syntax as
server-return-invalid-read-syntax (bug#61658).

20 months agoAvoid potential infloop
Dmitry Gutov [Wed, 8 Mar 2023 22:43:31 +0000 (00:43 +0200)]
Avoid potential infloop

* lisp/progmodes/python.el
(python-info-dedenter-opening-block-positions):
Avoid potential infloop (bug#62031).

20 months agoFix Pcompletion of "tar" when using unrecognized arguments
Jim Porter [Fri, 10 Feb 2023 07:27:50 +0000 (23:27 -0800)]
Fix Pcompletion of "tar" when using unrecognized arguments

Previously, arguments to tar like "--warning=no-timestamp" would cause
Pcompletion to hang (bug#58921).

This simplifies the logic flow by moving all the cases for "--"
arguments inside the THEN form of '(if (pcomplete-match "^--" 0)', and
for all "-" arguments inside the ELSE form.

* lisp/pcmpl-gnu.el (pcmpl-gnu--tar-long-options): New variable.
(pcomplete/tar): Properly handle completion of arguments that look
like "--ARG=", even if they're not recognized by this function.

20 months agoDon't misindent 'else:' after 'if re.match:' in Python
Dmitry Gutov [Wed, 8 Mar 2023 20:41:23 +0000 (22:41 +0200)]
Don't misindent 'else:' after 'if re.match:' in Python

* lisp/progmodes/python.el
(python-info-dedenter-opening-block-positions): Check that the
supposed block start is not a method call (bug#62031).

* test/lisp/progmodes/python-tests.el (python-indent-after-re-match):
New test.

Co-authored-by: Lele Gaifax <lele@metapensiero.it>
20 months ago* Make sure `default-directory' exists before spawning processes (bug#62004)
Andrea Corallo [Wed, 8 Mar 2023 20:08:49 +0000 (21:08 +0100)]
* Make sure `default-directory' exists before spawning processes (bug#62004)

* lisp/emacs-lisp/comp.el (comp-final, comp-run-async-workers): Bind
`default-directory' to `invocation-directory'.

20 months agogud.el: Fix bug#62041
Stefan Monnier [Wed, 8 Mar 2023 20:08:00 +0000 (15:08 -0500)]
gud.el: Fix bug#62041

Add a new `gud-shared-mode-map` where we put the bindings
shared between `gud-minor-mode-map` and `gud-mode-map`.

* lisp/progmodes/gud.el (gud-shared-mode-map): New keymap.
(gud-mode-map, gud-minor-mode-map): Use it as parent.
(gud-menu-map): Put the menu in that new keymap.
(gud-speedbar-buttons, gdb-script-font-lock-syntactic-face)
(gdb-script-indent-line): Skip obsolete face variables.

20 months agoFix sed expression in install-etc make target
Ulrich Müller [Wed, 8 Mar 2023 18:48:33 +0000 (19:48 +0100)]
Fix sed expression in install-etc make target

* Makefile.in (install-etc): Fix sed expression for emacsclient
desktop files.  (Bug#62045)

20 months agoAvoid using bash in the emacsclient desktop file
Ulrich Müller [Wed, 8 Mar 2023 18:37:27 +0000 (19:37 +0100)]
Avoid using bash in the emacsclient desktop file

* etc/emacsclient-mail.desktop (Exec): Use sh and sed instead
of bash, because the latter may not be available everywhere.

20 months agoFix documentation of the 'line-height' text property
Eli Zaretskii [Wed, 8 Mar 2023 17:29:33 +0000 (19:29 +0200)]
Fix documentation of the 'line-height' text property

* doc/lispref/display.texi (Line Height): More accurate
documentation of the value t of 'line-height' text property.
(Bug#62048)

20 months agoAdd 'declare' specs to with- and without-restriction
Gregory Heytings [Wed, 8 Mar 2023 09:55:06 +0000 (09:55 +0000)]
Add 'declare' specs to with- and without-restriction

* lisp/subr.el (with-restriction):
(without-restriction): Add 'declare' specs.

20 months agoMerge from origin/emacs-29
Stefan Kangas [Wed, 8 Mar 2023 05:30:18 +0000 (06:30 +0100)]
Merge from origin/emacs-29

f9b7913656f Fix empty line indentation in c-ts-mode (bug#61997)
90504f9d898 Fix tree-sitter indent preset prev-line (bug#61998)
ed3bab3cc72 Revert 'forward-sentence-default-function' to return poin...
bfe62b10413 ; * etc/NEWS: Fix typos.
3c1693d08b0 Fix Elisp code injection vulnerability in emacsclient-mai...
ab417c8a6ee Fix problem with debuginfod queries in "M-x gdb"

# Conflicts:
# etc/NEWS

20 months agoFix empty line indentation in c-ts-mode (bug#61997)
Yuan Fu [Wed, 8 Mar 2023 00:35:23 +0000 (16:35 -0800)]
Fix empty line indentation in c-ts-mode (bug#61997)

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--indent-styles): Handle the empty line case.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New test.

* doc/lispref/modes.texi (Parser-based Indentation): Update manual.
* lisp/treesit.el (treesit-simple-indent-presets): Support null as
a value for NODE-TYPE in the 'match' matcher.

20 months agoFix tree-sitter indent preset prev-line (bug#61998)
Yuan Fu [Wed, 8 Mar 2023 00:26:33 +0000 (16:26 -0800)]
Fix tree-sitter indent preset prev-line (bug#61998)

* lisp/treesit.el (treesit-simple-indent-presets): Fix return value.

20 months agoRevert 'forward-sentence-default-function' to return point (bug#62027)
Manuel Giraud [Tue, 7 Mar 2023 19:03:53 +0000 (20:03 +0100)]
Revert 'forward-sentence-default-function' to return point (bug#62027)

* lisp/textmodes/paragraphs.el
(forward-sentence-default-function): Revert to return the
position of point.
(count-sentences): Adapt to this change.

20 months ago; * etc/NEWS: Fix typos.
Michael Albinus [Tue, 7 Mar 2023 17:50:44 +0000 (18:50 +0100)]
; * etc/NEWS: Fix typos.

20 months ago* test/lisp/subr-tests.el (subr--safe-copy-tree): New tests for safe-copy-tree
Alan Mackenzie [Tue, 7 Mar 2023 17:38:20 +0000 (17:38 +0000)]
* test/lisp/subr-tests.el (subr--safe-copy-tree): New tests for safe-copy-tree

20 months agoFix Elisp code injection vulnerability in emacsclient-mail.desktop
Ulrich Müller [Tue, 7 Mar 2023 17:25:37 +0000 (18:25 +0100)]
Fix Elisp code injection vulnerability in emacsclient-mail.desktop

A crafted mailto URI could contain unescaped double-quote
characters, allowing injection of Elisp code.  Therefore, any
'\' and '"' characters are replaced by '\\' and '\"', using Bash
pattern substitution (which is not available in the POSIX shell).

We want to pass literal 'u=${1//\\/\\\\}; u=${u//\"/\\\"};' in the
bash -c command, but in the desktop entry '"', '$', and '\' must
be escaped as '\\"', '\\$', and '\\\\', respectively (backslashes
are expanded twice, see the Desktop Entry Specification).

Reported by Gabriel Corona <gabriel.corona@free.fr>.

* etc/emacsclient-mail.desktop (Exec): Escape backslash and
double-quote characters.

20 months agosafe-copy-tree. Correct mistakes from earlier patch.
Alan Mackenzie [Tue, 7 Mar 2023 15:26:20 +0000 (15:26 +0000)]
safe-copy-tree.  Correct mistakes from earlier patch.

* lisp/emacs-lisp/bytecomp.el (compile-defun): Remove unintended change.

* lisp/subr.el (safe-copy-tree--seen): Correct grammatical error in doc
string.
(safe-copy-tree): Delete hash table at end of function.

* doc/lispref/lists.texi (Building Lists): Add an "@end defun" line.

20 months agoFix problem with debuginfod queries in "M-x gdb"
Eli Zaretskii [Tue, 7 Mar 2023 12:39:27 +0000 (14:39 +0200)]
Fix problem with debuginfod queries in "M-x gdb"

* lisp/progmodes/gdb-mi.el (gdb-debuginfod-enable-setting): New
defcustom.
(gdb-debuginfod-message): New function.
(gdb-init-1): Initialize gdb-debuginfod-enable.  Ask the user
about debuginfod queries and display any error messages.
(Bug#61973)

* etc/NEWS: Announce the change.

20 months agoeval-and-compile: Strip symbol positions for eval but not for compile.
Alan Mackenzie [Tue, 7 Mar 2023 08:00:25 +0000 (08:00 +0000)]
eval-and-compile: Strip symbol positions for eval but not for compile.

This fixes bug #61962.

* lisp/subr.el (safe-copy-tree): New function.

* lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment): Amend
the entry for eval-and-compile to use safe-copy-tree and
byte-run-strip-symbol-positions for the eval part.

* doc/lispref/lists.texi (Building Lists): Document safe-copy-tree.

* etc/NEWS: Note the new function safe-copy-tree.

20 months agoMerge from origin/emacs-29
Stefan Kangas [Tue, 7 Mar 2023 05:30:10 +0000 (06:30 +0100)]
Merge from origin/emacs-29

bd07cec8442 Fix regression in Fido mode (bug#62015)
0e3c7ac13da * Fix `emacs-lisp-native-compile-and-load' for (bug#61917)
4a7e657389a * lisp/emacs-lisp/comp.el (comp-prettyformat-insn): Fix (...
8a8a994cfab Revert "Fix configuration of webp libraries"
de4277af009 Fix configuration of webp libraries

20 months agoFix regression in Fido mode (bug#62015)
João Távora [Mon, 6 Mar 2023 22:28:47 +0000 (22:28 +0000)]
Fix regression in Fido mode (bug#62015)

To understand the regression consider this recipe where the 'fo'
pattern is typed by the user in the last step.

   emacs -Q
   C-x b foo RET
   C-x b afoo RET
   C-x b *scratch* RET
   M-x fido-mode RET
   C-x b fo

This used to offer both 'foo' and 'afoo' as candidates but now only
offered 'foo'.  This is because the pattern 'fo' matches 'foo', but
not 'afoo' with 'basic' completion style.

Fido mode, however, prioritizes 'flex' completion style, and that is
not happening here as it used to.

This was introduced in this commit

     commit bf81df86e52fdc995bec8d9646f84d114cb896d1
     Author: João Távora <joaotavora@gmail.com>
     Date:   Wed Dec 7 10:43:59 2022 +0000

         Don't override completion-category-defaults in fido-mode

I took away the nil setting of 'completion-category-defaults; in Fido
mode's minibuffer. It seemed generally the correct thing to do, and
was done mainly because Eglot added its style preferences to that
variable instead of completion-category-overrides directly, which is a
nono.  So, to be able use the Fido UI with Eglot successfully,
'completion-category-defaults' should stay untouched.  Or so I
thought.

However, I failed to notice that, for most categories, the default
value of 'completion-category-defaults' prioritizes the 'basic'
completion style.

For example, in the 'buffer' category, the default value has the
styles list '(basic substring)'.  This means that if a pattern matches
accoring to the 'basic' style, 'substring' will not be tried.  And
neither will 'completion-styles' which in Fido mode's case happens to
be 'flex'.

The solution in this commit is to craft a value for completion
category defaults that is just like the default one, but prioritizes
'flex' completion for every category.

* lisp/icomplete.el (icomplete--fido-ccd): New helper.
(icomplete--fido-mode-setup): Use it.

20 months ago* Fix `emacs-lisp-native-compile-and-load' for (bug#61917)
Andrea Corallo [Mon, 6 Mar 2023 16:27:32 +0000 (17:27 +0100)]
* Fix `emacs-lisp-native-compile-and-load' for (bug#61917)

* lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile-and-load):
Don't load if no compialtion happened.

20 months ago* lisp/emacs-lisp/comp.el (comp-prettyformat-insn): Fix (bug#61917)
Andrea Corallo [Mon, 6 Mar 2023 15:51:07 +0000 (16:51 +0100)]
* lisp/emacs-lisp/comp.el (comp-prettyformat-insn): Fix (bug#61917)

20 months agoRevert "Fix configuration of webp libraries"
Eli Zaretskii [Mon, 6 Mar 2023 15:31:57 +0000 (17:31 +0200)]
Revert "Fix configuration of webp libraries"

This reverts commit de4277af009115ceba7fe920163c05c608ea9524.
It breaks WebP support at least on my system.
There's no reason to require libwebpdecoder library to be
installed, since we don't use the functions from it, at least
not in libwebp 1.2.1.

20 months agoDon't modify interactive closures destructively (Bug#60974).
Vibhav Pant [Wed, 1 Mar 2023 09:34:34 +0000 (15:04 +0530)]
Don't modify interactive closures destructively (Bug#60974).

* lisp/emacs-lisp/cconv.el (cconv-convert): When form is an
interactive lambda form, don't destructively modify it, as it might be
a constant literal. Instead, create a new list with the relevant
place(s) changed.

* test/lisp/emacs-lisp/cconv-tests.el
(cconv-tests-interactive-form-modify-bug60974): New test.

20 months agoFix configuration of webp libraries
Po Lu [Mon, 6 Mar 2023 13:42:29 +0000 (21:42 +0800)]
Fix configuration of webp libraries

* configure.ac: Link with libwebpdecoder along with
libwebpdemux.  (bug#61988)

20 months agoAdd tramp-use-ssh-controlmaster-options value `suppress'.
Michael Albinus [Mon, 6 Mar 2023 12:35:49 +0000 (13:35 +0100)]
Add tramp-use-ssh-controlmaster-options value `suppress'.

* doc/misc/tramp.texi (Ssh setup):
Explain tramp-use-ssh-controlmaster-options value `suppress'.
(Remote processes): Add reference to "Using ssh connection sharing".

* etc/NEWS: Extend 'tramp-use-ssh-controlmaster-options' values.
;; Fix typos.

* lisp/net/tramp-sh.el (tramp-use-ssh-controlmaster-options):
Allow new value `suppress'.
(tramp-ssh-option-exists-p): New defun.
(tramp-ssh-controlmaster-options): Implement `suppress' actions.

20 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 6 Mar 2023 05:30:13 +0000 (06:30 +0100)]
Merge from origin/emacs-29

1c67e4f895f Fix c-ts-mode indentation
d724d7d6785 Fix c-ts-mode indentation
7292b24c801 Fix c-ts-mode indentation
75cdc1afbe5 ; Change font-lock-variable-name-face to font-lock-variab...
b1b3af5b90b Update to Org 9.6.1-40-g3d817c
80e1037df44 Add string-interpolation feature to bash-ts-mode
5b8e0b31548 Fix tramp-sh-handle-insert-directory
2258ed01f42 ; Minor fix of last change
9c18af0cfaf * Warn when certain primitives are redefined (bug#61880)
5af695c7479 ; * lib-src/etags.c (print_help): Fix indentation.

20 months agoFix c-ts-mode indentation
Yuan Fu [Sun, 5 Mar 2023 23:22:36 +0000 (15:22 -0800)]
Fix c-ts-mode indentation

Mentioned in bug#61893.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--anchor-prev-sibling): Handle
"#elif" and "#else".
* test/lisp/progmodes/c-ts-mode-resources/indent-preproc.erts: Add an
"#elif" to the test.

20 months agoFix c-ts-mode indentation
Yuan Fu [Sun, 5 Mar 2023 23:07:58 +0000 (15:07 -0800)]
Fix c-ts-mode indentation

Mentioned in bug#61893, although not the subject of it.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--anchor-prev-sibling): Fix the child index for preproc_else
and preproc_elif case.
* test/lisp/progmodes/c-ts-mode-resources/indent-preproc.erts:
New test.

20 months agoFix c-ts-mode indentation
Yuan Fu [Sun, 5 Mar 2023 23:01:54 +0000 (15:01 -0800)]
Fix c-ts-mode indentation

Not the subject of it, but mentioned in bug#61893.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--anchor-prev-sibling): Skip
the sibling if it doesn't start on it's own line.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New test.

20 months ago; Change font-lock-variable-name-face to font-lock-variable-use-face
Yuan Fu [Sun, 5 Mar 2023 22:42:28 +0000 (14:42 -0800)]
; Change font-lock-variable-name-face to font-lock-variable-use-face

* lisp/progmodes/sh-script.el:
(sh-mode--treesit-settings): Change font-lock-variable-name-face to
font-lock-variable-use-face.

20 months agoUpdate to Org 9.6.1-40-g3d817c
Kyle Meyer [Sun, 5 Mar 2023 22:22:06 +0000 (17:22 -0500)]
Update to Org 9.6.1-40-g3d817c

20 months agoAdd string-interpolation feature to bash-ts-mode
Yuan Fu [Sun, 5 Mar 2023 22:16:58 +0000 (14:16 -0800)]
Add string-interpolation feature to bash-ts-mode

* lisp/progmodes/sh-script.el:
(bash-ts-mode): Add string-interpolation feature.
(sh-mode--treesit-settings): Add rule for string-interpolation feature.

20 months agoFix tramp-sh-handle-insert-directory
Michael Albinus [Sun, 5 Mar 2023 16:31:26 +0000 (17:31 +0100)]
Fix tramp-sh-handle-insert-directory

* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): Remove also
//DIRED-OPTIONS// line when there is no //DIRED// line.

20 months ago; Minor fix of last change
Eli Zaretskii [Sun, 5 Mar 2023 10:24:39 +0000 (12:24 +0200)]
; Minor fix of last change

* lisp/emacs-lisp/comp.el (comp-subr-trampoline-install): Fix
wording.  (Bug#61880)

20 months ago* Warn when certain primitives are redefined (bug#61880)
Andrea Corallo [Sun, 5 Mar 2023 09:46:18 +0000 (10:46 +0100)]
* Warn when certain primitives are redefined (bug#61880)

* lisp/emacs-lisp/comp.el (comp-warn-primitives): New constant.
(comp-subr-trampoline-install): Warn when a sensitive primitive is
being redefined.

20 months ago; * lib-src/etags.c (print_help): Fix indentation.
Eli Zaretskii [Sun, 5 Mar 2023 06:43:03 +0000 (08:43 +0200)]
; * lib-src/etags.c (print_help): Fix indentation.

20 months agoMerge from origin/emacs-29
Stefan Kangas [Sun, 5 Mar 2023 05:30:15 +0000 (06:30 +0100)]
Merge from origin/emacs-29

836044f329a Fix c-ts-mode preproc directive indentation
64980a59b65 ; * lisp/files.el (hack-local-variables): Fix typo in the...
a7cd125d490 More robustly unspoof HOME in Eglot tests (bug#61637)
6c66dbd02c7 Turn on Eglot inlay hints by default
246f5b541c5 Update ts modes missed in 4c16fd3a512 to use column-0
0bfba49ca7c Robustify Eglot for "transient" projects
ea5fd375bb2 Fix documentation of 'normal-mode' in buffers that don't ...
4c16fd3a512 Change tree-sitter indent anchor 'point-min' to 'column-0'
f47b3930158 Fix go-ts-mode multi-line string indentation (bug#61923)
e0bf2da3db6 ; More accurate doc strings for 'window-at' and 'window-a...

20 months agoFix c-ts-mode preproc directive indentation
Yuan Fu [Sat, 4 Mar 2023 22:39:44 +0000 (14:39 -0800)]
Fix c-ts-mode preproc directive indentation

Mentioned in bug#61893, although not the subject of that report.  This
change fixes indentation for nested directives.  For example, when the
directive involves elif and the like, the elif is nested in the if
directive, so simply using grand-parent and great-grand-parent for
anchor is insufficient, because the nesting can grow arbitrarily.

The test added also covers the last preproc fix.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--standalone-parent-skip-preproc): New function.
(c-ts-mode--indent-styles): New rules.
* test/lisp/progmodes/c-ts-mode-resources/indent-preproc.erts: New test.

20 months ago; * lisp/files.el (hack-local-variables): Fix typo in the doc string.
Eli Zaretskii [Sat, 4 Mar 2023 20:03:14 +0000 (22:03 +0200)]
; * lisp/files.el (hack-local-variables): Fix typo in the doc string.

20 months agoMore robustly unspoof HOME in Eglot tests (bug#61637)
João Távora [Sat, 4 Mar 2023 19:14:48 +0000 (19:14 +0000)]
More robustly unspoof HOME in Eglot tests (bug#61637)

A fair number of LSP servers allow user-local installations instead of
system wide installations.  Emacs's technique of spoofing the HOME env
var to some non-existent or non-home directory during 'make check'
breaks these tests.  That's because the executables are still found by
executable-find, but their invocation will rarely be successful as
HOME isn't what they expect it to be.

Eglot tests already had a technique for dealing with this,
"unspoffing" HOME just for the invocations of LSP server but it
stopped working a while back.  So make it more robust.

Eventually, we'll want to decide wether these local servers should be
considered in 'make check' runs at all, or whether there is a way to
use them with a spoofed HOME.

* test/lisp/progmodes/eglot-tests.el (eglot--call-with-fixture):
More robustly unspoof HOME.

20 months agoTurn on Eglot inlay hints by default
João Távora [Sat, 4 Mar 2023 15:05:15 +0000 (15:05 +0000)]
Turn on Eglot inlay hints by default

This is like any other server-provided feature, and may be turned off
client-side by setting eglot-ignored-server-capabilities like

   (add-to-list 'eglot-ignored-server-capabilities :inlayHintProvider)

* lisp/progmodes/eglot.el (eglot--maybe-activate-editing-mode):
Activate eglot-inlay-hints-mode.
(eglot-inlay-hints-mode): Instead of warning about missing
:inlayHintProvider, turn off eglot-inlay-hints-mode.

20 months agoUpdate ts modes missed in 4c16fd3a512 to use column-0
Dmitry Gutov [Sat, 4 Mar 2023 17:45:39 +0000 (19:45 +0200)]
Update ts modes missed in 4c16fd3a512 to use column-0

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules):
* lisp/progmodes/go-ts-mode.el (go-ts-mode--indent-rules):
Change point-min anchor to column-0.

20 months agoUnbreak the unexec build
Eli Zaretskii [Sat, 4 Mar 2023 15:01:16 +0000 (17:01 +0200)]
Unbreak the unexec build

* src/alloc.c (BLOCK_ALIGN) [HAVE_UNEXEC]: Reset back to 1024.
(Bug#61960)

20 months agoRobustify Eglot for "transient" projects
João Távora [Sat, 4 Mar 2023 12:49:00 +0000 (12:49 +0000)]
Robustify Eglot for "transient" projects

When Eglot needs to synthesize a "transient" project for
default-directory sometimes the value of that variable is set to an
unexpanded value, sometimes not.  This can cause simple invocations
like.

   Emacs -Q ~/path/to-some-python-file.py -f eglot

to fail, because eglot--current-server will be looking for a project
in the registry called

    (transient . "~/path")

where in reality it is stored there as

    (transient . "/home/someuser/path")

The fix is to always expand default-directory in eglot--current-project.

* lisp/progmodes/eglot.el (eglot--current-project): Use
expand-file-name.

20 months agobug#61489: Increase BLOCK_ALIGN from 1024 to 32768
Konstantin Kharlamov [Thu, 16 Feb 2023 15:07:55 +0000 (18:07 +0300)]
bug#61489: Increase BLOCK_ALIGN from 1024 to 32768

Originally discovered by Tyler Dodge in his article "Significant Garbage
Collection Improvement For Emacs".

While testing this change on Archlinux system with Intel i5-7200U CPU,
average time of garbage collection gets reduced by ≈25%. Other users
report improvements up to 50%. While monitoring PSS of emacs with and
without customizations loaded before and after the patch, no
statistically significant differences were discovered. So overall, this
change is a win.
* src/alloc.c (BLOCK_ALIGN): increase from 1024 to 32768.

20 months agoFix documentation of 'normal-mode' in buffers that don't visit files
Eli Zaretskii [Sat, 4 Mar 2023 10:16:51 +0000 (12:16 +0200)]
Fix documentation of 'normal-mode' in buffers that don't visit files

* lisp/files.el (normal-mode):
* lisp/subr.el (run-mode-hooks):
* doc/emacs/modes.texi (Choosing Modes): Mention the caveat with
'normal-mode' in buffers not visiting files.  (Bug#61925)
* lisp/files.el (hack-local-variables): Doc fix.

20 months agoChange tree-sitter indent anchor 'point-min' to 'column-0'
Yuan Fu [Sat, 4 Mar 2023 09:09:00 +0000 (01:09 -0800)]
Change tree-sitter indent anchor 'point-min' to 'column-0'

Point-min isn't necessarily at column 0, using line-beginning-position
is better. column-0 is also more intuitive.

* doc/lispref/modes.texi (Parser-based Indentation): Update manual.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles):
* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules):
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--indent-rules):
* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts-mode--indent-rules): Change point-min to column-0.
* lisp/treesit.el (treesit-simple-indent-presets): Change point-min to
column-0.

20 months agoFix go-ts-mode multi-line string indentation (bug#61923)
Yuan Fu [Sat, 4 Mar 2023 08:37:03 +0000 (00:37 -0800)]
Fix go-ts-mode multi-line string indentation (bug#61923)

* lisp/progmodes/go-ts-mode.el:
(go-ts-mode--indent-rules): Add indent rule for multi-line sting.

20 months ago; More accurate doc strings for 'window-at' and 'window-at-x-y'.
Eli Zaretskii [Sat, 4 Mar 2023 08:43:25 +0000 (10:43 +0200)]
; More accurate doc strings for 'window-at' and 'window-at-x-y'.

* lisp/window.el (window-at-x-y):
* src/window.c (Fwindow_at): Doc fix.  (Bug#61948)

20 months agoMerge from origin/emacs-29
Stefan Kangas [Sat, 4 Mar 2023 05:30:12 +0000 (06:30 +0100)]
Merge from origin/emacs-29

bd5115e1347 Remove Eglot activation check from find-file-hook
adc04ad5247 * src/intervals.c (set_intervals_multibyte_1): Fix bug#61887
b3e930d328e Revert inadvertent change to lisp/icomplete.el in previou...
da8e4b6fe43 Revert previous change in go-ts-mode.el
7548446194a Release ERC 5.5
585faf4c173 ; More doc improvements for OClosures
2840895c1ae Don't create GUI frames in batch sessions
452b5ed1030 ; Fix wrong error name in erc-server-908 doc string.
1e9484f2fd1 ; * etc/ERC-NEWS: Mention more deprecations.
119b3a4dba1 Minor copyedits of documentation of OClosures
3a651773d29 Eglot: pay better attention to hints' paddingLeft/Right (...

# Conflicts:
# etc/NEWS

20 months ago* lisp/icomplete.el (icomplete-in-buffer): Make into a defcustom.
Sean Whitton [Sat, 4 Mar 2023 02:17:40 +0000 (19:17 -0700)]
* lisp/icomplete.el (icomplete-in-buffer): Make into a defcustom.

20 months agoRedirect eldoc messages to the mode-line when in edebug-mode
Dmitry Gutov [Sat, 4 Mar 2023 00:37:14 +0000 (02:37 +0200)]
Redirect eldoc messages to the mode-line when in edebug-mode

* lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Redirect
eldoc messages to the mode-line when in edebug-mode (bug#56459).
(eldoc-minibuffer--cleanup): New function, used in above.

20 months agoRevert "Revert "Don't disable eldoc when doing edebug""
Dmitry Gutov [Sat, 4 Mar 2023 00:27:35 +0000 (02:27 +0200)]
Revert "Revert "Don't disable eldoc when doing edebug""

This reverts commit 99df815c153265706edc839b7467fb3ae3b6e1b1.

20 months agoRemove Eglot activation check from find-file-hook
João Távora [Sat, 4 Mar 2023 00:09:32 +0000 (00:09 +0000)]
Remove Eglot activation check from find-file-hook

Adding eglot--maybe-activate-editing-mode to find-file-hook isn't
really necessary, since it is already in
'after-change-major-mode-hook', and that also runs every time we find
a file.

This reduces the number of project.el logic that runs every time the
user visits a file.

* lisp/progmodes/eglot.el (find-file-hook): No need to add
eglot--maybe-activate-editing-mode here.

20 months ago* src/intervals.c (set_intervals_multibyte_1): Fix bug#61887
Stefan Monnier [Sat, 4 Mar 2023 00:13:03 +0000 (19:13 -0500)]
* src/intervals.c (set_intervals_multibyte_1): Fix bug#61887

When `total_length` is 0 there should be no subtree at all, but
`delete_interval` only deletes one interval, so make sure we don't end
up with some stale child of `i`.

20 months agoRevert inadvertent change to lisp/icomplete.el in previous commit
João Távora [Fri, 3 Mar 2023 23:36:26 +0000 (23:36 +0000)]
Revert inadvertent change to lisp/icomplete.el in previous commit

The change

   commit 3a651773d29afb48ac4229cd19e532bd57a4ee2d
   Author: João Távora <joaotavora@gmail.com>
   Date:   Fri Mar 3 13:13:35 2023 +0000

       Eglot: pay better attention to hints' paddingLeft/Right (bug#61924)

Inadvertently added a line to this file, which shouldn't (yet) bet
added.

* lisp/icomplete.el (icomplete--vertical-minibuffer-setup): Remove
truncate-lines.

20 months agoRevert previous change in go-ts-mode.el
Yuan Fu [Fri, 3 Mar 2023 21:59:54 +0000 (13:59 -0800)]
Revert previous change in go-ts-mode.el

Reverts 59365f928565f1be551b1697b9246b00cb87a9b7 and
56cd810b9d1a4d537bee5a2fd954d6e0d346631a.

Reverting because the use of treesit-ready-p is very much intentional.

* lisp/progmodes/go-ts-mode.el (treesit-ready-p): Revert change.

20 months agoRelease ERC 5.5
F. Jason Park [Tue, 14 Feb 2023 07:27:50 +0000 (23:27 -0800)]
Release ERC 5.5

* doc/misc/erc.texi: Update ERCVER to 5.5.
* lisp/erc/erc.el: Increment main version header to 5.5.  Update
Compat version in package-requires header to 29.1.3.4.  Update
`customize-package-emacs-version-alist' entry by mapping ERC 5.5 to
Emacs 29.1.
(erc-version): Update value to 5.5.

20 months ago; More doc improvements for OClosures
Eli Zaretskii [Fri, 3 Mar 2023 19:44:54 +0000 (21:44 +0200)]
; More doc improvements for OClosures

* doc/lispref/functions.texi (OClosures):
* doc/lispref/commands.texi (Using Interactive):
* etc/NEWS: Some more docs improvements for OClosures.

20 months agoDon't create GUI frames in batch sessions
Jim Porter [Tue, 28 Feb 2023 19:35:21 +0000 (11:35 -0800)]
Don't create GUI frames in batch sessions

This resolves an issue with running test/lisp/server-tests.el when
'DISPLAY' is set: the tests would start the Emacs server in a batch
session, and then request a new GUI frame.  However, that caused the
tests to terminate with SIGIO, since a batch Emacs doesn't set a SIGIO
handler.

Ref: <https://lists.gnu.org/archive/html/emacs-devel/2023-02/msg00879.html>

* lisp/frame.el (make-frame): Always create a terminal frame in batch
sessions.

20 months ago; Fix wrong error name in erc-server-908 doc string.
F. Jason Park [Fri, 3 Mar 2023 07:37:06 +0000 (23:37 -0800)]
; Fix wrong error name in erc-server-908 doc string.

* lisp/erc/erc-sasl.el (erc-server-908): Correct well-known name for
908 numeric in doc string.
(erc--register-connection): Fold overlong line.

20 months ago; * etc/ERC-NEWS: Mention more deprecations.
F. Jason Park [Fri, 3 Mar 2023 07:33:28 +0000 (23:33 -0800)]
; * etc/ERC-NEWS: Mention more deprecations.

20 months agoMinor copyedits of documentation of OClosures
Eli Zaretskii [Fri, 3 Mar 2023 13:23:22 +0000 (15:23 +0200)]
Minor copyedits of documentation of OClosures

* doc/lispref/functions.texi (OClosures): Improve wording,
indexing, and markup; add details.

20 months agoEglot: pay better attention to hints' paddingLeft/Right (bug#61924)
João Távora [Fri, 3 Mar 2023 13:13:35 +0000 (13:13 +0000)]
Eglot: pay better attention to hints' paddingLeft/Right (bug#61924)

* lisp/progmodes/eglot.el (eglot--update-hints-1): Consider
:json-false, which is a non-nil value.

20 months agoRemove ineffective uses of condition-case
Mattias Engdegård [Fri, 3 Mar 2023 10:32:34 +0000 (11:32 +0100)]
Remove ineffective uses of condition-case

* lisp/gnus/message.el (message-setup-1):
* lisp/progmodes/cc-engine.el (c-forward-single-comment):
* lisp/progmodes/ruby-mode.el (ruby-add-log-current-method):
Eliminate uses of condition-case without handlers.  These seem to have
been there for quite a long time.  This change does not affect the
behaviour of the code and makes some warnings go away.

20 months agoMerge from origin/emacs-29
Stefan Kangas [Fri, 3 Mar 2023 05:30:12 +0000 (06:30 +0100)]
Merge from origin/emacs-29

9e105d483fa Fix c-ts-mode indentation for statement after preproc (bu...
a72a55e3e49 Fix c/c++-ts-mode's mode lighter
67befc1f5a5 Eglot: use shell-file-name in eglot--cmd (bug#61748)
1c7b2673bdd Avoid signaling errors in url-basic-auth when password is...
756225e3778 Fix wdired-tests on MS-Windows
a137f71c67e Improvements to xwidget on macOS (bug#60703)
3f43a16bc63 ; Avoid byte-compilation warning in c-ts-mode.el

20 months agoFix c-ts-mode indentation for statement after preproc (bug#61893)
Yuan Fu [Fri, 3 Mar 2023 03:59:11 +0000 (19:59 -0800)]
Fix c-ts-mode indentation for statement after preproc (bug#61893)

Originally our c-ts-mode--anchor-prev-sibling only specially handled
labeled_statements, now we add special case for preproc in the similar
fasion: instead of using the preproc directive as anchor, use the last
statement in that preproc as the anchor. Thus effectively ignore the
preproc.

There should be an accompanying test, but there are some problem in
the elif preproc directive indent so it would pass, we'll add the test
when that is fixed.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--anchor-prev-sibling): Add special case for preproc
directives.

20 months agoFix c/c++-ts-mode's mode lighter
Eli Zaretskii [Thu, 2 Mar 2023 19:34:22 +0000 (21:34 +0200)]
Fix c/c++-ts-mode's mode lighter

* lisp/progmodes/c-ts-mode.el (c-ts-mode-set-modeline): Remove
trailing blank from comment-start when indicating the comment
style on the mode line.

20 months agoFix `cond` miscompilation bug
Mattias Engdegård [Thu, 2 Mar 2023 08:56:59 +0000 (09:56 +0100)]
Fix `cond` miscompilation bug

This fixes a bug that miscompiled

  (cond ... C S1...Sn)

where S1...Sn are switch clauses (that can be compiled into a switch
op) and C a non-switch clause, by tucking on an extra copy of C at the
end.  This was a serious wrong-code bug when the condition of C had
side-effects; otherwise it was only a waste of time and space.

* lisp/emacs-lisp/bytecomp.el (byte-compile-cond): Fix.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test case.

20 months agoSmall unwind-protect optimisation improvement
Mattias Engdegård [Wed, 1 Mar 2023 18:37:52 +0000 (19:37 +0100)]
Small unwind-protect optimisation improvement

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Use the current for-effect mode when optimising the body form,
instead of always optimising it for value.

20 months agoEglot: use shell-file-name in eglot--cmd (bug#61748)
João Távora [Thu, 2 Mar 2023 13:27:14 +0000 (13:27 +0000)]
Eglot: use shell-file-name in eglot--cmd (bug#61748)

* lisp/progmodes/eglot.el (eglot--cmd): Use shell-file-name.

20 months agoTramp cleanup
Michael Albinus [Thu, 2 Mar 2023 12:54:14 +0000 (13:54 +0100)]
Tramp cleanup

* lisp/net/tramp.el (tramp-handle-unlock-file): Raise a warning
only when `create-lockfiles'.

* test/lisp/net/tramp-tests.el (tramp-test26-file-name-completion):
Extend test.

20 months agoFix bootstrap failure
Po Lu [Thu, 2 Mar 2023 12:44:47 +0000 (20:44 +0800)]
Fix bootstrap failure

* lisp/man.el (Man-prefer-synchronous-call): Fix version
specification.

20 months agoAvoid signaling errors in url-basic-auth when password is nil
Eli Zaretskii [Thu, 2 Mar 2023 12:35:15 +0000 (14:35 +0200)]
Avoid signaling errors in url-basic-auth when password is nil

* lisp/url/url-auth.el (url-basic-auth): Handle nil PASS.
Suggested by Ellis Kenyo <me@elken.dev>.  (Bug#61411)

20 months agoFix wdired-tests on MS-Windows
Eli Zaretskii [Thu, 2 Mar 2023 12:21:33 +0000 (14:21 +0200)]
Fix wdired-tests on MS-Windows

* test/lisp/wdired-tests.el (wdired-test-bug32173-01)
(wdired-test-bug32173-02, wdired-test-unfinished-edit-01)
(wdired-test-bug39280): Run test-dir through file-truename, to
avoid failures due to MS-Windows "numeric tails" (mis)feature and
similar issues, which make file names fail to compare 'equal'.
(wdired-test-bug34915, wdired-test-bug61510): Skip if symlinks
fail.