mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-07 06:50:23 -08:00
Merge from savannah/emacs-30
19791839cf; Don't document a complicated default88bc748f52Fix minibuffer-next-completion in completing-read-multiple737f249aa2; Document 'completing-read-multiple' in the ELisp manual37f2551460; * lisp/gnus/nnweb.el (nnweb-type): Doc fix.
This commit is contained in:
commit
fb4daf4aa0
4 changed files with 22 additions and 23 deletions
|
|
@ -1242,6 +1242,16 @@ different function to completely override the normal behavior of
|
||||||
@code{completing-read}.
|
@code{completing-read}.
|
||||||
@end defvar
|
@end defvar
|
||||||
|
|
||||||
|
@findex completing-read-multiple
|
||||||
|
@vindex crm-separator
|
||||||
|
If you need to prompt the user for several strings, like several
|
||||||
|
elements of a list or several parameters (e.g., user, host, and port) of
|
||||||
|
a connection, you can use @code{completing-read-multiple}. It allows
|
||||||
|
typing several strings separated by a separator string (by default, tabs
|
||||||
|
and commas; customize @code{crm-separator} to change that), and provides
|
||||||
|
completion for each individual string the user types. It returns the
|
||||||
|
strings that were read, as a list.
|
||||||
|
|
||||||
@node Completion Commands
|
@node Completion Commands
|
||||||
@subsection Minibuffer Commands that Do Completion
|
@subsection Minibuffer Commands that Do Completion
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -289,12 +289,7 @@ supersede the message in the current buffer.
|
||||||
|
|
||||||
@vindex message-ignored-supersedes-headers
|
@vindex message-ignored-supersedes-headers
|
||||||
Headers matching the @code{message-ignored-supersedes-headers} are
|
Headers matching the @code{message-ignored-supersedes-headers} are
|
||||||
removed before popping up the new message buffer. The default is@*
|
removed before popping up the new message buffer.
|
||||||
@samp{^Path:\\|^Date\\|^NNTP-Posting-Host:\\|^Xref:\\|^Lines:\\|@*
|
|
||||||
^Received:\\|^X-From-Line:\\|^X-Trace:\\|^X-Complaints-To:\\|@*
|
|
||||||
Return-Path:\\|^Supersedes:\\|^NNTP-Posting-Date:\\|^X-Trace:\\|@*
|
|
||||||
^X-Complaints-To:\\|^Cancel-Lock:\\|^Cancel-Key:\\|^X-Hashcash:\\|@*
|
|
||||||
^X-Payment:\\|^Approved:}.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -251,22 +251,16 @@ with empty strings removed."
|
||||||
(setq-local minibuffer-completion-table #'crm--collection-fn)
|
(setq-local minibuffer-completion-table #'crm--collection-fn)
|
||||||
(setq-local minibuffer-completion-predicate predicate)
|
(setq-local minibuffer-completion-predicate predicate)
|
||||||
(setq-local completion-list-insert-choice-function
|
(setq-local completion-list-insert-choice-function
|
||||||
(lambda (start end choice)
|
(lambda (_start _end choice)
|
||||||
(if (and (stringp start) (stringp end))
|
|
||||||
(let* ((beg (save-excursion
|
(let* ((beg (save-excursion
|
||||||
(goto-char (minibuffer-prompt-end))
|
(if (search-backward-regexp crm-separator nil t)
|
||||||
(or (search-forward start nil t)
|
(1+ (point))
|
||||||
(search-forward-regexp crm-separator nil t)
|
|
||||||
(minibuffer-prompt-end))))
|
(minibuffer-prompt-end))))
|
||||||
(end (save-excursion
|
(end (save-excursion
|
||||||
(goto-char (point-max))
|
(if (search-forward-regexp crm-separator nil t)
|
||||||
(or (search-backward end nil t)
|
(1- (point))
|
||||||
(progn
|
|
||||||
(goto-char beg)
|
|
||||||
(search-forward-regexp crm-separator nil t))
|
|
||||||
(point-max)))))
|
(point-max)))))
|
||||||
(completion--replace beg end choice))
|
(completion--replace beg end choice))))
|
||||||
(completion--replace start end choice))))
|
|
||||||
;; see completing_read in src/minibuf.c
|
;; see completing_read in src/minibuf.c
|
||||||
(setq-local minibuffer-completion-confirm
|
(setq-local minibuffer-completion-confirm
|
||||||
(unless (eq require-match t) require-match))
|
(unless (eq require-match t) require-match))
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
(defvoo nnweb-type 'google
|
(defvoo nnweb-type 'google
|
||||||
"What search engine type is being used.
|
"What search engine type is being used.
|
||||||
Valid types include `google' and `dejanews'.")
|
The only valid type is currently `google'.")
|
||||||
|
|
||||||
(defvar nnweb-type-definition
|
(defvar nnweb-type-definition
|
||||||
'((google
|
'((google
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue