1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-06 07:31:13 -08:00
Commit graph

14229 commits

Author SHA1 Message Date
Eli Zaretskii
5ee1e205e1 ; Improve the documentation of the last commit
* lisp/vc/log-view.el (log-view-copy-revision-as-kill):
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Improve wording of last commit.  (Bug#79493)
2025-10-04 17:18:12 +03:00
Sean Whitton
d0c63b8427 Improve log-view-copy-revision-as-kill
* lisp/vc/log-view.el (log-view-copy-revision-as-kill): Signal
user-error if there is no revision at point.
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Shorten docs for the new command.
2025-10-04 14:41:16 +01:00
Timo Myyrä
2ce33b66c5 New command log-view-copy-revision-as-kill
* lisp/vc/log-view.el (log-view-copy-revision-as-kill): New
command.
(log-view-mode-map): Bind it.
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Document it.
2025-10-04 14:40:03 +01:00
Sean Whitton
9deff2926b New command log-view-unmark-all-entries
* lisp/vc/log-view.el (log-view-unmark-all-entries): New
command.
(log-view-mode-map): Bind it.
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Document it.
2025-10-03 20:54:25 +01:00
Sean Whitton
a7bb2fa62a ; TRAMP docs: "cherry pick"->"cherry-pick" (see bug#79408). 2025-10-03 20:24:59 +01:00
Spencer Baugh
3ec87212a4 Eglot: make markup invisible instead of deleting it (bug#79552)
We use gfm-view-mode to render Markdown before we hand over the string
to ElDoc (which usually put it in a 'special' mode "*eldoc*" buffer).
'gfm-view-mode' adds keymap text properties to make links clickable.  It
also makes some of the markup invisible with a special 'invisible'
property value which is specific to 'gfm-view-mode'.  We used to delete
the latter, therefore breaking the link-clicking.  Simply resetting the
regions with non-nil 'invisible' to 't' instead of deleting them fixes
this.  See also https://github.com/joaotavora/eglot/discussions/1238

* lisp/progmodes/eglot.el: Make invisible markup invisible
instead of deleting it.

* etc/EGLOT-NEWS: Mention bugfix.

Co-authored-by: João Távora <joaotavora@gmail.com>
2025-10-03 09:44:56 +01:00
Sean Whitton
b5cf0786a2 New command vc-kill-other-working-tree-buffers
* lisp/vc/vc.el (vc-kill-other-working-tree-buffers): New
command.
* lisp/vc/vc-hooks.el (vc-prefix-map): Bind it.
* doc/emacs/vc1-xtra.texi (Other Working Trees):
* etc/NEWS: Document it.
2025-10-01 20:51:57 +01:00
Sean Whitton
6ef6b517aa VC: Allow deleting or moving current working tree
* lisp/progmodes/project.el (project-prompter)
(project-prompt-project-dir, project-prompt-project-name):
* lisp/vc/vc.el (vc--prompt-other-working-tree): New ALLOW-EMPTY
optional argument.
(delete-working-tree, move-working-tree): Specify that callers
must ensure DIRECTORY is not the current working tree.
(vc-delete-working-tree, vc-move-working-tree): Pass ALLOW-EMPTY
non-nil to vc--prompt-other-working-tree.  Bind
'default-directory' to another working tree when operating on
the current working tree.
(vc-delete-working-tree): Extra prompt when asked to delete the
current working tree.  When deleting the current working tree,
call 'bury-buffer' one or more times at the end.
2025-09-30 16:12:14 +01:00
Juri Linkov
40a22ced14 New value 'window' of 'global-hl-line-sticky-flag'
* etc/NEWS: Rename 'global-hl-line-modes' to 'global-hl-line-buffers'
(bug#79481).  Mention new default value of 'global-hl-line-buffers'
(bug#64993).  Mention new value 'window' of 'global-hl-line-sticky-flag'
that is more useful than the value 'all' now removed from NEWS (bug#64993).

* lisp/hl-line.el (hl-line-nonselected): New face.
(global-hl-line-sticky-flag): Add the value 'window'.
(global-hl-line-buffers): Change the default value to exclude
the minibuffer and 'cursor-face-highlight-mode'.
(global-hl-line-mode): Handle the value 'window' of
'global-hl-line-sticky-flag'.
(global-hl-line-window-redisplay): New function.
2025-09-29 20:47:50 +03:00
Eli Zaretskii
3f230d8465 Detect suspicious email addresses in Rmail and Sendmail
* lisp/mail/rmail.el (rmail-detect-suspicious-headers): New user
option.
(rmail-check-suspicious-from): New function, highlights suspicious
"From" addresses.
(rmail-show-message-1): Call 'rmail-check-suspicious-from' if
'rmail-detect-suspicious-headers' is non-nil.
* lisp/mail/sendmail.el (mail-send): Detect suspicious addresses
before sending.

* etc/NEWS: Announce the new features.
2025-09-28 14:35:46 +03:00
Martin Rudalics
b60e0f4294 Restore mouse line dragging in character increments (Bug#79351)
* lisp/mouse.el (mouse-drag-line): Restore dragging in character
increments and make it the default (Bug#79351).
* etc/NEWS: Mention restored behavior of mouse line dragging.
2025-09-27 10:07:14 +02:00
Elías Gabriel Pérez
06d87e44cb (electric-indent-actions): Add missing NEWS
* lisp/electric.el (electric-indent-actions): Fix docstring.
2025-09-25 13:40:27 -04:00
Stephen Berman
77ca60b48d Navigate *Completions* buffer based on 'completions-format'
This patch makes 'next-completion' and 'previous-completion' work
in the vertical completions format analogously to how they work in
the default horizontal format (bug#78959).  It also fixes wrapping
in the vertical format and confines navigation (including
wrapping) in column-wise movement in the vertical format to the
current line, analogously to how navigation (including wrapping)
in line-wise movement in the horizontal format is confined to the
current column.

* doc/emacs/mini.texi (Completion): Fix several typos and improve
wording is several places.
(Completion Commands): Document navigation of the *Completions*
buffer in the vertical format.  Document the difference between
format-sensitive movement and strictly column-wise or line-wise
movement.  Document 'minibuffer-complete-and-exit' and update the
documentation of 'minibuffer-completion-auto-choose' and
'minibuffer-choose-completion'.  Document the use of a numeric
prefix argument with the navigation commands.
(Completion Options): Rearrange and improve documentation of
'completions-sort', 'completions-format' and
'completion-auto-wrap', updating the latter to document the new
behavior.

* lisp/minibuffer.el (minibuffer-visible-completions-map): Rebind
"<left>" to 'minibuffer-previous-column-completion' and "<right>"
to 'minibuffer-next-column-completion'.
(minibuffer-next-completion): Add check for whether completions
format is vertical to decide whether to call
'next-line-completion' and replace calling 'next-completion' by
'next-column-completion'.
(minibuffer-next-column-completion)
(minibuffer-previous-column-completion): New commands.

* lisp/simple.el (completion-list-mode-map): Rebind "<left>" to
'previous-column-completion' and "<right>" to 'next-column-completion'.
(last-completion): Add handling for vertical completions format.
(completion--move-to-candidate-end): Always move point to the
position immediately after the last character of the completion
candidate.  This unifies the behavior, simplifies the
implementation and facilitates implementing the improved
navigation of the *Completions* buffer.
(previous-column-completion, next-column-completion): New
commands, replacing the previous definitions of
'previous-completion' and 'next-completion' to reflect their
column-wise operation.  Confine navigation (including wrapping) in
vertical format to the current line.
(previous-line-completion, next-line-completion): Implement
line-wise navigation (including wrapping) through all completions
in vertical format, not just those in the current column as in
horiztonal format.  Update doc strings.
(next-completion, previous-completion): Redefine to call
'{next,previous}-line-completion' when completions format is
vertical and '{next,previous}-column-completion' otherwise.

* test/lisp/minibuffer-tests.el
(completions-format-navigation--tests): New function providing a
template to define tests of the navigation and wrapping behavior
with specified numbers of completion candidates.
(completions-format-navigation-test-{2,3,4,5,10,15,16}): New tests.
2025-09-22 16:04:42 +02:00
Juri Linkov
8a501c47a4 Support 'RET' for visiting URLs in read-only buffers (bug#74792)
* lisp/net/browse-url.el (browse-url-keymap-filter)
(browse-url-keymap-bind): New functions.
(browse-url-button-map): Bind "C-c RET" to 'browse-url-button-open'
and rebind "RET" with the filter 'browse-url-keymap-bind'.

* lisp/ansi-osc.el (ansi-osc-hyperlink-map):
* lisp/net/goto-addr.el (goto-address-highlight-keymap):
* lisp/progmodes/bug-reference.el (bug-reference-map):
Bind "RET" with the filter 'browse-url-keymap-bind'.
2025-09-21 20:52:02 +03:00
Eli Zaretskii
2ba301b30e ; * etc/NEWS: Merge two "Register" sections. Fix wording. 2025-09-20 19:37:48 +03:00
Masatake YAMATO
a760f1fe6e (register-preview-info): sort registers in preview buffer
* lisp/register.el (register-preview): Sort alist returned
from `register-of-type-alist'.  (Bug#79474)
2025-09-20 19:35:07 +03:00
Eli Zaretskii
66308637d7 ; Fix last change.
* etc/NEWS:
* doc/emacs/programs.texi (Hideshow): Fix wording and punctuation.
2025-09-20 13:06:17 +03:00
Elías Gabriel Pérez
071cdb66fd Add hideable indicators for hideshow. (Bug#79294)
* doc/emacs/programs.texi (Hideshow): Update documentation.
* etc/NEWS: Announce changes.
* lisp/progmodes/hideshow.el (hs-show-indicators)
(hs-indicator-type, hs-indicator-maximum-buffer-size): New user
options.
(hs-indicator-hide, hs-indicator-show): New icons.
(hs-block-positions, hs--make-indicators-overlays)
(hs-indicator-mouse-toggle-hidding, hs--add-indicators)
(hs--refresh-indicators): New functions.
(hs-hide-block-at-point): Use hs-block-positions.
(hs-inside-comment-p): Use 'get-char-property' instead of
'hs-overlay-at'.
(hs-minor-mode): Rework.
2025-09-20 12:58:31 +03:00
Juri Linkov
2cc525467b New mode 'minibuffer-nonselected-mode'
* lisp/minibuffer.el (minibuffer-nonselected): New face.
(minibuffer-nonselected-overlay): New buffer-local variable.
(minibuffer-nonselected-check, minibuffer-nonselected-setup):
New functions.
(minibuffer-nonselected-mode): New command (bug#49844).
2025-09-19 18:15:42 +03:00
Jostein Kjønigsen
2135e7aa01
Fixes for csharp-ts-mode fontification (bug#79406)
- hightlight reserved keywords agressively, dont allow misuse as
  variables etc (the compiler will fail!)
- highlight lambda-valued variables as funtions.
- improve semantics of function/class annotations using attributes
  (maps closer to using-something than declaring it). also: rename to
  "attribute". "property" has a different, defined meaning in C#.
- better highlight variable-use in different scenarios (function-calls,
  if-statements, assignment-expressions, property-use, anonymous object
  initializers).
- better highlight for property-use (anonymous object initializers).
- highlight field-declaration using font-lock-variable-face.
- fontify attributes using new face csharp-ts-mode-attribute-face
  (defaults to font-lock-property-use-face).
- remove extensive use of "override" making evalutation hard-to-reason about.

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--indent-rules):
Update indent rules.
(csharp-ts-mode-faces): New group.
(csharp-ts-mode-attribute-face): New face.
(csharp-ts-mode--font-lock-settings): Rule updates.
(csharp-ts-mode): Change property feature to attribute
2025-09-16 19:07:16 -07:00
Juri Linkov
32d959e48b New mode 'mouse-shift-adjust-mode' for S-<mouse-1>
* lisp/mouse.el (mouse-shift-adjust-mode-map): New variable.
(mouse-shift-adjust-mode): New minor mode (bug#79453).
(mouse-shift-adjust-point): New variable.
(mouse-drag-region-shift-adjust): New command.
(mouse-drag-track, mouse-set-region): Use 'mouse-shift-adjust-point'
to take into account the already existing region boundary.
2025-09-16 20:50:10 +03:00
Juri Linkov
503351e529 * lisp/hl-line.el (global-hl-line-sticky-flag): New value 'all'.
(global-hl-line-mode): Use 'global-hl-line-highlight-all'
for 'post-command-hook' when the value of
'global-hl-line-sticky-flag' is 'all' (bug#64993).
2025-09-16 20:15:14 +03:00
Juri Linkov
bd194c9a57 Context menu related fixes (bug#64980)
* etc/PROBLEMS: Suggest how to keep context menus open on Lucid.

* lisp/mouse.el (context-menu-mode-map): Bind [mouse-3] to
'ignore' instead of 'nil' to not fallback to the default binding.
(mouse--drag-start-event): Remove unused variable.
(mouse-undouble-last-event): Remove unused function.
2025-09-16 19:48:43 +03:00
Eli Zaretskii
e568f44b54 ; Improve recently-added documentation
* etc/NEWS:
* lisp/vc/vc.el (vc-apply-root-to-other-working-tree):
* doc/emacs/vc1-xtra.texi (Other Working Trees): Fix spelling and
wording of documentation of recent changes to VC.
2025-09-16 19:24:18 +03:00
Sean Whitton
208e80018a New commands to apply changes to other working trees
* lisp/vc/diff-mode.el (diff-apply-buffer): New TEST argument.
* lisp/vc/vc.el (diff-apply-buffer): Declare.
(vc-no-confirm-moving-changes): New user option.
(vc-apply-to-other-working-tree)
(vc-apply-root-to-other-working-tree): New commands.
* lisp/vc/vc-hooks.el (vc-prefix-map): Bind them.
* doc/emacs/vc1-xtra.texi (Other Working Trees):
* etc/NEWS: Document them.
2025-09-16 14:30:02 +01:00
Michael Albinus
26ad23addb Introduc auth-source-ignore-non-existing-file
* lisp/auth-source.el (auth-source-ignore-non-existing-file):
Rename it from `auth-source-ignore-empty-file'.
(auth-source-backends-parser-file): Use it.

* doc/misc/auth.texi (Help for users):
* etc/NEWS:
* test/lisp/auth-source-tests.el (auth-source-validate-backend)
(auth-source-test-netrc-create-secret):
Use `auth-source-ignore-non-existing-file'.
2025-09-12 12:29:30 +02:00
Eli Zaretskii
1d6ec2a040 ; * etc/NEWS: Fix last change. 2025-09-11 19:30:19 +03:00
Eli Zaretskii
5579d32a41 Update to Unicode 17.0
* test/manual/BidiCharacterTest.txt:
* admin/unidata/BidiBrackets.txt:
* admin/unidata/BidiMirroring.txt:
* admin/unidata/Blocks.txt:
* admin/unidata/IVD_Sequences.txt:
* admin/unidata/IdnaMappingTable.txt:
* admin/unidata/NormalizationTest.txt:
* admin/unidata/PropertyValueAliases.txt:
* admin/unidata/ScriptExtensions.txt:
* admin/unidata/Scripts.txt:
* admin/unidata/SpecialCasing.txt:
* admin/unidata/UnicodeData.txt:
* admin/unidata/confusables.txt:
* admin/unidata/emoji-data.txt:
* admin/unidata/emoji-sequences.txt:
* admin/unidata/emoji-test.txt:
* admin/unidata/emoji-variation-sequences.txt:
* admin/unidata/emoji-zwj-sequences.txt: Import from Unicode 17.0.

* etc/NEWS:
* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part1)
(ucs-normalize-tests--failing-lines-part2):
* lisp/international/mule-cmds.el (ucs-names):
* lisp/international/fontset.el (script-representative-chars)
(otf-script-alist):
* lisp/international/characters.el:
* admin/unidata/blocks.awk: Update for Unicode 17.0.
2025-09-11 18:00:42 +03:00
Michael Albinus
d1221a427f Ignore non-existing or empty files in auth-sources
* doc/misc/auth.texi: Replace @code{"..."} by @t{"..."}.
(Help for users): Describe property lists format.  Explain, that
empty files in auth-sources are ignored when
auth-source-ignore-empty-file is non-nil.
(Help for developers): Add auth-source-creation-defaults to vindex.

* etc/NEWS: Introduce auth-source-ignore-empty-file.
Presentational fixes and improvements.

* lisp/auth-source.el (auth-source-ignore-empty-file): New defcustom.
(auth-source-backends-parser-file): Use it.  (Bug#9113)

* test/lisp/auth-source-tests.el (auth-source-validate-backend):
Let-bind `auth-source-ignore-empty-file'.
(auth-source-test-searches): Set file suffix.
(auth-source-test-netrc-create-secret): Adapt test.
2025-09-09 23:20:56 +02:00
Jostein Kjønigsen
6b42b974ce 'nxml-mode': add schema for .NET SLNX files.
SLNX is a new XML-based file-format for .NET based solutions, replacing
the older proprietary SLN file-format.

Unlike SLN-files, it is merge-friendly and expected to become the new
de-facto standard for working with .NET projects.  This commit adds
support for SLNX-schema to 'nxml-mode'.

The schme provided has been synthesized using the official XSD-schema
definition:
https://github.com/microsoft/vs-solutionpersistence/blob/main/src/Microsoft.VisualStudio.SolutionPersistence/Serializer/Xml/Slnx.xsd

This schema was then converted to RNG using XSDtoRNG.xsl:
https://github.com/epiasini/XSDtoRNG

The RNG schema was then converted to RNC using the trang CLI-tool:
https://relaxng.org/jclark/trang.html

* etc/schema/dotnet-slnx.rnc: New file.
* etc/schema/schemas.xml: Add Slnx schema.

* lisp/files.el (auto-mode-alist): Add association for SLNX files.
(Bug#79379)
2025-09-06 12:27:29 +03:00
Sean Whitton
a893dacb38 Make 'm' and 'u' in Log View mode more standard
* lisp/vc/log-view.el (log-view-mark-entry)
(log-view-unmark-entry): New commands.
(log-view-toggle-mark-entry): Rewrite in terms of them.
(log-view-mode-map): Unbind log-view-toggle-mark-entry.
Bind the two new commands.
* etc/NEWS: Document the change.
2025-09-05 11:58:15 +01:00
Eshel Yaron
60a22185b7
Support completion category inheritance
* lisp/minibuffer.el (define-completion-category): New function.
(completion-category-get): New function, implements completion
category property lookup with (multiple) inheritance.
(completion-metadata-get, completion--styles)
(completion--cycle-threshold): Use it.
(completion-category-defaults): Mention it in docstring.
Remove entry for 'project-buffer' category, and instead...
* lisp/progmodes/project.el: ...have 'project-buffer' inherit
from 'buffer'.
* test/lisp/minibuffer-tests.el
(completion-category-inheritance): New test.
* etc/NEWS: Announce support for category inheritance.
2025-09-03 21:01:43 +02:00
Spencer Baugh
45c5b636ce Add 'elisp-flymake-byte-compile-executable' defcustom
The correct Emacs executable to use for
'elisp-flymake-byte-compile' is not necessarily the running
Emacs.  For example, when editing trunk with Emacs 30,
various Lisp changes will cause spurious flymake warnings.
Add 'elisp-flymake-byte-compile-executable' to allow
customizing this.
* lisp/progmodes/elisp-mode.el
(elisp-flymake-byte-compile-executable)
(elisp-flymake-byte-compile--executable): Add.  (Bug#79342)
(elisp-flymake-byte-compile): Invoke
'elisp-flymake-byte-compile--executable'.

* etc/NEWS: Announce the change.
2025-09-02 13:58:46 +03:00
Sean Whitton
cc1a1a984a ; * etc/NEWS: Copyedit. 2025-09-02 09:23:42 +01:00
Philip Kaludercic
d2532a4ef0
Add new library 'timeout'
* lisp/emacs-lisp/timeout.el: Add the file.
* etc/NEWS: Mention the library.

See https://mail.gnu.org/archive/html/emacs-devel/2025-07/msg00520.html.
2025-09-01 22:31:01 +02:00
Juri Linkov
1ba75cc6fc New user option 'tab-line-define-keys'
* lisp/tab-line.el (tab-line-define-keys): New defcustom.
(tab-line--define-keys, tab-line--undefine-keys):
New functions that explicitly bind commands from
'tab-line-mode-map' to 'ctl-x-map'.
(tab-line-mode-map): Leave this keymap empty by default
to avoid breaking 'ctl-x-map' (bug#79323).
(global-tab-line-mode): Call either 'tab-line--define-keys'
or 'tab-line--undefine-keys'.
2025-08-31 21:23:05 +03:00
Juri Linkov
07adb8b59d * doc/emacs/modes.texi (Choosing Modes): Document 'treesit-enabled-modes'. 2025-08-31 20:30:18 +03:00
Eli Zaretskii
8c663618ce ; * etc/NEWS: Document the change that fixed bug#65897. 2025-08-31 09:54:17 +03: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
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
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
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
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
Robert Pluim
6aa0be3d46 ; * etc/NEWS: Correct AUTH=PLAIN description. 2025-08-27 11:24:53 +02:00
F. Jason Park
d98e1a8375 Remove scrolltobottom dependency from erc-fill module
This mostly reverts 9668b4f97c
"Make erc-fill-wrap depend on scrolltobottom".

* etc/ERC-NEWS: Mention removal of formal dependency.
* lisp/erc/erc-fill.el (erc-fill--wrap-scrolltobottom-exempt-p): Remove
unused variable.
(erc-fill--wrap-ensure-dependencies): Remove unused dependency check.
(erc-fill-wrap-mode): Remove scrolltobottom dependency from doc string.
* test/lisp/erc/erc-fill-tests.el (erc-fill-tests--wrap-populate):
Remove unused binding from var list.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--make-bindings): Remove unused binding.
2025-08-25 21:17:48 -07:00
Po Lu
2852967233 Merge remote-tracking branch 'savannah/master' into master-android-1 2025-08-25 10:01:41 +08:00
john muhl
38a0775742 * etc/NEWS: Mention 'lua-mode' merge. 2025-08-25 09:59:04 +08:00
Mattias Engdegård
308e3ab1db Disallow string data resizing (bug#79784)
Only allow string mutation that is certain not to require string data to
be resized and reallocated: writing bytes into a unibyte string, and
changing ASCII to ASCII in a multibyte string.

This ensures that mutation will never transform a unibyte string to
multibyte, that the size of a string in bytes never changes, and that
the byte offsets of characters remain the same.  Most importantly, it
removes a long-standing obstacle to reform of string representation and
allow for future performance improvements.

* src/data.c (Faset): Disallow resizing string mutation.
* src/fns.c (clear_string_char_byte_cache):
* src/alloc.c (resize_string_data):  Remove.
* test/src/data-tests.el (data-aset-string): New test.
* test/lisp/subr-tests.el (subr--subst-char-in-string):
Skip error cases.
* test/src/alloc-tests.el (aset-nbytes-change):
Remove test that is no longer relevant.
* doc/lispref/strings.texi (Modifying Strings):
* doc/lispref/sequences.texi (Array Functions):
* doc/lispref/text.texi (Substitution):  Update manual.
* etc/NEWS: Announce.
2025-08-24 10:28:27 +02:00
Eli Zaretskii
d70e2aac6c ; * etc/NEWS: Fix punctuation in last change. 2025-08-24 07:32:45 +03:00
Dmitry Gutov
bb0ede711e Have project-switch-to-buffer use a distinct completion category
* etc/NEWS: Mention the change.

* lisp/minibuffer.el (completion-category-defaults):
Add an entry for it.

* lisp/progmodes/project.el (project--buffers-completion-table):
Return category 'project-buffer'.
2025-08-24 03:23:48 +03:00