1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-18 20:00:36 -08:00
Commit graph

707 commits

Author SHA1 Message Date
Juri Linkov
08dc7d0c93 * lisp/minibuffer.el (completion--insert-strings): Use the correct frame.
Provide the 'frame-height' call with the frame of the window where
the *Completions* buffer is displayed for the case when the minibuffer
window uses a dedicated frame (bug#79635).
2025-10-18 20:53:44 +03:00
Spencer Baugh
17ac50ea9e Return case common to all completions in try-completion
When completion-ignore-case is non-nil, if all completions share
a common prefix ignoring case, try-completion has always
returned that.  Now, if all completions also share a common
prefix including case, try-completion includes that common
prefix in its return value (bug#79377).

* lisp/minibuffer.el (completion-pcm--merge-completions): Always
use return value from try-completion, which may change case.
* src/minibuf.c (Ftry_completion): Return the common prefix
which changes case.
* test/lisp/minibuffer-tests.el (completion-pcm-bug4219)
(completion-substring-test-5): New tests.
2025-10-16 20:18:23 +03:00
Martin Rudalics
8aeb4f82d9 ; * lisp/minibuffer.el (minibuffer--nonselected-check): Fix typos. 2025-10-16 10:17:29 +02:00
Martin Rudalics
85a9189dbb In 'minibuffer--nonselected-check' consult 'completion-reference-buffer'
* lisp/minibuffer.el (minibuffer--nonselected-check): Don't
highlight when the selected window's buffer has
'completion-reference-buffer' set.
2025-10-16 09:59:15 +02:00
Juri Linkov
eb9a93b221 * lisp/minibuffer.el: Fix recent change of scrolling truncated completions
(completion--lazy-insert-strings-on-scroll): Don't move to the last
completion candidate since this is what happens when scrolling without
truncated completions buffer (bug#79506).
2025-10-15 20:14:43 +03:00
Martin Rudalics
750499e4b7 Rewrite 'minibuffer-nonselected-mode' to use 'window-state-change-functions'
* lisp/minibuffer.el (minibuffer-nonselected): Rewrite
doc-string.
(minibuffer--nonselected-overlay): Define it global.  Rewrite
doc-string.
(minibuffer--nonselected-check): Rewrite by comparing the active
minibuffer window with the selected window.
(minibuffer--nonselected-setup): Globally add
'minibuffer--nonselected-check' to list of functions called by
'window-state-change-functions'.
(minibuffer--nonselected-exit): Remove
'minibuffer--nonselected-check' from list of functions called by
'window-state-change-functions' when exiting last recursive
minibuffer.
(minibuffer-nonselected-mode): Globally add/remove
'minibuffer--nonselected-setup' to/from list of functions called
by 'minibuffer-setup-hook' and 'minibuffer--nonselected-exit'
to/from list of functions called by 'minibuffer-exit-hook' when
activating/deactivating 'minibuffer-nonselected-mode'.  Rewrite
doc-string.
2025-10-13 10:22:04 +02:00
Spencer Baugh
e2567eab10 Treat a completion boundary change as completion
In completion--do-completion, check if completion-try-completion
moved point out of the old completion boundaries.  If that
happened, then we did non-trivial completion even if the string
is otherwise unchanged.

For example,
~/src/emacs/trunk/lisp|/progmodes/project.el
hitting TAB moves us to:
~/src/emacs/trunk/lisp/|progmodes/project.el
then hitting TAB again moves us to
~/src/emacs/trunk/lisp/progmodes/|project.el

Both of these completions are successful, but we previously ran
code for completion failure (the t branch of the cond in
completion--do-completion) in the second case.  In particular,
we would always run minibuffer-completion-help, ignoring the
specific value of completion-auto-help which controls whether or
not to run minibuffer-completion-help.  Now we correctly run
code for successful completion for both cases.

We also always have checked that we're in the same boundaries
before doing completion cycling; that check is now more
accurate (bug#79238).

* lisp/minibuffer.el (completion--in-boundaries-p): Add.
(completion--do-completion): Check completion--in-boundaries-p.
2025-10-09 20:50:30 +03:00
Juri Linkov
aaf8b301e7 Fix completions truncated on scrolling (bug#79506)
* lisp/simple.el (completion-setup-function):
Add 'completion--lazy-insert-strings-on-scroll'
to buffer-local hook 'window-scroll-functions'.

* lisp/minibuffer.el (completion--lazy-insert-strings-on-scroll):
New function.
(completion--in-region-1): Remove calls to the function
'completion--lazy-insert-strings' that now are handled
by the scroll hook.
2025-09-29 20:13:05 +03:00
Juri Linkov
e719f62a50 * lisp/minibuffer.el (minibuffer--nonselected-check): Simplify condition. 2025-09-25 09:50:39 +03:00
Juri Linkov
cef3f8f11d * lisp/minibuffer.el (minibuffer--nonselected-check): Fix condition.
To detect the completions buffer check for the buffer-local value of
'completion-reference-buffer' in the newly selected window.
2025-09-24 20:46:14 +03:00
Daniel Mendler
d924520187 Improve minibuffer-nonselected-mode
Use private names.  Use hashed function symbols.  Do not restrict the
overlay to the miniwindow, since the minibuffer can be displayed by
other windows, for example by packages using child frames or by
vertico-buffer-mode (bug#79490).

* lisp/minibuffer.el (minibuffer-nonselected-setup): Rename to
minibuffer--nonselected-setup.  Use hashed function symbols.
Add docstring.
(minibuffer-nonselected-check): Rename to
minibuffer--nonselected-check. Use hashed function symbols.
Do not restrict overlay to miniwindow.
(minibuffer-nonselected-overlay): Rename to
minibuffer--nonselected-overlay.
(minibuffer-nonselected-mode): Use hashed function symbol for
custom-initialize-delay.
2025-09-24 20:32:05 +03: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
Steven Allen
ae32e25419 Fix minibuffer-nonselected-mode when using recursive minibuffers
* lisp/minibuffer.el (minibuffer-nonselected-setup): Use
window-buffer-change-functions in addition to
window-selection-change-functions to detect changes from one recursive
minibuffer to another within the same minibuffer-window.
(minibuffer-nonselected-check): Ensure that the target minibuffer is
current before checking/deleting the overlay (bug#79472).
2025-09-21 19:34:33 +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
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
b953dc679c Revert "Avoid duplicating strings in pcm--merge-completions"
Revert "Avoid duplicating strings in pcm--merge-completions",
commit b511c38bba.  It broke
existing behavior, now covered by tests adding in this commit.

* lisp/minibuffer.el (completion-pcm--merge-completions):
* test/lisp/minibuffer-tests.el (completion-pcm-test-anydelim):
(completion-pcm-bug4219):
2025-09-01 17:12:42 -04:00
Stefan Monnier
3c94ae5a37 (completion-file-name-table): Refine last fix
* lisp/minibuffer.el (completion-file-name-table): Don't
hardcode Tramp knowledge here.
2025-09-01 00:57:44 -04: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
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
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
Spencer Baugh
3f7c16d858 Add minibuffer--completions-visible and use it
At various places, instead of just checking that there's any
window displaying a buffer named *Completions*, we should
additionally check that that *Completions* buffer is actually
for the current completion session.
minibuffer--completions-visible does that.

* lisp/comint.el (comint-complete-input-ring)
(comint-dynamic-list-completions): Call
minibuffer--completions-visible.
* lisp/minibuffer.el (minibuffer--completions-visible):
Add. (bug#77253)
(completion--do-completion, completions--post-command-update)
(completions--after-change, minibuffer-hide-completions)
(minibuffer-visible-completions)
(minibuffer-visible-completions--always-bind)
(minibuffer-visible-completions--filter)
(with-minibuffer-completions-window, minibuffer-complete-history)
(minibuffer-complete-defaults): Call
minibuffer--completions-visible.
* lisp/pcomplete.el (pcomplete-show-completions): Call
minibuffer--completions-visible.
* lisp/simple.el (switch-to-completions): Call
minibuffer--completions-visible.
* test/lisp/minibuffer-tests.el (completion-auto-help-test)
(completion-auto-select-test): Call
minibuffer--completions-visible.
2025-08-21 20:10:08 +03:00
Spencer Baugh
b511c38bba Avoid duplicating strings in pcm--merge-completions
Make completion-pcm--merge-completions operate only on the text
matched by the wildcards, instead of also the text in between
the wildcards.  This improves performance and simplifies the
code by removing the need for the previous mutable variable
"fixed".

* lisp/minibuffer.el (completion-pcm--merge-completions):
Operate only on text matched by wildcards. (bug#79265)
2025-08-21 03:37:29 +03:00
Spencer Baugh
1bd7b6ac27 Treat point more consistently in PCM completion
Properly fix bug#38458, which is fundamentally an issue with
completion-ignore-case, by checking if the completions are
unique ignoring case.  When the completions are unique, the
normal code to delete a wildcard naturally causes point to be
moved to the end of the minibuffer, which is the correct
behavior.

Now that the bug is fixed properly, remove a hack which
previously was used to "fix" it, which made point behave
inconsistently if it was in the middle of the minibuffer versus
at the end of the minibuffer.

* lisp/minibuffer.el (completion-pcm--merge-completions):
Respect completion-ignore-case when checking for completion
uniqueness. (bug#79265)
(completion-pcm--string->pattern)
(completion-pcm--optimize-pattern): Allow point at the end of
the pattern.
* test/lisp/minibuffer-tests.el (completion-table-test-quoting)
(completion-test--pcm-bug38458, completion-pcm-test-8): Update
tests for more correct behavior.
2025-08-21 03:36:31 +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
Spencer Baugh
cd364a2119 Fix 'completion-ignore-case' with 'completion--file-name-table'
509cbe1c35 "Improve env var handling in read-file-name"
caused 'try-completion' and 'all-completion' operations with
'completion--file-name-table' to no longer update the case of
text which was already present in the input string.  That is,
completions would be returned ignoring case, but the completions
would have letter-casing which matched the input string rather
than matching the actual file names.
This was caused by unnecessarily replacing text in the returned
file name completions with text from the input string ORIG,
which in turn was caused by the desire to preserve text from
ORIG even after 'substitute-in-file-name' changed it.  Fix this
by detecting when ORIG was not substantially changed by
'substitute-in-file-name'; in that case, the returned file name
completions also don't need substantial changes.
* lisp/minibuffer.el (completion--file-name-table): Use text
from the completions, not the input string.  (Bug#78323)
* test/lisp/minibuffer-tests.el (completion-table-test-quoting):
Test with 'completion-ignore-case' as well.
2025-05-19 20:02:45 +03:00
Spencer Baugh
d56d7ca35c Fix completion boundaries for TRAMP file names
Previously, we assumed (roughly) that substitute-in-file-name
always returns a suffix of the original string.  But
substitute-in-file-name on "/ssh:user@host:/~/" returns
"/ssh:user@host:~/", preserving the TRAMP magic prefix.  Weaken
the assertion in completion--sifn-boundaries to allow this; the
new assertion is more clear about the property we care about,
anyway.

* lisp/minibuffer.el (completion--sifn-boundaries): Weaken
assertion slightly.

* test/lisp/net/tramp-tests.el (tramp--test-emacs31-p)
(tramp--split-on-boundary)
(tramp-test51-file-name-completion-boundaries): Add.
2025-05-02 14:47:37 +02:00
Spencer Baugh
1acb645432 Replace cl-remove-if with seq-remove in minibuffer.el
* lisp/minibuffer.el (completion--file-name-table): Replace
cl-remove-if with seq-remove. (bug#78149)
2025-05-01 08:42:21 +03:00
Spencer Baugh
509cbe1c35 Improve env var handling in read-file-name
Fix various bugs, including bug#77718, by rewriting the way file
name completion handles environment variable expansion.  Instead
of using completion-table-with-quoting to manipulate the string
being completed on, simply make the completion table itself
understand substitute-in-file-name.

Tests are updated: partial-completion now preserves unexpanded
environment variables.  However, partial-completion no longer
works across environment variables containing delimiters; that's
an acceptable sacrifice.

* lisp/minibuffer.el (completion--sifn-boundaries): Add.
(completion--file-name-table): Rewrite to use
substitute-in-file-name explicitly. (bug#77718)
* test/lisp/minibuffer-tests.el (completion-table-test-quoting):
Update.
2025-04-28 14:00:27 -04:00
Eli Zaretskii
cb339ad8f4 ; * lisp/minibuffer.el (read-file-name): Fix a typo in the doc string. 2025-04-10 09:36:17 +03:00
Spencer Baugh
0fbba16387 Preserve an explicit * in pcm-try-completion
An explicitly typed * has different semantics from automatically
inserted PCM wildcards, so it should be preserved on try-completion.  We
already do this in some cases, but now we do it more.

This is especially significant for filename completion: removing an
explicit * can take us from

~/src/emacs/trunk/*/minibuf

to

~/src/emacs/trunk//minibuf

The explicit double slash is interpreted by the file name completion
table to mean "start completing from the root directory", so deleting
the * here substantially changes semantics.

* lisp/minibuffer.el (completion-pcm--merge-completions): Don't drop
important wildcards. (bug#74420)
* test/lisp/minibuffer-tests.el (completion-pcm-test-7): Add tests.
2025-04-08 14:36:30 -04:00
Martin Rudalics
ae6ac5cad8 Don't propertize prompt in 'minibuffer--regexp-propertize' (Bug#77497)
* lisp/minibuffer.el (minibuffer--regexp-propertize): Skip prompt
when propertizing user input (Bug#77497).
2025-04-04 09:00:15 +02:00
Stefan Monnier
1d07a6d7e3 Use replace-region-contents to replace insert+delete
* lisp/minibuffer.el (completion--replace):
* lisp/emacs-lisp/cl-lib.el (cl--set-buffer-substring):
* lisp/subr.el (replace-string-in-region):
Use `replace-region-contents` instead of insert+delete.

* lisp/help-fns.el (help-fns--signature):
Use `replace-region-contents` instead of `cl--set-buffer-substring`.

* lisp/language/japan-util.el (japanese-replace-region):
Rewrite using `replace-region-contents` and mark obsolete.
(japanese-katakana-region, japanese-hankaku-region):
Use `replace-region-contents` instead.

* lisp/progmodes/flymake-proc.el (flymake-proc--replace-region):
Rewrite using `replace-region-contents` and mark obsolete.
(flymake-proc--check-patch-master-file-buffer):
Use `replace-region-contents` instead.
2025-03-29 17:49:49 -04:00
Eshel Yaron
119931a9ce
; Populate completions list before scrolling it
This fixes a regression introduced in b12a3a03ae, where
repeating a completion command (e.g. TAB in the minibuffer)
would no longer scroll through all available completions.

* lisp/minibuffer.el (completion--in-region-1): Call
'completion--lazy-insert-strings' before scrolling
the completions list.
2025-03-24 16:32:12 +01:00
Spencer Baugh
b21636580b minibuffer.el: Fix warnings and coding style in last change
* lisp/minibuffer.el: Cut lines to fit into 80 columns.
(completion--insert-strings): Simplify `if` to `or`.
(completion--insert-horizontal, completion--insert-one-column):
Fix warning about used var starting with `_`.  Avoid `apply-partially`.
2025-03-21 17:24:50 -04:00
Spencer Baugh
b12a3a03ae Lazily highlight and insert candidates in *Completions*
From profiling, the main bottleneck in completion over large
completion sets is display-completion-list, when there are many
available candidates.  For example, in my large monorepo, when
completing over the 589196 files or the 73897 branches, even
with the candidates narrowed down by typing some prefix to
complete, TAB (when it shows *Completions*) or ? is slow, mostly
in display-completion-list.

However, rendering all the completion candidates is unnecessary if
the *Completions* window is never scrolled to see those candiates.  By
eagerly inserting only some candidates and lazily highlighting and
inserting the remaining candidates only when necessary, performance is
much improved.

* lisp/minibuffer.el (completion--insert-strings): Insert
completions lazily. (bug#74561)
(completions--lazy-insert-button): Add.
(completion--insert-horizontal, completion--insert-one-column):
Throw a continuation when enough lines of completions are
inserted.
(completion--insert-vertical): Add ignored lines argument.
(minibuffer-completion-help): Set completion-lazy-hilit.
(with-minibuffer-completions-window): Call
completion--lazy-insert-strings.
(with-minibuffer-completions-window):
* lisp/simple.el (completion-setup-function): Preserve
buffer-locals required for lazy completion insertion.
(switch-to-completions): Call completion--lazy-insert-strings.
* etc/NEWS: Announce.
2025-03-21 17:06:19 -04:00
Sean Whitton
99852fb867 Merge from origin/emacs-30
894b0e3a2f ; Adapt comment in tramp.el
cc87717fa0 Add keyword placeholder to tramp.el
7d0d61d854 Rewrite ERT manual introduction
b2f124f2a8 ; cperl-mode.el: Don't misinterpret exec_fcn as keyword exec
59d1aac49d Document return values of the various read-* functions
2025-03-12 10:09:09 +08:00
Stefan Kangas
77b7e2d37b Automatically document when setopt is needed
* lisp/help-fns.el (help--recommend-setopt): New function to
automatically document the need to use `setopt` to set the values of
any defcustoms with a `:set` property.
(help-fns-describe-variable-functions): Add above new function to
hook.

* lisp/follow.el (follow-mode-prefix-key):
* lisp/minibuffer.el (minibuffer-regexp-prompts):
* lisp/register.el (register-use-preview):
* lisp/savehist.el (savehist-autosave-interval):
* lisp/saveplace.el (save-place-autosave-interval):
* lisp/tab-bar.el (tab-bar-define-keys):
* lisp/textmodes/text-mode.el (text-mode-ispell-word-completion):
Delete now redundant text from docstrings.
2025-03-12 00:40:17 +01:00
Eli Zaretskii
59d1aac49d Document return values of the various read-* functions
* lisp/textmodes/string-edit.el (read-string-from-buffer):
* lisp/simple.el (read-from-kill-ring, read-shell-command)
(read-signal-name):
* lisp/replace.el (read-regexp-case-fold-search):
* lisp/auth-source.el (read-passwd):
* lisp/subr.el (read-key, read-number):
* lisp/minibuffer.el (read-file-name, read-no-blanks-input):
* lisp/international/mule-cmds.el (read-multilingual-string):
* lisp/language/japan-util.el (read-hiragana-string):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-mode, read-file-local-variable-value):
* lisp/faces.el (read-face-font, read-face-name):
* lisp/simple.el (read-extended-command):
* lisp/env.el (read-envvar-name):
* lisp/files.el (read-directory-name):
* lisp/faces.el (read-color):
* lisp/international/mule-diag.el (read-charset):
* lisp/emacs-lisp/map-ynp.el (read-answer):
* src/coding.c (Fread_coding_system)
(Fread_non_nil_coding_system):
* src/minibuf.c (Fread_command, Fread_from_minibuffer):
* src/lread.c (Fread_char, Fread_char_exclusive, Fread_event): Doc
fixes.
2025-03-09 15:02:39 +02:00
Eli Zaretskii
6c411de542 Merge from origin/emacs-30
f88dc0f2f9 ; Fix documentation of 'buffer-text-pixel-size'
734986349f ; Minor Android documentation improvements
a90da89903 ; Fix up emacs-lisp-mode docstring
58c7acb555 ; Fix completion-fail-discreetly docstring typo.
02c830ba22 Fix ert-font-lock macro signatures
0c6b8643ae Fix a typo in 'window_text_pixel_size'
8a8c25eacc ; Add Rudolf Schlatte to authors.el
94c0ea39a5 * doc/misc/efaq.texi (New in Emacs 30): Fix typo.  (Bug#7...
0be5f9115e ; * etc/images/README (Files): Add an entry for last-page...
63adf9dcf5 ; Reflow some cl-lib docstrings
99253f7970 ; * etc/TODO: New section "Make it easier to contribute".

# Conflicts:
#	lisp/emacs-lisp/cl-macs.el
2025-03-01 10:01:09 -05:00
Stefan Kangas
3a5cf24735 ; Silence byte-compiler during bootstrap 2025-02-28 18:57:17 +01:00
Stefan Kangas
fa0131723c Prefer incf to cl-incf in remaining files
* admin/syncdoc-type-hierarchy.el (syncdoc-make-type-table):
* admin/unidata/unidata-gen.el (unidata-gen-table-word-list):
* lisp/arc-mode.el (archive--summarize-descs):
* lisp/auth-source.el (auth-source-forget+):
* lisp/battery.el (battery-linux-proc-acpi, battery-linux-sysfs):
* lisp/calendar/parse-time.el (parse-time-tokenize):
* lisp/calendar/time-date.el (decoded-time-add)
(decoded-time--alter-month, decoded-time--alter-day):
* lisp/cedet/semantic/ede-grammar.el (project-compile-target):
* lisp/dired.el (dired-insert-set-properties):
* lisp/edmacro.el (edmacro-format-keys):
* lisp/epa-file.el (epa-file--replace-text):
* lisp/eshell/esh-cmd.el (eshell-for-iterate):
* lisp/eshell/esh-io.el (eshell-create-handles)
(eshell-duplicate-handles, eshell-protect-handles)
(eshell-copy-output-handle, eshell-buffered-print):
* lisp/font-lock.el (font-lock-fontify-keywords-region):
* lisp/help-fns.el:
* lisp/ibuf-ext.el (ibuffer-generate-filter-groups)
(ibuffer-insert-filter-group-before):
* lisp/ibuffer.el (ibuffer-confirm-operation-on, ibuffer-map-lines):
* lisp/image/image-dired-external.el (image-dired-thumb-queue-run):
* lisp/image/image-dired.el (image-dired-display-thumbs)
(image-dired-line-up):
* lisp/imenu.el (imenu--split):
* lisp/info-xref.el (info-xref-check-node, info-xref-check-all-custom):
* lisp/international/quail.el (quail-insert-decode-map):
* lisp/international/rfc1843.el (rfc1843-decode):
* lisp/mail/ietf-drums-date.el (ietf-drums-date--tokenize-string):
* lisp/mail/ietf-drums.el (ietf-drums-token-to-list):
* lisp/mail/rfc2047.el (rfc2047-qp-or-base64):
* lisp/mail/rfc2231.el (rfc2231-encode-string):
* lisp/mail/yenc.el (yenc-decode-region):
* lisp/mh-e/mh-e.el (mh-xargs):
* lisp/mh-e/mh-folder.el (mh-recenter):
* lisp/mh-e/mh-mime.el (mh-mime-part-index):
* lisp/mh-e/mh-search.el (mh-search):
* lisp/mh-e/mh-thread.el (mh-thread-current-indentation-level):
* lisp/mh-e/mh-utils.el (mh-sub-folders-parse):
* lisp/minibuffer.el (minibuffer--sort-by-position)
(completion-pcm--pattern-point-idx):
* lisp/mpc.el (mpc-cmd-find, mpc-cmd-move, mpc-select-extend)
(mpc-songs-refresh, mpc-songpointer-score)
(mpc-songpointer-refresh-hairy):
* lisp/msb.el (msb--mode-menu-cond, msb--most-recently-used-menu)
(msb--split-menus-2, msb--make-keymap-menu):
* lisp/net/pop3.el (pop3-send-streaming-command):
* lisp/net/puny.el
(puny-encode-complex, puny-decode-string-internal):
* lisp/net/shr-color.el (shr-color-hue-to-rgb):
* lisp/net/soap-client.el (soap-encode-xs-complex-type)
(soap-decode-xs-complex-type, soap-resolve-references-for-operation)
(soap-wsdl-resolve-references):
* lisp/play/5x5.el (5x5-made-move, 5x5-down, 5x5-right):
* lisp/play/decipher.el (key, decipher-mode-syntax-table)
(decipher-add-undo, decipher-complete-alphabet, decipher--analyze)
(decipher--digram-counts, decipher--digram-total):
* lisp/play/hanoi.el (hanoi-move-ring):
* lisp/play/snake.el (snake-reset-game, snake-update-game):
* lisp/profiler.el (profiler-calltree-depth, profiler-calltree-build-1)
(profiler-calltree-build-unified)
(profiler-calltree-compute-percentages):
* lisp/registry.el (registry-reindex):
* lisp/simple.el (completion-list-candidate-at-point):
* lisp/strokes.el (strokes-xpm-to-compressed-string):
* lisp/term.el (term-emulate-terminal, term--handle-colors-list):
* lisp/treesit.el (treesit-node-index, treesit-indent-region):
* lisp/url/url-cookie.el (url-cookie-parse-file-netscape):
* lisp/url/url-dav.el (url-dav-file-name-completion):
* lisp/url/url-queue.el (url-queue-setup-runners)
(url-queue-run-queue):
* lisp/wdired.el (wdired-finish-edit):
* lisp/wid-edit.el (widget-move):
* lisp/window-tool-bar.el (window-tool-bar-string):
* lisp/winner.el (winner-undo):
* lisp/xwidget.el (xwidget-webkit-isearch-forward)
(xwidget-webkit-isearch-backward): Prefer incf to cl-incf.
2025-02-26 02:57:03 +01:00
Basil L. Contovounesios
58c7acb555 ; Fix completion-fail-discreetly docstring typo. 2025-02-25 11:26:11 +01:00
Stefan Kangas
9d7d4db7eb Prefer decf to cl-decf
* lisp/auth-source-pass.el (auth-source-pass--find-match-many):
* lisp/calendar/time-date.el (decoded-time-add)
(decoded-time--alter-month, decoded-time--alter-day):
* lisp/dired.el (dired--move-to-next-line):
* lisp/dom.el (dom-pp):
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
* lisp/emacs-lisp/cl-print.el (cl-print-to-string-with-limit):
* lisp/emacs-lisp/cl-seq.el (cl-fill, cl-replace, cl-substitute):
* lisp/emacs-lisp/comp-cstr.el (comp--range-union)
(comp--range-intersection):
* lisp/emacs-lisp/comp.el (comp-vec-prepend, comp--emit-narg-prologue):
* lisp/emacs-lisp/edebug.el (edebug--strip-instrumentation):
* lisp/emacs-lisp/eldoc.el (eldoc--invoke-strategy):
* lisp/emacs-lisp/pp.el (pp--format-definition):
* lisp/emacs-lisp/smie.el (smie-config--guess-1):
* lisp/eshell/esh-io.el (eshell-close-handle, eshell-set-output-handle):
* lisp/gnus/gnus-async.el (gnus-async-prefetch-article):
* lisp/gnus/gnus-group.el (gnus-group-mark-group)
(gnus-group-yank-group):
* lisp/gnus/gnus-salt.el (gnus-tree-forward-line):
* lisp/gnus/gnus-score.el (gnus-decay-scores):
* lisp/gnus/gnus-srvr.el (gnus-browse-toggle-subscription-at-point):
* lisp/gnus/gnus-sum.el (gnus-build-sparse-threads, gnus-parent-headers)
(gnus-update-marks, gnus-summary-work-articles)
(gnus-summary-refer-parent-article, gnus-summary-next-thread)
(gnus-read-header, gnus-summary-insert-new-articles):
* lisp/gnus/gnus-topic.el (gnus-topic-forward-topic):
* lisp/gnus/gnus.el (gnus-short-group-name):
* lisp/gnus/message.el (message-remove-first-header)
(message-shorten-references, message-insert-screenshot):
* lisp/gnus/mm-url.el (mm-url-insert):
* lisp/gnus/nnselect.el (nnselect-push-info):
* lisp/ibuffer.el (ibuffer-backward-line, ibuffer-forward-line)
(ibuffer-map-lines):
* lisp/icomplete.el (icomplete--render-vertical):
* lisp/image/image-dired-external.el (image-dired-create-thumb-1):
* lisp/image/image-dired.el (image-dired-delete-char):
* lisp/mail/ietf-drums-date.el (ietf-drums-date--tokenize-string):
* lisp/mh-e/mh-utils.el (mh-sub-folders-parse):
* lisp/minibuffer.el (minibuffer-completion-help):
* lisp/mpc.el (mpc-cmd-move, mpc-songpointer-refresh-hairy):
* lisp/net/eww.el (eww-process-text-input):
* lisp/net/pop3.el (pop3-wait-for-messages, pop3-uidl-stat)
(pop3-uidl-dele):
* lisp/net/shr-color.el (shr-color-hue-to-rgb):
* lisp/play/5x5.el (5x5-up, 5x5-left):
* lisp/play/decipher.el (decipher-read-alphabet, decipher--digram-total)
(decipher-analyze-buffer):
* lisp/play/hanoi.el (hanoi-insert-ring, hanoi-move-ring):
* lisp/profiler.el (profiler-format-number)
(profiler-calltree-build-unified):
* lisp/progmodes/antlr-mode.el (antlr-next-rule, antlr-indent-line):
* lisp/progmodes/c-ts-common.el (c-ts-common-statement-offset):
* lisp/progmodes/ebrowse.el
(ebrowse-cyclic-display-next/previous-member-list):
* lisp/progmodes/hideif.el (hif-backward-comment):
* lisp/progmodes/js.el (js-beginning-of-defun, js-end-of-defun)
(js-ts--syntax-propertize):
* lisp/progmodes/typescript-ts-mode.el
(tsx-ts--syntax-propertize-captures):
* lisp/rect.el (rectangle--*-char):
* lisp/term.el (term-emulate-terminal):
* lisp/textmodes/reftex-cite.el (reftex-do-citation):
* lisp/textmodes/reftex-index.el (reftex-index-next-phrase):
* lisp/textmodes/reftex-parse.el (reftex-init-section-numbers):
* lisp/textmodes/reftex-sel.el (reftex-select-unmark):
* lisp/textmodes/reftex.el (reftex-silence-toc-markers):
* lisp/treesit.el (treesit-navigate-thing):
* lisp/vc/diff-mode.el (diff-sanity-check-context-hunk-half,
(diff-sanity-check-hunk):
* lisp/vc/pcvs-util.el (cvs-first):
* lisp/vc/smerge-mode.el (smerge-get-current):
* lisp/vc/vc-hg.el (vc-hg--glob-to-pcre):
* test/lisp/net/socks-tests.el
(socks-tests-perform-hello-world-http-request):
* test/src/buffer-tests.el (test-overlay-randomly): Prefer decf to
cl-defc in all code where we can.
2025-02-23 00:38:22 +01:00
Po Lu
c37e7cef42 Merge from savannah/emacs-30
58e4bfe340 Add two missing NULL checks of malloc'd values on Android
81ca9c75f1 ; * etc/PROBLEMS: Document how to grant storage permissio...
d82d468979 ; * etc/TODO: Rethink finder-known-keywords.
b9b9c33dcb Fix (Non)GNU ELPA description in manual
87a61eba1b Move 'package-archives' documentation to emacs manual
316e47c5af ; * src/fns.c (Fmapconcat): Doc fix (bug#76242).
3cfbeb3fca ; Fix >72 character long lines in docstring
c68886ddb7 ; Change "virus" to "malicious" in lispref
6701866be4 Document (Non-)GNU ELPA in emacs manual
02851768b7 ; * .mailmap: Add entry for Thuna.  (Bug#76221)
2d7a8cbf4c Fix author name
1931425748 Use c-ts-common's comment setup in go-ts-mode (bug#75978)
316893ca38 Add java-language-server to eglot-server-programs
2025-02-15 16:58:55 +08:00
Stefan Kangas
3cfbeb3fca ; Fix >72 character long lines in docstring 2025-02-13 08:45:42 +01:00
Juri Linkov
d5c3173366 Move calendar-month metadata to calendar-read-date (bug#68214)
* lisp/minibuffer.el (completion-category-defaults): Move the
'calendar-month' default value to the metadata in calendar-read-date.

* lisp/calendar/calendar.el (calendar-read-date): Add
display-sort-function moved from completion-category-defaults.
2025-01-07 20:22:14 +02:00
Stefan Kangas
7fa975adbc Update copyright year to 2025
Run "TZ=UTC0 admin/update-copyright".
2025-01-02 18:39:42 +01:00
Paul Eggert
4da38c6321 Update copyright year to 2025
Run "TZ=UTC0 admin/update-copyright".
2025-01-01 07:39:17 +00:00
Eli Zaretskii
af3bbc8360 Merge from origin/emacs-30
2ba6387d1d ; Fix inaccuracy in ELisp Reference manual
8ac6a17880 ; * etc/PROBLEMS: Mention problems with XPM support in GD...
624322d5f6 Add missing fontification matches for elixir-ts-mode
5bafb11b40 ; Fix copyright year
186ea40732 Don't start docstrings with "This function" or similar
cb8ce2e68b Enable indent-tabs-mode in obj-c-mode
54f3513709 Fix comment indent in 'lua-ts-mode' and old grammar
8b95549e90 * admin/nt/dist-build/build-dep-zips.py: (deps src) handl...
8064b2a679 Document undocumented completion commands
c29b798537 ; etc/w32-feature.el (harfbuzz): improve test
0e43e35f96 * admin/nt/dist-build/emacs.nsi: (Uninstall) delete only ...
b83cd8a8fb ; * etc/tutorials/TUTORIAL.ko: Fix the beginning.
41caccc488 ; * etc/publicsuffix.txt: Update from upstream.
e6fb18406e ; Fix refcards
14e791f9ba ; Update acknowledgments for Emacs 30
861b7864fc ; Fix node name in emacs-lisp-intro.texi
77243ba5be ; Update version tags of defcustoms
fe2ac33bae ;* doc/misc/efaq.texi (New in Emacs 30): Mention 'trusted...
8fb884f0dc ; * etc/NEWS: Fix wording.
e281355a5e Improve D-Bus and Tramp manual

# Conflicts:
#	doc/emacs/emacs.texi
#	etc/NEWS
#	lisp/erc/erc-log.el
#	lisp/eshell/esh-mode.el
#	lisp/which-key.el
2024-12-28 08:30:31 -05:00