1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

166914 commits

Author SHA1 Message Date
Eli Zaretskii
4e8d579f3d Use 'emacs-lisp-compilation-mode' in native compilation buffers
Re-install this commit 40492581f9, now that source of
the recursive-load has been fixed (bug#64494).

* lisp/emacs-lisp/comp.el (comp-log-to-buffer)
(comp-run-async-workers): Use 'emacs-lisp-compilation-mode' in the
buffers where we log the results of native compilation.  Suggested
by No Wayman <iarchivedmywholelife@gmail.com>.  (Bug#64452)
2023-07-13 21:24:24 -04:00
Stefan Monnier
fcade74066 src/comp.c: Use pending_funcalls to fix bug#64494
Make sure `comp.el` is never loaded synchronously by simply
delaying all calls to `native--compile-async` via `pending_funcalls`.

* lisp/startup.el (comp--compilable, comp--delayed-sources): Don't declare.
(startup--require-comp-safely)
(startup--honor-delayed-native-compilations): Delete functions.
(normal-top-level): Don't call `startup--honor-delayed-native-compilations`.

* src/comp.c (maybe_defer_native_compilation): Use `pending_funcalls`.
(syms_of_comp): Delete `Vcomp__delayed_sources` and `comp__compilable`.
Define `Qnative__compile_async`.
2023-07-13 20:13:32 -04:00
Stefan Monnier
3ffb99f28f cl-print: Put buttons on ellipses
Currently, in *Backtrace* we have a nice behavior for cl-printed objects
where they're truncated by default to a manageable size but we can click
on the "..." to expand them when needed.

The patch below moves that functionality to `cl-print.el` such
that it can be enjoyed "everywhere" (bug#64536).  It also has the
benefit of simplifying the code since `backtrace.el` had to look for
ellipses in order to add buttons to them, whereas now we can put
the ellipses right when we write them.

* lisp/emacs-lisp/cl-print.el (cl-print-object-contents): Improve docstring.
(cl-print-expand-ellipsis-function): New var.
(cl-print--default-expand-ellipsis): New function.
(cl-print-expand-ellipsis): New command.
(cl-print-insert-ellipsis): Allow nil instead of 0 to mean "this elides
the whole object".
(cl-print-ellipsis): Move button type from `backtrace.el`.
(cl-print-propertize-ellipsis): Put a button.
(cl-print--expand-ellipsis): Rename from `cl-print-expand-ellipsis`.
(cl-print-to-string-with-limit): Allow new value t for `limit`.

* lisp/emacs-lisp/backtrace.el (backtrace--font-lock-keywords): Simplify.
(backtrace--match-ellipsis-in-string): Delete function.
(backtrace--change-button-skip): Adjust to new button type name.
(backtrace--expand-ellipsis): New function, extracted from
`backtrace-expand-ellipsis`.
(backtrace-expand-ellipsis): Delete function.
(backtrace-ellipsis): Move button type to `cl-print.el`.
(backtrace--print-to-string): Don't look for cl-print ellipses any more.
(backtrace-mode): Use `backtrace--expand-ellipsis`.

* lisp/ielm.el (ielm--expand-ellipsis): New function.
(inferior-emacs-lisp-mode): Use it to fill the data when expanded.

* test/lisp/emacs-lisp/cl-print-tests.el
(cl-print-tests-check-ellipsis-expansion)
(cl-print-tests-check-ellipsis-expansion-rx): Adjust to new internal
function name.
2023-07-13 19:00:51 -04:00
Spencer Baugh
ee4cc106b8 Don't recalculate the buffer basename inside uniquify
Previously, uniquify--create-file-buffer-advice would use the filename
of the buffer to calculate what the buffer's basename should be.  Now
that gets passed in from create-file-buffer, which lets us fix several
bugs:

1. before this patch, if a buffer happened to be named the same thing
as directory in its default-directory, the buffer would get renamed
with a directory separator according to uniquify-trailing-separator-p.

2. buffers with a leading space should get a leading |, as described
by create-file-buffer's docstring; before this patch, uniquify would
remove that leading |.

* lisp/dired.el (dired-internal-noselect): Pass a directory name to
create-file-buffer.
* lisp/files.el (create-file-buffer): Do uniquify-trailing-separator-p
handling if passed a directory filename. (bug#62732)
* lisp/uniquify.el (uniquify-item):
(uniquify-rationalize-file-buffer-names, uniquify-rationalize,
uniquify-get-proposed-name, uniquify-rationalize-conflicting-sublist):
Remove uniquify-trailing-separator-p handling.
(uniquify--create-file-buffer-advice): Take new basename argument and
use it, instead of recalculating the basename from the filename.
2023-07-13 17:50:56 -04:00
Paul Eggert
0cd519971d Port NaN, infinity handling better to VAX
Nowadays .elc files routinely contain tokens like 1.0e+INF and
0.0e+NaN that do not work on antiques like the VAX that lack IEEE fp.
Port Emacs to these platforms, by treating infinities as extreme
values and NaNs as strings that trap if used numerically.
* src/lread.c (INFINITY): Default to HUGE_VAL if non-IEEE.
(not_a_number) [!IEEE_FLOATING_POINT]: New static array.
(syms_of_lread) [!IEEE_FLOATING_POINT]: Initialize it.
(read0): Report invalid syntax for +0.0e+NaN on platforms
that lack NaNs.
(string_to_number): On non-IEEE platforms, return HUGE_VAL
for infinity and a string for NaN.  All callers changed.
2023-07-13 14:43:03 -07:00
Juri Linkov
b94e7e6334 * lisp/help-mode.el (help-setup-xref): Disable outline-minor-mode (bug#64575). 2023-07-13 19:38:36 +03:00
Spencer Baugh
e5be6c7ae3 Fix flymake mode line scrolling with pixel-scroll-precision-mode
When pixel-scroll-precision-mode is enabled, scrolling the mouse
wheel will yield wheel-{up,down} events.  Flymake now binds the
new events in addition to the old mouse-wheel-{up,down}-event.

* lisp/progmodes/flymake.el:(flymake--mode-line-counter-scroll-prev)
(flymake--mode-line-counter-scroll-next)
flymake--mode-line-counter-map): New.
(flymake--mode-line-counter): Use new keymap and include
'flymake--diagnostic-type' as a property in the mode-line.
(Bug#64428)
2023-07-13 16:58:15 +03:00
Robert Pluim
488dc24d2a Prevent tex-shell buffer from reusing same window
* lisp/window.el (display-tex-shell-buffer-action): Add
'inhibit-same-window' to the default action.
2023-07-13 15:37:16 +02:00
Robert Pluim
587efce9fa Autodetect coding system when yanking media
Some browers send eg 'text/html' selections formatted as UTF-8, but
with a type of STRING, which actually means iso-latin-1.  Autodetect
the correct coding system to use by calling 'gui-get-selection'.

* lisp/yank-media.el (yank-media--get-selection): Call
'gui-get-selection' instead of 'gui-backend-get-selection'.
2023-07-13 15:37:16 +02:00
Eshel Yaron
e0244f5804 ; * lisp/progmodes/project.el (project-current): Doc fix.
Avoid saying that 'project-current' asks specifically for a
directory, as it can also ask for a project's directory by other
identifiers, such as the project's name, when 'project-prompter'
is set to a different value than the default
'project-prompt-project-dir'.  (Bug#64266)
2023-07-13 09:14:28 +03:00
Po Lu
d861de7228 Minor correction to X error handling
* src/xterm.c (x_error_handler): Clear fail->selection_serial
after reporting an error during selection transfer, in case any
other outstanding requests within the protected section also
report errors.
2023-07-12 18:07:53 +08:00
Po Lu
82edb3fdb0 Improve commentary
* src/xterm.c (x_ignore_errors_for_next_request): Reword
description of SELECTION_SERIAL.
2023-07-12 18:04:03 +08:00
João Távora
bc1e7b9b8e Eglot: fix advertisement of textDocument.codeAction.resolveSupport
See https://github.com/joaotavora/eglot/issues/1255.

* lisp/progmodes/eglot.el (eglot-client-capabilities):
Use correct format for textDocument.codeAction.resolveSupport.
2023-07-12 10:16:26 +01:00
Michael Albinus
04710bd01b ; * doc/misc/eshell.texi (Invocation): Whitespace cleanup. 2023-07-11 12:18:31 +02:00
Bill Wohler
112e71914a Fix Wrong type argument: consp, nil error
* lisp/mh-e/mh-folder.el (mh-update-sequences): Add cur sequence when
missing
2023-07-10 20:50:59 -07:00
Bill Wohler
a92ee5ca3c Fix mh-show-msg: Symbol’s value as variable is void: mh-mm-inline-media-tests
* lisp/mh-e/mh-show.el: Require mh-mime
2023-07-10 20:50:41 -07:00
João Távora
3b7273f4ae Eglot: add support for :codeAction/resolve
See https://github.com/emacs-grammarly/eglot-grammarly/issues/7.

* lisp/progmodes/eglot.el (eglot--lsp-interface-alist): Augment
CodeAction type.
(eglot-execute): Consider :codeAction/resolve
(eglot-client-capabilities): Advertise
textDocument.codeAction.resolveSupport
2023-07-11 00:09:20 +01:00
Jim Porter
a6e88dc726 Add support for explicitly-remote commands in Eshell
* lisp/files.el (file-remote-p):
* doc/lispref/files.texi (Magic File Names): Document 'never' for
CONNECTED argument.

* lisp/net/tramp.el (tramp-handle-file-remote-p): Handle CONNECTED
value of 'never'.

* lisp/eshell/esh-ext.el (eshell-explicit-remote-commands): New
option.
(eshell-ext-initialize): Apply 'eshell-handle-remote-command' when
requested.
(eshell-handle-remote-command): New function.
(eshell-remote-command): Reimplement this function and dispatch to
'eshell-external-command', which can handle remote processes on its
own.

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

* doc/misc/eshell.texi (Remote Access): Document explicitly-remote
commands.

* etc/NEWS: Announce this change.
2023-07-10 12:27:09 -07:00
Jim Porter
438921161a Add documentation about remote access in Eshell
* doc/misc/eshell.texi
(Invocation): Mention the '*' prefix.
(Remote Access): New section...
(Commands): ... link to it.
2023-07-10 12:27:09 -07:00
Juri Linkov
d8238df35a * lisp/progmodes/project.el (project-prompt-project-name): Fix order.
Reverse choices in this recently added new command to follow exactly
the same order as in the old function 'project-prompt-project-dir'.
2023-07-10 20:43:13 +03:00
Paul Eggert
845ff9563d Further simplify configure-time locale testing
* configure.ac (gl_STDLIB_H): Replace this, not gt_LOCALE_FR_UTF8,
as this lets us also omit MB_CUR_MAX checking that will never be
executed, and also lets us remove testing for ecvt, fcvt, gcvt
that Emacs doesn’t need.
(AC_C_RESTRICT): Invoke explicitly, as Emacs uses ‘restrict’
directly.  Also, simplifies the replacement for gl_STDLIB_H, which
would otherwise need to AC_REQUIRE AC_C_RESTRICT.
* lib/gnulib.mk.in: Regenerate via admin/merge-gnulib.
2023-07-10 09:55:58 -07:00
Michael Albinus
31cae9d9d6 Adapt Tramp test
* test/lisp/net/tramp-tests.el (tramp-test33-environment-variables):
Adapt test.
2023-07-10 18:11:24 +02:00
Mattias Engdegård
d1a2c2edc2 ; * lisp/subr.el (with-demoted-errors): warning message typo 2023-07-10 17:42:14 +02:00
João Távora
b56f46c9de Eglot: fix eglot--sig-info again
See https://github.com/joaotavora/eglot/issues/1253

* lisp/progmodes/eglot.el (eglot--sig-info): Fall back to regexp
technique if no parameters or poor parameter information.
2023-07-10 14:06:42 +01:00
João Távora
d0f65fbdbb Eglot: fix eglot--sig-info
See https://github.com/joaotavora/eglot/issues/1253

* lisp/progmodes/eglot.el (eglot--sig-info): Fix.
2023-07-10 13:09:48 +01:00
Paul Eggert
b76878cfab Simplify ‘configure’ check for MB_CUR_MAX
* admin/merge-gnulib: Remove m4/locale-fr.m4.
* configure.ac (gt_LOCALE_FR_UTF8): Replace Gnulib’s
definition with a near no-op, as Emacs doesn’t care
about the Solaris 10 MB_CUR_MAX bug.
* lib/gnulib.mk.in: Regenerate.
* m4/locale-fr.m4: Remove; no longer needed due
to above changes.
2023-07-09 13:45:13 -07:00
Paul Eggert
c3cfada3c0 Update from Gnulib by running admin/merge-gnulib 2023-07-09 13:45:13 -07:00
Stefan Monnier
9c282faf26 cl-print.el: Reduce code duplication
While at it, fix a bug in `cl-print-object-contents` for strings,
where we forgot to pass `stream` to `princ` at one place and simplify
a `substring` call using a negative offset.

* lisp/emacs-lisp/cl-print.el (cl-print--cons-tail)
(cl-print--vector-contents, cl-print--struct-contents)
(cl-print--string-props): New functions, extracted from
`cl-print-object-contents`.
(cl-print-object, cl-print-object-contents): Use them.
2023-07-08 20:19:02 -04:00
Basil L. Contovounesios
afa4fa1723 ; Re-add recently removed comment in cyrillic.el.
https://lists.gnu.org/r/emacs-devel/2023-07/msg00303.html
2023-07-08 22:27:20 +01:00
Jim Porter
e074081af3 Add special '$GID' variable in Eshell
See bug#64529.

* lisp/eshell/esh-var.el (eshell-variable-aliases-list): Add '$GID'.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/gid-var): New test.

* doc/misc/eshell.texi (Variables): Document '$GID'.

* etc/NEWS: Announce this change (and the previous change for '$UID').
2023-07-08 12:19:29 -07:00
Jim Porter
8c5fef4eb3 ; * doc/misc/eshell.texi: Fix last change. 2023-07-08 12:13:22 -07:00
Stefan Monnier
1b7c9ecc8f pp-fill: Fix missing indentation in some cases
* lisp/emacs-lisp/pp.el (pp-fill): Improve handling of char-tables.
(pp-buffer): Improve backward compatibility.
2023-07-08 15:10:23 -04:00
Stefan Monnier
d082b26364 * lisp/menu-bar.el (menu-bar-search-options-menu): Don't quote lambdas
Expose the commands to the compiler.
2023-07-08 15:08:10 -04:00
Basil L. Contovounesios
05984303a5 ; Simplify last change to cyrillic.el.
https://lists.gnu.org/r/emacs-devel/2023-07/msg00297.html
2023-07-08 17:51:58 +01:00
Vladimir Sedach
44c9293ddd ; * test/lisp/shell-tests.el: Add tests for shell-dirtrack-mode (bug#64311) 2023-07-08 19:30:06 +03:00
Basil L. Contovounesios
8ffe8422c5 Minor tree-sitter cleanups
* lisp/treesit.el (treesit-fontify-with-override): Fix docstring
grammar.  Remove redundant precondition (bug#64052).
* src/treesit.c (Ftreesit_parser_set_included_ranges): Fix typo in
commentary.
(treesit_predicate_equal, treesit_predicate_match)
(treesit_predicate_pred): Avoid fixnum roundtrip by using
list_length in place of Flength.  Make error messages more accurate.
(treesit_eval_predicates): Quote predicate names in error message.
2023-07-08 17:05:05 +01:00
Basil L. Contovounesios
ac57358762 Minor search_buffer cleanup
* src/search.c: Move commentary that used to precede search_buffer
to that location once more.  Update it for the current arglist.
(search_command, search_buffer_non_re, search_buffer):
* src/lisp.h (search_buffer): Turn RE flag/argument from an int into
a bool.  All callers changed (bug#64049).
2023-07-08 16:35:09 +01:00
Basil L. Contovounesios
1a9d454ebf ; Fix last change to lisp/language/cyrillic.el.
For discussion, see the following emacs-devel thread:
https://lists.gnu.org/r/emacs-devel/2023-07/msg00221.html
2023-07-08 16:24:15 +01:00
Michael Albinus
eedb711118 Rearrange setting date and modes in Tramp
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Set date
and modes if appropriate.
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band): Do not set date and modes.
2023-07-08 16:48:20 +02:00
Eli Zaretskii
0a35c991c1 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2023-07-08 16:43:37 +03:00
Basil L. Contovounesios
4c2cc21354 Fix condition-case-unless-debug with :success
* lisp/subr.el (condition-case-unless-debug): Don't add debug
condition to :success handler (bug#64404).
* test/lisp/subr-tests.el (condition-case-unless-debug)
(condition-case-unless-debug-success): New tests.
2023-07-08 12:14:57 +01:00
Spencer Baugh
567258ab43 Mention minibuffer-next-completion in completion-help
Now that it's not necessary to switch to the *Completions* buffer to
switch between and choose completions, we should make that clear in
the help text.  Let's also make the bindings uniform both in and
outside the *Completions* buffer so users don't have to think about
the difference.

In working with new users, they've assumed that since the help text in
*Completions* says "Click on a completion to select it", that that's
the only way to select a completion.  This text should help clarify
that.

* doc/emacs/mini.texi (Completion Commands): Document new bindings.
* lisp/simple.el (completion-list-mode-map): Bind
minibuffer-{next,previous,choose}-completion.
(completion-setup-function): Mention bindings for
minibuffer-{next,previous,choose}-completion. (Bug#64425)
2023-07-08 12:52:21 +03:00
Eli Zaretskii
375dac936f Merge from origin/emacs-29
600b90ed56 Mark failing icalendar test as unstable (bug#56241)
f8a918c977 ; * src/coding.c (Fcoding_system_put): Improve doc string.
40f84e906f ; * doc/lispref/keymaps.texi (Key Binding Commands): Fix ...
502a780031 ; Improve documentation of 'vertical-motion' in ELisp manual
0d90873fa4 ; * src/indent.c (Fvertical_motion): Doc fix.
9b38773a20 ; * lisp/dired.el (dired-no-confirm): Doc fix.  (Bug#64493)
a30ebe7a55 ; Improve documentation of key-binding commands
c3fefb2b3a Improve natnump shortdoc
244d4c837a correct info documentation of benchmark-call
67def1f550 * lisp/progmodes/grep.el (rgrep): Fix docstring.
8da2091362 ; Fix documentation of minibuffer-completion commands
aa030698ce ; Fix typos in documented names of keymap-* functions
a9b46bb25d Include a help-echo for flymake's modeline counters
37ed3d15f3 Avoid errors in completion due to 'completion-regexp-list'
15ff876177 ; * lisp/register.el (register-val-describe): Doc fix.
fe7b909c16 ; Fix two typos in recent changes in the manual
7a74b8c327 C Mode: Don't fontify foo globally as type due to "struct...
823bf6bdb1 * lisp/rect.el (rectangle--duplicate-right): Fix rectangl...
e339d0080d ; * test/lisp/misc-tests.el (ert): require misc to avoid ...

# Conflicts:
#	lisp/rect.el
2023-07-08 05:46:10 -04:00
Martin Rudalics
aad13e61db Fix 'toggle-side-windows' with 3 or more side windows
* lisp/window.el (window--state-put-1): Consider
'window-combined-p' when determining 'window-combination-limit'.
(window-state-put): Bind 'window-combination-limit' and
'window-combination-resize' to nil.  (Bug#64405)
2023-07-08 12:03:55 +03:00
Eli Zaretskii
a19beb4ad4 ; Fix last change. 2023-07-08 11:48:12 +03:00
Eli Zaretskii
bb4b511c4c * etc/NEWS: Document changes to coding-system mnemonics. 2023-07-08 11:47:32 +03:00
Ulrich Müller
6c3e65a75f Disambiguate mode line indication for utf-8 and utf-16
* lisp/international/mule-conf.el (utf-7):
* lisp/language/cyrillic.el (koi8-u): Change mnemonic letters to
?u and ?\N{cyrillic capital letter u}, respectively.
2023-07-08 11:32:23 +03:00
Vladimir Sedach
25f35957c9 Fix 'shell-dirtrack-mode' showing as enabled in unrelated buffers
* lisp/shell.el (shell-dirtrack-mode): Reverse the alias.
(shell-dirtrack-mode): Move before first use of the variable.  Add
:interactive keyword.
(shell-directory-tracker, shell-cd): Use 'shell-dirtrack-mode'
instead of 'shell-dirtrackp'.  (Bug#64311)
2023-07-08 11:27:31 +03:00
Stefan Monnier
a9420c89da Avoid aborts when trying to 'read' sub-char-tables
* src/data.c (Ftype_of): Support 'sub-char-table'.  (Bug#64450)
* src/lisp.h: Fix commentary of char-table.
2023-07-08 11:12:54 +03:00
Jim Porter
118582efb3 ; * doc/misc/eshell.texi: Fix typos and clean up unclear wording. 2023-07-07 22:56:44 -07:00