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

179178 commits

Author SHA1 Message Date
Michael Albinus
1fc4bb1fea Rename variables *-in-progress-p to *-in-progress
* doc/lispref/backups.texi (Reverting): Fix variable names
revert-buffer-in-progress and auto-revert-buffer-in-progress.

* etc/NEWS: Fix variable names revert-buffer-in-progress and
auto-revert-buffer-in-progress.
Presentational fixes and improvements.

* lisp/autorevert.el (auto-revert-buffer-in-progress): Rename.
(auto-revert-handler, auto-revert-buffer): Use renamed variables.

* lisp/dired-x.el (dired-omit-expunge):
Use `auto-revert-buffer-in-progress'.

* lisp/files.el (revert-buffer-in-progress): Rename.
(revert-buffer-in-progress-p): Declare obsolete.
(after-find-file, revert-buffer):
* lisp/saveplace.el (save-place-find-file-hook)
(save-place-dired-hook):
* lisp/vc/vc-git.el (vc-git-command, vc-git--out-ok):
* lisp/vc/vc.el (vc-diff-internal):
Use `revert-buffer-in-progress'.

* lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered): Suppress warning.
2025-08-09 14:21:23 +02:00
Eli Zaretskii
5c8234e3e7 ; * etc/NEWS: Fix last change (bug#79047). 2025-08-09 13:43:38 +03:00
Elías Gabriel Pérez
e4352c7a45 Add multi-character pairs to lua-ts-mode and texinfo-mode
* etc/NEWS: Add entry for lua-ts-mode changes.
* lisp/progmodes/lua-ts-mode.el
(lua-ts-auto-close-block-comments): New user option.
(lua-ts-mode): Add '--[[ ]]' pairs to 'electric-pair-pairs' only
if 'lua-ts-auto-close-block-comments' is non-nil.
* lisp/textmodes/texinfo.el (texinfo-mode): Add "`` ''" pairs to
'electric-pair-pairs'.
* test/lisp/progmodes/lua-ts-mode-tests.el
(lua-ts-test-auto-close-block-comments): Add new test.
(Bug#79047)
2025-08-09 13:41:43 +03:00
Eli Zaretskii
477e44fca3 ; * lisp/autoinsert.el (auto-insert-alist): Fix last change. 2025-08-09 13:38:10 +03:00
mattiasdrp
bd1362b686 Autoinsert: Allow condition to be a function
Currently a condition can only be a regexp or a major-mode symbol but
there's no real reason to not allow any predicate as a condition.
* doc/misc/autotype.texi: Document the new condition type in
'auto-insert-alist'.
* etc/NEWS: Announce the new condition type in 'auto-insert-alist'.
* lisp/autoinsert.el (auto-insert-alist): Add the new condition type to
the variable documentation.
(auto-insert): Change the way the condition is matched to allow for
custom predicates.
* test/lisp/autoinsert-tests.el
(autoinsert-tests-auto-insert-lambda/-nil): Add two tests for
lambdas (nil and t cases)
(autoinsert-tests-auto-insert-predicate/-nil): Add two tests for named
predicates (nil and t cases) (Bug#79178)
2025-08-09 13:35:48 +03:00
Sean Whitton
6ffa926f90 vc-move-working-tree: Improve updating VC-Dir buffers
* lisp/vc/vc.el (vc-move-working-tree): Check entries in
vc-dir-buffers for liveness.  Don't hardcode "*vc-dir*"; instead
call uniquify-buffer-base-name.  Call uniquify-rename-buffer,
not rename-buffer, so that the buffer is not marked unmanaged.
2025-08-09 11:15:31 +01:00
Sean Whitton
c05ea64d82 define-globalized-minor-mode: Use unique MODE-major-mode (bug#79198)
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode)
<MODE-set-explicitly>: Make this an internal variable using '--'.
<MODE-major-mode>: Make this an internal variable using '--'.
Use the name of the global mode not the local mode (bug#79198).
2025-08-09 10:43:26 +01:00
Sean Whitton
4dd67e5d73 VC: Do move new working trees to the beginning of the project list
* lisp/vc/vc.el (vc-add-working-tree, vc-move-working-tree):
Have project-remember-project move the new working trees to the
front of the list of projects.  Suggested by Dmitry Gutov
<dmitry@gutov.dev>.
2025-08-09 10:39:19 +01:00
Stefan Monnier
f3eeb762ae (js-json-mode): Set editorconfig-indent-size-vars
* lisp/progmodes/js.el (js-json-mode): Now that we don't inherit
from `js-mode` any more, we can't rely on the heuristic to find
the indentation var, so we need to.set
`editorconfig-indent-size-vars` explicitly.
2025-08-09 03:37:47 -04:00
Po Lu
533da29545 ; * src/android.c (android_url_encode): Typo in comment. 2025-08-09 09:28:00 +08:00
Michael Albinus
42358d56f9 Rework autorevert-tests.el
* lisp/autorevert.el (auto-revert-handler): Rearrange timer handling.

* test/lisp/autorevert-tests.el (ert-temp-file-prefix): Don't set it.
(auto-revert--test-rootdir, auto-revert--test-monitors): New defvars.
Replace globally `temporary-file-directory' by
`auto-revert--test-rootdir'.
(auto-revert--wait-for-revert): Rewrite.
(auto-revert--test-library, auto-revert--test-monitor)
(auto-revert--skip-unless-proper-library-and-monitor): New defuns.
(with-auto-revert-test): Let-bind `ert-temp-file-prefix'.  Call
`file-notify-rm-all-watches'.
(auto-revert-test--write-region, auto-revert-test--write-file):
New defuns.
(auto-revert-testNN-*): Rework.
2025-08-08 18:44:58 +02:00
Michael Albinus
67e16dca90 Rework filenotify-tests.el
* test/lisp/filenotify-tests.el (ert-temp-file-suffix): Set it.
(with-file-notify-test): Don't set :suffix.
(file-notify-testNN-*): Rework.
2025-08-08 18:27:30 +02:00
Sean Whitton
12354bcfdc VC other working trees: avoid reordering project--list
* lisp/progmodes/project.el (project--remember-dir)
(project-remember-project): New STABLE argument.
* lisp/vc/vc.el (vc-add-working-tree)
(vc--prompt-other-working-tree, vc-move-working-tree): Use it.
2025-08-08 13:30:41 +01:00
Eli Zaretskii
0c40940054 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2025-08-08 14:41:26 +03:00
Eli Zaretskii
5d5a00e4ad Revert "Autoinsert: Allow condition to be a function"
This reverts commit 738a7bb494.
It caused regressions in autoinsert-tests, and causes
conceptual problems due to its design.  (Bug#79178)
2025-08-08 14:39:34 +03:00
Tassilo Horn
ba1453cf61 ; * lisp/doc-view.el (doc-view-initiate-display): Improve last commit 2025-08-08 13:27:08 +02:00
Michael Albinus
be4be3eb09 Add auto-revert-buffer-in-progress-p
* doc/lispref/backups.texi (Reverting):
Add auto-revert-buffer-in-progress-p.

* etc/NEWS: Mention auto-revert-buffer-in-progress-p.

* lisp/autorevert.el (auto-revert-buffer-in-progress-p):
New autoloaded variable.
(auto-revert-buffer): Let-bind it.  (Bug#79145)

* lisp/dired-x.el (dired-omit-expunge): Suppress messages when in
auto-revert.
2025-08-08 13:26:16 +02:00
Sean Whitton
560aee2fb2 vc-move-working-tree: Also update VC-Dir buffers
* lisp/vc/vc.el (vc-move-working-tree): Also update VC-Dir
buffers to follow the working tree move.
2025-08-08 11:47:00 +01:00
Sean Whitton
74cbe6d740 vc-buffer-sync-fileset: Bind 'non-essential' (bug#79137)
* lisp/vc/vc.el (vc-buffer-sync-fileset):
Bind 'non-essential' (bug#79137).
2025-08-08 11:20:33 +01:00
Sean Whitton
c501ed7dc1 Generalize finding project matching files to other major modes
* lisp/progmodes/project.el
(project-find-matching-buffer-function): New variable.
(project-find-matching-file): Delete.
(dired-current-directory): Declare.
(project-find-matching-file-or-directory): New function.  Like
the old 'project-find-matching-file', but also handle Dired
buffers (bug#79126).  When matching file/directory does not
exist, try going up in the directory tree until we find
something that does.
(project-find-matching-buffer): New command.
* lisp/vc/vc.el (vc-switch-working-tree): Use it (bug#79126).
* etc/NEWS: Announce new command and new variable.
2025-08-08 11:17:53 +01:00
Tassilo Horn
4456f7bd31 doc-view: inhibit keybinding message if window is not selected
* lisp/doc-view.el (doc-view-initiate-display): Only echo key-binding
message when the document buffer is shown in the selected
window (bug#79145).
2025-08-08 06:50:18 +02:00
Stefan Monnier
2b3eb8d3f0 (help-function-arglist): Fix bug#79128
* lisp/help.el (help-function-arglist): Fix use of `documentation`,
to obey the `function-documentation` property.

* test/lisp/help-tests.el (help-tests--use-docstring-arglist-79128):
New test.
2025-08-07 13:49:48 -04:00
Manuel Giraud
42b990cd20 Fix some tests on OpenBSD
* test/lisp/eshell/em-script-tests.el
(em-script-test/batch-file/shebang): "env -S" is not supported.
* test/src/fns-tests.el (fns-tests-random): 'random' is
non-deterministic on OpenBSD.  (Bug#79190)
2025-08-07 17:43:58 +03:00
Eli Zaretskii
e658ed0677 ; * admin/authors.el (authors-aliases): Update. 2025-08-07 17:39:52 +03:00
Eli Zaretskii
96891c1fac ; * etc/NEWS: Fix last change. 2025-08-07 17:37:15 +03:00
mattiasdrp
738a7bb494 Autoinsert: Allow condition to be a function
Currently a condition can only be a regexp or a major-mode symbol
but there's no real reason to not allow any predicate as a
condition.
* doc/misc/autotype.texi: Document the new condition type in
'auto-insert-alist'.
* etc/NEWS: Announce the new condition type in 'auto-insert-alist'.
* lisp/autoinsert.el (auto-insert-alist): Add the new condition
type to the variable documentation.
(auto-insert): Change the way the condition is matched to allow for
custom predicates.  (Bug#79178)
2025-08-07 17:36:45 +03:00
Eli Zaretskii
16a5a0f619 ; * etc/NEWS: Fix last change. 2025-08-07 16:52:22 +03:00
Manuel Giraud
cbeb558f16 Use variables to store marking state
Bug#78967.

(calendar-mode): Init new variables with user options.
* lisp/calendar/calendar.el (calendar-generate-window)
(calendar-unmark):
* lisp/calendar/diary-lib.el (diary-mark-entries)
(diary-redraw-calendar):
* lisp/calendar/holidays.el (calendar-mark-holidays): Use new
variables.
* etc/NEWS: Document the change.
2025-08-07 16:49:56 +03:00
binarydigitz01
55541c8b66 Do interactive tagging in arc-mode.el (bug#79166).
Copyright-paperwork-exempt: yes
2025-08-07 16:46:21 +03:00
Eli Zaretskii
e9fe0ebae0 ; Fix last change
* src/eval.c (Fdebugger_trap): Minor wording changes in doc
string.

* etc/DEBUG: Some copyedits of a recently-added text.
2025-08-07 16:38:02 +03:00
Jeremy Bryant
caa6bc95c1 New debugger-trap function to break to GDB
* src/eval.c: new primitive debugger-trap
* src/.gdbinit: set breakpoint to Fdebugger_trap
* etc/DEBUG: document it.
Remove suggestion to use Fredraw_display.

This do-nothing primitive gives control to GDB, and for debugging
convenience a breakpoint is set by default in .gdbinit.
2025-08-07 16:26:17 +03:00
Eli Zaretskii
b6f177b68a ; * lisp/indent-aux.el: Add a comment (bug#79176). 2025-08-07 16:12:37 +03:00
Tony Zorman
cf86e00c8d ; * lisp/indent-aux.el: Fix deindenting read-only text (bug#79176). 2025-08-07 16:09:59 +03:00
kobarity
3d8fbb0716 Fix Python PDB tracking for remote inferior Python
* lisp/progmodes/python.el (python-shell-local-prefix): New
constant.
(python-shell--convert-file-name-to-send): New function to
add/remove prefix.
(python-shell-send-string, python-shell-send-file): Changed to
use 'python-shell--convert-file-name-to-send'.
(python-pdbtrack-set-tracked-buffer): Changed to add/remove
prefix.
* test/lisp/progmodes/python-tests.el
(python-shell--convert-file-name-to-send-1): New test.
(Bug#79036)
2025-08-07 16:06:28 +03:00
Michael Albinus
68aaeb3519 Fix Tramp completion
* lisp/net/tramp.el (tramp-skeleton-file-name-all-completions):
Filter out "" hits.  (Bug#79173)
2025-08-07 09:05:22 +02:00
Michael Albinus
d3cd93dc4d Add set-file-times implementation for Tramp smb method
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times):
Don't use UTC in all cases.

* lisp/net/tramp-smb.el (tramp-smb-handle-set-file-times): New defun.
(tramp-smb-file-name-handler-alist): Use it.

* test/lisp/net/tramp-tests.el (tramp-test22-file-times): Adapt test.
2025-08-06 17:59:02 +02:00
Sean Whitton
d950ca8ccd * lisp/vc/vc-hg.el (vc-hg-print-log): Revise log-outgoing revset. 2025-08-06 16:06:13 +01:00
Mattias Engdegård
f0da94e2c2 external-completion: specify a required Emacs version
* lisp/external-completion.el: Require 26.1 (picked out of thin air).
(external-completion-table): Undo use of the hash-table-contains-p,
recently introduced.
2025-08-06 13:13:58 +02:00
Martin Rudalics
ca07819af7 ; * lisp/files.el (find-file-noselect): Fix doc-string typo. 2025-08-06 09:29:41 +02:00
Paul Nelson
6b2856f9ca Allow numbered buffer selection for project-shell
* lisp/progmodes/project.el (project-shell, project-eshell):
When a numeric prefix is supplied, the command switches to or
creates a session buffer whose name has that number as a suffix.
For instance, C-2 yields "*name-of-project-shell<2>*".  As
before, a plain universal argument C-u creates a new session
with an automatically generated numeric suffix.  This change
makes the behavior of the project-shell commands consistent with
how M-x eshell handles numeric prefixes.
* etc/NEWS: Announce the change. (bug#76500)
2025-08-06 04:46:49 +03:00
Eli Zaretskii
32ba66d97d ; Improve doc strings in tab-line.el
* lisp/tab-line.el (tab-line-tab-modified-p)
(tab-line-tab-face-special, tab-line-tab-face-modified)
(tab-line-tab-face-group, tab-line-tab-face-functions): Doc fixes.
2025-08-05 15:30:17 +03:00
Michael Albinus
5ff8a90395 Tramp allows now external implementations for functions
* doc/misc/tramp.texi (Frequently Asked Questions): Mention tramp-hlo.
(New operations): New node.
(Top, Files directories and localnames):  Add it to @menu.

* etc/NEWS: Mention Tramp's feature to add function implementations.
Presentational fixes and improvements.

* lisp/net/tramp.el (tramp-file-name-for-operation-external): New defvar.
(tramp-file-name-for-operation): Use `memq'.  Handle external
operations.  Raise `remote-file-error' error in case of.
(tramp-add-external-operation, tramp-remove-external-operation):
New defuns.

* test/lisp/net/tramp-archive-tests.el (tramp-archive-test50-auto-load)
(tramp-archive-test50-delay-load)
(tramp-archive-test51-without-remote-files): Rename.

* test/lisp/net/tramp-tests.el (tramp--test-operation)
(tramp--handler-for-test-operation): New defuns.
(tramp-test49-external-backend-function): New test.
(tramp-test50-auto-load, tramp-test50-delay-load)
(tramp-test50-recursive-load, tramp-test50-remote-load-path)
(tramp-test51-without-remote-files, tramp-test52-unload): Rename.
2025-08-05 12:00:21 +02:00
Martin Rudalics
2d2755c3d7 Handle inhibiting implied resizing for frames without initial tool bar
* src/xfns.c (x_set_tool_bar_lines, x_change_tool_bar_height)
* src/pgtkfns.c (x_change_tool_bar_height)
(pgtk_set_tool_bar_lines): Set f->tool_bar_resized to true so
inhibiting implied resizing works for frames without initial
tool bar too.  See the thread
https://lists.gnu.org/archive/html/emacs-devel/2025-08/msg00034.html.
2025-08-05 11:08:38 +02:00
Juri Linkov
7a5ee16b01 * lisp/tab-line.el: Improve docstrings.
(tab-line-tab-face-functions, tab-line-tab-modified-p)
(tab-line-tab-face-modified): Explain possible values of BUFFER-P.
2025-08-05 09:38:12 +03:00
Dmitry Gutov
65c110b913 vc-annotate-warp-revision: Fix going through renames
* lisp/vc/vc-annotate.el (vc-annotate--file-name-change):
New function (bug#26345).
(vc-annotate-warp-revision): Use it here.

Co-Authored-By: Jakub Ječmínek <kuba@kubajecminek.cz>
2025-08-05 04:07:40 +03:00
Sean Whitton
e01b9bd69a ; * lisp/vc/vc.el (vc--prompt-other-working-tree): Reorder.
In fact, calling project-current or project-remember-project
will ensure that project-prompter is loaded.  But let's not rely
on that.
2025-08-04 21:08:49 +01:00
Sean Whitton
0df9731ec9 vc--prompt-other-working-tree: Remember all the working trees
* lisp/vc/vc.el (vc--prompt-other-working-tree): Call
'project-remember-project' on all the known working trees.
2025-08-04 21:07:14 +01:00
Sean Whitton
9e48d1f49a project-prompter: New PREDICATE and REQUIRE-KNOWN arguments
* lisp/progmodes/project.el (project-prompter)
(project-prompt-project-dir, project-prompt-project-name): New
PREDICATE and REQUIRE-KNOWN optional arguments.
* lisp/vc/vc.el (project-prompter): Declare.
(vc--prompt-other-working-tree): New function.
(vc-switch-working-tree, vc-delete-working-tree)
(vc-move-working-tree): Use it to prompt for the other working
tree in a way that respects 'project-prompter' (bug#79024).
* etc/NEWS: Announce all three optional arguments.  Rework
description of new optional argument to 'project-current'.
2025-08-04 20:59:02 +01:00
Mattias Engdegård
1811cb294e Fix vc-git worktrees and vc-tests for directories with symlinks
* lisp/vc/vc-git.el (vc-git-known-other-working-trees):
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--other-working-trees):
Tolerate directories with symlinks in them, such as the standard
temporary dirs on MacOS.  'git worktree list' outputs expanded names.
2025-08-04 10:55:25 +01:00
Mattias Engdegård
f9e0c06875 * lisp/vc/vc-git.el (vc-git--worktrees): Don't pass -z to older Git.
The -z option for 'git worktree list --porcelain' appeared in 2.36.
2025-08-04 10:54:34 +01:00