Commit graph

179419 commits

Author SHA1 Message Date
Sean Whitton
0cd0aaa14f vc-revert: Fix calling vc-buffer-sync (bug#79319)
* lisp/vc/vc.el (vc-revert): Don't call vc-buffer-sync on a
non-file-visiting buffer (bug#79319).  Don't try to use memq to
compare strings.
2025-08-31 16:37:11 +01:00
Sean Whitton
11dc1420e4 * lisp/vc/vc.el (vc-revert): Tighten up save-some-buffers predicate. 2025-08-31 16:32:48 +01:00
Eli Zaretskii
8c663618ce ; * etc/NEWS: Document the change that fixed bug#65897. 2025-08-31 09:54:17 +03:00
Spencer Baugh
98fbaacac2 Allow entering the debugger on error in emacsclient connections
* lisp/server.el (server--process-filter-1): Use
'condition-case-unless-debug'.  (Bug#65897)
2025-08-31 09:44:53 +03:00
Eli Zaretskii
32d3c859f0 Fix EOL decoding in files extracted from ZIP archives
* lisp/arc-mode.el (archive-set-buffer-as-visiting-file): Don't
lose EOL conversion determined by 'decode-coding-region' from the
extracted file's data.  (Bug#79316)
2025-08-30 19:50:22 +03:00
Jeremy Bryant
b73d92c8b1 * lisp/saveplace.el (save-places-to-alist): Add doc string.
Replace previous comment and simplify wording by refering to
the function 'save-place-to-alist' being called on all
buffers.  (Bug#79340)
2025-08-30 19:14:58 +03:00
Sean Whitton
8a284cbbc5 ; Fix `(emacs)Merge Bases'
Intended to be included in previous commit.
2025-08-30 15:54:32 +01:00
Eli Zaretskii
af4a5e2b4a Merge from origin/emacs-30
3d2a818679 * doc/misc/efaq-w32.texi (UTF-8 encoding): New section (b...
ec50d775ac ; * doc/misc/flymake.texi (Finding diagnostics): Fix a ty...
293e258a1b * doc/emacs/screen.texi (Mode Line): Fix reference.
8eb192c23d ; * admin/make-tarball.txt: Update the "Web pages" sectio...
2025-08-30 07:18:37 -04:00
Eli Zaretskii
e1af5d70e2 ; Merge from origin/emacs-30
The following commit was skipped:

eabb5f450c Improve and clarify documentation of 'dired-click-to-sele...
2025-08-30 07:18:36 -04:00
Spencer Baugh
b610f36d44 Document and test 'let-alist' support for indexing
* etc/NEWS: Announce 'let-alist' support for indexing.
* test/lisp/emacs-lisp/let-alist-tests.el (let-alist-numbers):
Add a test for 'let-alist's support for indexing.
* doc/lispref/lists.texi (Association Lists): Document indexing
with 'let-alist'.  (Bug#66509)
2025-08-30 13:59:18 +03:00
Eli Zaretskii
7efaa4657a Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2025-08-30 13:46:34 +03:00
Eli Zaretskii
73aac05cfd Fix "C-u C-h C-n"
* lisp/help.el (view-emacs-news): Widen the buffer before
re-narrowing it again to a different version.  (Bug#79324)
2025-08-30 13:45:07 +03:00
Sean Whitton
29e673a77b New commands for outgoing diffs including uncommitted changes
* lisp/vc/vc.el (vc-root-diff-outgoing-base)
(vc-diff-outgoing-base): New commands (bug#62940).
* lisp/vc/vc-hooks.el (vc-prefix-map): Bind them.
* doc/emacs/vc1-xtra.texi (Outgoing Base Diffs):
* etc/NEWS: Document them.
* doc/emacs/emacs.texi (Outgoing Base Diffs): New node.
2025-08-30 11:44:53 +01:00
Sean Whitton
14d20bff06 Document C-x v M D and C-x v M L in the manual
* doc/emacs/emacs.texi (Merge Bases):
* doc/emacs/vc1-xtra.texi (Merge Bases): New node.
2025-08-30 11:44:53 +01:00
João Távora
53f5a07beb Eglot: fix likely off-by-1 in LabelOffsetSupport feature (bug#79259)
This feature was tweaked and last tested with a 2019 edition of
the 'ccls' LSP.  The spec does not clearly specify this number
to be 0-indexed, but it would make sense that it would be so.
So there's not need to 1+ - correct the numbers at all before
using them in substring.  This would fix the Haskell server use
of this feature (which is bug#79259)

* lisp/progmodes/eglot.el (eglot--sig-info): Fix likely off-by-1.
2025-08-30 11:44:56 +01:00
Eli Zaretskii
467c75893c ; Fix defcustom type
* lisp/files.el (lock-file-name-transforms): Fix the 'defcustom'
type.  (Bug#79322)
2025-08-30 13:22:05 +03:00
Steven Allen
4ab16d701e Eglot: escape literal % characters in URIs
Escape literal % characters in Eglot URIs

Otherwise, a literal % in a file-name will be interpreted (by the
language server) as if it were a part of a percent-encoded sequence.

See Bug#78984 for context on why `url-path-allowed-chars' cannot be
changed to escape literal % characters.

* lisp/progmodes/eglot.el (eglot--uri-path-allowed-chars): Escape %,
remove the redundant variable definition.
* test/lisp/progmodes/eglot-tests.el (eglot-test-path-to-uri-escape):
test it.
2025-08-30 11:19:19 +01:00
Sergio Pastor Pérez
8d301906e1 bug#79241: Fix incorrect handling of overlays in `vertical-motion'
* src/indent.c (vertical-motion): If iterator is inside an overlay,
reset it to the beginning of line before trying to reach goal
column.  This prevents point from being stuck at the beginning
of overlay strings during upward motions.

Copyright-paperwork-exempt: yes
2025-08-30 12:39:35 +03:00
Eli Zaretskii
98cd122776 ; * doc/lispref/edebug.texi (Edebug Views): Fix wording of last change. 2025-08-30 12:35:18 +03:00
Jens Schmidt
fdc6bb2caf Add edebug-bounce-to-previous-value
Command edebug-bounce-to-previous-value uses the previous value
observed while single-stepping or evaluating an expression to
bounce point in the outside current buffer to the buffer
position corresponding to that value.

* lisp/emacs-lisp/edebug.el (edebug-previous-value): Add
variable.
(edebug-compute-previous-result, edebug-eval-expression): Update
it.
(edebug-bounce-to-previous-value): Add command.
(edebug-mode-map): Add keybinding for the new command, replacing
the binding of "P" to edebug-view-outside.
(edebug-mode-menus): Add menu entry for the new command.
* doc/lispref/edebug.texi (Edebug Views): Add documentation.
* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
(edebug-test-code-bounce-point): Add test code.
* test/lisp/emacs-lisp/edebug-tests.el
(edebug-tests-bounce-outside-buffer)
(edebug-tests-bounce-outside-point)
(edebug-tests-bounce-outside-mark)
(edebug-tests-bounce-record-outside-environment)
(edebug-tests-should-have-bounced-to): Add infrastructure to
test bounces.
(edebug-tests-check-keymap): Update tests to new key bindings.
(edebug-tests-bounce-point)
(edebug-tests-bounce-to-previous-value)
(edebug-tests-bounce-to-previous-non-position): Add tests.
(edebug-tests-evaluation-of-current-buffer-bug-19611): Clean up
side effects.  (Bug#79288)
2025-08-30 12:30:21 +03:00
Eli Zaretskii
3d2a818679 * doc/misc/efaq-w32.texi (UTF-8 encoding): New section (bug#79296). 2025-08-30 12:23:42 +03:00
john muhl
34f3ac6c5b Fontify all comment delimiters in 'lua-ts-mode'
* lisp/progmodes/lua-ts-mode.el (lua-ts--comment-font-lock):
Apply 'font-lock-comment-delimiter-face' to the entire span of
initial dashes.  In particular, this improves the appearance of
LuaCATS and EmmyLua style annotations which use "---".
* test/lisp/progmodes/lua-ts-mode-resources/font-lock.lua:
Add tests.  (Bug#79258)
2025-08-30 11:31:34 +03:00
Eli Zaretskii
b0efe06551 ; * lisp/ehelp.el (ehelp-command): Fix the autoload form (bug#79289). 2025-08-30 11:24:51 +03:00
Sean Devlin
b85f9d6a97 Fix recursive load when 'calc-always-load-extensions' is set
* lisp/calc/calc.el (calc-create-buffer): Call 'calc-load-everything'.
(calc-always-load-extensions): Delete erroneous stanza.  (Bug#79157)
2025-08-30 10:26:20 +03:00
Sean Devlin
aa60f16e66 Add user option to inhibit Calc startup message (bug#79143)
* doc/misc/calc.texi (Customizing Calc): Document the new option.
* etc/NEWS: Document the new option.
* lisp/calc/calc.el (calc-inhibit-startup-message): New option to
inhibit Calc’s startup message.
(calc): Respect the option in Calc’s startup code.
* test/lisp/calc/calc-tests.el (ert): Require ert-x for
'ert-with-message-capture'.
(calc-inhibit-startup-message): Test the new user option.
2025-08-30 10:22:06 +03:00
Mattias Engdegård
8c71ef0f8e ; use modern sort calls in more places
* lisp/emacs-lisp/regexp-opt.el (regexp-opt, regexp-opt-group):
* lisp/emacs-lisp/rx.el (rx--parse-any): New-style calls, also faster.
2025-08-29 19:24:50 +02:00
Juri Linkov
8d3554683f * lisp/treesit-x.el (treesit-generic-mode-font-lock-map): Extend.
Add more font-lock mappings based on existing settings in ts-modes.
2025-08-29 19:35:58 +03:00
Juri Linkov
35f8ce7835 * lisp/textmodes/markdown-ts-mode.el: Fix embed settings.
(markdown-ts--range-settings): Move embed settings
for html/toml/yaml to 'markdown-ts-setup'.
(markdown-ts-setup): Append range rules to 'treesit-range-settings'
only when grammars for html/toml/yaml are installed.
2025-08-29 19:32:22 +03:00
Juri Linkov
b8ad7c38ae * lisp/progmodes/python.el: Use 'treesit-major-mode-remap-alist'.
(python-ts-mode): Don't duplicate 'auto-mode-alist' and
'interpreter-mode-alist' settings in Emacs 31 (bug#79180).
Add ts-mode mapping to 'treesit-major-mode-remap-alist'.
2025-08-29 19:27:32 +03:00
Michael Albinus
f7188ed77f ; Fix last commit
* lisp/net/tramp.el (tramp-parse-default-user-host): Fix thinko.
(tramp-handle-file-directory-p): Extend simple check.
2025-08-29 17:29:54 +02:00
Michael Albinus
4e44c149a6 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2025-08-29 13:48:10 +02:00
Michael Albinus
95232f556e `Fix read-directory-name' for Tramp files
* lisp/minibuffer.el (completion-file-name-table): Improve bypass
for directory checking.  (Bug#79236)

* lisp/net/tramp.el (tramp-user-regexp): Exclude "[" and "]".
(tramp-completion-make-tramp-file-name): Handle port for IPv6 hosts.
(tramp-completion-handle-file-directory-p)
(tramp-completion-handle-file-exists-p): Simplify.
(tramp-completion-handle-file-name-completion): Ignore PREDICATE.
(tramp-completion-dissect-file-name): Handle ports.
(tramp-parse-default-user-host): Suppress '(nil nil) result.
(tramp-parse-file): Delete duplicates.
(tramp-parse-shosts-group): Accept also IPv6 addresses.
(tramp-handle-file-directory-p): Return t for filenames
"/method:foo:".
(tramp-parse-auth-sources, tramp-parse-netrc):
* lisp/net/tramp-cache.el (tramp-parse-connection-properties):
* lisp/net/tramp-gvfs.el (tramp-gvfs-parse-device-names):
Use `tramp-compat-seq-keep'.

* test/lisp/net/tramp-tests.el (edebug-mode): Declare.
(tramp--test-message): Write also trace value.
(tramp-test26-file-name-completion):
(tramp-test26-interactive-file-name-completion): Extend tests.
2025-08-29 13:47:51 +02:00
Mattias Engdegård
bebba6be3d Fix org-habit bug related to string mutation
* lisp/org/org-habit.el (org-habit-build-graph): Rewrite without using
string mutation (using vectors instead), fixing a bug where
org-habit-completed-glyph and org-habit-today-glyph wouldn't display
properly if in the U+0080..00FF range, discovered by the more restricted
string mutation.

Reported by Daniel Mendler in
 https://lists.gnu.org/archive/html/emacs-orgmode/2025-08/msg00224.html
2025-08-29 10:55:21 +02:00
john muhl
bba28b744c Make 'lua-prefix-key' option a 'key-sequence'
This fixes a failure in 'test-custom-opts' caused by both strings
and integers being used for 'lua-prefix-key'.

* lisp/progmodes/lua-mode.el (lua-prefix-key): Convert option to
'key-sequence' type.
(lua-mode-map, lua-prefix-key-update-bindings, lua-set-prefix-key)
(lua--customize-set-prefix-key): Adjust to the change of type for
'lua-prefix-key'.
(lua-prefix-mode-map): Use 'defvar-keymap'.  (Bug#79335)
2025-08-29 09:47:24 +02:00
Robert Pluim
972e4f4a7f Prefer tls to ssl in nnimap and smtpmail code
* lisp/gnus/nnimap.el (nnimap-open-connection): Use 'tls.
(nnimap-open-connection-1): Check 'tls before 'ssl.
* lisp/mail/smtpmail.el (smtpmail-stream-type): Add 'ssl to
allowed values, state 'tls is preferred.
2025-08-28 17:11:56 +02:00
Arash Esbati
62e0cde967 ; Delete unnecessary backslashes
* doc/misc/reftex.texi (Options - Creating Citations): Delete
unnecessary backslashes.
2025-08-28 11:50:26 +02:00
Spencer Baugh
81267db01d Pass dired default filenames via defaults argument
Rather than using minibuffer-with-setup-hook, just pass the list
of default file names as a regular argument to read-file-name.
This allows read-file-name to run abbreviate-file-name on the
defaults as it normally does, instead of the defaults appearing
in expanded form.

dired-dwim-target-defaults changes slightly to return the
correct default at the start of the list.

* lisp/dired-aux.el (dired-do-create-files)
(dired-compare-directories): Pass default file names as an
argument. (bug#79293)
(dired-dwim-target-defaults): Return the correct default at the
start of the list.
2025-08-28 09:21:18 +03:00
Juri Linkov
b5ec833bc8 * lisp/tab-bar.el (frameset-session-filter-tabs): New function.
Push new function to 'frameset-session-filter-alist'
with 'tabs' key (bug#79291).
2025-08-28 09:09:18 +03:00
Eli Zaretskii
ec50d775ac ; * doc/misc/flymake.texi (Finding diagnostics): Fix a typo (bug#79325). 2025-08-28 08:58:17 +03:00
Dmitry Gutov
088c531754 ruby-flymake-simple: Refine further
* lisp/progmodes/ruby-mode.el (ruby-flymake-simple):
Relax regexp but limit allowed characters (bug#79257).
2025-08-28 03:18:56 +03:00
Spencer Baugh
e46471ed07 Make RET choose the selected completion
Previously, one could select a completion via M-<up>/M-<down>,
but then RET would not actually select the chosen completion.
With the addition of completion-auto-deselect, this is not
actually necessary: we can reasonably assume that when a
completion is selected, the user wants to use that, since their
last action must have been to select it.  So, just choose the
selected completion on RET.  This lets us default
minibuffer-completion-auto-choose to nil.

For minibuffers with require-match completion, this can be done
by changing the existing command bound to RET.  For minibuffers
with nil require-match completion, RET was previously bound to
exit-minibuffer, and changing exit-minibuffer to have this logic
is risky.  We handle that case by adding a new
minibuffer-completion-exit which wraps exit-minibuffer and bind
RET to it.

* lisp/minibuffer.el (minibuffer-insert-completion-if-selected)
(minibuffer-completion-exit, completion--selected-candidate):
Add.
(minibuffer-complete-and-exit): Call
minibuffer-choose-completion. (bug#77253)
(minibuffer-local-completion-map): Bind RET to
minibuffer-completion-exit, overriding exit-minibuffer.
(completion-in-region-mode-map): Bind RET to
minibuffer-choose-completion when there's a selected candidate.
(minibuffer-completion-auto-choose): Default to nil.
(minibuffer-visible-completions--filter)
(minibuffer-visible-completions-map): Delete RET binding, no
longer necessary.
* lisp/simple.el (completion-setup-function): Update completion
help text to show more correct bindings.
* test/lisp/minibuffer-tests.el (completions-header-format-test)
(minibuffer-next-completion): Set
minibuffer-completion-auto-choose=t explicitly.
(with-minibuffer-setup, minibuffer-completion-RET-prefix)
(completion-in-region-next-completion): Add new tests.
* etc/NEWS: Announce.
2025-08-27 21:23:03 +03:00
Michael Albinus
293e258a1b * doc/emacs/screen.texi (Mode Line): Fix reference. 2025-08-27 12:08:12 +02:00
Robert Pluim
7efa4e34bb ; * lisp/font-lock.el: Remove unneeded "cl-lib" require. 2025-08-27 11:24:53 +02:00
Robert Pluim
6aa0be3d46 ; * etc/NEWS: Correct AUTH=PLAIN description. 2025-08-27 11:24:53 +02:00
Robert Pluim
b7cef00571 ; Fix formatting
* src/process.c (clear_fd_callback_data, delete_write_fd,
delete_keyboard_wait_descriptor): Space before paren.
2025-08-27 11:24:53 +02:00
Michael Albinus
29c35668d0 Extend info-xref-test-emacs-manuals, fix info reference
* doc/lispref/loading.texi (Autoload): Fix reference.

* test/lisp/info-xref-tests.el (info-xref-test-emacs-manuals):
Print output buffer.
2025-08-27 11:24:12 +02:00
john muhl
f908d854d6 ; Various code cleanup in 'lua-mode' (Bug#79309)
* lisp/progmodes/lua-mode.el (lua-indent-level): Contemporary Lua
style guides no longer recommend 3 as default. Change type to
'natnum'.
(lua-always-show, lua-get-block-token-info)
(lua--backward-up-list-noerror, lua-make-indentation-info-pair)
(lua-accumulate-indentation-info)
(lua-calculate-indentation-block-modifier): Quote function names.
(lua-toggle-electric-state): Re-format to avoid confusion.
(lua-is-continuing-statement-p-1): Fix typo.
(lua--builtins): Move docstring to correct location.
(lua-is-continuing-statement-p-1): Remove unnecessary 'or'.
(lua-make-lua-string): Remove excessive backslashes and
unnecessary use of a temporary buffer.
(lua-find-matching-token-word): Make it clear that 'goto-char' is
only used only for its side-effect.
2025-08-27 10:05:49 +02:00
john muhl
6b0b70233a ; ruby-flymake-simple: Only match relative file name (bug#79257) 2025-08-27 00:09:41 +03:00
Eli Zaretskii
ff83b735f9 Fix last change in 'next_element_from_display_vector'
* src/xdisp.c (next_element_from_display_vector): Only switch the
iterator from unibyte to multibyte, never in the other direction,
and not if the original character came from a unibyte buffer.
(Bug#79317)
2025-08-26 16:24:55 +03:00
Eli Zaretskii
8eb192c23d ; * admin/make-tarball.txt: Update the "Web pages" section (bug#79315). 2025-08-26 15:18:29 +03:00