X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/1dd4f26ab6c1f14628d9fcf03b0cca7e54d52302..0ea47a6159f351f32b7dbc68debe99eb02f2dd8d:/lisp/minibuffer.el diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 1251a4e110..9190c1fb20 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -369,13 +369,15 @@ instead of a string, a function that takes the completion and returns the (defun completion-table-with-predicate (table pred1 strict string pred2 action) "Make a completion table equivalent to TABLE but filtered through PRED1. -PRED1 is a function of one argument which returns non-nil if and only if the -argument is an element of TABLE which should be considered for completion. -STRING, PRED2, and ACTION are the usual arguments to completion tables, -as described in `try-completion', `all-completions', and `test-completion'. -If STRICT is t, the predicate always applies; if nil it only applies if -it does not reduce the set of possible completions to nothing. -Note: TABLE needs to be a proper completion table which obeys predicates." +PRED1 is a function of one argument which returns non-nil if and +only if the argument is an element of TABLE which should be +considered for completion. STRING, PRED2, and ACTION are the +usual arguments to completion tables, as described in +`try-completion', `all-completions', and `test-completion'. If +STRICT is non-nil, the predicate always applies; if nil it only +applies if it does not reduce the set of possible completions to +nothing. Note: TABLE needs to be a proper completion table which +obeys predicates." (cond ((and (not strict) (eq action 'lambda)) ;; Ignore pred1 since it doesn't really have to apply anyway. @@ -831,7 +833,8 @@ styles for specific categories, such as files, buffers, etc." (defvar completion-category-defaults '((buffer (styles . (basic substring))) - (unicode-name (styles . (basic substring)))) + (unicode-name (styles . (basic substring))) + (project-file (styles . (basic substring)))) "Default settings for specific completion categories. Each entry has the shape (CATEGORY . ALIST) where ALIST is an association list that can specify properties such as: @@ -1834,7 +1837,7 @@ variables.") 'display-buffer-below-selected)) ,(if temp-buffer-resize-mode '(window-height . resize-temp-buffer-window) - '(window-height . shrink-window-if-larger-than-buffer)) + '(window-height . fit-window-to-buffer)) ,(when temp-buffer-resize-mode '(preserve-size . (nil . t)))) nil @@ -1967,7 +1970,7 @@ if there was no valid completion, else t." "Default function to use for `completion-in-region-function'. Its arguments and return value are as specified for `completion-in-region'. This respects the wrapper hook `completion-in-region-functions'." - (with-wrapper-hook + (subr--with-wrapper-hook-no-warnings ;; FIXME: Maybe we should use this hook to provide a "display ;; completions" operation as well. completion-in-region-functions (start end collection predicate)