1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-27 07:41:28 -08:00
Commit graph

179289 commits

Author SHA1 Message Date
Spencer Baugh
63662f6cee Signal end-of-file with more correct data
end_of_file_error previously always signaled end-of-file with
load-true-file-name if that was non-nil (and a string).
However, this might be the wrong thing to do; for example, if a
file being loaded calls read on a buffer.

* src/lread.c (end_of_file_error): <source>: New argument; check
it to determine what data to signal with.  (bug#68546)
(read_char_escape, read_char_literal, read_string_literal)
(skip_space_and_comments, read0): Pass source to
end_of_file_error.
2025-08-19 17:00:03 +01:00
Gerd Möllmann
ab577467e4 ; Revert last change in eglot
* lisp/progmodes/eglot.el (eglot--managed-mode):
Use revert-buffer-in-progress-p again.
2025-08-19 14:43:58 +02:00
Gerd Möllmann
e92da50e05 ; Pacify byte-compiler
* lisp/progmodes/eglot.el (eglot--managed-mode): Use
revert-buffer-in-progress instead of
revert-buffer-in-progress-p.
* lisp/vc/vc-hooks.el (vc-dir-resynch-file): Declare some
functions.
2025-08-19 13:05:00 +02:00
Philipp Stephani
d40c754929 Clarify that sequence/map functions don't alter their argument
* lisp/emacs-lisp/seq.el (seq-sort, seq-sort-by, seq-reverse)
(seq-concatenate, seq-into-sequence, seq-into, seq-filter, seq-remove)
(seq-remove-at-position, seq-reduce, seq-find, seq-uniq, seq-mapcat)
(seq-partition, seq-union, seq-intersection, seq-difference)
(seq-group-by, seq-split, seq-keep):
* lisp/emacs-lisp/map.el (map-filter, map-remove, map-merge)
(map-merge-with): Clarify that these functions don't modify their
sequence/map arguments.
2025-08-19 11:11:51 +02:00
Juri Linkov
4204a9572a ; * lisp/vc/vc.el (vc--maybe-read-remote-location): Fix args of read-string. 2025-08-19 09:48:29 +03:00
Philipp Stephani
8747657dd8 Catch all non-local exits when running ERT tests.
See discussion in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76447.

* lisp/emacs-lisp/ert.el (ert--run-test-internal): Catch all non-local
exits in 'handler-bind'.
2025-08-18 11:24:29 +02:00
Juri Linkov
bf652e6844 Silence byte-compile warnings when treesit is not available
* lisp/progmodes/c-ts-mode.el:
* lisp/progmodes/cmake-ts-mode.el:
* lisp/progmodes/csharp-mode.el:
* lisp/progmodes/dockerfile-ts-mode.el:
* lisp/progmodes/elixir-ts-mode.el:
* lisp/progmodes/go-ts-mode.el:
* lisp/progmodes/heex-ts-mode.el:
* lisp/progmodes/java-ts-mode.el:
* lisp/progmodes/js.el:
* lisp/progmodes/json-ts-mode.el:
* lisp/progmodes/lua-ts-mode.el:
* lisp/progmodes/php-ts-mode.el:
* lisp/progmodes/ruby-ts-mode.el:
* lisp/progmodes/rust-ts-mode.el:
* lisp/progmodes/sh-script.el:
* lisp/progmodes/typescript-ts-mode.el:
* lisp/textmodes/css-mode.el:
* lisp/textmodes/markdown-ts-mode.el:
* lisp/textmodes/mhtml-ts-mode.el:
* lisp/textmodes/toml-ts-mode.el:
* lisp/textmodes/yaml-ts-mode.el:
Declare 'treesit-major-mode-remap-alist' and
'treesit-language-available-p' to silence warnings
that are false alarms.  Also improve docstrings.
2025-08-18 09:49:36 +03:00
Stefan Monnier
888dc2a0b5 Reject invalid error symbols (Bug#76447)
* src/eval.c (signal_or_quit): Signal an error if 'signal' gets called
with an invalid error symbol.
2025-08-17 17:26:09 +02:00
JD Smith
1f4e2e8264 Adapt tramp to new autoload-macro expand
Bug #78995.

* lisp/net/tramp-compat.el (tramp-loaddefs): suppress error on requiring
tramp-loaddef.
* lisp/net/tramp.el (tramp--with-startup): declare autoload-macro
expand, and suppress warnings about this declare form on older versions
of Emacs.
2025-08-17 11:17:34 -04:00
Sean Whitton
da3973b657 VC: New commands for incoming and outgoing fileset diffs
* lisp/vc/vc.el (vc-fileset-diff-incoming)
(vc-fileset-diff-outgoing): New commands.
(vc-root-diff-incoming): Refactor to call
vc-fileset-diff-incoming.
(vc-root-diff-outgoing): Refactor to call
vc-fileset-diff-outgoing.
* lisp/vc/vc-hooks.el (vc-incoming-prefix-map)
(vc-outgoing-prefix-map): Bind the new commands.
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Document the new commands.
2025-08-17 11:36:30 +01:00
Sean Whitton
70b5ad0192 Delete duplicate bindings of default-directory
* lisp/vc/vc.el (vc-root-version-diff, vc-diff-mergebase)
(vc-root-diff-incoming, vc-root-diff-outgoing, vc-root-diff):
Delete duplicate bindings of default-directory.
vc--with-backend-in-rootdir already establishes bindings.
2025-08-17 11:36:30 +01:00
Sean Whitton
6f7e795ce1 vc--maybe-read-remote-location: Don't return a list
* lisp/vc/vc.el (vc--maybe-read-remote-location): Return an atom.
(vc-root-diff-incoming, vc-root-diff-outgoing, vc-log-incoming)
(vc-log-outgoing): Wrap call to 'vc--maybe-read-remote-location'
in a call to 'list'.
2025-08-17 11:36:30 +01:00
Michael Albinus
6979bce0b2 Suppress Tramp session timeout if buffer is modified
* doc/misc/tramp.texi (Predefined connection information): A session
timeout is suppressed if there is a modified buffer, or a buffer
under auto-revert.
(Traces and Profiles): Tramp messages are written to the *Messages*
buffer when level is less than or equal to 3.

* lisp/net/tramp-sh.el (tramp-timeout-session): Do not timeout
when buffer is modified, or in auto-revert mode.

* test/lisp/net/tramp-tests.el (tramp-test48-session-timeout):
Extend test.
2025-08-17 11:19:01 +02:00
Sean Whitton
23b766b503 ; Fix last change: change let*' to let'. 2025-08-16 20:42:25 +01:00
Sean Whitton
72022459a9 vc-hg-checkin-patch: Fix on MS-Windows, make 'hg import' async
* lisp/vc/vc-hg.el (vc-hg--checkin): New function to do the work
of vc-hg-checkin and vc-hg-checkin-patch.
(vc-hg-checkin): Replace body with call to vc-hg--checkin.
(vc-hg-checkin-patch): Likewise.  As compared with the old
implementation, this change (i) fixes encoding issues when
checking in patches on MS-Windows; and (ii) when
vc-async-checkin is non-nil, runs 'hg import' asynchronously
instead of running 'hg update' asynchronously (bug#79235).
2025-08-16 20:40:50 +01:00
Eli Zaretskii
f8cb751ac0 vc-hg-known-other-working-trees: Fix on MS-Windows
* lisp/vc/vc-hg.el (vc-hg-known-other-working-trees): Use
expand-file-name to convert paths from .hg/sharedpath files.
2025-08-16 19:40:44 +01:00
João Távora
85dcf4fe96 Flymake: improve previous fix (bug#78862)
The previous fix for this bug is an acceptable approach, but
more care must be taken when clearing a flymake--state object's
diagnostics.  Refactor this behaviour into a helper.

* lisp/progmodes/flymake.el (flymake--clear-state): New helper.
(flymake--publish-diagnostics, flymake-start): Use it.
2025-08-16 18:46:25 +01:00
Sean Whitton
d4c9f08f26 vc-test--with-author-identity: Handle Mercurial
* test/lisp/vc/vc-tests/vc-tests.el (vc-hg-global-switches):
Declare.
(vc-test--with-author-identity): Handle Mercurial.
2025-08-16 14:12:04 +01:00
Sean Whitton
78d569e524 * lisp/vc/vc-hg.el (vc-hg-checkin): Fix on MS-Windows (bug#79024). 2025-08-16 14:12:04 +01:00
Sean Whitton
18b87fab35 ; vc-git-command, vc-hg-command: Comments about MS-Windows encoding. 2025-08-16 12:58:22 +01:00
Eli Zaretskii
eb8d0d7afe Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2025-08-16 14:41:41 +03:00
Eli Zaretskii
4983985b80 ; Fix last change (bug#77544)
* lisp/whitespace.el (whitespace-style): Bump :version.  Doc fix.
(whitespace-page-delimiter): Add :version.
(whitespace-page-delimiters-mode): Doc fix.
2025-08-16 14:40:39 +03:00
Michael Albinus
3516479b58 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2025-08-16 13:37:04 +02:00
Michael Albinus
25380c8e14 Merge from origin/emacs-30
964741d40e * lisp/net/tramp-sh.el (tramp-get-remote-touch): Simplify.
6a018a2d7e Improve use of "touch" in Tramp
2025-08-16 13:35:53 +02:00
Michael Albinus
cb32d5ef59 ; Merge from origin/emacs-30
The following commit was skipped:

4a3b6daf76 Sync with Tramp 2.7.4-pre
2025-08-16 13:35:52 +02:00
Michael Albinus
4cb84d3a78 Merge from origin/emacs-30
f8a206937c executable-interpret: Handle remote file names
c17168ebed ; * admin/make-tarball.txt: Fix typo and add details.
2025-08-16 13:35:50 +02:00
Michael Albinus
8a6fdffed2 ; Merge from origin/emacs-30
The following commit was skipped:

34f35407eb Bump Emacs version to 30.2.50
2025-08-16 13:35:48 +02:00
Michael Albinus
8700cd24ca Merge from origin/emacs-30
636f166cfc ; * make-dist: Include ELisp hierarchy diagram in tarball...
2025-08-16 13:35:47 +02:00
Michael Albinus
cf45a3fd79 ; Merge from origin/emacs-30
The following commit was skipped:

1514695b7d ; Update lisp/ldefs-boot.el.  Do not merge to master.
2025-08-16 13:35:45 +02:00
Michael Albinus
ea1157f68f Merge from origin/emacs-30
8960e3af81 Update files for Emacs 30.2
ebeca61755 * admin/admin.el (set-version): Fix handling of official ...
2025-08-16 13:35:43 +02:00
Michael Albinus
6d95df628c ; Merge from origin/emacs-30
The following commit was skipped:

8ddef0ad4d Bump Emacs version
2025-08-16 13:35:42 +02:00
Michael Albinus
839f416de7 Merge from origin/emacs-30
49d64bfb1a ; * etc/NEWS: Update for Emacs 30.2.
4b90b6e7ce ; * lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Doc fi...
2025-08-16 13:35:00 +02:00
Elías Gabriel Pérez
997461f484 whitespace-mode: New style to prettify page delimiters characters.
This new style for 'whitespace-style' displays the page
delimiter characters "^L" as pretty horizontal lines.  (Bug#77544)

This also add a new minor mode to toggle these visualization.

* lisp/whitespace.el (whitespace-style): Add page-delimiters
option.
(whitespace-page-delimiter): New face.
(whitespace--page-delimiters-keyword): New variable.
(whitespace-page-delimiters-mode): New minor mode.
(whitespace-style-face-p, whitespace-color-on): Rework for
display the page-delimiters.
2025-08-16 14:34:10 +03:00
Eli Zaretskii
5124157263 ; * lisp/minibuffer.el (completion-eager-update): Doc fix. 2025-08-16 14:28:42 +03:00
Spencer Baugh
4d90bdb385 Add support for updating *Completions* as you type
Add support for updating the *Completions* buffer as you type,
controlled by a new completion metadata symbol 'eager-update'
and a new defcustom 'completion-eager-update'.

You can configure a completion category to update *Completions*
as you type by setting 'completion-category-overrides'
appropriately; or set 'completion-eager-update' to t to always
update *Completions* as you type.

This is similar to the recently added 'completion-eager-display'.

* lisp/minibuffer.el (completion-eager-update): Add new
defcustom defaulting to 'auto.  (Bug#77649)
(completion--eager-update-p, completions--background-update)
(completions--post-command-update): Add.
(completions--after-change): Call
'completions--post-command-update' via 'post-command-hook'.
(minibuffer-completion-help): Check 'completion-eager-update'
and install 'completions--after-change'.
(completion-help-at-point): Call 'completion--eager-update-p'
if ONLY-IF-EAGER is non-nil.
* etc/NEWS: Announce completion-eager-update.  Reword the
announcement of 'completion-eager-display' for consistency.
2025-08-16 14:23:26 +03:00
Michael Albinus
964741d40e * lisp/net/tramp-sh.el (tramp-get-remote-touch): Simplify. 2025-08-16 12:59:06 +02:00
Toru TSUNEYOSHI
6a018a2d7e Improve use of "touch" in Tramp
* lisp/net/tramp-sh.el (tramp-get-remote-touch): Set connection
property "touch-h".
(tramp-sh-handle-set-file-times): Use it.
2025-08-16 12:56:09 +02:00
Manuel Giraud
cc37d199b0 Handle 'lexical-binding' cookie in nnrss output
* lisp/gnus/nnrss.el (nnrss-save-server-data)
(nnrss-save-group-data): Add a 'lexical-binding' cookie.
* lisp/gnus/nnrss.el (nnrss-read-server-data)
(nnrss-read-group-data): Allow missing 'lexical-binding' cookie.
(Bug#79199)
2025-08-16 13:49:19 +03:00
Eli Zaretskii
034d755f2f ; * src/process.c (set_proc_thread): Fix assertion. 2025-08-16 13:28:52 +03:00
Michael Albinus
4a3b6daf76 Sync with Tramp 2.7.4-pre
* doc/misc/trampver.texi:
* lisp/net/trampver.el (tramp-version): Adapt Tramp versions.

* lisp/net/tramp-cmds.el (tramp-cleanup-connection):
Use read syntax #' for `tramp-timeout-session',

* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
Set "connected" property in time.

* lisp/net/tramp-sh.el (tramp-timeout-session):
Add ;;;###tramp-autoload cookie.

* lisp/net/tramp.el (tramp-barf-if-file-missing): Do not raise an
error when not connected.  (Bug#78572)
(tramp-file-name-handler): Do not force the backtrace.
(tramp-connectable-p): Check also, whether initial handshake is finished.
(tramp-skeleton-directory-files)
(tramp-skeleton-directory-files-and-attributes)
(tramp-skeleton-set-file-modes-times-uid-gid): Rearrange sending
`file-missing' error.
(tramp-handle-access-file, tramp-handle-unlock-file):
Use `tramp-connectable-p'.
(tramp-skeleton-file-name-all-completions): Filter out "" hits.
(Bug#79173)

* test/lisp/net/tramp-tests.el (project-mode-line-format)
(project-mode-line): Declare.
(tramp-test48-session-timeout): New test.
(tramp-test49-auto-load, tramp-test49-delay-load)
(tramp-test49-recursive-load, tramp-test49-remote-load-path)
(tramp-test50-without-remote-files, tramp-test51-unload): Rename.
2025-08-16 12:26:19 +02:00
Eli Zaretskii
9985e71eb7 ; Stabilize a Windows-specific process-test
* test/src/process-tests.el (process-sentinel-interrupt-event):
Improve stability of results, and show all of the results.
2025-08-16 13:11:19 +03:00
Eli Zaretskii
c93be71e45 Make sure 'make-process' locks the process to the current thread
* src/process.c (set_proc_thread): New function.
(Fset_process_thread, create_process): Use it.
2025-08-16 13:01:01 +03:00
Spencer Baugh
37325ed5a9 Zero fd_callback_info when deleting an fd
.waiting_thread and .thread could be left set to non-NULL values
in a deleted fd_callback_info entry.  These would never be
cleared by e.g. clear_waiting_thread_info since that only clears
fd_callback_info entries up to max_desc.  Clear fd_callback_info
entirely when deleting an entry.

* src/process.c (clear_fd_callback_data): Add.
(delete_write_fd, delete_keyboard_wait_descriptor): Call
clear_fd_callback_data. (bug#79201)
(delete_read_fd): Remove duplicated clearing code.
(deactivate_process): Remove duplicate recompute_max_desc.
2025-08-16 12:51:35 +03:00
Eli Zaretskii
406140df33 ; Skip a process-test that is unreliable on MS-Windows
* test/src/process-tests.el
(process-tests/multiple-threads-waiting): Skip on MS-Windows.
2025-08-16 12:04:59 +03:00
john muhl
ff05a689e3 (diff--font-lock-prettify): Fix fringe width test
* lisp/vc/diff-mode.el (diff--font-lock-prettify):
Use 'window-fringes' instead of the 'left-fringe' frame parameter
since the former returns an integer on both GUI and TTY frames.
2025-08-16 04:59:49 -04:00
Eli Zaretskii
01e351de60 Reject non-nil non-number REPEAT in 'run-with-timer'
* lisp/emacs-lisp/timer.el (run-at-time, run-with-timer): Reject
non-nil REPEAT if it is not a non-negative number.  (Bug#79227)
Doc fixes.

* test/lisp/emacs-lisp/timer-tests.el (timer-test-repeat-arg): New
test.
2025-08-16 10:53:12 +03:00
Matthew Tromp
2987022976 Delete overlays from Flymake backends that no longer exist
Fix for bug#78862: previously, when starting eglot, existing flymake
diagnostics in the buffer would persist until flymake was completely
restarted (like by running 'flymake-mode' twice).  This change adds
logic to 'flymake-start' to delete all diagnostics and their overlays
from any backend that is no longer in 'flymake-diagnostic-functions'.
* lisp/progmodes/flymake.el (flymake-start): Remove overlays from
backends that no longer exist.
2025-08-15 17:46:42 +03:00
Eli Zaretskii
764999bd8d ; * lisp/register.el (register-alist, jump-to-register): Doc fix (bug#79243). 2025-08-15 17:40:46 +03:00
Eli Zaretskii
46b22304b0 Update description of buffer-in-register
* doc/lispref/text.texi (Registers): Update register-in-buffer
form.  (Bug#79243)
2025-08-15 13:46:40 +03:00
Juri Linkov
d99354720b ; * test/infra/Dockerfile.emba: Fix warning about casing not matching. 2025-08-14 20:59:15 +03:00